jekyll-pwa-workbox 0.0.6 → 0.0.7.alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll-pwa-workbox.rb +1 -1
  3. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-background-sync.dev.js +819 -0
  4. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-background-sync.dev.js.map +1 -0
  5. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-background-sync.prod.js +2 -0
  6. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-background-sync.prod.js.map +1 -0
  7. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-broadcast-update.dev.js +486 -0
  8. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-broadcast-update.dev.js.map +1 -0
  9. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-broadcast-update.prod.js +2 -0
  10. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-broadcast-update.prod.js.map +1 -0
  11. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-cacheable-response.dev.js +192 -0
  12. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-cacheable-response.dev.js.map +1 -0
  13. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-cacheable-response.prod.js +2 -0
  14. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-cacheable-response.prod.js.map +1 -0
  15. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-core.dev.js +1643 -0
  16. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-core.dev.js.map +1 -0
  17. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-core.prod.js +2 -0
  18. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-core.prod.js.map +1 -0
  19. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-expiration.dev.js +652 -0
  20. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-expiration.dev.js.map +1 -0
  21. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-expiration.prod.js +2 -0
  22. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-expiration.prod.js.map +1 -0
  23. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-navigation-preload.dev.js +103 -0
  24. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-navigation-preload.dev.js.map +1 -0
  25. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-navigation-preload.prod.js +2 -0
  26. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-navigation-preload.prod.js.map +1 -0
  27. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-offline-ga.dev.js +236 -0
  28. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-offline-ga.dev.js.map +1 -0
  29. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-offline-ga.prod.js +2 -0
  30. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-offline-ga.prod.js.map +1 -0
  31. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-precaching.dev.js +994 -0
  32. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-precaching.dev.js.map +1 -0
  33. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-precaching.prod.js +2 -0
  34. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-precaching.prod.js.map +1 -0
  35. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-range-requests.dev.js +263 -0
  36. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-range-requests.dev.js.map +1 -0
  37. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-range-requests.prod.js +2 -0
  38. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-range-requests.prod.js.map +1 -0
  39. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-routing.dev.js +1026 -0
  40. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-routing.dev.js.map +1 -0
  41. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-routing.prod.js +2 -0
  42. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-routing.prod.js.map +1 -0
  43. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-strategies.dev.js +1127 -0
  44. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-strategies.dev.js.map +1 -0
  45. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-strategies.prod.js +2 -0
  46. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-strategies.prod.js.map +1 -0
  47. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-streams.dev.js +333 -0
  48. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-streams.dev.js.map +1 -0
  49. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-streams.prod.js +2 -0
  50. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-streams.prod.js.map +1 -0
  51. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-sw.js +2 -0
  52. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-sw.js.map +1 -0
  53. data/lib/vendor/{workbox-v4.3.1 → workbox-v5.0.0.alpha1}/workbox-window.dev.es5.mjs +248 -262
  54. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.dev.es5.mjs.map +1 -0
  55. data/lib/vendor/{workbox-v4.3.1 → workbox-v5.0.0.alpha1}/workbox-window.dev.mjs +234 -242
  56. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.dev.mjs.map +1 -0
  57. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.dev.umd.js +882 -0
  58. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.dev.umd.js.map +1 -0
  59. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.prod.es5.mjs +2 -0
  60. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.prod.es5.mjs.map +1 -0
  61. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.prod.mjs +2 -0
  62. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.prod.mjs.map +1 -0
  63. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.prod.umd.js +2 -0
  64. data/lib/vendor/workbox-v5.0.0.alpha1/workbox-window.prod.umd.js.map +1 -0
  65. metadata +75 -80
  66. data/lib/vendor/workbox-v4.3.1/workbox-background-sync.dev.js +0 -822
  67. data/lib/vendor/workbox-v4.3.1/workbox-background-sync.dev.js.map +0 -1
  68. data/lib/vendor/workbox-v4.3.1/workbox-background-sync.prod.js +0 -2
  69. data/lib/vendor/workbox-v4.3.1/workbox-background-sync.prod.js.map +0 -1
  70. data/lib/vendor/workbox-v4.3.1/workbox-broadcast-update.dev.js +0 -496
  71. data/lib/vendor/workbox-v4.3.1/workbox-broadcast-update.dev.js.map +0 -1
  72. data/lib/vendor/workbox-v4.3.1/workbox-broadcast-update.prod.js +0 -2
  73. data/lib/vendor/workbox-v4.3.1/workbox-broadcast-update.prod.js.map +0 -1
  74. data/lib/vendor/workbox-v4.3.1/workbox-cacheable-response.dev.js +0 -200
  75. data/lib/vendor/workbox-v4.3.1/workbox-cacheable-response.dev.js.map +0 -1
  76. data/lib/vendor/workbox-v4.3.1/workbox-cacheable-response.prod.js +0 -2
  77. data/lib/vendor/workbox-v4.3.1/workbox-cacheable-response.prod.js.map +0 -1
  78. data/lib/vendor/workbox-v4.3.1/workbox-core.dev.js +0 -1712
  79. data/lib/vendor/workbox-v4.3.1/workbox-core.dev.js.map +0 -1
  80. data/lib/vendor/workbox-v4.3.1/workbox-core.prod.js +0 -2
  81. data/lib/vendor/workbox-v4.3.1/workbox-core.prod.js.map +0 -1
  82. data/lib/vendor/workbox-v4.3.1/workbox-expiration.dev.js +0 -652
  83. data/lib/vendor/workbox-v4.3.1/workbox-expiration.dev.js.map +0 -1
  84. data/lib/vendor/workbox-v4.3.1/workbox-expiration.prod.js +0 -2
  85. data/lib/vendor/workbox-v4.3.1/workbox-expiration.prod.js.map +0 -1
  86. data/lib/vendor/workbox-v4.3.1/workbox-navigation-preload.dev.js +0 -110
  87. data/lib/vendor/workbox-v4.3.1/workbox-navigation-preload.dev.js.map +0 -1
  88. data/lib/vendor/workbox-v4.3.1/workbox-navigation-preload.prod.js +0 -2
  89. data/lib/vendor/workbox-v4.3.1/workbox-navigation-preload.prod.js.map +0 -1
  90. data/lib/vendor/workbox-v4.3.1/workbox-offline-ga.dev.js +0 -243
  91. data/lib/vendor/workbox-v4.3.1/workbox-offline-ga.dev.js.map +0 -1
  92. data/lib/vendor/workbox-v4.3.1/workbox-offline-ga.prod.js +0 -2
  93. data/lib/vendor/workbox-v4.3.1/workbox-offline-ga.prod.js.map +0 -1
  94. data/lib/vendor/workbox-v4.3.1/workbox-precaching.dev.js +0 -989
  95. data/lib/vendor/workbox-v4.3.1/workbox-precaching.dev.js.map +0 -1
  96. data/lib/vendor/workbox-v4.3.1/workbox-precaching.prod.js +0 -2
  97. data/lib/vendor/workbox-v4.3.1/workbox-precaching.prod.js.map +0 -1
  98. data/lib/vendor/workbox-v4.3.1/workbox-range-requests.dev.js +0 -268
  99. data/lib/vendor/workbox-v4.3.1/workbox-range-requests.dev.js.map +0 -1
  100. data/lib/vendor/workbox-v4.3.1/workbox-range-requests.prod.js +0 -2
  101. data/lib/vendor/workbox-v4.3.1/workbox-range-requests.prod.js.map +0 -1
  102. data/lib/vendor/workbox-v4.3.1/workbox-routing.dev.js +0 -1020
  103. data/lib/vendor/workbox-v4.3.1/workbox-routing.dev.js.map +0 -1
  104. data/lib/vendor/workbox-v4.3.1/workbox-routing.prod.js +0 -2
  105. data/lib/vendor/workbox-v4.3.1/workbox-routing.prod.js.map +0 -1
  106. data/lib/vendor/workbox-v4.3.1/workbox-strategies.dev.js +0 -1138
  107. data/lib/vendor/workbox-v4.3.1/workbox-strategies.dev.js.map +0 -1
  108. data/lib/vendor/workbox-v4.3.1/workbox-strategies.prod.js +0 -2
  109. data/lib/vendor/workbox-v4.3.1/workbox-strategies.prod.js.map +0 -1
  110. data/lib/vendor/workbox-v4.3.1/workbox-streams.dev.js +0 -337
  111. data/lib/vendor/workbox-v4.3.1/workbox-streams.dev.js.map +0 -1
  112. data/lib/vendor/workbox-v4.3.1/workbox-streams.prod.js +0 -2
  113. data/lib/vendor/workbox-v4.3.1/workbox-streams.prod.js.map +0 -1
  114. data/lib/vendor/workbox-v4.3.1/workbox-sw.js +0 -2
  115. data/lib/vendor/workbox-v4.3.1/workbox-sw.js.map +0 -1
  116. data/lib/vendor/workbox-v4.3.1/workbox-window.dev.es5.mjs.map +0 -1
  117. data/lib/vendor/workbox-v4.3.1/workbox-window.dev.mjs.map +0 -1
  118. data/lib/vendor/workbox-v4.3.1/workbox-window.dev.umd.js +0 -896
  119. data/lib/vendor/workbox-v4.3.1/workbox-window.dev.umd.js.map +0 -1
  120. data/lib/vendor/workbox-v4.3.1/workbox-window.prod.es5.mjs +0 -2
  121. data/lib/vendor/workbox-v4.3.1/workbox-window.prod.es5.mjs.map +0 -1
  122. data/lib/vendor/workbox-v4.3.1/workbox-window.prod.mjs +0 -2
  123. data/lib/vendor/workbox-v4.3.1/workbox-window.prod.mjs.map +0 -1
  124. data/lib/vendor/workbox-v4.3.1/workbox-window.prod.umd.js +0 -2
  125. data/lib/vendor/workbox-v4.3.1/workbox-window.prod.umd.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workbox-window.dev.mjs","sources":["../_version.js","../messageSW.js","../../workbox-core/_version.js","../../workbox-core/_private/Deferred.js","../../workbox-core/_private/logger.js","../utils/WorkboxEventTarget.js","../utils/urlsMatch.js","../utils/WorkboxEvent.js","../Workbox.js"],"sourcesContent":["// @ts-ignore\ntry {\n self['workbox:window:5.0.0-alpha.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise<Object|undefined>}\n *\n * @memberof module:workbox-window\n */\nexport function messageSW(sw, data) {\n return new Promise((resolve) => {\n let messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (event) => {\n resolve(event.data);\n };\n sw.postMessage(data, [messageChannel.port2]);\n });\n}\n;\n","// @ts-ignore\ntry {\n self['workbox:core:5.0.0-alpha.1'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production' ? null : (() => {\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null,\n };\n const print = function (method, args) {\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n})());\nexport { logger };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nexport class WorkboxEventTarget {\n constructor() {\n this._eventListenerRegistry = {};\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n this._getEventListenersByType(type).add(listener);\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n /**\n * @param {Object} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n const listeners = this._getEventListenersByType(event.type);\n for (const listener of listeners) {\n listener(event);\n }\n }\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set<ListenerCallback>} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n return this._eventListenerRegistry[type] =\n (this._eventListenerRegistry[type] || new Set());\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nexport function urlsMatch(url1, url2) {\n const { href } = location;\n return new URL(url1, href).href === new URL(url2, href).href;\n}\n;\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nexport class WorkboxEvent {\n constructor(type, props) {\n this.type = type;\n Object.assign(this, props);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { messageSW } from './messageSW.js';\nimport { WorkboxEventTarget } from './utils/WorkboxEventTarget.js';\nimport { urlsMatch } from './utils/urlsMatch.js';\nimport { WorkboxEvent } from './utils/WorkboxEvent.js';\nimport './_version.js';\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires [message]{@link module:workbox-window.Workbox#message}\n * @fires [installed]{@link module:workbox-window.Workbox#installed}\n * @fires [waiting]{@link module:workbox-window.Workbox#waiting}\n * @fires [controlling]{@link module:workbox-window.Workbox#controlling}\n * @fires [activated]{@link module:workbox-window.Workbox#activated}\n * @fires [redundant]{@link module:workbox-window.Workbox#redundant}\n * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled}\n * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting}\n * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated}\n *\n * @memberof module:workbox-window\n */\nclass Workbox extends WorkboxEventTarget {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling `navigator.serviceWorker.register(scriptURL, options)`. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register\n *\n * @param {string} scriptURL The service worker script associated with this\n * instance.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n constructor(scriptURL, registerOptions = {}) {\n super();\n this._registerOptions = {};\n this._updateFoundCount = 0;\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n this._registrationTime = 0;\n /**\n * @private\n */\n this._onUpdateFound = () => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const installingSW = registration.installing;\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n let updateLikelyTriggeredExternally = \n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n (performance.now() >\n this._registrationTime + REGISTRATION_TIMEOUT_DURATION) ?\n // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true : false;\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n registration.removeEventListener('updatefound', this._onUpdateFound);\n }\n else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._swDeferred.resolve(installingSW);\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n }\n else {\n logger.log('Service worker is installing...');\n }\n }\n }\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onStateChange = (originalEvent) => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const sw = originalEvent.target;\n const { state } = sw;\n const isExternal = sw === this._externalSW;\n const eventPrefix = isExternal ? 'external' : '';\n const eventProps = { sw, originalEvent };\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n this.dispatchEvent(new WorkboxEvent(eventPrefix + state, eventProps));\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = self.setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent(eventPrefix + 'waiting', eventProps));\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n }\n else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n }\n else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n }\n else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n }\n else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n }\n else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onControllerChange = (originalEvent) => {\n const sw = this._sw;\n if (sw === navigator.serviceWorker.controller) {\n this.dispatchEvent(new WorkboxEvent('controlling', {\n sw,\n originalEvent,\n isUpdate: this._isUpdate,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onMessage = (originalEvent) => {\n const { data } = originalEvent;\n this.dispatchEvent(new WorkboxEvent('message', { data, originalEvent }));\n };\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n }\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({ immediate = false } = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => addEventListener('load', res));\n }\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n this._registration = await this._registerScript();\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n this._reportWindowReady(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener('statechange', this._onStateChange, { once: true });\n }\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the prevoius\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL)) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n });\n }\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL);\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n }\n else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(this._registerOptions.scope || this._scriptURL, document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener('controllerchange', this._onControllerChange, { once: true });\n // Add message listeners.\n if ('BroadcastChannel' in self) {\n this._broadcastChannel = new BroadcastChannel('workbox');\n this._broadcastChannel.addEventListener('message', this._onMessage);\n }\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n return this._registration;\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise<ServiceWorker>}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise<ServiceWorker>}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise<ServiceWorker>}\n */\n async getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw !== undefined ? this._sw : this._swDeferred.promise;\n }\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise<Object>}\n */\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matchs.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) {\n return controller;\n }\n else {\n return undefined;\n }\n }\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n const reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions);\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n return reg;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n /**\n * Sends a message to the passed service worker that the window is ready.\n *\n * @param {ServiceWorker} sw\n * @private\n */\n _reportWindowReady(sw) {\n messageSW(sw, {\n type: 'WINDOW_READY',\n meta: 'workbox-window',\n });\n }\n}\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n/**\n * The `message` event is dispatched any time a `postMessage` (or a\n * `BroadcastChannel` message with the `workbox` channel name) is received.\n *\n * @event module:workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `installed` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event module:workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `waiting` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the [`register()`]{@link module:workbox-window.Workbox#register}\n * method was called.\n *\n * @event module:workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The native `controllerchange` event\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event module:workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `activated` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `redundant` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event module:workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `externalinstalled` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `installed`.\n *\n * @event module:workbox-window.Workbox#externalinstalled\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalinstalled`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `externalwaiting` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `waiting`.\n *\n * @event module:workbox-window.Workbox#externalwaiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalwaiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `externalactivated` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#externalactivated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalactivated`.\n * @property {Workbox} target The `Workbox` instance.\n */\nexport { Workbox };\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","event","postMessage","port2","Deferred","constructor","promise","reject","logger","process","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","test","navigator","userAgent","console","styles","logPrefix","join","api","loggerMethods","Object","keys","key","WorkboxEventTarget","_eventListenerRegistry","addEventListener","type","listener","_getEventListenersByType","add","removeEventListener","delete","dispatchEvent","target","listeners","Set","urlsMatch","url1","url2","href","location","URL","WorkboxEvent","props","assign","WAITING_TIMEOUT_DURATION","REGISTRATION_TIMEOUT_DURATION","Workbox","scriptURL","registerOptions","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_registrationTime","_onUpdateFound","registration","_registration","installingSW","installing","updateLikelyTriggeredExternally","_scriptURL","performance","now","_externalSW","_sw","serviceWorker","controller","_onStateChange","originalEvent","state","isExternal","eventPrefix","eventProps","_isUpdate","isUpdate","_waitingTimeout","setTimeout","waiting","clearTimeout","_compatibleControllingSW","_onControllerChange","_onMessage","register","immediate","document","readyState","res","Boolean","_getControllingSWIfCompatible","_registerScript","_reportWindowReady","once","waitingSW","then","wasWaitingBeforeRegister","currentPageIsOutOfScope","scopeURL","scope","baseURI","scopeURLBasePath","pathname","startsWith","_broadcastChannel","BroadcastChannel","active","controlling","getSW","undefined","reg","meta"],"mappings":"AAAA;AACA,IAAI;EACAA,IAAI,CAAC,8BAAD,CAAJ,IAAwCC,CAAC,EAAzC;CADJ,CAGA,OAAOC,CAAP,EAAU;;ACJV;;;;;;;AAOA,AACA;;;;;;;;;;;;;;;;AAeA,AAAO,SAASC,SAAT,CAAmBC,EAAnB,EAAuBC,IAAvB,EAA6B;SACzB,IAAIC,OAAJ,CAAaC,OAAD,IAAa;QACxBC,cAAc,GAAG,IAAIC,cAAJ,EAArB;;IACAD,cAAc,CAACE,KAAf,CAAqBC,SAArB,GAAkCC,KAAD,IAAW;MACxCL,OAAO,CAACK,KAAK,CAACP,IAAP,CAAP;KADJ;;IAGAD,EAAE,CAACS,WAAH,CAAeR,IAAf,EAAqB,CAACG,cAAc,CAACM,KAAhB,CAArB;GALG,CAAP;;;ACxBJ;AACA,IAAI;EACAd,IAAI,CAAC,4BAAD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AAD,EAAK;IACnBD,SAAS,CAACC,EAAD,EAAK;MACV2C,IAAI,EAAE,cADI;MAEVqF,IAAI,EAAE;KAFD,CAAT;;;;;;;"}
