1var R=[{revision:"43a007d3",url:"/dashboard"},{revision:"icon-v1",url:"/favicon.ico"},{revision:"icon-v1",url:"/icon/favicon-16x16.png"},{revision:"icon-v1",url:"/icon/favicon-32x32.png"},{revision:"icon-v1",url:"/icon/favicon-48x48.png"},{revision:"icon-v1",url:"/icon/apple-touch-icon.png"},{revision:"icon-v1",url:"/icon/android-chrome-192x192.png"},{revision:"icon-v1",url:"/icon/android-chrome-512x512.png"},{revision:"icon-v1",url:"/icon/maskable/maskable_icon_x512.png"},{revision:"43a007d3",url:"/manifest.webmanifest"}];var w={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"serwist",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},J=s=>[w.prefix,s,w.suffix].filter(e=>e&&e.length>0).join("-"),Qe=s=>{for(let e of Object.keys(w))s(e)},y={updateDetails:s=>{Qe(e=>{let t=s[e];typeof t=="string"&&(w[e]=t)})},getGoogleAnalyticsName:s=>s||J(w.googleAnalytics),getPrecacheName:s=>s||J(w.precache),getPrefix:()=>w.prefix,getRuntimeName:s=>s||J(w.runtime),getSuffix:()=>w.suffix},q;
1function fe(){if(q===void 0){let s=new Response("");if("body"in s)try{new Response(s.body),q=!0}catch{q=!1}q=!1}return q}var Je=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t};var Ye=Je,u=class extends Error{details;constructor(e,t){let r=Ye(e,t);super(r),this.name=e,this.details=t}};var ge=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function T(s){return new Promise(e=>setTimeout(e,s))}var Y=new Set;function pe(s,e){let t=new URL(s);for(let r of e)t.searchParams.delete(r);return t.href}async function me(s,e,t,r){let n=pe(e.url,t);if(e.url===n)return s.match(e,r);let a={...r,ignoreSearch:!0},o=await s.keys(e,a);for(let i of o){let c=pe(i.url,t);if(n===c)return s.match(i,r)}}var U=class{promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},we=async()=>{for(let s of Y)await s()},ze="-precache-",Xe=async(s,e=ze)=>{let r=(await self.caches.keys()).filter(n=>n.includes(e)&&n.includes(self.registration.scope)&&n!==s);return await Promise.all(r.map(n=>self.caches.delete(n))),r},ye=s=>{self.addEventListener("activate",e=>{e.waitUntil(Xe(y.getPrecacheName(s)).then(t=>{}))})},Ne=()=>{self.addEventListener("activate",()=>self.clients.claim())},z=(s,e)=>{let t=e();return s.waitUntil(t),t};var ee=(s,e)=>e.some(t=>s instanceof t),Ee,_e;function Ze(){return Ee||(Ee=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function et(){return _e||(_e=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var te=new WeakMap,X=new WeakMap,k=new WeakMap;function tt(s){let e=new Promise((t,r)=>{let n=()=>{s.removeEventListener("success",a),s.removeEventListener("error",o)},a=()=>{t(v(s.result)),n()},o=()=>{r(s.error),n()};s.addEventListener("success",a),s.addEventListener("error",o)});return k.set(e,s),e}function st(s){if(te.has(s))return;let e=new Promise((t,r)=>{let n=()=>{s.removeEventListener("complete",a),s.removeEventListener("error",o),s.removeEventListener("abort",o)},a=()=>{t(),n()},o=()=>{r(s.error||new DOMException("AbortError","AbortError")),n()};s.addEventListener("complete",a),s.addEventListener("error",o),s.addEventListener("abort",o)});te.set(s,e)}var se={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return te.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return v(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function xe(s){se=s(se)}function rt(s){return et().includes(s)?function(...e){return s.apply(re(this),e),v(this.request)}:function(...e){return v(s.apply(re(this),e))}}function nt(s){return typeof s=="function"?rt(s):(s instanceof IDBTransaction&&st(s),ee(s,Ze())?new Proxy(s,se):s)}function v(s){if(s instanceof IDBRequest)return tt(s);if(X.has(s))return X.get(s);let e=nt(s);return e!==s&&(X.set(s,e),k.set(e,s)),e}var re=s=>k.get(s);function P(s,e,{blocked:t,upgrade:r,blocking:n,terminated:a}={}){let o=indexedDB.open(s,e),i=v(o);return r&&o.addEventListener("upgradeneeded",c=>{r(v(o.result),c.oldVersion,c.newVersion,v(o.transaction),c)}),t&&o.addEventListener("blocked",c=>t(c.oldVersion,c.newVersion,c)),i.then(c=>{a&&c.addEventListener("close",()=>a()),n&&c.addEventListener("versionchange",l=>n(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}function De(s,{blocked:e}={}){let t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",r=>e(r.oldVersion,r)),v(t).then(()=>{})}var at=["get","getKey","getAll","getAllKeys","count"],ot=["put","add","delete","clear"],Z=new Map;function be(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(Z.get(e))return Z.get(e);let t=e.replace(/FromIndex$/,""),r=e!==t,n=ot.includes(t);if(!(t in(r?IDBIndex:IDBObjectStore).prototype)||!(n||at.includes(t)))return;let a=async function(o,...i){let c=this.transaction(o,n?"readwrite":"readonly"),l=c.store;return r&&(l=l.index(i.shift())),(await Promise.all([l[t](...i),n&&c.done]))[0]};return Z.set(e,a),a}xe(s=>({...s,get:(e,t,r)=>be(e,t)||s.get(e,t,r),has:(e,t)=>!!be(e,t)||s.has(e,t)}));var it=["continue","continuePrimaryKey","advance"],Re={},ne=new WeakMap,Se=new WeakMap,ct={get(s,e){if(!it.includes(e))return s[e];let t=Re[e];return t||(t=Re[e]=function(...r){ne.set(this,Se.get(this)[e](...r))}),t}};async function*lt(...s){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...s)),!e)return;e=e;let t=new Proxy(e,ct);for(Se.set(t,e),k.set(t,re(e));e;)yield t,e=await(ne.get(t)||e.continue()),ne.delete(t)}function ve(s,e){return e===Symbol.asyncIterator&&ee(s,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&ee(s,[IDBIndex,IDBObjectStore])}xe(s=>({...s,get(e,t,r){return ve(e,t)?lt:s.get(e,t,r)},has(e,t){return ve(e,t)||s.has(e,t)}}));var Ae=async(s,e)=>{let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new u("cross-origin-copy-response",{origin:t});let r=s.clone(),n={headers:new Headers(r.headers),status:r.status,statusText:r.statusText},a=e?e(n):n,o=fe()?r.body:await r.blob();return new Response(o,a)},Ce=()=>{self.__WB_DISABLE_DEV_LOGS=!0},qe=3,ut="serwist-background-sync",N="requests",O="queueName",oe=class{_db=null;async addEntry(e){let r=(await this.getDb()).transaction(N,"readwrite",{durability:"relaxed"});await r.store.add(e),await r.done}async getFirstEntryId(){return(await(await this.getDb()).transaction(N).store.openCursor())?.value.id}async getAllEntriesByQueueName(e){let r=await(await this.getDb()).getAllFromIndex(N,O,IDBKeyRange.only(e));return r||[]}async getEntryCountByQueueName(e){return(await this.getDb()).countFromIndex(N,O,IDBKeyRange.only(e))}async deleteEntry(e){await(await this.getDb()).delete(N,e)}async getFirstEntryByQueueName(e){return await this.getEndEntryFromIndex(IDBKeyRange.only(e),"next")}async getLastEntryByQueueName(e){return await this.getEndEntryFromIndex(IDBKeyRange.only(e),"prev")}async getEndEntryFromIndex(e,t){return(await(await this.getDb()).transaction(N).store.index(O).openCursor(e,t))?.value}async getDb(){return this._db||(this._db=await P(ut,qe,{upgrade:this._upgradeDb})),this._db}_upgradeDb(e,t){t>0&&t<qe&&e.objectStoreNames.contains(N)&&e.deleteObjectStore(N),e.createObjectStore(N,{autoIncrement:!0,keyPath:"id"}).createIndex(O,O,{unique:!1})}},L=class{_queueName;_queueDb;constructor(e){this._queueName=e,this._queueDb=new oe}async pushEntry(e){delete e.id,e.queueName=this._queueName,await this._queueDb.addEntry(e)}async unshiftEntry(e){let t=await this._queueDb.getFirstEntryId();t?e.id=t-1:delete e.id,e.queueName=this._queueName,await this._queueDb.addEntry(e)}async popEntry(){return this._removeEntry(await this._queueDb.getLastEntryByQueueName(this._queueName))}async shiftEntry(){return this._removeEntry(await this._queueDb.getFirstEntryByQueueName(this._queueName))}async getAll(){return await this._queueDb.getAllEntriesByQueueName(this._queueName)}async size(){return await this._queueDb.getEntryCountByQueueName(this._queueName)}async deleteEntry(e){await this._queueDb.deleteEntry(e)}async _removeEntry(e){return e&&await this.deleteEntry(e.id),e}},ht=["method","referrer","referrerPolicy","mode","credentials","cache","redirect","integrity","keepalive"],A=class s{_requestData;
1static async fromRequest(e){let t={url:e.url,headers:{}};e.method!=="GET"&&(t.body=await e.clone().arrayBuffer()),e.headers.forEach((r,n)=>{t.headers[n]=r});for(let r of ht)e[r]!==void 0&&(t[r]=e[r]);return new s(t)}constructor(e){e.mode==="navigate"&&(e.mode="same-origin"),this._requestData=e}toObject(){let e=Object.assign({},this._requestData);return e.headers=Object.assign({},this._requestData.headers),e.body&&(e.body=e.body.slice(0)),e}toRequest(){return new Request(this._requestData.url,this._requestData)}clone(){return new s(this.toObject())}},Te="serwist-background-sync",dt=1440*7,ae=new Set,Oe=s=>{let e={request:new A(s.requestData).toRequest(),timestamp:s.timestamp};return s.metadata&&(e.metadata=s.metadata),e},I=class{_name;_onSync;_maxRetentionTime;_queueStore;_forceSyncFallback;_syncInProgress=!1;_requestsAddedDuringSync=!1;constructor(e,{forceSyncFallback:t,onSync:r,maxRetentionTime:n}={}){if(ae.has(e))throw new u("duplicate-queue-name",{name:e});ae.add(e),this._name=e,this._onSync=r||this.replayRequests,this._maxRetentionTime=n||dt,this._forceSyncFallback=!!t,this._queueStore=new L(this._name),this._addSyncListener()}get name(){return this._name}async pushRequest(e){await this._addRequest(e,"push")}async unshiftRequest(e){await this._addRequest(e,"unshift")}async popRequest(){return this._removeRequest("pop")}async shiftRequest(){return this._removeRequest("shift")}async getAll(){let e=await this._queueStore.getAll(),t=Date.now(),r=[];for(let n of e){let a=this._maxRetentionTime*60*1e3;t-n.timestamp>a?await this._queueStore.deleteEntry(n.id):r.push(Oe(n))}return r}async size(){return await this._queueStore.size()}async _addRequest({request:e,metadata:t,timestamp:r=Date.now()}
1,n){let o={requestData:(await A.fromRequest(e.clone())).toObject(),timestamp:r};switch(t&&(o.metadata=t),n){case"push":await this._queueStore.pushEntry(o);break;case"unshift":await this._queueStore.unshiftEntry(o);break}this._syncInProgress?this._requestsAddedDuringSync=!0:await this.registerSync()}async _removeRequest(e){let t=Date.now(),r;switch(e){case"pop":r=await this._queueStore.popEntry();break;case"shift":r=await this._queueStore.shiftEntry();break}if(r){let n=this._maxRetentionTime*60*1e3;return t-r.timestamp>n?this._removeRequest(e):Oe(r)}}async replayRequests(){let e;for(;e=await this.shiftRequest();)try{await fetch(e.request.clone())}catch{throw await this.unshiftRequest(e),new u("queue-replay-failed",{name:this._name})}}async registerSync(){if("sync"in self.registration&&!this._forceSyncFallback)try{await self.registration.sync.register(`${Te}:${this._name}`)}catch{}}_addSyncListener(){"sync"in self.registration&&!this._forceSyncFallback?self.addEventListener("sync",e=>{if(e.tag===`${Te}:${this._name}`){let t=async()=>{this._syncInProgress=!0;let r;try{await this._onSync({queue:this})}catch(n){if(n instanceof Error)throw r=n,r}finally{this._requestsAddedDuringSync&&!(r&&!e.lastChance)&&await this.registerSync(),this._syncInProgress=!1,this._requestsAddedDuringSync=!1}};e.waitUntil(t())}}):this._onSync({queue:this})}static get _queueNames(){return ae}},V=class{_queue;constructor(e,t){this._queue=new I(e,t)}async fetchDidFail({request:e}){await this._queue.pushRequest({request:e})}},Ue={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};function $(s){return typeof s=="string"?new Request(s):s}var F=class{event;request;url;params;_cacheKeys={};_strategy;_handlerDeferred;_extendLifetimePromises;_plugins;_pluginStateMap;constructor(e,t){this.event=t.event,this.request=t.request,t.url&&(this.url=t.url,this.params=t.params),this._strategy=e,this._handlerDeferred=new U,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(let r of this._plugins)this._pluginStateMap.set(r,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){let{event:t}=this,r=$(e),n=await this.getPreloadResponse();if(n)return n;let a=this.hasCallback("fetchDidFail")?r.clone():null;try{for(let i of this.iterateCallbacks("requestWillFetch"))r=await i({request:r.clone(),event:t})}catch(i){if(i instanceof Error)throw new u("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}let o=r.clone();try{let i;i=await fetch(r,r.mode==="navigate"?void 0:this._strategy.fetchOptions);for(let c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:o,response:i});return i}catch(i){throw a&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:a.clone(),request:o.clone()}),i}}async fetchAndCachePut(e){let t=await this.fetch(e),r=t.clone();return this.waitUntil(this.cachePut(e,r)),t}async cacheMatch(e){let t=$(e),r,{cacheName:n,matchOptions:a}=this._strategy,o=await this.getCacheKey(t,"read"),i={...a,cacheName:n};r=await caches.match(o,i);for(let c of this.iterateCallbacks("cachedResponseWillBeUsed"))r=await c({cacheName:n,matchOptions:a,cachedResponse:r,request:o,event:this.event})||void 0;return r}async cachePut(e,t){let r=$(e);await T(0);let n=await this.getCacheKey(r,"write");if(!t)throw new u("cache-put-with-no-response",{url:ge(n.url)});let a=await this._ensureResponseSafeToCache(t);if(!a)return!1;let{cacheName:o,matchOptions:i}=this._strategy,c=await self.caches.open(o),l=this.hasCallback("cacheDidUpdate"),h=l?await me(c,n.clone(),["__WB_REVISION__"],i):null;try{await c.put(n,l?a.clone():a)}catch(d){if(d instanceof Error)throw d.name==="QuotaExceededError"&&await we(),d}for(let d of this.iterateCallbacks("cacheDidUpdate"))await d({cacheName:o,oldResponse:h,newResponse:a.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){let r=`${e.url} | ${t}`;if(!this._cacheKeys[r]){let n=e;for(let a of this.iterateCallbacks("cacheKeyWillBeUsed"))n=$(await a({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[r]=n}return this._cacheKeys[r]}hasCallback(e){for(let t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(let r of this.iterateCallbacks(e))await r(t)}*iterateCallbacks(e){for(let t of this._strategy.plugins)if(typeof t[e]=="function"){let r=this._pluginStateMap.get(t);yield a=>{let o={...a,state:r};return t[e](o)}}}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 getPreloadResponse(){if(this.event instanceof FetchEvent&&this.event.request.mode==="navigate"&&"preloadResponse"in this.event)try{let e=await this.event.preloadResponse;if(e)return e}catch{return}}async _ensureResponseSafeToCache(e){let t=e,r=!1;for(let n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,r=!0,!t)break;return r||t&&t.status!==200&&(t=void 0),t}},x=class{cacheName;plugins;fetchOptions;matchOptions;constructor(e={}
1){this.cacheName=y.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){let[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});let t=e.event,r=typeof e.request=="string"?new Request(e.request):e.request,n=new F(this,e.url?{event:t,request:r,url:e.url,params:e.params}:{event:t,request:r}),a=this._getResponse(n,r,t),o=this._awaitComplete(a,n,r,t);return[a,o]}async _getResponse(e,t,r){await e.runCallbacks("handlerWillStart",{event:r,request:t});let n;try{if(n=await this._handle(t,e),n===void 0||n.type==="error")throw new u("no-response",{url:t.url})}catch(a){if(a instanceof Error){for(let o of e.iterateCallbacks("handlerDidError"))if(n=await o({error:a,event:r,request:t}),n!==void 0)break}if(!n)throw a}for(let a of e.iterateCallbacks("handlerWillRespond"))n=await a({event:r,request:t,response:n});return n}async _awaitComplete(e,t,r,n){let a,o;try{a=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:n,request:r,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(o=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:r,response:a,error:o}),t.destroy(),o)throw o}};var D=class extends x{_networkTimeoutSeconds;constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Ue),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){let r=[],n=[],a;if(this._networkTimeoutSeconds){let{id:c,promise:l}=this._getTimeoutPromise({request:e,logs:r,handler:t});a=c,n.push(l)}let o=this._getNetworkPromise({timeoutId:a,request:e,logs:r,handler:t});n.push(o);let i=await t.waitUntil((async()=>await t.waitUntil(Promise.race(n))||await o)());if(!i)throw new u("no-response",{url:e.url});return i}_getTimeoutPromise({request:e,logs:t,handler:r}){let n;return{promise:new Promise(o=>{n=setTimeout(async()=>{o(await r.cacheMatch(e))},this._networkTimeoutSeconds*1e3)}),id:n}}async _getNetworkPromise({timeoutId:e,request:t,logs:r,handler:n}){let a,o;try{o=await n.fetchAndCachePut(t)}catch(i){i instanceof Error&&(a=i)}return e&&clearTimeout(e),(a||!o)&&(o=await n.cacheMatch(t)),o}},f=class extends x{_networkTimeoutSeconds;constructor(e={}){super(e),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){let r,n;try{let a=[t.fetch(e)];if(this._networkTimeoutSeconds){let o=T(this._networkTimeoutSeconds*1e3);a.push(o)}if(n=await Promise.race(a),!n)throw new Error(`Timed out the network response after ${this._networkTimeoutSeconds} seconds.`)}catch(a){a instanceof Error&&(r=a)}if(!n)throw new u("no-response",{url:e.url,error:r});return n}},ie="GET";var C=s=>s&&typeof s=="object"?s:{handle:s},p=class{handler;match;method;catchHandler;constructor(e,t,r=ie){this.handler=C(t),this.match=e,this.method=r}setCatchHandler(e){this.catchHandler=C(e)}},M=class s extends x{_fallbackToNetwork;static defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:e}){return!e||e.status>=400?null:e}};static copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:e}){return e.redirected?await Ae(e):e}};constructor(e={}){e.cacheName=y.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(s.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){let r=await t.getPreloadResponse();if(r)return r;let n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let r,n=t.params||{};if(this._fallbackToNetwork){let a=n.integrity,o=e.integrity,i=!o||o===a;if(r=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?o||a:void 0})),a&&i&&e.mode!=="no-cors"){this._useDefaultCacheabilityPluginIfNeeded();let c=await t.cachePut(e,r.clone())}}else throw new u("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return r}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();let r=await t.fetch(e);if(!await t.cachePut(e,r.clone()))throw new u("bad-precaching-response",{url:e.url,status:r.status});return r}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(let[r,n]of this.plugins.entries())n!==s.copyRedirectedCacheableResponsesPlugin&&(n===s.defaultPrecacheCacheabilityPlugin&&(e=r),n.cacheWillUpdate&&t++);t===0?this.plugins.push(s.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}},B=class extends p{_allowlist;_denylist;constructor(e,{allowlist:t=[/./],denylist:r=[]}={}){super(n=>this._match(n),e),this._allowlist=t,this._denylist=r}_match({url:e,request:t}){if(t&&t.mode!=="navigate")return!1;let r=e.pathname+e.search;for(let n of this._denylist)if(n.test(r))return!1;return!!this._allowlist.some(n=>n.test(r))}},ke=()=>!!self.registration?.navigationPreload,Pe=s=>{ke()&&self.addEventListener("activate",e=>{e.waitUntil(self.registration.navigationPreload.enable().then(()=>{s&&self.registration.navigationPreload.setHeaderValue(s)}))})};var pt=(s,e=[])=>{for(let t of[...s.searchParams.keys()])e.some(r=>r.test(t))&&s.searchParams.delete(t);return s};function*$e(s,{directoryIndex:e="index.html",ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],cleanURLs:r=!0,urlManipulation:n}={}){let a=new URL(s,location.href);a.hash="",yield a.href;let o=pt(a,t);if(yield o.href,e&&o.pathname.endsWith("/")){let i=new URL(o.href);i.pathname+=e,yield i.href}if(r){let i=new URL(o.href);i.pathname+=".html",yield i.href}if(n){let i=n({url:a});for(let c of i)yield c.href}}var W=class extends p{constructor(e,t,r){let n=({url:a})=>{let o=e.exec(a.href);if(o&&!(a.origin!==location.origin&&o.index!==0))return o.slice(1)};super(n,t,r)}},Le=s=>{y.updateDetails(s)},ft="__WB_REVISION__",Ie=s=>{if(!s)throw new u("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){let a=new URL(s,location.href);return{cacheKey:a.href,url:a.href}}let{revision:e,url:t}=s;if(!t)throw new u("add-to-cache-list-unexpected-type",{entry:s});if(!e){let a=new URL(t,location.href);return{cacheKey:a.href,url:a.href}}let r=new URL(t,location.href),n=new URL(t,location.href);return r.searchParams.set(ft,e),{cacheKey:r.href,url:n.href}},K=class{updatedURLs=[];notUpdatedURLs=[];handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)};cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:r})=>{if(e.type==="install"&&t?.originalRequest&&t.originalRequest instanceof Request){let n=t.originalRequest.url;r?this.notUpdatedURLs.push(n):this.updatedURLs.push(n)}return r}},Ve=(s,e,t)=>{if(typeof s=="string"){let r=new URL(s,location.href),n=({url:a})=>a.href===r.href;return new p(n,e,t)}if(s instanceof RegExp)return new W(s,e,t);if(typeof s=="function")return new p(s,e,t);if(s instanceof p)return s;throw new u("unsupported-route-type",{moduleName:"serwist",funcName:"parseRoute",paramName:"capture"})};var Fe=async(s,e,t)=>{let r=e.map((i,c)=>({index:c,item:i})),n=async i=>{let c=[];for(;;){let l=r.pop();if(!l)return i(c);let h=await t(l.item);c.push({result:h,index:l.index})}},a=Array.from({length:s},()=>new Promise(n));return(await Promise.all(a)).flat().sort((i,c)=>i.index<c.index?-1:1).map(i=>i.result)};var is=typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent);var gt="serwist-expiration",j="cache-entries",Me=s=>{let e=new URL(s,location.href);return e.hash="",e.href},ce=class{_cacheName;_db=null;constructor(e){this._cacheName=e}_getId(e){return`${this._cacheName}|${Me(e)}`}_upgradeDb(e){let t=e.createObjectStore(j,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&De(this._cacheName)}async setTimestamp(e,t){e=Me(e);let r={id:this._getId(e),cacheName:this._cacheName,url:e,timestamp:t},a=(await this.getDb()).transaction(j,"readwrite",{durability:"relaxed"});await a.store.put(r),await a.done}async getTimestamp(e){return(await(await this.getDb()).get(j,this._getId(e)))?.timestamp}async expireEntries(e,t){let n=await(await this.getDb()).transaction(j,"readwrite").store.index("timestamp").openCursor(null,"prev"),a=[],o=0;for(;n;){let i=n.value;i.cacheName===this._cacheName&&(e&&i.timestamp<e||t&&o>=t?(n.delete(),a.push(i.url)):o++),n=await n.continue()}return a}
1async getDb(){return this._db||(this._db=await P(gt,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}},le=class{_isRunning=!1;_rerunRequested=!1;_maxEntries;_maxAgeSeconds;_matchOptions;_cacheName;_timestampModel;constructor(e,t={}){this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new ce(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;let e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),r=await self.caches.open(this._cacheName);for(let n of t)await r.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,this.expireEntries())}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(!this._maxAgeSeconds)return!1;let t=await this._timestampModel.getTimestamp(e),r=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t<r:!0}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(Number.POSITIVE_INFINITY)}},mt=s=>{Y.add(s)},g=class{_config;_cacheExpirations;constructor(e={}){this._config=e,this._cacheExpirations=new Map,this._config.maxAgeFrom||(this._config.maxAgeFrom="last-fetched"),this._config.purgeOnQuotaError&&mt(()=>
1this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===y.getRuntimeName())throw new u("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new le(e,this._config),this._cacheExpirations.set(e,t)),t}cachedResponseWillBeUsed({event:e,cacheName:t,request:r,cachedResponse:n}){if(!n)return null;let a=this._isResponseDateFresh(n),o=this._getCacheExpiration(t),i=this._config.maxAgeFrom==="last-used",c=(async()=>{i&&await o.updateTimestamp(r.url),await o.expireEntries()})();try{e.waitUntil(c)}catch{}return a?n:null}_isResponseDateFresh(e){if(this._config.maxAgeFrom==="last-used")return!0;let r=Date.now();if(!this._config.maxAgeSeconds)return!0;let n=this._getDateHeaderTimestamp(e);return n===null?!0:n>=r-this._config.maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;let t=e.headers.get("date"),n=new Date(t).getTime();return Number.isNaN(n)?null:n}async cacheDidUpdate({cacheName:e,request:t}){let r=this._getCacheExpiration(e);await r.updateTimestamp(t.url),await r.expireEntries()}async deleteCacheAndMetadata(){for(let[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}},wt="serwist-google-analytics",yt=2880,We="www.google-analytics.com",Ke="www.googletagmanager.com",Nt="/analytics.js",Et="/gtag/js",_t="/gtm.js",bt=/^\/(\w+\/)?collect/,Rt=s=>async({queue:e})=>{let t;for(;t=await e.shiftRequest();){let{request:r,timestamp:n}=t,a=new URL(r.url);try{let o=r.method==="POST"?new URLSearchParams(await r.clone().text()):a.searchParams,i=n-(Number(o.get("qt"))||0),c=Date.now()-i;if(o.set("qt",String(c)),s.parameterOverrides)for(let l of Object.keys(s.parameterOverrides)){let h=s.parameterOverrides[l];o.set(l,h)}typeof s.hitFilter=="function"&&s.hitFilter.call(null,o),await fetch(new Request(a.origin+a.pathname,{body:o.toString(),method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"text/plain"}}))}catch(o){throw await e.unshiftRequest(t),o}}},vt=s=>{let e=({url:r})=>r.hostname===We&&bt.test(r.pathname),t=new f({plugins:[s]});return[new p(e,t,"GET"),new p(e,t,"POST")]},xt=s=>{let e=({url:r})=>r.hostname===We&&r.pathname===Nt,t=new D({cacheName:s});return new p(e,t,"GET")},Dt=s=>{let e=({url:r})=>r.hostname===Ke&&r.pathname===Et,t=new D({cacheName:s});return new p(e,t,"GET")},St=s=>{let e=({url:r})=>r.hostname===Ke&&r.pathname===_t,t=new D({cacheName:s});return new p(e,t,"GET")},Be=({serwist:s,cacheName:e,...t})=>{let r=y.getGoogleAnalyticsName(e),n=new V(wt,{maxRetentionTime:yt,onSync:Rt(t)}),a=[St(r),xt(r),Dt(r),...vt(n)];for(let o of a)s.registerRoute(o)},ue=class{_fallbackUrls;_serwist;constructor({fallbackUrls:e,serwist:t}){this._fallbackUrls=e,this._serwist=t}async handlerDidError(e){for(let t of this._fallbackUrls)if(typeof t=="string"){let r=await this._serwist.matchPrecache(t);if(r!==void 0)return r}else if(t.matcher(e)){let r=await this._serwist.matchPrecache(t.url);if(r!==void 0)return r}}};var E=class extends x{async _handle(e,t){let r=[],n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(o){o instanceof Error&&(a=o)}if(!n)throw new u("no-response",{url:e.url,error:a});return n}};var he=class extends p{constructor(e,t){let r=({request:n})=>{let a=e.getUrlsToPrecacheKeys();for(let o of $e(n.url,t)){let i=a.get(o);if(i){let c=e.getIntegrityForPrecacheKey(i);return{cacheKey:i,integrity:c}}}};super(r,e.precacheStrategy)}},de=class{_precacheController;constructor({precacheController:e}){this._precacheController=e}cacheKeyWillBeUsed=async({request:e,params:t})=>{let r=t?.cacheKey||this._precacheController.getPrecacheKeyForUrl(e.url);return r?new Request(r,{headers:e.headers}):e}},qt=(s,e={})=>{let{cacheName:t,plugins:r=[],fetchOptions:n,matchOptions:a,fallbackToNetwork:o,directoryIndex:i,ignoreURLParametersMatching:c,cleanURLs:l,urlManipulation:h,cleanupOutdatedCaches:d,concurrency:m=10,navigateFallback:S,navigateFallbackAllowlist:G,navigateFallbackDenylist:_}=e??{};return{precacheStrategyOptions:{cacheName:y.getPrecacheName(t),plugins:[...r,new de({precacheController:s})],fetchOptions:n,matchOptions:a,fallbackToNetwork:o},precacheRouteOptions:{directoryIndex:i,ignoreURLParametersMatching:c,cleanURLs:l,urlManipulation:h},precacheMiscOptions:{cleanupOutdatedCaches:d,concurrency:m,navigateFallback:S,navigateFallbackAllowlist:G,navigateFallbackDenylist:_}}},H=class{_urlsToCacheKeys=new Map;_urlsToCacheModes=new Map;_cacheKeysToIntegrities=new Map;_concurrentPrecaching;_precacheStrategy;_routes;_defaultHandlerMap;_catchHandler;_requestRules;constructor({precacheEntries:e,precacheOptions:t,skipWaiting:r=!1,importScripts:n,navigationPreload:a=!1,cacheId:o,clientsClaim:i=!1,runtimeCaching:c,offlineAnalyticsConfig:l,disableDevLogs:h=!1,fallbacks:d,requestRules:m}={}){let{precacheStrategyOptions:S,precacheRouteOptions:G,precacheMiscOptions:_}=qt(this,t);if(this._concurrentPrecaching=_.concurrency,this._precacheStrategy=new M(S),this._routes=new Map,this._defaultHandlerMap=new Map,this._requestRules=m,this.handleInstall=this.handleInstall.bind(this),this.handleActivate=this.handleActivate.bind(this),this.handleFetch=this.handleFetch.bind(this),this.handleCache=this.handleCache.bind(this),n&&n.length>0&&self.importScripts(...n),a&&Pe(),o!==void 0&&Le({prefix:o}
1),r?self.skipWaiting():self.addEventListener("message",b=>{b.data&&b.data.type==="SKIP_WAITING"&&self.skipWaiting()}),i&&Ne(),e&&e.length>0&&this.addToPrecacheList(e),_.cleanupOutdatedCaches&&ye(S.cacheName),this.registerRoute(new he(this,G)),_.navigateFallback&&this.registerRoute(new B(this.createHandlerBoundToUrl(_.navigateFallback),{allowlist:_.navigateFallbackAllowlist,denylist:_.navigateFallbackDenylist})),l!==void 0&&(typeof l=="boolean"?l&&Be({serwist:this}):Be({...l,serwist:this})),c!==void 0){if(d!==void 0){let b=new ue({fallbackUrls:d.entries,serwist:this});c.forEach(Q=>{Q.handler instanceof x&&!Q.handler.plugins.some(He=>"handlerDidError"in He)&&Q.handler.plugins.push(b)})}for(let b of c)this.registerCapture(b.matcher,b.handler,b.method)}h&&Ce()}get precacheStrategy(){return this._precacheStrategy}get routes(){return this._routes}addEventListeners(){self.addEventListener("install",this.handleInstall),self.addEventListener("activate",this.handleActivate),self.addEventListener("fetch",this.handleFetch),self.addEventListener("message",this.handleCache)}addToPrecacheList(e){let t=[];for(let r of e){typeof r=="string"?t.push(r):r&&!r.integrity&&r.revision===void 0&&t.push(r.url);let{cacheKey:n,url:a}=Ie(r),o=typeof r!="string"&&r.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==n)throw new u("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:n});if(typeof r!="string"&&r.integrity){if(this._cacheKeysToIntegrities.has(n)&&this._cacheKeysToIntegrities.get(n)!==r.integrity)throw new u("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(n,r.integrity)}this._urlsToCacheKeys.set(a,n),this._urlsToCacheModes.set(a,o)}if(t.length>0){let r=`Serwist is precaching URLs without revision info: ${t.join(", ")} 2This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(r)}}handleInstall(e){return this.registerRequestRules(e),z(e,async()=>{let t=new K;this.precacheStrategy.plugins.push(t),await Fe(this._concurrentPrecaching,Array.from(this._urlsToCacheKeys.entries()),async([a,o])=>{let i=this._cacheKeysToIntegrities.get(o),c=this._urlsToCacheModes.get(a),l=new Request(a,{integrity:i,cache:c,credentials:"same-origin"});await Promise.all(this.precacheStrategy.handleAll({event:e,request:l,url:new URL(l.url),params:{cacheKey:o}}))});let{updatedURLs:r,notUpdatedURLs:n}=t;return{updatedURLs:r,notUpdatedURLs:n}})}async registerRequestRules(e){if(this._requestRules&&e?.addRoutes)try{await e.addRoutes(this._requestRules),this._requestRules=void 0}catch(t){throw t}}handleActivate(e){return z(e,async()=>{let t=await self.caches.open(this.precacheStrategy.cacheName),r=await t.keys(),n=new Set(this._urlsToCacheKeys.values()),a=[];for(let o of r)n.has(o.url)||(await t.delete(o),a.push(o.url));return{deletedCacheRequests:a}})}handleFetch(e){let{request:t}=e,r=this.handleRequest({request:t,event:e});r&&e.respondWith(r)}handleCache(e){if(e.data&&e.data.type==="CACHE_URLS"){let{payload:t}=e.data,r=Promise.all(t.urlsToCache.map(n=>{let a;return typeof n=="string"?a=new Request(n):a=new Request(...n),this.handleRequest({request:a,event:e})}));e.waitUntil(r),e.ports?.[0]&&r.then(()=>e.ports[0].postMessage(!0))}}setDefaultHandler(e,t=ie){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerCapture(e,t,r){let n=Ve(e,t,r);return this.registerRoute(n),n}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 u("unregister-route-but-not-found-with-method",{method:e.method});let t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new u("unregister-route-route-not-registered")}getUrlsToPrecacheKeys(){return this._urlsToCacheKeys}getPrecachedUrls(){return[...this._urlsToCacheKeys.keys()]}getPrecacheKeyForUrl(e){let t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForPrecacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){let t=e instanceof Request?e.url:e,r=this.getPre
2cacheKeyForUrl(t);if(r)return(await self.caches.open(this.precacheStrategy.cacheName)).match(r)}createHandlerBoundToUrl(e){let t=this.getPrecacheKeyForUrl(e);if(!t)throw new u("non-precached-url",{url:e});return r=>(r.request=new Request(e),r.params={cacheKey:t,...r.params},this.precacheStrategy.handle(r))}handleRequest({request:e,event:t}){let r=new URL(e.url,location.href);if(!r.protocol.startsWith("http"))return;let n=r.origin===location.origin,{params:a,route:o}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:r}),i=o?.handler,c=[],l=e.method;if(!i&&this._defaultHandlerMap.has(l)&&(i=this._defaultHandlerMap.get(l)),!i)return;let h;try{h=i.handle({url:r,request:e,event:t,params:a})}catch(m){h=Promise.reject(m)}let d=o?.catchHandler;return h instanceof Promise&&(this._catchHandler||d)&&(h=h.catch(async m=>{if(d)try{return await d.handle({url:r,request:e,event:t,params:a})}catch(S){S instanceof Error&&(m=S)}if(this._catchHandler)return this._catchHandler.handle({url:r,request:e,event:t});throw m})),h}findMatchingRoute({url:e,sameOrigin:t,request:r,event:n}){let a=this._routes.get(r.method)||[];for(let o of a){let i,c=o.match({url:e,sameOrigin:t,request:r,event:n});if(c)return i=c,(Array.isArray(i)&&i.length===0||c.constructor===Object&&Object.keys(c).length===0||typeof c=="boolean")&&(i=void 0),{route:o,params:i}}return{}}};var Tt=[{matcher:({url:s})=>s.pathname.startsWith("/api/proxy"),handler:new f},{matcher:({url:s})=>s.hostname.includes("supabase.co"),handler:new f},{matcher:({url:s})=>s.hostname.includes("cloud.umami.is")||s.hostname.includes("pkmn.blogsareback.com")||s.pathname.startsWith("/api/send"),handler:new f},{matcher:({url:s,sameOrigin:e})=>e&&s.pathname.startsWith("/api/"),handler:new f},{matcher:({url:s})=>s.hostname==="fonts.googleapis.com",handler:new E({cacheName:"google-fonts-stylesheets",plugins:[new g({maxEntries:20,maxAgeSeconds:720*60*60})]})},{matcher:({url:s})=>s.hostname==="fonts.gstatic.com",handler:new E({cacheName:"google-fonts-webfonts",plugins:[new g({maxEntries:30,maxAgeSeconds:365*24*60*60})]})},{matcher:({url:s})=>s.hostname==="cdnjs.cloudflare.com"&&(s.pathname.endsWith(".css")||s.pathname.endsWith(".js")),handler:new E({cacheName:"cdn-styles",plugins:[new g({maxEntries:15,maxAgeSeconds:720*60*60})]})},{matcher:({url:s,sameOrigin:e})=>e&&s.pathname.startsWith("/styles/syntax-highlighting/"),handler:new E({cacheName:"syntax-theme-styles",plugins:[new g({maxEntries:10,maxAgeSeconds:720*60*60})]})},{matcher:({url:s,sameOrigin:e})=>e&&(s.pathname.startsWith("/icon/")||s.pathname==="/apple-touch-icon.png"||s.pathname==="/favicon.ico"||s.pathname==="/manifest.webmanifest"||s.pathname==="/og-image.jpg"),handler:new E({cacheName:"static-assets",plugins:[new g({maxEntries:40,maxAgeSeconds:720*60*60})]})},{matcher:({url:s,sameOrigin:e})=>e&&s.pathname.startsWith("/_next/static/"),handler:new E({cacheName:"next-static",plugins:[new g({maxEntries:300,maxAgeSeconds:720*60*60})]})},{matcher:({request:s})=>s.mode==="navigate",handler:new D({cacheName:"pages",networkTimeoutSeconds:5,plugins:[new g({maxEntries:32,maxAgeSeconds:1440*60})]})},{matcher:({sameOrigin:s})=>s,handler:new f}],Ot=new H({precacheEntries:R,skipWaiting:!0,clientsClaim:!0,navigationPreload:!0,runtimeCaching:Tt,fallbacks:{entries:[{url:"/dashboard",matcher({request:s}){return s.destination==="document"}}]}});function At(s){return s.hostname.includes("cloud.umami.is")||s.hostname.includes("pkmn.blogsareback.com")||s.pathname.startsWith("/api/send")}self.addEventListener("fetch",s=>{if(!navigator.onLine){let e=new URL(s.request.url);if(At(e)){s.respondWith(new Response(null,{status:200}));return}if(e.origin===self.location.origin&&s.request.mode!=="navigate"){s.respondWith(caches.match(s.request).then(t=>t||Response.error()));return}}});var je="bab-sync-queue";self.addEventListener("sync",s=>{s.tag===je&&s.waitUntil(self.clients.matchAll({type:"window"}).then(e=>{e.length>0&&(e.find(r=>r.visibilityState==="visible")||e[0]).postMessage({type:"SYNC_QUEUE_FLUSH"})}))});self.addEventListener("message",s=>{s.data?.type==="REGISTER_SYNC"&&s.waitUntil((async()=>{"sync"in self.registration&&await self.registration.sync.register(je).catch(()=>{})})())});Ot.addEventListeners(); 3//# sourceMappingURL=sw.js.map
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.