vendor: 5,736 bytes, lines 1-2
1/*! For license information please see worker.js.LICENSE.txt */ 2(()=>{var e={6715:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},6372:e=>{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var s=e[r]<<16|e[r+1]<<8|e[r+2],a=0;a<4;a++)8*r+6*a<=8*e.length?n.push(t.charAt(s>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,s=0;r<e.length;s=++r%4)0!=s&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<2*s|t.indexOf(e.charAt(r))>>>6-2*s);return n}},e.exports=n},6260:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},3544:(e,t,n)=>{var r,s,a,i,o;r=n(6372),s=n(6715).utf8,a=n(6260),i=n(6715).bin,(o=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?i.stringToBytes(e):s.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),c=8*e.length,u=1732584193,h=-271733879,l=-1732584194,d=271733878,f=0;f<n.length;f++)n[f]=16711935&(n[f]<<8|n[f]>>>24)|4278255360&(n[f]<<24|n[f]>>>8);n[c>>>5]|=128<<c%32,n[14+(c+64>>>9<<4)]=c;var p=o._ff,g=o._gg,m=o._hh,y=o._ii;for(f=0;f<n.length;f+=16){var w=u,v=h,_=l,b=d;u=p(u,h,l,d,n[f+0],7,-680876936),d=p(d,u,h,l,n[f+1],12,-389564586),l=p(l,d,u,h,n[f+2],17,606105819),h=p(h,l,d,u,n[f+3],22,-1044525330),u=p(u,h,l,d,n[f+4],7,-176418897),d=p(d,u,h,l,n[f+5],12,1200080426),l=p(l,d,u,h,n[f+6],17,-1473231341),h=p(h,l,d,u,n[f+7],22,-45705983),u=p(u,h,l,d,n[f+8],7,1770035416),d=p(d,u,h,l,n[f+9],12,-1958414417),l=p(l,d,u,h,n[f+10],17,-42063),h=p(h,l,d,u,n[f+11],22,-1990404162),u=p(u,h,l,d,n[f+12],7,1804603682),d=p(d,u,h,l,n[f+13],12,-40341101),l=p(l,d,u,h,n[f+14],17,-1502002290),u=g(u,h=p(h,l,d,u,n[f+15],22,1236535329),l,d,n[f+1],5,-165796510),d=g(d,u,h,l,n[f+6],9,-1069501632),l=g(l,d,u,h,n[f+11],14,643717713),h=g(h,l,d,u,n[f+0],20,-373897302),u=g(u,h,l,d,n[f+5],5,-701558691),d=g(d,u,h,l,n[f+10],9,38016083),l=g(l,d,u,h,n[f+15],14,-660478335),h=g(h,l,d,u,n[f+4],20,-405537848),u=g(u,h,l,d,n[f+9],5,568446438),d=g(d,u,h,l,n[f+14],9,-1019803690),l=g(l,d,u,h,n[f+3],14,-187363961),h=g(h,l,d,u,n[f+8],20,1163531501),u=g(u,h,l,d,n[f+13],5,-1444681467),d=g(d,u,h,l,n[f+2],9,-51403784),l=g(l,d,u,h,n[f+7],14,1735328473),u=m(u,h=g(h,l,d,u,n[f+12],20,-1926607734),l,d,n[f+5],4,-378558),d=m(d,u,h,l,n[f+8],11,-2022574463),l=m(l,d,u,h,n[f+11],16,1839030562),h=m(h,l,d,u,n[f+14],23,-35309556),u=m(u,h,l,d,n[f+1],4,-1530992060),d=m(d,u,h,l,n[f+4],11,1272893353),l=m(l,d,u,h,n[f+7],16,-155497632),h=m(h,l,d,u,n[f+10],23,-1094730640),u=m(u,h,l,d,n[f+13],4,681279174),d=m(d,u,h,l,n[f+0],11,-358537222),l=m(l,d,u,h,n[f+3],16,-722521979),h=m(h,l,d,u,n[f+6],23,76029189),u=m(u,h,l,d,n[f+9],4,-640364487),d=m(d,u,h,l,n[f+12],11,-421815835),l=m(l,d,u,h,n[f+15],16,530742520),u=y(u,h=m(h,l,d,u,n[f+2],23,-995338651),l,d,n[f+0],6,-198630844),d=y(d,u,h,l,n[f+7],10,1126891415),l=y(l,d,u,h,n[f+14],15,-1416354905),h=y(h,l,d,u,n[f+5],21,-57434055),u=y(u,h,l,d,n[f+12],6,1700485571),d=y(d,u,h,l,n[f+3],10,-1894986606),l=y(l,d,u,h,n[f+10],15,-1051523),h=y(h,l,d,u,n[f+1],21,-2054922799),u=y(u,h,l,d,n[f+8],6,1873313359),d=y(d,u,h,l,n[f+15],10,-30611744),l=y(l,d,u,h,n[f+6],15,-1560198380),h=y(h,l,d,u,n[f+13],21,1309151649),u=y(u,h,l,d,n[f+4],6,-145523070),d=y(d,u,h,l,n[f+11],10,-1120210379),l=y(l,d,u,h,n[f+2],15,718787259),h=y(h,l,d,u,n[f+9],21,-343485551),u=u+w>>>0,h=h+v>>>0,l=l+_>>>0,d=d+b>>>0}return r.endian([u,h,l,d])})._ff=function(e,t,n,r,s,a,i){var o=e+(t&n|~t&r)+(s>>>0)+i;return(o<<a|o>>>32-a)+t},o._gg=function(e,t,n,r,s,a,i){var o=e+(t&r|n&~r)+(s>>>0)+i;return(o<<a|o>>>32-a)+t},o._hh=function(e,t,n,r,s,a,i){var o=e+(t^n^r)+(s>>>0)+i;return(o<<a|o>>>32-a)+t},o._ii=function(e,t,n,r,s,a,i){var o=e+(n^(t|~r))+(s>>>0)+i;return(o<<a|o>>>32-a)+t},o._blocksize=16,o._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(o(e,t));return t&&t.asBytes?n:t&&t.asString?i.bytesToString(n):r.bytesToHex(n)}},8340:()=>{"use strict";try{self["workbox:core:6.5.4"]&&_()}catch(e){}},6480:()=>{"use strict";try{self["workbox:expiration:6.5.4"]&&_()}catch(e){}},4132:()=>{"use strict";try{self["workbox:routing:6.5.4"]&&_()}catch(e){}},7156:()=>{"use strict";try{self["workbox:strategies:6.5.4"]&&_()}catch(e){}}},t={};function n(r){var s=t[r];
2if(void 0!==s)return s.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,s,a,i){try{var o=e[a](i),c=o.value}catch(e){return void n(e)}o.done?t(c):Promise.resolve(c).then(r,s)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(s,a){var i=t.apply(n,r);function o(t){e(i,s,a,o,c,"next",t)}function c(t){e(i,s,a,o,c,"throw",t)}o(void 0)}))}}n(8340);class r extends Error{constructor(e,t){super(((e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n})(e,t)),this.name=e,this.details=t}}n(4132);const s=e=>e&&"object"==typeof e?e:{handle:e};class a{constructor(e,t,n="GET"){this.handler=s(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=s(e)}}class i extends a{constructor(e,t,n){super((({url:t})=>{const n=e.exec(t.href);if(n&&(t.origin===location.origin||0===n.index))return n.slice(1)}),t,n)}}class o{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map((t=>{"string"==typeof t&&(t=[t]);const n=new Request(...t);return this.handleRequest({request:n,event:e})})));e.waitUntil(n),e.ports&&e.ports[0]&&n.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const r=n.origin===location.origin,{params:s,route:a}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n});let i=a&&a.handler;const o=e.method;if(!i&&this._defaultHandlerMap.has(o)&&(i=this._defaultHandlerMap.get(o)),!i)return;let c;try{c=i.handle({url:n,request:e,event:t,params:s})}catch(e){c=Promise.reject(e)}const u=a&&a.catchHandler;return c instanceof Promise&&(this._catchHandler||u)&&(c=c.catch((async r=>{if(u)try{return await u.handle({url:n,request:e,event:t,params:s})}catch(e){e instanceof Error&&(r=e)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw r}))),c}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){const s=this._routes.get(n.method)||[];for(const a of s){let s;const i=a.match({url:e,sameOrigin:t,request:n,event:r});if(i)return s=i,(Array.isArray(s)&&0===s.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"==typeof i)&&(s=void 0),{route:a,params:s}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,s(e))}setCatchHandler(e){this._catchHandler=s(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new r("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new r("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let c;function u(e,t,n){let s;if("string"==typeof e){const r=new URL(e,location.href);s=new a((({url:e})=>e.href===r.href),t,n)}else if(e instanceof RegExp)s=new i(e,t,n);else if("function"==typeof e)s=new a(e,t,n);else{if(!(e instanceof a))throw new r("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});s=e}return(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c).registerRoute(s),s}const h={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=e=>{return e||(t=h.runtime,[h.prefix,t,h.suffix].filter((e=>e&&e.length>0)).join("-"));var t};function d(e,t){const n=new URL(e);for(const e of t)n.searchParams.delete(e);return n.href}class f{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const p=new Set;
vendor: 4,919 bytes, line 2
2function g(e){return"string"==typeof e?new Request(e):e}n(7156);class m{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new f,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=g(e);if("navigate"===n.mode&&t instanceof FetchEvent&&t.preloadResponse){const e=await t.preloadResponse;if(e)return e}const s=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:t})}catch(e){if(e instanceof Error)throw new r("plugin-error-request-will-fetch",{thrownErrorMessage:e.message})}const a=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const n of this.iterateCallbacks("fetchDidSucceed"))e=await n({event:t,request:a,response:e});return e}catch(e){throw s&&await this.runCallbacks("fetchDidFail",{error:e,event:t,originalRequest:s.clone(),request:a.clone()}),e}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=g(e);let n;const{cacheName:r,matchOptions:s}=this._strategy,a=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},s),{cacheName:r});n=await caches.match(a,i);for(const e of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await e({cacheName:r,matchOptions:s,cachedResponse:n,request:a,event:this.event})||void 0;return n}async cachePut(e,t){const n=g(e);var s;await(s=0,new Promise((e=>setTimeout(e,s))));const a=await this.getCacheKey(n,"write");if(!t)throw new r("cache-put-with-no-response",{url:(i=a.url,new URL(String(i),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var i;const o=await this._ensureResponseSafeToCache(t);if(!o)return!1;const{cacheName:c,matchOptions:u}=this._strategy,h=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(e,t,n,r){const s=d(t.url,n);if(t.url===s)return e.match(t,r);const a=Object.assign(Object.assign({},r),{ignoreSearch:!0}),i=await e.keys(t,a);for(const t of i)if(s===d(t.url,n))return e.match(t,r)}(h,a.clone(),["__WB_REVISION__"],u):null;try{await h.put(a,l?o.clone():o)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&await async function(){for(const e of p)await e()}(),e}for(const e of this.iterateCallbacks("cacheDidUpdate"))await e({cacheName:c,oldResponse:f,newResponse:o.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))r=g(await e({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"==typeof t[e]){const n=this._pluginStateMap.get(t),r=r=>{const s=Object.assign(Object.assign({},r),{state:n});return t[e](s)};yield r}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const e of this.iterateCallbacks("cacheWillUpdate"))if(t=await e({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&200!==t.status&&(t=void 0),t}}class y{constructor(e={}){this.cacheName=l(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,n="string"==typeof e.request?new Request(e.request):e.request,r="params"in e?e.params:void 0,s=new m(this,{event:t,request:n,params:r}),a=this._getResponse(s,n,t);return[a,this._awaitComplete(a,s,n,t)]}async _getResponse(e,t,n){let s;await e.runCallbacks("handlerWillStart",{event:n,request:t});try{if(s=await this._handle(t,e),!s||"error"===s.type)throw new r("no-response",{url:t.url})}catch(r){if(r instanceof Error)for(const a of e.iterateCallbacks("handlerDidError"))if(s=await a({error:r,event:n,request:t}),s)break;if(!s)throw r}for(const r of e.iterateCallbacks("handlerWillRespond"))s=await r({event:n,request:t,response:s});return s}async _awaitComplete(e,t,n,r){let s,a;try{s=await e}catch(a){}try{await t.runCallbacks("handlerDidRespond",{event:r,request:n,response:s}),await t.doneWaiting()}catch(e){e instanceof Error&&(a=e)}if(await t.runCallbacks("handlerDidComplete",{event:r,request:n,response:s,error:a}),t.destroy(),a)throw a}}
2class w extends y{async _handle(e,t){let n,s=await t.cacheMatch(e);if(s);else try{s=await t.fetchAndCachePut(e)}catch(e){e instanceof Error&&(n=e)}if(!s)throw new r("no-response",{url:e.url,error:n});return s}}const v={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};class _ extends y{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(v)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch((()=>{}));t.waitUntil(n);let s,a=await t.cacheMatch(e);if(a);else try{a=await n}catch(e){e instanceof Error&&(s=e)}if(!a)throw new r("no-response",{url:e.url,error:s});return a}}function b(e){e.then((()=>{}))}const E=(e,t)=>t.some((t=>e instanceof t));let x,C;const S=new WeakMap,D=new WeakMap,O=new WeakMap,R=new WeakMap,A=new WeakMap;let q={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return D.get(e);if("objectStoreNames"===t)return e.objectStoreNames||O.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return j(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function k(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(C||(C=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(N(this),e),j(S.get(this))}:function(...e){return j(t.apply(N(this),e))}:function(e,...n){const r=t.call(N(this),e,...n);return O.set(r,e.sort?e.sort():[e]),j(r)}:(e instanceof IDBTransaction&&function(e){if(D.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)}));D.set(e,t)}(e),E(e,x||(x=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,q):e);var t}function j(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{t(j(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&S.set(t,e)})).catch((()=>{})),A.set(t,e),t}(e);if(R.has(e))return R.get(e);const t=k(e);return t!==e&&(R.set(e,t),A.set(t,e)),t}const N=e=>A.get(e),T=["get","getKey","getAll","getAllKeys","count"],B=["put","add","delete","clear"],L=new Map;function P(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(L.get(t))return L.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,s=B.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!s&&!T.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,s?"readwrite":"readonly");let i=a.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),s&&a.done]))[0]};return L.set(t,a),a}var M;M=q,q={...M,get:(e,t,n)=>P(e,t)||M.get(e,t,n),has:(e,t)=>!!P(e,t)||M.has(e,t)},n(6480);const I="cache-entries",H=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class K{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(I,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),j(n).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const n={url:e=H(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(I,"readwrite",{durability:"relaxed"});await r.store.put(n),await r.done}async getTimestamp(e){const t=await this.getDb(),n=await t.get(I,this._getId(e));return null==n?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let r=await n.transaction(I).store.index("timestamp").openCursor(null,"prev");const s=[];let a=0;for(;r;){const n=r.value;n.cacheName===this._cacheName&&(e&&n.timestamp<e||t&&a>=t?s.push(r.value):a++),r=await r.continue()}const i=[];for(const e of s)await n.delete(I,e.id),i.push(e.url);return i}_getId(e){return this._cacheName+"|"+H(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:n,upgrade:r,blocking:s,terminated:a}={}){const i=indexedDB.open(e,t),o=j(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(j(i.result),e.oldVersion,e.newVersion,j(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),o.then((e=>{a&&e.addEventListener("close",(()=>a())),s&&e.addEventListener("versionchange",(e=>s(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),o}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class U{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new K(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const e of t)await n.delete(e,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,b(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t<n}return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}class W{constructor(e={}){var t;this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:n,cachedResponse:r})=>{if(!r)return null;const s=this._isResponseDateFresh(r),a=this._getCacheExpiration(n);b(a.expireEntries());const i=a.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(e){}return s?r:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const n=this._getCacheExpiration(e);await n.updateTimestamp(t.url),await n.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&(t=()=>
2this.deleteCacheAndMetadata(),p.add(t))}_getCacheExpiration(e){if(e===l())throw new r("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new U(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);return null===t||t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),n=new Date(t).getTime();return isNaN(n)?null:n}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function F(e){var t=function(e,t){if("object"!=Y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Y(t)?t:String(t)}var V=n(3544),G=n.n(V);function z(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function Q(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=z(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let $;function J(){return $||($=Q("keyval-store","keyval")),$}function Z(e,t=J()){return t("readonly",(t=>z(t.get(e))))}function X(e,t,n=J()){return n("readwrite",(n=>(n.put(t,e),z(n.transaction))))}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const te=class{constructor(e){this.store=Q(e.dbName,e.storeName);const t=e.requestCacheOptions||{};this.requestCacheOptions=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){var r,s,a;r=e,s=t,a=n[t],(s=F(s))in r?Object.defineProperty(r,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[s]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({maxAgeSeconds:3600,maxEntries:100},t)}getStore(){return this.store}getRequestCacheOptions(){return this.requestCacheOptions}getCacheKey(e){return G()(JSON.stringify(e)).toString()}serializeResponse(e){return t((function*(){let t={};for(let n of e.headers.entries())t[n[0]]=n[1];const n={headers:t,status:e.status,statusText:e.statusText};return n.body=yield e.json(),n}))()}cacheRequest(e,n){var r=this;return t((function*(){try{const t=yield e.json(),s=r.getCacheKey(t),a={body:t,response:yield r.serializeResponse(n),timestamp:Date.now()},i=yield function(e=J()){return e("readonly",(e=>{if(e.getAllKeys)return z(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},z(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}(r.getStore());i.length<r.getRequestCacheOptions().maxEntries||(yield Z(s,r.getStore()))||function(e,t=J()){t("readwrite",(t=>(t.delete(e),z(t.transaction))))}(i[0],r.getStore()),X(s,a,r.getStore())}catch(e){return null}}))()}getCachedResponse(e){var n=this;return t((function*(){try{const t=yield e.json(),r=n.getCacheKey(t),s=yield Z(r,n.getStore());if(!s)return null;const a=e.headers.get("Cache-Control"),i=a?parseInt(a.split("=")[1]):n.getRequestCacheOptions().maxAgeSeconds;return Date.now()-s.timestamp>1e3*i?null:new Response(JSON.stringify(s.response.body),s.response)}catch(e){return null}}))()}handle(e){return t((function*(){return fetch(e.request.clone()).then((e=>e))}))()}},ne=class extends te{handle(e){var n=this;return t((function*(){const t=yield n.getCachedResponse(e.request.clone()),r=fetch(e.request.clone()).then((t=>
2(n.cacheRequest(e.request.clone(),t.clone()),t))).catch((e=>{console.error(e)}));return t?(Promise.resolve(r),Promise.resolve(t)):r}))()}},re=class{CACHE_KEYS={};init(){}clearCaches(){Object.keys(this.CACHE_KEYS).forEach((e=>{const t=this.CACHE_KEYS[e];caches.delete(t)}))}},se=new class extends re{CACHE_KEYS={contentfulGraphQL:"contentful",contentfulREST:"contentful-rest"};init(){var e=this;super.init(),u(/contentful\/content/,function(){var n=t((function*({event:t}){return new ne({dbName:e.CACHE_KEYS.contentfulGraphQL,storeName:"content"}).handle(t)}));return function(e){return n.apply(this,arguments)}}(),"POST"),u(/app-api\/contentful/,new _({cacheName:this.CACHE_KEYS.contentfulREST,plugins:[new W({maxEntries:100,maxAgeSeconds:3600})]}))}},ae=new class extends re{CACHE_KEYS={routing:"sf-custom-routing",generic:"sf-custom-generic"};init(){super.init(),u(/routeInfo=true/,new w({cacheName:this.CACHE_KEYS.routing,plugins:[new W({maxEntries:100,maxAgeSeconds:3600})]})),u((({url:e})=>!![/Configurations-Get/,/Contries-Get/,/Content-GetCMSBackupData/].find((t=>e.pathname.match(t)))),new w({cacheName:this.CACHE_KEYS.generic,plugins:[new W({maxEntries:100,maxAgeSeconds:3600})]}))}},ie=new class extends re{CACHE_KEYS={categories:"sf-commerce-categories",search:"sf-commerce-product-search",products:"sf-commerce-products"};init(){super.init(),u(/shopper-products\/.*\/categories\//,new w({cacheName:this.CACHE_KEYS.categories,plugins:[new W({maxEntries:100,maxAgeSeconds:3600})]})),u(/shopper-search\/.*\/product-search/,new w({cacheName:this.CACHE_KEYS.search,plugins:[new W({maxEntries:100,maxAgeSeconds:3600})]})),u(/shopper-products\/.*\/products\?/,new _({cacheName:this.CACHE_KEYS.products,plugins:[new W({maxEntries:100,maxAgeSeconds:3600})]}))}};self.__WB_DISABLE_DEV_LOGS=!0,se.init(),ae.init(),ie.init(),self.addEventListener("message",function(){var e=t((function*(e){e.data&&"cleanContext"===e.data&&ie.clearCaches()}));return function(t){return e.apply(this,arguments)}}()),self.addEventListener("install",(function(){self.skipWaiting()})),self.addEventListener("activate",(e=>{e.waitUntil(clients.claim())}))})()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.