@@ -0,0 +1,882 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+ (global = global || self, factory(global.workbox = {}));
5
+ }(this, function (exports) { 'use strict';
6
+
7
+ // @ts-ignore
8
+ try {
9
+ self['workbox:window:5.0.0-alpha.0'] && _();
10
+ } catch (e) {}
11
+
12
+ /*
13
+ Copyright 2019 Google LLC
14
+
15
+ Use of this source code is governed by an MIT-style
16
+ license that can be found in the LICENSE file or at
17
+ https://opensource.org/licenses/MIT.
18
+ */
19
+ /**
20
+ * Sends a data object to a service worker via `postMessage` and resolves with
21
+ * a response (if any).
22
+ *
23
+ * A response can be set in a message handler in the service worker by
24
+ * calling `event.ports[0].postMessage(...)`, which will resolve the promise
25
+ * returned by `messageSW()`. If no response is set, the promise will not
26
+ * resolve.
27
+ *
28
+ * @param {ServiceWorker} sw The service worker to send the message to.
29
+ * @param {Object} data An object to send to the service worker.
30
+ * @return {Promise<Object|undefined>}
31
+ *
32
+ * @memberof module:workbox-window
33
+ */
34
+
35
+ function messageSW(sw, data) {
36
+ return new Promise(function (resolve) {
37
+ var messageChannel = new MessageChannel();
38
+
39
+ messageChannel.port1.onmessage = function (event) {
40
+ resolve(event.data);
41
+ };
42
+
43
+ sw.postMessage(data, [messageChannel.port2]);
44
+ });
45
+ }
46
+
47
+ function _defineProperties(target, props) {
48
+ for (var i = 0; i < props.length; i++) {
49
+ var descriptor = props[i];
50
+ descriptor.enumerable = descriptor.enumerable || false;
51
+ descriptor.configurable = true;
52
+ if ("value" in descriptor) descriptor.writable = true;
53
+ Object.defineProperty(target, descriptor.key, descriptor);
54
+ }
55
+ }
56
+
57
+ function _createClass(Constructor, protoProps, staticProps) {
58
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
59
+ if (staticProps) _defineProperties(Constructor, staticProps);
60
+ return Constructor;
61
+ }
62
+
63
+ function _inheritsLoose(subClass, superClass) {
64
+ subClass.prototype = Object.create(superClass.prototype);
65
+ subClass.prototype.constructor = subClass;
66
+ subClass.__proto__ = superClass;
67
+ }
68
+
69
+ // @ts-ignore
70
+ try {
71
+ self['workbox:core:5.0.0-alpha.1'] && _();
72
+ } catch (e) {}
73
+
74
+ /*
75
+ Copyright 2018 Google LLC
76
+
77
+ Use of this source code is governed by an MIT-style
78
+ license that can be found in the LICENSE file or at
79
+ https://opensource.org/licenses/MIT.
80
+ */
81
+ /**
82
+ * The Deferred class composes Promises in a way that allows for them to be
83
+ * resolved or rejected from outside the constructor. In most cases promises
84
+ * should be used directly, but Deferreds can be necessary when the logic to
85
+ * resolve a promise must be separate.
86
+ *
87
+ * @private
88
+ */
89
+
90
+ var Deferred =
91
+ /**
92
+ * Creates a promise and exposes its resolve and reject functions as methods.
93
+ */
94
+ function Deferred() {
95
+ var _this = this;
96
+
97
+ this.promise = new Promise(function (resolve, reject) {
98
+ _this.resolve = resolve;
99
+ _this.reject = reject;
100
+ });
101
+ };
102
+
103
+ /*
104
+ Copyright 2019 Google LLC
105
+ Use of this source code is governed by an MIT-style
106
+ license that can be found in the LICENSE file or at
107
+ https://opensource.org/licenses/MIT.
108
+ */
109
+ var logger = function () {
110
+ var inGroup = false;
111
+ var methodToColorMap = {
112
+ debug: "#7f8c8d",
113
+ log: "#2ecc71",
114
+ warn: "#f39c12",
115
+ error: "#c0392b",
116
+ groupCollapsed: "#3498db",
117
+ groupEnd: null
118
+ };
119
+
120
+ var print = function print(method, args) {
121
+ var _console2;
122
+
123
+ if (method === 'groupCollapsed') {
124
+ // Safari doesn't print all console.groupCollapsed() arguments:
125
+ // https://bugs.webkit.org/show_bug.cgi?id=182754
126
+ if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
127
+ var _console;
128
+
129
+ (_console = console)[method].apply(_console, args);
130
+
131
+ return;
132
+ }
133
+ }
134
+
135
+ var styles = ["background: " + methodToColorMap[method], "border-radius: 0.5em", "color: white", "font-weight: bold", "padding: 2px 0.5em"]; // When in a group, the workbox prefix is not displayed.
136
+
137
+ var logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];
138
+
139
+ (_console2 = console)[method].apply(_console2, logPrefix.concat(args));
140
+
141
+ if (method === 'groupCollapsed') {
142
+ inGroup = true;
143
+ }
144
+
145
+ if (method === 'groupEnd') {
146
+ inGroup = false;
147
+ }
148
+ };
149
+
150
+ var api = {};
151
+ var loggerMethods = Object.keys(methodToColorMap);
152
+
153
+ var _loop = function _loop() {
154
+ var key = loggerMethods[_i];
155
+ var method = key;
156
+
157
+ api[method] = function () {
158
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
159
+ args[_key] = arguments[_key];
160
+ }
161
+
162
+ print(method, args);
163
+ };
164
+ };
165
+
166
+ for (var _i = 0; _i < loggerMethods.length; _i++) {
167
+ _loop();
168
+ }
169
+
170
+ return api;
171
+ }();
172
+
173
+ /*
174
+ Copyright 2019 Google LLC
175
+
176
+ Use of this source code is governed by an MIT-style
177
+ license that can be found in the LICENSE file or at
178
+ https://opensource.org/licenses/MIT.
179
+ */
180
+ /**
181
+ * A minimal `EventTarget` shim.
182
+ * This is necessary because not all browsers support constructable
183
+ * `EventTarget`, so using a real `EventTarget` will error.
184
+ * @private
185
+ */
186
+
187
+ var WorkboxEventTarget =
188
+ /*#__PURE__*/
189
+ function () {
190
+ function WorkboxEventTarget() {
191
+ this._eventListenerRegistry = {};
192
+ }
193
+ /**
194
+ * @param {string} type
195
+ * @param {Function} listener
196
+ * @private
197
+ */
198
+
199
+
200
+ var _proto = WorkboxEventTarget.prototype;
201
+
202
+ _proto.addEventListener = function addEventListener(type, listener) {
203
+ this._getEventListenersByType(type).add(listener);
204
+ };
205
+ /**
206
+ * @param {string} type
207
+ * @param {Function} listener
208
+ * @private
209
+ */
210
+
211
+
212
+ _proto.removeEventListener = function removeEventListener(type, listener) {
213
+ this._getEventListenersByType(type).delete(listener);
214
+ };
215
+ /**
216
+ * @param {Object} event
217
+ * @private
218
+ */
219
+
220
+
221
+ _proto.dispatchEvent = function dispatchEvent(event) {
222
+ event.target = this;
223
+
224
+ var listeners = this._getEventListenersByType(event.type);
225
+
226
+ for (var _iterator = listeners, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
227
+ var _ref;
228
+
229
+ if (_isArray) {
230
+ if (_i >= _iterator.length) break;
231
+ _ref = _iterator[_i++];
232
+ } else {
233
+ _i = _iterator.next();
234
+ if (_i.done) break;
235
+ _ref = _i.value;
236
+ }
237
+
238
+ var listener = _ref;
239
+ listener(event);
240
+ }
241
+ };
242
+ /**
243
+ * Returns a Set of listeners associated with the passed event type.
244
+ * If no handlers have been registered, an empty Set is returned.
245
+ *
246
+ * @param {string} type The event type.
247
+ * @return {Set<ListenerCallback>} An array of handler functions.
248
+ * @private
249
+ */
250
+
251
+
252
+ _proto._getEventListenersByType = function _getEventListenersByType(type) {
253
+ return this._eventListenerRegistry[type] = this._eventListenerRegistry[type] || new Set();
254
+ };
255
+
256
+ return WorkboxEventTarget;
257
+ }();
258
+
259
+ /*
260
+ Copyright 2019 Google LLC
261
+
262
+ Use of this source code is governed by an MIT-style
263
+ license that can be found in the LICENSE file or at
264
+ https://opensource.org/licenses/MIT.
265
+ */
266
+ /**
267
+ * Returns true if two URLs have the same `.href` property. The URLS can be
268
+ * relative, and if they are the current location href is used to resolve URLs.
269
+ *
270
+ * @private
271
+ * @param {string} url1
272
+ * @param {string} url2
273
+ * @return {boolean}
274
+ */
275
+
276
+ function urlsMatch(url1, url2) {
277
+ var _location = location,
278
+ href = _location.href;
279
+ return new URL(url1, href).href === new URL(url2, href).href;
280
+ }
281
+
282
+ /*
283
+ Copyright 2019 Google LLC
284
+
285
+ Use of this source code is governed by an MIT-style
286
+ license that can be found in the LICENSE file or at
287
+ https://opensource.org/licenses/MIT.
288
+ */
289
+ /**
290
+ * A minimal `Event` subclass shim.
291
+ * This doesn't *actually* subclass `Event` because not all browsers support
292
+ * constructable `EventTarget`, and using a real `Event` will error.
293
+ * @private
294
+ */
295
+
296
+ var WorkboxEvent = function WorkboxEvent(type, props) {
297
+ this.type = type;
298
+ Object.assign(this, props);
299
+ };
300
+
301
+ function _catch(body, recover) {
302
+ try {
303
+ var result = body();
304
+ } catch (e) {
305
+ return recover(e);
306
+ }
307
+
308
+ if (result && result.then) {
309
+ return result.then(void 0, recover);
310
+ }
311
+
312
+ return result;
313
+ }
314
+
315
+ function _async(f) {
316
+ return function () {
317
+ for (var args = [], i = 0; i < arguments.length; i++) {
318
+ args[i] = arguments[i];
319
+ }
320
+
321
+ try {
322
+ return Promise.resolve(f.apply(this, args));
323
+ } catch (e) {
324
+ return Promise.reject(e);
325
+ }
326
+ };
327
+ }
328
+
329
+ function _invoke(body, then) {
330
+ var result = body();
331
+
332
+ if (result && result.then) {
333
+ return result.then(then);
334
+ }
335
+
336
+ return then(result);
337
+ }
338
+
339
+ function _await(value, then, direct) {
340
+ if (direct) {
341
+ return then ? then(value) : value;
342
+ }
343
+
344
+ if (!value || !value.then) {
345
+ value = Promise.resolve(value);
346
+ }
347
+
348
+ return then ? value.then(then) : value;
349
+ }
350
+
351
+ function _awaitIgnored(value, direct) {
352
+ if (!direct) {
353
+ return value && value.then ? value.then(_empty) : Promise.resolve();
354
+ }
355
+ }
356
+
357
+ function _empty() {}
358
+ // `skipWaiting()` wasn't called. This 200 amount wasn't scientifically
359
+ // chosen, but it seems to avoid false positives in my testing.
360
+
361
+ var WAITING_TIMEOUT_DURATION = 200; // The amount of time after a registration that we can reasonably conclude
362
+ // that the registration didn't trigger an update.
363
+
364
+ var REGISTRATION_TIMEOUT_DURATION = 60000;
365
+ /**
366
+ * A class to aid in handling service worker registration, updates, and
367
+ * reacting to service worker lifecycle events.
368
+ *
369
+ * @fires [message]{@link module:workbox-window.Workbox#message}
370
+ * @fires [installed]{@link module:workbox-window.Workbox#installed}
371
+ * @fires [waiting]{@link module:workbox-window.Workbox#waiting}
372
+ * @fires [controlling]{@link module:workbox-window.Workbox#controlling}
373
+ * @fires [activated]{@link module:workbox-window.Workbox#activated}
374
+ * @fires [redundant]{@link module:workbox-window.Workbox#redundant}
375
+ * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled}
376
+ * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting}
377
+ * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated}
378
+ *
379
+ * @memberof module:workbox-window
380
+ */
381
+
382
+ var Workbox =
383
+ /*#__PURE__*/
384
+ function (_WorkboxEventTarget) {
385
+ _inheritsLoose(Workbox, _WorkboxEventTarget);
386
+
387
+ /**
388
+ * Creates a new Workbox instance with a script URL and service worker
389
+ * options. The script URL and options are the same as those used when
390
+ * calling `navigator.serviceWorker.register(scriptURL, options)`. See:
391
+ * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register
392
+ *
393
+ * @param {string} scriptURL The service worker script associated with this
394
+ * instance.
395
+ * @param {Object} [registerOptions] The service worker options associated
396
+ * with this instance.
397
+ */
398
+ function Workbox(scriptURL, registerOptions) {
399
+ var _this;
400
+
401
+ if (registerOptions === void 0) {
402
+ registerOptions = {};
403
+ }
404
+
405
+ _this = _WorkboxEventTarget.call(this) || this;
406
+ _this._registerOptions = {};
407
+ _this._updateFoundCount = 0; // Deferreds we can resolve later.
408
+
409
+ _this._swDeferred = new Deferred();
410
+ _this._activeDeferred = new Deferred();
411
+ _this._controllingDeferred = new Deferred();
412
+ _this._registrationTime = 0;
413
+ /**
414
+ * @private
415
+ */
416
+
417
+ _this._onUpdateFound = function () {
418
+ // `this._registration` will never be `undefined` after an update is found.
419
+ var registration = _this._registration;
420
+ var installingSW = registration.installing; // If the script URL passed to `navigator.serviceWorker.register()` is
421
+ // different from the current controlling SW's script URL, we know any
422
+ // successful registration calls will trigger an `updatefound` event.
423
+ // But if the registered script URL is the same as the current controlling
424
+ // SW's script URL, we'll only get an `updatefound` event if the file
425
+ // changed since it was last registered. This can be a problem if the user
426
+ // opens up the same page in a different tab, and that page registers
427
+ // a SW that triggers an update. It's a problem because this page has no
428
+ // good way of knowing whether the `updatefound` event came from the SW
429
+ // script it registered or from a registration attempt made by a newer
430
+ // version of the page running in another tab.
431
+ // To minimize the possibility of a false positive, we use the logic here:
432
+
433
+ var updateLikelyTriggeredExternally = // Since we enforce only calling `register()` once, and since we don't
434
+ // add the `updatefound` event listener until the `register()` call, if
435
+ // `_updateFoundCount` is > 0 then it means this method has already
436
+ // been called, thus this SW must be external
437
+ _this._updateFoundCount > 0 || // If the script URL of the installing SW is different from this
438
+ // instance's script URL, we know it's definitely not from our
439
+ // registration.
440
+ !urlsMatch(installingSW.scriptURL, _this._scriptURL) || // If all of the above are false, then we use a time-based heuristic:
441
+ // Any `updatefound` event that occurs long after our registration is
442
+ // assumed to be external.
443
+ performance.now() > _this._registrationTime + REGISTRATION_TIMEOUT_DURATION ? // If any of the above are not true, we assume the update was
444
+ // triggered by this instance.
445
+ true : false;
446
+
447
+ if (updateLikelyTriggeredExternally) {
448
+ _this._externalSW = installingSW;
449
+ registration.removeEventListener('updatefound', _this._onUpdateFound);
450
+ } else {
451
+ // If the update was not triggered externally we know the installing
452
+ // SW is the one we registered, so we set it.
453
+ _this._sw = installingSW;
454
+
455
+ _this._swDeferred.resolve(installingSW); // The `installing` state isn't something we have a dedicated
456
+ // callback for, but we do log messages for it in development.
457
+
458
+
459
+ {
460
+ if (navigator.serviceWorker.controller) {
461
+ logger.log('Updated service worker found. Installing now...');
462
+ } else {
463
+ logger.log('Service worker is installing...');
464
+ }
465
+ }
466
+ } // Increment the `updatefound` count, so future invocations of this
467
+ // method can be sure they were triggered externally.
468
+
469
+
470
+ ++_this._updateFoundCount; // Add a `statechange` listener regardless of whether this update was
471
+ // triggered externally, since we have callbacks for both.
472
+
473
+ installingSW.addEventListener('statechange', _this._onStateChange);
474
+ };
475
+ /**
476
+ * @private
477
+ * @param {Event} originalEvent
478
+ */
479
+
480
+
481
+ _this._onStateChange = function (originalEvent) {
482
+ // `this._registration` will never be `undefined` after an update is found.
483
+ var registration = _this._registration;
484
+ var sw = originalEvent.target;
485
+ var state = sw.state;
486
+ var isExternal = sw === _this._externalSW;
487
+ var eventPrefix = isExternal ? 'external' : '';
488
+ var eventProps = {
489
+ sw: sw,
490
+ originalEvent: originalEvent
491
+ };
492
+
493
+ if (!isExternal && _this._isUpdate) {
494
+ eventProps.isUpdate = true;
495
+ }
496
+
497
+ _this.dispatchEvent(new WorkboxEvent(eventPrefix + state, eventProps));
498
+
499
+ if (state === 'installed') {
500
+ // This timeout is used to ignore cases where the service worker calls
501
+ // `skipWaiting()` in the install event, thus moving it directly in the
502
+ // activating state. (Since all service workers *must* go through the
503
+ // waiting phase, the only way to detect `skipWaiting()` called in the
504
+ // install event is to observe that the time spent in the waiting phase
505
+ // is very short.)
506
+ // NOTE: we don't need separate timeouts for the own and external SWs
507
+ // since they can't go through these phases at the same time.
508
+ _this._waitingTimeout = self.setTimeout(function () {
509
+ // Ensure the SW is still waiting (it may now be redundant).
510
+ if (state === 'installed' && registration.waiting === sw) {
511
+ _this.dispatchEvent(new WorkboxEvent(eventPrefix + 'waiting', eventProps));
512
+
513
+ {
514
+ if (isExternal) {
515
+ logger.warn('An external service worker has installed but is ' + 'waiting for this client to close before activating...');
516
+ } else {
517
+ logger.warn('The service worker has installed but is waiting ' + 'for existing clients to close before activating...');
518
+ }
519
+ }
520
+ }
521
+ }, WAITING_TIMEOUT_DURATION);
522
+ } else if (state === 'activating') {
523
+ clearTimeout(_this._waitingTimeout);
524
+
525
+ if (!isExternal) {
526
+ _this._activeDeferred.resolve(sw);
527
+ }
528
+ }
529
+
530
+ {
531
+ switch (state) {
532
+ case 'installed':
533
+ if (isExternal) {
534
+ logger.warn('An external service worker has installed. ' + 'You may want to suggest users reload this page.');
535
+ } else {
536
+ logger.log('Registered service worker installed.');
537
+ }
538
+
539
+ break;
540
+
541
+ case 'activated':
542
+ if (isExternal) {
543
+ logger.warn('An external service worker has activated.');
544
+ } else {
545
+ logger.log('Registered service worker activated.');
546
+
547
+ if (sw !== navigator.serviceWorker.controller) {
548
+ logger.warn('The registered service worker is active but ' + 'not yet controlling the page. Reload or run ' + '`clients.claim()` in the service worker.');
549
+ }
550
+ }
551
+
552
+ break;
553
+
554
+ case 'redundant':
555
+ if (sw === _this._compatibleControllingSW) {
556
+ logger.log('Previously controlling service worker now redundant!');
557
+ } else if (!isExternal) {
558
+ logger.log('Registered service worker now redundant!');
559
+ }
560
+
561
+ break;
562
+ }
563
+ }
564
+ };
565
+ /**
566
+ * @private
567
+ * @param {Event} originalEvent
568
+ */
569
+
570
+
571
+ _this._onControllerChange = function (originalEvent) {
572
+ var sw = _this._sw;
573
+
574
+ if (sw === navigator.serviceWorker.controller) {
575
+ _this.dispatchEvent(new WorkboxEvent('controlling', {
576
+ sw: sw,
577
+ originalEvent: originalEvent,
578
+ isUpdate: _this._isUpdate
579
+ }));
580
+
581
+ {
582
+ logger.log('Registered service worker now controlling this page.');
583
+ }
584
+
585
+ _this._controllingDeferred.resolve(sw);
586
+ }
587
+ };
588
+ /**
589
+ * @private
590
+ * @param {Event} originalEvent
591
+ */
592
+
593
+
594
+ _this._onMessage = function (originalEvent) {
595
+ var data = originalEvent.data;
596
+
597
+ _this.dispatchEvent(new WorkboxEvent('message', {
598
+ data: data,
599
+ originalEvent: originalEvent
600
+ }));
601
+ };
602
+
603
+ _this._scriptURL = scriptURL;
604
+ _this._registerOptions = registerOptions;
605
+ return _this;
606
+ }
607
+ /**
608
+ * Registers a service worker for this instances script URL and service
609
+ * worker options. By default this method delays registration until after
610
+ * the window has loaded.
611
+ *
612
+ * @param {Object} [options]
613
+ * @param {Function} [options.immediate=false] Setting this to true will
614
+ * register the service worker immediately, even if the window has
615
+ * not loaded (not recommended).
616
+ */
617
+
618
+
619
+ var _proto = Workbox.prototype;
620
+ _proto.register = _async(function (_temp) {
621
+ var _this2 = this;
622
+
623
+ var _ref = _temp === void 0 ? {} : _temp,
624
+ _ref$immediate = _ref.immediate,
625
+ immediate = _ref$immediate === void 0 ? false : _ref$immediate;
626
+
627
+ {
628
+ if (_this2._registrationTime) {
629
+ logger.error('Cannot re-register a Workbox instance after it has ' + 'been registered. Create a new instance instead.');
630
+ return;
631
+ }
632
+ }
633
+
634
+ return _invoke(function () {
635
+ if (!immediate && document.readyState !== 'complete') {
636
+ return _awaitIgnored(new Promise(function (res) {
637
+ return addEventListener('load', res);
638
+ }));
639
+ }
640
+ }, function () {
641
+ // Set this flag to true if any service worker was controlling the page
642
+ // at registration time.
643
+ _this2._isUpdate = Boolean(navigator.serviceWorker.controller); // Before registering, attempt to determine if a SW is already controlling
644
+ // the page, and if that SW script (and version, if specified) matches this
645
+ // instance's script.
646
+
647
+ _this2._compatibleControllingSW = _this2._getControllingSWIfCompatible();
648
+ return _await(_this2._registerScript(), function (_this2$_registerScrip) {
649
+ _this2._registration = _this2$_registerScrip;
650
+
651
+ // If we have a compatible controller, store the controller as the "own"
652
+ // SW, resolve active/controlling deferreds and add necessary listeners.
653
+ if (_this2._compatibleControllingSW) {
654
+ _this2._sw = _this2._compatibleControllingSW;
655
+
656
+ _this2._activeDeferred.resolve(_this2._compatibleControllingSW);
657
+
658
+ _this2._controllingDeferred.resolve(_this2._compatibleControllingSW);
659
+
660
+ _this2._reportWindowReady(_this2._compatibleControllingSW);
661
+
662
+ _this2._compatibleControllingSW.addEventListener('statechange', _this2._onStateChange, {
663
+ once: true
664
+ });
665
+ } // If there's a waiting service worker with a matching URL before the
666
+ // `updatefound` event fires, it likely means that this site is open
667
+ // in another tab, or the user refreshed the page (and thus the prevoius
668
+ // page wasn't fully unloaded before this page started loading).
669
+ // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting
670
+
671
+
672
+ var waitingSW = _this2._registration.waiting;
673
+
674
+ if (waitingSW && urlsMatch(waitingSW.scriptURL, _this2._scriptURL)) {
675
+ // Store the waiting SW as the "own" Sw, even if it means overwriting
676
+ // a compatible controller.
677
+ _this2._sw = waitingSW; // Run this in the next microtask, so any code that adds an event
678
+ // listener after awaiting `register()` will get this event.
679
+
680
+ Promise.resolve().then(function () {
681
+ _this2.dispatchEvent(new WorkboxEvent('waiting', {
682
+ sw: waitingSW,
683
+ wasWaitingBeforeRegister: true
684
+ }));
685
+
686
+ {
687
+ logger.warn('A service worker was already waiting to activate ' + 'before this script was registered...');
688
+ }
689
+ });
690
+ } // If an "own" SW is already set, resolve the deferred.
691
+
692
+
693
+ if (_this2._sw) {
694
+ _this2._swDeferred.resolve(_this2._sw);
695
+ }
696
+
697
+ {
698
+ logger.log('Successfully registered service worker.', _this2._scriptURL);
699
+
700
+ if (navigator.serviceWorker.controller) {
701
+ if (_this2._compatibleControllingSW) {
702
+ logger.debug('A service worker with the same script URL ' + 'is already controlling this page.');
703
+ } else {
704
+ logger.debug('A service worker with a different script URL is ' + 'currently controlling the page. The browser is now fetching ' + 'the new script now...');
705
+ }
706
+ }
707
+
708
+ var currentPageIsOutOfScope = function currentPageIsOutOfScope() {
709
+ var scopeURL = new URL(_this2._registerOptions.scope || _this2._scriptURL, document.baseURI);
710
+ var scopeURLBasePath = new URL('./', scopeURL.href).pathname;
711
+ return !location.pathname.startsWith(scopeURLBasePath);
712
+ };
713
+
714
+ if (currentPageIsOutOfScope()) {
715
+ logger.warn('The current page is not in scope for the registered ' + 'service worker. Was this a mistake?');
716
+ }
717
+ }
718
+
719
+ _this2._registration.addEventListener('updatefound', _this2._onUpdateFound);
720
+
721
+ navigator.serviceWorker.addEventListener('controllerchange', _this2._onControllerChange, {
722
+ once: true
723
+ }); // Add message listeners.
724
+
725
+ if ('BroadcastChannel' in self) {
726
+ _this2._broadcastChannel = new BroadcastChannel('workbox');
727
+
728
+ _this2._broadcastChannel.addEventListener('message', _this2._onMessage);
729
+ }
730
+
731
+ navigator.serviceWorker.addEventListener('message', _this2._onMessage);
732
+ return _this2._registration;
733
+ });
734
+ });
735
+ });
736
+ /**
737
+ * Resolves to the service worker registered by this instance as soon as it
738
+ * is active. If a service worker was already controlling at registration
739
+ * time then it will resolve to that if the script URLs (and optionally
740
+ * script versions) match, otherwise it will wait until an update is found
741
+ * and activates.
742
+ *
743
+ * @return {Promise<ServiceWorker>}
744
+ */
745
+
746
+ /**
747
+ * Resolves with a reference to a service worker that matches the script URL
748
+ * of this instance, as soon as it's available.
749
+ *
750
+ * If, at registration time, there's already an active or waiting service
751
+ * worker with a matching script URL, it will be used (with the waiting
752
+ * service worker taking precedence over the active service worker if both
753
+ * match, since the waiting service worker would have been registered more
754
+ * recently).
755
+ * If there's no matching active or waiting service worker at registration
756
+ * time then the promise will not resolve until an update is found and starts
757
+ * installing, at which point the installing service worker is used.
758
+ *
759
+ * @return {Promise<ServiceWorker>}
760
+ */
761
+ _proto.getSW = _async(function () {
762
+ var _this3 = this;
763
+
764
+ // If `this._sw` is set, resolve with that as we want `getSW()` to
765
+ // return the correct (new) service worker if an update is found.
766
+ return _this3._sw !== undefined ? _this3._sw : _this3._swDeferred.promise;
767
+ });
768
+ /**
769
+ * Sends the passed data object to the service worker registered by this
770
+ * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves
771
+ * with a response (if any).
772
+ *
773
+ * A response can be set in a message handler in the service worker by
774
+ * calling `event.ports[0].postMessage(...)`, which will resolve the promise
775
+ * returned by `messageSW()`. If no response is set, the promise will never
776
+ * resolve.
777
+ *
778
+ * @param {Object} data An object to send to the service worker
779
+ * @return {Promise<Object>}
780
+ */
781
+
782
+ _proto.messageSW = _async(function (data) {
783
+ var _this4 = this;
784
+
785
+ return _await(_this4.getSW(), function (sw) {
786
+ return messageSW(sw, data);
787
+ });
788
+ });
789
+ /**
790
+ * Checks for a service worker already controlling the page and returns
791
+ * it if its script URL matchs.
792
+ *
793
+ * @private
794
+ * @return {ServiceWorker|undefined}
795
+ */
796
+
797
+ _proto._getControllingSWIfCompatible = function _getControllingSWIfCompatible() {
798
+ var controller = navigator.serviceWorker.controller;
799
+
800
+ if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) {
801
+ return controller;
802
+ } else {
803
+ return undefined;
804
+ }
805
+ };
806
+ /**
807
+ * Registers a service worker for this instances script URL and register
808
+ * options and tracks the time registration was complete.
809
+ *
810
+ * @private
811
+ */
812
+
813
+
814
+ _proto._registerScript = _async(function () {
815
+ var _this5 = this;
816
+
817
+ return _catch(function () {
818
+ return _await(navigator.serviceWorker.register(_this5._scriptURL, _this5._registerOptions), function (reg) {
819
+ // Keep track of when registration happened, so it can be used in the
820
+ // `this._onUpdateFound` heuristic. Also use the presence of this
821
+ // property as a way to see if `.register()` has been called.
822
+ _this5._registrationTime = performance.now();
823
+ return reg;
824
+ });
825
+ }, function (error) {
826
+ {
827
+ logger.error(error);
828
+ } // Re-throw the error.
829
+
830
+
831
+ throw error;
832
+ });
833
+ });
834
+ /**
835
+ * Sends a message to the passed service worker that the window is ready.
836
+ *
837
+ * @param {ServiceWorker} sw
838
+ * @private
839
+ */
840
+
841
+ _proto._reportWindowReady = function _reportWindowReady(sw) {
842
+ messageSW(sw, {
843
+ type: 'WINDOW_READY',
844
+ meta: 'workbox-window'
845
+ });
846
+ };
847
+
848
+ _createClass(Workbox, [{
849
+ key: "active",
850
+ get: function get() {
851
+ return this._activeDeferred.promise;
852
+ }
853
+ /**
854
+ * Resolves to the service worker registered by this instance as soon as it
855
+ * is controlling the page. If a service worker was already controlling at
856
+ * registration time then it will resolve to that if the script URLs (and
857
+ * optionally script versions) match, otherwise it will wait until an update
858
+ * is found and starts controlling the page.
859
+ * Note: the first time a service worker is installed it will active but
860
+ * not start controlling the page unless `clients.claim()` is called in the
861
+ * service worker.
862
+ *
863
+ * @return {Promise<ServiceWorker>}
864
+ */
865
+
866
+ }, {
867
+ key: "controlling",
868
+ get: function get() {
869
+ return this._controllingDeferred.promise;
870
+ }
871
+ }]);
872
+
873
+ return Workbox;
874
+ }(WorkboxEventTarget); // The jsdoc comments below outline the events this instance may dispatch:
875
+
876
+ exports.Workbox = Workbox;
877
+ exports.messageSW = messageSW;
878
+
879
+ Object.defineProperty(exports, '__esModule', { value: true });
880
+
881
+ }));
882
+ //# sourceMappingURL=workbox-window.dev.umd.js.map