(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{94258:function(e,t,n){"use strict";n.d(t,{Jn:function(){return b},qX:function(){return m},Xd:function(){return p},Mq:function(){return _},ZF:function(){return w},KN:function(){return I}});var r=n(30909),i=n(76934),o=n(74444);class s{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const a="@firebase/app",c=new i.Yd("@firebase/app"),u="[DEFAULT]",l={[a]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},h=new Map,d=new Map;function f(e,t){try{e.container.addComponent(t)}catch(n){c.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function p(e){const t=e.name;if(d.has(t))return c.debug(`There were multiple attempts to register component ${t}.`),!1;d.set(t,e);for(const n of h.values())f(n,e);return!0}function m(e,t){return e.container.getProvider(t)}const g={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","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","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."},v=new o.LL("app","Firebase",g);class y{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new r.wA("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 v.create("app-deleted",{appName:this._name})}}const b="9.1.2";function w(e,t={}){if("object"!==typeof t){t={name:t}}const n=Object.assign({name:u,automaticDataCollectionEnabled:!1},t),i=n.name;if("string"!==typeof i||!i)throw v.create("bad-app-name",{appName:String(i)});const s=h.get(i);if(s){if((0,o.vZ)(e,s.options)&&(0,o.vZ)(n,s.config))return s;throw v.create("duplicate-app",{appName:i})}const a=new r.H0(i);for(const r of d.values())a.addComponent(r);const c=new y(e,n,a);return h.set(i,c),c}function _(e="[DEFAULT]"){const t=h.get(e);if(!t)throw v.create("no-app",{appName:e});return t}function I(e,t,n){var i;let o=null!==(i=l[e])&&void 0!==i?i:e;n&&(o+=`-${n}`);const s=o.match(/\s|\//),a=t.match(/\s|\//);if(s||a){const e=[`Unable to register library "${o}" with version "${t}":`];return s&&e.push(`library name "${o}" contains illegal characters (whitespace or "/")`),s&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void c.warn(e.join(" "))}p(new r.wA(`${o}-version`,(()=>({library:o,version:t})),"VERSION"))}var k;p(new r.wA("platform-logger",(e=>new s(e)),"PRIVATE")),I(a,"0.7.3",k),I("fire-js","")},30909:function(e,t,n){"use strict";n.d(t,{wA:function(){return o},H0:function(){return c}});var r=n(70655),i=n(74444),o=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),s="[DEFAULT]",a=function(){function e(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}return e.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i.BH;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(o){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t,n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;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:s})}catch(d){}try{for(var i=(0,r.XA)(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var a=(0,r.CR)(o.value,2),c=a[0],u=a[1],l=this.normalizeInstanceIdentifier(c);try{var h=this.getOrInitializeService({instanceIdentifier:l});u.resolve(h)}catch(d){}}}catch(f){t={error:f}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=s),this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return(0,r.mG)(this,void 0,void 0,(function(){var e;return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all((0,r.ev)((0,r.ev)([],(0,r.CR)(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),(0,r.CR)(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=s),this.instances.has(e)},e.prototype.getOptions=function(e){return void 0===e&&(e=s),this.instancesOptions.get(e)||{}},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var i=e.options,o=void 0===i?{}:i,s=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(s))throw Error(this.name+"("+s+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var a=this.getOrInitializeService({instanceIdentifier:s,options:o});try{for(var c=(0,r.XA)(this.instancesDeferred.entries()),u=c.next();!u.done;u=c.next()){var l=(0,r.CR)(u.value,2),h=l[0],d=l[1];s===this.normalizeInstanceIdentifier(h)&&d.resolve(a)}}catch(f){t={error:f}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return a},e.prototype.onInit=function(e,t){var n,r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);var o=this.instances.get(r);return o&&e(o,r),function(){i.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,i,o=this.onInitCallbacks.get(t);if(o)try{for(var s=(0,r.XA)(o),a=s.next();!a.done;a=s.next()){var c=a.value;try{c(e,t)}catch(u){}}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,o=this.instances.get(n);if(!o&&this.component&&(o=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===s?void 0:t),options:i}),this.instances.set(n,o),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(o,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,o)}catch(a){}return o||null},e.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e=s),this.component?this.component.multipleInstances?e:s:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}();var c=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new a(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}()},76934:function(e,t,n){"use strict";n.d(t,{in:function(){return i},Yd:function(){return u}});const r=[];var i;!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"}(i||(i={}));const o={debug:i.DEBUG,verbose:i.VERBOSE,info:i.INFO,warn:i.WARN,error:i.ERROR,silent:i.SILENT},s=i.INFO,a={[i.DEBUG]:"log",[i.VERBOSE]:"log",[i.INFO]:"info",[i.WARN]:"warn",[i.ERROR]:"error"},c=(e,t,...n)=>{if(t>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},i={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_,r=[];for(let i=0;i>2,l=(3&t)<<4|s>>4;let h=(15&s)<<2|c>>6,d=63&c;a||(d=64,o||(h=64)),r.push(n[u],n[l],n[h],n[d])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(r(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{const o=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(c),64!==s){const e=o<<4&240|s>>2;if(r.push(e),64!==a){const e=s<<6&192|a;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_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},o=function(e){try{return i.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};class s{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 a(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function c(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(a())}function u(){const e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function l(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function h(){const e=a();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}class d extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,d.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,f.prototype.create)}}class f{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],o=i?function(e,t){return e.replace(p,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(i,n):"Error",s=`${this.serviceName}: ${o} (${r}).`;return new d(r,s,n)}}const p=/\{\$([^}]+)}/g;function m(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function g(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],o=t[i];if(v(n)&&v(o)){if(!g(n,o))return!1}else if(n!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function v(e){return null!==e&&"object"===typeof e}function y(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function b(e){const t={};return e.replace(/^\?/,"").split("&").forEach((e=>{if(e){const[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}})),t}function w(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function _(e,t){const n=new I(e,t);return n.subscribe.bind(n)}class I{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 r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=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===r.next&&(r.next=k),void 0===r.error&&(r.error=k),void 0===r.complete&&(r.complete=k);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}})),this.observers.push(r),i}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{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(n){"undefined"!==typeof console&&console.error&&console.error(n)}}))}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 k(){}function O(e){return e&&e._delegate?e._delegate:e}},15503:function(e,t,n){"use strict";n.d(t,{Mq:function(){return r.Mq},ZF:function(){return r.ZF}});var r=n(94258);(0,r.KN)("firebase","9.1.2","app")},10261:function(e,t,n){"use strict";n.d(t,{hJ:function(){return Oe},v0:function(){return Kt},Aj:function(){return De},rh:function(){return mt},w7:function(){return Me}});var r=n(74444),i=n(94258),o=n(70655),s=n(76934),a=n(30909);function c(){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."}}const u=c,l=new r.LL("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."}),h=new s.Yd("@firebase/auth");function d(e,...t){h.logLevel<=s.in.ERROR&&h.error(`Auth (${i.Jn}): ${e}`,...t)}function f(e,...t){throw v(e,...t)}function p(e,...t){return v(e,...t)}function m(e,t,n){const i=Object.assign(Object.assign({},u()),{[t]:n});return new r.LL("auth","Firebase",i).create(t,{appName:e.name})}function g(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&f(e,"argument-error"),m(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function v(e,...t){if("string"!==typeof e){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return l.create(e,...t)}function y(e,t,...n){if(!e)throw v(t,...n)}function b(e){const t="INTERNAL ASSERTION FAILED: "+e;throw d(t),new Error(t)}function w(e,t){e||b(t)}const _=new Map;function I(e){w(e instanceof Function,"Expected a class definition");let t=_.get(e);return t?(w(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,_.set(e,t),t)}function k(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function O(){return"http:"===T()||"https:"===T()}function T(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}class S{constructor(e,t){this.shortDelay=e,this.longDelay=t,w(t>e,"Short delay should be less than long delay!"),this.isMobile=(0,r.uI)()||(0,r.b$)()}get(){return"undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(O()||(0,r.ru)()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}function E(e,t){w(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class R{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:void b("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:void b("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:void b("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const A={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:"internal-error",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",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"},C=new S(3e4,6e4);function N(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function P(e,t,n,i,o={}){return L(e,o,(()=>{let o={},s={};i&&("GET"===t?s=i:o={body:JSON.stringify(i)});const a=(0,r.xO)(Object.assign({key:e.config.apiKey},s)).slice(1),c=new(R.headers());return c.set("Content-Type","application/json"),c.set("X-Client-Version",e._getSdkClientVersion()),e.languageCode&&c.set("X-Firebase-Locale",e.languageCode),R.fetch()(M(e,e.config.apiHost,n,a),Object.assign({method:t,headers:c,referrerPolicy:"no-referrer"},o))}))}async function L(e,t,n){e._canInitEmulator=!1;const i=Object.assign(Object.assign({},A),t);try{const t=new j(e),r=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const o=await r.json();if("needConfirmation"in o)throw x(e,"account-exists-with-different-credential",o);if(r.ok&&!("errorMessage"in o))return o;{const t=r.ok?o.errorMessage:o.error.message,[n,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw x(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===n)throw x(e,"email-already-in-use",o);const a=i[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw m(e,a,s);f(e,a)}}catch(o){if(o instanceof r.ZR)throw o;f(e,"network-request-failed")}}async function D(e,t,n,r,i={}){const o=await P(e,t,n,r,i);return"mfaPendingCredential"in o&&f(e,"multi-factor-auth-required",{serverResponse:o}),o}function M(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?E(e.config,i):`${e.config.apiScheme}://${i}`}class j{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(p(this.auth,"timeout"))),C.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function x(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=p(e,t,r);return i.customData._tokenResponse=n,i}function U(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function z(e){return 1e3*Number(e)}function F(e){const[t,n,i]=e.split(".");if(void 0===t||void 0===n||void 0===i)return d("JWT malformed, contained fewer than 3 sections"),null;try{const e=(0,r.tV)(n);return e?JSON.parse(e):(d("Failed to decode base64 JWT payload"),null)}catch(o){return d("Caught error parsing JWT payload as JSON",o),null}}async function V(e,t,n=!1){if(n)return t;try{return await t}catch(i){throw i instanceof r.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(i)&&e.auth.currentUser===e&&await e.auth.signOut(),i}}class W{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){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t: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 H{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=U(this.lastLoginAt),this.creationTime=U(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function $(e){var t;const n=e.auth,r=await e.getIdToken(),i=await V(e,async function(e,t){return P(e,"POST","/v1/accounts:lookup",t)}(n,{idToken:r}));y(null===i||void 0===i?void 0:i.users.length,n,"internal-error");const s=i.users[0];e._notifyReloadListener(s);const a=(null===(t=s.providerUserInfo)||void 0===t?void 0:t.length)?s.providerUserInfo.map((e=>{var{providerId:t}=e,n=(0,o._T)(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})):[];const c=(u=e.providerData,l=a,[...u.filter((e=>!l.some((t=>t.providerId===e.providerId)))),...l]);var u,l;const h=e.isAnonymous,d=!(e.email&&s.passwordHash)&&!(null===c||void 0===c?void 0:c.length),f=!!h&&d,p={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:c,metadata:new H(s.createdAt,s.lastLoginAt),isAnonymous:f};Object.assign(e,p)}class q{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){y(e.idToken,"internal-error"),y("undefined"!==typeof e.idToken,"internal-error"),y("undefined"!==typeof e.refreshToken,"internal-error");const t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):function(e){const t=F(e);return y(t,"internal-error"),y("undefined"!==typeof t.exp,"internal-error"),y("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return y(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired?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:o}=await async function(e,t){const n=await L(e,{},(()=>{const n=(0,r.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:o}=e.config,s=M(e,i,"/v1/token",`key=${o}`);return R.fetch()(s,{method:"POST",headers:{"X-Client-Version":e._getSdkClientVersion(),"Content-Type":"application/x-www-form-urlencoded"},body:n})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,i,Number(o))}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:r,expirationTime:i}=t,o=new q;return n&&(y("string"===typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(y("string"===typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(y("number"===typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}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 q,this.toJSON())}_performRefresh(){return b("not implemented")}}function B(e,t){y("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}class K{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=(0,o._T)(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.emailVerified=!1,this.isAnonymous=!1,this.tenantId=null,this.providerData=[],this.proactiveRefresh=new W(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.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.metadata=new H(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await V(this,this.stsTokenManager.getToken(this.auth,e));return y(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=(0,r.m9)(e),i=await n.getIdToken(t),o=F(i);y(o&&o.exp&&o.auth_time&&o.iat,n.auth,"internal-error");const s="object"===typeof o.firebase?o.firebase:void 0,a=null===s||void 0===s?void 0:s.sign_in_provider;return{claims:o,token:i,authTime:U(z(o.auth_time)),issuedAtTime:U(z(o.iat)),expirationTime:U(z(o.exp)),signInProvider:a||null,signInSecondFactor:(null===s||void 0===s?void 0:s.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=(0,r.m9)(e);await $(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(y(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=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new K(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){y(!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 $(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await V(this,async function(e,t){return P(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({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=>Object.assign({},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){var n,r,i,o,s,a,c,u;const l=null!==(n=t.displayName)&&void 0!==n?n:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(o=t.photoURL)&&void 0!==o?o:void 0,p=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(c=t.createdAt)&&void 0!==c?c:void 0,v=null!==(u=t.lastLoginAt)&&void 0!==u?u:void 0,{uid:b,emailVerified:w,isAnonymous:_,providerData:I,stsTokenManager:k}=t;y(b&&k,e,"internal-error");const O=q.fromJSON(this.name,k);y("string"===typeof b,e,"internal-error"),B(l,e.name),B(h,e.name),y("boolean"===typeof w,e,"internal-error"),y("boolean"===typeof _,e,"internal-error"),B(d,e.name),B(f,e.name),B(p,e.name),B(m,e.name),B(g,e.name),B(v,e.name);const T=new K({uid:b,auth:e,email:h,emailVerified:w,displayName:l,isAnonymous:_,photoURL:f,phoneNumber:d,tenantId:p,stsTokenManager:O,createdAt:g,lastLoginAt:v});return I&&Array.isArray(I)&&(T.providerData=I.map((e=>Object.assign({},e)))),m&&(T._redirectEventId=m),T}static async _fromIdTokenResponse(e,t,n=!1){const r=new q;r.updateFromServerResponse(t);const i=new K({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await $(i),i}}class J{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){}}J.type="NONE";const G=J;function Z(e,t,n){return`firebase:${e}:${t}:${n}`}class X{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=Z(this.userKey,r.apiKey,i),this.fullPersistenceKey=Z("persistence",r.apiKey,i),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);return e?K._fromJSON(this.auth,e):null}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 X(I(G),e,n);const r=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=r[0]||I(G);const o=Z(n,e.config.apiKey,e.name);let s=null;for(const u of t)try{const t=await u._get(o);if(t){const n=K._fromJSON(e,t);u!==i&&(s=n),i=u;break}}catch(c){}const a=r.filter((e=>e._shouldAllowMigration));return i._shouldAllowMigration&&a.length?(i=a[0],s&&await i._set(o,s.toJSON()),await Promise.all(t.map((async e=>{if(e!==i)try{await e._remove(o)}catch(c){}}))),new X(i,e,n)):new X(i,e,n)}}function Y(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ne(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Q(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ie(t))return"Blackberry";if(oe(t))return"Webos";if(ee(t))return"Safari";if((t.includes("chrome/")||te(t))&&!t.includes("edge/"))return"Chrome";if(re(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null===n||void 0===n?void 0:n.length))return n[1]}return"Other"}function Q(e=(0,r.z$)()){return/firefox\//i.test(e)}function ee(e=(0,r.z$)()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function te(e=(0,r.z$)()){return/crios\//i.test(e)}function ne(e=(0,r.z$)()){return/iemobile/i.test(e)}function re(e=(0,r.z$)()){return/android/i.test(e)}function ie(e=(0,r.z$)()){return/blackberry/i.test(e)}function oe(e=(0,r.z$)()){return/webos/i.test(e)}function se(e=(0,r.z$)()){return/iphone|ipad|ipod/i.test(e)}function ae(e=(0,r.z$)()){return se(e)||re(e)||oe(e)||ie(e)||/windows phone/i.test(e)||ne(e)}function ce(e,t=[]){let n;switch(e){case"Browser":n=Y((0,r.z$)());break;case"Worker":n=`${Y((0,r.z$)())}-${e}`;break;default:n=e}const o=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${i.Jn}/${o}`}class ue{constructor(e,t){this.app=e,this.config=t,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new he(this),this.idTokenSubscription=new he(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=l,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=t.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=I(t)),this._initializationPromise=this.queue((async()=>{var n;this._deleted||(this.persistenceManager=await X.create(this,e),this._deleted||((null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)&&await this._popupRedirectResolver._initialize(this),await this.initializeCurrentUser(t),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)):void 0}async initializeCurrentUser(e){var t;let n=await this.assertedPersistence.getCurrentUser();if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const r=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,i=null===n||void 0===n?void 0:n._redirectEventId,o=await this.tryRedirectSignIn(e);r&&r!==i||!(null===o||void 0===o?void 0:o.user)||(n=o.user)}return n?n._redirectEventId?(y(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)):this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(n){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await $(e)}catch(t){if("auth/network-request-failed"!==t.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){const t=e?(0,r.m9)(e):null;return t&&y(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e){if(!this._deleted)return e&&y(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null)}setPersistence(e){return this.queue((async()=>{await this.assertedPersistence.setPersistence(I(e))}))}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new r.LL("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.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&&I(e)||this._popupRedirectResolver;y(t,this,"argument-error"),this.redirectPersistenceManager=await X.create(this,[I(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._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(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};const i="function"===typeof t?t:t.next.bind(t),o=this._isInitialized?Promise.resolve():this._initializationPromise;return y(o,this,"internal-error"),o.then((()=>i(this.currentUser))),"function"===typeof t?e.addObserver(t,n,r):e.addObserver(t)}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 y(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ce(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getSdkClientVersion(){return this.clientVersion}}function le(e){return(0,r.m9)(e)}class he{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,r.ne)((e=>this.observer=e))}get next(){return y(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}class de{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return b("not implemented")}_getIdTokenResponse(e){return b("not implemented")}_linkToIdToken(e,t){return b("not implemented")}_getReauthenticationResolver(e){return b("not implemented")}}async function fe(e,t){return P(e,"POST","/v1/accounts:update",t)}class pe extends de{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new pe(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new pe(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((null===t||void 0===t?void 0:t.email)&&(null===t||void 0===t?void 0: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 async function(e,t){return D(e,"POST","/v1/accounts:signInWithPassword",N(e,t))}(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return async function(e,t){return D(e,"POST","/v1/accounts:signInWithEmailLink",N(e,t))}(e,{email:this._email,oobCode:this._password});default:f(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return fe(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return async function(e,t){return D(e,"POST","/v1/accounts:signInWithEmailLink",N(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:f(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function me(e,t){return D(e,"POST","/v1/accounts:signInWithIdp",N(e,t))}class ge extends de{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new ge(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):f("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:r}=t,i=(0,o._T)(t,["providerId","signInMethod"]);if(!n||!r)return null;const s=new ge(n,r);return s.idToken=i.idToken||void 0,s.accessToken=i.accessToken||void 0,s.secret=i.secret,s.nonce=i.nonce,s.pendingToken=i.pendingToken||null,s}_getIdTokenResponse(e){return me(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,me(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,me(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=(0,r.xO)(t)}return e}}const ve={USER_NOT_FOUND:"user-not-found"};class ye extends de{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new ye({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new ye({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return D(e,"POST","/v1/accounts:signInWithPhoneNumber",N(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await D(e,"POST","/v1/accounts:signInWithPhoneNumber",N(e,t));if(n.temporaryProof)throw x(e,"account-exists-with-different-credential",n);return n}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return D(e,"POST","/v1/accounts:signInWithPhoneNumber",N(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),ve)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"===typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new ye({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class be{constructor(e){var t,n,i,o,s,a;const c=(0,r.zd)((0,r.pd)(e)),u=null!==(t=c.apiKey)&&void 0!==t?t:null,l=null!==(n=c.oobCode)&&void 0!==n?n:null,h=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}}(null!==(i=c.mode)&&void 0!==i?i:null);y(u&&l&&h,"argument-error"),this.apiKey=u,this.operation=h,this.code=l,this.continueUrl=null!==(o=c.continueUrl)&&void 0!==o?o:null,this.languageCode=null!==(s=c.languageCode)&&void 0!==s?s:null,this.tenantId=null!==(a=c.tenantId)&&void 0!==a?a:null}static parseLink(e){const t=function(e){const t=(0,r.zd)((0,r.pd)(e)).link,n=t?(0,r.zd)((0,r.pd)(t)).deep_link_id:null,i=(0,r.zd)((0,r.pd)(e)).deep_link_id;return(i?(0,r.zd)((0,r.pd)(i)).link:null)||i||n||t||e}(e);try{return new be(t)}catch(n){return null}}}class we{constructor(){this.providerId=we.PROVIDER_ID}static credential(e,t){return pe._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=be.parseLink(t);return y(n,"argument-error"),pe._fromEmailAndCode(e,n.code,n.tenantId)}}we.PROVIDER_ID="password",we.EMAIL_PASSWORD_SIGN_IN_METHOD="password",we.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class _e{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 Ie extends _e{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class ke extends Ie{constructor(){super("facebook.com")}static credential(e){return ge._fromParams({providerId:ke.PROVIDER_ID,signInMethod:ke.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return ke.credentialFromTaggedObject(e)}static credentialFromError(e){return ke.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return ke.credential(e.oauthAccessToken)}catch(t){return null}}}ke.FACEBOOK_SIGN_IN_METHOD="facebook.com",ke.PROVIDER_ID="facebook.com";class Oe extends Ie{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return ge._fromParams({providerId:Oe.PROVIDER_ID,signInMethod:Oe.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Oe.credentialFromTaggedObject(e)}static credentialFromError(e){return Oe.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return Oe.credential(t,n)}catch(r){return null}}}Oe.GOOGLE_SIGN_IN_METHOD="google.com",Oe.PROVIDER_ID="google.com";class Te extends Ie{constructor(){super("github.com")}static credential(e){return ge._fromParams({providerId:Te.PROVIDER_ID,signInMethod:Te.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Te.credentialFromTaggedObject(e)}static credentialFromError(e){return Te.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Te.credential(e.oauthAccessToken)}catch(t){return null}}}Te.GITHUB_SIGN_IN_METHOD="github.com",Te.PROVIDER_ID="github.com";class Se extends Ie{constructor(){super("twitter.com")}static credential(e,t){return ge._fromParams({providerId:Se.PROVIDER_ID,signInMethod:Se.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Se.credentialFromTaggedObject(e)}static credentialFromError(e){return Se.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return Se.credential(t,n)}catch(r){return null}}}Se.TWITTER_SIGN_IN_METHOD="twitter.com",Se.PROVIDER_ID="twitter.com";class Ee{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){const i=await K._fromIdTokenResponse(e,n,r),o=Re(n);return new Ee({user:i,providerId:o,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=Re(n);return new Ee({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function Re(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class Ae extends r.ZR{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,this.name="FirebaseError",Object.setPrototypeOf(this,Ae.prototype),this.appName=e.name,this.code=t.code,this.tenantId=null!==(i=e.tenantId)&&void 0!==i?i:void 0,this.serverResponse=t.customData.serverResponse}static _fromErrorAndOperation(e,t,n,r){return new Ae(e,t,n,r)}}function Ce(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((n=>{if("auth/multi-factor-auth-required"===n.code)throw Ae._fromErrorAndOperation(e,n,t,r);throw n}))}async function Ne(e,t,n=!1){const r=await V(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return Ee._forOperation(e,"link",r)}async function Pe(e,t,n=!1){const{auth:r}=e,i="reauthenticate";try{const o=await V(e,Ce(r,i,t,e),n);y(o.idToken,r,"internal-error");const s=F(o.idToken);y(s,r,"internal-error");const{sub:a}=s;return y(e.uid===a,r,"user-mismatch"),Ee._forOperation(e,i,o)}catch(o){throw"auth/user-not-found"===(null===o||void 0===o?void 0:o.code)&&f(r,"user-mismatch"),o}}async function Le(e,t,n=!1){const r="signIn",i=await Ce(e,r,t),o=await Ee._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(o.user),o}function De(e,t,n,i){return(0,r.m9)(e).onAuthStateChanged(t,n,i)}function Me(e){return(0,r.m9)(e).signOut()}new WeakMap;const je="__sak";class xe{constructor(e,t){this.storage=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(je,"1"),this.storage.removeItem(je),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){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()}}class Ue extends xe{constructor(){super(window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=(0,r.z$)();return ee(e)||se(e)}()&&function(){try{return!(!window||window===window.top)}catch(e){return!1}}(),this.fallbackToPolling=ae(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,n)=>{this.notifyListeners(e,n)}));const n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}const i=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},o=this.storage.getItem(n);(0,r.w1)()&&10===document.documentMode&&o!==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 r of Array.from(n))r(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]}}Ue.type="LOCAL";const ze=Ue;class Fe extends xe{constructor(){super(window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Fe.type="SESSION";const Ve=Fe;class We{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 We(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:i}=t.data,o=this.handlersMap[r];if(!(null===o||void 0===o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const s=Array.from(o).map((async e=>e(t.origin,i))),a=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}})))}(s);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,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 He(e="",t=10){let n="";for(let r=0;r{const c=He("",20);r.port1.start();const u=setTimeout((()=>{a(new Error("unsupported_event"))}),n);o={messageChannel:r,onMessage(e){const t=e;if(t.data.eventId===c)switch(t.data.status){case"ack":clearTimeout(u),i=setTimeout((()=>{a(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),s(t.data.response);break;default:clearTimeout(u),clearTimeout(i),a(new Error("invalid_response"))}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[r.port2])})).finally((()=>{o&&this.removeMessageHandler(o)}))}}function qe(){return window}function Be(){return"undefined"!==typeof qe().WorkerGlobalScope&&"function"===typeof qe().importScripts}const Ke="firebaseLocalStorageDb",Je="firebaseLocalStorage",Ge="fbase_key";class Ze{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 Xe(e,t){return e.transaction([Je],t?"readwrite":"readonly").objectStore(Je)}function Ye(){const e=indexedDB.open(Ke,1);return new Promise(((t,n)=>{e.addEventListener("error",(()=>{n(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(Je,{keyPath:Ge})}catch(r){n(r)}})),e.addEventListener("success",(async()=>{const n=e.result;n.objectStoreNames.contains(Je)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(Ke);return new Ze(e).toPromise()}(),t(await Ye()))}))}))}async function Qe(e,t,n){const r=Xe(e,!0).put({[Ge]:t,value:n});return new Ze(r).toPromise()}function et(e,t){const n=Xe(e,!0).delete(t);return new Ze(n).toPromise()}class tt{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 Ye()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(n){if(t++>3)throw n;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Be()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=We._getInstance(Be()?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(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new $e(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&function(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}()===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Ye();return await Qe(e,je,"1"),await et(e,je),!0}catch(e){}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=>Qe(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=Xe(e,!1).get(t),r=await new Ze(n).toPromise();return void 0===r?null:r.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>et(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=Xe(e,!1).getAll();return new Ze(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;for(const{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(const r of Object.keys(this.localCache))this.localCache[r]&&!n.has(r)&&(this.notifyListeners(r,null),t.push(r));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(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()}}tt.type="LOCAL";const nt=tt;function rt(e){return new Promise(((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=p("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(t=null===(e=document.getElementsByTagName("head"))||void 0===e?void 0:e[0])&&void 0!==t?t:document}().appendChild(r)}))}function it(e){return`__${e}${Math.floor(1e6*Math.random())}`}it("rcb"),new S(3e4,6e4);const ot="recaptcha";async function st(e,t,n){var r;const i=await n.verify();try{let o;if(y("string"===typeof i,e,"argument-error"),y(n.type===ot,e,"argument-error"),o="string"===typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){y("enroll"===t.type,e,"internal-error");return(await function(e,t){return P(e,"POST","/v2/accounts/mfaEnrollment:start",N(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}})).phoneSessionInfo.sessionInfo}{y("signin"===t.type,e,"internal-error");const n=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid;y(n,e,"missing-multi-factor-info");return(await function(e,t){return P(e,"POST","/v2/accounts/mfaSignIn:start",N(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:i}})).phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return P(e,"POST","/v1/accounts:sendVerificationCode",N(e,t))}(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return t}}finally{n._reset()}}class at{constructor(e){this.providerId=at.PROVIDER_ID,this.auth=le(e)}verifyPhoneNumber(e,t){return st(this.auth,e,(0,r.m9)(t))}static credential(e,t){return ye._fromVerification(e,t)}static credentialFromResult(e){const t=e;return at.credentialFromTaggedObject(t)}static credentialFromError(e){return at.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:t,temporaryProof:n}=e;return t&&n?ye._fromTokenResponse(t,n):null}}function ct(e,t){return t?I(t):(y(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}at.PROVIDER_ID="phone",at.PHONE_SIGN_IN_METHOD="phone";class ut extends de{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return me(e,this._buildIdpRequest())}_linkToIdToken(e,t){return me(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return me(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 lt(e){return Le(e.auth,new ut(e),e.bypassAuthState)}function ht(e){const{auth:t,user:n}=e;return y(n,t,"internal-error"),Pe(n,new ut(e),e.bypassAuthState)}async function dt(e){const{auth:t,user:n}=e;return y(n,t,"internal-error"),Ne(n,new ut(e),e.bypassAuthState)}class ft{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,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(n){this.reject(n)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(c){this.reject(c)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return lt;case"linkViaPopup":case"linkViaRedirect":return dt;case"reauthViaPopup":case"reauthViaRedirect":return ht;default:f(this.auth,"internal-error")}}resolve(e){w(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){w(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 pt=new S(2e3,1e4);async function mt(e,t,n){const r=le(e);g(e,t,_e);const i=ct(r,n);return new gt(r,"signInViaPopup",t,i).executeNotNull()}class gt extends ft{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,gt.currentPopupAction&>.currentPopupAction.cancel(),gt.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return y(e,this.auth,"internal-error"),e}async onExecution(){w(1===this.filter.length,"Popup operations only handle one event");const e=He();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(p(this.auth,"web-storage-unsupported"))})),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(p(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,gt.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(p(this.auth,"popup-closed-by-user"))}),2e3):this.pollId=window.setTimeout(e,pt.get())};e()}}gt.currentPopupAction=null;const vt=new Map;class yt extends ft{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=vt.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=wt(t),r="true"===await bt(e)._get(n);return await bt(e)._remove(n),r}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}vt.set(this.auth._key(),e)}return 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 bt(e){return I(e._redirectPersistence)}function wt(e){return Z("pendingRedirect",e.config.apiKey,e.name)}async function _t(e,t,n=!1){const r=le(e),i=ct(r,t),o=new yt(r,i,n),s=await o.execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}class It{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 Ot(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!Ot(e)){const r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(p(this.auth,r))}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(kt(e))}saveEventToCache(e){this.cachedEventUids.add(kt(e)),this.lastProcessedEventTime=Date.now()}}function kt(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function Ot({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null===t||void 0===t?void 0:t.code)}const Tt=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,St=/^https?/;async function Et(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return P(e,"GET","/v1/projects",t)}(e);for(const r of t)try{if(Rt(r))return}catch(n){}f(e,"unauthorized-domain")}function Rt(e){const t=k(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!St.test(n))return!1;if(Tt.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}const At=new S(3e4,6e4);function Ct(){const e=qe().___jsl;if(null===e||void 0===e?void 0: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 n=0;n{var r,i,o;function s(){Ct(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Ct(),n(p(e,"network-request-failed"))},timeout:At.get()})}if(null===(i=null===(r=qe().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=qe().gapi)||void 0===o?void 0:o.load)){const t=it("iframefcb");return qe()[t]=()=>{gapi.load?s():n(p(e,"network-request-failed"))},rt(`https://apis.google.com/js/api.js?onload=${t}`)}s()}})).catch((e=>{throw Nt=null,e}))}(e),Nt}const Lt=new S(5e3,15e3),Dt={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},Mt=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function jt(e){const t=e.config;y(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?E(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,o={apiKey:t.apiKey,appName:e.name,v:i.Jn},s=Mt.get(e.config.apiHost);s&&(o.eid=s);const a=e._getFrameworks();return a.length&&(o.fw=a.join(",")),`${n}?${(0,r.xO)(o).slice(1)}`}const xt={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Ut{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}function zt(e,t,n,i=500,o=600){const s=Math.max((window.screen.availHeight-o)/2,0).toString(),a=Math.max((window.screen.availWidth-i)/2,0).toString();let c="";const u=Object.assign(Object.assign({},xt),{width:i.toString(),height:o.toString(),top:s,left:a}),l=(0,r.z$)().toLowerCase();n&&(c=te(l)?"_blank":n),Q(l)&&(t=t||"http://localhost",u.scrollbars="yes");const h=Object.entries(u).reduce(((e,[t,n])=>`${e}${t}=${n},`),"");if(function(e=(0,r.z$)()){var t;return se(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==c)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",c),new Ut(null);const d=window.open(t||"",c,h);y(d,e,"popup-blocked");try{d.focus()}catch(f){}return new Ut(d)}const Ft="__/auth/handler",Vt="emulator/auth/handler";function Wt(e,t,n,o,s,a){y(e.config.authDomain,e,"auth-domain-config-required"),y(e.config.apiKey,e,"invalid-api-key");const c={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:o,v:i.Jn,eventId:s};if(t instanceof _e){t.setDefaultLanguage(e.languageCode),c.providerId=t.providerId||"",(0,r.xb)(t.getCustomParameters())||(c.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(a||{}))c[e]=t}if(t instanceof Ie){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(c.scopes=e.join(","))}e.tenantId&&(c.tid=e.tenantId);const u=c;for(const r of Object.keys(u))void 0===u[r]&&delete u[r];return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${Ft}`;return E(e,Vt)}(e)}?${(0,r.xO)(u).slice(1)}`}const Ht="webStorageSupport";const $t=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Ve,this._completeRedirectFn=_t}async _openPopup(e,t,n,r){var i;w(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return zt(e,Wt(e,t,n,k(),r),He())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=Wt(e,t,n,k(),r),qe().location.href=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):(w(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n}async initAndGetManager(e){const t=await async function(e){const t=await Pt(e),n=qe().gapi;return y(n,e,"internal-error"),t.open({where:document.body,url:jt(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Dt,dontclear:!0},(t=>new Promise((async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=p(e,"network-request-failed"),o=qe().setTimeout((()=>{r(i)}),Lt.get());function s(){qe().clearTimeout(o),n(t)}t.ping(s).then(s,(()=>{r(i)}))}))))}(e),n=new It(e);return t.register("authEvent",(t=>{y(null===t||void 0===t?void 0: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(Ht,{type:Ht},(n=>{var r;const i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r.webStorageSupport;void 0!==i&&t(!!i),f(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=Et(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return ae()||ee()||se()}};var qt;class Bt{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.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=>{var n;e((null===(n=t)||void 0===n?void 0:n.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(){y(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}function Kt(e=(0,i.Mq)()){const t=(0,i.qX)(e,"auth");return t.isInitialized()?t.getImmediate():function(e,t){const n=(0,i.qX)(e,"auth");if(n.isInitialized()){const e=n.getImmediate(),i=n.getOptions();if((0,r.vZ)(i,null!==t&&void 0!==t?t:{}))return e;f(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:$t,persistence:[nt,ze,Ve]})}qt="Browser",(0,i.Xd)(new a.wA("auth",((e,{options:t})=>{const n=e.getProvider("app").getImmediate(),{apiKey:r,authDomain:i}=n.options;return(e=>{y(r&&!r.includes(":"),"invalid-api-key",{appName:e.name}),y(!(null===i||void 0===i?void 0:i.includes(":")),"argument-error",{appName:e.name});const n={apiKey:r,authDomain:i,clientPlatform:qt,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ce(qt)},o=new ue(e,n);return function(e,t){const n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(I);(null===t||void 0===t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null===t||void 0===t?void 0:t.popupRedirectResolver)}(o,t),o})(n)}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,n)=>{e.getProvider("auth-internal").initialize()}))),(0,i.Xd)(new a.wA("auth-internal",(e=>(e=>new Bt(e))(le(e.getProvider("auth").getImmediate()))),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,i.KN)("@firebase/auth","0.18.2",function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(qt))},86013:function(e,t,n){var r,i;i=this,void 0===(r=function(){return function(e){"use strict";var t=e&&e.I18n||{},n=Array.prototype.slice,r=function(e){return("0"+e.toString()).substr(-2)},i=function(e,t){return f("round",e,-t).toFixed(t)},o=function(e){var t=typeof e;return"function"===t||"object"===t},s=function(e){return"function"===typeof e},a=function(e){return"undefined"!==typeof e&&null!==e},c=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},u=function(e){return"string"===typeof e||"[object String]"===Object.prototype.toString.call(e)},l=function(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)},h=function(e){return!0===e||!1===e},d=function(e){return null===e},f=function(e,t,n){return"undefined"===typeof n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!==typeof n||n%1!==0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))},p=function(e,t){return s(e)?e(t):e},m=function(e,t){var n,r;for(n in t)t.hasOwnProperty(n)&&(r=t[n],u(r)||l(r)||h(r)||c(r)||d(r)?e[n]=r:(null==e[n]&&(e[n]={}),m(e[n],r)));return e},g={day_names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr_day_names:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],month_names:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbr_month_names:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridian:["AM","PM"]},v={precision:3,separator:".",delimiter:",",strip_insignificant_zeros:!1},y={unit:"$",precision:2,format:"%u%n",sign_first:!0,delimiter:",",separator:"."},b={unit:"%",precision:3,format:"%n%u",separator:".",delimiter:""},w=[null,"kb","mb","gb","tb"],_={defaultLocale:"en",locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,fallbacks:!1,translations:{},missingBehaviour:"message",missingTranslationPrefix:""};return t.reset=function(){var e;for(e in _)this[e]=_[e]},t.initializeOptions=function(){var e;for(e in _)a(this[e])||(this[e]=_[e])},t.initializeOptions(),t.locales={},t.locales.get=function(e){var n=this[e]||this[t.locale]||this.default;return s(n)&&(n=n(e)),!1===c(n)&&(n=[n]),n},t.locales.default=function(e){var n=[],r=[];return e&&n.push(e),!e&&t.locale&&n.push(t.locale),t.fallbacks&&t.defaultLocale&&n.push(t.defaultLocale),n.forEach((function(e){var n=e.split("-"),i=null,o=null;3===n.length?(i=[n[0],n[1]].join("-"),o=n[0]):2===n.length&&(i=n[0]),-1===r.indexOf(e)&&r.push(e),t.fallbacks&&[i,o].forEach((function(t){"undefined"!==typeof t&&null!==t&&t!==e&&-1===r.indexOf(t)&&r.push(t)}))})),n.length||n.push("en"),r},t.pluralization={},t.pluralization.get=function(e){return this[e]||this[t.locale]||this.default},t.pluralization.default=function(e){switch(e){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}},t.currentLocale=function(){return this.locale||this.defaultLocale},t.isSet=a,t.lookup=function(e,t){t=t||{};var n,r,i,o,s=this.locales.get(t.locale).slice();for(i=this.getFullScope(e,t);s.length;)if(n=s.shift(),r=i.split(t.separator||this.defaultSeparator),o=this.translations[n]){for(;r.length&&void 0!==(o=o[r.shift()])&&null!==o;);if(void 0!==o&&null!==o)return o}if(a(t.defaultValue))return p(t.defaultValue,e)},t.pluralizationLookupWithoutFallback=function(e,t,n){var r,i,s=this.pluralization.get(t)(e);if(o(n))for(;s.length;)if(r=s.shift(),a(n[r])){i=n[r];break}return i},t.pluralizationLookup=function(e,t,n){n=n||{};var r,i,s,c,u=this.locales.get(n.locale).slice();for(t=this.getFullScope(t,n);u.length;)if(r=u.shift(),i=t.split(n.separator||this.defaultSeparator),s=this.translations[r]){for(;i.length&&(s=s[i.shift()],o(s));)0===i.length&&(c=this.pluralizationLookupWithoutFallback(e,r,s));if("undefined"!==typeof c&&null!==c)break}return"undefined"!==typeof c&&null!==c||a(n.defaultValue)&&(c=o(n.defaultValue)?this.pluralizationLookupWithoutFallback(e,n.locale,n.defaultValue):n.defaultValue,s=n.defaultValue),{message:c,translations:s}},t.meridian=function(){var e=this.lookup("time"),t=this.lookup("date");return e&&e.am&&e.pm?[e.am,e.pm]:t&&t.meridian?t.meridian:g.meridian},t.prepareOptions=function(){for(var e,t=n.call(arguments),r={};t.length;)if("object"==typeof(e=t.shift()))for(var i in e)e.hasOwnProperty(i)&&(a(r[i])||(r[i]=e[i]));return r},t.createTranslationOptions=function(e,t){var n=[{scope:e}];return a(t.defaults)&&(n=n.concat(t.defaults)),a(t.defaultValue)&&n.push({message:t.defaultValue}),n},t.translate=function(e,t){t=t||{};var n,r=this.createTranslationOptions(e,t),i=e,s=this.prepareOptions(t);return delete s.defaultValue,r.some((function(t){if(a(t.scope)?(i=t.scope,n=this.lookup(i,s)):a(t.message)&&(n=p(t.message,e)),void 0!==n&&null!==n)return!0}),this)?("string"===typeof n?n=this.interpolate(n,t):c(n)?n=n.map((function(e){return"string"===typeof e?this.interpolate(e,t):e}),this):o(n)&&a(t.count)&&(n=this.pluralize(t.count,i,t)),n):this.missingTranslation(e,t)},t.interpolate=function(e,t){if(null==e)return e;t=t||{};var n,r,i,o,s=e.match(this.placeholder);if(!s)return e;for(;s.length;)i=(n=s.shift()).replace(this.placeholder,"$1"),r=a(t[i])?t[i].toString().replace(/\$/gm,"_#$#_"):i in t?this.nullPlaceholder(n,e,t):this.missingPlaceholder(n,e,t),o=new RegExp(n.replace(/{/gm,"\\{").replace(/}/gm,"\\}")),e=e.replace(o,r);return e.replace(/_#\$#_/g,"$")},t.pluralize=function(e,t,n){var r,i;return n=this.prepareOptions({count:String(e)},n),"undefined"===typeof(i=this.pluralizationLookup(e,t,n)).translations||null==i.translations?this.missingTranslation(t,n):"undefined"!==typeof i.message&&null!=i.message?this.interpolate(i.message,n):(r=this.pluralization.get(n.locale),this.missingTranslation(t+"."+r(e)[0],n))},t.missingTranslation=function(e,t){if("guess"===this.missingBehaviour){var n=e.split(".").slice(-1)[0];return(this.missingTranslationPrefix.length>0?this.missingTranslationPrefix:"")+n.replace(/_/g," ").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+" "+n.toLowerCase()}))}return'[missing "'+[null!=t&&null!=t.locale?t.locale:this.currentLocale(),this.getFullScope(e,t)].join(t.separator||this.defaultSeparator)+'" translation]'},t.missingPlaceholder=function(e,t,n){return"[missing "+e+" value]"},t.nullPlaceholder=function(){return t.missingPlaceholder.apply(t,arguments)},t.toNumber=function(e,t){t=this.prepareOptions(t,this.lookup("number.format"),v);var n,r,o=e<0,s=i(Math.abs(e),t.precision).toString().split("."),a=[],c=t.format||"%n",u=o?"-":"";for(e=s[0],n=s[1];e.length>0;)a.unshift(e.substr(Math.max(0,e.length-3),3)),e=e.substr(0,e.length-3);return r=a.join(t.delimiter),t.strip_insignificant_zeros&&n&&(n=n.replace(/0+$/,"")),t.precision>0&&n&&(r+=t.separator+n),r=(c=t.sign_first?"%s"+c:c.replace("%n","%s%n")).replace("%u",t.unit).replace("%n",r).replace("%s",u)},t.toCurrency=function(e,t){return t=this.prepareOptions(t,this.lookup("number.currency.format",t),this.lookup("number.format",t),y),this.toNumber(e,t)},t.localize=function(e,t,n){switch(n||(n={}),e){case"currency":return this.toCurrency(t,n);case"number":return e=this.lookup("number.format",n),this.toNumber(t,e);case"percentage":return this.toPercentage(t,n);default:var r;return r=e.match(/^(date|time)/)?this.toTime(e,t,n):t.toString(),this.interpolate(r,n)}},t.parseDate=function(e){var t,n,r;if(null==e)return e;if("object"===typeof e)return e;if(t=e.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/)){for(var i=1;i<=6;i++)t[i]=parseInt(t[i],10)||0;t[2]-=1,r=t[7]?1e3*("0"+t[7]):null,n=t[8]?new Date(Date.UTC(t[1],t[2],t[3],t[4],t[5],t[6],r)):new Date(t[1],t[2],t[3],t[4],t[5],t[6],r)}else"number"==typeof e?(n=new Date).setTime(e):e.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)?(n=new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" "))):(e.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/),(n=new Date).setTime(Date.parse(e)));return n},t.strftime=function(e,n,i){i=this.lookup("date",i);var o=t.meridian();if(i||(i={}),i=this.prepareOptions(i,g),isNaN(e.getTime()))throw new Error("I18n.strftime() requires a valid date object, but received an invalid date.");var s=e.getDay(),a=e.getDate(),c=e.getFullYear(),u=e.getMonth()+1,l=e.getHours(),h=l,d=l>11?1:0,f=e.getSeconds(),p=e.getMinutes(),m=e.getTimezoneOffset(),v=Math.floor(Math.abs(m/60)),y=Math.abs(m)-60*v,b=(m>0?"-":"+")+(v.toString().length<2?"0"+v:v)+(y.toString().length<2?"0"+y:y);return h>12?h-=12:0===h&&(h=12),n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n.replace("%a",i.abbr_day_names[s])).replace("%A",i.day_names[s])).replace("%b",i.abbr_month_names[u])).replace("%B",i.month_names[u])).replace("%d",r(a))).replace("%e",a)).replace("%-d",a)).replace("%H",r(l))).replace("%-H",l)).replace("%k",l)).replace("%I",r(h))).replace("%-I",h)).replace("%l",h)).replace("%m",r(u))).replace("%-m",u)).replace("%M",r(p))).replace("%-M",p)).replace("%p",o[d])).replace("%P",o[d].toLowerCase())).replace("%S",r(f))).replace("%-S",f)).replace("%w",s)).replace("%y",r(c))).replace("%-y",r(c).replace(/^0+/,""))).replace("%Y",c)).replace("%z",b)).replace("%Z",b)},t.toTime=function(e,t,n){var r=this.parseDate(t),i=this.lookup(e,n);if(null==r)return r;var o=r.toString();return o.match(/invalid/i)?o:i?this.strftime(r,i,n):o},t.toPercentage=function(e,t){return t=this.prepareOptions(t,this.lookup("number.percentage.format",t),this.lookup("number.format",t),b),this.toNumber(e,t)},t.toHumanSize=function(e,t){for(var n,r,i,o=1024,s=e,a=0;s>=o&&a<4;)s/=o,a+=1;return 0===a?(i=this.getFullScope("number.human.storage_units.units.byte",t),n=this.t(i,{count:s}),r=0):(i=this.getFullScope("number.human.storage_units.units."+w[a],t),n=this.t(i),r=s-Math.floor(s)===0?0:1),t=this.prepareOptions(t,{unit:n,precision:r,format:"%n%u",delimiter:""}),this.toNumber(s,t)},t.getFullScope=function(e,t){return t=t||{},c(e)&&(e=e.join(t.separator||this.defaultSeparator)),t.scope&&(e=[t.scope,e].join(t.separator||this.defaultSeparator)),e},t.extend=function(e,t){return"undefined"===typeof e&&"undefined"===typeof t?{}:m(e,t)},t.t=t.translate.bind(t),t.l=t.localize.bind(t),t.p=t.pluralize.bind(t),t}(i)}.call(t,n,t,e))||(e.exports=r)},80971:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return k}});var r=n(809),i=n.n(r),o=n(15861),s=n(67294),a=n(86013),c=n.n(a),u=JSON.parse('{"en-US":{"game":{"itemstats":"Item Stats","magicprops":"Magic Properties","runeorder":"Rune Order","alloweditems":"Allowed Items","classonly":"(%{cla} Only)","basedon":"Base: ","reqlv":"Required Level: ","grade":"Grade: ","Qlvl":"Qlvl: ","TC":"TC: ","checkdroprate":"Drop","legacyname":"Legacy Name: ","weapontype":"Weapon Type","affixes":{"prefixes":"Prefixes","suffixes":"Suffixes","affix":"Affix","magicprops":"(Max) Magic Properties"},"crafted":{"magicmain":"Magic Item Input(Any)","addmaterial":"Additional Inputs","fixedprops":"Fixed Magic Properties"},"rw_part":{"Body Armor":"Body Armor:","Weapons":"Weapons:","Shields":"Shields:","general":"Common:","Mark of the Wolf":"Mark of the Wolf:","Mark of the Bear":"Mark of the Bear:"},"item_type":{"unique":"Unique Item","sets":"Sets Item","base":"Base Item","runewords":"Runewords","rune":"Rune"},"grade_type":{"normal":"Normal","exceptional":"Exceptional","elite":"Elite"},"difficulty":{"H":"H","NM":"NM","N":"N"},"modal":{"sockets":{"title":{"nametitle":"%{name}\\nItem Level v.s. Number of Sockets","socketsrange":"Possible Number of Sockets","act5quest":"Act5 Larzuk\'s Quest Reward","cubeprob":"Cube Recipe: Prob. of #sockets"},"props":{"socketsrange":"Possible Number of Sockets","maxsockets":"Sockets"}},"dropratetable":{"title":{"nametitle":"%{name}\\nDrop Rate Table"}},"itemcomment":{"title":{"nametitle":"%{name}\\nComments"}}}},"ui":{"search":"Search","linkcopied":"Link Copied!","language":{"en-US":"English","zh-TW":"\u7e41\u9ad4\u4e2d\u6587"}}},"zh-TW":{"game":{"itemstats":"\u7269\u54c1\u6578\u503c","magicprops":"\u9b54\u6cd5\u5c6c\u6027","runeorder":"\u7b26\u6587\u9806\u5e8f","alloweditems":"\u9472\u6750","classonly":"(%{cla}\u5c08\u7528)","basedon":"\u57fa\u790e\uff1a","reqlv":"\u9700\u8981\u7b49\u7d1a\uff1a","grade":"\u7d1a\u5225\uff1a","Qlvl":"Qlvl\uff1a","TC":"TC\uff1a","checkdroprate":"\u67e5\u770b\u6389\u843d\u6a5f\u7387","legacyname":"\u820a\u540d\uff1a","weapontype":"\u6b66\u5668\u7a2e\u985e","affixes":{"prefixes":"\u524d\u7db4","suffixes":"\u5f8c\u7db4","affix":"\u8a5e\u7db4","magicprops":"(\u6700\u9ad8) \u9b54\u6cd5\u5c6c\u6027"},"crafted":{"magicmain":"\u9b54\u6cd5\u88dd\u5099\u6750\u6599(\u4efb\u4e00)","addmaterial":"\u5176\u4ed6\u6750\u6599","fixedprops":"\u56fa\u5b9a\u9b54\u6cd5\u5c6c\u6027"},"rw_part":{"Body Armor":"\u8b77\u7532\uff1a","Weapons":"\u6b66\u5668\uff1a","Shields":"\u76fe\u724c\uff1a","general":"\u5171\u901a\uff1a","Mark of the Wolf":"\u72fc\u4e4b\u5370\u8a18\uff1a","Mark of the Bear":"\u718a\u4e4b\u5370\u8a18\uff1a"},"item_type":{"unique":"\u7368\u7279\u88dd\u5099","sets":"\u6210\u5957\u88dd\u5099","base":"\u57fa\u790e\u88dd\u5099","runewords":"\u7b26\u6587\u4e4b\u8a9e","rune":"\u7b26\u6587"},"grade_type":{"normal":"\u666e\u901a","exceptional":"\u9032\u968e","elite":"\u83c1\u82f1"},"difficulty":{"H":"\u5730\u7344","NM":"\u60e1\u5922","N":"\u666e\u901a"},"modal":{"sockets":{"title":{"nametitle":"%{name}\\n\u5728\u4e0d\u540c\u7269\u54c1\u7b49\u7d1a(ilvl)\u4e0b\u7684\u6700\u5927\u9472\u5b54\u6578","socketsrange":"\u9472\u5b54\u6578\u7bc4\u570d","act5quest":"Act5 \u62c9\u8607\u514b\u7684\u4efb\u52d9\u734e\u52f5","cubeprob":"\u4f7f\u7528\u65b9\u584a\u914d\u65b9\u7684\u5b54\u6578\u51fa\u73fe\u6a5f\u7387"},"props":{"socketsrange":"\u9472\u5b54\u6578\u7bc4\u570d","maxsockets":"\u9472\u5b54\u6578"}},"dropratetable":{"title":{"nametitle":"%{name}\\n\u6389\u843d\u6a5f\u7387\u7c21\u8868"}},"itemcomment":{"title":{"nametitle":"%{name}\\n\u8a55\u8ad6"}}}},"ui":{"search":"\u641c\u5c0b","linkcopied":"\u5df2\u8907\u88fd\u9023\u7d50","language":{"en-US":"English","zh-TW":"\u7e41\u9ad4\u4e2d\u6587"}}}}'),l=n(60985),h={"en-US":{search:{search:"Search",toomany:"Too Many Records...",noresult:"No result found..."},linkcopied:"Link Copied!",tooltip:{short_copyitemlink:"Link",short_dropratetable:"Drop",short_showcomments:"Comments",hint_copyitemlink:"Copy item link",hint_itemlinkcopied:"Link Copied!",hint_dropratetable:"Drop Rate Table",hint_showcomments:"Show Comments",ladder_only:"Ladder Only"},language:{"en-US":"English","zh-TW":"\u7e41\u9ad4\u4e2d\u6587"},tos:"Terms of Service",privacypolicy:"Privacy Policy",login:{logout:"Logout",logintitle:"Sign Up & Sign In",agreeto:"Agree to the ",agreeto_and:" and the ",joindate:"Join Date",pleaseagree:"You didn't agree to the Terms of Service and the Privacy Policy."},comment:{pagetitle:"Comments",logintocomment:"Sign in to comment",saysomething:"Add a comment...",commentontime:"comment on",nocommentyet:"No comments yet.",alerttoomanycharacter:"You have exceeded the maximum character limit.",alertcontainslink:"Unknown links are not allowed.",alertdelete:"Do you really want to delete this comment?",characterremaining:"Characters Remaining:",commentwarning:"- Comments that are not related to this topic will be deleted.\n- Comments that encourage bots will result in account suspension.",magicitemaskcomment:"",commentscount:"%{count} Comments",submit:"Submit"},affixes:{prefixes:"Prefixes",suffixes:"Suffixes",affixes:"Affixes"},sponsors:{sponsorlist:"Sponsors",title:"THANK YOU D2R WORLD SPONSORS!",desc:"We appreciate the support of our sponsors!\nFor sponsors of more than US$5 or NT$150, as long as you log-in to our app/website using the email you filled in during payment, the advertisement will be blocked. \nIf you had sponsored but the email is not listed here, please mail me, thanks!"}},"zh-TW":{search:{search:"\u641c\u5c0b",toomany:"\u641c\u5c0b\u5230\u592a\u591a\u7d50\u679c...",noresult:"\u67e5\u7121\u7d50\u679c"},linkcopied:"\u5df2\u8907\u88fd\u9023\u7d50",tooltip:{short_copyitemlink:"\u9023\u7d50",short_dropratetable:"\u6389\u7387",short_showcomments:"\u7559\u8a00",hint_copyitemlink:"\u8907\u88fd\u7269\u54c1\u9023\u7d50",hint_itemlinkcopied:"\u5df2\u8907\u88fd\u7269\u54c1\u9023\u7d50",hint_dropratetable:"\u986f\u793a\u602a\u7269\u6389\u843d\u6a5f\u7387",hint_showcomments:"\u986f\u793a\u7559\u8a00",ladder_only:"\u5929\u68af\u9650\u5b9a"},language:{"en-US":"English","zh-TW":"\u7e41\u9ad4\u4e2d\u6587"},tos:"\u670d\u52d9\u689d\u6b3e",privacypolicy:"\u96b1\u79c1\u6b0a\u653f\u7b56",login:{logout:"\u767b\u51fa",logintitle:"\u8a3b\u518a\u53ca\u767b\u5165",agreeto:"\u5df2\u95b1\u8b80\u4e26\u540c\u610f",agreeto_and:"\u548c",joindate:"\u52a0\u5165\u65e5\u671f",pleaseagree:"\u60a8\u5c1a\u672a\u540c\u610f\u670d\u52d9\u689d\u6b3e\u53ca\u96b1\u79c1\u6b0a\u653f\u7b56"},comment:{pagetitle:"\u8a55\u8ad6",logintocomment:"\u767b\u5165\u8a55\u8ad6",saysomething:"\u8aaa\u9ede\u4ec0\u9ebc...",commentontime:"\u767c\u8868\u65bc",nocommentyet:"\u76ee\u524d\u5c1a\u7121\u8a55\u8ad6",alerttoomanycharacter:"\u8d85\u904e\u5b57\u5143\u6578\u9650\u5236",alertcontainslink:"\u4e0d\u5141\u8a31\u542b\u6709\u4e0d\u660e\u93c8\u7d50",alertdelete:"\u78ba\u5b9a\u8981\u522a\u9664\u9019\u5247\u8a55\u8ad6?",characterremaining:"\u5269\u9918\u5b57\u5143\u6578:",commentwarning:"- \u8207\u904a\u6232\u6216\u672c\u7bc7\u4e3b\u65e8\u7121\u95dc\u7684\u8a00\u8ad6\u5c07\u6703\u88ab\u522a\u9664\n- \u8a98\u5c0e\u8cfc\u8cb7\u6216\u9f13\u5439\u5916\u639b\u76f8\u95dc\u7684\u8a00\u8ad6\u5c07\u4f7f\u5e33\u865f\u66ab\u505c\u3002",magicitemaskcomment:"\u9019\u4ef6\u88dd\u5099\u9069\u5408\u54ea\u500b\u8077\u696d\u6d41\u6d3e\uff1f\u662f\u5426\u6709\u4ea4\u6613\u50f9\u503c\uff1f\u5206\u4eab\u4f60\u7684\u770b\u6cd5\u4f9b\u4ed6\u4eba\u53c3\u8003\uff01",commentscount:"%{count} \u5247\u8a55\u8ad6",submit:"\u9001\u51fa"},affixes:{prefixes:"\u524d\u7db4",suffixes:"\u5f8c\u7db4",affixes:"\u8a5e\u7db4"},sponsors:{sponsorlist:"\u8d0a\u52a9\u8005\u540d\u55ae",title:"\u611f\u8b1dD2R World\u7684\u8d0a\u52a9\u8005\u5011",desc:"\u4ee5\u4e0b\u662f\u672c\u7ad9\u7684\u8d0a\u52a9\u8005\u540d\u55ae\uff0c\u975e\u5e38\u611f\u8b1d\u4f60\u5011\u7684\u652f\u6301\u8207\u8d0a\u52a9\uff01\n\n\u82e5\u60a8\u66fe\u8cc7\u52a9\u904e\u672c\u7ad9\u4f46\u672a\u88ab\u5217\u5728\u6b64\u8655\uff0c\u518d\u8acb\u60a8\u4f86\u4fe1\u901a\u77e5\u6211\u3002\n(\u8d0a\u52a9\u652f\u4ed8\u5f8c\u7d04\u9700\u534a\u5929\u6642\u9593\u66f4\u65b0\u540d\u55ae)\n\n\u82e5\u60a8\u4f7f\u7528\u6b64e-mail\u767b\u5165\u672c\u7ad9\u6642\uff0c\u672c\u7ad9\u5c07\u70ba\u60a8\u95dc\u9589\u5168\u7ad9\u6240\u6709\u5ee3\u544a\u4ee5\u8868\u793a\u611f\u8b1d\u4e4b\u610f\u3002\n- 2021/11/25\u4ee5\u524d\u7684\u8d0a\u52a9\u8005\u5747\u8a2d\u5b9a\u70ba\u6c38\u4e45\u4e0d\u986f\u793a\u5ee3\u544a\n- 2021/11/25\u5f8c\u8d0a\u52a9\u91d1\u984d\u9054\u53f0\u5e63150\u5143\u6216\u7f8e\u91d15\u5143\u4ee5\u4e0a\uff0c\u4e5f\u5c07\u81ea\u52d5\u70ba\u60a8\u6c38\u4e45\u95dc\u9589\u5ee3\u544a\n"}}};var d=function(e){for(var t=0,n=Object.entries(h);t1e3&&((0,y.J)("me"),b=Date.now())):(console.log("firebase User is signed out"),(0,y.J)("me",null));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}n(16314);var I=s.createElement;c().translations=d(u),c().fallbacks=!0,c().defaultLocale="en-US",n.g.gi18n=c(),n.g.gk=1231,n.g.ff="d2rw",n.g.ads_pending_count=0,console.log=function(){},n.g.requestAnimationFrame||(n.g.requestAnimationFrame=function(){});var k=function(e){var t=e.Component,r=e.pageProps;return(0,s.useEffect)((0,o.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,f._k)(),(0,f.Nc)(),p.default.events.on("routeChangeComplete",(function(){(0,f.Nc)(),n.g.reloadNeed&&(n.g.reloadNeed=void 0,(0,f.Kz)("system","auto-update","LliGvGJ7eDBQo28bkGwIi"),p.default.reload(window.location.pathname))})),w();case 4:case"end":return e.stop()}}),e)}))),[]),I(s.Fragment,null,I(m.default,null,I("meta",{name:"viewport",content:"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover"}),I("meta",{key:"ogimge_index",property:"og:image",content:"https://static.d2r.world/img/ui/large/chinese-figure1.jpg"}),I("meta",{key:"ogtitle_index",property:"og:title",content:"D2R World | \u6697\u9ed1\u7834\u58de\u795e2\u91cd\u88fd\u7248 \u7269\u54c1\u8cc7\u6599\u5eab\u5feb\u67e5\u52a9\u624b"})),I(t,r))}},20638:function(e,t,n){"use strict";n.d(t,{_k:function(){return pe},Kz:function(){return ge},Nc:function(){return me}});var r={};n.r(r),n.d(r,{addTrackers:function(){return G},default:function(){return ce},event:function(){return re},exception:function(){return ie},ga:function(){return X},initialize:function(){return Z},modalview:function(){return te},outboundLink:function(){return se},pageview:function(){return ee},plugin:function(){return oe},send:function(){return Q},set:function(){return Y},testModeAPI:function(){return ae},timing:function(){return ne}});var i=n(809),o=n.n(i),s=n(15861),a=n(67294),c=n(45697),u=n.n(c);function l(e){console.warn("[react-ga]",e)}function h(e){return(h="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n0&&t+e.length!==n.length&&e.search(E)>-1&&":"!==n.charAt(t-2)&&("-"!==n.charAt(t+e.length)||"-"===n.charAt(t-1))&&n.charAt(t-1).search(/[^\s-]/)<0?e.toLowerCase():e.substr(1).search(/[A-Z]|\../)>-1?e:e.charAt(0).toUpperCase()+e.substr(1)}))}var A=!1;function C(e){console.info("[react-ga]",e)}var N=[],P={calls:N,ga:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){return(j="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e){return function(e){if(Array.isArray(e))return U(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=e||"";return(arguments.length>1?arguments[1]:void 0)&&(n=R(e)),t&&(n=T(n)),n}(e,V,$)}function K(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&(q.apply(void 0,t),F&&(C("called ga('arguments');"),C("with arguments: ".concat(JSON.stringify(t))))),window.ga}function Y(e,t){e?"object"===j(e)?(0===Object.keys(e).length&&l("empty `fieldsObject` given to .set()"),K(t,"set",e),F&&(C("called ga('set', fieldsObject);"),C("with fieldsObject: ".concat(JSON.stringify(e))))):l("Expected `fieldsObject` arg to be an Object"):l("`fieldsObject` is required in .set()")}function Q(e,t){K(t,"send",e),F&&(C("called ga('send', fieldObject);"),C("with fieldObject: ".concat(JSON.stringify(e))),C("with trackers: ".concat(JSON.stringify(t))))}function ee(e,t,n){if(e){var r=S(e);if(""!==r){var i={};if(n&&(i.title=n),K(t,"send",function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.category,n=e.variable,r=e.value,i=e.label,o=arguments.length>1?arguments[1]:void 0;if(t&&n&&"number"===typeof r){var s={hitType:"timing",timingCategory:B(t),timingVar:B(n),timingValue:r};i&&(s.timingLabel=B(i)),Q(s,o)}else l("args.category, args.variable AND args.value are required in timing() AND args.value has to be a number")}function re(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.category,n=e.action,r=e.label,i=e.value,o=e.nonInteraction,s=e.transport,a=L(e,["category","action","label","value","nonInteraction","transport"]),c=arguments.length>1?arguments[1]:void 0;if(t&&n){var u={hitType:"event",eventCategory:B(t),eventAction:B(n)};r&&(u.eventLabel=B(r)),"undefined"!==typeof i&&("number"!==typeof i?l("Expected `args.value` arg to be a Number."):u.eventValue=i),"undefined"!==typeof o&&("boolean"!==typeof o?l("`args.nonInteraction` must be a boolean."):u.nonInteraction=o),"undefined"!==typeof s&&("string"!==typeof s?l("`args.transport` must be a string."):(-1===["beacon","xhr","image"].indexOf(s)&&l("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),u.transport=s)),Object.keys(a).filter((function(e){return"dimension"===e.substr(0,"dimension".length)})).forEach((function(e){u[e]=a[e]})),Object.keys(a).filter((function(e){return"metric"===e.substr(0,"metric".length)})).forEach((function(e){u[e]=a[e]})),Q(u,c)}else l("args.category AND args.action are required in event()")}function ie(e,t){var n=e.description,r=e.fatal,i={hitType:"exception"};n&&(i.exDescription=B(n)),"undefined"!==typeof r&&("boolean"!==typeof r?l("`args.fatal` must be a boolean."):i.exFatal=r),Q(i,t)}var oe={require:function(e,t,n){if(e){var r=S(e);if(""!==r){var i=n?"".concat(n,".require"):"require";if(t){if("object"!==j(t))return void l("Expected `options` arg to be an Object");0===Object.keys(t).length&&l("Empty `options` given to .require()"),X(i,r,t),F&&C("called ga('require', '".concat(r,"', ").concat(JSON.stringify(t)))}else X(i,r),F&&C("called ga('require', '".concat(r,"');"))}else l("`name` cannot be an empty string in .require()")}else l("`name` is required in .require()")},execute:function(e,t){for(var n,r,i=arguments.length,o=new Array(i>2?i-2:0),s=2;s-1&&(t.subs[r]=t.subs[t.subs.length-1],t.subs.length--)}}},e.prototype.notify=function(){for(var e=0,t=this.subs;en.errorRetryCount)){var o=Math.min(i.retryCount,8),s=~~((Math.random()+.5)*(1<0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0));return Promise.all(l).then((function(){return h.get(r)}))}return Promise.resolve(h.get(r))},N=function(e,t,n,r){var i=T[e];if(e&&i)for(var o=0;o0));return[2,Promise.all(m).then((function(){if(u)throw u;return h.get(i)}))]}if(u)throw u;return[2,c]}}))}))};Object.defineProperty(y.Provider,"default",{value:f});y.Provider;var L=function(){for(var e=this,t=[],n=0;n2?t[2]:2===t.length&&"object"===typeof t[1]?t[1]:{}),s=t.length>2||2===t.length&&"function"===typeof t[1]||null===t[1]?t[1]:o.fetcher,a=h.serializeKey(i),c=a[0],u=a[1],l=a[2],d=a[3],v=(0,r.useRef)(o);g((function(){v.current=o}));var A=function(){return o.revalidateOnMount||!o.initialData&&void 0===o.revalidateOnMount},C=function(){var e=h.get(c);return"undefined"===typeof e?o.initialData:e},L=function(){return!!h.get(d)||c&&A()},D=C(),M=h.get(l),j=L(),x=(0,r.useRef)({data:!1,error:!1,isValidating:!1}),U=(0,r.useRef)({data:D,error:M,isValidating:j});(0,r.useDebugValue)(U.current.data);var z,F,V=(0,r.useState)({})[1],W=(0,r.useCallback)((function(e){var t=!1;for(var n in e)U.current[n]!==e[n]&&(U.current[n]=e[n],x.current[n]&&(t=!0));if(t){if(H.current||!q.current)return;V({})}}),[]),H=(0,r.useRef)(!1),$=(0,r.useRef)(c),q=(0,r.useRef)(!1),B=(0,r.useCallback)((function(e){for(var t,n=[],r=1;r=0&&(n[r]=n[n.length-1],n.pop())}},G=(0,r.useCallback)((function(t){return void 0===t&&(t={}),b(e,void 0,void 0,(function(){var e,n,r,i,a,f,p,m,g,y;return w(this,(function(b){switch(b.label){case 0:if(!c||!s)return[2,!1];if(H.current)return[2,!1];if(v.current.isPaused())return[2,!1];e=t.retryCount,n=void 0===e?0:e,r=t.dedupe,i=void 0!==r&&r,a=!0,f="undefined"!==typeof _[c]&&i,b.label=1;case 1:return b.trys.push([1,6,,7]),W({isValidating:!0}),h.set(d,!0),f||N(c,U.current.data,U.current.error,!0),p=void 0,m=void 0,f?(m=I[c],[4,_[c]]):[3,3];case 2:return p=b.sent(),[3,5];case 3:return o.loadingTimeout&&!h.get(c)&&setTimeout((function(){a&&B("onLoadingSlow",c,o)}),o.loadingTimeout),_[c]=null!==u?s.apply(void 0,u):s(c),I[c]=m=R(),[4,_[c]];case 4:p=b.sent(),setTimeout((function(){delete _[c],delete I[c]}),o.dedupingInterval),B("onSuccess",p,c,o),b.label=5;case 5:return I[c]>m?[2,!1]:S[c]&&(m<=S[c]||m<=E[c]||0===E[c])?(W({isValidating:!1}),[2,!1]):(h.set(l,void 0),h.set(d,!1),g={isValidating:!1},"undefined"!==typeof U.current.error&&(g.error=void 0),o.compare(U.current.data,p)||(g.data=p),o.compare(h.get(c),p)||h.set(c,p),W(g),f||N(c,p,g.error,!1),[3,7]);case 6:return y=b.sent(),delete _[c],delete I[c],v.current.isPaused()?(W({isValidating:!1}),[2,!1]):(h.set(l,y),U.current.error!==y&&(W({isValidating:!1,error:y}),f||N(c,void 0,y,!1)),B("onError",y,c,o),o.shouldRetryOnError&&B("onErrorRetry",y,c,o,G,{retryCount:n+1,dedupe:!0}),[3,7]);case 7:return a=!1,[2,!0]}}))}))}),[c]);if(g((function(){if(c){H.current=!1;var e=q.current;q.current=!0;var t=U.current.data,n=C();$.current=c,o.compare(t,n)||W({data:n});var r=function(){return G({dedupe:!0})};(e||A())&&("undefined"===typeof n||p?r():m(r));var i=!1,s=J(k,(function(){!i&&v.current.revalidateOnFocus&&(i=!0,r(),setTimeout((function(){return i=!1}),v.current.focusThrottleInterval))})),a=J(O,(function(){v.current.revalidateOnReconnect&&r()})),u=J(T,(function(e,t,n,i,s){void 0===e&&(e=!0),void 0===s&&(s=!0);var a={},c=!1;return"undefined"===typeof t||o.compare(U.current.data,t)||(a.data=t,c=!0),U.current.error!==n&&(a.error=n,c=!0),"undefined"!==typeof i&&U.current.isValidating!==i&&(a.isValidating=i,c=!0),c&&W(a),!!e&&(s?r():G())}));return function(){W=function(){return null},H.current=!0,s(),a(),u()}}}),[c,G]),g((function(){var t=null,n=function(){return b(e,void 0,void 0,(function(){return w(this,(function(e){switch(e.label){case 0:return U.current.error||!v.current.refreshWhenHidden&&!v.current.isDocumentVisible()||!v.current.refreshWhenOffline&&!v.current.isOnline()?[3,2]:[4,G({dedupe:!0})];case 1:e.sent(),e.label=2;case 2:return v.current.refreshInterval&&t&&(t=setTimeout(n,v.current.refreshInterval)),[2]}}))}))};return v.current.refreshInterval&&(t=setTimeout(n,v.current.refreshInterval)),function(){t&&(clearTimeout(t),t=null)}}),[o.refreshInterval,o.refreshWhenHidden,o.refreshWhenOffline,G]),o.suspense){if(z=h.get(c),F=h.get(l),"undefined"===typeof z&&(z=D),"undefined"===typeof F&&(F=M),"undefined"===typeof z&&"undefined"===typeof F){if(_[c]||G(),_[c]&&"function"===typeof _[c].then)throw _[c];z=_[c]}if("undefined"===typeof z&&F)throw F}var Z=(0,r.useMemo)((function(){var e={revalidate:G,mutate:K};return Object.defineProperties(e,{error:{get:function(){return x.current.error=!0,o.suspense?F:$.current===c?U.current.error:M},enumerable:!0},data:{get:function(){return x.current.data=!0,o.suspense?z:$.current===c?U.current.data:D},enumerable:!0},isValidating:{get:function(){return x.current.isValidating=!0,!!c&&U.current.isValidating},enumerable:!0}}),e}),[G,D,M,K,c,o.suspense,F,z]);return Z},D=P},81780:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(80971)}])},16314:function(){},9008:function(e,t,n){e.exports=n(70639)},11163:function(e,t,n){e.exports=n(34651)},70655:function(e,t,n){"use strict";n.d(t,{_T:function(){return r},mG:function(){return i},Jh:function(){return o},XA:function(){return s},CR:function(){return a},ev:function(){return c}});function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function c(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n