UNPKG

59.8 kBSource Map (JSON)View Raw
1{"version":3,"file":"service-worker.umd.js","sources":["../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/service-worker/src/low_level.ts","../../../../../packages/service-worker/src/push.ts","../../../../../packages/service-worker/src/update.ts","../../../../../packages/service-worker/src/module.ts","../../../../../packages/service-worker/src/index.ts","../../../../../packages/service-worker/public_api.ts","../../../../../packages/service-worker/index.ts","../../../../../packages/service-worker/service-worker.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {concat, ConnectableObservable, defer, fromEvent, Observable, of, throwError} from 'rxjs';\nimport {filter, map, publish, switchMap, take, tap} from 'rxjs/operators';\n\nexport const ERR_SW_NOT_SUPPORTED = 'Service workers are disabled or not supported by this browser';\n\n/**\n * An event emitted when a new version of the app is available.\n *\n * @publicApi\n */\nexport interface UpdateAvailableEvent {\n type: 'UPDATE_AVAILABLE';\n current: {hash: string, appData?: Object};\n available: {hash: string, appData?: Object};\n}\n\n/**\n * An event emitted when a new version of the app has been downloaded and activated.\n *\n * @publicApi\n */\nexport interface UpdateActivatedEvent {\n type: 'UPDATE_ACTIVATED';\n previous?: {hash: string, appData?: Object};\n current: {hash: string, appData?: Object};\n}\n\n/**\n * An event emitted when a `PushEvent` is received by the service worker.\n */\nexport interface PushEvent {\n type: 'PUSH';\n data: any;\n}\n\nexport type IncomingEvent = UpdateAvailableEvent|UpdateActivatedEvent;\n\nexport interface TypedEvent {\n type: string;\n}\n\ninterface StatusEvent {\n type: 'STATUS';\n nonce: number;\n status: boolean;\n error?: string;\n}\n\n\nfunction errorObservable(message: string): Observable<any> {\n return defer(() => throwError(new Error(message)));\n}\n\n/**\n * @publicApi\n */\nexport class NgswCommChannel {\n readonly worker: Observable<ServiceWorker>;\n\n readonly registration: Observable<ServiceWorkerRegistration>;\n\n readonly events: Observable<TypedEvent>;\n\n constructor(private serviceWorker: ServiceWorkerContainer|undefined) {\n if (!serviceWorker) {\n this.worker = this.events = this.registration = errorObservable(ERR_SW_NOT_SUPPORTED);\n } else {\n const controllerChangeEvents = fromEvent(serviceWorker, 'controllerchange');\n const controllerChanges = controllerChangeEvents.pipe(map(() => serviceWorker.controller));\n const currentController = defer(() => of(serviceWorker.controller));\n const controllerWithChanges = concat(currentController, controllerChanges);\n\n this.worker = controllerWithChanges.pipe(filter((c): c is ServiceWorker => !!c));\n\n this.registration = <Observable<ServiceWorkerRegistration>>(\n this.worker.pipe(switchMap(() => serviceWorker.getRegistration())));\n\n const rawEvents = fromEvent<MessageEvent>(serviceWorker, 'message');\n const rawEventPayload = rawEvents.pipe(map(event => event.data));\n const eventsUnconnected = rawEventPayload.pipe(filter(event => event && event.type));\n const events = eventsUnconnected.pipe(publish()) as ConnectableObservable<IncomingEvent>;\n events.connect();\n\n this.events = events;\n }\n }\n\n postMessage(action: string, payload: Object): Promise<void> {\n return this.worker\n .pipe(take(1), tap((sw: ServiceWorker) => {\n sw.postMessage({\n action,\n ...payload,\n });\n }))\n .toPromise()\n .then(() => undefined);\n }\n\n postMessageWithStatus(type: string, payload: Object, nonce: number): Promise<void> {\n const waitForStatus = this.waitForStatus(nonce);\n const postMessage = this.postMessage(type, payload);\n return Promise.all([waitForStatus, postMessage]).then(() => undefined);\n }\n\n generateNonce(): number {\n return Math.round(Math.random() * 10000000);\n }\n\n eventsOfType<T extends TypedEvent>(type: T['type']): Observable<T> {\n const filterFn = (event: TypedEvent): event is T => event.type === type;\n return this.events.pipe(filter(filterFn));\n }\n\n nextEventOfType<T extends TypedEvent>(type: T['type']): Observable<T> {\n return this.eventsOfType(type).pipe(take(1));\n }\n\n waitForStatus(nonce: number): Promise<void> {\n return this.eventsOfType<StatusEvent>('STATUS')\n .pipe(filter(event => event.nonce === nonce), take(1), map(event => {\n if (event.status) {\n return undefined;\n }\n throw new Error(event.error!);\n }))\n .toPromise();\n }\n\n get isEnabled(): boolean {\n return !!this.serviceWorker;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {merge, NEVER, Observable, Subject} from 'rxjs';\nimport {map, switchMap, take} from 'rxjs/operators';\n\nimport {ERR_SW_NOT_SUPPORTED, NgswCommChannel, PushEvent} from './low_level';\n\n\n/**\n * Subscribe and listen to\n * [Web Push\n * Notifications](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices) through\n * Angular Service Worker.\n *\n * @usageNotes\n *\n * You can inject a `SwPush` instance into any component or service\n * as a dependency.\n *\n * <code-example path=\"service-worker/push/module.ts\" region=\"inject-sw-push\"\n * header=\"app.component.ts\"></code-example>\n *\n * To subscribe, call `SwPush.requestSubscription()`, which asks the user for permission.\n * The call returns a `Promise` with a new\n * [`PushSubscription`](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)\n * instance.\n *\n * <code-example path=\"service-worker/push/module.ts\" region=\"subscribe-to-push\"\n * header=\"app.component.ts\"></code-example>\n *\n * A request is rejected if the user denies permission, or if the browser\n * blocks or does not support the Push API or ServiceWorkers.\n * Check `SwPush.isEnabled` to confirm status.\n *\n * Invoke Push Notifications by pushing a message with the following payload.\n *\n * ```ts\n * {\n * \"notification\": {\n * \"actions\": NotificationAction[],\n * \"badge\": USVString\n * \"body\": DOMString,\n * \"data\": any,\n * \"dir\": \"auto\"|\"ltr\"|\"rtl\",\n * \"icon\": USVString,\n * \"image\": USVString,\n * \"lang\": DOMString,\n * \"renotify\": boolean,\n * \"requireInteraction\": boolean,\n * \"silent\": boolean,\n * \"tag\": DOMString,\n * \"timestamp\": DOMTimeStamp,\n * \"title\": DOMString,\n * \"vibrate\": number[]\n * }\n * }\n * ```\n *\n * Only `title` is required. See `Notification`\n * [instance\n * properties](https://developer.mozilla.org/en-US/docs/Web/API/Notification#Instance_properties).\n *\n * While the subscription is active, Service Worker listens for\n * [PushEvent](https://developer.mozilla.org/en-US/docs/Web/API/PushEvent)\n * occurrences and creates\n * [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification)\n * instances in response.\n *\n * Unsubscribe using `SwPush.unsubscribe()`.\n *\n * An application can subscribe to `SwPush.notificationClicks` observable to be notified when a user\n * clicks on a notification. For example:\n *\n * <code-example path=\"service-worker/push/module.ts\" region=\"subscribe-to-notification-clicks\"\n * header=\"app.component.ts\"></code-example>\n *\n * @see [Push Notifications](https://developers.google.com/web/fundamentals/codelabs/push-notifications/)\n * @see [Angular Push Notifications](https://blog.angular-university.io/angular-push-notifications/)\n * @see [MDN: Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API)\n * @see [MDN: Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API)\n * @see [MDN: Web Push API Notifications best practices](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices)\n *\n * @publicApi\n */\n@Injectable()\nexport class SwPush {\n /**\n * Emits the payloads of the received push notification messages.\n */\n readonly messages: Observable<object>;\n\n /**\n * Emits the payloads of the received push notification messages as well as the action the user\n * interacted with. If no action was used the `action` property contains an empty string `''`.\n *\n * Note that the `notification` property does **not** contain a\n * [Notification][Mozilla Notification] object but rather a\n * [NotificationOptions](https://notifications.spec.whatwg.org/#dictdef-notificationoptions)\n * object that also includes the `title` of the [Notification][Mozilla Notification] object.\n *\n * [Mozilla Notification]: https://developer.mozilla.org/en-US/docs/Web/API/Notification\n */\n readonly notificationClicks: Observable<{\n action: string; notification: NotificationOptions &\n {\n title: string\n }\n }>;\n\n /**\n * Emits the currently active\n * [PushSubscription](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)\n * associated to the Service Worker registration or `null` if there is no subscription.\n */\n readonly subscription: Observable<PushSubscription|null>;\n\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled(): boolean {\n return this.sw.isEnabled;\n }\n\n // TODO(issue/24571): remove '!'.\n private pushManager!: Observable<PushManager>;\n private subscriptionChanges = new Subject<PushSubscription|null>();\n\n constructor(private sw: NgswCommChannel) {\n if (!sw.isEnabled) {\n this.messages = NEVER;\n this.notificationClicks = NEVER;\n this.subscription = NEVER;\n return;\n }\n\n this.messages = this.sw.eventsOfType<PushEvent>('PUSH').pipe(map(message => message.data));\n\n this.notificationClicks =\n this.sw.eventsOfType('NOTIFICATION_CLICK').pipe(map((message: any) => message.data));\n\n this.pushManager = this.sw.registration.pipe(map(registration => registration.pushManager));\n\n const workerDrivenSubscriptions = this.pushManager.pipe(switchMap(pm => pm.getSubscription()));\n this.subscription = merge(workerDrivenSubscriptions, this.subscriptionChanges);\n }\n\n /**\n * Subscribes to Web Push Notifications,\n * after requesting and receiving user permission.\n *\n * @param options An object containing the `serverPublicKey` string.\n * @returns A Promise that resolves to the new subscription object.\n */\n requestSubscription(options: {serverPublicKey: string}): Promise<PushSubscription> {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const pushOptions: PushSubscriptionOptionsInit = {userVisibleOnly: true};\n let key = this.decodeBase64(options.serverPublicKey.replace(/_/g, '/').replace(/-/g, '+'));\n let applicationServerKey = new Uint8Array(new ArrayBuffer(key.length));\n for (let i = 0; i < key.length; i++) {\n applicationServerKey[i] = key.charCodeAt(i);\n }\n pushOptions.applicationServerKey = applicationServerKey;\n\n return this.pushManager.pipe(switchMap(pm => pm.subscribe(pushOptions)), take(1))\n .toPromise()\n .then(sub => {\n this.subscriptionChanges.next(sub);\n return sub;\n });\n }\n\n /**\n * Unsubscribes from Service Worker push notifications.\n *\n * @returns A Promise that is resolved when the operation succeeds, or is rejected if there is no\n * active subscription or the unsubscribe operation fails.\n */\n unsubscribe(): Promise<void> {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n\n const doUnsubscribe = (sub: PushSubscription|null) => {\n if (sub === null) {\n throw new Error('Not subscribed to push notifications.');\n }\n\n return sub.unsubscribe().then(success => {\n if (!success) {\n throw new Error('Unsubscribe failed!');\n }\n\n this.subscriptionChanges.next(null);\n });\n };\n\n return this.subscription.pipe(take(1), switchMap(doUnsubscribe)).toPromise();\n }\n\n private decodeBase64(input: string): string {\n return atob(input);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {NEVER, Observable} from 'rxjs';\n\nimport {ERR_SW_NOT_SUPPORTED, NgswCommChannel, UpdateActivatedEvent, UpdateAvailableEvent} from './low_level';\n\n\n\n/**\n * Subscribe to update notifications from the Service Worker, trigger update\n * checks, and forcibly activate updates.\n *\n * @publicApi\n */\n@Injectable()\nexport class SwUpdate {\n /**\n * Emits an `UpdateAvailableEvent` event whenever a new app version is available.\n */\n readonly available: Observable<UpdateAvailableEvent>;\n\n /**\n * Emits an `UpdateActivatedEvent` event whenever the app has been updated to a new version.\n */\n readonly activated: Observable<UpdateActivatedEvent>;\n\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled(): boolean {\n return this.sw.isEnabled;\n }\n\n constructor(private sw: NgswCommChannel) {\n if (!sw.isEnabled) {\n this.available = NEVER;\n this.activated = NEVER;\n return;\n }\n this.available = this.sw.eventsOfType<UpdateAvailableEvent>('UPDATE_AVAILABLE');\n this.activated = this.sw.eventsOfType<UpdateActivatedEvent>('UPDATE_ACTIVATED');\n }\n\n checkForUpdate(): Promise<void> {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const statusNonce = this.sw.generateNonce();\n return this.sw.postMessageWithStatus('CHECK_FOR_UPDATES', {statusNonce}, statusNonce);\n }\n\n activateUpdate(): Promise<void> {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const statusNonce = this.sw.generateNonce();\n return this.sw.postMessageWithStatus('ACTIVATE_UPDATE', {statusNonce}, statusNonce);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isPlatformBrowser} from '@angular/common';\nimport {APP_INITIALIZER, ApplicationRef, InjectionToken, Injector, ModuleWithProviders, NgModule, NgZone, PLATFORM_ID} from '@angular/core';\nimport {merge, Observable, of} from 'rxjs';\nimport {delay, filter, take} from 'rxjs/operators';\n\nimport {NgswCommChannel} from './low_level';\nimport {SwPush} from './push';\nimport {SwUpdate} from './update';\n\n/**\n * Token that can be used to provide options for `ServiceWorkerModule` outside of\n * `ServiceWorkerModule.register()`.\n *\n * You can use this token to define a provider that generates the registration options at runtime,\n * for example via a function call:\n *\n * {@example service-worker/registration-options/module.ts region=\"registration-options\"\n * header=\"app.module.ts\"}\n *\n * @publicApi\n */\nexport abstract class SwRegistrationOptions {\n /**\n * Whether the ServiceWorker will be registered and the related services (such as `SwPush` and\n * `SwUpdate`) will attempt to communicate and interact with it.\n *\n * Default: true\n */\n enabled?: boolean;\n\n /**\n * A URL that defines the ServiceWorker's registration scope; that is, what range of URLs it can\n * control. It will be used when calling\n * [ServiceWorkerContainer#register()](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n */\n scope?: string;\n\n /**\n * Defines the ServiceWorker registration strategy, which determines when it will be registered\n * with the browser.\n *\n * The default behavior of registering once the application stabilizes (i.e. as soon as there are\n * no pending micro- and macro-tasks) is designed to register the ServiceWorker as soon as\n * possible but without affecting the application's first time load.\n *\n * Still, there might be cases where you want more control over when the ServiceWorker is\n * registered (for example, there might be a long-running timeout or polling interval, preventing\n * the app from stabilizing). The available option are:\n *\n * - `registerWhenStable:<timeout>`: Register as soon as the application stabilizes (no pending\n * micro-/macro-tasks) but no later than `<timeout>` milliseconds. If the app hasn't\n * stabilized after `<timeout>` milliseconds (for example, due to a recurrent asynchronous\n * task), the ServiceWorker will be registered anyway.\n * If `<timeout>` is omitted, the ServiceWorker will only be registered once the app\n * stabilizes.\n * - `registerImmediately`: Register immediately.\n * - `registerWithDelay:<timeout>`: Register with a delay of `<timeout>` milliseconds. For\n * example, use `registerWithDelay:5000` to register the ServiceWorker after 5 seconds. If\n * `<timeout>` is omitted, is defaults to `0`, which will register the ServiceWorker as soon\n * as possible but still asynchronously, once all pending micro-tasks are completed.\n * - An [Observable](guide/observables) factory function: A function that returns an `Observable`.\n * The function will be used at runtime to obtain and subscribe to the `Observable` and the\n * ServiceWorker will be registered as soon as the first value is emitted.\n *\n * Default: 'registerWhenStable:30000'\n */\n registrationStrategy?: string|(() => Observable<unknown>);\n}\n\nexport const SCRIPT = new InjectionToken<string>('NGSW_REGISTER_SCRIPT');\n\nexport function ngswAppInitializer(\n injector: Injector, script: string, options: SwRegistrationOptions,\n platformId: string): Function {\n const initializer = () => {\n if (!(isPlatformBrowser(platformId) && ('serviceWorker' in navigator) &&\n options.enabled !== false)) {\n return;\n }\n\n // Wait for service worker controller changes, and fire an INITIALIZE action when a new SW\n // becomes active. This allows the SW to initialize itself even if there is no application\n // traffic.\n navigator.serviceWorker.addEventListener('controllerchange', () => {\n if (navigator.serviceWorker.controller !== null) {\n navigator.serviceWorker.controller.postMessage({action: 'INITIALIZE'});\n }\n });\n\n let readyToRegister$: Observable<unknown>;\n\n if (typeof options.registrationStrategy === 'function') {\n readyToRegister$ = options.registrationStrategy();\n } else {\n const [strategy, ...args] =\n (options.registrationStrategy || 'registerWhenStable:30000').split(':');\n\n switch (strategy) {\n case 'registerImmediately':\n readyToRegister$ = of(null);\n break;\n case 'registerWithDelay':\n readyToRegister$ = delayWithTimeout(+args[0] || 0);\n break;\n case 'registerWhenStable':\n readyToRegister$ = !args[0] ? whenStable(injector) :\n merge(whenStable(injector), delayWithTimeout(+args[0]));\n break;\n default:\n // Unknown strategy.\n throw new Error(\n `Unknown ServiceWorker registration strategy: ${options.registrationStrategy}`);\n }\n }\n\n // Don't return anything to avoid blocking the application until the SW is registered.\n // Also, run outside the Angular zone to avoid preventing the app from stabilizing (especially\n // given that some registration strategies wait for the app to stabilize).\n // Catch and log the error if SW registration fails to avoid uncaught rejection warning.\n const ngZone = injector.get(NgZone);\n ngZone.runOutsideAngular(\n () => readyToRegister$.pipe(take(1)).subscribe(\n () =>\n navigator.serviceWorker.register(script, {scope: options.scope})\n .catch(err => console.error('Service worker registration failed with:', err))));\n };\n return initializer;\n}\n\nfunction delayWithTimeout(timeout: number): Observable<unknown> {\n return of(null).pipe(delay(timeout));\n}\n\nfunction whenStable(injector: Injector): Observable<unknown> {\n const appRef = injector.get(ApplicationRef);\n return appRef.isStable.pipe(filter(stable => stable));\n}\n\nexport function ngswCommChannelFactory(\n opts: SwRegistrationOptions, platformId: string): NgswCommChannel {\n return new NgswCommChannel(\n isPlatformBrowser(platformId) && opts.enabled !== false ? navigator.serviceWorker :\n undefined);\n}\n\n/**\n * @publicApi\n */\n@NgModule({\n providers: [SwPush, SwUpdate],\n})\nexport class ServiceWorkerModule {\n /**\n * Register the given Angular Service Worker script.\n *\n * If `enabled` is set to `false` in the given options, the module will behave as if service\n * workers are not supported by the browser, and the service worker will not be registered.\n */\n static register(script: string, opts: SwRegistrationOptions = {}):\n ModuleWithProviders<ServiceWorkerModule> {\n return {\n ngModule: ServiceWorkerModule,\n providers: [\n {provide: SCRIPT, useValue: script},\n {provide: SwRegistrationOptions, useValue: opts},\n {\n provide: NgswCommChannel,\n useFactory: ngswCommChannelFactory,\n deps: [SwRegistrationOptions, PLATFORM_ID]\n },\n {\n provide: APP_INITIALIZER,\n useFactory: ngswAppInitializer,\n deps: [Injector, SCRIPT, SwRegistrationOptions, PLATFORM_ID],\n multi: true,\n },\n ],\n };\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {UpdateActivatedEvent, UpdateAvailableEvent} from './low_level';\nexport {ServiceWorkerModule, SwRegistrationOptions} from './module';\nexport {SwPush} from './push';\nexport {SwUpdate} from './update';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {NgswCommChannel as ɵangular_packages_service_worker_service_worker_a} from './src/low_level';\nexport {SCRIPT as ɵangular_packages_service_worker_service_worker_b,ngswAppInitializer as ɵangular_packages_service_worker_service_worker_c,ngswCommChannelFactory as ɵangular_packages_service_worker_service_worker_d} from './src/module';"],"names":["defer","throwError","fromEvent","map","of","concat","filter","switchMap","publish","take","tap","Subject","NEVER","merge","Injectable","InjectionToken","isPlatformBrowser","NgZone","delay","ApplicationRef","PLATFORM_ID","APP_INITIALIZER","Injector","NgModule"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAA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