PageSourceSearch

https://www.creatorsenseai.com/app/assets/vendor-firebase-CY6XuUTP.js

js creatorsenseai.com collected 2026-10-02 01:29:09 UTC 79,358 bytes, 914 lines download raw bytes

vendor: 4,102 bytes, lines 1-31
1import{R as $,S as F}from"./vendor-misc-5pJBpqhN.js";/**
2 * @license
3 * Copyright 2025 Google LLC
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *   http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */const nt=()=>{};var oe={};/**
17 * @license
18 * Copyright 2017 Google LLC
19 *
20 * Licensed under the Apache License, Version 2.0 (the "License");
21 * you may not use this file except in compliance with the License.
22 * You may obtain a copy of the License at
23 *
24 *   http://www.apache.org/licenses/LICENSE-2.0
25 *
26 * Unless required by applicable law or agreed to in writing, software
27 * distributed under the License is distributed on an "AS IS" BASIS,
28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 * See the License for the specific language governing permissions and
30 * limitations under the License.
31 */const _e=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let a=e.charCodeAt(r);a<128?t[n++]=a:a<2048?(t[n++]=a>>6|192,t[n++]=a&63|128):(a&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(a=65536+((a&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}return t},rt=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const a=e[n++];if(a<128)t[r++]=String.fromCharCode(a);else if(a>191&&a<224){const i=e[n++];t[r++]=String.fromCharCode((a&31)<<6|i&63)}else if(a>239&&a<365){const i=e[n++],s=e[n++],o=e[n++],u=((a&7)<<18|(i&63)<<12|(s&63)<<6|o&63)-65536;t[r++]=String.fromCharCode(55296+(u>>10)),t[r++]=String.fromCharCode(56320+(u&1023))}else{const i=e[n++],s=e[n++];t[r++]=String.fromCharCode((a&15)<<12|(i&63)<<6|s&63)}}return t.join("")},Se={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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let a=0;a<e.length;a+=3){const i=e[a],s=a+1<e.length,o=s?e[a+1]:0,u=a+2<e.length,d=u?e[a+2]:0,c=i>>2,S=(i&3)<<4|o>>4;let T=(o&15)<<2|d>>6,C=d&63;u||(C=64,s||(T=64)),r.push(n[c],n[S],n[T],n[C])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(_e(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):rt(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let a=0;a<e.length;){const i=n[e.charAt(a++)],o=a<e.length?n[e.charAt(a)]:0;++a;const d=a<e.length?n[e.charAt(a)]:64;++a;const S=a<e.length?n[e.charAt(a)]:64;if(++a,i==null||o==null||d==null||S==null)throw new at;const T=i<<2|o>>4;if(r.push(T),d!==64){const C=o<<4&240|d>>2;if(r.push(C),S!==64){const tt=d<<6&192|S;r.push(tt)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
31class at extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const it=function(e){const t=_e(e);return Se.encodeByteArray(t,!0)},ve=function(e){return it(e).replace(/\./g,"")},st=function(e){try{return Se.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/**
32 * @license
33 * Copyright 2022 Google LLC
34 *
35 * Licensed under the Apache License, Version 2.0 (the "License");
36 * you may not use this file except in compliance with the License.
37 * You may obtain a copy of the License at
38 *
39 *   http://www.apache.org/licenses/LICENSE-2.0
40 *
41 * Unless required by applicable law or agreed to in writing, software
42 * distributed under the License is distributed on an "AS IS" BASIS,
43 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44 * See the License for the specific language governing permissions and
45 * limitations under the License.
46 */function ot(){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.")}/**
47 * @license
48 * Copyright 2022 Google LLC
49 *
50 * Licensed under the Apache License, Version 2.0 (the "License");
51 * you may not use this file except in compliance with the License.
52 * You may obtain a copy of the License at
53 *
54 *   http://www.apache.org/licenses/LICENSE-2.0
55 *
56 * Unless required by applicable law or agreed to in writing, software
57 * distributed under the License is distributed on an "AS IS" BASIS,
58 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59 * See the License for the specific language governing permissions and
60 * limitations under the License.
61 */const ct=()=>ot().__FIREBASE_DEFAULTS__,ut=()=>{if(typeof process>"u"||typeof oe>"u")return;const e=oe.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},lt=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&st(e[1]);return t&&JSON.parse(t)},dt=()=>{try{return nt()||ct()||ut()||lt()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},Ae=()=>{var e;return(e=dt())==null?void 0:e.config};/**
62 * @license
63 * Copyright 2017 Google LLC
64 *
65 * Licensed under the Apache License, Version 2.0 (the "License");
66 * you may not use this file except in compliance with the License.
67 * You may obtain a copy of the License at
68 *
69 *   http://www.apache.org/licenses/LICENSE-2.0
70 *
71 * Unless required by applicable law or agreed to in writing, software
72 * distributed under the License is distributed on an "AS IS" BASIS,
73 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74 * See the License for the specific language governing permissions and
75 * limitations under the License.
76 */class ft{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,r))}}}function ht(){try{return typeof indexedDB=="object"}catch{return!1}}function pt(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(r);a.onsuccess=()=>{a.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},a.onupgradeneeded=()=>{n=!1},a.onerror=()=>{var i;t(((i=a.error)==null?void 0:i.message)||"")}}catch(n){t(n)}})}/**
77 * @license
78 * Copyright 2017 Google LLC
79 *
80 * Licensed under the Apache License, Version 2.0 (the "License");
81 * you may not use this file except in compliance with the License.
82 * You may obtain a copy of the License at
83 *
84 *   http://www.apache.org/licenses/LICENSE-2.0
85 *
86 * Unless required by applicable law or agreed to in writing, software
87 * distributed under the License is distributed on an "AS IS" BASIS,
88 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89 * See the License for the specific language governing permissions and
90 * limitations under the License.
91 */const gt="FirebaseError";
91let J=class Te extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=gt,Object.setPrototypeOf(this,Te.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ce.prototype.create)}},Ce=class{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},a=`${this.service}/${t}`,i=this.errors[t],s=i?bt(i,r):"Error",o=`${this.serviceName}: ${s} (${a}).`;return new J(a,o,r)}};function bt(e,t){return e.replace(mt,(n,r)=>{const a=t[r];return a!=null?String(a):`<${r}?>`})}const mt=/\{\$([^}]+)}/g;function K(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const a of n){if(!r.includes(a))return!1;const i=e[a],s=t[a];if(ce(i)&&ce(s)){if(!K(i,s))return!1}else if(i!==s)return!1}for(const a of r)if(!n.includes(a))return!1;return!0}function ce(e){return e!==null&&typeof e=="object"}let D=class{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}};/**
92 * @license
93 * Copyright 2019 Google LLC
94 *
95 * Licensed under the Apache License, Version 2.0 (the "License");
96 * you may not use this file except in compliance with the License.
97 * You may obtain a copy of the License at
98 *
99 *   http://www.apache.org/licenses/LICENSE-2.0
100 *
101 * Unless required by applicable law or agreed to in writing, software
102 * distributed under the License is distributed on an "AS IS" BASIS,
103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
104 * See the License for the specific language governing permissions and
105 * limitations under the License.
106 */const b="[DEFAULT]";/**
107 * @license
108 * Copyright 2019 Google LLC
109 *
110 * Licensed under the Apache License, Version 2.0 (the "License");
111 * you may not use this file except in compliance with the License.
112 * You may obtain a copy of the License at
113 *
114 *   http://www.apache.org/licenses/LICENSE-2.0
115 *
116 * Unless required by applicable law or agreed to in writing, software
117 * distributed under the License is distributed on an "AS IS" BASIS,
118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119 * See the License for the specific language governing permissions and
120 * limitations under the License.
121 */class wt{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new ft;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const a=this.getOrInitializeService({instanceIdentifier:n});a&&r.resolve(a)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){const n=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),r=(t==null?void 0:t.optional)??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(a){if(r)return null;throw a}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Et(t))try{this.getOrInitializeService({instanceIdentifier:b})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(n);try{const i=this.getOrInitializeService({instanceIdentifier:a});r.resolve(i)}catch{}}}}clearInstance(t=b){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=b){return this.instances.has(t)}getOptions(t=b){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.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 a=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[i,s]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(i);r===o&&s.resolve(a)}return a}onInit(t,n){const r=this.normalizeInstanceIdentifier(n),a=this.onInitCallbacks.get(r)??new Set;a.add(t),this.onInitCallbacks.set(r,a);const i=this.instances.get(r);return i&&t(i,r),()=>{a.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const a of r)try{a(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:yt(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=b){return this.component?this.component.multipleInstances?t:b:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function yt(e){return e===b?void 0:e}function Et(e){return e.instantiationMode==="EAGER"}/**
122 * @license
123 * Copyright 2019 Google LLC
124 *
125 * Licensed under the Apache License, Version 2.0 (the "License");
126 * you may not use this file except in compliance with the License.
127 * You may obtain a copy of the License at
128 *
129 *   http://www.apache.org/licenses/LICENSE-2.0
130 *
131 * Unless required by applicable law or agreed to in writing, software
132 * distributed under the License is distributed on an "AS IS" BASIS,
133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
134 * See the License for the specific language governing permissions and
135 * limitations under the License.
136 */class It{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new wt(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}/**
137 * @license
138 * Copyright 2017 Google LLC
139 *
140 * Licensed under the Apache License, Version 2.0 (the "License");
141 * you may not use this file except in compliance with the License.
142 * You may obtain a copy of the License at
143 *
144 *   http://www.apache.org/licenses/LICENSE-2.0
145 *
146 * Unless required by applicable law or agreed to in writing, software
147 * distributed under the License is distributed on an "AS IS" BASIS,
148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
149 * See the License for the specific language governing permissions and
150 * limitations under the License.
151 */var l;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(l||(l={}));const _t={debug:l.DEBUG,verbose:l.VERBOSE,info:l.INFO,warn:l.WARN,error:l.ERROR,silent:l.SILENT},St=l.INFO,vt={[l.DEBUG]:"log",[l.VERBOSE]:"log",[l.INFO]:"info",[l.WARN]:"warn",[l.ERROR]:"error"},At=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),a=vt[t];if(a)console[a](`[${r}]  ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Tt{constructor(t){this.name=t,this._logLevel=St,this._logHandler=At,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in l))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?_t[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,l.DEBUG,...t),this._logHandler(this,l.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,l.VERBOSE,...t),this._logHandler(this,l.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,l.INFO,...t),this._logHandler(this,l.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,l.WARN,...t),this._logHandler(this,l.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,l.ERROR,...t),this._logHandler(this,l.ERROR,...t)}}/**
152 * @license
153 * Copyright 2019 Google LLC
154 *
155 * Licensed under the Apache License, Version 2.0 (the "License");
156 * you may not use this file except in compliance with the License.
157 * You may obtain a copy of the License at
158 *
159 *   http://www.apache.org/licenses/LICENSE-2.0
160 *
161 * Unless required by applicable law or agreed to in writing, software
162 * distributed under the License is distributed on an "AS IS" BASIS,
163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
164 * See the License for the specific language governing permissions and
165 * limitations under the License.
166 */class Ct{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Dt(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function Dt(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const q="@firebase/app",ue="0.14.9";/**
167 * @license
168 * Copyright 2019 Google LLC
169 *
170 * Licensed under the Apache License, Version 2.0 (the "License");
171 * you may not use this file except in compliance with the License.
172 * You may obtain a copy of the License at
173 *
174 *   http://www.apache.org/licenses/LICENSE-2.0
175 *
176 * Unless required by applicable law or agreed to in writing, software
177 * distributed under the License is distributed on an "AS IS" BASIS,
178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
179 * See the License for the specific language governing permissions and
180 * limitations under the License.
181 */const p=new Tt("@firebase/app"),kt="@firebase/app-compat",Ot="@firebase/analytics-compat",Nt="@firebase/analytics",$t="@firebase/app-check-compat",Rt="@firebase/app-check",Mt="@firebase/auth",Bt="@firebase/auth-compat",Pt="@firebase/database",Ft="@firebase/data-connect",Ht="@firebase/database-compat",xt="@firebase/functions",Lt="@firebase/functions-compat",jt="@firebase/installations",Vt="@firebase/installations-compat",Ut="@firebase/messaging",Kt="@firebase/messaging-compat",qt="@firebase/performance",Wt="@firebase/performance-compat",zt="@firebase/remote-config",Gt="@firebase/remote-config-compat",Jt="@firebase/storage",Yt="@firebase/storage-compat",Xt="@firebase/firestore",Zt="@firebase/ai",Qt="@firebase/firestore-compat",en="firebase";/**
182 * @license
183 * Copyright 2019 Google LLC
184 *
185 * Licensed under the Apache License, Version 2.0 (the "License");
186 * you may not use this file except in compliance with the License.
187 * You may obtain a copy of the License at
188 *
189 *   http://www.apache.org/licenses/LICENSE-2.0
190 *
191 * Unless required by applicable law or agreed to in writing, software
192 * distributed under the License is distributed on an "AS IS" BASIS,
193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
194 * See the License for the specific language governing permissions and
195 * limitations under the License.
196 */const W="[DEFAULT]",tn={[q]:"fire-core",[kt]:"fire-core-compat",[Nt]:"fire-analytics",[Ot]:"fire-analytics-compat",[Rt]:"fire-app-check",[$t]:"fire-app-check-compat",[Mt]:"fire-auth",[Bt]:"fire-auth-compat",[Pt]:"fire-rtdb",[Ft]:"fire-data-connect",[Ht]:"fire-rtdb-compat",[xt]:"fire-fn",[Lt]:"fire-fn-compat",[jt]:"fire-iid",[Vt]:"fire-iid-compat",[Ut]:"fire-fcm",[Kt]:"fire-fcm-compat",[qt]:"fire-perf",[Wt]:"fire-perf-compat",[zt]:"fire-rc",[Gt]:"fire-rc-compat",[Jt]:"fire-gcs",[Yt]:"fire-gcs-compat",[Xt]:"fire-fst",[Qt]:"fire-fst-compat",[Zt]:"fire-vertex","fire-js":"fire-js",[en]:"fire-js-all"};/**
197 * @license
198 * Copyright 2019 Google LLC
199 *
200 * Licensed under the Apache License, Version 2.0 (the "License");
201 * you may not use this file except in compliance with the License.
202 * You may obtain a copy of the License at
203 *
204 *   http://www.apache.org/licenses/LICENSE-2.0
205 *
206 * Unless required by applicable law or agreed to in writing, software
207 * distributed under the License is distributed on an "AS IS" BASIS,
208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
209 * See the License for the specific language governing permissions and
210 * limitations under the License.
211 */const k=new Map,nn=new Map,z=new Map;function le(e,t){try{e.container.addComponent(t)}catch(n){p.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function y(e){const t=e.name;if(z.has(t))return p.debug(`There were multiple attempts to register component ${t}.`),!1;z.set(t,e);for(const n of k.values())le(n,e);for(const n of nn.values())le(n,e);return!0}function Y(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}/**
212 * @license
213 * Copyright 2019 Google LLC
214 *
215 * Licensed under the Apache License, Version 2.0 (the "License");
216 * you may not use this file except in compliance with the License.
217 * You may obtain a copy of the License at
218 *
219 *   http://www.apache.org/licenses/LICENSE-2.0
220 *
221 * Unless required by applicable law or agreed to in writing, software
222 * distributed under the License is distributed on an "AS IS" BASIS,
223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
224 * See the License for the specific language governing permissions and
225 * limitations under the License.
226 */const rn={"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","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invali
226d-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-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}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},g=new Ce("app","Firebase",rn);/**
227 * @license
228 * Copyright 2019 Google LLC
229 *
230 * Licensed under the Apache License, Version 2.0 (the "License");
231 * you may not use this file except in compliance with the License.
232 * You may obtain a copy of the License at
233 *
234 *   http://www.apache.org/licenses/LICENSE-2.0
235 *
236 * Unless required by applicable law or agreed to in writing, software
237 * distributed under the License is distributed on an "AS IS" BASIS,
238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
239 * See the License for the specific language governing permissions and
240 * limitations under the License.
241 */class an{constructor(t,n,r){this._isDeleted=!1,this._options={...t},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new D("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}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(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw g.create("app-deleted",{appName:this._name})}}function sn(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r={name:W,automaticDataCollectionEnabled:!0,...t},a=r.name;if(typeof a!="string"||!a)throw g.create("bad-app-name",{appName:String(a)});if(n||(n=Ae()),!n)throw g.create("no-options");const i=k.get(a);if(i){if(K(n,i.options)&&K(r,i.config))return i;throw g.create("duplicate-app",{appName:a})}const s=new It(a);for(const u of z.values())s.addComponent(u);const o=new an(n,r,s);return k.set(a,o),o}function on(e=W){const t=k.get(e);if(!t&&e===W&&Ae())return sn();if(!t)throw g.create("no-app",{appName:e});return t}function w(e,t,n){let r=tn[e]??e;n&&(r+=`-${n}`);const a=r.match(/\s|\//),i=t.match(/\s|\//);if(a||i){const s=[`Unable to register library "${r}" with version "${t}":`];a&&s.push(`library name "${r}" contains illegal characters (whitespace or "/")`),a&&i&&s.push("and"),i&&s.push(`version name "${t}" contains illegal characters (whitespace or "/")`),p.warn(s.join(" "));return}y(new D(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}/**
242 * @license
243 * Copyright 2021 Google LLC
244 *
245 * Licensed under the Apache License, Version 2.0 (the "License");
246 * you may not use this file except in compliance with the License.
247 * You may obtain a copy of the License at
248 *
249 *   http://www.apache.org/licenses/LICENSE-2.0
250 *
251 * Unless required by applicable law or agreed to in writing, software
252 * distributed under the License is distributed on an "AS IS" BASIS,
253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
254 * See the License for the specific language governing permissions and
255 * limitations under the License.
256 */const cn="firebase-heartbeat-database",un=1,v="firebase-heartbeat-store";let H=null;function De(){return H||(H=$(cn,un,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(v)}catch(n){console.warn(n)}}}}).catch(e=>{throw g.create("idb-open",{originalErrorMessage:e.message})})),H}async function ln(e){try{const n=(await De()).transaction(v),r=await n.objectStore(v).get(ke(e));return await n.done,r}catch(t){if(t instanceof J)p.warn(t.message);else{const n=g.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});p.warn(n.message)}}}async function de(e,t){try{const r=(await De()).transaction(v,"readwrite");await r.objectStore(v).put(t,ke(e)),await r.done}catch(n){if(n instanceof J)p.warn(n.message);else{const r=g.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});p.warn(r.message)}}}function ke(e){return`${e.name}!${e.options.appId}`}/**
257 * @license
258 * Copyright 2021 Google LLC
259 *
260 * Licensed under the Apache License, Version 2.0 (the "License");
261 * you may not use this file except in compliance with the License.
262 * You may obtain a copy of the License at
263 *
264 *   http://www.apache.org/licenses/LICENSE-2.0
265 *
266 * Unless required by applicable law or agreed to in writing, software
267 * distributed under the License is distributed on an "AS IS" BASIS,
268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
269 * See the License for the specific language governing permissions and
270 * limitations under the License.
271 */const dn=1024,fn=30;class hn{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new gn(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var t,n;try{const a=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),i=fe();if(((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)==null?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===i||this._heartbeatsCache.heartbeats.some(s=>s.date===i))return;if(this._heartbeatsCache.heartbeats.push({date:i,agent:a}),this._heartbeatsCache.heartbeats.length>fn){const s=bn(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(s,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){p.warn(r)}}async getHeartbeatsHeader(){var t;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=fe(),{heartbeatsToSend:r,unsentEntries:a}=pn(this._heartbeatsCache.heartbeats),i=ve(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,a.length>0?(this._heartbeatsCache.heartbeats=a,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(n){return p.warn(n),""}}}function fe(){return new Date().toISOString().substring(0,10)}function pn(e,t=dn){const n=[];let r=e.slice();for(const a of e){const i=n.find(s=>s.agent===a.agent);if(i){if(i.dates.push(a.date),he(n)>t){i.dates.pop();break}}else if(n.push({agent:a.agent,dates:[a.date]}),he(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class gn{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return ht()?pt().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await ln(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){if(await this._canUseIndexedDBPromise){const r=await this.read();return de(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){if(await this._canUseIndexedDBPromise){const r=await this.read();return de(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...t.heartbeats]})}else return}}function he(e){return ve(JSON.stringify({version:2,heartbeats:e})).length}function bn(e){if(e.length===0)return-1;let t=0,n=e[0].date;for(let r=1;r<e.length;r++)e[r].date<n&&(n=e[r].date,t=r);return t}/**
272 * @license
273 * Copyright 2019 Google LLC
274 *
275 * Licensed under the Apache License, Version 2.0 (the "License");
276 * you may not use this file except in compliance with the License.
277 * You may obtain a copy of the License at
278 *
279 *   http://www.apache.org/licenses/LICENSE-2.0
280 *
281 * Unless required by applicable law or agreed to in writing, software
282 * distributed under the License is distributed on an "AS IS" BASIS,
283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
284 * See the License for the specific language governing permissions and
285 * limitations under the License.
286 */function mn(e){y(new D("platform-logger",t=>new Ct(t),"PRIVATE")),y(new D("heartbeat",t=>new hn(t),"PRIVATE")),w(q,ue,e),w(q,ue,"esm2020"),w("fire-js","")}mn("");function wn(){try{return typeof indexedDB=="object"}catch{return!1}}function yn(){return new Promise((e,t)=>
286{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(r);a.onsuccess=()=>{a.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},a.onupgradeneeded=()=>{n=!1},a.onerror=()=>{var i;t(((i=a.error)===null||i===void 0?void 0:i.message)||"")}}catch(n){t(n)}})}function En(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/**
287 * @license
288 * Copyright 2017 Google LLC
289 *
290 * Licensed under the Apache License, Version 2.0 (the "License");
291 * you may not use this file except in compliance with the License.
292 * You may obtain a copy of the License at
293 *
294 *   http://www.apache.org/licenses/LICENSE-2.0
295 *
296 * Unless required by applicable law or agreed to in writing, software
297 * distributed under the License is distributed on an "AS IS" BASIS,
298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
299 * See the License for the specific language governing permissions and
300 * limitations under the License.
301 */const In="FirebaseError";class R extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=In,Object.setPrototypeOf(this,R.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,X.prototype.create)}}class X{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},a=`${this.service}/${t}`,i=this.errors[t],s=i?_n(i,r):"Error",o=`${this.serviceName}: ${s} (${a}).`;return new R(a,o,r)}}function _n(e,t){return e.replace(Sn,(n,r)=>{const a=t[r];return a!=null?String(a):`<${r}?>`})}const Sn=/\{\$([^}]+)}/g;/**
302 * @license
303 * Copyright 2021 Google LLC
304 *
305 * Licensed under the Apache License, Version 2.0 (the "License");
306 * you may not use this file except in compliance with the License.
307 * You may obtain a copy of the License at
308 *
309 *   http://www.apache.org/licenses/LICENSE-2.0
310 *
311 * Unless required by applicable law or agreed to in writing, software
312 * distributed under the License is distributed on an "AS IS" BASIS,
313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
314 * See the License for the specific language governing permissions and
315 * limitations under the License.
316 */function M(e){return e&&e._delegate?e._delegate:e}class O{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}const Oe="@firebase/installations",Z="0.6.9";/**
317 * @license
318 * Copyright 2019 Google LLC
319 *
320 * Licensed under the Apache License, Version 2.0 (the "License");
321 * you may not use this file except in compliance with the License.
322 * You may obtain a copy of the License at
323 *
324 *   http://www.apache.org/licenses/LICENSE-2.0
325 *
326 * Unless required by applicable law or agreed to in writing, software
327 * distributed under the License is distributed on an "AS IS" BASIS,
328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
329 * See the License for the specific language governing permissions and
330 * limitations under the License.
331 */const Ne=1e4,$e=`w:${Z}`,Re="FIS_v2",vn="https://firebaseinstallations.googleapis.com/v1",An=3600*1e3,Tn="installations",Cn="Installations";/**
332 * @license
333 * Copyright 2019 Google LLC
334 *
335 * Licensed under the Apache License, Version 2.0 (the "License");
336 * you may not use this file except in compliance with the License.
337 * You may obtain a copy of the License at
338 *
339 *   http://www.apache.org/licenses/LICENSE-2.0
340 *
341 * Unless required by applicable law or agreed to in writing, software
342 * distributed under the License is distributed on an "AS IS" BASIS,
343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
344 * See the License for the specific language governing permissions and
345 * limitations under the License.
346 */const Dn={"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."},E=new X(Tn,Cn,Dn);function Me(e){return e instanceof R&&e.code.includes("request-failed")}/**
347 * @license
348 * Copyright 2019 Google LLC
349 *
350 * Licensed under the Apache License, Version 2.0 (the "License");
351 * you may not use this file except in compliance with the License.
352 * You may obtain a copy of the License at
353 *
354 *   http://www.apache.org/licenses/LICENSE-2.0
355 *
356 * Unless required by applicable law or agreed to in writing, software
357 * distributed under the License is distributed on an "AS IS" BASIS,
358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
359 * See the License for the specific language governing permissions and
360 * limitations under the License.
361 */function Be({projectId:e}){return`${vn}/projects/${e}/installations`}function Pe(e){return{token:e.token,requestStatus:2,expiresIn:On(e.expiresIn),creationTime:Date.now()}}async function Fe(e,t){const r=(await t.json()).error;return E.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function He({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function kn(e,{refreshToken:t}){const n=He(e);return n.append("Authorization",Nn(t)),n}async function xe(e){const t=await e();return t.status>=500&&t.status<600?e():t}function On(e){return Number(e.replace("s","000"))}function Nn(e){return`${Re} ${e}`}/**
362 * @license
363 * Copyright 2019 Google LLC
364 *
365 * Licensed under the Apache License, Version 2.0 (the "License");
366 * you may not use this file except in compliance with the License.
367 * You may obtain a copy of the License at
368 *
369 *   http://www.apache.org/licenses/LICENSE-2.0
370 *
371 * Unless required by applicable law or agreed to in writing, software
372 * distributed under the License is distributed on an "AS IS" BASIS,
373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
374 * See the License for the specific language governing permissions and
375 * limitations under the License.
376 */async function $n({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=Be(e),a=He(e),i=t.getImmediate({optional:!0});if(i){const d=await i.getHeartbeatsHeader();d&&a.append("x-firebase-client",d)}const s={fid:n,authVersion:Re,appId:e.appId,sdkVersion:$e},o={method:"POST",headers:a,body:JSON.stringify(s)},u=await xe(()=>fetch(r,o));if(u.ok){const d=await u.json();return{fid:d.fid||n,registrationStatus:2,refreshToken:d.refreshToken,authToken:Pe(d.authToken)}}else throw await Fe("Create Installation",u)}/**
377 * @license
378 * Copyright 2019 Google LLC
379 *
380 * Licensed under the Apache License, Version 2.0 (the "License");
381 * you may not use this file except in compliance with the License.
382 * You may obtain a copy of the License at
383 *
384 *   http://www.apache.org/licenses/LICENSE-2.0
385 *
386 * Unless required by applicable law or agreed to in writing, software
387 * distributed under the License is distributed on an "AS IS" BASIS,
388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
389 * See the License for the specific language governing permissions and
390 * limitations under the License.
391 */function Le(e){return new Promise(t=>{setTimeout(t,e)})}/**
392 * @license
393 * Copyright 2019 Google LLC
394 *
395 * Licensed under the Apache License, Version 2.0 (the "License");
396 * you may not use this file except in compliance with the License.
397 * You may obtain a copy of the License at
398 *
399 *   http://www.apache.org/licenses/LICENSE-2.0
400 *
401 * Unless required by applicable law or agreed to in writing, software
402 * distributed under the License is distributed on an "AS IS" BASIS,
403 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
404 * See the License for the specific language governing permissions and
405 * limitations under the License.
406 */function Rn(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_")}/**
407 * @license
408 * Copyright 2019 Google LLC
409 *
410 * Licensed under the Apache License, Version 2.0 (the "License");
411 * you may not use this file except in compliance with the License.
412 * You may obtain a copy of the License at
413 *
414 *   http://www.apache.org/licenses/LICENSE-2.0
415 *
416 * Unless required by applicable law or agreed to in writing, software
417 * distributed under the License is distributed on an "AS IS" BASIS,
418 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
419 * See the License for the specific language governing permissions and
420 * limitations under the License.
421 */const Mn=/^[cdef][\w-]{21}$/,G="";function Bn(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const n=Pn(e);return Mn.test(n)?n:G}catch{return G}}function Pn(e){return Rn(e).substr(0,22)}/**
422 * @license
423 * Copyright 2019 Google LLC
424 *
425 * Licensed under the Apache License, Version 2.0 (the "License");
426 * you may not use this file except in compliance with the License.
427 * You may obtain a copy of the License at
428 *
429 *   http://www.apache.org/licenses/LICENSE-2.0
430 *
431 * Unless required by applicable law or agreed to in writing, software
432 * distributed under the License is distributed on an "AS IS" BASIS,
433 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
434 * See the License for the specific language governing permissions and
435 * limitations under the License.
436 */function B(e){return`${e.appName}!${e.appId}`}/**
437 * @license
438 * Copyright 2019 Google LLC
439 *
440 * Licensed under the Apache License, Version 2.0 (the "License");
441 * you may not use this file except in compliance with the License.
442 * You may obtain a copy of the License at
443 *
444 *   http://www.apache.org/licenses/LICENSE-2.0
445 *
446 * Unless required by applicable law or agreed to in writing, software
447 * distributed under the License is distributed on an "AS IS" BASIS,
448 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
449 * See the License for the specific language governing permissions and
450 * limitations under the License.
451 */const je=new Map;function Ve(e,t){const n=B(e);Ue(n,t),Fn(n,t)}function Ue(e,t){const n=je.get(e);if(n)for(const r of n)r(t)}function Fn(e,t){const n=Hn();n&&n.postMessage({key:e,fid:t}),xn()}let m=null;function Hn(){return!m&&"BroadcastChannel"in self&&(m=new BroadcastChannel("[Firebase] FID Change"),m.onmessage=e=>{Ue(e.data.key,e.data.fid)}),m}function xn(){je.size===0&&m&&(m.close(),m=null)}/**
452 * @license
453 * Copyright 2019 Google LLC
454 *
455 * Licensed under the Apache License, Version 2.0 (the "License");
456 * you may not use this file except in compliance with the License.
457 * You may obtain a copy of the License at
458 *
459 *   http://www.apache.org/licenses/LICENSE-2.0
460 *
461 * Unless required by applicable law or agreed to in writing, software
462 * distributed under the License is distributed on an "AS IS" BASIS,
463 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
464 * See the License for the specific language governing permissions and
465 * limitations under the License.
466 */const Ln="firebase-installations-database",jn=1,I="firebase-installations-store";let x=null;function Q(){return x||(x=$(Ln,jn,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(I)}}})),x}async function N(e,t){const n=B(e),a=(await Q()).transaction(I,"readwrite"),i=a.objectStore(I),s=await i.get(n);return await i.put(t,n),await a.done,(!s||s.fid!==t.fid)&&Ve(e,t.fid),t}async function Ke(e){const t=B(e),r=(await Q()).transaction(I,"readwrite");await r.objectStore(I).delete(t),await r.done}async function P(e,t){const n=B(e),a=(await Q()).transaction(I,"readwrite"),i=a.objectStore(I),s=await i.get(n),o=t(s);return o===void 0?await i.delete(n):await i.put(o,n),await a.done,o&&(!s||s.fid!==o.fid)&&Ve(e,o.fid),o}/**
467 * @license
468 * Copyright 2019 Google LLC
469 *
470 * Licensed under the Apache License, Version 2.0 (the "License");
471 * you may not use this file except in compliance with the License.
472 * You may obtain a copy of the License at
473 *
474 *   http://www.apache.org/licenses/LICENSE-2.0
475 *
476 * Unless required by applicable law or agreed to in writing, software
477 * distributed under the License is distributed on an "AS IS" BASIS,
478 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
479 * See the License for the specific language governing permissions and
480 * limitations under the License.
481 */async function ee(e){let t;const n=await P(e.appConfig,r=>{const a=Vn(r),i=Un(e,a);return t=i.registrationPromise,i.installationEntry});return n.fid===G?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}function Vn(e){const t=e||{fid:Bn(),registrationStatus:0};return qe(t)}function Un(e,t){if(t.registrationStatus===0){if(!navigator.onLine){const a=Promise.reject(E.create("app-offline"));return{installationEntry:t,registrationPromise:a}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=Kn(e,n);return{installationEntry:n,registrationPromise:r}}else return t.registrationStatus===1?{installationEntry:t,registrationPromise:qn(e)}:{installationEntry:t}}async function Kn(e,t){try{const n=await $n(e,t);return N(e.appConfig,n)}catch(n){throw Me(n)&&n.customData.serverCode===409?await Ke(e.appConfig):await N(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}async function qn(e){let t=await pe(e.appConfig);for(;t.registrationStatus===1;)await Le(100),t=await pe(e.appConfig);if(t.registrationStatus===0){const{installationEntry:n,registrationPromise:r}=await ee(e);return r||n}return t}function pe(e){return P(e,t=>{if(!t)throw E.create("installation-not-found");return qe(t)}
481)}function qe(e){return Wn(e)?{fid:e.fid,registrationStatus:0}:e}function Wn(e){return e.registrationStatus===1&&e.registrationTime+Ne<Date.now()}/**
482 * @license
483 * Copyright 2019 Google LLC
484 *
485 * Licensed under the Apache License, Version 2.0 (the "License");
486 * you may not use this file except in compliance with the License.
487 * You may obtain a copy of the License at
488 *
489 *   http://www.apache.org/licenses/LICENSE-2.0
490 *
491 * Unless required by applicable law or agreed to in writing, software
492 * distributed under the License is distributed on an "AS IS" BASIS,
493 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
494 * See the License for the specific language governing permissions and
495 * limitations under the License.
496 */async function zn({appConfig:e,heartbeatServiceProvider:t},n){const r=Gn(e,n),a=kn(e,n),i=t.getImmediate({optional:!0});if(i){const d=await i.getHeartbeatsHeader();d&&a.append("x-firebase-client",d)}const s={installation:{sdkVersion:$e,appId:e.appId}},o={method:"POST",headers:a,body:JSON.stringify(s)},u=await xe(()=>fetch(r,o));if(u.ok){const d=await u.json();return Pe(d)}else throw await Fe("Generate Auth Token",u)}function Gn(e,{fid:t}){return`${Be(e)}/${t}/authTokens:generate`}/**
497 * @license
498 * Copyright 2019 Google LLC
499 *
500 * Licensed under the Apache License, Version 2.0 (the "License");
501 * you may not use this file except in compliance with the License.
502 * You may obtain a copy of the License at
503 *
504 *   http://www.apache.org/licenses/LICENSE-2.0
505 *
506 * Unless required by applicable law or agreed to in writing, software
507 * distributed under the License is distributed on an "AS IS" BASIS,
508 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
509 * See the License for the specific language governing permissions and
510 * limitations under the License.
511 */async function te(e,t=!1){let n;const r=await P(e.appConfig,i=>{if(!We(i))throw E.create("not-registered");const s=i.authToken;if(!t&&Xn(s))return i;if(s.requestStatus===1)return n=Jn(e,t),i;{if(!navigator.onLine)throw E.create("app-offline");const o=Qn(i);return n=Yn(e,o),o}});return n?await n:r.authToken}async function Jn(e,t){let n=await ge(e.appConfig);for(;n.authToken.requestStatus===1;)await Le(100),n=await ge(e.appConfig);const r=n.authToken;return r.requestStatus===0?te(e,t):r}function ge(e){return P(e,t=>{if(!We(t))throw E.create("not-registered");const n=t.authToken;return er(n)?Object.assign(Object.assign({},t),{authToken:{requestStatus:0}}):t})}async function Yn(e,t){try{const n=await zn(e,t),r=Object.assign(Object.assign({},t),{authToken:n});return await N(e.appConfig,r),n}catch(n){if(Me(n)&&(n.customData.serverCode===401||n.customData.serverCode===404))await Ke(e.appConfig);else{const r=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await N(e.appConfig,r)}throw n}}function We(e){return e!==void 0&&e.registrationStatus===2}function Xn(e){return e.requestStatus===2&&!Zn(e)}function Zn(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+An}function Qn(e){const t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}function er(e){return e.requestStatus===1&&e.requestTime+Ne<Date.now()}/**
512 * @license
513 * Copyright 2019 Google LLC
514 *
515 * Licensed under the Apache License, Version 2.0 (the "License");
516 * you may not use this file except in compliance with the License.
517 * You may obtain a copy of the License at
518 *
519 *   http://www.apache.org/licenses/LICENSE-2.0
520 *
521 * Unless required by applicable law or agreed to in writing, software
522 * distributed under the License is distributed on an "AS IS" BASIS,
523 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
524 * See the License for the specific language governing permissions and
525 * limitations under the License.
526 */async function tr(e){const t=e,{installationEntry:n,registrationPromise:r}=await ee(t);return r?r.catch(console.error):te(t).catch(console.error),n.fid}/**
527 * @license
528 * Copyright 2019 Google LLC
529 *
530 * Licensed under the Apache License, Version 2.0 (the "License");
531 * you may not use this file except in compliance with the License.
532 * You may obtain a copy of the License at
533 *
534 *   http://www.apache.org/licenses/LICENSE-2.0
535 *
536 * Unless required by applicable law or agreed to in writing, software
537 * distributed under the License is distributed on an "AS IS" BASIS,
538 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
539 * See the License for the specific language governing permissions and
540 * limitations under the License.
541 */async function nr(e,t=!1){const n=e;return await rr(n),(await te(n,t)).token}async function rr(e){const{registrationPromise:t}=await ee(e);t&&await t}/**
542 * @license
543 * Copyright 2019 Google LLC
544 *
545 * Licensed under the Apache License, Version 2.0 (the "License");
546 * you may not use this file except in compliance with the License.
547 * You may obtain a copy of the License at
548 *
549 *   http://www.apache.org/licenses/LICENSE-2.0
550 *
551 * Unless required by applicable law or agreed to in writing, software
552 * distributed under the License is distributed on an "AS IS" BASIS,
553 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
554 * See the License for the specific language governing permissions and
555 * limitations under the License.
556 */function ar(e){if(!e||!e.options)throw L("App Configuration");if(!e.name)throw L("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw L(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}function L(e){return E.create("missing-app-config-values",{valueName:e})}/**
557 * @license
558 * Copyright 2020 Google LLC
559 *
560 * Licensed under the Apache License, Version 2.0 (the "License");
561 * you may not use this file except in compliance with the License.
562 * You may obtain a copy of the License at
563 *
564 *   http://www.apache.org/licenses/LICENSE-2.0
565 *
566 * Unless required by applicable law or agreed to in writing, software
567 * distributed under the License is distributed on an "AS IS" BASIS,
568 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
569 * See the License for the specific language governing permissions and
570 * limitations under the License.
571 */const ze="installations",ir="installations-internal",sr=e=>{const t=e.getProvider("app").getImmediate(),n=ar(t),r=Y(t,"heartbeat");return{app:t,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},or=e=>{const t=e.getProvider("app").getImmediate(),n=Y(t,ze).getImmediate();return{getId:()=>tr(n),getToken:a=>nr(n,a)}};function cr(){y(new O(ze,sr,"PUBLIC")),y(new O(ir,or,"PRIVATE"))}cr();w(Oe,Z);w(Oe,Z,"esm2017");/**
572 * @license
573 * Copyright 2019 Google LLC
574 *
575 * Licensed under the Apache License, Version 2.0 (the "License");
576 * you may not use this file except in compliance with the License.
577 * 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
582 * distributed under the License is distributed on an "AS IS" BASIS,
583 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
584 * See the License for the specific language governing permissions and
585 * limitations under the License.
586 */const ur="/firebase-messaging-sw.js",lr="/firebase-cloud-messaging-push-scope",Ge="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",dr="https://fcmregistrations.googleapis.com/v1",Je="google.c.a.c_id",fr="google.c.a.c_l",hr="google.c.a.ts",pr="google.c.a.e";var be;(function(e){e[e.DATA_MESSAGE=1]="DATA_MESSAGE",e[e.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"})(be||(be={}));/**
587 * @license
588 * Copyright 2018 Google LLC
589 *
590 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
591 * in compliance with the License. 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 distributed under the License
596 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
597 * or implied. See the License for the specific language governing permissions and limitations under
598 * the License.
599 */var A;(function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"})(A||(A={}));/**
600 * @license
601 * Copyright 2017 Google LLC
602 *
603 * Licensed under the Apache License, Version 2.0 (the "License");
604 * you may not use this file except in compliance with the License.
605 * You may obtain a copy of the License at
606 *
607 *   http://www.apache.org/licenses/LICENSE-2.0
608 *
609 * Unless required by applicable law or agreed to in writing, software
610 * distributed under the License is distributed on an "AS IS" BASIS,
611 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
612 * See the License for the specific language governing permissions and
613 * limitations under the License.
614 */function h(e){const t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function gr(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/\-/g,"+").replace(/_/g,"/"),r=atob(n),a=new Uint8Array(r.length);for(let i=0;i<r.length;++i)a[i]=r.charCodeAt(i);return a}/**
615 * @license
616 * Copyright 2019 Google LLC
617 *
618 * Licensed under the Apache License, Version 2.0 (the "License");
619 * you may not use this file except in compliance with the License.
620 * You may obtain a copy of the License at
621 *
622 *   http://www.apache.org/licenses/LICENSE-2.0
623 *
624 * Unless required by applicable law or agreed to in writing, software
625 * distributed under the License is distributed on an "AS IS" BASIS,
626 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
627 * See the License for the specific language governing permissions and
628 * limitations under the License.
629 */const j="fcm_token_details_db",br=5,me="fcm_token_object_Store";async function mr(e){if("databases"in indexedDB&&!(await indexedDB.databases()).map(i=>i.name).includes(j))return null;let t=null;return(await $(j,br,{upgrade:async(r,a,i,s)=>{var o;if(a<2||!r.objectStoreNames.contains(me))return;const u=s.objectStore(me),d=await u.index("fcmSenderId").get(e);if(await u.clear(),!!d){if(a===2){const c=d;if(!c.auth||!c.p256dh||!c.endpoint)return;t={token:c.fcmToken,createTime:(o=c.createTime)!==null&&o!==void 0?o:Date.now(),subscriptionOptions:{auth:c.auth,p256dh:c.p256dh,endpoint:c.endpoint,swScope:c.swScope,vapidKey:typeof c.vapidKey=="string"?c.vapidKey:h(c.vapidKey)}}}else if(a===3){const c=d;t={token:c.fcmToken,createTime:c.createTime,subscriptionOptions:{auth:h(c.auth),p256dh:h(c.p256dh),endpoint:c.endpoint,swScope:c.swScope,vapidKey:h(c.vapidKey)}}}else if(a===4){const c=d;t={token:c.fcmToken,createTime:c.createTime,subscriptionOptions:{auth:h(c.auth),p256dh:h(c.p256dh),endpoint:c.endpoint,swScope:c.swScope,vapidKey:h(c.vapidKey)}}}}}})).close(),await F(j),await F("fcm_vapid_details_db"),await F("undefined"),wr(t)?t:null}function wr(e){if(!e||!e.subscriptionOptions)return!1;const{subscriptionOptions:t}=e;return typeof e.createTime=="number"&&e.createTime>0&&typeof e.token=="string"&&e.token.length>0&&typeof t.auth=="string"&&t.auth.length>0&&typeof t.p256dh=="string"&&t.p256dh.length>0&&typeof t.endpoint=="string"&&t.endpoint.length>0&&typeof t.swScope=="string"&&t.swScope.length>0&&typeof t.vapidKey=="string"&&t.vapidKey.length>0}/**
630 * @license
631 * Copyright 2019 Google LLC
632 *
633 * Licensed under the Apache License, Version 2.0 (the "License");
634 * you may not use this file except in compliance with the License.
635 * You may obtain a copy of the License at
636 *
637 *   http://www.apache.org/licenses/LICENSE-2.0
638 *
639 * Unless required by applicable law or agreed to in writing, software
640 * distributed under the License is distributed on an "AS IS" BASIS,
641 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
642 * See the License for the specific language governing permissions and
643 * limitations under the License.
644 */const yr="firebase-messaging-database",Er=1,_="firebase-messaging-store";let V=null;function ne(){return V||(V=$(yr,Er,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(_)}}})),V}async function Ye(e){const t=ae(e),r=await(await ne()).transaction(_).objectStore(_).get(t);if(r)return r;{const a=await mr(e.appConfig.senderId);if(a)return await re(e,a),a}}async function re(e,t){const n=ae(e),a=(await ne()).transaction(_,"readwrite");return await a.objectStore(_).put(t,n),await a.done,t}async function Ir(e){const t=ae(e),r=(await ne()).transaction(_,"readwrite");await r.objectStore(_).delete(t),await r.done}function ae({appConfig:e}){return e.appId}/**
645 * @license
646 * Copyright 2017 Google LLC
647 *
648 * Licensed under the Apache License, Version 2.0 (the "License");
649 * you may not use this file except in compliance with the License.
650 * You may obtain a copy of the License at
651 *
652 *   http://www.apache.org/licenses/LICENSE-2.0
653 *
654 * Unless required by applicable law or agreed to in writing, software
655 * distributed under the License is distributed on an "AS IS" BASIS,
656 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
657 * See the License for the specific language governing permissions and
658 * limitations under the License.
659 */const _r={"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."},f=new X("messaging","Messaging",_r);/**
660 * @license
661 * Copyright 2019 Google LLC
662 *
663 * Licensed under the Apache License, Version 2.0 (the "License");
664 * you may not use this file except in compliance with the License.
665 * You may obtain a copy of the License at
666 *
667 *   http://www.apache.org/licenses/LICENSE-2.0
668 *
669 * Unless required by applicable law or agreed to in writing, software
670 * distributed under the License is distributed on an "AS IS" BASIS,
671 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
672 * See the License for the specific language governing permissions and
673 * limitations under the License.
674 */async function Sr(e,t){const n=await se(e),r=Ze(t),a={method:"POST",headers:n,body:JSON.stringify(r)};let i;try{i=await(await fetch(ie(e.appConfig),a)).json()}catch(s){throw f.create("token-subscribe-failed",{errorInfo:s==null?void 0:s.toString()})}if(i.error){const s=i.error.message;throw f.create("token-subscribe-failed",{errorInfo:s})}if(!i.token)throw f.create("token-subscribe-no-token");return i.token}async function vr(e,t){const n=await se(e),r=Ze(t.subscriptionOptions),a={method:"PATCH",headers:n,body:JSON.stringify(r)};let i;try{i=await(await fetch(`${ie(e.appConfig)}/${t.token}`,a)).json()}catch(s){throw f.create("token-update-failed",{errorInfo:s==null?void 0:s.toString()})}if(i.error){const s=i.error.message;throw f.create("token-update-failed",{errorInfo:s})}if(!i.token)throw f.create("token-update-no-token");return i.token}async function Xe(e,t){const r={method:"DELETE",headers:await se(e)};try{const i=await(await fetch(`${ie(e.appConfig)}/${t}`,r)).json();if(i.error){const s=i.error.message;throw f.create("token-unsubscribe-failed",{errorInfo:s})}}catch(a){throw f.create("token-unsubscribe-failed",{errorInfo:a==null?void 0:a.toString()})}}function ie({projectId:e}){return`${dr}/projects/${e}/registrations`}async function se({appConfig:e,installations:t}){const n=await t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${n}`})}function Ze({p256dh:e,auth:t,endpoint:n,vapidKey:r}){const a={web:{endpoint:n,auth:t,p256dh:e}};return r!==Ge&&(a.web.applicationPubKey=r),a}/**
675 * @license
676 * Copyright 2019 Google LLC
677 *
678 * Licensed under the Apache License, Version 2.0 (the "License");
679 * you may not use this file except in compliance with the License.
680 * You may obtain a copy of the License at
681 *
682 *   http://www.apache.org/licenses/LICENSE-2.0
683 *
684 * Unless required by applicable law or agreed to in writing, software
685 * distributed under the License is distributed on an "AS IS" BASIS,
686 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
687 * See the License for the specific language governing permissions and
688 * limitations under the License.
689 */const Ar=10080*60*1e3;async function Tr(e){const t=await kr(e.swRegistration,e.vapidKey),n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:h(t.getKey("auth")),p256dh:h(t.getKey("p256dh"))},r=await Ye(e.firebaseDependencies);if(r){if(Or(r.subscriptionOptions,n))return Date.now()>=r.createTime+Ar?Dr(e,{token:r.token,createTime:Date.now(),subscriptionOptions:n}):r.token;try{await Xe(e.firebaseDependencies,r.token)}catch(a){console.warn(a)}return we(e.firebaseDependencies,n)}else return we(e.firebaseDependencies,n)}async function Cr(e){const t=await Ye(e.firebaseDependencies);t&&(await Xe(e.firebaseDependencies,t.token),await Ir(e.firebaseDependencies));const n=await e.swRegistration.pushManager.getSubscription();return n?n.unsubscribe():!0}async function Dr(e,t){try{const n=await vr(e.firebaseDependencies,t),r=Object.assign(Object.assign({},t),{token:n,createTime:Date.now()});return await re(e.firebaseDependencies,r),n}catch(n){throw n}}async function we(e,t){const r={token:await Sr(e,t),createTime:Date.now(),subscriptionOptions:t};return await re(e,r),r.token}async function kr(e,t){const n=await e.pushManager.getSubscription();return n||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:gr(t)})}function Or(e,t){const n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,a=t.auth===e.auth,i=t.p256dh===e.p256dh;return n&&r&&a&&i}/**
690 * @license
691 * Copyright 2020 Google LLC
692 *
693 * Licensed under the Apache License, Version 2.0 (the "License");
694 * you may not use this file except in compliance with the License.
695 * You may obtain a copy of the License at
696 *
697 *   http://www.apache.org/licenses/LICENSE-2.0
698 *
699 * Unless required by applicable law or agreed to in writing, software
700 * distributed under the License is distributed on an "AS IS" BASIS,
701 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
702 * See the License for the specific language governing permissions and
703 * limitations under the License.
704 */function ye(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return Nr(t,e),$r(t,e),Rr(t,e),t}function Nr(e,t){if(!t.notification)return;e.notification={};const n=t.notification.title;n&&(e.notification.title=n);const r=t.notification.body;r&&(e.notification.body=r);const a=t.notification.image;a&&(e.notification.image=a);const i=t.notification.icon;i&&(e.notification.icon=i)}function $r(e,t){t.data&&(e.data=t.data)}function Rr(e,t){var n,r,a,i,s;if(!t.fcmOptions&&!(!((n=t.notification)===null||n===void 0)&&n.click_action))return;e.fcmOptions={};const o=(a=(r=t.fcmOptions)===null||r===void 0?void 0:r.link)!==null&&a!==void 0?a:(i=t.notification)===null||i===void 0?void 0:i.click_action;o&&(e.fcmOptions.link=o);const u=(s=t.fcmOptions)===null||s===void 0?void 0:s.analytics_label;u&&(e.fcmOptions.analyticsLabel=u)}/**
705 * @license
706 * Copyright 2019 Google LLC
707 *
708 * Licensed under the Apache License, Version 2.0 (the "License");
709 * you may not use this file except in compliance with the License.
710 * You may obtain a copy of the License at
711 *
712 *   http://www.apache.org/licenses/LICENSE-2.0
713 *
714 * Unless required by applicable law or agreed to in writing, software
715 * distributed under the License is distributed on an "AS IS" BASIS,
716 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
717 * See the License for the specific language governing permissions and
718 * limitations under the License.
719 */function Mr(e){return typeof e=="object"&&!!e&&Je in e}/**
720 * @license
721 * Copyright 2019 Google LLC
722 *
723 * Licensed under the Apache License, Version 2.0 (the "License");
724 * you may not use this file except in compliance with the License.
725 * You may obtain a copy of the License at
726 *
727 *   http://www.apache.org/licenses/LICENSE-2.0
728 *
729 * Unless required by applicable law or agreed to in writing, software
730 * distributed under the License is distributed on an "AS IS" BASIS,
731 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
732 * See the License for the specific language governing permissions and
733 * limitations under the License.
734 */function Br(e){if(!e||!e.options)throw U("App Configuration Object");if(!e.name)throw U("App Name");const t=["projectId","apiKey","appId","messagingSenderId"],{options:n}=e;for(const r of t)if(!n[r])throw U(r);return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}function U(e){return f.create("missing-app-config-values",{valueName:e})}/**
735 * @license
736 * Copyright 2020 Google LLC
737 *
738 * Licensed under the Apache License, Version 2.0 (the "License");
739 * you may not use this file except in compliance with the License.
740 * You may obtain a copy of the License at
741 *
742 *   http://www.apache.org/licenses/LICENSE-2.0
743 *
744 * Unless required by applicable law or agreed to in writing, software
745 * distributed under the License is distributed on an "AS IS" BASIS,
746 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
747 * See the License for the specific language governing permissions and
748 * limitations under the License.
749 */class Pr{constructor(t,n,r){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const a=Br(t);this.firebaseDependencies={app:t,appConfig:a,installations:n,analyticsProvider:r}}_delete(){return Promise.resolve()}}/**
750 * @license
751 * Copyright 2020 Google LLC
752 *
753 * Licensed under the Apache License, Version 2.0 (the "License");
754 * you may not use this file except in compliance with the License.
755 * You may obtain a copy of the License at
756 *
757 *   http://www.apache.org/licenses/LICENSE-2.0
758 *
759 * Unless required by applicable law or agreed to in writing, software
760 * distributed under the License is distributed on an "AS IS" BASIS,
761 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
762 * See the License for the specific language governing permissions and
763 * limitations under the License.
764 */async function Qe(e){try{e.swRegistration=await navigator.serviceWorker.register(ur,{scope:lr}),e.swRegistration.update().catch(()=>{})}catch(t){throw f.create("failed-service-worker-registration",{browserErrorMessage:t==null?void 0:t.message})}}/**
765 * @license
766 * Copyright 2020 Google LLC
767 *
768 * Licensed under the Apache License, Version 2.0 (the "License");
769 * you may not use this file except in compliance with the License.
770 * You may obtain a copy of the License at
771 *
772 *   http://www.apache.org/licenses/LICENSE-2.0
773 *
774 * Unless required by applicable law or agreed to in writing, software
775 * distributed under the License is distributed on an "AS IS" BASIS,
776 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
777 * See the License for the specific language governing permissions and
778 * limitations under the License.
779 */async function Fr(e,t){if(!t&&!e.swRegistration&&await Qe(e),!(!t&&e.swRegistration)){if(!(t instanceof ServiceWorkerRegistration))throw f.create("invalid-sw-registration");e.swRegistration=t}}/**
780 * @license
781 * Copyright 2020 Google LLC
782 *
783 * Licensed under the Apache License, Version 2.0 (the "License");
784 * you may not use this file except in compliance with the License.
785 * You may obtain a copy of the License at
786 *
787 *   http://www.apache.org/licenses/LICENSE-2.0
788 *
789 * Unless required by applicable law or agreed to in writing, software
790 * distributed under the License is distributed on an "AS IS" BASIS,
791 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
792 * See the License for the specific language governing permissions and
793 * limitations under the License.
794 */async function Hr(e,t){t?e.vapidKey=t:e.vapidKey||(e.vapidKey=Ge)}/**
795 * @license
796 * Copyright 2020 Google LLC
797 *
798 * Licensed under the Apache License, Version 2.0 (the "License");
799 * you may not use this file except in compliance with the License.
800 * You may obtain a copy of the License at
801 *
802 *   http://www.apache.org/licenses/LICENSE-2.0
803 *
804 * Unless required by applicable law or agreed to in writing, software
805 * distributed under the License is distributed on an "AS IS" BASIS,
806 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
807 * See the License for the specific language governing permissions and
808 * limitations under the License.
809 */async function et(e,t){if(!navigator)throw f.create("only-available-in-window");if(Notification.permission==="default"&&await Notification.requestPermission(),Notification.permission!=="granted")throw f.create("permission-blocked");return await Hr(e,t==null?void 0:t.vapidKey),await Fr(e,t==null?void 0:t.serviceWorkerRegistration),Tr(e)}/**
810 * @license
811 * Copyright 2019 Google LLC
812 *
813 * Licensed under the Apache License, Version 2.0 (the "License");
814 * you may not use this file except in compliance with the License.
815 * You may obtain a copy of the License at
816 *
817 *   http://www.apache.org/licenses/LICENSE-2.0
818 *
819 * Unless required by applicable law or agreed to in writing, software
820 * distributed under the License is distributed on an "AS IS" BASIS,
821 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
822 * See the License for the specific language governing permissions and
823 * limitations under the License.
824 */async function xr(e,t,n){const r=Lr(t);(await e.firebaseDependencies.analyticsProvider.get()).logEvent(r,{message_id:n[Je],message_name:n[fr],message_time:n[hr],message_device_time:Math.floor(Date.now()/1e3)})}function Lr(e){switch(e){case A.NOTIFICATION_CLICKED:return"notification_open";case A.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}/**
825 * @license
826 * Copyright 2017 Google LLC
827 *
828 * Licensed under the Apache License, Version 2.0 (the "License");
829 * you may not use this file except in compliance with the License.
830 * You may obtain a copy of the License at
831 *
832 *   http://www.apache.org/licenses/LICENSE-2.0
833 *
834 * Unless required by applicable law or agreed to in writing, software
835 * distributed under the License is distributed on an "AS IS" BASIS,
836 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
837 * See the License for the specific language governing permissions and
838 * limitations under the License.
839 */async function jr(e,t){const n=t.data;if(!n.isFirebaseMessaging)return;e.onMessageHandler&&n.messageType===A.PUSH_RECEIVED&&(typeof e.onMessageHandler=="function"?e.onMessageHandler(ye(n)):e.onMessageHandler.next(ye(n)));const r=n.data;Mr(r)&&r[pr]==="1"&&await xr(e,n.messageType,r)}const Ee="@firebase/messaging",Ie="0.12.12";/**
840 * @license
841 * Copyright 2020 Google LLC
842 *
843 * Licensed under the Apache License, Version 2.0 (the "License");
844 * you may not use this file except in compliance with the License.
845 * You may obtain a copy of the License at
846 *
847 *   http://www.apache.org/licenses/LICENSE-2.0
848 *
849 * Unless required by applicable law or agreed to in writing, software
850 * distributed under the License is distributed on an "AS IS" BASIS,
851 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
852 * See the License for the specific language governing permissions and
853 * limitations under the License.
854 */const Vr=e=>{const t=new Pr(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",n=>jr(t,n)),t},Ur=e=>{const t=e.getProvider("messaging").getImmediate();return{getToken:r=>et(t,r)}};function Kr(){y(new O("messaging",Vr,"PUBLIC")),y(new O("messaging-internal",Ur,"PRIVATE")),w(Ee,Ie),w(Ee,Ie,"esm2017")}/**
855 * @license
856 * Copyright 2020 Google LLC
857 *
858 * Licensed under the Apache License, Version 2.0 (the "License");
859 * you may not use this file except in compliance with the License.
860 * You may obtain a copy of the License at
861 *
862 *   http://www.apache.org/licenses/LICENSE-2.0
863 *
864 * Unless required by applicable law or agreed to in writing, softw
864are
865 * distributed under the License is distributed on an "AS IS" BASIS,
866 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
867 * See the License for the specific language governing permissions and
868 * limitations under the License.
869 */async function qr(){try{await yn()}catch{return!1}return typeof window<"u"&&wn()&&En()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}/**
870 * @license
871 * Copyright 2020 Google LLC
872 *
873 * Licensed under the Apache License, Version 2.0 (the "License");
874 * you may not use this file except in compliance with the License.
875 * You may obtain a copy of the License at
876 *
877 *   http://www.apache.org/licenses/LICENSE-2.0
878 *
879 * Unless required by applicable law or agreed to in writing, software
880 * distributed under the License is distributed on an "AS IS" BASIS,
881 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
882 * See the License for the specific language governing permissions and
883 * limitations under the License.
884 */async function Wr(e){if(!navigator)throw f.create("only-available-in-window");return e.swRegistration||await Qe(e),Cr(e)}/**
885 * @license
886 * Copyright 2020 Google LLC
887 *
888 * Licensed under the Apache License, Version 2.0 (the "License");
889 * you may not use this file except in compliance with the License.
890 * You may obtain a copy of the License at
891 *
892 *   http://www.apache.org/licenses/LICENSE-2.0
893 *
894 * Unless required by applicable law or agreed to in writing, software
895 * distributed under the License is distributed on an "AS IS" BASIS,
896 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
897 * See the License for the specific language governing permissions and
898 * limitations under the License.
899 */function zr(e,t){if(!navigator)throw f.create("only-available-in-window");return e.onMessageHandler=t,()=>{e.onMessageHandler=null}}/**
900 * @license
901 * Copyright 2017 Google LLC
902 *
903 * Licensed under the Apache License, Version 2.0 (the "License");
904 * you may not use this file except in compliance with the License.
905 * You may obtain a copy of the License at
906 *
907 *   http://www.apache.org/licenses/LICENSE-2.0
908 *
909 * Unless required by applicable law or agreed to in writing, software
910 * distributed under the License is distributed on an "AS IS" BASIS,
911 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
912 * See the License for the specific language governing permissions and
913 * limitations under the License.
914 */function Xr(e=on()){return qr().then(t=>{if(!t)throw f.create("unsupported-browser")},t=>{throw f.create("indexed-db-unsupported")}),Y(M(e),"messaging").getImmediate()}async function Zr(e,t){return e=M(e),et(e,t)}function Qr(e){return e=M(e),Wr(e)}function ea(e,t){return e=M(e),zr(e,t)}Kr();export{Qr as deleteToken,Xr as getMessaging,Zr as getToken,qr as isSupported,ea as onMessage};

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.