New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

workbox-cdn

Package Overview
Dependencies
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-cdn - npm Package Compare versions

Comparing version 5.0.0-beta.0 to 5.0.0-rc.1

4

package.json
{
"name": "workbox-cdn",
"version": "5.0.0-beta.0",
"version": "5.0.0-rc.1",
"description": "Workbox Unofficial CDN",

@@ -16,3 +16,3 @@ "repository": "nuxt-community/workbox-cdn",

"devDependencies": {
"workbox-cli": "5.0.0-beta.0"
"workbox-cli": "5.0.0-rc.1"
},

@@ -19,0 +19,0 @@ "contributors": [

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:background-sync:5.0.0-beta.0'] && _();
self['workbox:background-sync:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -23,3 +22,3 @@

/**
* A class to manage storing requests from a Queue in IndexedbDB,
* A class to manage storing requests from a Queue in IndexedDB,
* indexed by their queue name for easier access.

@@ -77,3 +76,3 @@ *

/**
* Preppend an entry first in the queue.
* Prepend an entry first in the queue.
*

@@ -310,4 +309,4 @@ * @param {Object} entry

if (requestData.mode === 'navigate') {
requestData.mode = 'same-origin';
if (requestData['mode'] === 'navigate') {
requestData['mode'] = 'same-origin';
}

@@ -314,0 +313,0 @@

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.backgroundSync=function(t,e,s,i,n){"use strict";try{self["workbox:background-sync:5.0.0-beta.0"]&&_()}catch(t){}const a=3,r="workbox-background-sync",c="requests",h="queueName";class o{constructor(t){this.t=t,this.s=new n.DBWrapper(r,a,{onupgradeneeded:this.i})}async pushEntry(t){delete t.id,t.queueName=this.t,await this.s.add(c,t)}async unshiftEntry(t){const[e]=await this.s.getAllMatching(c,{count:1});e?t.id=e.id-1:delete t.id,t.queueName=this.t,await this.s.add(c,t)}async popEntry(){return this.h({direction:"prev"})}async shiftEntry(){return this.h({direction:"next"})}async getAll(){return await this.s.getAllMatching(c,{index:h,query:IDBKeyRange.only(this.t)})}async deleteEntry(t){await this.s.delete(c,t)}async h({direction:t}){const[e]=await this.s.getAllMatching(c,{direction:t,index:h,query:IDBKeyRange.only(this.t),count:1});if(e)return await this.deleteEntry(e.id),e}i(t){const e=t.target.result;t.oldVersion>0&&t.oldVersion<a&&e.objectStoreNames.contains(c)&&e.deleteObjectStore(c),e.createObjectStore(c,{autoIncrement:!0,keyPath:"id"}).createIndex(h,h,{unique:!1})}}const u=["method","referrer","referrerPolicy","mode","credentials","cache","redirect","integrity","keepalive"];class y{static async fromRequest(t){const e={url:t.url,headers:{}};"GET"!==t.method&&(e.body=await t.clone().arrayBuffer());for(const[s,i]of t.headers.entries())e.headers[s]=i;for(const s of u)void 0!==t[s]&&(e[s]=t[s]);return new y(e)}constructor(t){"navigate"===t.mode&&(t.mode="same-origin"),this.o=t}toObject(){const t=Object.assign({},this.o);return t.headers=Object.assign({},this.o.headers),t.body&&(t.body=t.body.slice(0)),t}toRequest(){return new Request(this.o.url,this.o)}clone(){return new y(this.toObject())}}const w="workbox-background-sync",f=10080,d=new Set;class l{constructor(t,{onSync:s,maxRetentionTime:i}={}){if(this.u=!1,this.l=!1,d.has(t))throw new e.WorkboxError("duplicate-queue-name",{name:t});d.add(t),this.q=t,this.m=s||this.replayRequests,this.p=i||f,this.g=new o(this.q),this.R()}get name(){return this.q}async pushRequest(t){await this.k(t,"push")}async unshiftRequest(t){await this.k(t,"unshift")}async popRequest(){return this.D("pop")}async shiftRequest(){return this.D("shift")}async getAll(){const t=await this.g.getAll(),e=Date.now(),s=[];for(const i of t){const t=60*this.p*1e3;e-i.timestamp>t?await this.g.deleteEntry(i.id):s.push(q(i))}return s}async k({request:t,metadata:e,timestamp:s=Date.now()},i){const n={requestData:(await y.fromRequest(t.clone())).toObject(),timestamp:s};e&&(n.metadata=e),await this.g[`${i}Entry`](n),this.u?this.l=!0:await this.registerSync()}async D(t){const e=Date.now(),s=await this.g[`${t}Entry`]();if(s){const i=60*this.p*1e3;return e-s.timestamp>i?this.D(t):q(s)}}async replayRequests(){let t;for(;t=await this.shiftRequest();)try{await fetch(t.request.clone())}catch(s){throw await this.unshiftRequest(t),new e.WorkboxError("queue-replay-failed",{name:this.q})}}async registerSync(){if("sync"in self.registration)try{await self.registration.sync.register(`${w}:${this.q}`)}catch(t){}}R(){"sync"in self.registration?self.addEventListener("sync",t=>{if(t.tag===`${w}:${this.q}`){const e=async()=>{let e;this.u=!0;try{await this.m({queue:this})}catch(t){throw e=t}finally{!this.l||e&&!t.lastChance||await this.registerSync(),this.u=!1,this.l=!1}};t.waitUntil(e())}}):this.m({queue:this})}static get _(){return d}}const q=t=>{const e={request:new y(t.requestData).toRequest(),timestamp:t.timestamp};return t.metadata&&(e.metadata=t.metadata),e};return t.BackgroundSyncPlugin=class{constructor(t,e){this.fetchDidFail=(async({request:t})=>{await this.v.pushRequest({request:t})}),this.v=new l(t,e)}},t.Queue=l,t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private);
this.workbox=this.workbox||{},this.workbox.backgroundSync=function(t,e,s,i,n){"use strict";try{self["workbox:background-sync:5.0.0-rc.1"]&&_()}catch(t){}const a=3,r="workbox-background-sync",c="requests",h="queueName";class o{constructor(t){this.t=t,this.s=new n.DBWrapper(r,a,{onupgradeneeded:this.i})}async pushEntry(t){delete t.id,t.queueName=this.t,await this.s.add(c,t)}async unshiftEntry(t){const[e]=await this.s.getAllMatching(c,{count:1});e?t.id=e.id-1:delete t.id,t.queueName=this.t,await this.s.add(c,t)}async popEntry(){return this.h({direction:"prev"})}async shiftEntry(){return this.h({direction:"next"})}async getAll(){return await this.s.getAllMatching(c,{index:h,query:IDBKeyRange.only(this.t)})}async deleteEntry(t){await this.s.delete(c,t)}async h({direction:t}){const[e]=await this.s.getAllMatching(c,{direction:t,index:h,query:IDBKeyRange.only(this.t),count:1});if(e)return await this.deleteEntry(e.id),e}i(t){const e=t.target.result;t.oldVersion>0&&t.oldVersion<a&&e.objectStoreNames.contains(c)&&e.deleteObjectStore(c),e.createObjectStore(c,{autoIncrement:!0,keyPath:"id"}).createIndex(h,h,{unique:!1})}}const u=["method","referrer","referrerPolicy","mode","credentials","cache","redirect","integrity","keepalive"];class y{static async fromRequest(t){const e={url:t.url,headers:{}};"GET"!==t.method&&(e.body=await t.clone().arrayBuffer());for(const[s,i]of t.headers.entries())e.headers[s]=i;for(const s of u)void 0!==t[s]&&(e[s]=t[s]);return new y(e)}constructor(t){"navigate"===t.mode&&(t.mode="same-origin"),this.o=t}toObject(){const t=Object.assign({},this.o);return t.headers=Object.assign({},this.o.headers),t.body&&(t.body=t.body.slice(0)),t}toRequest(){return new Request(this.o.url,this.o)}clone(){return new y(this.toObject())}}const w="workbox-background-sync",f=10080,d=new Set;class l{constructor(t,{onSync:s,maxRetentionTime:i}={}){if(this.u=!1,this.l=!1,d.has(t))throw new e.WorkboxError("duplicate-queue-name",{name:t});d.add(t),this.q=t,this.m=s||this.replayRequests,this.p=i||f,this.g=new o(this.q),this.R()}get name(){return this.q}async pushRequest(t){await this.k(t,"push")}async unshiftRequest(t){await this.k(t,"unshift")}async popRequest(){return this.D("pop")}async shiftRequest(){return this.D("shift")}async getAll(){const t=await this.g.getAll(),e=Date.now(),s=[];for(const i of t){const t=60*this.p*1e3;e-i.timestamp>t?await this.g.deleteEntry(i.id):s.push(q(i))}return s}async k({request:t,metadata:e,timestamp:s=Date.now()},i){const n={requestData:(await y.fromRequest(t.clone())).toObject(),timestamp:s};e&&(n.metadata=e),await this.g[`${i}Entry`](n),this.u?this.l=!0:await this.registerSync()}async D(t){const e=Date.now(),s=await this.g[`${t}Entry`]();if(s){const i=60*this.p*1e3;return e-s.timestamp>i?this.D(t):q(s)}}async replayRequests(){let t;for(;t=await this.shiftRequest();)try{await fetch(t.request.clone())}catch(s){throw await this.unshiftRequest(t),new e.WorkboxError("queue-replay-failed",{name:this.q})}}async registerSync(){if("sync"in self.registration)try{await self.registration.sync.register(`${w}:${this.q}`)}catch(t){}}R(){"sync"in self.registration?self.addEventListener("sync",t=>{if(t.tag===`${w}:${this.q}`){const e=async()=>{let e;this.u=!0;try{await this.m({queue:this})}catch(t){throw e=t}finally{!this.l||e&&!t.lastChance||await this.registerSync(),this.u=!1,this.l=!1}};t.waitUntil(e())}}):this.m({queue:this})}static get _(){return d}}const q=t=>{const e={request:new y(t.requestData).toRequest(),timestamp:t.timestamp};return t.metadata&&(e.metadata=t.metadata),e};return t.BackgroundSyncPlugin=class{constructor(t,e){this.fetchDidFail=(async({request:t})=>{await this.v.pushRequest({request:t})}),this.v=new l(t,e)}},t.Queue=l,t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private);
this.workbox = this.workbox || {};
this.workbox.broadcastUpdate = (function (exports, assert_js, logger_js, WorkboxError_js) {
this.workbox.broadcastUpdate = (function (exports, assert_js, timeout_js, resultingClientExists_js, logger_js, WorkboxError_js, dontWaitFor_js) {
'use strict';
// @ts-ignore
try {
self['workbox:broadcast-update:5.0.0-beta.0'] && _();
self['workbox:broadcast-update:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -77,2 +76,6 @@

*/
// TODO(philipwalton): remove once this Safari bug fix has been released.
// https://bugs.webkit.org/show_bug.cgi?id=201169
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
/**

@@ -192,3 +195,27 @@ * Generates the default payload used in update messages. By default the

payload: this._generatePayload(options)
};
}; // For navigation requests, wait until the new window client exists
// before sending the message
if (options.request.mode === 'navigate') {
let resultingClientId;
if (options.event instanceof FetchEvent) {
resultingClientId = options.event.resultingClientId;
}
const resultingWin = await resultingClientExists_js.resultingClientExists(resultingClientId); // Safari does not currently implement postMessage buffering and
// there's no good way to feature detect that, so to increase the
// chances of the message being delivered in Safari, we add a timeout.
// We also do this if `resultingClientExists()` didn't return a client,
// which means it timed out, so it's worth waiting a bit longer.
if (!resultingWin || isSafari) {
// 3500 is chosen because (according to CrUX data) 80% of mobile
// websites hit the DOMContentLoaded event in less than 3.5 seconds.
// And presumably sites implementing service worker are on the
// higher end of the performance spectrum.
await timeout_js.timeout(3500);
}
}
const windows = await self.clients.matchAll({

@@ -249,3 +276,3 @@ type: 'window'

this.cacheDidUpdate = async options => {
this._broadcastUpdate.notifyIfUpdated(options);
dontWaitFor_js.dontWaitFor(this._broadcastUpdate.notifyIfUpdated(options));
};

@@ -264,3 +291,3 @@

}({}, workbox.core._private, workbox.core._private, workbox.core._private));
}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private));

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.broadcastUpdate=function(t){"use strict";try{self["workbox:broadcast-update:5.0.0-beta.0"]&&_()}catch(t){}const s=(t,s,e)=>{return!e.some(e=>t.headers.has(e)&&s.headers.has(e))||e.every(e=>{const a=t.headers.has(e)===s.headers.has(e),n=t.headers.get(e)===s.headers.get(e);return a&&n})},e="CACHE_UPDATED",a="workbox-broadcast-update",n=["content-length","etag","last-modified"];function c(t){return{cacheName:t.cacheName,updatedURL:t.request.url}}class o{constructor({headersToCheck:t,generatePayload:s}={}){this.t=t||n,this.s=s||c}async notifyIfUpdated(t){if(t.oldResponse&&!s(t.oldResponse,t.newResponse,this.t)){const s={type:e,meta:a,payload:this.s(t)},n=await self.clients.matchAll({type:"window"});for(const t of n)t.postMessage(s)}}}return t.BroadcastCacheUpdate=o,t.BroadcastUpdatePlugin=class{constructor(t){this.cacheDidUpdate=(async t=>{this.o.notifyIfUpdated(t)}),this.o=new o(t)}},t.responsesAreSame=s,t}({});
this.workbox=this.workbox||{},this.workbox.broadcastUpdate=function(t,a,o,e){"use strict";try{self["workbox:broadcast-update:5.0.0-rc.1"]&&_()}catch(t){}const s=(t,a,o)=>{return!o.some(o=>t.headers.has(o)&&a.headers.has(o))||o.every(o=>{const e=t.headers.has(o)===a.headers.has(o),s=t.headers.get(o)===a.headers.get(o);return e&&s})},n="CACHE_UPDATED",i="workbox-broadcast-update",c=["content-length","etag","last-modified"],r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function h(t){return{cacheName:t.cacheName,updatedURL:t.request.url}}class d{constructor({headersToCheck:t,generatePayload:a}={}){this.t=t||c,this.o=a||h}async notifyIfUpdated(t){if(t.oldResponse&&!s(t.oldResponse,t.newResponse,this.t)){const e={type:n,meta:i,payload:this.o(t)};if("navigate"===t.request.mode){let e;t.event instanceof FetchEvent&&(e=t.event.resultingClientId),await o.resultingClientExists(e)&&!r||await a.timeout(3500)}const s=await self.clients.matchAll({type:"window"});for(const t of s)t.postMessage(e)}}}return t.BroadcastCacheUpdate=d,t.BroadcastUpdatePlugin=class{constructor(t){this.cacheDidUpdate=(async t=>{e.dontWaitFor(this.s.notifyIfUpdated(t))}),this.s=new d(t)}},t.responsesAreSame=s,t}({},workbox.core._private,workbox.core._private,workbox.core._private);

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:cacheable-response:5.0.0-beta.0'] && _();
self['workbox:cacheable-response:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -10,0 +9,0 @@

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(s){"use strict";try{self["workbox:cacheable-response:5.0.0-beta.0"]&&_()}catch(s){}class t{constructor(s={}){this.s=s.statuses,this.t=s.headers}isResponseCacheable(s){let t=!0;return this.s&&(t=this.s.includes(s.status)),this.t&&t&&(t=Object.keys(this.t).some(t=>s.headers.get(t)===this.t[t])),t}}return s.CacheableResponse=t,s.CacheableResponsePlugin=class{constructor(s){this.cacheWillUpdate=(async({response:s})=>this.i.isResponseCacheable(s)?s:null),this.i=new t(s)}},s}({});
this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(s){"use strict";try{self["workbox:cacheable-response:5.0.0-rc.1"]&&_()}catch(s){}class t{constructor(s={}){this.s=s.statuses,this.t=s.headers}isResponseCacheable(s){let t=!0;return this.s&&(t=this.s.includes(s.status)),this.t&&t&&(t=Object.keys(this.t).some(t=>s.headers.get(t)===this.t[t])),t}}return s.CacheableResponse=t,s.CacheableResponsePlugin=class{constructor(s){this.cacheWillUpdate=(async({response:s})=>this.i.isResponseCacheable(s)?s:null),this.i=new t(s)}},s}({});

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:core:5.0.0-beta.0'] && _();
self['workbox:core:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -18,2 +17,3 @@

const logger = (() => {
self.__WB_DISABLE_DEV_LOGS = false;
let inGroup = false;

@@ -30,2 +30,6 @@ const methodToColorMap = {

const print = function (method, args) {
if (self.__WB_DISABLE_DEV_LOGS) {
return;
}
if (method === 'groupCollapsed') {

@@ -335,3 +339,3 @@ // Safari doesn't print all console.groupCollapsed() arguments:

}) => {
return `createHandlerForURL('${url}') was called, but that URL is not ` + `precached. Please pass in a URL that is precached instead.`;
return `createHandlerBoundToURL('${url}') was called, but that URL is ` + `not precached. Please pass in a URL that is precached instead.`;
},

@@ -342,2 +346,8 @@ 'add-to-cache-list-conflicting-integrities': ({

return `Two of the entries passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + `${url} with different integrity values. Please remove one of them.`;
},
'missing-precache-entry': ({
cacheName,
url
}) => {
return `Unable to find a precached response in ${cacheName} for ${url}.`;
}

@@ -437,3 +447,3 @@ };

if (type !== 'function') {
details.expectedMethod = expectedMethod;
details['expectedMethod'] = expectedMethod;
throw new WorkboxError('missing-a-method', details);

@@ -445,3 +455,3 @@ }

if (typeof object !== expectedType) {
details.expectedType = expectedType;
details['expectedType'] = expectedType;
throw new WorkboxError('incorrect-type', details);

@@ -453,3 +463,3 @@ }

if (!(object instanceof expectedClass)) {
details.expectedClass = expectedClass;
details['expectedClass'] = expectedClass;
throw new WorkboxError('incorrect-class', details);

@@ -461,3 +471,3 @@ }

if (!validValues.includes(value)) {
details.validValueDescription = `Valid values are ${JSON.stringify(validValues)}.`;
details['validValueDescription'] = `Valid values are ${JSON.stringify(validValues)}.`;
throw new WorkboxError('invalid-value', details);

@@ -544,3 +554,3 @@ }

runtime: 'runtime',
suffix: registration.scope
suffix: typeof registration !== 'undefined' ? registration.scope : ''
};

@@ -590,20 +600,2 @@

*/
const getFriendlyURL = url => {
const urlObj = new URL(String(url), location.href);
if (urlObj.origin === location.origin) {
return urlObj.pathname;
}
return urlObj.href;
};
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
/**

@@ -642,2 +634,20 @@ * Runs all of the callback functions, one at a time sequentially, in the order

*/
const getFriendlyURL = url => {
const urlObj = new URL(String(url), location.href);
if (urlObj.origin === location.origin) {
return urlObj.pathname;
}
return urlObj.href;
};
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
const pluginUtils = {

@@ -722,3 +732,3 @@ filter: (plugins, callbackName) => {

const cache = await caches.open(cacheName);
const cache = await self.caches.open(cacheName);
const updatePlugins = pluginUtils.filter(plugins, "cacheDidUpdate"

@@ -767,3 +777,3 @@ /* CACHE_DID_UPDATE */

* cache entries.
* @param {Event} [options.event] The event that propted the action.
* @param {Event} [options.event] The event that prompted the action.
* @param {Object} [options.matchOptions] Options passed to cache.match().

@@ -785,3 +795,3 @@ * @param {Array<Object>} [options.plugins=[]] Array of plugins.

}) => {
const cache = await caches.open(cacheName);
const cache = await self.caches.open(cacheName);
const effectiveRequest = await _getEffectiveRequest({

@@ -1040,2 +1050,19 @@ plugins,

/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
/**
* A helper function that prevents a promise from being flagged as unused.
*
* @private
**/
function dontWaitFor(promise) {
// Effective no-op.
promise.then(() => {});
}
/*
Copyright 2018 Google LLC

@@ -1282,3 +1309,5 @@

const callback = (txn, done) => {
const objStore = txn.objectStore(storeName);
const objStore = txn.objectStore(storeName); // TODO(philipwalton): Fix this underlying TS2684 error.
// @ts-ignore
const request = objStore[method].apply(objStore, args);

@@ -1414,3 +1443,3 @@

* @param {Object} [options.fetchOptions]
* @param {Event} [options.event]
* @param {ExtendableEvent} [options.event]
* @param {Array<Object>} [options.plugins=[]]

@@ -1569,2 +1598,76 @@ * @return {Promise<Response>}

/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
/**
* Returns a promise that resolves and the passed number of milliseconds.
* This utility is an async/await-friendly version of `setTimeout`.
*
* @param {number} ms
* @return {Promise}
* @private
*/
function timeout(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
const MAX_RETRY_TIME = 2000;
/**
* Returns a promise that resolves to a window client matching the passed
* `resultingClientId`. For browsers that don't support `resultingClientId`
* or if waiting for the resulting client to apper takes too long, resolve to
* `undefined`.
*
* @param {string} [resultingClientId]
* @return {Promise<Client|undefined>}
* @private
*/
async function resultingClientExists(resultingClientId) {
if (!resultingClientId) {
return;
}
let existingWindows = await self.clients.matchAll({
type: 'window'
});
const existingWindowIds = new Set(existingWindows.map(w => w.id));
let resultingWindow;
const startTime = performance.now(); // Only wait up to `MAX_RETRY_TIME` to find a matching client.
while (performance.now() - startTime < MAX_RETRY_TIME) {
existingWindows = await self.clients.matchAll({
type: 'window'
});
resultingWindow = existingWindows.find(w => {
if (resultingClientId) {
// If we have a `resultingClientId`, we can match on that.
return w.id === resultingClientId;
} else {
// Otherwise match on finding a window not in `existingWindowIds`.
return !existingWindowIds.has(w.id);
}
});
if (resultingWindow) {
break;
} // Sleep for 100ms and retry.
await timeout(100);
}
return resultingWindow;
}
/*
Copyright 2018 Google LLC

@@ -1583,2 +1686,3 @@

canConstructResponseFromBodyStream: canConstructResponseFromBodyStream,
dontWaitFor: dontWaitFor,
DBWrapper: DBWrapper,

@@ -1591,2 +1695,4 @@ Deferred: Deferred,

logger: logger,
resultingClientExists: resultingClientExists,
timeout: timeout,
WorkboxError: WorkboxError

@@ -1697,3 +1803,3 @@ });

const clientsClaim = () => {
addEventListener('activate', () => self.clients.claim());
self.addEventListener('activate', () => self.clients.claim());
};

@@ -1736,20 +1842,20 @@

if ('precache' in details && details.precache.length === 0) {
if ('precache' in details && details['precache'].length === 0) {
throw new WorkboxError('invalid-cache-name', {
cacheNameId: 'precache',
value: details.precache
value: details['precache']
});
}
if ('runtime' in details && details.runtime.length === 0) {
if ('runtime' in details && details['runtime'].length === 0) {
throw new WorkboxError('invalid-cache-name', {
cacheNameId: 'runtime',
value: details.runtime
value: details['runtime']
});
}
if ('googleAnalytics' in details && details.googleAnalytics.length === 0) {
if ('googleAnalytics' in details && details['googleAnalytics'].length === 0) {
throw new WorkboxError('invalid-cache-name', {
cacheNameId: 'googleAnalytics',
value: details.googleAnalytics
value: details['googleAnalytics']
});

@@ -1779,3 +1885,3 @@ }

// shadowing `skipWaiting` with this local function.
addEventListener('install', () => self.skipWaiting());
self.addEventListener('install', () => self.skipWaiting());
};

@@ -1782,0 +1888,0 @@

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.core=function(e){"use strict";try{self["workbox:core:5.0.0-beta.0"]&&_()}catch(e){}const t=(e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n};class n extends Error{constructor(e,n){super(t(e,n)),this.name=e,this.details=n}}const s=new Set;const r={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:registration.scope},a=e=>[r.prefix,e,r.suffix].filter(e=>e&&e.length>0).join("-"),i={updateDetails:e=>{(e=>{for(const t of Object.keys(r))e(t)})(t=>{"string"==typeof e[t]&&(r[t]=e[t])})},getGoogleAnalyticsName:e=>e||a(r.googleAnalytics),getPrecacheName:e=>e||a(r.precache),getPrefix:()=>r.prefix,getRuntimeName:e=>e||a(r.runtime),getSuffix:()=>r.suffix},c=e=>{const t=new URL(String(e),location.href);return t.origin===location.origin?t.pathname:t.href};async function o(){for(const e of s)await e()}const u=(e,t)=>e.filter(e=>t in e),l=async({cacheName:e,request:t,event:n,matchOptions:s,plugins:r=[]})=>{const a=await caches.open(e),i=await f({plugins:r,request:t,mode:"read"});let c=await a.match(i,s);for(const t of r)if("cachedResponseWillBeUsed"in t){const r=t.cachedResponseWillBeUsed;c=await r.call(t,{cacheName:e,event:n,matchOptions:s,cachedResponse:c,request:i})}return c},h=async({request:e,response:t,event:n,plugins:s=[]})=>{let r=t,a=!1;for(let t of s)if("cacheWillUpdate"in t){a=!0;const s=t.cacheWillUpdate;if(!(r=await s.call(t,{request:e,response:r,event:n})))break}return a||(r=r&&200===r.status?r:void 0),r||null},f=async({request:e,mode:t,plugins:n=[]})=>{const s=u(n,"cacheKeyWillBeUsed");let r=e;for(const e of s)"string"==typeof(r=await e.cacheKeyWillBeUsed.call(e,{mode:t,request:r}))&&(r=new Request(r));return r},w={put:async({cacheName:e,request:t,response:s,event:r,plugins:a=[],matchOptions:i})=>{const w=await f({plugins:a,request:t,mode:"write"});if(!s)throw new n("cache-put-with-no-response",{url:c(w.url)});let d=await h({event:r,plugins:a,response:s,request:w});if(!d)return;const p=await caches.open(e),g=u(a,"cacheDidUpdate");let y=g.length>0?await l({cacheName:e,matchOptions:i,request:w}):null;try{await p.put(w,d)}catch(e){throw"QuotaExceededError"===e.name&&await o(),e}for(let t of g)await t.cacheDidUpdate.call(t,{cacheName:e,event:r,oldResponse:y,newResponse:d,request:w})},match:l};let d,p;function g(){if(void 0===p){const e=new Response("");if("body"in e)try{new Response(e.body),p=!0}catch(e){p=!1}p=!1}return p}class y{constructor(e,t,{onupgradeneeded:n,onversionchange:s}={}){this.t=null,this.s=e,this.i=t,this.o=n,this.u=s||(()=>this.close())}get db(){return this.t}async open(){if(!this.t)return this.t=await new Promise((e,t)=>{let n=!1;setTimeout(()=>{n=!0,t(new Error("The open request was blocked and timed out"))},this.OPEN_TIMEOUT);const s=indexedDB.open(this.s,this.i);s.onerror=(()=>t(s.error)),s.onupgradeneeded=(e=>{n?(s.transaction.abort(),s.result.close()):"function"==typeof this.o&&this.o(e)}),s.onsuccess=(()=>{const t=s.result;n?t.close():(t.onversionchange=this.u.bind(this),e(t))})}),this}async getKey(e,t){return(await this.getAllKeys(e,t,1))[0]}async getAll(e,t,n){return await this.getAllMatching(e,{query:t,count:n})}async getAllKeys(e,t,n){return(await this.getAllMatching(e,{query:t,count:n,includeKeys:!0})).map(e=>e.key)}async getAllMatching(e,{index:t,query:n=null,direction:s="next",count:r,includeKeys:a=!1}={}){return await this.transaction([e],"readonly",(i,c)=>{const o=i.objectStore(e),u=t?o.index(t):o,l=[],h=u.openCursor(n,s);h.onsuccess=(()=>{const e=h.result;e?(l.push(a?e:e.value),r&&l.length>=r?c(l):e.continue()):c(l)})})}async transaction(e,t,n){return await this.open(),await new Promise((s,r)=>{const a=this.t.transaction(e,t);a.onabort=(()=>r(a.error)),a.oncomplete=(()=>s()),n(a,e=>s(e))})}async l(e,t,n,...s){return await this.transaction([t],n,(n,r)=>{const a=n.objectStore(t),i=a[e].apply(a,s);i.onsuccess=(()=>r(i.result))})}close(){this.t&&(this.t.close(),this.t=null)}}y.prototype.OPEN_TIMEOUT=2e3;const m={readonly:["get","count","getKey","getAll","getAllKeys"],readwrite:["add","put","clear","delete"]};for(const[e,t]of Object.entries(m))for(const n of t)n in IDBObjectStore.prototype&&(y.prototype[n]=async function(t,...s){return await this.l(n,t,e,...s)});const q={fetch:async({request:e,fetchOptions:t,event:s,plugins:r=[]})=>{if("string"==typeof e&&(e=new Request(e)),s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=u(r,"fetchDidFail"),i=a.length>0?e.clone():null;try{for(let t of r)if("requestWillFetch"in t){const n=t.requestWillFetch,r=e.clone();e=await n.call(t,{request:r,event:s})}}catch(e){throw new n("plugin-error-request-will-fetch",{thrownError:e})}let c=e.clone();try{let n;n="navigate"===e.mode?await fetch(e):await fetch(e,t);for(const e of r)"fetchDidSucceed"in e&&(n=await e.fetchDidSucceed.call(e,{event:s,request:c,response:n}));return n}catch(e){for(const t of a)await t.fetchDidFail.call(t,{error:e,event:s,originalRequest:i.clone(),request:c.clone()});throw e}}};var v=Object.freeze({assert:null,cacheNames:i,cacheWrapper:w,canConstructReadableStream:function(){if(void 0===d)try{new ReadableStream({start(){}}),d=!0}catch(e){d=!1}return d},canConstructResponseFromBodyStream:g,DBWrapper:y,Deferred:class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},deleteDatabase:async e=>{await new Promise((t,n)=>{const s=indexedDB.deleteDatabase(e);s.onerror=(()=>{n(s.error)}),s.onblocked=(()=>{n(new Error("Delete blocked"))}),s.onsuccess=(()=>{t()})})},executeQuotaErrorCallbacks:o,fetchWrapper:q,getFriendlyURL:c,logger:null,WorkboxError:n});const x={get googleAnalytics(){return i.getGoogleAnalyticsName()},get precache(){return i.getPrecacheName()},get prefix(){return i.getPrefix()},get runtime(){return i.getRuntimeName()},get suffix(){return i.getSuffix()}};return e._private=v,e.cacheNames=x,e.clientsClaim=(()=>{addEventListener("activate",()=>self.clients.claim())}),e.copyResponse=async function(e,t){const n=e.clone(),s={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=t?t(s):s,a=g()?n.body:await n.blob();return new Response(a,r)},e.registerQuotaErrorCallback=function(e){s.add(e)},e.setCacheNameDetails=(e=>{i.updateDetails(e)}),e.skipWaiting=(()=>{addEventListener("install",()=>self.skipWaiting())}),e}({});
this.workbox=this.workbox||{},this.workbox.core=function(e){"use strict";try{self["workbox:core:5.0.0-rc.1"]&&_()}catch(e){}const t=(e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n};class n extends Error{constructor(e,n){super(t(e,n)),this.name=e,this.details=n}}const s=new Set;const r={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},a=e=>[r.prefix,e,r.suffix].filter(e=>e&&e.length>0).join("-"),i={updateDetails:e=>{(e=>{for(const t of Object.keys(r))e(t)})(t=>{"string"==typeof e[t]&&(r[t]=e[t])})},getGoogleAnalyticsName:e=>e||a(r.googleAnalytics),getPrecacheName:e=>e||a(r.precache),getPrefix:()=>r.prefix,getRuntimeName:e=>e||a(r.runtime),getSuffix:()=>r.suffix};async function o(){for(const e of s)await e()}const c=e=>{const t=new URL(String(e),location.href);return t.origin===location.origin?t.pathname:t.href},u=(e,t)=>e.filter(e=>t in e),l=async({cacheName:e,request:t,event:n,matchOptions:s,plugins:r=[]})=>{const a=await self.caches.open(e),i=await f({plugins:r,request:t,mode:"read"});let o=await a.match(i,s);for(const t of r)if("cachedResponseWillBeUsed"in t){const r=t.cachedResponseWillBeUsed;o=await r.call(t,{cacheName:e,event:n,matchOptions:s,cachedResponse:o,request:i})}return o},h=async({request:e,response:t,event:n,plugins:s=[]})=>{let r=t,a=!1;for(let t of s)if("cacheWillUpdate"in t){a=!0;const s=t.cacheWillUpdate;if(!(r=await s.call(t,{request:e,response:r,event:n})))break}return a||(r=r&&200===r.status?r:void 0),r||null},f=async({request:e,mode:t,plugins:n=[]})=>{const s=u(n,"cacheKeyWillBeUsed");let r=e;for(const e of s)"string"==typeof(r=await e.cacheKeyWillBeUsed.call(e,{mode:t,request:r}))&&(r=new Request(r));return r},w={put:async({cacheName:e,request:t,response:s,event:r,plugins:a=[],matchOptions:i})=>{const w=await f({plugins:a,request:t,mode:"write"});if(!s)throw new n("cache-put-with-no-response",{url:c(w.url)});let d=await h({event:r,plugins:a,response:s,request:w});if(!d)return;const p=await self.caches.open(e),g=u(a,"cacheDidUpdate");let y=g.length>0?await l({cacheName:e,matchOptions:i,request:w}):null;try{await p.put(w,d)}catch(e){throw"QuotaExceededError"===e.name&&await o(),e}for(let t of g)await t.cacheDidUpdate.call(t,{cacheName:e,event:r,oldResponse:y,newResponse:d,request:w})},match:l};let d,p;function g(){if(void 0===p){const e=new Response("");if("body"in e)try{new Response(e.body),p=!0}catch(e){p=!1}p=!1}return p}class y{constructor(e,t,{onupgradeneeded:n,onversionchange:s}={}){this.t=null,this.s=e,this.i=t,this.o=n,this.u=s||(()=>this.close())}get db(){return this.t}async open(){if(!this.t)return this.t=await new Promise((e,t)=>{let n=!1;setTimeout(()=>{n=!0,t(new Error("The open request was blocked and timed out"))},this.OPEN_TIMEOUT);const s=indexedDB.open(this.s,this.i);s.onerror=(()=>t(s.error)),s.onupgradeneeded=(e=>{n?(s.transaction.abort(),s.result.close()):"function"==typeof this.o&&this.o(e)}),s.onsuccess=(()=>{const t=s.result;n?t.close():(t.onversionchange=this.u.bind(this),e(t))})}),this}async getKey(e,t){return(await this.getAllKeys(e,t,1))[0]}async getAll(e,t,n){return await this.getAllMatching(e,{query:t,count:n})}async getAllKeys(e,t,n){return(await this.getAllMatching(e,{query:t,count:n,includeKeys:!0})).map(e=>e.key)}async getAllMatching(e,{index:t,query:n=null,direction:s="next",count:r,includeKeys:a=!1}={}){return await this.transaction([e],"readonly",(i,o)=>{const c=i.objectStore(e),u=t?c.index(t):c,l=[],h=u.openCursor(n,s);h.onsuccess=(()=>{const e=h.result;e?(l.push(a?e:e.value),r&&l.length>=r?o(l):e.continue()):o(l)})})}async transaction(e,t,n){return await this.open(),await new Promise((s,r)=>{const a=this.t.transaction(e,t);a.onabort=(()=>r(a.error)),a.oncomplete=(()=>s()),n(a,e=>s(e))})}async l(e,t,n,...s){return await this.transaction([t],n,(n,r)=>{const a=n.objectStore(t),i=a[e].apply(a,s);i.onsuccess=(()=>r(i.result))})}close(){this.t&&(this.t.close(),this.t=null)}}y.prototype.OPEN_TIMEOUT=2e3;const m={readonly:["get","count","getKey","getAll","getAllKeys"],readwrite:["add","put","clear","delete"]};for(const[e,t]of Object.entries(m))for(const n of t)n in IDBObjectStore.prototype&&(y.prototype[n]=async function(t,...s){return await this.l(n,t,e,...s)});const q={fetch:async({request:e,fetchOptions:t,event:s,plugins:r=[]})=>{if("string"==typeof e&&(e=new Request(e)),s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=u(r,"fetchDidFail"),i=a.length>0?e.clone():null;try{for(let t of r)if("requestWillFetch"in t){const n=t.requestWillFetch,r=e.clone();e=await n.call(t,{request:r,event:s})}}catch(e){throw new n("plugin-error-request-will-fetch",{thrownError:e})}let o=e.clone();try{let n;n="navigate"===e.mode?await fetch(e):await fetch(e,t);for(const e of r)"fetchDidSucceed"in e&&(n=await e.fetchDidSucceed.call(e,{event:s,request:o,response:n}));return n}catch(e){for(const t of a)await t.fetchDidFail.call(t,{error:e,event:s,originalRequest:i.clone(),request:o.clone()});throw e}}};function v(e){return new Promise(t=>setTimeout(t,e))}const x=2e3;var R=Object.freeze({assert:null,cacheNames:i,cacheWrapper:w,canConstructReadableStream:function(){if(void 0===d)try{new ReadableStream({start(){}}),d=!0}catch(e){d=!1}return d},canConstructResponseFromBodyStream:g,dontWaitFor:function(e){e.then(()=>{})},DBWrapper:y,Deferred:class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},deleteDatabase:async e=>{await new Promise((t,n)=>{const s=indexedDB.deleteDatabase(e);s.onerror=(()=>{n(s.error)}),s.onblocked=(()=>{n(new Error("Delete blocked"))}),s.onsuccess=(()=>{t()})})},executeQuotaErrorCallbacks:o,fetchWrapper:q,getFriendlyURL:c,logger:null,resultingClientExists:async function(e){if(!e)return;let t=await self.clients.matchAll({type:"window"});const n=new Set(t.map(e=>e.id));let s;const r=performance.now();for(;performance.now()-r<x&&!(s=(t=await self.clients.matchAll({type:"window"})).find(t=>e?t.id===e:!n.has(t.id)));)await v(100);return s},timeout:v,WorkboxError:n});const b={get googleAnalytics(){return i.getGoogleAnalyticsName()},get precache(){return i.getPrecacheName()},get prefix(){return i.getPrefix()},get runtime(){return i.getRuntimeName()},get suffix(){return i.getSuffix()}};return e._private=R,e.cacheNames=b,e.clientsClaim=(()=>{self.addEventListener("activate",()=>self.clients.claim())}),e.copyResponse=async function(e,t){const n=e.clone(),s={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=t?t(s):s,a=g()?n.body:await n.blob();return new Response(a,r)},e.registerQuotaErrorCallback=function(e){s.add(e)},e.setCacheNameDetails=(e=>{i.updateDetails(e)}),e.skipWaiting=(()=>{self.addEventListener("install",()=>self.skipWaiting())}),e}({});
this.workbox = this.workbox || {};
this.workbox.expiration = (function (exports, DBWrapper_js, deleteDatabase_js, WorkboxError_js, assert_js, logger_js, cacheNames_js, getFriendlyURL_js, registerQuotaErrorCallback_js) {
this.workbox.expiration = (function (exports, assert_js, dontWaitFor_js, logger_js, WorkboxError_js, DBWrapper_js, deleteDatabase_js, cacheNames_js, getFriendlyURL_js, registerQuotaErrorCallback_js) {
'use strict';
// @ts-ignore
try {
self['workbox:expiration:5.0.0-beta.0'] && _();
self['workbox:expiration:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -280,3 +279,3 @@

const cache = await caches.open(this._cacheName);
const cache = await self.caches.open(this._cacheName);

@@ -302,3 +301,3 @@ for (const url of urlsExpired) {

this._rerunRequested = false;
this.expireEntries();
dontWaitFor_js.dontWaitFor(this.expireEntries());
}

@@ -441,3 +440,3 @@ }

cacheExpiration.expireEntries(); // Update the metadata for the request URL to the current timestamp,
dontWaitFor_js.dontWaitFor(cacheExpiration.expireEntries()); // Update the metadata for the request URL to the current timestamp,
// but don't `await` it as we don't want to block the response.

@@ -639,3 +638,3 @@

for (const [cacheName, cacheExpiration] of this._cacheExpirations) {
await caches.delete(cacheName);
await self.caches.delete(cacheName);
await cacheExpiration.delete();

@@ -655,3 +654,3 @@ } // Reset this._cacheExpirations to its initial state.

}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core));
}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core));

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.expiration=function(t,s,e,i,a,n){"use strict";try{self["workbox:expiration:5.0.0-beta.0"]&&_()}catch(t){}const h="workbox-expiration",r="cache-entries",c=t=>{const s=new URL(t,location.href);return s.hash="",s.href};class o{constructor(t){this.t=t,this.s=new s.DBWrapper(h,1,{onupgradeneeded:t=>this.i(t)})}i(t){const s=t.target.result.createObjectStore(r,{keyPath:"id"});s.createIndex("cacheName","cacheName",{unique:!1}),s.createIndex("timestamp","timestamp",{unique:!1}),e.deleteDatabase(this.t)}async setTimestamp(t,s){const e={url:t=c(t),timestamp:s,cacheName:this.t,id:this.h(t)};await this.s.put(r,e)}async getTimestamp(t){return(await this.s.get(r,this.h(t))).timestamp}async expireEntries(t,s){const e=await this.s.transaction(r,"readwrite",(e,i)=>{const a=e.objectStore(r).index("timestamp").openCursor(null,"prev"),n=[];let h=0;a.onsuccess=(()=>{const e=a.result;if(e){const i=e.value;i.cacheName===this.t&&(t&&i.timestamp<t||s&&h>=s?n.push(e.value):h++),e.continue()}else i(n)})}),i=[];for(const t of e)await this.s.delete(r,t.id),i.push(t.url);return i}h(t){return this.t+"|"+c(t)}}class u{constructor(t,s={}){this.o=!1,this.u=!1,this.l=s.maxEntries,this.m=s.maxAgeSeconds,this.t=t,this.p=new o(t)}async expireEntries(){if(this.o)return void(this.u=!0);this.o=!0;const t=this.m?Date.now()-1e3*this.m:0,s=await this.p.expireEntries(t,this.l),e=await caches.open(this.t);for(const t of s)await e.delete(t);this.o=!1,this.u&&(this.u=!1,this.expireEntries())}async updateTimestamp(t){await this.p.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.m){return await this.p.getTimestamp(t)<Date.now()-1e3*this.m}return!1}async delete(){this.u=!1,await this.p.expireEntries(1/0)}}return t.CacheExpiration=u,t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=(async({event:t,request:s,cacheName:e,cachedResponse:i})=>{if(!i)return null;let a=this.k(i);const n=this.D(e);n.expireEntries();const h=n.updateTimestamp(s.url);if(t)try{t.waitUntil(h)}catch(t){}return a?i:null}),this.cacheDidUpdate=(async({cacheName:t,request:s})=>{const e=this.D(t);await e.updateTimestamp(s.url),await e.expireEntries()}),this.N=t,this.m=t.maxAgeSeconds,this.g=new Map,t.purgeOnQuotaError&&n.registerQuotaErrorCallback(()=>this.deleteCacheAndMetadata())}D(t){if(t===a.cacheNames.getRuntimeName())throw new i.WorkboxError("expire-custom-caches-only");let s=this.g.get(t);return s||(s=new u(t,this.N),this.g.set(t,s)),s}k(t){if(!this.m)return!0;const s=this._(t);return null===s||s>=Date.now()-1e3*this.m}_(t){if(!t.headers.has("date"))return null;const s=t.headers.get("date"),e=new Date(s).getTime();return isNaN(e)?null:e}async deleteCacheAndMetadata(){for(const[t,s]of this.g)await caches.delete(t),await s.delete();this.g=new Map}},t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core);
this.workbox=this.workbox||{},this.workbox.expiration=function(t,s,e,i,a,n,h){"use strict";try{self["workbox:expiration:5.0.0-rc.1"]&&_()}catch(t){}const r="workbox-expiration",c="cache-entries",o=t=>{const s=new URL(t,location.href);return s.hash="",s.href};class u{constructor(t){this.t=t,this.s=new i.DBWrapper(r,1,{onupgradeneeded:t=>this.i(t)})}i(t){const s=t.target.result.createObjectStore(c,{keyPath:"id"});s.createIndex("cacheName","cacheName",{unique:!1}),s.createIndex("timestamp","timestamp",{unique:!1}),a.deleteDatabase(this.t)}async setTimestamp(t,s){const e={url:t=o(t),timestamp:s,cacheName:this.t,id:this.h(t)};await this.s.put(c,e)}async getTimestamp(t){return(await this.s.get(c,this.h(t))).timestamp}async expireEntries(t,s){const e=await this.s.transaction(c,"readwrite",(e,i)=>{const a=e.objectStore(c).index("timestamp").openCursor(null,"prev"),n=[];let h=0;a.onsuccess=(()=>{const e=a.result;if(e){const i=e.value;i.cacheName===this.t&&(t&&i.timestamp<t||s&&h>=s?n.push(e.value):h++),e.continue()}else i(n)})}),i=[];for(const t of e)await this.s.delete(c,t.id),i.push(t.url);return i}h(t){return this.t+"|"+o(t)}}class w{constructor(t,s={}){this.o=!1,this.u=!1,this.l=s.maxEntries,this.m=s.maxAgeSeconds,this.t=t,this.p=new u(t)}async expireEntries(){if(this.o)return void(this.u=!0);this.o=!0;const t=this.m?Date.now()-1e3*this.m:0,e=await this.p.expireEntries(t,this.l),i=await self.caches.open(this.t);for(const t of e)await i.delete(t);this.o=!1,this.u&&(this.u=!1,s.dontWaitFor(this.expireEntries()))}async updateTimestamp(t){await this.p.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.m){return await this.p.getTimestamp(t)<Date.now()-1e3*this.m}return!1}async delete(){this.u=!1,await this.p.expireEntries(1/0)}}return t.CacheExpiration=w,t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=(async({event:t,request:e,cacheName:i,cachedResponse:a})=>{if(!a)return null;let n=this.k(a);const h=this.D(i);s.dontWaitFor(h.expireEntries());const r=h.updateTimestamp(e.url);if(t)try{t.waitUntil(r)}catch(t){}return n?a:null}),this.cacheDidUpdate=(async({cacheName:t,request:s})=>{const e=this.D(t);await e.updateTimestamp(s.url),await e.expireEntries()}),this.N=t,this.m=t.maxAgeSeconds,this.g=new Map,t.purgeOnQuotaError&&h.registerQuotaErrorCallback(()=>this.deleteCacheAndMetadata())}D(t){if(t===n.cacheNames.getRuntimeName())throw new e.WorkboxError("expire-custom-caches-only");let s=this.g.get(t);return s||(s=new w(t,this.N),this.g.set(t,s)),s}k(t){if(!this.m)return!0;const s=this._(t);return null===s||s>=Date.now()-1e3*this.m}_(t){if(!t.headers.has("date"))return null;const s=t.headers.get("date"),e=new Date(s).getTime();return isNaN(e)?null:e}async deleteCacheAndMetadata(){for(const[t,s]of this.g)await self.caches.delete(t),await s.delete();this.g=new Map}},t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core);

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:navigation-preload:5.0.0-beta.0'] && _();
self['workbox:navigation-preload:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -10,0 +9,0 @@

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:5.0.0-beta.0"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",t=>{t.waitUntil(self.registration.navigationPreload.disable().then(()=>{}))})},t.enable=function(t){e()&&self.addEventListener("activate",e=>{e.waitUntil(self.registration.navigationPreload.enable().then(()=>{t&&self.registration.navigationPreload.setHeaderValue(t)}))})},t.isSupported=e,t}({});
this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:5.0.0-rc.1"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",t=>{t.waitUntil(self.registration.navigationPreload.disable().then(()=>{}))})},t.enable=function(t){e()&&self.addEventListener("activate",e=>{e.waitUntil(self.registration.navigationPreload.enable().then(()=>{t&&self.registration.navigationPreload.setHeaderValue(t)}))})},t.isSupported=e,t}({});

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:google-analytics:5.0.0-beta.0'] && _();
self['workbox:google-analytics:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -10,0 +9,0 @@

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.googleAnalytics=function(t,e,o,n,a,c,w,r,s){"use strict";try{self["workbox:google-analytics:5.0.0-beta.0"]&&_()}catch(t){}const i=/^\/(\w+\/)?collect/,l=t=>async({queue:e})=>{let o;for(;o=await e.shiftRequest();){const{request:n,timestamp:a}=o,c=new URL(n.url);try{const w="POST"===n.method?new URLSearchParams(await n.clone().text()):c.searchParams,r=a-(Number(w.get("qt"))||0),s=Date.now()-r;if(w.set("qt",String(s)),t.parameterOverrides)for(const e of Object.keys(t.parameterOverrides)){const o=t.parameterOverrides[e];w.set(e,o)}"function"==typeof t.hitFilter&&t.hitFilter.call(null,w),await fetch(new Request(c.origin+c.pathname,{body:w.toString(),method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"text/plain"}}))}catch(t){throw await e.unshiftRequest(o),t}}},g=t=>{const e=({url:t})=>"www.google-analytics.com"===t.hostname&&i.test(t.pathname),o=new s.NetworkOnly({plugins:[t]});return[new c.Route(e,o,"GET"),new c.Route(e,o,"POST")]},m=t=>{const e=new r.NetworkFirst({cacheName:t});return new c.Route(({url:t})=>"www.google-analytics.com"===t.hostname&&"/analytics.js"===t.pathname,e,"GET")},u=t=>{const e=new r.NetworkFirst({cacheName:t});return new c.Route(({url:t})=>"www.googletagmanager.com"===t.hostname&&"/gtag/js"===t.pathname,e,"GET")},h=t=>{const e=new r.NetworkFirst({cacheName:t});return new c.Route(({url:t})=>"www.googletagmanager.com"===t.hostname&&"/gtm.js"===t.pathname,e,"GET")};return t.initialize=((t={})=>{const n=o.cacheNames.getGoogleAnalyticsName(t.cacheName),a=new e.BackgroundSyncPlugin("workbox-google-analytics",{maxRetentionTime:2880,onSync:l(t)}),c=[h(n),m(n),u(n),...g(a)],r=new w.Router;for(const t of c)r.registerRoute(t);r.addFetchListener()}),t}({},workbox.backgroundSync,workbox.core._private,workbox.core._private,workbox.core._private,workbox.routing,workbox.routing,workbox.strategies,workbox.strategies);
this.workbox=this.workbox||{},this.workbox.googleAnalytics=function(t,e,o,n,a,c,w,r,s){"use strict";try{self["workbox:google-analytics:5.0.0-rc.1"]&&_()}catch(t){}const i=/^\/(\w+\/)?collect/,l=t=>async({queue:e})=>{let o;for(;o=await e.shiftRequest();){const{request:n,timestamp:a}=o,c=new URL(n.url);try{const w="POST"===n.method?new URLSearchParams(await n.clone().text()):c.searchParams,r=a-(Number(w.get("qt"))||0),s=Date.now()-r;if(w.set("qt",String(s)),t.parameterOverrides)for(const e of Object.keys(t.parameterOverrides)){const o=t.parameterOverrides[e];w.set(e,o)}"function"==typeof t.hitFilter&&t.hitFilter.call(null,w),await fetch(new Request(c.origin+c.pathname,{body:w.toString(),method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"text/plain"}}))}catch(t){throw await e.unshiftRequest(o),t}}},g=t=>{const e=({url:t})=>"www.google-analytics.com"===t.hostname&&i.test(t.pathname),o=new s.NetworkOnly({plugins:[t]});return[new c.Route(e,o,"GET"),new c.Route(e,o,"POST")]},m=t=>{const e=new r.NetworkFirst({cacheName:t});return new c.Route(({url:t})=>"www.google-analytics.com"===t.hostname&&"/analytics.js"===t.pathname,e,"GET")},u=t=>{const e=new r.NetworkFirst({cacheName:t});return new c.Route(({url:t})=>"www.googletagmanager.com"===t.hostname&&"/gtag/js"===t.pathname,e,"GET")},h=t=>{const e=new r.NetworkFirst({cacheName:t});return new c.Route(({url:t})=>"www.googletagmanager.com"===t.hostname&&"/gtm.js"===t.pathname,e,"GET")};return t.initialize=((t={})=>{const n=o.cacheNames.getGoogleAnalyticsName(t.cacheName),a=new e.BackgroundSyncPlugin("workbox-google-analytics",{maxRetentionTime:2880,onSync:l(t)}),c=[h(n),m(n),u(n),...g(a)],r=new w.Router;for(const t of c)r.registerRoute(t);r.addFetchListener()}),t}({},workbox.backgroundSync,workbox.core._private,workbox.core._private,workbox.core._private,workbox.routing,workbox.routing,workbox.strategies,workbox.strategies);

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:precaching:5.0.0-beta.0'] && _();
self['workbox:precaching:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -224,3 +223,3 @@

/*
Copyright 2018 Google LLC
Copyright 2019 Google LLC

@@ -247,2 +246,3 @@ Use of this source code is governed by an MIT-style

this._urlsToCacheKeys = new Map();
this._urlsToCacheModes = new Map();
this._cacheKeysToIntegrities = new Map();

@@ -270,3 +270,12 @@ }

const urlsToWarnAbout = [];
for (const entry of entries) {
// See https://github.com/GoogleChrome/workbox/issues/2259
if (typeof entry === 'string') {
urlsToWarnAbout.push(entry);
} else if (entry && entry.revision === undefined) {
urlsToWarnAbout.push(entry.url);
}
const {

@@ -276,2 +285,3 @@ cacheKey,

} = createCacheKey(entry);
const cacheMode = typeof entry !== 'string' && entry.revision ? 'reload' : 'default';

@@ -296,2 +306,12 @@ if (this._urlsToCacheKeys.has(url) && this._urlsToCacheKeys.get(url) !== cacheKey) {

this._urlsToCacheKeys.set(url, cacheKey);
this._urlsToCacheModes.set(url, cacheMode);
if (urlsToWarnAbout.length > 0) {
const warningMessage = `Workbox is precaching URLs without revision ` + `info: ${urlsToWarnAbout.join(', ')}\nThis is generally NOT safe. ` + `Learn more at https://bit.ly/wb-precache`;
{
logger_js.logger.warn(warningMessage);
}
}
}

@@ -328,3 +348,3 @@ }

const alreadyPrecached = [];
const cache = await caches.open(this._cacheName);
const cache = await self.caches.open(this._cacheName);
const alreadyCachedRequests = await cache.keys();

@@ -350,8 +370,11 @@ const existingCacheKeys = new Set(alreadyCachedRequests.map(request => request.url));

const cacheMode = this._urlsToCacheModes.get(url);
return this._addURLToCache({
cacheKey,
cacheMode,
event,
integrity,
plugins,
url,
integrity
url
});

@@ -380,3 +403,3 @@ });

async activate() {
const cache = await caches.open(this._cacheName);
const cache = await self.caches.open(this._cacheName);
const currentlyCachedRequests = await cache.keys();

@@ -414,2 +437,3 @@ const expectedCacheKeys = new Set(this._urlsToCacheKeys.values());

* @param {string} options.url The URL to fetch and cache.
* @param {string} [options.cacheMode] The cache mode for the network request.
* @param {Event} [options.event] The install event (if passed).

@@ -426,2 +450,3 @@ * @param {Array<Object>} [options.plugins] An array of plugins to apply to

url,
cacheMode,
event,

@@ -433,3 +458,3 @@ plugins,

integrity,
cache: 'reload',
cache: cacheMode,
credentials: 'same-origin'

@@ -456,3 +481,3 @@ });

// is correct.
cacheWillUpdatePlugin.cacheWillUpdate({
await cacheWillUpdatePlugin.cacheWillUpdate({
event,

@@ -531,35 +556,51 @@ request,

/**
* Returns a function that looks up `url` in the precache (taking into
* account revision information), and returns the corresponding `Response`.
* This acts as a drop-in replacement for [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)
* with the following differences:
*
* If for an unexpected reason there is a cache miss when looking up `url`,
* this will fall back to retrieving the `Response` via `fetch()`.
* - It knows what the name of the precache is, and only checks in that cache.
* - It allows you to pass in an "original" URL without versioning parameters,
* and it will automatically look up the correct cache key for the currently
* active revision of that URL.
*
* @param {string} url The precached URL which will be used to lookup the
* `Response`.
* @return {workbox.routing.Route~handlerCallback}
* E.g., `matchPrecache('index.html')` will find the correct precached
* response for the currently active service worker, even if the actual cache
* key is `'/index.html?__WB_REVISION__=1234abcd'`.
*
* @param {string|Request} request The key (without revisioning parameters)
* to look up in the precache.
* @return {Promise<Response|undefined>}
*/
createHandlerForURL(url) {
{
assert_js.assert.isType(url, 'string', {
moduleName: 'workbox-precaching',
funcName: 'createHandlerForURL',
paramName: 'url'
});
}
async matchPrecache(request) {
const url = request instanceof Request ? request.url : request;
const cacheKey = this.getCacheKeyForURL(url);
if (!cacheKey) {
throw new WorkboxError_js.WorkboxError('non-precached-url', {
url
});
if (cacheKey) {
const cache = await self.caches.open(this._cacheName);
return cache.match(cacheKey);
}
return async () => {
return undefined;
}
/**
* Returns a function that can be used within a {@link workbox.routing.Route}
* that will find a response for the incoming request against the precache.
*
* If for an unexpected reason there is a cache miss for the request,
* this will fall back to retrieving the `Response` via `fetch()` when
* `fallbackToNetwork` is `true`.
*
* @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the
* response from the network if there's a precache miss.
* @return {workbox.routing.Route~handlerCallback}
*/
createHandler(fallbackToNetwork = true) {
return async ({
request
}) => {
try {
const cache = await caches.open(this._cacheName);
const response = await cache.match(cacheKey);
const response = await this.matchPrecache(request);

@@ -572,18 +613,51 @@ if (response) {

throw new Error(`The cache ${this._cacheName} did not have an entry ` + `for ${cacheKey}.`);
throw new WorkboxError_js.WorkboxError('missing-precache-entry', {
cacheName: this._cacheName,
url: request.url
});
} catch (error) {
// If there's either a cache miss, or the caches.match() call threw
// an exception, then attempt to fulfill the navigation request with
// a response from the network rather than leaving the user with a
// failed navigation.
{
logger_js.logger.debug(`Unable to respond to navigation request with ` + `cached response. Falling back to network.`, error);
} // This might still fail if the browser is offline...
if (fallbackToNetwork) {
{
logger_js.logger.debug(`Unable to respond with precached response. ` + `Falling back to network.`, error);
}
return fetch(request);
}
return fetch(cacheKey);
throw error;
}
};
}
/**
* Returns a function that looks up `url` in the precache (taking into
* account revision information), and returns the corresponding `Response`.
*
* If for an unexpected reason there is a cache miss when looking up `url`,
* this will fall back to retrieving the `Response` via `fetch()` when
* `fallbackToNetwork` is `true`.
*
* @param {string} url The precached URL which will be used to lookup the
* `Response`.
* @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the
* response from the network if there's a precache miss.
* @return {workbox.routing.Route~handlerCallback}
*/
createHandlerBoundToURL(url, fallbackToNetwork = true) {
const cacheKey = this.getCacheKeyForURL(url);
if (!cacheKey) {
throw new WorkboxError_js.WorkboxError('non-precached-url', {
url
});
}
const handler = this.createHandler(fallbackToNetwork);
const request = new Request(url);
return () => handler({
request
});
}
}

@@ -770,4 +844,5 @@

} = {}) => {
const cacheName = cacheNames_js.cacheNames.getPrecacheName();
addEventListener('fetch', event => {
const cacheName = cacheNames_js.cacheNames.getPrecacheName(); // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705
self.addEventListener('fetch', event => {
const precachedURL = getCacheKeyForURL(event.request.url, {

@@ -788,3 +863,3 @@ cleanURLs,

let responsePromise = caches.open(cacheName).then(cache => {
let responsePromise = self.caches.open(cacheName).then(cache => {
return cache.match(precachedURL);

@@ -893,7 +968,7 @@ }).then(cachedResponse => {

const deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => {
const cacheNames = await caches.keys();
const cacheNames = await self.caches.keys();
const cacheNamesToDelete = cacheNames.filter(cacheName => {
return cacheName.includes(substringToFind) && cacheName.includes(self.registration.scope) && cacheName !== currentPrecacheName;
});
await Promise.all(cacheNamesToDelete.map(cacheName => caches.delete(cacheName)));
await Promise.all(cacheNamesToDelete.map(cacheName => self.caches.delete(cacheName)));
return cacheNamesToDelete;

@@ -917,3 +992,4 @@ };

const cleanupOutdatedCaches = () => {
addEventListener('activate', event => {
// See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705
self.addEventListener('activate', event => {
const cacheName = cacheNames_js.cacheNames.getPrecacheName();

@@ -939,19 +1015,49 @@ event.waitUntil(deleteOutdatedCaches(cacheName).then(cachesDeleted => {

* Helper function that calls
* {@link PrecacheController#createHandlerForURL} on the default
* {@link PrecacheController#createHandler} on the default
* {@link PrecacheController} instance.
*
* If you are creating your own {@link PrecacheController}, then call the
* {@link PrecacheController#createHandlerForURL} on that instance,
* {@link PrecacheController#createHandler} on that instance,
* instead of using this function.
*
* @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the
* response from the network if there's a precache miss.
* @return {workbox.routing.Route~handlerCallback}
*
* @alias workbox.precaching.createHandler
*/
const createHandler = (fallbackToNetwork = true) => {
const precacheController = getOrCreatePrecacheController();
return precacheController.createHandler(fallbackToNetwork);
};
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
/**
* Helper function that calls
* {@link PrecacheController#createHandlerBoundToURL} on the default
* {@link PrecacheController} instance.
*
* If you are creating your own {@link PrecacheController}, then call the
* {@link PrecacheController#createHandlerBoundToURL} on that instance,
* instead of using this function.
*
* @param {string} url The precached URL which will be used to lookup the
* `Response`.
* @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the
* response from the network if there's a precache miss.
* @return {workbox.routing.Route~handlerCallback}
*
* @alias workbox.precaching.createHandlerForURL
* @alias workbox.precaching.createHandlerBoundToURL
*/
const createHandlerForURL = url => {
const createHandlerBoundToURL = url => {
const precacheController = getOrCreatePrecacheController();
return precacheController.createHandlerForURL(url);
return precacheController.createHandlerBoundToURL(url);
};

@@ -998,3 +1104,31 @@

*/
/**
* Helper function that calls
* {@link PrecacheController#matchPrecache} on the default
* {@link PrecacheController} instance.
*
* If you are creating your own {@link PrecacheController}, then call
* {@link PrecacheController#matchPrecache} on that instance,
* instead of using this function.
*
* @param {string|Request} request The key (without revisioning parameters)
* to look up in the precache.
* @return {Promise<Response|undefined>}
*
* @alias workbox.precaching.matchPrecache
*/
const matchPrecache = request => {
const precacheController = getOrCreatePrecacheController();
return precacheController.matchPrecache(request);
};
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
const installListener = event => {

@@ -1049,4 +1183,5 @@ const precacheController = getOrCreatePrecacheController();

// as a set, where each listener must be unique.
addEventListener('install', installListener);
addEventListener('activate', activateListener);
// See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705
self.addEventListener('install', installListener);
self.addEventListener('activate', activateListener);
}

@@ -1098,4 +1233,6 @@ };

exports.cleanupOutdatedCaches = cleanupOutdatedCaches;
exports.createHandlerForURL = createHandlerForURL;
exports.createHandler = createHandler;
exports.createHandlerBoundToURL = createHandlerBoundToURL;
exports.getCacheKeyForURL = getCacheKeyForURL$1;
exports.matchPrecache = matchPrecache;
exports.precache = precache;

@@ -1102,0 +1239,0 @@ exports.precacheAndRoute = precacheAndRoute;

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.precaching=function(t,e,n,c,r,i){"use strict";try{self["workbox:precaching:5.0.0-beta.0"]&&_()}catch(t){}const s=[],o={get:()=>s,add(t){s.push(...t)}},a="__WB_REVISION__";function h(t){if(!t)throw new r.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new r.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const c=new URL(n,location.href),i=new URL(n,location.href);return c.searchParams.set(a,e),{cacheKey:c.href,url:i.href}}class l{constructor(t){this.t=e.cacheNames.getPrecacheName(t),this.i=new Map,this.s=new Map}addToCacheList(t){for(const e of t){const{cacheKey:t,url:n}=h(e);if(this.i.has(n)&&this.i.get(n)!==t)throw new r.WorkboxError("add-to-cache-list-conflicting-entries",{firstEntry:this.i.get(n),secondEntry:t});if("string"!=typeof e&&e.integrity){if(this.s.has(t)&&this.s.get(t)!==e.integrity)throw new r.WorkboxError("add-to-cache-list-conflicting-integrities",{url:n});this.s.set(t,e.integrity)}this.i.set(n,t)}}async install({event:t,plugins:e}={}){const n=[],c=[],r=await caches.open(this.t),i=await r.keys(),s=new Set(i.map(t=>t.url));for(const[t,e]of this.i)s.has(e)?c.push(t):n.push({cacheKey:e,url:t});const o=n.map(({cacheKey:n,url:c})=>{const r=this.s.get(n);return this.o({cacheKey:n,event:t,plugins:e,url:c,integrity:r})});return await Promise.all(o),{updatedURLs:n.map(t=>t.url),notUpdatedURLs:c}}async activate(){const t=await caches.open(this.t),e=await t.keys(),n=new Set(this.i.values()),c=[];for(const r of e)n.has(r.url)||(await t.delete(r),c.push(r.url));return{deletedURLs:c}}async o({cacheKey:t,url:e,event:s,plugins:o,integrity:a}){const h=new Request(e,{integrity:a,cache:"reload",credentials:"same-origin"});let l,u=await c.fetchWrapper.fetch({event:s,plugins:o,request:h});for(const t of o||[])"cacheWillUpdate"in t&&(l=t);if(!(l?l.cacheWillUpdate({event:s,request:h,response:u}):u.status<400))throw new r.WorkboxError("bad-precaching-response",{url:e,status:u.status});u.redirected&&(u=await i.copyResponse(u)),await n.cacheWrapper.put({event:s,plugins:o,response:u,request:t===e?h:new Request(t),cacheName:this.t,matchOptions:{ignoreSearch:!0}})}getURLsToCacheKeys(){return this.i}getCachedURLs(){return[...this.i.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.i.get(e.href)}createHandlerForURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new r.WorkboxError("non-precached-url",{url:t});return async()=>{try{const t=await caches.open(this.t),n=await t.match(e);if(n)return n;throw new Error(`The cache ${this.t} did not have an entry `+`for ${e}.`)}catch(t){return fetch(e)}}}}let u;const d=()=>(u||(u=new l),u);const w=(t,e)=>{const n=d().getURLsToCacheKeys();for(const c of function*(t,{ignoreURLParametersMatching:e,directoryIndex:n,cleanURLs:c,urlManipulation:r}={}){const i=new URL(t,location.href);i.hash="",yield i.href;const s=function(t,e=[]){for(const n of[...t.searchParams.keys()])e.some(t=>t.test(n))&&t.searchParams.delete(n);return t}(i,e);if(yield s.href,n&&s.pathname.endsWith("/")){const t=new URL(s.href);t.pathname+=n,yield t.href}if(c){const t=new URL(s.href);t.pathname+=".html",yield t.href}if(r){const t=r({url:i});for(const e of t)yield e.href}}(t,e)){const t=n.get(c);if(t)return t}};let f=!1;const y=t=>{f||((({ignoreURLParametersMatching:t=[/^utm_/],directoryIndex:n="index.html",cleanURLs:c=!0,urlManipulation:r}={})=>{const i=e.cacheNames.getPrecacheName();addEventListener("fetch",e=>{const s=w(e.request.url,{cleanURLs:c,directoryIndex:n,ignoreURLParametersMatching:t,urlManipulation:r});if(!s)return;let o=caches.open(i).then(t=>t.match(s)).then(t=>t||fetch(s));e.respondWith(o)})})(t),f=!0)},g=t=>{const e=d(),n=o.get();t.waitUntil(e.install({event:t,plugins:n}).catch(t=>{throw t}))},p=t=>{const e=d();t.waitUntil(e.activate())},L=t=>{d().addToCacheList(t),t.length>0&&(addEventListener("install",g),addEventListener("activate",p))};return t.PrecacheController=l,t.addPlugins=(t=>{o.add(t)}),t.addRoute=y,t.cleanupOutdatedCaches=(()=>{addEventListener("activate",t=>{const n=e.cacheNames.getPrecacheName();t.waitUntil((async(t,e="-precache-")=>{const n=(await caches.keys()).filter(n=>n.includes(e)&&n.includes(self.registration.scope)&&n!==t);return await Promise.all(n.map(t=>caches.delete(t))),n})(n).then(t=>{}))})}),t.createHandlerForURL=(t=>{return d().createHandlerForURL(t)}),t.getCacheKeyForURL=(t=>{return d().getCacheKeyForURL(t)}),t.precache=L,t.precacheAndRoute=((t,e)=>{L(t),y(e)}),t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core);
this.workbox=this.workbox||{},this.workbox.precaching=function(t,e,n,s,i,r){"use strict";try{self["workbox:precaching:5.0.0-rc.1"]&&_()}catch(t){}const c=[],o={get:()=>c,add(t){c.push(...t)}},a="__WB_REVISION__";function h(t){if(!t)throw new i.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new i.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const s=new URL(n,location.href),r=new URL(n,location.href);return s.searchParams.set(a,e),{cacheKey:s.href,url:r.href}}class l{constructor(t){this.t=e.cacheNames.getPrecacheName(t),this.s=new Map,this.i=new Map,this.o=new Map}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:s}=h(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.s.has(s)&&this.s.get(s)!==t)throw new i.WorkboxError("add-to-cache-list-conflicting-entries",{firstEntry:this.s.get(s),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.o.has(t)&&this.o.get(t)!==n.integrity)throw new i.WorkboxError("add-to-cache-list-conflicting-integrities",{url:s});this.o.set(t,n.integrity)}if(this.s.set(s,t),this.i.set(s,r),e.length>0){const t="Workbox is precaching URLs without revision "+`info: ${e.join(", ")}\nThis is generally NOT safe. `+"Learn more at https://bit.ly/wb-precache";console.warn(t)}}}async install({event:t,plugins:e}={}){const n=[],s=[],i=await self.caches.open(this.t),r=await i.keys(),c=new Set(r.map(t=>t.url));for(const[t,e]of this.s)c.has(e)?s.push(t):n.push({cacheKey:e,url:t});const o=n.map(({cacheKey:n,url:s})=>{const i=this.o.get(n),r=this.i.get(s);return this.h({cacheKey:n,cacheMode:r,event:t,integrity:i,plugins:e,url:s})});return await Promise.all(o),{updatedURLs:n.map(t=>t.url),notUpdatedURLs:s}}async activate(){const t=await self.caches.open(this.t),e=await t.keys(),n=new Set(this.s.values()),s=[];for(const i of e)n.has(i.url)||(await t.delete(i),s.push(i.url));return{deletedURLs:s}}async h({cacheKey:t,url:e,cacheMode:c,event:o,plugins:a,integrity:h}){const l=new Request(e,{integrity:h,cache:c,credentials:"same-origin"});let u,f=await s.fetchWrapper.fetch({event:o,plugins:a,request:l});for(const t of a||[])"cacheWillUpdate"in t&&(u=t);if(!(u?await u.cacheWillUpdate({event:o,request:l,response:f}):f.status<400))throw new i.WorkboxError("bad-precaching-response",{url:e,status:f.status});f.redirected&&(f=await r.copyResponse(f)),await n.cacheWrapper.put({event:o,plugins:a,response:f,request:t===e?l:new Request(t),cacheName:this.t,matchOptions:{ignoreSearch:!0}})}getURLsToCacheKeys(){return this.s}getCachedURLs(){return[...this.s.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.s.get(e.href)}async matchPrecache(t){const e=t instanceof Request?t.url:t,n=this.getCacheKeyForURL(e);if(n){return(await self.caches.open(this.t)).match(n)}}createHandler(t=!0){return async({request:e})=>{try{const n=await this.matchPrecache(e);if(n)return n;throw new i.WorkboxError("missing-precache-entry",{cacheName:this.t,url:e.url})}catch(n){if(t)return fetch(e);throw n}}}createHandlerBoundToURL(t,e=!0){if(!this.getCacheKeyForURL(t))throw new i.WorkboxError("non-precached-url",{url:t});const n=this.createHandler(e),s=new Request(t);return()=>n({request:s})}}let u;const f=()=>(u||(u=new l),u);const w=(t,e)=>{const n=f().getURLsToCacheKeys();for(const s of function*(t,{ignoreURLParametersMatching:e,directoryIndex:n,cleanURLs:s,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const c=function(t,e=[]){for(const n of[...t.searchParams.keys()])e.some(t=>t.test(n))&&t.searchParams.delete(n);return t}(r,e);if(yield c.href,n&&c.pathname.endsWith("/")){const t=new URL(c.href);t.pathname+=n,yield t.href}if(s){const t=new URL(c.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(t,e)){const t=n.get(s);if(t)return t}};let d=!1;const y=t=>{d||((({ignoreURLParametersMatching:t=[/^utm_/],directoryIndex:n="index.html",cleanURLs:s=!0,urlManipulation:i}={})=>{const r=e.cacheNames.getPrecacheName();self.addEventListener("fetch",e=>{const c=w(e.request.url,{cleanURLs:s,directoryIndex:n,ignoreURLParametersMatching:t,urlManipulation:i});if(!c)return;let o=self.caches.open(r).then(t=>t.match(c)).then(t=>t||fetch(c));e.respondWith(o)})})(t),d=!0)},p=t=>{const e=f(),n=o.get();t.waitUntil(e.install({event:t,plugins:n}).catch(t=>{throw t}))},g=t=>{const e=f();t.waitUntil(e.activate())},R=t=>{f().addToCacheList(t),t.length>0&&(self.addEventListener("install",p),self.addEventListener("activate",g))};return t.PrecacheController=l,t.addPlugins=(t=>{o.add(t)}),t.addRoute=y,t.cleanupOutdatedCaches=(()=>{self.addEventListener("activate",t=>{const n=e.cacheNames.getPrecacheName();t.waitUntil((async(t,e="-precache-")=>{const n=(await self.caches.keys()).filter(n=>n.includes(e)&&n.includes(self.registration.scope)&&n!==t);return await Promise.all(n.map(t=>self.caches.delete(t))),n})(n).then(t=>{}))})}),t.createHandler=((t=!0)=>{return f().createHandler(t)}),t.createHandlerBoundToURL=(t=>{return f().createHandlerBoundToURL(t)}),t.getCacheKeyForURL=(t=>{return f().getCacheKeyForURL(t)}),t.matchPrecache=(t=>{return f().matchPrecache(t)}),t.precache=R,t.precacheAndRoute=((t,e)=>{R(t),y(e)}),t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core);

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:range-requests:5.0.0-beta.0'] && _();
self['workbox:range-requests:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -51,10 +50,10 @@

if (start && end) {
if (start !== undefined && end !== undefined) {
effectiveStart = start; // Range values are inclusive, so add 1 to the value.
effectiveEnd = end + 1;
} else if (start && !end) {
} else if (start !== undefined && end === undefined) {
effectiveStart = start;
effectiveEnd = blobSize;
} else if (end && !start) {
} else if (end !== undefined && start === undefined) {
effectiveStart = blobSize - end;

@@ -61,0 +60,0 @@ effectiveEnd = blobSize;

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.rangeRequests=function(t,e,n){"use strict";try{self["workbox:range-requests:5.0.0-beta.0"]&&_()}catch(t){}async function r(t,n){try{if(206===n.status)return n;const r=t.headers.get("range");if(!r)throw new e.WorkboxError("no-range-header");const s=function(t){const n=t.trim().toLowerCase();if(!n.startsWith("bytes="))throw new e.WorkboxError("unit-must-be-bytes",{normalizedRangeHeader:n});if(n.includes(","))throw new e.WorkboxError("single-range-only",{normalizedRangeHeader:n});const r=/(\d*)-(\d*)/.exec(n);if(!r||!r[1]&&!r[2])throw new e.WorkboxError("invalid-range-values",{normalizedRangeHeader:n});return{start:""===r[1]?void 0:Number(r[1]),end:""===r[2]?void 0:Number(r[2])}}(r),a=await n.blob(),o=function(t,n,r){const s=t.size;if(r&&r>s||n&&n<0)throw new e.WorkboxError("range-not-satisfiable",{size:s,end:r,start:n});let a,o;return n&&r?(a=n,o=r+1):n&&!r?(a=n,o=s):r&&!n&&(a=s-r,o=s),{start:a,end:o}}(a,s.start,s.end),i=a.slice(o.start,o.end),u=i.size,c=new Response(i,{status:206,statusText:"Partial Content",headers:n.headers});return c.headers.set("Content-Length",String(u)),c.headers.set("Content-Range",`bytes ${o.start}-${o.end-1}/`+a.size),c}catch(t){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}return t.RangeRequestsPlugin=class{constructor(){this.cachedResponseWillBeUsed=(async({request:t,cachedResponse:e})=>e&&t.headers.has("range")?await r(t,e):e)}},t.createPartialResponse=r,t}({},workbox.core._private,workbox.core._private);
this.workbox=this.workbox||{},this.workbox.rangeRequests=function(t,e,n){"use strict";try{self["workbox:range-requests:5.0.0-rc.1"]&&_()}catch(t){}async function r(t,n){try{if(206===n.status)return n;const r=t.headers.get("range");if(!r)throw new e.WorkboxError("no-range-header");const s=function(t){const n=t.trim().toLowerCase();if(!n.startsWith("bytes="))throw new e.WorkboxError("unit-must-be-bytes",{normalizedRangeHeader:n});if(n.includes(","))throw new e.WorkboxError("single-range-only",{normalizedRangeHeader:n});const r=/(\d*)-(\d*)/.exec(n);if(!r||!r[1]&&!r[2])throw new e.WorkboxError("invalid-range-values",{normalizedRangeHeader:n});return{start:""===r[1]?void 0:Number(r[1]),end:""===r[2]?void 0:Number(r[2])}}(r),a=await n.blob(),o=function(t,n,r){const s=t.size;if(r&&r>s||n&&n<0)throw new e.WorkboxError("range-not-satisfiable",{size:s,end:r,start:n});let a,o;return void 0!==n&&void 0!==r?(a=n,o=r+1):void 0!==n&&void 0===r?(a=n,o=s):void 0!==r&&void 0===n&&(a=s-r,o=s),{start:a,end:o}}(a,s.start,s.end),i=a.slice(o.start,o.end),d=i.size,u=new Response(i,{status:206,statusText:"Partial Content",headers:n.headers});return u.headers.set("Content-Length",String(d)),u.headers.set("Content-Range",`bytes ${o.start}-${o.end-1}/`+a.size),u}catch(t){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}return t.RangeRequestsPlugin=class{constructor(){this.cachedResponseWillBeUsed=(async({request:t,cachedResponse:e})=>e&&t.headers.has("range")?await r(t,e):e)}},t.createPartialResponse=r,t}({},workbox.core._private,workbox.core._private);

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:routing:5.0.0-beta.0'] && _();
self['workbox:routing:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -377,2 +376,3 @@

addFetchListener() {
// See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705
self.addEventListener('fetch', event => {

@@ -417,3 +417,4 @@ const {

addCacheListener() {
self.addEventListener('message', async event => {
// See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705
self.addEventListener('message', event => {
if (event.data && event.data.type === 'CACHE_URLS') {

@@ -444,4 +445,3 @@ const {

if (event.ports && event.ports[0]) {
await requestPromises;
event.ports[0].postMessage(true);
requestPromises.then(() => event.ports[0].postMessage(true));
}

@@ -540,9 +540,4 @@ }

}
}); // The Request and Response objects contains a great deal of information,
// hide it under a group in case developers want to see it.
logger_js.logger.groupCollapsed(`View request details here.`);
logger_js.logger.log(request);
});
logger_js.logger.groupEnd();
logger_js.logger.groupEnd();
} // Wrap in try and catch in case the handle method throws a synchronous

@@ -565,3 +560,3 @@ // error. It should still callback to the catch handler.

if (responsePromise && this._catchHandler) {
if (responsePromise instanceof Promise && this._catchHandler) {
responsePromise = responsePromise.catch(err => {

@@ -568,0 +563,0 @@ {

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.routing=function(t,e){"use strict";try{self["workbox:routing:5.0.0-beta.0"]&&_()}catch(t){}const s="GET",r=t=>t&&"object"==typeof t?t:{handle:t};class n{constructor(t,e,n=s){this.handler=r(e),this.match=t,this.method=n}}class o extends n{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class i{constructor(){this.t=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",async t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(t=>{"string"==typeof t&&(t=[t]);const e=new Request(...t);return this.handleRequest({request:e})}));t.waitUntil(s),t.ports&&t.ports[0]&&(await s,t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;let r,{params:n,route:o}=this.findMatchingRoute({url:s,request:t,event:e}),i=o&&o.handler;if(!i&&this.s&&(i=this.s),i){try{r=i.handle({url:s,request:t,event:e,params:n})}catch(t){r=Promise.reject(t)}return r&&this.o&&(r=r.catch(r=>this.o.handle({url:s,request:t,event:e}))),r}}findMatchingRoute({url:t,request:e,event:s}){const r=this.t.get(e.method)||[];for(const n of r){let r,o=n.match({url:t,request:e,event:s});if(o)return r=o,Array.isArray(o)&&0===o.length?r=void 0:o.constructor===Object&&0===Object.keys(o).length?r=void 0:"boolean"==typeof o&&(r=void 0),{route:n,params:r}}return{}}setDefaultHandler(t){this.s=r(t)}setCatchHandler(t){this.o=r(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new e.WorkboxError("unregister-route-but-not-found-with-method",{method:t.method});const s=this.t.get(t.method).indexOf(t);if(!(s>-1))throw new e.WorkboxError("unregister-route-route-not-registered");this.t.get(t.method).splice(s,1)}}let u;const c=()=>(u||((u=new i).addFetchListener(),u.addCacheListener()),u);return t.NavigationRoute=class extends n{constructor(t,{whitelist:e=[/./],blacklist:s=[]}={}){super(t=>this.i(t),t),this.u=e,this.h=s}i({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.h)if(t.test(s))return!1;return!!this.u.some(t=>t.test(s))}},t.RegExpRoute=o,t.Route=n,t.Router=i,t.registerRoute=((t,s,r)=>{let i;if("string"==typeof t){const e=new URL(t,location.href);i=new n(({url:t})=>t.href===e.href,s,r)}else if(t instanceof RegExp)i=new o(t,s,r);else if("function"==typeof t)i=new n(t,s,r);else{if(!(t instanceof n))throw new e.WorkboxError("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});i=t}return c().registerRoute(i),i}),t.setCatchHandler=(t=>{c().setCatchHandler(t)}),t.setDefaultHandler=(t=>{c().setDefaultHandler(t)}),t}({},workbox.core._private);
this.workbox=this.workbox||{},this.workbox.routing=function(t,e){"use strict";try{self["workbox:routing:5.0.0-rc.1"]&&_()}catch(t){}const s="GET",r=t=>t&&"object"==typeof t?t:{handle:t};class n{constructor(t,e,n=s){this.handler=r(e),this.match=t,this.method=n}}class o extends n{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class i{constructor(){this.t=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(t=>{"string"==typeof t&&(t=[t]);const e=new Request(...t);return this.handleRequest({request:e})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;let r,{params:n,route:o}=this.findMatchingRoute({url:s,request:t,event:e}),i=o&&o.handler;if(!i&&this.s&&(i=this.s),i){try{r=i.handle({url:s,request:t,event:e,params:n})}catch(t){r=Promise.reject(t)}return r instanceof Promise&&this.o&&(r=r.catch(r=>this.o.handle({url:s,request:t,event:e}))),r}}findMatchingRoute({url:t,request:e,event:s}){const r=this.t.get(e.method)||[];for(const n of r){let r,o=n.match({url:t,request:e,event:s});if(o)return r=o,Array.isArray(o)&&0===o.length?r=void 0:o.constructor===Object&&0===Object.keys(o).length?r=void 0:"boolean"==typeof o&&(r=void 0),{route:n,params:r}}return{}}setDefaultHandler(t){this.s=r(t)}setCatchHandler(t){this.o=r(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new e.WorkboxError("unregister-route-but-not-found-with-method",{method:t.method});const s=this.t.get(t.method).indexOf(t);if(!(s>-1))throw new e.WorkboxError("unregister-route-route-not-registered");this.t.get(t.method).splice(s,1)}}let u;const c=()=>(u||((u=new i).addFetchListener(),u.addCacheListener()),u);return t.NavigationRoute=class extends n{constructor(t,{whitelist:e=[/./],blacklist:s=[]}={}){super(t=>this.i(t),t),this.u=e,this.h=s}i({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.h)if(t.test(s))return!1;return!!this.u.some(t=>t.test(s))}},t.RegExpRoute=o,t.Route=n,t.Router=i,t.registerRoute=((t,s,r)=>{let i;if("string"==typeof t){const e=new URL(t,location.href);i=new n(({url:t})=>t.href===e.href,s,r)}else if(t instanceof RegExp)i=new o(t,s,r);else if("function"==typeof t)i=new n(t,s,r);else{if(!(t instanceof n))throw new e.WorkboxError("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});i=t}return c().registerRoute(i),i}),t.setCatchHandler=(t=>{c().setCatchHandler(t)}),t.setDefaultHandler=(t=>{c().setDefaultHandler(t)}),t}({},workbox.core._private);

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:strategies:5.0.0-beta.0'] && _();
self['workbox:strategies:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -729,3 +728,3 @@

* well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}.
* Opaque responses are are cross-origin requests where the response doesn't
* Opaque responses are cross-origin requests where the response doesn't
* support [CORS]{@link https://enable-cors.org/}.

@@ -732,0 +731,0 @@ *

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.strategies=function(t,e,s,i,r){"use strict";try{self["workbox:strategies:5.0.0-beta.0"]&&_()}catch(t){}class n{constructor(t={}){this.t=e.cacheNames.getRuntimeName(t.cacheName),this.s=t.plugins||[],this.i=t.fetchOptions,this.h=t.matchOptions}async handle({event:t,request:e}){let i,n=await s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s});if(!n)try{n=await this.o(e,t)}catch(t){i=t}if(!n)throw new r.WorkboxError("no-response",{url:e.url,error:i});return n}async o(t,e){const r=await i.fetchWrapper.fetch({request:t,event:e,fetchOptions:this.i,plugins:this.s}),n=r.clone(),h=s.cacheWrapper.put({cacheName:this.t,request:t,response:n,event:e,plugins:this.s});if(e)try{e.waitUntil(h)}catch(t){}return r}}class h{constructor(t={}){this.t=e.cacheNames.getRuntimeName(t.cacheName),this.s=t.plugins||[],this.h=t.matchOptions}async handle({event:t,request:e}){const i=await s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s});if(!i)throw new r.WorkboxError("no-response",{url:e.url});return i}}const c={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null};class a{constructor(t={}){if(this.t=e.cacheNames.getRuntimeName(t.cacheName),t.plugins){let e=t.plugins.some(t=>!!t.cacheWillUpdate);this.s=e?t.plugins:[c,...t.plugins]}else this.s=[c];this.u=t.networkTimeoutSeconds||0,this.i=t.fetchOptions,this.h=t.matchOptions}async handle({event:t,request:e}){const s=[],i=[];let n;if(this.u){const{id:r,promise:h}=this.l({request:e,event:t,logs:s});n=r,i.push(h)}const h=this.p({timeoutId:n,request:e,event:t,logs:s});i.push(h);let c=await Promise.race(i);if(c||(c=await h),!c)throw new r.WorkboxError("no-response",{url:e.url});return c}l({request:t,logs:e,event:s}){let i;return{promise:new Promise(e=>{i=setTimeout(async()=>{e(await this.v({request:t,event:s}))},1e3*this.u)}),id:i}}async p({timeoutId:t,request:e,logs:r,event:n}){let h,c;try{c=await i.fetchWrapper.fetch({request:e,event:n,fetchOptions:this.i,plugins:this.s})}catch(t){h=t}if(t&&clearTimeout(t),h||!c)c=await this.v({request:e,event:n});else{const t=c.clone(),i=s.cacheWrapper.put({cacheName:this.t,request:e,response:t,event:n,plugins:this.s});if(n)try{n.waitUntil(i)}catch(t){}}return c}v({event:t,request:e}){return s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s})}}class o{constructor(t={}){this.s=t.plugins||[],this.i=t.fetchOptions}async handle({event:t,request:e}){let s,n;try{n=await i.fetchWrapper.fetch({request:e,event:t,fetchOptions:this.i,plugins:this.s})}catch(t){s=t}if(!n)throw new r.WorkboxError("no-response",{url:e.url,error:s});return n}}class u{constructor(t={}){if(this.t=e.cacheNames.getRuntimeName(t.cacheName),this.s=t.plugins||[],t.plugins){let e=t.plugins.some(t=>!!t.cacheWillUpdate);this.s=e?t.plugins:[c,...t.plugins]}else this.s=[c];this.i=t.fetchOptions,this.h=t.matchOptions}async handle({event:t,request:e}){const i=this.o({request:e,event:t});let n,h=await s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s});if(h){if(t)try{t.waitUntil(i)}catch(n){}}else try{h=await i}catch(t){n=t}if(!h)throw new r.WorkboxError("no-response",{url:e.url,error:n});return h}async o({request:t,event:e}){const r=await i.fetchWrapper.fetch({request:t,event:e,fetchOptions:this.i,plugins:this.s}),n=s.cacheWrapper.put({cacheName:this.t,request:t,response:r.clone(),event:e,plugins:this.s});if(e)try{e.waitUntil(n)}catch(t){}return r}}const l={cacheFirst:n,cacheOnly:h,networkFirst:a,networkOnly:o,staleWhileRevalidate:u},w=t=>{const e=l[t];return t=>new e(t)},p=w("cacheFirst"),v=w("cacheOnly"),m=w("networkFirst"),q=w("networkOnly"),y=w("staleWhileRevalidate");return t.CacheFirst=n,t.CacheOnly=h,t.NetworkFirst=a,t.NetworkOnly=o,t.StaleWhileRevalidate=u,t.cacheFirst=p,t.cacheOnly=v,t.networkFirst=m,t.networkOnly=q,t.staleWhileRevalidate=y,t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private);
this.workbox=this.workbox||{},this.workbox.strategies=function(t,e,s,i,r){"use strict";try{self["workbox:strategies:5.0.0-rc.1"]&&_()}catch(t){}class n{constructor(t={}){this.t=e.cacheNames.getRuntimeName(t.cacheName),this.s=t.plugins||[],this.i=t.fetchOptions,this.h=t.matchOptions}async handle({event:t,request:e}){let i,n=await s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s});if(!n)try{n=await this.o(e,t)}catch(t){i=t}if(!n)throw new r.WorkboxError("no-response",{url:e.url,error:i});return n}async o(t,e){const r=await i.fetchWrapper.fetch({request:t,event:e,fetchOptions:this.i,plugins:this.s}),n=r.clone(),h=s.cacheWrapper.put({cacheName:this.t,request:t,response:n,event:e,plugins:this.s});if(e)try{e.waitUntil(h)}catch(t){}return r}}class h{constructor(t={}){this.t=e.cacheNames.getRuntimeName(t.cacheName),this.s=t.plugins||[],this.h=t.matchOptions}async handle({event:t,request:e}){const i=await s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s});if(!i)throw new r.WorkboxError("no-response",{url:e.url});return i}}const c={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null};class a{constructor(t={}){if(this.t=e.cacheNames.getRuntimeName(t.cacheName),t.plugins){let e=t.plugins.some(t=>!!t.cacheWillUpdate);this.s=e?t.plugins:[c,...t.plugins]}else this.s=[c];this.u=t.networkTimeoutSeconds||0,this.i=t.fetchOptions,this.h=t.matchOptions}async handle({event:t,request:e}){const s=[],i=[];let n;if(this.u){const{id:r,promise:h}=this.l({request:e,event:t,logs:s});n=r,i.push(h)}const h=this.p({timeoutId:n,request:e,event:t,logs:s});i.push(h);let c=await Promise.race(i);if(c||(c=await h),!c)throw new r.WorkboxError("no-response",{url:e.url});return c}l({request:t,logs:e,event:s}){let i;return{promise:new Promise(e=>{i=setTimeout(async()=>{e(await this.v({request:t,event:s}))},1e3*this.u)}),id:i}}async p({timeoutId:t,request:e,logs:r,event:n}){let h,c;try{c=await i.fetchWrapper.fetch({request:e,event:n,fetchOptions:this.i,plugins:this.s})}catch(t){h=t}if(t&&clearTimeout(t),h||!c)c=await this.v({request:e,event:n});else{const t=c.clone(),i=s.cacheWrapper.put({cacheName:this.t,request:e,response:t,event:n,plugins:this.s});if(n)try{n.waitUntil(i)}catch(t){}}return c}v({event:t,request:e}){return s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s})}}class o{constructor(t={}){this.s=t.plugins||[],this.i=t.fetchOptions}async handle({event:t,request:e}){let s,n;try{n=await i.fetchWrapper.fetch({request:e,event:t,fetchOptions:this.i,plugins:this.s})}catch(t){s=t}if(!n)throw new r.WorkboxError("no-response",{url:e.url,error:s});return n}}class u{constructor(t={}){if(this.t=e.cacheNames.getRuntimeName(t.cacheName),this.s=t.plugins||[],t.plugins){let e=t.plugins.some(t=>!!t.cacheWillUpdate);this.s=e?t.plugins:[c,...t.plugins]}else this.s=[c];this.i=t.fetchOptions,this.h=t.matchOptions}async handle({event:t,request:e}){const i=this.o({request:e,event:t});let n,h=await s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s});if(h){if(t)try{t.waitUntil(i)}catch(n){}}else try{h=await i}catch(t){n=t}if(!h)throw new r.WorkboxError("no-response",{url:e.url,error:n});return h}async o({request:t,event:e}){const r=await i.fetchWrapper.fetch({request:t,event:e,fetchOptions:this.i,plugins:this.s}),n=s.cacheWrapper.put({cacheName:this.t,request:t,response:r.clone(),event:e,plugins:this.s});if(e)try{e.waitUntil(n)}catch(t){}return r}}const l={cacheFirst:n,cacheOnly:h,networkFirst:a,networkOnly:o,staleWhileRevalidate:u},w=t=>{const e=l[t];return t=>new e(t)},p=w("cacheFirst"),v=w("cacheOnly"),m=w("networkFirst"),q=w("networkOnly"),y=w("staleWhileRevalidate");return t.CacheFirst=n,t.CacheOnly=h,t.NetworkFirst=a,t.NetworkOnly=o,t.StaleWhileRevalidate=u,t.cacheFirst=p,t.cacheOnly=v,t.networkFirst=m,t.networkOnly=q,t.staleWhileRevalidate=y,t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private);

@@ -5,5 +5,4 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {
self['workbox:streams:5.0.0-beta.0'] && _();
self['workbox:streams:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -10,0 +9,0 @@

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.streams=function(e,n,t){"use strict";try{self["workbox:streams:5.0.0-beta.0"]&&_()}catch(e){}function s(e){const t=e.map(e=>Promise.resolve(e).then(e=>(function(e){return e instanceof Response?e.body.getReader():e instanceof ReadableStream?e.getReader():new Response(e).body.getReader()})(e))),s=new n.Deferred;let r=0;const o=new ReadableStream({pull(e){return t[r].then(e=>e.read()).then(n=>{if(n.done)return++r>=t.length?(e.close(),void s.resolve()):this.pull(e);e.enqueue(n.value)}).catch(e=>{throw s.reject(e),e})},cancel(){s.resolve()}});return{done:s.promise,stream:o}}function r(e={}){const n=new Headers(e);return n.has("content-type")||n.set("content-type","text/html"),n}function o(e,n){const{done:t,stream:o}=s(e),c=r(n);return{done:t,response:new Response(o,{headers:c})}}function c(){return t.canConstructReadableStream()}return e.concatenate=s,e.concatenateToResponse=o,e.isSupported=c,e.strategy=function(e,n){return async({event:t,request:s,url:a,params:u})=>{const i=e.map(e=>Promise.resolve(e({event:t,request:s,url:a,params:u})));if(c()){const{done:e,response:s}=o(i,n);return t&&t.waitUntil(e),s}const f=i.map(async e=>{const n=await e;return n instanceof Response?n.blob():new Response(n).blob()}),p=await Promise.all(f),w=r(n);return new Response(new Blob(p),{headers:w})}},e}({},workbox.core._private,workbox.core._private);
this.workbox=this.workbox||{},this.workbox.streams=function(e,n,t){"use strict";try{self["workbox:streams:5.0.0-rc.1"]&&_()}catch(e){}function s(e){const t=e.map(e=>Promise.resolve(e).then(e=>(function(e){return e instanceof Response?e.body.getReader():e instanceof ReadableStream?e.getReader():new Response(e).body.getReader()})(e))),s=new n.Deferred;let r=0;const o=new ReadableStream({pull(e){return t[r].then(e=>e.read()).then(n=>{if(n.done)return++r>=t.length?(e.close(),void s.resolve()):this.pull(e);e.enqueue(n.value)}).catch(e=>{throw s.reject(e),e})},cancel(){s.resolve()}});return{done:s.promise,stream:o}}function r(e={}){const n=new Headers(e);return n.has("content-type")||n.set("content-type","text/html"),n}function o(e,n){const{done:t,stream:o}=s(e),c=r(n);return{done:t,response:new Response(o,{headers:c})}}function c(){return t.canConstructReadableStream()}return e.concatenate=s,e.concatenateToResponse=o,e.isSupported=c,e.strategy=function(e,n){return async({event:t,request:s,url:a,params:u})=>{const i=e.map(e=>Promise.resolve(e({event:t,request:s,url:a,params:u})));if(c()){const{done:e,response:s}=o(i,n);return t&&t.waitUntil(e),s}const f=i.map(async e=>{const n=await e;return n instanceof Response?n.blob():new Response(n).blob()}),p=await Promise.all(f),w=r(n);return new Response(new Blob(p),{headers:w})}},e}({},workbox.core._private,workbox.core._private);

@@ -1,2 +0,2 @@

!function(){"use strict";try{self["workbox:sw:5.0.0-beta.0"]&&_()}catch(t){}const t="https://cdn.jsdelivr.net/npm/workbox-cdn@5.0.0-beta.0/workbox",e={backgroundSync:"background-sync",broadcastUpdate:"broadcast-update",cacheableResponse:"cacheable-response",core:"core",expiration:"expiration",googleAnalytics:"offline-ga",navigationPreload:"navigation-preload",precaching:"precaching",rangeRequests:"range-requests",routing:"routing",strategies:"strategies",streams:"streams"};self.workbox=new class{constructor(){return this.v={},this.t={debug:"localhost"===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.s=this.t.debug?"dev":"prod",this.o=!1,new Proxy(this,{get(t,s){if(t[s])return t[s];const o=e[s];return o&&t.loadModule(`workbox-${o}`),t[s]}})}setConfig(t={}){if(this.o)throw new Error("Config must be set before accessing workbox.* modules");Object.assign(this.t,t),this.s=this.t.debug?"dev":"prod"}loadModule(t){const e=this.i(t);try{importScripts(e),this.o=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}i(e){if(this.t.modulePathCb)return this.t.modulePathCb(e,this.t.debug);let s=[t];const o=`${e}.${this.s}.js`,r=this.t.modulePathPrefix;return r&&""===(s=r.split("/"))[s.length-1]&&s.splice(s.length-1,1),s.push(o),s.join("/")}}}();
!function(){"use strict";try{self["workbox:sw:5.0.0-rc.1"]&&_()}catch(t){}const t="https://cdn.jsdelivr.net/npm/workbox-cdn@5.0.0-rc.1/workbox",e={backgroundSync:"background-sync",broadcastUpdate:"broadcast-update",cacheableResponse:"cacheable-response",core:"core",expiration:"expiration",googleAnalytics:"offline-ga",navigationPreload:"navigation-preload",precaching:"precaching",rangeRequests:"range-requests",routing:"routing",strategies:"strategies",streams:"streams"};self.workbox=new class{constructor(){return this.v={},this.t={debug:"localhost"===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.s=this.t.debug?"dev":"prod",this.o=!1,new Proxy(this,{get(t,s){if(t[s])return t[s];const o=e[s];return o&&t.loadModule(`workbox-${o}`),t[s]}})}setConfig(t={}){if(this.o)throw new Error("Config must be set before accessing workbox.* modules");Object.assign(this.t,t),this.s=this.t.debug?"dev":"prod"}loadModule(t){const e=this.i(t);try{importScripts(e),this.o=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}i(e){if(this.t.modulePathCb)return this.t.modulePathCb(e,this.t.debug);let s=[t];const o=`${e}.${this.s}.js`,r=this.t.modulePathPrefix;return r&&""===(s=r.split("/"))[s.length-1]&&s.splice(s.length-1,1),s.push(o),s.join("/")}}}();

@@ -7,5 +7,4 @@ (function (global, factory) {

// @ts-ignore
try {
self['workbox:window:5.0.0-beta.0'] && _();
self['workbox:window:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -70,5 +69,4 @@

// @ts-ignore
try {
self['workbox:core:5.0.0-beta.0'] && _();
self['workbox:core:5.0.0-rc.1'] && _();
} catch (e) {}

@@ -111,3 +109,21 @@

*/
/**
* A helper function that prevents a promise from being flagged as unused.
*
* @private
**/
function dontWaitFor(promise) {
// Effective no-op.
promise.then(function () {});
}
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
var logger = function () {
self.__WB_DISABLE_DEV_LOGS = false;
var inGroup = false;

@@ -126,2 +142,6 @@ var methodToColorMap = {

if (self.__WB_DISABLE_DEV_LOGS) {
return;
}
if (method === 'groupCollapsed') {

@@ -394,2 +414,3 @@ // Safari doesn't print all console.groupCollapsed() arguments:

_this._registrationTime = 0;
_this._ownSWs = new Set();
/**

@@ -437,2 +458,4 @@ * @private

_this._ownSWs.add(installingSW);
_this._swDeferred.resolve(installingSW); // The `installing` state isn't something we have a dedicated

@@ -578,15 +601,27 @@ // callback for, but we do log messages for it in development.

_this._onMessage = _async(function (originalEvent) {
var data = originalEvent.data;
var _this2 = _this,
_dispatchEvent = _this2.dispatchEvent;
return _await(_this.getSW(), function (_this$getSW) {
_dispatchEvent.call(_this2, new WorkboxEvent('message', {
data: data,
sw: _this$getSW,
originalEvent: originalEvent
}));
});
var data = originalEvent.data,
source = originalEvent.source; // Wait until there's an "own" service worker. This is used to buffer
// `message` events that may be received prior to calling `register()`.
return _await(_this.getSW(), function () {
if (_this._ownSWs.has(source)) {
_this.dispatchEvent(new WorkboxEvent('message', {
data: data,
sw: source,
originalEvent: originalEvent
}));
}
}); // If the service worker that sent the message is in the list of own
// service workers for this instance, dispatch a `message` event.
// NOTE: we check for all previously owned service workers rather than
// just the current one because some messages (e.g. cache updates) use
// a timeout when sent and may be delayed long enough for a service worker
// update to be found.
});
_this._scriptURL = scriptURL;
_this._registerOptions = registerOptions;
_this._registerOptions = registerOptions; // Add a message listener immediately since messages received during
// page load are buffered only until the DOMContentLoaded event:
// https://github.com/GoogleChrome/workbox/issues/2202
navigator.serviceWorker.addEventListener('message', _this._onMessage);
return _this;

@@ -608,3 +643,3 @@ }

_proto.register = _async(function (_temp) {
var _this3 = this;
var _this2 = this;

@@ -616,3 +651,3 @@ var _ref = _temp === void 0 ? {} : _temp,

{
if (_this3._registrationTime) {
if (_this2._registrationTime) {
logger.error('Cannot re-register a Workbox instance after it has ' + 'been registered. Create a new instance instead.');

@@ -626,3 +661,3 @@ return;

return _awaitIgnored(new Promise(function (res) {
return addEventListener('load', res);
return window.addEventListener('load', res);
}));

@@ -633,20 +668,20 @@ }

// at registration time.
_this3._isUpdate = Boolean(navigator.serviceWorker.controller); // Before registering, attempt to determine if a SW is already controlling
_this2._isUpdate = Boolean(navigator.serviceWorker.controller); // Before registering, attempt to determine if a SW is already controlling
// the page, and if that SW script (and version, if specified) matches this
// instance's script.
_this3._compatibleControllingSW = _this3._getControllingSWIfCompatible();
return _await(_this3._registerScript(), function (_this3$_registerScrip) {
_this3._registration = _this3$_registerScrip;
_this2._compatibleControllingSW = _this2._getControllingSWIfCompatible();
return _await(_this2._registerScript(), function (_this2$_registerScrip) {
_this2._registration = _this2$_registerScrip;
// If we have a compatible controller, store the controller as the "own"
// SW, resolve active/controlling deferreds and add necessary listeners.
if (_this3._compatibleControllingSW) {
_this3._sw = _this3._compatibleControllingSW;
if (_this2._compatibleControllingSW) {
_this2._sw = _this2._compatibleControllingSW;
_this3._activeDeferred.resolve(_this3._compatibleControllingSW);
_this2._activeDeferred.resolve(_this2._compatibleControllingSW);
_this3._controllingDeferred.resolve(_this3._compatibleControllingSW);
_this2._controllingDeferred.resolve(_this2._compatibleControllingSW);
_this3._compatibleControllingSW.addEventListener('statechange', _this3._onStateChange, {
_this2._compatibleControllingSW.addEventListener('statechange', _this2._onStateChange, {
once: true

@@ -656,3 +691,3 @@ });

// `updatefound` event fires, it likely means that this site is open
// in another tab, or the user refreshed the page (and thus the prevoius
// in another tab, or the user refreshed the page (and thus the previous
// page wasn't fully unloaded before this page started loading).

@@ -662,12 +697,12 @@ // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting

var waitingSW = _this3._registration.waiting;
var waitingSW = _this2._registration.waiting;
if (waitingSW && urlsMatch(waitingSW.scriptURL, _this3._scriptURL)) {
if (waitingSW && urlsMatch(waitingSW.scriptURL, _this2._scriptURL)) {
// Store the waiting SW as the "own" Sw, even if it means overwriting
// a compatible controller.
_this3._sw = waitingSW; // Run this in the next microtask, so any code that adds an event
_this2._sw = waitingSW; // Run this in the next microtask, so any code that adds an event
// listener after awaiting `register()` will get this event.
Promise.resolve().then(function () {
_this3.dispatchEvent(new WorkboxEvent('waiting', {
dontWaitFor(Promise.resolve().then(function () {
_this2.dispatchEvent(new WorkboxEvent('waiting', {
sw: waitingSW,

@@ -680,15 +715,17 @@ wasWaitingBeforeRegister: true

}
});
}));
} // If an "own" SW is already set, resolve the deferred.
if (_this3._sw) {
_this3._swDeferred.resolve(_this3._sw);
if (_this2._sw) {
_this2._swDeferred.resolve(_this2._sw);
_this2._ownSWs.add(_this2._sw);
}
{
logger.log('Successfully registered service worker.', _this3._scriptURL);
logger.log('Successfully registered service worker.', _this2._scriptURL);
if (navigator.serviceWorker.controller) {
if (_this3._compatibleControllingSW) {
if (_this2._compatibleControllingSW) {
logger.debug('A service worker with the same script URL ' + 'is already controlling this page.');

@@ -701,3 +738,3 @@ } else {

var currentPageIsOutOfScope = function currentPageIsOutOfScope() {
var scopeURL = new URL(_this3._registerOptions.scope || _this3._scriptURL, document.baseURI);
var scopeURL = new URL(_this2._registerOptions.scope || _this2._scriptURL, document.baseURI);
var scopeURLBasePath = new URL('./', scopeURL.href).pathname;

@@ -712,10 +749,8 @@ return !location.pathname.startsWith(scopeURLBasePath);

_this3._registration.addEventListener('updatefound', _this3._onUpdateFound);
_this2._registration.addEventListener('updatefound', _this2._onUpdateFound);
navigator.serviceWorker.addEventListener('controllerchange', _this3._onControllerChange, {
navigator.serviceWorker.addEventListener('controllerchange', _this2._onControllerChange, {
once: true
}); // Add a message listener.
navigator.serviceWorker.addEventListener('message', _this3._onMessage);
return _this3._registration;
});
return _this2._registration;
});

@@ -729,5 +764,5 @@ });

_proto.update = _async(function () {
var _this4 = this;
var _this3 = this;
if (!_this4._registration) {
if (!_this3._registration) {
{

@@ -741,3 +776,3 @@ logger.error('Cannot update a Workbox instance without ' + 'being registered. Register the Workbox instance first.');

return _awaitIgnored(_this4._registration.update());
return _awaitIgnored(_this3._registration.update());
})

@@ -771,7 +806,7 @@ /**

_proto.getSW = _async(function () {
var _this5 = this;
var _this4 = this;
// If `this._sw` is set, resolve with that as we want `getSW()` to
// return the correct (new) service worker if an update is found.
return _this5._sw !== undefined ? _this5._sw : _this5._swDeferred.promise;
return _this4._sw !== undefined ? _this4._sw : _this4._swDeferred.promise;
})

@@ -793,5 +828,5 @@ /**

_proto.messageSW = _async(function (data) {
var _this6 = this;
var _this5 = this;
return _await(_this6.getSW(), function (sw) {
return _await(_this5.getSW(), function (sw) {
return messageSW(sw, data);

@@ -827,10 +862,10 @@ });

_proto._registerScript = _async(function () {
var _this7 = this;
var _this6 = this;
return _catch(function () {
return _await(navigator.serviceWorker.register(_this7._scriptURL, _this7._registerOptions), function (reg) {
return _await(navigator.serviceWorker.register(_this6._scriptURL, _this6._registerOptions), function (reg) {
// Keep track of when registration happened, so it can be used in the
// `this._onUpdateFound` heuristic. Also use the presence of this
// property as a way to see if `.register()` has been called.
_this7._registrationTime = performance.now();
_this6._registrationTime = performance.now();
return reg;

@@ -992,3 +1027,3 @@ });

* The `externalinstalled` event is dispatched if the state of an
* [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}
* [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}
* changes to `installed`.

@@ -1007,3 +1042,3 @@ *

* The `externalwaiting` event is dispatched if the state of an
* [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}
* [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}
* changes to `waiting`.

@@ -1022,3 +1057,3 @@ *

* The `externalactivated` event is dispatched if the state of an
* [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}
* [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}
* changes to `activated`.

@@ -1025,0 +1060,0 @@ *

@@ -1,2 +0,2 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).workbox={})}(this,function(n){"use strict";try{self["workbox:window:5.0.0-beta.0"]&&_()}catch(n){}function t(n,t){return new Promise(function(e){var r=new MessageChannel;r.port1.onmessage=function(n){e(n.data)},n.postMessage(t,[r.port2])})}function e(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}try{self["workbox:core:5.0.0-beta.0"]&&_()}catch(n){}var r=function(){var n=this;this.promise=new Promise(function(t,e){n.resolve=t,n.reject=e})};function i(n,t){var e=location.href;return new URL(n,e).href===new URL(t,e).href}var o=function(n,t){this.type=n,Object.assign(this,t)};function u(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}var a=200;function c(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(n){return Promise.reject(n)}}}var f=6e4;function s(){}var v=function(n){var s,v;function l(t,e){var s;return void 0===e&&(e={}),(s=n.call(this)||this).t={},s.i=0,s.o=new r,s.u=new r,s.s=new r,s.v=0,s.h=function(){var n=s.l,t=n.installing;s.i>0||!i(t.scriptURL,s.g)||performance.now()>s.v+f?(s.m=t,n.removeEventListener("updatefound",s.h)):(s.p=t,s.o.resolve(t)),++s.i,t.addEventListener("statechange",s.P)},s.P=function(n){var t=s.l,e=n.target,r=e.state,i=e===s.m,u=i?"external":"",c={sw:e,originalEvent:n};!i&&s.j&&(c.isUpdate=!0),s.dispatchEvent(new o(u+r,c)),"installed"===r?s.k=self.setTimeout(function(){"installed"===r&&t.waiting===e&&s.dispatchEvent(new o(u+"waiting",c))},a):"activating"===r&&(clearTimeout(s.k),i||s.u.resolve(e))},s.O=function(n){var t=s.p;t===navigator.serviceWorker.controller&&(s.dispatchEvent(new o("controlling",{sw:t,originalEvent:n,isUpdate:s.j})),s.s.resolve(t))},s._=c(function(n){var t=n.data,e=s,r=e.dispatchEvent;return u(s.getSW(),function(i){r.call(e,new o("message",{data:t,sw:i,originalEvent:n}))})}),s.g=t,s.t=e,s}v=n,(s=l).prototype=Object.create(v.prototype),s.prototype.constructor=s,s.__proto__=v;var d,g,w,m=l.prototype;return m.register=c(function(n){var t=this,e=(void 0===n?{}:n).immediate,r=void 0!==e&&e;return function(n,t){var e=n();if(e&&e.then)return e.then(t);return t(e)}(function(){if(!r&&"complete"!==document.readyState)return h(new Promise(function(n){return addEventListener("load",n)}))},function(){return t.j=Boolean(navigator.serviceWorker.controller),t.L=t.M(),u(t.R(),function(n){t.l=n,t.L&&(t.p=t.L,t.u.resolve(t.L),t.s.resolve(t.L),t.L.addEventListener("statechange",t.P,{once:!0}));var e=t.l.waiting;return e&&i(e.scriptURL,t.g)&&(t.p=e,Promise.resolve().then(function(){t.dispatchEvent(new o("waiting",{sw:e,wasWaitingBeforeRegister:!0}))})),t.p&&t.o.resolve(t.p),t.l.addEventListener("updatefound",t.h),navigator.serviceWorker.addEventListener("controllerchange",t.O,{once:!0}),navigator.serviceWorker.addEventListener("message",t._),t.l})})}),m.update=c(function(){if(this.l)return h(this.l.update())}),m.getSW=c(function(){return void 0!==this.p?this.p:this.o.promise}),m.messageSW=c(function(n){return u(this.getSW(),function(e){return t(e,n)})}),m.M=function(){var n=navigator.serviceWorker.controller;return n&&i(n.scriptURL,this.g)?n:void 0},m.R=c(function(){var n=this;return function(n,t){try{var e=n()}catch(n){return t(n)}if(e&&e.then)return e.then(void 0,t);return e}(function(){return u(navigator.serviceWorker.register(n.g,n.t),function(t){return n.v=performance.now(),t})},function(n){throw n})}),d=l,(g=[{key:"active",get:function(){return this.u.promise}},{key:"controlling",get:function(){return this.s.promise}}])&&e(d.prototype,g),w&&e(d,w),l}(function(){function n(){this.U=new Map}var t=n.prototype;return t.addEventListener=function(n,t){this.B(n).add(t)},t.removeEventListener=function(n,t){this.B(n).delete(t)},t.dispatchEvent=function(n){n.target=this;var t=this.B(n.type),e=Array.isArray(t),r=0;for(t=e?t:t[Symbol.iterator]();;){var i;if(e){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}i(n)}},t.B=function(n){return this.U.has(n)||this.U.set(n,new Set),this.U.get(n)},n}());function h(n,t){if(!t)return n&&n.then?n.then(s):Promise.resolve()}n.Workbox=v,n.messageSW=t,Object.defineProperty(n,"__esModule",{value:!0})});
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).workbox={})}(this,function(n){"use strict";try{self["workbox:window:5.0.0-rc.1"]&&_()}catch(n){}function t(n,t){return new Promise(function(e){var r=new MessageChannel;r.port1.onmessage=function(n){e(n.data)},n.postMessage(t,[r.port2])})}function e(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}try{self["workbox:core:5.0.0-rc.1"]&&_()}catch(n){}var r=function(){var n=this;this.promise=new Promise(function(t,e){n.resolve=t,n.reject=e})};function i(n,t){var e=location.href;return new URL(n,e).href===new URL(t,e).href}var o=function(n,t){this.type=n,Object.assign(this,t)};function u(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}var a=200;function c(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(n){return Promise.reject(n)}}}var f=6e4;function s(){}var v=function(n){var s,v;function l(t,e){var s;return void 0===e&&(e={}),(s=n.call(this)||this).t={},s.i=0,s.o=new r,s.u=new r,s.s=new r,s.v=0,s.h=new Set,s.l=function(){var n=s.g,t=n.installing;s.i>0||!i(t.scriptURL,s.m)||performance.now()>s.v+f?(s.p=t,n.removeEventListener("updatefound",s.l)):(s.P=t,s.h.add(t),s.o.resolve(t)),++s.i,t.addEventListener("statechange",s.j)},s.j=function(n){var t=s.g,e=n.target,r=e.state,i=e===s.p,u=i?"external":"",c={sw:e,originalEvent:n};!i&&s.k&&(c.isUpdate=!0),s.dispatchEvent(new o(u+r,c)),"installed"===r?s.O=self.setTimeout(function(){"installed"===r&&t.waiting===e&&s.dispatchEvent(new o(u+"waiting",c))},a):"activating"===r&&(clearTimeout(s.O),i||s.u.resolve(e))},s._=function(n){var t=s.P;t===navigator.serviceWorker.controller&&(s.dispatchEvent(new o("controlling",{sw:t,originalEvent:n,isUpdate:s.k})),s.s.resolve(t))},s.M=c(function(n){var t=n.data,e=n.source;return u(s.getSW(),function(){s.h.has(e)&&s.dispatchEvent(new o("message",{data:t,sw:e,originalEvent:n}))})}),s.m=t,s.t=e,navigator.serviceWorker.addEventListener("message",s.M),s}v=n,(s=l).prototype=Object.create(v.prototype),s.prototype.constructor=s,s.__proto__=v;var w,d,g,m=l.prototype;return m.register=c(function(n){var t=this,e=(void 0===n?{}:n).immediate,r=void 0!==e&&e;return function(n,t){var e=n();if(e&&e.then)return e.then(t);return t(e)}(function(){if(!r&&"complete"!==document.readyState)return h(new Promise(function(n){return window.addEventListener("load",n)}))},function(){return t.k=Boolean(navigator.serviceWorker.controller),t.R=t.S(),u(t.U(),function(n){t.g=n,t.R&&(t.P=t.R,t.u.resolve(t.R),t.s.resolve(t.R),t.R.addEventListener("statechange",t.j,{once:!0}));var e=t.g.waiting;return e&&i(e.scriptURL,t.m)&&(t.P=e,Promise.resolve().then(function(){t.dispatchEvent(new o("waiting",{sw:e,wasWaitingBeforeRegister:!0}))}).then(function(){})),t.P&&(t.o.resolve(t.P),t.h.add(t.P)),t.g.addEventListener("updatefound",t.l),navigator.serviceWorker.addEventListener("controllerchange",t._,{once:!0}),t.g})})}),m.update=c(function(){if(this.g)return h(this.g.update())}),m.getSW=c(function(){return void 0!==this.P?this.P:this.o.promise}),m.messageSW=c(function(n){return u(this.getSW(),function(e){return t(e,n)})}),m.S=function(){var n=navigator.serviceWorker.controller;return n&&i(n.scriptURL,this.m)?n:void 0},m.U=c(function(){var n=this;return function(n,t){try{var e=n()}catch(n){return t(n)}if(e&&e.then)return e.then(void 0,t);return e}(function(){return u(navigator.serviceWorker.register(n.m,n.t),function(t){return n.v=performance.now(),t})},function(n){throw n})}),w=l,(d=[{key:"active",get:function(){return this.u.promise}},{key:"controlling",get:function(){return this.s.promise}}])&&e(w.prototype,d),g&&e(w,g),l}(function(){function n(){this.B=new Map}var t=n.prototype;return t.addEventListener=function(n,t){this.L(n).add(t)},t.removeEventListener=function(n,t){this.L(n).delete(t)},t.dispatchEvent=function(n){n.target=this;var t=this.L(n.type),e=Array.isArray(t),r=0;for(t=e?t:t[Symbol.iterator]();;){var i;if(e){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}i(n)}},t.L=function(n){return this.B.has(n)||this.B.set(n,new Set),this.B.get(n)},n}());function h(n,t){if(!t)return n&&n.then?n.then(s):Promise.resolve()}n.Workbox=v,n.messageSW=t,Object.defineProperty(n,"__esModule",{value:!0})});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc