pwa-auth 3.0.5 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +53 -42
- package/demonstration/compiled/pwa-auth.js +34 -34
- package/demonstration/compiled/pwa-auth.js.map +1 -1
- package/demonstration/compiled/pwa-helpers-BN4uXXdl.js +8 -0
- package/demonstration/compiled/pwa-helpers-BN4uXXdl.js.map +1 -0
- package/demonstration/compiled/pwa-helpers.js +8 -0
- package/demonstration/compiled/pwa-helpers.js.map +1 -0
- package/package.json +16 -3
- package/src/compiled/pwa-auth.js +34 -34
- package/src/compiled/pwa-auth.js.map +1 -1
- package/src/compiled/pwa-helpers-BN4uXXdl.js +8 -0
- package/src/compiled/pwa-helpers-BN4uXXdl.js.map +1 -0
- package/src/compiled/pwa-helpers.js +8 -0
- package/src/compiled/pwa-helpers.js.map +1 -0
- package/src/pwa-auth.js +0 -1
- package/src/pwa-helpers.js +1 -0
- package/src-classes/pwa-auth.js +3 -0
- package/src-compiled/pwa-auth.js +881 -0
- package/src-compiled/pwa-auth.js.map +1 -0
- package/src-compiled/pwa-helpers-BN4uXXdl.js +8 -0
- package/src-compiled/pwa-helpers-BN4uXXdl.js.map +1 -0
- package/src-compiled/pwa-helpers.js +8 -0
- package/src-compiled/pwa-helpers.js.map +1 -0
- package/src-export/pwa-auth.ts +3 -0
- package/src-export/pwa-helpers.ts +1 -0
- package/src-export/tsconfig.production.json +53 -0
- package/src-functions/pwa-helpers.js +1 -0
- package/src-typescript/development/helpers-array.ts +0 -0
- package/transpiled/src-export/pwa-auth.d.ts +4 -0
- package/transpiled/src-export/pwa-auth.d.ts.map +1 -0
- package/transpiled/src-export/pwa-auth.js +3 -0
- package/transpiled/src-export/pwa-helpers.d.ts +2 -0
- package/transpiled/src-export/pwa-helpers.d.ts.map +1 -0
- package/transpiled/src-export/pwa-helpers.js +1 -0
- package/transpiled/src-typescript/css/form/button.d.ts +3 -0
- package/transpiled/src-typescript/css/form/button.d.ts.map +1 -0
- package/transpiled/src-typescript/css/form/button.js +54 -0
- package/transpiled/src-typescript/css/form/input.d.ts +3 -0
- package/transpiled/src-typescript/css/form/input.d.ts.map +1 -0
- package/transpiled/src-typescript/css/form/input.js +24 -0
- package/transpiled/src-typescript/css/form/label.d.ts +3 -0
- package/transpiled/src-typescript/css/form/label.d.ts.map +1 -0
- package/transpiled/src-typescript/css/form/label.js +22 -0
- package/transpiled/src-typescript/css/form/list.d.ts +3 -0
- package/transpiled/src-typescript/css/form/list.d.ts.map +1 -0
- package/transpiled/src-typescript/css/form/list.js +22 -0
- package/transpiled/src-typescript/css/svg.d.ts +4 -0
- package/transpiled/src-typescript/css/svg.d.ts.map +1 -0
- package/transpiled/src-typescript/css/svg.js +4 -0
- package/transpiled/src-typescript/css/toggle.d.ts +2 -0
- package/transpiled/src-typescript/css/toggle.d.ts.map +1 -0
- package/transpiled/src-typescript/css/toggle.js +8 -0
- package/transpiled/src-typescript/firebase/authentication.d.ts +11 -0
- package/transpiled/src-typescript/firebase/authentication.d.ts.map +1 -0
- package/transpiled/src-typescript/firebase/authentication.js +10 -0
- package/transpiled/src-typescript/firebase/interface.d.ts +5 -0
- package/transpiled/src-typescript/firebase/interface.d.ts.map +1 -0
- package/transpiled/src-typescript/firebase/interface.js +79 -0
- package/transpiled/src-typescript/redux/backend.d.ts +16 -0
- package/transpiled/src-typescript/redux/backend.d.ts.map +1 -0
- package/transpiled/src-typescript/redux/backend.js +43 -0
- package/transpiled/src-typescript/redux/drawer.d.ts +20 -0
- package/transpiled/src-typescript/redux/drawer.d.ts.map +1 -0
- package/transpiled/src-typescript/redux/drawer.js +21 -0
- package/transpiled/src-typescript/redux/frontend.d.ts +17 -0
- package/transpiled/src-typescript/redux/frontend.d.ts.map +1 -0
- package/transpiled/src-typescript/redux/frontend.js +67 -0
- package/transpiled/src-typescript/redux/object.d.ts +24 -0
- package/transpiled/src-typescript/redux/object.d.ts.map +1 -0
- package/transpiled/src-typescript/redux/object.js +1 -0
- package/transpiled/src-typescript/store.d.ts +19 -0
- package/transpiled/src-typescript/store.d.ts.map +1 -0
- package/transpiled/src-typescript/store.js +13 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/drawer.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/drawer.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/drawer.js +55 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/exit.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/exit.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/exit.js +48 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/link.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/link.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/link.js +12 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/paragraph.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/paragraph.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/paragraph.js +10 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/toggle.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/toggle.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/toggle.js +18 -0
- package/transpiled/src-typescript/webcomponents/drawer/drawer.d.ts +37 -0
- package/transpiled/src-typescript/webcomponents/drawer/drawer.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/drawer.js +138 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/login.d.ts +20 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/login.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/login.js +134 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/sign-up.d.ts +20 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/sign-up.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/sign-up.js +144 -0
- package/transpiled/src-typescript/webcomponents/icon/css/icon.d.ts +2 -0
- package/transpiled/src-typescript/webcomponents/icon/css/icon.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/icon/css/icon.js +59 -0
- package/transpiled/src-typescript/webcomponents/icon/icon.d.ts +33 -0
- package/transpiled/src-typescript/webcomponents/icon/icon.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/icon/icon.js +81 -0
- package/transpiled/src-typescript/webcomponents/settings/css/navigation.d.ts +2 -0
- package/transpiled/src-typescript/webcomponents/settings/css/navigation.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/css/navigation.js +51 -0
- package/transpiled/src-typescript/webcomponents/settings/input/delete.d.ts +34 -0
- package/transpiled/src-typescript/webcomponents/settings/input/delete.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/delete.js +92 -0
- package/transpiled/src-typescript/webcomponents/settings/input/email.d.ts +34 -0
- package/transpiled/src-typescript/webcomponents/settings/input/email.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/email.js +104 -0
- package/transpiled/src-typescript/webcomponents/settings/input/name.d.ts +33 -0
- package/transpiled/src-typescript/webcomponents/settings/input/name.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/name.js +95 -0
- package/transpiled/src-typescript/webcomponents/settings/input/password.d.ts +36 -0
- package/transpiled/src-typescript/webcomponents/settings/input/password.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/password.js +151 -0
- package/transpiled/src-typescript/webcomponents/settings/input/uploader.d.ts +37 -0
- package/transpiled/src-typescript/webcomponents/settings/input/uploader.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/uploader.js +235 -0
- package/transpiled/src-typescript/webcomponents/settings/settings.d.ts +37 -0
- package/transpiled/src-typescript/webcomponents/settings/settings.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/settings.js +204 -0
- package/pwa-auth.js +0 -4
- /package/src-typescript/development/{object.ts → utilities-object.ts} +0 -0
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Licensed under MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);r<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++i)),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128)}return t},t={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:"function"==typeof atob,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_,i=[];for(let t=0;t<e.length;t+=3){const r=e[t],s=t+1<e.length,o=s?e[t+1]:0,a=t+2<e.length,c=a?e[t+2]:0,h=r>>2,l=(3&r)<<4|o>>4;let u=(15&o)<<2|c>>6,d=63&c;a||(d=64,s||(u=64)),i.push(n[h],n[l],n[u],n[d])}return i.join("")},encodeString(t,n){return this.HAS_NATIVE_SUPPORT&&!n?btoa(t):this.encodeByteArray(e(t),n)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,i=0;for(;n<e.length;){const r=e[n++];if(r<128)t[i++]=String.fromCharCode(r);else if(r>191&&r<224){const s=e[n++];t[i++]=String.fromCharCode((31&r)<<6|63&s)}else if(r>239&&r<365){const s=((7&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[i++]=String.fromCharCode(55296+(s>>10)),t[i++]=String.fromCharCode(56320+(1023&s))}else{const s=e[n++],o=e[n++];t[i++]=String.fromCharCode((15&r)<<12|(63&s)<<6|63&o)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const i=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){const s=i[e.charAt(t++)],o=t<e.length?i[e.charAt(t)]:0;++t;const a=t<e.length?i[e.charAt(t)]:64;++t;const c=t<e.length?i[e.charAt(t)]:64;if(++t,null==s||null==o||null==a||null==c)throw new n;const h=s<<2|o>>4;if(r.push(h),64!==a){const e=o<<4&240|a>>2;if(r.push(e),64!==c){const e=a<<6&192|c;r.push(e)}}}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)}}};class n extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const i=function(n){return function(n){const i=e(n);return t.encodeByteArray(i,!0)}(n).replace(/\./g,"")},r=function(e){try{return t.decodeString(e,!0)}catch(e){}return null};const s=()=>function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,o=()=>{try{return s()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&r(e[1]);return t&&JSON.parse(t)})()}catch(e){return}},a=e=>o()?.emulatorHosts?.[e],c=e=>{const t=a(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const i=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),i]:[t.substring(0,n),i]},h=()=>o()?.config,l=e=>o()?.[`_${e}`];class u{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,n))}}}function d(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function p(e){return(await fetch(e,{credentials:"include"})).ok}function f(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=t||"demo-project",r=e.iat||0,s=e.sub||e.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o={iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}},...e};return[i(JSON.stringify({alg:"none",type:"JWT"})),i(JSON.stringify(o)),""].join(".")}const g={};let m=!1;function y(e,t){if("undefined"==typeof window||"undefined"==typeof document||!d(window.location.host)||g[e]===t||g[e]||m)return;function n(e){return`__firebase__banner__${e}`}g[e]=t;const i="__firebase__banner",r=function(){const e={prod:[],emulator:[]};for(const t of Object.keys(g))g[t]?e.emulator.push(t):e.prod.push(t);return e}().prod.length>0;function s(){const e=document.createElement("span");return e.style.cursor="pointer",e.style.marginLeft="16px",e.style.fontSize="24px",e.innerHTML=" ×",e.onclick=()=>{m=!0,function(){const e=document.getElementById(i);e&&e.remove()}()},e}function o(){const e=function(e){let t=document.getElementById(e),n=!1;return t||(t=document.createElement("div"),t.setAttribute("id",e),n=!0),{created:n,element:t}}(i),t=n("text"),o=document.getElementById(t)||document.createElement("span"),a=n("learnmore"),c=document.getElementById(a)||document.createElement("a"),h=n("preprendIcon"),l=document.getElementById(h)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.created){const t=e.element;!function(e){e.style.display="flex",e.style.background="#7faaf0",e.style.position="fixed",e.style.bottom="5px",e.style.left="5px",e.style.padding=".5em",e.style.borderRadius="5px",e.style.alignItems="center"}(t),function(e,t){e.setAttribute("id",t),e.innerText="Learn more",e.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",e.setAttribute("target","__blank"),e.style.paddingLeft="5px",e.style.textDecoration="underline"}(c,a);const n=s();!function(e,t){e.setAttribute("width","24"),e.setAttribute("id",t),e.setAttribute("height","24"),e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.style.marginLeft="-6px"}(l,h),t.append(l,o,c,n),document.body.appendChild(t)}r?(o.innerText="Preview backend disconnected.",l.innerHTML='<g clip-path="url(#clip0_6013_33858)">\n<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6013_33858">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>'):(l.innerHTML='<g clip-path="url(#clip0_6083_34804)">\n<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6083_34804">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>',o.innerText="Preview backend running in this workspace."),o.setAttribute("id",t)}"loading"===document.readyState?window.addEventListener("DOMContentLoaded",o):o()}function _(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function w(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function v(){try{return"object"==typeof indexedDB}catch(e){return!1}}function b(){return new Promise((e,t)=>{try{let n=!0;const i="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(i);r.onsuccess=()=>{r.result.close(),n||self.indexedDB.deleteDatabase(i),e(!0)},r.onupgradeneeded=()=>{n=!1},r.onerror=()=>{t(r.error?.message||"")}}catch(e){t(e)}})}function T(){return!("undefined"==typeof navigator||!navigator.cookieEnabled)}class E extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,E.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,I.prototype.create)}}class I{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},i=`${this.service}/${e}`,r=this.errors[e],s=r?function(e,t){return e.replace(S,(e,n)=>{const i=t[n];return null!=i?String(i):`<${n}?>`})}(r,n):"Error",o=`${this.serviceName}: ${s} (${i}).`;return new E(i,o,n)}}const S=/\{\$([^}]+)}/g;function k(e,t){if(e===t)return!0;const n=Object.keys(e),i=Object.keys(t);for(const r of n){if(!i.includes(r))return!1;const n=e[r],s=t[r];if(A(n)&&A(s)){if(!k(n,s))return!1}else if(n!==s)return!1}for(const e of i)if(!n.includes(e))return!1;return!0}function A(e){return null!==e&&"object"==typeof e}function C(e){const t=[];for(const[n,i]of Object.entries(e))Array.isArray(i)?i.forEach(e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(i));return t.length?"&"+t.join("&"):""}function P(e){const t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){const[n,i]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(i)}}),t}function R(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}class O{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let i;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");i=function(e,t){if("object"!=typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===i.next&&(i.next=N),void 0===i.error&&(i.error=N),void 0===i.complete&&(i.complete=N);const r=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch(e){}}),this.observers.push(i),r}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function N(){}function x(e,t=1e3,n=2){const i=t*Math.pow(n,e),r=Math.round(.5*i*(Math.random()-.5)*2);return Math.min(144e5,i+r)}function D(e){return e&&e._delegate?e._delegate:e}class L{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,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}}const U="[DEFAULT]";class M{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new u;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){const t=this.normalizeInstanceIdentifier(e?.identifier),n=e?.optional??!1;if(!this.isInitialized(t)&&!this.shouldAutoInitialize()){if(n)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(n)return null;throw e}}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(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:U})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=U){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(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=U){return this.instances.has(e)}getOptions(e=U){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(e)&&t.resolve(i)}return i}onInit(e,t){const n=this.normalizeInstanceIdentifier(t),i=this.onInitCallbacks.get(n)??new Set;i.add(e),this.onInitCallbacks.set(n,i);const r=this.instances.get(n);return r&&e(r,n),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(i=e,i===U?void 0:i),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}var i;return n||null}normalizeInstanceIdentifier(e=U){return this.component?this.component.multipleInstances?e:U:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class j{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.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 t=new M(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}var $;!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"}($||($={}));const F={debug:$.DEBUG,verbose:$.VERBOSE,info:$.INFO,warn:$.WARN,error:$.ERROR,silent:$.SILENT},B=$.INFO,H={[$.DEBUG]:"log",[$.VERBOSE]:"log",[$.INFO]:"info",[$.WARN]:"warn",[$.ERROR]:"error"},z=(e,t,...n)=>{if(t<e.logLevel)return;(new Date).toISOString();if(!H[t])throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class V{constructor(e){this.name=e,this._logLevel=B,this._logHandler=z,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in $))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?F[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)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,$.DEBUG,...e),this._logHandler(this,$.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,$.VERBOSE,...e),this._logHandler(this,$.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,$.INFO,...e),this._logHandler(this,$.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,$.WARN,...e),this._logHandler(this,$.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,$.ERROR,...e),this._logHandler(this,$.ERROR,...e)}}let q,W;const K=new WeakMap,G=new WeakMap,J=new WeakMap,X=new WeakMap,Y=new WeakMap;let Z={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return G.get(e);if("objectStoreNames"===t)return e.objectStoreNames||J.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return te(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Q(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(W||(W=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(ne(this),t),te(K.get(this))}:function(...t){return te(e.apply(ne(this),t))}:function(t,...n){const i=e.call(ne(this),t,...n);return J.set(i,t.sort?t.sort():[t]),te(i)}}function ee(e){return"function"==typeof e?Q(e):(e instanceof IDBTransaction&&function(e){if(G.has(e))return;const t=new Promise((t,n)=>{const i=()=>{e.removeEventListener("complete",r),e.removeEventListener("error",s),e.removeEventListener("abort",s)},r=()=>{t(),i()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",r),e.addEventListener("error",s),e.addEventListener("abort",s)});G.set(e,t)}(e),t=e,(q||(q=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,Z):e);var t}function te(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const i=()=>{e.removeEventListener("success",r),e.removeEventListener("error",s)},r=()=>{t(te(e.result)),i()},s=()=>{n(e.error),i()};e.addEventListener("success",r),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&K.set(t,e)}).catch(()=>{}),Y.set(t,e),t}(e);if(X.has(e))return X.get(e);const t=ee(e);return t!==e&&(X.set(e,t),Y.set(t,e)),t}const ne=e=>Y.get(e);function ie(e,t,{blocked:n,upgrade:i,blocking:r,terminated:s}={}){const o=indexedDB.open(e,t),a=te(o);return i&&o.addEventListener("upgradeneeded",e=>{i(te(o.result),e.oldVersion,e.newVersion,te(o.transaction),e)}),n&&o.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),a.then(e=>{s&&e.addEventListener("close",()=>s()),r&&e.addEventListener("versionchange",e=>r(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a}function re(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",e=>t(e.oldVersion,e)),te(n).then(()=>{})}const se=["get","getKey","getAll","getAllKeys","count"],oe=["put","add","delete","clear"],ae=new Map;function ce(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(ae.get(t))return ae.get(t);const n=t.replace(/FromIndex$/,""),i=t!==n,r=oe.includes(n);if(!(n in(i?IDBIndex:IDBObjectStore).prototype)||!r&&!se.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,r?"readwrite":"readonly");let o=s.store;return i&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),r&&s.done]))[0]};return ae.set(t,s),s}Z=(e=>({...e,get:(t,n,i)=>ce(t,n)||e.get(t,n,i),has:(t,n)=>!!ce(t,n)||e.has(t,n)}))(Z);class he{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(function(e){const t=e.getComponent();return"VERSION"===t?.type}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null}).filter(e=>e).join(" ")}}const le="@firebase/app",ue="0.14.3",de=new V("@firebase/app"),pe="@firebase/app-compat",fe="@firebase/analytics-compat",ge="@firebase/analytics",me="@firebase/app-check-compat",ye="@firebase/app-check",_e="@firebase/auth",we="@firebase/auth-compat",ve="@firebase/database",be="@firebase/data-connect",Te="@firebase/database-compat",Ee="@firebase/functions",Ie="@firebase/functions-compat",Se="@firebase/installations",ke="@firebase/installations-compat",Ae="@firebase/messaging",Ce="@firebase/messaging-compat",Pe="@firebase/performance",Re="@firebase/performance-compat",Oe="@firebase/remote-config",Ne="@firebase/remote-config-compat",xe="@firebase/storage",De="@firebase/storage-compat",Le="@firebase/firestore",Ue="@firebase/ai",Me="@firebase/firestore-compat",je="firebase",$e="[DEFAULT]",Fe={[le]:"fire-core",[pe]:"fire-core-compat",[ge]:"fire-analytics",[fe]:"fire-analytics-compat",[ye]:"fire-app-check",[me]:"fire-app-check-compat",[_e]:"fire-auth",[we]:"fire-auth-compat",[ve]:"fire-rtdb",[be]:"fire-data-connect",[Te]:"fire-rtdb-compat",[Ee]:"fire-fn",[Ie]:"fire-fn-compat",[Se]:"fire-iid",[ke]:"fire-iid-compat",[Ae]:"fire-fcm",[Ce]:"fire-fcm-compat",[Pe]:"fire-perf",[Re]:"fire-perf-compat",[Oe]:"fire-rc",[Ne]:"fire-rc-compat",[xe]:"fire-gcs",[De]:"fire-gcs-compat",[Le]:"fire-fst",[Me]:"fire-fst-compat",[Ue]:"fire-vertex","fire-js":"fire-js",[je]:"fire-js-all"},Be=new Map,He=new Map,ze=new Map;function Ve(e,t){try{e.container.addComponent(t)}catch(n){de.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function qe(e){const t=e.name;if(ze.has(t))return de.debug(`There were multiple attempts to register component ${t}.`),!1;ze.set(t,e);for(const t of Be.values())Ve(t,e);for(const t of He.values())Ve(t,e);return!0}function We(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function Ke(e){return null!=e&&void 0!==e.settings}const Ge=new I("app","Firebase",{"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.","invalid-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."});class Je{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new L("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 Ge.create("app-deleted",{appName:this._name})}}const Xe="12.3.0";function Ye(e,t={}){let n=e;if("object"!=typeof t){t={name:t}}const i={name:$e,automaticDataCollectionEnabled:!0,...t},r=i.name;if("string"!=typeof r||!r)throw Ge.create("bad-app-name",{appName:String(r)});if(n||(n=h()),!n)throw Ge.create("no-options");const s=Be.get(r);if(s){if(k(n,s.options)&&k(i,s.config))return s;throw Ge.create("duplicate-app",{appName:r})}const o=new j(r);for(const e of ze.values())o.addComponent(e);const a=new Je(n,i,o);return Be.set(r,a),a}function Ze(e=$e){const t=Be.get(e);if(!t&&e===$e&&h())return Ye();if(!t)throw Ge.create("no-app",{appName:e});return t}function Qe(e,t,n){let i=Fe[e]??e;n&&(i+=`-${n}`);const r=i.match(/\s|\//),s=t.match(/\s|\//);if(r||s){const e=[`Unable to register library "${i}" with version "${t}":`];return r&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),r&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void de.warn(e.join(" "))}qe(new L(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}const et="firebase-heartbeat-store";let tt=null;function nt(){return tt||(tt=ie("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(et)}catch(e){}}}).catch(e=>{throw Ge.create("idb-open",{originalErrorMessage:e.message})})),tt}async function it(e,t){try{const n=(await nt()).transaction(et,"readwrite"),i=n.objectStore(et);await i.put(t,rt(e)),await n.done}catch(e){if(e instanceof E)de.warn(e.message);else{const t=Ge.create("idb-set",{originalErrorMessage:e?.message});de.warn(t.message)}}}function rt(e){return`${e.name}!${e.options.appId}`}class st{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new at(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){try{const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=ot();if(null==this._heartbeatsCache?.heartbeats&&(this._heartbeatsCache=await this._heartbeatsCachePromise,null==this._heartbeatsCache?.heartbeats))return;if(this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))return;if(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats.length>30){const e=function(e){if(0===e.length)return-1;let t=0,n=e[0].date;for(let i=1;i<e.length;i++)e[i].date<n&&(n=e[i].date,t=i);return t}(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){de.warn(e)}}async getHeartbeatsHeader(){try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==this._heartbeatsCache?.heartbeats||0===this._heartbeatsCache.heartbeats.length)return"";const e=ot(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){const n=[];let i=e.slice();for(const r of e){const e=n.find(e=>e.agent===r.agent);if(e){if(e.dates.push(r.date),ct(n)>t){e.dates.pop();break}}else if(n.push({agent:r.agent,dates:[r.date]}),ct(n)>t){n.pop();break}i=i.slice(1)}return{heartbeatsToSend:n,unsentEntries:i}}(this._heartbeatsCache.heartbeats),r=i(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}catch(e){return de.warn(e),""}}}function ot(){return(new Date).toISOString().substring(0,10)}class at{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!v()&&b().then(()=>!0).catch(()=>!1)}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await nt()).transaction(et),n=await t.objectStore(et).get(rt(e));return await t.done,n}catch(e){if(e instanceof E)de.warn(e.message);else{const t=Ge.create("idb-get",{originalErrorMessage:e?.message});de.warn(t.message)}}}(this.app);return e?.heartbeats?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const t=await this.read();return it(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){const t=await this.read();return it(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}}function ct(e){return i(JSON.stringify({version:2,heartbeats:e})).length}var ht;ht="",qe(new L("platform-logger",e=>new he(e),"PRIVATE")),qe(new L("heartbeat",e=>new st(e),"PRIVATE")),Qe(le,ue,ht),Qe(le,ue,"esm2020"),Qe("fire-js","");Qe("firebase","12.3.0","app");var lt,ut="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};(function(){var e;function t(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.C=Array(this.blockSize),this.o=this.h=0,this.u()}function n(e,t,n){n||(n=0);const i=Array(16);if("string"==typeof t)for(var r=0;r<16;++r)i[r]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(r=0;r<16;++r)i[r]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],r=e.g[2];let s,o=e.g[3];s=t+(o^n&(r^o))+i[0]+3614090360&4294967295,s=o+(r^(t=n+(s<<7&4294967295|s>>>25))&(n^r))+i[1]+3905402710&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(n^o&(t^n))+i[2]+606105819&4294967295,s=n+(t^(r=o+(s<<17&4294967295|s>>>15))&(o^t))+i[3]+3250441966&4294967295,s=t+(o^(n=r+(s<<22&4294967295|s>>>10))&(r^o))+i[4]+4118548399&4294967295,s=o+(r^(t=n+(s<<7&4294967295|s>>>25))&(n^r))+i[5]+1200080426&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(n^o&(t^n))+i[6]+2821735955&4294967295,s=n+(t^(r=o+(s<<17&4294967295|s>>>15))&(o^t))+i[7]+4249261313&4294967295,s=t+(o^(n=r+(s<<22&4294967295|s>>>10))&(r^o))+i[8]+1770035416&4294967295,s=o+(r^(t=n+(s<<7&4294967295|s>>>25))&(n^r))+i[9]+2336552879&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(n^o&(t^n))+i[10]+4294925233&4294967295,s=n+(t^(r=o+(s<<17&4294967295|s>>>15))&(o^t))+i[11]+2304563134&4294967295,s=t+(o^(n=r+(s<<22&4294967295|s>>>10))&(r^o))+i[12]+1804603682&4294967295,s=o+(r^(t=n+(s<<7&4294967295|s>>>25))&(n^r))+i[13]+4254626195&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(n^o&(t^n))+i[14]+2792965006&4294967295,s=n+(t^(r=o+(s<<17&4294967295|s>>>15))&(o^t))+i[15]+1236535329&4294967295,s=t+(r^o&((n=r+(s<<22&4294967295|s>>>10))^r))+i[1]+4129170786&4294967295,s=o+(n^r&((t=n+(s<<5&4294967295|s>>>27))^n))+i[6]+3225465664&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^n&(o^t))+i[11]+643717713&4294967295,s=n+(o^t&((r=o+(s<<14&4294967295|s>>>18))^o))+i[0]+3921069994&4294967295,s=t+(r^o&((n=r+(s<<20&4294967295|s>>>12))^r))+i[5]+3593408605&4294967295,s=o+(n^r&((t=n+(s<<5&4294967295|s>>>27))^n))+i[10]+38016083&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^n&(o^t))+i[15]+3634488961&4294967295,s=n+(o^t&((r=o+(s<<14&4294967295|s>>>18))^o))+i[4]+3889429448&4294967295,s=t+(r^o&((n=r+(s<<20&4294967295|s>>>12))^r))+i[9]+568446438&4294967295,s=o+(n^r&((t=n+(s<<5&4294967295|s>>>27))^n))+i[14]+3275163606&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^n&(o^t))+i[3]+4107603335&4294967295,s=n+(o^t&((r=o+(s<<14&4294967295|s>>>18))^o))+i[8]+1163531501&4294967295,s=t+(r^o&((n=r+(s<<20&4294967295|s>>>12))^r))+i[13]+2850285829&4294967295,s=o+(n^r&((t=n+(s<<5&4294967295|s>>>27))^n))+i[2]+4243563512&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^n&(o^t))+i[7]+1735328473&4294967295,s=n+(o^t&((r=o+(s<<14&4294967295|s>>>18))^o))+i[12]+2368359562&4294967295,s=t+((n=r+(s<<20&4294967295|s>>>12))^r^o)+i[5]+4294588738&4294967295,s=o+((t=n+(s<<4&4294967295|s>>>28))^n^r)+i[8]+2272392833&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^n)+i[11]+1839030562&4294967295,s=n+((r=o+(s<<16&4294967295|s>>>16))^o^t)+i[14]+4259657740&4294967295,s=t+((n=r+(s<<23&4294967295|s>>>9))^r^o)+i[1]+2763975236&4294967295,s=o+((t=n+(s<<4&4294967295|s>>>28))^n^r)+i[4]+1272893353&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^n)+i[7]+4139469664&4294967295,s=n+((r=o+(s<<16&4294967295|s>>>16))^o^t)+i[10]+3200236656&4294967295,s=t+((n=r+(s<<23&4294967295|s>>>9))^r^o)+i[13]+681279174&4294967295,s=o+((t=n+(s<<4&4294967295|s>>>28))^n^r)+i[0]+3936430074&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^n)+i[3]+3572445317&4294967295,s=n+((r=o+(s<<16&4294967295|s>>>16))^o^t)+i[6]+76029189&4294967295,s=t+((n=r+(s<<23&4294967295|s>>>9))^r^o)+i[9]+3654602809&4294967295,s=o+((t=n+(s<<4&4294967295|s>>>28))^n^r)+i[12]+3873151461&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^n)+i[15]+530742520&4294967295,s=n+((r=o+(s<<16&4294967295|s>>>16))^o^t)+i[2]+3299628645&4294967295,s=t+(r^((n=r+(s<<23&4294967295|s>>>9))|~o))+i[0]+4096336452&4294967295,s=o+(n^((t=n+(s<<6&4294967295|s>>>26))|~r))+i[7]+1126891415&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~n))+i[14]+2878612391&4294967295,s=n+(o^((r=o+(s<<15&4294967295|s>>>17))|~t))+i[5]+4237533241&4294967295,s=t+(r^((n=r+(s<<21&4294967295|s>>>11))|~o))+i[12]+1700485571&4294967295,s=o+(n^((t=n+(s<<6&4294967295|s>>>26))|~r))+i[3]+2399980690&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~n))+i[10]+4293915773&4294967295,s=n+(o^((r=o+(s<<15&4294967295|s>>>17))|~t))+i[1]+2240044497&4294967295,s=t+(r^((n=r+(s<<21&4294967295|s>>>11))|~o))+i[8]+1873313359&4294967295,s=o+(n^((t=n+(s<<6&4294967295|s>>>26))|~r))+i[15]+4264355552&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~n))+i[6]+2734768916&4294967295,s=n+(o^((r=o+(s<<15&4294967295|s>>>17))|~t))+i[13]+1309151649&4294967295,s=t+(r^((n=r+(s<<21&4294967295|s>>>11))|~o))+i[4]+4149444226&4294967295,s=o+(n^((t=n+(s<<6&4294967295|s>>>26))|~r))+i[11]+3174756917&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~n))+i[2]+718787259&4294967295,s=n+(o^((r=o+(s<<15&4294967295|s>>>17))|~t))+i[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(r+(s<<21&4294967295|s>>>11))&4294967295,e.g[2]=e.g[2]+r&4294967295,e.g[3]=e.g[3]+o&4294967295}function i(e,t){this.h=t;const n=[];let i=!0;for(let r=e.length-1;r>=0;r--){const s=0|e[r];i&&s==t||(n[r]=s,i=!1)}this.g=n}!function(e,t){function n(){}n.prototype=t.prototype,e.F=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.D=function(e,n,i){for(var r=Array(arguments.length-2),s=2;s<arguments.length;s++)r[s-2]=arguments[s];return t.prototype[n].apply(e,r)}}(t,function(){this.blockSize=-1}),t.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0},t.prototype.v=function(e,t){void 0===t&&(t=e.length);const i=t-this.blockSize,r=this.C;let s=this.h,o=0;for(;o<t;){if(0==s)for(;o<=i;)n(this,e,o),o+=this.blockSize;if("string"==typeof e){for(;o<t;)if(r[s++]=e.charCodeAt(o++),s==this.blockSize){n(this,r),s=0;break}}else for(;o<t;)if(r[s++]=e[o++],s==this.blockSize){n(this,r),s=0;break}}this.h=s,this.o+=t},t.prototype.A=function(){var e=Array((this.h<56?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;t=8*this.o;for(var n=e.length-8;n<e.length;++n)e[n]=255&t,t/=256;for(this.v(e),e=Array(16),t=0,n=0;n<4;++n)for(let i=0;i<32;i+=8)e[t++]=this.g[n]>>>i&255;return e};var r={};function s(e){return-128<=e&&e<128?function(e,t){var n=r;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,function(e){return new i([0|e],e<0?-1:0)}):new i([0|e],e<0?-1:0)}function o(e){if(isNaN(e)||!isFinite(e))return a;if(e<0)return d(o(-e));const t=[];let n=1;for(let i=0;e>=n;i++)t[i]=e/n|0,n*=4294967296;return new i(t,0)}var a=s(0),c=s(1),h=s(16777216);function l(e){if(0!=e.h)return!1;for(let t=0;t<e.g.length;t++)if(0!=e.g[t])return!1;return!0}function u(e){return-1==e.h}function d(e){const t=e.g.length,n=[];for(let i=0;i<t;i++)n[i]=~e.g[i];return new i(n,~e.h).add(c)}function p(e,t){return e.add(d(t))}function f(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function g(e,t){this.g=e,this.h=t}function m(e,t){if(l(t))throw Error("division by zero");if(l(e))return new g(a,a);if(u(e))return t=m(d(e),t),new g(d(t.g),d(t.h));if(u(t))return t=m(e,d(t)),new g(d(t.g),t.h);if(e.g.length>30){if(u(e)||u(t))throw Error("slowDivide_ only works with positive integers.");for(var n=c,i=t;i.l(e)<=0;)n=y(n),i=y(i);var r=_(n,1),s=_(i,1);for(i=_(i,2),n=_(n,2);!l(i);){var h=s.add(i);h.l(e)<=0&&(r=r.add(n),s=h),i=_(i,1),n=_(n,1)}return t=p(e,r.j(t)),new g(r,t)}for(r=a;e.l(t)>=0;){for(n=Math.max(1,Math.floor(e.m()/t.m())),i=(i=Math.ceil(Math.log(n)/Math.LN2))<=48?1:Math.pow(2,i-48),h=(s=o(n)).j(t);u(h)||h.l(e)>0;)h=(s=o(n-=i)).j(t);l(s)&&(s=c),r=r.add(s),e=p(e,h)}return new g(r,e)}function y(e){const t=e.g.length+1,n=[];for(let i=0;i<t;i++)n[i]=e.i(i)<<1|e.i(i-1)>>>31;return new i(n,e.h)}function _(e,t){const n=t>>5;t%=32;const r=e.g.length-n,s=[];for(let i=0;i<r;i++)s[i]=t>0?e.i(i+n)>>>t|e.i(i+n+1)<<32-t:e.i(i+n);return new i(s,e.h)}(e=i.prototype).m=function(){if(u(this))return-d(this).m();let e=0,t=1;for(let n=0;n<this.g.length;n++){const i=this.i(n);e+=(i>=0?i:4294967296+i)*t,t*=4294967296}return e},e.toString=function(e){if((e=e||10)<2||36<e)throw Error("radix out of range: "+e);if(l(this))return"0";if(u(this))return"-"+d(this).toString(e);const t=o(Math.pow(e,6));var n=this;let i="";for(;;){const r=m(n,t).g;let s=(((n=p(n,r.j(t))).g.length>0?n.g[0]:n.h)>>>0).toString(e);if(l(n=r))return s+i;for(;s.length<6;)s="0"+s;i=s+i}},e.i=function(e){return e<0?0:e<this.g.length?this.g[e]:this.h},e.l=function(e){return u(e=p(this,e))?-1:l(e)?0:1},e.abs=function(){return u(this)?d(this):this},e.add=function(e){const t=Math.max(this.g.length,e.g.length),n=[];let r=0;for(let i=0;i<=t;i++){let t=r+(65535&this.i(i))+(65535&e.i(i)),s=(t>>>16)+(this.i(i)>>>16)+(e.i(i)>>>16);r=s>>>16,t&=65535,s&=65535,n[i]=s<<16|t}return new i(n,-2147483648&n[n.length-1]?-1:0)},e.j=function(e){if(l(this)||l(e))return a;if(u(this))return u(e)?d(this).j(d(e)):d(d(this).j(e));if(u(e))return d(this.j(d(e)));if(this.l(h)<0&&e.l(h)<0)return o(this.m()*e.m());const t=this.g.length+e.g.length,n=[];for(var r=0;r<2*t;r++)n[r]=0;for(r=0;r<this.g.length;r++)for(let t=0;t<e.g.length;t++){const i=this.i(r)>>>16,s=65535&this.i(r),o=e.i(t)>>>16,a=65535&e.i(t);n[2*r+2*t]+=s*a,f(n,2*r+2*t),n[2*r+2*t+1]+=i*a,f(n,2*r+2*t+1),n[2*r+2*t+1]+=s*o,f(n,2*r+2*t+1),n[2*r+2*t+2]+=i*o,f(n,2*r+2*t+2)}for(e=0;e<t;e++)n[e]=n[2*e+1]<<16|n[2*e];for(e=t;e<2*t;e++)n[e]=0;return new i(n,0)},e.B=function(e){return m(this,e).h},e.and=function(e){const t=Math.max(this.g.length,e.g.length),n=[];for(let i=0;i<t;i++)n[i]=this.i(i)&e.i(i);return new i(n,this.h&e.h)},e.or=function(e){const t=Math.max(this.g.length,e.g.length),n=[];for(let i=0;i<t;i++)n[i]=this.i(i)|e.i(i);return new i(n,this.h|e.h)},e.xor=function(e){const t=Math.max(this.g.length,e.g.length),n=[];for(let i=0;i<t;i++)n[i]=this.i(i)^e.i(i);return new i(n,this.h^e.h)},t.prototype.digest=t.prototype.A,t.prototype.reset=t.prototype.u,t.prototype.update=t.prototype.v,i.prototype.add=i.prototype.add,i.prototype.multiply=i.prototype.j,i.prototype.modulo=i.prototype.B,i.prototype.compare=i.prototype.l,i.prototype.toNumber=i.prototype.m,i.prototype.toString=i.prototype.toString,i.prototype.getBits=i.prototype.i,i.fromNumber=o,i.fromString=function e(t,n){if(0==t.length)throw Error("number format error: empty string");if((n=n||10)<2||36<n)throw Error("radix out of range: "+n);if("-"==t.charAt(0))return d(e(t.substring(1),n));if(t.indexOf("-")>=0)throw Error('number format error: interior "-" character');const i=o(Math.pow(n,8));let r=a;for(let e=0;e<t.length;e+=8){var s=Math.min(8,t.length-e);const a=parseInt(t.substring(e,e+s),n);s<8?(s=o(Math.pow(n,s)),r=r.j(s).add(o(a))):(r=r.j(i),r=r.add(o(a)))}return r},lt=i}).apply(void 0!==ut?ut:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var dt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};(function(){var e,t=Object.defineProperty;var n=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof dt&&dt];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);function i(e,i){if(i)e:{var r=n;e=e.split(".");for(var s=0;s<e.length-1;s++){var o=e[s];if(!(o in r))break e;r=r[o]}(i=i(s=r[e=e[e.length-1]]))!=s&&null!=i&&t(r,e,{configurable:!0,writable:!0,value:i})}}i("Symbol.dispose",function(e){return e||Symbol("Symbol.dispose")}),i("Array.prototype.values",function(e){return e||function(){return this[Symbol.iterator]()}}),i("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push([t,e[t]]);return n}});var r=r||{},s=this||self;function o(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function a(e,t,n){return e.call.apply(e.bind,arguments)}function c(e,t,n){return(c=a).apply(null,arguments)}function h(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function l(e,t){function n(){}n.prototype=t.prototype,e.Z=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Ob=function(e,n,i){for(var r=Array(arguments.length-2),s=2;s<arguments.length;s++)r[s-2]=arguments[s];return t.prototype[n].apply(e,r)}}var u="undefined"!=typeof AsyncContext&&"function"==typeof AsyncContext.Snapshot?e=>e&&AsyncContext.Snapshot.wrap(e):e=>e;function d(e){const t=e.length;if(t>0){const n=Array(t);for(let i=0;i<t;i++)n[i]=e[i];return n}return[]}function p(e,t){for(let t=1;t<arguments.length;t++){const i=arguments[t];var n=typeof i;if("array"==(n="object"!=n?n:i?Array.isArray(i)?"array":n:"null")||"object"==n&&"number"==typeof i.length){n=e.length||0;const t=i.length||0;e.length=n+t;for(let r=0;r<t;r++)e[n+r]=i[r]}else e.push(i)}}function f(e){s.setTimeout(()=>{throw e},0)}function g(){var e=v;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var m=new class{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return this.h>0?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}(()=>new y,e=>e.reset());class y{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}let _,w=!1,v=new class{constructor(){this.h=this.g=null}add(e,t){const n=m.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}},b=()=>{const e=Promise.resolve(void 0);_=()=>{e.then(T)}};function T(){for(var e;e=g();){try{e.h.call(e.g)}catch(e){f(e)}var t=m;t.j(e),t.h<100&&(t.h++,e.next=t.g,t.g=e)}w=!1}function E(){this.u=this.u,this.C=this.C}function I(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}E.prototype.u=!1,E.prototype.dispose=function(){this.u||(this.u=!0,this.N())},E.prototype[Symbol.dispose]=function(){this.dispose()},E.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},I.prototype.h=function(){this.defaultPrevented=!0};var S=function(){if(!s.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{const e=()=>{};s.addEventListener("test",e,t),s.removeEventListener("test",e,t)}catch(e){}return e}();function k(e){return/^[\s\xa0]*$/.test(e)}function A(e,t){I.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e&&this.init(e,t)}l(A,I),A.prototype.init=function(e,t){const n=this.type=e.type,i=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;this.target=e.target||e.srcElement,this.g=t,(t=e.relatedTarget)||("mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement)),this.relatedTarget=t,i?(this.clientX=void 0!==i.clientX?i.clientX:i.pageX,this.clientY=void 0!==i.clientY?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType=e.pointerType,this.state=e.state,this.i=e,e.defaultPrevented&&A.Z.h.call(this)},A.prototype.h=function(){A.Z.h.call(this);const e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var C="closure_listenable_"+(1e6*Math.random()|0),P=0;function R(e,t,n,i,r){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!i,this.ha=r,this.key=++P,this.da=this.fa=!1}function O(e){e.da=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function N(e,t,n){for(const i in e)t.call(n,e[i],i,e)}function x(e){const t={};for(const n in e)t[n]=e[n];return t}const D="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function L(e,t){let n,i;for(let t=1;t<arguments.length;t++){for(n in i=arguments[t],i)e[n]=i[n];for(let t=0;t<D.length;t++)n=D[t],Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}}function U(e){this.src=e,this.g={},this.h=0}function M(e,t){const n=t.type;if(n in e.g){var i,r=e.g[n],s=Array.prototype.indexOf.call(r,t,void 0);(i=s>=0)&&Array.prototype.splice.call(r,s,1),i&&(O(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function j(e,t,n,i){for(let r=0;r<e.length;++r){const s=e[r];if(!s.da&&s.listener==t&&s.capture==!!n&&s.ha==i)return r}return-1}U.prototype.add=function(e,t,n,i,r){const s=e.toString();(e=this.g[s])||(e=this.g[s]=[],this.h++);const o=j(e,t,i,r);return o>-1?(t=e[o],n||(t.fa=!1)):((t=new R(t,this.src,s,!!i,r)).fa=n,e.push(t)),t};var $="closure_lm_"+(1e6*Math.random()|0),F={};function B(e,t,n,i,r){if(Array.isArray(t)){for(let s=0;s<t.length;s++)B(e,t[s],n,i,r);return null}return n=G(n),e&&e[C]?e.J(t,n,!!o(i)&&!!i.capture,r):function(e,t,n,i,r,s){if(!t)throw Error("Invalid event type");const a=o(r)?!!r.capture:!!r;let c=W(e);if(c||(e[$]=c=new U(e)),n=c.add(t,n,i,a,s),n.proxy)return n;if(i=function(){function e(n){return t.call(e.src,e.listener,n)}const t=q;return e}(),n.proxy=i,i.src=e,i.listener=n,e.addEventListener)S||(r=a),void 0===r&&(r=!1),e.addEventListener(t.toString(),i,r);else if(e.attachEvent)e.attachEvent(V(t.toString()),i);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(i)}return n}(e,t,n,!1,i,r)}function H(e,t,n,i,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)H(e,t[s],n,i,r);else i=o(i)?!!i.capture:!!i,n=G(n),e&&e[C]?(e=e.i,(s=String(t).toString())in e.g&&((n=j(t=e.g[s],n,i,r))>-1&&(O(t[n]),Array.prototype.splice.call(t,n,1),0==t.length&&(delete e.g[s],e.h--)))):e&&(e=W(e))&&(t=e.g[t.toString()],e=-1,t&&(e=j(t,n,i,r)),(n=e>-1?t[e]:null)&&z(n))}function z(e){if("number"!=typeof e&&e&&!e.da){var t=e.src;if(t&&t[C])M(t.i,e);else{var n=e.type,i=e.proxy;t.removeEventListener?t.removeEventListener(n,i,e.capture):t.detachEvent?t.detachEvent(V(n),i):t.addListener&&t.removeListener&&t.removeListener(i),(n=W(t))?(M(n,e),0==n.h&&(n.src=null,t[$]=null)):O(e)}}}function V(e){return e in F?F[e]:F[e]="on"+e}function q(e,t){if(e.da)e=!0;else{t=new A(t,this);const n=e.listener,i=e.ha||e.src;e.fa&&z(e),e=n.call(i,t)}return e}function W(e){return(e=e[$])instanceof U?e:null}var K="__closure_events_fn_"+(1e9*Math.random()>>>0);function G(e){return"function"==typeof e?e:(e[K]||(e[K]=function(t){return e.handleEvent(t)}),e[K])}function J(){E.call(this),this.i=new U(this),this.M=this,this.G=null}function X(e,t){var n,i=e.G;if(i)for(n=[];i;i=i.G)n.push(i);if(e=e.M,i=t.type||t,"string"==typeof t)t=new I(t,e);else if(t instanceof I)t.target=t.target||e;else{var r=t;L(t=new I(i,e),r)}let s,o;if(r=!0,n)for(o=n.length-1;o>=0;o--)s=t.g=n[o],r=Y(s,i,!0,t)&&r;if(s=t.g=e,r=Y(s,i,!0,t)&&r,r=Y(s,i,!1,t)&&r,n)for(o=0;o<n.length;o++)s=t.g=n[o],r=Y(s,i,!1,t)&&r}function Y(e,t,n,i){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();let r=!0;for(let s=0;s<t.length;++s){const o=t[s];if(o&&!o.da&&o.capture==n){const t=o.listener,n=o.ha||o.src;o.fa&&M(e.i,o),r=!1!==t.call(n,i)&&r}}return r&&!i.defaultPrevented}function Z(e){e.g=function(e,t){if("function"!=typeof e){if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=c(e.handleEvent,e)}return Number(t)>2147483647?-1:s.setTimeout(e,t||0)}(()=>{e.g=null,e.i&&(e.i=!1,Z(e))},e.l);const t=e.h;e.h=null,e.m.apply(null,t)}l(J,E),J.prototype[C]=!0,J.prototype.removeEventListener=function(e,t,n,i){H(this,e,t,n,i)},J.prototype.N=function(){if(J.Z.N.call(this),this.i){var e=this.i;for(const t in e.g){const n=e.g[t];for(let e=0;e<n.length;e++)O(n[e]);delete e.g[t],e.h--}}this.G=null},J.prototype.J=function(e,t,n,i){return this.i.add(String(e),t,!1,n,i)},J.prototype.K=function(e,t,n,i){return this.i.add(String(e),t,!0,n,i)};class Q extends E{constructor(e,t){super(),this.m=e,this.l=t,this.h=null,this.i=!1,this.g=null}j(e){this.h=arguments,this.g?this.i=!0:Z(this)}N(){super.N(),this.g&&(s.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function ee(e){E.call(this),this.h=e,this.g={}}l(ee,E);var te=[];function ne(e){N(e.g,function(e,t){this.g.hasOwnProperty(t)&&z(e)},e),e.g={}}ee.prototype.N=function(){ee.Z.N.call(this),ne(this)},ee.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var ie=s.JSON.stringify,re=s.JSON.parse,se=class{stringify(e){return s.JSON.stringify(e,void 0)}parse(e){return s.JSON.parse(e,void 0)}};function oe(){}var ae={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function ce(){I.call(this,"d")}function he(){I.call(this,"c")}l(ce,I),l(he,I);var le={},ue=null;function de(){return ue=ue||new J}function pe(e){I.call(this,le.Ia,e)}function fe(e){const t=de();X(t,new pe(t))}function ge(e,t){I.call(this,le.STAT_EVENT,e),this.stat=t}function me(e){const t=de();X(t,new ge(t,e))}function ye(e,t){I.call(this,le.Ja,e),this.size=t}function _e(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return s.setTimeout(function(){e()},t)}function we(){this.g=!0}function ve(e,t,n,i){e.info(function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{const s=JSON.parse(t);if(s)for(e=0;e<s.length;e++)if(Array.isArray(s[e])){var n=s[e];if(!(n.length<2)){var i=n[1];if(Array.isArray(i)&&!(i.length<1)){var r=i[0];if("noop"!=r&&"stop"!=r&&"close"!=r)for(let e=1;e<i.length;e++)i[e]=""}}}return ie(s)}catch(e){return t}}(e,n)+(i?" "+i:"")})}le.Ia="serverreachability",l(pe,I),le.STAT_EVENT="statevent",l(ge,I),le.Ja="timingevent",l(ye,I),we.prototype.ua=function(){this.g=!1},we.prototype.info=function(){};var be,Te={NO_ERROR:0,TIMEOUT:8};function Ee(){}function Ie(e){return encodeURIComponent(String(e))}function Se(e){var t=1;e=e.split(":");const n=[];for(;t>0&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(":")),n}function ke(e,t,n,i){this.j=e,this.i=t,this.l=n,this.S=i||1,this.V=new ee(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new Ae}function Ae(){this.i=null,this.g="",this.h=!1}l(Ee,oe),Ee.prototype.g=function(){return new XMLHttpRequest},be=new Ee;var Ce={},Pe={};function Re(e,t,n){e.M=1,e.A=tt(Xe(t)),e.u=n,e.R=!0,Oe(e,null)}function Oe(e,t){e.F=Date.now(),De(e),e.B=Xe(e.A);var n=e.B,i=e.S;Array.isArray(i)||(i=[String(i)]),mt(n.i,"t",i),e.C=0,n=e.j.L,e.h=new Ae,e.g=nn(e.j,n?t:null,!e.u),e.P>0&&(e.O=new Q(c(e.Y,e,e.g),e.P)),t=e.V,n=e.g,i=e.ba;var r="readystatechange";Array.isArray(r)||(r&&(te[0]=r.toString()),r=te);for(let e=0;e<r.length;e++){const s=B(n,r[e],i||t.handleEvent,!1,t.h||t);if(!s)break;t.g[s.key]=s}t=e.J?x(e.J):{},e.u?(e.v||(e.v="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.B,e.v,e.u,t)):(e.v="GET",e.g.ea(e.B,e.v,null,t)),fe(),function(e,t,n,i,r,s){e.info(function(){if(e.g)if(s){var o="",a=s.split("&");for(let e=0;e<a.length;e++){var c=a[e].split("=");if(c.length>1){const e=c[0];c=c[1];const t=e.split("_");o=t.length>=2&&"type"==t[1]?o+(e+"=")+c+"&":o+(e+"=redacted&")}}}else o=null;else o=s;return"XMLHTTP REQ ("+i+") [attempt "+r+"]: "+t+"\n"+n+"\n"+o})}(e.i,e.v,e.B,e.l,e.S,e.u)}function Ne(e){return!!e.g&&("GET"==e.v&&2!=e.M&&e.j.Aa)}function xe(e,t){var n=e.C,i=t.indexOf("\n",n);return-1==i?Pe:(n=Number(t.substring(n,i)),isNaN(n)?Ce:(i+=1)+n>t.length?Pe:(t=t.slice(i,i+n),e.C=i+n,t))}function De(e){e.T=Date.now()+e.H,Le(e,e.H)}function Le(e,t){if(null!=e.D)throw Error("WatchDog timer not null");e.D=_e(c(e.aa,e),t)}function Ue(e){e.D&&(s.clearTimeout(e.D),e.D=null)}function Me(e){0==e.j.I||e.K||Yt(e.j,e)}function je(e){Ue(e);var t=e.O;t&&"function"==typeof t.dispose&&t.dispose(),e.O=null,ne(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.dispose())}function $e(e,t){try{var n=e.j;if(0!=n.I&&(n.g==e||Ve(n.h,e)))if(!e.L&&Ve(n.h,e)&&3==n.I){try{var i=n.Ba.g.parse(t)}catch(e){i=null}if(Array.isArray(i)&&3==i.length){var r=i;if(0==r[0]){e:if(!n.v){if(n.g){if(!(n.g.F+3e3<e.F))break e;Xt(n),Ft(n)}Kt(n),me(18)}}else n.xa=r[1],0<n.xa-n.K&&r[2]<37500&&n.F&&0==n.A&&!n.C&&(n.C=_e(c(n.Va,n),6e3));ze(n.h)<=1&&n.ta&&(n.ta=void 0)}else Qt(n,11)}else if((e.L||n.g==e)&&Xt(n),!k(t))for(r=n.Ba.g.parse(t),t=0;t<r.length;t++){let c=r[t];const l=c[0];if(!(l<=n.K))if(n.K=l,c=c[1],2==n.I)if("c"==c[0]){n.M=c[1],n.ba=c[2];const t=c[3];null!=t&&(n.ka=t,n.j.info("VER="+n.ka));const r=c[4];null!=r&&(n.za=r,n.j.info("SVER="+n.za));const l=c[5];null!=l&&"number"==typeof l&&l>0&&(i=1.5*l,n.O=i,n.j.info("backChannelRequestTimeoutMs_="+i)),i=n;const u=e.g;if(u){const e=u.g?u.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var s=i.h;s.g||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(s.j=s.l,s.g=new Set,s.h&&(qe(s,s.h),s.h=null))}if(i.G){const e=u.g?u.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(i.wa=e,et(i.J,i.G,e))}}n.I=3,n.l&&n.l.ra(),n.aa&&(n.T=Date.now()-e.F,n.j.info("Handshake RTT: "+n.T+"ms"));var o=e;if((i=n).na=tn(i,i.L?i.ba:null,i.W),o.L){We(i.h,o);var a=o,h=i.O;h&&(a.H=h),a.D&&(Ue(a),De(a)),i.g=o}else Wt(i);n.i.length>0&&Ht(n)}else"stop"!=c[0]&&"close"!=c[0]||Qt(n,7);else 3==n.I&&("stop"==c[0]||"close"==c[0]?"stop"==c[0]?Qt(n,7):$t(n):"noop"!=c[0]&&n.l&&n.l.qa(c),n.A=0)}fe()}catch(e){}}ke.prototype.ba=function(e){e=e.target;const t=this.O;t&&3==Lt(e)?t.j():this.Y(e)},ke.prototype.Y=function(e){try{if(e==this.g)e:{const c=Lt(this.g),h=this.g.ya();this.g.ca();if(!(c<3)&&(3!=c||this.g&&(this.h.h||this.g.la()||Ut(this.g)))){this.K||4!=c||7==h||fe(),Ue(this);var t=this.g.ca();this.X=t;var n=function(e){if(!Ne(e))return e.g.la();const t=Ut(e.g);if(""===t)return"";let n="";const i=t.length,r=4==Lt(e.g);if(!e.h.i){if("undefined"==typeof TextDecoder)return je(e),Me(e),"";e.h.i=new s.TextDecoder}for(let s=0;s<i;s++)e.h.h=!0,n+=e.h.i.decode(t[s],{stream:!(r&&s==i-1)});return t.length=0,e.h.g+=n,e.C=0,e.h.g}(this);if(this.o=200==t,function(e,t,n,i,r,s,o){e.info(function(){return"XMLHTTP RESP ("+i+") [ attempt "+r+"]: "+t+"\n"+n+"\n"+s+" "+o})}(this.i,this.v,this.B,this.l,this.S,c,t),this.o){if(this.U&&!this.L){t:{if(this.g){var i,r=this.g;if((i=r.g?r.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!k(i)){var o=i;break t}}o=null}if(!(e=o)){this.o=!1,this.m=3,me(12),je(this),Me(this);break e}ve(this.i,this.l,e,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,$e(this,e)}if(this.R){let t;for(e=!0;!this.K&&this.C<n.length;){if(t=xe(this,n),t==Pe){4==c&&(this.m=4,me(14),e=!1),ve(this.i,this.l,null,"[Incomplete Response]");break}if(t==Ce){this.m=4,me(15),ve(this.i,this.l,n,"[Invalid Chunk]"),e=!1;break}ve(this.i,this.l,t,null),$e(this,t)}if(Ne(this)&&0!=this.C&&(this.h.g=this.h.g.slice(this.C),this.C=0),4!=c||0!=n.length||this.h.h||(this.m=1,me(16),e=!1),this.o=this.o&&e,e){if(n.length>0&&!this.W){this.W=!0;var a=this.j;a.g==this&&a.aa&&!a.P&&(a.j.info("Great, no buffering proxy detected. Bytes received: "+n.length),Gt(a),a.P=!0,me(11))}}else ve(this.i,this.l,n,"[Invalid Chunked Response]"),je(this),Me(this)}else ve(this.i,this.l,n,null),$e(this,n);4==c&&je(this),this.o&&!this.K&&(4==c?Yt(this.j,this):(this.o=!1,De(this)))}else(function(e){const t={};e=(e.g&&Lt(e)>=2&&e.g.getAllResponseHeaders()||"").split("\r\n");for(let i=0;i<e.length;i++){if(k(e[i]))continue;var n=Se(e[i]);const r=n[0];if("string"!=typeof(n=n[1]))continue;n=n.trim();const s=t[r]||[];t[r]=s,s.push(n)}!function(e,t){for(const n in e)t.call(void 0,e[n],n,e)}(t,function(e){return e.join(", ")})})(this.g),400==t&&n.indexOf("Unknown SID")>0?(this.m=3,me(12)):(this.m=0,me(13)),je(this),Me(this)}}}catch(e){}},ke.prototype.cancel=function(){this.K=!0,je(this)},ke.prototype.aa=function(){this.D=null;const e=Date.now();e-this.T>=0?(function(e,t){e.info(function(){return"TIMEOUT: "+t})}(this.i,this.B),2!=this.M&&(fe(),me(17)),je(this),this.m=2,Me(this)):Le(this,this.T-e)};var Fe=class{constructor(e,t){this.g=e,this.map=t}};function Be(e){this.l=e||10,s.PerformanceNavigationTiming?e=(e=s.performance.getEntriesByType("navigation")).length>0&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(s.chrome&&s.chrome.loadTimes&&s.chrome.loadTimes()&&s.chrome.loadTimes().wasFetchedViaSpdy),this.j=e?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function He(e){return!!e.h||!!e.g&&e.g.size>=e.j}function ze(e){return e.h?1:e.g?e.g.size:0}function Ve(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function qe(e,t){e.g?e.g.add(t):e.h=t}function We(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function Ke(e){if(null!=e.h)return e.i.concat(e.h.G);if(null!=e.g&&0!==e.g.size){let t=e.i;for(const n of e.g.values())t=t.concat(n.G);return t}return d(e.i)}Be.prototype.cancel=function(){if(this.i=Ke(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const e of this.g.values())e.cancel();this.g.clear()}};var Ge=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Je(e){let t;this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1,e instanceof Je?(this.l=e.l,Ye(this,e.j),this.o=e.o,this.g=e.g,Ze(this,e.u),this.h=e.h,Qe(this,yt(e.i)),this.m=e.m):e&&(t=String(e).match(Ge))?(this.l=!1,Ye(this,t[1]||"",!0),this.o=nt(t[2]||""),this.g=nt(t[3]||"",!0),Ze(this,t[4]),this.h=nt(t[5]||"",!0),Qe(this,t[6]||"",!0),this.m=nt(t[7]||"")):(this.l=!1,this.i=new lt(null,this.l))}function Xe(e){return new Je(e)}function Ye(e,t,n){e.j=n?nt(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Ze(e,t){if(t){if(t=Number(t),isNaN(t)||t<0)throw Error("Bad port number "+t);e.u=t}else e.u=null}function Qe(e,t,n){t instanceof lt?(e.i=t,function(e,t){t&&!e.j&&(ut(e),e.i=null,e.g.forEach(function(e,t){const n=t.toLowerCase();t!=n&&(pt(this,t),mt(this,n,e))},e)),e.j=t}(e.i,e.l)):(n||(t=it(t,ct)),e.i=new lt(t,e.l))}function et(e,t,n){e.i.set(t,n)}function tt(e){return et(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function nt(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function it(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,rt),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function rt(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Je.prototype.toString=function(){const e=[];var t=this.j;t&&e.push(it(t,st,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.o)&&e.push(it(t,st,!0),"@"),e.push(Ie(n).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.u)&&e.push(":",String(n))),(n=this.h)&&(this.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(it(n,"/"==n.charAt(0)?at:ot,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.m)&&e.push("#",it(n,ht)),e.join("")},Je.prototype.resolve=function(e){const t=Xe(this);let n=!!e.j;n?Ye(t,e.j):n=!!e.o,n?t.o=e.o:n=!!e.g,n?t.g=e.g:n=null!=e.u;var i=e.h;if(n)Ze(t,e.u);else if(n=!!e.h){if("/"!=i.charAt(0))if(this.g&&!this.h)i="/"+i;else{var r=t.h.lastIndexOf("/");-1!=r&&(i=t.h.slice(0,r+1)+i)}if(".."==(r=i)||"."==r)i="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");const e=[];for(let t=0;t<r.length;){const n=r[t++];"."==n?i&&t==r.length&&e.push(""):".."==n?((e.length>1||1==e.length&&""!=e[0])&&e.pop(),i&&t==r.length&&e.push("")):(e.push(n),i=!0)}i=e.join("/")}else i=r}return n?t.h=i:n=""!==e.i.toString(),n?Qe(t,yt(e.i)):n=!!e.m,n&&(t.m=e.m),t};var st=/[#\/\?@]/g,ot=/[#\?:]/g,at=/[#\?]/g,ct=/[#\?@]/g,ht=/#/g;function lt(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function ut(e){e.g||(e.g=new Map,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(let n=0;n<e.length;n++){const i=e[n].indexOf("=");let r,s=null;i>=0?(r=e[n].substring(0,i),s=e[n].substring(i+1)):r=e[n],t(r,s?decodeURIComponent(s.replace(/\+/g," ")):"")}}}(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function pt(e,t){ut(e),t=_t(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function ft(e,t){return ut(e),t=_t(e,t),e.g.has(t)}function gt(e,t){ut(e);let n=[];if("string"==typeof t)ft(e,t)&&(n=n.concat(e.g.get(_t(e,t))));else for(e=Array.from(e.g.values()),t=0;t<e.length;t++)n=n.concat(e[t]);return n}function mt(e,t,n){pt(e,t),n.length>0&&(e.i=null,e.g.set(_t(e,t),d(n)),e.h+=n.length)}function yt(e){const t=new lt;return t.i=e.i,e.g&&(t.g=new Map(e.g),t.h=e.h),t}function _t(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function wt(e,t,n,i,r){try{r&&(r.onload=null,r.onerror=null,r.onabort=null,r.ontimeout=null),i(n)}catch(e){}}function vt(){this.g=new se}function bt(e){this.i=e.Sb||null,this.h=e.ab||!1}function Tt(e,t){J.call(this),this.H=e,this.o=t,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}function Et(e){e.j.read().then(e.Ma.bind(e)).catch(e.ga.bind(e))}function It(e){e.readyState=4,e.l=null,e.j=null,e.B=null,St(e)}function St(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function kt(e){let t="";return N(e,function(e,n){t+=n,t+=":",t+=e,t+="\r\n"}),t}function At(e,t,n){e:{for(i in n){var i=!1;break e}i=!0}i||(n=kt(n),"string"==typeof e?null!=n&&Ie(n):et(e,t,n))}function Ct(e){J.call(this),this.headers=new Map,this.L=e||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}(e=lt.prototype).add=function(e,t){ut(this),this.i=null,e=_t(this,e);let n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},e.forEach=function(e,t){ut(this),this.g.forEach(function(n,i){n.forEach(function(n){e.call(t,n,i,this)},this)},this)},e.set=function(e,t){return ut(this),this.i=null,ft(this,e=_t(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},e.get=function(e,t){return e&&(e=gt(this,e)).length>0?String(e[0]):t},e.toString=function(){if(this.i)return this.i;if(!this.g)return"";const e=[],t=Array.from(this.g.keys());for(let i=0;i<t.length;i++){var n=t[i];const r=Ie(n);n=gt(this,n);for(let t=0;t<n.length;t++){let i=r;""!==n[t]&&(i+="="+Ie(n[t])),e.push(i)}}return this.i=e.join("&")},l(bt,oe),bt.prototype.g=function(){return new Tt(this.i,this.h)},l(Tt,J),(e=Tt.prototype).open=function(e,t){if(0!=this.readyState)throw this.abort(),Error("Error reopening a connection");this.F=e,this.D=t,this.readyState=1,St(this)},e.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;const t={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};e&&(t.body=e),(this.H||s).fetch(new Request(this.D,t)).then(this.Pa.bind(this),this.ga.bind(this))},e.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&4!=this.readyState&&(this.g=!1,It(this)),this.readyState=0},e.Pa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,St(this)),this.g&&(this.readyState=3,St(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(void 0!==s.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.B=new TextDecoder;Et(this)}else e.text().then(this.Oa.bind(this),this.ga.bind(this))},e.Ma=function(e){if(this.g){if(this.o&&e.value)this.response.push(e.value);else if(!this.o){var t=e.value?e.value:new Uint8Array(0);(t=this.B.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?It(this):St(this),3==this.readyState&&Et(this)}},e.Oa=function(e){this.g&&(this.response=this.responseText=e,It(this))},e.Na=function(e){this.g&&(this.response=e,It(this))},e.ga=function(){this.g&&It(this)},e.setRequestHeader=function(e,t){this.A.append(e,t)},e.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},e.getAllResponseHeaders=function(){if(!this.h)return"";const e=[],t=this.h.entries();for(var n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(Tt.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}}),l(Ct,J);var Pt=/^https?$/i,Rt=["POST","PUT"];function Ot(e,t){e.h=!1,e.g&&(e.j=!0,e.g.abort(),e.j=!1),e.l=t,e.o=5,Nt(e),Dt(e)}function Nt(e){e.A||(e.A=!0,X(e,"complete"),X(e,"error"))}function xt(e){if(e.h&&void 0!==r)if(e.v&&4==Lt(e))setTimeout(e.Ca.bind(e),0);else if(X(e,"readystatechange"),4==Lt(e)){e.h=!1;try{const r=e.ca();e:switch(r){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}var n;if(!(n=t)){var i;if(i=0===r){let t=String(e.D).match(Ge)[1]||null;!t&&s.self&&s.self.location&&(t=s.self.location.protocol.slice(0,-1)),i=!Pt.test(t?t.toLowerCase():"")}n=i}if(n)X(e,"complete"),X(e,"success");else{e.o=6;try{var o=Lt(e)>2?e.g.statusText:""}catch(e){o=""}e.l=o+" ["+e.ca()+"]",Nt(e)}}finally{Dt(e)}}}function Dt(e,t){if(e.g){e.m&&(clearTimeout(e.m),e.m=null);const n=e.g;e.g=null,t||X(e,"ready");try{n.onreadystatechange=null}catch(e){}}}function Lt(e){return e.g?e.g.readyState:0}function Ut(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.F){case"":case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}function Mt(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function jt(e){this.za=0,this.i=[],this.j=new we,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=Mt("failFast",!1,e),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=Mt("baseRetryDelayMs",5e3,e),this.Za=Mt("retryDelaySeedMs",1e4,e),this.Ta=Mt("forwardChannelMaxRetries",2,e),this.va=Mt("forwardChannelRequestTimeoutMs",2e4,e),this.ma=e&&e.xmlHttpFactory||void 0,this.Ua=e&&e.Rb||void 0,this.Aa=e&&e.useFetchStreams||!1,this.O=void 0,this.L=e&&e.supportsCrossDomainXhr||!1,this.M="",this.h=new Be(e&&e.concurrentRequestLimit),this.Ba=new vt,this.S=e&&e.fastHandshake||!1,this.R=e&&e.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=e&&e.Pb||!1,e&&e.ua&&this.j.ua(),e&&e.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&e&&e.detectBufferingProxy||!1,this.ia=void 0,e&&e.longPollingTimeout&&e.longPollingTimeout>0&&(this.ia=e.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}function $t(e){if(Bt(e),3==e.I){var t=e.V++,n=Xe(e.J);if(et(n,"SID",e.M),et(n,"RID",t),et(n,"TYPE","terminate"),Vt(e,n),(t=new ke(e,e.j,t)).M=2,t.A=tt(Xe(n)),n=!1,s.navigator&&s.navigator.sendBeacon)try{n=s.navigator.sendBeacon(t.A.toString(),"")}catch(e){}!n&&s.Image&&((new Image).src=t.A,n=!0),n||(t.g=nn(t.j,null),t.g.ea(t.A)),t.F=Date.now(),De(t)}en(e)}function Ft(e){e.g&&(Gt(e),e.g.cancel(),e.g=null)}function Bt(e){Ft(e),e.v&&(s.clearTimeout(e.v),e.v=null),Xt(e),e.h.cancel(),e.m&&("number"==typeof e.m&&s.clearTimeout(e.m),e.m=null)}function Ht(e){if(!He(e.h)&&!e.m){e.m=!0;var t=e.Ea;_||b(),w||(_(),w=!0),v.add(t,e),e.D=0}}function zt(e,t){var n;n=t?t.l:e.V++;const i=Xe(e.J);et(i,"SID",e.M),et(i,"RID",n),et(i,"AID",e.K),Vt(e,i),e.u&&e.o&&At(i,e.u,e.o),n=new ke(e,e.j,n,e.D+1),null===e.u&&(n.J=e.o),t&&(e.i=t.G.concat(e.i)),t=qt(e,n,1e3),n.H=Math.round(.5*e.va)+Math.round(.5*e.va*Math.random()),qe(e.h,n),Re(n,i,t)}function Vt(e,t){e.H&&N(e.H,function(e,n){et(t,n,e)}),e.l&&N({},function(e,n){et(t,n,e)})}function qt(e,t,n){n=Math.min(e.i.length,n);const i=e.l?c(e.l.Ka,e.l,e):null;e:{var r=e.i;let t=-1;for(;;){const e=["count="+n];-1==t?n>0?(t=r[0].g,e.push("ofs="+t)):t=0:e.push("ofs="+t);let c=!0;for(let h=0;h<n;h++){var s=r[h].g;const n=r[h].map;if((s-=t)<0)t=Math.max(0,r[h].g-100),c=!1;else try{s="req"+s+"_"||"";try{var a=n instanceof Map?n:Object.entries(n);for(const[t,n]of a){let i=n;o(n)&&(i=ie(n)),e.push(s+t+"="+encodeURIComponent(i))}}catch(t){throw e.push(s+"type="+encodeURIComponent("_badmap")),t}}catch(e){i&&i(n)}}if(c){a=e.join("&");break e}}a=void 0}return e=e.i.splice(0,n),t.G=e,a}function Wt(e){if(!e.g&&!e.v){e.Y=1;var t=e.Da;_||b(),w||(_(),w=!0),v.add(t,e),e.A=0}}function Kt(e){return!(e.g||e.v||e.A>=3)&&(e.Y++,e.v=_e(c(e.Da,e),Zt(e,e.A)),e.A++,!0)}function Gt(e){null!=e.B&&(s.clearTimeout(e.B),e.B=null)}function Jt(e){e.g=new ke(e,e.j,"rpc",e.Y),null===e.u&&(e.g.J=e.o),e.g.P=0;var t=Xe(e.na);et(t,"RID","rpc"),et(t,"SID",e.M),et(t,"AID",e.K),et(t,"CI",e.F?"0":"1"),!e.F&&e.ia&&et(t,"TO",e.ia),et(t,"TYPE","xmlhttp"),Vt(e,t),e.u&&e.o&&At(t,e.u,e.o),e.O&&(e.g.H=e.O);var n=e.g;e=e.ba,n.M=1,n.A=tt(Xe(t)),n.u=null,n.R=!0,Oe(n,e)}function Xt(e){null!=e.C&&(s.clearTimeout(e.C),e.C=null)}function Yt(e,t){var n=null;if(e.g==t){Xt(e),Gt(e),e.g=null;var i=2}else{if(!Ve(e.h,t))return;n=t.G,We(e.h,t),i=1}if(0!=e.I)if(t.o)if(1==i){n=t.u?t.u.length:0,t=Date.now()-t.F;var r=e.D;X(i=de(),new ye(i,n)),Ht(e)}else Wt(e);else if(3==(r=t.m)||0==r&&t.X>0||!(1==i&&function(e,t){return!(ze(e.h)>=e.h.j-(e.m?1:0)||(e.m?(e.i=t.G.concat(e.i),0):1==e.I||2==e.I||e.D>=(e.Sa?0:e.Ta)||(e.m=_e(c(e.Ea,e,t),Zt(e,e.D)),e.D++,0)))}(e,t)||2==i&&Kt(e)))switch(n&&n.length>0&&(t=e.h,t.i=t.i.concat(n)),r){case 1:Qt(e,5);break;case 4:Qt(e,10);break;case 3:Qt(e,6);break;default:Qt(e,2)}}function Zt(e,t){let n=e.Qa+Math.floor(Math.random()*e.Za);return e.isActive()||(n*=2),n*t}function Qt(e,t){if(e.j.info("Error code "+t),2==t){var n=c(e.bb,e),i=e.Ua;const t=!i;i=new Je(i||"//www.google.com/images/cleardot.gif"),s.location&&"http"==s.location.protocol||Ye(i,"https"),tt(i),t?function(e,t){const n=new we;if(s.Image){const i=new Image;i.onload=h(wt,n,"TestLoadImage: loaded",!0,t,i),i.onerror=h(wt,n,"TestLoadImage: error",!1,t,i),i.onabort=h(wt,n,"TestLoadImage: abort",!1,t,i),i.ontimeout=h(wt,n,"TestLoadImage: timeout",!1,t,i),s.setTimeout(function(){i.ontimeout&&i.ontimeout()},1e4),i.src=e}else t(!1)}(i.toString(),n):function(e,t){new we;const n=new AbortController,i=setTimeout(()=>{n.abort(),wt(0,0,!1,t)},1e4);fetch(e,{signal:n.signal}).then(e=>{clearTimeout(i),e.ok?wt(0,0,!0,t):wt(0,0,!1,t)}).catch(()=>{clearTimeout(i),wt(0,0,!1,t)})}(i.toString(),n)}else me(2);e.I=0,e.l&&e.l.pa(t),en(e),Bt(e)}function en(e){if(e.I=0,e.ja=[],e.l){const t=Ke(e.h);0==t.length&&0==e.i.length||(p(e.ja,t),p(e.ja,e.i),e.h.i.length=0,d(e.i),e.i.length=0),e.l.oa()}}function tn(e,t,n){var i=n instanceof Je?Xe(n):new Je(n);if(""!=i.g)t&&(i.g=t+"."+i.g),Ze(i,i.u);else{var r=s.location;i=r.protocol,t=t?t+"."+r.hostname:r.hostname,r=+r.port;const e=new Je(null);i&&Ye(e,i),t&&(e.g=t),r&&Ze(e,r),n&&(e.h=n),i=e}return n=e.G,t=e.wa,n&&t&&et(i,n,t),et(i,"VER",e.ka),Vt(e,i),i}function nn(e,t,n){if(t&&!e.L)throw Error("Can't create secondary domain capable XhrIo object.");return(t=e.Aa&&!e.ma?new Ct(new bt({ab:n})):new Ct(e.ma)).Fa(e.L),t}function rn(){}function sn(e,t){J.call(this),this.g=new jt(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.o=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.sa&&(e?e["X-WebChannel-Client-Profile"]=t.sa:e={"X-WebChannel-Client-Profile":t.sa}),this.g.U=e,(e=t&&t.Qb)&&!k(e)&&(this.g.u=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!k(t)&&(this.g.G=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new cn(this)}function on(e){ce.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(const n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function an(){he.call(this),this.status=1}function cn(e){this.g=e}(e=Ct.prototype).Fa=function(e){this.H=e},e.ea=function(e,t,n,i){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+e);t=t?t.toUpperCase():"GET",this.D=e,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():be.g(),this.g.onreadystatechange=u(c(this.Ca,this));try{this.B=!0,this.g.open(t,String(e),!0),this.B=!1}catch(e){return void Ot(this,e)}if(e=n||"",n=new Map(this.headers),i)if(Object.getPrototypeOf(i)===Object.prototype)for(var r in i)n.set(r,i[r]);else{if("function"!=typeof i.keys||"function"!=typeof i.get)throw Error("Unknown input type for opt_headers: "+String(i));for(const e of i.keys())n.set(e,i.get(e))}i=Array.from(n.keys()).find(e=>"content-type"==e.toLowerCase()),r=s.FormData&&e instanceof s.FormData,!(Array.prototype.indexOf.call(Rt,t,void 0)>=0)||i||r||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[e,t]of n)this.g.setRequestHeader(e,t);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(e),this.v=!1}catch(e){Ot(this,e)}},e.abort=function(e){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=e||7,X(this,"complete"),X(this,"abort"),Dt(this))},e.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Dt(this,!0)),Ct.Z.N.call(this)},e.Ca=function(){this.u||(this.B||this.v||this.j?xt(this):this.Xa())},e.Xa=function(){xt(this)},e.isActive=function(){return!!this.g},e.ca=function(){try{return Lt(this)>2?this.g.status:-1}catch(e){return-1}},e.la=function(){try{return this.g?this.g.responseText:""}catch(e){return""}},e.La=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),re(t)}},e.ya=function(){return this.o},e.Ha=function(){return"string"==typeof this.l?this.l:String(this.l)},(e=jt.prototype).ka=8,e.I=1,e.connect=function(e,t,n,i){me(0),this.W=e,this.H=t||{},n&&void 0!==i&&(this.H.OSID=n,this.H.OAID=i),this.F=this.X,this.J=tn(this,null,this.W),Ht(this)},e.Ea=function(e){if(this.m)if(this.m=null,1==this.I){if(!e){this.V=Math.floor(1e5*Math.random()),e=this.V++;const r=new ke(this,this.j,e);let s=this.o;if(this.U&&(s?(s=x(s),L(s,this.U)):s=this.U),null!==this.u||this.R||(r.J=s,s=null),this.S)e:{for(var t=0,n=0;n<this.i.length;n++){var i=this.i[n];if(void 0===(i="__data__"in i.map&&"string"==typeof(i=i.map.__data__)?i.length:void 0))break;if((t+=i)>4096){t=n;break e}if(4096===t||n===this.i.length-1){t=n+1;break e}}t=1e3}else t=1e3;t=qt(this,r,t),et(n=Xe(this.J),"RID",e),et(n,"CVER",22),this.G&&et(n,"X-HTTP-Session-Id",this.G),Vt(this,n),s&&(this.R?t="headers="+Ie(kt(s))+"&"+t:this.u&&At(n,this.u,s)),qe(this.h,r),this.Ra&&et(n,"TYPE","init"),this.S?(et(n,"$req",t),et(n,"SID","null"),r.U=!0,Re(r,n,null)):Re(r,n,t),this.I=2}}else 3==this.I&&(e?zt(this,e):0==this.i.length||He(this.h)||zt(this))},e.Da=function(){if(this.v=null,Jt(this),this.aa&&!(this.P||null==this.g||this.T<=0)){var e=4*this.T;this.j.info("BP detection timer enabled: "+e),this.B=_e(c(this.Wa,this),e)}},e.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,me(10),Ft(this),Jt(this))},e.Va=function(){null!=this.C&&(this.C=null,Ft(this),Kt(this),me(19))},e.bb=function(e){e?(this.j.info("Successfully pinged google.com"),me(2)):(this.j.info("Failed to ping google.com"),me(1))},e.isActive=function(){return!!this.l&&this.l.isActive(this)},(e=rn.prototype).ra=function(){},e.qa=function(){},e.pa=function(){},e.oa=function(){},e.isActive=function(){return!0},e.Ka=function(){},l(sn,J),sn.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},sn.prototype.close=function(){$t(this.g)},sn.prototype.o=function(e){var t=this.g;if("string"==typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=ie(e),e=n);t.i.push(new Fe(t.Ya++,e)),3==t.I&&Ht(t)},sn.prototype.N=function(){this.g.l=null,delete this.j,$t(this.g),delete this.g,sn.Z.N.call(this)},l(on,ce),l(an,he),l(cn,rn),cn.prototype.ra=function(){X(this.g,"a")},cn.prototype.qa=function(e){X(this.g,new on(e))},cn.prototype.pa=function(e){X(this.g,new an)},cn.prototype.oa=function(){X(this.g,"b")},sn.prototype.send=sn.prototype.o,sn.prototype.open=sn.prototype.m,sn.prototype.close=sn.prototype.close,Te.NO_ERROR=0,Te.TIMEOUT=8,Te.HTTP_ERROR=6,ae.OPEN="a",ae.CLOSE="b",ae.ERROR="c",ae.MESSAGE="d",J.prototype.listen=J.prototype.J,Ct.prototype.listenOnce=Ct.prototype.K,Ct.prototype.getLastError=Ct.prototype.Ha,Ct.prototype.getLastErrorCode=Ct.prototype.ya,Ct.prototype.getStatus=Ct.prototype.ca,Ct.prototype.getResponseJson=Ct.prototype.La,Ct.prototype.getResponseText=Ct.prototype.la,Ct.prototype.send=Ct.prototype.ea,Ct.prototype.setWithCredentials=Ct.prototype.Fa}).apply(void 0!==dt?dt:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});const pt="@firebase/firestore",ft="4.9.2";class gt{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}gt.UNAUTHENTICATED=new gt(null),gt.GOOGLE_CREDENTIALS=new gt("google-credentials-uid"),gt.FIRST_PARTY=new gt("first-party-uid"),gt.MOCK_USER=new gt("mock-user");let mt="12.3.0";const yt=new V("@firebase/firestore");function _t(e,...t){if(yt.logLevel<=$.DEBUG){const n=t.map(vt);yt.debug(`Firestore (${mt}): ${e}`,...n)}}function wt(e,...t){if(yt.logLevel<=$.ERROR){const n=t.map(vt);yt.error(`Firestore (${mt}): ${e}`,...n)}}function vt(e){if("string"==typeof e)return e;try{return function(e){return JSON.stringify(e)}(e)}catch(t){return e}}function bt(e,t,n){let i="Unexpected state";"string"==typeof t?i=t:n=t,Tt(e,i,n)}function Tt(e,t,n){let i=`FIRESTORE (${mt}) INTERNAL ASSERTION FAILED: ${t} (ID: ${e.toString(16)})`;if(void 0!==n)try{i+=" CONTEXT: "+JSON.stringify(n)}catch(e){i+=" CONTEXT: "+n}throw wt(i),new Error(i)}function Et(e,t,n,i){let r="Unexpected state";"string"==typeof n?r=n:i=n,e||Tt(t,r,i)}const It="cancelled",St="invalid-argument",kt="failed-precondition";class At extends E{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class Ct{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class Pt{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class Rt{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(gt.UNAUTHENTICATED))}shutdown(){}}class Ot{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class Nt{constructor(e){this.t=e,this.currentUser=gt.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){Et(void 0===this.o,42304);let n=this.i;const i=e=>this.i!==n?(n=this.i,t(e)):Promise.resolve();let r=new Ct;this.o=()=>{this.i++,this.currentUser=this.u(),r.resolve(),r=new Ct,e.enqueueRetryable(()=>i(this.currentUser))};const s=()=>{const t=r;e.enqueueRetryable(async()=>{await t.promise,await i(this.currentUser)})},o=e=>{_t("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.o&&(this.auth.addAuthTokenListener(this.o),s())};this.t.onInit(e=>o(e)),setTimeout(()=>{if(!this.auth){const e=this.t.getImmediate({optional:!0});e?o(e):(_t("FirebaseAuthCredentialsProvider","Auth not yet detected"),r.resolve(),r=new Ct)}},0),s()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>this.i!==e?(_t("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?(Et("string"==typeof t.accessToken,31837,{l:t}),new Pt(t.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return Et(null===e||"string"==typeof e,2055,{h:e}),new gt(e)}}class xt{constructor(e,t,n){this.P=e,this.T=t,this.I=n,this.type="FirstParty",this.user=gt.FIRST_PARTY,this.A=new Map}R(){return this.I?this.I():null}get headers(){this.A.set("X-Goog-AuthUser",this.P);const e=this.R();return e&&this.A.set("Authorization",e),this.T&&this.A.set("X-Goog-Iam-Authorization-Token",this.T),this.A}}class Dt{constructor(e,t,n){this.P=e,this.T=t,this.I=n}getToken(){return Promise.resolve(new xt(this.P,this.T,this.I))}start(e,t){e.enqueueRetryable(()=>t(gt.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Lt{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Ut{constructor(e,t){this.V=t,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,Ke(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,t){Et(void 0===this.o,3512);const n=e=>{null!=e.error&&_t("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);const n=e.token!==this.m;return this.m=e.token,_t("FirebaseAppCheckTokenProvider",`Received ${n?"new":"existing"} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>n(t))};const i=e=>{_t("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit(e=>i(e)),setTimeout(()=>{if(!this.appCheck){const e=this.V.getImmediate({optional:!0});e?i(e):_t("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){if(this.p)return Promise.resolve(new Lt(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>e?(Et("string"==typeof e.token,44558,{tokenResult:e}),this.m=e.token,new Lt(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}function Mt(e){const t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let t=0;t<e;t++)n[t]=Math.floor(256*Math.random());return n}class jt{static newId(){const e=62*Math.floor(256/62);let t="";for(;t.length<20;){const n=Mt(40);for(let i=0;i<n.length;++i)t.length<20&&n[i]<e&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(n[i]%62))}return t}}function $t(e,t){return e<t?-1:e>t?1:0}const Ft=55296,Bt=57343;function Ht(e){const t=e.charCodeAt(0);return t>=Ft&&t<=Bt}const zt="__name__";class Vt{constructor(e,t,n){void 0===t?t=0:t>e.length&&bt(637,{offset:t,range:e.length}),void 0===n?n=e.length-t:n>e.length-t&&bt(1746,{length:n,range:e.length-t}),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===Vt.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof Vt?e.forEach(e=>{t.push(e)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++){const n=Vt.compareSegments(e.get(i),t.get(i));if(0!==n)return n}return $t(e.length,t.length)}static compareSegments(e,t){const n=Vt.isNumericId(e),i=Vt.isNumericId(t);return n&&!i?-1:!n&&i?1:n&&i?Vt.extractNumericId(e).compare(Vt.extractNumericId(t)):function(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++){const n=e.charAt(i),r=t.charAt(i);if(n!==r)return Ht(n)===Ht(r)?$t(n,r):Ht(n)?1:-1}return $t(e.length,t.length)}(e,t)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return lt.fromString(e.substring(4,e.length-2))}}class qt extends Vt{construct(e,t,n){return new qt(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const t=[];for(const n of e){if(n.indexOf("//")>=0)throw new At(St,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter(e=>e.length>0))}return new qt(t)}static emptyPath(){return new qt([])}}const Wt=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class Kt extends Vt{construct(e,t,n){return new Kt(e,t,n)}static isValidIdentifier(e){return Wt.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),Kt.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&this.get(0)===zt}static keyField(){return new Kt([zt])}static fromServerFormat(e){const t=[];let n="",i=0;const r=()=>{if(0===n.length)throw new At(St,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let s=!1;for(;i<e.length;){const t=e[i];if("\\"===t){if(i+1===e.length)throw new At(St,"Path has trailing escape character: "+e);const t=e[i+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new At(St,"Path has invalid escape sequence: "+e);n+=t,i+=2}else"`"===t?(s=!s,i++):"."!==t||s?(n+=t,i++):(r(),i++)}if(r(),s)throw new At(St,"Unterminated ` in path: "+e);return new Kt(t)}static emptyPath(){return new Kt([])}}class Gt{constructor(e){this.path=e}static fromPath(e){return new Gt(qt.fromString(e))}static fromName(e){return new Gt(qt.fromString(e).popFirst(5))}static empty(){return new Gt(qt.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===qt.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return qt.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Gt(new qt(e.slice()))}}function Jt(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new At(St,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=function(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{const t=function(e){return e.constructor?e.constructor.name:null}(e);return t?`a custom ${t} object`:"an object"}}return"function"==typeof e?"a function":bt(12329,{type:typeof e})}(e);throw new At(St,`Expected type '${t.name}', but it was: ${n}`)}}return e}function Xt(e,t){const n={typeString:e};return t&&(n.value=t),n}function Yt(e,t){if(!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(e))throw new At(St,"JSON must be an object");let n;for(const i in t)if(t[i]){const r=t[i].typeString,s="value"in t[i]?{value:t[i].value}:void 0;if(!(i in e)){n=`JSON missing required field: '${i}'`;break}const o=e[i];if(r&&typeof o!==r){n=`JSON field '${i}' must be a ${r}.`;break}if(void 0!==s&&o!==s.value){n=`Expected '${i}' field to equal '${s.value}'`;break}}if(n)throw new At(St,n);return!0}const Zt=-62135596800,Qt=1e6;class en{static now(){return en.fromMillis(Date.now())}static fromDate(e){return en.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),n=Math.floor((e-1e3*t)*Qt);return new en(t,n)}constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new At(St,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new At(St,"Timestamp nanoseconds out of range: "+t);if(e<Zt)throw new At(St,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new At(St,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/Qt}_compareTo(e){return this.seconds===e.seconds?$t(this.nanoseconds,e.nanoseconds):$t(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:en._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(Yt(e,en._jsonSchema))return new en(e.seconds,e.nanoseconds)}valueOf(){const e=this.seconds-Zt;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}en._jsonSchemaVersion="firestore/timestamp/1.0",en._jsonSchema={type:Xt("string",en._jsonSchemaVersion),seconds:Xt("number"),nanoseconds:Xt("number")};class tn extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class nn{constructor(e){this.binaryString=e}static fromBase64String(e){const t=function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new tn("Invalid base64 string: "+e):e}}(e);return new nn(t)}static fromUint8Array(e){const t=function(e){let t="";for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new nn(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(e){return btoa(e)}(this.binaryString)}toUint8Array(){return function(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return $t(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}nn.EMPTY_BYTE_STRING=new nn("");const rn="(default)";class sn{constructor(e,t){this.projectId=e,this.database=t||rn}static empty(){return new sn("","")}get isDefaultDatabase(){return this.database===rn}isEqual(e){return e instanceof sn&&e.projectId===this.projectId&&e.database===this.database}}class on{constructor(e,t=null,n=[],i=[],r=null,s="F",o=null,a=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=i,this.limit=r,this.limitType=s,this.startAt=o,this.endAt=a,this.Ie=null,this.Ee=null,this.de=null,this.startAt,this.endAt}}var an,cn;(cn=an||(an={}))[cn.OK=0]="OK",cn[cn.CANCELLED=1]="CANCELLED",cn[cn.UNKNOWN=2]="UNKNOWN",cn[cn.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",cn[cn.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",cn[cn.NOT_FOUND=5]="NOT_FOUND",cn[cn.ALREADY_EXISTS=6]="ALREADY_EXISTS",cn[cn.PERMISSION_DENIED=7]="PERMISSION_DENIED",cn[cn.UNAUTHENTICATED=16]="UNAUTHENTICATED",cn[cn.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",cn[cn.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",cn[cn.ABORTED=10]="ABORTED",cn[cn.OUT_OF_RANGE=11]="OUT_OF_RANGE",cn[cn.UNIMPLEMENTED=12]="UNIMPLEMENTED",cn[cn.INTERNAL=13]="INTERNAL",cn[cn.UNAVAILABLE=14]="UNAVAILABLE",cn[cn.DATA_LOSS=15]="DATA_LOSS",new lt([4294967295,4294967295],0);function hn(){return"undefined"!=typeof document?document:null}class ln{constructor(e,t,n=1e3,i=1.5,r=6e4){this.Mi=e,this.timerId=t,this.d_=n,this.A_=i,this.R_=r,this.V_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.V_=0}g_(){this.V_=this.R_}p_(e){this.cancel();const t=Math.floor(this.V_+this.y_()),n=Math.max(0,Date.now()-this.f_),i=Math.max(0,t-n);i>0&&_t("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.V_} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.m_=this.Mi.enqueueAfterDelay(this.timerId,i,()=>(this.f_=Date.now(),e())),this.V_*=this.A_,this.V_<this.d_&&(this.V_=this.d_),this.V_>this.R_&&(this.V_=this.R_)}w_(){null!==this.m_&&(this.m_.skipDelay(),this.m_=null)}cancel(){null!==this.m_&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.V_}}class un{constructor(e,t,n,i,r){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=i,this.removalCallback=r,this.deferred=new Ct,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(e=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,t,n,i,r){const s=Date.now()+n,o=new un(e,t,s,i,r);return o.start(n),o}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new At(It,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}var dn,pn;(pn=dn||(dn={})).Ma="default",pn.Cache="cache";const fn=new Map,gn="firestore.googleapis.com",mn=!0;class yn{constructor(e){if(void 0===e.host){if(void 0!==e.ssl)throw new At(St,"Can't provide ssl option if host option is not set");this.host=gn,this.ssl=mn}else this.host=e.host,this.ssl=e.ssl??mn;if(this.isUsingEmulator=void 0!==e.emulatorOptions,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new At(St,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,n,i){if(!0===t&&!0===i)throw new At(St,`${e} and ${n} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=function(e){const t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}(e.experimentalLongPollingOptions??{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new At(St,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new At(St,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new At(St,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(e,t){return e.timeoutSeconds===t.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class _n{constructor(e,t,n,i){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new yn({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new At(kt,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return"notTerminated"!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new At(kt,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new yn(e),this._emulatorOptions=e.emulatorOptions||{},void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new Rt;switch(e.type){case"firstParty":return new Dt(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new At(St,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return"notTerminated"===this._terminateTask&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){"notTerminated"===this._terminateTask?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const t=fn.get(e);t&&(_t("ComponentProvider","Removing Datastore"),fn.delete(e),t.terminate())}(this),Promise.resolve()}}function wn(e,t,n,i={}){e=Jt(e,_n);const r=d(t),s=e._getSettings(),o={...s,emulatorOptions:e._getEmulatorOptions()},a=`${t}:${n}`;r&&(p(`https://${a}`),y("Firestore",!0)),s.host!==gn&&s.host!==a&&function(e,...t){if(yt.logLevel<=$.WARN){const n=t.map(vt);yt.warn(`Firestore (${mt}): ${e}`,...n)}}("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const c={...s,host:a,ssl:r,emulatorOptions:i};if(!k(c,o)&&(e._setSettings(c),i.mockUserToken)){let t,n;if("string"==typeof i.mockUserToken)t=i.mockUserToken,n=gt.MOCK_USER;else{t=f(i.mockUserToken,e._app?.options.projectId);const r=i.mockUserToken.sub||i.mockUserToken.user_id;if(!r)throw new At(St,"mockUserToken must contain 'sub' or 'user_id' field!");n=new gt(r)}e._authCredentials=new Ot(new Pt(t,n))}}class vn{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new vn(this.firestore,e,this._query)}}class bn{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Tn(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new bn(this.firestore,e,this._key)}toJSON(){return{type:bn._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,t,n){if(Yt(t,bn._jsonSchema))return new bn(e,n||null,new Gt(qt.fromString(t.referencePath)))}}bn._jsonSchemaVersion="firestore/documentReference/1.0",bn._jsonSchema={type:Xt("string",bn._jsonSchemaVersion),referencePath:Xt("string")};class Tn extends vn{constructor(e,t,n){super(e,t,function(e){return new on(e)}(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new bn(this.firestore,null,new Gt(e))}withConverter(e){return new Tn(this.firestore,e,this._path)}}const En="AsyncQueue";class In{constructor(e=Promise.resolve()){this.Xu=[],this.ec=!1,this.tc=[],this.nc=null,this.rc=!1,this.sc=!1,this.oc=[],this.M_=new ln(this,"async_queue_retry"),this._c=()=>{const e=hn();e&&_t(En,"Visibility state changed to "+e.visibilityState),this.M_.w_()},this.ac=e;const t=hn();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this._c)}get isShuttingDown(){return this.ec}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.uc(),this.cc(e)}enterRestrictedMode(e){if(!this.ec){this.ec=!0,this.sc=e||!1;const t=hn();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this._c)}}enqueue(e){if(this.uc(),this.ec)return new Promise(()=>{});const t=new Ct;return this.cc(()=>this.ec&&this.sc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Xu.push(e),this.lc()))}async lc(){if(0!==this.Xu.length){try{await this.Xu[0](),this.Xu.shift(),this.M_.reset()}catch(e){if(!function(e){return"IndexedDbTransactionError"===e.name}(e))throw e;_t(En,"Operation failed with retryable error: "+e)}this.Xu.length>0&&this.M_.p_(()=>this.lc())}}cc(e){const t=this.ac.then(()=>(this.rc=!0,e().catch(e=>{throw this.nc=e,this.rc=!1,wt("INTERNAL UNHANDLED ERROR: ",Sn(e)),e}).then(e=>(this.rc=!1,e))));return this.ac=t,t}enqueueAfterDelay(e,t,n){this.uc(),this.oc.indexOf(e)>-1&&(t=0);const i=un.createAndSchedule(this,e,t,n,e=>this.hc(e));return this.tc.push(i),i}uc(){this.nc&&bt(47125,{Pc:Sn(this.nc)})}verifyOperationInProgress(){}async Tc(){let e;do{e=this.ac,await e}while(e!==this.ac)}Ic(e){for(const t of this.tc)if(t.timerId===e)return!0;return!1}Ec(e){return this.Tc().then(()=>{this.tc.sort((e,t)=>e.targetTimeMs-t.targetTimeMs);for(const t of this.tc)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.Tc()})}dc(e){this.oc.push(e)}hc(e){const t=this.tc.indexOf(e);this.tc.splice(t,1)}}function Sn(e){let t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}class kn extends _n{constructor(e,t,n,i){super(e,t,n,i),this.type="firestore",this._queue=new In,this._persistenceKey=i?.name||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new In(e),this._firestoreClient=void 0,await e}}}class An{constructor(e){this._byteString=e}static fromBase64String(e){try{return new An(nn.fromBase64String(e))}catch(e){throw new At(St,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new An(nn.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:An._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(Yt(e,An._jsonSchema))return An.fromBase64String(e.bytes)}}An._jsonSchemaVersion="firestore/bytes/1.0",An._jsonSchema={type:Xt("string",An._jsonSchemaVersion),bytes:Xt("string")};class Cn{constructor(...e){for(let t=0;t<e.length;++t)if(0===e[t].length)throw new At(St,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Kt(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class Pn{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new At(St,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new At(St,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}_compareTo(e){return $t(this._lat,e._lat)||$t(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:Pn._jsonSchemaVersion}}static fromJSON(e){if(Yt(e,Pn._jsonSchema))return new Pn(e.latitude,e.longitude)}}Pn._jsonSchemaVersion="firestore/geoPoint/1.0",Pn._jsonSchema={type:Xt("string",Pn._jsonSchemaVersion),latitude:Xt("number"),longitude:Xt("number")};class Rn{constructor(e){this._values=(e||[]).map(e=>e)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}(this._values,e._values)}toJSON(){return{type:Rn._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(e){if(Yt(e,Rn._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every(e=>"number"==typeof e))return new Rn(e.vectorValues);throw new At(St,"Expected 'vectorValues' field to be a number array")}}}Rn._jsonSchemaVersion="firestore/vectorValue/1.0",Rn._jsonSchema={type:Xt("string",Rn._jsonSchemaVersion),vectorValues:Xt("object")};const On=new RegExp("[~\\*/\\[\\]]");function Nn(e,t,n,i,r){let s=`Function ${t}() called with invalid data`;s+=". ";return new At(St,s+e+"")}class xn{constructor(e,t,n,i,r){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=i,this._converter=r}get id(){return this._key.path.lastSegment()}get ref(){return new bn(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new Dn(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const t=this._document.data.field(Ln("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class Dn extends xn{data(){return super.data()}}function Ln(e,t){return"string"==typeof t?function(e,t){if(t.search(On)>=0)throw Nn(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e);try{return new Cn(...t.split("."))._internalPath}catch(n){throw Nn(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e)}}(e,t):t instanceof Cn?t._internalPath:t._delegate._internalPath}class Un{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Mn extends xn{constructor(e,t,n,i,r,s){super(e,t,n,i,s),this._firestore=e,this._firestoreImpl=e,this.metadata=r}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new jn(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){const n=this._document.data.field(Ln("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new At(kt,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,t={};return t.type=Mn._jsonSchemaVersion,t.bundle="",t.bundleSource="DocumentSnapshot",t.bundleName=this._key.toString(),e&&e.isValidDocument()&&e.isFoundDocument()?(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),t.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),t):t}}Mn._jsonSchemaVersion="firestore/documentSnapshot/1.0",Mn._jsonSchema={type:Xt("string",Mn._jsonSchemaVersion),bundleSource:Xt("string","DocumentSnapshot"),bundleName:Xt("string"),bundle:Xt("string")};class jn extends Mn{data(e={}){return super.data(e)}}class $n{constructor(e,t,n,i){this._firestore=e,this._userDataWriter=t,this._snapshot=i,this.metadata=new Un(i.hasPendingWrites,i.fromCache),this.query=n}get docs(){const e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(n=>{e.call(t,new jn(this._firestore,this._userDataWriter,n.key,n,new Un(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new At(St,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map(n=>{const i=new jn(e._firestore,e._userDataWriter,n.doc.key,n.doc,new Un(e._snapshot.mutatedKeys.has(n.doc.key),e._snapshot.fromCache),e.query.converter);return n.doc,{type:"added",doc:i,oldIndex:-1,newIndex:t++}})}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter(e=>t||3!==e.type).map(t=>{const i=new jn(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Un(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);let r=-1,s=-1;return 0!==t.type&&(r=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),1!==t.type&&(n=n.add(t.doc),s=n.indexOf(t.doc.key)),{type:Fn(t.type),doc:i,oldIndex:r,newIndex:s}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new At(kt,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=$n._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=jt.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const t=[],n=[],i=[];return this.docs.forEach(e=>{null!==e._document&&(t.push(e._document),n.push(this._userDataWriter.convertObjectMap(e._document.data.value.mapValue.fields,"previous")),i.push(e.ref.path))}),e.bundle=(this._firestore,this.query._query,e.bundleName,"NOT SUPPORTED"),e}}function Fn(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return bt(61501,{type:e})}}$n._jsonSchemaVersion="firestore/querySnapshot/1.0",$n._jsonSchema={type:Xt("string",$n._jsonSchemaVersion),bundleSource:Xt("string","QuerySnapshot"),bundleName:Xt("string"),bundle:Xt("string")},function(e,t=!0){!function(e){mt=e}(Xe),qe(new L("firestore",(e,{instanceIdentifier:n,options:i})=>{const r=e.getProvider("app").getImmediate(),s=new kn(new Nt(e.getProvider("auth-internal")),new Ut(r,e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new At(St,'"projectId" not provided in firebase.initializeApp.');return new sn(e.options.projectId,t)}(r,n),r);return i={useFetchStreams:t,...i},s._setSettings(i),s},"PUBLIC").setMultipleInstances(!0)),Qe(pt,ft,e),Qe(pt,ft,"esm2020")}();const Bn="firebasestorage.googleapis.com",Hn="storageBucket";class zn extends E{constructor(e,t,n=0){super(Wn(e),`Firebase Storage: ${t} (${Wn(e)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,zn.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return Wn(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}\n${this.customData.serverResponse}`:this.message=this._baseMessage}}var Vn,qn;function Wn(e){return"storage/"+e}function Kn(){return new zn(Vn.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function Gn(){return new zn(Vn.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function Jn(){return new zn(Vn.CANCELED,"User canceled the upload/download.")}function Xn(){return new zn(Vn.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function Yn(e){return new zn(Vn.INVALID_ARGUMENT,e)}function Zn(){return new zn(Vn.APP_DELETED,"The Firebase app was deleted.")}function Qn(e,t){return new zn(Vn.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function ei(e){throw new zn(Vn.INTERNAL_ERROR,"Internal error: "+e)}!function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"}(Vn||(Vn={}));class ti{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let n;try{n=ti.makeFromUrl(e,t)}catch(t){return new ti(e,"")}if(""===n.path)return n;throw i=e,new zn(Vn.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+i+"'.");var i}static makeFromUrl(e,t){let n=null;const i="([A-Za-z0-9.\\-_]+)";const r=new RegExp("^gs://"+i+"(/(.*))?$","i");function s(e){e.path_=decodeURIComponent(e.path)}const o=t.replace(/[.]/g,"\\."),a=[{regex:r,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp(`^https?://${o}/v[A-Za-z0-9_]+/b/${i}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:s},{regex:new RegExp(`^https?://${t===Bn?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${i}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:s}];for(let t=0;t<a.length;t++){const i=a[t],r=i.regex.exec(e);if(r){const e=r[i.indices.bucket];let t=r[i.indices.path];t||(t=""),n=new ti(e,t),i.postModify(n);break}}if(null==n)throw function(e){return new zn(Vn.INVALID_URL,"Invalid URL '"+e+"'.")}(e);return n}}class ni{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function ii(e){return"string"==typeof e||e instanceof String}function ri(e){return si()&&e instanceof Blob}function si(){return"undefined"!=typeof Blob}function oi(e,t,n,i){if(i<t)throw Yn(`Invalid value for '${e}'. Expected ${t} or greater.`);if(i>n)throw Yn(`Invalid value for '${e}'. Expected ${n} or less.`)}function ai(e,t,n){let i=t;return null==n&&(i=`https://${t}`),`${n}://${i}/v0${e}`}function ci(e){const t=encodeURIComponent;let n="?";for(const i in e)if(e.hasOwnProperty(i)){n=n+(t(i)+"="+t(e[i]))+"&"}return n=n.slice(0,-1),n}function hi(e,t){const n=e>=500&&e<600,i=-1!==[408,429].indexOf(e),r=-1!==t.indexOf(e);return n||i||r}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(qn||(qn={}));class li{constructor(e,t,n,i,r,s,o,a,c,h,l,u=!0,d=!1){this.url_=e,this.method_=t,this.headers_=n,this.body_=i,this.successCodes_=r,this.additionalRetryCodes_=s,this.callback_=o,this.errorCallback_=a,this.timeout_=c,this.progressCallback_=h,this.connectionFactory_=l,this.retry=u,this.isUsingEmulator=d,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()})}start_(){const e=(e,t)=>{if(t)return void e(!1,new ui(!1,null,!0));const n=this.connectionFactory_();this.pendingConnection_=n;const i=e=>{const t=e.loaded,n=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,n)};null!==this.progressCallback_&&n.addUploadProgressListener(i),n.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(i),this.pendingConnection_=null;const t=n.getErrorCode()===qn.NO_ERROR,r=n.getStatus();if(!t||hi(r,this.additionalRetryCodes_)&&this.retry){const t=n.getErrorCode()===qn.ABORT;return void e(!1,new ui(!1,null,t))}const s=-1!==this.successCodes_.indexOf(r);e(!0,new ui(s,n))})},t=(e,t)=>{const n=this.resolve_,i=this.reject_,r=t.connection;if(t.wasSuccessCode)try{const e=this.callback_(r,r.getResponse());!function(e){return void 0!==e}(e)?n():n(e)}catch(e){i(e)}else if(null!==r){const e=Kn();e.serverResponse=r.getErrorText(),this.errorCallback_?i(this.errorCallback_(r,e)):i(e)}else if(t.canceled){i(this.appDelete_?Zn():Jn())}else{i(Gn())}};this.canceled_?t(0,new ui(!1,null,!0)):this.backoffId_=function(e,t,n){let i=1,r=null,s=null,o=!1,a=0;function c(){return 2===a}let h=!1;function l(...e){h||(h=!0,t.apply(null,e))}function u(t){r=setTimeout(()=>{r=null,e(p,c())},t)}function d(){s&&clearTimeout(s)}function p(e,...t){if(h)return void d();if(e)return d(),void l.call(null,e,...t);if(c()||o)return d(),void l.call(null,e,...t);let n;i<64&&(i*=2),1===a?(a=2,n=0):n=1e3*(i+Math.random()),u(n)}let f=!1;function g(e){f||(f=!0,d(),h||(null!==r?(e||(a=2),clearTimeout(r),u(0)):e||(a=1)))}return u(0),s=setTimeout(()=>{o=!0,g(!0)},n),g}(e,t,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class ui{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}}function di(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function pi(...e){const t=di();if(void 0!==t){const n=new t;for(let t=0;t<e.length;t++)n.append(e[t]);return n.getBlob()}if(si())return new Blob(e);throw new zn(Vn.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}function fi(e){if("undefined"==typeof atob)throw t="base-64",new zn(Vn.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);var t;return atob(e)}const gi="raw",mi="base64",yi="base64url",_i="data_url";class wi{constructor(e,t){this.data=e,this.contentType=t||null}}function vi(e,t){switch(e){case gi:return new wi(bi(t));case mi:case yi:return new wi(Ti(e,t));case _i:return new wi(function(e){const t=new Ei(e);return t.base64?Ti(mi,t.rest):function(e){let t;try{t=decodeURIComponent(e)}catch(e){throw Qn(_i,"Malformed data URL.")}return bi(t)}(t.rest)}(t),new Ei(t).contentType)}throw Kn()}function bi(e){const t=[];for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);if(i<=127)t.push(i);else if(i<=2047)t.push(192|i>>6,128|63&i);else if(55296==(64512&i)){if(n<e.length-1&&56320==(64512&e.charCodeAt(n+1))){i=65536|(1023&i)<<10|1023&e.charCodeAt(++n),t.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i)}else t.push(239,191,189)}else 56320==(64512&i)?t.push(239,191,189):t.push(224|i>>12,128|i>>6&63,128|63&i)}return new Uint8Array(t)}function Ti(e,t){switch(e){case mi:{const n=-1!==t.indexOf("-"),i=-1!==t.indexOf("_");if(n||i){throw Qn(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?")}break}case yi:{const n=-1!==t.indexOf("+"),i=-1!==t.indexOf("/");if(n||i){throw Qn(e,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=fi(t)}catch(t){if(t.message.includes("polyfill"))throw t;throw Qn(e,"Invalid character found")}const i=new Uint8Array(n.length);for(let e=0;e<n.length;e++)i[e]=n.charCodeAt(e);return i}class Ei{constructor(e){this.base64=!1,this.contentType=null;const t=e.match(/^data:([^,]+)?,/);if(null===t)throw Qn(_i,"Must be formatted 'data:[<mediatype>][;base64],<data>");const n=t[1]||null;null!=n&&(this.base64=function(e,t){const n=e.length>=t.length;if(!n)return!1;return e.substring(e.length-t.length)===t}(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=e.substring(e.indexOf(",")+1)}}class Ii{constructor(e,t){let n=0,i="";ri(e)?(this.data_=e,n=e.size,i=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=i}size(){return this.size_}type(){return this.type_}slice(e,t){if(ri(this.data_)){const n=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,e,t);return null===n?null:new Ii(n)}{const n=new Uint8Array(this.data_.buffer,e,t-e);return new Ii(n,!0)}}static getBlob(...e){if(si()){const t=e.map(e=>e instanceof Ii?e.data_:e);return new Ii(pi.apply(null,t))}{const t=e.map(e=>ii(e)?vi(gi,e).data:e.data_);let n=0;t.forEach(e=>{n+=e.byteLength});const i=new Uint8Array(n);let r=0;return t.forEach(e=>{for(let t=0;t<e.length;t++)i[r++]=e[t]}),new Ii(i,!0)}}uploadData(){return this.data_}}function Si(e){let t;try{t=JSON.parse(e)}catch(e){return null}return function(e){return"object"==typeof e&&!Array.isArray(e)}(t)?t:null}function ki(e){const t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function Ai(e,t){return t}class Ci{constructor(e,t,n,i){this.server=e,this.local=t||e,this.writable=!!n,this.xform=i||Ai}}let Pi=null;function Ri(){if(Pi)return Pi;const e=[];e.push(new Ci("bucket")),e.push(new Ci("generation")),e.push(new Ci("metageneration")),e.push(new Ci("name","fullPath",!0));const t=new Ci("name");t.xform=function(e,t){return function(e){return!ii(e)||e.length<2?e:ki(e)}(t)},e.push(t);const n=new Ci("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new Ci("timeCreated")),e.push(new Ci("updated")),e.push(new Ci("md5Hash",null,!0)),e.push(new Ci("cacheControl",null,!0)),e.push(new Ci("contentDisposition",null,!0)),e.push(new Ci("contentEncoding",null,!0)),e.push(new Ci("contentLanguage",null,!0)),e.push(new Ci("contentType",null,!0)),e.push(new Ci("metadata","customMetadata",!0)),Pi=e,Pi}function Oi(e,t,n){const i={type:"file"},r=n.length;for(let e=0;e<r;e++){const r=n[e];i[r.local]=r.xform(i,t[r.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){const n=e.bucket,i=e.fullPath,r=new ti(n,i);return t._makeStorageReference(r)}})}(i,e),i}function Ni(e,t,n){const i=Si(t);if(null===i)return null;return Oi(e,i,n)}function xi(e,t){const n={},i=t.length;for(let r=0;r<i;r++){const i=t[r];i.writable&&(n[i.server]=e[i.local])}return JSON.stringify(n)}class Di{constructor(e,t,n,i){this.url=e,this.method=t,this.handler=n,this.timeout=i,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}function Li(e){if(!e)throw Kn()}function Ui(e,t){return function(n,i){const r=Ni(e,i,t);return Li(null!==r),r}}function Mi(e,t){return function(n,i){const r=Ni(e,i,t);return Li(null!==r),function(e,t,n,i){const r=Si(t);if(null===r)return null;if(!ii(r.downloadTokens))return null;const s=r.downloadTokens;if(0===s.length)return null;const o=encodeURIComponent;return s.split(",").map(t=>{const r=e.bucket,s=e.fullPath;return ai("/b/"+o(r)+"/o/"+o(s),n,i)+ci({alt:"media",token:t})})[0]}(r,i,e.host,e._protocol)}}function ji(e){return function(t,n){let i;var r,s;return 401===t.getStatus()?i=t.getErrorText().includes("Firebase App Check token is invalid")?new zn(Vn.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new zn(Vn.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(s=e.bucket,i=new zn(Vn.QUOTA_EXCEEDED,"Quota for bucket '"+s+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(r=e.path,i=new zn(Vn.UNAUTHORIZED,"User does not have permission to access '"+r+"'.")):i=n,i.status=t.getStatus(),i.serverResponse=n.serverResponse,i}}function $i(e){const t=ji(e);return function(n,i){let r=t(n,i);var s;return 404===n.getStatus()&&(s=e.path,r=new zn(Vn.OBJECT_NOT_FOUND,"Object '"+s+"' does not exist.")),r.serverResponse=i.serverResponse,r}}function Fi(e,t,n){const i=Object.assign({},n);return i.fullPath=e.path,i.size=t.size(),i.contentType||(i.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),i}class Bi{constructor(e,t,n,i){this.current=e,this.total=t,this.finalized=!!n,this.metadata=i||null}}function Hi(e,t){let n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(e){Li(!1)}return Li(!!n&&-1!==(t||["active"]).indexOf(n)),n}const zi=262144;function Vi(e,t,n,i,r,s,o,a){const c=new Bi(0,0);if(o?(c.current=o.current,c.total=o.total):(c.current=0,c.total=i.size()),i.size()!==c.total)throw new zn(Vn.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");const h=c.total-c.current;let l=h;r>0&&(l=Math.min(l,r));const u=c.current,d=u+l;let p="";p=0===l?"finalize":h===l?"upload, finalize":"upload";const f={"X-Goog-Upload-Command":p,"X-Goog-Upload-Offset":`${c.current}`},g=i.slice(u,d);if(null===g)throw Xn();const m=t.maxUploadRetryTime,y=new Di(n,"POST",function(e,n){const r=Hi(e,["active","final"]),o=c.current+l,a=i.size();let h;return h="final"===r?Ui(t,s)(e,n):null,new Bi(o,a,"final"===r,h)},m);return y.headers=f,y.body=g.uploadData(),y.progressCallback=a||null,y.errorHandler=ji(e),y}const qi="running",Wi="paused",Ki="success",Gi="canceled",Ji="error";function Xi(e){switch(e){case"running":case"pausing":case"canceling":return qi;case"paused":return Wi;case"success":return Ki;case"canceled":return Gi;default:return Ji}}class Yi{constructor(e,t,n){const i=function(e){return"function"==typeof e}(e)||null!=t||null!=n;if(i)this.next=e,this.error=t??void 0,this.complete=n??void 0;else{const t=e;this.next=t.next,this.error=t.error,this.complete=t.complete}}}function Zi(e){return(...t)=>{Promise.resolve().then(()=>e(...t))}}class Qi{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=qn.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=qn.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=qn.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,t,n,i,r){if(this.sent_)throw ei("cannot .send() more than once");if(d(e)&&n&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(const e in r)r.hasOwnProperty(e)&&this.xhr_.setRequestHeader(e,r[e].toString());return void 0!==i?this.xhr_.send(i):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw ei("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw ei("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}}getResponse(){if(!this.sent_)throw ei("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw ei("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class er extends Qi{initXhr(){this.xhr_.responseType="text"}}function tr(){return new er}class nr{isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}constructor(e,t,n=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=e,this._blob=t,this._metadata=n,this._mappings=Ri(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=e=>{if(this._request=void 0,this._chunkMultiplier=1,e._codeEquals(Vn.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{const t=this.isExponentialBackoffExpired();if(hi(e.status,[])){if(!t)return this.sleepTime=Math.max(2*this.sleepTime,1e3),this._needToFetchStatus=!0,void this.completeTransitions_();e=Gn()}this._error=e,this._transition("error")}},this._metadataErrorHandler=e=>{this._request=void 0,e._codeEquals(Vn.CANCELED)?this.completeTransitions_():(this._error=e,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t,this._start()}),this._promise.then(null,()=>{})}_makeProgressCallback(){const e=this._transferred;return t=>this._updateProgress(e+t)}_shouldDoResumable(e){return e.size()>262144}_start(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(e){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([t,n])=>{switch(this._state){case"running":e(t,n);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused")}})}_createResumable(){this._resolveToken((e,t)=>{const n=function(e,t,n,i,r){const s=t.bucketOnlyServerUrl(),o=Fi(t,i,r),a={name:o.fullPath},c=ai(s,e.host,e._protocol),h={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${i.size()}`,"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},l=xi(o,n),u=e.maxUploadRetryTime,d=new Di(c,"POST",function(e){let t;Hi(e);try{t=e.getResponseHeader("X-Goog-Upload-URL")}catch(e){Li(!1)}return Li(ii(t)),t},u);return d.urlParams=a,d.headers=h,d.body=l,d.errorHandler=ji(t),d}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),i=this._ref.storage._makeRequest(n,tr,e,t);this._request=i,i.getPromise().then(e=>{this._request=void 0,this._uploadUrl=e,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){const e=this._uploadUrl;this._resolveToken((t,n)=>{const i=function(e,t,n,i){const r=e.maxUploadRetryTime,s=new Di(n,"POST",function(e){const t=Hi(e,["active","final"]);let n=null;try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(e){Li(!1)}n||Li(!1);const r=Number(n);return Li(!isNaN(r)),new Bi(r,i.size(),"final"===t)},r);return s.headers={"X-Goog-Upload-Command":"query"},s.errorHandler=ji(t),s}(this._ref.storage,this._ref._location,e,this._blob),r=this._ref.storage._makeRequest(i,tr,t,n);this._request=r,r.getPromise().then(e=>{this._request=void 0,this._updateProgress(e.current),this._needToFetchStatus=!1,e.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){const e=zi*this._chunkMultiplier,t=new Bi(this._transferred,this._blob.size()),n=this._uploadUrl;this._resolveToken((i,r)=>{let s;try{s=Vi(this._ref._location,this._ref.storage,n,this._blob,e,this._mappings,t,this._makeProgressCallback())}catch(e){return this._error=e,void this._transition("error")}const o=this._ref.storage._makeRequest(s,tr,i,r,!1);this._request=o,o.getPromise().then(e=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(e.current),e.finalized?(this._metadata=e.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){2*(zi*this._chunkMultiplier)<33554432&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((e,t)=>{const n=function(e,t,n){const i=ai(t.fullServerUrl(),e.host,e._protocol),r=e.maxOperationRetryTime,s=new Di(i,"GET",Ui(e,n),r);return s.errorHandler=$i(t),s}(this._ref.storage,this._ref._location,this._mappings),i=this._ref.storage._makeRequest(n,tr,e,t);this._request=i,i.getPromise().then(e=>{this._request=void 0,this._metadata=e,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((e,t)=>{const n=function(e,t,n,i,r){const s=t.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"},a=function(){let e="";for(let t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();o["Content-Type"]="multipart/related; boundary="+a;const c=Fi(t,i,r),h="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+xi(c,n)+"\r\n--"+a+"\r\nContent-Type: "+c.contentType+"\r\n\r\n",l="\r\n--"+a+"--",u=Ii.getBlob(h,i,l);if(null===u)throw Xn();const d={name:c.fullPath},p=ai(s,e.host,e._protocol),f=e.maxUploadRetryTime,g=new Di(p,"POST",Ui(e,n),f);return g.urlParams=d,g.headers=o,g.body=u.uploadData(),g.errorHandler=ji(t),g}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),i=this._ref.storage._makeRequest(n,tr,e,t);this._request=i,i.getPromise().then(e=>{this._request=void 0,this._metadata=e,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(e){const t=this._transferred;this._transferred=e,this._transferred!==t&&this._notifyObservers()}_transition(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,void 0!==this._request?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":const t="paused"===this._state;this._state=e,t&&(this._notifyObservers(),this._start());break;case"paused":case"error":case"success":this._state=e,this._notifyObservers();break;case"canceled":this._error=Jn(),this._state=e,this._notifyObservers()}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}}get snapshot(){const e=Xi(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}on(e,t,n,i){const r=new Yi(t||void 0,n||void 0,i||void 0);return this._addObserver(r),()=>{this._removeObserver(r)}}then(e,t){return this._promise.then(e,t)}catch(e){return this.then(null,e)}_addObserver(e){this._observers.push(e),this._notifyObserver(e)}_removeObserver(e){const t=this._observers.indexOf(e);-1!==t&&this._observers.splice(t,1)}_notifyObservers(){this._finishPromise();this._observers.slice().forEach(e=>{this._notifyObserver(e)})}_finishPromise(){if(void 0!==this._resolve){let e=!0;switch(Xi(this._state)){case Ki:Zi(this._resolve.bind(null,this.snapshot))();break;case Gi:case Ji:Zi(this._reject.bind(null,this._error))();break;default:e=!1}e&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(e){switch(Xi(this._state)){case qi:case Wi:e.next&&Zi(e.next.bind(e,this.snapshot))();break;case Ki:e.complete&&Zi(e.complete.bind(e))();break;default:e.error&&Zi(e.error.bind(e,this._error))()}}resume(){const e="paused"===this._state||"pausing"===this._state;return e&&this._transition("running"),e}pause(){const e="running"===this._state;return e&&this._transition("pausing"),e}cancel(){const e="running"===this._state||"pausing"===this._state;return e&&this._transition("canceling"),e}}class ir{constructor(e,t){this._service=e,this._location=t instanceof ti?t:ti.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new ir(e,t)}get root(){const e=new ti(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return ki(this._location.path)}get storage(){return this._service}get parent(){const e=function(e){if(0===e.length)return null;const t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;const t=new ti(this._location.bucket,e);return new ir(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw function(e){return new zn(Vn.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)}}function rr(e,t){e._throwIfRoot("updateMetadata");const n=function(e,t,n,i){const r=ai(t.fullServerUrl(),e.host,e._protocol),s=xi(n,i),o=e.maxOperationRetryTime,a=new Di(r,"PATCH",Ui(e,i),o);return a.headers={"Content-Type":"application/json; charset=utf-8"},a.body=s,a.errorHandler=$i(t),a}(e.storage,e._location,t,Ri());return e.storage.makeRequestWithTokens(n,tr)}function sr(e){e._throwIfRoot("getDownloadURL");const t=function(e,t,n){const i=ai(t.fullServerUrl(),e.host,e._protocol),r=e.maxOperationRetryTime,s=new Di(i,"GET",Mi(e,n),r);return s.errorHandler=$i(t),s}(e.storage,e._location,Ri());return e.storage.makeRequestWithTokens(t,tr).then(e=>{if(null===e)throw new zn(Vn.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e})}function or(e,t){if(e instanceof hr){const n=e;if(null==n._bucket)throw new zn(Vn.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+Hn+"' property when initializing the app?");const i=new ir(n,n._bucket);return null!=t?or(i,t):i}return void 0!==t?function(e,t){const n=function(e,t){const n=t.split("/").filter(e=>e.length>0).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),i=new ti(e._location.bucket,n);return new ir(e.storage,i)}(e,t):e}function ar(e,t){if(t&&/^[A-Za-z]+:\/\//.test(t)){if(e instanceof hr)return new ir(e,t);throw Yn("To use ref(service, url), the first argument must be a Storage instance.")}return or(e,t)}function cr(e,t){const n=t?.[Hn];return null==n?null:ti.makeFromBucketSpec(n,e)}class hr{constructor(e,t,n,i,r,s=!1){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=i,this._firebaseVersion=r,this._isUsingEmulator=s,this._bucket=null,this._host=Bn,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=i?ti.makeFromBucketSpec(i,this._host):cr(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=ti.makeFromBucketSpec(this._url,e):this._bucket=cr(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){oi("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){oi("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){if(Ke(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const e=this._appCheckProvider.getImmediate({optional:!0});if(e){return(await e.getToken()).token}return null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new ir(this,e)}_makeRequest(e,t,n,i,r=!0){if(this._deleted)return new ni(Zn());{const s=function(e,t,n,i,r,s,o=!0,a=!1){const c=ci(e.urlParams),h=e.url+c,l=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(l,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(l,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(t??"AppManager")}(l,s),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(l,i),new li(h,e.method,l,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,r,o,a)}(e,this._appId,n,i,t,this._firebaseVersion,r,this._isUsingEmulator);return this._requests.add(s),s.getPromise().then(()=>this._requests.delete(s),()=>this._requests.delete(s)),s}}async makeRequestWithTokens(e,t){const[n,i]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,n,i).getPromise()}}const lr="@firebase/storage",ur="0.14.0",dr="storage";function pr(e,t,n){return function(e,t,n){return e._throwIfRoot("uploadBytesResumable"),new nr(e,new Ii(t),n)}(e=D(e),t,n)}function fr(e,{instanceIdentifier:t}){const n=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),r=e.getProvider("app-check-internal");return new hr(n,i,r,t,Xe)}function gr(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}qe(new L(dr,fr,"PUBLIC").setMultipleInstances(!0)),Qe(lr,ur,""),Qe(lr,ur,"esm2020");const mr=gr,yr=new I("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),_r=new V("@firebase/auth");function wr(e,...t){_r.logLevel<=$.ERROR&&_r.error(`Auth (${Xe}): ${e}`,...t)}function vr(e,...t){throw Ir(e,...t)}function br(e,...t){return Ir(e,...t)}function Tr(e,t,n){const i={...mr(),[t]:n};return new I("auth","Firebase",i).create(t,{appName:e.name})}function Er(e){return Tr(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Ir(e,...t){if("string"!=typeof e){const n=t[0],i=[...t.slice(1)];return i[0]&&(i[0].appName=e.name),e._errorFactory.create(n,...i)}return yr.create(e,...t)}function Sr(e,t,...n){if(!e)throw Ir(t,...n)}function kr(e){const t="INTERNAL ASSERTION FAILED: "+e;throw wr(t),new Error(t)}function Ar(e,t){e||kr(t)}function Cr(){return"undefined"!=typeof self&&self.location?.href||""}function Pr(){return"undefined"!=typeof self&&self.location?.protocol||null}function Rr(){return"undefined"==typeof navigator||!navigator||!("onLine"in navigator)||"boolean"!=typeof navigator.onLine||"http:"!==Pr()&&"https:"!==Pr()&&!w()&&!("connection"in navigator)||navigator.onLine}class Or{constructor(e,t){this.shortDelay=e,this.longDelay=t,Ar(t>e,"Short delay should be less than long delay!"),this.isMobile="undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(_())||"object"==typeof navigator&&"ReactNative"===navigator.product}get(){return Rr()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function Nr(e,t){Ar(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class xr{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:"undefined"!=typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!=typeof fetch?fetch:void kr("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:"undefined"!=typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!=typeof Headers?Headers:void kr("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:"undefined"!=typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!=typeof Response?Response:void kr("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const Dr={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},Lr=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],Ur=new Or(3e4,6e4);function Mr(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function jr(e,t,n,i,r={}){return $r(e,r,async()=>{let r={},s={};i&&("GET"===t?s=i:r={body:JSON.stringify(i)});const o=C({key:e.config.apiKey,...s}).slice(1),a=await e._getAdditionalHeaders();a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode);const c={method:t,headers:a,...r};return"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||(c.referrerPolicy="no-referrer"),e.emulatorConfig&&d(e.emulatorConfig.host)&&(c.credentials="include"),xr.fetch()(await Br(e,e.config.apiHost,n,o),c)})}async function $r(e,t,n){e._canInitEmulator=!1;const i={...Dr,...t};try{const t=new zr(e),r=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const s=await r.json();if("needConfirmation"in s)throw Vr(e,"account-exists-with-different-credential",s);if(r.ok&&!("errorMessage"in s))return s;{const t=r.ok?s.errorMessage:s.error.message,[n,o]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw Vr(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===n)throw Vr(e,"email-already-in-use",s);if("USER_DISABLED"===n)throw Vr(e,"user-disabled",s);const a=i[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(o)throw Tr(e,a,o);vr(e,a)}}catch(t){if(t instanceof E)throw t;vr(e,"network-request-failed",{message:String(t)})}}async function Fr(e,t,n,i,r={}){const s=await jr(e,t,n,i,r);return"mfaPendingCredential"in s&&vr(e,"multi-factor-auth-required",{_serverResponse:s}),s}async function Br(e,t,n,i){const r=`${t}${n}?${i}`,s=e,o=s.config.emulator?Nr(e.config,r):`${e.config.apiScheme}://${r}`;if(Lr.includes(n)&&(await s._persistenceManagerAvailable,"COOKIE"===s._getPersistenceType())){return s._getPersistence()._getFinalTarget(o).toString()}return o}function Hr(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class zr{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(br(this.auth,"network-request-failed")),Ur.get())})}}function Vr(e,t,n){const i={appName:e.name};n.email&&(i.email=n.email),n.phoneNumber&&(i.phoneNumber=n.phoneNumber);const r=br(e,t,i);return r.customData._tokenResponse=n,r}function qr(e){return void 0!==e&&void 0!==e.enterprise}class Wr{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(const t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return Hr(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function Kr(e,t){return jr(e,"POST","/v1/accounts:lookup",t)}function Gr(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}function Jr(e){return 1e3*Number(e)}function Xr(e){const[t,n,i]=e.split(".");if(void 0===t||void 0===n||void 0===i)return wr("JWT malformed, contained fewer than 3 sections"),null;try{const e=r(n);return e?JSON.parse(e):(wr("Failed to decode base64 JWT payload"),null)}catch(e){return wr("Caught error parsing JWT payload as JSON",e?.toString()),null}}function Yr(e){const t=Xr(e);return Sr(t,"internal-error"),Sr(void 0!==t.exp,"internal-error"),Sr(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function Zr(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof E&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class Qr{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){return void("auth/network-request-failed"===e?.code&&this.schedule(!0))}this.schedule()}}class es{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=Gr(this.lastLoginAt),this.creationTime=Gr(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function ts(e){const t=e.auth,n=await e.getIdToken(),i=await Zr(e,Kr(t,{idToken:n}));Sr(i?.users.length,t,"internal-error");const r=i.users[0];e._notifyReloadListener(r);const s=r.providerUserInfo?.length?ns(r.providerUserInfo):[],o=function(e,t){const n=e.filter(e=>!t.some(t=>t.providerId===e.providerId));return[...n,...t]}(e.providerData,s),a=e.isAnonymous,c=!(e.email&&r.passwordHash||o?.length),h=!!a&&c,l={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:o,metadata:new es(r.createdAt,r.lastLoginAt),isAnonymous:h};Object.assign(e,l)}function ns(e){return e.map(({providerId:e,...t})=>({providerId:e,uid:t.rawId||"",displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}class is{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Sr(e.idToken,"internal-error"),Sr(void 0!==e.idToken,"internal-error"),Sr(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):Yr(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){Sr(0!==e.length,"internal-error");const t=Yr(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(Sr(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null):this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:i,expiresIn:r}=await async function(e,t){const n=await $r(e,{},async()=>{const n=C({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:r}=e.config,s=await Br(e,i,"/v1/token",`key=${r}`),o=await e._getAdditionalHeaders();o["Content-Type"]="application/x-www-form-urlencoded";const a={method:"POST",headers:o,body:n};return e.emulatorConfig&&d(e.emulatorConfig.host)&&(a.credentials="include"),xr.fetch()(s,a)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,i,Number(r))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:i,expirationTime:r}=t,s=new is;return n&&(Sr("string"==typeof n,"internal-error",{appName:e}),s.refreshToken=n),i&&(Sr("string"==typeof i,"internal-error",{appName:e}),s.accessToken=i),r&&(Sr("number"==typeof r,"internal-error",{appName:e}),s.expirationTime=r),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new is,this.toJSON())}_performRefresh(){return kr("not implemented")}}function rs(e,t){Sr("string"==typeof e||void 0===e,"internal-error",{appName:t})}class ss{constructor({uid:e,auth:t,stsTokenManager:n,...i}){this.providerId="firebase",this.proactiveRefresh=new Qr(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,this.stsTokenManager=n,this.accessToken=n.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new es(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await Zr(this,this.stsTokenManager.getToken(this.auth,e));return Sr(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e,t=!1){const n=D(e),i=await n.getIdToken(t),r=Xr(i);Sr(r&&r.exp&&r.auth_time&&r.iat,n.auth,"internal-error");const s="object"==typeof r.firebase?r.firebase:void 0,o=s?.sign_in_provider;return{claims:r,token:i,authTime:Gr(Jr(r.auth_time)),issuedAtTime:Gr(Jr(r.iat)),expirationTime:Gr(Jr(r.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}}(this,e)}reload(){return async function(e){const t=D(e);await ts(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(Sr(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>({...e})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new ss({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return t.metadata._copy(this.metadata),t}_onReload(e){Sr(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await ts(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Ke(this.auth.app))return Promise.reject(Er(this.auth));const e=await this.getIdToken();return await Zr(this,async function(e,t){return jr(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...e})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){const n=t.displayName??void 0,i=t.email??void 0,r=t.phoneNumber??void 0,s=t.photoURL??void 0,o=t.tenantId??void 0,a=t._redirectEventId??void 0,c=t.createdAt??void 0,h=t.lastLoginAt??void 0,{uid:l,emailVerified:u,isAnonymous:d,providerData:p,stsTokenManager:f}=t;Sr(l&&f,e,"internal-error");const g=is.fromJSON(this.name,f);Sr("string"==typeof l,e,"internal-error"),rs(n,e.name),rs(i,e.name),Sr("boolean"==typeof u,e,"internal-error"),Sr("boolean"==typeof d,e,"internal-error"),rs(r,e.name),rs(s,e.name),rs(o,e.name),rs(a,e.name),rs(c,e.name),rs(h,e.name);const m=new ss({uid:l,auth:e,email:i,emailVerified:u,displayName:n,isAnonymous:d,photoURL:s,phoneNumber:r,tenantId:o,stsTokenManager:g,createdAt:c,lastLoginAt:h});return p&&Array.isArray(p)&&(m.providerData=p.map(e=>({...e}))),a&&(m._redirectEventId=a),m}static async _fromIdTokenResponse(e,t,n=!1){const i=new is;i.updateFromServerResponse(t);const r=new ss({uid:t.localId,auth:e,stsTokenManager:i,isAnonymous:n});return await ts(r),r}static async _fromGetAccountInfoResponse(e,t,n){const i=t.users[0];Sr(void 0!==i.localId,"internal-error");const r=void 0!==i.providerUserInfo?ns(i.providerUserInfo):[],s=!(i.email&&i.passwordHash||r?.length),o=new is;o.updateFromIdToken(n);const a=new ss({uid:i.localId,auth:e,stsTokenManager:o,isAnonymous:s}),c={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:r,metadata:new es(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash||r?.length)};return Object.assign(a,c),a}}const os=new Map;function as(e){Ar(e instanceof Function,"Expected a class definition");let t=os.get(e);return t?(Ar(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,os.set(e,t),t)}class cs{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}cs.type="NONE";const hs=cs;function ls(e,t,n){return`firebase:${e}:${t}:${n}`}class us{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:i,name:r}=this.auth;this.fullUserKey=ls(this.userKey,i.apiKey,r),this.fullPersistenceKey=ls("persistence",i.apiKey,r),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);if(!e)return null;if("string"==typeof e){const t=await Kr(this.auth,{idToken:e}).catch(()=>{});return t?ss._fromGetAccountInfoResponse(this.auth,t,e):null}return ss._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new us(as(hs),e,n);const i=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e);let r=i[0]||as(hs);const s=ls(n,e.config.apiKey,e.name);let o=null;for(const n of t)try{const t=await n._get(s);if(t){let i;if("string"==typeof t){const n=await Kr(e,{idToken:t}).catch(()=>{});if(!n)break;i=await ss._fromGetAccountInfoResponse(e,n,t)}else i=ss._fromJSON(e,t);n!==r&&(o=i),r=n;break}}catch{}const a=i.filter(e=>e._shouldAllowMigration);return r._shouldAllowMigration&&a.length?(r=a[0],o&&await r._set(s,o.toJSON()),await Promise.all(t.map(async e=>{if(e!==r)try{await e._remove(s)}catch{}})),new us(r,e,n)):new us(r,e,n)}}function ds(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ms(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(ps(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(_s(t))return"Blackberry";if(ws(t))return"Webos";if(fs(t))return"Safari";if((t.includes("chrome/")||gs(t))&&!t.includes("edge/"))return"Chrome";if(ys(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===n?.length)return n[1]}return"Other"}function ps(e=_()){return/firefox\//i.test(e)}function fs(e=_()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function gs(e=_()){return/crios\//i.test(e)}function ms(e=_()){return/iemobile/i.test(e)}function ys(e=_()){return/android/i.test(e)}function _s(e=_()){return/blackberry/i.test(e)}function ws(e=_()){return/webos/i.test(e)}function vs(e=_()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function bs(){return function(){const e=_();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function Ts(e=_()){return vs(e)||ys(e)||ws(e)||_s(e)||/windows phone/i.test(e)||ms(e)}function Es(e,t=[]){let n;switch(e){case"Browser":n=ds(_());break;case"Worker":n=`${ds(_())}-${e}`;break;default:n=e}const i=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${Xe}/${i}`}class Is{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise((n,i)=>{try{n(e(t))}catch(e){i(e)}});n.onAbort=t,this.queue.push(n);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){t.reverse();for(const e of t)try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:e?.message})}}}class Ss{constructor(e){const t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??6,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),void 0!==t.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),void 0!==t.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),void 0!==t.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),void 0!==t.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){const t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&(t.isValid=t.meetsMinPasswordLength??!0),t.isValid&&(t.isValid=t.meetsMaxPasswordLength??!0),t.isValid&&(t.isValid=t.containsLowercaseLetter??!0),t.isValid&&(t.isValid=t.containsUppercaseLetter??!0),t.isValid&&(t.isValid=t.containsNumericCharacter??!0),t.isValid&&(t.isValid=t.containsNonAlphanumericCharacter??!0),t}validatePasswordLengthOptions(e,t){const n=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),i&&(t.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,t){let n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let i=0;i<e.length;i++)n=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(t,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,i,r){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=r))}}class ks{constructor(e,t,n,i){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Cs(this),this.idTokenSubscription=new Cs(this),this.beforeStateQueue=new Is(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=yr,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(e=>this._resolvePersistenceManagerAvailable=e)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=as(t)),this._initializationPromise=this.queue(async()=>{if(!this._deleted&&(this.persistenceManager=await us.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=this.currentUser?.uid||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void await this.currentUser.getIdToken()):void await this._updateCurrentUser(e,!0):void 0}async initializeCurrentUserFromIdToken(e){try{const t=await Kr(this,{idToken:e}),n=await ss._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(e){await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(Ke(this.app)){const e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}const t=await this.assertedPersistence.getCurrentUser();let n=t,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const t=this.redirectUser?._redirectEventId,r=n?._redirectEventId,s=await this.tryRedirectSignIn(e);t&&t!==r||!s?.user||(n=s.user,i=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(n)}catch(e){n=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return Sr(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await ts(e)}catch(e){if("auth/network-request-failed"!==e?.code)return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(Ke(this.app))return Promise.reject(Er(this));const t=e?D(e):null;return t&&Sr(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&Sr(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return Ke(this.app)?Promise.reject(Er(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return Ke(this.app)?Promise.reject(Er(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(as(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e,t={}){return jr(e,"GET","/v2/passwordPolicy",Mr(e,t))}(this),t=new Ss(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new I("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{const n=this.onAuthStateChanged(()=>{n(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){const t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await async function(e,t){return jr(e,"POST","/v2/accounts:revokeToken",Mr(e,t))}(this,t)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&as(e)||this._popupRedirectResolver;Sr(t,this,"argument-error"),this.redirectPersistenceManager=await us.create(this,[as(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){return this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===e?this._currentUser:this.redirectUser?._redirectEventId===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,i){if(this._deleted)return()=>{};const r="function"==typeof t?t:t.next.bind(t);let s=!1;const o=this._isInitialized?Promise.resolve():this._initializationPromise;if(Sr(o,this,"internal-error"),o.then(()=>{s||r(this.currentUser)}),"function"==typeof t){const r=e.addObserver(t,n,i);return()=>{s=!0,r()}}{const n=e.addObserver(t);return()=>{s=!0,n()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Sr(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Es(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){const e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);const t=await(this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader());t&&(e["X-Firebase-Client"]=t);const n=await this._getAppCheckToken();return n&&(e["X-Firebase-AppCheck"]=n),e}async _getAppCheckToken(){if(Ke(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const e=await(this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken());return e?.error&&function(e,...t){_r.logLevel<=$.WARN&&_r.warn(`Auth (${Xe}): ${e}`,...t)}(`Error while retrieving App Check token: ${e.error}`),e?.token}}function As(e){return D(e)}class Cs{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const n=new O(e,t);return n.subscribe.bind(n)}(e=>this.observer=e)}get next(){return Sr(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let Ps={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Rs(e){return Ps.loadJS(e)}class Os{constructor(){this.enterprise=new Ns}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class Ns{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}const xs="NO_RECAPTCHA";class Ds{constructor(e){this.type="recaptcha-enterprise",this.auth=As(e)}async verify(e="verify",t=!1){async function n(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,n)=>{(async function(e,t){return jr(e,"GET","/v2/recaptchaConfig",Mr(e,t))})(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(i=>{if(void 0!==i.recaptchaKey){const n=new Wr(i);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}n(new Error("recaptcha Enterprise site key undefined"))}).catch(e=>{n(e)})})}function i(t,n,i){const r=window.grecaptcha;qr(r)?r.enterprise.ready(()=>{r.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n(xs)})}):i(Error("No reCAPTCHA enterprise script loaded."))}if(this.auth.settings.appVerificationDisabledForTesting){return(new Os).execute("siteKey",{action:"verify"})}return new Promise((e,r)=>{n(this.auth).then(n=>{if(!t&&qr(window.grecaptcha))i(n,e,r);else{if("undefined"==typeof window)return void r(new Error("RecaptchaVerifier is only supported in browser"));let t=Ps.recaptchaEnterpriseScript;0!==t.length&&(t+=n),Rs(t).then(()=>{i(n,e,r)}).catch(e=>{r(e)})}}).catch(e=>{r(e)})})}}async function Ls(e,t,n,i=!1,r=!1){const s=new Ds(e);let o;if(r)o=xs;else try{o=await s.verify(n)}catch(e){o=await s.verify(n,!0)}const a={...t};if("mfaSmsEnrollment"===n||"mfaSmsSignIn"===n){if("phoneEnrollmentInfo"in a){const e=a.phoneEnrollmentInfo.phoneNumber,t=a.phoneEnrollmentInfo.recaptchaToken;Object.assign(a,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in a){const e=a.phoneSignInInfo.recaptchaToken;Object.assign(a,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return a}return i?Object.assign(a,{captchaResp:o}):Object.assign(a,{captchaResponse:o}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function Us(e,t,n,i,r){if(e._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const r=await Ls(e,t,n,"getOobCode"===n);return i(e,r)}return i(e,t).catch(async r=>{if("auth/missing-recaptcha-token"===r.code){const r=await Ls(e,t,n,"getOobCode"===n);return i(e,r)}return Promise.reject(r)})}function Ms(e,t,n){const i=As(e);Sr(/^https?:\/\//.test(t),i,"invalid-emulator-scheme");const r=js(t),{host:s,port:o}=function(e){const t=js(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const i=n[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(i);if(r){const e=r[1];return{host:e,port:$s(i.substr(e.length+1))}}{const[e,t]=i.split(":");return{host:e,port:$s(t)}}}(t),a=null===o?"":`:${o}`,c={url:`${r}//${s}${a}/`},h=Object.freeze({host:s,port:o,protocol:r.replace(":",""),options:Object.freeze({disableWarnings:!1})});if(!i._canInitEmulator)return Sr(i.config.emulator&&i.emulatorConfig,i,"emulator-config-failed"),void Sr(k(c,i.config.emulator)&&k(h,i.emulatorConfig),i,"emulator-config-failed");i.config.emulator=c,i.emulatorConfig=h,i.settings.appVerificationDisabledForTesting=!0,d(s)?(p(`${r}//${s}${a}`),y("Auth",!0)):function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&console.info;"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function js(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function $s(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class Fs{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return kr("not implemented")}_getIdTokenResponse(e){return kr("not implemented")}_linkToIdToken(e,t){return kr("not implemented")}_getReauthenticationResolver(e){return kr("not implemented")}}async function Bs(e,t){return jr(e,"POST","/v1/accounts:signUp",t)}async function Hs(e,t){return Fr(e,"POST","/v1/accounts:signInWithPassword",Mr(e,t))}async function zs(e,t){return async function(e,t){return jr(e,"POST","/v1/accounts:sendOobCode",Mr(e,t))}(e,t)}class Vs extends Fs{constructor(e,t,n,i=null){super("password",n),this._email=e,this._password=t,this._tenantId=i}static _fromEmailAndPassword(e,t){return new Vs(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new Vs(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e;if(t?.email&&t?.password){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return Us(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",Hs);case"emailLink":return async function(e,t){return Fr(e,"POST","/v1/accounts:signInWithEmailLink",Mr(e,t))}(e,{email:this._email,oobCode:this._password});default:vr(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return Us(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",Bs);case"emailLink":return async function(e,t){return Fr(e,"POST","/v1/accounts:signInWithEmailLink",Mr(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:vr(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function qs(e,t){return Fr(e,"POST","/v1/accounts:signInWithIdp",Mr(e,t))}class Ws extends Fs{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Ws(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):vr("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:i,...r}=t;if(!n||!i)return null;const s=new Ws(n,i);return s.idToken=r.idToken||void 0,s.accessToken=r.accessToken||void 0,s.secret=r.secret,s.nonce=r.nonce,s.pendingToken=r.pendingToken||null,s}_getIdTokenResponse(e){return qs(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,qs(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,qs(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=C(t)}return e}}class Ks{constructor(e){const t=P(R(e)),n=t.apiKey??null,i=t.oobCode??null,r=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(t.mode??null);Sr(n&&i&&r,"argument-error"),this.apiKey=n,this.operation=r,this.code=i,this.continueUrl=t.continueUrl??null,this.languageCode=t.lang??null,this.tenantId=t.tenantId??null}static parseLink(e){const t=function(e){const t=P(R(e)).link,n=t?P(R(t)).deep_link_id:null,i=P(R(e)).deep_link_id;return(i?P(R(i)).link:null)||i||n||t||e}(e);try{return new Ks(t)}catch{return null}}}class Gs{constructor(){this.providerId=Gs.PROVIDER_ID}static credential(e,t){return Vs._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=Ks.parseLink(t);return Sr(n,"argument-error"),Vs._fromEmailAndCode(e,n.code,n.tenantId)}}Gs.PROVIDER_ID="password",Gs.EMAIL_PASSWORD_SIGN_IN_METHOD="password",Gs.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class Js{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class Xs extends Js{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class Ys extends Xs{constructor(){super("facebook.com")}static credential(e){return Ws._fromParams({providerId:Ys.PROVIDER_ID,signInMethod:Ys.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Ys.credentialFromTaggedObject(e)}static credentialFromError(e){return Ys.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Ys.credential(e.oauthAccessToken)}catch{return null}}}Ys.FACEBOOK_SIGN_IN_METHOD="facebook.com",Ys.PROVIDER_ID="facebook.com";class Zs extends Xs{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Ws._fromParams({providerId:Zs.PROVIDER_ID,signInMethod:Zs.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Zs.credentialFromTaggedObject(e)}static credentialFromError(e){return Zs.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return Zs.credential(t,n)}catch{return null}}}Zs.GOOGLE_SIGN_IN_METHOD="google.com",Zs.PROVIDER_ID="google.com";class Qs extends Xs{constructor(){super("github.com")}static credential(e){return Ws._fromParams({providerId:Qs.PROVIDER_ID,signInMethod:Qs.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Qs.credentialFromTaggedObject(e)}static credentialFromError(e){return Qs.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Qs.credential(e.oauthAccessToken)}catch{return null}}}Qs.GITHUB_SIGN_IN_METHOD="github.com",Qs.PROVIDER_ID="github.com";class eo extends Xs{constructor(){super("twitter.com")}static credential(e,t){return Ws._fromParams({providerId:eo.PROVIDER_ID,signInMethod:eo.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return eo.credentialFromTaggedObject(e)}static credentialFromError(e){return eo.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return eo.credential(t,n)}catch{return null}}}async function to(e,t){return Fr(e,"POST","/v1/accounts:signUp",Mr(e,t))}eo.TWITTER_SIGN_IN_METHOD="twitter.com",eo.PROVIDER_ID="twitter.com";class no{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,i=!1){const r=await ss._fromIdTokenResponse(e,n,i),s=io(n);return new no({user:r,providerId:s,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const i=io(n);return new no({user:e,providerId:i,_tokenResponse:n,operationType:t})}}function io(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class ro extends E{constructor(e,t,n,i){super(t.code,t.message),this.operationType=n,this.user=i,Object.setPrototypeOf(this,ro.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,i){return new ro(e,t,n,i)}}function so(e,t,n,i){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{if("auth/multi-factor-auth-required"===n.code)throw ro._fromErrorAndOperation(e,n,t,i);throw n})}async function oo(e,t,n=!1){if(Ke(e.app))return Promise.reject(Er(e));const i="signIn",r=await so(e,i,t),s=await no._fromIdTokenResponse(e,i,r);return n||await e._updateCurrentUser(s.user),s}async function ao(e,t,n){if(Ke(e.app))return Promise.reject(Er(e));const i=As(e),r=Us(i,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",to),s=await r.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&async function(e){const t=As(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}(e),t}),o=await no._fromIdTokenResponse(i,"signIn",s);return await i._updateCurrentUser(o.user),o}async function co(e,t){const n=D(e),i={requestType:"VERIFY_EMAIL",idToken:await e.getIdToken()},{email:r}=await zs(n.auth,i);r!==e.email&&await e.reload()}async function ho(e,{displayName:t,photoURL:n}){if(void 0===t&&void 0===n)return;const i=D(e),r={idToken:await i.getIdToken(),displayName:t,photoUrl:n,returnSecureToken:!0},s=await Zr(i,async function(e,t){return jr(e,"POST","/v1/accounts:update",t)}(i.auth,r));i.displayName=s.displayName||null,i.photoURL=s.photoUrl||null;const o=i.providerData.find(({providerId:e})=>"password"===e);o&&(o.displayName=i.displayName,o.photoURL=i.photoURL),await i._updateTokensIfNecessary(s)}async function lo(e,t,n){const{auth:i}=e,r={idToken:await e.getIdToken(),returnSecureToken:!0};t&&(r.email=t),n&&(r.password=n);const s=await Zr(e,async function(e,t){return jr(e,"POST","/v1/accounts:update",t)}(i,r));await e._updateTokensIfNecessary(s,!0)}const uo="__sak";class po{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(uo,"1"),this.storage.removeItem(uo),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class fo extends po{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Ts(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),i=this.localCache[t];n!==i&&e(t,i,n)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});const n=e.key;t?this.detachListener():this.stopPolling();const i=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},r=this.storage.getItem(n);bs()&&r!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,10):i()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const e of Array.from(n))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}fo.type="LOCAL";const go=fo;class mo extends po{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}mo.type="SESSION";const yo=mo;class _o{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;const n=new _o(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:i,data:r}=t.data,s=this.handlersMap[i];if(!s?.size)return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:i});const o=Array.from(s).map(async e=>e(t.origin,r)),a=await function(e){return Promise.all(e.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(e){return{fulfilled:!1,reason:e}}}))}(o);t.ports[0].postMessage({status:"done",eventId:n,eventType:i,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function wo(e="",t=10){let n="";for(let e=0;e<t;e++)n+=Math.floor(10*Math.random());return e+n}_o.receivers=[];class vo{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){const i="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let r,s;return new Promise((o,a)=>{const c=wo("",20);i.port1.start();const h=setTimeout(()=>{a(new Error("unsupported_event"))},n);s={messageChannel:i,onMessage(e){const t=e;if(t.data.eventId===c)switch(t.data.status){case"ack":clearTimeout(h),r=setTimeout(()=>{a(new Error("timeout"))},3e3);break;case"done":clearTimeout(r),o(t.data.response);break;default:clearTimeout(h),clearTimeout(r),a(new Error("invalid_response"))}}},this.handlers.add(s),i.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[i.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})}}function bo(){return window}function To(){return void 0!==bo().WorkerGlobalScope&&"function"==typeof bo().importScripts}const Eo="firebaseLocalStorageDb",Io="firebaseLocalStorage",So="fbase_key";class ko{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function Ao(e,t){return e.transaction([Io],t?"readwrite":"readonly").objectStore(Io)}function Co(){const e=indexedDB.open(Eo,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const t=e.result;try{t.createObjectStore(Io,{keyPath:So})}catch(e){n(e)}}),e.addEventListener("success",async()=>{const n=e.result;n.objectStoreNames.contains(Io)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(Eo);return new ko(e).toPromise()}(),t(await Co()))})})}async function Po(e,t,n){const i=Ao(e,!0).put({[So]:t,value:n});return new ko(i).toPromise()}function Ro(e,t){const n=Ao(e,!0).delete(t);return new ko(n).toPromise()}class Oo{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await Co()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return To()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=_o._getInstance(To()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){if(this.activeServiceWorker=await async function(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}(),!this.activeServiceWorker)return;this.sender=new vo(this.activeServiceWorker);const e=await this.sender._send("ping",{},800);e&&e[0]?.fulfilled&&e[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&(navigator?.serviceWorker?.controller||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Co();return await Po(e,uo,"1"),await Ro(e,uo),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>Po(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){const t=await this._withRetries(t=>async function(e,t){const n=Ao(e,!1).get(t),i=await new ko(n).toPromise();return void 0===i?null:i.value}(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>Ro(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(e=>{const t=Ao(e,!1).getAll();return new ko(t).toPromise()});if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;if(0!==e.length)for(const{fbase_key:i,value:r}of e)n.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(r)&&(this.notifyListeners(i,r),t.push(i));for(const e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}Oo.type="LOCAL";const No=Oo;new Or(3e4,6e4);class xo extends Fs{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return qs(e,this._buildIdpRequest())}_linkToIdToken(e,t){return qs(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return qs(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function Do(e){return oo(e.auth,new xo(e),e.bypassAuthState)}function Lo(e){const{auth:t,user:n}=e;return Sr(n,t,"internal-error"),async function(e,t,n=!1){const{auth:i}=e;if(Ke(i.app))return Promise.reject(Er(i));const r="reauthenticate";try{const s=await Zr(e,so(i,r,t,e),n);Sr(s.idToken,i,"internal-error");const o=Xr(s.idToken);Sr(o,i,"internal-error");const{sub:a}=o;return Sr(e.uid===a,i,"user-mismatch"),no._forOperation(e,r,s)}catch(e){throw"auth/user-not-found"===e?.code&&vr(i,"user-mismatch"),e}}(n,new xo(e),e.bypassAuthState)}async function Uo(e){const{auth:t,user:n}=e;return Sr(n,t,"internal-error"),async function(e,t,n=!1){const i=await Zr(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return no._forOperation(e,"link",i)}(n,new xo(e),e.bypassAuthState)}class Mo{constructor(e,t,n,i,r=!1){this.auth=e,this.resolver=n,this.user=i,this.bypassAuthState=r,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:i,tenantId:r,error:s,type:o}=e;if(s)return void this.reject(s);const a={auth:this.auth,requestUri:t,sessionId:n,tenantId:r||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(o)(a))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Do;case"linkViaPopup":case"linkViaRedirect":return Uo;case"reauthViaPopup":case"reauthViaRedirect":return Lo;default:vr(this.auth,"internal-error")}}resolve(e){Ar(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Ar(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const jo=new Or(2e3,1e4);class $o extends Mo{constructor(e,t,n,i,r){super(e,t,i,r),this.provider=n,this.authWindow=null,this.pollId=null,$o.currentPopupAction&&$o.currentPopupAction.cancel(),$o.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Sr(e,this.auth,"internal-error"),e}async onExecution(){Ar(1===this.filter.length,"Popup operations only handle one event");const e=wo();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(br(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(br(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,$o.currentPopupAction=null}pollUserCancellation(){const e=()=>{this.authWindow?.window?.closed?this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(br(this.auth,"popup-closed-by-user"))},8e3):this.pollId=window.setTimeout(e,jo.get())};e()}}$o.currentPopupAction=null;const Fo="pendingRedirect",Bo=new Map;class Ho extends Mo{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=Bo.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=function(e){return ls(Fo,e.config.apiKey,e.name)}(t),i=function(e){return as(e._redirectPersistence)}(e);if(!await i._isAvailable())return!1;const r="true"===await i._get(n);return await i._remove(n),r}(this.resolver,this.auth),n=t?await super.execute():null;e=()=>Promise.resolve(n)}catch(t){e=()=>Promise.reject(t)}Bo.set(this.auth._key(),e)}return this.bypassAuthState||Bo.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function zo(e,t){Bo.set(e._key(),t)}async function Vo(e,t,n=!1){if(Ke(e.app))return Promise.reject(Er(e));const i=As(e),r=function(e,t){return t?as(t):(Sr(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}(i,t),s=new Ho(i,r,n),o=await s.execute();return o&&!n&&(delete o.user._redirectEventId,await i._persistUserIfCurrent(o.user),await i._setRedirectUser(null,t)),o}class qo{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Ko(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){if(e.error&&!Ko(e)){const n=e.error.code?.split("auth/")[1]||"internal-error";t.onError(br(this.auth,n))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(Wo(e))}saveEventToCache(e){this.cachedEventUids.add(Wo(e)),this.lastProcessedEventTime=Date.now()}}function Wo(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function Ko({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===t?.code}const Go=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Jo=/^https?/;async function Xo(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return jr(e,"GET","/v1/projects",t)}(e);for(const e of t)try{if(Yo(e))return}catch{}vr(e,"unauthorized-domain")}function Yo(e){const t=Cr(),{protocol:n,hostname:i}=new URL(t);if(e.startsWith("chrome-extension://")){const r=new URL(e);return""===r.hostname&&""===i?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&r.hostname===i}if(!Jo.test(n))return!1;if(Go.test(e))return i===e;const r=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+r+"|"+r+")$","i").test(i)}const Zo=new Or(3e4,6e4);function Qo(){const e=bo().___jsl;if(e?.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}function ea(e){return new Promise((t,n)=>{function i(){Qo(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Qo(),n(br(e,"network-request-failed"))},timeout:Zo.get()})}if(bo().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else{if(!bo().gapi?.load){const t=`__${"iframefcb"}${Math.floor(1e6*Math.random())}`;return bo()[t]=()=>{gapi.load?i():n(br(e,"network-request-failed"))},Rs(`${Ps.gapiScript}?onload=${t}`).catch(e=>n(e))}i()}}).catch(e=>{throw ta=null,e})}let ta=null;const na=new Or(5e3,15e3),ia={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},ra=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function sa(e){const t=e.config;Sr(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Nr(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,i={apiKey:t.apiKey,appName:e.name,v:Xe},r=ra.get(e.config.apiHost);r&&(i.eid=r);const s=e._getFrameworks();return s.length&&(i.fw=s.join(",")),`${n}?${C(i).slice(1)}`}async function oa(e){const t=await function(e){return ta=ta||ea(e),ta}(e),n=bo().gapi;return Sr(n,e,"internal-error"),t.open({where:document.body,url:sa(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:ia,dontclear:!0},t=>new Promise(async(n,i)=>{await t.restyle({setHideOnLeave:!1});const r=br(e,"network-request-failed"),s=bo().setTimeout(()=>{i(r)},na.get());function o(){bo().clearTimeout(s),n(t)}t.ping(o).then(o,()=>{i(r)})}))}const aa={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class ca{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}function ha(e,t,n,i=500,r=600){const s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-i)/2,0).toString();let a="";const c={...aa,width:i.toString(),height:r.toString(),top:s,left:o},h=_().toLowerCase();n&&(a=gs(h)?"_blank":n),ps(h)&&(t=t||"http://localhost",c.scrollbars="yes");const l=Object.entries(c).reduce((e,[t,n])=>`${e}${t}=${n},`,"");if(function(e=_()){return vs(e)&&!!window.navigator?.standalone}(h)&&"_self"!==a)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const i=document.createEvent("MouseEvent");i.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(i)}(t||"",a),new ca(null);const u=window.open(t||"",a,l);Sr(u,e,"popup-blocked");try{u.focus()}catch(e){}return new ca(u)}const la="__/auth/handler",ua="emulator/auth/handler",da=encodeURIComponent("fac");async function pa(e,t,n,i,r,s){Sr(e.config.authDomain,e,"auth-domain-config-required"),Sr(e.config.apiKey,e,"invalid-api-key");const o={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:i,v:Xe,eventId:r};if(t instanceof Js){t.setDefaultLanguage(e.languageCode),o.providerId=t.providerId||"",function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries({}))o[e]=t}if(t instanceof Xs){const e=t.getScopes().filter(e=>""!==e);e.length>0&&(o.scopes=e.join(","))}e.tenantId&&(o.tid=e.tenantId);const a=o;for(const e of Object.keys(a))void 0===a[e]&&delete a[e];const c=await e._getAppCheckToken(),h=c?`#${da}=${encodeURIComponent(c)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${la}`;return Nr(e,ua)}(e)}?${C(a).slice(1)}${h}`}const fa="webStorageSupport";const ga=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=yo,this._completeRedirectFn=Vo,this._overrideRedirectResult=zo}async _openPopup(e,t,n,i){Ar(this.eventManagers[e._key()]?.manager,"_initialize() not called before _openPopup()");return ha(e,await pa(e,t,n,Cr(),i),wo())}async _openRedirect(e,t,n,i){await this._originValidation(e);return function(e){bo().location.href=e}(await pa(e,t,n,Cr(),i)),new Promise(()=>{})}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(Ar(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){const t=await oa(e),n=new qo(e);return t.register("authEvent",t=>{Sr(t?.authEvent,e,"invalid-auth-event");return{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(fa,{type:fa},n=>{const i=n?.[0]?.[fa];void 0!==i&&t(!!i),vr(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=Xo(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Ts()||fs()||vs()}};var ma="@firebase/auth",ya="1.11.0";class _a{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged(t=>{e(t?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Sr(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}const wa=l("authIdTokenMaxAge")||300;let va=null;function ba(e=Ze()){const t=We(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=We(e,"auth");if(n.isInitialized()){const e=n.getImmediate();if(k(n.getOptions(),t??{}))return e;vr(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:ga,persistence:[No,go,yo]}),i=l("authTokenSyncURL");if(i&&"boolean"==typeof isSecureContext&&isSecureContext){const e=new URL(i,location.origin);if(location.origin===e.origin){const t=(r=e.toString(),async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>wa)return;const i=t?.token;va!==i&&(va=i,await fetch(r,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});!function(e,t,n){D(e).beforeAuthStateChanged(t,n)}(n,t,()=>t(n.currentUser)),function(e,t,n,i){D(e).onIdTokenChanged(t,n,i)}(n,e=>t(e))}}var r;const s=a("auth");return s&&Ms(n,`http://${s}`),n}var Ta;!function(e){Ps=e}({loadJS:e=>new Promise((t,n)=>{const i=document.createElement("script");i.setAttribute("src",e),i.onload=t,i.onerror=e=>{const t=br("internal-error");t.customData=e,n(t)},i.type="text/javascript",i.charset="UTF-8",(document.getElementsByTagName("head")?.[0]??document).appendChild(i)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="}),Ta="Browser",qe(new L("auth",(e,{options:t})=>{const n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),r=e.getProvider("app-check-internal"),{apiKey:s,authDomain:o}=n.options;Sr(s&&!s.includes(":"),"invalid-api-key",{appName:n.name});const a={apiKey:s,authDomain:o,clientPlatform:Ta,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Es(Ta)},c=new ks(n,i,r,a);return function(e,t){const n=t?.persistence||[],i=(Array.isArray(n)?n:[n]).map(as);t?.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(i,t?.popupRedirectResolver)}(c,t),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),qe(new L("auth-internal",e=>(e=>new _a(e))(As(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),Qe(ma,ya,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(Ta)),Qe(ma,ya,"esm2020");const Ea=JSON.parse(process.env.FIREBASE_CONFIG||"{}"),Ia=Ye(Ea),Sa=function(e){const t="object"==typeof e?e:Ze(),n="string"==typeof e?e:rn,i=We(t,"firestore").getImmediate({identifier:n});if(!i._initialized){const e=c("firestore");e&&wn(i,...e)}return i}(Ia),ka=function(e=Ze(),t){const n=We(e=D(e),dr).getImmediate({identifier:t}),i=c("storage");return i&&function(e,t,n,i={}){!function(e,t,n,i={}){e.host=`${t}:${n}`;const r=d(t);r&&(p(`https://${e.host}/b`),y("Storage",!0)),e._isUsingEmulator=!0,e._protocol=r?"https":"http";const{mockUserToken:s}=i;s&&(e._overrideAuthToken="string"==typeof s?s:f(s,e.app.options.projectId))}(e,t,n,i)}(n,...i),n}(Ia),Aa=ba(Ia),Ca=Aa.currentUser,Pa=globalThis,Ra=Pa.ShadowRoot&&(void 0===Pa.ShadyCSS||Pa.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Oa=Symbol(),Na=new WeakMap;let xa=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Oa)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ra&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Na.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Na.set(t,e))}return e}toString(){return this.cssText}};const Da=(e,...t)=>{const n=1===e.length?e[0]:t.reduce((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1],e[0]);return new xa(n,e,Oa)},La=Ra?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new xa("string"==typeof e?e:e+"",void 0,Oa))(t)})(e):e,{is:Ua,defineProperty:Ma,getOwnPropertyDescriptor:ja,getOwnPropertyNames:$a,getOwnPropertySymbols:Fa,getPrototypeOf:Ba}=Object,Ha=globalThis,za=Ha.trustedTypes,Va=za?za.emptyScript:"",qa=Ha.reactiveElementPolyfillSupport,Wa=(e,t)=>e,Ka={toAttribute(e,t){switch(t){case Boolean:e=e?Va:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Ga=(e,t)=>!Ua(e,t),Ja={attribute:!0,type:String,converter:Ka,reflect:!1,useDefault:!1,hasChanged:Ga};Symbol.metadata??=Symbol("metadata"),Ha.litPropertyMetadata??=new WeakMap;let Xa=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ja){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Ma(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:r}=ja(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const s=i?.call(this);r?.call(this,t),this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ja}static _$Ei(){if(this.hasOwnProperty(Wa("elementProperties")))return;const e=Ba(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Wa("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Wa("properties"))){const e=this.properties,t=[...$a(e),...Fa(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const n=this._$Eu(e,t);void 0!==n&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(La(e))}else void 0!==e&&t.push(La(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Ra)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const n of t){const t=document.createElement("style"),i=Pa.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){const r=(void 0!==n.converter?.toAttribute?n.converter:Ka).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(e,t){const n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=n.getPropertyOptions(i),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Ka;this._$Em=i;const s=r.fromAttribute(t,e.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){const i=this.constructor,r=this[e];if(n??=i.getPropertyOptions(e),!((n.hasChanged??Ga)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:r},s){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==r||void 0!==s)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,n,i)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};Xa.elementStyles=[],Xa.shadowRootOptions={mode:"open"},Xa[Wa("elementProperties")]=new Map,Xa[Wa("finalized")]=new Map,qa?.({ReactiveElement:Xa}),(Ha.reactiveElementVersions??=[]).push("2.1.1");const Ya=globalThis,Za=Ya.trustedTypes,Qa=Za?Za.createPolicy("lit-html",{createHTML:e=>e}):void 0,ec="$lit$",tc=`lit$${Math.random().toFixed(9).slice(2)}$`,nc="?"+tc,ic=`<${nc}>`,rc=document,sc=()=>rc.createComment(""),oc=e=>null===e||"object"!=typeof e&&"function"!=typeof e,ac=Array.isArray,cc="[ \t\n\f\r]",hc=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lc=/-->/g,uc=/>/g,dc=RegExp(`>|${cc}(?:([^\\s"'>=/]+)(${cc}*=${cc}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),pc=/'/g,fc=/"/g,gc=/^(?:script|style|textarea|title)$/i,mc=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),yc=Symbol.for("lit-noChange"),_c=Symbol.for("lit-nothing"),wc=new WeakMap,vc=rc.createTreeWalker(rc,129);function bc(e,t){if(!ac(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Qa?Qa.createHTML(t):t}const Tc=(e,t)=>{const n=e.length-1,i=[];let r,s=2===t?"<svg>":3===t?"<math>":"",o=hc;for(let t=0;t<n;t++){const n=e[t];let a,c,h=-1,l=0;for(;l<n.length&&(o.lastIndex=l,c=o.exec(n),null!==c);)l=o.lastIndex,o===hc?"!--"===c[1]?o=lc:void 0!==c[1]?o=uc:void 0!==c[2]?(gc.test(c[2])&&(r=RegExp("</"+c[2],"g")),o=dc):void 0!==c[3]&&(o=dc):o===dc?">"===c[0]?(o=r??hc,h=-1):void 0===c[1]?h=-2:(h=o.lastIndex-c[2].length,a=c[1],o=void 0===c[3]?dc:'"'===c[3]?fc:pc):o===fc||o===pc?o=dc:o===lc||o===uc?o=hc:(o=dc,r=void 0);const u=o===dc&&e[t+1].startsWith("/>")?" ":"";s+=o===hc?n+ic:h>=0?(i.push(a),n.slice(0,h)+ec+n.slice(h)+tc+u):n+tc+(-2===h?t:u)}return[bc(e,s+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class Ec{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let r=0,s=0;const o=e.length-1,a=this.parts,[c,h]=Tc(e,t);if(this.el=Ec.createElement(c,n),vc.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=vc.nextNode())&&a.length<o;){if(1===i.nodeType){if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(ec)){const t=h[s++],n=i.getAttribute(e).split(tc),o=/([.?@])?(.*)/.exec(t);a.push({type:1,index:r,name:o[2],strings:n,ctor:"."===o[1]?Cc:"?"===o[1]?Pc:"@"===o[1]?Rc:Ac}),i.removeAttribute(e)}else e.startsWith(tc)&&(a.push({type:6,index:r}),i.removeAttribute(e));if(gc.test(i.tagName)){const e=i.textContent.split(tc),t=e.length-1;if(t>0){i.textContent=Za?Za.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],sc()),vc.nextNode(),a.push({type:2,index:++r});i.append(e[t],sc())}}}else if(8===i.nodeType)if(i.data===nc)a.push({type:2,index:r});else{let e=-1;for(;-1!==(e=i.data.indexOf(tc,e+1));)a.push({type:7,index:r}),e+=tc.length-1}r++}}static createElement(e,t){const n=rc.createElement("template");return n.innerHTML=e,n}}function Ic(e,t,n=e,i){if(t===yc)return t;let r=void 0!==i?n._$Co?.[i]:n._$Cl;const s=oc(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(e),r._$AT(e,n,i)),void 0!==i?(n._$Co??=[])[i]=r:n._$Cl=r),void 0!==r&&(t=Ic(e,r._$AS(e,t.values),r,i)),t}class Sc{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,i=(e?.creationScope??rc).importNode(t,!0);vc.currentNode=i;let r=vc.nextNode(),s=0,o=0,a=n[0];for(;void 0!==a;){if(s===a.index){let t;2===a.type?t=new kc(r,r.nextSibling,this,e):1===a.type?t=new a.ctor(r,a.name,a.strings,this,e):6===a.type&&(t=new Oc(r,this,e)),this._$AV.push(t),a=n[++o]}s!==a?.index&&(r=vc.nextNode(),s++)}return vc.currentNode=rc,i}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class kc{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=_c,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ic(this,e,t),oc(e)?e===_c||null==e||""===e?(this._$AH!==_c&&this._$AR(),this._$AH=_c):e!==this._$AH&&e!==yc&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>ac(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==_c&&oc(this._$AH)?this._$AA.nextSibling.data=e:this.T(rc.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=Ec.createElement(bc(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(t);else{const e=new Sc(i,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=wc.get(e.strings);return void 0===t&&wc.set(e.strings,t=new Ec(e)),t}k(e){ac(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const r of e)i===t.length?t.push(n=new kc(this.O(sc()),this.O(sc()),this,this.options)):n=t[i],n._$AI(r),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class Ac{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,r){this.type=1,this._$AH=_c,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=_c}_$AI(e,t=this,n,i){const r=this.strings;let s=!1;if(void 0===r)e=Ic(this,e,t,0),s=!oc(e)||e!==this._$AH&&e!==yc,s&&(this._$AH=e);else{const i=e;let o,a;for(e=r[0],o=0;o<r.length-1;o++)a=Ic(this,i[n+o],t,o),a===yc&&(a=this._$AH[o]),s||=!oc(a)||a!==this._$AH[o],a===_c?e=_c:e!==_c&&(e+=(a??"")+r[o+1]),this._$AH[o]=a}s&&!i&&this.j(e)}j(e){e===_c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Cc extends Ac{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===_c?void 0:e}}class Pc extends Ac{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==_c)}}class Rc extends Ac{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}_$AI(e,t=this){if((e=Ic(this,e,t,0)??_c)===yc)return;const n=this._$AH,i=e===_c&&n!==_c||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==_c&&(n===_c||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Oc{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Ic(this,e)}}const Nc=Ya.litHtmlPolyfillSupport;Nc?.(Ec,kc),(Ya.litHtmlVersions??=[]).push("3.3.1");const xc=globalThis;class Dc extends Xa{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const i=n?.renderBefore??t;let r=i._$litPart$;if(void 0===r){const e=n?.renderBefore??null;i._$litPart$=r=new kc(t.insertBefore(sc(),e),e,void 0,n??{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return yc}}Dc._$litElement$=!0,Dc.finalized=!0,xc.litElementHydrateSupport?.({LitElement:Dc});const Lc=xc.litElementPolyfillSupport;Lc?.({LitElement:Dc}),(xc.litElementVersions??=[]).push("4.2.1");const Uc=e=>(t,n)=>{void 0!==n?n.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Mc={attribute:!0,type:String,converter:Ka,reflect:!1,hasChanged:Ga},jc=(e=Mc,t,n)=>{const{kind:i,metadata:r}=n;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===i&&((e=Object.create(e)).wrapped=!0),s.set(n.name,e),"accessor"===i){const{name:i}=n;return{set(n){const r=t.get.call(this);t.set.call(this,n),this.requestUpdate(i,r,e)},init(t){return void 0!==t&&this.C(i,void 0,e,t),t}}}if("setter"===i){const{name:i}=n;return function(n){const r=this[i];t.call(this,n),this.requestUpdate(i,r,e)}}throw Error("Unsupported decorator location: "+i)};function $c(e){return(t,n)=>"object"==typeof n?jc(e,t,n):((e,t,n)=>{const i=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),i?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function Fc(e){return $c({...e,state:!0,attribute:!1})}const Bc=e=>t=>class extends t{connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._storeUnsubscribe=e.subscribe(()=>this.stateChanged(e.getState())),this.stateChanged(e.getState())}disconnectedCallback(){this._storeUnsubscribe(),super.disconnectedCallback&&super.disconnectedCallback()}stateChanged(e){}};function Hc(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var zc=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Vc=()=>Math.random().toString(36).substring(7).split("").join("."),qc={INIT:`@@redux/INIT${Vc()}`,REPLACE:`@@redux/REPLACE${Vc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Vc()}`};function Wc(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Kc(e,t,n){if("function"!=typeof e)throw new Error(Hc(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Hc(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Hc(1));return n(Kc)(e,t)}let i=e,r=t,s=new Map,o=s,a=0,c=!1;function h(){o===s&&(o=new Map,s.forEach((e,t)=>{o.set(t,e)}))}function l(){if(c)throw new Error(Hc(3));return r}function u(e){if("function"!=typeof e)throw new Error(Hc(4));if(c)throw new Error(Hc(5));let t=!0;h();const n=a++;return o.set(n,e),function(){if(t){if(c)throw new Error(Hc(6));t=!1,h(),o.delete(n),s=null}}}function d(e){if(!Wc(e))throw new Error(Hc(7));if(void 0===e.type)throw new Error(Hc(8));if("string"!=typeof e.type)throw new Error(Hc(17));if(c)throw new Error(Hc(9));try{c=!0,r=i(r,e)}finally{c=!1}return(s=o).forEach(e=>{e()}),e}d({type:qc.INIT});return{dispatch:d,subscribe:u,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Hc(10));i=e,d({type:qc.REPLACE})},[zc]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Hc(11));function n(){const e=t;e.next&&e.next(l())}n();return{unsubscribe:e(n)}},[zc](){return this}}}}}function Gc(e){const t=Object.keys(e),n={};for(let i=0;i<t.length;i++){const r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}const i=Object.keys(n);let r;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:qc.INIT}))throw new Error(Hc(12));if(void 0===n(void 0,{type:qc.PROBE_UNKNOWN_ACTION()}))throw new Error(Hc(13))})}(n)}catch(e){r=e}return function(e={},t){if(r)throw r;let s=!1;const o={};for(let r=0;r<i.length;r++){const a=i[r],c=n[a],h=e[a],l=c(h,t);if(void 0===l)throw t&&t.type,new Error(Hc(14));o[a]=l,s=s||l!==h}return s=s||i.length!==Object.keys(e).length,s?o:e}}function Jc(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}var Xc=Symbol.for("immer-nothing"),Yc=Symbol.for("immer-draftable"),Zc=Symbol.for("immer-state");function Qc(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var eh=Object.getPrototypeOf;function th(e){return!!e&&!!e[Zc]}function nh(e){return!!e&&(rh(e)||Array.isArray(e)||!!e[Yc]||!!e.constructor?.[Yc]||hh(e)||lh(e))}var ih=Object.prototype.constructor.toString();function rh(e){if(!e||"object"!=typeof e)return!1;const t=eh(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===ih}function sh(e,t){0===oh(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function oh(e){const t=e[Zc];return t?t.type_:Array.isArray(e)?1:hh(e)?2:lh(e)?3:0}function ah(e,t){return 2===oh(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ch(e,t,n){const i=oh(e);2===i?e.set(t,n):3===i?e.add(n):e[t]=n}function hh(e){return e instanceof Map}function lh(e){return e instanceof Set}function uh(e){return e.copy_||e.base_}function dh(e,t){if(hh(e))return new Map(e);if(lh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=rh(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Zc];let n=Reflect.ownKeys(t);for(let i=0;i<n.length;i++){const r=n[i],s=t[r];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[r]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[r]})}return Object.create(eh(e),t)}{const t=eh(e);if(null!==t&&n)return{...e};const i=Object.create(t);return Object.assign(i,e)}}function ph(e,t=!1){return gh(e)||th(e)||!nh(e)||(oh(e)>1&&(e.set=e.add=e.clear=e.delete=fh),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>ph(t,!0))),e}function fh(){Qc(2)}function gh(e){return Object.isFrozen(e)}var mh,yh={};function _h(e){const t=yh[e];return t||Qc(0),t}function wh(){return mh}function vh(e,t){t&&(_h("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bh(e){Th(e),e.drafts_.forEach(Ih),e.drafts_=null}function Th(e){e===mh&&(mh=e.parent_)}function Eh(e){return mh={drafts_:[],parent_:mh,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ih(e){const t=e[Zc];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Sh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Zc].modified_&&(bh(t),Qc(4)),nh(e)&&(e=kh(t,e),t.parent_||Ch(t,e)),t.patches_&&_h("Patches").generateReplacementPatches_(n[Zc].base_,e,t.patches_,t.inversePatches_)):e=kh(t,n,[]),bh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Xc?e:void 0}function kh(e,t,n){if(gh(t))return t;const i=t[Zc];if(!i)return sh(t,(r,s)=>Ah(e,i,t,r,s,n)),t;if(i.scope_!==e)return t;if(!i.modified_)return Ch(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let r=t,s=!1;3===i.type_&&(r=new Set(t),t.clear(),s=!0),sh(r,(r,o)=>Ah(e,i,t,r,o,n,s)),Ch(e,t,!1),n&&e.patches_&&_h("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function Ah(e,t,n,i,r,s,o){if(th(r)){const o=kh(e,r,s&&t&&3!==t.type_&&!ah(t.assigned_,i)?s.concat(i):void 0);if(ch(n,i,o),!th(o))return;e.canAutoFreeze_=!1}else o&&n.add(r);if(nh(r)&&!gh(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;kh(e,r),t&&t.scope_.parent_||"symbol"==typeof i||!Object.prototype.propertyIsEnumerable.call(n,i)||Ch(e,r)}}function Ch(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ph(t,n)}var Ph={get(e,t){if(t===Zc)return e;const n=uh(e);if(!ah(n,t))return function(e,t,n){const i=Nh(t,n);return i?"value"in i?i.value:i.get?.call(e.draft_):void 0}(e,n,t);const i=n[t];return e.finalized_||!nh(i)?i:i===Oh(e.base_,t)?(Dh(e),e.copy_[t]=Lh(i,e)):i},has:(e,t)=>t in uh(e),ownKeys:e=>Reflect.ownKeys(uh(e)),set(e,t,n){const i=Nh(uh(e),t);if(i?.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const i=Oh(uh(e),t),r=i?.[Zc];if(r&&r.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,i)&&(void 0!==n||ah(e.base_,t)))return!0;Dh(e),xh(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Oh(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Dh(e),xh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=uh(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:i.enumerable,value:n[t]}:i},defineProperty(){Qc(11)},getPrototypeOf:e=>eh(e.base_),setPrototypeOf(){Qc(12)}},Rh={};function Oh(e,t){const n=e[Zc];return(n?uh(n):e)[t]}function Nh(e,t){if(!(t in e))return;let n=eh(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=eh(n)}}function xh(e){e.modified_||(e.modified_=!0,e.parent_&&xh(e.parent_))}function Dh(e){e.copy_||(e.copy_=dh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}sh(Ph,(e,t)=>{Rh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Rh.deleteProperty=function(e,t){return Rh.set.call(this,e,t,void 0)},Rh.set=function(e,t,n){return Ph.set.call(this,e[0],t,n,e[0])};function Lh(e,t){const n=hh(e)?_h("MapSet").proxyMap_(e,t):lh(e)?_h("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),i={type_:n?1:0,scope_:t?t.scope_:wh(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=i,s=Ph;n&&(r=[i],s=Rh);const{revoke:o,proxy:a}=Proxy.revocable(r,s);return i.draft_=a,i.revoke_=o,a}(e,t);return(t?t.scope_:wh()).drafts_.push(n),n}function Uh(e){if(!nh(e)||gh(e))return e;const t=e[Zc];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=dh(e,t.scope_.immer_.useStrictShallowCopy_)}else n=dh(e,!0);return sh(n,(e,t)=>{ch(n,e,Uh(t))}),t&&(t.finalized_=!1),n}var Mh=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const i=this;return function(e=n,...r){return i.produce(e,e=>t.call(this,e,...r))}}let i;if("function"!=typeof t&&Qc(6),void 0!==n&&"function"!=typeof n&&Qc(7),nh(e)){const r=Eh(this),s=Lh(e,void 0);let o=!0;try{i=t(s),o=!1}finally{o?bh(r):Th(r)}return vh(r,n),Sh(i,r)}if(!e||"object"!=typeof e){if(i=t(e),void 0===i&&(i=e),i===Xc&&(i=void 0),this.autoFreeze_&&ph(i,!0),n){const t=[],r=[];_h("Patches").generateReplacementPatches_(e,i,t,r),n(t,r)}return i}Qc(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,i;const r=this.produce(e,t,(e,t)=>{n=e,i=t});return[r,n,i]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){nh(e)||Qc(8),th(e)&&(e=function(e){th(e)||Qc(10);return Uh(e)}(e));const t=Eh(this),n=Lh(e,void 0);return n[Zc].isManual_=!0,Th(t),n}finishDraft(e,t){const n=e&&e[Zc];n&&n.isManual_||Qc(9);const{scope_:i}=n;return vh(i,t),Sh(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(0===i.path.length&&"replace"===i.op){e=i.value;break}}n>-1&&(t=t.slice(n+1));const i=_h("Patches").applyPatches_;return th(e)?i(e,t):this.produce(e,e=>i(e,t))}},jh=Mh.produce;function $h(e){return({dispatch:t,getState:n})=>i=>r=>"function"==typeof r?r(t,n,e):i(r)}Mh.produceWithPatches.bind(Mh),Mh.setAutoFreeze.bind(Mh),Mh.setUseStrictShallowCopy.bind(Mh),Mh.applyPatches.bind(Mh),Mh.createDraft.bind(Mh),Mh.finishDraft.bind(Mh);var Fh=$h(),Bh=$h,Hh="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Jc:Jc.apply(null,arguments)};function zh(e,t){function n(...n){if(t){let i=t(...n);if(!i)throw new Error(nl(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return Wc(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var Vh=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function qh(e){return nh(e)?jh(e,()=>{}):e}function Wh(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var Kh=e=>t=>{setTimeout(t,e)},Gh=e=>function(t){const{autoBatch:n=!0}=t??{};let i=new Vh(e);return n&&i.push(((e={type:"raf"})=>t=>(...n)=>{const i=t(...n);let r=!0,s=!1,o=!1;const a=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Kh(10):"callback"===e.type?e.queueNotification:Kh(e.timeout),h=()=>{o=!1,s&&(s=!1,a.forEach(e=>e()))};return Object.assign({},i,{subscribe(e){const t=i.subscribe(()=>r&&e());return a.add(e),()=>{t(),a.delete(e)}},dispatch(e){try{return r=!e?.meta?.RTK_autoBatch,s=!r,s&&(o||(o=!0,c(h))),i.dispatch(e)}finally{r=!0}}})})("object"==typeof n?n:void 0)),i};function Jh(e){const t={},n=[];let i;const r={addCase(e,n){const i="string"==typeof e?e:e.type;if(!i)throw new Error(nl(28));if(i in t)throw new Error(nl(29));return t[i]=n,r},addAsyncThunk:(e,i)=>(i.pending&&(t[e.pending.type]=i.pending),i.rejected&&(t[e.rejected.type]=i.rejected),i.fulfilled&&(t[e.fulfilled.type]=i.fulfilled),i.settled&&n.push({matcher:e.settled,reducer:i.settled}),r),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),r),addDefaultCase:e=>(i=e,r)};return e(r),[t,n,i]}var Xh=Symbol.for("rtk-slice-createasyncthunk");function Yh(e,t){return`${e}/${t}`}function Zh({creators:e}={}){const t=e?.asyncThunk?.[Xh];return function(e){const{name:n,reducerPath:i=n}=e;if(!n)throw new Error(nl(11));const r=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},s=Object.keys(r),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(nl(12));if(n in o.sliceCaseReducersByType)throw new Error(nl(13));return o.sliceCaseReducersByType[n]=t,a},addMatcher:(e,t)=>(o.sliceMatchers.push({matcher:e,reducer:t}),a),exposeAction:(e,t)=>(o.actionCreators[e]=t,a),exposeCaseReducer:(e,t)=>(o.sliceCaseReducersByName[e]=t,a)};function c(){const[t={},n=[],i]="function"==typeof e.extraReducers?Jh(e.extraReducers):[e.extraReducers],r={...t,...o.sliceCaseReducersByType};return function(e,t){let n,[i,r,s]=Jh(t);if(function(e){return"function"==typeof e}(e))n=()=>qh(e());else{const t=qh(e);n=()=>t}function o(e=n(),t){let o=[i[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===o.filter(e=>!!e).length&&(o=[s]),o.reduce((e,n)=>{if(n){if(th(e)){const i=n(e,t);return void 0===i?e:i}if(nh(e))return jh(e,e=>n(e,t));{const i=n(e,t);if(void 0===i){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return i}}return e},e)}return o.getInitialState=n,o}(e.initialState,e=>{for(let t in r)e.addCase(t,r[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);i&&e.addDefaultCase(i)})}s.forEach(i=>{const s=r[i],o={reducerName:i,type:Yh(n,i),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(s)?function({type:e,reducerName:t,createNotation:n},i,r){let s,o;if("reducer"in i){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(i))throw new Error(nl(17));s=i.reducer,o=i.prepare}else s=i;r.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?zh(e,o):zh(e))}(o,s,a):function({type:e,reducerName:t},n,i,r){if(!r)throw new Error(nl(18));const{payloadCreator:s,fulfilled:o,pending:a,rejected:c,settled:h,options:l}=n,u=r(e,s,l);i.exposeAction(t,u),o&&i.addCase(u.fulfilled,o);a&&i.addCase(u.pending,a);c&&i.addCase(u.rejected,c);h&&i.addMatcher(u.settled,h);i.exposeCaseReducer(t,{fulfilled:o||tl,pending:a||tl,rejected:c||tl,settled:h||tl})}(o,s,a,t)});const h=e=>e,l=new Map,u=new WeakMap;let d;function p(e,t){return d||(d=c()),d(e,t)}function f(){return d||(d=c()),d.getInitialState()}function g(t,n=!1){function i(e){let r=e[t];return void 0===r&&n&&(r=Wh(u,i,f)),r}function r(t=h){const i=Wh(l,n,()=>new WeakMap);return Wh(i,t,()=>{const i={};for(const[r,s]of Object.entries(e.selectors??{}))i[r]=Qh(s,t,()=>Wh(u,t,f),n);return i})}return{reducerPath:t,getSelectors:r,get selectors(){return r(i)},selectSlice:i}}const m={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:f,...g(i),injectInto(e,{reducerPath:t,...n}={}){const r=t??i;return e.inject({reducerPath:r,reducer:p},n),{...m,...g(r,!0)}}};return m}}function Qh(e,t,n,i){function r(r,...s){let o=t(r);return void 0===o&&i&&(o=n()),e(o,...s)}return r.unwrapped=e,r}var el=Zh();function tl(){}function nl(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const il=el({name:"user",initialState:{settings:"profile",login:!1,drawer:!1,register:!0,userId:"user",customer:"John Doe",profileChoice:"unChosen",name:"Modern Business",photoURL:"",phone:"(...) ... - ....",email:""},reducers:{navigateAuth:(e,t)=>{switch(t.payload){case"profile":case"verification":case"password":case"delete":break;default:t.payload="profile"}e.settings=t.payload},userAuth:(e,t)=>{e.login=t.payload},toggleSign:e=>{!0===e.drawer?e.drawer=!1:e.drawer=!0},closeSign:e=>{e.drawer=!1},signUpAction:e=>{!1===e.register?e.register=!0:e.register=!1},signUpClose:(e,t)=>{e.register=t.payload},iconAuth:(e,t)=>{e.photoURL=t.payload},nameAuth:(e,t)=>{e.name=t.payload}}}),{navigateAuth:rl,iconAuth:sl,nameAuth:ol,userAuth:al,toggleSign:cl,closeSign:hl,signUpAction:ll,signUpClose:ul}=il.actions,dl=el({name:"drawers",initialState:{drawer:!1},reducers:{setDrawer:e=>{!1===e.drawer?e.drawer=!0:e.drawer=!1},closeDrawer:e=>{e.drawer=!1}}}),{setDrawer:pl,closeDrawer:fl}=dl.actions,gl=el({name:"backend",initialState:{verified:!1,anon:!1,userId:"",name:"John Doe",email:"",photoURL:"",phone:"",msgToken:""},reducers:{accVerified:(e,t)=>{e.verified=t.payload},accAnon:(e,t)=>{e.anon=t.payload},accID:(e,t)=>{e.userId=t.payload},accName:(e,t)=>{e.name=t.payload},accPhone:(e,t)=>{e.phone=t.payload},accEmail:(e,t)=>{e.email=t.payload},accImage:(e,t)=>{e.photoURL=t.payload},messageId:(e,t)=>{e.msgToken=t.payload}}}),{accVerified:ml,accID:yl,accName:_l,accPhone:wl,accEmail:vl,accImage:bl,accAnon:Tl,messageId:El}=gl.actions,Il=function(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:r=!0}=e??{};let s=new Vh;return t&&(function(e){return"boolean"==typeof e}(t)?s.push(Fh):s.push(Bh(t.extraArgument))),s},{reducer:n,middleware:i,devTools:r=!0,preloadedState:s,enhancers:o}=e||{};let a,c;if("function"==typeof n)a=n;else{if(!Wc(n))throw new Error(nl(1));a=Gc(n)}c="function"==typeof i?i(t):t();let h=Jc;r&&(h=Hh({trace:!1,..."object"==typeof r&&r}));const l=function(...e){return t=>(n,i)=>{const r=t(n,i);let s=()=>{throw new Error(Hc(15))};const o={getState:r.getState,dispatch:(e,...t)=>s(e,...t)},a=e.map(e=>e(o));return s=Jc(...a)(r.dispatch),{...r,dispatch:s}}}(...c),u=Gh(l);return Kc(a,s,h(..."function"==typeof o?o(u):u()))}({reducer:{frontend:il.reducer,drawer:dl.reducer,backend:gl.reducer},devTools:!0});mc`<svg viewBox="0 0 24 24" height="34px" width="34px"><path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z"></path></svg>`,mc`<svg viewBox="0 0 24 24"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></svg>`;const Sl=mc`<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></svg>`,kl=Da`
|
|
7
|
+
import{r as e,_ as t,C as n,a as i,E as r,o,F as a,L as s,g as c,i as l,b as d,v as p,c as u,d as h,e as f,f as g,h as y,j as m,k as w,s as b,l as v,m as _,n as $,p as x,q as S,t as A,u as k,w as E,x as P,y as C,z as I,A as T,B as O,D as R,G as j}from"./pwa-helpers-BN4uXXdl.js";const D=globalThis,U=D.ShadowRoot&&(void 0===D.ShadyCSS||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,M=Symbol(),N=new WeakMap;let z=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==M)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(U&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=N.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&N.set(t,e))}return e}toString(){return this.cssText}};const L=(e,...t)=>{const n=1===e.length?e[0]:t.reduce((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1],e[0]);return new z(n,e,M)},B=U?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new z("string"==typeof e?e:e+"",void 0,M))(t)})(e):e,{is:F,defineProperty:H,getOwnPropertyDescriptor:K,getOwnPropertyNames:q,getOwnPropertySymbols:W,getPrototypeOf:V}=Object,J=globalThis,G=J.trustedTypes,X=G?G.emptyScript:"",Z=J.reactiveElementPolyfillSupport,Y=(e,t)=>e,Q={toAttribute(e,t){switch(t){case Boolean:e=e?X:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},ee=(e,t)=>!F(e,t),te={attribute:!0,type:String,converter:Q,reflect:!1,useDefault:!1,hasChanged:ee};Symbol.metadata??=Symbol("metadata"),J.litPropertyMetadata??=new WeakMap;let ne=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=te){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&H(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:r}=K(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const o=i?.call(this);r?.call(this,t),this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??te}static _$Ei(){if(this.hasOwnProperty(Y("elementProperties")))return;const e=V(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Y("properties"))){const e=this.properties,t=[...q(e),...W(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const n=this._$Eu(e,t);void 0!==n&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(B(e))}else void 0!==e&&t.push(B(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(U)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const n of t){const t=document.createElement("style"),i=D.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){const r=(void 0!==n.converter?.toAttribute?n.converter:Q).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(e,t){const n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=n.getPropertyOptions(i),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Q;this._$Em=i;const o=r.fromAttribute(t,e.type);this[i]=o??this._$Ej?.get(i)??o,this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){const i=this.constructor,r=this[e];if(n??=i.getPropertyOptions(e),!((n.hasChanged??ee)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:r},o){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),!0!==r||void 0!==o)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,n,i)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};ne.elementStyles=[],ne.shadowRootOptions={mode:"open"},ne[Y("elementProperties")]=new Map,ne[Y("finalized")]=new Map,Z?.({ReactiveElement:ne}),(J.reactiveElementVersions??=[]).push("2.1.1");const ie=globalThis,re=ie.trustedTypes,oe=re?re.createPolicy("lit-html",{createHTML:e=>e}):void 0,ae="$lit$",se=`lit$${Math.random().toFixed(9).slice(2)}$`,ce="?"+se,le=`<${ce}>`,de=document,pe=()=>de.createComment(""),ue=e=>null===e||"object"!=typeof e&&"function"!=typeof e,he=Array.isArray,fe="[ \t\n\f\r]",ge=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ye=/-->/g,me=/>/g,we=RegExp(`>|${fe}(?:([^\\s"'>=/]+)(${fe}*=${fe}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),be=/'/g,ve=/"/g,_e=/^(?:script|style|textarea|title)$/i,$e=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),xe=Symbol.for("lit-noChange"),Se=Symbol.for("lit-nothing"),Ae=new WeakMap,ke=de.createTreeWalker(de,129);function Ee(e,t){if(!he(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==oe?oe.createHTML(t):t}const Pe=(e,t)=>{const n=e.length-1,i=[];let r,o=2===t?"<svg>":3===t?"<math>":"",a=ge;for(let t=0;t<n;t++){const n=e[t];let s,c,l=-1,d=0;for(;d<n.length&&(a.lastIndex=d,c=a.exec(n),null!==c);)d=a.lastIndex,a===ge?"!--"===c[1]?a=ye:void 0!==c[1]?a=me:void 0!==c[2]?(_e.test(c[2])&&(r=RegExp("</"+c[2],"g")),a=we):void 0!==c[3]&&(a=we):a===we?">"===c[0]?(a=r??ge,l=-1):void 0===c[1]?l=-2:(l=a.lastIndex-c[2].length,s=c[1],a=void 0===c[3]?we:'"'===c[3]?ve:be):a===ve||a===be?a=we:a===ye||a===me?a=ge:(a=we,r=void 0);const p=a===we&&e[t+1].startsWith("/>")?" ":"";o+=a===ge?n+le:l>=0?(i.push(s),n.slice(0,l)+ae+n.slice(l)+se+p):n+se+(-2===l?t:p)}return[Ee(e,o+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class Ce{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let r=0,o=0;const a=e.length-1,s=this.parts,[c,l]=Pe(e,t);if(this.el=Ce.createElement(c,n),ke.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=ke.nextNode())&&s.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(ae)){const t=l[o++],n=i.getAttribute(e).split(se),a=/([.?@])?(.*)/.exec(t);s.push({type:1,index:r,name:a[2],strings:n,ctor:"."===a[1]?je:"?"===a[1]?De:"@"===a[1]?Ue:Re}),i.removeAttribute(e)}else e.startsWith(se)&&(s.push({type:6,index:r}),i.removeAttribute(e));if(_e.test(i.tagName)){const e=i.textContent.split(se),t=e.length-1;if(t>0){i.textContent=re?re.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],pe()),ke.nextNode(),s.push({type:2,index:++r});i.append(e[t],pe())}}}else if(8===i.nodeType)if(i.data===ce)s.push({type:2,index:r});else{let e=-1;for(;-1!==(e=i.data.indexOf(se,e+1));)s.push({type:7,index:r}),e+=se.length-1}r++}}static createElement(e,t){const n=de.createElement("template");return n.innerHTML=e,n}}function Ie(e,t,n=e,i){if(t===xe)return t;let r=void 0!==i?n._$Co?.[i]:n._$Cl;const o=ue(t)?void 0:t._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),void 0===o?r=void 0:(r=new o(e),r._$AT(e,n,i)),void 0!==i?(n._$Co??=[])[i]=r:n._$Cl=r),void 0!==r&&(t=Ie(e,r._$AS(e,t.values),r,i)),t}class Te{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,i=(e?.creationScope??de).importNode(t,!0);ke.currentNode=i;let r=ke.nextNode(),o=0,a=0,s=n[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new Oe(r,r.nextSibling,this,e):1===s.type?t=new s.ctor(r,s.name,s.strings,this,e):6===s.type&&(t=new Me(r,this,e)),this._$AV.push(t),s=n[++a]}o!==s?.index&&(r=ke.nextNode(),o++)}return ke.currentNode=de,i}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Oe{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=Se,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ie(this,e,t),ue(e)?e===Se||null==e||""===e?(this._$AH!==Se&&this._$AR(),this._$AH=Se):e!==this._$AH&&e!==xe&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>he(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Se&&ue(this._$AH)?this._$AA.nextSibling.data=e:this.T(de.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=Ce.createElement(Ee(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(t);else{const e=new Te(i,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Ae.get(e.strings);return void 0===t&&Ae.set(e.strings,t=new Ce(e)),t}k(e){he(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const r of e)i===t.length?t.push(n=new Oe(this.O(pe()),this.O(pe()),this,this.options)):n=t[i],n._$AI(r),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class Re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,r){this.type=1,this._$AH=Se,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Se}_$AI(e,t=this,n,i){const r=this.strings;let o=!1;if(void 0===r)e=Ie(this,e,t,0),o=!ue(e)||e!==this._$AH&&e!==xe,o&&(this._$AH=e);else{const i=e;let a,s;for(e=r[0],a=0;a<r.length-1;a++)s=Ie(this,i[n+a],t,a),s===xe&&(s=this._$AH[a]),o||=!ue(s)||s!==this._$AH[a],s===Se?e=Se:e!==Se&&(e+=(s??"")+r[a+1]),this._$AH[a]=s}o&&!i&&this.j(e)}j(e){e===Se?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class je extends Re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Se?void 0:e}}class De extends Re{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Se)}}class Ue extends Re{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}_$AI(e,t=this){if((e=Ie(this,e,t,0)??Se)===xe)return;const n=this._$AH,i=e===Se&&n!==Se||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==Se&&(n===Se||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Me{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Ie(this,e)}}const Ne=ie.litHtmlPolyfillSupport;Ne?.(Ce,Oe),(ie.litHtmlVersions??=[]).push("3.3.1");const ze=globalThis;class Le extends ne{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const i=n?.renderBefore??t;let r=i._$litPart$;if(void 0===r){const e=n?.renderBefore??null;i._$litPart$=r=new Oe(t.insertBefore(pe(),e),e,void 0,n??{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return xe}}Le._$litElement$=!0,Le.finalized=!0,ze.litElementHydrateSupport?.({LitElement:Le});const Be=ze.litElementPolyfillSupport;Be?.({LitElement:Le}),(ze.litElementVersions??=[]).push("4.2.1");const Fe=e=>(t,n)=>{void 0!==n?n.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},He={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:ee},Ke=(e=He,t,n)=>{const{kind:i,metadata:r}=n;let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),"setter"===i&&((e=Object.create(e)).wrapped=!0),o.set(n.name,e),"accessor"===i){const{name:i}=n;return{set(n){const r=t.get.call(this);t.set.call(this,n),this.requestUpdate(i,r,e)},init(t){return void 0!==t&&this.C(i,void 0,e,t),t}}}if("setter"===i){const{name:i}=n;return function(n){const r=this[i];t.call(this,n),this.requestUpdate(i,r,e)}}throw Error("Unsupported decorator location: "+i)};function qe(e){return(t,n)=>"object"==typeof n?Ke(e,t,n):((e,t,n)=>{const i=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),i?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function We(e){return qe({...e,state:!0,attribute:!1})}const Ve=e=>t=>class extends t{connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._storeUnsubscribe=e.subscribe(()=>this.stateChanged(e.getState())),this.stateChanged(e.getState())}disconnectedCallback(){this._storeUnsubscribe(),super.disconnectedCallback&&super.disconnectedCallback()}stateChanged(e){}};function Je(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ge=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Xe=()=>Math.random().toString(36).substring(7).split("").join("."),Ze={INIT:`@@redux/INIT${Xe()}`,REPLACE:`@@redux/REPLACE${Xe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Xe()}`};function Ye(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Qe(e,t,n){if("function"!=typeof e)throw new Error(Je(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Je(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Je(1));return n(Qe)(e,t)}let i=e,r=t,o=new Map,a=o,s=0,c=!1;function l(){a===o&&(a=new Map,o.forEach((e,t)=>{a.set(t,e)}))}function d(){if(c)throw new Error(Je(3));return r}function p(e){if("function"!=typeof e)throw new Error(Je(4));if(c)throw new Error(Je(5));let t=!0;l();const n=s++;return a.set(n,e),function(){if(t){if(c)throw new Error(Je(6));t=!1,l(),a.delete(n),o=null}}}function u(e){if(!Ye(e))throw new Error(Je(7));if(void 0===e.type)throw new Error(Je(8));if("string"!=typeof e.type)throw new Error(Je(17));if(c)throw new Error(Je(9));try{c=!0,r=i(r,e)}finally{c=!1}return(o=a).forEach(e=>{e()}),e}u({type:Ze.INIT});return{dispatch:u,subscribe:p,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Je(10));i=e,u({type:Ze.REPLACE})},[Ge]:function(){const e=p;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Je(11));function n(){const e=t;e.next&&e.next(d())}n();return{unsubscribe:e(n)}},[Ge](){return this}}}}}function et(e){const t=Object.keys(e),n={};for(let i=0;i<t.length;i++){const r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}const i=Object.keys(n);let r;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:Ze.INIT}))throw new Error(Je(12));if(void 0===n(void 0,{type:Ze.PROBE_UNKNOWN_ACTION()}))throw new Error(Je(13))})}(n)}catch(e){r=e}return function(e={},t){if(r)throw r;let o=!1;const a={};for(let r=0;r<i.length;r++){const s=i[r],c=n[s],l=e[s],d=c(l,t);if(void 0===d)throw t&&t.type,new Error(Je(14));a[s]=d,o=o||d!==l}return o=o||i.length!==Object.keys(e).length,o?a:e}}function tt(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}var nt=Symbol.for("immer-nothing"),it=Symbol.for("immer-draftable"),rt=Symbol.for("immer-state");function ot(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var at=Object.getPrototypeOf;function st(e){return!!e&&!!e[rt]}function ct(e){return!!e&&(dt(e)||Array.isArray(e)||!!e[it]||!!e.constructor?.[it]||gt(e)||yt(e))}var lt=Object.prototype.constructor.toString();function dt(e){if(!e||"object"!=typeof e)return!1;const t=at(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===lt}function pt(e,t){0===ut(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function ut(e){const t=e[rt];return t?t.type_:Array.isArray(e)?1:gt(e)?2:yt(e)?3:0}function ht(e,t){return 2===ut(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ft(e,t,n){const i=ut(e);2===i?e.set(t,n):3===i?e.add(n):e[t]=n}function gt(e){return e instanceof Map}function yt(e){return e instanceof Set}function mt(e){return e.copy_||e.base_}function wt(e,t){if(gt(e))return new Map(e);if(yt(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=dt(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[rt];let n=Reflect.ownKeys(t);for(let i=0;i<n.length;i++){const r=n[i],o=t[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[r]})}return Object.create(at(e),t)}{const t=at(e);if(null!==t&&n)return{...e};const i=Object.create(t);return Object.assign(i,e)}}function bt(e,t=!1){return _t(e)||st(e)||!ct(e)||(ut(e)>1&&(e.set=e.add=e.clear=e.delete=vt),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>bt(t,!0))),e}function vt(){ot(2)}function _t(e){return Object.isFrozen(e)}var $t,xt={};function St(e){const t=xt[e];return t||ot(0),t}function At(){return $t}function kt(e,t){t&&(St("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Et(e){Pt(e),e.drafts_.forEach(It),e.drafts_=null}function Pt(e){e===$t&&($t=e.parent_)}function Ct(e){return $t={drafts_:[],parent_:$t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function It(e){const t=e[rt];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Tt(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[rt].modified_&&(Et(t),ot(4)),ct(e)&&(e=Ot(t,e),t.parent_||jt(t,e)),t.patches_&&St("Patches").generateReplacementPatches_(n[rt].base_,e,t.patches_,t.inversePatches_)):e=Ot(t,n,[]),Et(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nt?e:void 0}function Ot(e,t,n){if(_t(t))return t;const i=t[rt];if(!i)return pt(t,(r,o)=>Rt(e,i,t,r,o,n)),t;if(i.scope_!==e)return t;if(!i.modified_)return jt(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let r=t,o=!1;3===i.type_&&(r=new Set(t),t.clear(),o=!0),pt(r,(r,a)=>Rt(e,i,t,r,a,n,o)),jt(e,t,!1),n&&e.patches_&&St("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function Rt(e,t,n,i,r,o,a){if(st(r)){const a=Ot(e,r,o&&t&&3!==t.type_&&!ht(t.assigned_,i)?o.concat(i):void 0);if(ft(n,i,a),!st(a))return;e.canAutoFreeze_=!1}else a&&n.add(r);if(ct(r)&&!_t(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ot(e,r),t&&t.scope_.parent_||"symbol"==typeof i||!Object.prototype.propertyIsEnumerable.call(n,i)||jt(e,r)}}function jt(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&bt(t,n)}var Dt={get(e,t){if(t===rt)return e;const n=mt(e);if(!ht(n,t))return function(e,t,n){const i=Nt(t,n);return i?"value"in i?i.value:i.get?.call(e.draft_):void 0}(e,n,t);const i=n[t];return e.finalized_||!ct(i)?i:i===Mt(e.base_,t)?(Lt(e),e.copy_[t]=Bt(i,e)):i},has:(e,t)=>t in mt(e),ownKeys:e=>Reflect.ownKeys(mt(e)),set(e,t,n){const i=Nt(mt(e),t);if(i?.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const i=Mt(mt(e),t),r=i?.[rt];if(r&&r.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,i)&&(void 0!==n||ht(e.base_,t)))return!0;Lt(e),zt(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Mt(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Lt(e),zt(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=mt(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:i.enumerable,value:n[t]}:i},defineProperty(){ot(11)},getPrototypeOf:e=>at(e.base_),setPrototypeOf(){ot(12)}},Ut={};function Mt(e,t){const n=e[rt];return(n?mt(n):e)[t]}function Nt(e,t){if(!(t in e))return;let n=at(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=at(n)}}function zt(e){e.modified_||(e.modified_=!0,e.parent_&&zt(e.parent_))}function Lt(e){e.copy_||(e.copy_=wt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}pt(Dt,(e,t)=>{Ut[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ut.deleteProperty=function(e,t){return Ut.set.call(this,e,t,void 0)},Ut.set=function(e,t,n){return Dt.set.call(this,e[0],t,n,e[0])};function Bt(e,t){const n=gt(e)?St("MapSet").proxyMap_(e,t):yt(e)?St("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),i={type_:n?1:0,scope_:t?t.scope_:At(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=i,o=Dt;n&&(r=[i],o=Ut);const{revoke:a,proxy:s}=Proxy.revocable(r,o);return i.draft_=s,i.revoke_=a,s}(e,t);return(t?t.scope_:At()).drafts_.push(n),n}function Ft(e){if(!ct(e)||_t(e))return e;const t=e[rt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=wt(e,t.scope_.immer_.useStrictShallowCopy_)}else n=wt(e,!0);return pt(n,(e,t)=>{ft(n,e,Ft(t))}),t&&(t.finalized_=!1),n}var Ht=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const i=this;return function(e=n,...r){return i.produce(e,e=>t.call(this,e,...r))}}let i;if("function"!=typeof t&&ot(6),void 0!==n&&"function"!=typeof n&&ot(7),ct(e)){const r=Ct(this),o=Bt(e,void 0);let a=!0;try{i=t(o),a=!1}finally{a?Et(r):Pt(r)}return kt(r,n),Tt(i,r)}if(!e||"object"!=typeof e){if(i=t(e),void 0===i&&(i=e),i===nt&&(i=void 0),this.autoFreeze_&&bt(i,!0),n){const t=[],r=[];St("Patches").generateReplacementPatches_(e,i,t,r),n(t,r)}return i}ot(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,i;const r=this.produce(e,t,(e,t)=>{n=e,i=t});return[r,n,i]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ct(e)||ot(8),st(e)&&(e=function(e){st(e)||ot(10);return Ft(e)}(e));const t=Ct(this),n=Bt(e,void 0);return n[rt].isManual_=!0,Pt(t),n}finishDraft(e,t){const n=e&&e[rt];n&&n.isManual_||ot(9);const{scope_:i}=n;return kt(i,t),Tt(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(0===i.path.length&&"replace"===i.op){e=i.value;break}}n>-1&&(t=t.slice(n+1));const i=St("Patches").applyPatches_;return st(e)?i(e,t):this.produce(e,e=>i(e,t))}},Kt=Ht.produce;function qt(e){return({dispatch:t,getState:n})=>i=>r=>"function"==typeof r?r(t,n,e):i(r)}Ht.produceWithPatches.bind(Ht),Ht.setAutoFreeze.bind(Ht),Ht.setUseStrictShallowCopy.bind(Ht),Ht.applyPatches.bind(Ht),Ht.createDraft.bind(Ht),Ht.finishDraft.bind(Ht);var Wt=qt(),Vt=qt,Jt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?tt:tt.apply(null,arguments)};function Gt(e,t){function n(...n){if(t){let i=t(...n);if(!i)throw new Error(ln(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return Ye(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var Xt=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Zt(e){return ct(e)?Kt(e,()=>{}):e}function Yt(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var Qt=e=>t=>{setTimeout(t,e)},en=e=>function(t){const{autoBatch:n=!0}=t??{};let i=new Xt(e);return n&&i.push(((e={type:"raf"})=>t=>(...n)=>{const i=t(...n);let r=!0,o=!1,a=!1;const s=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Qt(10):"callback"===e.type?e.queueNotification:Qt(e.timeout),l=()=>{a=!1,o&&(o=!1,s.forEach(e=>e()))};return Object.assign({},i,{subscribe(e){const t=i.subscribe(()=>r&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return r=!e?.meta?.RTK_autoBatch,o=!r,o&&(a||(a=!0,c(l))),i.dispatch(e)}finally{r=!0}}})})("object"==typeof n?n:void 0)),i};function tn(e){const t={},n=[];let i;const r={addCase(e,n){const i="string"==typeof e?e:e.type;if(!i)throw new Error(ln(28));if(i in t)throw new Error(ln(29));return t[i]=n,r},addAsyncThunk:(e,i)=>(i.pending&&(t[e.pending.type]=i.pending),i.rejected&&(t[e.rejected.type]=i.rejected),i.fulfilled&&(t[e.fulfilled.type]=i.fulfilled),i.settled&&n.push({matcher:e.settled,reducer:i.settled}),r),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),r),addDefaultCase:e=>(i=e,r)};return e(r),[t,n,i]}var nn=Symbol.for("rtk-slice-createasyncthunk");function rn(e,t){return`${e}/${t}`}function on({creators:e}={}){const t=e?.asyncThunk?.[nn];return function(e){const{name:n,reducerPath:i=n}=e;if(!n)throw new Error(ln(11));const r=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},o=Object.keys(r),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(ln(12));if(n in a.sliceCaseReducersByType)throw new Error(ln(13));return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function c(){const[t={},n=[],i]="function"==typeof e.extraReducers?tn(e.extraReducers):[e.extraReducers],r={...t,...a.sliceCaseReducersByType};return function(e,t){let n,[i,r,o]=tn(t);if(function(e){return"function"==typeof e}(e))n=()=>Zt(e());else{const t=Zt(e);n=()=>t}function a(e=n(),t){let a=[i[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===a.filter(e=>!!e).length&&(a=[o]),a.reduce((e,n)=>{if(n){if(st(e)){const i=n(e,t);return void 0===i?e:i}if(ct(e))return Kt(e,e=>n(e,t));{const i=n(e,t);if(void 0===i){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return i}}return e},e)}return a.getInitialState=n,a}(e.initialState,e=>{for(let t in r)e.addCase(t,r[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);i&&e.addDefaultCase(i)})}o.forEach(i=>{const o=r[i],a={reducerName:i,type:rn(n,i),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(o)?function({type:e,reducerName:t,createNotation:n},i,r){let o,a;if("reducer"in i){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(i))throw new Error(ln(17));o=i.reducer,a=i.prepare}else o=i;r.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?Gt(e,a):Gt(e))}(a,o,s):function({type:e,reducerName:t},n,i,r){if(!r)throw new Error(ln(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:c,settled:l,options:d}=n,p=r(e,o,d);i.exposeAction(t,p),a&&i.addCase(p.fulfilled,a);s&&i.addCase(p.pending,s);c&&i.addCase(p.rejected,c);l&&i.addMatcher(p.settled,l);i.exposeCaseReducer(t,{fulfilled:a||cn,pending:s||cn,rejected:c||cn,settled:l||cn})}(a,o,s,t)});const l=e=>e,d=new Map,p=new WeakMap;let u;function h(e,t){return u||(u=c()),u(e,t)}function f(){return u||(u=c()),u.getInitialState()}function g(t,n=!1){function i(e){let r=e[t];return void 0===r&&n&&(r=Yt(p,i,f)),r}function r(t=l){const i=Yt(d,n,()=>new WeakMap);return Yt(i,t,()=>{const i={};for(const[r,o]of Object.entries(e.selectors??{}))i[r]=an(o,t,()=>Yt(p,t,f),n);return i})}return{reducerPath:t,getSelectors:r,get selectors(){return r(i)},selectSlice:i}}const y={name:n,reducer:h,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:f,...g(i),injectInto(e,{reducerPath:t,...n}={}){const r=t??i;return e.inject({reducerPath:r,reducer:h},n),{...y,...g(r,!0)}}};return y}}function an(e,t,n,i){function r(r,...o){let a=t(r);return void 0===a&&i&&(a=n()),e(a,...o)}return r.unwrapped=e,r}var sn=on();function cn(){}function ln(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const dn=sn({name:"user",initialState:{settings:"profile",login:!1,drawer:!1,register:!0,userId:"user",customer:"John Doe",profileChoice:"unChosen",name:"Modern Business",photoURL:"",phone:"(...) ... - ....",email:""},reducers:{navigateAuth:(e,t)=>{switch(t.payload){case"profile":case"verification":case"password":case"delete":break;default:t.payload="profile"}e.settings=t.payload},userAuth:(e,t)=>{e.login=t.payload},toggleSign:e=>{!0===e.drawer?e.drawer=!1:e.drawer=!0},closeSign:e=>{e.drawer=!1},signUpAction:e=>{!1===e.register?e.register=!0:e.register=!1},signUpClose:(e,t)=>{e.register=t.payload},iconAuth:(e,t)=>{e.photoURL=t.payload},nameAuth:(e,t)=>{e.name=t.payload}}}),{navigateAuth:pn,iconAuth:un,nameAuth:hn,userAuth:fn,toggleSign:gn,closeSign:yn,signUpAction:mn,signUpClose:wn}=dn.actions,bn=sn({name:"drawers",initialState:{drawer:!1},reducers:{setDrawer:e=>{!1===e.drawer?e.drawer=!0:e.drawer=!1},closeDrawer:e=>{e.drawer=!1}}}),{setDrawer:vn,closeDrawer:_n}=bn.actions,$n=sn({name:"backend",initialState:{verified:!1,anon:!1,userId:"",name:"John Doe",email:"",photoURL:"",phone:"",msgToken:""},reducers:{accVerified:(e,t)=>{e.verified=t.payload},accAnon:(e,t)=>{e.anon=t.payload},accID:(e,t)=>{e.userId=t.payload},accName:(e,t)=>{e.name=t.payload},accPhone:(e,t)=>{e.phone=t.payload},accEmail:(e,t)=>{e.email=t.payload},accImage:(e,t)=>{e.photoURL=t.payload},messageId:(e,t)=>{e.msgToken=t.payload}}}),{accVerified:xn,accID:Sn,accName:An,accPhone:kn,accEmail:En,accImage:Pn,accAnon:Cn,messageId:In}=$n.actions,Tn=function(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:r=!0}=e??{};let o=new Xt;return t&&(function(e){return"boolean"==typeof e}(t)?o.push(Wt):o.push(Vt(t.extraArgument))),o},{reducer:n,middleware:i,devTools:r=!0,preloadedState:o,enhancers:a}=e||{};let s,c;if("function"==typeof n)s=n;else{if(!Ye(n))throw new Error(ln(1));s=et(n)}c="function"==typeof i?i(t):t();let l=tt;r&&(l=Jt({trace:!1,..."object"==typeof r&&r}));const d=function(...e){return t=>(n,i)=>{const r=t(n,i);let o=()=>{throw new Error(Je(15))};const a={getState:r.getState,dispatch:(e,...t)=>o(e,...t)},s=e.map(e=>e(a));return o=tt(...s)(r.dispatch),{...r,dispatch:o}}}(...c),p=en(d);return Qe(s,o,l(..."function"==typeof a?a(p):p()))}({reducer:{frontend:dn.reducer,drawer:bn.reducer,backend:$n.reducer},devTools:!0});$e`<svg viewBox="0 0 24 24" height="34px" width="34px"><path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z"></path></svg>`,$e`<svg viewBox="0 0 24 24"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></svg>`;const On=$e`<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></svg>`,Rn=L`
|
|
8
8
|
|
|
9
9
|
/* Detailed Project Feature Service */
|
|
10
10
|
.spec[on] { display: grid; }
|
|
11
11
|
.spec { display: none; }
|
|
12
12
|
|
|
13
|
-
`,
|
|
13
|
+
`,jn=L`
|
|
14
14
|
|
|
15
15
|
/* <user-drawer> : parent container */
|
|
16
16
|
:host {
|
|
@@ -63,7 +63,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
63
63
|
transition-property: visibility, max-height;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
`,
|
|
66
|
+
`,Dn=L`
|
|
67
67
|
|
|
68
68
|
.exit {
|
|
69
69
|
display: grid;
|
|
@@ -109,7 +109,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
109
109
|
opacity: .8;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
`,
|
|
112
|
+
`,Un=L`
|
|
113
113
|
|
|
114
114
|
a {
|
|
115
115
|
text-transform: uppercase;
|
|
@@ -119,7 +119,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
119
119
|
text-decoration: none;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
`,
|
|
122
|
+
`,Mn=L`
|
|
123
123
|
|
|
124
124
|
.setLog > p {
|
|
125
125
|
margin: 12px;
|
|
@@ -127,7 +127,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
127
127
|
text-align: center;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
`,
|
|
130
|
+
`,Nn=L`
|
|
131
131
|
|
|
132
132
|
ul {
|
|
133
133
|
list-style-type: none;
|
|
@@ -147,7 +147,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
147
147
|
margin: auto;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
`,Nl="@firebase/installations",xl="0.6.19",Dl=1e4,Ll=`w:${xl}`,Ul="FIS_v2",Ml=36e5,jl=new I("installations","Installations",{"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."});function $l(e){return e instanceof E&&e.code.includes("request-failed")}function Fl({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function Bl(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function Hl(e,t){const n=(await t.json()).error;return jl.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function zl({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Vl(e,{refreshToken:t}){const n=zl(e);return n.append("Authorization",function(e){return`${Ul} ${e}`}(t)),n}async function ql(e){const t=await e();return t.status>=500&&t.status<600?e():t}function Wl(e){return new Promise(t=>{setTimeout(t,e)})}const Kl=/^[cdef][\w-]{21}$/;function Gl(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){const t=(n=e,btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_"));var n;return t.substr(0,22)}(e);return Kl.test(t)?t:""}catch{return""}}function Jl(e){return`${e.appName}!${e.appId}`}const Xl=new Map;function Yl(e,t){const n=Jl(e);Zl(n,t),function(e,t){const n=function(){!Ql&&"BroadcastChannel"in self&&(Ql=new BroadcastChannel("[Firebase] FID Change"),Ql.onmessage=e=>{Zl(e.data.key,e.data.fid)});return Ql}();n&&n.postMessage({key:e,fid:t});0===Xl.size&&Ql&&(Ql.close(),Ql=null)}(n,t)}function Zl(e,t){const n=Xl.get(e);if(n)for(const e of n)e(t)}let Ql=null;const eu="firebase-installations-store";let tu=null;function nu(){return tu||(tu=ie("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(eu)}})),tu}async function iu(e,t){const n=Jl(e),i=(await nu()).transaction(eu,"readwrite"),r=i.objectStore(eu),s=await r.get(n);return await r.put(t,n),await i.done,s&&s.fid===t.fid||Yl(e,t.fid),t}async function ru(e){const t=Jl(e),n=(await nu()).transaction(eu,"readwrite");await n.objectStore(eu).delete(t),await n.done}async function su(e,t){const n=Jl(e),i=(await nu()).transaction(eu,"readwrite"),r=i.objectStore(eu),s=await r.get(n),o=t(s);return void 0===o?await r.delete(n):await r.put(o,n),await i.done,!o||s&&s.fid===o.fid||Yl(e,o.fid),o}async function ou(e){let t;const n=await su(e.appConfig,n=>{const i=function(e){const t=e||{fid:Gl(),registrationStatus:0};return hu(t)}(n),r=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(jl.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},i=async function(e,t){try{const n=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const i=Fl(e),r=zl(e),s=t.getImmediate({optional:!0});if(s){const e=await s.getHeartbeatsHeader();e&&r.append("x-firebase-client",e)}const o={fid:n,authVersion:Ul,appId:e.appId,sdkVersion:Ll},a={method:"POST",headers:r,body:JSON.stringify(o)},c=await ql(()=>fetch(i,a));if(c.ok){const e=await c.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:Bl(e.authToken)}}throw await Hl("Create Installation",c)}(e,t);return iu(e.appConfig,n)}catch(n){throw $l(n)&&409===n.customData.serverCode?await ru(e.appConfig):await iu(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:i}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:au(e)}:{installationEntry:t}}(e,i);return t=r.registrationPromise,r.installationEntry});return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function au(e){let t=await cu(e.appConfig);for(;1===t.registrationStatus;)await Wl(100),t=await cu(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await ou(e);return n||t}return t}function cu(e){return su(e,e=>{if(!e)throw jl.create("installation-not-found");return hu(e)})}function hu(e){return 1===(t=e).registrationStatus&&t.registrationTime+Dl<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function lu({appConfig:e,heartbeatServiceProvider:t},n){const i=function(e,{fid:t}){return`${Fl(e)}/${t}/authTokens:generate`}(e,n),r=Vl(e,n),s=t.getImmediate({optional:!0});if(s){const e=await s.getHeartbeatsHeader();e&&r.append("x-firebase-client",e)}const o={installation:{sdkVersion:Ll,appId:e.appId}},a={method:"POST",headers:r,body:JSON.stringify(o)},c=await ql(()=>fetch(i,a));if(c.ok){return Bl(await c.json())}throw await Hl("Generate Auth Token",c)}async function uu(e,t=!1){let n;const i=await su(e.appConfig,i=>{if(!pu(i))throw jl.create("not-registered");const r=i.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+Ml}(e)}(r))return i;if(1===r.requestStatus)return n=async function(e,t){let n=await du(e.appConfig);for(;1===n.authToken.requestStatus;)await Wl(100),n=await du(e.appConfig);const i=n.authToken;return 0===i.requestStatus?uu(e,t):i}(e,t),i;{if(!navigator.onLine)throw jl.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}(i);return n=async function(e,t){try{const n=await lu(e,t),i={...t,authToken:n};return await iu(e.appConfig,i),n}catch(n){if(!$l(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n={...t,authToken:{requestStatus:0}};await iu(e.appConfig,n)}else await ru(e.appConfig);throw n}}(e,t),t}});return n?await n:i.authToken}function du(e){return su(e,e=>{if(!pu(e))throw jl.create("not-registered");const t=e.authToken;return 1===(n=t).requestStatus&&n.requestTime+Dl<Date.now()?{...e,authToken:{requestStatus:0}}:e;var n})}function pu(e){return void 0!==e&&2===e.registrationStatus}async function fu(e,t=!1){const n=e;await async function(e){const{registrationPromise:t}=await ou(e);t&&await t}(n);return(await uu(n,t)).token}function gu(e){return jl.create("missing-app-config-values",{valueName:e})}const mu="installations",yu=e=>{const t=We(e.getProvider("app").getImmediate(),mu).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:i}=await ou(t);return i?i.catch(console.error):uu(t).catch(console.error),n.fid}(t),getToken:e=>fu(t,e)}};qe(new L(mu,e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw gu("App Configuration");if(!e.name)throw gu("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw gu(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:We(t,"heartbeat"),_delete:()=>Promise.resolve()}},"PUBLIC")),qe(new L("installations-internal",yu,"PRIVATE")),Qe(Nl,xl),Qe(Nl,xl,"esm2020");const _u="analytics",wu="https://www.googletagmanager.com/gtag/js",vu=new V("@firebase/analytics"),bu=new I("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});function Tu(e){if(!e.startsWith(wu)){const t=bu.create("invalid-gtag-resource",{gtagURL:e});return vu.warn(t.message),""}return e}function Eu(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function Iu(e,t){const n=function(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}("firebase-js-sdk-policy",{createScriptURL:Tu}),i=document.createElement("script"),r=`${wu}?l=${e}&id=${t}`;i.src=n?n?.createScriptURL(r):r,i.async=!0,document.head.appendChild(i)}function Su(e,t,n,i){return async function(r,...s){try{if("event"===r){const[i,r]=s;await async function(e,t,n,i,r){try{let s=[];if(r&&r.send_to){let e=r.send_to;Array.isArray(e)||(e=[e]);const i=await Eu(n);for(const n of e){const e=i.find(e=>e.measurementId===n),r=e&&t[e.appId];if(!r){s=[];break}s.push(r)}}0===s.length&&(s=Object.values(t)),await Promise.all(s),e("event",i,r||{})}catch(e){vu.error(e)}}(e,t,n,i,r)}else if("config"===r){const[r,o]=s;await async function(e,t,n,i,r,s){const o=i[r];try{if(o)await t[o];else{const e=(await Eu(n)).find(e=>e.measurementId===r);e&&await t[e.appId]}}catch(e){vu.error(e)}e("config",r,s)}(e,t,n,i,r,o)}else if("consent"===r){const[t,n]=s;e("consent",t,n)}else if("get"===r){const[t,n,i]=s;e("get",t,n,i)}else if("set"===r){const[t]=s;e("set",t)}else e(r,...s)}catch(e){vu.error(e)}}}const ku=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function Au(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function Cu(e,t=ku,n){const{appId:i,apiKey:r,measurementId:s}=e.options;if(!i)throw bu.create("no-app-id");if(!r){if(s)return{measurementId:s,appId:i};throw bu.create("no-api-key")}const o=t.getThrottleMetadata(i)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new Ru;return setTimeout(async()=>{a.abort()},6e4),Pu({appId:i,apiKey:r,measurementId:s},o,a,t)}async function Pu(e,{throttleEndTimeMillis:t,backoffCount:n},i,r=ku){const{appId:s,measurementId:o}=e;try{await function(e,t){return new Promise((n,i)=>{const r=Math.max(t-Date.now(),0),s=setTimeout(n,r);e.addEventListener(()=>{clearTimeout(s),i(bu.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}(i,t)}catch(e){if(o)return vu.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${e?.message}]`),{appId:s,measurementId:o};throw e}try{const t=await async function(e){const{appId:t,apiKey:n}=e,i={method:"GET",headers:Au(n)},r="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",t),s=await fetch(r,i);if(200!==s.status&&304!==s.status){let e="";try{const t=await s.json();t.error?.message&&(e=t.error.message)}catch(e){}throw bu.create("config-fetch-failed",{httpStatus:s.status,responseMessage:e})}return s.json()}(e);return r.deleteThrottleMetadata(s),t}catch(t){const a=t;if(!function(e){if(!(e instanceof E&&e.customData))return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(a)){if(r.deleteThrottleMetadata(s),o)return vu.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${a?.message}]`),{appId:s,measurementId:o};throw t}const c=503===Number(a?.customData?.httpStatus)?x(n,r.intervalMillis,30):x(n,r.intervalMillis),h={throttleEndTimeMillis:Date.now()+c,backoffCount:n+1};return r.setThrottleMetadata(s,h),vu.debug(`Calling attemptFetch again in ${c} millis`),Pu(e,h,i,r)}}class Ru{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function Ou(e,t,n,i,r,s,o){const a=Cu(e);a.then(t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&vu.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>vu.error(e)),t.push(a);const c=async function(){if(!v())return vu.warn(bu.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await b()}catch(e){return vu.warn(bu.create("indexeddb-unavailable",{errorInfo:e?.toString()}).message),!1}return!0}().then(e=>e?i.getId():void 0),[h,l]=await Promise.all([a,c]);(function(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(wu)&&n.src.includes(e))return n;return null})(s)||Iu(s,h.measurementId),r("js",new Date);const u=o?.config??{};return u.origin="firebase",u.update=!0,null!=l&&(u.firebase_id=l),r("config",h.measurementId,u),h.measurementId}class Nu{constructor(e){this.app=e}_delete(){return delete xu[this.app.options.appId],Promise.resolve()}}let xu={},Du=[];const Lu={};let Uu,Mu,ju="dataLayer",$u=!1;function Fu(e,t,n){!function(){const e=[];if(w()&&e.push("This is a browser extension environment."),T()||e.push("Cookies are not available."),e.length>0){const t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),n=bu.create("invalid-analytics-context",{errorInfo:t});vu.warn(n.message)}}();const i=e.options.appId;if(!i)throw bu.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw bu.create("no-api-key");vu.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=xu[i])throw bu.create("already-exists",{id:i});if(!$u){!function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(ju);const{wrappedGtag:e,gtagCore:t}=function(e,t,n,i,r){let s=function(...e){window[i].push(arguments)};return window[r]&&"function"==typeof window[r]&&(s=window[r]),window[r]=Su(s,e,t,n),{gtagCore:s,wrappedGtag:window[r]}}(xu,Du,Lu,ju,"gtag");Mu=e,Uu=t,$u=!0}xu[i]=Ou(e,Du,Lu,t,Uu,ju,n);return new Nu(e)}function Bu(e=Ze()){const t=We(e=D(e),_u);return t.isInitialized()?t.getImmediate():function(e,t={}){const n=We(e,_u);if(n.isInitialized()){const e=n.getImmediate();if(k(t,n.getOptions()))return e;throw bu.create("already-initialized")}const i=n.initialize({options:t});return i}(e)}function Hu(e,t,n,i){e=D(e),async function(e,t,n,i,r){if(r&&r.global)e("event",n,i);else{const r=await t;e("event",n,{...i,send_to:r})}}(Mu,xu[e.app.options.appId],t,n,i).catch(e=>vu.error(e))}const zu="@firebase/analytics",Vu="0.10.18";qe(new L(_u,(e,{options:t})=>Fu(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),qe(new L("analytics-internal",function(e){try{const t=e.getProvider(_u).getImmediate();return{logEvent:(e,n,i)=>Hu(t,e,n,i)}}catch(e){throw bu.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),Qe(zu,Vu),Qe(zu,Vu,"esm2020");const qu="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",Wu="google.c.a.c_id",Ku=1e4;var Gu,Ju;function Xu(e){const t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Yu(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),i=new Uint8Array(n.length);for(let e=0;e<n.length;++e)i[e]=n.charCodeAt(e);return i}!function(e){e[e.DATA_MESSAGE=1]="DATA_MESSAGE",e[e.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"}(Gu||(Gu={})),function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(Ju||(Ju={}));const Zu="fcm_token_details_db",Qu="fcm_token_object_Store";const ed="firebase-messaging-store";let td=null;function nd(){return td||(td=ie("firebase-messaging-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(ed)}})),td}async function id(e){const t=sd(e),n=await nd(),i=await n.transaction(ed).objectStore(ed).get(t);if(i)return i;{const t=await async function(e){if("databases"in indexedDB){const e=(await indexedDB.databases()).map(e=>e.name);if(!e.includes(Zu))return null}let t=null;return(await ie(Zu,5,{upgrade:async(n,i,r,s)=>{if(i<2)return;if(!n.objectStoreNames.contains(Qu))return;const o=s.objectStore(Qu),a=await o.index("fcmSenderId").get(e);if(await o.clear(),a)if(2===i){const e=a;if(!e.auth||!e.p256dh||!e.endpoint)return;t={token:e.fcmToken,createTime:e.createTime??Date.now(),subscriptionOptions:{auth:e.auth,p256dh:e.p256dh,endpoint:e.endpoint,swScope:e.swScope,vapidKey:"string"==typeof e.vapidKey?e.vapidKey:Xu(e.vapidKey)}}}else if(3===i){const e=a;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:Xu(e.auth),p256dh:Xu(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:Xu(e.vapidKey)}}}else if(4===i){const e=a;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:Xu(e.auth),p256dh:Xu(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:Xu(e.vapidKey)}}}}})).close(),await re(Zu),await re("fcm_vapid_details_db"),await re("undefined"),function(e){if(!e||!e.subscriptionOptions)return!1;const{subscriptionOptions:t}=e;return"number"==typeof e.createTime&&e.createTime>0&&"string"==typeof e.token&&e.token.length>0&&"string"==typeof t.auth&&t.auth.length>0&&"string"==typeof t.p256dh&&t.p256dh.length>0&&"string"==typeof t.endpoint&&t.endpoint.length>0&&"string"==typeof t.swScope&&t.swScope.length>0&&"string"==typeof t.vapidKey&&t.vapidKey.length>0}(t)?t:null}(e.appConfig.senderId);if(t)return await rd(e,t),t}}async function rd(e,t){const n=sd(e),i=(await nd()).transaction(ed,"readwrite");return await i.objectStore(ed).put(t,n),await i.done,t}function sd({appConfig:e}){return e.appId}const od=new I("messaging","Messaging",{"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."});function ad({projectId:e}){return`https://fcmregistrations.googleapis.com/v1/projects/${e}/registrations`}async function cd({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 hd({p256dh:e,auth:t,endpoint:n,vapidKey:i}){const r={web:{endpoint:n,auth:t,p256dh:e}};return i!==qu&&(r.web.applicationPubKey=i),r}async function ld(e){const t=await async function(e,t){const n=await e.pushManager.getSubscription();if(n)return n;return e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Yu(t)})}(e.swRegistration,e.vapidKey),n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:Xu(t.getKey("auth")),p256dh:Xu(t.getKey("p256dh"))},i=await id(e.firebaseDependencies);if(i){if(function(e,t){const n=t.vapidKey===e.vapidKey,i=t.endpoint===e.endpoint,r=t.auth===e.auth,s=t.p256dh===e.p256dh;return n&&i&&r&&s}(i.subscriptionOptions,n))return Date.now()>=i.createTime+6048e5?async function(e,t){try{const n=await async function(e,t){const n=await cd(e),i=hd(t.subscriptionOptions),r={method:"PATCH",headers:n,body:JSON.stringify(i)};let s;try{const n=await fetch(`${ad(e.appConfig)}/${t.token}`,r);s=await n.json()}catch(e){throw od.create("token-update-failed",{errorInfo:e?.toString()})}if(s.error){const e=s.error.message;throw od.create("token-update-failed",{errorInfo:e})}if(!s.token)throw od.create("token-update-no-token");return s.token}(e.firebaseDependencies,t),i={...t,token:n,createTime:Date.now()};return await rd(e.firebaseDependencies,i),n}catch(e){throw e}}(e,{token:i.token,createTime:Date.now(),subscriptionOptions:n}):i.token;try{await async function(e,t){const n={method:"DELETE",headers:await cd(e)};try{const i=await fetch(`${ad(e.appConfig)}/${t}`,n),r=await i.json();if(r.error){const e=r.error.message;throw od.create("token-unsubscribe-failed",{errorInfo:e})}}catch(e){throw od.create("token-unsubscribe-failed",{errorInfo:e?.toString()})}}(e.firebaseDependencies,i.token)}catch(e){}return ud(e.firebaseDependencies,n)}return ud(e.firebaseDependencies,n)}async function ud(e,t){const n=await async function(e,t){const n=await cd(e),i=hd(t),r={method:"POST",headers:n,body:JSON.stringify(i)};let s;try{const t=await fetch(ad(e.appConfig),r);s=await t.json()}catch(e){throw od.create("token-subscribe-failed",{errorInfo:e?.toString()})}if(s.error){const e=s.error.message;throw od.create("token-subscribe-failed",{errorInfo:e})}if(!s.token)throw od.create("token-subscribe-no-token");return s.token}(e,t),i={token:n,createTime:Date.now(),subscriptionOptions:t};return await rd(e,i),i.token}function dd(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return function(e,t){if(!t.notification)return;e.notification={};const n=t.notification.title;n&&(e.notification.title=n);const i=t.notification.body;i&&(e.notification.body=i);const r=t.notification.image;r&&(e.notification.image=r);const s=t.notification.icon;s&&(e.notification.icon=s)}(t,e),function(e,t){if(!t.data)return;e.data=t.data}(t,e),function(e,t){if(!t.fcmOptions&&!t.notification?.click_action)return;e.fcmOptions={};const n=t.fcmOptions?.link??t.notification?.click_action;n&&(e.fcmOptions.link=n);const i=t.fcmOptions?.analytics_label;i&&(e.fcmOptions.analyticsLabel=i)}(t,e),t}function pd(e){return od.create("missing-app-config-values",{valueName:e})}class fd{constructor(e,t,n){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const i=function(e){if(!e||!e.options)throw pd("App Configuration Object");if(!e.name)throw pd("App Name");const t=["projectId","apiKey","appId","messagingSenderId"],{options:n}=e;for(const e of t)if(!n[e])throw pd(e);return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}(e);this.firebaseDependencies={app:e,appConfig:i,installations:t,analyticsProvider:n}}_delete(){return Promise.resolve()}}async function gd(e){try{e.swRegistration=await navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}),e.swRegistration.update().catch(()=>{}),await async function(e){return new Promise((t,n)=>{const i=setTimeout(()=>n(new Error("Service worker not registered after 10000 ms")),Ku),r=e.installing||e.waiting;e.active?(clearTimeout(i),t()):r?r.onstatechange=e=>{"activated"===e.target?.state&&(r.onstatechange=null,clearTimeout(i),t())}:(clearTimeout(i),n(new Error("No incoming service worker found.")))})}(e.swRegistration)}catch(e){throw od.create("failed-service-worker-registration",{browserErrorMessage:e?.message})}}async function md(e,t){if(!navigator)throw od.create("only-available-in-window");if("default"===Notification.permission&&await Notification.requestPermission(),"granted"!==Notification.permission)throw od.create("permission-blocked");return await async function(e,t){t?e.vapidKey=t:e.vapidKey||(e.vapidKey=qu)}(e,t?.vapidKey),await async function(e,t){if(t||e.swRegistration||await gd(e),t||!e.swRegistration){if(!(t instanceof ServiceWorkerRegistration))throw od.create("invalid-sw-registration");e.swRegistration=t}}(e,t?.serviceWorkerRegistration),ld(e)}async function yd(e,t,n){const i=function(e){switch(e){case Ju.NOTIFICATION_CLICKED:return"notification_open";case Ju.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(t);(await e.firebaseDependencies.analyticsProvider.get()).logEvent(i,{message_id:n[Wu],message_name:n["google.c.a.c_l"],message_time:n["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)})}async function _d(e,t){const n=t.data;if(!n.isFirebaseMessaging)return;e.onMessageHandler&&n.messageType===Ju.PUSH_RECEIVED&&("function"==typeof e.onMessageHandler?e.onMessageHandler(dd(n)):e.onMessageHandler.next(dd(n)));const i=n.data;var r;"object"==typeof(r=i)&&r&&Wu in r&&"1"===i["google.c.a.e"]&&await yd(e,n.messageType,i)}const wd="@firebase/messaging",vd="0.12.23",bd=e=>{const t=new fd(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",e=>_d(t,e)),t},Td=e=>{const t=e.getProvider("messaging").getImmediate();return{getToken:e=>md(t,e)}};let Ed;qe(new L("messaging",bd,"PUBLIC")),qe(new L("messaging-internal",Td,"PRIVATE")),Qe(wd,vd),Qe(wd,vd,"esm2020"),ba().useDeviceLanguage(),(async()=>{await async function(){try{await b()}catch(e){return!1}return"undefined"!=typeof window&&v()&&T()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}()&&(Ed=Bu(Ia))})(),navigator,window;let Id=!1;window.addEventListener("userEmailChanged",()=>{Id=!0}),function(e,t,n,i){D(e).onAuthStateChanged(t,n,i)}(Aa,e=>{e?(Il.dispatch(al(!0)),Il.dispatch(hl()),Il.dispatch(yl(e.uid)),Il.dispatch(_l(e.displayName||"John Doe")),Il.dispatch(vl(e.email||"")),Il.dispatch(bl(e.photoURL||"")),Il.dispatch(ol(e.displayName||"John Doe")),Il.dispatch(sl(e.photoURL||"")),Id&&!e.emailVerified?co(e).then(()=>{Id=!1}).catch(e=>{Id=!1}):e.emailVerified):(Il.dispatch(al(!1)),Il.dispatch(yl("")),Il.dispatch(_l("John Doe")),Il.dispatch(vl("")),Il.dispatch(bl("")),Il.dispatch(ol("John Doe")),Il.dispatch(sl("")))});const Sd=async()=>function(e){return D(e).signOut()}(Aa),kd=Da`
|
|
150
|
+
`,zn="@firebase/installations",Ln="0.6.19",Bn=1e4,Fn=`w:${Ln}`,Hn="FIS_v2",Kn=36e5,qn=new r("installations","Installations",{"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."});function Wn(e){return e instanceof a&&e.code.includes("request-failed")}function Vn({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function Jn(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function Gn(e,t){const n=(await t.json()).error;return qn.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function Xn({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Zn(e,{refreshToken:t}){const n=Xn(e);return n.append("Authorization",function(e){return`${Hn} ${e}`}(t)),n}async function Yn(e){const t=await e();return t.status>=500&&t.status<600?e():t}function Qn(e){return new Promise(t=>{setTimeout(t,e)})}const ei=/^[cdef][\w-]{21}$/;function ti(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){const t=(n=e,btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_"));var n;return t.substr(0,22)}(e);return ei.test(t)?t:""}catch{return""}}function ni(e){return`${e.appName}!${e.appId}`}const ii=new Map;function ri(e,t){const n=ni(e);oi(n,t),function(e,t){const n=function(){!ai&&"BroadcastChannel"in self&&(ai=new BroadcastChannel("[Firebase] FID Change"),ai.onmessage=e=>{oi(e.data.key,e.data.fid)});return ai}();n&&n.postMessage({key:e,fid:t});0===ii.size&&ai&&(ai.close(),ai=null)}(n,t)}function oi(e,t){const n=ii.get(e);if(n)for(const e of n)e(t)}let ai=null;const si="firebase-installations-store";let ci=null;function li(){return ci||(ci=o("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(si)}})),ci}async function di(e,t){const n=ni(e),i=(await li()).transaction(si,"readwrite"),r=i.objectStore(si),o=await r.get(n);return await r.put(t,n),await i.done,o&&o.fid===t.fid||ri(e,t.fid),t}async function pi(e){const t=ni(e),n=(await li()).transaction(si,"readwrite");await n.objectStore(si).delete(t),await n.done}async function ui(e,t){const n=ni(e),i=(await li()).transaction(si,"readwrite"),r=i.objectStore(si),o=await r.get(n),a=t(o);return void 0===a?await r.delete(n):await r.put(a,n),await i.done,!a||o&&o.fid===a.fid||ri(e,a.fid),a}async function hi(e){let t;const n=await ui(e.appConfig,n=>{const i=function(e){const t=e||{fid:ti(),registrationStatus:0};return yi(t)}(n),r=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(qn.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},i=async function(e,t){try{const n=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const i=Vn(e),r=Xn(e),o=t.getImmediate({optional:!0});if(o){const e=await o.getHeartbeatsHeader();e&&r.append("x-firebase-client",e)}const a={fid:n,authVersion:Hn,appId:e.appId,sdkVersion:Fn},s={method:"POST",headers:r,body:JSON.stringify(a)},c=await Yn(()=>fetch(i,s));if(c.ok){const e=await c.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:Jn(e.authToken)}}throw await Gn("Create Installation",c)}(e,t);return di(e.appConfig,n)}catch(n){throw Wn(n)&&409===n.customData.serverCode?await pi(e.appConfig):await di(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:i}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:fi(e)}:{installationEntry:t}}(e,i);return t=r.registrationPromise,r.installationEntry});return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function fi(e){let t=await gi(e.appConfig);for(;1===t.registrationStatus;)await Qn(100),t=await gi(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await hi(e);return n||t}return t}function gi(e){return ui(e,e=>{if(!e)throw qn.create("installation-not-found");return yi(e)})}function yi(e){return 1===(t=e).registrationStatus&&t.registrationTime+Bn<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function mi({appConfig:e,heartbeatServiceProvider:t},n){const i=function(e,{fid:t}){return`${Vn(e)}/${t}/authTokens:generate`}(e,n),r=Zn(e,n),o=t.getImmediate({optional:!0});if(o){const e=await o.getHeartbeatsHeader();e&&r.append("x-firebase-client",e)}const a={installation:{sdkVersion:Fn,appId:e.appId}},s={method:"POST",headers:r,body:JSON.stringify(a)},c=await Yn(()=>fetch(i,s));if(c.ok){return Jn(await c.json())}throw await Gn("Generate Auth Token",c)}async function wi(e,t=!1){let n;const i=await ui(e.appConfig,i=>{if(!vi(i))throw qn.create("not-registered");const r=i.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+Kn}(e)}(r))return i;if(1===r.requestStatus)return n=async function(e,t){let n=await bi(e.appConfig);for(;1===n.authToken.requestStatus;)await Qn(100),n=await bi(e.appConfig);const i=n.authToken;return 0===i.requestStatus?wi(e,t):i}(e,t),i;{if(!navigator.onLine)throw qn.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}(i);return n=async function(e,t){try{const n=await mi(e,t),i={...t,authToken:n};return await di(e.appConfig,i),n}catch(n){if(!Wn(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n={...t,authToken:{requestStatus:0}};await di(e.appConfig,n)}else await pi(e.appConfig);throw n}}(e,t),t}});return n?await n:i.authToken}function bi(e){return ui(e,e=>{if(!vi(e))throw qn.create("not-registered");const t=e.authToken;return 1===(n=t).requestStatus&&n.requestTime+Bn<Date.now()?{...e,authToken:{requestStatus:0}}:e;var n})}function vi(e){return void 0!==e&&2===e.registrationStatus}async function _i(e,t=!1){const n=e;await async function(e){const{registrationPromise:t}=await hi(e);t&&await t}(n);return(await wi(n,t)).token}function $i(e){return qn.create("missing-app-config-values",{valueName:e})}const xi="installations",Si=e=>{const t=e.getProvider("app").getImmediate(),n=i(t,xi).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:i}=await hi(t);return i?i.catch(console.error):wi(t).catch(console.error),n.fid}(n),getToken:e=>_i(n,e)}};t(new n(xi,e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw $i("App Configuration");if(!e.name)throw $i("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw $i(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:i(t,"heartbeat"),_delete:()=>Promise.resolve()}},"PUBLIC")),t(new n("installations-internal",Si,"PRIVATE")),e(zn,Ln),e(zn,Ln,"esm2020");const Ai="analytics",ki="https://www.googletagmanager.com/gtag/js",Ei=new s("@firebase/analytics"),Pi=new r("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});function Ci(e){if(!e.startsWith(ki)){const t=Pi.create("invalid-gtag-resource",{gtagURL:e});return Ei.warn(t.message),""}return e}function Ii(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function Ti(e,t){const n=function(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}("firebase-js-sdk-policy",{createScriptURL:Ci}),i=document.createElement("script"),r=`${ki}?l=${e}&id=${t}`;i.src=n?n?.createScriptURL(r):r,i.async=!0,document.head.appendChild(i)}function Oi(e,t,n,i){return async function(r,...o){try{if("event"===r){const[i,r]=o;await async function(e,t,n,i,r){try{let o=[];if(r&&r.send_to){let e=r.send_to;Array.isArray(e)||(e=[e]);const i=await Ii(n);for(const n of e){const e=i.find(e=>e.measurementId===n),r=e&&t[e.appId];if(!r){o=[];break}o.push(r)}}0===o.length&&(o=Object.values(t)),await Promise.all(o),e("event",i,r||{})}catch(e){Ei.error(e)}}(e,t,n,i,r)}else if("config"===r){const[r,a]=o;await async function(e,t,n,i,r,o){const a=i[r];try{if(a)await t[a];else{const e=(await Ii(n)).find(e=>e.measurementId===r);e&&await t[e.appId]}}catch(e){Ei.error(e)}e("config",r,o)}(e,t,n,i,r,a)}else if("consent"===r){const[t,n]=o;e("consent",t,n)}else if("get"===r){const[t,n,i]=o;e("get",t,n,i)}else if("set"===r){const[t]=o;e("set",t)}else e(r,...o)}catch(e){Ei.error(e)}}}const Ri=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function ji(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function Di(e,t=Ri,n){const{appId:i,apiKey:r,measurementId:o}=e.options;if(!i)throw Pi.create("no-app-id");if(!r){if(o)return{measurementId:o,appId:i};throw Pi.create("no-api-key")}const a=t.getThrottleMetadata(i)||{backoffCount:0,throttleEndTimeMillis:Date.now()},s=new Mi;return setTimeout(async()=>{s.abort()},6e4),Ui({appId:i,apiKey:r,measurementId:o},a,s,t)}async function Ui(e,{throttleEndTimeMillis:t,backoffCount:n},i,r=Ri){const{appId:o,measurementId:s}=e;try{await function(e,t){return new Promise((n,i)=>{const r=Math.max(t-Date.now(),0),o=setTimeout(n,r);e.addEventListener(()=>{clearTimeout(o),i(Pi.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}(i,t)}catch(e){if(s)return Ei.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${s} provided in the "measurementId" field in the local Firebase config. [${e?.message}]`),{appId:o,measurementId:s};throw e}try{const t=await async function(e){const{appId:t,apiKey:n}=e,i={method:"GET",headers:ji(n)},r="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",t),o=await fetch(r,i);if(200!==o.status&&304!==o.status){let e="";try{const t=await o.json();t.error?.message&&(e=t.error.message)}catch(e){}throw Pi.create("config-fetch-failed",{httpStatus:o.status,responseMessage:e})}return o.json()}(e);return r.deleteThrottleMetadata(o),t}catch(t){const c=t;if(!function(e){if(!(e instanceof a&&e.customData))return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(c)){if(r.deleteThrottleMetadata(o),s)return Ei.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${s} provided in the "measurementId" field in the local Firebase config. [${c?.message}]`),{appId:o,measurementId:s};throw t}const l=503===Number(c?.customData?.httpStatus)?u(n,r.intervalMillis,30):u(n,r.intervalMillis),d={throttleEndTimeMillis:Date.now()+l,backoffCount:n+1};return r.setThrottleMetadata(o,d),Ei.debug(`Calling attemptFetch again in ${l} millis`),Ui(e,d,i,r)}}class Mi{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function Ni(e,t,n,i,r,o,a){const s=Di(e);s.then(t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&Ei.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>Ei.error(e)),t.push(s);const c=async function(){if(!d())return Ei.warn(Pi.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await p()}catch(e){return Ei.warn(Pi.create("indexeddb-unavailable",{errorInfo:e?.toString()}).message),!1}return!0}().then(e=>e?i.getId():void 0),[l,u]=await Promise.all([s,c]);(function(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(ki)&&n.src.includes(e))return n;return null})(o)||Ti(o,l.measurementId),r("js",new Date);const h=a?.config??{};return h.origin="firebase",h.update=!0,null!=u&&(h.firebase_id=u),r("config",l.measurementId,h),l.measurementId}class zi{constructor(e){this.app=e}_delete(){return delete Li[this.app.options.appId],Promise.resolve()}}let Li={},Bi=[];const Fi={};let Hi,Ki,qi="dataLayer",Wi=!1;function Vi(e,t,n){!function(){const e=[];if(l()&&e.push("This is a browser extension environment."),g()||e.push("Cookies are not available."),e.length>0){const t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),n=Pi.create("invalid-analytics-context",{errorInfo:t});Ei.warn(n.message)}}();const i=e.options.appId;if(!i)throw Pi.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw Pi.create("no-api-key");Ei.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=Li[i])throw Pi.create("already-exists",{id:i});if(!Wi){!function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(qi);const{wrappedGtag:e,gtagCore:t}=function(e,t,n,i,r){let o=function(...e){window[i].push(arguments)};return window[r]&&"function"==typeof window[r]&&(o=window[r]),window[r]=Oi(o,e,t,n),{gtagCore:o,wrappedGtag:window[r]}}(Li,Bi,Fi,qi,"gtag");Ki=e,Hi=t,Wi=!0}Li[i]=Ni(e,Bi,Fi,t,Hi,qi,n);return new zi(e)}function Ji(e=h()){e=c(e);const t=i(e,Ai);return t.isInitialized()?t.getImmediate():function(e,t={}){const n=i(e,Ai);if(n.isInitialized()){const e=n.getImmediate();if(f(t,n.getOptions()))return e;throw Pi.create("already-initialized")}const r=n.initialize({options:t});return r}(e)}function Gi(e,t,n,i){e=c(e),async function(e,t,n,i,r){if(r&&r.global)e("event",n,i);else{const r=await t;e("event",n,{...i,send_to:r})}}(Ki,Li[e.app.options.appId],t,n,i).catch(e=>Ei.error(e))}const Xi="@firebase/analytics",Zi="0.10.18";t(new n(Ai,(e,{options:t})=>Vi(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),t(new n("analytics-internal",function(e){try{const t=e.getProvider(Ai).getImmediate();return{logEvent:(e,n,i)=>Gi(t,e,n,i)}}catch(e){throw Pi.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),e(Xi,Zi),e(Xi,Zi,"esm2020");const Yi="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",Qi="google.c.a.c_id",er=1e4;var tr,nr;function ir(e){const t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function rr(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),i=new Uint8Array(n.length);for(let e=0;e<n.length;++e)i[e]=n.charCodeAt(e);return i}!function(e){e[e.DATA_MESSAGE=1]="DATA_MESSAGE",e[e.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"}(tr||(tr={})),function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(nr||(nr={}));const or="fcm_token_details_db",ar="fcm_token_object_Store";const sr="firebase-messaging-store";let cr=null;function lr(){return cr||(cr=o("firebase-messaging-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(sr)}})),cr}async function dr(e){const t=ur(e),n=await lr(),i=await n.transaction(sr).objectStore(sr).get(t);if(i)return i;{const t=await async function(e){if("databases"in indexedDB){const e=(await indexedDB.databases()).map(e=>e.name);if(!e.includes(or))return null}let t=null;return(await o(or,5,{upgrade:async(n,i,r,o)=>{if(i<2)return;if(!n.objectStoreNames.contains(ar))return;const a=o.objectStore(ar),s=await a.index("fcmSenderId").get(e);if(await a.clear(),s)if(2===i){const e=s;if(!e.auth||!e.p256dh||!e.endpoint)return;t={token:e.fcmToken,createTime:e.createTime??Date.now(),subscriptionOptions:{auth:e.auth,p256dh:e.p256dh,endpoint:e.endpoint,swScope:e.swScope,vapidKey:"string"==typeof e.vapidKey?e.vapidKey:ir(e.vapidKey)}}}else if(3===i){const e=s;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:ir(e.auth),p256dh:ir(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:ir(e.vapidKey)}}}else if(4===i){const e=s;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:ir(e.auth),p256dh:ir(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:ir(e.vapidKey)}}}}})).close(),await y(or),await y("fcm_vapid_details_db"),await y("undefined"),function(e){if(!e||!e.subscriptionOptions)return!1;const{subscriptionOptions:t}=e;return"number"==typeof e.createTime&&e.createTime>0&&"string"==typeof e.token&&e.token.length>0&&"string"==typeof t.auth&&t.auth.length>0&&"string"==typeof t.p256dh&&t.p256dh.length>0&&"string"==typeof t.endpoint&&t.endpoint.length>0&&"string"==typeof t.swScope&&t.swScope.length>0&&"string"==typeof t.vapidKey&&t.vapidKey.length>0}(t)?t:null}(e.appConfig.senderId);if(t)return await pr(e,t),t}}async function pr(e,t){const n=ur(e),i=(await lr()).transaction(sr,"readwrite");return await i.objectStore(sr).put(t,n),await i.done,t}function ur({appConfig:e}){return e.appId}const hr=new r("messaging","Messaging",{"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."});function fr({projectId:e}){return`https://fcmregistrations.googleapis.com/v1/projects/${e}/registrations`}async function gr({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 yr({p256dh:e,auth:t,endpoint:n,vapidKey:i}){const r={web:{endpoint:n,auth:t,p256dh:e}};return i!==Yi&&(r.web.applicationPubKey=i),r}async function mr(e){const t=await async function(e,t){const n=await e.pushManager.getSubscription();if(n)return n;return e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:rr(t)})}(e.swRegistration,e.vapidKey),n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:ir(t.getKey("auth")),p256dh:ir(t.getKey("p256dh"))},i=await dr(e.firebaseDependencies);if(i){if(function(e,t){const n=t.vapidKey===e.vapidKey,i=t.endpoint===e.endpoint,r=t.auth===e.auth,o=t.p256dh===e.p256dh;return n&&i&&r&&o}(i.subscriptionOptions,n))return Date.now()>=i.createTime+6048e5?async function(e,t){try{const n=await async function(e,t){const n=await gr(e),i=yr(t.subscriptionOptions),r={method:"PATCH",headers:n,body:JSON.stringify(i)};let o;try{const n=await fetch(`${fr(e.appConfig)}/${t.token}`,r);o=await n.json()}catch(e){throw hr.create("token-update-failed",{errorInfo:e?.toString()})}if(o.error){const e=o.error.message;throw hr.create("token-update-failed",{errorInfo:e})}if(!o.token)throw hr.create("token-update-no-token");return o.token}(e.firebaseDependencies,t),i={...t,token:n,createTime:Date.now()};return await pr(e.firebaseDependencies,i),n}catch(e){throw e}}(e,{token:i.token,createTime:Date.now(),subscriptionOptions:n}):i.token;try{await async function(e,t){const n={method:"DELETE",headers:await gr(e)};try{const i=await fetch(`${fr(e.appConfig)}/${t}`,n),r=await i.json();if(r.error){const e=r.error.message;throw hr.create("token-unsubscribe-failed",{errorInfo:e})}}catch(e){throw hr.create("token-unsubscribe-failed",{errorInfo:e?.toString()})}}(e.firebaseDependencies,i.token)}catch(e){}return wr(e.firebaseDependencies,n)}return wr(e.firebaseDependencies,n)}async function wr(e,t){const n=await async function(e,t){const n=await gr(e),i=yr(t),r={method:"POST",headers:n,body:JSON.stringify(i)};let o;try{const t=await fetch(fr(e.appConfig),r);o=await t.json()}catch(e){throw hr.create("token-subscribe-failed",{errorInfo:e?.toString()})}if(o.error){const e=o.error.message;throw hr.create("token-subscribe-failed",{errorInfo:e})}if(!o.token)throw hr.create("token-subscribe-no-token");return o.token}(e,t),i={token:n,createTime:Date.now(),subscriptionOptions:t};return await pr(e,i),i.token}function br(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return function(e,t){if(!t.notification)return;e.notification={};const n=t.notification.title;n&&(e.notification.title=n);const i=t.notification.body;i&&(e.notification.body=i);const r=t.notification.image;r&&(e.notification.image=r);const o=t.notification.icon;o&&(e.notification.icon=o)}(t,e),function(e,t){if(!t.data)return;e.data=t.data}(t,e),function(e,t){if(!t.fcmOptions&&!t.notification?.click_action)return;e.fcmOptions={};const n=t.fcmOptions?.link??t.notification?.click_action;n&&(e.fcmOptions.link=n);const i=t.fcmOptions?.analytics_label;i&&(e.fcmOptions.analyticsLabel=i)}(t,e),t}function vr(e){return hr.create("missing-app-config-values",{valueName:e})}class _r{constructor(e,t,n){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const i=function(e){if(!e||!e.options)throw vr("App Configuration Object");if(!e.name)throw vr("App Name");const t=["projectId","apiKey","appId","messagingSenderId"],{options:n}=e;for(const e of t)if(!n[e])throw vr(e);return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}(e);this.firebaseDependencies={app:e,appConfig:i,installations:t,analyticsProvider:n}}_delete(){return Promise.resolve()}}async function $r(e){try{e.swRegistration=await navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}),e.swRegistration.update().catch(()=>{}),await async function(e){return new Promise((t,n)=>{const i=setTimeout(()=>n(new Error("Service worker not registered after 10000 ms")),er),r=e.installing||e.waiting;e.active?(clearTimeout(i),t()):r?r.onstatechange=e=>{"activated"===e.target?.state&&(r.onstatechange=null,clearTimeout(i),t())}:(clearTimeout(i),n(new Error("No incoming service worker found.")))})}(e.swRegistration)}catch(e){throw hr.create("failed-service-worker-registration",{browserErrorMessage:e?.message})}}async function xr(e,t){if(!navigator)throw hr.create("only-available-in-window");if("default"===Notification.permission&&await Notification.requestPermission(),"granted"!==Notification.permission)throw hr.create("permission-blocked");return await async function(e,t){t?e.vapidKey=t:e.vapidKey||(e.vapidKey=Yi)}(e,t?.vapidKey),await async function(e,t){if(t||e.swRegistration||await $r(e),t||!e.swRegistration){if(!(t instanceof ServiceWorkerRegistration))throw hr.create("invalid-sw-registration");e.swRegistration=t}}(e,t?.serviceWorkerRegistration),mr(e)}async function Sr(e,t,n){const i=function(e){switch(e){case nr.NOTIFICATION_CLICKED:return"notification_open";case nr.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(t);(await e.firebaseDependencies.analyticsProvider.get()).logEvent(i,{message_id:n[Qi],message_name:n["google.c.a.c_l"],message_time:n["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)})}async function Ar(e,t){const n=t.data;if(!n.isFirebaseMessaging)return;e.onMessageHandler&&n.messageType===nr.PUSH_RECEIVED&&("function"==typeof e.onMessageHandler?e.onMessageHandler(br(n)):e.onMessageHandler.next(br(n)));const i=n.data;var r;"object"==typeof(r=i)&&r&&Qi in r&&"1"===i["google.c.a.e"]&&await Sr(e,n.messageType,i)}const kr="@firebase/messaging",Er="0.12.23",Pr=e=>{const t=new _r(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",e=>Ar(t,e)),t},Cr=e=>{const t=e.getProvider("messaging").getImmediate();return{getToken:e=>xr(t,e)}};let Ir;t(new n("messaging",Pr,"PUBLIC")),t(new n("messaging-internal",Cr,"PRIVATE")),e(kr,Er),e(kr,Er,"esm2020"),m().useDeviceLanguage(),(async()=>{await async function(){try{await p()}catch(e){return!1}return"undefined"!=typeof window&&d()&&g()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}()&&(Ir=Ji(v))})(),navigator,window;let Tr=!1;window.addEventListener("userEmailChanged",()=>{Tr=!0}),w($,e=>{e?(Tn.dispatch(fn(!0)),Tn.dispatch(yn()),Tn.dispatch(Sn(e.uid)),Tn.dispatch(An(e.displayName||"John Doe")),Tn.dispatch(En(e.email||"")),Tn.dispatch(Pn(e.photoURL||"")),Tn.dispatch(hn(e.displayName||"John Doe")),Tn.dispatch(un(e.photoURL||"")),Tr&&!e.emailVerified?_(e).then(()=>{Tr=!1}).catch(e=>{Tr=!1}):e.emailVerified):(Tn.dispatch(fn(!1)),Tn.dispatch(Sn("")),Tn.dispatch(An("John Doe")),Tn.dispatch(En("")),Tn.dispatch(Pn("")),Tn.dispatch(hn("John Doe")),Tn.dispatch(un("")))});const Or=L`
|
|
151
151
|
|
|
152
152
|
.action-button:focus { outline:0; }
|
|
153
153
|
|
|
@@ -199,7 +199,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
199
199
|
cursor: pointer;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
`,
|
|
202
|
+
`,Rr=L`
|
|
203
203
|
|
|
204
204
|
label { font-size: .9em; }
|
|
205
205
|
label {
|
|
@@ -219,7 +219,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
219
219
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
`,
|
|
222
|
+
`,jr=L`
|
|
223
223
|
|
|
224
224
|
input[type=text],
|
|
225
225
|
input[type=email],
|
|
@@ -241,7 +241,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
241
241
|
|
|
242
242
|
input.invalid { background-color: #ffdddd; }
|
|
243
243
|
|
|
244
|
-
`,
|
|
244
|
+
`,Dr=L`
|
|
245
245
|
|
|
246
246
|
/* Switch Login / Sign-up Button */
|
|
247
247
|
.new {
|
|
@@ -257,14 +257,14 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
257
257
|
line-height: 42px;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
`;var
|
|
260
|
+
`;var Ur=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Mr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Nr=class extends Le{constructor(){super(),this.email="",this.password="",this.signIn=async(e,t)=>{const n=x.credential(e,t);await S($,n).catch(e=>{})}}static get styles(){return[Nn,Rr,jr,Or,Dr,L`
|
|
261
261
|
|
|
262
262
|
.double {
|
|
263
263
|
display: grid;
|
|
264
264
|
grid-template-columns: 1fr auto;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
`]}render(){return
|
|
267
|
+
`]}render(){return $e`
|
|
268
268
|
|
|
269
269
|
<!-- Log-in State -->
|
|
270
270
|
<form
|
|
@@ -308,14 +308,14 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
308
308
|
|
|
309
309
|
</form>
|
|
310
310
|
|
|
311
|
-
`}change(){
|
|
311
|
+
`}change(){Tn.dispatch(mn())}handleEmail(e){const t=e.target;this.email=t.value}handlePassword(e){const t=e.target;this.password=t.value}_handleSubmit(e){e.preventDefault()}login(){this.email.length<4?alert("Please enter an email address."):this.password.length<4?alert("Please enter a password."):this.signIn(this.email,this.password)}};Ur([We(),Mr("design:type",Object)],Nr.prototype,"email",void 0),Ur([We(),Mr("design:type",Object)],Nr.prototype,"password",void 0),Nr=Ur([Fe("user-log-in"),Mr("design:paramtypes",[])],Nr);var zr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Lr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Br=class extends Le{constructor(){super(),this.email="",this.password="",this.newAccount=async(e,t)=>{await A($,e,t).then(e=>{const t=e.user;_(t).then(()=>{})}).then(()=>{(async()=>{Gi(Ir,"create_account")})()})}}static get styles(){return[Nn,Rr,jr,Or,Dr,L`
|
|
312
312
|
|
|
313
313
|
.double {
|
|
314
314
|
display: grid;
|
|
315
315
|
grid-template-columns: 1fr auto;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
`]}render(){return
|
|
318
|
+
`]}render(){return $e`
|
|
319
319
|
|
|
320
320
|
<!-- Sign Up State-->
|
|
321
321
|
<form
|
|
@@ -362,7 +362,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
362
362
|
|
|
363
363
|
</form>
|
|
364
364
|
|
|
365
|
-
`}change(){
|
|
365
|
+
`}change(){Tn.dispatch(mn())}_handleSubmit(e){e.preventDefault()}handleEmail(e){const t=e.target;this.email=t.value}handlePassword(e){const t=e.target;this.password=t.value}signUp(){this.email.length<4?alert("Please enter an email address."):this.password.length<4?alert("Please enter a password."):this.newAccount(this.email,this.password)}};zr([We(),Lr("design:type",Object)],Br.prototype,"email",void 0),zr([We(),Lr("design:type",Object)],Br.prototype,"password",void 0),Br=zr([Fe("user-sign-up"),Lr("design:paramtypes",[])],Br);var Fr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Hr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Kr=class extends(Ve(Tn)(Le)){constructor(){super(),this.settingsURL="",this.drawer=!1,this.subscribe=!1,this._name="",this._log=!1,this._sign=!1}stateChanged(e){this._name=e.backend.name,this.drawer=e.frontend.drawer,this._log=e.frontend.login,this._sign=e.frontend.register}firstUpdated(){this.shadowRoot.querySelector(".close").addEventListener("click",()=>{Tn.dispatch(gn())}),this.shadowRoot.querySelector(".leave").addEventListener("click",()=>{this._log&&(async()=>{b($)})(),Tn.dispatch(gn())})}static get styles(){return[Rn,jn,Dn,Un,Mn,Nn]}render(){return $e`
|
|
366
366
|
|
|
367
367
|
<!-- Drawer Wrapper -->
|
|
368
368
|
<section
|
|
@@ -372,7 +372,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
372
372
|
<header class="exit">
|
|
373
373
|
<div></div>
|
|
374
374
|
<h3>${this._log?this._name:this._sign===this.subscribe?"Subscribe":"Login"} </h3>
|
|
375
|
-
<button class="close">${
|
|
375
|
+
<button class="close">${On}</button>
|
|
376
376
|
</header>
|
|
377
377
|
|
|
378
378
|
<!-- Logged-out State -->
|
|
@@ -405,7 +405,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
405
405
|
|
|
406
406
|
</section>
|
|
407
407
|
|
|
408
|
-
`}};
|
|
408
|
+
`}};Fr([qe({type:String,reflect:!0}),Hr("design:type",Object)],Kr.prototype,"settingsURL",void 0),Fr([qe({type:Boolean,attribute:!0,reflect:!0}),Hr("design:type",Object)],Kr.prototype,"drawer",void 0),Fr([qe({type:Boolean,attribute:!0,reflect:!0}),Hr("design:type",Object)],Kr.prototype,"subscribe",void 0),Fr([We(),Hr("design:type",Object)],Kr.prototype,"_name",void 0),Fr([We(),Hr("design:type",Object)],Kr.prototype,"_log",void 0),Fr([We(),Hr("design:type",Object)],Kr.prototype,"_sign",void 0),Kr=Fr([Fe("user-drawer"),Hr("design:paramtypes",[])],Kr);const qr=L`
|
|
409
409
|
|
|
410
410
|
nav { overflow: hidden; }
|
|
411
411
|
|
|
@@ -454,7 +454,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
454
454
|
section[on] { display: grid; }
|
|
455
455
|
section { display: none; }
|
|
456
456
|
|
|
457
|
-
`;var
|
|
457
|
+
`;var Wr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Vr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class Jr extends(Ve(Tn)(Le)){constructor(){super(),this.photo="",this.emptyArtwork="",this.user="",this.login=!1,this.progress=0,this.error="",this.status="",this.dispatchPhoto=async e=>{$.currentUser&&(await k($.currentUser,{photoURL:e}).catch(e=>{}),Tn.dispatch(Pn(e)))},this.progress=0,this.error="",this.status=""}stateChanged(e){this.login=e.frontend.login,this.user=e.backend.userId,this.photo=e.backend.photoURL}static get styles(){return[Rr,L`
|
|
458
458
|
|
|
459
459
|
:host {
|
|
460
460
|
box-sizing: border-box;
|
|
@@ -473,7 +473,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
473
473
|
box-shadow: 1px 1px 2px black, 0 0 25px grey, 0 0 5px #fff;
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
`]}render(){return
|
|
476
|
+
`]}render(){return $e`
|
|
477
477
|
<label
|
|
478
478
|
for="pwa-uploader"
|
|
479
479
|
style="
|
|
@@ -539,11 +539,11 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
539
539
|
</label>
|
|
540
540
|
|
|
541
541
|
<p style="text-align:center;">${this.status}${this.error}</p>
|
|
542
|
-
`}async saveImage(){const e=this.shadowRoot.querySelector(".uploader");if(
|
|
542
|
+
`}async saveImage(){const e=this.shadowRoot.querySelector(".uploader");if($.currentUser){this.error="",this.status="Uploading...";const t=this.shadowRoot.querySelector("#photoURL");if(!t)return;const n=E(P,"/pwa-auth/"+this.user+"/"+t.files[0].name),i={cacheControl:"public,max-age=300",contentType:t.files[0].type},r=C(n,t.files[0],i);r.on("state_changed",t=>{switch(this.progress=t.bytesTransferred/t.totalBytes*100,this.status=`Upload is ${Math.round(this.progress)}% done`,t.state){case"paused":this.status="Upload is paused";break;case"running":this.status=`Upload is running (${Math.round(this.progress)}%)`}let n=0;t.totalBytes>0&&(n=t.bytesTransferred/t.totalBytes*100),isFinite(n)?(e.value=n,e.textContent=`${Math.round(n)}%`):(e.value=0,e.textContent="0%")},t=>{this.error=`Upload failed: ${t.message}`,this.status="",e.value=0,e.textContent="Error"},async()=>{await I(r.snapshot.ref).then(t=>{T(n,i).then(()=>{}).catch(e=>{}),O&&(k(O,{photoURL:t}).then(()=>{e.value=100,e.textContent="Complete"}),this.status="User profile updated successfully!",this.dispatchPhoto(t))}).catch(()=>{})})}}}Wr([qe(),Vr("design:type",Object)],Jr.prototype,"photo",void 0),Wr([qe({type:String,reflect:!0}),Vr("design:type",Object)],Jr.prototype,"emptyArtwork",void 0),Wr([We(),Vr("design:type",Object)],Jr.prototype,"user",void 0),Wr([We(),Vr("design:type",Boolean)],Jr.prototype,"login",void 0),Wr([We(),Vr("design:type",Number)],Jr.prototype,"progress",void 0),Wr([We(),Vr("design:type",String)],Jr.prototype,"error",void 0),Wr([We(),Vr("design:type",String)],Jr.prototype,"status",void 0),customElements.define("contact-photo",Jr);var Gr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Xr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class Zr extends(Ve(Tn)(Le)){constructor(){super(),this.value="",this.login=!1,this.default=e=>{e.preventDefault()},this.alertProfile=async()=>{$.currentUser?await k($.currentUser,{displayName:this.value}).then(()=>{Tn.dispatch(An(this.value))}).then(()=>{alert("updated name:"+this.value)}):alert("Please Login")}}stateChanged(e){this.login=e.frontend.login,this.value=e.backend.name}static get styles(){return[Rr,jr,Or,L`
|
|
543
543
|
|
|
544
544
|
:host, form { display: grid; }
|
|
545
545
|
|
|
546
|
-
`]}render(){return
|
|
546
|
+
`]}render(){return $e`
|
|
547
547
|
|
|
548
548
|
<form
|
|
549
549
|
@submit="${this.default}">
|
|
@@ -567,7 +567,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
567
567
|
|
|
568
568
|
</form>
|
|
569
569
|
|
|
570
|
-
`}handleInput(e){const t=e.target;this.value=t.value}}
|
|
570
|
+
`}handleInput(e){const t=e.target;this.value=t.value}}Gr([qe({type:String,reflect:!0}),Xr("design:type",Object)],Zr.prototype,"value",void 0),Gr([We(),Xr("design:type",Boolean)],Zr.prototype,"login",void 0),customElements.define("input-name",Zr);var Yr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Qr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class eo extends(Ve(Tn)(Le)){constructor(){super(),this.email="",this.login=!1,this.mail="",this.default=e=>{e.preventDefault()},this.saveEmail=async()=>{if($.currentUser){let e=this.shadowRoot?.querySelector("#pwa-email");await R($.currentUser,e.value).catch(e=>{});const t=new CustomEvent("userEmailChanged",{detail:{email:e.value}});window.dispatchEvent(t),alert("Email Updated")}}}stateChanged(e){this.login=e.frontend.login,this.mail=e.backend.email}handleEmail(e){const t=e.target;this.mail=t.value}static get styles(){return[Rr,jr,Or,L`
|
|
571
571
|
|
|
572
572
|
:host {
|
|
573
573
|
display: grid;
|
|
@@ -575,7 +575,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
575
575
|
|
|
576
576
|
form { display: grid; }
|
|
577
577
|
|
|
578
|
-
`]}render(){return
|
|
578
|
+
`]}render(){return $e`
|
|
579
579
|
|
|
580
580
|
<form
|
|
581
581
|
autocomplete="off"
|
|
@@ -599,7 +599,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
599
599
|
|
|
600
600
|
</form>
|
|
601
601
|
|
|
602
|
-
`}}
|
|
602
|
+
`}}Yr([qe({type:String,reflect:!0}),Qr("design:type",Object)],eo.prototype,"email",void 0),Yr([We(),Qr("design:type",Boolean)],eo.prototype,"login",void 0),Yr([We(),Qr("design:type",String)],eo.prototype,"mail",void 0),customElements.define("contact-email",eo);var to=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},no=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class io extends(Ve(Tn)(Le)){constructor(){super(),this.message="",this.password="",this.login=!1,this.default=e=>{e.preventDefault()},this.updatePass=async e=>{$.currentUser?await j($.currentUser,e).then(()=>{}).catch(e=>{}):alert("Please Login")}}firstUpdated(){this.shadowRoot.querySelector(".pass").addEventListener("click",()=>{this.alertPassword()})}stateChanged(e){this.login=e.frontend.login}handleInputChange(e){const t=e.target;this.password=t.value}static get styles(){return[Rr,jr,Or,L`
|
|
603
603
|
|
|
604
604
|
:host{
|
|
605
605
|
display: grid;
|
|
@@ -609,7 +609,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
609
609
|
|
|
610
610
|
p.error { color: red; }
|
|
611
611
|
|
|
612
|
-
`]}render(){return
|
|
612
|
+
`]}render(){return $e`
|
|
613
613
|
|
|
614
614
|
<form
|
|
615
615
|
autocomplete="off"
|
|
@@ -639,7 +639,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
639
639
|
class="action-button pass"
|
|
640
640
|
?disabled="${!1===this.login}">Update</button>
|
|
641
641
|
|
|
642
|
-
${this.message
|
|
642
|
+
${this.message?$e`
|
|
643
643
|
|
|
644
644
|
<p
|
|
645
645
|
class=${this.message.includes("Password entered")?"":"error"}
|
|
@@ -653,7 +653,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
653
653
|
|
|
654
654
|
</form>
|
|
655
655
|
|
|
656
|
-
`}alertPassword(){this.password?this.password.length<8?this.message="Password must be at least 8 characters long":(this.message="Password entered:",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.test(this.password)
|
|
656
|
+
`}alertPassword(){this.password?this.password.length<8?this.message="Password must be at least 8 characters long":(this.message="Password entered:",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.test(this.password)?$.currentUser?this.updatePass(this.password):alert("Please Login"):this.message="Password must include letters, numbers, and be 8+ characters"):this.message="Please enter a password"}}to([We(),no("design:type",String)],io.prototype,"message",void 0),to([We(),no("design:type",String)],io.prototype,"password",void 0),to([We(),no("design:type",Boolean)],io.prototype,"login",void 0),customElements.define("input-password",io);var ro=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},oo=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class ao extends(Ve(Tn)(Le)){constructor(){super(),this.login=!1,this.email="",this.officialDelete=async()=>{if($.currentUser)return $.currentUser.delete().then(()=>{}).catch(()=>{});alert("Please Sign-in")}}firstUpdated(){this.shadowRoot.querySelector(".deleteUser").addEventListener("click",()=>{this.alertDelete()})}stateChanged(e){this.login=e.frontend.login,this.email=e.backend.email}static get styles(){return[Or,L`
|
|
657
657
|
|
|
658
658
|
:host {
|
|
659
659
|
display: grid;
|
|
@@ -664,7 +664,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
664
664
|
padding: 0 16px;
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
-
`]}render(){return
|
|
667
|
+
`]}render(){return $e`
|
|
668
668
|
|
|
669
669
|
<p>Permanently delete the user account and data related to: ${this.email}</p>
|
|
670
670
|
|
|
@@ -672,7 +672,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
672
672
|
class="action-button deleteUser"
|
|
673
673
|
?disabled="${!1===this.login}">Delete</button>
|
|
674
674
|
|
|
675
|
-
`}alertDelete(){
|
|
675
|
+
`}alertDelete(){$.currentUser?this.deleteUser():alert("Please Login")}deleteUser(){1==confirm("Delete Account?")&&this.officialDelete()}}ro([We(),oo("design:type",Boolean)],ao.prototype,"login",void 0),ro([We(),oo("design:type",String)],ao.prototype,"email",void 0),customElements.define("delete-user",ao);var so=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},co=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let lo=class extends(Ve(Tn)(Le)){constructor(){super(),this.emptyArtwork="",this.profileTopic="",this.name=""}firstUpdated(){this.querySelectorAll("form").forEach(e=>{e.preventDefault()}),this.shadowRoot.querySelector("button[value=profile]").addEventListener("click",()=>{Tn.dispatch(pn("profile"))}),this.shadowRoot.querySelector("button[value=verification]").addEventListener("click",()=>{Tn.dispatch(pn("verification"))}),this.shadowRoot.querySelector("button[value=password]").addEventListener("click",()=>{Tn.dispatch(pn("password"))}),this.shadowRoot.querySelector("button[value=delete]").addEventListener("click",()=>{Tn.dispatch(pn("delete"))})}stateChanged(e){this.profileTopic=e.frontend.settings,this.name=e.backend.name}static get styles(){return[qr,Nn,L`
|
|
676
676
|
|
|
677
677
|
/* Button Padding for Border Outline */
|
|
678
678
|
:host {
|
|
@@ -709,7 +709,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
|
|
712
|
-
`]}render(){return
|
|
712
|
+
`]}render(){return $e`
|
|
713
713
|
|
|
714
714
|
<!-- Page Menu -->
|
|
715
715
|
<nav>
|
|
@@ -798,7 +798,7 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
798
798
|
|
|
799
799
|
</section>
|
|
800
800
|
|
|
801
|
-
`}};
|
|
801
|
+
`}};so([qe({type:String,reflect:!0}),co("design:type",Object)],lo.prototype,"emptyArtwork",void 0),so([We(),co("design:type",Object)],lo.prototype,"profileTopic",void 0),so([We(),co("design:type",Object)],lo.prototype,"name",void 0),lo=so([Fe("user-settings"),co("design:paramtypes",[])],lo);const po=L`
|
|
802
802
|
|
|
803
803
|
:host {
|
|
804
804
|
margin: auto;
|
|
@@ -855,14 +855,14 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
855
855
|
margin: auto;
|
|
856
856
|
}
|
|
857
857
|
|
|
858
|
-
`;var
|
|
858
|
+
`;var uo=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ho=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let fo=class extends(Ve(Tn)(Le)){constructor(){super(),this.subscribe=!1,this.emptyArtwork="",this._user=!1,this._photoURL=""}firstUpdated(){this.shadowRoot.querySelector(".toggles").addEventListener("click",()=>{Tn.dispatch(gn())})}stateChanged(e){this._user=e.frontend.login,this._photoURL=e.backend.photoURL}static get styles(){return[po]}render(){return $e`
|
|
859
859
|
|
|
860
860
|
<!-- two classes: icon / login -->
|
|
861
861
|
<button
|
|
862
862
|
class="${this._user?"icon":"login"} toggles"
|
|
863
863
|
aria-label="login">
|
|
864
864
|
|
|
865
|
-
${this._user
|
|
865
|
+
${this._user?$e`
|
|
866
866
|
<!-- <div
|
|
867
867
|
class = "iconArea"> -->
|
|
868
868
|
<input
|
|
@@ -877,5 +877,5 @@ const e=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charC
|
|
|
877
877
|
|
|
878
878
|
</button>
|
|
879
879
|
|
|
880
|
-
`}};
|
|
880
|
+
`}};uo([qe({type:Boolean,reflect:!0}),ho("design:type",Object)],fo.prototype,"subscribe",void 0),uo([qe({type:String,reflect:!0}),ho("design:type",Object)],fo.prototype,"emptyArtwork",void 0),uo([We(),ho("design:type",Object)],fo.prototype,"_user",void 0),uo([We(),ho("design:type",Object)],fo.prototype,"_photoURL",void 0),fo=uo([Fe("user-icon"),ho("design:paramtypes",[])],fo);export{Kr as UserDrawer,fo as UserIcon,lo as UserSettings};
|
|
881
881
|
//# sourceMappingURL=pwa-auth.js.map
|