PageSourceSearch

https://accounts.anf.es/service-worker.js

js anf.es collected 2026-10-03 20:20:20 UTC 105,531 bytes, 855 lines download raw bytes

vendor: 7,386 bytes, line 1
1try{self["workbox:core:6.5.1"]&&_()}catch{}typeof registration<"u"&&registration.scope;function rn(){self.addEventListener("activate",()=>self.clients.claim())}try{self["workbox:core:7.4.0"]&&_()}catch{}const sn=(t,...e)=>{let n=t;return e.length>0&&(n+=` :: ${JSON.stringify(e)}`),n},on=sn;let y=class extends Error{constructor(e,n){const r=on(e,n);super(r),this.name=e,this.details=n}};const g={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},Y=t=>[g.prefix,t,g.suffix].filter(e=>e&&e.length>0).join("-"),an=t=>{for(const e of Object.keys(g))t(e)},ke={updateDetails:t=>{an(e=>{typeof t[e]=="string"&&(g[e]=t[e])})},getGoogleAnalyticsName:t=>t||Y(g.googleAnalytics),getPrecacheName:t=>t||Y(g.precache),getPrefix:()=>g.prefix,getRuntimeName:t=>t||Y(g.runtime),getSuffix:()=>g.suffix};function We(t,e){const n=e();return t.waitUntil(n),n}try{self["workbox:precaching:7.4.0"]&&_()}catch{}const cn="__WB_REVISION__";function ln(t){if(!t)throw new y("add-to-cache-list-unexpected-type",{entry:t});if(typeof t=="string"){const i=new URL(t,location.href);return{cacheKey:i.href,url:i.href}}const{revision:e,url:n}=t;if(!n)throw new y("add-to-cache-list-unexpected-type",{entry:t});if(!e){const i=new URL(n,location.href);return{cacheKey:i.href,url:i.href}}const r=new URL(n,location.href),s=new URL(n,location.href);return r.searchParams.set(cn,e),{cacheKey:r.href,url:s.href}}class un{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:n})=>{n&&(n.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:n,cachedResponse:r})=>{if(e.type==="install"&&n&&n.originalRequest&&n.originalRequest instanceof Request){const s=n.originalRequest.url;r?this.notUpdatedURLs.push(s):this.updatedURLs.push(s)}return r}}}class hn{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:n,params:r})=>{const s=(r==null?void 0:r.cacheKey)||this._precacheController.getCacheKeyForURL(n.url);return s?new Request(s,{headers:n.headers}):n},this._precacheController=e}}let L;function fn(){if(L===void 0){const t=new Response("");if("body"in t)try{new Response(t.body),L=!0}catch{L=!1}L=!1}return L}async function dn(t,e){let n=null;if(t.url&&(n=new URL(t.url).origin),n!==self.location.origin)throw new y("cross-origin-copy-response",{origin:n});const r=t.clone(),i={headers:new Headers(r.headers),status:r.status,statusText:r.statusText},o=fn()?r.body:await r.blob();return new Response(o,i)}try{self["workbox:core:7.4.0"]&&_()}catch{}const m={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},Q=t=>[m.prefix,t,m.suffix].filter(e=>e&&e.length>0).join("-"),pn=t=>{for(const e of Object.keys(m))t(e)},gn={updateDetails:t=>{pn(e=>{typeof t[e]=="string"&&(m[e]=t[e])})},getGoogleAnalyticsName:t=>t||Q(m.googleAnalytics),getPrecacheName:t=>t||Q(m.precache),getPrefix:()=>m.prefix,getRuntimeName:t=>t||Q(m.runtime),getSuffix:()=>m.suffix},mn=(t,...e)=>{let n=t;return e.length>0&&(n+=` :: ${JSON.stringify(e)}`),n},bn=mn;let F=class extends Error{constructor(e,n){const r=bn(e,n);super(r),this.name=e,this.details=n}};const wn=t=>new URL(String(t),location.href).href.replace(new RegExp(`^${location.origin}`),"");function Ve(t,e){const n=new URL(t);for(const r of e)n.searchParams.delete(r);return n.href}async function yn(t,e,n,r){const s=Ve(e.url,n);if(e.url===s)return t.match(e,r);const i=Object.assign(Object.assign({},r),{ignoreSearch:!0}),o=await t.keys(e,i);for(const a of o){const c=Ve(a.url,n);if(s===c)return t.match(a,r)}}let _n=class{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}};const In=new Set;async function En(){for(const t of In)await t()}function Cn(t){return new Promise(e=>setTimeout(e,t))}try{self["workbox:strategies:7.4.0"]&&_()}catch{}function U(t){return typeof t=="string"?new Request(t):t}class Sn{constructor(e,n){this._cacheKeys={},Object.assign(this,n),this.event=n.event,this._strategy=e,this._handlerDeferred=new _n,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const r of this._plugins)this._pluginStateMap.set(r,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:n}=this;let r=U(e);if(r.mode==="navigate"&&n instanceof FetchEvent&&n.preloadResponse){const o=await n.preloadResponse;if(o)return o}const s=this.hasCallback("fetchDidFail")?r.clone():null;try{for(const o of this.iterateCallbacks("requestWillFetch"))r=await o({request:r.clone(),event:n})}catch(o){if(o instanceof Error)throw new F("plugin-error-request-will-fetch",{thrownErrorMessage:o.message})}const i=r.clone();try{let o;o=await fetch(r,r.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const a of this.iterateCallbacks("fetchDidSucceed"))o=await a({event:n,request:i,response:o});return o}catch(o){throw s&&await this.runCallbacks("fetchDidFail",{error:o,event:n,originalRequest:s.clone(),request:i.clone()}),o}}async fetchAndCachePut(e){const n=await this.fetch(e),r=n.clone();return this.waitUntil(this.cachePut(e,r)),n}async cacheMatch(e){const n=U(e);let r;const{cacheName:s,matchOptions:i}=this._strategy,o=await this.getCacheKey(n,"read"),a=Object.assign(Object.assign({},i),{cacheName:s});r=await caches.match(o,a);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))r=await c({cacheName:s,matchOptions:i,cachedResponse:r,request:o,event:this.event})||void 0;return r}async cachePut(e,n){const r=U(e);await Cn(0);const s=await this.getCacheKey(r,"write");if(!n)throw new F("cache-put-with-no-response",{url:wn(s.url)});const i=await this._ensureResponseSafeToCache(n);if(!i)return!1;const{cacheName:o,matchOptions:a}=this._strategy,c=await self.caches.open(o),l=this.hasCallback("cacheDidUpdate"),u=l?await yn(c,s.clone(),["__WB_REVISION__"],a):null;try{await c.put(s,l?i.clone():i)}catch(f){if(f instanceof Error)throw f.name==="QuotaExceededError"&&await En(),f}for(const f of this.iterateCallbacks("cacheDidUpdate"))await f({cacheName:o,oldResponse:u,newResponse:i.clone(),request:s,event:this.event});return!0}async getCacheKey(e,n){const r=`${e.url} | ${n}`;if(!this._cacheKeys[r]){let s=e;for(const i of this.iterateCallbacks("cacheKeyWillBeUsed"))s=U(await i({mode:n,request:s,event:this.event,params:this.params}));this._cacheKeys[r]=s}return this._cacheKeys[r]}hasCallback(e){for(const n of this._strategy.plugins)if(e in n)return!0;return!1}async runCallbacks(e,n){for(const r of this.iterateCallbacks(e))await r(n)}*iterateCallbacks(e){for(const n of this._strategy.plugins)if(typeof n[e]=="function"){const r=this._pluginStateMap.get(n);yield i=>{const o=Object.assign(Object.assign({},i),{state:r});return n[e](o)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){const e=this._extendLifetimePromises.splice(0),r=(await Promise.allSettled(e)).find(s=>s.status==="rejected");if(r)throw r.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let n=e,r=!1;for(const s of this.iterateCallbacks("cacheWillUpdate"))if(n=await s({request:this.request,response:n,event:this.event})||void 0,r=!0,!n)break;return r||n&&n.status!==200&&(n=void 0),n}}class ht{constructor(e={}
vendor: 9,505 bytes, lines 1-2
1){this.cacheName=gn.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[n]=this.handleAll(e);return n}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const n=e.event,r=typeof e.request=="string"?new Request(e.request):e.request,s="params"in e?e.params:void 0,i=new Sn(this,{event:n,request:r,params:s}),o=this._getResponse(i,r,n),a=this._awaitComplete(o,i,r,n);return[o,a]}async _getResponse(e,n,r){await e.runCallbacks("handlerWillStart",{event:r,request:n});let s;try{if(s=await this._handle(n,e),!s||s.type==="error")throw new F("no-response",{url:n.url})}catch(i){if(i instanceof Error){for(const o of e.iterateCallbacks("handlerDidError"))if(s=await o({error:i,event:r,request:n}),s)break}if(!s)throw i}for(const i of e.iterateCallbacks("handlerWillRespond"))s=await i({event:r,request:n,response:s});return s}async _awaitComplete(e,n,r,s){let i,o;try{i=await e}catch{}try{await n.runCallbacks("handlerDidRespond",{event:s,request:r,response:i}),await n.doneWaiting()}catch(a){a instanceof Error&&(o=a)}if(await n.runCallbacks("handlerDidComplete",{event:s,request:r,response:i,error:o}),n.destroy(),o)throw o}}class w extends ht{constructor(e={}){e.cacheName=ke.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(w.copyRedirectedCacheableResponsesPlugin)}async _handle(e,n){const r=await n.cacheMatch(e);return r||(n.event&&n.event.type==="install"?await this._handleInstall(e,n):await this._handleFetch(e,n))}async _handleFetch(e,n){let r;const s=n.params||{};if(this._fallbackToNetwork){const i=s.integrity,o=e.integrity,a=!o||o===i;r=await n.fetch(new Request(e,{integrity:e.mode!=="no-cors"?o||i:void 0})),i&&a&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await n.cachePut(e,r.clone()))}else throw new y("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return r}async _handleInstall(e,n){this._useDefaultCacheabilityPluginIfNeeded();const r=await n.fetch(e);if(!await n.cachePut(e,r.clone()))throw new y("bad-precaching-response",{url:e.url,status:r.status});return r}_useDefaultCacheabilityPluginIfNeeded(){let e=null,n=0;for(const[r,s]of this.plugins.entries())s!==w.copyRedirectedCacheableResponsesPlugin&&(s===w.defaultPrecacheCacheabilityPlugin&&(e=r),s.cacheWillUpdate&&n++);n===0?this.plugins.push(w.defaultPrecacheCacheabilityPlugin):n>1&&e!==null&&this.plugins.splice(e,1)}}w.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:t}){return!t||t.status>=400?null:t}};w.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:t}){return t.redirected?await dn(t):t}};class vn{constructor({cacheName:e,plugins:n=[],fallbackToNetwork:r=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new w({cacheName:ke.getPrecacheName(e),plugins:[...n,new hn({precacheController:this})],fallbackToNetwork:r}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const n=[];for(const r of e){typeof r=="string"?n.push(r):r&&r.revision===void 0&&n.push(r.url);const{cacheKey:s,url:i}=ln(r),o=typeof r!="string"&&r.revision?"reload":"default";if(this._urlsToCacheKeys.has(i)&&this._urlsToCacheKeys.get(i)!==s)throw new y("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(i),secondEntry:s});if(typeof r!="string"&&r.integrity){if(this._cacheKeysToIntegrities.has(s)&&this._cacheKeysToIntegrities.get(s)!==r.integrity)throw new y("add-to-cache-list-conflicting-integrities",{url:i});this._cacheKeysToIntegrities.set(s,r.integrity)}if(this._urlsToCacheKeys.set(i,s),this._urlsToCacheModes.set(i,o),n.length>0){const a=`Workbox is precaching URLs without revision info: ${n.join(", ")}
2This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(a)}}}install(e){return We(e,async()=>{const n=new un;this.strategy.plugins.push(n);for(const[i,o]of this._urlsToCacheKeys){const a=this._cacheKeysToIntegrities.get(o),c=this._urlsToCacheModes.get(i),l=new Request(i,{integrity:a,cache:c,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:o},request:l,event:e}))}const{updatedURLs:r,notUpdatedURLs:s}=n;return{updatedURLs:r,notUpdatedURLs:s}})}activate(e){return We(e,async()=>{const n=await self.caches.open(this.strategy.cacheName),r=await n.keys(),s=new Set(this._urlsToCacheKeys.values()),i=[];for(const o of r)s.has(o.url)||(await n.delete(o),i.push(o.url));return{deletedURLs:i}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const n=new URL(e,location.href);return this._urlsToCacheKeys.get(n.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const n=e instanceof Request?e.url:e,r=this.getCacheKeyForURL(n);if(r)return(await self.caches.open(this.strategy.cacheName)).match(r)}createHandlerBoundToURL(e){const n=this.getCacheKeyForURL(e);if(!n)throw new y("non-precached-url",{url:e});return r=>(r.request=new Request(e),r.params=Object.assign({cacheKey:n},r.params),this.strategy.handle(r))}}let X;const ft=()=>(X||(X=new vn),X);try{self["workbox:core:7.4.0"]&&_()}catch{}const Dn=(t,...e)=>{let n=t;return e.length>0&&(n+=` :: ${JSON.stringify(e)}`),n},Tn=Dn;class ge extends Error{constructor(e,n){const r=Tn(e,n);super(r),this.name=e,this.details=n}}try{self["workbox:routing:7.4.0"]&&_()}catch{}const dt="GET",K=t=>t&&typeof t=="object"?t:{handle:t};class ${constructor(e,n,r=dt){this.handler=K(n),this.match=e,this.method=r}setCatchHandler(e){this.catchHandler=K(e)}}class kn extends ${constructor(e,n,r){const s=({url:i})=>{const o=e.exec(i.href);if(o&&!(i.origin!==location.origin&&o.index!==0))return o.slice(1)};super(s,n,r)}}class An{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:n}=e,r=this.handleRequest({request:n,event:e});r&&e.respondWith(r)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:n}=e.data,r=Promise.all(n.urlsToCache.map(s=>{typeof s=="string"&&(s=[s]);const i=new Request(...s);return this.handleRequest({request:i,event:e})}));e.waitUntil(r),e.ports&&e.ports[0]&&r.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:n}){const r=new URL(e.url,location.href);if(!r.protocol.startsWith("http"))return;const s=r.origin===location.origin,{params:i,route:o}=this.findMatchingRoute({event:n,request:e,sameOrigin:s,url:r});let a=o&&o.handler;const c=e.method;if(!a&&this._defaultHandlerMap.has(c)&&(a=this._defaultHandlerMap.get(c)),!a)return;let l;try{l=a.handle({url:r,request:e,event:n,params:i})}catch(f){l=Promise.reject(f)}const u=o&&o.catchHandler;return l instanceof Promise&&(this._catchHandler||u)&&(l=l.catch(async f=>{if(u)try{return await u.handle({url:r,request:e,event:n,params:i})}catch(S){S instanceof Error&&(f=S)}if(this._catchHandler)return this._catchHandler.handle({url:r,request:e,event:n});throw f})),l}findMatchingRoute({url:e,sameOrigin:n,request:r,event:s}){const i=this._routes.get(r.method)||[];for(const o of i){let a;const c=o.match({url:e,sameOrigin:n,request:r,event:s});if(c)return a=c,(Array.isArray(a)&&a.length===0||c.constructor===Object&&Object.keys(c).length===0||typeof c=="boolean")&&(a=void 0),{route:o,params:a}}return{}}setDefaultHandler(e,n=dt){this._defaultHandlerMap.set(n,K(e))}setCatchHandler(e){this._catchHandler=K(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 ge("unregister-route-but-not-found-with-method",{method:e.method});const n=this._routes.get(e.method).indexOf(e);if(n>-1)this._routes.get(e.method).splice(n,1);else throw new ge("unregister-route-route-not-registered")}}let P;const Rn=()=>(P||(P=new An,P.addFetchListener(),P.addCacheListener()),P);function Ae(t,e,n){let r;if(typeof t=="string"){const i=new URL(t,location.href),o=({url:a})=>a.href===i.href;r=new $(o,e,n)}else if(t instanceof RegExp)r=new kn(t,e,n);else if(typeof t=="function")r=new $(t,e,n);else if(t instanceof $)r=t;else throw new ge("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Rn().registerRoute(r),r}function On(t,e=[]){for(const n of[...t.searchParams.keys()])e.some(r=>r.test(n))&&t.searchParams.delete(n);return t}function*Nn(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:n="index.html",cleanURLs:r=!0,urlManipulation:s}={}){const i=new URL(t,location.href);i.hash="",yield i.href;const o=On(i,e);if(yield o.href,n&&o.pathname.endsWith("/")){const a=new URL(o.href);a.pathname+=n,yield a.href}if(r){const a=new URL(o.href);a.pathname+=".html",yield a.href}if(s){const a=s({url:i});for(const c of a)yield c.href}}class Mn extends ${constructor(e,n){const r=({request:s})=>{const i=e.getURLsToCacheKeys();for(const o of Nn(s.url,n)){const a=i.get(o);if(a){const c=e.getIntegrityForCacheKey(a);return{cacheKey:a,integrity:c}
2}}};super(r,e.strategy)}}function Bn(t){const e=ft(),n=new Mn(e,t);Ae(n)}const Ln="-precache-",Pn=async(t,e=Ln)=>{const r=(await self.caches.keys()).filter(s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t);return await Promise.all(r.map(s=>self.caches.delete(s))),r};function $n(){self.addEventListener("activate",(t=>{const e=ke.getPrecacheName();t.waitUntil(Pn(e).then(n=>{}))}))}function xn(t){ft().precache(t)}function jn(t,e){xn(t),Bn(e)}class pt extends ht{async _handle(e,n){let r=await n.cacheMatch(e),s;if(!r)try{r=await n.fetchAndCachePut(e)}catch(i){i instanceof Error&&(s=i)}if(!r)throw new F("no-response",{url:e.url,error:s});return r}}var qe={};/**
3 * @license
4 * Copyright 2017 Google LLC
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */const gt=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);s<128?e[n++]=s:s<2048?(e[n++]=s>>6|192,e[n++]=s&63|128):(s&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(s=65536+((s&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=s>>18|240,e[n++]=s>>12&63|128,e[n++]=s>>6&63|128,e[n++]=s&63|128):(e[n++]=s>>12|224,e[n++]=s>>6&63|128,e[n++]=s&63|128)}return e},Un=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n++];if(s<128)e[r++]=String.fromCharCode(s);else if(s>191&&s<224){const i=t[n++];e[r++]=String.fromCharCode((s&31)<<6|i&63)}else if(s>239&&s<365){const i=t[n++],o=t[n++],a=t[n++],c=((s&7)<<18|(i&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const i=t[n++],o=t[n++];e[r++]=String.fromCharCode((s&15)<<12|(i&63)<<6|o&63)}}return e.join("")},mt={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let s=0;s<t.length;s+=3){const i=t[s],o=s+1<t.length,a=o?t[s+1]:0,c=s+2<t.length,l=c?t[s+2]:0,u=i>>2,f=(i&3)<<4|a>>4;let S=(a&15)<<2|l>>6,j=l&63;c||(j=64,o||(S=64)),r.push(n[u],n[f],n[S],n[j])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(gt(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):Un(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let s=0;s<t.length;){const i=n[t.charAt(s++)],a=s<t.length?n[t.charAt(s)]:0;++s;const l=s<t.length?n[t.charAt(s)]:64;++s;const f=s<t.length?n[t.charAt(s)]:64;if(++s,i==null||a==null||l==null||f==null)throw new Fn;const S=i<<2|a>>4;if(r.push(S),l!==64){const j=a<<4&240|l>>2;if(r.push(j),f!==64){const nn=l<<6&192|f;r.push(nn)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};
17class Fn extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Kn=function(t){const e=gt(t);return mt.encodeByteArray(e,!0)},bt=function(t){return Kn(t).replace(/\./g,"")},Hn=function(t){try{return mt.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
18 * @license
19 * Copyright 2022 Google LLC
20 *
21 * Licensed under the Apache License, Version 2.0 (the "License");
22 * you may not use this file except in compliance with the License.
23 * You may obtain a copy of the License at
24 *
25 *   http://www.apache.org/licenses/LICENSE-2.0
26 *
27 * Unless required by applicable law or agreed to in writing, software
28 * distributed under the License is distributed on an "AS IS" BASIS,
29 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 * See the License for the specific language governing permissions and
31 * limitations under the License.
32 */function Wn(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
33 * @license
34 * Copyright 2022 Google LLC
35 *
36 * Licensed under the Apache License, Version 2.0 (the "License");
37 * you may not use this file except in compliance with the License.
38 * You may obtain a copy of the License at
39 *
40 *   http://www.apache.org/licenses/LICENSE-2.0
41 *
42 * Unless required by applicable law or agreed to in writing, software
43 * distributed under the License is distributed on an "AS IS" BASIS,
44 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45 * See the License for the specific language governing permissions and
46 * limitations under the License.
47 */const Vn=()=>Wn().__FIREBASE_DEFAULTS__,qn=()=>
47{if(typeof process>"u"||typeof qe>"u")return;const t=qe.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},zn=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&Hn(t[1]);return e&&JSON.parse(e)},Gn=()=>{try{return Vn()||qn()||zn()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},wt=()=>{var t;return(t=Gn())===null||t===void 0?void 0:t.config};/**
48 * @license
49 * Copyright 2017 Google LLC
50 *
51 * Licensed under the Apache License, Version 2.0 (the "License");
52 * you may not use this file except in compliance with the License.
53 * You may obtain a copy of the License at
54 *
55 *   http://www.apache.org/licenses/LICENSE-2.0
56 *
57 * Unless required by applicable law or agreed to in writing, software
58 * distributed under the License is distributed on an "AS IS" BASIS,
59 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
60 * See the License for the specific language governing permissions and
61 * limitations under the License.
62 */class Jn{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}function yt(){try{return typeof indexedDB=="object"}catch{return!1}}function _t(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(r);s.onsuccess=()=>{s.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},s.onupgradeneeded=()=>{n=!1},s.onerror=()=>{var i;e(((i=s.error)===null||i===void 0?void 0:i.message)||"")}}catch(n){e(n)}})}/**
63 * @license
64 * Copyright 2017 Google LLC
65 *
66 * Licensed under the Apache License, Version 2.0 (the "License");
67 * you may not use this file except in compliance with the License.
68 * You may obtain a copy of the License at
69 *
70 *   http://www.apache.org/licenses/LICENSE-2.0
71 *
72 * Unless required by applicable law or agreed to in writing, software
73 * distributed under the License is distributed on an "AS IS" BASIS,
74 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
75 * See the License for the specific language governing permissions and
76 * limitations under the License.
77 */const Yn="FirebaseError";class B extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Yn,Object.setPrototypeOf(this,B.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,z.prototype.create)}}class z{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},s=`${this.service}/${e}`,i=this.errors[e],o=i?Qn(i,r):"Error",a=`${this.serviceName}: ${o} (${s}).`;return new B(s,a,r)}}function Qn(t,e){return t.replace(Xn,(n,r)=>{const s=e[r];return s!=null?String(s):`<${r}?>`})}const Xn=/\{\$([^}]+)}/g;function me(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const s of n){if(!r.includes(s))return!1;const i=t[s],o=e[s];if(ze(i)&&ze(o)){if(!me(i,o))return!1}else if(i!==o)return!1}for(const s of r)if(!n.includes(s))return!1;return!0}function ze(t){return t!==null&&typeof t=="object"}/**
78 * @license
79 * Copyright 2021 Google LLC
80 *
81 * Licensed under the Apache License, Version 2.0 (the "License");
82 * you may not use this file except in compliance with the License.
83 * You may obtain a copy of the License at
84 *
85 *   http://www.apache.org/licenses/LICENSE-2.0
86 *
87 * Unless required by applicable law or agreed to in writing, software
88 * distributed under the License is distributed on an "AS IS" BASIS,
89 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
90 * See the License for the specific language governing permissions and
91 * limitations under the License.
92 */function It(t){return t&&t._delegate?t._delegate:t}class T{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
93 * @license
94 * Copyright 2019 Google LLC
95 *
96 * Licensed under the Apache License, Version 2.0 (the "License");
97 * you may not use this file except in compliance with the License.
98 * You may obtain a copy of the License at
99 *
100 *   http://www.apache.org/licenses/LICENSE-2.0
101 *
102 * Unless required by applicable law or agreed to in writing, software
103 * distributed under the License is distributed on an "AS IS" BASIS,
104 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
105 * See the License for the specific language governing permissions and
106 * limitations under the License.
107 */const v="[DEFAULT]";/**
108 * @license
109 * Copyright 2019 Google LLC
110 *
111 * Licensed under the Apache License, Version 2.0 (the "License");
112 * you may not use this file except in compliance with the License.
113 * You may obtain a copy of the License at
114 *
115 *   http://www.apache.org/licenses/LICENSE-2.0
116 *
117 * Unless required by applicable law or agreed to in writing, software
118 * distributed under the License is distributed on an "AS IS" BASIS,
119 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
120 * See the License for the specific language governing permissions and
121 * limitations under the License.
122 */class Zn{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new Jn;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const s=this.getOrInitializeService({instanceIdentifier:n});s&&r.resolve(s)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),s=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(i){if(s)return null;throw i}else{if(s)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(tr(e))try{this.getOrInitializeService({instanceIdentifier:v})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(n);try{const i=this.getOrInitializeService({instanceIdentifier:s});r.resolve(i)}catch{}}}}clearInstance(e=v){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=v){return this.instances.has(e)}getOptions(e=v){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const s=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[i,o]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(i);r===a&&o.resolve(s)}return s}onInit(e,n){var r;const s=this.normalizeInstanceIdentifier(n),i=(r=this.onInitCallbacks.get(s))!==null&&r!==void 0?r:new Set;i.add(e),this.onInitCallbacks.set(s,i);const o=this.instances.get(s);return o&&e(o,s),()=>{i.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const s of r)try{s(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:er(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=v){return this.component?this.component.multipleInstances?e:v:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function er(t){return t===v?void 0:t}function tr(t){return t.instantiationMode==="EAGER"}/**
123 * @license
124 * Copyright 2019 Google LLC
125 *
126 * Licensed under the Apache License, Version 2.0 (the "License");
127 * you may not use this file except in compliance with the License.
128 * You may obtain a copy of the License at
129 *
130 *   http://www.apache.org/licenses/LICENSE-2.0
131 *
132 * Unless required by applicable law or agreed to in writing, software
133 * distributed under the License is distributed on an "AS IS" BASIS,
134 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
135 * See the License for the specific language governing permissions and
136 * limitations under the License.
137 */class nr{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new Zn(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/**
138 * @license
139 * Copyright 2017 Google LLC
140 *
141 * Licensed under the Apache License, Version 2.0 (the "License");
142 * you may not use this file except in compliance with the License.
143 * You may obtain a copy of the License at
144 *
145 *   http://www.apache.org/licenses/LICENSE-2.0
146 *
147 * Unless required by applicable law or agreed to in writing, software
148 * distributed under the License is distributed on an "AS IS" BASIS,
149 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
150 * See the License for the specific language governing permissions and
151 * limitations under the License.
152 */var h;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(h||(h={}));const rr={debug:h.DEBUG,verbose:h.VERBOSE,info:h.INFO,warn:h.WARN,error:h.ERROR,silent:h.SILENT},sr=h.INFO,ir={[h.DEBUG]:"log",[h.VERBOSE]:"log",[h.INFO]:"info",[h.WARN]:"warn",[h.ERROR]:"error"},or=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),s=ir[e];if(s)console[s](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class ar{constructor(e){this.name=e,this._logLevel=sr,this._logHandler=or,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in h))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?rr[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,h.DEBUG,...e),this._logHandler(this,h.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,h.VERBOSE,...e),this._logHandler(this,h.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,h.INFO,...e),this._logHandler(this,h.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,h.WARN,...e),this._logHandler(this,h.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,h.ERROR,...e),this._logHandler(this,h.ERROR,...e)}}const cr=(t,e)=>e.some(n=>t instanceof n);let Ge,Je;function lr(){return Ge||(Ge=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ur(){return Je||(Je=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Et=new WeakMap,be=new WeakMap,Ct=new WeakMap,Z=new WeakMap,Re=new WeakMap;function hr(t){const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{n(I(t.result)),s()},o=()=>{r(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&Et.set(n,t)}).catch(()=>{}),Re.set(e,t),e}function fr(t){if(be.has(t))return;const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{n(),s()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});be.set(t,e)}let we={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return be.get(t);if(e==="objectStoreNames")return t.objectStoreNames||Ct.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return I(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function dr(t){we=t(we)}function pr(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(ee(this),e,...n);return Ct.set(r,e.sort?e.sort():[e]),I(r)}:ur().includes(t)?function(...e){return t.apply(ee(this),e),I(Et.get(this))}:function(...e){return I(t.apply(ee(this),e))}}function gr(t){return typeof t=="function"?pr(t):(t instanceof IDBTransaction&&fr(t),cr(t,lr())?new Proxy(t,we):t)}function I(t){if(t instanceof IDBRequest)return hr(t);if(Z.has(t))return Z.get(t);const e=gr(t);return e!==t&&(Z.set(t,e),Re.set(e,t)),e}const ee=t=>Re.get(t);function mr(t,e,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=I(o);return r&&o.addEventListener("upgradeneeded",c=>{r(I(o.result),c.oldVersion,c.newVersion,I(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),a.then(c=>{i&&c.addEventListener("close",()=>i()),s&&c.addEventListener("versionchange",l=>s(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const br=["get","getKey","getAll","getAllKeys","count"],wr=["put","add","delete","clear"],te=new Map;function Ye(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(te.get(e))return te.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,s=wr.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(s||br.includes(n)))return;const i=async function(o,...a){const c=this.transaction(o,s?"readwrite":"readonly");let l=c.store;
152return r&&(l=l.index(a.shift())),(await Promise.all([l[n](...a),s&&c.done]))[0]};return te.set(e,i),i}dr(t=>({...t,get:(e,n,r)=>Ye(e,n)||t.get(e,n,r),has:(e,n)=>!!Ye(e,n)||t.has(e,n)}));/**
153 * @license
154 * Copyright 2019 Google LLC
155 *
156 * Licensed under the Apache License, Version 2.0 (the "License");
157 * you may not use this file except in compliance with the License.
158 * You may obtain a copy of the License at
159 *
160 *   http://www.apache.org/licenses/LICENSE-2.0
161 *
162 * Unless required by applicable law or agreed to in writing, software
163 * distributed under the License is distributed on an "AS IS" BASIS,
164 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
165 * See the License for the specific language governing permissions and
166 * limitations under the License.
167 */class yr{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(_r(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function _r(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const ye="@firebase/app",Qe="0.9.13";/**
168 * @license
169 * Copyright 2019 Google LLC
170 *
171 * Licensed under the Apache License, Version 2.0 (the "License");
172 * you may not use this file except in compliance with the License.
173 * You may obtain a copy of the License at
174 *
175 *   http://www.apache.org/licenses/LICENSE-2.0
176 *
177 * Unless required by applicable law or agreed to in writing, software
178 * distributed under the License is distributed on an "AS IS" BASIS,
179 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
180 * See the License for the specific language governing permissions and
181 * limitations under the License.
182 */const k=new ar("@firebase/app"),Ir="@firebase/app-compat",Er="@firebase/analytics-compat",Cr="@firebase/analytics",Sr="@firebase/app-check-compat",vr="@firebase/app-check",Dr="@firebase/auth",Tr="@firebase/auth-compat",kr="@firebase/database",Ar="@firebase/database-compat",Rr="@firebase/functions",Or="@firebase/functions-compat",Nr="@firebase/installations",Mr="@firebase/installations-compat",Br="@firebase/messaging",Lr="@firebase/messaging-compat",Pr="@firebase/performance",$r="@firebase/performance-compat",xr="@firebase/remote-config",jr="@firebase/remote-config-compat",Ur="@firebase/storage",Fr="@firebase/storage-compat",Kr="@firebase/firestore",Hr="@firebase/firestore-compat",Wr="firebase";/**
183 * @license
184 * Copyright 2019 Google LLC
185 *
186 * Licensed under the Apache License, Version 2.0 (the "License");
187 * you may not use this file except in compliance with the License.
188 * You may obtain a copy of the License at
189 *
190 *   http://www.apache.org/licenses/LICENSE-2.0
191 *
192 * Unless required by applicable law or agreed to in writing, software
193 * distributed under the License is distributed on an "AS IS" BASIS,
194 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
195 * See the License for the specific language governing permissions and
196 * limitations under the License.
197 */const _e="[DEFAULT]",Vr={[ye]:"fire-core",[Ir]:"fire-core-compat",[Cr]:"fire-analytics",[Er]:"fire-analytics-compat",[vr]:"fire-app-check",[Sr]:"fire-app-check-compat",[Dr]:"fire-auth",[Tr]:"fire-auth-compat",[kr]:"fire-rtdb",[Ar]:"fire-rtdb-compat",[Rr]:"fire-fn",[Or]:"fire-fn-compat",[Nr]:"fire-iid",[Mr]:"fire-iid-compat",[Br]:"fire-fcm",[Lr]:"fire-fcm-compat",[Pr]:"fire-perf",[$r]:"fire-perf-compat",[xr]:"fire-rc",[jr]:"fire-rc-compat",[Ur]:"fire-gcs",[Fr]:"fire-g
197cs-compat",[Kr]:"fire-fst",[Hr]:"fire-fst-compat","fire-js":"fire-js",[Wr]:"fire-js-all"};/**
198 * @license
199 * Copyright 2019 Google LLC
200 *
201 * Licensed under the Apache License, Version 2.0 (the "License");
202 * you may not use this file except in compliance with the License.
203 * You may obtain a copy of the License at
204 *
205 *   http://www.apache.org/licenses/LICENSE-2.0
206 *
207 * Unless required by applicable law or agreed to in writing, software
208 * distributed under the License is distributed on an "AS IS" BASIS,
209 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
210 * See the License for the specific language governing permissions and
211 * limitations under the License.
212 */const H=new Map,Ie=new Map;function qr(t,e){try{t.container.addComponent(e)}catch(n){k.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function M(t){const e=t.name;if(Ie.has(e))return k.debug(`There were multiple attempts to register component ${e}.`),!1;Ie.set(e,t);for(const n of H.values())qr(n,t);return!0}function Oe(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}/**
213 * @license
214 * Copyright 2019 Google LLC
215 *
216 * Licensed under the Apache License, Version 2.0 (the "License");
217 * you may not use this file except in compliance with the License.
218 * You may obtain a copy of the License at
219 *
220 *   http://www.apache.org/licenses/LICENSE-2.0
221 *
222 * Unless required by applicable law or agreed to in writing, software
223 * distributed under the License is distributed on an "AS IS" BASIS,
224 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
225 * See the License for the specific language governing permissions and
226 * limitations under the License.
227 */const zr={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
227d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},E=new z("app","Firebase",zr);/**
228 * @license
229 * Copyright 2019 Google LLC
230 *
231 * Licensed under the Apache License, Version 2.0 (the "License");
232 * you may not use this file except in compliance with the License.
233 * You may obtain a copy of the License at
234 *
235 *   http://www.apache.org/licenses/LICENSE-2.0
236 *
237 * Unless required by applicable law or agreed to in writing, software
238 * distributed under the License is distributed on an "AS IS" BASIS,
239 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
240 * See the License for the specific language governing permissions and
241 * limitations under the License.
242 */class Gr{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new T("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw E.create("app-deleted",{appName:this._name})}}function St(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:_e,automaticDataCollectionEnabled:!1},e),s=r.name;if(typeof s!="string"||!s)throw E.create("bad-app-name",{appName:String(s)});if(n||(n=wt()),!n)throw E.create("no-options");const i=H.get(s);if(i){if(me(n,i.options)&&me(r,i.config))return i;throw E.create("duplicate-app",{appName:s})}const o=new nr(s);for(const c of Ie.values())o.addComponent(c);const a=new Gr(n,r,o);return H.set(s,a),a}function Jr(t=_e){const e=H.get(t);if(!e&&t===_e&&wt())return St();if(!e)throw E.create("no-app",{appName:t});return e}function N(t,e,n){var r;let s=(r=Vr[t])!==null&&r!==void 0?r:t;n&&(s+=`-${n}`);const i=s.match(/\s|\//),o=e.match(/\s|\//);if(i||o){const a=[`Unable to register library "${s}" with version "${e}":`];i&&a.push(`library name "${s}" contains illegal characters (whitespace or "/")`),i&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),k.warn(a.join(" "));return}M(new T(`${s}-version`,()=>({library:s,version:e}),"VERSION"))}/**
243 * @license
244 * Copyright 2021 Google LLC
245 *
246 * Licensed under the Apache License, Version 2.0 (the "License");
247 * you may not use this file except in compliance with the License.
248 * You may obtain a copy of the License at
249 *
250 *   http://www.apache.org/licenses/LICENSE-2.0
251 *
252 * Unless required by applicable law or agreed to in writing, software
253 * distributed under the License is distributed on an "AS IS" BASIS,
254 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
255 * See the License for the specific language governing permissions and
256 * limitations under the License.
257 */const Yr="firebase-heartbeat-database",Qr=1,x="firebase-heartbeat-store";let ne=null;function vt(){return ne||(ne=mr(Yr,Qr,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(x)}}}).catch(t=>{throw E.create("idb-open",{originalErrorMessage:t.message})})),ne}async function Xr(t){try{return await(await vt()).transaction(x).objectStore(x).get(Dt(t))}catch(e){if(e instanceof B)k.warn(e.message);else{const n=E.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});k.warn(n.message)}}}async function Xe(t,e){try{const r=(await vt()).transaction(x,"readwrite");await r.objectStore(x).put(e,Dt(t)),await r.done}catch(n){if(n instanceof B)k.warn(n.message);else{const r=E.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});k.warn(r.message)}}}function Dt(t){return`${t.name}!${t.options.appId}`}/**
258 * @license
259 * Copyright 2021 Google LLC
260 *
261 * Licensed under the Apache License, Version 2.0 (the "License");
262 * you may not use this file except in compliance with the License.
263 * You may obtain a copy of the License at
264 *
265 *   http://www.apache.org/licenses/LICENSE-2.0
266 *
267 * Unless required by applicable law or agreed to in writing, software
268 * distributed under the License is distributed on an "AS IS" BASIS,
269 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
270 * See the License for the specific language governing permissions and
271 * limitations under the License.
272 */const Zr=1024,es=720*60*60*1e3;class ts{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new rs(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=Ze();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(s=>s.date===r)))return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{const i=new Date(s.date).valueOf();return Date.now()-i<=es}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=Ze(),{heartbeatsToSend:n,unsentEntries:r}=ns(this._heartbeatsCache.heartbeats),s=bt(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}}function Ze(){return new Date().toISOString().substring(0,10)}function ns(t,e=Zr){const n=[];let r=t.slice();for(const s of t){const i=n.find(o=>o.agent===s.agent);if(i){if(i.dates.push(s.date),et(n)>e){i.dates.pop();break}}else if(n.push({agent:s.agent,dates:[s.date]}),et(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class rs{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return yt()?_t().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await Xr(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const s=await this.read();return Xe(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:s.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const s=await this.read();return Xe(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...e.heartbeats]})}else return}}function et(t){return bt(JSON.stringify({version:2,heartbeats:t})).length}/**
273 * @license
274 * Copyright 2019 Google LLC
275 *
276 * Licensed under the Apache License, Version 2.0 (the "License");
277 * you may not use this file except in compliance with the License.
278 * You may obtain a copy of the License at
279 *
280 *   http://www.apache.org/licenses/LICENSE-2.0
281 *
282 * Unless required by applicable law or agreed to in writing, software
283 * distributed under the License is distributed on an "AS IS" BASIS,
284 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
285 * See the License for the specific language governing permissions and
286 * limitations under the License.
287 */function ss(t){M(new T("platform-logger",e=>new yr(e),"PRIVATE")),M(new T("heartbeat",e=>new ts(e),"PRIVATE")),N(ye,Qe,t),N(ye,Qe,"esm2017"),N("fire-js","")}ss("");var is="firebase",os="9.23.0";/**
288 * @license
289 * Copyright 2020 Google LLC
290 *
291 * Licensed under the Apache License, Version 2.0 (the "License");
292 * you may not use this file except in compliance with the License.
293 * You may obtain a copy of the License at
294 *
295 *   http://www.apache.org/licenses/LICENSE-2.0
296 *
297 * Unless required by applicable law or agreed to in writing, softw
297are
298 * distributed under the License is distributed on an "AS IS" BASIS,
299 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
300 * See the License for the specific language governing permissions and
301 * limitations under the License.
302 */N(is,os,"app");const as=(t,e)=>e.some(n=>t instanceof n);let tt,nt;function cs(){return tt||(tt=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ls(){return nt||(nt=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Tt=new WeakMap,Ee=new WeakMap,kt=new WeakMap,re=new WeakMap,Ne=new WeakMap;function us(t){const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{n(C(t.result)),s()},o=()=>{r(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&Tt.set(n,t)}).catch(()=>{}),Ne.set(e,t),e}function hs(t){if(Ee.has(t))return;const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{n(),s()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});Ee.set(t,e)}let Ce={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Ee.get(t);if(e==="objectStoreNames")return t.objectStoreNames||kt.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return C(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function fs(t){Ce=t(Ce)}function ds(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(se(this),e,...n);return kt.set(r,e.sort?e.sort():[e]),C(r)}:ls().includes(t)?function(...e){return t.apply(se(this),e),C(Tt.get(this))}:function(...e){return C(t.apply(se(this),e))}}function ps(t){return typeof t=="function"?ds(t):(t instanceof IDBTransaction&&hs(t),as(t,cs())?new Proxy(t,Ce):t)}function C(t){if(t instanceof IDBRequest)return us(t);if(re.has(t))return re.get(t);const e=ps(t);return e!==t&&(re.set(t,e),Ne.set(e,t)),e}const se=t=>Ne.get(t);function gs(t,e,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=C(o);return r&&o.addEventListener("upgradeneeded",c=>{r(C(o.result),c.oldVersion,c.newVersion,C(o.transaction))}),n&&o.addEventListener("blocked",()=>n()),a.then(c=>{i&&c.addEventListener("close",()=>i()),s&&c.addEventListener("versionchange",()=>s())}).catch(()=>{}),a}const ms=["get","getKey","getAll","getAllKeys","count"],bs=["put","add","delete","clear"],ie=new Map;function rt(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(ie.get(e))return ie.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,s=bs.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(s||ms.includes(n)))return;const i=async function(o,...a){const c=this.transaction(o,s?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(a.shift())),(await Promise.all([l[n](...a),s&&c.done]))[0]};return ie.set(e,i),i}fs(t=>({...t,get:(e,n,r)=>rt(e,n)||t.get(e,n,r),has:(e,n)=>!!rt(e,n)||t.has(e,n)}));const At="@firebase/installations",Me="0.6.4";/**
303 * @license
304 * Copyright 2019 Google LLC
305 *
306 * Licensed under the Apache License, Version 2.0 (the "License");
307 * you may not use this file except in compliance with the License.
308 * You may obtain a copy of the License at
309 *
310 *   http://www.apache.org/licenses/LICENSE-2.0
311 *
312 * Unless required by applicable law or agreed to in writing, software
313 * distributed under the License is distributed on an "AS IS" BASIS,
314 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
315 * See the License for the specific language governing permissions and
316 * limitations under the License.
317 */const Rt=1e4,Ot=`w:${Me}`,Nt="FIS_v2",ws="https://firebaseinstallations.googleapis.com/v1",ys=3600*1e3,_s="installations",Is="Installations";/**
318 * @license
319 * Copyright 2019 Google LLC
320 *
321 * Licensed under the Apache License, Version 2.0 (the "License");
322 * you may not use this file except in compliance with the License.
323 * You may obtain a copy of the License at
324 *
325 *   http://www.apache.org/licenses/LICENSE-2.0
326 *
327 * Unless required by applicable law or agreed to in writing, software
328 * distributed under the License is distributed on an "AS IS" BASIS,
329 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
330 * See the License for the specific language governing permissions and
331 * limitations under the License.
332 */const Es={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},A=new z(_s,Is,Es);function Mt(t){return t instanceof B&&t.code.includes("request-failed")}/**
333 * @license
334 * Copyright 2019 Google LLC
335 *
336 * Licensed under the Apache License, Version 2.0 (the "License");
337 * you may not use this file except in compliance with the License.
338 * You may obtain a copy of the License at
339 *
340 *   http://www.apache.org/licenses/LICENSE-2.0
341 *
342 * Unless required by applicable law or agreed to in writing, software
343 * distributed under the License is distributed on an "AS IS" BASIS,
344 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
345 * See the License for the specific language governing permissions and
346 * limitations under the License.
347 */function Bt({projectId:t}){return`${ws}/projects/${t}/installations`}function Lt(t){return{token:t.token,requestStatus:2,expiresIn:Ss(t.expiresIn),creationTime:Date.now()}}async function Pt(t,e){const r=(await e.json()).error;return A.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function $t({apiKey:t}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function Cs(t,{refreshToken:e}){const n=$t(t);return n.append("Authorization",vs(e)),n}async function xt(t){const e=await t();return e.status>=500&&e.status<600?t():e}function Ss(t){return Number(t.replace("s","000"))}function vs(t){return`${Nt} ${t}`}/**
348 * @license
349 * Copyright 2019 Google LLC
350 *
351 * Licensed under the Apache License, Version 2.0 (the "License");
352 * you may not use this file except in compliance with the License.
353 * You may obtain a copy of the License at
354 *
355 *   http://www.apache.org/licenses/LICENSE-2.0
356 *
357 * Unless required by applicable law or agreed to in writing, software
358 * distributed under the License is distributed on an "AS IS" BASIS,
359 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
360 * See the License for the specific language governing permissions and
361 * limitations under the License.
362 */async function Ds({appConfig:t,heartbeatServiceProvider:e},{fid:n}){const r=Bt(t),s=$t(t),i=e.getImmediate({optional:!0});if(i){const l=await i.getHeartbeatsHeader();l&&s.append("x-firebase-client",l)}const o={fid:n,authVersion:Nt,appId:t.appId,sdkVersion:Ot},a={method:"POST",headers:s,body:JSON.stringify(o)},c=await xt(()=>fetch(r,a));if(c.ok){const l=await c.json();return{fid:l.fid||n,registrationStatus:2,refreshToken:l.refreshToken,authToken:Lt(l.authToken)}}else throw await Pt("Create Installation",c)}/**
363 * @license
364 * Copyright 2019 Google LLC
365 *
366 * Licensed under the Apache License, Version 2.0 (the "License");
367 * you may not use this file except in compliance with the License.
368 * You may obtain a copy of the License at
369 *
370 *   http://www.apache.org/licenses/LICENSE-2.0
371 *
372 * Unless required by applicable law or agreed to in writing, software
373 * distributed under the License is distributed on an "AS IS" BASIS,
374 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
375 * See the License for the specific language governing permissions and
376 * limitations under the License.
377 */function jt(t){return new Promise(e=>{setTimeout(e,t)})}/**
378 * @license
379 * Copyright 2019 Google LLC
380 *
381 * Licensed under the Apache License, Version 2.0 (the "License");
382 * you may not use this file except in compliance with the License.
383 * You may obtain a copy of the License at
384 *
385 *   http://www.apache.org/licenses/LICENSE-2.0
386 *
387 * Unless required by applicable law or agreed to in writing, software
388 * distributed under the License is distributed on an "AS IS" BASIS,
389 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
390 * See the License for the specific language governing permissions and
391 * limitations under the License.
392 */function Ts(t){return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")}/**
393 * @license
394 * Copyright 2019 Google LLC
395 *
396 * Licensed under the Apache License, Version 2.0 (the "License");
397 * you may not use this file except in compliance with the License.
398 * You may obtain a copy of the License at
399 *
400 *   http://www.apache.org/licenses/LICENSE-2.0
401 *
402 * Unless required by applicable law or agreed to in writing, software
403 * distributed under the License is distributed on an "AS IS" BASIS,
404 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
405 * See the License for the specific language governing permissions and
406 * limitations under the License.
407 */const ks=/^[cdef][\w-]{21}$/,Se="";function As(){try{const t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;const n=Rs(t);return ks.test(n)?n:Se}catch{return Se}}function Rs(t){return Ts(t).substr(0,22)}/**
408 * @license
409 * Copyright 2019 Google LLC
410 *
411 * Licensed under the Apache License, Version 2.0 (the "License");
412 * you may not use this file except in compliance with the License.
413 * You may obtain a copy of the License at
414 *
415 *   http://www.apache.org/licenses/LICENSE-2.0
416 *
417 * Unless required by applicable law or agreed to in writing, software
418 * distributed under the License is distributed on an "AS IS" BASIS,
419 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
420 * See the License for the specific language governing permissions and
421 * limitations under the License.
422 */function G(t){return`${t.appName}!${t.appId}`}/**
423 * @license
424 * Copyright 2019 Google LLC
425 *
426 * Licensed under the Apache License, Version 2.0 (the "License");
427 * you may not use this file except in compliance with the License.
428 * You may obtain a copy of the License at
429 *
430 *   http://www.apache.org/licenses/LICENSE-2.0
431 *
432 * Unless required by applicable law or agreed to in writing, software
433 * distributed under the License is distributed on an "AS IS" BASIS,
434 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
435 * See the License for the specific language governing permissions and
436 * limitations under the License.
437 */const Ut=new Map;function Ft(t,e){const n=G(t);Kt(n,e),Os(n,e)}function Kt(t,e){const n=Ut.get(t);if(n)for(const r of n)r(e)}function Os(t,e){const n=Ns();n&&n.postMessage({key:t,fid:e}),Ms()}let D=null;function Ns(){return!D&&"BroadcastChannel"in self&&(D=new BroadcastChannel("[Firebase] FID Change"),D.onmessage=t=>{Kt(t.data.key,t.data.fid)}),D}function Ms(){Ut.size===0&&D&&(D.close(),D=null)}/**
438 * @license
439 * Copyright 2019 Google LLC
440 *
441 * Licensed under the Apache License, Version 2.0 (the "License");
442 * you may not use this file except in compliance with the License.
443 * You may obtain a copy of the License at
444 *
445 *   http://www.apache.org/licenses/LICENSE-2.0
446 *
447 * Unless required by applicable law or agreed to in writing, software
448 * distributed under the License is distributed on an "AS IS" BASIS,
449 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
450 * See the License for the specific language governing permissions and
451 * limitations under the License.
452 */const Bs="firebase-installations-database",Ls=1,R="firebase-installations-store";let oe=null;function Be(){return oe||(oe=gs(Bs,Ls,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(R)}}})),oe}async function W(t,e){const n=G(t),s=(await Be()).transaction(R,"readwrite"),i=s.objectStore(R),o=await i.get(n);return await i.put(e,n),await s.done,(!o||o.fid!==e.fid)&&Ft(t,e.fid),e}async function Ht(t){const e=G(t),r=(await Be()).transaction(R,"readwrite");await r.objectStore(R).delete(e),await r.done}async function J(t,e){const n=G(t),s=(await Be()).transaction(R,"readwrite"),i=s.objectStore(R),o=await i.get(n),a=e(o);return a===void 0?await i.delete(n):await i.put(a,n),await s.done,a&&(!o||o.fid!==a.fid)&&Ft(t,a.fid),a}/**
453 * @license
454 * Copyright 2019 Google LLC
455 *
456 * Licensed under the Apache License, Version 2.0 (the "License");
457 * you may not use this file except in compliance with the License.
458 * You may obtain a copy of the License at
459 *
460 *   http://www.apache.org/licenses/LICENSE-2.0
461 *
462 * Unless required by applicable law or agreed to in writing, software
463 * distributed under the License is distributed on an "AS IS" BASIS,
464 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
465 * See the License for the specific language governing permissions and
466 * limitations under the License.
467 */async function Le(t){let e;const n=await J(t.appConfig,r=>{const s=Ps(r),i=$s(t,s);return e=i.registrationPromise,i.installationEntry});return n.fid===Se?{installationEntry:await e}:{installationEntry:n,registrationPromise:e}}function Ps(t){const e=t||{fid:As(),registrationStatus:0};return Wt(e)}function $s(t,e){if(e.registrationStatus===0){if(!navigator.onLine){const s=Promise.reject(A.create("app-offline"));return{installationEntry:e,registrationPromise:s}}const n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},r=xs(t,n);return{installationEntry:n,registrationPromise:r}}else return e.registrationStatus===1?{installationEntry:e,registrationPromise:js(t)}:{installationEntry:e}}async function xs(t,e){try{const n=await Ds(t,e);return W(t.appConfig,n)}catch(n){throw Mt(n)&&n.customData.serverCode===409?await Ht(t.appConfig):await W(t.appConfig,{fid:e.fid,registrationStatus:0}),n}}async function js(t){let e=await st(t.appConfig);for(;e.registrationStatus===1;)await jt(100),e=await st(t.appConfig);if(e.registrationStatus===0){const{installationEntry:n,registrationPromise:r}=await Le(t);return r||n}return e}function st(t){return J(t,e=>{if(!e)throw A.create("installation-not-found");return Wt(e)})}function Wt(t){return Us(t)?{fid:t.fid,registrationStatus:0}:t}function Us(t){return t.registrationStatus===1&&t.registrationTime+Rt<Date.now()}/**
468 * @license
469 * Copyright 2019 Google LLC
470 *
471 * Licensed under the Apache License, Version 2.0 (the "License");
472 * you may not use this file except in compliance with the License.
473 * You may obtain a copy of the License at
474 *
475 *   http://www.apache.org/licenses/LICENSE-2.0
476 *
477 * Unless required by applicable law or agreed to in writing, software
478 * distributed under the License is distributed on an "AS IS" BASIS,
479 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
480 * See the License for the specific language governing permissions and
481 * limitations under the License.
482 */async function Fs({appConfig:t,heartbeatServiceProvider:e},n){const r=Ks(t,n),s=Cs(t,n),i=e.getImmediate({optional:!0});if(i){const l=await i.getHeartbeatsHeader();l&&s.append("x-firebase-client",l)}const o={installation:{sdkVersion:Ot,appId:t.appId}},a={method:"POST",headers:s,body:JSON.stringify(o)},c=await xt(()=>fetch(r,a));if(c.ok){const l=await c.json();return Lt(l)}else throw await Pt("Generate Auth Token",c)}function Ks(t,{fid:e}){return`${Bt(t)}/${e}/authTokens:generate`}/**
483 * @license
484 * Copyright 2019 Google LLC
485 *
486 * Licensed under the Apache License, Version 2.0 (the "License");
487 * you may not use this file except in compliance with the License.
488 * You may obtain a copy of the License at
489 *
490 *   http://www.apache.org/licenses/LICENSE-2.0
491 *
492 * Unless required by applicable law or agreed to in writing, software
493 * distributed under the License is distributed on an "AS IS" BASIS,
494 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
495 * See the License for the specific language governing permissions and
496 * limitations under the License.
497 */async function Pe(t,e=!1){let n;const r=await J(t.appConfig,i=>{if(!Vt(i))throw A.create("not-registered");const o=i.authToken;if(!e&&Vs(o))return i;if(o.requestStatus===1)return n=Hs(t,e),i;{if(!navigator.onLine)throw A.create("app-offline");const a=zs(i);return n=Ws(t,a),a}});return n?await n:r.authToken}async function Hs(t,e){let n=await it(t.appConfig);for(;n.authToken.requestStatus===1;)await jt(100),n=await it(t.appConfig);const r=n.authToken;return r.requestStatus===0?Pe(t,e):r}function it(t){return J(t,e=>{if(!Vt(e))throw A.create("not-registered");const n=e.authToken;return Gs(n)?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}async function Ws(t,e){try{const n=await Fs(t,e),r=Object.assign(Object.assign({},e),{authToken:n});return await W(t.appConfig,r),n}catch(n){if(Mt(n)&&(n.customData.serverCode===401||n.customData.serverCode===404))await Ht(t.appConfig);else{const r=Object.assign(Object.assign({},e),{authToken:{requestStatus:0}});await W(t.appConfig,r)}throw n}}function Vt(t){return t!==void 0&&t.registrationStatus===2}function Vs(t){return t.requestStatus===2&&!qs(t)}function qs(t){const e=Date.now();
497return e<t.creationTime||t.creationTime+t.expiresIn<e+ys}function zs(t){const e={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},t),{authToken:e})}function Gs(t){return t.requestStatus===1&&t.requestTime+Rt<Date.now()}/**
498 * @license
499 * Copyright 2019 Google LLC
500 *
501 * Licensed under the Apache License, Version 2.0 (the "License");
502 * you may not use this file except in compliance with the License.
503 * You may obtain a copy of the License at
504 *
505 *   http://www.apache.org/licenses/LICENSE-2.0
506 *
507 * Unless required by applicable law or agreed to in writing, software
508 * distributed under the License is distributed on an "AS IS" BASIS,
509 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
510 * See the License for the specific language governing permissions and
511 * limitations under the License.
512 */async function Js(t){const e=t,{installationEntry:n,registrationPromise:r}=await Le(e);return r?r.catch(console.error):Pe(e).catch(console.error),n.fid}/**
513 * @license
514 * Copyright 2019 Google LLC
515 *
516 * Licensed under the Apache License, Version 2.0 (the "License");
517 * you may not use this file except in compliance with the License.
518 * You may obtain a copy of the License at
519 *
520 *   http://www.apache.org/licenses/LICENSE-2.0
521 *
522 * Unless required by applicable law or agreed to in writing, software
523 * distributed under the License is distributed on an "AS IS" BASIS,
524 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
525 * See the License for the specific language governing permissions and
526 * limitations under the License.
527 */async function Ys(t,e=!1){const n=t;return await Qs(n),(await Pe(n,e)).token}async function Qs(t){const{registrationPromise:e}=await Le(t);e&&await e}/**
528 * @license
529 * Copyright 2019 Google LLC
530 *
531 * Licensed under the Apache License, Version 2.0 (the "License");
532 * you may not use this file except in compliance with the License.
533 * You may obtain a copy of the License at
534 *
535 *   http://www.apache.org/licenses/LICENSE-2.0
536 *
537 * Unless required by applicable law or agreed to in writing, software
538 * distributed under the License is distributed on an "AS IS" BASIS,
539 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
540 * See the License for the specific language governing permissions and
541 * limitations under the License.
542 */function Xs(t){if(!t||!t.options)throw ae("App Configuration");if(!t.name)throw ae("App Name");const e=["projectId","apiKey","appId"];for(const n of e)if(!t.options[n])throw ae(n);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}function ae(t){return A.create("missing-app-config-values",{valueName:t})}/**
543 * @license
544 * Copyright 2020 Google LLC
545 *
546 * Licensed under the Apache License, Version 2.0 (the "License");
547 * you may not use this file except in compliance with the License.
548 * You may obtain a copy of the License at
549 *
550 *   http://www.apache.org/licenses/LICENSE-2.0
551 *
552 * Unless required by applicable law or agreed to in writing, software
553 * distributed under the License is distributed on an "AS IS" BASIS,
554 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
555 * See the License for the specific language governing permissions and
556 * limitations under the License.
557 */const qt="installations",Zs="installations-internal",ei=t=>{const e=t.getProvider("app").getImmediate(),n=Xs(e),r=Oe(e,"heartbeat");return{app:e,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},ti=t=>{const e=t.getProvider("app").getImmediate(),n=Oe(e,qt).getImmediate();return{getId:()=>Js(n),getToken:s=>Ys(n,s)}};function ni(){M(new T(qt,ei,"PUBLIC")),M(new T(Zs,ti,"PRIVATE"))}ni();N(At,Me);N(At,Me,"esm2017");const ri=(t,e)=>e.some(n=>t instanceof n);let ot,at;function si(){return ot||(ot=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ii(){return at||(at=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const zt=new WeakMap,ve=new WeakMap,Gt=new WeakMap,ce=new WeakMap,$e=new WeakMap;function oi(t){const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{n(b(t.result)),s()},o=()=>{r(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(n=>
557{n instanceof IDBCursor&&zt.set(n,t)}).catch(()=>{}),$e.set(e,t),e}function ai(t){if(ve.has(t))return;const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{n(),s()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});ve.set(t,e)}let De={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return ve.get(t);if(e==="objectStoreNames")return t.objectStoreNames||Gt.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return b(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function ci(t){De=t(De)}function li(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(le(this),e,...n);return Gt.set(r,e.sort?e.sort():[e]),b(r)}:ii().includes(t)?function(...e){return t.apply(le(this),e),b(zt.get(this))}:function(...e){return b(t.apply(le(this),e))}}function ui(t){return typeof t=="function"?li(t):(t instanceof IDBTransaction&&ai(t),ri(t,si())?new Proxy(t,De):t)}function b(t){if(t instanceof IDBRequest)return oi(t);if(ce.has(t))return ce.get(t);const e=ui(t);return e!==t&&(ce.set(t,e),$e.set(e,t)),e}const le=t=>$e.get(t);function Jt(t,e,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=b(o);return r&&o.addEventListener("upgradeneeded",c=>{r(b(o.result),c.oldVersion,c.newVersion,b(o.transaction))}),n&&o.addEventListener("blocked",()=>n()),a.then(c=>{i&&c.addEventListener("close",()=>i()),s&&c.addEventListener("versionchange",()=>s())}).catch(()=>{}),a}function ue(t,{blocked:e}={}){const n=indexedDB.deleteDatabase(t);return e&&n.addEventListener("blocked",()=>e()),b(n).then(()=>{})}const hi=["get","getKey","getAll","getAllKeys","count"],fi=["put","add","delete","clear"],he=new Map;function ct(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(he.get(e))return he.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,s=fi.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(s||hi.includes(n)))return;const i=async function(o,...a){const c=this.transaction(o,s?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(a.shift())),(await Promise.all([l[n](...a),s&&c.done]))[0]};return he.set(e,i),i}ci(t=>({...t,get:(e,n,r)=>ct(e,n)||t.get(e,n,r),has:(e,n)=>!!ct(e,n)||t.has(e,n)}));/**
558 * @license
559 * Copyright 2019 Google LLC
560 *
561 * Licensed under the Apache License, Version 2.0 (the "License");
562 * you may not use this file except in compliance with the License.
563 * You may obtain a copy of the License at
564 *
565 *   http://www.apache.org/licenses/LICENSE-2.0
566 *
567 * Unless required by applicable law or agreed to in writing, software
568 * distributed under the License is distributed on an "AS IS" BASIS,
569 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
570 * See the License for the specific language governing permissions and
571 * limitations under the License.
572 */const Yt="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",di="https://fcmregistrations.googleapis.com/v1",Qt="FCM_MSG",pi="google.c.a.c_id",gi=3,mi=1;var V;(function(t){t[t.DATA_MESSAGE=1]="DATA_MESSAGE",t[t.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"})(V||(V={}));/**
573 * @license
574 * Copyright 2018 Google LLC
575 *
576 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
577 * in compliance with the License. You may obtain a copy of the License at
578 *
579 * http://www.apache.org/licenses/LICENSE-2.0
580 *
581 * Unless required by applicable law or agreed to in writing, software distributed under the License
582 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
583 * or implied. See the License for the specific language governing permissions and limitations under
584 * the License.
585 */var q;(function(t){t.PUSH_RECEIVED="push-received",t.NOTIFICATION_CLICKED="notification-clicked"})(q||(q={}));/**
586 * @license
587 * Copyright 2017 Google LLC
588 *
589 * Licensed under the Apache License, Version 2.0 (the "License");
590 * you may not use this file except in compliance with the License.
591 * You may obtain a copy of the License at
592 *
593 *   http://www.apache.org/licenses/LICENSE-2.0
594 *
595 * Unless required by applicable law or agreed to in writing, software
596 * distributed under the License is distributed on an "AS IS" BASIS,
597 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
598 * See the License for the specific language governing permissions and
599 * limitations under the License.
600 */function p(t){const e=new Uint8Array(t);return btoa(String.fromCharCode(...e)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function bi(t){const e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/\-/g,"+").replace(/_/g,"/"),r=atob(n),s=new Uint8Array(r.length);for(let i=0;i<r.length;++i)s[i]=r.charCodeAt(i);return s}/**
601 * @license
602 * Copyright 2019 Google LLC
603 *
604 * Licensed under the Apache License, Version 2.0 (the "License");
605 * you may not use this file except in compliance with the License.
606 * You may obtain a copy of the License at
607 *
608 *   http://www.apache.org/licenses/LICENSE-2.0
609 *
610 * Unless required by applicable law or agreed to in writing, software
611 * distributed under the License is distributed on an "AS IS" BASIS,
612 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
613 * See the License for the specific language governing permissions and
614 * limitations under the License.
615 */const fe="fcm_token_details_db",wi=5,lt="fcm_token_object_Store";async function yi(t){if("databases"in indexedDB&&!(await indexedDB.databases()).map(i=>i.name).includes(fe))return null;let e=null;return(await Jt(fe,wi,{upgrade:async(r,s,i,o)=>{var a;if(s<2||!r.objectStoreNames.contains(lt))return;const c=o.objectStore(lt),l=await c.index("fcmSenderId").get(t);if(await c.clear(),!!l){if(s===2){const u=l;if(!u.auth||!u.p256dh||!u.endpoint)return;e={token:u.fcmToken,createTime:(a=u.createTime)!==null&&a!==void 0?a:Date.now(),subscriptionOptions:{auth:u.auth,p256dh:u.p256dh,endpoint:u.endpoint,swScope:u.swScope,vapidKey:typeof u.vapidKey=="string"?u.vapidKey:p(u.vapidKey)}}}else if(s===3){const u=l;e={token:u.fcmToken,createTime:u.createTime,subscriptionOptions:{auth:p(u.auth),p256dh:p(u.p256dh),endpoint:u.endpoint,swScope:u.swScope,vapidKey:p(u.vapidKey)}}}else if(s===4){const u=l;e={token:u.fcmToken,createTime:u.createTime,subscriptionOptions:{auth:p(u.auth),p256dh:p(u.p256dh),endpoint:u.endpoint,swScope:u.swScope,vapidKey:p(u.vapidKey)}}}}}})).close(),await ue(fe),await ue("fcm_vapid_details_db"),await ue("undefined"),_i(e)?e:null}function _i(t){if(!t||!t.subscriptionOptions)return!1;const{subscriptionOptions:e}=t;return typeof t.createTime=="number"&&t.createTime>0&&typeof t.token=="string"&&t.token.length>0&&typeof e.auth=="string"&&e.auth.length>0&&typeof e.p256dh=="string"&&e.p256dh.length>0&&typeof e.endpoint=="string"&&e.endpoint.length>0&&typeof e.swScope=="string"&&e.swScope.length>0&&typeof e.vapidKey=="string"&&e.vapidKey.length>0}/**
616 * @license
617 * Copyright 2019 Google LLC
618 *
619 * Licensed under the Apache License, Version 2.0 (the "License");
620 * you may not use this file except in compliance with the License.
621 * You may obtain a copy of the License at
622 *
623 *   http://www.apache.org/licenses/LICENSE-2.0
624 *
625 * Unless required by applicable law or agreed to in writing, software
626 * distributed under the License is distributed on an "AS IS" BASIS,
627 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
628 * See the License for the specific language governing permissions and
629 * limitations under the License.
630 */const Ii="firebase-messaging-database",Ei=1,O="firebase-messaging-store";let de=null;function xe(){return de||(de=Jt(Ii,Ei,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(O)}}})),de}async function je(t){const e=Fe(t),r=await(await xe()).transaction(O).objectStore(O).get(e);if(r)return r;{const s=await yi(t.appConfig.senderId);if(s)return await Ue(t,s),s}}async function Ue(t,e){const n=Fe(t),s=(await xe()).transaction(O,"readwrite");return await s.objectStore(O).put(e,n),await s.done,e}async function Ci(t){const e=Fe(t),r=(await xe()).transaction(O,"readwrite");await r.objectStore(O).delete(e),await r.done}function Fe({appConfig:t}){return t.appId}/**
631 * @license
632 * Copyright 2017 Google LLC
633 *
634 * Licensed under the Apache License, Version 2.0 (the "License");
635 * you may not use this file except in compliance with the License.
636 * You may obtain a copy of the License at
637 *
638 *   http://www.apache.org/licenses/LICENSE-2.0
639 *
640 * Unless required by applicable law or agreed to in writing, software
641 * distributed under the License is distributed on an "AS IS" BASIS,
642 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
643 * See the License for the specific language governing permissions and
644 * limitations under the License.
645 */const Si={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invalid-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."},d=new z("messaging","Messaging",Si);/**
646 * @license
647 * Copyright 2019 Google LLC
648 *
649 * Licensed under the Apache License, Version 2.0 (the "License");
650 * you may not use this file except in compliance with the License.
651 * You may obtain a copy of the License at
652 *
653 *   http://www.apache.org/licenses/LICENSE-2.0
654 *
655 * Unless required by applicable law or agreed to in writing, software
656 * distributed under the License is distributed on an "AS IS" BASIS,
657 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
658 * See the License for the specific language governing permissions and
659 * limitations under the License.
660 */async function vi(t,e){const n=await He(t),r=Zt(e),s={method:"POST",headers:n,body:JSON.stringify(r)};let i;try{i=await(await fetch(Ke(t.appConfig),s)).json()}catch(o){throw d.create("token-subscribe-failed",{errorInfo:o==null?void 0:o.toString()})}if(i.error){const o=i.error.message;throw d.create("token-subscribe-failed",{errorInfo:o})}if(!i.token)throw d.create("token-subscribe-no-token");return i.token}async function Di(t,e){const n=await He(t),r=Zt(e.subscriptionOptions),s={method:"PATCH",headers:n,body:JSON.stringify(r)};let i;try{i=await(await fetch(`${Ke(t.appConfig)}/${e.token}`,s)).json()}catch(o){throw d.create("token-update-failed",{errorInfo:o==null?void 0:o.toString()})}if(i.error){const o=i.error.message;throw d.create("token-update-failed",{errorInfo:o})}if(!i.token)throw d.create("token-update-no-token");return i.token}async function Xt(t,e){const r={method:"DELETE",headers:await He(t)};try{const i=await(await fetch(`${Ke(t.appConfig)}/${e}`,r)).json();if(i.error){const o=i.error.message;throw d.create("token-unsubscribe-failed",{errorInfo:o})}}catch(s){throw d.create("token-unsubscribe-failed",{errorInfo:s==null?void 0:s.toString()})}}function Ke({projectId:t}){return`${di}/projects/${t}/registrations`}async function He({appConfig:t,installations:e}){const n=await e.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":`FIS ${n}`})}function Zt({p256dh:t,auth:e,endpoint:n,vapidKey:r}){const s={web:{endpoint:n,auth:e,p256dh:t}};return r!==Yt&&(s.web.applicationPubKey=r),s}/**
661 * @license
662 * Copyright 2019 Google LLC
663 *
664 * Licensed under the Apache License, Version 2.0 (the "License");
665 * you may not use this file except in compliance with the License.
666 * You may obtain a copy of the License at
667 *
668 *   http://www.apache.org/licenses/LICENSE-2.0
669 *
670 * Unless required by applicable law or agreed to in writing, software
671 * distributed under the License is distributed on an "AS IS" BASIS,
672 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
673 * See the License for the specific language governing permissions and
674 * limitations under the License.
675 */const Ti=10080*60*1e3;async function ki(t){const e=await Ri(t.swRegistration,t.vapidKey),n={vapidKey:t.vapidKey,swScope:t.swRegistration.scope,endpoint:e.endpoint,auth:p(e.getKey("auth")),p256dh:p(e.getKey("p256dh"))},r=await je(t.firebaseDependencies);if(r){if(Oi(r.subscriptionOptions,n))return Date.now()>=r.createTime+Ti?Ai(t,{token:r.token,createTime:Date.now(),subscriptionOptions:n}):r.token;try{await Xt(t.firebaseDependencies,r.token)}catch(s){console.warn(s)}return ut(t.firebaseDependencies,n)}else return ut(t.firebaseDependencies,n)}async function Te(t){const e=await je(t.firebaseDependencies);e&&(await Xt(t.firebaseDependencies,e.token),await Ci(t.firebaseDependencies));const n=await t.swRegistration.pushManager.getSubscription();return n?n.unsubscribe():!0}async function Ai(t,e){try{const n=await Di(t.firebaseDependencies,e),r=Object.assign(Object.assign({},e),{token:n,createTime:Date.now()});return await Ue(t.firebaseDependencies,r),n}catch(n){throw await Te(t),n}}async function ut(t,e){const r={token:await vi(t,e),createTime:Date.now(),subscriptionOptions:e};return await Ue(t,r),r.token}async function Ri(t,e){const n=await t.pushManager.getSubscription();return n||t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:bi(e)})}function Oi(t,e){const n=e.vapidKey===t.vapidKey,r=e.endpoint===t.endpoint,s=e.auth===t.auth,i=e.p256dh===t.p256dh;return n&&r&&s&&i}/**
676 * @license
677 * Copyright 2020 Google LLC
678 *
679 * Licensed under the Apache License, Version 2.0 (the "License");
680 * you may not use this file except in compliance with the License.
681 * You may obtain a copy of the License at
682 *
683 *   http://www.apache.org/licenses/LICENSE-2.0
684 *
685 * Unless required by applicable law or agreed to in writing, software
686 * distributed under the License is distributed on an "AS IS" BASIS,
687 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
688 * See the License for the specific language governing permissions and
689 * limitations under the License.
690 */function Ni(t){const e={from:t.from,collapseKey:t.collapse_key,messageId:t.fcmMessageId};return Mi(e,t),Bi(e,t),Li(e,t),e}function Mi(t,e){if(!e.notification)return;t.notification={};const n=e.notification.title;n&&(t.notification.title=n);const r=e.notification.body;r&&(t.notification.body=r);const s=e.notification.image;s&&(t.notification.image=s);const i=e.notification.icon;i&&(t.notification.icon=i)}function Bi(t,e){e.data&&(t.data=e.data)}function Li(t,e){var n,r,s,i,o;if(!e.fcmOptions&&!(!((n=e.notification)===null||n===void 0)&&n.click_action))return;t.fcmOptions={};const a=(s=(r=e.fcmOptions)===null||r===void 0?void 0:r.link)!==null&&s!==void 0?s:(i=e.notification)===null||i===void 0?void 0:i.click_action;a&&(t.fcmOptions.link=a);const c=(o=e.fcmOptions)===null||o===void 0?void 0:o.analytics_label;c&&(t.fcmOptions.analyticsLabel=c)}/**
691 * @license
692 * Copyright 2019 Google LLC
693 *
694 * Licensed under the Apache License, Version 2.0 (the "License");
695 * you may not use this file except in compliance with the License.
696 * You may obtain a copy of the License at
697 *
698 *   http://www.apache.org/licenses/LICENSE-2.0
699 *
700 * Unless required by applicable law or agreed to in writing, software
701 * distributed under the License is distributed on an "AS IS" BASIS,
702 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
703 * See the License for the specific language governing permissions and
704 * limitations under the License.
705 */function Pi(t){return typeof t=="object"&&!!t&&pi in t}/**
706 * @license
707 * Copyright 2019 Google LLC
708 *
709 * Licensed under the Apache License, Version 2.0 (the "License");
710 * you may not use this file except in compliance with the License.
711 * You may obtain a copy of the License at
712 *
713 *   http://www.apache.org/licenses/LICENSE-2.0
714 *
715 * Unless required by applicable law or agreed to in writing, software
716 * distributed under the License is distributed on an "AS IS" BASIS,
717 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
718 * See the License for the specific language governing permissions and
719 * limitations under the License.
720 */function $i(t){return new Promise(e=>{setTimeout(e,t)})}/**
721 * @license
722 * Copyright 2019 Google LLC
723 *
724 * Licensed under the Apache License, Version 2.0 (the "License");
725 * you may not use this file except in compliance with the License.
726 * You may obtain a copy of the License at
727 *
728 *   http://www.apache.org/licenses/LICENSE-2.0
729 *
730 * Unless required by applicable law or agreed to in writing, software
731 * distributed under the License is distributed on an "AS IS" BASIS,
732 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
733 * See the License for the specific language governing permissions and
734 * limitations under the License.
735 */en("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o");en("AzSCbw63g1R0nCw85jG8","Iaya3yLKwmgvh7cF0q4");async function xi(t,e){const n=ji(e,await t.firebaseDependencies.installations.getId());Ui(t,n)}function ji(t,e){var n,r;const s={};return t.from&&(s.project_number=t.from),t.fcmMessageId&&(s.message_id=t.fcmMessageId),s.instance_id=e,t.notification?s.message_type=V.DISPLAY_NOTIFICATION.toString():s.message_type=V.DATA_MESSAGE.toString(),s.sdk_platform=gi.toString(),s.package_name=self.origin.replace(/(^\w+:|^)\/\//,""),t.collapse_key&&(s.collapse_key=t.collapse_key),s.event=mi.toString(),!((n=t.fcmOptions)===null||n===void 0)&&n.analytics_label&&(s.analytics_label=(r=t.fcmOptions)===null||r===void 0?void 0:r.analytics_label),s}function Ui(t,e){const n={};n.event_time_ms=Math.floor(Date.now()).toString(),n.source_extension_json_proto3=JSON.stringify(e),t.logEvents.push(n)}function en(t,e){const n=[];for(let r=0;r<t.length;r++)n.push(t.charAt(r)),r<e.length&&n.push(e.charAt(r));return n.join("")}/**
736 * @license
737 * Copyright 2017 Google LLC
738 *
739 * Licensed under the Apache License, Version 2.0 (the "License");
740 * you may not use this file except in compliance with the License.
741 * You may obtain a copy of the License at
742 *
743 *   http://www.apache.org/licenses/LICENSE-2.0
744 *
745 * Unless required by applicable law or agreed to in writing, software
746 * distributed under the License is distributed on an "AS IS" BASIS,
747 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
748 * See the License for the specific language governing permissions and
749 * limitations under the License.
750 */async function Fi(t,e){var n,r;const{newSubscription:s}=t;if(!s){await Te(e);return}const i=await je(e.firebaseDependencies);await Te(e),e.vapidKey=(r=(n=i==null?void 0:i.subscriptionOptions)===null||n===void 0?void 0:n.vapidKey)!==null&&r!==void 0?r:Yt,await ki(e)}async function Ki(t,e){const n=Vi(t);if(!n)return;e.deliveryMetricsExportedToBigQueryEnabled&&await xi(e,n);const r=await tn();if(zi(r))return Gi(r,n);if(n.notification&&await Ji(Wi(n)),!!e&&e.onBackgroundMessageHandler){const s=Ni(n);typeof e.onBackgroundMessageHandler=="function"?await e.onBackgroundMessageHandler(s):e.onBackgroundMessageHandler.next(s)}}async function Hi(t){var e,n;const r=(n=(e=t.notification)===null||e===void 0?void 0:e.data)===null||n===void 0?void 0:n[Qt];if(r){if(t.action)return}else return;t.stopImmediatePropagation(),t.notification.close();const s=Yi(r);if(!s)return;const i=new URL(s,self.location.href),o=new URL(self.location.origin);if(i.host!==o.host)return;let a=await qi(i);if(a?a=await a.focus():(a=await self.clients.openWindow(s),await $i(3e3)),!!a)return r.messageType=q.NOTIFICATION_CLICKED,r.isFirebaseMessaging=!0,a.postMessage(r)}function Wi(t){const e=Object.assign({},t.notification);return e.data={[Qt]:t},e}function Vi({data:t}){if(!t)return null;try{return t.json()}catch{return null}}async function qi(t){const e=await tn();
750for(const n of e){const r=new URL(n.url,self.location.href);if(t.host===r.host)return n}return null}function zi(t){return t.some(e=>e.visibilityState==="visible"&&!e.url.startsWith("chrome-extension://"))}function Gi(t,e){e.isFirebaseMessaging=!0,e.messageType=q.PUSH_RECEIVED;for(const n of t)n.postMessage(e)}function tn(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function Ji(t){var e;const{actions:n}=t,{maxActions:r}=Notification;return n&&r&&n.length>r&&console.warn(`This browser only supports ${r} actions. The remaining actions will not be displayed.`),self.registration.showNotification((e=t.title)!==null&&e!==void 0?e:"",t)}function Yi(t){var e,n,r;const s=(n=(e=t.fcmOptions)===null||e===void 0?void 0:e.link)!==null&&n!==void 0?n:(r=t.notification)===null||r===void 0?void 0:r.click_action;return s||(Pi(t.data)?self.location.origin:null)}/**
751 * @license
752 * Copyright 2019 Google LLC
753 *
754 * Licensed under the Apache License, Version 2.0 (the "License");
755 * you may not use this file except in compliance with the License.
756 * You may obtain a copy of the License at
757 *
758 *   http://www.apache.org/licenses/LICENSE-2.0
759 *
760 * Unless required by applicable law or agreed to in writing, software
761 * distributed under the License is distributed on an "AS IS" BASIS,
762 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
763 * See the License for the specific language governing permissions and
764 * limitations under the License.
765 */function Qi(t){if(!t||!t.options)throw pe("App Configuration Object");if(!t.name)throw pe("App Name");const e=["projectId","apiKey","appId","messagingSenderId"],{options:n}=t;for(const r of e)if(!n[r])throw pe(r);return{appName:t.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}function pe(t){return d.create("missing-app-config-values",{valueName:t})}/**
766 * @license
767 * Copyright 2020 Google LLC
768 *
769 * Licensed under the Apache License, Version 2.0 (the "License");
770 * you may not use this file except in compliance with the License.
771 * You may obtain a copy of the License at
772 *
773 *   http://www.apache.org/licenses/LICENSE-2.0
774 *
775 * Unless required by applicable law or agreed to in writing, software
776 * distributed under the License is distributed on an "AS IS" BASIS,
777 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
778 * See the License for the specific language governing permissions and
779 * limitations under the License.
780 */class Xi{constructor(e,n,r){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const s=Qi(e);this.firebaseDependencies={app:e,appConfig:s,installations:n,analyticsProvider:r}}_delete(){return Promise.resolve()}}/**
781 * @license
782 * Copyright 2020 Google LLC
783 *
784 * Licensed under the Apache License, Version 2.0 (the "License");
785 * you may not use this file except in compliance with the License.
786 * You may obtain a copy of the License at
787 *
788 *   http://www.apache.org/licenses/LICENSE-2.0
789 *
790 * Unless required by applicable law or agreed to in writing, software
791 * distributed under the License is distributed on an "AS IS" BASIS,
792 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
793 * See the License for the specific language governing permissions and
794 * limitations under the License.
795 */const Zi=t=>{const e=new Xi(t.getProvider("app").getImmediate(),t.getProvider("installations-internal").getImmediate(),t.getProvider("analytics-internal"));return self.addEventListener("push",n=>{n.waitUntil(Ki(n,e))}),self.addEventListener("pushsubscriptionchange",n=>{n.waitUntil(Fi(n,e))}),self.addEventListener("notificationclick",n=>{n.waitUntil(Hi(n))}),e};function eo(){M(new T("messaging-sw",Zi,"PUBLIC"))}/**
796 * @license
797 * Copyright 2020 Google LLC
798 *
799 * Licensed under the Apache License, Version 2.0 (the "License");
800 * you may not use this file except in compliance with the License.
801 * You may obtain a copy of the License at
802 *
803 *   http://www.apache.org/licenses/LICENSE-2.0
804 *
805 * Unless required by applicable law or agreed to in writing, softw
805are
806 * distributed under the License is distributed on an "AS IS" BASIS,
807 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
808 * See the License for the specific language governing permissions and
809 * limitations under the License.
810 */async function to(){return yt()&&await _t()&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}/**
811 * @license
812 * Copyright 2020 Google LLC
813 *
814 * Licensed under the Apache License, Version 2.0 (the "License");
815 * you may not use this file except in compliance with the License.
816 * You may obtain a copy of the License at
817 *
818 *   http://www.apache.org/licenses/LICENSE-2.0
819 *
820 * Unless required by applicable law or agreed to in writing, software
821 * distributed under the License is distributed on an "AS IS" BASIS,
822 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
823 * See the License for the specific language governing permissions and
824 * limitations under the License.
825 */function no(t,e){if(self.document!==void 0)throw d.create("only-available-in-sw");return t.onBackgroundMessageHandler=e,()=>{t.onBackgroundMessageHandler=null}}/**
826 * @license
827 * Copyright 2017 Google LLC
828 *
829 * Licensed under the Apache License, Version 2.0 (the "License");
830 * you may not use this file except in compliance with the License.
831 * You may obtain a copy of the License at
832 *
833 *   http://www.apache.org/licenses/LICENSE-2.0
834 *
835 * Unless required by applicable law or agreed to in writing, software
836 * distributed under the License is distributed on an "AS IS" BASIS,
837 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
838 * See the License for the specific language governing permissions and
839 * limitations under the License.
840 */function ro(t=Jr()){return to().then(e=>{if(!e)throw d.create("unsupported-browser")},e=>{throw d.create("indexed-db-unsupported")}),Oe(It(t),"messaging-sw").getImmediate()}function so(t,e){return t=It(t),no(t,e)}/**
841 * @license
842 * Copyright 2017 Google LLC
843 *
844 * Licensed under the Apache License, Version 2.0 (the "License");
845 * you may not use this file except in compliance with the License.
846 * You may obtain a copy of the License at
847 *
848 *   http://www.apache.org/licenses/LICENSE-2.0
849 *
850 * Unless required by applicable law or agreed to in writing, software
851 * distributed under the License is distributed on an "AS IS" BASIS,
852 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
853 * See the License for the specific language governing permissions and
854 * limitations under the License.
855 */eo();const io={apiKey:"AIzaSyApBu3S8kg5VQZLvAJ1flLnbYh4TQJMf-g",authDomain:"mi-eid-esign.firebaseapp.com",databaseURL:"https://mi-eid-esign-default-rtdb.europe-west1.firebasedatabase.app",projectId:"mi-eid-esign",storageBucket:"mi-eid-esign.appspot.com",messagingSenderId:"8302651827",appId:"1:8302651827:web:dc49a2ddba2810f91643c6",measurementId:"G-F71KZV4LPQ"};self.addEventListener("message",t=>{var e;((e=t.data)==null?void 0:e.type)==="SKIP_WAITING"&&self.skipWaiting()});rn();$n();jn([{"revision":"7fb0e3780372f10f804513e2e0c39e78","url":"build/assets/materialdesignicons-webfont-DG-g2Y0n.woff2"},{"revision":"a1a0ed860f50ffd42ba46d7c10f30255","url":"build/assets/materialdesignicons-webfont-D566J0hI.eot"},{"revision":"fe1545ef4dd1eef2f1e25528898fc0b3","url":"build/assets/materialdesignicons-webfont-CAsPQZX4.ttf"},{"revision":"63d2a5950fc212096c3612f71ae66f64","url":"build/assets/materialdesignicons-webfont-BqhPiFuu.woff"},{"revision":"14c5c1f37c97e3ddc0c921f7a373aa31","url":"build/assets/app-DDmLkOzq.css"},{"revision":"bc877a2d8e00081d71c4a39cfd629a92","url":"build/assets/app-ClEA1KpT.css"},{"revision":"f64e5f7a6f9877ada898d2bc7df06b71","url":"build/assets/app-BWc3Rc7h.js"},{"revision":"da4ea5cdfca6b3baab285741f5ccb59f","url":"build/assets/MaterialIcons-Regular-DEK98Tqb.ttf"},{"revision":"29b882f018fa6fe75fd338aaae6235b8","url":"build/assets/MaterialIcons-Regular-CT9KXtO2.woff"},{"revision":"0509ab09c1b0d2200a4135803c91d6ce","url":"build/assets/MaterialIcons-Regular-BFJCbjSy.woff2"},{"revision":"96c476804d7a788cc1c05351b287ee41","url":"build/assets/MaterialIcons-Regular-4NyYE35R.eot"}
855,{"revision":"071d2bf0c56edf2e50d01b5b91be57db","url":"build/manifest.json"}]||[]);const oo=St(io),ao=ro(oo);so(ao,t=>{var r,s,i,o;const e=((r=t.notification)==null?void 0:r.title)||"",n={body:((s=t.notification)==null?void 0:s.body)||"",icon:((i=t.notification)==null?void 0:i.image)||"https://preaccounts.anf.es/icon192x192.webp",data:t.data||{}};if((o=t.data)!=null&&o.actions)try{n.actions=JSON.parse(t.data.actions)}catch(a){console.log("Invalid notification actions payload",a)}self.registration.showNotification(e,n)});self.addEventListener("notificationclick",t=>{var r;if(t.notification.close(),t.action!=="link")return;const n=JSON.parse(((r=t.notification.data)==null?void 0:r.actions)||"[]").find(s=>s.action===t.action);n!=null&&n.url&&t.waitUntil(clients.openWindow(n.url))});Ae(({url:t})=>t.pathname.startsWith("/get-background"),new pt({cacheName:"backgrounds"}));Ae(({request:t})=>t.destination==="image",new pt({cacheName:"images"}));

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.