From f671bf7ce74b74a258434f813ab5a8fc3d44cb9f Mon Sep 17 00:00:00 2001 From: Redouane Bekkouche Date: Thu, 23 Jun 2022 11:01:12 +0100 Subject: [PATCH 1/3] implement ssr --- .gitignore | 1 - angular.json | 62 +- .../browser/197.c0e4561aaa90c0ab.js | 1 + .../browser/284.06f189de501f0514.js | 1 + .../browser/36.0b2af48f611a2b9c.js | 1 + dist/new-rdv-app/browser/3rdpartylicenses.txt | 936 ++++ .../browser/469.9b8970333e7ad9a6.js | 1 + .../browser/552.9445d6a47ea2b9ac.js | 1 + .../browser/642.5bacad77981cd0f1.js | 1 + .../browser/698.a196ca2f3e10161b.js | 1 + .../browser/781.f3f51c530228233b.js | 1 + .../browser/865.0c5ee2805ad12526.js | 1 + dist/new-rdv-app/browser/assets/i18n/ar.json | 122 + dist/new-rdv-app/browser/assets/i18n/en.json | 121 + dist/new-rdv-app/browser/assets/i18n/fr.json | 122 + .../browser/assets/icons/icon-128x128.png | Bin 0 -> 1253 bytes .../browser/assets/icons/icon-144x144.png | Bin 0 -> 1394 bytes .../browser/assets/icons/icon-152x152.png | Bin 0 -> 1427 bytes .../browser/assets/icons/icon-192x192.png | Bin 0 -> 1790 bytes .../browser/assets/icons/icon-384x384.png | Bin 0 -> 3557 bytes .../browser/assets/icons/icon-512x512.png | Bin 0 -> 5008 bytes .../browser/assets/icons/icon-72x72.png | Bin 0 -> 792 bytes .../browser/assets/icons/icon-96x96.png | Bin 0 -> 958 bytes .../browser/assets/rendezvous-icon.svg | 88 + .../assets/unknown-profile-picture.jpg | Bin 0 -> 22625 bytes .../browser/common.8526cc0c86c704ea.js | 1 + dist/new-rdv-app/browser/favicon.ico | Bin 0 -> 948 bytes .../browser/flags.f73aa829a0084837.png | Bin 0 -> 70857 bytes .../browser/flags@2x.2704c069d12ee746.png | Bin 0 -> 174369 bytes dist/new-rdv-app/browser/index.html | 19 + .../browser/main.ee32473261f5b934.js | 1 + dist/new-rdv-app/browser/manifest.webmanifest | 59 + dist/new-rdv-app/browser/ngsw-worker.js | 1845 ++++++++ dist/new-rdv-app/browser/ngsw.json | 117 + .../browser/polyfills.4caae9b68dd9bdc3.js | 1 + .../browser/runtime.6378eda0406c4cc5.js | 1 + dist/new-rdv-app/browser/safety-worker.js | 26 + .../browser/scripts.db56eda1c5eb3dbb.js | 1 + .../browser/styles.c31d081eb3f2dfb8.css | 10 + dist/new-rdv-app/browser/worker-basic.min.js | 26 + dist/new-rdv-app/server/117.js | 1 + dist/new-rdv-app/server/197.js | 1 + dist/new-rdv-app/server/3rdpartylicenses.txt | 3753 ++++++++++++++++ dist/new-rdv-app/server/642.js | 1 + dist/new-rdv-app/server/698.js | 1 + dist/new-rdv-app/server/781.js | 1 + dist/new-rdv-app/server/814.js | 1 + dist/new-rdv-app/server/865.js | 1 + dist/new-rdv-app/server/main.js | 1 + package-lock.json | 3758 ++++++++++++++--- package.json | 13 +- server.ts | 60 + src/app/app-routing.module.ts | 4 +- src/app/app.module.ts | 2 +- src/app/app.server.module.ts | 14 + src/main.server.ts | 19 + src/main.ts | 12 +- tsconfig.server.json | 20 + 58 files changed, 10709 insertions(+), 522 deletions(-) create mode 100644 dist/new-rdv-app/browser/197.c0e4561aaa90c0ab.js create mode 100644 dist/new-rdv-app/browser/284.06f189de501f0514.js create mode 100644 dist/new-rdv-app/browser/36.0b2af48f611a2b9c.js create mode 100644 dist/new-rdv-app/browser/3rdpartylicenses.txt create mode 100644 dist/new-rdv-app/browser/469.9b8970333e7ad9a6.js create mode 100644 dist/new-rdv-app/browser/552.9445d6a47ea2b9ac.js create mode 100644 dist/new-rdv-app/browser/642.5bacad77981cd0f1.js create mode 100644 dist/new-rdv-app/browser/698.a196ca2f3e10161b.js create mode 100644 dist/new-rdv-app/browser/781.f3f51c530228233b.js create mode 100644 dist/new-rdv-app/browser/865.0c5ee2805ad12526.js create mode 100644 dist/new-rdv-app/browser/assets/i18n/ar.json create mode 100644 dist/new-rdv-app/browser/assets/i18n/en.json create mode 100644 dist/new-rdv-app/browser/assets/i18n/fr.json create mode 100644 dist/new-rdv-app/browser/assets/icons/icon-128x128.png create mode 100644 dist/new-rdv-app/browser/assets/icons/icon-144x144.png create mode 100644 dist/new-rdv-app/browser/assets/icons/icon-152x152.png create mode 100644 dist/new-rdv-app/browser/assets/icons/icon-192x192.png create mode 100644 dist/new-rdv-app/browser/assets/icons/icon-384x384.png create mode 100644 dist/new-rdv-app/browser/assets/icons/icon-512x512.png create mode 100644 dist/new-rdv-app/browser/assets/icons/icon-72x72.png create mode 100644 dist/new-rdv-app/browser/assets/icons/icon-96x96.png create mode 100644 dist/new-rdv-app/browser/assets/rendezvous-icon.svg create mode 100644 dist/new-rdv-app/browser/assets/unknown-profile-picture.jpg create mode 100644 dist/new-rdv-app/browser/common.8526cc0c86c704ea.js create mode 100644 dist/new-rdv-app/browser/favicon.ico create mode 100644 dist/new-rdv-app/browser/flags.f73aa829a0084837.png create mode 100644 dist/new-rdv-app/browser/flags@2x.2704c069d12ee746.png create mode 100644 dist/new-rdv-app/browser/index.html create mode 100644 dist/new-rdv-app/browser/main.ee32473261f5b934.js create mode 100644 dist/new-rdv-app/browser/manifest.webmanifest create mode 100755 dist/new-rdv-app/browser/ngsw-worker.js create mode 100644 dist/new-rdv-app/browser/ngsw.json create mode 100644 dist/new-rdv-app/browser/polyfills.4caae9b68dd9bdc3.js create mode 100644 dist/new-rdv-app/browser/runtime.6378eda0406c4cc5.js create mode 100755 dist/new-rdv-app/browser/safety-worker.js create mode 100644 dist/new-rdv-app/browser/scripts.db56eda1c5eb3dbb.js create mode 100644 dist/new-rdv-app/browser/styles.c31d081eb3f2dfb8.css create mode 100755 dist/new-rdv-app/browser/worker-basic.min.js create mode 100644 dist/new-rdv-app/server/117.js create mode 100644 dist/new-rdv-app/server/197.js create mode 100644 dist/new-rdv-app/server/3rdpartylicenses.txt create mode 100644 dist/new-rdv-app/server/642.js create mode 100644 dist/new-rdv-app/server/698.js create mode 100644 dist/new-rdv-app/server/781.js create mode 100644 dist/new-rdv-app/server/814.js create mode 100644 dist/new-rdv-app/server/865.js create mode 100644 dist/new-rdv-app/server/main.js create mode 100644 server.ts create mode 100644 src/app/app.server.module.ts create mode 100644 src/main.server.ts create mode 100644 tsconfig.server.json diff --git a/.gitignore b/.gitignore index 105c00f..69db5e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # See http://help.github.com/ignore-files/ for more about ignoring files. # compiled output -/dist /tmp /out-tsc # Only exists if Bazel was run diff --git a/angular.json b/angular.json index 55e8271..4e9fb6e 100644 --- a/angular.json +++ b/angular.json @@ -20,7 +20,7 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "outputPath": "dist/new-rdv-app", + "outputPath": "dist/new-rdv-app/browser", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", @@ -60,7 +60,7 @@ { "type": "initial", "maximumWarning": "1.7mb", - "maximumError": "1.7mb" + "maximumError": "1.71mb" }, { "type": "anyComponentStyle", @@ -124,6 +124,64 @@ ], "scripts": [] } + }, + "server": { + "builder": "@angular-devkit/build-angular:server", + "options": { + "outputPath": "dist/new-rdv-app/server", + "main": "server.ts", + "tsConfig": "tsconfig.server.json" + }, + "configurations": { + "production": { + "outputHashing": "media", + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ] + }, + "development": { + "optimization": false, + "sourceMap": true, + "extractLicenses": false + } + }, + "defaultConfiguration": "production" + }, + "serve-ssr": { + "builder": "@nguniversal/builders:ssr-dev-server", + "configurations": { + "development": { + "browserTarget": "new-rdv-app:build:development", + "serverTarget": "new-rdv-app:server:development" + }, + "production": { + "browserTarget": "new-rdv-app:build:production", + "serverTarget": "new-rdv-app:server:production" + } + }, + "defaultConfiguration": "development" + }, + "prerender": { + "builder": "@nguniversal/builders:prerender", + "options": { + "routes": [ + "/" + ] + }, + "configurations": { + "production": { + "browserTarget": "new-rdv-app:build:production", + "serverTarget": "new-rdv-app:server:production" + }, + "development": { + "browserTarget": "new-rdv-app:build:development", + "serverTarget": "new-rdv-app:server:development" + } + }, + "defaultConfiguration": "production" } } } diff --git a/dist/new-rdv-app/browser/197.c0e4561aaa90c0ab.js b/dist/new-rdv-app/browser/197.c0e4561aaa90c0ab.js new file mode 100644 index 0000000..aa5a92c --- /dev/null +++ b/dist/new-rdv-app/browser/197.c0e4561aaa90c0ab.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknew_rdv_app=self.webpackChunknew_rdv_app||[]).push([[197],{197:(F,d,u)=>{u.r(d),u.d(d,{NotFoundModule:()=>m});var c=u(6895),r=u(9116),n=u(4650),l=u(6188);const s=[{path:"",component:(()=>{class o{constructor(){}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=n.Xpm({type:o,selectors:[["app-not-found"]],decls:3,vars:3,template:function(t,N){1&t&&(n.TgZ(0,"p"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&t&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"not-found works!")))},dependencies:[l.X$]}),o})()}];let a=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=n.oAB({type:o}),o.\u0275inj=n.cJS({imports:[r.Bz.forChild(s),r.Bz]}),o})();var p=u(9552);let m=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=n.oAB({type:o}),o.\u0275inj=n.cJS({imports:[c.ez,a,p.m]}),o})()}}]); \ No newline at end of file diff --git a/dist/new-rdv-app/browser/284.06f189de501f0514.js b/dist/new-rdv-app/browser/284.06f189de501f0514.js new file mode 100644 index 0000000..9d09cad --- /dev/null +++ b/dist/new-rdv-app/browser/284.06f189de501f0514.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknew_rdv_app=self.webpackChunknew_rdv_app||[]).push([[284],{8284:(oo,It,g)=>{g.r(It),g.d(It,{ProfileModule:()=>to});var Z=g(6895),pt=g(9116),xe=g(6471),D=g(5861),mt=g(9646),ye=g(8746),ve=g(2084),o=g(4650),we=g(4961),Me=g(8306),et=g(8996),Ce=g(8372),Re=g(4004),Et=g(3900),X=g(5813),nt=g(2011),Ae=g(3942),it=g(9681),I=g(2090),zt=g(4859);const Pt="firebasestorage.googleapis.com",Ut="storageBucket";class b extends I.ZR{constructor(e,t){super(ft(e),`Firebase Storage: ${t} (${ft(e)})`),this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,b.prototype)}_codeEquals(e){return ft(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.message=this.customData.serverResponse?`${this._baseMessage}\n${this.customData.serverResponse}`:this._baseMessage}}function ft(n){return"storage/"+n}function gt(){return new b("unknown","An unknown error occurred, please check the error payload for server response.")}function Ot(){return new b("canceled","User canceled the upload/download.")}function Ht(){return new b("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function q(n){return new b("invalid-argument",n)}function Bt(){return new b("app-deleted","The Firebase app was deleted.")}function Dt(n){return new b("invalid-root-operation","The operation '"+n+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function $(n,e){return new b("invalid-format","String does not match format '"+n+"': "+e)}function J(n){throw new b("internal-error","Internal error: "+n)}class M{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let i;try{i=M.makeFromUrl(e,t)}catch{return new M(e,"")}if(""===i.path)return i;throw function He(n){return new b("invalid-default-bucket","Invalid default bucket '"+n+"'.")}(e)}static makeFromUrl(e,t){let i=null;const r="([A-Za-z0-9.\\-_]+)",c=new RegExp("^gs://"+r+"(/(.*))?$","i");function u(v){v.path_=decodeURIComponent(v.path)}const d=t.replace(/[.]/g,"\\."),y=[{regex:c,indices:{bucket:1,path:3},postModify:function a(v){"/"===v.path.charAt(v.path.length-1)&&(v.path_=v.path_.slice(0,-1))}},{regex:new RegExp(`^https?://${d}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:u},{regex:new RegExp(`^https?://${t===Pt?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${r}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:u}];for(let v=0;vt)throw q(`Invalid value for '${n}'. Expected ${t} or less.`)}function U(n,e,t){let i=e;return null==t&&(i=`https://${e}`),`${t}://${i}/v0${n}`}function Ft(n){const e=encodeURIComponent;let t="?";for(const i in n)n.hasOwnProperty(i)&&(t=t+(e(i)+"=")+e(n[i])+"&");return t=t.slice(0,-1),t}var L=(()=>{return(n=L||(L={}))[n.NO_ERROR=0]="NO_ERROR",n[n.NETWORK_ERROR=1]="NETWORK_ERROR",n[n.ABORT=2]="ABORT",L;var n})();class Qe{constructor(e,t,i,r,a,s,c,l,u,h,d){this.url_=e,this.method_=t,this.headers_=i,this.body_=r,this.successCodes_=a,this.additionalRetryCodes_=s,this.callback_=c,this.errorCallback_=l,this.timeout_=u,this.progressCallback_=h,this.connectionFactory_=d,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((m,f)=>{this.resolve_=m,this.reject_=f,this.start_()})}start_(){const t=(i,r)=>{const a=this.resolve_,s=this.reject_,c=r.connection;if(r.wasSuccessCode)try{const l=this.callback_(c,c.getResponse());!function qe(n){return void 0!==n}(l)?a():a(l)}catch(l){s(l)}else if(null!==c){const l=gt();l.serverResponse=c.getErrorText(),s(this.errorCallback_?this.errorCallback_(c,l):l)}else s(r.canceled?this.appDelete_?Bt():Ot():function Ue(){return new b("retry-limit-exceeded","Max retry time for operation exceeded, please try again.")}())};this.canceled_?t(0,new rt(!1,null,!0)):this.backoffId_=function Ze(n,e,t){let i=1,r=null,a=null,s=!1,c=0;function l(){return 2===c}let u=!1;function h(...p){u||(u=!0,e.apply(null,p))}function d(p){r=setTimeout(()=>{r=null,n(f,l())},p)}function m(){a&&clearTimeout(a)}function f(p,...A){if(u)return void m();if(p)return m(),void h.call(null,p,...A);if(l()||s)return m(),void h.call(null,p,...A);let y;i<64&&(i*=2),1===c?(c=2,y=0):y=1e3*(i+Math.random()),d(y)}let _=!1;function x(p){_||(_=!0,m(),!u&&(null!==r?(p||(c=2),clearTimeout(r),d(0)):p||(c=1)))}return d(0),a=setTimeout(()=>{s=!0,x(!0)},t),x}((i,r)=>{if(r)return void i(!1,new rt(!1,null,!0));const a=this.connectionFactory_();this.pendingConnection_=a;const s=c=>{null!==this.progressCallback_&&this.progressCallback_(c.loaded,c.lengthComputable?c.total:-1)};null!==this.progressCallback_&&a.addUploadProgressListener(s),a.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&a.removeUploadProgressListener(s),this.pendingConnection_=null;const c=a.getErrorCode()===L.NO_ERROR,l=a.getStatus();if(!c||this.isRetryStatusCode_(l)){const h=a.getErrorCode()===L.ABORT;return void i(!1,new rt(!1,null,h))}const u=-1!==this.successCodes_.indexOf(l);i(!0,new rt(u,a))})},t,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&function We(n){n(!1)}(this.backoffId_),null!==this.pendingConnection_&&this.pendingConnection_.abort()}isRetryStatusCode_(e){const t=e>=500&&e<600,r=-1!==[408,429].indexOf(e),a=-1!==this.additionalRetryCodes_.indexOf(e);return t||r||a}}class rt{constructor(e,t,i){this.wasSuccessCode=e,this.connection=t,this.canceled=!!i}}function Ve(...n){const e=function Ke(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}();if(void 0!==e){const t=new e;for(let i=0;i>6,128|63&i):55296==(64512&i)?t>18,128|i>>12&63,128|i>>6&63,128|63&i)):e.push(239,191,189):56320==(64512&i)?e.push(239,191,189):e.push(224|i>>12,128|i>>6&63,128|63&i)}return new Uint8Array(e)}function Wt(n,e){switch(n){case k.BASE64:{const r=-1!==e.indexOf("-"),a=-1!==e.indexOf("_");if(r||a)throw $(n,"Invalid character '"+(r?"-":"_")+"' found: is it base64url encoded?");break}case k.BASE64URL:{const r=-1!==e.indexOf("+"),a=-1!==e.indexOf("/");if(r||a)throw $(n,"Invalid character '"+(r?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let t;try{t=function en(n){return atob(n)}(e)}catch{throw $(n,"Invalid character found")}const i=new Uint8Array(t.length);for(let r=0;r][;base64],");const i=t[1]||null;null!=i&&(this.base64=function an(n,e){return n.length>=e.length&&n.substring(n.length-e.length)===e}(i,";base64"),this.contentType=this.base64?i.substring(0,i.length-7):i),this.rest=e.substring(e.indexOf(",")+1)}}class E{constructor(e,t){let i=0,r="";Lt(e)?(this.data_=e,i=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),i=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),i=e.length),this.size_=i,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,t){if(Lt(this.data_)){const r=function tn(n,e,t){return n.webkitSlice?n.webkitSlice(e,t):n.mozSlice?n.mozSlice(e,t):n.slice?n.slice(e,t):null}(this.data_,e,t);return null===r?null:new E(r)}{const i=new Uint8Array(this.data_.buffer,e,t-e);return new E(i,!0)}}static getBlob(...e){if(_t()){const t=e.map(i=>i instanceof E?i.data_:i);return new E(Ve.apply(null,t))}{const t=e.map(s=>ot(s)?yt(k.RAW,s).data:s.data_);let i=0;t.forEach(s=>{i+=s.byteLength});const r=new Uint8Array(i);let a=0;return t.forEach(s=>{for(let c=0;c0&&(a.delimiter=t),i&&(a.pageToken=i),r&&(a.maxResults=r);const c=U(e.bucketOnlyServerUrl(),n.host,n._protocol),u=n.maxOperationRetryTime,h=new z(c,"GET",function gn(n,e){return function t(i,r){const a=function fn(n,e,t){const i=vt(t);return null===i?null:function mn(n,e,t){const i={prefixes:[],items:[],nextPageToken:t.nextPageToken};if(t[Qt])for(const r of t[Qt]){const a=r.replace(/\/$/,""),s=n._makeStorageReference(new M(e,a));i.prefixes.push(s)}if(t.items)for(const r of t.items){const a=n._makeStorageReference(new M(e,r.name));i.items.push(a)}return i}(n,e,i)}(n,e,r);return P(null!==a),a}}(n,e.bucket),u);return h.urlParams=a,h.errorHandler=N(e),h}function $t(n,e,t){const i=Object.assign({},t);return i.fullPath=n.path,i.size=e.size(),i.contentType||(i.contentType=function wn(n,e){return n&&n.contentType||e&&e.type()||"application/octet-stream"}(null,e)),i}class ct{constructor(e,t,i,r){this.current=e,this.total=t,this.finalized=!!i,this.metadata=r||null}}function Mt(n,e){let t=null;try{t=n.getResponseHeader("X-Goog-Upload-Status")}catch{P(!1)}return P(!!t&&-1!==(e||["active"]).indexOf(t)),t}const An={STATE_CHANGED:"state_changed"},R={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function Ct(n){switch(n){case"running":case"pausing":case"canceling":return R.RUNNING;case"paused":return R.PAUSED;case"success":return R.SUCCESS;case"canceled":return R.CANCELED;default:return R.ERROR}}class kn{constructor(e,t,i){if(function Ne(n){return"function"==typeof n}(e)||null!=t||null!=i)this.next=e,this.error=t??void 0,this.complete=i??void 0;else{const a=e;this.next=a.next,this.error=a.error,this.complete=a.complete}}}function G(n){return(...e)=>{Promise.resolve().then(()=>n(...e))}}class Sn extends class Tn{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=L.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=L.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=L.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,t,i,r){if(this.sent_)throw J("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(const a in r)r.hasOwnProperty(a)&&this.xhr_.setRequestHeader(a,r[a].toString());return void 0!==i?this.xhr_.send(i):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw J("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw J("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw J("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw J("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}{initXhr(){this.xhr_.responseType="text"}}function T(){return new Sn}class te{constructor(e,t,i=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=e,this._blob=t,this._metadata=i,this._mappings=K(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=r=>{this._request=void 0,this._chunkMultiplier=1,r._codeEquals("canceled")?(this._needToFetchStatus=!0,this.completeTransitions_()):(this._error=r,this._transition("error"))},this._metadataErrorHandler=r=>{this._request=void 0,r._codeEquals("canceled")?this.completeTransitions_():(this._error=r,this._transition("error"))},this._promise=new Promise((r,a)=>{this._resolve=r,this._reject=a,this._start()}),this._promise.then(null,()=>{})}_makeProgressCallback(){const e=this._transferred;return t=>this._updateProgress(e+t)}_shouldDoResumable(e){return e.size()>262144}_start(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this._continueUpload():this._oneShotUpload())}_resolveToken(e){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([t,i])=>{switch(this._state){case"running":e(t,i);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused")}})}_createResumable(){this._resolveToken((e,t)=>{const i=function Mn(n,e,t,i,r){const a=e.bucketOnlyServerUrl(),s=$t(e,i,r),c={name:s.fullPath},l=U(a,n.host,n._protocol),h={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${i.size()}`,"X-Goog-Upload-Header-Content-Type":s.contentType,"Content-Type":"application/json; charset=utf-8"},d=wt(s,t),_=new z(l,"POST",function f(x){let p;Mt(x);try{p=x.getResponseHeader("X-Goog-Upload-URL")}catch{P(!1)}return P(ot(p)),p},n.maxUploadRetryTime);return _.urlParams=c,_.headers=h,_.body=d,_.errorHandler=N(e),_}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(i,T,e,t);this._request=r,r.getPromise().then(a=>{this._request=void 0,this._uploadUrl=a,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){const e=this._uploadUrl;this._resolveToken((t,i)=>{const r=function Cn(n,e,t,i){const l=new z(t,"POST",function a(u){const h=Mt(u,["active","final"]);let d=null;try{d=u.getResponseHeader("X-Goog-Upload-Size-Received")}catch{P(!1)}d||P(!1);const m=Number(d);return P(!isNaN(m)),new ct(m,i.size(),"final"===h)},n.maxUploadRetryTime);return l.headers={"X-Goog-Upload-Command":"query"},l.errorHandler=N(e),l}(this._ref.storage,this._ref._location,e,this._blob),a=this._ref.storage._makeRequest(r,T,t,i);this._request=a,a.getPromise().then(s=>{this._request=void 0,this._updateProgress(s.current),this._needToFetchStatus=!1,s.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){const e=262144*this._chunkMultiplier,t=new ct(this._transferred,this._blob.size()),i=this._uploadUrl;this._resolveToken((r,a)=>{let s;try{s=function Rn(n,e,t,i,r,a,s,c){const l=new ct(0,0);if(s?(l.current=s.current,l.total=s.total):(l.current=0,l.total=i.size()),i.size()!==l.total)throw function De(){return new b("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.")}();const u=l.total-l.current;let h=u;r>0&&(h=Math.min(h,r));const d=l.current,_={"X-Goog-Upload-Command":h===u?"upload, finalize":"upload","X-Goog-Upload-Offset":`${l.current}`},x=i.slice(d,d+h);if(null===x)throw Ht();const y=new z(t,"POST",function p(v,H){const B=Mt(v,["active","final"]),Q=l.current+h,F=i.size();let tt;return tt="final"===B?st(e,a)(v,H):null,new ct(Q,F,"final"===B,tt)},e.maxUploadRetryTime);return y.headers=_,y.body=x.uploadData(),y.progressCallback=c||null,y.errorHandler=N(n),y}(this._ref._location,this._ref.storage,i,this._blob,e,this._mappings,t,this._makeProgressCallback())}catch(l){return this._error=l,void this._transition("error")}const c=this._ref.storage._makeRequest(s,T,r,a);this._request=c,c.getPromise().then(l=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(l.current),l.finalized?(this._metadata=l.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){262144*this._chunkMultiplier<33554432&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((e,t)=>{const i=Yt(this._ref.storage,this._ref._location,this._mappings),r=this._ref.storage._makeRequest(i,T,e,t);this._request=r,r.getPromise().then(a=>{this._request=void 0,this._metadata=a,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((e,t)=>{const i=function Jt(n,e,t,i,r){const a=e.bucketOnlyServerUrl(),s={"X-Goog-Upload-Protocol":"multipart"},l=function c(){let y="";for(let v=0;v<2;v++)y+=Math.random().toString().slice(2);return y}();s["Content-Type"]="multipart/related; boundary="+l;const u=$t(e,i,r),h=wt(u,t),f=E.getBlob("--"+l+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+h+"\r\n--"+l+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",i,"\r\n--"+l+"--");if(null===f)throw Ht();const _={name:u.fullPath},x=U(a,n.host,n._protocol),A=n.maxUploadRetryTime,w=new z(x,"POST",st(n,t),A);return w.urlParams=_,w.headers=s,w.body=f.uploadData(),w.errorHandler=N(e),w}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(i,T,e,t);this._request=r,r.getPromise().then(a=>{this._request=void 0,this._metadata=a,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(e){const t=this._transferred;this._transferred=e,this._transferred!==t&&this._notifyObservers()}_transition(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,void 0!==this._request&&this._request.cancel();break;case"running":const t="paused"===this._state;this._state=e,t&&(this._notifyObservers(),this._start());break;case"paused":case"error":case"success":this._state=e,this._notifyObservers();break;case"canceled":this._error=Ot(),this._state=e,this._notifyObservers()}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}}get snapshot(){const e=Ct(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}on(e,t,i,r){const a=new kn(t||void 0,i||void 0,r||void 0);return this._addObserver(a),()=>{this._removeObserver(a)}}then(e,t){return this._promise.then(e,t)}catch(e){return this.then(null,e)}_addObserver(e){this._observers.push(e),this._notifyObserver(e)}_removeObserver(e){const t=this._observers.indexOf(e);-1!==t&&this._observers.splice(t,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(t=>{this._notifyObserver(t)})}_finishPromise(){if(void 0!==this._resolve){let e=!0;switch(Ct(this._state)){case R.SUCCESS:G(this._resolve.bind(null,this.snapshot))();break;case R.CANCELED:case R.ERROR:G(this._reject.bind(null,this._error))();break;default:e=!1}e&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(e){switch(Ct(this._state)){case R.RUNNING:case R.PAUSED:e.next&&G(e.next.bind(e,this.snapshot))();break;case R.SUCCESS:e.complete&&G(e.complete.bind(e))();break;default:e.error&&G(e.error.bind(e,this._error))()}}resume(){const e="paused"===this._state||"pausing"===this._state;return e&&this._transition("running"),e}pause(){const e="running"===this._state;return e&&this._transition("pausing"),e}cancel(){const e="running"===this._state||"pausing"===this._state;return e&&this._transition("canceling"),e}}class W{constructor(e,t){this._service=e,this._location=t instanceof M?t:M.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new W(e,t)}get root(){const e=new M(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return Nt(this._location.path)}get storage(){return this._service}get parent(){const e=function sn(n){if(0===n.length)return null;const e=n.lastIndexOf("/");return-1===e?"":n.slice(0,e)}(this._location.path);if(null===e)return null;const t=new M(this._location.bucket,e);return new W(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw Dt(e)}}function ne(n,e,t){return Rt.apply(this,arguments)}function Rt(){return(Rt=(0,D.Z)(function*(n,e,t){const r=yield ie(n,{pageToken:t});e.prefixes.push(...r.prefixes),e.items.push(...r.items),null!=r.nextPageToken&&(yield ne(n,e,r.nextPageToken))})).apply(this,arguments)}function ie(n,e){null!=e&&"number"==typeof e.maxResults&&bt("options.maxResults",1,1e3,e.maxResults);const t=e||{},i=bn(n.storage,n._location,"/",t.pageToken,t.maxResults);return n.storage.makeRequestWithTokens(i,T)}function Zn(n){n._throwIfRoot("getDownloadURL");const e=function xn(n,e,t){const r=U(e.fullServerUrl(),n.host,n._protocol),s=n.maxOperationRetryTime,c=new z(r,"GET",function _n(n,e){return function t(i,r){const a=Gt(n,r,e);return P(null!==a),function pn(n,e,t,i){const r=vt(e);if(null===r||!ot(r.downloadTokens))return null;const a=r.downloadTokens;if(0===a.length)return null;const s=encodeURIComponent;return a.split(",").map(u=>{const d=n.fullPath;return U("/b/"+s(n.bucket)+"/o/"+s(d),t,i)+Ft({alt:"media",token:u})})[0]}(a,r,n.host,n._protocol)}}(n,t),s);return c.errorHandler=V(e),c}(n.storage,n._location,K());return n.storage.makeRequestWithTokens(e,T).then(t=>{if(null===t)throw function Le(){return new b("no-download-url","The given file does not have any download URLs.")}();return t})}function oe(n,e){const t=function cn(n,e){const t=e.split("/").filter(i=>i.length>0).join("/");return 0===n.length?t:n+"/"+t}(n._location.path,e),i=new M(n._location.bucket,t);return new W(n.storage,i)}function re(n,e){if(n instanceof At){const t=n;if(null==t._bucket)throw function Be(){return new b("no-default-bucket","No default bucket found. Did you set the '"+Ut+"' property when initializing the app?")}();const i=new W(t,t._bucket);return null!=e?re(i,e):i}return void 0!==e?oe(n,e):n}function Gn(n,e){if(e&&function qn(n){return/^[A-Za-z]+:\/\//.test(n)}(e)){if(n instanceof At)return function Nn(n,e){return new W(n,e)}(n,e);throw q("To use ref(service, url), the first argument must be a Storage instance.")}return re(n,e)}function ae(n,e){const t=e?.[Ut];return null==t?null:M.makeFromBucketSpec(t,n)}class At{constructor(e,t,i,r,a){this.app=e,this._authProvider=t,this._appCheckProvider=i,this._url=r,this._firebaseVersion=a,this._bucket=null,this._host=Pt,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=r?M.makeFromBucketSpec(r,this._host):ae(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._bucket=null!=this._url?M.makeFromBucketSpec(this._url,e):ae(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){bt("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){bt("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}_getAuthToken(){var e=this;return(0,D.Z)(function*(){if(e._overrideAuthToken)return e._overrideAuthToken;const t=e._authProvider.getImmediate({optional:!0});if(t){const i=yield t.getToken();if(null!==i)return i.accessToken}return null})()}_getAppCheckToken(){var e=this;return(0,D.Z)(function*(){const t=e._appCheckProvider.getImmediate({optional:!0});return t?(yield t.getToken()).token:null})()}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new W(this,e)}_makeRequest(e,t,i,r){if(this._deleted)return new Fe(Bt());{const a=function Je(n,e,t,i,r,a){const s=Ft(n.urlParams),c=n.url+s,l=Object.assign({},n.headers);return function Xe(n,e){e&&(n["X-Firebase-GMPID"]=e)}(l,e),function je(n,e){null!==e&&e.length>0&&(n.Authorization="Firebase "+e)}(l,t),function Ye(n,e){n["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}(l,a),function $e(n,e){null!==e&&(n["X-Firebase-AppCheck"]=e)}(l,i),new Qe(c,n.method,l,n.body,n.successCodes,n.additionalRetryCodes,n.handler,n.errorHandler,n.timeout,n.progressCallback,r)}(e,this._appId,i,r,t,this._firebaseVersion);return this._requests.add(a),a.getPromise().then(()=>this._requests.delete(a),()=>this._requests.delete(a)),a}}makeRequestWithTokens(e,t){var i=this;return(0,D.Z)(function*(){const[r,a]=yield Promise.all([i._getAuthToken(),i._getAppCheckToken()]);return i._makeRequest(e,t,r,a).getPromise()})()}}const se="@firebase/storage";function ue(n,e){return Gn(n=(0,I.m9)(n),e)}function ni(n,{instanceIdentifier:e}){const t=n.getProvider("app").getImmediate(),i=n.getProvider("auth-internal"),r=n.getProvider("app-check-internal");return new At(t,i,r,e,it.SDK_VERSION)}!function ii(){(0,it._registerComponent)(new zt.wA("storage",ni,"PUBLIC").setMultipleInstances(!0)),(0,it.registerVersion)(se,"0.9.7",""),(0,it.registerVersion)(se,"0.9.7","esm2017")}();class lt{constructor(e,t,i){this._delegate=e,this.task=t,this.ref=i}get bytesTransferred(){return this._delegate.bytesTransferred}get metadata(){return this._delegate.metadata}get state(){return this._delegate.state}get totalBytes(){return this._delegate.totalBytes}}class he{constructor(e,t){this._delegate=e,this._ref=t,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate)}get snapshot(){return new lt(this._delegate.snapshot,this,this._ref)}then(e,t){return this._delegate.then(i=>{if(e)return e(new lt(i,this,this._ref))},t)}on(e,t,i,r){let a;return t&&(a="function"==typeof t?s=>t(new lt(s,this,this._ref)):{next:t.next?s=>t.next(new lt(s,this,this._ref)):void 0,complete:t.complete||void 0,error:t.error||void 0}),this._delegate.on(e,a,i||void 0,r||void 0)}}class de{constructor(e,t){this._delegate=e,this._service=t}get prefixes(){return this._delegate.prefixes.map(e=>new O(e,this._service))}get items(){return this._delegate.items.map(e=>new O(e,this._service))}get nextPageToken(){return this._delegate.nextPageToken||null}}class O{constructor(e,t){this._delegate=e,this.storage=t}get name(){return this._delegate.name}get bucket(){return this._delegate.bucket}get fullPath(){return this._delegate.fullPath}toString(){return this._delegate.toString()}child(e){const t=function ti(n,e){return oe(n,e)}(this._delegate,e);return new O(t,this.storage)}get root(){return new O(this._delegate.root,this.storage)}get parent(){const e=this._delegate.parent;return null==e?null:new O(e,this.storage)}put(e,t){return this._throwIfRoot("put"),new he(function jn(n,e,t){return function Hn(n,e,t){return n._throwIfRoot("uploadBytesResumable"),new te(n,new E(e),t)}(n=(0,I.m9)(n),e,t)}(this._delegate,e,t),this)}putString(e,t=k.RAW,i){this._throwIfRoot("putString");const r=yt(t,e),a=Object.assign({},i);return null==a.contentType&&null!=r.contentType&&(a.contentType=r.contentType),new he(new te(this._delegate,new E(r.data,!0),a),this)}listAll(){return function Jn(n){return function Dn(n){const e={prefixes:[],items:[]};return ne(n,e).then(()=>e)}(n=(0,I.m9)(n))}(this._delegate).then(e=>new de(e,this.storage))}list(e){return function $n(n,e){return ie(n=(0,I.m9)(n),e)}(this._delegate,e||void 0).then(t=>new de(t,this.storage))}getMetadata(){return function Yn(n){return function Ln(n){n._throwIfRoot("getMetadata");const e=Yt(n.storage,n._location,K());return n.storage.makeRequestWithTokens(e,T)}(n=(0,I.m9)(n))}(this._delegate)}updateMetadata(e){return function Xn(n,e){return function Fn(n,e){n._throwIfRoot("updateMetadata");const t=function yn(n,e,t,i){const a=U(e.fullServerUrl(),n.host,n._protocol),c=wt(t,i),u=n.maxOperationRetryTime,h=new z(a,"PATCH",st(n,i),u);return h.headers={"Content-Type":"application/json; charset=utf-8"},h.body=c,h.errorHandler=V(e),h}(n.storage,n._location,e,K());return n.storage.makeRequestWithTokens(t,T)}(n=(0,I.m9)(n),e)}(this._delegate,e)}getDownloadURL(){return function Kn(n){return Zn(n=(0,I.m9)(n))}(this._delegate)}delete(){return this._throwIfRoot("delete"),function Vn(n){return function Wn(n){n._throwIfRoot("deleteObject");const e=function vn(n,e){const i=U(e.fullServerUrl(),n.host,n._protocol),c=new z(i,"DELETE",function s(l,u){},n.maxOperationRetryTime);return c.successCodes=[200,204],c.errorHandler=V(e),c}(n.storage,n._location);return n.storage.makeRequestWithTokens(e,T)}(n=(0,I.m9)(n))}(this._delegate)}_throwIfRoot(e){if(""===this._delegate._location.path)throw Dt(e)}}class pe{constructor(e,t){this.app=e,this._delegate=t}get maxOperationRetryTime(){return this._delegate.maxOperationRetryTime}get maxUploadRetryTime(){return this._delegate.maxUploadRetryTime}ref(e){if(me(e))throw q("ref() expected a child path but got a URL, use refFromURL instead.");return new O(ue(this._delegate,e),this)}refFromURL(e){if(!me(e))throw q("refFromURL() expected a full URL but got a child path, use ref() instead.");try{M.makeFromUrl(e,this._delegate.host)}catch{throw q("refFromUrl() expected a valid full URL but got an invalid one.")}return new O(ue(this._delegate,e),this)}setMaxUploadRetryTime(e){this._delegate.maxUploadRetryTime=e}setMaxOperationRetryTime(e){this._delegate.maxOperationRetryTime=e}useEmulator(e,t,i={}){!function ei(n,e,t,i={}){!function Qn(n,e,t,i={}){n.host=`${e}:${t}`,n._protocol="http";const{mockUserToken:r}=i;r&&(n._overrideAuthToken="string"==typeof r?r:(0,I.Sg)(r,n.app.options.projectId))}(n,e,t,i)}(this._delegate,e,t,i)}}function me(n){return/^[A-Za-z]+:\/\//.test(n)}function si(n,{instanceIdentifier:e}){const t=n.getProvider("app-compat").getImmediate(),i=n.getProvider("storage").getImmediate({identifier:e});return new pe(t,i)}!function ci(n){const e={TaskState:R,TaskEvent:An,StringFormat:k,Storage:pe,Reference:O};n.INTERNAL.registerComponent(new zt.wA("storage-compat",si,"PUBLIC").setServiceProps(e).setMultipleInstances(!0)),n.registerVersion("@firebase/storage-compat","0.1.15")}(Ae.Z);var li=g(440);function fe(n){const e=function ui(n){return new Me.y(e=>{const t=s=>e.next(s);t(n.snapshot);const a=n.on("state_changed",t);return n.then(s=>{t(s),e.complete()},s=>{t(n.snapshot),(s=>{e.error(s)})(s)}),function(){a()}}).pipe((0,Ce.b)(0))}(n);return{task:n,then:n.then.bind(n),catch:n.catch.bind(n),pause:n.pause.bind(n),cancel:n.cancel.bind(n),resume:n.resume.bind(n),snapshotChanges:()=>e,percentageChanges:()=>e.pipe((0,Re.U)(t=>t.bytesTransferred/t.totalBytes*100))}}function ut(n){return{getDownloadURL:()=>(0,mt.of)(void 0).pipe(X.fc,(0,Et.w)(()=>n.getDownloadURL()),X.iC),getMetadata:()=>(0,mt.of)(void 0).pipe(X.fc,(0,Et.w)(()=>n.getMetadata()),X.iC),delete:()=>(0,et.D)(n.delete()),child:e=>ut(n.child(e)),updateMetadata:e=>(0,et.D)(n.updateMetadata(e)),put:(e,t)=>fe(n.put(e,t)),putString:(e,t,i)=>fe(n.putString(e,t,i)),list:e=>(0,et.D)(n.list(e)),listAll:()=>(0,et.D)(n.listAll())}}g(127);const hi=new o.OlP("angularfire2.storageBucket"),di=new o.OlP("angularfire2.storage.maxUploadRetryTime"),pi=new o.OlP("angularfire2.storage.maxOperationRetryTime"),mi=new o.OlP("angularfire2.storage.use-emulator");let fi=(()=>{class n{constructor(t,i,r,a,s,c,l,u,h,d){const m=(0,nt.on)(t,s,i);this.storage=(0,nt.cc)(`${m.name}.storage.${r}`,"AngularFireStorage",m.name,()=>{const f=s.runOutsideAngular(()=>m.storage(r||void 0)),_=h;return _&&f.useEmulator(..._),l&&f.setMaxUploadRetryTime(l),u&&f.setMaxOperationRetryTime(u),f},[l,u])}ref(t){return ut(this.storage.ref(t))}refFromURL(t){return ut(this.storage.refFromURL(t))}upload(t,i,r){return ut(this.storage.ref(t)).put(i,r)}}return n.\u0275fac=function(t){return new(t||n)(o.LFG(nt.Dh),o.LFG(nt.xv,8),o.LFG(hi,8),o.LFG(o.Lbi),o.LFG(o.R0b),o.LFG(X.HU),o.LFG(di,8),o.LFG(pi,8),o.LFG(mi,8),o.LFG(li.nm,8))},n.\u0275prov=o.Yz7({token:n,factory:n.\u0275fac,providedIn:"any"}),n})();var gi=g(2824),_i=g(1481);const bi=["wrapper"],xi=["sourceImage"];function yi(n,e){if(1&n){const t=o.EpF();o.TgZ(0,"img",4,5),o.NdJ("load",function(){o.CHM(t);const r=o.oxw();return o.KtG(r.imageLoadedInView())}),o.qZA()}if(2&n){const t=o.oxw();o.Udp("visibility",t.imageVisible?"visible":"hidden")("transform",t.safeTransformStyle),o.Q6J("src",t.safeImgDataUrl,o.LSH)}}function vi(n,e){if(1&n){const t=o.EpF();o.ynx(0),o.TgZ(1,"span",9),o.NdJ("mousedown",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"topleft"))})("touchstart",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"topleft"))}),o._UZ(2,"span",10),o.qZA(),o.TgZ(3,"span",11),o._UZ(4,"span",10),o.qZA(),o.TgZ(5,"span",12),o.NdJ("mousedown",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"topright"))})("touchstart",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"topright"))}),o._UZ(6,"span",10),o.qZA(),o.TgZ(7,"span",13),o._UZ(8,"span",10),o.qZA(),o.TgZ(9,"span",14),o.NdJ("mousedown",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"bottomright"))})("touchstart",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"bottomright"))}),o._UZ(10,"span",10),o.qZA(),o.TgZ(11,"span",15),o._UZ(12,"span",10),o.qZA(),o.TgZ(13,"span",16),o.NdJ("mousedown",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"bottomleft"))})("touchstart",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"bottomleft"))}),o._UZ(14,"span",10),o.qZA(),o.TgZ(15,"span",17),o._UZ(16,"span",10),o.qZA(),o.TgZ(17,"span",18),o.NdJ("mousedown",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"top"))})("touchstart",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"top"))}),o.qZA(),o.TgZ(18,"span",19),o.NdJ("mousedown",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"right"))})("touchstart",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"right"))}),o.qZA(),o.TgZ(19,"span",20),o.NdJ("mousedown",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"bottom"))})("touchstart",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"bottom"))}),o.qZA(),o.TgZ(20,"span",21),o.NdJ("mousedown",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"left"))})("touchstart",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.startMove(r,a.moveTypes.Resize,"left"))}),o.qZA(),o.BQk()}}function wi(n,e){if(1&n){const t=o.EpF();o.TgZ(0,"div",6),o.NdJ("keydown",function(r){o.CHM(t);const a=o.oxw();return o.KtG(a.keyboardAccess(r))}),o.TgZ(1,"div",7),o.NdJ("mousedown",function(r){o.CHM(t);const a=o.oxw();return o.KtG(a.startMove(r,a.moveTypes.Move))})("touchstart",function(r){o.CHM(t);const a=o.oxw();return o.KtG(a.startMove(r,a.moveTypes.Move))}),o.qZA(),o.YNc(2,vi,21,0,"ng-container",8),o.qZA()}if(2&n){const t=o.oxw();o.Udp("top",t.cropper.y1,"px")("left",t.cropper.x1,"px")("width",t.cropper.x2-t.cropper.x1,"px")("height",t.cropper.y2-t.cropper.y1,"px")("margin-left","center"===t.alignImage?t.marginLeft:null)("visibility",t.imageVisible?"visible":"hidden"),o.ekj("ngx-ic-round",t.roundCropper),o.xp6(2),o.Q6J("ngIf",!t.hideResizeSquares)}}class Mi{constructor(){this.format="png",this.maintainAspectRatio=!0,this.transform={},this.aspectRatio=1,this.resizeToWidth=0,this.resizeToHeight=0,this.cropperMinWidth=0,this.cropperMinHeight=0,this.cropperMaxHeight=0,this.cropperMaxWidth=0,this.cropperStaticWidth=0,this.cropperStaticHeight=0,this.canvasRotation=0,this.initialStepSize=3,this.roundCropper=!1,this.onlyScaleDown=!1,this.imageQuality=92,this.autoCrop=!0,this.backgroundColor=null,this.containWithinAspectRatio=!1,this.hideResizeSquares=!1,this.alignImage="center",this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.cropperScaledMaxWidth=20,this.cropperScaledMaxHeight=20,this.stepSize=this.initialStepSize}setOptions(e){Object.keys(e).filter(t=>t in this).forEach(t=>this[t]=e[t]),this.validateOptions()}setOptionsFromChanges(e){Object.keys(e).filter(t=>t in this).forEach(t=>this[t]=e[t].currentValue),this.validateOptions()}validateOptions(){if(this.maintainAspectRatio&&!this.aspectRatio)throw new Error("`aspectRatio` should > 0 when `maintainAspectRatio` is enabled")}}var S=(()=>{return(n=S||(S={})).Move="move",n.Resize="resize",n.Pinch="pinch",S;var n})();function ge(n,e){return n/100*e}let Ti=(()=>{class n{crop(t,i,r,a){const s=this.getImagePosition(t,i,r,a),c=s.x2-s.x1,l=s.y2-s.y1,u=document.createElement("canvas");u.width=c,u.height=l;const h=u.getContext("2d");if(!h)return null;null!=a.backgroundColor&&(h.fillStyle=a.backgroundColor,h.fillRect(0,0,c,l));const d=(a.transform.scale||1)*(a.transform.flipH?-1:1),m=(a.transform.scale||1)*(a.transform.flipV?-1:1),f=i.transformed;h.setTransform(d,0,0,m,f.size.width/2,f.size.height/2),h.translate(-s.x1/d,-s.y1/m),h.rotate((a.transform.rotate||0)*Math.PI/180);const _=a.transform.translateH?ge(a.transform.translateH,f.size.width):0,x=a.transform.translateV?ge(a.transform.translateV,f.size.height):0;h.drawImage(f.image,_-f.size.width/2,x-f.size.height/2);const p={width:c,height:l,imagePosition:s,cropperPosition:{...r}};a.containWithinAspectRatio&&(p.offsetImagePosition=this.getOffsetImagePosition(t,i,r,a));const A=this.getResizeRatio(c,l,a);return 1!==A&&(p.width=Math.round(c*A),p.height=a.maintainAspectRatio?Math.round(p.width/a.aspectRatio):Math.round(l*A),function ki(n,e,t){const i=n.width,r=n.height,a=i/(e=Math.round(e)),s=r/(t=Math.round(t)),c=Math.ceil(a/2),l=Math.ceil(s/2),u=n.getContext("2d");if(u){const h=u.getImageData(0,0,i,r),d=u.createImageData(e,t),m=h.data,f=d.data;for(let _=0;_=1)continue;w=2*j*j*j-3*j*j+1;const Y=4*(dt+ht*i);F+=w*m[Y+3],v+=w,m[Y+3]<255&&(w=w*m[Y+3]/250),H+=w*m[Y],B+=w*m[Y+1],Q+=w*m[Y+2],y+=w}}f[p]=H/y,f[p+1]=B/y,f[p+2]=Q/y,f[p+3]=F/v}n.width=e,n.height=t,u.putImageData(d,0,0)}}(u,p.width,p.height)),p.base64=u.toDataURL("image/"+a.format,this.getQuality(a)),p}getImagePosition(t,i,r,a){const c=i.transformed.size.width/t.nativeElement.offsetWidth,l={x1:Math.round(r.x1*c),y1:Math.round(r.y1*c),x2:Math.round(r.x2*c),y2:Math.round(r.y2*c)};return a.containWithinAspectRatio||(l.x1=Math.max(l.x1,0),l.y1=Math.max(l.y1,0),l.x2=Math.min(l.x2,i.transformed.size.width),l.y2=Math.min(l.y2,i.transformed.size.height)),l}getOffsetImagePosition(t,i,r,a){const l=i.transformed.size.width/t.nativeElement.offsetWidth;let u,h;(a.canvasRotation+i.exifTransform.rotate)%2?(u=(i.transformed.size.width-i.original.size.height)/2,h=(i.transformed.size.height-i.original.size.width)/2):(u=(i.transformed.size.width-i.original.size.width)/2,h=(i.transformed.size.height-i.original.size.height)/2);const d={x1:Math.round(r.x1*l)-u,y1:Math.round(r.y1*l)-h,x2:Math.round(r.x2*l)-u,y2:Math.round(r.y2*l)-h};return a.containWithinAspectRatio||(d.x1=Math.max(d.x1,0),d.y1=Math.max(d.y1,0),d.x2=Math.min(d.x2,i.transformed.size.width),d.y2=Math.min(d.y2,i.transformed.size.height)),d}getResizeRatio(t,i,r){const a=r.resizeToWidth/t,s=r.resizeToHeight/i,c=new Array;r.resizeToWidth>0&&c.push(a),r.resizeToHeight>0&&c.push(s);const l=0===c.length?1:Math.min(...c);return l>1&&!r.onlyScaleDown?l:Math.min(l,1)}getQuality(t){return Math.min(1,Math.max(0,t.imageQuality/100))}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=o.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Si=(()=>{class n{resetCropperPosition(t,i,r){if(!t?.nativeElement)return;const a=t.nativeElement;if(r.cropperStaticHeight&&r.cropperStaticWidth)i.x1=0,i.x2=a.offsetWidth>r.cropperStaticWidth?r.cropperStaticWidth:a.offsetWidth,i.y1=0,i.y2=a.offsetHeight>r.cropperStaticHeight?r.cropperStaticHeight:a.offsetHeight;else{const s=Math.min(r.cropperScaledMaxWidth,a.offsetWidth),c=Math.min(r.cropperScaledMaxHeight,a.offsetHeight);if(r.maintainAspectRatio)if(a.offsetWidth/r.aspectRatioa.width&&(r.x1-=r.x2-a.width,r.x2=a.width),r.y1<0?(r.y2-=r.y1,r.y1=0):r.y2>a.height&&(r.y1-=r.y2-a.height,r.y2=a.height)}s.maintainAspectRatio&&this.checkAspectRatio(i.position,r,a,s)}checkAspectRatio(t,i,r,a){let s=0,c=0;switch(t){case"top":i.x2=i.x1+(i.y2-i.y1)*a.aspectRatio,s=Math.max(i.x2-r.width,0),c=Math.max(0-i.y1,0),(s>0||c>0)&&(i.x2-=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y1+=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"bottom":i.x2=i.x1+(i.y2-i.y1)*a.aspectRatio,s=Math.max(i.x2-r.width,0),c=Math.max(i.y2-r.height,0),(s>0||c>0)&&(i.x2-=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y2-=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"topleft":i.y1=i.y2-(i.x2-i.x1)/a.aspectRatio,s=Math.max(0-i.x1,0),c=Math.max(0-i.y1,0),(s>0||c>0)&&(i.x1+=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y1+=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"topright":i.y1=i.y2-(i.x2-i.x1)/a.aspectRatio,s=Math.max(i.x2-r.width,0),c=Math.max(0-i.y1,0),(s>0||c>0)&&(i.x2-=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y1+=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"right":case"bottomright":i.y2=i.y1+(i.x2-i.x1)/a.aspectRatio,s=Math.max(i.x2-r.width,0),c=Math.max(i.y2-r.height,0),(s>0||c>0)&&(i.x2-=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y2-=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"left":case"bottomleft":i.y2=i.y1+(i.x2-i.x1)/a.aspectRatio,s=Math.max(0-i.x1,0),c=Math.max(i.y2-r.height,0),(s>0||c>0)&&(i.x1+=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y2-=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"center":i.x2=i.x1+(i.y2-i.y1)*a.aspectRatio,i.y2=i.y1+(i.x2-i.x1)/a.aspectRatio;const l=Math.max(0-i.x1,0),u=Math.max(i.x2-r.width,0),h=Math.max(i.y2-r.height,0),d=Math.max(0-i.y1,0);(l>0||u>0||h>0||d>0)&&(i.x1+=h*a.aspectRatio>l?h*a.aspectRatio:l,i.x2-=d*a.aspectRatio>u?d*a.aspectRatio:u,i.y1+=d*a.aspectRatio>u?d:u/a.aspectRatio,i.y2-=h*a.aspectRatio>l?h:l/a.aspectRatio)}}getClientX(t){return t.touches?.[0].clientX||t.clientX||0}getClientY(t){return t.touches?.[0].clientY||t.clientY||0}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=o.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();let Oi=(()=>{class n{constructor(){this.autoRotateSupported=function Ei(){return new Promise(n=>{const e=new Image;e.onload=()=>{n(1===e.width&&2===e.height)},e.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="})}()}loadImageFile(t,i){return new Promise((r,a)=>{const s=new FileReader;s.onload=c=>{this.loadImage(c.target.result,t.type,i).then(r).catch(a)},s.readAsDataURL(t)})}loadImage(t,i,r){return this.isValidImageType(i)?this.loadBase64Image(t,r):Promise.reject(new Error("Invalid image type"))}isValidImageType(t){return/image\/(png|jpg|jpeg|bmp|gif|tiff|webp|x-icon|vnd.microsoft.icon)/.test(t)}loadImageFromURL(t,i){return new Promise((r,a)=>{const s=new Image;s.onerror=()=>a,s.onload=()=>{const c=document.createElement("canvas"),l=c.getContext("2d");c.width=s.width,c.height=s.height,l?.drawImage(s,0,0),this.loadBase64Image(c.toDataURL(),i).then(r)},s.crossOrigin="anonymous",s.src=t})}loadBase64Image(t,i){return new Promise((r,a)=>{const s=new Image;s.onload=()=>r({originalImage:s,originalBase64:t}),s.onerror=a,s.src=t}).then(r=>this.transformImageBase64(r,i))}transformImageBase64(t,i){var r=this;return(0,D.Z)(function*(){const a=yield r.autoRotateSupported,s=yield function zi(n){switch("string"==typeof n&&(n=function Pi(n){const e=new DataView(function Ui(n){n=n.replace(/^data\:([^\;]+)\;base64,/gim,"");const e=atob(n),t=e.length,i=new Uint8Array(t);for(let r=0;r{const a=new Image;a.onload=()=>i(a),a.onerror=r,a.src=t})}getTransformedSize(t,i,r){const a=r.canvasRotation+i.rotate;if(r.containWithinAspectRatio){if(a%2){const c=t.height/r.aspectRatio;return{width:Math.max(t.height,t.width*r.aspectRatio),height:Math.max(t.width,c)}}{const c=t.width/r.aspectRatio;return{width:Math.max(t.width,t.height*r.aspectRatio),height:Math.max(t.height,c)}}}return a%2?{height:t.width,width:t.height}:{width:t.width,height:t.height}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=o.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Hi=(()=>{class n{constructor(t,i,r,a,s){this.cropService=t,this.cropperPositionService=i,this.loadImageService=r,this.sanitizer=a,this.cd=s,this.Hammer=window?.Hammer||null,this.settings=new Mi,this.setImageMaxSizeRetries=0,this.marginLeft="0px",this.maxSize={width:0,height:0},this.moveTypes=S,this.imageVisible=!1,this.format=this.settings.format,this.transform={},this.maintainAspectRatio=this.settings.maintainAspectRatio,this.aspectRatio=this.settings.aspectRatio,this.resizeToWidth=this.settings.resizeToWidth,this.resizeToHeight=this.settings.resizeToHeight,this.cropperMinWidth=this.settings.cropperMinWidth,this.cropperMinHeight=this.settings.cropperMinHeight,this.cropperMaxHeight=this.settings.cropperMaxHeight,this.cropperMaxWidth=this.settings.cropperMaxWidth,this.cropperStaticWidth=this.settings.cropperStaticWidth,this.cropperStaticHeight=this.settings.cropperStaticHeight,this.canvasRotation=this.settings.canvasRotation,this.initialStepSize=this.settings.initialStepSize,this.roundCropper=this.settings.roundCropper,this.onlyScaleDown=this.settings.onlyScaleDown,this.imageQuality=this.settings.imageQuality,this.autoCrop=this.settings.autoCrop,this.backgroundColor=this.settings.backgroundColor,this.containWithinAspectRatio=this.settings.containWithinAspectRatio,this.hideResizeSquares=this.settings.hideResizeSquares,this.cropper={x1:-100,y1:-100,x2:1e4,y2:1e4},this.alignImage=this.settings.alignImage,this.disabled=!1,this.imageCropped=new o.vpe,this.startCropImage=new o.vpe,this.imageLoaded=new o.vpe,this.cropperReady=new o.vpe,this.loadImageFailed=new o.vpe,this.reset()}ngOnChanges(t){this.onChangesUpdateSettings(t),this.onChangesInputImage(t),this.loadedImage?.original.image.complete&&(t.containWithinAspectRatio||t.canvasRotation)&&this.loadImageService.transformLoadedImage(this.loadedImage,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i)),(t.cropper||t.maintainAspectRatio||t.aspectRatio)&&(this.setMaxSize(),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize(),this.maintainAspectRatio&&(t.maintainAspectRatio||t.aspectRatio)?this.resetCropperPosition():t.cropper&&(this.checkCropperPosition(!1),this.doAutoCrop()),this.cd.markForCheck()),t.transform&&(this.transform=this.transform||{},this.setCssTransform(),this.doAutoCrop())}onChangesUpdateSettings(t){this.settings.setOptionsFromChanges(t),this.settings.cropperStaticHeight&&this.settings.cropperStaticWidth&&this.settings.setOptions({hideResizeSquares:!0,cropperMinWidth:this.settings.cropperStaticWidth,cropperMinHeight:this.settings.cropperStaticHeight,cropperMaxHeight:this.settings.cropperStaticHeight,cropperMaxWidth:this.settings.cropperStaticWidth,maintainAspectRatio:!1})}onChangesInputImage(t){(t.imageChangedEvent||t.imageURL||t.imageBase64||t.imageFile)&&this.reset(),t.imageChangedEvent&&this.isValidImageChangedEvent()&&this.loadImageFile(this.imageChangedEvent.target.files[0]),t.imageURL&&this.imageURL&&this.loadImageFromURL(this.imageURL),t.imageBase64&&this.imageBase64&&this.loadBase64Image(this.imageBase64),t.imageFile&&this.imageFile&&this.loadImageFile(this.imageFile)}isValidImageChangedEvent(){return this.imageChangedEvent?.target?.files?.length>0}setCssTransform(){this.safeTransformStyle=this.sanitizer.bypassSecurityTrustStyle("scaleX("+(this.transform.scale||1)*(this.transform.flipH?-1:1)+")scaleY("+(this.transform.scale||1)*(this.transform.flipV?-1:1)+")rotate("+(this.transform.rotate||0)+`deg)translate(${this.transform.translateH||0}%, ${this.transform.translateV||0}%)`)}ngOnInit(){this.settings.stepSize=this.initialStepSize,this.activatePinchGesture()}reset(){this.imageVisible=!1,this.loadedImage=void 0,this.safeImgDataUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",this.moveStart={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0},this.maxSize={width:0,height:0},this.cropper.x1=-100,this.cropper.y1=-100,this.cropper.x2=1e4,this.cropper.y2=1e4}loadImageFile(t){this.loadImageService.loadImageFile(t,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadBase64Image(t){this.loadImageService.loadBase64Image(t,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadImageFromURL(t){this.loadImageService.loadImageFromURL(t,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}setLoadedImage(t){this.loadedImage=t,this.safeImgDataUrl=this.sanitizer.bypassSecurityTrustResourceUrl(t.transformed.base64),this.cd.markForCheck()}loadImageError(t){console.error(t),this.loadImageFailed.emit()}imageLoadedInView(){null!=this.loadedImage&&(this.imageLoaded.emit(this.loadedImage),this.setImageMaxSizeRetries=0,setTimeout(()=>this.checkImageMaxSizeRecursively()))}checkImageMaxSizeRecursively(){this.setImageMaxSizeRetries>40?this.loadImageFailed.emit():this.sourceImageLoaded()?(this.setMaxSize(),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize(),this.resetCropperPosition(),this.cropperReady.emit({...this.maxSize}),this.cd.markForCheck()):(this.setImageMaxSizeRetries++,setTimeout(()=>this.checkImageMaxSizeRecursively(),50))}sourceImageLoaded(){return this.sourceImage?.nativeElement?.offsetWidth>0}onResize(){!this.loadedImage||(this.resizeCropperPosition(),this.setMaxSize(),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize())}activatePinchGesture(){if(this.Hammer){const t=new this.Hammer(this.wrapper.nativeElement);t.get("pinch").set({enable:!0}),t.on("pinchmove",this.onPinch.bind(this)),t.on("pinchend",this.pinchStop.bind(this)),t.on("pinchstart",this.startPinch.bind(this))}else(0,o.X6Q)()&&console.warn("[NgxImageCropper] Could not find HammerJS - Pinch Gesture won't work")}resizeCropperPosition(){const t=this.sourceImage.nativeElement;(this.maxSize.width!==t.offsetWidth||this.maxSize.height!==t.offsetHeight)&&(this.cropper.x1=this.cropper.x1*t.offsetWidth/this.maxSize.width,this.cropper.x2=this.cropper.x2*t.offsetWidth/this.maxSize.width,this.cropper.y1=this.cropper.y1*t.offsetHeight/this.maxSize.height,this.cropper.y2=this.cropper.y2*t.offsetHeight/this.maxSize.height)}resetCropperPosition(){this.cropperPositionService.resetCropperPosition(this.sourceImage,this.cropper,this.settings),this.doAutoCrop(),this.imageVisible=!0}keyboardAccess(t){this.changeKeyboardStepSize(t),this.keyboardMoveCropper(t)}changeKeyboardStepSize(t){const i=+t.key;i>=1&&i<=9&&(this.settings.stepSize=i)}keyboardMoveCropper(t){if(!["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(t.key))return;const r=t.shiftKey?S.Resize:S.Move,a=t.altKey?function Ri(n){switch(n){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";default:return"right"}}(t.key):function Ci(n){switch(n){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";default:return"left"}}(t.key),s=function Ai(n,e){switch(n){case"ArrowUp":return{clientX:0,clientY:-1*e};case"ArrowRight":return{clientX:e,clientY:0};case"ArrowDown":return{clientX:0,clientY:e};default:return{clientX:-1*e,clientY:0}}}(t.key,this.settings.stepSize);t.preventDefault(),t.stopPropagation(),this.startMove({clientX:0,clientY:0},r,a),this.moveImg(s),this.moveStop()}startMove(t,i,r=null){this.moveStart?.active&&this.moveStart?.type===S.Pinch||(t.preventDefault&&t.preventDefault(),this.moveStart={active:!0,type:i,position:r,clientX:this.cropperPositionService.getClientX(t),clientY:this.cropperPositionService.getClientY(t),...this.cropper})}startPinch(t){!this.safeImgDataUrl||(t.preventDefault&&t.preventDefault(),this.moveStart={active:!0,type:S.Pinch,position:"center",clientX:this.cropper.x1+(this.cropper.x2-this.cropper.x1)/2,clientY:this.cropper.y1+(this.cropper.y2-this.cropper.y1)/2,...this.cropper})}moveImg(t){this.moveStart.active&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),this.moveStart.type===S.Move?(this.cropperPositionService.move(t,this.moveStart,this.cropper),this.checkCropperPosition(!0)):this.moveStart.type===S.Resize&&(!this.cropperStaticWidth&&!this.cropperStaticHeight&&this.cropperPositionService.resize(t,this.moveStart,this.cropper,this.maxSize,this.settings),this.checkCropperPosition(!1)),this.cd.detectChanges())}onPinch(t){this.moveStart.active&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),this.moveStart.type===S.Pinch&&(this.cropperPositionService.resize(t,this.moveStart,this.cropper,this.maxSize,this.settings),this.checkCropperPosition(!1)),this.cd.detectChanges())}setMaxSize(){if(this.sourceImage){const t=this.sourceImage.nativeElement;this.maxSize.width=t.offsetWidth,this.maxSize.height=t.offsetHeight,this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.maxSize.width/2+"px)")}}setCropperScaledMinSize(){this.loadedImage?.transformed?.image?(this.setCropperScaledMinWidth(),this.setCropperScaledMinHeight()):(this.settings.cropperScaledMinWidth=20,this.settings.cropperScaledMinHeight=20)}setCropperScaledMinWidth(){this.settings.cropperScaledMinWidth=this.cropperMinWidth>0?Math.max(20,this.cropperMinWidth/this.loadedImage.transformed.image.width*this.maxSize.width):20}setCropperScaledMinHeight(){this.settings.cropperScaledMinHeight=this.maintainAspectRatio?Math.max(20,this.settings.cropperScaledMinWidth/this.aspectRatio):this.cropperMinHeight>0?Math.max(20,this.cropperMinHeight/this.loadedImage.transformed.image.height*this.maxSize.height):20}setCropperScaledMaxSize(){if(this.loadedImage?.transformed?.image){const t=this.loadedImage.transformed.size.width/this.maxSize.width;this.settings.cropperScaledMaxWidth=this.cropperMaxWidth>20?this.cropperMaxWidth/t:this.maxSize.width,this.settings.cropperScaledMaxHeight=this.cropperMaxHeight>20?this.cropperMaxHeight/t:this.maxSize.height,this.maintainAspectRatio&&(this.settings.cropperScaledMaxWidth>this.settings.cropperScaledMaxHeight*this.aspectRatio?this.settings.cropperScaledMaxWidth=this.settings.cropperScaledMaxHeight*this.aspectRatio:this.settings.cropperScaledMaxWidththis.maxSize.width&&(this.cropper.x1-=t?this.cropper.x2-this.maxSize.width:0,this.cropper.x2=this.maxSize.width),this.cropper.y2>this.maxSize.height&&(this.cropper.y1-=t?this.cropper.y2-this.maxSize.height:0,this.cropper.y2=this.maxSize.height)}moveStop(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}pinchStop(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}doAutoCrop(){this.autoCrop&&this.crop()}crop(){if(null!=this.loadedImage?.transformed?.image){this.startCropImage.emit();const t=this.cropService.crop(this.sourceImage,this.loadedImage,this.cropper,this.settings);return null!=t&&this.imageCropped.emit(t),t}return null}}return n.\u0275fac=function(t){return new(t||n)(o.Y36(Ti),o.Y36(Si),o.Y36(Oi),o.Y36(_i.H7),o.Y36(o.sBO))},n.\u0275cmp=o.Xpm({type:n,selectors:[["image-cropper"]],viewQuery:function(t,i){if(1&t&&(o.Gf(bi,7),o.Gf(xi,5)),2&t){let r;o.iGM(r=o.CRH())&&(i.wrapper=r.first),o.iGM(r=o.CRH())&&(i.sourceImage=r.first)}},hostVars:4,hostBindings:function(t,i){1&t&&o.NdJ("resize",function(){return i.onResize()},!1,o.Jf7)("mousemove",function(a){return i.moveImg(a)},!1,o.evT)("touchmove",function(a){return i.moveImg(a)},!1,o.evT)("mouseup",function(){return i.moveStop()},!1,o.evT)("touchend",function(){return i.moveStop()},!1,o.evT),2&t&&(o.Udp("text-align",i.alignImage),o.ekj("disabled",i.disabled))},inputs:{imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",format:"format",transform:"transform",maintainAspectRatio:"maintainAspectRatio",aspectRatio:"aspectRatio",resizeToWidth:"resizeToWidth",resizeToHeight:"resizeToHeight",cropperMinWidth:"cropperMinWidth",cropperMinHeight:"cropperMinHeight",cropperMaxHeight:"cropperMaxHeight",cropperMaxWidth:"cropperMaxWidth",cropperStaticWidth:"cropperStaticWidth",cropperStaticHeight:"cropperStaticHeight",canvasRotation:"canvasRotation",initialStepSize:"initialStepSize",roundCropper:"roundCropper",onlyScaleDown:"onlyScaleDown",imageQuality:"imageQuality",autoCrop:"autoCrop",backgroundColor:"backgroundColor",containWithinAspectRatio:"containWithinAspectRatio",hideResizeSquares:"hideResizeSquares",cropper:"cropper",alignImage:"alignImage",disabled:"disabled"},outputs:{imageCropped:"imageCropped",startCropImage:"startCropImage",imageLoaded:"imageLoaded",cropperReady:"cropperReady",loadImageFailed:"loadImageFailed"},features:[o.TTD],decls:5,vars:10,consts:[["wrapper",""],["class","ngx-ic-source-image",3,"src","visibility","transform","load",4,"ngIf"],[1,"ngx-ic-overlay"],["class","ngx-ic-cropper","tabindex","0",3,"ngx-ic-round","top","left","width","height","margin-left","visibility","keydown",4,"ngIf"],[1,"ngx-ic-source-image",3,"src","load"],["sourceImage",""],["tabindex","0",1,"ngx-ic-cropper",3,"keydown"],[1,"ngx-ic-move",3,"mousedown","touchstart"],[4,"ngIf"],[1,"ngx-ic-resize","ngx-ic-topleft",3,"mousedown","touchstart"],[1,"ngx-ic-square"],[1,"ngx-ic-resize","ngx-ic-top"],[1,"ngx-ic-resize","ngx-ic-topright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-right"],[1,"ngx-ic-resize","ngx-ic-bottomright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-bottom"],[1,"ngx-ic-resize","ngx-ic-bottomleft",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-left"],[1,"ngx-ic-resize-bar","ngx-ic-top",3,"mousedown","touchstart"],[1,"ngx-ic-resize-bar","ngx-ic-right",3,"mousedown","touchstart"],[1,"ngx-ic-resize-bar","ngx-ic-bottom",3,"mousedown","touchstart"],[1,"ngx-ic-resize-bar","ngx-ic-left",3,"mousedown","touchstart"]],template:function(t,i){1&t&&(o.TgZ(0,"div",null,0),o.YNc(2,yi,2,5,"img",1),o._UZ(3,"div",2),o.YNc(4,wi,3,15,"div",3),o.qZA()),2&t&&(o.Udp("background",i.imageVisible&&i.backgroundColor),o.xp6(2),o.Q6J("ngIf",i.safeImgDataUrl),o.xp6(1),o.Udp("width",i.maxSize.width,"px")("height",i.maxSize.height,"px")("margin-left","center"===i.alignImage?i.marginLeft:null),o.xp6(1),o.Q6J("ngIf",i.imageVisible))},dependencies:[Z.O5],styles:['[_nghost-%COMP%]{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;position:relative}[_nghost-%COMP%] > div[_ngcontent-%COMP%] img.ngx-ic-source-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%;transform-origin:center}[_nghost-%COMP%] .ngx-ic-overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]{position:absolute;display:flex;color:#53535c;background:transparent;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color, rgba(255, 255, 255, .3)) solid 100vw;touch-action:none}@media (orientation: portrait){[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]{outline-width:100vh}}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;bottom:0;left:0;right:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-move[_ngcontent-%COMP%]{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]:focus .ngx-ic-move[_ngcontent-%COMP%]{border-color:#1e90ff;border-width:2px}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%]{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%] .ngx-ic-square[_ngcontent-%COMP%]{display:inline-block;background:#53535C;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-topleft[_ngcontent-%COMP%]{top:-12px;left:-12px;cursor:nwse-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-top[_ngcontent-%COMP%]{top:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-topright[_ngcontent-%COMP%]{top:-12px;right:-12px;cursor:nesw-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-right[_ngcontent-%COMP%]{top:calc(50% - 12px);right:-12px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-bottomright[_ngcontent-%COMP%]{bottom:-12px;right:-12px;cursor:nwse-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-bottomleft[_ngcontent-%COMP%]{bottom:-12px;left:-12px;cursor:nesw-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-left[_ngcontent-%COMP%]{top:calc(50% - 12px);left:-12px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar[_ngcontent-%COMP%]{position:absolute;z-index:1}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-top[_ngcontent-%COMP%]{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-right[_ngcontent-%COMP%]{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-left[_ngcontent-%COMP%]{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]{outline-color:transparent}[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{border-radius:100%;box-shadow:0 0 0 100vw #ffffff4d;box-shadow:0 0 0 100vw var(--cropper-outline-color, rgba(255, 255, 255, .3))}@media (orientation: portrait){[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{box-shadow:0 0 0 100vh #ffffff4d;box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%] .ngx-ic-move[_ngcontent-%COMP%]{border-radius:100%}.disabled[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-move[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),n})(),Bi=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=o.oAB({type:n}),n.\u0275inj=o.cJS({imports:[[Z.ez]]}),n})();var Di=g(6188);function Li(n,e){if(1&n){const t=o.EpF();o.TgZ(0,"div",4)(1,"div",5),o.NdJ("click",function(){o.CHM(t);const r=o.MAs(7);return o.KtG(r.click())}),o._UZ(2,"img",6),o.TgZ(3,"div",7),o._UZ(4,"i",8),o.ALo(5,"translate"),o.qZA(),o.TgZ(6,"input",9,10),o.NdJ("change",function(r){o.CHM(t);const a=o.oxw();return o.KtG(a.fileChangeEvent(r))}),o.qZA()(),o.TgZ(8,"div",11)(9,"div",12)(10,"strong"),o._uU(11),o.qZA(),o.TgZ(12,"div",13)(13,"em",14),o._uU(14),o.qZA()()(),o.TgZ(15,"div",15)(16,"div",16),o._UZ(17,"i",17),o.TgZ(18,"span",18),o._uU(19),o.qZA()(),o.TgZ(20,"div",16),o._UZ(21,"i",19),o.TgZ(22,"span",18),o._uU(23),o.qZA()(),o.TgZ(24,"div",16),o._uU(25),o.ALo(26,"translate"),o.TgZ(27,"em"),o._uU(28),o.ALo(29,"date"),o.qZA()()(),o.TgZ(30,"div",12)(31,"button",20),o.NdJ("click",function(){o.CHM(t);const r=o.oxw();return o.KtG(r.showEditProfilePopUp())}),o._uU(32),o.ALo(33,"translate"),o.qZA()()()()}if(2&n){const t=o.oxw();o.xp6(2),o.Q6J("src",t.user.imageURL,o.LSH),o.xp6(2),o.s9C("title",o.lcZ(5,10,"Click To Upload New Photo")),o.xp6(7),o.AsE("",t.user.firstName," ",t.user.lastName,""),o.xp6(3),o.Oqu(t.user.role),o.xp6(5),o.Oqu(t.user.email),o.xp6(4),o.Oqu(t.user.phoneNumber),o.xp6(2),o.hij(" ",o.lcZ(26,12,"Joined:")," "),o.xp6(3),o.Oqu(o.xi3(29,14,t.user.created_at.toDate(),"MMMM dd, yyyy")),o.xp6(4),o.hij(" ",o.lcZ(33,17,"Edit Profile")," ")}}function Fi(n,e){if(1&n){const t=o.EpF();o.TgZ(0,"div",30),o.NdJ("click",function(){o.CHM(t);const r=o.oxw(2);return o.KtG(r.hideEditPicPopup())}),o.ALo(1,"translate"),o._uU(2," \xd7 "),o.qZA()}2&n&&o.s9C("title",o.lcZ(1,1,"Cancel"))}function Zi(n,e){if(1&n){const t=o.EpF();o.TgZ(0,"div",31)(1,"image-cropper",32),o.NdJ("imageCropped",function(r){o.CHM(t);const a=o.oxw(2);return o.KtG(a.imageCropped(r))})("loadImageFailed",function(){o.CHM(t);const r=o.oxw(2);return o.KtG(r.loadImageFailed())}),o.qZA()()}if(2&n){const t=o.oxw(2);o.xp6(1),o.Q6J("imageChangedEvent",t.imageFile)("maintainAspectRatio",!0)("resizeToWidth",256)("aspectRatio",1)}}function Wi(n,e){if(1&n){const t=o.EpF();o.TgZ(0,"button",33),o.NdJ("click",function(){o.CHM(t);const r=o.oxw(2);return o.KtG(r.saveImg())}),o._uU(1),o.ALo(2,"translate"),o.qZA()}2&n&&(o.xp6(1),o.hij(" ",o.lcZ(2,1,"Save Image")," "))}function qi(n,e){if(1&n&&(o.TgZ(0,"span"),o._uU(1),o.ALo(2,"number"),o.ALo(3,"async"),o.qZA()),2&n){const t=o.oxw(3);o.xp6(1),o.hij("",o.xi3(2,1,o.lcZ(3,4,t.percentage),"1.0-0"),"%")}}function Ni(n,e){if(1&n&&(o.TgZ(0,"div",34)(1,"p",35),o._uU(2),o.ALo(3,"translate"),o.qZA(),o.TgZ(4,"div",36),o._UZ(5,"progress",37),o.ALo(6,"async"),o.YNc(7,qi,4,6,"span",38),o.ALo(8,"async"),o.qZA()()),2&n){const t=o.oxw(2);o.xp6(2),o.Oqu(o.lcZ(3,3,"Uploading Picture...")),o.xp6(3),o.Q6J("value",o.lcZ(6,5,t.percentage)),o.xp6(2),o.Q6J("ngIf",o.lcZ(8,7,t.percentage))}}function Gi(n,e){if(1&n&&(o.TgZ(0,"p",39),o._uU(1),o.qZA()),2&n){const t=o.oxw(2);o.xp6(1),o.Oqu(t.errorMsg)}}function Qi(n,e){if(1&n&&(o.TgZ(0,"div",21)(1,"div",22)(2,"div",23),o._uU(3),o.ALo(4,"translate"),o.qZA(),o.YNc(5,Fi,3,3,"div",24),o.qZA(),o.TgZ(6,"div",25),o.YNc(7,Zi,2,4,"div",26),o.YNc(8,Wi,3,3,"button",27),o.YNc(9,Ni,9,9,"div",28),o.YNc(10,Gi,2,1,"p",29),o.qZA()()),2&n){const t=o.oxw();o.xp6(3),o.hij(" ",o.lcZ(4,6,"Crop Image")," "),o.xp6(2),o.Q6J("ngIf",!t.uploading),o.xp6(2),o.Q6J("ngIf",t.imageFile),o.xp6(1),o.Q6J("ngIf",t.croppedImage),o.xp6(1),o.Q6J("ngIf",t.uploading),o.xp6(1),o.Q6J("ngIf",t.errorMsg)}}function ji(n,e){if(1&n&&(o.TgZ(0,"p",42),o._uU(1),o.qZA()),2&n){const t=o.oxw(2);o.xp6(1),o.Oqu(t.errorMsg)}}function Yi(n,e){if(1&n){const t=o.EpF();o.TgZ(0,"div",21)(1,"div",22)(2,"div",23),o._uU(3),o.ALo(4,"translate"),o.qZA(),o.TgZ(5,"div",30),o.NdJ("click",function(){o.CHM(t);const r=o.oxw();return o.KtG(r.hideEditProfilePopUp())}),o.ALo(6,"translate"),o._uU(7," \xd7 "),o.qZA()(),o.TgZ(8,"div",25)(9,"app-edit-profile",40),o.NdJ("updatedValues",function(r){o.CHM(t);const a=o.oxw();return o.KtG(a.updateProfile(r))}),o.qZA(),o.YNc(10,ji,2,1,"p",41),o.qZA()()}if(2&n){const t=o.oxw();o.xp6(3),o.hij(" ",o.lcZ(4,4,"Edit Profile")," "),o.xp6(2),o.s9C("title",o.lcZ(6,6,"Cancel")),o.xp6(4),o.Q6J("profileInfos",t.user),o.xp6(1),o.Q6J("ngIf",t.errorMsg)}}function Xi(n,e){if(1&n){const t=o.EpF();o.TgZ(0,"div",43),o.NdJ("click",function(){o.CHM(t);const r=o.oxw();return o.KtG(r.hideAllPopups())}),o.qZA()}}const $i=[{path:"",component:(()=>{class n{constructor(t,i,r){this.route=t,this.usersService=i,this.afStorage=r,this.errorMsg="",this.editProfilePopup=!1,this.editPicPopup=!1,this.imageFile=null,this.uploading=!1,this.showEditProfilePopUp=()=>this.editProfilePopup=!0}ngOnInit(){this.usersService.getCurrentProfile(this.route.snapshot.params.id).subscribe(i=>this.user=i)}updateProfile(t){var i=this;return(0,D.Z)(function*(){try{yield i.usersService.updateProfile(i.user.uid,t),i.hideEditProfilePopUp(),i.hideEditPicPopup()}catch(r){i.errorMsg=r}})()}hideEditProfilePopUp(){this.editProfilePopup=!1,this.errorMsg=""}hideEditPicPopup(){this.editPicPopup=!1,this.uploading=!1,this.errorMsg="",this.percentage=(0,mt.of)(void 0),this.imageFile=null,this.croppedImage=null}fileChangeEvent(t){t.target.files[0]&&(this.imageFile=t,this.errorMsg="",this.editPicPopup=!0)}imageCropped(t){this.croppedImage=t.base64}loadImageFailed(){this.imageFile=null,this.errorMsg="Please, Load a valid image",setTimeout(()=>{this.hideEditPicPopup()},3e3)}saveImg(){this.uploadPhoto(this.croppedImage)}uploadPhoto(t){var i=this;return(0,D.Z)(function*(){if(!t)return;i.uploading=!0;const r=yield(0,ve.Bo)(t),a=`profile-pictures/${i.user.uid}`,s=i.afStorage.ref(a),c=i.afStorage.upload(a,r);i.percentage=c.percentageChanges(),c.snapshotChanges().pipe((0,ye.x)(()=>{s.getDownloadURL().subscribe(l=>{l&&(i.user.imageURL=l,i.updateProfile(i.user).then(()=>i.hideEditPicPopup()))})})).subscribe()})()}hideAllPopups(){this.hideEditProfilePopUp(),this.uploading||this.hideEditPicPopup()}}return n.\u0275fac=function(t){return new(t||n)(o.Y36(pt.gz),o.Y36(we.f),o.Y36(fi))},n.\u0275cmp=o.Xpm({type:n,selectors:[["app-profile"]],decls:5,vars:4,consts:[[1,"global-container"],["class","profile-container facebook-style",4,"ngIf"],["class","popup-modal facebook-style",4,"ngIf"],["class","overlay",3,"click",4,"ngIf"],[1,"profile-container","facebook-style"],[1,"img-container",3,"click"],["alt","User's profile picture",1,"profile-photo",3,"src"],[1,"upload-icon-container"],[1,"fas","fa-upload",3,"title"],["type","file","accept","image/*",2,"display","none",3,"change"],["editPicInput",""],[1,"profile-info-container"],[1,"profile-section"],[1,"profile-section",2,"text-align","center"],[2,"font-size","small"],[1,"profile-section",2,"text-align","left","margin","15px 0"],[1,"user-infos"],[1,"fas","fa-envelope"],[1,"span-info"],[1,"fas","fa-phone-square-alt"],[1,"edit-btn",3,"click"],[1,"popup-modal","facebook-style"],[1,"popup-modal-header"],[1,"title"],["class","close-btn",3,"title","click",4,"ngIf"],[1,"popup-modal-body"],["class","img-cropper-container",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["class","progress-container",4,"ngIf"],["class","alert alert-danger",4,"ngIf"],[1,"close-btn",3,"title","click"],[1,"img-cropper-container"],["format","png",3,"imageChangedEvent","maintainAspectRatio","resizeToWidth","aspectRatio","imageCropped","loadImageFailed"],[1,"btn","btn-success",3,"click"],[1,"progress-container"],[1,"text-warning"],[2,"display","flex","flex-wrap","nowrap"],["max","100",2,"width","100%",3,"value"],[4,"ngIf"],[1,"alert","alert-danger"],[3,"profileInfos","updatedValues"],["class","text-danger",4,"ngIf"],[1,"text-danger"],[1,"overlay",3,"click"]],template:function(t,i){1&t&&(o.TgZ(0,"div",0),o.YNc(1,Li,34,19,"div",1),o.YNc(2,Qi,11,8,"div",2),o.YNc(3,Yi,11,8,"div",2),o.YNc(4,Xi,1,0,"div",3),o.qZA()),2&t&&(o.xp6(1),o.Q6J("ngIf",i.user),o.xp6(1),o.Q6J("ngIf",i.editPicPopup),o.xp6(1),o.Q6J("ngIf",i.editProfilePopup),o.xp6(1),o.Q6J("ngIf",i.editProfilePopup||i.editPicPopup))},dependencies:[Z.O5,gi.z,Hi,Z.Ov,Z.JJ,Z.uU,Di.X$],styles:[".global-container[_ngcontent-%COMP%]{position:relative;min-height:90vh}.profile-container[_ngcontent-%COMP%]{margin:15px auto;padding:15px;width:max-content;min-width:max-content;height:max-content;display:grid;grid-template-columns:repeat(2,minmax(max-content,1fr));gap:15px;justify-content:center;align-items:center}.img-container[_ngcontent-%COMP%]{position:relative;margin:15px;height:250px;display:flex;justify-content:center;align-items:center;margin-inline:auto}.profile-info-container[_ngcontent-%COMP%]{margin:15px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;height:100%}.img-container[_ngcontent-%COMP%]:hover{filter:brightness(75%);transition:.2s}.img-container[_ngcontent-%COMP%]:hover .fa-upload[_ngcontent-%COMP%]{display:inherit}.profile-photo[_ngcontent-%COMP%]{width:100%;height:100%;margin-inline:auto;border-radius:50%;cursor:pointer}.upload-icon-container[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.fa-upload[_ngcontent-%COMP%]{font-size:4rem;color:#fff;display:none;cursor:pointer}.user-infos[_ngcontent-%COMP%]{margin-block:5px}.span-info[_ngcontent-%COMP%]{margin-left:7px}.edit-btn[_ngcontent-%COMP%]{height:-moz-fit-content;height:fit-content;padding:.25rem .5rem;margin-left:5px;align-self:center;background-color:var(--mainToSide-color);color:var(--popup-bg-color);border:none;border-radius:3px}.edit-btn[_ngcontent-%COMP%]:hover{filter:brightness(.9)}.img-cropper-container[_ngcontent-%COMP%]{width:100%;height:300px;text-align:center}.popup-modal-body[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{width:100%}.progress-container[_ngcontent-%COMP%]{margin-top:15px}@media screen and (max-width: 650px){.profile-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:max-content;height:100%}}"]}),n})(),canActivate:[xe.a]}];let Ji=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=o.oAB({type:n}),n.\u0275inj=o.cJS({imports:[pt.Bz.forChild($i),pt.Bz]}),n})();var Ki=g(9552),kt=g(2327);let Vi=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=o.oAB({type:n}),n.\u0275inj=o.cJS({imports:[kt.si,kt.BQ,kt.BQ]}),n})(),to=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=o.oAB({type:n}),n.\u0275inj=o.cJS({imports:[Z.ez,Ji,Ki.m,Bi,Vi]}),n})()}}]); \ No newline at end of file diff --git a/dist/new-rdv-app/browser/36.0b2af48f611a2b9c.js b/dist/new-rdv-app/browser/36.0b2af48f611a2b9c.js new file mode 100644 index 0000000..28a9586 --- /dev/null +++ b/dist/new-rdv-app/browser/36.0b2af48f611a2b9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknew_rdv_app=self.webpackChunknew_rdv_app||[]).push([[36],{50:(A,v,i)=>{i.d(v,{R:()=>t});var t=(()=>{return(o=t||(t={})).PENDING="PENDING",o.APPROVED="APPROVED",o.FINISHED="FINISHED",o.CANCELED="CANCELED",o.DELETED="DELETED",t;var o})()},4286:(A,v,i)=>{i.d(v,{b:()=>h});var t=i(5861),o=i(50),_=i(4004),m=i(4650),g=i(7407),f=i(7694);let h=(()=>{class u{constructor(a,e){this.fireStore=a,this.translatingService=e}createRendezvous(a,e){var n=this;return(0,t.Z)(function*(){if(!e.email)throw"You need Email to create new Rendezvous!";return a.createdAt=new Date,a.createdBy=e.email,a.rdvState=o.R.PENDING,yield n.fireStore.collection("Rendezvous").add(a)})()}deleteRendezvous(a,e,n){var r=this;return(0,t.Z)(function*(){return e.createdAt=new Date(e.createdAt),e.lastUpdate&&"Not Updated"!==e.lastUpdate&&(e.lastUpdate=new Date(e.lastUpdate)),e.rdvState=o.R.DELETED,e.deletedAt=new Date,e.deletedBy=n.email,yield r.fireStore.collection("Rendezvous").doc(a).update(e)})()}updateRendezvous(a,e){var n=this;return(0,t.Z)(function*(){return e.lastUpdate=new Date,yield n.fireStore.collection("Rendezvous").doc(a).update(e)})()}approveRendezvous(a,e,n){var r=this;return(0,t.Z)(function*(){return e.createdAt=new Date(e.createdAt),e.lastUpdate&&"Not Updated"!==e.lastUpdate&&(e.lastUpdate=new Date(e.lastUpdate)),e.rdvState=o.R.APPROVED,e.approvedAt=new Date,e.approvedBy=n.email,yield r.fireStore.collection("Rendezvous").doc(a).update(e)})()}finishRendezvous(a,e){var n=this;return(0,t.Z)(function*(){return e.createdAt=new Date(e.createdAt),e.lastUpdate&&"Not Updated"!==e.lastUpdate&&(e.lastUpdate=new Date(e.lastUpdate)),e.approvedAt&&(e.approvedAt=new Date(e.approvedAt)),e.rdvDate&&(e.rdvDate=new Date(e.rdvDate)),e.rdvState=o.R.FINISHED,e.finishedAt=new Date,yield n.fireStore.collection("Rendezvous").doc(a).update(e)})()}cancelRendezvous(a,e,n){var r=this;return(0,t.Z)(function*(){return e.createdAt=new Date(e.createdAt),e.lastUpdate&&"Not Updated"!==e.lastUpdate&&(e.lastUpdate=new Date(e.lastUpdate)),e.approvedAt&&(e.approvedAt=new Date(e.approvedAt)),e.rdvDate&&(e.rdvDate=new Date(e.rdvDate)),e.rdvState=o.R.CANCELED,e.canceledAt=new Date,e.canceledBy=n.email,yield r.fireStore.collection("Rendezvous").doc(a).update(e)})()}getRDVsByState(a,e,n,r){return this.fireStore.collection("Rendezvous",c=>{const s=c.where("rdvState","==",a).orderBy(e).limit(5);return"NEXT"===n?s.startAfter(r):"PREVIOUS"===n?s.endBefore(r):s}).snapshotChanges().pipe((0,_.U)(c=>{let s=1;return c.map(d=>{const p=d.payload.doc.data();return{...p,rdvID:d.payload.doc.id,createdAt:this.translatingService.convertToDateString(p.createdAt),lastUpdate:this.getLastUpdate(p.lastUpdate),rdvDate:p.rdvDate?this.translatingService.convertToDateString(p.rdvDate):void 0,approvedAt:p.approvedAt?this.translatingService.convertToDateString(p.approvedAt):void 0,finishedAt:p.finishedAt?this.translatingService.convertToDateString(p.finishedAt):void 0,canceledAt:p.canceledAt?this.translatingService.convertToDateString(p.canceledAt):void 0,deletedAt:p.deletedAt?this.translatingService.convertToDateString(p.deletedAt):void 0,order:s++}})}))}getRDVsByEmailAndState(a,e,n){return this.fireStore.collection("Rendezvous",r=>r.where("createdBy","==",a).where("rdvState","==",e).orderBy(n)).snapshotChanges().pipe((0,_.U)(r=>{let c=1;return r.map(s=>{const d=s.payload.doc.data();return{...d,rdvID:s.payload.doc.id,createdAt:this.translatingService.convertToDateString(d.createdAt),lastUpdate:this.getLastUpdate(d.lastUpdate),rdvDate:d.rdvDate?this.translatingService.convertToDateString(d.rdvDate):void 0,approvedAt:d.approvedAt?this.translatingService.convertToDateString(d.approvedAt):void 0,finishedAt:d.finishedAt?this.translatingService.convertToDateString(d.finishedAt):void 0,canceledAt:d.canceledAt?this.translatingService.convertToDateString(d.canceledAt):void 0,deletedAt:d.deletedAt?this.translatingService.convertToDateString(d.deletedAt):void 0,order:c++}})}))}getAllRendezvous(){return this.fireStore.collection("Rendezvous",a=>a.orderBy("createdAt")).snapshotChanges().pipe((0,_.U)(a=>{let e=1;return a.map(n=>{const r=n.payload.doc.data();return{...r,rdvID:n.payload.doc.id,createdAt:this.translatingService.convertToDateString(r.createdAt),lastUpdate:this.getLastUpdate(r.lastUpdate),rdvDate:r.rdvDate?this.translatingService.convertToDateString(r.rdvDate):void 0,approvedAt:r.approvedAt?this.translatingService.convertToDateString(r.approvedAt):void 0,finishedAt:r.finishedAt?this.translatingService.convertToDateString(r.finishedAt):void 0,canceledAt:r.canceledAt?this.translatingService.convertToDateString(r.canceledAt):void 0,deletedAt:r.deletedAt?this.translatingService.convertToDateString(r.deletedAt):void 0,order:e++}})}))}getDocByID(a){return this.fireStore.collection("Rendezvous").doc(a)}getLastUpdate(a){return a&&"Not Updated"!==a?this.translatingService.convertToDateString(a):"Not Updated"}}return u.\u0275fac=function(a){return new(a||u)(m.LFG(g.ST),m.LFG(f.o))},u.\u0275prov=m.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),u})()},362:(A,v,i)=>{i.d(v,{X:()=>e});var t=i(4650),o=i(4006),_=i(6895),m=i(6188);function g(n,r){1&n&&(t.TgZ(0,"p",10),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"invalid name")))}function f(n,r){1&n&&(t.TgZ(0,"p",10),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"Phone Number must contain 10 digit numbers")))}function h(n,r){1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"Add Rendezvous")))}function u(n,r){1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"Update Rendezvous")))}function l(n,r){if(1&n){const c=t.EpF();t.TgZ(0,"button",11),t.NdJ("click",function(){t.CHM(c);const d=t.oxw();return t.KtG(d.deleteRDV())}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"Delete Rendezvous")))}const a=function(n){return{"full-width-btn":n}};let e=(()=>{class n{constructor(c){this.formBuilder=c,this.rdvFormValue=new t.vpe,this.deleteRDVid=new t.vpe}ngOnInit(){this.rdvID=this.rdv?.rdvID,this.initForm()}initForm(){const c=this.rdv?.displayName,s=this.rdv?.phoneNumber;this.rdvform=this.formBuilder.group({displayName:[c,[o.kI.required,o.kI.pattern(/.*\S.*/)]],phoneNumber:[s,[o.kI.required,o.kI.pattern(/^(\+213|0)?[0-9]{9}$/)]]})}submitForm(){this.rdvform.invalid||this.rdvFormValue.emit(this.rdvform.value)}deleteRDV(){this.deleteRDVid.emit(this.rdvID)}}return n.\u0275fac=function(c){return new(c||n)(t.Y36(o.QS))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-rdv-form"]],inputs:{rdv:"rdv",showDeleteBtn:"showDeleteBtn"},outputs:{rdvFormValue:"rdvFormValue",deleteRDVid:"deleteRDVid"},decls:14,vars:16,consts:[[1,"form",3,"formGroup"],[1,"name-div"],["type","text","formControlName","displayName",1,"input-form",3,"placeholder"],["class","danger-msg",4,"ngIf"],[1,"mobile-div"],["type","tel","formControlName","phoneNumber",1,"input-form",3,"placeholder"],[1,"btns-container"],[1,"btn","btn-success",3,"disabled","ngClass","click"],[4,"ngIf"],["class","btn btn-danger",3,"click",4,"ngIf"],[1,"danger-msg"],[1,"btn","btn-danger",3,"click"]],template:function(c,s){1&c&&(t.TgZ(0,"form",0)(1,"div",1),t._UZ(2,"input",2),t.ALo(3,"translate"),t.YNc(4,g,3,3,"p",3),t.qZA(),t.TgZ(5,"div",4),t._UZ(6,"input",5),t.ALo(7,"translate"),t.YNc(8,f,3,3,"p",3),t.qZA(),t.TgZ(9,"div",6)(10,"button",7),t.NdJ("click",function(){return s.submitForm()}),t.YNc(11,h,3,3,"span",8),t.YNc(12,u,3,3,"span",8),t.qZA(),t.YNc(13,l,3,3,"button",9),t.qZA()()),2&c&&(t.Q6J("formGroup",s.rdvform),t.xp6(2),t.s9C("placeholder",t.lcZ(3,10,"Enter a name")),t.xp6(2),t.Q6J("ngIf",s.rdvform.controls.displayName.touched&&s.rdvform.controls.displayName.invalid),t.xp6(2),t.s9C("placeholder",t.lcZ(7,12,"Phone Number")),t.xp6(2),t.Q6J("ngIf",s.rdvform.controls.phoneNumber.touched&&s.rdvform.controls.phoneNumber.invalid),t.xp6(2),t.Q6J("disabled",s.rdvform.invalid)("ngClass",t.VKq(14,a,!s.rdvID||!s.showDeleteBtn)),t.xp6(1),t.Q6J("ngIf",!s.rdvID),t.xp6(1),t.Q6J("ngIf",s.rdvID),t.xp6(1),t.Q6J("ngIf",s.rdvID&&s.showDeleteBtn))},dependencies:[_.mk,_.O5,o._Y,o.Fj,o.JJ,o.JL,o.sg,o.u,m.X$],styles:[".name-div[_ngcontent-%COMP%], .mobile-div[_ngcontent-%COMP%], .error-msg-div[_ngcontent-%COMP%]{margin:15px 0}.btns-container[_ngcontent-%COMP%]{display:flex;margin-top:25px}.btn[_ngcontent-%COMP%]{width:50%}.full-width-btn[_ngcontent-%COMP%]{width:100%}.btn-success[_ngcontent-%COMP%]{margin-right:7px}.btn-danger[_ngcontent-%COMP%]{margin-left:7px}"]}),n})()},6912:(A,v,i)=>{i.d(v,{a:()=>f});var t=i(4650),o=i(5415),_=i(7579),m=i(6518),g=i(6188);let f=(()=>{class h{constructor(l,a){this.authService=l,this.translate=a,this.updateInfosEvent=new t.vpe,this.loadMoreData=new t.vpe,this.dtOptions={},this.dtTrigger=new _.x,this.tableBTNs=e=>e?[{extend:"colvis",className:"export-btns"},{extend:"csv",className:"export-btns"},{extend:"excel",className:"export-btns"}]:[]}ngOnChanges(l){l.infos&&this.rerenderTable()}ngOnInit(){this.dtOptions=this.tableOptions(this.infos,this.tableCols,this.currentUser?.email,this.showBtns),window.onresize=()=>this.rerenderTable()}ngAfterViewInit(){this.dtTrigger.next(this.dtOptions)}ngOnDestroy(){this.dtTrigger.unsubscribe()}tableOptions(l,a,e,n){return{data:l,columns:a,responsive:!0,pagingType:"full_numbers",pageLength:5,lengthMenu:[3,5,10,25,50,100],dom:"Bfrtip",initComplete:(r,c)=>{$("button").removeClass("dt-button"),$("button").removeClass("buttons-excel"),$("button").removeClass("buttons-html5 "),$("#DataTables_Table_0_next").on("click",()=>this.loadMoreData.emit())},buttons:this.tableBTNs(n),rowCallback:(r,c,s)=>{const d=this;$(r).addClass("t-row"),$(r).css({"white-space":"nowrap"});let p=c;if(p.createdBy===e||this.canCRUD){const D=document.createElement("button");D.textContent=this.translate.instant("Edit"),D.setAttribute("id","tableBtn"),D.classList.add("btn","btn-dark"),D.onclick=()=>d.updateInfosEvent.emit(p);const E=$(r.lastChild);E.addClass("row-btn-container"),E.children("button").remove(),E.append(D)}return r},language:{processing:this.translate.instant("Processing..."),search:this.translate.instant("Search:"),lengthMenu:this.translate.instant("Show _MENU_ entries"),info:this.translate.instant("Showing _START_ to _END_ of _TOTAL_ entries"),infoEmpty:this.translate.instant("Showing 0 to 0 of 0 entries"),infoFiltered:this.translate.instant("(filtered from _MAX_ total entries)"),infoPostFix:"",loadingRecords:this.translate.instant("Loading..."),zeroRecords:this.translate.instant("No matching records found"),emptyTable:this.translate.instant("No data available in table"),paginate:{first:this.translate.instant("First"),previous:this.translate.instant("Previous"),next:this.translate.instant("Next"),last:this.translate.instant("Last")},aria:{sortAscending:this.translate.instant(": activate to sort column ascending"),sortDescending:this.translate.instant(": activate to sort column descending")}}}}rerenderTable(){this.dtOptions&&this.dtElement&&this.dtElement.dtInstance.then(l=>{l.destroy(),this.dtOptions.data=this.infos,this.dtTrigger.next(this.dtOptions)})}get canCRUD(){return this.authService.canCRUDrendezvous(this.currentUser)}}return h.\u0275fac=function(l){return new(l||h)(t.Y36(m.e),t.Y36(g.sK))},h.\u0275cmp=t.Xpm({type:h,selectors:[["app-table"]],viewQuery:function(l,a){if(1&l&&t.Gf(o.G,5),2&l){let e;t.iGM(e=t.CRH())&&(a.dtElement=e.first)}},inputs:{infos:"infos",tableCols:"tableCols",currentUser:"currentUser",showBtns:"showBtns"},outputs:{updateInfosEvent:"updateInfosEvent",loadMoreData:"loadMoreData"},features:[t.TTD],decls:2,vars:2,consts:[[2,"overflow","scroll","overflow-y","hidden","padding","5px"],["datatable","",1,"table","table-responsive","row-border",2,"color","var(--template-color)",3,"dtOptions","dtTrigger"]],template:function(l,a){1&l&&(t.TgZ(0,"div",0),t._UZ(1,"table",1),t.qZA()),2&l&&(t.xp6(1),t.Q6J("dtOptions",a.dtOptions)("dtTrigger",a.dtTrigger))},dependencies:[o.G]}),h})()}}]); \ No newline at end of file diff --git a/dist/new-rdv-app/browser/3rdpartylicenses.txt b/dist/new-rdv-app/browser/3rdpartylicenses.txt new file mode 100644 index 0000000..f482077 --- /dev/null +++ b/dist/new-rdv-app/browser/3rdpartylicenses.txt @@ -0,0 +1,936 @@ +@angular/animations +MIT + +@angular/cdk +MIT +The MIT License + +Copyright (c) 2022 Google LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +@angular/common +MIT + +@angular/core +MIT + +@angular/fire +MIT + +@angular/forms +MIT + +@angular/material +MIT +The MIT License + +Copyright (c) 2022 Google LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +@angular/platform-browser +MIT + +@angular/router +MIT + +@angular/service-worker +MIT + +@babel/runtime +MIT +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +@firebase/analytics +Apache-2.0 + +@firebase/app +Apache-2.0 + +@firebase/app-check +Apache-2.0 + +@firebase/app-compat +Apache-2.0 + +@firebase/auth +Apache-2.0 + +@firebase/auth-compat +Apache-2.0 + +@firebase/component +Apache-2.0 + +@firebase/firestore +Apache-2.0 + +@firebase/firestore-compat +Apache-2.0 + +@firebase/installations +Apache-2.0 + +@firebase/logger +Apache-2.0 + +@firebase/messaging +Apache-2.0 + +@firebase/remote-config +Apache-2.0 + +@firebase/storage +Apache-2.0 + +@firebase/storage-compat +Apache-2.0 + +@firebase/util +Apache-2.0 + +@firebase/webchannel-wrapper +Apache-2.0 + +@ngx-translate/core +MIT + +@ngx-translate/http-loader +MIT + +angular-datatables +MIT +The MIT License + +Copyright (c) Louis Lin (l-lin.github.io) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +bootstrap +MIT +The MIT License (MIT) + +Copyright (c) 2011-2021 Twitter, Inc. +Copyright (c) 2011-2021 The Bootstrap Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +chart.js +MIT +The MIT License (MIT) + +Copyright (c) 2014-2021 Chart.js Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +datatables.net-bs5 +MIT +The MIT License (MIT) + +Copyright SpryMedia Limited and other contributors +http://datatables.net + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +datatables.net-buttons-dt +MIT +The MIT License (MIT) + +Copyright SpryMedia Limited and other contributors +http://datatables.net + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +datatables.net-colreorder-dt +MIT +The MIT License (MIT) + +Copyright SpryMedia Limited and other contributors +http://datatables.net + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +firebase/analytics + +firebase/app + +firebase/app-check + +firebase/compat/app + +firebase/compat/auth + +firebase/compat/firestore + +firebase/compat/storage + +firebase/messaging + +firebase/remote-config + +google-libphonenumber +(MIT AND Apache-2.0) +This package is licensed under MIT: + +The MIT License (MIT) + +Copyright (c) 2015 Rui Marinho + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------- + +The bundled Google Closure Library is licensed under Apache 2.0: + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + +idb +ISC +ISC License (ISC) +Copyright (c) 2016, Jake Archibald + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +intl-tel-input +MIT +The MIT License (MIT) + +Copyright (c) 2014-2016 Jack O'Connor + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +lodash-es +MIT +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +ng2-charts +ISC + +ngx-bootstrap +MIT +The MIT License (MIT) + +Copyright (c) 2015-2017 Valor Software +Copyright (c) 2015-2017 Dmitriy Shekhovtsov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +ngx-image-cropper +MIT +MIT License + +Copyright (c) 2019 Martijn Willekens + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +ngx-intl-tel-input +MIT +MIT License + +Copyright (c) 2018 webcat12345 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +rxjs +Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +tslib +0BSD +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +zone.js +MIT +The MIT License + +Copyright (c) 2010-2020 Google LLC. https://angular.io/license + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dist/new-rdv-app/browser/469.9b8970333e7ad9a6.js b/dist/new-rdv-app/browser/469.9b8970333e7ad9a6.js new file mode 100644 index 0000000..6ac84cc --- /dev/null +++ b/dist/new-rdv-app/browser/469.9b8970333e7ad9a6.js @@ -0,0 +1 @@ +(self.webpackChunknew_rdv_app=self.webpackChunknew_rdv_app||[]).push([[469],{6469:(t,o,n)=>{"use strict";n.r(o),n.d(o,{AuthModule:()=>uo});var r=n(6895),u=n(4006),m=n(5861),N=n(2084),s=n(4650),P=n(6518),L=n(3385),O=n(9116),R=n(5724);class U{constructor(p,l){this.open=p,this.close=l||p}isManual(){return"manual"===this.open||"manual"===this.close}}const Ie={hover:["mouseover","mouseout"],focus:["focusin","focusout"]};const v=typeof window<"u"&&window||{};let k;function te(){return typeof v>"u"||(typeof v.__theme>"u"?(k||(k=function Ve(){if(typeof document>"u")return null;const i=document.createElement("span");i.innerText="test bs version",document.body.appendChild(i),i.classList.add("d-none");const p=i.getBoundingClientRect();return document.body.removeChild(i),p&&0===p.top?"bs4":"bs3"}()),"bs3"===k):"bs4"!==v.__theme)}typeof console>"u"||console;var He=n(9300),je=n(7579),ke=n(6451),he=n(4968),Ye=n(9646),Ze=n(4408),ze=n(727);const Y={schedule(i){let p=requestAnimationFrame,l=cancelAnimationFrame;const{delegate:h}=Y;h&&(p=h.requestAnimationFrame,l=h.cancelAnimationFrame);const _=p(y=>{l=void 0,i(y)});return new ze.w0(()=>l?.(_))},requestAnimationFrame(...i){const{delegate:p}=Y;return(p?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:p}=Y;return(p?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0};var Ke=n(7565);const Je=new class qe extends Ke.v{flush(p){this._active=!0,this._scheduled=void 0;const{actions:l}=this;let h,_=-1;p=p||l.shift();const y=l.length;do{if(h=p.execute(p.state,p.delay))break}while(++_0?super.requestAsyncId(p,l,h):(p.actions.push(this),p._scheduled||(p._scheduled=Y.requestAnimationFrame(()=>p.flush(void 0))))}recycleAsyncId(p,l,h=0){if(null!=h&&h>0||null==h&&this.delay>0)return super.recycleAsyncId(p,l,h);0===p.actions.length&&(Y.cancelAnimationFrame(l),p._scheduled=void 0)}});function x(i,p){if(1!==i.nodeType)return[];const h=i.ownerDocument.defaultView.getComputedStyle(i,null);return p?h[p]:h}function oe(i){return"HTML"===i.nodeName?i:i.parentNode||i.host}function ne(i){if(!i)return document.body;switch(i.nodeName){case"HTML":case"BODY":return i.ownerDocument.body;case"#document":return i.body}const{overflow:p,overflowX:l,overflowY:h}=x(i);return/(auto|scroll|overlay)/.test(String(p)+String(h)+String(l))?i:ne(oe(i))}const me=typeof window<"u"&&typeof document<"u",fe=me&&!(!window.MSInputMethodContext||!document.documentMode),$e=me&&!(!window.MSInputMethodContext||!/MSIE 10/.test(navigator.userAgent));function G(i){return 11===i?fe:10===i?$e:fe||$e}function re(i){if(!i)return document.documentElement;const p=G(10)?document.body:null;let h,l=i.offsetParent||null;for(;l===p&&i.nextElementSibling&&h!==i.nextElementSibling;)h=i.nextElementSibling,l=h.offsetParent;const _=l&&l.nodeName;return _&&"BODY"!==_&&"HTML"!==_?-1!==["TH","TD","TABLE"].indexOf(l.nodeName)&&"static"===x(l,"position")?re(l):l:h?h.ownerDocument.documentElement:document.documentElement}function ie(i){return null!==i.parentNode?ie(i.parentNode):i}function X(i,p){if(!(i&&i.nodeType&&p&&p.nodeType))return document.documentElement;const l=i.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_FOLLOWING,h=l?i:p,_=l?p:i,y=document.createRange();y.setStart(h,0),y.setEnd(_,0);const{commonAncestorContainer:S}=y;if(i!==S&&p!==S||h.contains(_))return function Xe(i){const{nodeName:p}=i;return"BODY"!==p&&("HTML"===p||re(i.firstElementChild)===i)}(S)?S:re(S);const T=ie(i);return T.host?X(T.host,p):X(i,ie(p).host)}function _e(i,p){const l="x"===p?"Left":"Top",h="Left"===l?"Right":"Bottom";return parseFloat(i[`border${l}Width`])+parseFloat(i[`border${h}Width`])}function be(i,p,l,h){return Math.max(p[`offset${i}`],p[`scroll${i}`],l[`client${i}`],l[`offset${i}`],l[`scroll${i}`],G(10)?parseInt(l[`offset${i}`],10)+parseInt(h["margin"+("Height"===i?"Top":"Left")],10)+parseInt(h["margin"+("Height"===i?"Bottom":"Right")],10):0)}function Ne(i){const p=i.body,l=i.documentElement,h=G(10)&&getComputedStyle(l);return{height:be("Height",p,l,h),width:be("Width",p,l,h)}}function H(i,p="top"){const l="top"===p?"scrollTop":"scrollLeft",h=i.nodeName;if("BODY"===h||"HTML"===h){const _=i.ownerDocument.documentElement;return(i.ownerDocument.scrollingElement||_)[l]}return i[l]}function Z(i){return Object.assign(Object.assign({},i),{right:i.left+i.width,bottom:i.top+i.height})}function ye(i){let p={};try{if(G(10)){p=i.getBoundingClientRect();const E=H(i,"top"),C=H(i,"left");p.top+=E,p.left+=C,p.bottom+=E,p.right+=C}else p=i.getBoundingClientRect()}catch{return}const l={left:p.left,top:p.top,width:p.right-p.left,height:p.bottom-p.top},h="HTML"===i.nodeName?Ne(i.ownerDocument):{};let S=i.offsetWidth-(h.width||i.clientWidth||l.right-l.left),T=i.offsetHeight-(h.height||i.clientHeight||l.bottom-l.top);if(S||T){const E=x(i);S-=_e(E,"x"),T-=_e(E,"y"),l.width-=S,l.height-=T}return Z(l)}function de(i,p,l=!1){const h=G(10),_="HTML"===p.nodeName,y=ye(i),S=ye(p),T=ne(i),E=x(p),C=parseFloat(E.borderTopWidth),A=parseFloat(E.borderLeftWidth);l&&_&&(S.top=Math.max(S.top,0),S.left=Math.max(S.left,0));let M=Z({top:y.top-S.top-C,left:y.left-S.left-A,width:y.width,height:y.height});if(M.marginTop=0,M.marginLeft=0,!h&&_){const I=parseFloat(E.marginTop),D=parseFloat(E.marginLeft);M.top-=C-I,M.bottom-=C-I,M.left-=A-D,M.right-=A-D,M.marginTop=I,M.marginLeft=D}return(h&&!l?p.contains(T):p===T&&"BODY"!==T.nodeName)&&(M=function Qe(i,p,l=!1){const h=H(p,"top"),_=H(p,"left"),y=l?-1:1;return i.top+=h*y,i.bottom+=h*y,i.left+=_*y,i.right+=_*y,i}(M,p)),M}function Se(i){const p=i.nodeName;return"BODY"!==p&&"HTML"!==p&&("fixed"===x(i,"position")||Se(oe(i)))}function Te(i){if(!i||!i.parentElement||G())return document.documentElement;let p=i.parentElement;for(;p&&"none"===x(p,"transform");)p=p.parentElement;return p||document.documentElement}function se(i,p,l=0,h,_=!1){let y={top:0,left:0};const S=_?Te(i):X(i,p);if("viewport"===h)y=function et(i,p=!1){const l=i.ownerDocument.documentElement,h=de(i,l),_=Math.max(l.clientWidth,window.innerWidth||0),y=Math.max(l.clientHeight,window.innerHeight||0),S=p?0:H(l),T=p?0:H(l,"left");return Z({top:S-Number(h.top)+Number(h.marginTop),left:T-Number(h.left)+Number(h.marginLeft),width:_,height:y})}(S,_);else{let T;"scrollParent"===h?(T=ne(oe(p)),"BODY"===T.nodeName&&(T=i.ownerDocument.documentElement)):T="window"===h?i.ownerDocument.documentElement:h;const E=de(T,S,_);if("HTML"!==T.nodeName||Se(S))y=E;else{const{height:C,width:A}=Ne(i.ownerDocument);y.top+=E.top-E.marginTop,y.bottom=Number(C)+Number(E.top),y.left+=E.left-E.marginLeft,y.right=Number(A)+Number(E.left)}}return y.left+=l,y.top+=l,y.right-=l,y.bottom-=l,y}function tt({width:i,height:p}){return i*p}function Ee(i,p,l,h,_=["top","bottom","right","left"],y="viewport",S=0){if(-1===i.indexOf("auto"))return i;const T=se(l,h,S,y),E={top:{width:T.width,height:p.top-T.top},right:{width:T.right-p.right,height:T.height},bottom:{width:T.width,height:T.bottom-p.bottom},left:{width:p.left-T.left,height:T.height}},C=Object.keys(E).map(D=>Object.assign(Object.assign({key:D},E[D]),{area:tt(E[D])})).sort((D,F)=>F.area-D.area);let A=C.filter(({width:D,height:F})=>D>=l.clientWidth&&F>=l.clientHeight);A=A.filter(D=>_.some(F=>F===D.key));const M=A.length>0?A[0].key:C[0].key,I=i.split(" ")[1];return l.className=l.className.replace(/bs-tooltip-auto/g,`bs-tooltip-${M}`),M+(I?`-${I}`:"")}function Pe(i){const l=i.ownerDocument.defaultView.getComputedStyle(i),h=parseFloat(l.marginTop||0)+parseFloat(l.marginBottom||0),_=parseFloat(l.marginLeft||0)+parseFloat(l.marginRight||0);return{width:Number(i.offsetWidth)+_,height:Number(i.offsetHeight)+h}}function Ce(i,p,l=null){return de(p,l?Te(i):X(i,p),l)}function ae(i,p,l){const h=l.split(" ")[0],_=Pe(i),y={width:_.width,height:_.height},S=-1!==["right","left"].indexOf(h),T=S?"top":"left",E=S?"left":"top",C=S?"height":"width",A=S?"width":"height";return y[T]=p[T]+p[C]/2-_[C]/2,y[E]=h===E?p[E]-_[A]:p[function nt(i){const p={left:"right",right:"left",bottom:"top",top:"bottom"};return i.replace(/left|right|bottom|top/g,l=>p[l])}(E)],y}function Ae(i,p){return i&&i.modifiers&&i.modifiers[p]&&i.modifiers[p].enabled}function Re(i,p,l){Object.keys(p).forEach(h=>{let _="";-1!==["width","height","top","right","bottom","left"].indexOf(h)&&function it(i){return""!==i&&!isNaN(parseFloat(i))&&isFinite(i)}(p[h])&&(_="px"),l?l.setStyle(i,h,`${String(p[h])}${_}`):i.style[h]=String(p[h])+_})}function st(i){let p=i.offsets.target;const l=i.instance.target.querySelector(".arrow");if(!l)return i;const h=-1!==["left","right"].indexOf(i.placement.split(" ")[0]),_=h?"height":"width",y=h?"Top":"Left",S=y.toLowerCase(),T=h?"left":"top",E=h?"bottom":"right",C=Pe(l)[_],A=i.placement.split(" ")[1];i.offsets.host[E]-Cp[E]&&(p[S]+=Number(i.offsets.host[S])+Number(C)-Number(p[E])),p=Z(p);const M=x(i.instance.target),I=parseFloat(M[`margin${y}`]),D=parseFloat(M[`border${y}Width`]);let F;if(A){const ee=parseFloat(M.borderRadius),B=Number(I+D+ee);F=S===A?Number(i.offsets.host[S])+B:Number(i.offsets.host[S])+Number(i.offsets.host[_]-B)}else F=Number(i.offsets.host[S])+Number(i.offsets.host[_]/2-C/2);let j=F-p[S]-I-D;return j=Math.max(Math.min(p[_]-C,j),0),i.offsets.arrow={[S]:Math.round(j),[T]:""},i.instance.arrow=l,i}function at(i){if(i.offsets.target=Z(i.offsets.target),!Ae(i.options,"flip"))return i.offsets.target=Object.assign(Object.assign({},i.offsets.target),ae(i.instance.target,i.offsets.host,i.placement)),i;const p=se(i.instance.target,i.instance.host,0,"viewport",!1);let l=i.placement.split(" ")[0],h=i.placement.split(" ")[1]||"";const T=Ee("auto",i.offsets.host,i.instance.target,i.instance.host,i.options.allowedPositions),E=[l,T];return E.forEach((C,A)=>{if(l!==C||E.length===A+1)return i;l=i.placement.split(" ")[0];const M="left"===l&&Math.floor(i.offsets.target.right)>Math.floor(i.offsets.host.left)||"right"===l&&Math.floor(i.offsets.target.left)Math.floor(i.offsets.host.top)||"bottom"===l&&Math.floor(i.offsets.target.top)Math.floor(p.right),F=Math.floor(i.offsets.target.top)Math.floor(p.bottom),ee="left"===l&&I||"right"===l&&D||"top"===l&&F||"bottom"===l&&j,B=-1!==["top","bottom"].indexOf(l),Ue=B&&"left"===h&&I||B&&"right"===h&&D||!B&&"left"===h&&F||!B&&"right"===h&&j;(M||ee||Ue)&&((M||ee)&&(l=E[A+1]),Ue&&(h=function rt(i){return"right"===i?"left":"left"===i?"right":i}(h)),i.placement=l+(h?` ${h}`:""),i.offsets.target=Object.assign(Object.assign({},i.offsets.target),ae(i.instance.target,i.offsets.host,i.placement)))}),i}function ut(i){if(!Ae(i.options,"preventOverflow"))return i;const p="transform",l=i.instance.target.style,{top:h,left:_,[p]:y}=l;l.top="",l.left="",l[p]="";const S=se(i.instance.target,i.instance.host,0,"scrollParent",!1);l.top=h,l.left=_,l[p]=y;const E={primary(A){let M=i.offsets.target[A];return i.offsets.target[A]S[A]&&(I=Math.min(i.offsets.target[M],S[A]-("right"===A?i.offsets.target.width:i.offsets.target.height))),{[M]:I}}};let C;return["left","right","top","bottom"].forEach(A=>{C=-1!==["left","top"].indexOf(A)?"primary":"secondary",i.offsets.target=Object.assign(Object.assign({},i.offsets.target),E[C](A))}),i}function lt(i){const p=i.placement,l=p.split(" ")[0],h=p.split(" ")[1];if(h){const{host:_,target:y}=i.offsets,S=-1!==["bottom","top"].indexOf(l),T=S?"left":"top",E=S?"width":"height",C={start:{[T]:_[T]},end:{[T]:_[T]+_[E]-y[E]}};i.offsets.target=Object.assign(Object.assign({},y),{[T]:T===h?C.start[T]:C.end[T]})}return i}const pt=new class ct{position(p,l,h=!0){return this.offset(p,l,!1)}offset(p,l,h=!0){return Ce(l,p)}positionElements(p,l,h,_,y){return[at,lt,ut,st].reduce((T,E)=>E(T),function gt(i,p,l,h){const _=Ce(i,p);!l.match(/^(auto)*\s*(left|right|top|bottom)*$/)&&!l.match(/^(left|right|top|bottom)*(?: (left|right|top|bottom))?\s*(start|end)*$/)&&(l="auto");const y=!!l.match(/auto/g);let S=l.match(/auto\s(left|right|top|bottom)/)?l.split(" ")[1]||"auto":l;const T=S.match(/^(left|right|top|bottom)* ?(?!\1)(left|right|top|bottom)?/);T&&(S=T[1]+(T[2]?` ${T[2]}`:"")),-1!==["left right","right left","top bottom","bottom top"].indexOf(S)&&(S="auto");const E=ae(i,_,S);return S=Ee(S,_,i,p,h?h.allowedPositions:void 0),{options:h,instance:{target:i,host:p,arrow:null},offsets:{target:E,host:_,arrow:null},positionFixed:!1,placement:S,placementAuto:y}}(l,p,h,y))}};let Me=(()=>{class i{constructor(l,h,_){this.update$$=new je.x,this.positionElements=new Map,this.isDisabled=!1,(0,r.NF)(_)&&l.runOutsideAngular(()=>{this.triggerEvent$=(0,ke.T)((0,he.R)(window,"scroll",{passive:!0}),(0,he.R)(window,"resize",{passive:!0}),(0,Ye.of)(0,Je),this.update$$),this.triggerEvent$.subscribe(()=>{this.isDisabled||this.positionElements.forEach(y=>{!function ht(i,p,l,h,_,y){const S=pt.positionElements(i,p,l,h,_),T=function ot(i){return{width:i.offsets.target.width,height:i.offsets.target.height,left:Math.floor(i.offsets.target.left),top:Math.round(i.offsets.target.top),bottom:Math.round(i.offsets.target.bottom),right:Math.floor(i.offsets.target.right)}}(S);Re(p,{"will-change":"transform",top:"0px",left:"0px",transform:`translate3d(${T.left}px, ${T.top}px, 0px)`},y),S.instance.arrow&&Re(S.instance.arrow,S.offsets.arrow,y),function dt(i,p){const l=i.instance.target;let h=l.className;i.placementAuto&&(h=h.replace(/bs-popover-auto/g,`bs-popover-${i.placement}`),h=h.replace(/bs-tooltip-auto/g,`bs-tooltip-${i.placement}`),h=h.replace(/\sauto/g,` ${i.placement}`),-1!==h.indexOf("popover")&&-1===h.indexOf("popover-auto")&&(h+=" popover-auto"),-1!==h.indexOf("tooltip")&&-1===h.indexOf("tooltip-auto")&&(h+=" tooltip-auto")),h=h.replace(/left|right|top|bottom/g,`${i.placement.split(" ")[0]}`),p?p.setAttribute(l,"class",h):l.className=h}(S,y)}(Q(y.target),Q(y.element),y.attachment,y.appendToBody,this.options,h.createRenderer(null,null))})})})}position(l){this.addPositionElement(l)}get event$(){return this.triggerEvent$}disable(){this.isDisabled=!0}enable(){this.isDisabled=!1}addPositionElement(l){this.positionElements.set(Q(l.element),l)}calcPosition(){this.update$$.next()}deletePositionElement(l){this.positionElements.delete(Q(l))}setOptions(l){this.options=l}}return i.\u0275fac=function(l){return new(l||i)(s.LFG(s.R0b),s.LFG(s.FYo),s.LFG(s.Lbi))},i.\u0275prov=s.Yz7({token:i,factory:i.\u0275fac}),i})();function Q(i){return"string"==typeof i?document.querySelector(i):i instanceof s.SBq?i.nativeElement:i}class z{constructor(p,l,h){this.nodes=p,this.viewRef=l,this.componentRef=h}}class mt{constructor(p,l,h,_,y,S,T,E){this._viewContainerRef=p,this._renderer=l,this._elementRef=h,this._injector=_,this._componentFactoryResolver=y,this._ngZone=S,this._applicationRef=T,this._posService=E,this.onBeforeShow=new s.vpe,this.onShown=new s.vpe,this.onBeforeHide=new s.vpe,this.onHidden=new s.vpe,this._providers=[],this._isHiding=!1,this.containerDefaultSelector="body",this._listenOpts={},this._globalListener=Function.prototype}get isShown(){return!this._isHiding&&!!this._componentRef}attach(p){return this._componentFactory=this._componentFactoryResolver.resolveComponentFactory(p),this}to(p){return this.container=p||this.container,this}position(p){return this.attachment=p.attachment||this.attachment,this._elementRef=p.target||this._elementRef,this}provide(p){return this._providers.push(p),this}show(p={}){if(this._subscribePositioning(),this._innerComponent=null,!this._componentRef){this.onBeforeShow.emit(),this._contentRef=this._getContentRef(p.content,p.context,p.initialState);const l=s.zs3.create({providers:this._providers,parent:this._injector});this._componentRef=this._componentFactory.create(l,this._contentRef.nodes),this._applicationRef.attachView(this._componentRef.hostView),this.instance=this._componentRef.instance,Object.assign(this._componentRef.instance,p),this.container instanceof s.SBq&&this.container.nativeElement.appendChild(this._componentRef.location.nativeElement),"string"==typeof this.container&&typeof document<"u"&&(document.querySelector(this.container)||document.querySelector(this.containerDefaultSelector)).appendChild(this._componentRef.location.nativeElement),!this.container&&this._elementRef&&this._elementRef.nativeElement.parentElement&&this._elementRef.nativeElement.parentElement.appendChild(this._componentRef.location.nativeElement),this._contentRef.componentRef&&(this._innerComponent=this._contentRef.componentRef.instance,this._contentRef.componentRef.changeDetectorRef.markForCheck(),this._contentRef.componentRef.changeDetectorRef.detectChanges()),this._componentRef.changeDetectorRef.markForCheck(),this._componentRef.changeDetectorRef.detectChanges(),this.onShown.emit(p.id?{id:p.id}:this._componentRef.instance)}return this._registerOutsideClick(),this._componentRef}hide(p){if(!this._componentRef)return this;this._posService.deletePositionElement(this._componentRef.location),this.onBeforeHide.emit(this._componentRef.instance);const l=this._componentRef.location.nativeElement;return l.parentNode.removeChild(l),this._contentRef.componentRef&&this._contentRef.componentRef.destroy(),this._viewContainerRef&&this._contentRef.viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef)),this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._contentRef=null,this._componentRef=null,this._removeGlobalListener(),this.onHidden.emit(p?{id:p}:null),this}toggle(){this.isShown?this.hide():this.show()}dispose(){this.isShown&&this.hide(),this._unsubscribePositioning(),this._unregisterListenersFn&&this._unregisterListenersFn()}listen(p){this.triggers=p.triggers||this.triggers,this._listenOpts.outsideClick=p.outsideClick,this._listenOpts.outsideEsc=p.outsideEsc,p.target=p.target||this._elementRef.nativeElement;const l=this._listenOpts.hide=()=>p.hide?p.hide():void this.hide(),h=this._listenOpts.show=y=>{p.show?p.show(y):this.show(y),y()};return this._unregisterListenersFn=function Fe(i,p){const l=function ce(i,p=Ie){const l=(i||"").trim();if(0===l.length)return[];const h=l.split(/\s+/).map(y=>y.split(":")).map(y=>{const S=p[y[0]]||y;return new U(S[0],S[1])}),_=h.filter(y=>y.isManual());if(_.length>1)throw new Error("Triggers parse error: only one manual trigger is allowed");if(1===_.length&&h.length>1)throw new Error("Triggers parse error: manual trigger can't be mixed with other triggers");return h}(p.triggers),h=p.target;if(1===l.length&&l[0].isManual())return Function.prototype;const _=[],y=[],S=()=>{y.forEach(T=>_.push(T())),y.length=0};return l.forEach(T=>{const E=T.open===T.close,C=E?p.toggle:p.show;E||y.push(()=>i.listen(h,T.close,p.hide)),_.push(i.listen(h,T.open,()=>C(S)))}),()=>{_.forEach(T=>T())}}(this._renderer,{target:p.target,triggers:p.triggers,show:h,hide:l,toggle:y=>{this.isShown?l():h(y)}}),this}_removeGlobalListener(){this._globalListener&&(this._globalListener(),this._globalListener=null)}attachInline(p,l){return this._inlineViewRef=p.createEmbeddedView(l),this}_registerOutsideClick(){if(this._componentRef&&this._componentRef.location){if(this._listenOpts.outsideClick){const p=this._componentRef.location.nativeElement;setTimeout(()=>{this._globalListener=function we(i,p){return p.outsideClick?i.listen("document","click",l=>{p.target&&p.target.contains(l.target)||p.targets&&p.targets.some(h=>h.contains(l.target))||p.hide()}):Function.prototype}(this._renderer,{targets:[p,this._elementRef.nativeElement],outsideClick:this._listenOpts.outsideClick,hide:()=>this._listenOpts.hide()})})}this._listenOpts.outsideEsc&&(this._globalListener=function xe(i,p){return p.outsideEsc?i.listen("document","keyup.esc",l=>{p.target&&p.target.contains(l.target)||p.targets&&p.targets.some(h=>h.contains(l.target))||p.hide()}):Function.prototype}(this._renderer,{targets:[this._componentRef.location.nativeElement,this._elementRef.nativeElement],outsideEsc:this._listenOpts.outsideEsc,hide:()=>this._listenOpts.hide()}))}}getInnerComponent(){return this._innerComponent}_subscribePositioning(){this._zoneSubscription||!this.attachment||(this.onShown.subscribe(()=>{this._posService.position({element:this._componentRef.location,target:this._elementRef,attachment:this.attachment,appendToBody:"body"===this.container})}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>{!this._componentRef||this._posService.calcPosition()}))}_unsubscribePositioning(){!this._zoneSubscription||(this._zoneSubscription.unsubscribe(),this._zoneSubscription=null)}_getContentRef(p,l,h){if(!p)return new z([]);if(p instanceof s.Rgc){if(this._viewContainerRef){const y=this._viewContainerRef.createEmbeddedView(p,l);return y.markForCheck(),new z([y.rootNodes],y)}const _=p.createEmbeddedView({});return this._applicationRef.attachView(_),new z([_.rootNodes],_)}if("function"==typeof p){const _=this._componentFactoryResolver.resolveComponentFactory(p),y=s.zs3.create({providers:this._providers,parent:this._injector}),S=_.create(y);return Object.assign(S.instance,h),this._applicationRef.attachView(S.hostView),new z([[S.location.nativeElement]],S.hostView,S)}return new z([[this._renderer.createText(`${p}`)]])}}let Oe=(()=>{class i{constructor(l,h,_,y,S){this._componentFactoryResolver=l,this._ngZone=h,this._injector=_,this._posService=y,this._applicationRef=S}createLoader(l,h,_){return new mt(h,_,l,this._injector,this._componentFactoryResolver,this._ngZone,this._applicationRef,this._posService)}}return i.\u0275fac=function(l){return new(l||i)(s.LFG(s._Vd),s.LFG(s.R0b),s.LFG(s.zs3),s.LFG(Me),s.LFG(s.z2F))},i.\u0275prov=s.Yz7({token:i,factory:i.\u0275fac}),i})();var W=n(7340);const ft=["*"];let $t=(()=>{class i{constructor(){this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1}}return i.\u0275fac=function(l){return new(l||i)},i.\u0275prov=(0,s.Yz7)({factory:function(){return new i},token:i,providedIn:"root"}),i})(),V=(()=>{class i{constructor(){this.direction="down",this.isOpenChange=new s.vpe,this.isDisabledChange=new s.vpe,this.toggleClick=new s.vpe,this.dropdownMenu=new Promise(l=>{this.resolveDropdownMenu=l})}}return i.\u0275fac=function(l){return new(l||i)},i.\u0275prov=s.Yz7({token:i,factory:i.\u0275fac}),i})();const Le=[(0,W.oB)({height:0,overflow:"hidden"}),(0,W.jt)("220ms cubic-bezier(0, 0, 0.2, 1)",(0,W.oB)({height:"*",overflow:"hidden"}))];let bt=(()=>{class i{constructor(l,h,_,y,S){this._state=l,this.cd=h,this._renderer=_,this._element=y,this.isOpen=!1,this._factoryDropDownAnimation=S.build(Le),this._subscription=l.isOpenChange.subscribe(T=>{this.isOpen=T;const E=this._element.nativeElement.querySelector(".dropdown-menu");this._renderer.addClass(this._element.nativeElement.querySelector("div"),"open"),E&&!te()&&(this._renderer.addClass(E,"show"),E.classList.contains("dropdown-menu-right")&&(this._renderer.setStyle(E,"left","auto"),this._renderer.setStyle(E,"right","0")),"up"===this.direction&&(this._renderer.setStyle(E,"top","auto"),this._renderer.setStyle(E,"transform","translateY(-101%)"))),E&&this._state.isAnimated&&this._factoryDropDownAnimation.create(E).play(),this.cd.markForCheck(),this.cd.detectChanges()})}get direction(){return this._state.direction}_contains(l){return this._element.nativeElement.contains(l)}ngOnDestroy(){this._subscription.unsubscribe()}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(V),s.Y36(s.sBO),s.Y36(s.Qsj),s.Y36(s.SBq),s.Y36(W._j))},i.\u0275cmp=s.Xpm({type:i,selectors:[["bs-dropdown-container"]],hostAttrs:[2,"display","block","position","absolute","z-index","1040"],ngContentSelectors:ft,decls:2,vars:8,template:function(l,h){1&l&&(s.F$t(),s.TgZ(0,"div"),s.Hsn(1),s.qZA()),2&l&&s.ekj("dropup","up"===h.direction)("dropdown","down"===h.direction)("show",h.isOpen)("open",h.isOpen)},dependencies:function(){return[ge]},encapsulation:2,changeDetection:0}),i})(),ge=(()=>{class i{constructor(l,h,_,y,S,T,E){this._elementRef=l,this._renderer=h,this._viewContainerRef=_,this._cis=y,this._state=S,this._config=T,this._isInlineOpen=!1,this._subscriptions=[],this._isInited=!1,this._state.autoClose=this._config.autoClose,this._state.insideClick=this._config.insideClick,this._state.isAnimated=this._config.isAnimated,this._factoryDropDownAnimation=E.build(Le),this._dropdown=this._cis.createLoader(this._elementRef,this._viewContainerRef,this._renderer).provide({provide:V,useValue:this._state}),this.onShown=this._dropdown.onShown,this.onHidden=this._dropdown.onHidden,this.isOpenChange=this._state.isOpenChange}set autoClose(l){this._state.autoClose=l}get autoClose(){return this._state.autoClose}set isAnimated(l){this._state.isAnimated=l}get isAnimated(){return this._state.isAnimated}set insideClick(l){this._state.insideClick=l}get insideClick(){return this._state.insideClick}set isDisabled(l){this._isDisabled=l,this._state.isDisabledChange.emit(l),l&&this.hide()}get isDisabled(){return this._isDisabled}get isOpen(){return this._showInline?this._isInlineOpen:this._dropdown.isShown}set isOpen(l){l?this.show():this.hide()}get isBs4(){return!te()}get _showInline(){return!this.container}ngOnInit(){this._isInited||(this._isInited=!0,this._dropdown.listen({outsideClick:!1,triggers:this.triggers,show:()=>this.show()}),this._subscriptions.push(this._state.toggleClick.subscribe(l=>this.toggle(l))),this._subscriptions.push(this._state.isDisabledChange.pipe((0,He.h)(l=>l)).subscribe(l=>this.hide())))}show(){if(!this.isOpen&&!this.isDisabled){if(this._showInline)return this._inlinedMenu||this._state.dropdownMenu.then(l=>{this._dropdown.attachInline(l.viewContainer,l.templateRef),this._inlinedMenu=this._dropdown._inlineViewRef,this.addBs4Polyfills(),this._renderer.addClass(this._inlinedMenu.rootNodes[0].parentNode,"open"),this.playAnimation()}).catch(),this.addBs4Polyfills(),this._isInlineOpen=!0,this.onShown.emit(!0),this._state.isOpenChange.emit(!0),void this.playAnimation();this._state.dropdownMenu.then(l=>{const h=this.dropup||typeof this.dropup<"u"&&this.dropup;this._state.direction=h?"up":"down";const _=this.placement||(h?"top start":"bottom start");this._dropdown.attach(bt).to(this.container).position({attachment:_}).show({content:l.templateRef,placement:_}),this._state.isOpenChange.emit(!0)}).catch()}}hide(){!this.isOpen||(this._showInline?(this.removeShowClass(),this.removeDropupStyles(),this._isInlineOpen=!1,this.onHidden.emit(!0)):this._dropdown.hide(),this._state.isOpenChange.emit(!1))}toggle(l){return this.isOpen||!l?this.hide():this.show()}_contains(l){return this._elementRef.nativeElement.contains(l.target)||this._dropdown.instance&&this._dropdown.instance._contains(l.target)}ngOnDestroy(){for(const l of this._subscriptions)l.unsubscribe();this._dropdown.dispose()}addBs4Polyfills(){te()||(this.addShowClass(),this.checkRightAlignment(),this.addDropupStyles())}playAnimation(){this._state.isAnimated&&this._inlinedMenu&&setTimeout(()=>{this._factoryDropDownAnimation.create(this._inlinedMenu.rootNodes[0]).play()})}addShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.addClass(this._inlinedMenu.rootNodes[0],"show")}removeShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.removeClass(this._inlinedMenu.rootNodes[0],"show")}checkRightAlignment(){if(this._inlinedMenu&&this._inlinedMenu.rootNodes[0]){const l=this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-right");this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"left",l?"auto":"0"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"right",l?"0":"auto")}}addDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"top",this.dropup?"auto":"100%"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"transform",this.dropup?"translateY(-101%)":"translateY(0)"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"bottom","auto"))}removeDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"top"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"transform"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"bottom"))}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(s.SBq),s.Y36(s.Qsj),s.Y36(s.s_b),s.Y36(Oe),s.Y36(V),s.Y36($t),s.Y36(W._j))},i.\u0275dir=s.lG2({type:i,selectors:[["","bsDropdown",""],["","dropdown",""]],hostVars:6,hostBindings:function(l,h){2&l&&s.ekj("dropup",h.dropup)("open",h.isOpen)("show",h.isOpen&&h.isBs4)},inputs:{autoClose:"autoClose",isAnimated:"isAnimated",insideClick:"insideClick",isDisabled:"isDisabled",isOpen:"isOpen",placement:"placement",triggers:"triggers",container:"container",dropup:"dropup"},outputs:{onShown:"onShown",onHidden:"onHidden",isOpenChange:"isOpenChange"},exportAs:["bs-dropdown"],features:[s._Bn([V])]}),i})(),Nt=(()=>{class i{constructor(l,h,_){l.resolveDropdownMenu({templateRef:_,viewContainer:h})}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(V),s.Y36(s.s_b),s.Y36(s.Rgc))},i.\u0275dir=s.lG2({type:i,selectors:[["","bsDropdownMenu",""],["","dropdownMenu",""]],exportAs:["bs-dropdown-menu"]}),i})(),yt=(()=>{class i{constructor(l,h,_,y,S){this._changeDetectorRef=l,this._dropdown=h,this._element=_,this._renderer=y,this._state=S,this.isDisabled=null,this._subscriptions=[],this._subscriptions.push(this._state.isOpenChange.subscribe(T=>{this.isOpen=T,T?(this._documentClickListener=this._renderer.listen("document","click",E=>{this._state.autoClose&&2!==E.button&&!this._element.nativeElement.contains(E.target)&&(!this._state.insideClick||!this._dropdown._contains(E))&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())}),this._escKeyUpListener=this._renderer.listen(this._element.nativeElement,"keyup.esc",()=>{this._state.autoClose&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())})):(this._documentClickListener(),this._escKeyUpListener())})),this._subscriptions.push(this._state.isDisabledChange.subscribe(T=>this.isDisabled=T||null))}onClick(){this.isDisabled||this._state.toggleClick.emit(!0)}ngOnDestroy(){this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener();for(const l of this._subscriptions)l.unsubscribe()}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(s.sBO),s.Y36(ge),s.Y36(s.SBq),s.Y36(s.Qsj),s.Y36(V))},i.\u0275dir=s.lG2({type:i,selectors:[["","bsDropdownToggle",""],["","dropdownToggle",""]],hostVars:3,hostBindings:function(l,h){1&l&&s.NdJ("click",function(){return h.onClick()}),2&l&&s.uIk("aria-haspopup",!0)("disabled",h.isDisabled)("aria-expanded",h.isOpen)},exportAs:["bs-dropdown-toggle"]}),i})(),St=(()=>{class i{static forRoot(l){return{ngModule:i,providers:[Oe,Me,V]}}}return i.\u0275fac=function(l){return new(l||i)},i.\u0275mod=s.oAB({type:i}),i.\u0275inj=s.cJS({}),i})();const Tt=["countryList"];function Et(i,p){if(1&i&&(s.TgZ(0,"div",9),s._uU(1),s.qZA()),2&i){const l=s.oxw();s.xp6(1),s.hij("+",l.selectedCountry.dialCode,"")}}function Pt(i,p){if(1&i){const l=s.EpF();s.TgZ(0,"div",17)(1,"input",18),s.NdJ("ngModelChange",function(_){s.CHM(l);const y=s.oxw(2);return s.KtG(y.countrySearchText=_)})("keyup",function(){s.CHM(l);const _=s.oxw(2);return s.KtG(_.searchCountry())})("click",function(_){return _.stopPropagation()}),s.qZA()()}if(2&i){const l=s.oxw(2);s.xp6(1),s.Q6J("ngModel",l.countrySearchText)("placeholder",l.searchCountryPlaceholder)}}function Ct(i,p){if(1&i){const l=s.EpF();s.TgZ(0,"li",19),s.NdJ("click",function(){const y=s.CHM(l).$implicit,S=s.oxw(2),T=s.MAs(8);return s.KtG(S.onCountrySelect(y,T))}),s.TgZ(1,"div",20),s._UZ(2,"div",3),s.qZA(),s.TgZ(3,"span",21),s._uU(4),s.qZA(),s.TgZ(5,"span",22),s._uU(6),s.qZA()()}if(2&i){const l=p.$implicit;s.Q6J("id",l.htmlId+"-preferred"),s.xp6(2),s.Q6J("ngClass",l.flagClass),s.xp6(2),s.Oqu(l.name),s.xp6(2),s.hij("+",l.dialCode,"")}}function At(i,p){1&i&&s._UZ(0,"li",23)}function Rt(i,p){if(1&i){const l=s.EpF();s.TgZ(0,"li",24),s.NdJ("click",function(){const y=s.CHM(l).$implicit,S=s.oxw(2),T=s.MAs(8);return s.KtG(S.onCountrySelect(y,T))}),s.TgZ(1,"div",20),s._UZ(2,"div",3),s.qZA(),s.TgZ(3,"span",21),s._uU(4),s.qZA(),s.TgZ(5,"span",22),s._uU(6),s.qZA()()}if(2&i){const l=p.$implicit;s.Q6J("id",l.htmlId),s.xp6(2),s.Q6J("ngClass",l.flagClass),s.xp6(2),s.Oqu(l.name),s.xp6(2),s.hij("+",l.dialCode,"")}}function Mt(i,p){if(1&i&&(s.TgZ(0,"div",10),s.YNc(1,Pt,2,2,"div",11),s.TgZ(2,"ul",12,13),s.YNc(4,Ct,7,4,"li",14),s.YNc(5,At,1,0,"li",15),s.YNc(6,Rt,7,4,"li",16),s.qZA()()),2&i){const l=s.oxw();s.xp6(1),s.Q6J("ngIf",l.searchCountryFlag&&l.searchCountryField),s.xp6(3),s.Q6J("ngForOf",l.preferredCountriesInDropDown),s.xp6(1),s.Q6J("ngIf",null==l.preferredCountriesInDropDown?null:l.preferredCountriesInDropDown.length),s.xp6(1),s.Q6J("ngForOf",l.allCountries)}}const Ot=function(i){return{disabled:i}};var $=(()=>{return(i=$||($={})).Afghanistan="af",i.Albania="al",i.Algeria="dz",i.AmericanSamoa="as",i.Andorra="ad",i.Angola="ao",i.Anguilla="ai",i.AntiguaAndBarbuda="ag",i.Argentina="ar",i.Armenia="am",i.Aruba="aw",i.Australia="au",i.Austria="at",i.Azerbaijan="az",i.Bahamas="bs",i.Bahrain="bh",i.Bangladesh="bd",i.Barbados="bb",i.Belarus="by",i.Belgium="be",i.Belize="bz",i.Benin="bj",i.Bermuda="bm",i.Bhutan="bt",i.Bolivia="bo",i.BosniaAndHerzegovina="ba",i.Botswana="bw",i.Brazil="br",i.BritishIndianOceanTerritory="io",i.BritishVirginIslands="vg",i.Brunei="bn",i.Bulgaria="bg",i.BurkinaFaso="bf",i.Burundi="bi",i.Cambodia="kh",i.Cameroon="cm",i.Canada="ca",i.CapeVerde="cv",i.CaribbeanNetherlands="bq",i.CaymanIslands="ky",i.CentralAfricanRepublic="cf",i.Chad="td",i.Chile="cl",i.China="cn",i.ChristmasIsland="cx",i.Cocos="cc",i.Colombia="co",i.Comoros="km",i.CongoDRCJamhuriYaKidemokrasiaYaKongo="cd",i.CongoRepublicCongoBrazzaville="cg",i.CookIslands="ck",i.CostaRica="cr",i.C\u00f4teDIvoire="ci",i.Croatia="hr",i.Cuba="cu",i.Cura\u00e7ao="cw",i.Cyprus="cy",i.CzechRepublic="cz",i.Denmark="dk",i.Djibouti="dj",i.Dominica="dm",i.DominicanRepublic="do",i.Ecuador="ec",i.Egypt="eg",i.ElSalvador="sv",i.EquatorialGuinea="gq",i.Eritrea="er",i.Estonia="ee",i.Ethiopia="et",i.FalklandIslands="fk",i.FaroeIslands="fo",i.Fiji="fj",i.Finland="fi",i.France="fr",i.FrenchGuiana="gf",i.FrenchPolynesia="pf",i.Gabon="ga",i.Gambia="gm",i.Georgia="ge",i.Germany="de",i.Ghana="gh",i.Gibraltar="gi",i.Greece="gr",i.Greenland="gl",i.Grenada="gd",i.Guadeloupe="gp",i.Guam="gu",i.Guatemala="gt",i.Guernsey="gg",i.Guinea="gn",i.GuineaBissau="gw",i.Guyana="gy",i.Haiti="ht",i.Honduras="hn",i.HongKong="hk",i.Hungary="hu",i.Iceland="is",i.India="in",i.Indonesia="id",i.Iran="ir",i.Iraq="iq",i.Ireland="ie",i.IsleOfMan="im",i.Israel="il",i.Italy="it",i.Jamaica="jm",i.Japan="jp",i.Jersey="je",i.Jordan="jo",i.Kazakhstan="kz",i.Kenya="ke",i.Kiribati="ki",i.Kosovo="xk",i.Kuwait="kw",i.Kyrgyzstan="kg",i.Laos="la",i.Latvia="lv",i.Lebanon="lb",i.Lesotho="ls",i.Liberia="lr",i.Libya="ly",i.Liechtenstein="li",i.Lithuania="lt",i.Luxembourg="lu",i.Macau="mo",i.Macedonia="mk",i.Madagascar="mg",i.Malawi="mw",i.Malaysia="my",i.Maldives="mv",i.Mali="ml",i.Malta="mt",i.MarshallIslands="mh",i.Martinique="mq",i.Mauritania="mr",i.Mauritius="mu",i.Mayotte="yt",i.Mexico="mx",i.Micronesia="fm",i.Moldova="md",i.Monaco="mc",i.Mongolia="mn",i.Montenegro="me",i.Montserrat="ms",i.Morocco="ma",i.Mozambique="mz",i.Myanmar="mm",i.Namibia="na",i.Nauru="nr",i.Nepal="np",i.Netherlands="nl",i.NewCaledonia="nc",i.NewZealand="nz",i.Nicaragua="ni",i.Niger="ne",i.Nigeria="ng",i.Niue="nu",i.NorfolkIsland="nf",i.NorthKorea="kp",i.NorthernMarianaIslands="mp",i.Norway="no",i.Oman="om",i.Pakistan="pk",i.Palau="pw",i.Palestine="ps",i.Panama="pa",i.PapuaNewGuinea="pg",i.Paraguay="py",i.Peru="pe",i.Philippines="ph",i.Poland="pl",i.Portugal="pt",i.PuertoRico="pr",i.Qatar="qa",i.R\u00e9union="re",i.Romania="ro",i.Russia="ru",i.Rwanda="rw",i.SaintBarth\u00e9lemy="bl",i.SaintHelena="sh",i.SaintKittsAndNevis="kn",i.SaintLucia="lc",i.SaintMartin="mf",i.SaintPierreAndMiquelon="pm",i.SaintVincentAndTheGrenadines="vc",i.Samoa="ws",i.SanMarino="sm",i.S\u00e3oTom\u00e9AndPr\u00edncipe="st",i.SaudiArabia="sa",i.Senegal="sn",i.Serbia="rs",i.Seychelles="sc",i.SierraLeone="sl",i.Singapore="sg",i.SintMaarten="sx",i.Slovakia="sk",i.Slovenia="si",i.SolomonIslands="sb",i.Somalia="so",i.SouthAfrica="za",i.SouthKorea="kr",i.SouthSudan="ss",i.Spain="es",i.SriLanka="lk",i.Sudan="sd",i.Suriname="sr",i.SvalbardAndJanMayen="sj",i.Swaziland="sz",i.Sweden="se",i.Switzerland="ch",i.Syria="sy",i.Taiwan="tw",i.Tajikistan="tj",i.Tanzania="tz",i.Thailand="th",i.TimorLeste="tl",i.Togo="tg",i.Tokelau="tk",i.Tonga="to",i.TrinidadAndTobago="tt",i.Tunisia="tn",i.Turkey="tr",i.Turkmenistan="tm",i.TurksAndCaicosIslands="tc",i.Tuvalu="tv",i.USVirginIslands="vi",i.Uganda="ug",i.Ukraine="ua",i.UnitedArabEmirates="ae",i.UnitedKingdom="gb",i.UnitedStates="us",i.Uruguay="uy",i.Uzbekistan="uz",i.Vanuatu="vu",i.VaticanCity="va",i.Venezuela="ve",i.Vietnam="vn",i.WallisAndFutuna="wf",i.WesternSahara="eh",i.Yemen="ye",i.Zambia="zm",i.Zimbabwe="zw",i.\u00c5landIslands="ax",$;var i})();let De=(()=>{class i{constructor(){this.allCountries=[["Afghanistan (\u202b\u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646\u202c\u200e)",$.Afghanistan,"93"],["Albania (Shqip\xebri)",$.Albania,"355"],["Algeria (\u202b\u0627\u0644\u062c\u0632\u0627\u0626\u0631\u202c\u200e)",$.Algeria,"213"],["American Samoa","as","1",1,["684"]],["Andorra",$.Andorra,"376"],["Angola",$.Angola,"244"],["Anguilla","ai","1",1,["264"]],["Antigua and Barbuda","ag","1",1,["268"]],["Argentina",$.Argentina,"54"],["Armenia (\u0540\u0561\u0575\u0561\u057d\u057f\u0561\u0576)",$.Armenia,"374"],["Aruba",$.Aruba,"297"],["Australia",$.Australia,"61",0],["Austria (\xd6sterreich)",$.Austria,"43"],["Azerbaijan (Az\u0259rbaycan)",$.Azerbaijan,"994"],["Bahamas","bs","1",1,["242"]],["Bahrain (\u202b\u0627\u0644\u0628\u062d\u0631\u064a\u0646\u202c\u200e)",$.Bahrain,"973"],["Bangladesh (\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",$.Bangladesh,"880"],["Barbados","bb","1",1,["246"]],["Belarus (\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u044c)",$.Belarus,"375"],["Belgium (Belgi\xeb)",$.Belgium,"32"],["Belize",$.Belize,"501"],["Benin (B\xe9nin)",$.Benin,"229"],["Bermuda","bm","1",1,["441"]],["Bhutan (\u0f60\u0f56\u0fb2\u0f74\u0f42)",$.Bhutan,"975"],["Bolivia",$.Bolivia,"591"],["Bosnia and Herzegovina (\u0411\u043e\u0441\u043d\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043e\u0432\u0438\u043d\u0430)",$.BosniaAndHerzegovina,"387"],["Botswana",$.Botswana,"267"],["Brazil (Brasil)",$.Brazil,"55"],["British Indian Ocean Territory",$.BritishIndianOceanTerritory,"246"],["British Virgin Islands","vg","1",1,["284"]],["Brunei",$.Brunei,"673"],["Bulgaria (\u0411\u044a\u043b\u0433\u0430\u0440\u0438\u044f)",$.Bulgaria,"359"],["Burkina Faso",$.BurkinaFaso,"226"],["Burundi (Uburundi)",$.Burundi,"257"],["Cambodia (\u1780\u1798\u17d2\u1796\u17bb\u1787\u17b6)",$.Cambodia,"855"],["Cameroon (Cameroun)",$.Cameroon,"237"],["Canada",$.Canada,"1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)",$.CapeVerde,"238"],["Caribbean Netherlands",$.CaribbeanNetherlands,"599",1],["Cayman Islands","ky","1",1,["345"]],["Central African Republic (R\xe9publique centrafricaine)",$.CentralAfricanRepublic,"236"],["Chad (Tchad)",$.Chad,"235"],["Chile",$.Chile,"56"],["China (\u4e2d\u56fd)",$.China,"86"],["Christmas Island",$.ChristmasIsland,"61",2],["Cocos (Keeling) Islands",$.Cocos,"61",1],["Colombia",$.Colombia,"57"],["Comoros (\u202b\u062c\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202c\u200e)",$.Comoros,"269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)",$.CongoDRCJamhuriYaKidemokrasiaYaKongo,"243"],["Congo (Republic) (Congo-Brazzaville)",$.CongoRepublicCongoBrazzaville,"242"],["Cook Islands",$.CookIslands,"682"],["Costa Rica",$.CostaRica,"506"],["C\xf4te d\u2019Ivoire",$.C\u00f4teDIvoire,"225"],["Croatia (Hrvatska)",$.Croatia,"385"],["Cuba",$.Cuba,"53"],["Cura\xe7ao",$.Cura\u00e7ao,"599",0],["Cyprus (\u039a\u03cd\u03c0\u03c1\u03bf\u03c2)",$.Cyprus,"357"],["Czech Republic (\u010cesk\xe1 republika)",$.CzechRepublic,"420"],["Denmark (Danmark)",$.Denmark,"45"],["Djibouti",$.Djibouti,"253"],["Dominica",$.Dominica,"1767"],["Dominican Republic (Rep\xfablica Dominicana)",$.DominicanRepublic,"1",2,["809","829","849"]],["Ecuador",$.Ecuador,"593"],["Egypt (\u202b\u0645\u0635\u0631\u202c\u200e)",$.Egypt,"20"],["El Salvador",$.ElSalvador,"503"],["Equatorial Guinea (Guinea Ecuatorial)",$.EquatorialGuinea,"240"],["Eritrea",$.Eritrea,"291"],["Estonia (Eesti)",$.Estonia,"372"],["Ethiopia",$.Ethiopia,"251"],["Falkland Islands (Islas Malvinas)",$.FalklandIslands,"500"],["Faroe Islands (F\xf8royar)",$.FaroeIslands,"298"],["Fiji",$.Fiji,"679"],["Finland (Suomi)",$.Finland,"358",0],["France",$.France,"33"],["French Guiana (Guyane fran\xe7aise)",$.FrenchGuiana,"594"],["French Polynesia (Polyn\xe9sie fran\xe7aise)",$.FrenchPolynesia,"689"],["Gabon",$.Gabon,"241"],["Gambia",$.Gambia,"220"],["Georgia (\u10e1\u10d0\u10e5\u10d0\u10e0\u10d7\u10d5\u10d4\u10da\u10dd)",$.Georgia,"995"],["Germany (Deutschland)",$.Germany,"49"],["Ghana (Gaana)",$.Ghana,"233"],["Gibraltar",$.Gibraltar,"350"],["Greece (\u0395\u03bb\u03bb\u03ac\u03b4\u03b1)",$.Greece,"30"],["Greenland (Kalaallit Nunaat)",$.Greenland,"299"],["Grenada",$.Grenada,"1473"],["Guadeloupe",$.Guadeloupe,"590",0],["Guam","gu","1",1,["671"]],["Guatemala",$.Guatemala,"502"],["Guernsey",$.Guernsey,"44",1,[1481]],["Guinea (Guin\xe9e)",$.Guinea,"224"],["Guinea-Bissau (Guin\xe9 Bissau)",$.GuineaBissau,"245"],["Guyana",$.Guyana,"592"],["Haiti",$.Haiti,"509"],["Honduras",$.Honduras,"504"],["Hong Kong (\u9999\u6e2f)",$.HongKong,"852"],["Hungary (Magyarorsz\xe1g)",$.Hungary,"36"],["Iceland (\xcdsland)",$.Iceland,"354"],["India (\u092d\u093e\u0930\u0924)",$.India,"91"],["Indonesia",$.Indonesia,"62"],["Iran (\u202b\u0627\u06cc\u0631\u0627\u0646\u202c\u200e)",$.Iran,"98"],["Iraq (\u202b\u0627\u0644\u0639\u0631\u0627\u0642\u202c\u200e)",$.Iraq,"964"],["Ireland",$.Ireland,"353"],["Isle of Man",$.IsleOfMan,"44",2,[1624]],["Israel (\u202b\u05d9\u05e9\u05e8\u05d0\u05dc\u202c\u200e)",$.Israel,"972"],["Italy (Italia)",$.Italy,"39",0],["Jamaica","jm","1",1,["876"]],["Japan (\u65e5\u672c)",$.Japan,"81"],["Jersey",$.Jersey,"44",3,[1534]],["Jordan (\u202b\u0627\u0644\u0623\u0631\u062f\u0646\u202c\u200e)",$.Jordan,"962"],["Kazakhstan (\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d)",$.Kazakhstan,"7",1],["Kenya",$.Kenya,"254"],["Kiribati",$.Kiribati,"686"],["Kosovo",$.Kosovo,"383"],["Kuwait (\u202b\u0627\u0644\u0643\u0648\u064a\u062a\u202c\u200e)",$.Kuwait,"965"],["Kyrgyzstan (\u041a\u044b\u0440\u0433\u044b\u0437\u0441\u0442\u0430\u043d)",$.Kyrgyzstan,"996"],["Laos (\u0ea5\u0eb2\u0ea7)",$.Laos,"856"],["Latvia (Latvija)",$.Latvia,"371"],["Lebanon (\u202b\u0644\u0628\u0646\u0627\u0646\u202c\u200e)",$.Lebanon,"961"],["Lesotho",$.Lesotho,"266"],["Liberia",$.Liberia,"231"],["Libya (\u202b\u0644\u064a\u0628\u064a\u0627\u202c\u200e)",$.Libya,"218"],["Liechtenstein",$.Liechtenstein,"423"],["Lithuania (Lietuva)",$.Lithuania,"370"],["Luxembourg",$.Luxembourg,"352"],["Macau (\u6fb3\u9580)",$.Macau,"853"],["Macedonia (FYROM) (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0438\u0458\u0430)",$.Macedonia,"389"],["Madagascar (Madagasikara)",$.Madagascar,"261"],["Malawi",$.Malawi,"265"],["Malaysia",$.Malaysia,"60"],["Maldives",$.Maldives,"960"],["Mali",$.Mali,"223"],["Malta",$.Malta,"356"],["Marshall Islands",$.MarshallIslands,"692"],["Martinique",$.Martinique,"596"],["Mauritania (\u202b\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627\u202c\u200e)",$.Mauritania,"222"],["Mauritius (Moris)",$.Mauritius,"230"],["Mayotte",$.Mayotte,"262",1],["Mexico (M\xe9xico)",$.Mexico,"52"],["Micronesia",$.Micronesia,"691"],["Moldova (Republica Moldova)",$.Moldova,"373"],["Monaco",$.Monaco,"377"],["Mongolia (\u041c\u043e\u043d\u0433\u043e\u043b)",$.Mongolia,"976"],["Montenegro (Crna Gora)",$.Montenegro,"382"],["Montserrat","ms","1",1,["664"]],["Morocco (\u202b\u0627\u0644\u0645\u063a\u0631\u0628\u202c\u200e)",$.Morocco,"212",0],["Mozambique (Mo\xe7ambique)",$.Mozambique,"258"],["Myanmar (Burma) (\u1019\u103c\u1014\u103a\u1019\u102c)",$.Myanmar,"95"],["Namibia (Namibi\xeb)",$.Namibia,"264"],["Nauru",$.Nauru,"674"],["Nepal (\u0928\u0947\u092a\u093e\u0932)",$.Nepal,"977"],["Netherlands (Nederland)",$.Netherlands,"31"],["New Caledonia (Nouvelle-Cal\xe9donie)",$.NewCaledonia,"687"],["New Zealand",$.NewZealand,"64"],["Nicaragua",$.Nicaragua,"505"],["Niger (Nijar)",$.Niger,"227"],["Nigeria",$.Nigeria,"234"],["Niue",$.Niue,"683"],["Norfolk Island",$.NorfolkIsland,"672"],["North Korea (\uc870\uc120 \ubbfc\uc8fc\uc8fc\uc758 \uc778\ubbfc \uacf5\ud654\uad6d)",$.NorthKorea,"850"],["Northern Mariana Islands",$.NorthernMarianaIslands,"1670"],["Norway (Norge)",$.Norway,"47",0],["Oman (\u202b\u0639\u064f\u0645\u0627\u0646\u202c\u200e)",$.Oman,"968"],["Pakistan (\u202b\u067e\u0627\u06a9\u0633\u062a\u0627\u0646\u202c\u200e)",$.Pakistan,"92"],["Palau",$.Palau,"680"],["Palestine (\u202b\u0641\u0644\u0633\u0637\u064a\u0646\u202c\u200e)",$.Palestine,"970"],["Panama (Panam\xe1)",$.Panama,"507"],["Papua New Guinea",$.PapuaNewGuinea,"675"],["Paraguay",$.Paraguay,"595"],["Peru (Per\xfa)",$.Peru,"51"],["Philippines",$.Philippines,"63"],["Poland (Polska)",$.Poland,"48"],["Portugal",$.Portugal,"351"],["Puerto Rico",$.PuertoRico,"1",3,["787","939"]],["Qatar (\u202b\u0642\u0637\u0631\u202c\u200e)",$.Qatar,"974"],["R\xe9union (La R\xe9union)",$.R\u00e9union,"262",0],["Romania (Rom\xe2nia)",$.Romania,"40"],["Russia (\u0420\u043e\u0441\u0441\u0438\u044f)",$.Russia,"7",0],["Rwanda",$.Rwanda,"250"],["Saint Barth\xe9lemy (Saint-Barth\xe9lemy)",$.SaintBarth\u00e9lemy,"590",1],["Saint Helena",$.SaintHelena,"290"],["Saint Kitts and Nevis",$.SaintKittsAndNevis,"1869"],["Saint Lucia","lc","1",1,["758"]],["Saint Martin (Saint-Martin (partie fran\xe7aise))",$.SaintMartin,"590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)",$.SaintPierreAndMiquelon,"508"],["Saint Vincent and the Grenadines","vc","1",1,["784"]],["Samoa",$.Samoa,"685"],["San Marino",$.SanMarino,"378"],["S\xe3o Tom\xe9 and Pr\xedncipe (S\xe3o Tom\xe9 e Pr\xedncipe)",$.S\u00e3oTom\u00e9AndPr\u00edncipe,"239"],["Saudi Arabia (\u202b\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629\u202c\u200e)",$.SaudiArabia,"966"],["Senegal (S\xe9n\xe9gal)",$.Senegal,"221"],["Serbia (\u0421\u0440\u0431\u0438\u0458\u0430)",$.Serbia,"381"],["Seychelles",$.Seychelles,"248"],["Sierra Leone",$.SierraLeone,"232"],["Singapore",$.Singapore,"65"],["Sint Maarten","sx","1",1,["721"]],["Slovakia (Slovensko)",$.Slovakia,"421"],["Slovenia (Slovenija)",$.Slovenia,"386"],["Solomon Islands",$.SolomonIslands,"677"],["Somalia (Soomaaliya)",$.Somalia,"252"],["South Africa",$.SouthAfrica,"27"],["South Korea (\ub300\ud55c\ubbfc\uad6d)",$.SouthKorea,"82"],["South Sudan (\u202b\u062c\u0646\u0648\u0628 \u0627\u0644\u0633\u0648\u062f\u0627\u0646\u202c\u200e)",$.SouthSudan,"211"],["Spain (Espa\xf1a)",$.Spain,"34"],["Sri Lanka (\u0dc1\u0dca\u200d\u0dbb\u0dd3 \u0dbd\u0d82\u0d9a\u0dcf\u0dc0)",$.SriLanka,"94"],["Sudan (\u202b\u0627\u0644\u0633\u0648\u062f\u0627\u0646\u202c\u200e)",$.Sudan,"249"],["Suriname",$.Suriname,"597"],["Svalbard and Jan Mayen",$.SvalbardAndJanMayen,"47",1],["Swaziland",$.Swaziland,"268"],["Sweden (Sverige)",$.Sweden,"46"],["Switzerland (Schweiz)",$.Switzerland,"41"],["Syria (\u202b\u0633\u0648\u0631\u064a\u0627\u202c\u200e)",$.Syria,"963"],["Taiwan (\u53f0\u7063)",$.Taiwan,"886"],["Tajikistan",$.Tajikistan,"992"],["Tanzania",$.Tanzania,"255"],["Thailand (\u0e44\u0e17\u0e22)",$.Thailand,"66"],["Timor-Leste",$.TimorLeste,"670"],["Togo",$.Togo,"228"],["Tokelau",$.Tokelau,"690"],["Tonga",$.Tonga,"676"],["Trinidad and Tobago","tt","1",1,["868"]],["Tunisia (\u202b\u062a\u0648\u0646\u0633\u202c\u200e)",$.Tunisia,"216"],["Turkey (T\xfcrkiye)",$.Turkey,"90"],["Turkmenistan",$.Turkmenistan,"993"],["Turks and Caicos Islands",$.TurksAndCaicosIslands,"1649"],["Tuvalu",$.Tuvalu,"688"],["U.S. Virgin Islands","vi","1",1,["340"]],["Uganda",$.Uganda,"256"],["Ukraine (\u0423\u043a\u0440\u0430\u0457\u043d\u0430)",$.Ukraine,"380"],["United Arab Emirates (\u202b\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062a \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0645\u062a\u062d\u062f\u0629\u202c\u200e)",$.UnitedArabEmirates,"971"],["United Kingdom",$.UnitedKingdom,"44",0],["United States",$.UnitedStates,"1",0],["Uruguay",$.Uruguay,"598"],["Uzbekistan (O\u02bbzbekiston)",$.Uzbekistan,"998"],["Vanuatu",$.Vanuatu,"678"],["Vatican City (Citt\xe0 del Vaticano)",$.VaticanCity,"39",1],["Venezuela",$.Venezuela,"58"],["Vietnam (Vi\u1ec7t Nam)",$.Vietnam,"84"],["Wallis and Futuna",$.WallisAndFutuna,"681"],["Western Sahara (\u202b\u0627\u0644\u0635\u062d\u0631\u0627\u0621 \u0627\u0644\u063a\u0631\u0628\u064a\u0629\u202c\u200e)",$.WesternSahara,"212",1],["Yemen (\u202b\u0627\u0644\u064a\u0645\u0646\u202c\u200e)",$.Yemen,"967"],["Zambia",$.Zambia,"260"],["Zimbabwe",$.Zimbabwe,"263"],["\xc5land Islands",$.\u00c5landIslands,"358",1]]}}return i.\u0275fac=function(l){return new(l||i)},i.\u0275prov=s.Yz7({token:i,factory:i.\u0275fac}),i})();var w=(()=>{return(i=w||(w={})).DialCode="dialCode",i.Iso2="iso2",i.Name="name",i.All="all",w;var i})();const Lt=i=>{if(!i.value)return;const p=i.nativeElement,l=p?p.querySelector('input[type="tel"]'):void 0;if(l){const _=l.getAttribute("validation");if("true"===_){const y=i.errors&&!0===i.errors.required,S={validatePhoneNumber:{valid:!1}};let T;l.setCustomValidity("Invalid field.");try{T=R.PhoneNumberUtil.getInstance().parse(i.value.number,i.value.countryCode)}catch{if(y)return S;l.setCustomValidity("")}if(i.value){if(!T)return S;if(!R.PhoneNumberUtil.getInstance().isValidNumberForRegion(T,i.value.countryCode))return S;l.setCustomValidity("")}}else"false"===_&&(l.setCustomValidity(""),i.clearValidators())}};var K=(()=>{return(i=K||(K={})).International="INTERNATIONAL",i.National="NATIONAL",K;var i})();let q=(()=>{class i{constructor(l,h){this.controlDir=l,this.host=h}ngOnInit(){this.controlDir.control&&(this.controlDir.control.nativeElement=this.host.nativeElement)}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(u.a5),s.Y36(s.SBq))},i.\u0275dir=s.lG2({type:i,selectors:[["","ngModel",""],["","formControl",""],["","formControlName",""]]}),i})(),Dt=(()=>{class i{constructor(l){this.countryCodeData=l,this.value="",this.preferredCountries=[],this.enablePlaceholder=!0,this.numberFormat=K.International,this.cssClass="form-control",this.onlyCountries=[],this.enableAutoCountrySelect=!0,this.searchCountryFlag=!1,this.searchCountryField=[w.All],this.searchCountryPlaceholder="Search Country",this.selectFirstCountry=!0,this.phoneValidation=!0,this.inputId="phone",this.separateDialCode=!1,this.countryChange=new s.vpe,this.selectedCountry={areaCodes:void 0,dialCode:"",htmlId:"",flagClass:"",iso2:"",name:"",placeHolder:"",priority:0},this.phoneNumber="",this.allCountries=[],this.preferredCountriesInDropDown=[],this.phoneUtil=R.PhoneNumberUtil.getInstance(),this.disabled=!1,this.errors=["Phone number is required."],this.countrySearchText="",this.onTouched=()=>{},this.propagateChange=h=>{},function Be(i){k=i}("bs4")}ngOnInit(){this.init()}ngOnChanges(l){const h=l.selectedCountryISO;this.allCountries&&h&&h.currentValue!==h.previousValue&&this.updateSelectedCountry(),l.preferredCountries&&this.updatePreferredCountries(),this.checkSeparateDialCodeStyle()}init(){this.fetchCountryData(),this.preferredCountries.length&&this.updatePreferredCountries(),this.onlyCountries.length&&(this.allCountries=this.allCountries.filter(l=>this.onlyCountries.includes(l.iso2))),this.selectFirstCountry&&this.setSelectedCountry(this.preferredCountriesInDropDown.length?this.preferredCountriesInDropDown[0]:this.allCountries[0]),this.updateSelectedCountry(),this.checkSeparateDialCodeStyle()}setSelectedCountry(l){this.selectedCountry=l,this.countryChange.emit(l)}searchCountry(){if(!this.countrySearchText)return void this.countryList.nativeElement.querySelector(".iti__country-list li").scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"});const l=this.countrySearchText.toLowerCase(),h=this.allCountries.filter(_=>{if(this.searchCountryField.indexOf(w.All)>-1){if(_.iso2.toLowerCase().startsWith(l)||_.name.toLowerCase().startsWith(l)||_.dialCode.startsWith(this.countrySearchText))return _}else if(this.searchCountryField.indexOf(w.Iso2)>-1&&_.iso2.toLowerCase().startsWith(l)||this.searchCountryField.indexOf(w.Name)>-1&&_.name.toLowerCase().startsWith(l)||this.searchCountryField.indexOf(w.DialCode)>-1&&_.dialCode.startsWith(this.countrySearchText))return _});if(h.length>0){const _=this.countryList.nativeElement.querySelector("#"+h[0].htmlId);_&&_.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}this.checkSeparateDialCodeStyle()}onPhoneNumberChange(){let l;if(this.phoneNumber&&"object"==typeof this.phoneNumber){const _=this.phoneNumber;this.phoneNumber=_.number,l=_.countryCode}this.value=this.phoneNumber,l=l||this.selectedCountry.iso2;const h=this.getParsedNumber(this.phoneNumber,l);if(this.enableAutoCountrySelect&&(l=h&&h.getCountryCode()?this.getCountryIsoCode(h.getCountryCode(),h):this.selectedCountry.iso2,l&&l!==this.selectedCountry.iso2)){const _=this.allCountries.sort((y,S)=>y.priority-S.priority).find(y=>y.iso2===l);_&&(this.selectedCountry=_)}if(l=l||this.selectedCountry.iso2,this.checkSeparateDialCodeStyle(),this.value){const _=h?this.phoneUtil.format(h,R.PhoneNumberFormat.INTERNATIONAL):"";this.separateDialCode&&_&&(this.value=this.removeDialCode(_)),this.propagateChange({number:this.value,internationalNumber:_,nationalNumber:h?this.phoneUtil.format(h,R.PhoneNumberFormat.NATIONAL):"",e164Number:h?this.phoneUtil.format(h,R.PhoneNumberFormat.E164):"",countryCode:l.toUpperCase(),dialCode:"+"+this.selectedCountry.dialCode})}else this.propagateChange(null)}onCountrySelect(l,h){if(this.setSelectedCountry(l),this.checkSeparateDialCodeStyle(),this.phoneNumber&&this.phoneNumber.length>0){this.value=this.phoneNumber;const _=this.getParsedNumber(this.phoneNumber,this.selectedCountry.iso2),y=_?this.phoneUtil.format(_,R.PhoneNumberFormat.INTERNATIONAL):"";this.separateDialCode&&y&&(this.value=this.removeDialCode(y)),this.propagateChange({number:this.value,internationalNumber:y,nationalNumber:_?this.phoneUtil.format(_,R.PhoneNumberFormat.NATIONAL):"",e164Number:_?this.phoneUtil.format(_,R.PhoneNumberFormat.E164):"",countryCode:this.selectedCountry.iso2.toUpperCase(),dialCode:"+"+this.selectedCountry.dialCode})}else this.propagateChange(null);h.focus()}onInputKeyPress(l){!/[0-9\+\-\(\)\ ]/.test(l.key)&&(!l.ctrlKey||!/[axcv]/.test(l.key))&&!["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Home","End","Insert","Delete","Backspace"].includes(l.key)&&l.preventDefault()}registerOnChange(l){this.propagateChange=l}registerOnTouched(l){this.onTouched=l}setDisabledState(l){this.disabled=l}writeValue(l){void 0===l&&this.init(),this.phoneNumber=l,setTimeout(()=>{this.onPhoneNumberChange()},1)}resolvePlaceholder(){let l="";return this.customPlaceholder?l=this.customPlaceholder:this.selectedCountry.placeHolder&&(l=this.selectedCountry.placeHolder,this.separateDialCode&&(l=this.removeDialCode(l))),l}getParsedNumber(l,h){let _;try{_=this.phoneUtil.parse(l,h.toUpperCase())}catch{}return _}checkSeparateDialCodeStyle(){this.separateDialCodeClass=this.separateDialCode&&this.selectedCountry?"separate-dial-code iti-sdc-"+(this.selectedCountry.dialCode.length+1):""}removeDialCode(l){const h=this.getParsedNumber(l,this.selectedCountry.iso2);return(l=this.phoneUtil.format(h,R.PhoneNumberFormat[this.numberFormat])).startsWith("+")&&this.separateDialCode&&(l=l.substr(l.indexOf(" ")+1)),l}getCountryIsoCode(l,h){const _=h.values_[2].toString(),y=this.allCountries.filter(C=>C.dialCode===l.toString()),S=y.find(C=>void 0===C.areaCodes),T=y.filter(C=>void 0!==C.areaCodes);let E=S?S.iso2:void 0;return T.forEach(C=>{C.areaCodes.forEach(A=>{_.startsWith(A)&&(E=C.iso2)})}),E}getPhoneNumberPlaceHolder(l){try{return this.phoneUtil.format(this.phoneUtil.getExampleNumber(l),R.PhoneNumberFormat[this.numberFormat])}catch(h){return h}}fetchCountryData(){this.allCountries=[],this.countryCodeData.allCountries.forEach(l=>{const h={name:l[0].toString(),iso2:l[1].toString(),dialCode:l[2].toString(),priority:+l[3]||0,areaCodes:l[4]||void 0,htmlId:`iti-0__item-${l[1].toString()}`,flagClass:`iti__${l[1].toString().toLocaleLowerCase()}`,placeHolder:""};this.enablePlaceholder&&(h.placeHolder=this.getPhoneNumberPlaceHolder(h.iso2.toUpperCase())),this.allCountries.push(h)})}updatePreferredCountries(){this.preferredCountries.length&&(this.preferredCountriesInDropDown=[],this.preferredCountries.forEach(l=>{const h=this.allCountries.filter(_=>_.iso2===l);this.preferredCountriesInDropDown.push(h[0])}))}updateSelectedCountry(){this.selectedCountryISO&&(this.selectedCountry=this.allCountries.find(l=>l.iso2.toLowerCase()===this.selectedCountryISO.toLowerCase()),this.selectedCountry&&(this.phoneNumber?this.onPhoneNumberChange():this.propagateChange(null)))}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(De))},i.\u0275cmp=s.Xpm({type:i,selectors:[["ngx-intl-tel-input"]],viewQuery:function(l,h){if(1&l&&s.Gf(Tt,5),2&l){let _;s.iGM(_=s.CRH())&&(h.countryList=_.first)}},inputs:{value:"value",preferredCountries:"preferredCountries",enablePlaceholder:"enablePlaceholder",customPlaceholder:"customPlaceholder",numberFormat:"numberFormat",cssClass:"cssClass",onlyCountries:"onlyCountries",enableAutoCountrySelect:"enableAutoCountrySelect",searchCountryFlag:"searchCountryFlag",searchCountryField:"searchCountryField",searchCountryPlaceholder:"searchCountryPlaceholder",maxLength:"maxLength",selectFirstCountry:"selectFirstCountry",selectedCountryISO:"selectedCountryISO",phoneValidation:"phoneValidation",inputId:"inputId",separateDialCode:"separateDialCode"},outputs:{countryChange:"countryChange"},features:[s._Bn([De,{provide:u.JU,useExisting:(0,s.Gpc)(()=>i),multi:!0},{provide:u.Cf,useValue:Lt,multi:!0}]),s.TTD],decls:9,vars:14,consts:[[1,"iti","iti--allow-dropdown",3,"ngClass"],["dropdown","",1,"iti__flag-container",3,"ngClass","isDisabled"],["dropdownToggle","",1,"iti__selected-flag","dropdown-toggle"],[1,"iti__flag",3,"ngClass"],["class","selected-dial-code",4,"ngIf"],[1,"iti__arrow"],["class","dropdown-menu country-dropdown",4,"dropdownMenu"],["type","tel","autocomplete","off",3,"id","ngClass","ngModel","disabled","placeholder","blur","keypress","ngModelChange"],["focusable",""],[1,"selected-dial-code"],[1,"dropdown-menu","country-dropdown"],["class","search-container",4,"ngIf"],[1,"iti__country-list"],["countryList",""],["class","iti__country iti__preferred",3,"id","click",4,"ngFor","ngForOf"],["class","iti__divider",4,"ngIf"],["class","iti__country iti__standard",3,"id","click",4,"ngFor","ngForOf"],[1,"search-container"],["id","country-search-box","autofocus","",3,"ngModel","placeholder","ngModelChange","keyup","click"],[1,"iti__country","iti__preferred",3,"id","click"],[1,"iti__flag-box"],[1,"iti__country-name"],[1,"iti__dial-code"],[1,"iti__divider"],[1,"iti__country","iti__standard",3,"id","click"]],template:function(l,h){1&l&&(s.TgZ(0,"div",0)(1,"div",1)(2,"div",2),s._UZ(3,"div",3),s.YNc(4,Et,2,1,"div",4),s._UZ(5,"div",5),s.qZA(),s.YNc(6,Mt,7,4,"div",6),s.qZA(),s.TgZ(7,"input",7,8),s.NdJ("blur",function(){return h.onTouched()})("keypress",function(y){return h.onInputKeyPress(y)})("ngModelChange",function(y){return h.phoneNumber=y})("ngModelChange",function(){return h.onPhoneNumberChange()}),s.qZA()()),2&l&&(s.Q6J("ngClass",h.separateDialCodeClass),s.xp6(1),s.Q6J("ngClass",s.VKq(12,Ot,h.disabled))("isDisabled",h.disabled),s.xp6(2),s.Q6J("ngClass",(null==h.selectedCountry?null:h.selectedCountry.flagClass)||""),s.xp6(1),s.Q6J("ngIf",h.separateDialCode),s.xp6(3),s.Q6J("id",h.inputId)("ngClass",h.cssClass)("ngModel",h.phoneNumber)("disabled",h.disabled)("placeholder",h.resolvePlaceholder()),s.uIk("maxLength",h.maxLength)("validation",h.phoneValidation))},dependencies:[r.mk,ge,yt,r.O5,Nt,u.Fj,u.JJ,u.On,q,r.sg],styles:['.dropup[_ngcontent-%COMP%], .dropright[_ngcontent-%COMP%], .dropdown[_ngcontent-%COMP%], .dropleft[_ngcontent-%COMP%]{position:relative}.dropdown-toggle[_ngcontent-%COMP%]{white-space:nowrap}.dropdown-toggle[_ngcontent-%COMP%]:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle[_ngcontent-%COMP%]:empty:after{margin-left:0}.dropdown-menu[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left[_ngcontent-%COMP%]{right:auto;left:0}.dropdown-menu-right[_ngcontent-%COMP%]{right:0;left:auto}@media (min-width: 576px){.dropdown-menu-sm-left[_ngcontent-%COMP%]{right:auto;left:0}.dropdown-menu-sm-right[_ngcontent-%COMP%]{right:0;left:auto}}@media (min-width: 768px){.dropdown-menu-md-left[_ngcontent-%COMP%]{right:auto;left:0}.dropdown-menu-md-right[_ngcontent-%COMP%]{right:0;left:auto}}@media (min-width: 992px){.dropdown-menu-lg-left[_ngcontent-%COMP%]{right:auto;left:0}.dropdown-menu-lg-right[_ngcontent-%COMP%]{right:0;left:auto}}@media (min-width: 1200px){.dropdown-menu-xl-left[_ngcontent-%COMP%]{right:auto;left:0}.dropdown-menu-xl-right[_ngcontent-%COMP%]{right:0;left:auto}}.dropup[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:empty:after{margin-left:0}.dropright[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:empty:after{margin-left:0}.dropright[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:after{vertical-align:0}.dropleft[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:after{display:none}.dropleft[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:empty:after{margin-left:0}.dropleft[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:before{vertical-align:0}.dropdown-menu[x-placement^=top][_ngcontent-%COMP%], .dropdown-menu[x-placement^=right][_ngcontent-%COMP%], .dropdown-menu[x-placement^=bottom][_ngcontent-%COMP%], .dropdown-menu[x-placement^=left][_ngcontent-%COMP%]{right:auto;bottom:auto}.dropdown-divider[_ngcontent-%COMP%]{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item[_ngcontent-%COMP%]{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item[_ngcontent-%COMP%]:hover, .dropdown-item[_ngcontent-%COMP%]:focus{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active[_ngcontent-%COMP%], .dropdown-item[_ngcontent-%COMP%]:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled[_ngcontent-%COMP%], .dropdown-item[_ngcontent-%COMP%]:disabled{color:#6c757d;pointer-events:none;background-color:transparent}.dropdown-menu.show[_ngcontent-%COMP%]{display:block}.dropdown-header[_ngcontent-%COMP%]{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text[_ngcontent-%COMP%]{display:block;padding:.25rem 1.5rem;color:#212529}',"li.iti__country[_ngcontent-%COMP%]:hover{background-color:#0000000d}.iti__selected-flag.dropdown-toggle[_ngcontent-%COMP%]:after{content:none}.iti__flag-container.disabled[_ngcontent-%COMP%]{cursor:default!important}.iti.iti--allow-dropdown[_ngcontent-%COMP%] .flag-container.disabled[_ngcontent-%COMP%]:hover .iti__selected-flag[_ngcontent-%COMP%]{background:none}.country-dropdown[_ngcontent-%COMP%]{border:1px solid #ccc;width:-moz-fit-content;width:fit-content;padding:1px;border-collapse:collapse}.search-container[_ngcontent-%COMP%]{position:relative}.search-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;border:none;border-bottom:1px solid #ccc;padding-left:10px}.search-icon[_ngcontent-%COMP%]{position:absolute;z-index:2;width:25px;margin:1px 10px}.iti__country-list[_ngcontent-%COMP%]{position:relative;border:none}.iti[_ngcontent-%COMP%] input#country-search-box[_ngcontent-%COMP%]{padding-left:6px}.iti[_ngcontent-%COMP%] .selected-dial-code[_ngcontent-%COMP%]{margin-left:6px}.iti.separate-dial-code[_ngcontent-%COMP%] .iti__selected-flag[_ngcontent-%COMP%], .iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2[_ngcontent-%COMP%] .iti__selected-flag[_ngcontent-%COMP%], .iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3[_ngcontent-%COMP%] .iti__selected-flag[_ngcontent-%COMP%], .iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4[_ngcontent-%COMP%] .iti__selected-flag[_ngcontent-%COMP%]{width:93px}.iti.separate-dial-code[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:98px}"]}),i})();const vt=St.forRoot();let Ut=(()=>{class i{}return i.\u0275fac=function(l){return new(l||i)},i.\u0275mod=s.oAB({type:i}),i.\u0275inj=s.cJS({imports:[[r.ez,u.u5,u.UX,vt]]}),i})();var ue=n(6188);function It(i,p){1&i&&(s.TgZ(0,"p",11),s._uU(1),s.ALo(2,"translate"),s.qZA()),2&i&&(s.xp6(1),s.hij(" ",s.lcZ(2,1,"Email is invalid")," "))}function Ft(i,p){if(1&i&&(s.TgZ(0,"div",11),s._uU(1),s.qZA()),2&i){const l=s.oxw();s.xp6(1),s.Oqu(l.firebaseErrorMessage)}}function wt(i,p){1&i&&(s.TgZ(0,"div",12)(1,"span",13),s._uU(2),s.ALo(3,"translate"),s.qZA()()),2&i&&(s.xp6(2),s.Oqu(s.lcZ(3,1,"A link has been sent to your email address!")))}let xt=(()=>{class i{constructor(l,h,_){this.authService=l,this.angularFireAuth=h,this.formBuilder=_,this.mailSent=!1,this.forgotPasswordForm=this.formBuilder.group({email:["",[u.kI.required,u.kI.email]]})}ngOnInit(){this.angularFireAuth.authState.subscribe(l=>{l&&this.forgotPasswordForm.patchValue({email:l.email})})}retrievePassword(){var l=this;return(0,m.Z)(function*(){try{yield l.authService.resetPassword(l.forgotPasswordForm.value.email),l.mailSent=!0}catch(h){(0,N.kY)(h)&&(l.firebaseErrorMessage=h.message)}})()}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(P.e),s.Y36(L.zQ),s.Y36(u.QS))},i.\u0275cmp=s.Xpm({type:i,selectors:[["app-forgot-password"]],decls:26,vars:23,consts:[["id","container"],[1,"form","facebook-style",3,"formGroup","ngSubmit"],[2,"opacity","0.7"],[2,"margin","35px 0"],["type","email","formControlName","email",1,"form-control",3,"placeholder"],["class","warning-message",4,"ngIf"],[2,"margin-top","15px"],[1,"btn","btn-info",3,"disabled"],["style","margin-top: 15px; text-align: center;",4,"ngIf"],[2,"text-align","center"],["routerLink","/auth/login"],[1,"warning-message"],[2,"margin-top","15px","text-align","center"],[1,"text-success"]],template:function(l,h){1&l&&(s.TgZ(0,"div",0)(1,"form",1),s.NdJ("ngSubmit",function(){return h.retrievePassword()}),s.TgZ(2,"h1"),s._uU(3),s.ALo(4,"translate"),s.qZA(),s.TgZ(5,"p",2),s._uU(6),s.ALo(7,"translate"),s.qZA(),s._UZ(8,"hr",3),s.TgZ(9,"div"),s._UZ(10,"input",4),s.ALo(11,"translate"),s.YNc(12,It,3,3,"p",5),s.qZA(),s.YNc(13,Ft,2,1,"div",5),s.TgZ(14,"div",6)(15,"button",7),s._uU(16),s.ALo(17,"translate"),s.qZA()(),s.YNc(18,wt,4,3,"div",8),s._UZ(19,"hr",3),s.TgZ(20,"div",9),s._uU(21),s.ALo(22,"translate"),s.TgZ(23,"a",10),s._uU(24),s.ALo(25,"translate"),s.qZA()()()()),2&l&&(s.xp6(1),s.Q6J("formGroup",h.forgotPasswordForm),s.xp6(2),s.Oqu(s.lcZ(4,11,"Find your account")),s.xp6(3),s.Oqu(s.lcZ(7,13,"Enter your e-mail address so we can send you a reset password link.")),s.xp6(4),s.s9C("placeholder",s.lcZ(11,15,"Email")),s.xp6(2),s.Q6J("ngIf",h.forgotPasswordForm.controls.email.touched&&h.forgotPasswordForm.controls.email.invalid),s.xp6(1),s.Q6J("ngIf",h.firebaseErrorMessage),s.xp6(2),s.Q6J("disabled",h.mailSent||h.forgotPasswordForm.invalid),s.xp6(1),s.hij(" ",s.lcZ(17,17,"Reset my password")," "),s.xp6(2),s.Q6J("ngIf",h.mailSent),s.xp6(3),s.hij("",s.lcZ(22,19,"Go back to login?")," "),s.xp6(3),s.Oqu(s.lcZ(25,21,"Log In")))},dependencies:[r.O5,O.yS,u._Y,u.Fj,u.JJ,u.JL,u.sg,u.u,q,ue.X$],styles:["#container[_ngcontent-%COMP%]{min-height:100vh}.form[_ngcontent-%COMP%]{min-width:300px;max-width:550px;padding:15px;margin:15px auto}.warning-message[_ngcontent-%COMP%]{color:#fd335b;font-size:small;padding:0 5px;margin:11px 0;border-radius:3px}.btn[_ngcontent-%COMP%]{width:100%;margin-top:15px}.text-success[_ngcontent-%COMP%]{font-size:large}"]}),i})();function Vt(i,p){1&i&&(s.TgZ(0,"p",18),s._uU(1),s.ALo(2,"translate"),s.qZA()),2&i&&(s.xp6(1),s.Oqu(s.lcZ(2,1,"Email is invalid")))}function Bt(i,p){1&i&&(s.TgZ(0,"p",18),s._uU(1),s.ALo(2,"translate"),s.qZA()),2&i&&(s.xp6(1),s.Oqu(s.lcZ(2,1,"Password must contain at least 6 characters")))}function Gt(i,p){if(1&i&&(s.TgZ(0,"div",19)(1,"span"),s._uU(2),s.qZA()()),2&i){const l=s.oxw();s.xp6(2),s.Oqu(l.errorMessage)}}const ve=function(i){return{warning:i}};let Ht=(()=>{class i{constructor(l,h,_){this.router=l,this.formBuilder=h,this.authService=_,this.showPhoneTemplate=!1,this.loginForm=this.formBuilder.group({email:["",[u.kI.required,u.kI.email]],password:["",[u.kI.required,u.kI.pattern(/[0-9a-zA-Z]{6,}/)]]})}ngOnInit(){this.authService.getUser().subscribe(l=>{l&&this.router.navigate(["home"])})}onSubmitForm(){var l=this;return(0,m.Z)(function*(){const h=l.loginForm.controls.email.value,_=l.loginForm.controls.password.value;try{yield l.authService.logIn(h,_),l.router.navigate(["home"])}catch(y){(0,N.kY)(y)&&(l.errorMessage=y.message)}})()}loginWithGoogle(){var l=this;return(0,m.Z)(function*(){try{yield l.authService.signinWithGoogle()}catch(h){l.errorMessage=h}})()}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(O.F0),s.Y36(u.QS),s.Y36(P.e))},i.\u0275cmp=s.Xpm({type:i,selectors:[["app-login"]],decls:33,vars:29,consts:[[1,"form-container","facebook-style"],[2,"margin","15px","text-align","center","cursor","pointer","color","chocolate","border","1px solid chocolate","padding","11px",3,"click"],["routerLink","/auth/phone-auth",2,"margin","0 15px 15px 15px","text-align","center","cursor","pointer","color","teal","border","1px solid teal","padding","5px"],["autocomplete","off",1,"signup-form",3,"formGroup","ngSubmit"],[1,"form-section","email"],["for","email"],["type","email","formControlName","email",1,"form-control",3,"ngClass"],["class","warning-message",4,"ngIf"],[1,"form-section","password"],["for","password"],["type","password","formControlName","password",1,"form-control",3,"ngClass"],["class","error-message",4,"ngIf"],["type","submit",1,"btn","btn-success",3,"disabled"],[2,"text-align","center"],["routerLink","/auth/forgot-password",1,"link"],[1,"hr"],[2,"margin-top","25px","text-align","center"],["routerLink","/auth/signup",1,"link"],[1,"warning-message"],[1,"error-message"]],template:function(l,h){1&l&&(s.TgZ(0,"div",0)(1,"div",1),s.NdJ("click",function(){return h.loginWithGoogle()}),s._uU(2," Continue with Google "),s.qZA(),s.TgZ(3,"div",2),s._uU(4," continue with Phone Number "),s.qZA(),s.TgZ(5,"form",3),s.NdJ("ngSubmit",function(){return h.onSubmitForm()}),s.TgZ(6,"div",4)(7,"label",5),s._uU(8),s.ALo(9,"translate"),s.qZA(),s._UZ(10,"input",6),s.YNc(11,Vt,3,3,"p",7),s.qZA(),s.TgZ(12,"div",8)(13,"label",9),s._uU(14),s.ALo(15,"translate"),s.qZA(),s._UZ(16,"input",10),s.YNc(17,Bt,3,3,"p",7),s.qZA(),s.YNc(18,Gt,3,1,"div",11),s.TgZ(19,"button",12),s._uU(20),s.ALo(21,"translate"),s.qZA(),s.TgZ(22,"div",13)(23,"a",14),s._uU(24),s.ALo(25,"translate"),s.qZA()(),s._UZ(26,"hr",15),s.TgZ(27,"div",16),s._uU(28),s.ALo(29,"translate"),s.TgZ(30,"a",17),s._uU(31),s.ALo(32,"translate"),s.qZA()()()()),2&l&&(s.xp6(5),s.Q6J("formGroup",h.loginForm),s.xp6(3),s.Oqu(s.lcZ(9,13,"Email")),s.xp6(2),s.Q6J("ngClass",s.VKq(25,ve,h.loginForm.controls.email.invalid&&h.loginForm.controls.email.touched)),s.xp6(1),s.Q6J("ngIf",h.loginForm.controls.email.invalid&&h.loginForm.controls.email.touched),s.xp6(3),s.Oqu(s.lcZ(15,15,"Password")),s.xp6(2),s.Q6J("ngClass",s.VKq(27,ve,h.loginForm.controls.password.invalid&&h.loginForm.controls.password.touched)),s.xp6(1),s.Q6J("ngIf",h.loginForm.controls.password.invalid&&h.loginForm.controls.password.touched),s.xp6(1),s.Q6J("ngIf",h.errorMessage),s.xp6(1),s.Q6J("disabled",h.loginForm.invalid),s.xp6(1),s.Oqu(s.lcZ(21,17,"Log In")),s.xp6(4),s.hij("",s.lcZ(25,19,"Forgot Password"),"?"),s.xp6(4),s.hij(" ",s.lcZ(29,21,"You don not have an account")," "),s.xp6(3),s.Oqu(s.lcZ(32,23,"Sign Up")))},dependencies:[r.mk,r.O5,O.rH,O.yS,u._Y,u.Fj,u.JJ,u.JL,u.sg,u.u,q,ue.X$],styles:[".form-container[_ngcontent-%COMP%]{width:50%;margin:25px auto;padding:25px 15px}.form-section[_ngcontent-%COMP%]{margin-bottom:5px}.btn[_ngcontent-%COMP%]{width:100%;margin:15px 0}.link[_ngcontent-%COMP%]{text-decoration:none}.link[_ngcontent-%COMP%]:hover{text-decoration:underline}.warning-message[_ngcontent-%COMP%]{color:#fd335b;font-size:smaller;padding:0 5px;border-radius:3px}.warning[_ngcontent-%COMP%]{border:1px solid rgb(253,51,91)}.error-message[_ngcontent-%COMP%]{background-color:#ffd1da;color:#ff093a;font-size:small;padding:7px;border-radius:3px}@media only screen and (max-width: 800px){.form-container[_ngcontent-%COMP%]{width:90%}}@media only screen and (max-width: 500px){.form-container[_ngcontent-%COMP%]{width:95%}}"]}),i})();function jt(i,p){1&i&&(s.TgZ(0,"p",25),s._uU(1),s.ALo(2,"translate"),s.qZA()),2&i&&(s.xp6(1),s.Oqu(s.lcZ(2,1,"First Name is invalid")))}function kt(i,p){1&i&&(s.TgZ(0,"p",25),s._uU(1),s.ALo(2,"translate"),s.qZA()),2&i&&(s.xp6(1),s.Oqu(s.lcZ(2,1,"Last Name is invalid")))}function Yt(i,p){1&i&&(s.TgZ(0,"p",25),s._uU(1),s.ALo(2,"translate"),s.qZA()),2&i&&(s.xp6(1),s.Oqu(s.lcZ(2,1,"Email is invalid")))}function Zt(i,p){1&i&&(s.TgZ(0,"p",25),s._uU(1),s.ALo(2,"translate"),s.qZA()),2&i&&(s.xp6(1),s.Oqu(s.lcZ(2,1,"Phone Number must contain 10 digit numbers")))}function zt(i,p){1&i&&(s.TgZ(0,"p",25),s._uU(1),s.ALo(2,"translate"),s.qZA()),2&i&&(s.xp6(1),s.Oqu(s.lcZ(2,1,"Password must contain at least 6 characters")))}function Wt(i,p){if(1&i&&(s.TgZ(0,"div",26)(1,"span"),s._uU(2),s.qZA()()),2&i){const l=s.oxw();s.xp6(2),s.Oqu(l.errorMessage)}}const J=function(i){return{warning:i}};let Kt=(()=>{class i{constructor(l,h,_){this.formBuilder=l,this.authService=h,this.router=_,this.isFormSubmitted=!1,this.signupForm=this.formBuilder.group({firstName:["",[u.kI.required,u.kI.pattern(/.*\S.*/)]],lastName:["",[u.kI.required,u.kI.pattern(/.*\S.*/)]],email:["",[u.kI.required,u.kI.email]],phoneNumber:["",[u.kI.required,u.kI.pattern(/^(\+213|0)?[0-9]{9}$/)]],password:["",[u.kI.required,u.kI.pattern(/[0-9a-zA-Z]{6,}/)]]})}ngOnInit(){this.authService.getUser().subscribe(l=>{l&&this.router.navigate(["home"])})}onSubmitForm(){var l=this;return(0,m.Z)(function*(){if(l.signupForm.invalid)return;let h=l.signupForm.controls.password.value,_=l.signupForm.value;delete _.password;try{yield l.authService.createNewUser(_,h),l.router.navigate(["/home"])}catch(y){l.errorMessage=(0,N.kY)(y)?y.message:y}})()}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(u.QS),s.Y36(P.e),s.Y36(O.F0))},i.\u0275cmp=s.Xpm({type:i,selectors:[["app-signup"]],decls:49,vars:50,consts:[[1,"form-container","facebook-style"],["autocomplete","off",1,"signup-form",3,"formGroup","ngSubmit"],[1,"form-title"],[2,"margin-top","-20px","font-size","15px","opacity","0.8"],[1,"hr"],[1,"form-section","first-name"],["for","firstName"],["type","text","formControlName","firstName",1,"form-control",3,"ngClass"],["class","warning-message",4,"ngIf"],[1,"form-section","last-name"],["for","lastName"],["type","text","formControlName","lastName",1,"form-control",3,"ngClass"],[1,"form-section","email"],["for","email"],["type","email","formControlName","email",1,"form-control",3,"ngClass"],[1,"form-section","phone-number"],["for","phoneNumber"],["type","tel","formControlName","phoneNumber",1,"form-control",3,"ngClass"],[1,"form-section","password"],["for","password"],["type","password","formControlName","password",1,"form-control",3,"ngClass"],["class","error-message",4,"ngIf"],["type","submit",1,"btn","btn-success",3,"disabled"],[1,"link",2,"margin-top","25px","text-align","center"],["routerLink","/auth/login"],[1,"warning-message"],[1,"error-message"]],template:function(l,h){1&l&&(s.TgZ(0,"div",0)(1,"form",1),s.NdJ("ngSubmit",function(){return h.onSubmitForm()}),s.TgZ(2,"h2",2),s._uU(3),s.ALo(4,"translate"),s.qZA(),s.TgZ(5,"div",3),s._uU(6),s.ALo(7,"translate"),s.qZA(),s._UZ(8,"hr",4),s.TgZ(9,"div",5)(10,"label",6),s._uU(11),s.ALo(12,"translate"),s.qZA(),s._UZ(13,"input",7),s.YNc(14,jt,3,3,"p",8),s.qZA(),s.TgZ(15,"div",9)(16,"label",10),s._uU(17),s.ALo(18,"translate"),s.qZA(),s._UZ(19,"input",11),s.YNc(20,kt,3,3,"p",8),s.qZA(),s.TgZ(21,"div",12)(22,"label",13),s._uU(23),s.ALo(24,"translate"),s.qZA(),s._UZ(25,"input",14),s.YNc(26,Yt,3,3,"p",8),s.qZA(),s.TgZ(27,"div",15)(28,"label",16),s._uU(29),s.ALo(30,"translate"),s.qZA(),s._UZ(31,"input",17),s.YNc(32,Zt,3,3,"p",8),s.qZA(),s.TgZ(33,"div",18)(34,"label",19),s._uU(35),s.ALo(36,"translate"),s.qZA(),s._UZ(37,"input",20),s.YNc(38,zt,3,3,"p",8),s.qZA(),s.YNc(39,Wt,3,1,"div",21),s.TgZ(40,"button",22),s._uU(41,"Submit"),s.qZA(),s._UZ(42,"hr",4),s.TgZ(43,"div",23),s._uU(44),s.ALo(45,"translate"),s.TgZ(46,"a",24),s._uU(47),s.ALo(48,"translate"),s.qZA()()()()),2&l&&(s.xp6(1),s.Q6J("formGroup",h.signupForm),s.xp6(2),s.Oqu(s.lcZ(4,22,"Sign Up")),s.xp6(3),s.Oqu(s.lcZ(7,24,"It is quick and easy")),s.xp6(5),s.Oqu(s.lcZ(12,26,"First Name")),s.xp6(2),s.Q6J("ngClass",s.VKq(40,J,h.signupForm.controls.firstName.invalid&&h.signupForm.controls.firstName.touched)),s.xp6(1),s.Q6J("ngIf",h.signupForm.controls.firstName.invalid&&h.signupForm.controls.firstName.touched),s.xp6(3),s.Oqu(s.lcZ(18,28,"Last Name")),s.xp6(2),s.Q6J("ngClass",s.VKq(42,J,h.signupForm.controls.lastName.invalid&&h.signupForm.controls.lastName.touched)),s.xp6(1),s.Q6J("ngIf",h.signupForm.controls.lastName.invalid&&h.signupForm.controls.lastName.touched),s.xp6(3),s.Oqu(s.lcZ(24,30,"Email")),s.xp6(2),s.Q6J("ngClass",s.VKq(44,J,h.signupForm.controls.email.invalid&&h.signupForm.controls.email.touched)),s.xp6(1),s.Q6J("ngIf",h.signupForm.controls.email.invalid&&h.signupForm.controls.email.touched),s.xp6(3),s.Oqu(s.lcZ(30,32,"Phone Number")),s.xp6(2),s.Q6J("ngClass",s.VKq(46,J,h.signupForm.controls.phoneNumber.invalid&&h.signupForm.controls.phoneNumber.touched)),s.xp6(1),s.Q6J("ngIf",h.signupForm.controls.phoneNumber.invalid&&h.signupForm.controls.phoneNumber.touched),s.xp6(3),s.Oqu(s.lcZ(36,34,"Password")),s.xp6(2),s.Q6J("ngClass",s.VKq(48,J,h.signupForm.controls.password.invalid&&h.signupForm.controls.password.touched)),s.xp6(1),s.Q6J("ngIf",h.signupForm.controls.password.invalid&&h.signupForm.controls.password.touched),s.xp6(1),s.Q6J("ngIf",h.errorMessage),s.xp6(1),s.Q6J("disabled",h.signupForm.invalid),s.xp6(4),s.hij(" ",s.lcZ(45,36,"Already have an account"),"? "),s.xp6(3),s.Oqu(s.lcZ(48,38,"Sign in")))},dependencies:[r.mk,r.O5,O.yS,u._Y,u.Fj,u.JJ,u.JL,u.sg,u.u,q,ue.X$],styles:[".form-container[_ngcontent-%COMP%]{width:50%;margin:25px auto;padding:25px 15px}.signup-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;grid-gap:11px}.form-section[_ngcontent-%COMP%]{margin-bottom:5px}.btn[_ngcontent-%COMP%], .error-message[_ngcontent-%COMP%], .link[_ngcontent-%COMP%], .form-title[_ngcontent-%COMP%], .password[_ngcontent-%COMP%], .hr[_ngcontent-%COMP%]{grid-column-start:1;grid-column-end:3}.btn[_ngcontent-%COMP%]{margin-top:25px}.warning-message[_ngcontent-%COMP%]{color:#fd335b;font-size:smaller;padding:0 5px;border-radius:3px}.warning[_ngcontent-%COMP%]{border:1px solid rgb(253,51,91)}.error-message[_ngcontent-%COMP%]{background-color:#ffd1da;color:#ff093a;font-size:small;padding:7px;border-radius:3px}@media only screen and (max-width: 800px){.form-container[_ngcontent-%COMP%]{width:90%}}@media only screen and (max-width: 500px){.form-container[_ngcontent-%COMP%]{width:98%}.form-section[_ngcontent-%COMP%]{grid-column-start:1;grid-column-end:3}}"]}),i})();var qt=n(127);function Jt(i,p){1&i&&(s.TgZ(0,"div",5)(1,"button",6),s._uU(2,"Go back to Login"),s.qZA()())}function Xt(i,p){1&i&&(s.TgZ(0,"span"),s._uU(1," Phone number is required. "),s.qZA())}function Qt(i,p){1&i&&(s.TgZ(0,"span"),s._uU(1," Phone number must be 10 numbers "),s.qZA())}function eo(i,p){if(1&i&&(s.TgZ(0,"small",14),s.YNc(1,Xt,2,0,"span",3),s.YNc(2,Qt,2,0,"span",3),s.qZA()),2&i){const l=s.oxw(2);s.xp6(1),s.Q6J("ngIf",null==l.phoneForm.controls.phone.errors?null:l.phoneForm.controls.phone.errors.required),s.xp6(1),s.Q6J("ngIf",l.phoneForm.controls.phone.errors)}}const to=function(i,p){return[i,p]};function oo(i,p){if(1&i){const l=s.EpF();s.TgZ(0,"form",7,8)(2,"div",9),s._UZ(3,"ngx-intl-tel-input",10),s.TgZ(4,"div",11),s.YNc(5,eo,3,2,"small",4),s.qZA()(),s._UZ(6,"div",12),s.TgZ(7,"div")(8,"button",13),s.NdJ("click",function(){s.CHM(l);const _=s.oxw();return s.KtG(_.sendVerificationCode())}),s._uU(9," Send Verification Code "),s.qZA()()()}if(2&i){const l=s.oxw();s.Q6J("formGroup",l.phoneForm),s.xp6(3),s.Q6J("cssClass","form-control")("enableAutoCountrySelect",!0)("enablePlaceholder",!0)("customPlaceholder","Enter Your Number")("searchCountryFlag",!0)("searchCountryField",s.WLB(15,to,l.searchCountryField.Iso2,l.searchCountryField.Name))("selectFirstCountry",!1)("selectedCountryISO",l.countryISO.Algeria)("maxLength",10)("phoneValidation",!0)("separateDialCode",!0)("numberFormat",l.phoneNumberFormat.National),s.xp6(2),s.Q6J("ngIf",!l.phoneForm.controls.phone.valid&&l.phoneForm.controls.phone.touched),s.xp6(3),s.Q6J("disabled",l.sendingCode)}}function no(i,p){1&i&&(s.TgZ(0,"div",21),s._uU(1," Verification Code sent successfully "),s.qZA())}function ro(i,p){if(1&i){const l=s.EpF();s.TgZ(0,"div"),s.YNc(1,no,2,0,"div",15),s.TgZ(2,"label",16),s._uU(3,"Enter your verification code here"),s.qZA(),s.TgZ(4,"input",17),s.NdJ("ngModelChange",function(_){s.CHM(l);const y=s.oxw();return s.KtG(y.verificationCode=_)}),s.qZA(),s.TgZ(5,"div",18)(6,"button",19),s.NdJ("click",function(){s.CHM(l);const _=s.oxw();return s.KtG(_.vefifyLoginCode())}),s._uU(7,"Vefify Code"),s.qZA(),s.TgZ(8,"button",20),s.NdJ("click",function(){s.CHM(l);const _=s.oxw();return _.codeSent=!1,s.KtG(_.phoneForm.reset())}),s._uU(9,"Reset"),s.qZA()()()}if(2&i){const l=s.oxw();s.xp6(1),s.Q6J("ngIf",l.codeSent),s.xp6(3),s.Q6J("ngModel",l.verificationCode)}}function io(i,p){if(1&i&&(s.TgZ(0,"div",14),s._uU(1),s.qZA()),2&i){const l=s.oxw();s.xp6(1),s.Oqu(l.errMsg)}}const so=[{path:"signup",component:Kt},{path:"login",component:Ht},{path:"phone-auth",component:(()=>{class i{constructor(l,h,_,y){this.router=l,this.afAuth=h,this.formBuilder=_,this.authService=y,this.searchCountryField=w,this.countryISO=$,this.phoneNumberFormat=K,this.sendingCode=!1,this.codeSent=!1,this.phoneForm=this.formBuilder.group({phone:[void 0,[u.kI.required]]})}ngOnInit(){}sendVerificationCode(){var l=this;return(0,m.Z)(function*(){const h=l.phoneForm.controls.phone.value;if(h){try{l.sendingCode=!0,l.reCaptchaVerifier=new qt.Z.auth.RecaptchaVerifier("reCaptcha-container",{size:"invisible"});const _=yield l.afAuth.signInWithPhoneNumber(h.e164Number,l.reCaptchaVerifier);localStorage.setItem("verificationId",JSON.stringify(_.verificationId)),l.codeSent=!0}catch(_){l.errMsg=_}l.sendingCode=!1}else l.errMsg="Input field is empty!"})()}vefifyLoginCode(){var l=this;return(0,m.Z)(function*(){try{yield l.authService.vefifyPhoneNumberAndSignin(l.verificationCode),l.router.navigate(["home"]),l.codeSent=!1}catch(h){l.errMsg=h}})()}}return i.\u0275fac=function(l){return new(l||i)(s.Y36(O.F0),s.Y36(L.zQ),s.Y36(u.QS),s.Y36(P.e))},i.\u0275cmp=s.Xpm({type:i,selectors:[["app-phone-auth"]],decls:5,vars:4,consts:[[1,"sec-container","facebook-style"],["style","margin-bottom: 15px;",4,"ngIf"],[3,"formGroup",4,"ngIf"],[4,"ngIf"],["class","alert alert-danger",4,"ngIf"],[2,"margin-bottom","15px"],["routerLink","/auth/login",1,"btn","btn-info"],[3,"formGroup"],["f","ngForm"],[1,"wrapper"],["name","phone","formControlName","phone",3,"cssClass","enableAutoCountrySelect","enablePlaceholder","customPlaceholder","searchCountryFlag","searchCountryField","selectFirstCountry","selectedCountryISO","maxLength","phoneValidation","separateDialCode","numberFormat"],[2,"margin-top","20px","margin-bottom","10px"],["id","reCaptcha-container"],[1,"btn","btn-success",3,"disabled","click"],[1,"alert","alert-danger"],["class","alert alert-success","style","margin-bottom: 15px;",4,"ngIf"],["for","code"],["type","text","name","code",1,"form-control",3,"ngModel","ngModelChange"],[2,"display","flex","justify-content","space-around","margin-top","15px"],[1,"btn","btn-success",3,"click"],[1,"btn","btn-primary",3,"click"],[1,"alert","alert-success",2,"margin-bottom","15px"]],template:function(l,h){1&l&&(s.TgZ(0,"section",0),s.YNc(1,Jt,3,0,"div",1),s.YNc(2,oo,10,18,"form",2),s.YNc(3,ro,10,2,"div",3),s.YNc(4,io,2,1,"div",4),s.qZA()),2&l&&(s.xp6(1),s.Q6J("ngIf",!h.codeSent),s.xp6(1),s.Q6J("ngIf",!h.codeSent),s.xp6(1),s.Q6J("ngIf",h.codeSent),s.xp6(1),s.Q6J("ngIf",h.errMsg))},dependencies:[r.O5,O.rH,u._Y,u.Fj,u.JJ,u.JL,u.sg,u.u,u.On,Dt,q],styles:[".sec-container[_ngcontent-%COMP%]{max-width:500px;min-width:300px;margin:25px auto;padding:25px 15px}@media only screen and (max-width: 530px){.sec-container[_ngcontent-%COMP%]{margin-inline:15px}}"]}),i})()},{path:"forgot-password",component:xt}];let ao=(()=>{class i{}return i.\u0275fac=function(l){return new(l||i)},i.\u0275mod=s.oAB({type:i}),i.\u0275inj=s.cJS({imports:[O.Bz.forChild(so),O.Bz]}),i})();var go=n(9552);let uo=(()=>{class i{}return i.\u0275fac=function(l){return new(l||i)},i.\u0275mod=s.oAB({type:i}),i.\u0275inj=s.cJS({imports:[r.ez,ao,u.UX,u.u5,go.m,Ut]}),i})()},5724:module=>{var t;t=function(){var define,module,exports;return function t(o,n,r){function u(s,P){if(!n[s]){if(!o[s]){if(m)return m(s,!0);var O=new Error("Cannot find module '"+s+"'");throw O.code="MODULE_NOT_FOUND",O}var R=n[s]={exports:{}};o[s][0].call(R.exports,function(U){return u(o[s][1][U]||U)},R,R.exports,t,o,n,r)}return n[s].exports}for(var m=void 0,N=0;N=u}},"es6","es3"),$jscomp.findInternal=function(t,o,n){t instanceof String&&(t=String(t));for(var r=t.length,u=0;u=m}},"es6","es3"),$jscomp.polyfill("String.prototype.repeat",function(t){return t||function(o){var n=$jscomp.checkStringArgs(this,null,"repeat");if(0>o||1342177279>>=1)&&(n+=n);return r}},"es6","es3"),$jscomp.initSymbol=function(){},$jscomp.polyfill("Symbol",function(t){if(t)return t;var o=function(u,m){this.$jscomp$symbol$id_=u,$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:m})};o.prototype.toString=function(){return this.$jscomp$symbol$id_};var n=0,r=function(u){if(this instanceof r)throw new TypeError("Symbol is not a constructor");return new o("jscomp_symbol_"+(u||"")+"_"+n++,u)};return r},"es6","es3"),$jscomp.polyfill("Symbol.iterator",function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var o="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n(n=n||0)&&(n=Math.max(n+u,0));n"u"||r.execScript("var "+t[0]);for(var u;t.length&&(u=t.shift());)if(t.length||void 0===o)r=r[u]&&r[u]!==Object.prototype[u]?r[u]:r[u]={};else if(!n&&goog.isObject(o)&&goog.isObject(r[u]))for(var m in o)o.hasOwnProperty(m)&&(r[u][m]=o[m]);else r[u]=o},goog.define=function(t,o){if(!COMPILED){var n=goog.global.CLOSURE_UNCOMPILED_DEFINES,r=goog.global.CLOSURE_DEFINES;n&&void 0===n.nodeType&&Object.prototype.hasOwnProperty.call(n,t)?o=n[t]:r&&void 0===r.nodeType&&Object.prototype.hasOwnProperty.call(r,t)&&(o=r[t])}return o},goog.FEATURESET_YEAR=2012,goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(t){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(t))throw Error('Namespace "'+t+'" already declared.');goog.constructNamespace_(t)},goog.constructNamespace_=function(t,o,n){if(!COMPILED){delete goog.implicitNamespaces_[t];for(var r=t;(r=r.substring(0,r.lastIndexOf(".")))&&!goog.getObjectByName(r);)goog.implicitNamespaces_[r]=!0}goog.exportPath_(t,o,n)},goog.getScriptNonce=function(t){return t&&t!=goog.global?goog.getScriptNonce_(t.document):(null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(t){return(t=t.querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(t)?t:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(t){if("string"!=typeof t||!t||-1==t.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+t+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=t,!COMPILED){if(goog.isProvided_(t))throw Error('Namespace "'+t+'" already declared.');delete goog.implicitNamespaces_[t]}},goog.module.get=function(t){return goog.module.getInternal_(t)},goog.module.getInternal_=function(t){if(!COMPILED){if(t in goog.loadedModules_)return goog.loadedModules_[t].exports;if(!goog.implicitNamespaces_[t])return(t=goog.getObjectByName(t))??null}return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var t=goog.global.$jscomp;return!!t&&"function"==typeof t.getCurrentModulePath&&!!t.getCurrentModulePath()},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(t){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(t in goog.loadedModules_)throw Error('Module with namespace "'+t+'" already exists.')}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=t;else{var o=goog.global.$jscomp;if(!o||"function"!=typeof o.getCurrentModulePath)throw Error('Module with namespace "'+t+'" has been loaded incorrectly.');o=o.require(o.getCurrentModulePath()),goog.loadedModules_[t]={exports:o,type:goog.ModuleType.ES6,moduleId:t}}},goog.setTestOnly=function(t){if(goog.DISALLOW_TEST_ONLY_CODE)throw t=t||"",Error("Importing test-only code into non-debug environment"+(t?": "+t:"."))},goog.forwardDeclare=function(t){},COMPILED||(goog.isProvided_=function(t){return t in goog.loadedModules_||!goog.implicitNamespaces_[t]&&null!=goog.getObjectByName(t)},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(t,o){t=t.split("."),o=o||goog.global;for(var n=0;n>>0),goog.uidCounter_=0,goog.cloneObject=function(t){var o=goog.typeOf(t);if("object"==o||"array"==o){if("function"==typeof t.clone)return t.clone();for(var n in o="array"==o?[]:{},t)o[n]=goog.cloneObject(t[n]);return o}return t},goog.bindNative_=function(t,o,n){return t.call.apply(t.bind,arguments)},goog.bindJs_=function(t,o,n){if(!t)throw Error();if(2").replace(/'/g,"'").replace(/"/g,'"').replace(/&/g,"&")),o&&(t=t.replace(/\{\$([^}]+)}/g,function(r,u){return null!=o&&u in o?o[u]:r})),t},goog.getMsgWithFallback=function(t,o){return t},goog.exportSymbol=function(t,o,n){goog.exportPath_(t,o,!0,n)},goog.exportProperty=function(t,o,n){t[o]=n},goog.inherits=function(t,o){function n(){}n.prototype=o.prototype,t.superClass_=o.prototype,t.prototype=new n,t.prototype.constructor=t,t.base=function(r,u,m){for(var N=Array(arguments.length-2),s=2;s{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')}),a("es7",function(){return b("2 ** 2 == 4")}),a("es8",function(){return b("async () => 1, true")}),a("es9",function(){return b("({...rest} = {}), true")}),a("es_next",function(){return!1}),{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(t,o){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var n=this.createRequiresTranspilation_();this.requiresTranspilation_=n.map,this.transpilationTarget_=this.transpilationTarget_||n.target}if(t in this.requiresTranspilation_)return!!this.requiresTranspilation_[t]||!(!goog.inHtmlDocument_()||"es6"!=o||"noModule"in goog.global.document.createElement("script"));throw Error("Unknown language mode: "+t)},goog.Transpiler.prototype.transpile=function(t,o){return goog.transpile_(t,o,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(t){return t.replace(/<\/(SCRIPT)/gi,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={},this.idToPath_={},this.written_={},this.loadingDeps_=[],this.depsToLoad_=[],this.paused_=!1,this.factory_=new goog.DependencyFactory(goog.transpiler_),this.deferredCallbacks_={},this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(t,o){function n(){r&&(goog.global.setTimeout(r,0),r=null)}var r=o;if(t.length){o=[];for(var u=0;u<\/script>';m+="",m=goog.Dependency.defer_?m+"document.getElementById('script-"+u+"').onload = function() {\n goog.Dependency.callback_('"+u+"', this);\n};\n":m+"goog.Dependency.callback_('"+u+"', document.getElementById('script-"+u+"'));",m+="<\/script>",o.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(m):m)}else{var N=o.createElement("script");N.defer=goog.Dependency.defer_,N.async=!1,n&&(N.nonce=n),goog.DebugLoader_.IS_OLD_IE_?(t.pause(),N.onreadystatechange=function(){("loaded"==N.readyState||"complete"==N.readyState)&&(t.loaded(),t.resume())}):N.onload=function(){N.onload=null,t.loaded()},N.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path,o.head.appendChild(N)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),t.loaded()):t.pause()},goog.Es6ModuleDependency=function(t,o,n,r,u){goog.Dependency.call(this,t,o,n,r,u)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(t){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?t.loaded():t.pause();else if(goog.inHtmlDocument_()){var r=goog.global.document,u=this;if(goog.isDocumentLoading_()){var m=function o(L,O){var R="",U=goog.getScriptNonce();U&&(R=' nonce="'+U+'"'),L=O?' + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/new-rdv-app/browser/main.ee32473261f5b934.js b/dist/new-rdv-app/browser/main.ee32473261f5b934.js new file mode 100644 index 0000000..53f31fc --- /dev/null +++ b/dist/new-rdv-app/browser/main.ee32473261f5b934.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknew_rdv_app=self.webpackChunknew_rdv_app||[]).push([[179],{440:(Wt,je,S)=>{S.d(je,{nm:()=>ti});var m=S(5813);S(4650),S(5867);var ot=S(5861),Ne=S(9681),xe=S(4859),Nt=S(2090),Lt=S(1877);const Se=new Map,Ie={activated:!1,tokenObservers:[]},Ce={initialized:!1,enabled:!1};function et(qe){return Se.get(qe)||Ie}function lt(qe,Le){Se.set(qe,Le)}function at(){return Ce}class ft{constructor(Le,ct,Rt,tn,cn){if(this.operation=Le,this.retryPolicy=ct,this.getWaitDuration=Rt,this.lowerBound=tn,this.upperBound=cn,this.pending=null,this.nextErrorWaitInterval=tn,tn>cn)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(Le){var ct=this;return(0,ot.Z)(function*(){ct.stop();try{ct.pending=new Nt.BH,yield function Et(qe){return new Promise(Le=>{setTimeout(Le,qe)})}(ct.getNextRun(Le)),ct.pending.resolve(),yield ct.pending.promise,ct.pending=new Nt.BH,yield ct.operation(),ct.pending.resolve(),yield ct.pending.promise,ct.process(!0).catch(()=>{})}catch(Rt){ct.retryPolicy(Rt)?ct.process(!1).catch(()=>{}):ct.stop()}})()}getNextRun(Le){if(Le)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{const ct=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),ct}}}const It=new Nt.LL("appCheck","AppCheck",{"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"});function nt(qe){if(!et(qe).activated)throw It.create("use-before-activation",{appName:qe.name})}function Zt(qe,Le){return wn.apply(this,arguments)}function wn(){return(wn=(0,ot.Z)(function*({url:qe,body:Le},ct){var Rt,tn;const cn={"Content-Type":"application/json"},Ir=ct.getImmediate({optional:!0});if(Ir){const ni=yield Ir.getHeartbeatsHeader();ni&&(cn["X-Firebase-Client"]=ni)}const Wr={method:"POST",body:JSON.stringify(Le),headers:cn};let Wn,Cr;try{Wn=yield fetch(qe,Wr)}catch(ni){throw It.create("fetch-network-error",{originalErrorMessage:null===(Rt=ni)||void 0===Rt?void 0:Rt.message})}if(200!==Wn.status)throw It.create("fetch-status-error",{httpStatus:Wn.status});try{Cr=yield Wn.json()}catch(ni){throw It.create("fetch-parse-error",{originalErrorMessage:null===(tn=ni)||void 0===tn?void 0:tn.message})}const $i=Cr.ttl.match(/^([\d.]+)(s)$/);if(!$i||!$i[2]||isNaN(Number($i[1])))throw It.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${Cr.ttl}`});const Hi=1e3*Number($i[1]),vs=Date.now();return{token:Cr.token,expireTimeMillis:vs+Hi,issuedAtTimeMillis:vs}})).apply(this,arguments)}function bt(qe,Le){const{projectId:ct,appId:Rt,apiKey:tn}=qe.options;return{url:`https://content-firebaseappcheck.googleapis.com/v1/projects/${ct}/apps/${Rt}:exchangeDebugToken?key=${tn}`,body:{debug_token:Le}}}const yr="firebase-app-check-store";let gn=null;function Ti(){return gn||(gn=new Promise((qe,Le)=>{var ct;try{const Rt=indexedDB.open("firebase-app-check-database",1);Rt.onsuccess=tn=>{qe(tn.target.result)},Rt.onerror=tn=>{var cn;Le(It.create("storage-open",{originalErrorMessage:null===(cn=tn.target.error)||void 0===cn?void 0:cn.message}))},Rt.onupgradeneeded=tn=>{0===tn.oldVersion&&tn.target.result.createObjectStore(yr,{keyPath:"compositeKey"})}}catch(Rt){Le(It.create("storage-open",{originalErrorMessage:null===(ct=Rt)||void 0===ct?void 0:ct.message}))}}),gn)}function xt(){return(xt=(0,ot.Z)(function*(qe,Le){const Rt=(yield Ti()).transaction(yr,"readwrite"),cn=Rt.objectStore(yr).put({compositeKey:qe,value:Le});return new Promise((Ir,Wr)=>{cn.onsuccess=Wn=>{Ir()},Rt.onerror=Wn=>{var Cr;Wr(It.create("storage-set",{originalErrorMessage:null===(Cr=Wn.target.error)||void 0===Cr?void 0:Cr.message}))}})})).apply(this,arguments)}const Kn=new Lt.Yd("@firebase/app-check");function Xn(qe,Le){return(0,Nt.hl)()?function Or(qe,Le){return function Ge(qe,Le){return xt.apply(this,arguments)}(function nr(qe){return`${qe.options.appId}-${qe.name}`}(qe),Le)}(qe,Le).catch(ct=>{Kn.warn(`Failed to write token to IndexedDB. Error: ${ct}`)}):Promise.resolve()}function we(){return at().enabled}function Ae(){return Tt.apply(this,arguments)}function Tt(){return(Tt=(0,ot.Z)(function*(){const qe=at();if(qe.enabled&&qe.token)return qe.token.promise;throw Error("\n Can't get debug token in production mode.\n ")})).apply(this,arguments)}const J={error:"UNKNOWN_ERROR"};function le(qe){return Nt.US.encodeString(JSON.stringify(qe),!1)}function rt(qe){return Qt.apply(this,arguments)}function Qt(){return(Qt=(0,ot.Z)(function*(qe,Le=!1){const ct=qe.app;nt(ct);const Rt=et(ct);let cn,tn=Rt.token;if(!tn){const Wn=yield Rt.cachedTokenPromise;Wn&&jn(Wn)&&(tn=Wn)}if(!Le&&tn&&jn(tn))return{token:tn.token};let Wr,Ir=!1;if(we()){Rt.exchangeTokenPromise||(Rt.exchangeTokenPromise=Zt(bt(ct,yield Ae()),qe.heartbeatServiceProvider).then(Cr=>(Rt.exchangeTokenPromise=void 0,Cr)),Ir=!0);const Wn=yield Rt.exchangeTokenPromise;return yield Xn(ct,Wn),lt(ct,Object.assign(Object.assign({},Rt),{token:Wn})),{token:Wn.token}}try{Rt.exchangeTokenPromise||(Rt.exchangeTokenPromise=Rt.provider.getToken().then(Wn=>(Rt.exchangeTokenPromise=void 0,Wn)),Ir=!0),tn=yield Rt.exchangeTokenPromise}catch(Wn){"appCheck/throttled"===Wn.code?Kn.warn(Wn.message):Kn.error(Wn),cn=Wn}return tn?(Wr={token:tn.token},lt(ct,Object.assign(Object.assign({},Rt),{token:tn})),yield Xn(ct,tn)):Wr=kr(cn),Ir&&Nr(ct,Wr),Wr})).apply(this,arguments)}function fn(qe,Le){const ct=et(qe),Rt=ct.tokenObservers.filter(tn=>tn.next!==Le);0===Rt.length&&ct.tokenRefresher&&ct.tokenRefresher.isRunning()&&ct.tokenRefresher.stop(),lt(qe,Object.assign(Object.assign({},ct),{tokenObservers:Rt}))}function Pn(qe){const{app:Le}=qe,ct=et(Le);let Rt=ct.tokenRefresher;Rt||(Rt=function Pr(qe){const{app:Le}=qe;return new ft((0,ot.Z)(function*(){let Rt;if(Rt=et(Le).token?yield rt(qe,!0):yield rt(qe),Rt.error)throw Rt.error}),()=>!0,()=>{const ct=et(Le);if(ct.token){let Rt=ct.token.issuedAtTimeMillis+.5*(ct.token.expireTimeMillis-ct.token.issuedAtTimeMillis)+3e5;return Rt=Math.min(Rt,ct.token.expireTimeMillis-3e5),Math.max(0,Rt-Date.now())}return 0},3e4,96e4)}(qe),lt(Le,Object.assign(Object.assign({},ct),{tokenRefresher:Rt}))),!Rt.isRunning()&&ct.isTokenAutoRefreshEnabled&&Rt.start()}function Nr(qe,Le){const ct=et(qe).tokenObservers;for(const Rt of ct)try{"EXTERNAL"===Rt.type&&null!=Le.error?Rt.error(Le.error):Rt.next(Le)}catch{}}function jn(qe){return qe.expireTimeMillis-Date.now()>0}function kr(qe){return{token:le(J),error:qe}}class jr{constructor(Le,ct){this.app=Le,this.heartbeatServiceProvider=ct}_delete(){const{tokenObservers:Le}=et(this.app);for(const ct of Le)fn(this.app,ct.next);return Promise.resolve()}}const ei="app-check-internal";!function Fi(){(0,Ne._registerComponent)(new xe.wA("app-check",qe=>function Fr(qe,Le){return new jr(qe,Le)}(qe.getProvider("app").getImmediate(),qe.getProvider("heartbeat")),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((qe,Le,ct)=>{qe.getProvider(ei).initialize()})),(0,Ne._registerComponent)(new xe.wA(ei,qe=>function Sr(qe){return{getToken:Le=>rt(qe,Le),addTokenListener:Le=>function hn(qe,Le,ct,Rt){const{app:tn}=qe,cn=et(tn),Ir={next:ct,error:Rt,type:Le};if(lt(tn,Object.assign(Object.assign({},cn),{tokenObservers:[...cn.tokenObservers,Ir]})),cn.token&&jn(cn.token)){const Wr=cn.token;Promise.resolve().then(()=>{ct({token:Wr.token}),Pn(qe)}).catch(()=>{})}cn.cachedTokenPromise.then(()=>Pn(qe))}(qe,"INTERNAL",Le),removeTokenListener:Le=>fn(qe.app,Le)}}(qe.getProvider("app-check").getImmediate()),"PUBLIC").setInstantiationMode("EXPLICIT")),(0,Ne.registerVersion)("@firebase/app-check","0.5.9")}();class ti{constructor(){return(0,m.vb)("app-check")}}typeof window<"u"&&window},3385:(Wt,je,S)=>{S.d(je,{zQ:()=>et,ww:()=>lt,rT:()=>Lt,f7:()=>Ie,L6:()=>xe,_Q:()=>Nt,lh:()=>Se,Qv:()=>Ne,nw:()=>Ce});var m=S(4650),g=S(7579),K=S(9646),ae=S(8306),oe=S(8996),_e=S(6451),fe=S(3900),ge=S(576);function he(at,Je){return(0,ge.m)(Je)?(0,fe.w)(()=>at,Je):(0,fe.w)(()=>at)}var ie=S(5363),ce=S(4004),me=S(3151),it=S(590),Ke=S(9468),Ye=S(9300),ht=S(5813),Ze=S(2011),Qe=S(6895),Ee=S(440),kt=S(127);const Ne=new m.OlP("angularfire2.auth.use-emulator"),xe=new m.OlP("angularfire2.auth.settings"),Nt=new m.OlP("angularfire2.auth.tenant-id"),Lt=new m.OlP("angularfire2.auth.langugage-code"),Se=new m.OlP("angularfire2.auth.use-device-language"),Ie=new m.OlP("angularfire.auth.persistence"),Ce=(at,Je,pn,Tn,St,Mt,pe,ft)=>(0,Ze.cc)(`${at.name}.auth`,"AngularFireAuth",at.name,()=>{const Et=Je.runOutsideAngular(()=>at.auth());if(pn&&Et.useEmulator(...pn),Tn&&(Et.tenantId=Tn),Et.languageCode=St,Mt&&Et.useDeviceLanguage(),pe)for(const[sn,It]of Object.entries(pe))Et.settings[sn]=It;return ft&&Et.setPersistence(ft),Et},[pn,Tn,St,Mt,pe,ft]);let et=(()=>{class at{constructor(pn,Tn,St,Mt,pe,ft,Et,sn,It,Rn,nt,ut){const Kt=new g.x,Ht=(0,K.of)(void 0).pipe((0,ie.Q)(pe.outsideAngular),(0,fe.w)(()=>Mt.runOutsideAngular(()=>Promise.resolve().then(S.bind(S,1515)))),(0,ce.U)(()=>(0,Ze.on)(pn,Mt,Tn)),(0,ce.U)(Zt=>Ce(Zt,Mt,ft,sn,It,Rn,Et,nt)),(0,me.d)({bufferSize:1,refCount:!1}));if((0,Qe.PM)(St))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=(0,K.of)(null);else{Ht.pipe((0,it.P)()).subscribe();const wn=Ht.pipe((0,fe.w)(bt=>bt.getRedirectResult().then(Un=>Un,()=>null)),ht.iC,(0,me.d)({bufferSize:1,refCount:!1})),er=Ht.pipe((0,fe.w)(bt=>new ae.y(Un=>({unsubscribe:Mt.runOutsideAngular(()=>bt.onAuthStateChanged(ln=>Un.next(ln),ln=>Un.error(ln),()=>Un.complete()))})))),Jn=Ht.pipe((0,fe.w)(bt=>new ae.y(Un=>({unsubscribe:Mt.runOutsideAngular(()=>bt.onIdTokenChanged(ln=>Un.next(ln),ln=>Un.error(ln),()=>Un.complete()))}))));this.authState=wn.pipe(he(er),(0,Ke.R)(pe.outsideAngular),(0,ie.Q)(pe.insideAngular)),this.user=wn.pipe(he(Jn),(0,Ke.R)(pe.outsideAngular),(0,ie.Q)(pe.insideAngular)),this.idToken=this.user.pipe((0,fe.w)(bt=>bt?(0,oe.D)(bt.getIdToken()):(0,K.of)(null))),this.idTokenResult=this.user.pipe((0,fe.w)(bt=>bt?(0,oe.D)(bt.getIdTokenResult()):(0,K.of)(null))),this.credential=(0,_e.T)(wn,Kt,this.authState.pipe((0,Ye.h)(bt=>!bt))).pipe((0,ce.U)(bt=>bt?.user?bt:null),(0,Ke.R)(pe.outsideAngular),(0,ie.Q)(pe.insideAngular))}return(0,Ze.pX)(this,Ht,Mt,{spy:{apply:(Zt,wn,er)=>{(Zt.startsWith("signIn")||Zt.startsWith("createUser"))&&er.then(Jn=>Kt.next(Jn))}}})}}return at.\u0275fac=function(pn){return new(pn||at)(m.LFG(Ze.Dh),m.LFG(Ze.xv,8),m.LFG(m.Lbi),m.LFG(m.R0b),m.LFG(ht.HU),m.LFG(Ne,8),m.LFG(xe,8),m.LFG(Nt,8),m.LFG(Lt,8),m.LFG(Se,8),m.LFG(Ie,8),m.LFG(Ee.nm,8))},at.\u0275prov=m.Yz7({token:at,factory:at.\u0275fac,providedIn:"any"}),at})(),lt=(()=>{class at{constructor(){kt.Z.registerVersion("angularfire",ht.q4.full,"auth-compat")}}return at.\u0275fac=function(pn){return new(pn||at)},at.\u0275mod=m.oAB({type:at}),at.\u0275inj=m.cJS({providers:[et]}),at})()},7407:(Wt,je,S)=>{S.d(je,{ST:()=>cv});var m=S(4650),g=S(4986),K=S(8306),ae=S(8996),oe=S(9646),_e=S(5813),fe=S(4482),ge=S(5403);function he(){return(0,fe.e)((i,e)=>{let t,o=!1;i.subscribe(new ge.Q(e,u=>{const h=t;t=u,o&&e.next([h,u]),o=!0}))})}var Se,ie=S(8675),ce=S(4004),me=S(5026),it=S(1884),Ke=S(9300),Ye=S(2011),ht=S(6895),Qe=(S(1515),S(3942)),Ee=S(5861),kt=S(9681),ot=S(4859),Ne=S(1877),xe=S(2090),Nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Lt={},Ie=Ie||{},Ce=Nt||self;function et(){}function lt(i){var e=typeof i;return"array"==(e="object"!=e?e:i?Array.isArray(i)?"array":e:"null")||"object"==e&&"number"==typeof i.length}function at(i){var e=typeof i;return"object"==e&&null!=i||"function"==e}var pn="closure_uid_"+(1e9*Math.random()>>>0),Tn=0;function St(i,e,t){return i.call.apply(i.bind,arguments)}function Mt(i,e,t){if(!i)throw Error();if(2e?1:0}e:{var ln=Ce.navigator;if(ln){var yr=ln.userAgent;if(yr){Un=yr;break e}}Un=""}function Yn(i,e,t){for(const o in i)e.call(t,i[o],o,i)}function gn(i){const e={};for(const t in i)e[t]=i[t];return e}var Ti="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Dr(i,e){let t,o;for(let u=1;uparseFloat(mn)){Ut=String(Rr);break e}}Ut=mn}var Me={};var se=Ce.document&&Ge&&(Kn()||parseInt(Ut,10))||void 0,J=function(){if(!Ce.addEventListener||!Object.defineProperty)return!1;var i=!1,e=Object.defineProperty({},"passive",{get:function(){i=!0}});try{Ce.addEventListener("test",et,e),Ce.removeEventListener("test",et,e)}catch{}return i}();function le(i,e){this.type=i,this.g=this.target=e,this.defaultPrevented=!1}function rt(i,e){if(le.call(this,i?i.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,i){var t=this.type=i.type,o=i.changedTouches&&i.changedTouches.length?i.changedTouches[0]:null;if(this.target=i.target||i.srcElement,this.g=e,e=i.relatedTarget){if(qt){e:{try{Or(e.nodeName);var u=!0;break e}catch{}u=!1}u||(e=null)}}else"mouseover"==t?e=i.fromElement:"mouseout"==t&&(e=i.toElement);this.relatedTarget=e,o?(this.clientX=void 0!==o.clientX?o.clientX:o.pageX,this.clientY=void 0!==o.clientY?o.clientY:o.pageY,this.screenX=o.screenX||0,this.screenY=o.screenY||0):(this.clientX=void 0!==i.clientX?i.clientX:i.pageX,this.clientY=void 0!==i.clientY?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0),this.button=i.button,this.key=i.key||"",this.ctrlKey=i.ctrlKey,this.altKey=i.altKey,this.shiftKey=i.shiftKey,this.metaKey=i.metaKey,this.pointerId=i.pointerId||0,this.pointerType="string"==typeof i.pointerType?i.pointerType:Qt[i.pointerType]||"",this.state=i.state,this.i=i,i.defaultPrevented&&rt.Z.h.call(this)}}le.prototype.h=function(){this.defaultPrevented=!0},Et(rt,le);var Qt={2:"touch",3:"pen",4:"mouse"};rt.prototype.h=function(){rt.Z.h.call(this);var i=this.i;i.preventDefault?i.preventDefault():i.returnValue=!1};var hn="closure_listenable_"+(1e6*Math.random()|0),fn=0;function Pn(i,e,t,o,u){this.listener=i,this.proxy=null,this.src=e,this.type=t,this.capture=!!o,this.ia=u,this.key=++fn,this.ca=this.fa=!1}function Pr(i){i.ca=!0,i.listener=null,i.proxy=null,i.src=null,i.ia=null}function Nr(i){this.src=i,this.g={},this.h=0}function jn(i,e){var t=e.type;if(t in i.g){var h,o=i.g[t],u=nt(o,e);(h=0<=u)&&Array.prototype.splice.call(o,u,1),h&&(Pr(e),0==i.g[t].length&&(delete i.g[t],i.h--))}}function kr(i,e,t,o){for(var u=0;u>>0);function _r(i){return"function"==typeof i?i:(i[qn]||(i[qn]=function(e){return i.handleEvent(e)}),i[qn])}function yn(){sn.call(this),this.i=new Nr(this),this.P=this,this.I=null}function Mr(i,e){var t,o=i.I;if(o)for(t=[];o;o=o.I)t.push(o);if(i=i.P,o=e.type||e,"string"==typeof e)e=new le(e,i);else if(e instanceof le)e.target=e.target||i;else{var u=e;Dr(e=new le(o,i),u)}if(u=!0,t)for(var h=t.length-1;0<=h;h--){var v=e.g=t[h];u=Ji(v,o,!0,e)&&u}if(u=Ji(v=e.g=i,o,!0,e)&&u,u=Ji(v,o,!1,e)&&u,t)for(h=0;hnew Ai,i=>i.reset());class Ai{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}function Gr(i){Ce.setTimeout(()=>{throw i},0)}function oi(i,e){Ur||function vr(){var i=Ce.Promise.resolve(void 0);Ur=function(){i.then(ms)}}(),ps||(Ur(),ps=!0),gs.add(i,e)}var ps=!1,gs=new class Vr{constructor(){this.h=this.g=null}add(e,t){const o=ss.get();o.set(e,t),this.h?this.h.next=o:this.g=o,this.h=o}};function ms(){for(var i;i=wi();){try{i.h.call(i.g)}catch(t){Gr(t)}var e=ss;e.j(i),100>e.h&&(e.h++,i.next=e.g,e.g=i)}ps=!1}function ei(i,e){yn.call(this),this.h=i||1,this.g=e||Ce,this.j=pe(this.kb,this),this.l=Date.now()}function Fi(i){i.da=!1,i.S&&(i.g.clearTimeout(i.S),i.S=null)}function Li(i,e,t){if("function"==typeof i)t&&(i=pe(i,t));else{if(!i||"function"!=typeof i.handleEvent)throw Error("Invalid listener argument");i=pe(i.handleEvent,i)}return 2147483647{i.g=null,i.i&&(i.i=!1,ai(i))},i.j);const e=i.h;i.h=null,i.m.apply(null,e)}Et(ei,yn),(Se=ei.prototype).da=!1,Se.S=null,Se.kb=function(){if(this.da){var i=Date.now()-this.l;0o.length)){var u=o[1];if(Array.isArray(u)&&!(1>u.length)){var h=u[0];if("noop"!=h&&"stop"!=h&&"close"!=h)for(var v=1;ve.length?io:(e=e.substr(o,t),i.C=o+t,e))}function Ns(i){i.Y=Date.now()+i.P,ks(i,i.P)}function ks(i,e){if(null!=i.B)throw Error("WatchDog timer not null");i.B=Rt(pe(i.eb,i),e)}function lr(i){i.B&&(Ce.clearTimeout(i.B),i.B=null)}function ui(i){0==i.l.G||i.I||ba(i.l,i)}function zi(i){lr(i);var e=i.L;e&&"function"==typeof e.na&&e.na(),i.L=null,Fi(i.W),Us(i.V),i.g&&(e=i.g,i.g=null,e.abort(),e.na())}function Fs(i,e){try{var t=i.l;if(0!=t.G&&(t.g==i||un(t.i,i)))if(t.I=i.N,!i.J&&un(t.i,i)&&3==t.G){try{var o=t.Ca.g.parse(e)}catch{o=null}if(Array.isArray(o)&&3==o.length){var u=o;if(0==u[0]){e:if(!t.u){if(t.g){if(!(t.g.F+3e3u[2]&&t.N&&0==t.A&&!t.v&&(t.v=Rt(pe(t.ab,t),6e3));if(1>=gt(t.i)&&t.ka){try{t.ka()}catch{}t.ka=void 0}}else _i(t,11)}else if((i.J||t.g==i)&&Ri(t),!wn(e))for(u=t.Ca.g.parse(e),e=0;ede)&&(3!=de||Xe||this.g&&(this.h.h||this.g.ga()||Yo(this.g)))){this.I||4!=de||7==e||Ui(8==e||0>=Fe?3:2),lr(this);var t=this.g.ba();this.N=t;t:if(Rs(this)){var o=Yo(this.g);i="";var u=o.length,h=4==Ys(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){zi(this),ui(this);var v="";break t}this.h.i=new Ce.TextDecoder}for(e=0;ee)throw Error("Bad port number "+e);i.m=e}else i.m=null}function V(i,e,t){e instanceof $r?(i.h=e,function so(i,e){e&&!i.j&&(li(i),i.i=null,i.g.forEach(function(t,o){var u=o.toLowerCase();o!=u&&(as(this,o),Si(this,u,t))},i)),i.j=e}(i.h,i.g)):(t||(e=cr(e,or)),i.h=new $r(e,i.g))}function Q(i,e,t){i.h.set(e,t)}function Ve(i){return Q(i,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),i}function Jt(i,e){return i?e?decodeURI(i.replace(/%25/g,"%2525")):decodeURIComponent(i):""}function cr(i,e,t){return"string"==typeof i?(i=encodeURI(i).replace(e,gr),t&&(i=i.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),i):null}function gr(i){return"%"+((i=i.charCodeAt(0))>>4&15).toString(16)+(15&i).toString(16)}xi.prototype.toString=function(){var i=[],e=this.j;e&&i.push(cr(e,Tr,!0),":");var t=this.i;return(t||"file"==e)&&(i.push("//"),(e=this.s)&&i.push(cr(e,Tr,!0),"@"),i.push(encodeURIComponent(String(t)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.m)&&i.push(":",String(t))),(t=this.l)&&(this.i&&"/"!=t.charAt(0)&&i.push("/"),i.push(cr(t,"/"==t.charAt(0)?Lr:Zn,!0))),(t=this.h.toString())&&i.push("?",t),(t=this.o)&&i.push("#",cr(t,Dn)),i.join("")};var Tr=/[#\/\?@]/g,Zn=/[#\?:]/g,Lr=/[#\?]/g,or=/[#\?@]/g,Dn=/#/g;function $r(i,e){this.h=this.g=null,this.i=i||null,this.j=!!e}function li(i){i.g||(i.g=new Qr,i.h=0,i.i&&function ir(i,e){if(i){i=i.split("&");for(var t=0;t2*i.i&&Uo(i)))}function bs(i,e){return li(i),e=Oi(i,e),yi(i.g.h,e)}function Si(i,e,t){as(i,e),0=i.j}function gt(i){return i.h?1:i.g?i.g.size:0}function un(i,e){return i.h?i.h==e:!!i.g&&i.g.has(e)}function Br(i,e){i.g?i.g.add(e):i.h=e}function ci(i,e){i.h&&i.h==e?i.h=null:i.g&&i.g.has(e)&&i.g.delete(e)}function ri(i){if(null!=i.h)return i.i.concat(i.h.D);if(null!=i.g&&0!==i.g.size){let e=i.i;for(const t of i.g.values())e=e.concat(t.D);return e}return Zt(i.i)}function js(){}function Ko(){this.g=new js}function Dt(i,e,t){const o=t||"";try{vo(i,function(u,h){let v=u;at(u)&&(v=ki(u)),e.push(o+h+"="+encodeURIComponent(v))})}catch(u){throw e.push(o+"type="+encodeURIComponent("_badmap")),u}}function Oe(i,e,t,o,u){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,u(o)}catch{}}function pt(i){this.l=i.$b||null,this.j=i.ib||!1}function Pt(i,e){yn.call(this),this.D=i,this.u=e,this.m=void 0,this.readyState=In,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}O.prototype.cancel=function(){if(this.i=ri(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const i of this.g.values())i.cancel();this.g.clear()}},js.prototype.stringify=function(i){return Ce.JSON.stringify(i,void 0)},js.prototype.parse=function(i){return Ce.JSON.parse(i,void 0)},Et(pt,Ir),pt.prototype.g=function(){return new Pt(this.l,this.j)},pt.prototype.i=function(i){return function(){return i}}({}),Et(Pt,yn);var In=0;function ar(i){i.j.read().then(i.Sa.bind(i)).catch(i.ha.bind(i))}function br(i){i.readyState=4,i.l=null,i.j=null,i.A=null,di(i)}function di(i){i.onreadystatechange&&i.onreadystatechange.call(i)}(Se=Pt.prototype).open=function(i,e){if(this.readyState!=In)throw this.abort(),Error("Error reopening a connection");this.C=i,this.B=e,this.readyState=1,di(this)},Se.send=function(i){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};i&&(e.body=i),(this.D||Ce).fetch(new Request(this.B,e)).then(this.Va.bind(this),this.ha.bind(this))},Se.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,br(this)),this.readyState=In},Se.Va=function(i){if(this.g&&(this.l=i,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=i.headers,this.readyState=2,di(this)),this.g&&(this.readyState=3,di(this),this.g)))if("arraybuffer"===this.responseType)i.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if(typeof Ce.ReadableStream<"u"&&"body"in i){if(this.j=i.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;ar(this)}else i.text().then(this.Ua.bind(this),this.ha.bind(this))},Se.Sa=function(i){if(this.g){if(this.u&&i.value)this.response.push(i.value);else if(!this.u){var e=i.value?i.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!i.done}))&&(this.response=this.responseText+=e)}i.done?br(this):di(this),3==this.readyState&&ar(this)}},Se.Ua=function(i){this.g&&(this.response=this.responseText=i,br(this))},Se.Ta=function(i){this.g&&(this.response=i,br(this))},Se.ha=function(){this.g&&br(this)},Se.setRequestHeader=function(i,e){this.v.append(i,e)},Se.getResponseHeader=function(i){return this.h&&this.h.get(i.toLowerCase())||""},Se.getAllResponseHeaders=function(){if(!this.h)return"";const i=[],e=this.h.entries();for(var t=e.next();!t.done;)i.push((t=t.value)[0]+": "+t[1]),t=e.next();return i.join("\r\n")},Object.defineProperty(Pt.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(i){this.m=i?"include":"same-origin"}});var Eo=Ce.JSON.parse;function Zr(i){yn.call(this),this.headers=new Qr,this.u=i||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=Wo,this.K=this.L=!1}Et(Zr,yn);var Wo="",yu=/^https?$/i,$s=["POST","PUT"];function Zo(i){return"content-type"==i.toLowerCase()}function Bo(i,e){i.h=!1,i.g&&(i.l=!0,i.g.abort(),i.l=!1),i.j=e,i.m=5,Ea(i),oo(i)}function Ea(i){i.D||(i.D=!0,Mr(i,"complete"),Mr(i,"error"))}function qo(i){if(i.h&&typeof Ie<"u"&&(!i.C[1]||4!=Ys(i)||2!=i.ba()))if(i.v&&4==Ys(i))Li(i.Fa,0,i);else if(Mr(i,"readystatechange"),4==Ys(i)){i.h=!1;try{const M=i.ba();e:switch(M){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break e;default:e=!1}var t;if(!(t=e)){var o;if(o=0===M){var u=String(i.H).match(os)[1]||null;if(!u&&Ce.self&&Ce.self.location){var h=Ce.self.location.protocol;u=h.substr(0,h.length-1)}o=!yu.test(u?u.toLowerCase():"")}t=o}if(t)Mr(i,"complete"),Mr(i,"success");else{i.m=6;try{var v=2W)h=Math.max(0,u[j].h-100),M=!1;else try{Dt(de,v,"req"+W+"_")}catch{o&&o(de)}}if(M){o=v.join("&");break e}}}return i=i.l.splice(0,t),e.D=i,o}function Xo(i){i.g||i.u||(i.Y=1,oi(i.Ga,i),i.A=0)}function Oo(i){return!(i.g||i.u||3<=i.A||(i.Y++,i.u=Rt(pe(i.Ga,i),Ro(i,i.A)),i.A++,0))}function ha(i){null!=i.B&&(Ce.clearTimeout(i.B),i.B=null)}function ea(i){i.g=new ro(i,i.h,"rpc",i.Y),null===i.o&&(i.g.H=i.s),i.g.O=0;var e=es(i.oa);Q(e,"RID","rpc"),Q(e,"SID",i.J),Q(e,"CI",i.N?"0":"1"),Q(e,"AID",i.U),Do(i,e),Q(e,"TYPE","xmlhttp"),i.o&&i.s&&wo(e,i.o,i.s),i.K&&i.g.setTimeout(i.K);var t=i.g;i=i.la,t.K=1,t.v=Ve(es(e)),t.s=null,t.U=!0,qs(t,i)}function Ri(i){null!=i.v&&(Ce.clearTimeout(i.v),i.v=null)}function ba(i,e){var t=null;if(i.g==e){Ri(i),ha(i),i.g=null;var o=2}else{if(!un(i.i,e))return;t=e.D,ci(i.i,e),o=1}if(i.I=e.N,0!=i.G)if(e.i)if(1==o){t=e.s?e.s.length:0,e=Date.now()-e.F;var u=i.C;Mr(o=Bs(),new ct(o,t,e,u)),bo(i)}else Xo(i);else if(3==(u=e.o)||0==u&&0=i.i.j-(i.m?1:0)||(i.m?(i.l=e.D.concat(i.l),0):1==i.G||2==i.G||i.C>=(i.Xa?0:i.Ya)||(i.m=Rt(pe(i.Ha,i,e),Ro(i,i.C)),i.C++,0)))}(i,e)||2==o&&Oo(i)))switch(t&&0e?null:"string"==typeof i?i.charAt(e):i[e]}(u.T()),t=Ce.FormData&&i instanceof Ce.FormData,!(0<=nt($s,e))||o||t||u.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),u.forEach(function(h,v){this.g.setRequestHeader(v,h)},this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{wa(this),0=this.O)){var i=2*this.O;this.h.info("BP detection timer enabled: "+i),this.B=Rt(pe(this.bb,this),i)}},Se.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,Le(10),Hs(this),ea(this))},Se.ab=function(){null!=this.v&&(this.v=null,Hs(this),Oo(this),Le(19))},Se.jb=function(i){i?(this.h.info("Successfully pinged google.com"),Le(2)):(this.h.info("Failed to ping google.com"),Le(1))},(Se=Ds.prototype).xa=function(){},Se.wa=function(){},Se.va=function(){},Se.ua=function(){},Se.Oa=function(){},fa.prototype.g=function(i,e){return new Is(i,e)},Et(Is,yn),Is.prototype.m=function(){this.g.j=this.j,this.A&&(this.g.H=!0);var i=this.g,e=this.l,t=this.h||void 0;i.Wa&&(i.h.info("Origin Trials enabled."),oi(pe(i.hb,i,e))),Le(0),i.W=e,i.aa=t||{},i.N=i.X,i.F=ta(i,null,i.W),bo(i)},Is.prototype.close=function(){Bi(this.g)},Is.prototype.u=function(i){if("string"==typeof i){var e={};e.__data__=i,_u(this.g,e)}else this.v?((e={}).__data__=ki(i),_u(this.g,e)):_u(this.g,i)},Is.prototype.M=function(){this.g.j=null,delete this.j,Bi(this.g),delete this.g,Is.Z.M.call(this)},Et(vu,$i),Et(Bu,Hi),Et(Mi,Ds),Mi.prototype.xa=function(){Mr(this.g,"a")},Mi.prototype.wa=function(i){Mr(this.g,new vu(i))},Mi.prototype.va=function(i){Mr(this.g,new Bu(i))},Mi.prototype.ua=function(){Mr(this.g,"b")},fa.prototype.createWebChannel=fa.prototype.g,Is.prototype.send=Is.prototype.u,Is.prototype.open=Is.prototype.m,Is.prototype.close=Is.prototype.close,tn.NO_ERROR=0,tn.TIMEOUT=8,tn.HTTP_ERROR=6,cn.COMPLETE="complete",Wn.EventType=Cr,Cr.OPEN="a",Cr.CLOSE="b",Cr.ERROR="c",Cr.MESSAGE="d",yn.prototype.listen=yn.prototype.N,Zr.prototype.listenOnce=Zr.prototype.O,Zr.prototype.getLastError=Zr.prototype.La,Zr.prototype.getLastErrorCode=Zr.prototype.Da,Zr.prototype.getStatus=Zr.prototype.ba,Zr.prototype.getResponseJson=Zr.prototype.Qa,Zr.prototype.getResponseText=Zr.prototype.ga,Zr.prototype.send=Zr.prototype.ea;var Eu=Lt.createWebChannelTransport=function(){return new fa},Fa=Lt.getStatEventTarget=function(){return Bs()},pa=Lt.ErrorCode=tn,Cs=Lt.EventType=cn,wu=Lt.Event=Pi,us=Lt.Stat={rb:0,ub:1,vb:2,Ob:3,Tb:4,Qb:5,Rb:6,Pb:7,Nb:8,Sb:9,PROXY:10,NOPROXY:11,Lb:12,Hb:13,Ib:14,Gb:15,Jb:16,Kb:17,nb:18,mb:19,ob:20},Da=Lt.FetchXmlHttpFactory=pt,jo=Lt.WebChannel=Wn,La=Lt.XhrIo=Zr;const Io="@firebase/firestore";class hi{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}hi.UNAUTHENTICATED=new hi(null),hi.GOOGLE_CREDENTIALS=new hi("google-credentials-uid"),hi.FIRST_PARTY=new hi("first-party-uid"),hi.MOCK_USER=new hi("mock-user");let No="9.8.3";const Qs=new Ne.Yd("@firebase/firestore");function Va(){return Qs.logLevel}function Xt(i,...e){if(Qs.logLevel<=Ne.in.DEBUG){const t=e.map(Co);Qs.debug(`Firestore (${No}): ${i}`,...t)}}function Jr(i,...e){if(Qs.logLevel<=Ne.in.ERROR){const t=e.map(Co);Qs.error(`Firestore (${No}): ${i}`,...t)}}function vi(i,...e){if(Qs.logLevel<=Ne.in.WARN){const t=e.map(Co);Qs.warn(`Firestore (${No}): ${i}`,...t)}}function Co(i){if("string"==typeof i)return i;try{return JSON.stringify(i)}catch{return i}}function _n(i="Unexpected state"){const e=`FIRESTORE (${No}) INTERNAL ASSERTION FAILED: `+i;throw Jr(e),new Error(e)}function zn(i,e){i||_n()}function En(i,e){return i}const b={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class D extends xe.ZR{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class I{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class k{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class G{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(hi.UNAUTHENTICATED))}shutdown(){}}class re{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class be{constructor(e){this.t=e,this.currentUser=hi.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){var o=this;let u=this.i;const h=W=>this.i!==u?(u=this.i,t(W)):Promise.resolve();let v=new I;this.o=()=>{this.i++,this.currentUser=this.u(),v.resolve(),v=new I,e.enqueueRetryable(()=>h(this.currentUser))};const M=()=>{const W=v;e.enqueueRetryable((0,Ee.Z)(function*(){yield W.promise,yield h(o.currentUser)}))},j=W=>{Xt("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=W,this.auth.addAuthTokenListener(this.o),M()};this.t.onInit(W=>j(W)),setTimeout(()=>{if(!this.auth){const W=this.t.getImmediate({optional:!0});W?j(W):(Xt("FirebaseAuthCredentialsProvider","Auth not yet detected"),v.resolve(),v=new I)}},0),M()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(o=>this.i!==e?(Xt("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):o?(zn("string"==typeof o.accessToken),new k(o.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return zn(null===e||"string"==typeof e),new hi(e)}}class Ue{constructor(e,t,o){this.type="FirstParty",this.user=hi.FIRST_PARTY,this.headers=new Map,this.headers.set("X-Goog-AuthUser",t);const u=e.auth.getAuthHeaderValueForFirstParty([]);u&&this.headers.set("Authorization",u),o&&this.headers.set("X-Goog-Iam-Authorization-Token",o)}}class Ft{constructor(e,t,o){this.h=e,this.l=t,this.m=o}getToken(){return Promise.resolve(new Ue(this.h,this.l,this.m))}start(e,t){e.enqueueRetryable(()=>t(hi.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Yt{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class fr{constructor(e){this.g=e,this.forceRefresh=!1,this.appCheck=null,this.p=null}start(e,t){const o=h=>{null!=h.error&&Xt("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${h.error.message}`);const v=h.token!==this.p;return this.p=h.token,Xt("FirebaseAppCheckTokenProvider",`Received ${v?"new":"existing"} token.`),v?t(h.token):Promise.resolve()};this.o=h=>{e.enqueueRetryable(()=>o(h))};const u=h=>{Xt("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=h,this.appCheck.addTokenListener(this.o)};this.g.onInit(h=>u(h)),setTimeout(()=>{if(!this.appCheck){const h=this.g.getImmediate({optional:!0});h?u(h):Xt("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(t=>t?(zn("string"==typeof t.token),this.p=t.token,new Yt(t.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function Ar(i){const e=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(i);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(t);else for(let o=0;oe?1:0}function Gs(i,e,t){return i.length===e.length&&i.every((o,u)=>t(o,e[u]))}function Js(i){return i+"\0"}class zr{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new D(b.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new D(b.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new D(b.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new D(b.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return zr.fromMillis(Date.now())}static fromDate(e){return zr.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),o=Math.floor(1e6*(e-1e3*t));return new zr(t,o)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?$n(this.nanoseconds,e.nanoseconds):$n(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class On{constructor(e){this.timestamp=e}static fromTimestamp(e){return new On(e)}static min(){return new On(new zr(0,0))}static max(){return new On(new zr(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class na{constructor(e,t,o){void 0===t?t=0:t>e.length&&_n(),void 0===o?o=e.length-t:o>e.length-t&&_n(),this.segments=e,this.offset=t,this.len=o}get length(){return this.len}isEqual(e){return 0===na.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof na?e.forEach(o=>{t.push(o)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return this.construct(this.segments,this.offset+(e=void 0===e?1:e),this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.lengthv)return 1}return e.lengtht.length?1:0}}class dr extends na{construct(e,t,o){return new dr(e,t,o)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const t=[];for(const o of e){if(o.indexOf("//")>=0)throw new D(b.INVALID_ARGUMENT,`Invalid segment (${o}). Paths must not contain // in them.`);t.push(...o.split("/").filter(u=>u.length>0))}return new dr(t)}static emptyPath(){return new dr([])}}const ga=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class Wi extends na{construct(e,t,o){return new Wi(e,t,o)}static isValidIdentifier(e){return ga.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),Wi.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new Wi(["__name__"])}static fromServerFormat(e){const t=[];let o="",u=0;const h=()=>{if(0===o.length)throw new D(b.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(o),o=""};let v=!1;for(;u=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===dr.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return dr.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new vn(new dr(e.slice()))}}class qr{constructor(e,t,o,u){this.indexId=e,this.collectionGroup=t,this.fields=o,this.indexState=u}}function tu(i){return i.fields.find(e=>2===e.kind)}function Ua(i){return i.fields.filter(e=>2!==e.kind)}qr.UNKNOWN_ID=-1;class Ba{constructor(e,t){this.fieldPath=e,this.kind=t}}class ra{constructor(e,t){this.sequenceNumber=e,this.offset=t}static empty(){return new ra(0,$o.min())}}function lc(i,e){const t=i.toTimestamp().seconds,o=i.toTimestamp().nanoseconds+1,u=On.fromTimestamp(1e9===o?new zr(t+1,0):new zr(t,o));return new $o(u,vn.empty(),e)}function cc(i){return new $o(i.readTime,i.key,-1)}class $o{constructor(e,t,o){this.readTime=e,this.documentKey=t,this.largestBatchId=o}static min(){return new $o(On.min(),vn.empty(),-1)}static max(){return new $o(On.max(),vn.empty(),-1)}}function ko(i,e){let t=i.readTime.compareTo(e.readTime);return 0!==t?t:(t=vn.comparator(i.documentKey,e.documentKey),0!==t?t:$n(i.largestBatchId,e.largestBatchId))}const dc="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class hc{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}function Di(i){return ja.apply(this,arguments)}function ja(){return ja=(0,Ee.Z)(function*(i){if(i.code!==b.FAILED_PRECONDITION||i.message!==dc)throw i;Xt("LocalStore","Unexpectedly lost primary lease")}),ja.apply(this,arguments)}class mt{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(t=>{this.isDone=!0,this.result=t,this.nextCallback&&this.nextCallback(t)},t=>{this.isDone=!0,this.error=t,this.catchCallback&&this.catchCallback(t)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&_n(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new mt((o,u)=>{this.nextCallback=h=>{this.wrapSuccess(e,h).next(o,u)},this.catchCallback=h=>{this.wrapFailure(t,h).next(o,u)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{const t=e();return t instanceof mt?t:mt.resolve(t)}catch(t){return mt.reject(t)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):mt.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):mt.reject(t)}static resolve(e){return new mt((t,o)=>{t(e)})}static reject(e){return new mt((t,o)=>{o(e)})}static waitFor(e){return new mt((t,o)=>{let u=0,h=0,v=!1;e.forEach(M=>{++u,M.next(()=>{++h,v&&h===u&&t()},j=>o(j))}),v=!0,h===u&&t()})}static or(e){let t=mt.resolve(!1);for(const o of e)t=t.next(u=>u?mt.resolve(u):o());return t}static forEach(e,t){const o=[];return e.forEach((u,h)=>{o.push(t.call(this,u,h))}),this.waitFor(o)}static mapArray(e,t){return new mt((o,u)=>{const h=e.length,v=new Array(h);let M=0;for(let j=0;j{v[W]=de,++M,M===h&&o(v)},de=>u(de))}})}static doWhile(e,t){return new mt((o,u)=>{const h=()=>{!0===e()?t().next(()=>{h()},u):o()};h()})}}class bu{constructor(e,t){this.action=e,this.transaction=t,this.aborted=!1,this.T=new I,this.transaction.oncomplete=()=>{this.T.resolve()},this.transaction.onabort=()=>{t.error?this.T.reject(new Ks(e,t.error)):this.T.resolve()},this.transaction.onerror=o=>{const u=ma(o.target.error);this.T.reject(new Ks(e,u))}}static open(e,t,o,u){try{return new bu(t,e.transaction(u,o))}catch(h){throw new Ks(t,h)}}get A(){return this.T.promise}abort(e){e&&this.T.reject(e),this.aborted||(Xt("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}R(){const e=this.transaction;this.aborted||"function"!=typeof e.commit||e.commit()}store(e){const t=this.transaction.objectStore(e);return new Ia(t)}}class Ls{constructor(e,t,o){this.name=e,this.version=t,this.P=o,12.2===Ls.v((0,xe.z$)())&&Jr("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(e){return Xt("SimpleDb","Removing database:",e),uo(window.indexedDB.deleteDatabase(e)).toPromise()}static V(){if(!(0,xe.hl)())return!1;if(Ls.S())return!0;const e=(0,xe.z$)(),t=Ls.v(e),o=00||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||o||h)}static S(){var e;return typeof process<"u"&&"YES"===(null===(e=process.env)||void 0===e?void 0:e.C)}static N(e,t){return e.store(t)}static v(e){const t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),o=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(o)}static D(e){const t=e.match(/Android ([\d.]+)/i),o=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(o)}k(e){var t=this;return(0,Ee.Z)(function*(){return t.db||(Xt("SimpleDb","Opening database:",t.name),t.db=yield new Promise((o,u)=>{const h=indexedDB.open(t.name,t.version);h.onsuccess=v=>{o(v.target.result)},h.onblocked=()=>{u(new Ks(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},h.onerror=v=>{const M=v.target.error;u("VersionError"===M.name?new D(b.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh."):"InvalidStateError"===M.name?new D(b.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+M):new Ks(e,M))},h.onupgradeneeded=v=>{Xt("SimpleDb",'Database "'+t.name+'" requires upgrade from version:',v.oldVersion),t.P.O(v.target.result,h.transaction,v.oldVersion,t.version).next(()=>{Xt("SimpleDb","Database upgrade to version "+t.version+" complete")})}})),t.M&&(t.db.onversionchange=o=>t.M(o)),t.db})()}F(e){this.M=e,this.db&&(this.db.onversionchange=t=>e(t))}runTransaction(e,t,o,u){var h=this;return(0,Ee.Z)(function*(){const v="readonly"===t;let M=0;for(;;){++M;try{h.db=yield h.k(e);const j=bu.open(h.db,e,v?"readonly":"readwrite",o),W=u(j).next(de=>(j.R(),de)).catch(de=>(j.abort(de),mt.reject(de))).toPromise();return W.catch(()=>{}),yield j.A,W}catch(j){const W="FirebaseError"!==j.name&&M<3;if(Xt("SimpleDb","Transaction failed with error:",j.message,"Retrying:",W),h.close(),!W)return Promise.reject(j)}}})()}close(){this.db&&this.db.close(),this.db=void 0}}class zs{constructor(e){this.$=e,this.B=!1,this.L=null}get isDone(){return this.B}get U(){return this.L}set cursor(e){this.$=e}done(){this.B=!0}q(e){this.L=e}delete(){return uo(this.$.delete())}}class Ks extends D{constructor(e,t){super(b.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${t}`),this.name="IndexedDbTransactionError"}}function Ws(i){return"IndexedDbTransactionError"===i.name}class Ia{constructor(e){this.store=e}put(e,t){let o;return void 0!==t?(Xt("SimpleDb","PUT",this.store.name,e,t),o=this.store.put(t,e)):(Xt("SimpleDb","PUT",this.store.name,"",e),o=this.store.put(e)),uo(o)}add(e){return Xt("SimpleDb","ADD",this.store.name,e,e),uo(this.store.add(e))}get(e){return uo(this.store.get(e)).next(t=>(void 0===t&&(t=null),Xt("SimpleDb","GET",this.store.name,e,t),t))}delete(e){return Xt("SimpleDb","DELETE",this.store.name,e),uo(this.store.delete(e))}count(){return Xt("SimpleDb","COUNT",this.store.name),uo(this.store.count())}K(e,t){const o=this.options(e,t);if(o.index||"function"!=typeof this.store.getAll){const u=this.cursor(o),h=[];return this.G(u,(v,M)=>{h.push(M)}).next(()=>h)}{const u=this.store.getAll(o.range);return new mt((h,v)=>{u.onerror=M=>{v(M.target.error)},u.onsuccess=M=>{h(M.target.result)}})}}j(e,t){const o=this.store.getAll(e,null===t?void 0:t);return new mt((u,h)=>{o.onerror=v=>{h(v.target.error)},o.onsuccess=v=>{u(v.target.result)}})}W(e,t){Xt("SimpleDb","DELETE ALL",this.store.name);const o=this.options(e,t);o.H=!1;const u=this.cursor(o);return this.G(u,(h,v,M)=>M.delete())}J(e,t){let o;t?o=e:(o={},t=e);const u=this.cursor(o);return this.G(u,t)}Y(e){const t=this.cursor({});return new mt((o,u)=>{t.onerror=h=>{const v=ma(h.target.error);u(v)},t.onsuccess=h=>{const v=h.target.result;v?e(v.primaryKey,v.value).next(M=>{M?v.continue():o()}):o()}})}G(e,t){const o=[];return new mt((u,h)=>{e.onerror=v=>{h(v.target.error)},e.onsuccess=v=>{const M=v.target.result;if(!M)return void u();const j=new zs(M),W=t(M.primaryKey,M.value,j);if(W instanceof mt){const de=W.catch(Fe=>(j.done(),mt.reject(Fe)));o.push(de)}j.isDone?u():null===j.U?M.continue():M.continue(j.U)}}).next(()=>mt.waitFor(o))}options(e,t){let o;return void 0!==e&&("string"==typeof e?o=e:t=e),{index:o,range:t}}cursor(e){let t="next";if(e.reverse&&(t="prev"),e.index){const o=this.store.index(e.index);return e.H?o.openKeyCursor(e.range,t):o.openCursor(e.range,t)}return this.store.openCursor(e.range,t)}}function uo(i){return new mt((e,t)=>{i.onsuccess=o=>{e(o.target.result)},i.onerror=o=>{const u=ma(o.target.error);t(u)}})}let $a=!1;function ma(i){const e=Ls.v((0,xe.z$)());if(e>=12.2&&e<13){const t="An internal error was encountered in the Indexed Database server";if(i.message.indexOf(t)>=0){const o=new D("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${t}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return $a||($a=!0,setTimeout(()=>{throw o},0)),o}}return i}class fc{constructor(e,t){this.asyncQueue=e,this.X=t,this.task=null}start(){}stop(){this.task&&(this.task.cancel(),this.task=null)}get started(){return null!==this.task}Z(e){var t=this;Xt("IndexBackiller",`Scheduled in ${e}ms`),this.task=this.asyncQueue.enqueueAfterDelay("index_backfill",e,(0,Ee.Z)(function*(){t.task=null;try{Xt("IndexBackiller",`Documents written: ${yield t.X.tt()}`)}catch(o){Ws(o)?Xt("IndexBackiller","Ignoring IndexedDB error during index backfill: ",o):yield Di(o)}yield t.Z(1)}))}}class sd{constructor(e,t){this.localStore=e,this.persistence=t}tt(e=50){var t=this;return(0,Ee.Z)(function*(){return t.persistence.runTransaction("Backfill Indexes","readwrite-primary",o=>t.et(o,e))})()}et(e,t){const o=new Set;let u=t,h=!0;return mt.doWhile(()=>!0===h&&u>0,()=>this.localStore.indexManager.getNextCollectionGroupToUpdate(e).next(v=>{if(null!==v&&!o.has(v))return Xt("IndexBackiller",`Processing collection: ${v}`),this.nt(e,v,u).next(M=>{u-=M,o.add(v)});h=!1})).next(()=>t-u)}nt(e,t,o){return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e,t).next(u=>this.localStore.localDocuments.getNextDocuments(e,t,u,o).next(h=>{const v=h.changes;return this.localStore.indexManager.updateIndexEntries(e,v).next(()=>this.st(u,h)).next(M=>(Xt("IndexBackiller",`Updating offset: ${M}`),this.localStore.indexManager.updateCollectionGroup(e,t,M))).next(()=>v.size)}))}st(e,t){let o=e;return t.changes.forEach((u,h)=>{const v=cc(h);ko(v,o)>0&&(o=v)}),new $o(o.readTime,o.documentKey,Math.max(t.batchId,e.largestBatchId))}}class To{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=o=>this.it(o),this.rt=o=>t.writeSequenceNumber(o))}it(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.rt&&this.rt(e),e}}function ju(i){let e=0;for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&e++;return e}function ts(i,e){for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&e(t,i[t])}function Ho(i){for(const e in i)if(Object.prototype.hasOwnProperty.call(i,e))return!1;return!0}To.ot=-1;class Xr{constructor(e,t){this.comparator=e,this.root=t||y.EMPTY}insert(e,t){return new Xr(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,y.BLACK,null,null))}remove(e){return new Xr(this.comparator,this.root.remove(e,this.comparator).copy(null,null,y.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const o=this.comparator(e,t.key);if(0===o)return t.value;o<0?t=t.left:o>0&&(t=t.right)}return null}indexOf(e){let t=0,o=this.root;for(;!o.isEmpty();){const u=this.comparator(e,o.key);if(0===u)return t+o.left.size;u<0?o=o.left:(t+=o.left.size+1,o=o.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,o)=>(e(t,o),!1))}toString(){const e=[];return this.inorderTraversal((t,o)=>(e.push(`${t}:${o}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new N(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new N(this.root,e,this.comparator,!1)}getReverseIterator(){return new N(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new N(this.root,e,this.comparator,!0)}}class N{constructor(e,t,o,u){this.isReverse=u,this.nodeStack=[];let h=1;for(;!e.isEmpty();)if(h=t?o(e.key,t):1,t&&u&&(h*=-1),h<0)e=this.isReverse?e.left:e.right;else{if(0===h){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class y{constructor(e,t,o,u,h){this.key=e,this.value=t,this.color=o??y.RED,this.left=u??y.EMPTY,this.right=h??y.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,o,u,h){return new y(e??this.key,t??this.value,o??this.color,u??this.left,h??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,o){let u=this;const h=o(e,u.key);return u=h<0?u.copy(null,null,null,u.left.insert(e,t,o),null):0===h?u.copy(null,t,null,null,null):u.copy(null,null,null,null,u.right.insert(e,t,o)),u.fixUp()}removeMin(){if(this.left.isEmpty())return y.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,t){let o,u=this;if(t(e,u.key)<0)u.left.isEmpty()||u.left.isRed()||u.left.left.isRed()||(u=u.moveRedLeft()),u=u.copy(null,null,null,u.left.remove(e,t),null);else{if(u.left.isRed()&&(u=u.rotateRight()),u.right.isEmpty()||u.right.isRed()||u.right.left.isRed()||(u=u.moveRedRight()),0===t(e,u.key)){if(u.right.isEmpty())return y.EMPTY;o=u.right.min(),u=u.copy(o.key,o.value,null,null,u.right.removeMin())}u=u.copy(null,null,null,null,u.right.remove(e,t))}return u.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,y.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,y.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw _n();const e=this.left.check();if(e!==this.right.check())throw _n();return e+(this.isRed()?0:1)}}y.EMPTY=null,y.RED=!0,y.BLACK=!1,y.EMPTY=new class{constructor(){this.size=0}get key(){throw _n()}get value(){throw _n()}get color(){throw _n()}get left(){throw _n()}get right(){throw _n()}copy(i,e,t,o,u){return this}insert(i,e,t){return new y(i,e)}remove(i,e){return this}isEmpty(){return!0}inorderTraversal(i){return!1}reverseTraversal(i){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class p{constructor(e){this.comparator=e,this.data=new Xr(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,o)=>(e(t),!1))}forEachInRange(e,t){const o=this.data.getIteratorFrom(e[0]);for(;o.hasNext();){const u=o.getNext();if(this.comparator(u.key,e[1])>=0)return;t(u.key)}}forEachWhile(e,t){let o;for(o=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();o.hasNext();)if(!e(o.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new T(this.data.getIterator())}getIteratorFrom(e){return new T(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size{t=t.add(o)}),t}isEqual(e){if(!(e instanceof p)||this.size!==e.size)return!1;const t=this.data.getIterator(),o=e.data.getIterator();for(;t.hasNext();){const u=t.getNext().key,h=o.getNext().key;if(0!==this.comparator(u,h))return!1}return!0}toArray(){const e=[];return this.forEach(t=>{e.push(t)}),e}toString(){const e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){const t=new p(this.comparator);return t.data=e,t}}class T{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}function H(i){return i.hasNext()?i.getNext():void 0}class ne{constructor(e){this.fields=e,e.sort(Wi.comparator)}static empty(){return new ne([])}unionWith(e){let t=new p(Wi.comparator);for(const o of this.fields)t=t.add(o);for(const o of e)t=t.add(o);return new ne(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return Gs(this.fields,e.fields,(t,o)=>t.isEqual(o))}}class Te{constructor(e){this.binaryString=e}static fromBase64String(e){const t=atob(e);return new Te(t)}static fromUint8Array(e){const t=function(o){let u="";for(let h=0;he=Number.MIN_SAFE_INTEGER}const kn={mapValue:{fields:{__type__:{stringValue:"__max__"}}}},Vn={nullValue:"NULL_VALUE"};function xn(i){return"nullValue"in i?0:"booleanValue"in i?1:"integerValue"in i||"doubleValue"in i?2:"timestampValue"in i?3:"stringValue"in i?5:"bytesValue"in i?6:"referenceValue"in i?7:"geoPointValue"in i?8:"arrayValue"in i?9:"mapValue"in i?F(i)?4:Zi(i)?9007199254740991:10:_n()}function mr(i,e){if(i===e)return!0;const t=xn(i);if(t!==xn(e))return!1;switch(t){case 0:case 9007199254740991:return!0;case 1:return i.booleanValue===e.booleanValue;case 4:return ue(i).isEqual(ue(e));case 3:return function(o,u){if("string"==typeof o.timestampValue&&"string"==typeof u.timestampValue&&o.timestampValue.length===u.timestampValue.length)return o.timestampValue===u.timestampValue;const h=wt(o.timestampValue),v=wt(u.timestampValue);return h.seconds===v.seconds&&h.nanos===v.nanos}(i,e);case 5:return i.stringValue===e.stringValue;case 6:return u=e,x(i.bytesValue).isEqual(x(u.bytesValue));case 7:return i.referenceValue===e.referenceValue;case 8:return function(o,u){return Bt(o.geoPointValue.latitude)===Bt(u.geoPointValue.latitude)&&Bt(o.geoPointValue.longitude)===Bt(u.geoPointValue.longitude)}(i,e);case 2:return function(o,u){if("integerValue"in o&&"integerValue"in u)return Bt(o.integerValue)===Bt(u.integerValue);if("doubleValue"in o&&"doubleValue"in u){const h=Bt(o.doubleValue),v=Bt(u.doubleValue);return h===v?an(h)===an(v):isNaN(h)&&isNaN(v)}return!1}(i,e);case 9:return Gs(i.arrayValue.values||[],e.arrayValue.values||[],mr);case 10:return function(o,u){const h=o.mapValue.fields||{},v=u.mapValue.fields||{};if(ju(h)!==ju(v))return!1;for(const M in h)if(h.hasOwnProperty(M)&&(void 0===v[M]||!mr(h[M],v[M])))return!1;return!0}(i,e);default:return _n()}var u}function fi(i,e){return void 0!==(i.values||[]).find(t=>mr(t,e))}function Ii(i,e){if(i===e)return 0;const t=xn(i),o=xn(e);if(t!==o)return $n(t,o);switch(t){case 0:case 9007199254740991:return 0;case 1:return $n(i.booleanValue,e.booleanValue);case 2:return function(u,h){const v=Bt(u.integerValue||u.doubleValue),M=Bt(h.integerValue||h.doubleValue);return vM?1:v===M?0:isNaN(v)?isNaN(M)?0:-1:1}(i,e);case 3:return Xs(i.timestampValue,e.timestampValue);case 4:return Xs(ue(i),ue(e));case 5:return $n(i.stringValue,e.stringValue);case 6:return function(u,h){const v=x(u),M=x(h);return v.compareTo(M)}(i.bytesValue,e.bytesValue);case 7:return function(u,h){const v=u.split("/"),M=h.split("/");for(let j=0;je.mapValue.fields[t]=pr(o)),e}if(i.arrayValue){const e={arrayValue:{values:[]}};for(let t=0;t<(i.arrayValue.values||[]).length;++t)e.arrayValue.values[t]=pr(i.arrayValue.values[t]);return e}return Object.assign({},i)}function Zi(i){return"__max__"===(((i.mapValue||{}).fields||{}).__type__||{}).stringValue}function Fo(i){return"nullValue"in i?Vn:"booleanValue"in i?{booleanValue:!1}:"integerValue"in i||"doubleValue"in i?{doubleValue:NaN}:"timestampValue"in i?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"stringValue"in i?{stringValue:""}:"bytesValue"in i?{bytesValue:""}:"referenceValue"in i?ls(tt.empty(),vn.empty()):"geoPointValue"in i?{geoPointValue:{latitude:-90,longitude:-180}}:"arrayValue"in i?{arrayValue:{}}:"mapValue"in i?{mapValue:{}}:_n()}function Ao(i){return"nullValue"in i?{booleanValue:!1}:"booleanValue"in i?{doubleValue:NaN}:"integerValue"in i||"doubleValue"in i?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"timestampValue"in i?{stringValue:""}:"stringValue"in i?{bytesValue:""}:"bytesValue"in i?ls(tt.empty(),vn.empty()):"referenceValue"in i?{geoPointValue:{latitude:-90,longitude:-180}}:"geoPointValue"in i?{arrayValue:{}}:"arrayValue"in i?{mapValue:{}}:"mapValue"in i?kn:_n()}function ya(i,e){const t=Ii(i.value,e.value);return 0!==t?t:i.inclusive&&!e.inclusive?-1:!i.inclusive&&e.inclusive?1:0}function pi(i,e){const t=Ii(i.value,e.value);return 0!==t?t:i.inclusive&&!e.inclusive?1:!i.inclusive&&e.inclusive?-1:0}class qi{constructor(e){this.value=e}static empty(){return new qi({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let o=0;o{if(!t.isImmediateParentOf(M)){const j=this.getFieldsMap(t);this.applyChanges(j,o,u),o={},u=[],t=M.popLast()}v?o[M.lastSegment()]=pr(v):u.push(M.lastSegment())});const h=this.getFieldsMap(t);this.applyChanges(h,o,u)}delete(e){const t=this.field(e.popLast());Qn(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return mr(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let o=0;oe[u]=h);for(const u of o)delete e[u]}clone(){return new qi(pr(this.value))}}function il(i){const e=[];return ts(i.fields,(t,o)=>{const u=new Wi([t]);if(Qn(o)){const h=il(o.mapValue).fields;if(0===h.length)e.push(u);else for(const v of h)e.push(u.child(v))}else e.push(u)}),new ne(e)}class Er{constructor(e,t,o,u,h,v){this.key=e,this.documentType=t,this.version=o,this.readTime=u,this.data=h,this.documentState=v}static newInvalidDocument(e){return new Er(e,0,On.min(),On.min(),qi.empty(),0)}static newFoundDocument(e,t,o){return new Er(e,1,t,On.min(),o,0)}static newNoDocument(e,t){return new Er(e,2,t,On.min(),qi.empty(),0)}static newUnknownDocument(e,t){return new Er(e,3,t,On.min(),qi.empty(),2)}convertToFoundDocument(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=qi.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=qi.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=On.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof Er&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Er(this.key,this.documentType,this.version,this.readTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class Ha{constructor(e,t=null,o=[],u=[],h=null,v=null,M=null){this.path=e,this.collectionGroup=t,this.orderBy=o,this.filters=u,this.limit=h,this.startAt=v,this.endAt=M,this.ut=null}}function co(i,e=null,t=[],o=[],u=null,h=null,v=null){return new Ha(i,e,t,o,u,h,v)}function Ca(i){const e=En(i);if(null===e.ut){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:",t+=e.filters.map(o=>{return(u=o).field.canonicalString()+u.op.toString()+eo(u.value);var u}).join(","),t+="|ob:",t+=e.orderBy.map(o=>{return(u=o).field.canonicalString()+u.dir;var u}).join(","),Ot(e.limit)||(t+="|l:",t+=e.limit),e.startAt&&(t+="|lb:",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map(o=>eo(o)).join(",")),e.endAt&&(t+="|ub:",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map(o=>eo(o)).join(",")),e.ut=t}return e.ut}function $u(i,e){if(i.limit!==e.limit||i.orderBy.length!==e.orderBy.length)return!1;for(let u=0;ut instanceof Zs&&t.field.isEqual(e))}function sl(i,e,t){let o=Vn,u=!0;for(const h of nu(i,e)){let v=Vn,M=!0;switch(h.op){case"<":case"<=":v=Fo(h.value);break;case"==":case"in":case">=":v=h.value;break;case">":v=h.value,M=!1;break;case"!=":case"not-in":v=Vn}ya({value:o,inclusive:u},{value:v,inclusive:M})<0&&(o=v,u=M)}if(null!==t)for(let h=0;h=":case">":v=Ao(h.value),M=!1;break;case"==":case"in":case"<=":v=h.value;break;case"<":v=h.value,M=!1;break;case"!=":case"not-in":v=kn}pi({value:o,inclusive:u},{value:v,inclusive:M})>0&&(o=v,u=M)}if(null!==t)for(let h=0;h0&&(o=v,u=t.inclusive);break}return{value:o,inclusive:u}}class Zs extends class{}{constructor(e,t,o){super(),this.field=e,this.op=t,this.value=o}static create(e,t,o){return e.isKeyField()?"in"===t||"not-in"===t?this.ct(e,t,o):new Th(e,t,o):"array-contains"===t?new mc(e,o):"in"===t?new al(e,o):"not-in"===t?new Sh(e,o):"array-contains-any"===t?new od(e,o):new Zs(e,t,o)}static ct(e,t,o){return"in"===t?new Ah(e,o):new ip(e,o)}matches(e){const t=e.data.field(this.field);return"!="===this.op?null!==t&&this.at(Ii(t,this.value)):null!==t&&xn(this.value)===xn(t)&&this.at(Ii(t,this.value))}at(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return _n()}}ht(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}class Th extends Zs{constructor(e,t,o){super(e,t,o),this.key=vn.fromName(o.referenceValue)}matches(e){const t=vn.comparator(e.key,this.key);return this.at(t)}}class Ah extends Zs{constructor(e,t){super(e,"in",t),this.keys=ol(0,t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class ip extends Zs{constructor(e,t){super(e,"not-in",t),this.keys=ol(0,t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function ol(i,e){var t;return((null===(t=e.arrayValue)||void 0===t?void 0:t.values)||[]).map(o=>vn.fromName(o.referenceValue))}class mc extends Zs{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return lo(t)&&fi(t.arrayValue,this.value)}}class al extends Zs{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return null!==t&&fi(this.value.arrayValue,t)}}class Sh extends Zs{constructor(e,t){super(e,"not-in",t)}matches(e){if(fi(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return null!==t&&!fi(this.value.arrayValue,t)}}class od extends Zs{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!lo(t)||!t.arrayValue.values)&&t.arrayValue.values.some(o=>fi(this.value.arrayValue,o))}}class Hu{constructor(e,t){this.position=e,this.inclusive=t}}class ru{constructor(e,t="asc"){this.field=e,this.dir=t}}function ad(i,e){return i.dir===e.dir&&i.field.isEqual(e.field)}function Al(i,e,t){let o=0;for(let u=0;u0?i.explicitOrderBy[0].field:null}function cd(i){for(const e of i.filters)if(e.ht())return e.field;return null}function dd(i){return null!==i.collectionGroup}function Go(i){const e=En(i);if(null===e.lt){e.lt=[];const t=cd(e),o=ld(e);if(null!==t&&null===o)t.isKeyField()||e.lt.push(new ru(t)),e.lt.push(new ru(Wi.keyField(),"asc"));else{let u=!1;for(const h of e.explicitOrderBy)e.lt.push(h),h.field.isKeyField()&&(u=!0);if(!u){const h=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e.lt.push(new ru(Wi.keyField(),h))}}}return e.lt}function ho(i){const e=En(i);if(!e.ft)if("F"===e.limitType)e.ft=co(e.path,e.collectionGroup,Go(e),e.filters,e.limit,e.startAt,e.endAt);else{const t=[];for(const h of Go(e))t.push(new ru(h.field,"desc"===h.dir?"asc":"desc"));const o=e.endAt?new Hu(e.endAt.position,e.endAt.inclusive):null,u=e.startAt?new Hu(e.startAt.position,e.startAt.inclusive):null;e.ft=co(e.path,e.collectionGroup,t,e.filters,e.limit,o,u)}return e.ft}function hd(i,e,t){return new Ga(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),e,t,i.startAt,i.endAt)}function Sl(i,e){return $u(ho(i),ho(e))&&i.limitType===e.limitType}function Mh(i){return`${Ca(ho(i))}|lt:${i.limitType}`}function Ml(i){return`Query(target=${function Tl(i){let e=i.path.canonicalString();return null!==i.collectionGroup&&(e+=" collectionGroup="+i.collectionGroup),i.filters.length>0&&(e+=`, filters: [${i.filters.map(t=>{return`${(o=t).field.canonicalString()} ${o.op} ${eo(o.value)}`;var o}).join(", ")}]`),Ot(i.limit)||(e+=", limit: "+i.limit),i.orderBy.length>0&&(e+=`, orderBy: [${i.orderBy.map(t=>{return`${(o=t).field.canonicalString()} (${o.dir})`;var o}).join(", ")}]`),i.startAt&&(e+=", startAt: ",e+=i.startAt.inclusive?"b:":"a:",e+=i.startAt.position.map(t=>eo(t)).join(",")),i.endAt&&(e+=", endAt: ",e+=i.endAt.inclusive?"a:":"b:",e+=i.endAt.position.map(t=>eo(t)).join(",")),`Target(${e})`}(ho(i))}; limitType=${i.limitType})`}function fd(i,e){return e.isFoundDocument()&&function(t,o){const u=o.key.path;return null!==t.collectionGroup?o.key.hasCollectionId(t.collectionGroup)&&t.path.isPrefixOf(u):vn.isDocumentKey(t.path)?t.path.isEqual(u):t.path.isImmediateParentOf(u)}(i,e)&&function(t,o){for(const u of t.explicitOrderBy)if(!u.field.isKeyField()&&null===o.data.field(u.field))return!1;return!0}(i,e)&&function(t,o){for(const u of t.filters)if(!u.matches(o))return!1;return!0}(i,e)&&(o=e,!((t=i).startAt&&!function(u,h,v){const M=Al(u,h,v);return u.inclusive?M<=0:M<0}(t.startAt,Go(t),o)||t.endAt&&!function(u,h,v){const M=Al(u,h,v);return u.inclusive?M>=0:M>0}(t.endAt,Go(t),o)));var t,o}function xh(i){return i.collectionGroup||(i.path.length%2==1?i.path.lastSegment():i.path.get(i.path.length-2))}function pd(i){return(e,t)=>{let o=!1;for(const u of Go(i)){const h=sp(u,e,t);if(0!==h)return h;o=o||u.field.isKeyField()}return 0}}function sp(i,e,t){const o=i.field.isKeyField()?vn.comparator(e.key,t.key):function(u,h,v){const M=h.data.field(u),j=v.data.field(u);return null!==M&&null!==j?Ii(M,j):_n()}(i.field,e,t);switch(i.dir){case"asc":return o;case"desc":return-1*o;default:return _n()}}function Oh(i,e){if(i.dt){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:an(e)?"-0":e}}function gd(i){return{integerValue:""+i}}function Rh(i,e){return Sn(e)?gd(e):Oh(i,e)}class md{constructor(){this._=void 0}}function op(i,e,t){return i instanceof Lo?function(o,u){const h={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:o.seconds,nanos:o.nanoseconds}}}};return u&&(h.fields.__previous_value__=u),{mapValue:h}}(t,e):i instanceof sa?yd(i,e):i instanceof su?_d(i,e):function(o,u){const h=Ol(o,u),v=ap(h)+ap(o._t);return Vs(h)&&Vs(o._t)?gd(v):Oh(o.wt,v)}(i,e)}function xl(i,e,t){return i instanceof sa?yd(i,e):i instanceof su?_d(i,e):t}function Ol(i,e){return i instanceof Gu?Vs(t=e)||(o=t)&&"doubleValue"in o?e:{integerValue:0}:null;var o,t}class Lo extends md{}class sa extends md{constructor(e){super(),this.elements=e}}function yd(i,e){const t=Ph(e);for(const o of i.elements)t.some(u=>mr(u,o))||t.push(o);return{arrayValue:{values:t}}}class su extends md{constructor(e){super(),this.elements=e}}function _d(i,e){let t=Ph(e);for(const o of i.elements)t=t.filter(u=>!mr(u,o));return{arrayValue:{values:t}}}class Gu extends md{constructor(e,t){super(),this.wt=e,this._t=t}}function ap(i){return Bt(i.integerValue||i.doubleValue)}function Ph(i){return lo(i)&&i.arrayValue.values?i.arrayValue.values.slice():[]}class Du{constructor(e,t){this.field=e,this.transform=t}}class Ed{constructor(e,t){this.version=e,this.transformResults=t}}class cs{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new cs}static exists(e){return new cs(void 0,e)}static updateTime(e){return new cs(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function Nh(i,e){return void 0!==i.updateTime?e.isFoundDocument()&&e.version.isEqual(i.updateTime):void 0===i.exists||i.exists===e.isFoundDocument()}class Ta{}function kh(i,e){if(!i.hasLocalMutations||e&&0===e.fields.length)return null;if(null===e)return i.isNoDocument()?new Iu(i.key,cs.none()):new ou(i.key,i.data,cs.none());{const t=i.data,o=qi.empty();let u=new p(Wi.comparator);for(let h of e.fields)if(!u.has(h)){let v=t.field(h);null===v&&h.length>1&&(h=h.popLast(),v=t.field(h)),null===v?o.delete(h):o.set(h,v),u=u.add(h)}return new za(i.key,o,new ne(u.toArray()),cs.none())}}function up(i,e,t){i instanceof ou?function(o,u,h){const v=o.value.clone(),M=Fh(o.fieldTransforms,u,h.transformResults);v.setAll(M),u.convertToFoundDocument(h.version,v).setHasCommittedMutations()}(i,e,t):i instanceof za?function(o,u,h){if(!Nh(o.precondition,u))return void u.convertToUnknownDocument(h.version);const v=Fh(o.fieldTransforms,u,h.transformResults),M=u.data;M.setAll(ll(o)),M.setAll(v),u.convertToFoundDocument(h.version,M).setHasCommittedMutations()}(i,e,t):e.convertToNoDocument(t.version).setHasCommittedMutations()}function zu(i,e,t,o){return i instanceof ou?function(u,h,v,M){if(!Nh(u.precondition,h))return v;const j=u.value.clone(),W=ds(u.fieldTransforms,M,h);return j.setAll(W),h.convertToFoundDocument(h.version,j).setHasLocalMutations(),null}(i,e,t,o):i instanceof za?function(u,h,v,M){if(!Nh(u.precondition,h))return v;const j=ds(u.fieldTransforms,M,h),W=h.data;return W.setAll(ll(u)),W.setAll(j),h.convertToFoundDocument(h.version,W).setHasLocalMutations(),null===v?null:v.unionWith(u.fieldMask.fields).unionWith(u.fieldTransforms.map(de=>de.field))}(i,e,t,o):(v=t,Nh(i.precondition,h=e)?(h.convertToNoDocument(h.version).setHasLocalMutations(),null):v);var h,v}function lp(i,e){let t=null;for(const o of i.fieldTransforms){const u=e.data.field(o.field),h=Ol(o.transform,u||null);null!=h&&(null===t&&(t=qi.empty()),t.set(o.field,h))}return t||null}function Rl(i,e){return i.type===e.type&&!!i.key.isEqual(e.key)&&!!i.precondition.isEqual(e.precondition)&&(o=e.fieldTransforms,!!(void 0===(t=i.fieldTransforms)&&void 0===o||t&&o&&Gs(t,o,(u,h)=>function vd(i,e){return i.field.isEqual(e.field)&&(o=e.transform,(t=i.transform)instanceof sa&&o instanceof sa||t instanceof su&&o instanceof su?Gs(t.elements,o.elements,mr):t instanceof Gu&&o instanceof Gu?mr(t._t,o._t):t instanceof Lo&&o instanceof Lo);var t,o}(u,h))))&&(0===i.type?i.value.isEqual(e.value):1!==i.type||i.data.isEqual(e.data)&&i.fieldMask.isEqual(e.fieldMask));var t,o}class ou extends Ta{constructor(e,t,o,u=[]){super(),this.key=e,this.value=t,this.precondition=o,this.fieldTransforms=u,this.type=0}getFieldMask(){return null}}class za extends Ta{constructor(e,t,o,u,h=[]){super(),this.key=e,this.data=t,this.fieldMask=o,this.precondition=u,this.fieldTransforms=h,this.type=1}getFieldMask(){return this.fieldMask}}function ll(i){const e=new Map;return i.fieldMask.fields.forEach(t=>{if(!t.isEmpty()){const o=i.data.field(t);e.set(t,o)}}),e}function Fh(i,e,t){const o=new Map;zn(i.length===t.length);for(let u=0;u{for(const[u,h]of o)e(u,h)})}isEmpty(){return Ho(this.inner)}size(){return this.innerSize}}const cp=new Xr(vn.comparator);function oa(){return cp}const Id=new Xr(vn.comparator);function Aa(...i){let e=Id;for(const t of i)e=e.insert(t.key,t);return e}function _c(i){let e=Id;return i.forEach((t,o)=>e=e.insert(t,o.overlayedDocument)),e}function Wa(){return au()}function Ku(){return au()}function au(){return new Ka(i=>i.toString(),(i,e)=>i.isEqual(e))}const dp=new Xr(vn.comparator),hp=new p(vn.comparator);function wr(...i){let e=hp;for(const t of i)e=e.add(t);return e}const Vh=new p($n);function vc(){return Vh}class Pl{constructor(e,t,o,u,h){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=o,this.documentUpdates=u,this.resolvedLimboDocuments=h}static createSynthesizedRemoteEventForCurrentChange(e,t){const o=new Map;return o.set(e,Nl.createSynthesizedTargetChangeForCurrentChange(e,t)),new Pl(On.min(),o,vc(),oa(),wr())}}class Nl{constructor(e,t,o,u,h){this.resumeToken=e,this.current=t,this.addedDocuments=o,this.modifiedDocuments=u,this.removedDocuments=h}static createSynthesizedTargetChangeForCurrentChange(e,t){return new Nl(Te.EMPTY_BYTE_STRING,t,wr(),wr(),wr())}}class Cu{constructor(e,t,o,u){this.gt=e,this.removedTargetIds=t,this.key=o,this.yt=u}}class Ec{constructor(e,t){this.targetId=e,this.It=t}}class Cd{constructor(e,t,o=Te.EMPTY_BYTE_STRING,u=null){this.state=e,this.targetIds=t,this.resumeToken=o,this.cause=u}}class Uh{constructor(){this.Tt=0,this.Et=Bh(),this.At=Te.EMPTY_BYTE_STRING,this.Rt=!1,this.bt=!0}get current(){return this.Rt}get resumeToken(){return this.At}get Pt(){return 0!==this.Tt}get vt(){return this.bt}Vt(e){e.approximateByteSize()>0&&(this.bt=!0,this.At=e)}St(){let e=wr(),t=wr(),o=wr();return this.Et.forEach((u,h)=>{switch(h){case 0:e=e.add(u);break;case 2:t=t.add(u);break;case 1:o=o.add(u);break;default:_n()}}),new Nl(this.At,this.Rt,e,t,o)}Dt(){this.bt=!1,this.Et=Bh()}Ct(e,t){this.bt=!0,this.Et=this.Et.insert(e,t)}xt(e){this.bt=!0,this.Et=this.Et.remove(e)}Nt(){this.Tt+=1}kt(){this.Tt-=1}Ot(){this.bt=!0,this.Rt=!0}}class fp{constructor(e){this.Mt=e,this.Ft=new Map,this.$t=oa(),this.Bt=Td(),this.Lt=new p($n)}Ut(e){for(const t of e.gt)e.yt&&e.yt.isFoundDocument()?this.qt(t,e.yt):this.Kt(t,e.key,e.yt);for(const t of e.removedTargetIds)this.Kt(t,e.key,e.yt)}Gt(e){this.forEachTarget(e,t=>{const o=this.Qt(t);switch(e.state){case 0:this.jt(t)&&o.Vt(e.resumeToken);break;case 1:o.kt(),o.Pt||o.Dt(),o.Vt(e.resumeToken);break;case 2:o.kt(),o.Pt||this.removeTarget(t);break;case 3:this.jt(t)&&(o.Ot(),o.Vt(e.resumeToken));break;case 4:this.jt(t)&&(this.Wt(t),o.Vt(e.resumeToken));break;default:_n()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Ft.forEach((o,u)=>{this.jt(u)&&t(u)})}zt(e){const t=e.targetId,o=e.It.count,u=this.Ht(t);if(u){const h=u.target;if(pc(h))if(0===o){const v=new vn(h.path);this.Kt(t,v,Er.newNoDocument(v,On.min()))}else zn(1===o);else this.Jt(t)!==o&&(this.Wt(t),this.Lt=this.Lt.add(t))}}Yt(e){const t=new Map;this.Ft.forEach((h,v)=>{const M=this.Ht(v);if(M){if(h.current&&pc(M.target)){const j=new vn(M.target.path);null!==this.$t.get(j)||this.Xt(v,j)||this.Kt(v,j,Er.newNoDocument(j,e))}h.vt&&(t.set(v,h.St()),h.Dt())}});let o=wr();this.Bt.forEach((h,v)=>{let M=!0;v.forEachWhile(j=>{const W=this.Ht(j);return!W||2===W.purpose||(M=!1,!1)}),M&&(o=o.add(h))}),this.$t.forEach((h,v)=>v.setReadTime(e));const u=new Pl(e,t,this.Lt,this.$t,o);return this.$t=oa(),this.Bt=Td(),this.Lt=new p($n),u}qt(e,t){if(!this.jt(e))return;const o=this.Xt(e,t.key)?2:0;this.Qt(e).Ct(t.key,o),this.$t=this.$t.insert(t.key,t),this.Bt=this.Bt.insert(t.key,this.Zt(t.key).add(e))}Kt(e,t,o){if(!this.jt(e))return;const u=this.Qt(e);this.Xt(e,t)?u.Ct(t,1):u.xt(t),this.Bt=this.Bt.insert(t,this.Zt(t).delete(e)),o&&(this.$t=this.$t.insert(t,o))}removeTarget(e){this.Ft.delete(e)}Jt(e){const t=this.Qt(e).St();return this.Mt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Nt(e){this.Qt(e).Nt()}Qt(e){let t=this.Ft.get(e);return t||(t=new Uh,this.Ft.set(e,t)),t}Zt(e){let t=this.Bt.get(e);return t||(t=new p($n),this.Bt=this.Bt.insert(e,t)),t}jt(e){const t=null!==this.Ht(e);return t||Xt("WatchChangeAggregator","Detected inactive target",e),t}Ht(e){const t=this.Ft.get(e);return t&&t.Pt?null:this.Mt.te(e)}Wt(e){this.Ft.set(e,new Uh),this.Mt.getRemoteKeysForTarget(e).forEach(t=>{this.Kt(e,t,null)})}Xt(e,t){return this.Mt.getRemoteKeysForTarget(e).has(t)}}function Td(){return new Xr(vn.comparator)}function Bh(){return new Xr(vn.comparator)}const jh={asc:"ASCENDING",desc:"DESCENDING"},fo={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"};class kl{constructor(e,t){this.databaseId=e,this.dt=t}}function Wu(i,e){return i.dt?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function wc(i,e){return i.dt?e.toBase64():e.toUint8Array()}function to(i,e){return Wu(i,e.toTimestamp())}function hs(i){return zn(!!i),On.fromTimestamp(function(e){const t=wt(e);return new zr(t.seconds,t.nanos)}(i))}function po(i,e){return(t=i,new dr(["projects",t.projectId,"databases",t.database])).child("documents").child(e).canonicalString();var t}function cl(i){const e=dr.fromString(i);return zn(xd(e)),e}function dl(i,e){return po(i.databaseId,e.path)}function Sa(i,e){const t=cl(e);if(t.get(1)!==i.databaseId.projectId)throw new D(b.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+t.get(1)+" vs "+i.databaseId.projectId);if(t.get(3)!==i.databaseId.database)throw new D(b.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+t.get(3)+" vs "+i.databaseId.database);return new vn(bc(t))}function Fl(i,e){return po(i.databaseId,e)}function Ll(i){const e=cl(i);return 4===e.length?dr.emptyPath():bc(e)}function Vl(i){return new dr(["projects",i.databaseId.projectId,"databases",i.databaseId.database]).canonicalString()}function bc(i){return zn(i.length>4&&"documents"===i.get(4)),i.popFirst(5)}function $h(i,e,t){return{name:dl(i,e),fields:t.value.mapValue.fields}}function uu(i,e,t){const o=Sa(i,e.name),u=hs(e.updateTime),h=new qi({mapValue:{fields:e.fields}}),v=Er.newFoundDocument(o,u,h);return t&&v.setHasCommittedMutations(),t?v.setHasCommittedMutations():v}function hl(i,e){let t;if(e instanceof ou)t={update:$h(i,e.key,e.value)};else if(e instanceof Iu)t={delete:dl(i,e.key)};else if(e instanceof za)t={update:$h(i,e.key,e.data),updateMask:Ul(e.fieldMask)};else{if(!(e instanceof wd))return _n();t={verify:dl(i,e.key)}}return e.fieldTransforms.length>0&&(t.updateTransforms=e.fieldTransforms.map(o=>function(u,h){const v=h.transform;if(v instanceof Lo)return{fieldPath:h.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(v instanceof sa)return{fieldPath:h.field.canonicalString(),appendMissingElements:{values:v.elements}};if(v instanceof su)return{fieldPath:h.field.canonicalString(),removeAllFromArray:{values:v.elements}};if(v instanceof Gu)return{fieldPath:h.field.canonicalString(),increment:v._t};throw _n()}(0,o))),e.precondition.isNone||(t.currentDocument=void 0!==(u=e.precondition).updateTime?{updateTime:to(i,u.updateTime)}:void 0!==u.exists?{exists:u.exists}:_n()),t;var u}function Ad(i,e){const t=e.currentDocument?void 0!==(u=e.currentDocument).updateTime?cs.updateTime(hs(u.updateTime)):void 0!==u.exists?cs.exists(u.exists):cs.none():cs.none(),o=e.updateTransforms?e.updateTransforms.map(u=>function(h,v){let M=null;"setToServerValue"in v?(zn("REQUEST_TIME"===v.setToServerValue),M=new Lo):"appendMissingElements"in v?M=new sa(v.appendMissingElements.values||[]):"removeAllFromArray"in v?M=new su(v.removeAllFromArray.values||[]):"increment"in v?M=new Gu(h,v.increment):_n();const j=Wi.fromServerFormat(v.fieldPath);return new Du(j,M)}(i,u)):[];var u;if(e.update){const u=Sa(i,e.update.name),h=new qi({mapValue:{fields:e.update.fields}});if(e.updateMask){const v=new ne((e.updateMask.fieldPaths||[]).map(W=>Wi.fromServerFormat(W)));return new za(u,h,v,t,o)}return new ou(u,h,t,o)}if(e.delete){const u=Sa(i,e.delete);return new Iu(u,t)}if(e.verify){const u=Sa(i,e.verify);return new wd(u,t)}return _n()}function ns(i,e){return{documents:[Fl(i,e.path)]}}function Dc(i,e){const t={structuredQuery:{}},o=e.path;null!==e.collectionGroup?(t.parent=Fl(i,o),t.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(t.parent=Fl(i,o.popLast()),t.structuredQuery.from=[{collectionId:o.lastSegment()}]);const u=function(j){if(0===j.length)return;const W=j.map(de=>function(Fe){if("=="===Fe.op){if(Hn(Fe.value))return{unaryFilter:{field:lu(Fe.field),op:"IS_NAN"}};if(bn(Fe.value))return{unaryFilter:{field:lu(Fe.field),op:"IS_NULL"}}}else if("!="===Fe.op){if(Hn(Fe.value))return{unaryFilter:{field:lu(Fe.field),op:"IS_NOT_NAN"}};if(bn(Fe.value))return{unaryFilter:{field:lu(Fe.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:lu(Fe.field),op:xa(Fe.op),value:Fe.value}}}(de));return 1===W.length?W[0]:{compositeFilter:{op:"AND",filters:W}}}(e.filters);u&&(t.structuredQuery.where=u);const h=function(j){if(0!==j.length)return j.map(W=>{return{field:lu((de=W).field),direction:Ic(de.dir)};var de})}(e.orderBy);h&&(t.structuredQuery.orderBy=h);const v=(W=e.limit,i.dt||Ot(W)?W:{value:W});var W,M,j;return null!==v&&(t.structuredQuery.limit=v),e.startAt&&(t.structuredQuery.startAt={before:(M=e.startAt).inclusive,values:M.position}),e.endAt&&(t.structuredQuery.endAt={before:!(j=e.endAt).inclusive,values:j.position}),t}function Sd(i){let e=Ll(i.parent);const t=i.structuredQuery,o=t.from?t.from.length:0;let u=null;if(o>0){zn(1===o);const de=t.from[0];de.allDescendants?u=de.collectionId:e=e.child(de.collectionId)}let h=[];t.where&&(h=Ma(t.where));let v=[];t.orderBy&&(v=t.orderBy.map(de=>{return new ru(Tu((Fe=de).field),function(vt){switch(vt){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(Fe.direction));var Fe}));let M=null;t.limit&&(M=function(de){let Fe;return Fe="object"==typeof de?de.value:de,Ot(Fe)?null:Fe}(t.limit));let j=null;var de;t.startAt&&(j=new Hu((de=t.startAt).values||[],!!de.before));let W=null;return t.endAt&&(W=function(de){return new Hu(de.values||[],!de.before)}(t.endAt)),iu(e,u,v,h,M,"F",j,W)}function Ma(i){return i?void 0!==i.unaryFilter?[zh(i)]:void 0!==i.fieldFilter?[Md(i)]:void 0!==i.compositeFilter?i.compositeFilter.filters.map(e=>Ma(e)).reduce((e,t)=>e.concat(t)):_n():[]}function Ic(i){return jh[i]}function xa(i){return fo[i]}function lu(i){return{fieldPath:i.canonicalString()}}function Tu(i){return Wi.fromServerFormat(i.fieldPath)}function Md(i){return Zs.create(Tu(i.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return _n()}}(i.fieldFilter.op),i.fieldFilter.value)}function zh(i){switch(i.unaryFilter.op){case"IS_NAN":const e=Tu(i.unaryFilter.field);return Zs.create(e,"==",{doubleValue:NaN});case"IS_NULL":const t=Tu(i.unaryFilter.field);return Zs.create(t,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const o=Tu(i.unaryFilter.field);return Zs.create(o,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const u=Tu(i.unaryFilter.field);return Zs.create(u,"!=",{nullValue:"NULL_VALUE"});default:return _n()}}function Ul(i){const e=[];return i.fields.forEach(t=>e.push(t.canonicalString())),{fieldPaths:e}}function xd(i){return i.length>=4&&"projects"===i.get(0)&&"databases"===i.get(2)}function So(i){let e="";for(let t=0;t0&&(e=c(e)),e=_(i.get(t),e);return c(e)}function _(i,e){let t=e;const o=i.length;for(let u=0;u=2),2===e)return zn("\x01"===i.charAt(0)&&"\x01"===i.charAt(1)),dr.emptyPath();const t=e-2,o=[];let u="";for(let h=0;ht)&&_n(),i.charAt(v+1)){case"\x01":const M=i.substring(h,v);let j;0===u.length?j=M:(u+=M,j=u,u=""),o.push(j);break;case"\x10":u+=i.substring(h,v),u+="\0";break;case"\x11":u+=i.substring(h,v+1);break;default:_n()}h=v+2}return new dr(o)}const w=["userId","batchId"];function B(i,e){return[i,So(e)]}function q(i,e,t){return[i,So(e),t]}const Pe={},yt=["prefixPath","collectionGroup","readTime","documentId"],on=["prefixPath","collectionGroup","documentId"],nn=["collectionGroup","readTime","prefixPath","documentId"],Fn=["canonicalId","targetId"],Bn=["targetId","path"],Hr=["path","targetId"],no=["collectionId","parent"],Au=["indexId","uid"],Bl=["uid","sequenceNumber"],jl=["indexId","uid","arrayValue","directionalValue","orderedDocumentKey","documentKey"],Od=["indexId","uid","orderedDocumentKey"],Cc=["userId","collectionPath","documentId"],Rd=["userId","collectionPath","largestBatchId"],Kh=["userId","collectionGroup","largestBatchId"],Tc=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],Ac=[...Tc,"documentOverlays"],cu=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],Pd=cu,Sc=[...Pd,"indexConfiguration","indexState","indexEntries"];class Nd extends hc{constructor(e,t){super(),this.ee=e,this.currentSequenceNumber=t}}function go(i,e){const t=En(i);return Ls.N(t.ee,e)}class Mc{constructor(e,t,o,u){this.batchId=e,this.localWriteTime=t,this.baseMutations=o,this.mutations=u}applyToRemoteDocument(e,t){const o=t.mutationResults;for(let u=0;u{const h=e.get(u.key),v=h.overlayedDocument;let M=this.applyToLocalView(v,h.mutatedFields);M=t.has(u.key)?null:M;const j=kh(v,M);null!==j&&o.set(u.key,j),v.isValidDocument()||v.convertToNoDocument(On.min())}),o}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),wr())}isEqual(e){return this.batchId===e.batchId&&Gs(this.mutations,e.mutations,(t,o)=>Rl(t,o))&&Gs(this.baseMutations,e.baseMutations,(t,o)=>Rl(t,o))}}class pp{constructor(e,t,o,u){this.batch=e,this.commitVersion=t,this.mutationResults=o,this.docVersions=u}static from(e,t,o){zn(e.mutations.length===o.length);let u=dp;const h=e.mutations;for(let v=0;vAd(i.ne,h));for(let h=0;hAd(i.ne,h)),u=zr.fromMillis(e.localWriteTimeMs);return new Mc(e.batchId,u,t,o)}function xc(i){const e=fl(i.readTime),t=void 0!==i.lastLimboFreeSnapshotVersion?fl(i.lastLimboFreeSnapshotVersion):On.min();let o;var u;return void 0!==i.query.documents?(zn(1===(u=i.query).documents.length),o=ho(ul(Ll(u.documents[0])))):o=ho(Sd(i.query)),new qu(o,i.targetId,0,i.lastListenSequenceNumber,e,t,Te.fromBase64String(i.resumeToken))}function Zh(i,e){const t=Su(e.snapshotVersion),o=Su(e.lastLimboFreeSnapshotVersion);let u;u=pc(e.target)?ns(i.ne,e.target):Dc(i.ne,e.target);const h=e.resumeToken.toBase64();return{targetId:e.targetId,canonicalId:Ca(e.target),readTime:t,resumeToken:h,lastListenSequenceNumber:e.sequenceNumber,lastLimboFreeSnapshotVersion:o,query:u}}function Hl(i){const e=Sd({parent:i.parent,structuredQuery:i.structuredQuery});return"LAST"===i.limitType?hd(e,e.limit,"L"):e}function _p(i,e){return new Wh(e.largestBatchId,Ad(i.ne,e.overlayMutation))}function vp(i,e){const t=e.path.lastSegment();return[i,So(e.path.popLast()),t]}function im(i,e,t,o){return{indexId:i,uid:e.uid||"",sequenceNumber:t,readTime:Su(o.readTime),documentKey:So(o.documentKey.path),largestBatchId:o.largestBatchId}}class n_{getBundleMetadata(e,t){return Ep(e).get(t).next(o=>{if(o)return{id:(u=o).bundleId,createTime:fl(u.createTime),version:u.version};var u})}saveBundleMetadata(e,t){return Ep(e).put({bundleId:(o=t).id,createTime:Su(hs(o.createTime)),version:o.version});var o}getNamedQuery(e,t){return qh(e).get(t).next(o=>{if(o)return{name:(u=o).name,query:Hl(u.bundledQuery),readTime:fl(u.readTime)};var u})}saveNamedQuery(e,t){return qh(e).put({name:(o=t).name,readTime:Su(hs(o.readTime)),bundledQuery:o.bundledQuery});var o}}function Ep(i){return go(i,"bundles")}function qh(i){return go(i,"namedQueries")}class kd{constructor(e,t){this.wt=e,this.userId=t}static se(e,t){return new kd(e,t.uid||"")}getOverlay(e,t){return Yh(e).get(vp(this.userId,t)).next(o=>o?_p(this.wt,o):null)}getOverlays(e,t){const o=Wa();return mt.forEach(t,u=>this.getOverlay(e,u).next(h=>{null!==h&&o.set(u,h)})).next(()=>o)}saveOverlays(e,t,o){const u=[];return o.forEach((h,v)=>{const M=new Wh(t,v);u.push(this.ie(e,M))}),mt.waitFor(u)}removeOverlaysForBatchId(e,t,o){const u=new Set;t.forEach(v=>u.add(So(v.getCollectionPath())));const h=[];return u.forEach(v=>{const M=IDBKeyRange.bound([this.userId,v,o],[this.userId,v,o+1],!1,!0);h.push(Yh(e).W("collectionPathOverlayIndex",M))}),mt.waitFor(h)}getOverlaysForCollection(e,t,o){const u=Wa(),h=So(t),v=IDBKeyRange.bound([this.userId,h,o],[this.userId,h,Number.POSITIVE_INFINITY],!0);return Yh(e).K("collectionPathOverlayIndex",v).next(M=>{for(const j of M){const W=_p(this.wt,j);u.set(W.getKey(),W)}return u})}getOverlaysForCollectionGroup(e,t,o,u){const h=Wa();let v;const M=IDBKeyRange.bound([this.userId,t,o],[this.userId,t,Number.POSITIVE_INFINITY],!0);return Yh(e).J({index:"collectionGroupOverlayIndex",range:M},(j,W,de)=>{const Fe=_p(this.wt,W);h.size()h)}ie(e,t){return Yh(e).put(function(o,u,h){const[v,M,j]=vp(u,h.mutation.key);return{userId:u,collectionPath:M,documentId:j,collectionGroup:h.mutation.key.getCollectionGroup(),largestBatchId:h.largestBatchId,overlayMutation:hl(o.ne,h.mutation)}}(this.wt,this.userId,t))}}function Yh(i){return go(i,"documentOverlays")}class pl{constructor(){}re(e,t){this.oe(e,t),t.ue()}oe(e,t){if("nullValue"in e)this.ce(t,5);else if("booleanValue"in e)this.ce(t,10),t.ae(e.booleanValue?1:0);else if("integerValue"in e)this.ce(t,15),t.ae(Bt(e.integerValue));else if("doubleValue"in e){const o=Bt(e.doubleValue);isNaN(o)?this.ce(t,13):(this.ce(t,15),an(o)?t.ae(0):t.ae(o))}else if("timestampValue"in e){const o=e.timestampValue;this.ce(t,20),"string"==typeof o?t.he(o):(t.he(`${o.seconds||""}`),t.ae(o.nanos||0))}else if("stringValue"in e)this.le(e.stringValue,t),this.fe(t);else if("bytesValue"in e)this.ce(t,30),t.de(x(e.bytesValue)),this.fe(t);else if("referenceValue"in e)this._e(e.referenceValue,t);else if("geoPointValue"in e){const o=e.geoPointValue;this.ce(t,45),t.ae(o.latitude||0),t.ae(o.longitude||0)}else"mapValue"in e?Zi(e)?this.ce(t,Number.MAX_SAFE_INTEGER):(this.we(e.mapValue,t),this.fe(t)):"arrayValue"in e?(this.me(e.arrayValue,t),this.fe(t)):_n()}le(e,t){this.ce(t,25),this.ge(e,t)}ge(e,t){t.he(e)}we(e,t){const o=e.fields||{};this.ce(t,55);for(const u of Object.keys(o))this.le(u,t),this.oe(o[u],t)}me(e,t){const o=e.values||[];this.ce(t,50);for(const u of o)this.oe(u,t)}_e(e,t){this.ce(t,37),vn.fromName(e).path.forEach(o=>{this.ce(t,60),this.ge(o,t)})}ce(e,t){e.ae(t)}fe(e){e.ae(2)}}function r_(i){if(0===i)return 8;let e=0;return i>>4==0&&(e+=4,i<<=4),i>>6==0&&(e+=2,i<<=2),i>>7==0&&(e+=1),e}function wp(i){const e=64-function(t){let o=0;for(let u=0;u<8;++u){const h=r_(255&t[u]);if(o+=h,8!==h)break}return o}(i);return Math.ceil(e/8)}pl.ye=new pl;class i_{constructor(){this.buffer=new Uint8Array(1024),this.position=0}pe(e){const t=e[Symbol.iterator]();let o=t.next();for(;!o.done;)this.Ie(o.value),o=t.next();this.Te()}Ee(e){const t=e[Symbol.iterator]();let o=t.next();for(;!o.done;)this.Ae(o.value),o=t.next();this.Re()}be(e){for(const t of e){const o=t.charCodeAt(0);if(o<128)this.Ie(o);else if(o<2048)this.Ie(960|o>>>6),this.Ie(128|63&o);else if(t<"\ud800"||"\udbff">>12),this.Ie(128|63&o>>>6),this.Ie(128|63&o);else{const u=t.codePointAt(0);this.Ie(240|u>>>18),this.Ie(128|63&u>>>12),this.Ie(128|63&u>>>6),this.Ie(128|63&u)}}this.Te()}Pe(e){for(const t of e){const o=t.charCodeAt(0);if(o<128)this.Ae(o);else if(o<2048)this.Ae(960|o>>>6),this.Ae(128|63&o);else if(t<"\ud800"||"\udbff">>12),this.Ae(128|63&o>>>6),this.Ae(128|63&o);else{const u=t.codePointAt(0);this.Ae(240|u>>>18),this.Ae(128|63&u>>>12),this.Ae(128|63&u>>>6),this.Ae(128|63&u)}}this.Re()}ve(e){const t=this.Ve(e),o=wp(t);this.Se(1+o),this.buffer[this.position++]=255&o;for(let u=t.length-o;u=this.Ue.length||!this.We(this.Ue[h++],v))return!1}return!0}Qe(e){for(const t of this.qe)if(this.je(t,e))return!0;return!1}je(e,t){return!(void 0===e||!e.field.isEqual(t.fieldPath))&&2===t.kind==("array-contains"===e.op||"array-contains-any"===e.op)}We(e,t){return!!e.field.isEqual(t.fieldPath)&&(0===t.kind&&"asc"===e.dir||1===t.kind&&"desc"===e.dir)}}class a_{constructor(){this.ze=new Qh}addToCollectionParentIndex(e,t){return this.ze.add(t),mt.resolve()}getCollectionParents(e,t){return mt.resolve(this.ze.getEntries(t))}addFieldIndex(e,t){return mt.resolve()}deleteFieldIndex(e,t){return mt.resolve()}getDocumentsMatchingTarget(e,t){return mt.resolve(null)}getIndexType(e,t){return mt.resolve(0)}getFieldIndexes(e,t){return mt.resolve([])}getNextCollectionGroupToUpdate(e){return mt.resolve(null)}getMinOffset(e,t){return mt.resolve($o.min())}getMinOffsetFromCollectionGroup(e,t){return mt.resolve($o.min())}updateCollectionGroup(e,t,o){return mt.resolve()}updateIndexEntries(e,t){return mt.resolve()}}class Qh{constructor(){this.index={}}add(e){const t=e.lastSegment(),o=e.popLast(),u=this.index[t]||new p(dr.comparator),h=!u.has(o);return this.index[t]=u.add(o),h}has(e){const t=e.lastSegment(),o=e.popLast(),u=this.index[t];return u&&u.has(o)}getEntries(e){return(this.index[e]||new p(dr.comparator)).toArray()}}const Jh=new Uint8Array(0);class u_{constructor(e,t){this.user=e,this.databaseId=t,this.He=new Qh,this.Je=new Ka(o=>Ca(o),(o,u)=>$u(o,u)),this.uid=e.uid||""}addToCollectionParentIndex(e,t){if(!this.He.has(t)){const o=t.lastSegment(),u=t.popLast();e.addOnCommittedListener(()=>{this.He.add(t)});const h={collectionId:o,parent:So(u)};return om(e).put(h)}return mt.resolve()}getCollectionParents(e,t){const o=[],u=IDBKeyRange.bound([t,""],[Js(t),""],!1,!0);return om(e).K(u).next(h=>{for(const v of h){if(v.collectionId!==t)break;o.push(d(v.parent))}return o})}addFieldIndex(e,t){const o=Ld(e),u={indexId:(v=t).indexId,collectionGroup:v.collectionGroup,fields:v.fields.map(M=>[M.fieldPath.canonicalString(),M.kind])};var v;delete u.indexId;const h=o.add(u);if(t.indexState){const v=Oc(e);return h.next(M=>{v.put(im(M,this.user,t.indexState.sequenceNumber,t.indexState.offset))})}return h.next()}deleteFieldIndex(e,t){const o=Ld(e),u=Oc(e),h=hr(e);return o.delete(t.indexId).next(()=>u.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0))).next(()=>h.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0)))}getDocumentsMatchingTarget(e,t){const o=hr(e);let u=!0;const h=new Map;return mt.forEach(this.Ye(t),v=>this.Xe(e,v).next(M=>{u&&(u=!!M),h.set(v,M)})).next(()=>{if(u){let v=wr();const M=[];return mt.forEach(h,(j,W)=>{var de;Xt("IndexedDbIndexManager",`Using index ${de=j,`id=${de.indexId}|cg=${de.collectionGroup}|f=${de.fields.map(Ni=>`${Ni.fieldPath}:${Ni.kind}`).join(",")}`} to execute ${Ca(t)}`);const Fe=function(Ni,Ss){const Qi=tu(Ss);if(void 0===Qi)return null;for(const fs of nu(Ni,Qi.fieldPath))switch(fs.op){case"array-contains-any":return fs.value.arrayValue.values||[];case"array-contains":return[fs.value]}return null}(W,j),vt=function(Ni,Ss){const Qi=new Map;for(const fs of Ua(Ss))for(const Vo of nu(Ni,fs.fieldPath))switch(Vo.op){case"==":case"in":Qi.set(fs.fieldPath.canonicalString(),Vo.value);break;case"not-in":case"!=":return Qi.set(fs.fieldPath.canonicalString(),Vo.value),Array.from(Qi.values())}return null}(W,j),jt=function(Ni,Ss){const Qi=[];let fs=!0;for(const Vo of Ua(Ss)){const bh=0===Vo.kind?sl(Ni,Vo.fieldPath,Ni.startAt):gc(Ni,Vo.fieldPath,Ni.startAt);Qi.push(bh.value),fs&&(fs=bh.inclusive)}return new Hu(Qi,fs)}(W,j),en=function(Ni,Ss){const Qi=[];let fs=!0;for(const Vo of Ua(Ss)){const bh=0===Vo.kind?gc(Ni,Vo.fieldPath,Ni.endAt):sl(Ni,Vo.fieldPath,Ni.endAt);Qi.push(bh.value),fs&&(fs=bh.inclusive)}return new Hu(Qi,fs)}(W,j),Mn=this.Ze(j,W,jt),Gn=this.Ze(j,W,en),Ci=this.tn(j,W,vt),is=this.en(j.indexId,Fe,Mn,jt.inclusive,Gn,en.inclusive,Ci);return mt.forEach(is,Ni=>o.j(Ni,t.limit).next(Ss=>{Ss.forEach(Qi=>{const fs=vn.fromSegments(Qi.documentKey);v.has(fs)||(v=v.add(fs),M.push(fs))})}))}).next(()=>M)}return mt.resolve(null)})}Ye(e){let t=this.Je.get(e);return t||(t=[e],this.Je.set(e,t),t)}en(e,t,o,u,h,v,M){const j=(null!=t?t.length:1)*Math.max(o.length,h.length),W=j/(null!=t?t.length:1),de=[];for(let Fe=0;Fethis.sn(e,vt,Gn,!0));de.push(...this.createRange(jt,en,Mn))}return de}sn(e,t,o,u){const h=new gl(e,vn.empty(),t,o);return u?h:h.Le()}rn(e,t,o,u){const h=new gl(e,vn.empty(),t,o);return u?h.Le():h}Xe(e,t){const o=new o_(t),u=null!=t.collectionGroup?t.collectionGroup:t.path.lastSegment();return this.getFieldIndexes(e,u).next(h=>{let v=null;for(const M of h)o.Ge(M)&&(!v||M.fields.length>v.fields.length)&&(v=M);return v})}getIndexType(e,t){let o=2;return mt.forEach(this.Ye(t),u=>this.Xe(e,u).next(h=>{h?0!==o&&h.fields.lengtho)}on(e,t){const o=new Fd;for(const u of Ua(e)){const h=t.data.field(u.fieldPath);if(null==h)return null;const v=o.Be(u.kind);pl.ye.re(h,v)}return o.Oe()}nn(e){const t=new Fd;return pl.ye.re(e,t.Be(0)),t.Oe()}un(e,t){const o=new Fd;return pl.ye.re(ls(this.databaseId,t),o.Be(function(u){const h=Ua(u);return 0===h.length?0:h[h.length-1].kind}(e))),o.Oe()}tn(e,t,o){if(null===o)return[];let u=[];u.push(new Fd);let h=0;for(const v of Ua(e)){const M=o[h++];for(const j of u)if(this.cn(t,v.fieldPath)&&lo(M))u=this.an(u,v,M);else{const W=j.Be(v.kind);pl.ye.re(M,W)}}return this.hn(u)}Ze(e,t,o){return this.tn(e,t,o.position)}hn(e){const t=[];for(let o=0;oo instanceof Zs&&o.field.isEqual(t)&&("in"===o.op||"not-in"===o.op))}getFieldIndexes(e,t){const o=Ld(e),u=Oc(e);return(t?o.K("collectionGroupIndex",IDBKeyRange.bound(t,t)):o.K()).next(h=>{const v=[];return mt.forEach(h,M=>u.get([M.indexId,this.uid]).next(j=>{v.push(function(W,de){const Fe=de?new ra(de.sequenceNumber,new $o(fl(de.readTime),new vn(d(de.documentKey)),de.largestBatchId)):ra.empty(),vt=W.fields.map(([jt,en])=>new Ba(Wi.fromServerFormat(jt),en));return new qr(W.indexId,W.collectionGroup,vt,Fe)}(M,j))})).next(()=>v)})}getNextCollectionGroupToUpdate(e){return this.getFieldIndexes(e).next(t=>0===t.length?null:(t.sort((o,u)=>{const h=o.indexState.sequenceNumber-u.indexState.sequenceNumber;return 0!==h?h:$n(o.collectionGroup,u.collectionGroup)}),t[0].collectionGroup))}updateCollectionGroup(e,t,o){const u=Ld(e),h=Oc(e);return this.ln(e).next(v=>u.K("collectionGroupIndex",IDBKeyRange.bound(t,t)).next(M=>mt.forEach(M,j=>h.put(im(j.indexId,this.user,v,o)))))}updateIndexEntries(e,t){const o=new Map;return mt.forEach(t,(u,h)=>{const v=o.get(u.collectionGroup);return(v?mt.resolve(v):this.getFieldIndexes(e,u.collectionGroup)).next(M=>(o.set(u.collectionGroup,M),mt.forEach(M,j=>this.fn(e,u,j).next(W=>{const de=this.dn(h,j);return W.isEqual(de)?mt.resolve():this._n(e,h,j,W,de)}))))})}wn(e,t,o,u){return hr(e).put({indexId:u.indexId,uid:this.uid,arrayValue:u.arrayValue,directionalValue:u.directionalValue,orderedDocumentKey:this.un(o,t.key),documentKey:t.key.path.toArray()})}mn(e,t,o,u){return hr(e).delete([u.indexId,this.uid,u.arrayValue,u.directionalValue,this.un(o,t.key),t.key.path.toArray()])}fn(e,t,o){const u=hr(e);let h=new p(Gl);return u.J({index:"documentKeyIndex",range:IDBKeyRange.only([o.indexId,this.uid,this.un(o,t)])},(v,M)=>{h=h.add(new gl(o.indexId,t,M.arrayValue,M.directionalValue))}).next(()=>h)}dn(e,t){let o=new p(Gl);const u=this.on(t,e);if(null==u)return o;const h=tu(t);if(null!=h){const v=e.data.field(h.fieldPath);if(lo(v))for(const M of v.arrayValue.values||[])o=o.add(new gl(t.indexId,e.key,this.nn(M),u))}else o=o.add(new gl(t.indexId,e.key,Jh,u));return o}_n(e,t,o,u,h){Xt("IndexedDbIndexManager","Updating index entries for document '%s'",t.key);const v=[];return function(M,j,W,de,Fe){const vt=M.getIterator(),jt=j.getIterator();let en=H(vt),Mn=H(jt);for(;en||Mn;){let Gn=!1,Ci=!1;if(en&&Mn){const is=W(en,Mn);is<0?Ci=!0:is>0&&(Gn=!0)}else null!=en?Ci=!0:Gn=!0;Gn?(de(Mn),Mn=H(jt)):Ci?(Fe(en),en=H(vt)):(en=H(vt),Mn=H(jt))}}(u,h,Gl,M=>{v.push(this.wn(e,t,o,M))},M=>{v.push(this.mn(e,t,o,M))}),mt.waitFor(v)}ln(e){let t=1;return Oc(e).J({index:"sequenceNumberIndex",reverse:!0,range:IDBKeyRange.upperBound([this.uid,Number.MAX_SAFE_INTEGER])},(o,u,h)=>{h.done(),t=u.sequenceNumber+1}).next(()=>t)}createRange(e,t,o){o=o.sort((v,M)=>Gl(v,M)).filter((v,M,j)=>!M||0!==Gl(v,j[M-1]));const u=[];u.push(e);for(const v of o){const M=Gl(v,e),j=Gl(v,t);if(0===M)u[0]=e.Le();else if(M>0&&j<0)u.push(v),u.push(v.Le());else if(j>0)break}u.push(t);const h=[];for(let v=0;vthis.Xe(e,o).next(u=>u||_n())).next(bp)}}function om(i){return go(i,"collectionParents")}function hr(i){return go(i,"indexEntries")}function Ld(i){return go(i,"indexConfiguration")}function Oc(i){return go(i,"indexState")}function bp(i){zn(0!==i.length);let e=i[0].indexState.offset,t=e.largestBatchId;for(let o=1;o(M++,vt.delete()));h.push(j.next(()=>{zn(1===M)}));const W=[];for(const de of t.mutations){const Fe=q(e,de.key.path,t.batchId);h.push(u.delete(Fe)),W.push(de.key)}return mt.waitFor(h).next(()=>W)}function Xh(i){if(!i)return 0;let e;if(i.document)e=i.document;else if(i.unknownDocument)e=i.unknownDocument;else{if(!i.noDocument)throw _n();e=i.noDocument}return JSON.stringify(e).length}_a.DEFAULT_COLLECTION_PERCENTILE=10,_a.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,_a.DEFAULT=new _a(41943040,_a.DEFAULT_COLLECTION_PERCENTILE,_a.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),_a.DISABLED=new _a(-1,0,0);class Vd{constructor(e,t,o,u){this.userId=e,this.wt=t,this.indexManager=o,this.referenceDelegate=u,this.gn={}}static se(e,t,o,u){zn(""!==e.uid);const h=e.isAuthenticated()?e.uid:"";return new Vd(h,t,o,u)}checkEmpty(e){let t=!0;const o=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return ml(e).J({index:"userMutationsIndex",range:o},(u,h,v)=>{t=!1,v.done()}).next(()=>t)}addMutationBatch(e,t,o,u){const h=Ud(e),v=ml(e);return v.add({}).next(M=>{zn("number"==typeof M);const j=new Mc(M,t,o,u),W=function(vt,jt,en){const Mn=en.baseMutations.map(Ci=>hl(vt.ne,Ci)),Gn=en.mutations.map(Ci=>hl(vt.ne,Ci));return{userId:jt,batchId:en.batchId,localWriteTimeMs:en.localWriteTime.toMillis(),baseMutations:Mn,mutations:Gn}}(this.wt,this.userId,j),de=[];let Fe=new p((vt,jt)=>$n(vt.canonicalString(),jt.canonicalString()));for(const vt of u){const jt=q(this.userId,vt.key.path,M);Fe=Fe.add(vt.key.path.popLast()),de.push(v.put(W)),de.push(h.put(jt,Pe))}return Fe.forEach(vt=>{de.push(this.indexManager.addToCollectionParentIndex(e,vt))}),e.addOnCommittedListener(()=>{this.gn[M]=j.keys()}),mt.waitFor(de).next(()=>j)})}lookupMutationBatch(e,t){return ml(e).get(t).next(o=>o?(zn(o.userId===this.userId),Yu(this.wt,o)):null)}yn(e,t){return this.gn[t]?mt.resolve(this.gn[t]):this.lookupMutationBatch(e,t).next(o=>{if(o){const u=o.keys();return this.gn[t]=u,u}return null})}getNextMutationBatchAfterBatchId(e,t){const o=t+1,u=IDBKeyRange.lowerBound([this.userId,o]);let h=null;return ml(e).J({index:"userMutationsIndex",range:u},(v,M,j)=>{M.userId===this.userId&&(zn(M.batchId>=o),h=Yu(this.wt,M)),j.done()}).next(()=>h)}getHighestUnacknowledgedBatchId(e){const t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]);let o=-1;return ml(e).J({index:"userMutationsIndex",range:t,reverse:!0},(u,h,v)=>{o=h.batchId,v.done()}).next(()=>o)}getAllMutationBatches(e){const t=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return ml(e).K("userMutationsIndex",t).next(o=>o.map(u=>Yu(this.wt,u)))}getAllMutationBatchesAffectingDocumentKey(e,t){const o=B(this.userId,t.path),u=IDBKeyRange.lowerBound(o),h=[];return Ud(e).J({range:u},(v,M,j)=>{const[W,de,Fe]=v,vt=d(de);if(W===this.userId&&t.path.isEqual(vt))return ml(e).get(Fe).next(jt=>{if(!jt)throw _n();zn(jt.userId===this.userId),h.push(Yu(this.wt,jt))});j.done()}).next(()=>h)}getAllMutationBatchesAffectingDocumentKeys(e,t){let o=new p($n);const u=[];return t.forEach(h=>{const v=B(this.userId,h.path),M=IDBKeyRange.lowerBound(v),j=Ud(e).J({range:M},(W,de,Fe)=>{const[vt,jt,en]=W,Mn=d(jt);vt===this.userId&&h.path.isEqual(Mn)?o=o.add(en):Fe.done()});u.push(j)}),mt.waitFor(u).next(()=>this.pn(e,o))}getAllMutationBatchesAffectingQuery(e,t){const o=t.path,u=o.length+1,h=B(this.userId,o),v=IDBKeyRange.lowerBound(h);let M=new p($n);return Ud(e).J({range:v},(j,W,de)=>{const[Fe,vt,jt]=j,en=d(vt);Fe===this.userId&&o.isPrefixOf(en)?en.length===u&&(M=M.add(jt)):de.done()}).next(()=>this.pn(e,M))}pn(e,t){const o=[],u=[];return t.forEach(h=>{u.push(ml(e).get(h).next(v=>{if(null===v)throw _n();zn(v.userId===this.userId),o.push(Yu(this.wt,v))}))}),mt.waitFor(u).next(()=>o)}removeMutationBatch(e,t){return Dp(e.ee,this.userId,t).next(o=>(e.addOnCommittedListener(()=>{this.In(t.batchId)}),mt.forEach(o,u=>this.referenceDelegate.markPotentiallyOrphaned(e,u))))}In(e){delete this.gn[e]}performConsistencyCheck(e){return this.checkEmpty(e).next(t=>{if(!t)return mt.resolve();const o=IDBKeyRange.lowerBound([this.userId]),u=[];return Ud(e).J({range:o},(h,v,M)=>{if(h[0]===this.userId){const j=d(h[1]);u.push(j)}else M.done()}).next(()=>{zn(0===u.length)})})}containsKey(e,t){return um(e,this.userId,t)}Tn(e){return Ip(e).get(this.userId).next(t=>t||{userId:this.userId,lastAcknowledgedBatchId:-1,lastStreamToken:""})}}function um(i,e,t){const o=B(e,t.path),u=o[1],h=IDBKeyRange.lowerBound(o);let v=!1;return Ud(i).J({range:h,H:!0},(M,j,W)=>{const[de,Fe,vt]=M;de===e&&Fe===u&&(v=!0),W.done()}).next(()=>v)}function ml(i){return go(i,"mutations")}function Ud(i){return go(i,"documentMutations")}function Ip(i){return go(i,"mutationQueues")}class yl{constructor(e){this.En=e}next(){return this.En+=2,this.En}static An(){return new yl(0)}static Rn(){return new yl(-1)}}class l_{constructor(e,t){this.referenceDelegate=e,this.wt=t}allocateTargetId(e){return this.bn(e).next(t=>{const o=new yl(t.highestTargetId);return t.highestTargetId=o.next(),this.Pn(e,t).next(()=>t.highestTargetId)})}getLastRemoteSnapshotVersion(e){return this.bn(e).next(t=>On.fromTimestamp(new zr(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds)))}getHighestSequenceNumber(e){return this.bn(e).next(t=>t.highestListenSequenceNumber)}setTargetsMetadata(e,t,o){return this.bn(e).next(u=>(u.highestListenSequenceNumber=t,o&&(u.lastRemoteSnapshotVersion=o.toTimestamp()),t>u.highestListenSequenceNumber&&(u.highestListenSequenceNumber=t),this.Pn(e,u)))}addTargetData(e,t){return this.vn(e,t).next(()=>this.bn(e).next(o=>(o.targetCount+=1,this.Vn(t,o),this.Pn(e,o))))}updateTargetData(e,t){return this.vn(e,t)}removeTargetData(e,t){return this.removeMatchingKeysForTargetId(e,t.targetId).next(()=>zl(e).delete(t.targetId)).next(()=>this.bn(e)).next(o=>(zn(o.targetCount>0),o.targetCount-=1,this.Pn(e,o)))}removeTargets(e,t,o){let u=0;const h=[];return zl(e).J((v,M)=>{const j=xc(M);j.sequenceNumber<=t&&null===o.get(j.targetId)&&(u++,h.push(this.removeTargetData(e,j)))}).next(()=>mt.waitFor(h)).next(()=>u)}forEachTarget(e,t){return zl(e).J((o,u)=>{const h=xc(u);t(h)})}bn(e){return Cp(e).get("targetGlobalKey").next(t=>(zn(null!==t),t))}Pn(e,t){return Cp(e).put("targetGlobalKey",t)}vn(e,t){return zl(e).put(Zh(this.wt,t))}Vn(e,t){let o=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,o=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,o=!0),o}getTargetCount(e){return this.bn(e).next(t=>t.targetCount)}getTargetData(e,t){const o=Ca(t),u=IDBKeyRange.bound([o,Number.NEGATIVE_INFINITY],[o,Number.POSITIVE_INFINITY]);let h=null;return zl(e).J({range:u,index:"queryTargetsIndex"},(v,M,j)=>{const W=xc(M);$u(t,W.target)&&(h=W,j.done())}).next(()=>h)}addMatchingKeys(e,t,o){const u=[],h=Mu(e);return t.forEach(v=>{const M=So(v.path);u.push(h.put({targetId:o,path:M})),u.push(this.referenceDelegate.addReference(e,o,v))}),mt.waitFor(u)}removeMatchingKeys(e,t,o){const u=Mu(e);return mt.forEach(t,h=>{const v=So(h.path);return mt.waitFor([u.delete([o,v]),this.referenceDelegate.removeReference(e,o,h)])})}removeMatchingKeysForTargetId(e,t){const o=Mu(e),u=IDBKeyRange.bound([t],[t+1],!1,!0);return o.delete(u)}getMatchingKeysForTargetId(e,t){const o=IDBKeyRange.bound([t],[t+1],!1,!0),u=Mu(e);let h=wr();return u.J({range:o,H:!0},(v,M,j)=>{const W=d(v[1]),de=new vn(W);h=h.add(de)}).next(()=>h)}containsKey(e,t){const o=So(t.path),u=IDBKeyRange.bound([o],[Js(o)],!1,!0);let h=0;return Mu(e).J({index:"documentTargetsIndex",H:!0,range:u},([v,M],j,W)=>{0!==v&&(h++,W.done())}).next(()=>h>0)}te(e,t){return zl(e).get(t).next(o=>o?xc(o):null)}}function zl(i){return go(i,"targets")}function Cp(i){return go(i,"targetGlobal")}function Mu(i){return go(i,"targetDocuments")}function c_([i,e],[t,o]){const u=$n(i,t);return 0===u?$n(e,o):u}class d_{constructor(e){this.Sn=e,this.buffer=new p(c_),this.Dn=0}Cn(){return++this.Dn}xn(e){const t=[e,this.Cn()];if(this.buffer.sizeMath.floor(t/100*o))}nthSequenceNumber(e,t){if(0===t)return mt.resolve(To.ot);const o=new d_(t);return this.On.forEachTarget(e,u=>o.xn(u.sequenceNumber)).next(()=>this.On.Fn(e,u=>o.xn(u))).next(()=>o.maxValue)}removeTargets(e,t,o){return this.On.removeTargets(e,t,o)}removeOrphanedDocuments(e,t){return this.On.removeOrphanedDocuments(e,t)}collect(e,t){return-1===this.params.cacheSizeCollectionThreshold?(Xt("LruGarbageCollector","Garbage collection skipped; disabled"),mt.resolve(am)):this.getCacheSize(e).next(o=>o(Fe>this.params.maximumSequenceNumbersToCollect?(Xt("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${Fe}`),u=this.params.maximumSequenceNumbersToCollect):u=Fe,v=Date.now(),this.nthSequenceNumber(e,u))).next(Fe=>(o=Fe,M=Date.now(),this.removeTargets(e,o,t))).next(Fe=>(h=Fe,j=Date.now(),this.removeOrphanedDocuments(e,o))).next(Fe=>(W=Date.now(),Va()<=Ne.in.DEBUG&&Xt("LruGarbageCollector",`LRU Garbage Collection\n\tCounted targets in ${v-de}ms\n\tDetermined least recently used ${u} in `+(M-v)+`ms\n\tRemoved ${h} targets in `+(j-M)+`ms\n\tRemoved ${Fe} documents in `+(W-j)+`ms\nTotal Duration: ${W-de}ms`),mt.resolve({didRun:!0,sequenceNumbersCollected:u,targetsRemoved:h,documentsRemoved:Fe})))}}class cm{constructor(e,t){this.db=e,this.garbageCollector=new lm(this,t)}Mn(e){const t=this.Bn(e);return this.db.getTargetCache().getTargetCount(e).next(o=>t.next(u=>o+u))}Bn(e){let t=0;return this.Fn(e,o=>{t++}).next(()=>t)}forEachTarget(e,t){return this.db.getTargetCache().forEachTarget(e,t)}Fn(e,t){return this.Ln(e,(o,u)=>t(u))}addReference(e,t,o){return xu(e,o)}removeReference(e,t,o){return xu(e,o)}removeTargets(e,t,o){return this.db.getTargetCache().removeTargets(e,t,o)}markPotentiallyOrphaned(e,t){return xu(e,t)}Un(e,t){return function(o,u){let h=!1;return Ip(o).Y(v=>um(o,v,u).next(M=>(M&&(h=!0),mt.resolve(!M)))).next(()=>h)}(e,t)}removeOrphanedDocuments(e,t){const o=this.db.getRemoteDocumentCache().newChangeBuffer(),u=[];let h=0;return this.Ln(e,(v,M)=>{if(M<=t){const j=this.Un(e,v).next(W=>{if(!W)return h++,o.getEntry(e,v).next(()=>(o.removeEntry(v,On.min()),Mu(e).delete([0,So(v.path)])))});u.push(j)}}).next(()=>mt.waitFor(u)).next(()=>o.apply(e)).next(()=>h)}removeTarget(e,t){const o=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,o)}updateLimboDocument(e,t){return xu(e,t)}Ln(e,t){const o=Mu(e);let u,h=To.ot;return o.J({index:"documentTargetsIndex"},([v,M],{path:j,sequenceNumber:W})=>{0===v?(h!==To.ot&&t(new vn(d(u)),h),h=W,u=j):h=To.ot}).next(()=>{h!==To.ot&&t(new vn(d(u)),h)})}getCacheSize(e){return this.db.getRemoteDocumentCache().getSize(e)}}function xu(i,e){return Mu(i).put((o=i.currentSequenceNumber,{targetId:0,path:So(e.path),sequenceNumber:o}));var o}class dm{constructor(){this.changes=new Ka(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,Er.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const o=this.changes.get(t);return void 0!==o?mt.resolve(o):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class Ap{constructor(e){this.wt=e}setIndexManager(e){this.indexManager=e}addEntry(e,t,o){return Kl(e).put(o)}removeEntry(e,t,o){return Kl(e).delete(function(u,h){const v=u.path.toArray();return[v.slice(0,v.length-2),v[v.length-2],$l(h),v[v.length-1]]}(t,o))}updateMetadata(e,t){return this.getMetadata(e).next(o=>(o.byteSize+=t,this.qn(e,o)))}getEntry(e,t){let o=Er.newInvalidDocument(t);return Kl(e).J({index:"documentKeyIndex",range:IDBKeyRange.only(Wl(t))},(u,h)=>{o=this.Kn(t,h)}).next(()=>o)}Gn(e,t){let o={size:0,document:Er.newInvalidDocument(t)};return Kl(e).J({index:"documentKeyIndex",range:IDBKeyRange.only(Wl(t))},(u,h)=>{o={document:this.Kn(t,h),size:Xh(h)}}).next(()=>o)}getEntries(e,t){let o=oa();return this.Qn(e,t,(u,h)=>{const v=this.Kn(u,h);o=o.insert(u,v)}).next(()=>o)}jn(e,t){let o=oa(),u=new Xr(vn.comparator);return this.Qn(e,t,(h,v)=>{const M=this.Kn(h,v);o=o.insert(h,M),u=u.insert(h,Xh(v))}).next(()=>({documents:o,Wn:u}))}Qn(e,t,o){if(t.isEmpty())return mt.resolve();let u=new p(Zl);t.forEach(j=>u=u.add(j));const h=IDBKeyRange.bound(Wl(u.first()),Wl(u.last())),v=u.getIterator();let M=v.getNext();return Kl(e).J({index:"documentKeyIndex",range:h},(j,W,de)=>{const Fe=vn.fromSegments([...W.prefixPath,W.collectionGroup,W.documentId]);for(;M&&Zl(M,Fe)<0;)o(M,null),M=v.getNext();M&&M.isEqual(Fe)&&(o(M,W),M=v.hasNext()?v.getNext():null),M?de.q(Wl(M)):de.done()}).next(()=>{for(;M;)o(M,null),M=v.hasNext()?v.getNext():null})}getAllFromCollection(e,t,o){const u=[t.popLast().toArray(),t.lastSegment(),$l(o.readTime),o.documentKey.path.isEmpty()?"":o.documentKey.path.lastSegment()],h=[t.popLast().toArray(),t.lastSegment(),[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],""];return Kl(e).K(IDBKeyRange.bound(u,h,!0)).next(v=>{let M=oa();for(const j of v){const W=this.Kn(vn.fromSegments(j.prefixPath.concat(j.collectionGroup,j.documentId)),j);M=M.insert(W.key,W)}return M})}getAllFromCollectionGroup(e,t,o,u){let h=oa();const v=ef(t,o),M=ef(t,$o.max());return Kl(e).J({index:"collectionGroupIndex",range:IDBKeyRange.bound(v,M,!0)},(j,W,de)=>{const Fe=this.Kn(vn.fromSegments(W.prefixPath.concat(W.collectionGroup,W.documentId)),W);h=h.insert(Fe.key,Fe),h.size===u&&de.done()}).next(()=>h)}newChangeBuffer(e){return new Mp(this,!!e&&e.trackRemovals)}getSize(e){return this.getMetadata(e).next(t=>t.byteSize)}getMetadata(e){return Bd(e).get("remoteDocumentGlobalKey").next(t=>(zn(!!t),t))}qn(e,t){return Bd(e).put("remoteDocumentGlobalKey",t)}Kn(e,t){if(t){const o=function mp(i,e){let t;if(e.document)t=uu(i.ne,e.document,!!e.hasCommittedMutations);else if(e.noDocument){const o=vn.fromSegments(e.noDocument.path),u=fl(e.noDocument.readTime);t=Er.newNoDocument(o,u),e.hasCommittedMutations&&t.setHasCommittedMutations()}else{if(!e.unknownDocument)return _n();{const o=vn.fromSegments(e.unknownDocument.path),u=fl(e.unknownDocument.version);t=Er.newUnknownDocument(o,u)}}return e.readTime&&t.setReadTime(function(o){const u=new zr(o[0],o[1]);return On.fromTimestamp(u)}(e.readTime)),t}(this.wt,t);if(!o.isNoDocument()||!o.version.isEqual(On.min()))return o}return Er.newInvalidDocument(e)}}function Sp(i){return new Ap(i)}class Mp extends dm{constructor(e,t){super(),this.zn=e,this.trackRemovals=t,this.Hn=new Ka(o=>o.toString(),(o,u)=>o.isEqual(u))}applyChanges(e){const t=[];let o=0,u=new p((h,v)=>$n(h.canonicalString(),v.canonicalString()));return this.changes.forEach((h,v)=>{const M=this.Hn.get(h);if(t.push(this.zn.removeEntry(e,h,M.readTime)),v.isValidDocument()){const j=yp(this.zn.wt,v);u=u.add(h.path.popLast()),o+=Xh(j)-M.size,t.push(this.zn.addEntry(e,h,j))}else if(o-=M.size,this.trackRemovals){const j=yp(this.zn.wt,v.convertToNoDocument(On.min()));t.push(this.zn.addEntry(e,h,j))}}),u.forEach(h=>{t.push(this.zn.indexManager.addToCollectionParentIndex(e,h))}),t.push(this.zn.updateMetadata(e,o)),mt.waitFor(t)}getFromCache(e,t){return this.zn.Gn(e,t).next(o=>(this.Hn.set(t,{size:o.size,readTime:o.document.readTime}),o.document))}getAllFromCache(e,t){return this.zn.jn(e,t).next(({documents:o,Wn:u})=>(u.forEach((h,v)=>{this.Hn.set(h,{size:v,readTime:o.get(h).readTime})}),o))}}function Bd(i){return go(i,"remoteDocumentGlobal")}function Kl(i){return go(i,"remoteDocumentsV14")}function Wl(i){const e=i.path.toArray();return[e.slice(0,e.length-2),e[e.length-2],e[e.length-1]]}function ef(i,e){const t=e.documentKey.path.toArray();return[i,$l(e.readTime),t.slice(0,t.length-2),t.length>0?t[t.length-1]:""]}function Zl(i,e){const t=i.path.toArray(),o=e.path.toArray();let u=0;for(let h=0;h(o=u,this.getBaseDocument(e,t,o))).next(u=>(null!==o&&zu(o.mutation,u,ne.empty(),zr.now()),u))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(o=>this.getLocalViewOfDocuments(e,o,wr()).next(()=>o))}getLocalViewOfDocuments(e,t,o=wr()){const u=Wa();return this.populateOverlays(e,u,t).next(()=>this.computeViews(e,t,u,o).next(h=>{let v=Aa();return h.forEach((M,j)=>{v=v.insert(M,j.overlayedDocument)}),v}))}getOverlayedDocuments(e,t){const o=Wa();return this.populateOverlays(e,o,t).next(()=>this.computeViews(e,t,o,wr()))}populateOverlays(e,t,o){const u=[];return o.forEach(h=>{t.has(h)||u.push(h)}),this.documentOverlayCache.getOverlays(e,u).next(h=>{h.forEach((v,M)=>{t.set(v,M)})})}computeViews(e,t,o,u){let h=oa();const v=au(),M=au();return t.forEach((j,W)=>{const de=o.get(W.key);u.has(W.key)&&(void 0===de||de.mutation instanceof za)?h=h.insert(W.key,W):void 0!==de&&(v.set(W.key,de.mutation.getFieldMask()),zu(de.mutation,W,de.mutation.getFieldMask(),zr.now()))}),this.recalculateAndSaveOverlays(e,h).next(j=>(j.forEach((W,de)=>v.set(W,de)),t.forEach((W,de)=>{var Fe;return M.set(W,new hm(de,null!==(Fe=v.get(W))&&void 0!==Fe?Fe:null))}),M))}recalculateAndSaveOverlays(e,t){const o=au();let u=new Xr((v,M)=>v-M),h=wr();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(v=>{for(const M of v)M.keys().forEach(j=>{const W=t.get(j);if(null===W)return;let de=o.get(j)||ne.empty();de=M.applyToLocalView(W,de),o.set(j,de);const Fe=(u.get(M.batchId)||wr()).add(j);u=u.insert(M.batchId,Fe)})}).next(()=>{const v=[],M=u.getReverseIterator();for(;M.hasNext();){const j=M.getNext(),W=j.key,de=j.value,Fe=Ku();de.forEach(vt=>{if(!h.has(vt)){const jt=kh(t.get(vt),o.get(vt));null!==jt&&Fe.set(vt,jt),h=h.add(vt)}}),v.push(this.documentOverlayCache.saveOverlays(e,W,Fe))}return mt.waitFor(v)}).next(()=>o)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(o=>this.recalculateAndSaveOverlays(e,o))}getDocumentsMatchingQuery(e,t,o){return vn.isDocumentKey((u=t).path)&&null===u.collectionGroup&&0===u.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):dd(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,o):this.getDocumentsMatchingCollectionQuery(e,t,o);var u}getNextDocuments(e,t,o,u){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,o,u).next(h=>{const v=u-h.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,o.largestBatchId,u-h.size):mt.resolve(Wa());let M=-1,j=h;return v.next(W=>mt.forEach(W,(de,Fe)=>(M{j=j.insert(de,vt)}))).next(()=>this.populateOverlays(e,W,h)).next(()=>this.computeViews(e,j,W,wr())).next(de=>({batchId:M,changes:_c(de)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new vn(t)).next(o=>{let u=Aa();return o.isFoundDocument()&&(u=u.insert(o.key,o)),u})}getDocumentsMatchingCollectionGroupQuery(e,t,o){const u=t.collectionGroup;let h=Aa();return this.indexManager.getCollectionParents(e,u).next(v=>mt.forEach(v,M=>{const j=(W=t,de=M.child(u),new Ga(de,null,W.explicitOrderBy.slice(),W.filters.slice(),W.limit,W.limitType,W.startAt,W.endAt));var W,de;return this.getDocumentsMatchingCollectionQuery(e,j,o).next(W=>{W.forEach((de,Fe)=>{h=h.insert(de,Fe)})})}).next(()=>h))}getDocumentsMatchingCollectionQuery(e,t,o){let u;return this.remoteDocumentCache.getAllFromCollection(e,t.path,o).next(h=>(u=h,this.documentOverlayCache.getOverlaysForCollection(e,t.path,o.largestBatchId))).next(h=>{h.forEach((M,j)=>{const W=j.getKey();null===u.get(W)&&(u=u.insert(W,Er.newInvalidDocument(W)))});let v=Aa();return u.forEach((M,j)=>{const W=h.get(M);void 0!==W&&zu(W.mutation,j,ne.empty(),zr.now()),fd(t,j)&&(v=v.insert(M,j))}),v})}getBaseDocument(e,t,o){return null===o||1===o.mutation.type?this.remoteDocumentCache.getEntry(e,t):mt.resolve(Er.newInvalidDocument(t))}}class h_{constructor(e){this.wt=e,this.Jn=new Map,this.Yn=new Map}getBundleMetadata(e,t){return mt.resolve(this.Jn.get(t))}saveBundleMetadata(e,t){var o;return this.Jn.set(t.id,{id:(o=t).id,version:o.version,createTime:hs(o.createTime)}),mt.resolve()}getNamedQuery(e,t){return mt.resolve(this.Yn.get(t))}saveNamedQuery(e,t){return this.Yn.set(t.name,{name:(o=t).name,query:Hl(o.bundledQuery),readTime:hs(o.readTime)}),mt.resolve();var o}}class f_{constructor(){this.overlays=new Xr(vn.comparator),this.Xn=new Map}getOverlay(e,t){return mt.resolve(this.overlays.get(t))}getOverlays(e,t){const o=Wa();return mt.forEach(t,u=>this.getOverlay(e,u).next(h=>{null!==h&&o.set(u,h)})).next(()=>o)}saveOverlays(e,t,o){return o.forEach((u,h)=>{this.ie(e,t,h)}),mt.resolve()}removeOverlaysForBatchId(e,t,o){const u=this.Xn.get(o);return void 0!==u&&(u.forEach(h=>this.overlays=this.overlays.remove(h)),this.Xn.delete(o)),mt.resolve()}getOverlaysForCollection(e,t,o){const u=Wa(),h=t.length+1,v=new vn(t.child("")),M=this.overlays.getIteratorFrom(v);for(;M.hasNext();){const j=M.getNext().value,W=j.getKey();if(!t.isPrefixOf(W.path))break;W.path.length===h&&j.largestBatchId>o&&u.set(j.getKey(),j)}return mt.resolve(u)}getOverlaysForCollectionGroup(e,t,o,u){let h=new Xr((W,de)=>W-de);const v=this.overlays.getIterator();for(;v.hasNext();){const W=v.getNext().value;if(W.getKey().getCollectionGroup()===t&&W.largestBatchId>o){let de=h.get(W.largestBatchId);null===de&&(de=Wa(),h=h.insert(W.largestBatchId,de)),de.set(W.getKey(),W)}}const M=Wa(),j=h.getIterator();for(;j.hasNext()&&(j.getNext().value.forEach((W,de)=>M.set(W,de)),!(M.size()>=u)););return mt.resolve(M)}ie(e,t,o){const u=this.overlays.get(o.key);if(null!==u){const v=this.Xn.get(u.largestBatchId).delete(o.key);this.Xn.set(u.largestBatchId,v)}this.overlays=this.overlays.insert(o.key,new Wh(t,o));let h=this.Xn.get(t);void 0===h&&(h=wr(),this.Xn.set(t,h)),this.Xn.set(t,h.add(o.key))}}class nf{constructor(){this.Zn=new p(As.ts),this.es=new p(As.ns)}isEmpty(){return this.Zn.isEmpty()}addReference(e,t){const o=new As(e,t);this.Zn=this.Zn.add(o),this.es=this.es.add(o)}ss(e,t){e.forEach(o=>this.addReference(o,t))}removeReference(e,t){this.rs(new As(e,t))}os(e,t){e.forEach(o=>this.removeReference(o,t))}us(e){const t=new vn(new dr([])),o=new As(t,e),u=new As(t,e+1),h=[];return this.es.forEachInRange([o,u],v=>{this.rs(v),h.push(v.key)}),h}cs(){this.Zn.forEach(e=>this.rs(e))}rs(e){this.Zn=this.Zn.delete(e),this.es=this.es.delete(e)}hs(e){const t=new vn(new dr([])),o=new As(t,e),u=new As(t,e+1);let h=wr();return this.es.forEachInRange([o,u],v=>{h=h.add(v.key)}),h}containsKey(e){const t=new As(e,0),o=this.Zn.firstAfterOrEqual(t);return null!==o&&e.isEqual(o.key)}}class As{constructor(e,t){this.key=e,this.ls=t}static ts(e,t){return vn.comparator(e.key,t.key)||$n(e.ls,t.ls)}static ns(e,t){return $n(e.ls,t.ls)||vn.comparator(e.key,t.key)}}class p_{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.fs=1,this.ds=new p(As.ts)}checkEmpty(e){return mt.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,o,u){const h=this.fs;this.fs++;const v=new Mc(h,t,o,u);this.mutationQueue.push(v);for(const M of u)this.ds=this.ds.add(new As(M.key,h)),this.indexManager.addToCollectionParentIndex(e,M.key.path.popLast());return mt.resolve(v)}lookupMutationBatch(e,t){return mt.resolve(this._s(t))}getNextMutationBatchAfterBatchId(e,t){const u=this.ws(t+1),h=u<0?0:u;return mt.resolve(this.mutationQueue.length>h?this.mutationQueue[h]:null)}getHighestUnacknowledgedBatchId(){return mt.resolve(0===this.mutationQueue.length?-1:this.fs-1)}getAllMutationBatches(e){return mt.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const o=new As(t,0),u=new As(t,Number.POSITIVE_INFINITY),h=[];return this.ds.forEachInRange([o,u],v=>{const M=this._s(v.ls);h.push(M)}),mt.resolve(h)}getAllMutationBatchesAffectingDocumentKeys(e,t){let o=new p($n);return t.forEach(u=>{const h=new As(u,0),v=new As(u,Number.POSITIVE_INFINITY);this.ds.forEachInRange([h,v],M=>{o=o.add(M.ls)})}),mt.resolve(this.gs(o))}getAllMutationBatchesAffectingQuery(e,t){const o=t.path,u=o.length+1;let h=o;vn.isDocumentKey(h)||(h=h.child(""));const v=new As(new vn(h),0);let M=new p($n);return this.ds.forEachWhile(j=>{const W=j.key.path;return!!o.isPrefixOf(W)&&(W.length===u&&(M=M.add(j.ls)),!0)},v),mt.resolve(this.gs(M))}gs(e){const t=[];return e.forEach(o=>{const u=this._s(o);null!==u&&t.push(u)}),t}removeMutationBatch(e,t){zn(0===this.ys(t.batchId,"removed")),this.mutationQueue.shift();let o=this.ds;return mt.forEach(t.mutations,u=>{const h=new As(u.key,t.batchId);return o=o.delete(h),this.referenceDelegate.markPotentiallyOrphaned(e,u.key)}).next(()=>{this.ds=o})}In(e){}containsKey(e,t){const o=new As(t,0),u=this.ds.firstAfterOrEqual(o);return mt.resolve(t.isEqual(u&&u.key))}performConsistencyCheck(e){return mt.resolve()}ys(e,t){return this.ws(e)}ws(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}_s(e){const t=this.ws(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class g_{constructor(e){this.ps=e,this.docs=new Xr(vn.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const o=t.key,u=this.docs.get(o),h=u?u.size:0,v=this.ps(t);return this.docs=this.docs.insert(o,{document:t.mutableCopy(),size:v}),this.size+=v-h,this.indexManager.addToCollectionParentIndex(e,o.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const o=this.docs.get(t);return mt.resolve(o?o.document.mutableCopy():Er.newInvalidDocument(t))}getEntries(e,t){let o=oa();return t.forEach(u=>{const h=this.docs.get(u);o=o.insert(u,h?h.document.mutableCopy():Er.newInvalidDocument(u))}),mt.resolve(o)}getAllFromCollection(e,t,o){let u=oa();const h=new vn(t.child("")),v=this.docs.getIteratorFrom(h);for(;v.hasNext();){const{key:M,value:{document:j}}=v.getNext();if(!t.isPrefixOf(M.path))break;M.path.length>t.length+1||ko(cc(j),o)<=0||(u=u.insert(j.key,j.mutableCopy()))}return mt.resolve(u)}getAllFromCollectionGroup(e,t,o,u){_n()}Is(e,t){return mt.forEach(this.docs,o=>t(o))}newChangeBuffer(e){return new m_(this)}getSize(e){return mt.resolve(this.size)}}class m_ extends dm{constructor(e){super(),this.zn=e}applyChanges(e){const t=[];return this.changes.forEach((o,u)=>{u.isValidDocument()?t.push(this.zn.addEntry(e,u)):this.zn.removeEntry(o)}),mt.waitFor(t)}getFromCache(e,t){return this.zn.getEntry(e,t)}getAllFromCache(e,t){return this.zn.getEntries(e,t)}}class y_{constructor(e){this.persistence=e,this.Ts=new Ka(t=>Ca(t),$u),this.lastRemoteSnapshotVersion=On.min(),this.highestTargetId=0,this.Es=0,this.As=new nf,this.targetCount=0,this.Rs=yl.An()}forEachTarget(e,t){return this.Ts.forEach((o,u)=>t(u)),mt.resolve()}getLastRemoteSnapshotVersion(e){return mt.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return mt.resolve(this.Es)}allocateTargetId(e){return this.highestTargetId=this.Rs.next(),mt.resolve(this.highestTargetId)}setTargetsMetadata(e,t,o){return o&&(this.lastRemoteSnapshotVersion=o),t>this.Es&&(this.Es=t),mt.resolve()}vn(e){this.Ts.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.Rs=new yl(t),this.highestTargetId=t),e.sequenceNumber>this.Es&&(this.Es=e.sequenceNumber)}addTargetData(e,t){return this.vn(t),this.targetCount+=1,mt.resolve()}updateTargetData(e,t){return this.vn(t),mt.resolve()}removeTargetData(e,t){return this.Ts.delete(t.target),this.As.us(t.targetId),this.targetCount-=1,mt.resolve()}removeTargets(e,t,o){let u=0;const h=[];return this.Ts.forEach((v,M)=>{M.sequenceNumber<=t&&null===o.get(M.targetId)&&(this.Ts.delete(v),h.push(this.removeMatchingKeysForTargetId(e,M.targetId)),u++)}),mt.waitFor(h).next(()=>u)}getTargetCount(e){return mt.resolve(this.targetCount)}getTargetData(e,t){const o=this.Ts.get(t)||null;return mt.resolve(o)}addMatchingKeys(e,t,o){return this.As.ss(t,o),mt.resolve()}removeMatchingKeys(e,t,o){this.As.os(t,o);const u=this.persistence.referenceDelegate,h=[];return u&&t.forEach(v=>{h.push(u.markPotentiallyOrphaned(e,v))}),mt.waitFor(h)}removeMatchingKeysForTargetId(e,t){return this.As.us(t),mt.resolve()}getMatchingKeysForTargetId(e,t){const o=this.As.hs(t);return mt.resolve(o)}containsKey(e,t){return mt.resolve(this.As.containsKey(t))}}class rf{constructor(e,t){this.bs={},this.overlays={},this.Ps=new To(0),this.vs=!1,this.vs=!0,this.referenceDelegate=e(this),this.Vs=new y_(this),this.indexManager=new a_,this.remoteDocumentCache=new g_(o=>this.referenceDelegate.Ss(o)),this.wt=new gp(t),this.Ds=new h_(this.wt)}start(){return Promise.resolve()}shutdown(){return this.vs=!1,Promise.resolve()}get started(){return this.vs}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new f_,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let o=this.bs[e.toKey()];return o||(o=new p_(t,this.referenceDelegate),this.bs[e.toKey()]=o),o}getTargetCache(){return this.Vs}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ds}runTransaction(e,t,o){Xt("MemoryPersistence","Starting transaction:",e);const u=new fm(this.Ps.next());return this.referenceDelegate.Cs(),o(u).next(h=>this.referenceDelegate.xs(u).next(()=>h)).toPromise().then(h=>(u.raiseOnCommittedEvent(),h))}Ns(e,t){return mt.or(Object.values(this.bs).map(o=>()=>o.containsKey(e,t)))}}class fm extends hc{constructor(e){super(),this.currentSequenceNumber=e}}class jd{constructor(e){this.persistence=e,this.ks=new nf,this.Os=null}static Ms(e){return new jd(e)}get Fs(){if(this.Os)return this.Os;throw _n()}addReference(e,t,o){return this.ks.addReference(o,t),this.Fs.delete(o.toString()),mt.resolve()}removeReference(e,t,o){return this.ks.removeReference(o,t),this.Fs.add(o.toString()),mt.resolve()}markPotentiallyOrphaned(e,t){return this.Fs.add(t.toString()),mt.resolve()}removeTarget(e,t){this.ks.us(t.targetId).forEach(u=>this.Fs.add(u.toString()));const o=this.persistence.getTargetCache();return o.getMatchingKeysForTargetId(e,t.targetId).next(u=>{u.forEach(h=>this.Fs.add(h.toString()))}).next(()=>o.removeTargetData(e,t))}Cs(){this.Os=new Set}xs(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return mt.forEach(this.Fs,o=>{const u=vn.fromPath(o);return this.$s(e,u).next(h=>{h||t.removeEntry(u,On.min())})}).next(()=>(this.Os=null,t.apply(e)))}updateLimboDocument(e,t){return this.$s(e,t).next(o=>{o?this.Fs.delete(t.toString()):this.Fs.add(t.toString())})}Ss(e){return 0}$s(e,t){return mt.or([()=>mt.resolve(this.ks.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ns(e,t)])}}class Ou{constructor(e){this.wt=e}O(e,t,o,u){const h=new bu("createOrUpgrade",t);var M;o<1&&u>=1&&(e.createObjectStore("owner"),(M=e).createObjectStore("mutationQueues",{keyPath:"userId"}),M.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",w,{unique:!0}),M.createObjectStore("documentMutations"),pm(e),function(M){M.createObjectStore("remoteDocuments")}(e));let v=mt.resolve();return o<3&&u>=3&&(0!==o&&(function(M){M.deleteObjectStore("targetDocuments"),M.deleteObjectStore("targets"),M.deleteObjectStore("targetGlobal")}(e),pm(e)),v=v.next(()=>function(M){const j=M.store("targetGlobal"),W={highestTargetId:0,highestListenSequenceNumber:0,lastRemoteSnapshotVersion:On.min().toTimestamp(),targetCount:0};return j.put("targetGlobalKey",W)}(h))),o<4&&u>=4&&(0!==o&&(v=v.next(()=>function(M,j){return j.store("mutations").K().next(W=>{M.deleteObjectStore("mutations"),M.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",w,{unique:!0});const de=j.store("mutations"),Fe=W.map(vt=>de.put(vt));return mt.waitFor(Fe)})}(e,h))),v=v.next(()=>{!function(M){M.createObjectStore("clientMetadata",{keyPath:"clientId"})}(e)})),o<5&&u>=5&&(v=v.next(()=>this.Bs(h))),o<6&&u>=6&&(v=v.next(()=>(function(M){M.createObjectStore("remoteDocumentGlobal")}(e),this.Ls(h)))),o<7&&u>=7&&(v=v.next(()=>this.Us(h))),o<8&&u>=8&&(v=v.next(()=>this.qs(e,h))),o<9&&u>=9&&(v=v.next(()=>{!function(M){M.objectStoreNames.contains("remoteDocumentChanges")&&M.deleteObjectStore("remoteDocumentChanges")}(e)})),o<10&&u>=10&&(v=v.next(()=>this.Ks(h))),o<11&&u>=11&&(v=v.next(()=>{(function(M){M.createObjectStore("bundles",{keyPath:"bundleId"})})(e),function(M){M.createObjectStore("namedQueries",{keyPath:"name"})}(e)})),o<12&&u>=12&&(v=v.next(()=>{!function(M){const j=M.createObjectStore("documentOverlays",{keyPath:Cc});j.createIndex("collectionPathOverlayIndex",Rd,{unique:!1}),j.createIndex("collectionGroupOverlayIndex",Kh,{unique:!1})}(e)})),o<13&&u>=13&&(v=v.next(()=>function(M){const j=M.createObjectStore("remoteDocumentsV14",{keyPath:yt});j.createIndex("documentKeyIndex",on),j.createIndex("collectionGroupIndex",nn)}(e)).next(()=>this.Gs(e,h)).next(()=>e.deleteObjectStore("remoteDocuments"))),o<14&&u>=14&&(v=v.next(()=>this.Qs(e,h))),o<15&&u>=15&&(v=v.next(()=>function(M){M.createObjectStore("indexConfiguration",{keyPath:"indexId",autoIncrement:!0}).createIndex("collectionGroupIndex","collectionGroup",{unique:!1}),M.createObjectStore("indexState",{keyPath:Au}).createIndex("sequenceNumberIndex",Bl,{unique:!1}),M.createObjectStore("indexEntries",{keyPath:jl}).createIndex("documentKeyIndex",Od,{unique:!1})}(e))),v}Ls(e){let t=0;return e.store("remoteDocuments").J((o,u)=>{t+=Xh(u)}).next(()=>{const o={byteSize:t};return e.store("remoteDocumentGlobal").put("remoteDocumentGlobalKey",o)})}Bs(e){const t=e.store("mutationQueues"),o=e.store("mutations");return t.K().next(u=>mt.forEach(u,h=>{const v=IDBKeyRange.bound([h.userId,-1],[h.userId,h.lastAcknowledgedBatchId]);return o.K("userMutationsIndex",v).next(M=>mt.forEach(M,j=>{zn(j.userId===h.userId);const W=Yu(this.wt,j);return Dp(e,h.userId,W).next(()=>{})}))}))}Us(e){const t=e.store("targetDocuments"),o=e.store("remoteDocuments");return e.store("targetGlobal").get("targetGlobalKey").next(u=>{const h=[];return o.J((v,M)=>{const j=new dr(v),W=[0,So(j)];h.push(t.get(W).next(de=>de?mt.resolve():t.put({targetId:0,path:So(j),sequenceNumber:u.highestListenSequenceNumber})))}).next(()=>mt.waitFor(h))})}qs(e,t){e.createObjectStore("collectionParents",{keyPath:no});const o=t.store("collectionParents"),u=new Qh,h=v=>{if(u.add(v)){const M=v.lastSegment(),j=v.popLast();return o.put({collectionId:M,parent:So(j)})}};return t.store("remoteDocuments").J({H:!0},(v,M)=>{const j=new dr(v);return h(j.popLast())}).next(()=>t.store("documentMutations").J({H:!0},([v,M,j],W)=>{const de=d(M);return h(de.popLast())}))}Ks(e){const t=e.store("targets");return t.J((o,u)=>{const h=xc(u),v=Zh(this.wt,h);return t.put(v)})}Gs(e,t){const o=t.store("remoteDocuments"),u=[];return o.J((h,v)=>{const M=t.store("remoteDocumentsV14"),j=(W=v,W.document?new vn(dr.fromString(W.document.name).popFirst(5)):W.noDocument?vn.fromSegments(W.noDocument.path):W.unknownDocument?vn.fromSegments(W.unknownDocument.path):_n()).path.toArray();var W;const de={prefixPath:j.slice(0,j.length-2),collectionGroup:j[j.length-2],documentId:j[j.length-1],readTime:v.readTime||[0,0],unknownDocument:v.unknownDocument,noDocument:v.noDocument,document:v.document,hasCommittedMutations:!!v.hasCommittedMutations};u.push(M.put(de))}).next(()=>mt.waitFor(u))}Qs(e,t){const o=t.store("mutations"),u=Sp(this.wt),h=new rf(jd.Ms,this.wt.ne);return o.K().next(v=>{const M=new Map;return v.forEach(j=>{var W;let de=null!==(W=M.get(j.userId))&&void 0!==W?W:wr();Yu(this.wt,j).keys().forEach(Fe=>de=de.add(Fe)),M.set(j.userId,de)}),mt.forEach(M,(j,W)=>{const de=new hi(W),Fe=kd.se(this.wt,de),vt=h.getIndexManager(de),jt=Vd.se(de,this.wt,vt,h.referenceDelegate);return new tf(u,jt,Fe,vt).recalculateAndSaveOverlaysForDocumentKeys(new Nd(t,To.ot),j).next()})})}}function pm(i){i.createObjectStore("targetDocuments",{keyPath:Bn}).createIndex("documentTargetsIndex",Hr,{unique:!0}),i.createObjectStore("targets",{keyPath:"targetId"}).createIndex("queryTargetsIndex",Fn,{unique:!0}),i.createObjectStore("targetGlobal")}const $d="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";class Hd{constructor(e,t,o,u,h,v,M,j,W,de,Fe=14){if(this.allowTabSynchronization=e,this.persistenceKey=t,this.clientId=o,this.js=h,this.window=v,this.document=M,this.Ws=W,this.zs=de,this.Hs=Fe,this.Ps=null,this.vs=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Js=null,this.inForeground=!1,this.Ys=null,this.Xs=null,this.Zs=Number.NEGATIVE_INFINITY,this.ti=vt=>Promise.resolve(),!Hd.V())throw new D(b.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new cm(this,u),this.ei=t+"main",this.wt=new gp(j),this.ni=new Ls(this.ei,this.Hs,new Ou(this.wt)),this.Vs=new l_(this.referenceDelegate,this.wt),this.remoteDocumentCache=Sp(this.wt),this.Ds=new n_,this.window&&this.window.localStorage?this.si=this.window.localStorage:(this.si=null,!1===de&&Jr("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}start(){return this.ii().then(()=>{if(!this.isPrimary&&!this.allowTabSynchronization)throw new D(b.FAILED_PRECONDITION,$d);return this.ri(),this.oi(),this.ui(),this.runTransaction("getHighestListenSequenceNumber","readonly",e=>this.Vs.getHighestSequenceNumber(e))}).then(e=>{this.Ps=new To(e,this.Ws)}).then(()=>{this.vs=!0}).catch(e=>(this.ni&&this.ni.close(),Promise.reject(e)))}ci(e){var t=this;return this.ti=function(){var o=(0,Ee.Z)(function*(u){if(t.started)return e(u)});return function(u){return o.apply(this,arguments)}}(),e(this.isPrimary)}setDatabaseDeletedListener(e){this.ni.F(function(){var t=(0,Ee.Z)(function*(o){null===o.newVersion&&(yield e())});return function(o){return t.apply(this,arguments)}}())}setNetworkEnabled(e){var t=this;this.networkEnabled!==e&&(this.networkEnabled=e,this.js.enqueueAndForget((0,Ee.Z)(function*(){t.started&&(yield t.ii())})))}ii(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",e=>xp(e).put({clientId:this.clientId,updateTimeMs:Date.now(),networkEnabled:this.networkEnabled,inForeground:this.inForeground}).next(()=>{if(this.isPrimary)return this.ai(e).next(t=>{t||(this.isPrimary=!1,this.js.enqueueRetryable(()=>this.ti(!1)))})}).next(()=>this.hi(e)).next(t=>this.isPrimary&&!t?this.li(e).next(()=>!1):!!t&&this.fi(e).next(()=>!0))).catch(e=>{if(Ws(e))return Xt("IndexedDbPersistence","Failed to extend owner lease: ",e),this.isPrimary;if(!this.allowTabSynchronization)throw e;return Xt("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1}).then(e=>{this.isPrimary!==e&&this.js.enqueueRetryable(()=>this.ti(e)),this.isPrimary=e})}ai(e){return Gd(e).get("owner").next(t=>mt.resolve(this.di(t)))}_i(e){return xp(e).delete(this.clientId)}wi(){var e=this;return(0,Ee.Z)(function*(){if(e.isPrimary&&!e.mi(e.Zs,18e5)){e.Zs=Date.now();const t=yield e.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",o=>{const u=go(o,"clientMetadata");return u.K().next(h=>{const v=e.gi(h,18e5),M=h.filter(j=>-1===v.indexOf(j));return mt.forEach(M,j=>u.delete(j.clientId)).next(()=>M)})}).catch(()=>[]);if(e.si)for(const o of t)e.si.removeItem(e.yi(o.clientId))}})()}ui(){this.Xs=this.js.enqueueAfterDelay("client_metadata_refresh",4e3,()=>this.ii().then(()=>this.wi()).then(()=>this.ui()))}di(e){return!!e&&e.ownerId===this.clientId}hi(e){return this.zs?mt.resolve(!0):Gd(e).get("owner").next(t=>{if(null!==t&&this.mi(t.leaseTimestampMs,5e3)&&!this.pi(t.ownerId)){if(this.di(t)&&this.networkEnabled)return!0;if(!this.di(t)){if(!t.allowTabSynchronization)throw new D(b.FAILED_PRECONDITION,$d);return!1}}return!(!this.networkEnabled||!this.inForeground)||xp(e).K().next(o=>void 0===this.gi(o,5e3).find(u=>{if(this.clientId!==u.clientId){const v=!this.inForeground&&u.inForeground,M=this.networkEnabled===u.networkEnabled;if(!this.networkEnabled&&u.networkEnabled||v&&M)return!0}return!1}))}).next(t=>(this.isPrimary!==t&&Xt("IndexedDbPersistence",`Client ${t?"is":"is not"} eligible for a primary lease.`),t))}shutdown(){var e=this;return(0,Ee.Z)(function*(){e.vs=!1,e.Ii(),e.Xs&&(e.Xs.cancel(),e.Xs=null),e.Ti(),e.Ei(),yield e.ni.runTransaction("shutdown","readwrite",["owner","clientMetadata"],t=>{const o=new Nd(t,To.ot);return e.li(o).next(()=>e._i(o))}),e.ni.close(),e.Ai()})()}gi(e,t){return e.filter(o=>this.mi(o.updateTimeMs,t)&&!this.pi(o.clientId))}Ri(){return this.runTransaction("getActiveClients","readonly",e=>xp(e).K().next(t=>this.gi(t,18e5).map(o=>o.clientId)))}get started(){return this.vs}getMutationQueue(e,t){return Vd.se(e,this.wt,t,this.referenceDelegate)}getTargetCache(){return this.Vs}getRemoteDocumentCache(){return this.remoteDocumentCache}getIndexManager(e){return new u_(e,this.wt.ne.databaseId)}getDocumentOverlayCache(e){return kd.se(this.wt,e)}getBundleCache(){return this.Ds}runTransaction(e,t,o){Xt("IndexedDbPersistence","Starting transaction:",e);const u="readonly"===t?"readonly":"readwrite",h=15===(v=this.Hs)?Sc:14===v?Pd:13===v?cu:12===v?Ac:11===v?Tc:void _n();var v;let M;return this.ni.runTransaction(e,u,h,j=>(M=new Nd(j,this.Ps?this.Ps.next():To.ot),"readwrite-primary"===t?this.ai(M).next(W=>!!W||this.hi(M)).next(W=>{if(!W)throw Jr(`Failed to obtain primary lease for action '${e}'.`),this.isPrimary=!1,this.js.enqueueRetryable(()=>this.ti(!1)),new D(b.FAILED_PRECONDITION,dc);return o(M)}).next(W=>this.fi(M).next(()=>W)):this.bi(M).next(()=>o(M)))).then(j=>(M.raiseOnCommittedEvent(),j))}bi(e){return Gd(e).get("owner").next(t=>{if(null!==t&&this.mi(t.leaseTimestampMs,5e3)&&!this.pi(t.ownerId)&&!this.di(t)&&!(this.zs||this.allowTabSynchronization&&t.allowTabSynchronization))throw new D(b.FAILED_PRECONDITION,$d)})}fi(e){const t={ownerId:this.clientId,allowTabSynchronization:this.allowTabSynchronization,leaseTimestampMs:Date.now()};return Gd(e).put("owner",t)}static V(){return Ls.V()}li(e){const t=Gd(e);return t.get("owner").next(o=>this.di(o)?(Xt("IndexedDbPersistence","Releasing primary lease."),t.delete("owner")):mt.resolve())}mi(e,t){const o=Date.now();return!(eo&&(Jr(`Detected an update time that is in the future: ${e} > ${o}`),1))}ri(){null!==this.document&&"function"==typeof this.document.addEventListener&&(this.Ys=()=>{this.js.enqueueAndForget(()=>(this.inForeground="visible"===this.document.visibilityState,this.ii()))},this.document.addEventListener("visibilitychange",this.Ys),this.inForeground="visible"===this.document.visibilityState)}Ti(){this.Ys&&(this.document.removeEventListener("visibilitychange",this.Ys),this.Ys=null)}oi(){var e;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.Js=()=>{this.Ii(),(0,xe.G6)()&&navigator.appVersion.match(/Version\/1[45]/)&&this.js.enterRestrictedMode(!0),this.js.enqueueAndForget(()=>this.shutdown())},this.window.addEventListener("pagehide",this.Js))}Ei(){this.Js&&(this.window.removeEventListener("pagehide",this.Js),this.Js=null)}pi(e){var t;try{const o=null!==(null===(t=this.si)||void 0===t?void 0:t.getItem(this.yi(e)));return Xt("IndexedDbPersistence",`Client '${e}' ${o?"is":"is not"} zombied in LocalStorage`),o}catch(o){return Jr("IndexedDbPersistence","Failed to get zombied client id.",o),!1}}Ii(){if(this.si)try{this.si.setItem(this.yi(this.clientId),String(Date.now()))}catch(e){Jr("Failed to set zombie client id.",e)}}Ai(){if(this.si)try{this.si.removeItem(this.yi(this.clientId))}catch{}}yi(e){return`firestore_zombie_${this.persistenceKey}_${e}`}}function Gd(i){return go(i,"owner")}function xp(i){return go(i,"clientMetadata")}function gm(i,e){let t=i.projectId;return i.isDefaultDatabase||(t+="."+i.database),"firestore/"+e+"/"+t+"/"}class mm{constructor(e,t,o,u){this.targetId=e,this.fromCache=t,this.Pi=o,this.vi=u}static Vi(e,t){let o=wr(),u=wr();for(const h of t.docChanges)switch(h.type){case 0:o=o.add(h.doc.key);break;case 1:u=u.add(h.doc.key)}return new mm(e,t.fromCache,o,u)}}class ym{constructor(){this.Si=!1}initialize(e,t){this.Di=e,this.indexManager=t,this.Si=!0}getDocumentsMatchingQuery(e,t,o,u){return this.Ci(e,t).next(h=>h||this.xi(e,t,u,o)).next(h=>h||this.Ni(e,t))}Ci(e,t){return mt.resolve(null)}xi(e,t,o,u){return function yc(i){return 0===i.filters.length&&null===i.limit&&null==i.startAt&&null==i.endAt&&(0===i.explicitOrderBy.length||1===i.explicitOrderBy.length&&i.explicitOrderBy[0].field.isKeyField())}(t)||u.isEqual(On.min())?this.Ni(e,t):this.Di.getDocuments(e,o).next(h=>{const v=this.ki(t,h);return this.Oi(t,v,o,u)?this.Ni(e,t):(Va()<=Ne.in.DEBUG&&Xt("QueryEngine","Re-using previous result from %s to execute query: %s",u.toString(),Ml(t)),this.Mi(e,v,t,lc(u,-1)))})}ki(e,t){let o=new p(pd(e));return t.forEach((u,h)=>{fd(e,h)&&(o=o.add(h))}),o}Oi(e,t,o,u){if(null===e.limit)return!1;if(o.size!==t.size)return!0;const h="F"===e.limitType?t.last():t.first();return!!h&&(h.hasPendingWrites||h.version.compareTo(u)>0)}Ni(e,t){return Va()<=Ne.in.DEBUG&&Xt("QueryEngine","Using full collection scan to execute query:",Ml(t)),this.Di.getDocumentsMatchingQuery(e,t,$o.min())}Mi(e,t,o,u){return this.Di.getDocumentsMatchingQuery(e,o,u).next(h=>(t.forEach(v=>{h=h.insert(v.key,v)}),h))}}class _m{constructor(e,t,o,u){this.persistence=e,this.Fi=t,this.wt=u,this.$i=new Xr($n),this.Bi=new Ka(h=>Ca(h),$u),this.Li=new Map,this.Ui=e.getRemoteDocumentCache(),this.Vs=e.getTargetCache(),this.Ds=e.getBundleCache(),this.qi(o)}qi(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new tf(this.Ui,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Ui.setIndexManager(this.indexManager),this.Fi.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.$i))}}function __(i,e,t,o){return new _m(i,e,t,o)}function vm(i,e){return _l.apply(this,arguments)}function _l(){return _l=(0,Ee.Z)(function*(i,e){const t=En(i);return yield t.persistence.runTransaction("Handle user change","readonly",o=>{let u;return t.mutationQueue.getAllMutationBatches(o).next(h=>(u=h,t.qi(e),t.mutationQueue.getAllMutationBatches(o))).next(h=>{const v=[],M=[];let j=wr();for(const W of u){v.push(W.batchId);for(const de of W.mutations)j=j.add(de.key)}for(const W of h){M.push(W.batchId);for(const de of W.mutations)j=j.add(de.key)}return t.localDocuments.getDocuments(o,j).next(W=>({Ki:W,removedBatchIds:v,addedBatchIds:M}))})})}),_l.apply(this,arguments)}function v_(i,e){const t=En(i);return t.persistence.runTransaction("Acknowledge batch","readwrite-primary",o=>{const u=e.batch.keys(),h=t.Ui.newChangeBuffer({trackRemovals:!0});return function(v,M,j,W){const de=j.batch,Fe=de.keys();let vt=mt.resolve();return Fe.forEach(jt=>{vt=vt.next(()=>W.getEntry(M,jt)).next(en=>{const Mn=j.docVersions.get(jt);zn(null!==Mn),en.version.compareTo(Mn)<0&&(de.applyToRemoteDocument(en,j),en.isValidDocument()&&(en.setReadTime(j.commitVersion),W.addEntry(en)))})}),vt.next(()=>v.mutationQueue.removeMutationBatch(M,de))}(t,o,e,h).next(()=>h.apply(o)).next(()=>t.mutationQueue.performConsistencyCheck(o)).next(()=>t.documentOverlayCache.removeOverlaysForBatchId(o,u,e.batch.batchId)).next(()=>t.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(o,function(v){let M=wr();for(let j=0;j0&&(M=M.add(v.batch.mutations[j].key));return M}(e))).next(()=>t.localDocuments.getDocuments(o,u))})}function Op(i){const e=En(i);return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Vs.getLastRemoteSnapshotVersion(t))}function sf(i,e){const t=En(i),o=e.snapshotVersion;let u=t.$i;return t.persistence.runTransaction("Apply remote event","readwrite-primary",h=>{const v=t.Ui.newChangeBuffer({trackRemovals:!0});u=t.$i;const M=[];e.targetChanges.forEach((de,Fe)=>{const vt=u.get(Fe);if(!vt)return;M.push(t.Vs.removeMatchingKeys(h,de.removedDocuments,Fe).next(()=>t.Vs.addMatchingKeys(h,de.addedDocuments,Fe)));let jt=vt.withSequenceNumber(h.currentSequenceNumber);var en,Mn,Gn;e.targetMismatches.has(Fe)?jt=jt.withResumeToken(Te.EMPTY_BYTE_STRING,On.min()).withLastLimboFreeSnapshotVersion(On.min()):de.resumeToken.approximateByteSize()>0&&(jt=jt.withResumeToken(de.resumeToken,o)),u=u.insert(Fe,jt),Mn=jt,Gn=de,(0===(en=vt).resumeToken.approximateByteSize()||Mn.snapshotVersion.toMicroseconds()-en.snapshotVersion.toMicroseconds()>=3e8||Gn.addedDocuments.size+Gn.modifiedDocuments.size+Gn.removedDocuments.size>0)&&M.push(t.Vs.updateTargetData(h,jt))});let j=oa(),W=wr();if(e.documentUpdates.forEach(de=>{e.resolvedLimboDocuments.has(de)&&M.push(t.persistence.referenceDelegate.updateLimboDocument(h,de))}),M.push(Em(h,v,e.documentUpdates).next(de=>{j=de.Gi,W=de.Qi})),!o.isEqual(On.min())){const de=t.Vs.getLastRemoteSnapshotVersion(h).next(Fe=>t.Vs.setTargetsMetadata(h,h.currentSequenceNumber,o));M.push(de)}return mt.waitFor(M).next(()=>v.apply(h)).next(()=>t.localDocuments.getLocalViewOfDocuments(h,j,W)).next(()=>j)}).then(h=>(t.$i=u,h))}function Em(i,e,t){let o=wr(),u=wr();return t.forEach(h=>o=o.add(h)),e.getEntries(i,o).next(h=>{let v=oa();return t.forEach((M,j)=>{const W=h.get(M);j.isFoundDocument()!==W.isFoundDocument()&&(u=u.add(M)),j.isNoDocument()&&j.version.isEqual(On.min())?(e.removeEntry(M,j.readTime),v=v.insert(M,j)):!W.isValidDocument()||j.version.compareTo(W.version)>0||0===j.version.compareTo(W.version)&&W.hasPendingWrites?(e.addEntry(j),v=v.insert(M,j)):Xt("LocalStore","Ignoring outdated watch update for ",M,". Current version:",W.version," Watch version:",j.version)}),{Gi:v,Qi:u}})}function wm(i,e){const t=En(i);return t.persistence.runTransaction("Get next mutation batch","readonly",o=>(void 0===e&&(e=-1),t.mutationQueue.getNextMutationBatchAfterBatchId(o,e)))}function Rc(i,e){const t=En(i);return t.persistence.runTransaction("Allocate target","readwrite",o=>{let u;return t.Vs.getTargetData(o,e).next(h=>h?(u=h,mt.resolve(u)):t.Vs.allocateTargetId(o).next(v=>(u=new qu(e,v,0,o.currentSequenceNumber),t.Vs.addTargetData(o,u).next(()=>u))))}).then(o=>{const u=t.$i.get(o.targetId);return(null===u||o.snapshotVersion.compareTo(u.snapshotVersion)>0)&&(t.$i=t.$i.insert(o.targetId,o),t.Bi.set(e,o.targetId)),o})}function Pc(i,e,t){return Rp.apply(this,arguments)}function Rp(){return Rp=(0,Ee.Z)(function*(i,e,t){const o=En(i),u=o.$i.get(e),h=t?"readwrite":"readwrite-primary";try{t||(yield o.persistence.runTransaction("Release target",h,v=>o.persistence.referenceDelegate.removeTarget(v,u)))}catch(v){if(!Ws(v))throw v;Xt("LocalStore",`Failed to update sequence numbers for target ${e}: ${v}`)}o.$i=o.$i.remove(e),o.Bi.delete(u.target)}),Rp.apply(this,arguments)}function af(i,e,t){const o=En(i);let u=On.min(),h=wr();return o.persistence.runTransaction("Execute query","readonly",v=>function(M,j,W){const de=En(M),Fe=de.Bi.get(W);return void 0!==Fe?mt.resolve(de.$i.get(Fe)):de.Vs.getTargetData(j,W)}(o,v,ho(e)).next(M=>{if(M)return u=M.lastLimboFreeSnapshotVersion,o.Vs.getMatchingKeysForTargetId(v,M.targetId).next(j=>{h=j})}).next(()=>o.Fi.getDocumentsMatchingQuery(v,e,t?u:On.min(),t?h:wr())).next(M=>(Dm(o,xh(e),M),{documents:M,ji:h})))}function bm(i,e){const t=En(i),o=En(t.Vs),u=t.$i.get(e);return u?Promise.resolve(u.target):t.persistence.runTransaction("Get target data","readonly",h=>o.te(h,e).next(v=>v?v.target:null))}function Pp(i,e){const t=En(i),o=t.Li.get(e)||On.min();return t.persistence.runTransaction("Get new document changes","readonly",u=>t.Ui.getAllFromCollectionGroup(u,e,lc(o,-1),Number.MAX_SAFE_INTEGER)).then(u=>(Dm(t,e,u),u))}function Dm(i,e,t){let o=On.min();t.forEach((u,h)=>{h.readTime.compareTo(o)>0&&(o=h.readTime)}),i.Li.set(e,o)}function uf(){return uf=(0,Ee.Z)(function*(i,e,t,o){const u=En(i);let h=wr(),v=oa();for(const W of t){const de=e.Wi(W.metadata.name);W.document&&(h=h.add(de));const Fe=e.zi(W);Fe.setReadTime(e.Hi(W.metadata.readTime)),v=v.insert(de,Fe)}const M=u.Ui.newChangeBuffer({trackRemovals:!0}),j=yield Rc(u,(W=o,ho(ul(dr.fromString(`__bundle__/docs/${W}`)))));var W;return u.persistence.runTransaction("Apply bundle documents","readwrite",W=>Em(W,M,v).next(de=>(M.apply(W),de)).next(de=>u.Vs.removeMatchingKeysForTargetId(W,j.targetId).next(()=>u.Vs.addMatchingKeys(W,h,j.targetId)).next(()=>u.localDocuments.getLocalViewOfDocuments(W,de.Gi,de.Qi)).next(()=>de.Gi)))}),uf.apply(this,arguments)}function Np(i,e){return Cm.apply(this,arguments)}function Cm(){return Cm=(0,Ee.Z)(function*(i,e,t=wr()){const o=yield Rc(i,ho(Hl(e.bundledQuery))),u=En(i);return u.persistence.runTransaction("Save named query","readwrite",h=>{const v=hs(e.readTime);if(o.snapshotVersion.compareTo(v)>=0)return u.Ds.saveNamedQuery(h,e);const M=o.withResumeToken(Te.EMPTY_BYTE_STRING,v);return u.$i=u.$i.insert(M.targetId,M),u.Vs.updateTargetData(h,M).next(()=>u.Vs.removeMatchingKeysForTargetId(h,o.targetId)).next(()=>u.Vs.addMatchingKeys(h,t,o.targetId)).next(()=>u.Ds.saveNamedQuery(h,e))})}),Cm.apply(this,arguments)}function lf(i,e){return`firestore_clients_${i}_${e}`}function Tm(i,e,t){let o=`firestore_mutations_${i}_${t}`;return e.isAuthenticated()&&(o+=`_${e.uid}`),o}function Am(i,e){return`firestore_targets_${i}_${e}`}class Qu{constructor(e,t,o,u){this.user=e,this.batchId=t,this.state=o,this.error=u}static Ji(e,t,o){const u=JSON.parse(o);let h,v="object"==typeof u&&-1!==["pending","acknowledged","rejected"].indexOf(u.state)&&(void 0===u.error||"object"==typeof u.error);return v&&u.error&&(v="string"==typeof u.error.message&&"string"==typeof u.error.code,v&&(h=new D(u.error.code,u.error.message))),v?new Qu(e,t,u.state,h):(Jr("SharedClientState",`Failed to parse mutation state for ID '${t}': ${o}`),null)}Yi(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class Nc{constructor(e,t,o){this.targetId=e,this.state=t,this.error=o}static Ji(e,t){const o=JSON.parse(t);let u,h="object"==typeof o&&-1!==["not-current","current","rejected"].indexOf(o.state)&&(void 0===o.error||"object"==typeof o.error);return h&&o.error&&(h="string"==typeof o.error.message&&"string"==typeof o.error.code,h&&(u=new D(o.error.code,o.error.message))),h?new Nc(e,o.state,u):(Jr("SharedClientState",`Failed to parse target state for ID '${e}': ${t}`),null)}Yi(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class cf{constructor(e,t){this.clientId=e,this.activeTargetIds=t}static Ji(e,t){const o=JSON.parse(t);let u="object"==typeof o&&o.activeTargetIds instanceof Array,h=vc();for(let v=0;u&&ve.shutdown()),e.started=!0})()}writeSequenceNumber(e){this.setItem(this.ur,JSON.stringify(e))}getAllActiveQueryTargets(){return this.gr(this.sr)}isActiveQueryTarget(e){let t=!1;return this.sr.forEach((o,u)=>{u.activeTargetIds.has(e)&&(t=!0)}),t}addPendingMutation(e){this.yr(e,"pending")}updateMutationState(e,t,o){this.yr(e,t,o),this.pr(e)}addLocalQueryTarget(e){let t="not-current";if(this.isActiveQueryTarget(e)){const o=this.storage.getItem(Am(this.persistenceKey,e));if(o){const u=Nc.Ji(e,o);u&&(t=u.state)}}return this.Ir.Xi(e),this._r(),t}removeLocalQueryTarget(e){this.Ir.Zi(e),this._r()}isLocalQueryTarget(e){return this.Ir.activeTargetIds.has(e)}clearQueryState(e){this.removeItem(Am(this.persistenceKey,e))}updateQueryState(e,t,o){this.Tr(e,t,o)}handleUserChange(e,t,o){t.forEach(u=>{this.pr(u)}),this.currentUser=e,o.forEach(u=>{this.addPendingMutation(u)})}setOnlineState(e){this.Er(e)}notifyBundleLoaded(e){this.Ar(e)}shutdown(){this.started&&(this.window.removeEventListener("storage",this.er),this.removeItem(this.rr),this.started=!1)}getItem(e){const t=this.storage.getItem(e);return Xt("SharedClientState","READ",e,t),t}setItem(e,t){Xt("SharedClientState","SET",e,t),this.storage.setItem(e,t)}removeItem(e){Xt("SharedClientState","REMOVE",e),this.storage.removeItem(e)}nr(e){var t=this;const o=e;if(o.storageArea===this.storage){if(Xt("SharedClientState","EVENT",o.key,o.newValue),o.key===this.rr)return void Jr("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.js.enqueueRetryable((0,Ee.Z)(function*(){if(t.started){if(null!==o.key)if(t.cr.test(o.key)){if(null==o.newValue){const u=t.Rr(o.key);return t.br(u,null)}{const u=t.Pr(o.key,o.newValue);if(u)return t.br(u.clientId,u)}}else if(t.ar.test(o.key)){if(null!==o.newValue){const u=t.vr(o.key,o.newValue);if(u)return t.Vr(u)}}else if(t.hr.test(o.key)){if(null!==o.newValue){const u=t.Sr(o.key,o.newValue);if(u)return t.Dr(u)}}else if(o.key===t.lr){if(null!==o.newValue){const u=t.wr(o.newValue);if(u)return t.mr(u)}}else if(o.key===t.ur){const u=function(h){let v=To.ot;if(null!=h)try{const M=JSON.parse(h);zn("number"==typeof M),v=M}catch(M){Jr("SharedClientState","Failed to read sequence number from WebStorage",M)}return v}(o.newValue);u!==To.ot&&t.sequenceNumberHandler(u)}else if(o.key===t.dr){const u=t.Cr(o.newValue);yield Promise.all(u.map(h=>t.syncEngine.Nr(h)))}}else t.ir.push(o)}))}}get Ir(){return this.sr.get(this.tr)}_r(){this.setItem(this.rr,this.Ir.Yi())}yr(e,t,o){const u=new Qu(this.currentUser,e,t,o),h=Tm(this.persistenceKey,this.currentUser,e);this.setItem(h,u.Yi())}pr(e){const t=Tm(this.persistenceKey,this.currentUser,e);this.removeItem(t)}Er(e){this.storage.setItem(this.lr,JSON.stringify({clientId:this.tr,onlineState:e}))}Tr(e,t,o){const u=Am(this.persistenceKey,e),h=new Nc(e,t,o);this.setItem(u,h.Yi())}Ar(e){const t=JSON.stringify(Array.from(e));this.setItem(this.dr,t)}Rr(e){const t=this.cr.exec(e);return t?t[1]:null}Pr(e,t){const o=this.Rr(e);return cf.Ji(o,t)}vr(e,t){const o=this.ar.exec(e),u=Number(o[1]);return Qu.Ji(new hi(void 0!==o[2]?o[2]:null),u,t)}Sr(e,t){const o=this.hr.exec(e),u=Number(o[1]);return Nc.Ji(u,t)}wr(e){return kp.Ji(e)}Cr(e){return JSON.parse(e)}Vr(e){var t=this;return(0,Ee.Z)(function*(){if(e.user.uid===t.currentUser.uid)return t.syncEngine.kr(e.batchId,e.state,e.error);Xt("SharedClientState",`Ignoring mutation for non-active user ${e.user.uid}`)})()}Dr(e){return this.syncEngine.Or(e.targetId,e.state,e.error)}br(e,t){const o=t?this.sr.insert(e,t):this.sr.remove(e),u=this.gr(this.sr),h=this.gr(o),v=[],M=[];return h.forEach(j=>{u.has(j)||v.push(j)}),u.forEach(j=>{h.has(j)||M.push(j)}),this.syncEngine.Mr(v,M).then(()=>{this.sr=o})}mr(e){this.sr.get(e.clientId)&&this.onlineStateHandler(e.onlineState)}gr(e){let t=vc();return e.forEach((o,u)=>{t=t.unionWith(u.activeTargetIds)}),t}}class E_{constructor(){this.Fr=new zd,this.$r={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,o){}addLocalQueryTarget(e){return this.Fr.Xi(e),this.$r[e]||"not-current"}updateQueryState(e,t,o){this.$r[e]=t}removeLocalQueryTarget(e){this.Fr.Zi(e)}isLocalQueryTarget(e){return this.Fr.activeTargetIds.has(e)}clearQueryState(e){delete this.$r[e]}getAllActiveQueryTargets(){return this.Fr.activeTargetIds}isActiveQueryTarget(e){return this.Fr.activeTargetIds.has(e)}start(){return this.Fr=new zd,Promise.resolve()}handleUserChange(e,t,o){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class Fp{Br(e){}shutdown(){}}class w_{constructor(){this.Lr=()=>this.Ur(),this.qr=()=>this.Kr(),this.Gr=[],this.Qr()}Br(e){this.Gr.push(e)}shutdown(){window.removeEventListener("online",this.Lr),window.removeEventListener("offline",this.qr)}Qr(){window.addEventListener("online",this.Lr),window.addEventListener("offline",this.qr)}Ur(){Xt("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.Gr)e(0)}Kr(){Xt("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.Gr)e(1)}static V(){return typeof window<"u"&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}const tE={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"};class nE{constructor(e){this.jr=e.jr,this.Wr=e.Wr}zr(e){this.Hr=e}Jr(e){this.Yr=e}onMessage(e){this.Xr=e}close(){this.Wr()}send(e){this.jr(e)}Zr(){this.Hr()}eo(e){this.Yr(e)}no(e){this.Xr(e)}}class rE extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId,this.so=(e.ssl?"https":"http")+"://"+e.host,this.io="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}ro(e,t,o,u,h){const v=this.oo(e,t);Xt("RestConnection","Sending: ",v,o);const M={};return this.uo(M,u,h),this.co(e,v,M,o).then(j=>(Xt("RestConnection","Received: ",j),j),j=>{throw vi("RestConnection",`${e} failed with error: `,j,"url: ",v,"request:",o),j})}ao(e,t,o,u,h){return this.ro(e,t,o,u,h)}uo(e,t,o){e["X-Goog-Api-Client"]="gl-js/ fire/"+No,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((u,h)=>e[h]=u),o&&o.headers.forEach((u,h)=>e[h]=u)}oo(e,t){return`${this.so}/v1/${t}:${tE[e]}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams}co(e,t,o,u){return new Promise((h,v)=>{const M=new La;M.listenOnce(Cs.COMPLETE,()=>{try{switch(M.getLastErrorCode()){case pa.NO_ERROR:const W=M.getResponseJson();Xt("Connection","XHR received:",JSON.stringify(W)),h(W);break;case pa.TIMEOUT:Xt("Connection",'RPC "'+e+'" timed out'),v(new D(b.DEADLINE_EXCEEDED,"Request time out"));break;case pa.HTTP_ERROR:const de=M.getStatus();if(Xt("Connection",'RPC "'+e+'" failed with status:',de,"response text:",M.getResponseText()),de>0){const Fe=M.getResponseJson().error;if(Fe&&Fe.status&&Fe.message){const vt=function(jt){const en=jt.toLowerCase().replace(/_/g,"-");return Object.values(b).indexOf(en)>=0?en:b.UNKNOWN}(Fe.status);v(new D(vt,Fe.message))}else v(new D(b.UNKNOWN,"Server responded with status "+M.getStatus()))}else v(new D(b.UNAVAILABLE,"Connection failed."));break;default:_n()}}finally{Xt("Connection",'RPC "'+e+'" completed.')}});const j=JSON.stringify(u);M.send(t,"POST",j,o,15)})}ho(e,t,o){const u=[this.so,"/","google.firestore.v1.Firestore","/",e,"/channel"],h=Eu(),v=Fa(),M={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(M.xmlHttpFactory=new Da({})),this.uo(M.initMessageHeaders,t,o),(0,xe.uI)()||(0,xe.b$)()||(0,xe.d)()||(0,xe.w1)()||(0,xe.Mn)()||(0,xe.ru)()||(M.httpHeadersOverwriteParam="$httpHeaders");const j=u.join("");Xt("Connection","Creating WebChannel: "+j,M);const W=h.createWebChannel(j,M);let de=!1,Fe=!1;const vt=new nE({jr:en=>{Fe?Xt("Connection","Not sending because WebChannel is closed:",en):(de||(Xt("Connection","Opening WebChannel transport."),W.open(),de=!0),Xt("Connection","WebChannel sending:",en),W.send(en))},Wr:()=>W.close()}),jt=(en,Mn,Gn)=>{en.listen(Mn,Ci=>{try{Gn(Ci)}catch(is){setTimeout(()=>{throw is},0)}})};return jt(W,jo.EventType.OPEN,()=>{Fe||Xt("Connection","WebChannel transport opened.")}),jt(W,jo.EventType.CLOSE,()=>{Fe||(Fe=!0,Xt("Connection","WebChannel transport closed"),vt.eo())}),jt(W,jo.EventType.ERROR,en=>{Fe||(Fe=!0,vi("Connection","WebChannel transport errored:",en),vt.eo(new D(b.UNAVAILABLE,"The operation could not be completed")))}),jt(W,jo.EventType.MESSAGE,en=>{var Mn;if(!Fe){const Gn=en.data[0];zn(!!Gn);const Ci=Gn,is=Ci.error||(null===(Mn=Ci[0])||void 0===Mn?void 0:Mn.error);if(is){Xt("Connection","WebChannel received error:",is);const Ni=is.status;let Ss=function(fs){const Vo=Ts[fs];if(void 0!==Vo)return Dd(Vo)}(Ni),Qi=is.message;void 0===Ss&&(Ss=b.INTERNAL,Qi="Unknown error status: "+Ni+" with message "+is.message),Fe=!0,vt.eo(new D(Ss,Qi)),W.close()}else Xt("Connection","WebChannel received:",Gn),vt.no(Gn)}}),jt(v,wu.STAT_EVENT,en=>{en.stat===us.PROXY?Xt("Connection","Detected buffering proxy"):en.stat===us.NOPROXY&&Xt("Connection","Detected no buffering proxy")}),setTimeout(()=>{vt.Zr()},0),vt}}function b_(){return typeof window<"u"?window:null}function Kd(){return typeof document<"u"?document:null}function ql(i){return new kl(i,!0)}class df{constructor(e,t,o=1e3,u=1.5,h=6e4){this.js=e,this.timerId=t,this.lo=o,this.fo=u,this._o=h,this.wo=0,this.mo=null,this.yo=Date.now(),this.reset()}reset(){this.wo=0}po(){this.wo=this._o}Io(e){this.cancel();const t=Math.floor(this.wo+this.To()),o=Math.max(0,Date.now()-this.yo),u=Math.max(0,t-o);u>0&&Xt("ExponentialBackoff",`Backing off for ${u} ms (base delay: ${this.wo} ms, delay with jitter: ${t} ms, last attempt: ${o} ms ago)`),this.mo=this.js.enqueueAfterDelay(this.timerId,u,()=>(this.yo=Date.now(),e())),this.wo*=this.fo,this.wothis._o&&(this.wo=this._o)}Eo(){null!==this.mo&&(this.mo.skipDelay(),this.mo=null)}cancel(){null!==this.mo&&(this.mo.cancel(),this.mo=null)}To(){return(Math.random()-.5)*this.wo}}class Mm{constructor(e,t,o,u,h,v,M,j){this.js=e,this.Ao=o,this.Ro=u,this.bo=h,this.authCredentialsProvider=v,this.appCheckCredentialsProvider=M,this.listener=j,this.state=0,this.Po=0,this.vo=null,this.Vo=null,this.stream=null,this.So=new df(e,t)}Do(){return 1===this.state||5===this.state||this.Co()}Co(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.xo()}stop(){var e=this;return(0,Ee.Z)(function*(){e.Do()&&(yield e.close(0))})()}No(){this.state=0,this.So.reset()}ko(){this.Co()&&null===this.vo&&(this.vo=this.js.enqueueAfterDelay(this.Ao,6e4,()=>this.Oo()))}Mo(e){this.Fo(),this.stream.send(e)}Oo(){var e=this;return(0,Ee.Z)(function*(){if(e.Co())return e.close(0)})()}Fo(){this.vo&&(this.vo.cancel(),this.vo=null)}$o(){this.Vo&&(this.Vo.cancel(),this.Vo=null)}close(e,t){var o=this;return(0,Ee.Z)(function*(){o.Fo(),o.$o(),o.So.cancel(),o.Po++,4!==e?o.So.reset():t&&t.code===b.RESOURCE_EXHAUSTED?(Jr(t.toString()),Jr("Using maximum backoff delay to prevent overloading the backend."),o.So.po()):t&&t.code===b.UNAUTHENTICATED&&3!==o.state&&(o.authCredentialsProvider.invalidateToken(),o.appCheckCredentialsProvider.invalidateToken()),null!==o.stream&&(o.Bo(),o.stream.close(),o.stream=null),o.state=e,yield o.listener.Jr(t)})()}Bo(){}auth(){this.state=1;const e=this.Lo(this.Po),t=this.Po;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([o,u])=>{this.Po===t&&this.Uo(o,u)},o=>{e(()=>{const u=new D(b.UNKNOWN,"Fetching auth token failed: "+o.message);return this.qo(u)})})}Uo(e,t){const o=this.Lo(this.Po);this.stream=this.Ko(e,t),this.stream.zr(()=>{o(()=>(this.state=2,this.Vo=this.js.enqueueAfterDelay(this.Ro,1e4,()=>(this.Co()&&(this.state=3),Promise.resolve())),this.listener.zr()))}),this.stream.Jr(u=>{o(()=>this.qo(u))}),this.stream.onMessage(u=>{o(()=>this.onMessage(u))})}xo(){var e=this;this.state=5,this.So.Io((0,Ee.Z)(function*(){e.state=0,e.start()}))}qo(e){return Xt("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Lo(e){return t=>{this.js.enqueueAndForget(()=>this.Po===e?t():(Xt("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class xm extends Mm{constructor(e,t,o,u,h,v){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,o,u,v),this.wt=h}Ko(e,t){return this.bo.ho("Listen",e,t)}onMessage(e){this.So.reset();const t=function Gh(i,e){let t;if("targetChange"in e){const o="NO_CHANGE"===(j=e.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===j?1:"REMOVE"===j?2:"CURRENT"===j?3:"RESET"===j?4:_n(),u=e.targetChange.targetIds||[],h=function(j,W){return j.dt?(zn(void 0===W||"string"==typeof W),Te.fromBase64String(W||"")):(zn(void 0===W||W instanceof Uint8Array),Te.fromUint8Array(W||new Uint8Array))}(i,e.targetChange.resumeToken),v=e.targetChange.cause,M=v&&function(j){const W=void 0===j.code?b.UNKNOWN:Dd(j.code);return new D(W,j.message||"")}(v);t=new Cd(o,u,h,M||null)}else if("documentChange"in e){const o=e.documentChange,u=Sa(i,o.document.name),h=hs(o.document.updateTime),v=new qi({mapValue:{fields:o.document.fields}}),M=Er.newFoundDocument(u,h,v);t=new Cu(o.targetIds||[],o.removedTargetIds||[],M.key,M)}else if("documentDelete"in e){const o=e.documentDelete,u=Sa(i,o.document),h=o.readTime?hs(o.readTime):On.min(),v=Er.newNoDocument(u,h);t=new Cu([],o.removedTargetIds||[],v.key,v)}else if("documentRemove"in e){const o=e.documentRemove,u=Sa(i,o.document);t=new Cu([],o.removedTargetIds||[],u,null)}else{if(!("filter"in e))return _n();{const o=e.filter,h=new bd(o.count||0);t=new Ec(o.targetId,h)}}var j;return t}(this.wt,e),o=function(u){if(!("targetChange"in u))return On.min();const h=u.targetChange;return h.targetIds&&h.targetIds.length?On.min():h.readTime?hs(h.readTime):On.min()}(e);return this.listener.Go(t,o)}Qo(e){const t={};t.database=Vl(this.wt),t.addTarget=function(u,h){let v;const M=h.target;return v=pc(M)?{documents:ns(u,M)}:{query:Dc(u,M)},v.targetId=h.targetId,h.resumeToken.approximateByteSize()>0?v.resumeToken=wc(u,h.resumeToken):h.snapshotVersion.compareTo(On.min())>0&&(v.readTime=Wu(u,h.snapshotVersion.toTimestamp())),v}(this.wt,e);const o=function rm(i,e){const t=function(o,u){switch(u){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return _n()}}(0,e.purpose);return null==t?null:{"goog-listen-tags":t}}(0,e);o&&(t.labels=o),this.Mo(t)}jo(e){const t={};t.database=Vl(this.wt),t.removeTarget=e,this.Mo(t)}}class Om extends Mm{constructor(e,t,o,u,h,v){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,o,u,v),this.wt=h,this.Wo=!1}get zo(){return this.Wo}start(){this.Wo=!1,this.lastStreamToken=void 0,super.start()}Bo(){this.Wo&&this.Ho([])}Ko(e,t){return this.bo.ho("Write",e,t)}onMessage(e){if(zn(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Wo){this.So.reset();const t=function Zu(i,e){return i&&i.length>0?(zn(void 0!==e),i.map(t=>function(o,u){let h=hs(o.updateTime?o.updateTime:u);return h.isEqual(On.min())&&(h=hs(u)),new Ed(h,o.transformResults||[])}(t,e))):[]}(e.writeResults,e.commitTime),o=hs(e.commitTime);return this.listener.Jo(o,t)}return zn(!e.writeResults||0===e.writeResults.length),this.Wo=!0,this.listener.Yo()}Xo(){const e={};e.database=Vl(this.wt),this.Mo(e)}Ho(e){const t={streamToken:this.lastStreamToken,writes:e.map(o=>hl(this.wt,o))};this.Mo(t)}}class hf extends class{}{constructor(e,t,o,u){super(),this.authCredentials=e,this.appCheckCredentials=t,this.bo=o,this.wt=u,this.Zo=!1}tu(){if(this.Zo)throw new D(b.FAILED_PRECONDITION,"The client has already been terminated.")}ro(e,t,o){return this.tu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([u,h])=>this.bo.ro(e,t,o,u,h)).catch(u=>{throw"FirebaseError"===u.name?(u.code===b.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),u):new D(b.UNKNOWN,u.toString())})}ao(e,t,o){return this.tu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([u,h])=>this.bo.ao(e,t,o,u,h)).catch(u=>{throw"FirebaseError"===u.name?(u.code===b.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),u):new D(b.UNKNOWN,u.toString())})}terminate(){this.Zo=!0}}class hu{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.eu=0,this.nu=null,this.su=!0}iu(){0===this.eu&&(this.ru("Unknown"),this.nu=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.nu=null,this.ou("Backend didn't respond within 10 seconds."),this.ru("Offline"),Promise.resolve())))}uu(e){"Online"===this.state?this.ru("Unknown"):(this.eu++,this.eu>=1&&(this.cu(),this.ou(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.ru("Offline")))}set(e){this.cu(),this.eu=0,"Online"===e&&(this.su=!1),this.ru(e)}ru(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}ou(e){const t=`Could not reach Cloud Firestore backend. ${e}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.su?(Jr(t),this.su=!1):Xt("OnlineStateTracker",t)}cu(){null!==this.nu&&(this.nu.cancel(),this.nu=null)}}class Rm{constructor(e,t,o,u,h){var v=this;this.localStore=e,this.datastore=t,this.asyncQueue=o,this.remoteSyncer={},this.au=[],this.hu=new Map,this.lu=new Set,this.fu=[],this.du=h,this.du.Br(M=>{o.enqueueAndForget((0,Ee.Z)(function*(){var j;fu(v)&&(Xt("RemoteStore","Restarting streams for network reachability change."),yield(j=(0,Ee.Z)(function*(W){const de=En(W);de.lu.add(4),yield va(de),de._u.set("Unknown"),de.lu.delete(4),yield Wd(de)}),function(W){return j.apply(this,arguments)})(v))}))}),this._u=new hu(o,u)}}function Wd(i){return Zd.apply(this,arguments)}function Zd(){return Zd=(0,Ee.Z)(function*(i){if(fu(i))for(const e of i.fu)yield e(!0)}),Zd.apply(this,arguments)}function va(i){return qd.apply(this,arguments)}function qd(){return qd=(0,Ee.Z)(function*(i){for(const e of i.fu)yield e(!1)}),qd.apply(this,arguments)}function Yd(i,e){const t=En(i);t.hu.has(e.targetId)||(t.hu.set(e.targetId,e),kc(t)?Nm(t):Lc(t).Co()&&Pm(t,e))}function Yl(i,e){const t=En(i),o=Lc(t);t.hu.delete(e),o.Co()&&Lp(t,e),0===t.hu.size&&(o.Co()?o.ko():fu(t)&&t._u.set("Unknown"))}function Pm(i,e){i.wu.Nt(e.targetId),Lc(i).Qo(e)}function Lp(i,e){i.wu.Nt(e),Lc(i).jo(e)}function Nm(i){i.wu=new fp({getRemoteKeysForTarget:e=>i.remoteSyncer.getRemoteKeysForTarget(e),te:e=>i.hu.get(e)||null}),Lc(i).start(),i._u.iu()}function kc(i){return fu(i)&&!Lc(i).Do()&&i.hu.size>0}function fu(i){return 0===En(i).lu.size}function ff(i){i.wu=void 0}function Vp(i){return Qd.apply(this,arguments)}function Qd(){return Qd=(0,Ee.Z)(function*(i){i.hu.forEach((e,t)=>{Pm(i,e)})}),Qd.apply(this,arguments)}function iE(i,e){return Up.apply(this,arguments)}function Up(){return Up=(0,Ee.Z)(function*(i,e){ff(i),kc(i)?(i._u.uu(e),Nm(i)):i._u.set("Unknown")}),Up.apply(this,arguments)}function D_(i,e,t){return Bp.apply(this,arguments)}function Bp(){return Bp=(0,Ee.Z)(function*(i,e,t){if(i._u.set("Online"),e instanceof Cd&&2===e.state&&e.cause)try{yield(o=(0,Ee.Z)(function*(u,h){const v=h.cause;for(const M of h.targetIds)u.hu.has(M)&&(yield u.remoteSyncer.rejectListen(M,v),u.hu.delete(M),u.wu.removeTarget(M))}),function(u,h){return o.apply(this,arguments)})(i,e)}catch(o){Xt("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),o),yield pf(i,o)}else if(e instanceof Cu?i.wu.Ut(e):e instanceof Ec?i.wu.zt(e):i.wu.Gt(e),!t.isEqual(On.min()))try{const o=yield Op(i.localStore);t.compareTo(o)>=0&&(yield function(u,h){const v=u.wu.Yt(h);return v.targetChanges.forEach((M,j)=>{if(M.resumeToken.approximateByteSize()>0){const W=u.hu.get(j);W&&u.hu.set(j,W.withResumeToken(M.resumeToken,h))}}),v.targetMismatches.forEach(M=>{const j=u.hu.get(M);if(!j)return;u.hu.set(M,j.withResumeToken(Te.EMPTY_BYTE_STRING,j.snapshotVersion)),Lp(u,M);const W=new qu(j.target,M,1,j.sequenceNumber);Pm(u,W)}),u.remoteSyncer.applyRemoteEvent(v)}(i,t))}catch(o){Xt("RemoteStore","Failed to raise snapshot:",o),yield pf(i,o)}var o}),Bp.apply(this,arguments)}function pf(i,e,t){return gf.apply(this,arguments)}function gf(){return gf=(0,Ee.Z)(function*(i,e,t){if(!Ws(e))throw e;i.lu.add(1),yield va(i),i._u.set("Offline"),t||(t=()=>Op(i.localStore)),i.asyncQueue.enqueueRetryable((0,Ee.Z)(function*(){Xt("RemoteStore","Retrying IndexedDB access"),yield t(),i.lu.delete(1),yield Wd(i)}))}),gf.apply(this,arguments)}function I_(i,e){return e().catch(t=>pf(i,t,e))}function Fc(i){return km.apply(this,arguments)}function km(){return km=(0,Ee.Z)(function*(i){const e=En(i),t=Ju(e);let o=e.au.length>0?e.au[e.au.length-1].batchId:-1;for(;Fm(e);)try{const u=yield wm(e.localStore,o);if(null===u){0===e.au.length&&t.ko();break}o=u.batchId,Lm(e,u)}catch(u){yield pf(e,u)}Vm(e)&&mf(e)}),km.apply(this,arguments)}function Fm(i){return fu(i)&&i.au.length<10}function Lm(i,e){i.au.push(e);const t=Ju(i);t.Co()&&t.zo&&t.Ho(e.mutations)}function Vm(i){return fu(i)&&!Ju(i).Do()&&i.au.length>0}function mf(i){Ju(i).start()}function sE(i){return Um.apply(this,arguments)}function Um(){return Um=(0,Ee.Z)(function*(i){Ju(i).Xo()}),Um.apply(this,arguments)}function oE(i){return Bm.apply(this,arguments)}function Bm(){return Bm=(0,Ee.Z)(function*(i){const e=Ju(i);for(const t of i.au)e.Ho(t.mutations)}),Bm.apply(this,arguments)}function aE(i,e,t){return jm.apply(this,arguments)}function jm(){return jm=(0,Ee.Z)(function*(i,e,t){const o=i.au.shift(),u=pp.from(o,e,t);yield I_(i,()=>i.remoteSyncer.applySuccessfulWrite(u)),yield Fc(i)}),jm.apply(this,arguments)}function uE(i,e){return $m.apply(this,arguments)}function $m(){return $m=(0,Ee.Z)(function*(i,e){var t;e&&Ju(i).zo&&(yield(t=(0,Ee.Z)(function*(o,u){if(Lh(h=u.code)&&h!==b.ABORTED){const v=o.au.shift();Ju(o).No(),yield I_(o,()=>o.remoteSyncer.rejectFailedWrite(v.batchId,u)),yield Fc(o)}var h}),function(o,u){return t.apply(this,arguments)})(i,e)),Vm(i)&&mf(i)}),$m.apply(this,arguments)}function C_(i,e){return Hm.apply(this,arguments)}function Hm(){return Hm=(0,Ee.Z)(function*(i,e){const t=En(i);t.asyncQueue.verifyOperationInProgress(),Xt("RemoteStore","RemoteStore received new credentials");const o=fu(t);t.lu.add(3),yield va(t),o&&t._u.set("Unknown"),yield t.remoteSyncer.handleCredentialChange(e),t.lu.delete(3),yield Wd(t)}),Hm.apply(this,arguments)}function Ru(i,e){return Jd.apply(this,arguments)}function Jd(){return Jd=(0,Ee.Z)(function*(i,e){const t=En(i);e?(t.lu.delete(2),yield Wd(t)):e||(t.lu.add(2),yield va(t),t._u.set("Unknown"))}),Jd.apply(this,arguments)}function Lc(i){return i.mu||(i.mu=function(e,t,o){const u=En(e);return u.tu(),new xm(t,u.bo,u.authCredentials,u.appCheckCredentials,u.wt,o)}(i.datastore,i.asyncQueue,{zr:Vp.bind(null,i),Jr:iE.bind(null,i),Go:D_.bind(null,i)}),i.fu.push(function(){var e=(0,Ee.Z)(function*(t){t?(i.mu.No(),kc(i)?Nm(i):i._u.set("Unknown")):(yield i.mu.stop(),ff(i))});return function(t){return e.apply(this,arguments)}}())),i.mu}function Ju(i){return i.gu||(i.gu=function(e,t,o){const u=En(e);return u.tu(),new Om(t,u.bo,u.authCredentials,u.appCheckCredentials,u.wt,o)}(i.datastore,i.asyncQueue,{zr:sE.bind(null,i),Jr:uE.bind(null,i),Yo:oE.bind(null,i),Jo:aE.bind(null,i)}),i.fu.push(function(){var e=(0,Ee.Z)(function*(t){t?(i.gu.No(),yield Fc(i)):(yield i.gu.stop(),i.au.length>0&&(Xt("RemoteStore",`Stopping write stream with ${i.au.length} pending writes`),i.au=[]))});return function(t){return e.apply(this,arguments)}}())),i.gu}class Xd{constructor(e,t,o,u,h){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=o,this.op=u,this.removalCallback=h,this.deferred=new I,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(v=>{})}static createAndSchedule(e,t,o,u,h){const v=Date.now()+o,M=new Xd(e,t,v,u,h);return M.start(o),M}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new D(b.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function Ql(i,e){if(Jr("AsyncQueue",`${e}: ${i}`),Ws(i))return new D(b.UNAVAILABLE,`${e}: ${i}`);throw i}class vl{constructor(e){this.comparator=e?(t,o)=>e(t,o)||vn.comparator(t.key,o.key):(t,o)=>vn.comparator(t.key,o.key),this.keyedMap=Aa(),this.sortedSet=new Xr(this.comparator)}static emptySet(e){return new vl(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,o)=>(e(t),!1))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof vl)||this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),o=e.sortedSet.getIterator();for(;t.hasNext();){const u=t.getNext().key,h=o.getNext().key;if(!u.isEqual(h))return!1}return!0}toString(){const e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){const o=new vl;return o.comparator=this.comparator,o.keyedMap=e,o.sortedSet=t,o}}class Gm{constructor(){this.yu=new Xr(vn.comparator)}track(e){const t=e.doc.key,o=this.yu.get(t);o?0!==e.type&&3===o.type?this.yu=this.yu.insert(t,e):3===e.type&&1!==o.type?this.yu=this.yu.insert(t,{type:o.type,doc:e.doc}):2===e.type&&2===o.type?this.yu=this.yu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===o.type?this.yu=this.yu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===o.type?this.yu=this.yu.remove(t):1===e.type&&2===o.type?this.yu=this.yu.insert(t,{type:1,doc:o.doc}):0===e.type&&1===o.type?this.yu=this.yu.insert(t,{type:2,doc:e.doc}):_n():this.yu=this.yu.insert(t,e)}pu(){const e=[];return this.yu.inorderTraversal((t,o)=>{e.push(o)}),e}}class Oa{constructor(e,t,o,u,h,v,M,j){this.query=e,this.docs=t,this.oldDocs=o,this.docChanges=u,this.mutatedKeys=h,this.fromCache=v,this.syncStateChanged=M,this.excludesMetadataChanges=j}static fromInitialDocuments(e,t,o,u){const h=[];return t.forEach(v=>{h.push({type:0,doc:v})}),new Oa(e,t,vl.emptySet(t),h,o,u,!0,!1)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Sl(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,o=e.docChanges;if(t.length!==o.length)return!1;for(let u=0;uMh(e),Sl),this.onlineState="Unknown",this.Tu=new Set}}function eh(i,e){return jp.apply(this,arguments)}function jp(){return jp=(0,Ee.Z)(function*(i,e){const t=En(i),o=e.query;let u=!1,h=t.queries.get(o);if(h||(u=!0,h=new zm),u)try{h.Iu=yield t.onListen(o)}catch(v){const M=Ql(v,`Initialization of query '${Ml(e.query)}' failed`);return void e.onError(M)}t.queries.set(o,h),h.listeners.push(e),e.Eu(t.onlineState),h.Iu&&e.Au(h.Iu)&&El(t)}),jp.apply(this,arguments)}function yf(i,e){return $p.apply(this,arguments)}function $p(){return $p=(0,Ee.Z)(function*(i,e){const t=En(i),o=e.query;let u=!1;const h=t.queries.get(o);if(h){const v=h.listeners.indexOf(e);v>=0&&(h.listeners.splice(v,1),u=0===h.listeners.length)}if(u)return t.queries.delete(o),t.onUnlisten(o)}),$p.apply(this,arguments)}function A_(i,e){const t=En(i);let o=!1;for(const u of e){const v=t.queries.get(u.query);if(v){for(const M of v.listeners)M.Au(u)&&(o=!0);v.Iu=u}}o&&El(t)}function th(i,e,t){const o=En(i),u=o.queries.get(e);if(u)for(const h of u.listeners)h.onError(t);o.queries.delete(e)}function El(i){i.Tu.forEach(e=>{e.next()})}class nh{constructor(e,t,o){this.query=e,this.Ru=t,this.bu=!1,this.Pu=null,this.onlineState="Unknown",this.options=o||{}}Au(e){if(!this.options.includeMetadataChanges){const o=[];for(const u of e.docChanges)3!==u.type&&o.push(u);e=new Oa(e.query,e.docs,e.oldDocs,o,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}let t=!1;return this.bu?this.vu(e)&&(this.Ru.next(e),t=!0):this.Vu(e,this.onlineState)&&(this.Su(e),t=!0),this.Pu=e,t}onError(e){this.Ru.error(e)}Eu(e){this.onlineState=e;let t=!1;return this.Pu&&!this.bu&&this.Vu(this.Pu,e)&&(this.Su(this.Pu),t=!0),t}Vu(e,t){return!e.fromCache||!(this.options.Du&&"Offline"!==t||e.docs.isEmpty()&&"Offline"!==t)}vu(e){return e.docChanges.length>0||!!(e.syncStateChanged||this.Pu&&this.Pu.hasPendingWrites!==e.hasPendingWrites)&&!0===this.options.includeMetadataChanges}Su(e){e=Oa.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.bu=!0,this.Ru.next(e)}}class Vc{constructor(e,t){this.payload=e,this.byteLength=t}Cu(){return"metadata"in this.payload}}class Uc{constructor(e){this.wt=e}Wi(e){return Sa(this.wt,e)}zi(e){return e.metadata.exists?uu(this.wt,e.document,!1):Er.newNoDocument(this.Wi(e.metadata.name),this.Hi(e.metadata.readTime))}Hi(e){return hs(e)}}class Bc{constructor(e,t,o){this.xu=e,this.localStore=t,this.wt=o,this.queries=[],this.documents=[],this.collectionGroups=new Set,this.progress=Km(e)}Nu(e){this.progress.bytesLoaded+=e.byteLength;let t=this.progress.documentsLoaded;if(e.payload.namedQuery)this.queries.push(e.payload.namedQuery);else if(e.payload.documentMetadata){this.documents.push({metadata:e.payload.documentMetadata}),e.payload.documentMetadata.exists||++t;const o=dr.fromString(e.payload.documentMetadata.name);this.collectionGroups.add(o.get(o.length-2))}else e.payload.document&&(this.documents[this.documents.length-1].document=e.payload.document,++t);return t!==this.progress.documentsLoaded?(this.progress.documentsLoaded=t,Object.assign({},this.progress)):null}ku(e){const t=new Map,o=new Uc(this.wt);for(const u of e)if(u.metadata.queries){const h=o.Wi(u.metadata.name);for(const v of u.metadata.queries){const M=(t.get(v)||wr()).add(h);t.set(v,M)}}return t}complete(){var e=this;return(0,Ee.Z)(function*(){const t=yield function Im(i,e,t,o){return uf.apply(this,arguments)}(e.localStore,new Uc(e.wt),e.documents,e.xu.id),o=e.ku(e.documents);for(const u of e.queries)yield Np(e.localStore,u,o.get(u.name));return e.progress.taskState="Success",{progress:e.progress,Ou:e.collectionGroups,Mu:t}})()}}function Km(i){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:i.totalDocuments,totalBytes:i.totalBytes}}class Hp{constructor(e){this.key=e}}class Gp{constructor(e){this.key=e}}class _f{constructor(e,t){this.query=e,this.Fu=t,this.$u=null,this.current=!1,this.Bu=wr(),this.mutatedKeys=wr(),this.Lu=pd(e),this.Uu=new vl(this.Lu)}get qu(){return this.Fu}Ku(e,t){const o=t?t.Gu:new Gm,u=t?t.Uu:this.Uu;let h=t?t.mutatedKeys:this.mutatedKeys,v=u,M=!1;const j="F"===this.query.limitType&&u.size===this.query.limit?u.last():null,W="L"===this.query.limitType&&u.size===this.query.limit?u.first():null;if(e.inorderTraversal((de,Fe)=>{const vt=u.get(de),jt=fd(this.query,Fe)?Fe:null,en=!!vt&&this.mutatedKeys.has(vt.key),Mn=!!jt&&(jt.hasLocalMutations||this.mutatedKeys.has(jt.key)&&jt.hasCommittedMutations);let Gn=!1;vt&&jt?vt.data.isEqual(jt.data)?en!==Mn&&(o.track({type:3,doc:jt}),Gn=!0):this.Qu(vt,jt)||(o.track({type:2,doc:jt}),Gn=!0,(j&&this.Lu(jt,j)>0||W&&this.Lu(jt,W)<0)&&(M=!0)):!vt&&jt?(o.track({type:0,doc:jt}),Gn=!0):vt&&!jt&&(o.track({type:1,doc:vt}),Gn=!0,(j||W)&&(M=!0)),Gn&&(jt?(v=v.add(jt),h=Mn?h.add(de):h.delete(de)):(v=v.delete(de),h=h.delete(de)))}),null!==this.query.limit)for(;v.size>this.query.limit;){const de="F"===this.query.limitType?v.last():v.first();v=v.delete(de.key),h=h.delete(de.key),o.track({type:1,doc:de})}return{Uu:v,Gu:o,Oi:M,mutatedKeys:h}}Qu(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,o){const u=this.Uu;this.Uu=e.Uu,this.mutatedKeys=e.mutatedKeys;const h=e.Gu.pu();h.sort((W,de)=>function(Fe,vt){const jt=en=>{switch(en){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return _n()}};return jt(Fe)-jt(vt)}(W.type,de.type)||this.Lu(W.doc,de.doc)),this.ju(o);const v=t?this.Wu():[],M=0===this.Bu.size&&this.current?1:0,j=M!==this.$u;return this.$u=M,0!==h.length||j?{snapshot:new Oa(this.query,e.Uu,u,h,e.mutatedKeys,0===M,j,!1),zu:v}:{zu:v}}Eu(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Uu:this.Uu,Gu:new Gm,mutatedKeys:this.mutatedKeys,Oi:!1},!1)):{zu:[]}}Hu(e){return!this.Fu.has(e)&&!!this.Uu.has(e)&&!this.Uu.get(e).hasLocalMutations}ju(e){e&&(e.addedDocuments.forEach(t=>this.Fu=this.Fu.add(t)),e.modifiedDocuments.forEach(t=>{}),e.removedDocuments.forEach(t=>this.Fu=this.Fu.delete(t)),this.current=e.current)}Wu(){if(!this.current)return[];const e=this.Bu;this.Bu=wr(),this.Uu.forEach(o=>{this.Hu(o.key)&&(this.Bu=this.Bu.add(o.key))});const t=[];return e.forEach(o=>{this.Bu.has(o)||t.push(new Gp(o))}),this.Bu.forEach(o=>{e.has(o)||t.push(new Hp(o))}),t}Ju(e){this.Fu=e.ji,this.Bu=wr();const t=this.Ku(e.documents);return this.applyChanges(t,!0)}Yu(){return Oa.fromInitialDocuments(this.query,this.Uu,this.mutatedKeys,0===this.$u)}}class zp{constructor(e,t,o){this.query=e,this.targetId=t,this.view=o}}class Wm{constructor(e){this.key=e,this.Xu=!1}}class vf{constructor(e,t,o,u,h,v){this.localStore=e,this.remoteStore=t,this.eventManager=o,this.sharedClientState=u,this.currentUser=h,this.maxConcurrentLimboResolutions=v,this.Zu={},this.tc=new Ka(M=>Mh(M),Sl),this.ec=new Map,this.nc=new Set,this.sc=new Xr(vn.comparator),this.ic=new Map,this.rc=new nf,this.oc={},this.uc=new Map,this.cc=yl.Rn(),this.onlineState="Unknown",this.ac=void 0}get isPrimaryClient(){return!0===this.ac}}function S_(i,e){return Ef.apply(this,arguments)}function Ef(){return Ef=(0,Ee.Z)(function*(i,e){const t=ah(i);let o,u;const h=t.tc.get(e);if(h)o=h.targetId,t.sharedClientState.addLocalQueryTarget(o),u=h.view.Yu();else{const v=yield Rc(t.localStore,ho(e));t.isPrimaryClient&&Yd(t.remoteStore,v);const M=t.sharedClientState.addLocalQueryTarget(v.targetId);o=v.targetId,u=yield Zm(t,e,o,"current"===M)}return u}),Ef.apply(this,arguments)}function Zm(i,e,t,o){return wf.apply(this,arguments)}function wf(){return wf=(0,Ee.Z)(function*(i,e,t,o){i.hc=(de,Fe,vt)=>{return(jt=(0,Ee.Z)(function*(en,Mn,Gn,Ci){let is=Mn.view.Ku(Gn);is.Oi&&(is=yield af(en.localStore,Mn.query,!1).then(({documents:Qi})=>Mn.view.Ku(Qi,is)));const Ni=Ci&&Ci.targetChanges.get(Mn.targetId),Ss=Mn.view.applyChanges(is,en.isPrimaryClient,Ni);return Qp(en,Mn.targetId,Ss.zu),Ss.snapshot}),function(en,Mn,Gn,Ci){return jt.apply(this,arguments)})(i,de,Fe,vt);var jt};const u=yield af(i.localStore,e,!0),h=new _f(e,u.ji),v=h.Ku(u.documents),M=Nl.createSynthesizedTargetChangeForCurrentChange(t,o&&"Offline"!==i.onlineState),j=h.applyChanges(v,i.isPrimaryClient,M);Qp(i,t,j.zu);const W=new zp(e,t,h);return i.tc.set(e,W),i.ec.has(t)?i.ec.get(t).push(e):i.ec.set(t,[e]),j.snapshot}),wf.apply(this,arguments)}function qm(i,e){return Kp.apply(this,arguments)}function Kp(){return Kp=(0,Ee.Z)(function*(i,e){const t=En(i),o=t.tc.get(e),u=t.ec.get(o.targetId);if(u.length>1)return t.ec.set(o.targetId,u.filter(h=>!Sl(h,e))),void t.tc.delete(e);t.isPrimaryClient?(t.sharedClientState.removeLocalQueryTarget(o.targetId),t.sharedClientState.isActiveQueryTarget(o.targetId)||(yield Pc(t.localStore,o.targetId,!1).then(()=>{t.sharedClientState.clearQueryState(o.targetId),Yl(t.remoteStore,o.targetId),Jl(t,o.targetId)}).catch(Di))):(Jl(t,o.targetId),yield Pc(t.localStore,o.targetId,!0))}),Kp.apply(this,arguments)}function Wp(){return Wp=(0,Ee.Z)(function*(i,e,t){const o=sy(i);try{const u=yield function(h,v){const M=En(h),j=zr.now(),W=v.reduce((vt,jt)=>vt.add(jt.key),wr());let de,Fe;return M.persistence.runTransaction("Locally write mutations","readwrite",vt=>{let jt=oa(),en=wr();return M.Ui.getEntries(vt,W).next(Mn=>{jt=Mn,jt.forEach((Gn,Ci)=>{Ci.isValidDocument()||(en=en.add(Gn))})}).next(()=>M.localDocuments.getOverlayedDocuments(vt,jt)).next(Mn=>{de=Mn;const Gn=[];for(const Ci of v){const is=lp(Ci,de.get(Ci.key).overlayedDocument);null!=is&&Gn.push(new za(Ci.key,is,il(is.value.mapValue),cs.exists(!0)))}return M.mutationQueue.addMutationBatch(vt,j,Gn,v)}).next(Mn=>{Fe=Mn;const Gn=Mn.applyToLocalDocumentSet(de,en);return M.documentOverlayCache.saveOverlays(vt,Mn.batchId,Gn)})}).then(()=>({batchId:Fe.batchId,changes:_c(de)}))}(o.localStore,e);o.sharedClientState.addPendingMutation(u.batchId),function(h,v,M){let j=h.oc[h.currentUser.toKey()];j||(j=new Xr($n)),j=j.insert(v,M),h.oc[h.currentUser.toKey()]=j}(o,u.batchId,t),yield Xu(o,u.changes),yield Fc(o.remoteStore)}catch(u){const h=Ql(u,"Failed to persist write");t.reject(h)}}),Wp.apply(this,arguments)}function Qm(i,e){return aa.apply(this,arguments)}function aa(){return aa=(0,Ee.Z)(function*(i,e){const t=En(i);try{const o=yield sf(t.localStore,e);e.targetChanges.forEach((u,h)=>{const v=t.ic.get(h);v&&(zn(u.addedDocuments.size+u.modifiedDocuments.size+u.removedDocuments.size<=1),u.addedDocuments.size>0?v.Xu=!0:u.modifiedDocuments.size>0?zn(v.Xu):u.removedDocuments.size>0&&(zn(v.Xu),v.Xu=!1))}),yield Xu(t,o,e)}catch(o){yield Di(o)}}),aa.apply(this,arguments)}function Jm(i,e,t){const o=En(i);if(o.isPrimaryClient&&0===t||!o.isPrimaryClient&&1===t){const u=[];o.tc.forEach((h,v)=>{const M=v.view.Eu(e);M.snapshot&&u.push(M.snapshot)}),function(h,v){const M=En(h);M.onlineState=v;let j=!1;M.queries.forEach((W,de)=>{for(const Fe of de.listeners)Fe.Eu(v)&&(j=!0)}),j&&El(M)}(o.eventManager,e),u.length&&o.Zu.Go(u),o.onlineState=e,o.isPrimaryClient&&o.sharedClientState.setOnlineState(e)}}function M_(i,e,t){return Xm.apply(this,arguments)}function Xm(){return Xm=(0,Ee.Z)(function*(i,e,t){const o=En(i);o.sharedClientState.updateQueryState(e,"rejected",t);const u=o.ic.get(e),h=u&&u.key;if(h){let v=new Xr(vn.comparator);v=v.insert(h,Er.newNoDocument(h,On.min()));const M=wr().add(h),j=new Pl(On.min(),new Map,new p($n),v,M);yield Qm(o,j),o.sc=o.sc.remove(h),o.ic.delete(e),Df(o)}else yield Pc(o.localStore,e,!1).then(()=>Jl(o,e,t)).catch(Di)}),Xm.apply(this,arguments)}function x_(i,e){return rh.apply(this,arguments)}function rh(){return rh=(0,Ee.Z)(function*(i,e){const t=En(i),o=e.batch.batchId;try{const u=yield v_(t.localStore,e);Yp(t,o,null),bf(t,o),t.sharedClientState.updateMutationState(o,"acknowledged"),yield Xu(t,u)}catch(u){yield Di(u)}}),rh.apply(this,arguments)}function ey(i,e,t){return Zp.apply(this,arguments)}function Zp(){return Zp=(0,Ee.Z)(function*(i,e,t){const o=En(i);try{const u=yield function(h,v){const M=En(h);return M.persistence.runTransaction("Reject batch","readwrite-primary",j=>{let W;return M.mutationQueue.lookupMutationBatch(j,v).next(de=>(zn(null!==de),W=de.keys(),M.mutationQueue.removeMutationBatch(j,de))).next(()=>M.mutationQueue.performConsistencyCheck(j)).next(()=>M.documentOverlayCache.removeOverlaysForBatchId(j,W,v)).next(()=>M.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(j,W)).next(()=>M.localDocuments.getDocuments(j,W))})}(o.localStore,e);Yp(o,e,t),bf(o,e),o.sharedClientState.updateMutationState(e,"rejected",t),yield Xu(o,u)}catch(u){yield Di(u)}}),Zp.apply(this,arguments)}function qp(){return qp=(0,Ee.Z)(function*(i,e){const t=En(i);fu(t.remoteStore)||Xt("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");try{const o=yield function(h){const v=En(h);return v.persistence.runTransaction("Get highest unacknowledged batch id","readonly",M=>v.mutationQueue.getHighestUnacknowledgedBatchId(M))}(t.localStore);if(-1===o)return void e.resolve();const u=t.uc.get(o)||[];u.push(e),t.uc.set(o,u)}catch(o){const u=Ql(o,"Initialization of waitForPendingWrites() operation failed");e.reject(u)}}),qp.apply(this,arguments)}function bf(i,e){(i.uc.get(e)||[]).forEach(t=>{t.resolve()}),i.uc.delete(e)}function Yp(i,e,t){const o=En(i);let u=o.oc[o.currentUser.toKey()];if(u){const h=u.get(e);h&&(t?h.reject(t):h.resolve(),u=u.remove(e)),o.oc[o.currentUser.toKey()]=u}}function Jl(i,e,t=null){i.sharedClientState.removeLocalQueryTarget(e);for(const o of i.ec.get(e))i.tc.delete(o),t&&i.Zu.lc(o,t);i.ec.delete(e),i.isPrimaryClient&&i.rc.us(e).forEach(o=>{i.rc.containsKey(o)||ty(i,o)})}function ty(i,e){i.nc.delete(e.path.canonicalString());const t=i.sc.get(e);null!==t&&(Yl(i.remoteStore,t),i.sc=i.sc.remove(e),i.ic.delete(t),Df(i))}function Qp(i,e,t){for(const o of t)o instanceof Hp?(i.rc.addReference(o.key,e),ny(i,o)):o instanceof Gp?(Xt("SyncEngine","Document no longer in limbo: "+o.key),i.rc.removeReference(o.key,e),i.rc.containsKey(o.key)||ty(i,o.key)):_n()}function ny(i,e){const t=e.key,o=t.path.canonicalString();i.sc.get(t)||i.nc.has(o)||(Xt("SyncEngine","New document in limbo: "+t),i.nc.add(o),Df(i))}function Df(i){for(;i.nc.size>0&&i.sc.size{v.push(o.hc(j,e,t).then(W=>{if(W){o.isPrimaryClient&&o.sharedClientState.updateQueryState(j.targetId,W.fromCache?"not-current":"current"),u.push(W);const de=mm.Vi(j.targetId,W);h.push(de)}}))}),yield Promise.all(v),o.Zu.Go(u),yield(M=(0,Ee.Z)(function*(j,W){const de=En(j);try{yield de.persistence.runTransaction("notifyLocalViewChanges","readwrite",Fe=>mt.forEach(W,vt=>mt.forEach(vt.Pi,jt=>de.persistence.referenceDelegate.addReference(Fe,vt.targetId,jt)).next(()=>mt.forEach(vt.vi,jt=>de.persistence.referenceDelegate.removeReference(Fe,vt.targetId,jt)))))}catch(Fe){if(!Ws(Fe))throw Fe;Xt("LocalStore","Failed to update sequence numbers: "+Fe)}for(const Fe of W){const vt=Fe.targetId;if(!Fe.fromCache){const jt=de.$i.get(vt),Mn=jt.withLastLimboFreeSnapshotVersion(jt.snapshotVersion);de.$i=de.$i.insert(vt,Mn)}}}),function(j,W){return M.apply(this,arguments)})(o.localStore,h))}),Za.apply(this,arguments)}function Jp(i,e){return Xp.apply(this,arguments)}function Xp(){return Xp=(0,Ee.Z)(function*(i,e){const t=En(i);if(!t.currentUser.isEqual(e)){Xt("SyncEngine","User change. New user:",e.toKey());const o=yield vm(t.localStore,e);t.currentUser=e,(u=t).uc.forEach(v=>{v.forEach(M=>{M.reject(new D(b.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),u.uc.clear(),t.sharedClientState.handleUserChange(e,o.removedBatchIds,o.addedBatchIds),yield Xu(t,o.Ki)}var u}),Xp.apply(this,arguments)}function R_(i,e){const t=En(i),o=t.ic.get(e);if(o&&o.Xu)return wr().add(o.key);{let u=wr();const h=t.ec.get(e);if(!h)return u;for(const v of h){const M=t.tc.get(v);u=u.unionWith(M.view.qu)}return u}}function lE(i,e){return If.apply(this,arguments)}function If(){return If=(0,Ee.Z)(function*(i,e){const t=En(i),o=yield af(t.localStore,e.query,!0),u=e.view.Ju(o);return t.isPrimaryClient&&Qp(t,e.targetId,u.zu),u}),If.apply(this,arguments)}function P_(i,e){return eg.apply(this,arguments)}function eg(){return eg=(0,Ee.Z)(function*(i,e){const t=En(i);return Pp(t.localStore,e).then(o=>Xu(t,o))}),eg.apply(this,arguments)}function N_(i,e,t,o){return ih.apply(this,arguments)}function ih(){return ih=(0,Ee.Z)(function*(i,e,t,o){const u=En(i),h=yield function(v,M){const j=En(v),W=En(j.mutationQueue);return j.persistence.runTransaction("Lookup mutation documents","readonly",de=>W.yn(de,M).next(Fe=>Fe?j.localDocuments.getDocuments(de,Fe):mt.resolve(null)))}(u.localStore,e);var M;null!==h?("pending"===t?yield Fc(u.remoteStore):"acknowledged"===t||"rejected"===t?(Yp(u,e,o||null),bf(u,e),M=e,En(En(u.localStore).mutationQueue).In(M)):_n(),yield Xu(u,h)):Xt("SyncEngine","Cannot apply mutation batch with id: "+e)}),ih.apply(this,arguments)}function tg(){return tg=(0,Ee.Z)(function*(i,e){const t=En(i);if(ah(t),sy(t),!0===e&&!0!==t.ac){const o=t.sharedClientState.getAllActiveQueryTargets(),u=yield sh(t,o.toArray());t.ac=!0,yield Ru(t.remoteStore,!0);for(const h of u)Yd(t.remoteStore,h)}else if(!1===e&&!1!==t.ac){const o=[];let u=Promise.resolve();t.ec.forEach((h,v)=>{t.sharedClientState.isLocalQueryTarget(v)?o.push(v):u=u.then(()=>(Jl(t,v),Pc(t.localStore,v,!0))),Yl(t.remoteStore,v)}),yield u,yield sh(t,o),function(h){const v=En(h);v.ic.forEach((M,j)=>{Yl(v.remoteStore,j)}),v.rc.cs(),v.ic=new Map,v.sc=new Xr(vn.comparator)}(t),t.ac=!1,yield Ru(t.remoteStore,!1)}}),tg.apply(this,arguments)}function sh(i,e,t){return oh.apply(this,arguments)}function oh(){return oh=(0,Ee.Z)(function*(i,e,t){const o=En(i),u=[],h=[];for(const v of e){let M;const j=o.ec.get(v);if(j&&0!==j.length){M=yield Rc(o.localStore,ho(j[0]));for(const W of j){const de=o.tc.get(W),Fe=yield lE(o,de);Fe.snapshot&&h.push(Fe.snapshot)}}else{const W=yield bm(o.localStore,v);M=yield Rc(o.localStore,W),yield Zm(o,ry(W),v,!1)}u.push(M)}return o.Zu.Go(h),u}),oh.apply(this,arguments)}function ry(i){return iu(i.path,i.collectionGroup,i.orderBy,i.filters,i.limit,"F",i.startAt,i.endAt)}function ng(i){const e=En(i);return En(En(e.localStore).persistence).Ri()}function rg(i,e,t,o){return Cf.apply(this,arguments)}function Cf(){return Cf=(0,Ee.Z)(function*(i,e,t,o){const u=En(i);if(u.ac)return void Xt("SyncEngine","Ignoring unexpected query state notification.");const h=u.ec.get(e);if(h&&h.length>0)switch(t){case"current":case"not-current":{const v=yield Pp(u.localStore,xh(h[0])),M=Pl.createSynthesizedRemoteEventForCurrentChange(e,"current"===t);yield Xu(u,v,M);break}case"rejected":yield Pc(u.localStore,e,!0),Jl(u,e,o);break;default:_n()}}),Cf.apply(this,arguments)}function cE(i,e,t){return iy.apply(this,arguments)}function iy(){return iy=(0,Ee.Z)(function*(i,e,t){const o=ah(i);if(o.ac){for(const u of e){if(o.ec.has(u)){Xt("SyncEngine","Adding an already active target "+u);continue}const h=yield bm(o.localStore,u),v=yield Rc(o.localStore,h);yield Zm(o,ry(h),v.targetId,!1),Yd(o.remoteStore,v)}for(const u of t)o.ec.has(u)&&(yield Pc(o.localStore,u,!1).then(()=>{Yl(o.remoteStore,u),Jl(o,u)}).catch(Di))}}),iy.apply(this,arguments)}function ah(i){const e=En(i);return e.remoteStore.remoteSyncer.applyRemoteEvent=Qm.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=R_.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=M_.bind(null,e),e.Zu.Go=A_.bind(null,e.eventManager),e.Zu.lc=th.bind(null,e.eventManager),e}function sy(i){const e=En(i);return e.remoteStore.remoteSyncer.applySuccessfulWrite=x_.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=ey.bind(null,e),e}class ig{constructor(){this.synchronizeTabs=!1}initialize(e){var t=this;return(0,Ee.Z)(function*(){t.wt=ql(e.databaseInfo.databaseId),t.sharedClientState=t.dc(e),t.persistence=t._c(e),yield t.persistence.start(),t.localStore=t.wc(e),t.gcScheduler=t.mc(e,t.localStore),t.indexBackfillerScheduler=t.gc(e,t.localStore)})()}mc(e,t){return null}gc(e,t){return null}wc(e){return __(this.persistence,new ym,e.initialUser,this.wt)}_c(e){return new rf(jd.Ms,this.wt)}dc(e){return new E_}terminate(){var e=this;return(0,Ee.Z)(function*(){e.gcScheduler&&e.gcScheduler.stop(),yield e.sharedClientState.shutdown(),yield e.persistence.shutdown()})()}}class sg extends ig{constructor(e,t,o){super(),this.yc=e,this.cacheSizeBytes=t,this.forceOwnership=o,this.synchronizeTabs=!1}initialize(e){var t=()=>super.initialize,o=this;return(0,Ee.Z)(function*(){yield t().call(o,e),yield o.yc.initialize(o,e),yield sy(o.yc.syncEngine),yield Fc(o.yc.remoteStore),yield o.persistence.ci(()=>(o.gcScheduler&&!o.gcScheduler.started&&o.gcScheduler.start(),o.indexBackfillerScheduler&&!o.indexBackfillerScheduler.started&&o.indexBackfillerScheduler.start(),Promise.resolve()))})()}wc(e){return __(this.persistence,new ym,e.initialUser,this.wt)}mc(e,t){return new Tp(this.persistence.referenceDelegate.garbageCollector,e.asyncQueue,t)}gc(e,t){const o=new sd(t,this.persistence);return new fc(e.asyncQueue,o)}_c(e){const t=gm(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),o=void 0!==this.cacheSizeBytes?_a.withCacheSize(this.cacheSizeBytes):_a.DEFAULT;return new Hd(this.synchronizeTabs,t,e.clientId,o,e.asyncQueue,b_(),Kd(),this.wt,this.sharedClientState,!!this.forceOwnership)}dc(e){return new E_}}class oy extends sg{constructor(e,t){super(e,t,!1),this.yc=e,this.cacheSizeBytes=t,this.synchronizeTabs=!0}initialize(e){var t=()=>super.initialize,o=this;return(0,Ee.Z)(function*(){yield t().call(o,e);const u=o.yc.syncEngine;o.sharedClientState instanceof Sm&&(o.sharedClientState.syncEngine={kr:N_.bind(null,u),Or:rg.bind(null,u),Mr:cE.bind(null,u),Ri:ng.bind(null,u),Nr:P_.bind(null,u)},yield o.sharedClientState.start()),yield o.persistence.ci(function(){var h=(0,Ee.Z)(function*(v){yield function k_(i,e){return tg.apply(this,arguments)}(o.yc.syncEngine,v),o.gcScheduler&&(v&&!o.gcScheduler.started?o.gcScheduler.start():v||o.gcScheduler.stop()),o.indexBackfillerScheduler&&(v&&!o.indexBackfillerScheduler.started?o.indexBackfillerScheduler.start():v||o.indexBackfillerScheduler.stop())});return function(v){return h.apply(this,arguments)}}())})()}dc(e){const t=b_();if(!Sm.V(t))throw new D(b.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");const o=gm(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new Sm(t,e.asyncQueue,o,e.clientId,e.initialUser)}}class Tf{initialize(e,t){var o=this;return(0,Ee.Z)(function*(){o.localStore||(o.localStore=e.localStore,o.sharedClientState=e.sharedClientState,o.datastore=o.createDatastore(t),o.remoteStore=o.createRemoteStore(t),o.eventManager=o.createEventManager(t),o.syncEngine=o.createSyncEngine(t,!e.synchronizeTabs),o.sharedClientState.onlineStateHandler=u=>Jm(o.syncEngine,u,1),o.remoteStore.remoteSyncer.handleCredentialChange=Jp.bind(null,o.syncEngine),yield Ru(o.remoteStore,o.syncEngine.isPrimaryClient))})()}createEventManager(e){return new T_}createDatastore(e){const t=ql(e.databaseInfo.databaseId),o=new rE(e.databaseInfo);return new hf(e.authCredentials,e.appCheckCredentials,o,t)}createRemoteStore(e){return t=this.localStore,o=this.datastore,u=e.asyncQueue,h=M=>Jm(this.syncEngine,M,0),v=w_.V()?new w_:new Fp,new Rm(t,o,u,h,v);var t,o,u,h,v}createSyncEngine(e,t){return function(o,u,h,v,M,j,W){const de=new vf(o,u,h,v,M,j);return W&&(de.ac=!0),de}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}terminate(){return(e=(0,Ee.Z)(function*(t){const o=En(t);Xt("RemoteStore","RemoteStore shutting down."),o.lu.add(5),yield va(o),o.du.shutdown(),o._u.set("Unknown")}),function(t){return e.apply(this,arguments)})(this.remoteStore);var e}}function og(i,e=10240){let t=0;return{read:()=>(0,Ee.Z)(function*(){if(t(0,Ee.Z)(function*(){})(),releaseLock(){},closed:Promise.reject("unimplemented")}}class qa{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ic(this.observer.next,e)}error(e){this.observer.error?this.Ic(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)}Tc(){this.muted=!0}Ic(e,t){this.muted||setTimeout(()=>{this.muted||e(t)},0)}}class Af{constructor(e,t){this.Ec=e,this.wt=t,this.metadata=new I,this.buffer=new Uint8Array,this.Ac=new TextDecoder("utf-8"),this.Rc().then(o=>{o&&o.Cu()?this.metadata.resolve(o.payload.metadata):this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is\n ${JSON.stringify(o?.payload)}`))},o=>this.metadata.reject(o))}close(){return this.Ec.cancel()}getMetadata(){var e=this;return(0,Ee.Z)(function*(){return e.metadata.promise})()}fc(){var e=this;return(0,Ee.Z)(function*(){return yield e.getMetadata(),e.Rc()})()}Rc(){var e=this;return(0,Ee.Z)(function*(){const t=yield e.bc();if(null===t)return null;const o=e.Ac.decode(t),u=Number(o);isNaN(u)&&e.Pc(`length string (${o}) is not valid number`);const h=yield e.vc(u);return new Vc(JSON.parse(h),t.length+u)})()}Vc(){return this.buffer.findIndex(e=>e==="{".charCodeAt(0))}bc(){var e=this;return(0,Ee.Z)(function*(){for(;e.Vc()<0&&!(yield e.Sc()););if(0===e.buffer.length)return null;const t=e.Vc();t<0&&e.Pc("Reached the end of bundle when a length string is expected.");const o=e.buffer.slice(0,t);return e.buffer=e.buffer.slice(t),o})()}vc(e){var t=this;return(0,Ee.Z)(function*(){for(;t.buffer.length0)throw new D(b.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");const o=yield(u=(0,Ee.Z)(function*(h,v){const M=En(h),j=Vl(M.wt)+"/documents",W={documents:v.map(jt=>dl(M.wt,jt))},de=yield M.ao("BatchGetDocuments",j,W),Fe=new Map;de.forEach(jt=>{const en=function Hh(i,e){return"found"in e?function(t,o){zn(!!o.found);const u=Sa(t,o.found.name),h=hs(o.found.updateTime),v=new qi({mapValue:{fields:o.found.fields}});return Er.newFoundDocument(u,h,v)}(i,e):"missing"in e?function(t,o){zn(!!o.missing),zn(!!o.readTime);const u=Sa(t,o.missing),h=hs(o.readTime);return Er.newNoDocument(u,h)}(i,e):_n()}(M.wt,jt);Fe.set(en.key.toString(),en)});const vt=[];return v.forEach(jt=>{const en=Fe.get(jt.toString());zn(!!en),vt.push(en)}),vt}),function(h,v){return u.apply(this,arguments)})(t.datastore,e);var u;return o.forEach(u=>t.recordVersion(u)),o})()}set(e,t){this.write(t.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())}update(e,t){try{this.write(t.toMutation(e,this.preconditionForUpdate(e)))}catch(o){this.lastWriteError=o}this.writtenDocs.add(e.toString())}delete(e){this.write(new Iu(e,this.precondition(e))),this.writtenDocs.add(e.toString())}commit(){var e=this;return(0,Ee.Z)(function*(){if(e.ensureCommitNotCalled(),e.lastWriteError)throw e.lastWriteError;const t=e.readVersions;var o;e.mutations.forEach(o=>{t.delete(o.key.toString())}),t.forEach((o,u)=>{const h=vn.fromPath(u);e.mutations.push(new wd(h,e.precondition(h)))}),yield(o=(0,Ee.Z)(function*(u,h){const v=En(u),M=Vl(v.wt)+"/documents",j={writes:h.map(W=>hl(v.wt,W))};yield v.ro("Commit",M,j)}),function(u,h){return o.apply(this,arguments)})(e.datastore,e.mutations),e.committed=!0})()}recordVersion(e){let t;if(e.isFoundDocument())t=e.version;else{if(!e.isNoDocument())throw _n();t=On.min()}const o=this.readVersions.get(e.key.toString());if(o){if(!t.isEqual(o))throw new D(b.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),t)}precondition(e){const t=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&t?cs.updateTime(t):cs.none()}preconditionForUpdate(e){const t=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&t){if(t.isEqual(On.min()))throw new D(b.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return cs.updateTime(t)}return cs.exists(!0)}write(e){this.ensureCommitNotCalled(),this.mutations.push(e)}ensureCommitNotCalled(){}}class V_{constructor(e,t,o,u,h){this.asyncQueue=e,this.datastore=t,this.options=o,this.updateFunction=u,this.deferred=h,this.Dc=o.maxAttempts,this.So=new df(this.asyncQueue,"transaction_retry")}run(){this.Dc-=1,this.Cc()}Cc(){var e=this;this.So.Io((0,Ee.Z)(function*(){const t=new L_(e.datastore),o=e.xc(t);o&&o.then(u=>{e.asyncQueue.enqueueAndForget(()=>t.commit().then(()=>{e.deferred.resolve(u)}).catch(h=>{e.Nc(h)}))}).catch(u=>{e.Nc(u)})}))}xc(e){try{const t=this.updateFunction(e);return!Ot(t)&&t.catch&&t.then?t:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.deferred.reject(t),null}}Nc(e){this.Dc>0&&this.kc(e)?(this.Dc-=1,this.asyncQueue.enqueueAndForget(()=>(this.Cc(),Promise.resolve()))):this.deferred.reject(e)}kc(e){if("FirebaseError"===e.name){const t=e.code;return"aborted"===t||"failed-precondition"===t||!Lh(t)}return!1}}class dE{constructor(e,t,o,u){var h=this;this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=o,this.databaseInfo=u,this.user=hi.UNAUTHENTICATED,this.clientId=si.I(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(o,function(){var v=(0,Ee.Z)(function*(M){Xt("FirestoreClient","Received user=",M.uid),yield h.authCredentialListener(M),h.user=M});return function(M){return v.apply(this,arguments)}}()),this.appCheckCredentials.start(o,v=>(Xt("FirestoreClient","Received new app check token=",v),this.appCheckCredentialListener(v,this.user)))}getConfiguration(){var e=this;return(0,Ee.Z)(function*(){return{asyncQueue:e.asyncQueue,databaseInfo:e.databaseInfo,clientId:e.clientId,authCredentials:e.authCredentials,appCheckCredentials:e.appCheckCredentials,initialUser:e.user,maxConcurrentLimboResolutions:100}})()}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new D(b.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var e=this;this.asyncQueue.enterRestrictedMode();const t=new I;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((0,Ee.Z)(function*(){try{e.onlineComponents&&(yield e.onlineComponents.terminate()),e.offlineComponents&&(yield e.offlineComponents.terminate()),e.authCredentials.shutdown(),e.appCheckCredentials.shutdown(),t.resolve()}catch(o){const u=Ql(o,"Failed to shutdown persistence");t.reject(u)}})),t.promise}}function Sf(i,e){return Mf.apply(this,arguments)}function Mf(){return Mf=(0,Ee.Z)(function*(i,e){i.asyncQueue.verifyOperationInProgress(),Xt("FirestoreClient","Initializing OfflineComponentProvider");const t=yield i.getConfiguration();yield e.initialize(t);let o=t.initialUser;i.setCredentialChangeListener(function(){var u=(0,Ee.Z)(function*(h){o.isEqual(h)||(yield vm(e.localStore,h),o=h)});return function(h){return u.apply(this,arguments)}}()),e.persistence.setDatabaseDeletedListener(()=>i.terminate()),i.offlineComponents=e}),Mf.apply(this,arguments)}function ag(i,e){return xf.apply(this,arguments)}function xf(){return xf=(0,Ee.Z)(function*(i,e){i.asyncQueue.verifyOperationInProgress();const t=yield Of(i);Xt("FirestoreClient","Initializing OnlineComponentProvider");const o=yield i.getConfiguration();yield e.initialize(t,o),i.setCredentialChangeListener(u=>C_(e.remoteStore,u)),i.setAppCheckTokenChangeListener((u,h)=>C_(e.remoteStore,h)),i.onlineComponents=e}),xf.apply(this,arguments)}function Of(i){return ug.apply(this,arguments)}function ug(){return ug=(0,Ee.Z)(function*(i){return i.offlineComponents||(Xt("FirestoreClient","Using default OfflineComponentProvider"),yield Sf(i,new ig)),i.offlineComponents}),ug.apply(this,arguments)}function Rf(i){return lg.apply(this,arguments)}function lg(){return lg=(0,Ee.Z)(function*(i){return i.onlineComponents||(Xt("FirestoreClient","Using default OnlineComponentProvider"),yield ag(i,new Tf)),i.onlineComponents}),lg.apply(this,arguments)}function ay(i){return Of(i).then(e=>e.persistence)}function Pf(i){return Of(i).then(e=>e.localStore)}function U_(i){return Rf(i).then(e=>e.remoteStore)}function Nf(i){return Rf(i).then(e=>e.syncEngine)}function jc(i){return cg.apply(this,arguments)}function cg(){return cg=(0,Ee.Z)(function*(i){const e=yield Rf(i),t=e.eventManager;return t.onListen=S_.bind(null,e.syncEngine),t.onUnlisten=qm.bind(null,e.syncEngine),t}),cg.apply(this,arguments)}function uy(i,e,t={}){const o=new I;return i.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return function(u,h,v,M,j){const W=new qa({next:Fe=>{h.enqueueAndForget(()=>yf(u,de));const vt=Fe.docs.has(v);!vt&&Fe.fromCache?j.reject(new D(b.UNAVAILABLE,"Failed to get document because the client is offline.")):vt&&Fe.fromCache&&M&&"server"===M.source?j.reject(new D(b.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):j.resolve(Fe)},error:Fe=>j.reject(Fe)}),de=new nh(ul(v.path),W,{includeMetadataChanges:!0,Du:!0});return eh(u,de)}(yield jc(i),i.asyncQueue,e,t,o)})),o.promise}function dg(i,e,t={}){const o=new I;return i.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return function(u,h,v,M,j){const W=new qa({next:Fe=>{h.enqueueAndForget(()=>yf(u,de)),Fe.fromCache&&"server"===M.source?j.reject(new D(b.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):j.resolve(Fe)},error:Fe=>j.reject(Fe)}),de=new nh(v,W,{includeMetadataChanges:!0,Du:!0});return eh(u,de)}(yield jc(i),i.asyncQueue,e,t,o)})),o.promise}const hg=new Map;function kf(i,e,t){if(!t)throw new D(b.INVALID_ARGUMENT,`Function ${i}() cannot be called with an empty ${e}.`)}function fg(i,e,t,o){if(!0===e&&!0===o)throw new D(b.INVALID_ARGUMENT,`${i} and ${t} cannot be used together.`)}function cy(i){if(!vn.isDocumentKey(i))throw new D(b.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${i} has ${i.length}.`)}function j_(i){if(vn.isDocumentKey(i))throw new D(b.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${i} has ${i.length}.`)}function uh(i){if(void 0===i)return"undefined";if(null===i)return"null";if("string"==typeof i)return i.length>20&&(i=`${i.substring(0,20)}...`),JSON.stringify(i);if("number"==typeof i||"boolean"==typeof i)return""+i;if("object"==typeof i){if(i instanceof Array)return"an array";{const e=(t=i).constructor?t.constructor.name:null;return e?`a custom ${e} object`:"an object"}}var t;return"function"==typeof i?"a function":_n()}function Kr(i,e){if("_delegate"in i&&(i=i._delegate),!(i instanceof e)){if(e.name===i.constructor.name)throw new D(b.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const t=uh(i);throw new D(b.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${t}`)}}return i}function dy(i,e){if(e<=0)throw new D(b.INVALID_ARGUMENT,`Function ${i}() requires a positive number, but it was: ${e}.`)}class Ff{constructor(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new D(b.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new D(b.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,fg("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class lh{constructor(e,t,o){this._authCredentials=t,this._appCheckCredentials=o,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Ff({}),this._settingsFrozen=!1,e instanceof tt?this._databaseId=e:(this._app=e,this._databaseId=function(u){if(!Object.prototype.hasOwnProperty.apply(u.options,["projectId"]))throw new D(b.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new tt(u.options.projectId)}(e))}get app(){if(!this._app)throw new D(b.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new D(b.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Ff(e),void 0!==e.credentials&&(this._authCredentials=function(t){if(!t)return new G;switch(t.type){case"gapi":const o=t.client;return zn(!("object"!=typeof o||null===o||!o.auth||!o.auth.getAuthHeaderValueForFirstParty)),new Ft(o,t.sessionIndex||"0",t.iamToken||null);case"provider":return t.client;default:throw new D(b.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const t=hg.get(e);t&&(Xt("ComponentProvider","Removing Datastore"),hg.delete(e),t.terminate())}(this),Promise.resolve()}}class rs{constructor(e,t,o){this.converter=t,this._key=o,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Pu(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new rs(this.firestore,e,this._key)}}class zo{constructor(e,t,o){this.converter=t,this._query=o,this.type="query",this.firestore=e}withConverter(e){return new zo(this.firestore,e,this._query)}}class Pu extends zo{constructor(e,t,o){super(e,t,ul(o)),this._path=o,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new rs(this.firestore,null,new vn(e))}withConverter(e){return new Pu(this.firestore,e,this._path)}}function hy(i,e,...t){if(i=(0,xe.m9)(i),kf("collection","path",e),i instanceof lh){const o=dr.fromString(e,...t);return j_(o),new Pu(i,null,o)}{if(!(i instanceof rs||i instanceof Pu))throw new D(b.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const o=i._path.child(dr.fromString(e,...t));return j_(o),new Pu(i.firestore,null,o)}}function Nu(i,e,...t){if(i=(0,xe.m9)(i),1===arguments.length&&(e=si.I()),kf("doc","path",e),i instanceof lh){const o=dr.fromString(e,...t);return cy(o),new rs(i,null,new vn(o))}{if(!(i instanceof rs||i instanceof Pu))throw new D(b.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const o=i._path.child(dr.fromString(e,...t));return cy(o),new rs(i.firestore,i instanceof Pu?i.converter:null,new vn(o))}}function H_(i,e){return i=(0,xe.m9)(i),e=(0,xe.m9)(e),(i instanceof rs||i instanceof Pu)&&(e instanceof rs||e instanceof Pu)&&i.firestore===e.firestore&&i.path===e.path&&i.converter===e.converter}function $c(i,e){return i=(0,xe.m9)(i),e=(0,xe.m9)(e),i instanceof zo&&e instanceof zo&&i.firestore===e.firestore&&Sl(i._query,e._query)&&i.converter===e.converter}class G_{constructor(){this.Oc=Promise.resolve(),this.Mc=[],this.Fc=!1,this.$c=[],this.Bc=null,this.Lc=!1,this.Uc=!1,this.qc=[],this.So=new df(this,"async_queue_retry"),this.Kc=()=>{const t=Kd();t&&Xt("AsyncQueue","Visibility state changed to "+t.visibilityState),this.So.Eo()};const e=Kd();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Kc)}get isShuttingDown(){return this.Fc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Gc(),this.Qc(e)}enterRestrictedMode(e){if(!this.Fc){this.Fc=!0,this.Uc=e||!1;const t=Kd();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Kc)}}enqueue(e){if(this.Gc(),this.Fc)return new Promise(()=>{});const t=new I;return this.Qc(()=>this.Fc&&this.Uc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Mc.push(e),this.jc()))}jc(){var e=this;return(0,Ee.Z)(function*(){if(0!==e.Mc.length){try{yield e.Mc[0](),e.Mc.shift(),e.So.reset()}catch(t){if(!Ws(t))throw t;Xt("AsyncQueue","Operation failed with retryable error: "+t)}e.Mc.length>0&&e.So.Io(()=>e.jc())}})()}Qc(e){const t=this.Oc.then(()=>(this.Lc=!0,e().catch(o=>{throw this.Bc=o,this.Lc=!1,Jr("INTERNAL UNHANDLED ERROR: ",function(h){let v=h.message||"";return h.stack&&(v=h.stack.includes(h.message)?h.stack:h.message+"\n"+h.stack),v}(o)),o}).then(o=>(this.Lc=!1,o))));return this.Oc=t,t}enqueueAfterDelay(e,t,o){this.Gc(),this.qc.indexOf(e)>-1&&(t=0);const u=Xd.createAndSchedule(this,e,t,o,h=>this.Wc(h));return this.$c.push(u),u}Gc(){this.Bc&&_n()}verifyOperationInProgress(){}zc(){var e=this;return(0,Ee.Z)(function*(){let t;do{t=e.Oc,yield t}while(t!==e.Oc)})()}Hc(e){for(const t of this.$c)if(t.timerId===e)return!0;return!1}Jc(e){return this.zc().then(()=>{this.$c.sort((t,o)=>t.targetTimeMs-o.targetTimeMs);for(const t of this.$c)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.zc()})}Yc(e){this.qc.push(e)}Wc(e){const t=this.$c.indexOf(e);this.$c.splice(t,1)}}function pg(i){return function(e,t){if("object"!=typeof e||null===e)return!1;const o=e;for(const u of["next","error","complete"])if(u in o&&"function"==typeof o[u])return!0;return!1}(i)}class gg{constructor(){this._progressObserver={},this._taskCompletionResolver=new I,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}onProgress(e,t,o){this._progressObserver={next:e,error:t,complete:o}}catch(e){return this._taskCompletionResolver.promise.catch(e)}then(e,t){return this._taskCompletionResolver.promise.then(e,t)}_completeWith(e){this._updateProgress(e),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(e)}_failWith(e){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(e),this._taskCompletionResolver.reject(e)}_updateProgress(e){this._lastProgress=e,this._progressObserver.next&&this._progressObserver.next(e)}}class gi extends lh{constructor(e,t,o){super(e,t,o),this.type="firestore",this._queue=new G_,this._persistenceKey="name"in e?e.name:"[DEFAULT]"}_terminate(){return this._firestoreClient||ch(this),this._firestoreClient.terminate()}}function Yi(i){return i._firestoreClient||ch(i),i._firestoreClient.verifyNotTerminated(),i._firestoreClient}function ch(i){var e;const t=i._freezeSettings(),o=(h=(null===(e=i._app)||void 0===e?void 0:e.options.appId)||"",new ke(i._databaseId,h,i._persistenceKey,(M=t).host,M.ssl,M.experimentalForceLongPolling,M.experimentalAutoDetectLongPolling,M.useFetchStreams));var h,M;i._firestoreClient=new dE(i._authCredentials,i._appCheckCredentials,i._queue,o)}function Xl(i,e,t){const o=new I;return i.asyncQueue.enqueue((0,Ee.Z)(function*(){try{yield Sf(i,t),yield ag(i,e),o.resolve()}catch(u){if(!("FirebaseError"===(h=u).name?h.code===b.FAILED_PRECONDITION||h.code===b.UNIMPLEMENTED:!(typeof DOMException<"u"&&h instanceof DOMException)||22===h.code||20===h.code||11===h.code))throw u;console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+u),o.reject(u)}var h})).then(()=>o.promise)}function ec(i){if(i._initialized||i._terminated)throw new D(b.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}class ku{constructor(...e){for(let t=0;t90)throw new D(b.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new D(b.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return $n(this._lat,e._lat)||$n(this._long,e._long)}}const fy=/^__.*__$/;class py{constructor(e,t,o){this.data=e,this.fieldMask=t,this.fieldTransforms=o}toMutation(e,t){return null!==this.fieldMask?new za(e,this.data,this.fieldMask,t,this.fieldTransforms):new ou(e,this.data,t,this.fieldTransforms)}}class yg{constructor(e,t,o){this.data=e,this.fieldMask=t,this.fieldTransforms=o}toMutation(e,t){return new za(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function _g(i){switch(i){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw _n()}}class Uf{constructor(e,t,o,u,h,v){this.settings=e,this.databaseId=t,this.wt=o,this.ignoreUndefinedProperties=u,void 0===h&&this.Xc(),this.fieldTransforms=h||[],this.fieldMask=v||[]}get path(){return this.settings.path}get Zc(){return this.settings.Zc}ta(e){return new Uf(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.wt,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}ea(e){var t;const o=null===(t=this.path)||void 0===t?void 0:t.child(e),u=this.ta({path:o,na:!1});return u.sa(e),u}ia(e){var t;const o=null===(t=this.path)||void 0===t?void 0:t.child(e),u=this.ta({path:o,na:!1});return u.Xc(),u}ra(e){return this.ta({path:void 0,na:!0})}oa(e){return Kf(e,this.settings.methodName,this.settings.ua||!1,this.path,this.settings.ca)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}Xc(){if(this.path)for(let e=0;ej.covers(Fe.field))}else j=null,W=v.fieldTransforms;return new py(new qi(M),j,W)}class nc extends wl{_toFieldTransform(e){if(2!==e.Zc)throw e.oa(1===e.Zc?`${this._methodName}() can only appear at the top level of your update data`:`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof nc}}function Bf(i,e,t){return new Uf({Zc:3,ca:e.settings.ca,methodName:i._methodName,na:t},e.databaseId,e.wt,e.ignoreUndefinedProperties)}class vg extends wl{_toFieldTransform(e){return new Du(e.path,new Lo)}isEqual(e){return e instanceof vg}}class jf extends wl{constructor(e,t){super(e),this.ha=t}_toFieldTransform(e){const t=Bf(this,e,!0),o=this.ha.map(h=>bl(h,t)),u=new sa(o);return new Du(e.path,u)}isEqual(e){return this===e}}class $f extends wl{constructor(e,t){super(e),this.ha=t}_toFieldTransform(e){const t=Bf(this,e,!0),o=this.ha.map(h=>bl(h,t)),u=new su(o);return new Du(e.path,u)}isEqual(e){return this===e}}class Eg extends wl{constructor(e,t){super(e),this.la=t}_toFieldTransform(e){const t=new Gu(e.wt,Rh(e.wt,this.la));return new Du(e.path,t)}isEqual(e){return this===e}}function wg(i,e,t,o){const u=i.aa(1,e,t);Gf("Data must be an object, but it was:",u,o);const h=[],v=qi.empty();ts(o,(j,W)=>{const de=gh(e,j,t);W=(0,xe.m9)(W);const Fe=u.ia(de);if(W instanceof nc)h.push(de);else{const vt=bl(W,Fe);null!=vt&&(h.push(de),v.set(de,vt))}});const M=new ne(h);return new yg(v,M,u.fieldTransforms)}function qc(i,e,t,o,u,h){const v=i.aa(1,e,t),M=[zf(e,o,t)],j=[u];if(h.length%2!=0)throw new D(b.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let vt=0;vt=0;--vt)if(!Ig(W,M[vt])){const jt=M[vt];let en=j[vt];en=(0,xe.m9)(en);const Mn=v.ia(jt);if(en instanceof nc)W.push(jt);else{const Gn=bl(en,Mn);null!=Gn&&(W.push(jt),de.set(jt,Gn))}}const Fe=new ne(W);return new yg(de,Fe,v.fieldTransforms)}function ph(i,e,t,o=!1){return bl(t,i.aa(o?4:3,e))}function bl(i,e){if(Hf(i=(0,xe.m9)(i)))return Gf("Unsupported field value:",e,i),bg(i,e);if(i instanceof wl)return function(t,o){if(!_g(o.Zc))throw o.oa(`${t._methodName}() can only be used with update() and set()`);if(!o.path)throw o.oa(`${t._methodName}() is not currently supported inside arrays`);const u=t._toFieldTransform(o);u&&o.fieldTransforms.push(u)}(i,e),null;if(void 0===i&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),i instanceof Array){if(e.settings.na&&4!==e.Zc)throw e.oa("Nested arrays are not supported");return function(t,o){const u=[];let h=0;for(const v of t){let M=bl(v,o.ra(h));null==M&&(M={nullValue:"NULL_VALUE"}),u.push(M),h++}return{arrayValue:{values:u}}}(i,e)}return function(t,o){if(null===(t=(0,xe.m9)(t)))return{nullValue:"NULL_VALUE"};if("number"==typeof t)return Rh(o.wt,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){const u=zr.fromDate(t);return{timestampValue:Wu(o.wt,u)}}if(t instanceof zr){const u=new zr(t.seconds,1e3*Math.floor(t.nanoseconds/1e3));return{timestampValue:Wu(o.wt,u)}}if(t instanceof hh)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof gu)return{bytesValue:wc(o.wt,t._byteString)};if(t instanceof rs){const u=o.databaseId,h=t.firestore._databaseId;if(!h.isEqual(u))throw o.oa(`Document reference is for database ${h.projectId}/${h.database} but should be for database ${u.projectId}/${u.database}`);return{referenceValue:po(t.firestore._databaseId||o.databaseId,t._key.path)}}throw o.oa(`Unsupported field value: ${uh(t)}`)}(i,e)}function bg(i,e){const t={};return Ho(i)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):ts(i,(o,u)=>{const h=bl(u,e.ea(o));null!=h&&(t[o]=h)}),{mapValue:{fields:t}}}function Hf(i){return!("object"!=typeof i||null===i||i instanceof Array||i instanceof Date||i instanceof zr||i instanceof hh||i instanceof gu||i instanceof rs||i instanceof wl)}function Gf(i,e,t){if(!Hf(t)||"object"!=typeof(o=t)||null===o||Object.getPrototypeOf(o)!==Object.prototype&&null!==Object.getPrototypeOf(o)){const o=uh(t);throw e.oa("an object"===o?i+" a custom object":i+" "+o)}var o}function zf(i,e,t){if((e=(0,xe.m9)(e))instanceof ku)return e._internalPath;if("string"==typeof e)return gh(i,e);throw Kf("Field path arguments must be of type string or ",i,!1,void 0,t)}const Dg=new RegExp("[~\\*/\\[\\]]");function gh(i,e,t){if(e.search(Dg)>=0)throw Kf(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,i,!1,void 0,t);try{return new ku(...e.split("."))._internalPath}catch{throw Kf(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,i,!1,void 0,t)}}function Kf(i,e,t,o,u){const h=o&&!o.isEmpty(),v=void 0!==u;let M=`Function ${e}() called with invalid data`;t&&(M+=" (via `toFirestore()`)"),M+=". ";let j="";return(h||v)&&(j+=" (found",h&&(j+=` in field ${o}`),v&&(j+=` in document ${u}`),j+=")"),new D(b.INVALID_ARGUMENT,M+i+j)}function Ig(i,e){return i.some(t=>t.isEqual(e))}class Yc{constructor(e,t,o,u,h){this._firestore=e,this._userDataWriter=t,this._key=o,this._document=u,this._converter=h}get id(){return this._key.path.lastSegment()}get ref(){return new rs(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new Cg(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const t=this._document.data.field(mh("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class Cg extends Yc{data(){return super.data()}}function mh(i,e){return"string"==typeof e?gh(i,e):e instanceof ku?e._internalPath:e._delegate._internalPath}class rc{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Fu extends Yc{constructor(e,t,o,u,h,v){super(e,t,o,u,v),this._firestore=e,this._firestoreImpl=e,this.metadata=h}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new Qc(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){const o=this._document.data.field(mh("DocumentSnapshot.get",e));if(null!==o)return this._userDataWriter.convertValue(o,t.serverTimestamps)}}}class Qc extends Fu{data(e={}){return super.data(e)}}class Lu{constructor(e,t,o,u){this._firestore=e,this._userDataWriter=t,this._snapshot=u,this.metadata=new rc(u.hasPendingWrites,u.fromCache),this.query=o}get docs(){const e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(o=>{e.call(t,new Qc(this._firestore,this._userDataWriter,o.key,o,new rc(this._snapshot.mutatedKeys.has(o.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new D(b.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(o,u){if(o._snapshot.oldDocs.isEmpty()){let h=0;return o._snapshot.docChanges.map(v=>({type:"added",doc:new Qc(o._firestore,o._userDataWriter,v.doc.key,v.doc,new rc(o._snapshot.mutatedKeys.has(v.doc.key),o._snapshot.fromCache),o.query.converter),oldIndex:-1,newIndex:h++}))}{let h=o._snapshot.oldDocs;return o._snapshot.docChanges.filter(v=>u||3!==v.type).map(v=>{const M=new Qc(o._firestore,o._userDataWriter,v.doc.key,v.doc,new rc(o._snapshot.mutatedKeys.has(v.doc.key),o._snapshot.fromCache),o.query.converter);let j=-1,W=-1;return 0!==v.type&&(j=h.indexOf(v.doc.key),h=h.delete(v.doc.key)),1!==v.type&&(h=h.add(v.doc),W=h.indexOf(v.doc.key)),{type:Wf(v.type),doc:M,oldIndex:j,newIndex:W}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function Wf(i){switch(i){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return _n()}}function Tg(i,e){return i instanceof Fu&&e instanceof Fu?i._firestore===e._firestore&&i._key.isEqual(e._key)&&(null===i._document?null===e._document:i._document.isEqual(e._document))&&i._converter===e._converter:i instanceof Lu&&e instanceof Lu&&i._firestore===e._firestore&&$c(i.query,e.query)&&i.metadata.isEqual(e.metadata)&&i._snapshot.isEqual(e._snapshot)}function Ag(i){if("L"===i.limitType&&0===i.explicitOrderBy.length)throw new D(b.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Jc{}function el(i,...e){for(const t of e)i=t._apply(i);return i}class my extends Jc{constructor(e,t,o){super(),this.fa=e,this.da=t,this._a=o,this.type="where"}_apply(e){const t=tc(e.firestore),o=function(u,h,v,M,j,W,de){let Fe;if(j.isKeyField()){if("array-contains"===W||"array-contains-any"===W)throw new D(b.INVALID_ARGUMENT,`Invalid Query. You can't perform '${W}' queries on documentId().`);if("in"===W||"not-in"===W){Og(de,W);const jt=[];for(const en of de)jt.push(Ey(M,u,en));Fe={arrayValue:{values:jt}}}else Fe=Ey(M,u,de)}else"in"!==W&&"not-in"!==W&&"array-contains-any"!==W||Og(de,W),Fe=ph(v,"where",de,"in"===W||"not-in"===W);const vt=Zs.create(j,W,Fe);return function(jt,en){if(en.ht()){const Gn=cd(jt);if(null!==Gn&&!Gn.isEqual(en.field))throw new D(b.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${Gn.toString()}' and '${en.field.toString()}'`);const Ci=ld(jt);null!==Ci&&Rg(0,en.field,Ci)}const Mn=function(Gn,Ci){for(const is of Gn.filters)if(Ci.indexOf(is.op)>=0)return is.op;return null}(jt,function(Gn){switch(Gn){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(en.op));if(null!==Mn)throw new D(b.INVALID_ARGUMENT,Mn===en.op?`Invalid query. You cannot use more than one '${en.op.toString()}' filter.`:`Invalid query. You cannot use '${en.op.toString()}' filters with '${Mn.toString()}' filters.`)}(u,vt),vt}(e._query,0,t,e.firestore._databaseId,this.fa,this.da,this._a);return new zo(e.firestore,e.converter,function(u,h){const v=u.filters.concat([h]);return new Ga(u.path,u.collectionGroup,u.explicitOrderBy.slice(),v,u.limit,u.limitType,u.startAt,u.endAt)}(e._query,o))}}class _y extends Jc{constructor(e,t){super(),this.fa=e,this.wa=t,this.type="orderBy"}_apply(e){const t=function(o,u,h){if(null!==o.startAt)throw new D(b.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==o.endAt)throw new D(b.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");const v=new ru(u,h);return function(M,j){if(null===ld(M)){const W=cd(M);null!==W&&Rg(0,W,j.field)}}(o,v),v}(e._query,this.fa,this.wa);return new zo(e.firestore,e.converter,function(o,u){const h=o.explicitOrderBy.concat([u]);return new Ga(o.path,o.collectionGroup,h,o.filters.slice(),o.limit,o.limitType,o.startAt,o.endAt)}(e._query,t))}}class W_ extends Jc{constructor(e,t,o){super(),this.type=e,this.ma=t,this.ga=o}_apply(e){return new zo(e.firestore,e.converter,hd(e._query,this.ma,this.ga))}}class Sg extends Jc{constructor(e,t,o){super(),this.type=e,this.ya=t,this.pa=o}_apply(e){const t=xg(e,this.type,this.ya,this.pa);return new zo(e.firestore,e.converter,(u=t,new Ga((o=e._query).path,o.collectionGroup,o.explicitOrderBy.slice(),o.filters.slice(),o.limit,o.limitType,u,o.endAt)));var o,u}}class Mg extends Jc{constructor(e,t,o){super(),this.type=e,this.ya=t,this.pa=o}_apply(e){const t=xg(e,this.type,this.ya,this.pa);return new zo(e.firestore,e.converter,(u=t,new Ga((o=e._query).path,o.collectionGroup,o.explicitOrderBy.slice(),o.filters.slice(),o.limit,o.limitType,o.startAt,u)));var o,u}}function xg(i,e,t,o){if(t[0]=(0,xe.m9)(t[0]),t[0]instanceof Yc)return function(u,h,v,M,j){if(!M)throw new D(b.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${v}().`);const W=[];for(const de of Go(u))if(de.field.isKeyField())W.push(ls(h,M.key));else{const Fe=M.data.field(de.field);if(F(Fe))throw new D(b.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+de.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===Fe){const vt=de.field.canonicalString();throw new D(b.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${vt}' (used as the orderBy) does not exist.`)}W.push(Fe)}return new Hu(W,j)}(i._query,i.firestore._databaseId,e,t[0]._document,o);{const u=tc(i.firestore);return function(h,v,M,j,W,de){const Fe=h.explicitOrderBy;if(W.length>Fe.length)throw new D(b.INVALID_ARGUMENT,`Too many arguments provided to ${j}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const vt=[];for(let jt=0;jt10)throw new D(b.INVALID_ARGUMENT,`Invalid Query. '${e.toString()}' filters support a maximum of 10 elements in the value array.`)}function Rg(i,e,t){if(!t.isEqual(e))throw new D(b.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${t.toString()}' instead.`)}const Xc={maxAttempts:5};class Pg{convertValue(e,t="none"){switch(xn(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Bt(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(x(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw _n()}}convertObject(e,t){const o={};return ts(e.fields,(u,h)=>{o[u]=this.convertValue(h,t)}),o}convertGeoPoint(e){return new hh(Bt(e.latitude),Bt(e.longitude))}convertArray(e,t){return(e.values||[]).map(o=>this.convertValue(o,t))}convertServerTimestamp(e,t){switch(t){case"previous":const o=Y(e);return null==o?null:this.convertValue(o,t);case"estimate":return this.convertTimestamp(ue(e));default:return null}}convertTimestamp(e){const t=wt(e);return new zr(t.seconds,t.nanos)}convertDocumentKey(e,t){const o=dr.fromString(e);zn(xd(o));const u=new tt(o.get(1),o.get(3)),h=new vn(o.popFirst(5));return u.isEqual(t)||Jr(`Document ${h} contains a document reference within a different database (${u.projectId}/${u.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),h}}function Zf(i,e,t){let o;return o=i?t&&(t.merge||t.mergeFields)?i.toFirestore(e,t):i.toFirestore(e):e,o}class wy extends Pg{constructor(e){super(),this.firestore=e}convertBytes(e){return new gu(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new rs(this.firestore,null,t)}}class by{constructor(e,t){this._firestore=e,this._commitHandler=t,this._mutations=[],this._committed=!1,this._dataReader=tc(e)}set(e,t,o){this._verifyNotCommitted();const u=tl(e,this._firestore),h=Zf(u.converter,t,o),v=fh(this._dataReader,"WriteBatch.set",u._key,h,null!==u.converter,o);return this._mutations.push(v.toMutation(u._key,cs.none())),this}update(e,t,o,...u){this._verifyNotCommitted();const h=tl(e,this._firestore);let v;return v="string"==typeof(t=(0,xe.m9)(t))||t instanceof ku?qc(this._dataReader,"WriteBatch.update",h._key,t,o,u):wg(this._dataReader,"WriteBatch.update",h._key,t),this._mutations.push(v.toMutation(h._key,cs.exists(!0))),this}delete(e){this._verifyNotCommitted();const t=tl(e,this._firestore);return this._mutations=this._mutations.concat(new Iu(t._key,cs.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new D(b.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function tl(i,e){if((i=(0,xe.m9)(i)).firestore!==e)throw new D(b.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return i}class nl extends Pg{constructor(e){super(),this.firestore=e}convertBytes(e){return new gu(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new rs(this.firestore,null,t)}}function Qa(i,e,t){i=Kr(i,rs);const o=Kr(i.firestore,gi),u=Zf(i.converter,e,t);return ed(o,[fh(tc(o),"setDoc",i._key,u,null!==i.converter,t).toMutation(i._key,cs.none())])}function Ja(i,e,t,...o){i=Kr(i,rs);const u=Kr(i.firestore,gi),h=tc(u);let v;return v="string"==typeof(e=(0,xe.m9)(e))||e instanceof ku?qc(h,"updateDoc",i._key,e,t,o):wg(h,"updateDoc",i._key,e),ed(u,[v.toMutation(i._key,cs.exists(!0))])}function Cy(i,...e){var t,o,u;i=(0,xe.m9)(i);let h={includeMetadataChanges:!1},v=0;"object"!=typeof e[v]||pg(e[v])||(h=e[v],v++);const M={includeMetadataChanges:h.includeMetadataChanges};if(pg(e[v])){const Fe=e[v];e[v]=null===(t=Fe.next)||void 0===t?void 0:t.bind(Fe),e[v+1]=null===(o=Fe.error)||void 0===o?void 0:o.bind(Fe),e[v+2]=null===(u=Fe.complete)||void 0===u?void 0:u.bind(Fe)}let j,W,de;if(i instanceof rs)W=Kr(i.firestore,gi),de=ul(i._key.path),j={next:Fe=>{e[v]&&e[v](kg(W,i,Fe))},error:e[v+1],complete:e[v+2]};else{const Fe=Kr(i,zo);W=Kr(Fe.firestore,gi),de=Fe._query;const vt=new nl(W);j={next:jt=>{e[v]&&e[v](new Lu(W,vt,Fe,jt))},error:e[v+1],complete:e[v+2]},Ag(i._query)}return function(Fe,vt,jt,en){const Mn=new qa(en),Gn=new nh(vt,Mn,jt);return Fe.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return eh(yield jc(Fe),Gn)})),()=>{Mn.Tc(),Fe.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return yf(yield jc(Fe),Gn)}))}}(Yi(W),de,M,j)}function ed(i,e){return function(t,o){const u=new I;return t.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return function Ym(i,e,t){return Wp.apply(this,arguments)}(yield Nf(t),o,u)})),u.promise}(Yi(i),e)}function kg(i,e,t){const o=t.docs.get(e._key),u=new nl(i);return new Fu(i,u,e._key,o,new rc(t.hasPendingWrites,t.fromCache),e.converter)}class Fg extends class{constructor(e,t){this._firestore=e,this._transaction=t,this._dataReader=tc(e)}get(e){const t=tl(e,this._firestore),o=new wy(this._firestore);return this._transaction.lookup([t._key]).then(u=>{if(!u||1!==u.length)return _n();const h=u[0];if(h.isFoundDocument())return new Yc(this._firestore,o,h.key,h,t.converter);if(h.isNoDocument())return new Yc(this._firestore,o,t._key,null,t.converter);throw _n()})}set(e,t,o){const u=tl(e,this._firestore),h=Zf(u.converter,t,o),v=fh(this._dataReader,"Transaction.set",u._key,h,null!==u.converter,o);return this._transaction.set(u._key,v),this}update(e,t,o,...u){const h=tl(e,this._firestore);let v;return v="string"==typeof(t=(0,xe.m9)(t))||t instanceof ku?qc(this._dataReader,"Transaction.update",h._key,t,o,u):wg(this._dataReader,"Transaction.update",h._key,t),this._transaction.update(h._key,v),this}delete(e){const t=tl(e,this._firestore);return this._transaction.delete(t._key),this}}{constructor(e,t){super(e,t),this._firestore=e}get(e){const t=tl(e,this._firestore),o=new nl(this._firestore);return super.get(e).then(u=>new Fu(this._firestore,o,t._key,u._document,new rc(!1,!1),t.converter))}}function td(i,e){if(void 0===e)return{merge:!1};if(void 0!==e.mergeFields&&void 0!==e.merge)throw new D("invalid-argument",`Invalid options passed to function ${i}(): You cannot specify both "merge" and "mergeFields".`);return e}function qf(){if(typeof Uint8Array>"u")throw new D("unimplemented","Uint8Arrays are not available in this environment.")}function Bg(){if(!function De(){return typeof atob<"u"}())throw new D("unimplemented","Blobs are unavailable in Firestore in this environment.")}!function(i,e=!0){No=kt.SDK_VERSION,(0,kt._registerComponent)(new ot.wA("firestore",(t,{options:o})=>{const u=t.getProvider("app").getImmediate(),h=new gi(u,new be(t.getProvider("auth-internal")),new fr(t.getProvider("app-check-internal")));return o=Object.assign({useFetchStreams:e},o),h._setSettings(o),h},"PUBLIC")),(0,kt.registerVersion)(Io,"3.4.10",i),(0,kt.registerVersion)(Io,"3.4.10","esm2017")}();class nd{constructor(e){this._delegate=e}static fromBase64String(e){return Bg(),new nd(gu.fromBase64String(e))}static fromUint8Array(e){return qf(),new nd(gu.fromUint8Array(e))}toBase64(){return Bg(),this._delegate.toBase64()}toUint8Array(){return qf(),this._delegate.toUint8Array()}isEqual(e){return this._delegate.isEqual(e._delegate)}toString(){return"Blob(base64: "+this.toBase64()+")"}}function Yf(i){return function xy(i,e){if("object"!=typeof i||null===i)return!1;const t=i;for(const o of e)if(o in t&&"function"==typeof t[o])return!0;return!1}(i,["next","error","complete"])}class Oy{enableIndexedDbPersistence(e,t){return function Ya(i,e){ec(i=Kr(i,gi));const t=Yi(i),o=i._freezeSettings(),u=new Tf;return Xl(t,u,new sg(u,o.cacheSizeBytes,e?.forceOwnership))}(e._delegate,{forceOwnership:t})}enableMultiTabIndexedDbPersistence(e){return function mg(i){ec(i=Kr(i,gi));const e=Yi(i),t=i._freezeSettings(),o=new Tf;return Xl(e,o,new oy(o,t.cacheSizeBytes))}(e._delegate)}clearIndexedDbPersistence(e){return function Hc(i){if(i._initialized&&!i._terminated)throw new D(b.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");const e=new I;return i._queue.enqueueAndForgetEvenWhileRestricted((0,Ee.Z)(function*(){try{yield(t=(0,Ee.Z)(function*(o){if(!Ls.V())return Promise.resolve();const u=o+"main";yield Ls.delete(u)}),function(o){return t.apply(this,arguments)})(gm(i._databaseId,i._persistenceKey)),e.resolve()}catch(t){e.reject(t)}var t})),e.promise}(e._delegate)}}class jg{constructor(e,t,o){this._delegate=t,this._persistenceProvider=o,this.INTERNAL={delete:()=>this.terminate()},e instanceof tt||(this._appCompat=e)}get _databaseId(){return this._delegate._databaseId}settings(e){const t=this._delegate._getSettings();!e.merge&&t.host!==e.host&&vi("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),e.merge&&delete(e=Object.assign(Object.assign({},t),e)).merge,this._delegate._setSettings(e)}useEmulator(e,t,o={}){!function $_(i,e,t,o={}){var u;const h=(i=Kr(i,lh))._getSettings();if("firestore.googleapis.com"!==h.host&&h.host!==e&&vi("Host has been set in both settings() and useEmulator(), emulator host will be used"),i._setSettings(Object.assign(Object.assign({},h),{host:`${e}:${t}`,ssl:!1})),o.mockUserToken){let v,M;if("string"==typeof o.mockUserToken)v=o.mockUserToken,M=hi.MOCK_USER;else{v=(0,xe.Sg)(o.mockUserToken,null===(u=i._app)||void 0===u?void 0:u.options.projectId);const j=o.mockUserToken.sub||o.mockUserToken.user_id;if(!j)throw new D(b.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");M=new hi(j)}i._authCredentials=new re(new k(v,M))}}(this._delegate,e,t,o)}enableNetwork(){return function zc(i){return function hE(i){return i.asyncQueue.enqueue((0,Ee.Z)(function*(){const e=yield ay(i),t=yield U_(i);return e.setNetworkEnabled(!0),function(o){const u=En(o);return u.lu.delete(0),Wd(u)}(t)}))}(Yi(i=Kr(i,gi)))}(this._delegate)}disableNetwork(){return function Kc(i){return function fE(i){return i.asyncQueue.enqueue((0,Ee.Z)(function*(){const e=yield ay(i),t=yield U_(i);return e.setNetworkEnabled(!1),(o=(0,Ee.Z)(function*(u){const h=En(u);h.lu.add(0),yield va(h),h._u.set("Offline")}),function(u){return o.apply(this,arguments)})(t);var o}))}(Yi(i=Kr(i,gi)))}(this._delegate)}enablePersistence(e){let t=!1,o=!1;return e&&(t=!!e.synchronizeTabs,o=!!e.experimentalForceOwningTab,fg("synchronizeTabs",t,"experimentalForceOwningTab",o)),t?this._persistenceProvider.enableMultiTabIndexedDbPersistence(this):this._persistenceProvider.enableIndexedDbPersistence(this,o)}clearPersistence(){return this._persistenceProvider.clearIndexedDbPersistence(this)}terminate(){return this._appCompat&&(this._appCompat._removeServiceInstance("firestore-compat"),this._appCompat._removeServiceInstance("firestore")),this._delegate._delete()}waitForPendingWrites(){return function Gc(i){return function(e){const t=new I;return e.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return function O_(i,e){return qp.apply(this,arguments)}(yield Nf(e),t)})),t.promise}(Yi(i=Kr(i,gi)))}(this._delegate)}onSnapshotsInSync(e){return function tv(i,e){return function pE(i,e){const t=new qa(e);return i.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return o=yield jc(i),u=t,En(o).Tu.add(u),void u.next();var o,u})),()=>{t.Tc(),i.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return o=yield jc(i),u=t,void En(o).Tu.delete(u);var o,u}))}}(Yi(i=Kr(i,gi)),pg(e)?e:{next:e})}(this._delegate,e)}get app(){if(!this._appCompat)throw new D("failed-precondition","Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._appCompat}collection(e){try{return new rd(this,hy(this._delegate,e))}catch(t){throw la(t,"collection()","Firestore.collection()")}}doc(e){try{return new Xa(this,Nu(this._delegate,e))}catch(t){throw la(t,"doc()","Firestore.doc()")}}collectionGroup(e){try{return new ca(this,function Lf(i,e){if(i=Kr(i,lh),kf("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new D(b.INVALID_ARGUMENT,`Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);return new zo(i,null,(t=e,new Ga(dr.emptyPath(),t)));var t}(this._delegate,e))}catch(t){throw la(t,"collectionGroup()","Firestore.collectionGroup()")}}runTransaction(e){return function yh(i,e,t){i=Kr(i,gi);const o=Object.assign(Object.assign({},Xc),t);return function(u){if(u.maxAttempts<1)throw new D(b.INVALID_ARGUMENT,"Max attempts must be at least 1")}(o),function pu(i,e,t){const o=new I;return i.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){const u=yield(h=i,Rf(h).then(v=>v.datastore));var h;new V_(i.asyncQueue,u,t,e,o).run()})),o.promise}(Yi(i),u=>e(new Fg(i,u)),o)}(this._delegate,t=>e(new Ry(this,t)))}batch(){return Yi(this._delegate),new Py(new by(this._delegate,e=>ed(this._delegate,e)))}loadBundle(e){return function Wc(i,e){const t=Yi(i=Kr(i,gi)),o=new gg;return function gE(i,e,t,o){const u=function(h,v){let M;return M="string"==typeof h?(new TextEncoder).encode(h):h,j=function(j,W){if(j instanceof Uint8Array)return og(j,W);if(j instanceof ArrayBuffer)return og(new Uint8Array(j),W);if(j instanceof ReadableStream)return j.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}(M),new Af(j,v);var j}(t,ql(e));i.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){!function F_(i,e,t){const o=En(i);var u;(u=(0,Ee.Z)(function*(h,v,M){try{const j=yield v.getMetadata();if(yield function(vt,jt){const en=En(vt),Mn=hs(jt.createTime);return en.persistence.runTransaction("hasNewerBundle","readonly",Gn=>en.Ds.getBundleMetadata(Gn,jt.id)).then(Gn=>!!Gn&&Gn.createTime.compareTo(Mn)>=0)}(h.localStore,j))return yield v.close(),M._completeWith({taskState:"Success",documentsLoaded:(vt=j).totalDocuments,bytesLoaded:vt.totalBytes,totalDocuments:vt.totalDocuments,totalBytes:vt.totalBytes}),Promise.resolve(new Set);M._updateProgress(Km(j));const W=new Bc(j,h.localStore,v.wt);let de=yield v.fc();for(;de;){const vt=yield W.Nu(de);vt&&M._updateProgress(vt),de=yield v.fc()}const Fe=yield W.complete();return yield Xu(h,Fe.Mu,void 0),yield function(vt,jt){const en=En(vt);return en.persistence.runTransaction("Save bundle","readwrite",Mn=>en.Ds.saveBundleMetadata(Mn,jt))}(h.localStore,j),M._completeWith(Fe.progress),Promise.resolve(Fe.Ou)}catch(j){return vi("SyncEngine",`Loading bundle failed with ${j}`),M._failWith(j),Promise.resolve(new Set)}var vt}),function(h,v,M){return u.apply(this,arguments)})(o,e,t).then(u=>{o.sharedClientState.notifyBundleLoaded(u)})}(yield Nf(i),u,o)}))}(t,i._databaseId,e,o),o}(this._delegate,e)}namedQuery(e){return function Zc(i,e){return function mE(i,e){return i.asyncQueue.enqueue((0,Ee.Z)(function*(){return function(t,o){const u=En(t);return u.persistence.runTransaction("Get named query","readonly",h=>u.Ds.getNamedQuery(h,o))}(yield Pf(i),e)}))}(Yi(i=Kr(i,gi)),e).then(t=>t?new zo(i,null,t.query):null)}(this._delegate,e).then(t=>t?new ca(this,t):null)}}class _h extends Pg{constructor(e){super(),this.firestore=e}convertBytes(e){return new nd(new gu(e))}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return Xa.forKey(t,this.firestore,null)}}class Ry{constructor(e,t){this._firestore=e,this._delegate=t,this._userDataWriter=new _h(e)}get(e){const t=sc(e);return this._delegate.get(t).then(o=>new vh(this._firestore,new Fu(this._firestore._delegate,this._userDataWriter,o._key,o._document,o.metadata,t.converter)))}set(e,t,o){const u=sc(e);return o?(td("Transaction.set",o),this._delegate.set(u,t,o)):this._delegate.set(u,t),this}update(e,t,o,...u){const h=sc(e);return 2===arguments.length?this._delegate.update(h,t):this._delegate.update(h,t,o,...u),this}delete(e){const t=sc(e);return this._delegate.delete(t),this}}class Py{constructor(e){this._delegate=e}set(e,t,o){const u=sc(e);return o?(td("WriteBatch.set",o),this._delegate.set(u,t,o)):this._delegate.set(u,t),this}update(e,t,o,...u){const h=sc(e);return 2===arguments.length?this._delegate.update(h,t):this._delegate.update(h,t,o,...u),this}delete(e){const t=sc(e);return this._delegate.delete(t),this}commit(){return this._delegate.commit()}}class ic{constructor(e,t,o){this._firestore=e,this._userDataWriter=t,this._delegate=o}fromFirestore(e,t){const o=new Qc(this._firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,null);return this._delegate.fromFirestore(new Eh(this._firestore,o),t??{})}toFirestore(e,t){return t?this._delegate.toFirestore(e,t):this._delegate.toFirestore(e)}static getInstance(e,t){const o=ic.INSTANCES;let u=o.get(e);u||(u=new WeakMap,o.set(e,u));let h=u.get(t);return h||(h=new ic(e,new _h(e),t),u.set(t,h)),h}}ic.INSTANCES=new WeakMap;class Xa{constructor(e,t){this.firestore=e,this._delegate=t,this._userDataWriter=new _h(e)}static forPath(e,t,o){if(e.length%2!=0)throw new D("invalid-argument",`Invalid document reference. Document references must have an even number of segments, but ${e.canonicalString()} has ${e.length}`);return new Xa(t,new rs(t._delegate,o,new vn(e)))}static forKey(e,t,o){return new Xa(t,new rs(t._delegate,o,e))}get id(){return this._delegate.id}get parent(){return new rd(this.firestore,this._delegate.parent)}get path(){return this._delegate.path}collection(e){try{return new rd(this.firestore,hy(this._delegate,e))}catch(t){throw la(t,"collection()","DocumentReference.collection()")}}isEqual(e){return(e=(0,xe.m9)(e))instanceof rs&&H_(this._delegate,e)}set(e,t){t=td("DocumentReference.set",t);try{return t?Qa(this._delegate,e,t):Qa(this._delegate,e)}catch(o){throw la(o,"setDoc()","DocumentReference.set()")}}update(e,t,...o){try{return 1===arguments.length?Ja(this._delegate,e):Ja(this._delegate,e,t,...o)}catch(u){throw la(u,"updateDoc()","DocumentReference.update()")}}delete(){return function Dy(i){return ed(Kr(i.firestore,gi),[new Iu(i._key,cs.none())])}(this._delegate)}onSnapshot(...e){const t=Ny(e),o=ky(e,u=>new vh(this.firestore,new Fu(this.firestore._delegate,this._userDataWriter,u._key,u._document,u.metadata,this._delegate.converter)));return Cy(this._delegate,t,o)}get(e){let t;return t="cache"===e?.source?function Ng(i){i=Kr(i,rs);const e=Kr(i.firestore,gi),t=Yi(e),o=new nl(e);return function B_(i,e){const t=new I;return i.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return(o=(0,Ee.Z)(function*(u,h,v){try{const M=yield function(j,W){const de=En(j);return de.persistence.runTransaction("read document","readonly",Fe=>de.localDocuments.getDocument(Fe,W))}(u,h);M.isFoundDocument()?v.resolve(M):M.isNoDocument()?v.resolve(null):v.reject(new D(b.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(M){const j=Ql(M,`Failed to get document '${h} from cache`);v.reject(j)}}),function(u,h,v){return o.apply(this,arguments)})(yield Pf(i),e,t);var o})),t.promise}(t,i._key).then(u=>new Fu(e,o,i._key,u,new rc(null!==u&&u.hasLocalMutations,!0),i.converter))}(this._delegate):"server"===e?.source?function Vu(i){i=Kr(i,rs);const e=Kr(i.firestore,gi);return uy(Yi(e),i._key,{source:"server"}).then(t=>kg(e,i,t))}(this._delegate):function yE(i){i=Kr(i,rs);const e=Kr(i.firestore,gi);return uy(Yi(e),i._key).then(t=>kg(e,i,t))}(this._delegate),t.then(o=>new vh(this.firestore,new Fu(this.firestore._delegate,this._userDataWriter,o._key,o._document,o.metadata,this._delegate.converter)))}withConverter(e){return new Xa(this.firestore,this._delegate.withConverter(e?ic.getInstance(this.firestore,e):null))}}function la(i,e,t){return i.message=i.message.replace(e,t),i}function Ny(i){for(const e of i)if("object"==typeof e&&!Yf(e))return e;return{}}function ky(i,e){var t,o;let u;return u=Yf(i[0])?i[0]:Yf(i[1])?i[1]:"function"==typeof i[0]?{next:i[0],error:i[1],complete:i[2]}:{next:i[1],error:i[2],complete:i[3]},{next:h=>{u.next&&u.next(e(h))},error:null===(t=u.error)||void 0===t?void 0:t.bind(u),complete:null===(o=u.complete)||void 0===o?void 0:o.bind(u)}}class vh{constructor(e,t){this._firestore=e,this._delegate=t}get ref(){return new Xa(this._firestore,this._delegate.ref)}get id(){return this._delegate.id}get metadata(){return this._delegate.metadata}get exists(){return this._delegate.exists()}data(e){return this._delegate.data(e)}get(e,t){return this._delegate.get(e,t)}isEqual(e){return Tg(this._delegate,e._delegate)}}class Eh extends vh{data(e){const t=this._delegate.data(e);return function eu(i,e){i||_n()}(void 0!==t),t}}class ca{constructor(e,t){this.firestore=e,this._delegate=t,this._userDataWriter=new _h(e)}where(e,t,o){try{return new ca(this.firestore,el(this._delegate,function yy(i,e,t){const o=e,u=mh("where",i);return new my(u,o,t)}(e,t,o)))}catch(u){throw la(u,/(orderBy|where)\(\)/,"Query.$1()")}}orderBy(e,t){try{return new ca(this.firestore,el(this._delegate,function vy(i,e="asc"){const t=e,o=mh("orderBy",i);return new _y(o,t)}(e,t)))}catch(o){throw la(o,/(orderBy|where)\(\)/,"Query.$1()")}}limit(e){try{return new ca(this.firestore,el(this._delegate,function Z_(i){return dy("limit",i),new W_("limit",i,"F")}(e)))}catch(t){throw la(t,"limit()","Query.limit()")}}limitToLast(e){try{return new ca(this.firestore,el(this._delegate,function q_(i){return dy("limitToLast",i),new W_("limitToLast",i,"L")}(e)))}catch(t){throw la(t,"limitToLast()","Query.limitToLast()")}}startAt(...e){try{return new ca(this.firestore,el(this._delegate,function Y_(...i){return new Sg("startAt",i,!0)}(...e)))}catch(t){throw la(t,"startAt()","Query.startAt()")}}startAfter(...e){try{return new ca(this.firestore,el(this._delegate,function mo(...i){return new Sg("startAfter",i,!1)}(...e)))}catch(t){throw la(t,"startAfter()","Query.startAfter()")}}endBefore(...e){try{return new ca(this.firestore,el(this._delegate,function Q_(...i){return new Mg("endBefore",i,!1)}(...e)))}catch(t){throw la(t,"endBefore()","Query.endBefore()")}}endAt(...e){try{return new ca(this.firestore,el(this._delegate,function J_(...i){return new Mg("endAt",i,!0)}(...e)))}catch(t){throw la(t,"endAt()","Query.endAt()")}}isEqual(e){return $c(this._delegate,e._delegate)}get(e){let t;return t="cache"===e?.source?function ev(i){i=Kr(i,zo);const e=Kr(i.firestore,gi),t=Yi(e),o=new nl(e);return function ly(i,e){const t=new I;return i.asyncQueue.enqueueAndForget((0,Ee.Z)(function*(){return(o=(0,Ee.Z)(function*(u,h,v){try{const M=yield af(u,h,!0),j=new _f(h,M.ji),W=j.Ku(M.documents),de=j.applyChanges(W,!1);v.resolve(de.snapshot)}catch(M){const j=Ql(M,`Failed to execute query '${h} against cache`);v.reject(j)}}),function(u,h,v){return o.apply(this,arguments)})(yield Pf(i),e,t);var o})),t.promise}(t,i._query).then(u=>new Lu(e,o,i,u))}(this._delegate):"server"===e?.source?function Uu(i){i=Kr(i,zo);const e=Kr(i.firestore,gi),t=Yi(e),o=new nl(e);return dg(t,i._query,{source:"server"}).then(u=>new Lu(e,o,i,u))}(this._delegate):function X_(i){i=Kr(i,zo);const e=Kr(i.firestore,gi),t=Yi(e),o=new nl(e);return Ag(i._query),dg(t,i._query).then(u=>new Lu(e,o,i,u))}(this._delegate),t.then(o=>new $g(this.firestore,new Lu(this.firestore._delegate,this._userDataWriter,this._delegate,o._snapshot)))}onSnapshot(...e){const t=Ny(e),o=ky(e,u=>new $g(this.firestore,new Lu(this.firestore._delegate,this._userDataWriter,this._delegate,u._snapshot)));return Cy(this._delegate,t,o)}withConverter(e){return new ca(this.firestore,this._delegate.withConverter(e?ic.getInstance(this.firestore,e):null))}}class sv{constructor(e,t){this._firestore=e,this._delegate=t}get type(){return this._delegate.type}get doc(){return new Eh(this._firestore,this._delegate.doc)}get oldIndex(){return this._delegate.oldIndex}get newIndex(){return this._delegate.newIndex}}class $g{constructor(e,t){this._firestore=e,this._delegate=t}get query(){return new ca(this._firestore,this._delegate.query)}get metadata(){return this._delegate.metadata}get size(){return this._delegate.size}get empty(){return this._delegate.empty}get docs(){return this._delegate.docs.map(e=>new Eh(this._firestore,e))}docChanges(e){return this._delegate.docChanges(e).map(t=>new sv(this._firestore,t))}forEach(e,t){this._delegate.forEach(o=>{e.call(t,new Eh(this._firestore,o))})}isEqual(e){return Tg(this._delegate,e._delegate)}}class rd extends ca{constructor(e,t){super(e,t),this.firestore=e,this._delegate=t}get id(){return this._delegate.id}get path(){return this._delegate.path}get parent(){const e=this._delegate.parent;return e?new Xa(this.firestore,e):null}doc(e){try{return new Xa(this.firestore,void 0===e?Nu(this._delegate):Nu(this._delegate,e))}catch(t){throw la(t,"doc()","CollectionReference.doc()")}}add(e){return function Iy(i,e){const t=Kr(i.firestore,gi),o=Nu(i),u=Zf(i.converter,e);return ed(t,[fh(tc(i.firestore),"addDoc",o._key,u,null!==i.converter,{}).toMutation(o._key,cs.exists(!1))]).then(()=>o)}(this._delegate,e).then(t=>new Xa(this.firestore,t))}isEqual(e){return H_(this._delegate,e._delegate)}withConverter(e){return new rd(this.firestore,this._delegate.withConverter(e?ic.getInstance(this.firestore,e):null))}}function sc(i){return Kr(i,rs)}class Hg{constructor(...e){this._delegate=new ku(...e)}static documentId(){return new Hg(Wi.keyField().canonicalString())}isEqual(e){return(e=(0,xe.m9)(e))instanceof ku&&this._delegate._internalPath.isEqual(e._internalPath)}}class oc{constructor(e){this._delegate=e}static serverTimestamp(){const e=function Ty(){return new vg("serverTimestamp")}();return e._methodName="FieldValue.serverTimestamp",new oc(e)}static delete(){const e=function nv(){return new nc("deleteField")}();return e._methodName="FieldValue.delete",new oc(e)}static arrayUnion(...e){const t=function rv(...i){return new jf("arrayUnion",i)}(...e);return t._methodName="FieldValue.arrayUnion",new oc(t)}static arrayRemove(...e){const t=function Ay(...i){return new $f("arrayRemove",i)}(...e);return t._methodName="FieldValue.arrayRemove",new oc(t)}static increment(e){const t=function Sy(i){return new Eg("increment",i)}(e);return t._methodName="FieldValue.increment",new oc(t)}isEqual(e){return this._delegate.isEqual(e._delegate)}}const ov={Firestore:jg,GeoPoint:hh,Timestamp:zr,Blob:nd,Transaction:Ry,WriteBatch:Py,DocumentReference:Xa,DocumentSnapshot:vh,Query:ca,QueryDocumentSnapshot:Eh,QuerySnapshot:$g,CollectionReference:rd,FieldPath:Hg,FieldValue:oc,setLogLevel:function iv(i){!function ao(i){Qs.setLogLevel(i)}(i)},CACHE_SIZE_UNLIMITED:-1};!function Ly(i){(function Fy(i,e){i.INTERNAL.registerComponent(new ot.wA("firestore-compat",t=>{const o=t.getProvider("app-compat").getImmediate(),u=t.getProvider("firestore").getImmediate();return e(o,u)},"PUBLIC").setServiceProps(Object.assign({},ov)))})(i,(e,t)=>new jg(e,t,new Oy)),i.registerVersion("@firebase/firestore-compat","0.1.19")}(Qe.Z);var rl=S(3385),Vy=S(440);function Gg(i,e){return function Uy(i,e=g.z){return new K.y(t=>{let o;return null!=e?e.schedule(()=>{o=i.onSnapshot({includeMetadataChanges:!0},t)}):o=i.onSnapshot({includeMetadataChanges:!0},t),()=>{o?.()}})}(i,e)}function Qf(i,e){return Gg(i,e).pipe((0,ce.U)(t=>({payload:t,type:"query"})))}function wh(i,e){return Qf(i,e).pipe((0,ie.O)(void 0),he(),(0,ce.U)(([t,o])=>{const u=o.payload.docChanges(),h=u.map(v=>({type:v.type,payload:v}));return t&&JSON.stringify(t.payload.metadata)!==JSON.stringify(o.payload.metadata)&&o.payload.docs.forEach((v,M)=>{const j=u.find(de=>de.doc.ref.isEqual(v.ref)),W=t?.payload.docs.find(de=>de.ref.isEqual(v.ref));j&&JSON.stringify(j.doc.metadata)===JSON.stringify(v.metadata)||!j&&W&&JSON.stringify(W.metadata)===JSON.stringify(v.metadata)||h.push({type:"modified",payload:{oldIndex:M,newIndex:M,type:"modified",doc:v}})}),h}))}function zg(i,e,t){return wh(i,t).pipe((0,me.R)((o,u)=>function ac(i,e,t){return e.forEach(o=>{t.indexOf(o.type)>-1&&(i=function uv(i,e){switch(e.type){case"added":if(!i[e.newIndex]||!i[e.newIndex].doc.ref.isEqual(e.doc.ref))return Kg(i,e.newIndex,0,e);break;case"modified":if(null==i[e.oldIndex]||i[e.oldIndex].doc.ref.isEqual(e.doc.ref)){if(e.oldIndex!==e.newIndex){const t=i.slice();return t.splice(e.oldIndex,1),t.splice(e.newIndex,0,e),t}return Kg(i,e.newIndex,1,e)}break;case"removed":if(i[e.oldIndex]&&i[e.oldIndex].doc.ref.isEqual(e.doc.ref))return Kg(i,e.oldIndex,1)}return i}(i,o))}),i}(o,u.map(h=>h.payload),e),[]),(0,it.x)(),(0,ce.U)(o=>o.map(u=>({type:u.type,payload:u}))))}function Kg(i,e,t,...o){const u=i.slice();return u.splice(e,t,...o),u}function uc(i){return(!i||0===i.length)&&(i=["added","removed","modified"]),i}S(127);class lv{constructor(e,t,o){this.ref=e,this.query=t,this.afs=o}stateChanges(e){let t=wh(this.query,this.afs.schedulers.outsideAngular);return e&&e.length>0&&(t=t.pipe((0,ce.U)(o=>o.filter(u=>e.indexOf(u.type)>-1)))),t.pipe((0,ie.O)(void 0),he(),(0,Ke.h)(([o,u])=>u.length>0||!o),(0,ce.U)(([o,u])=>u),_e.iC)}auditTrail(e){return this.stateChanges(e).pipe((0,me.R)((t,o)=>[...t,...o],[]))}snapshotChanges(e){const t=uc(e);return zg(this.query,t,this.afs.schedulers.outsideAngular).pipe(_e.iC)}valueChanges(e={}){return Qf(this.query,this.afs.schedulers.outsideAngular).pipe((0,ce.U)(t=>t.payload.docs.map(o=>e.idField?Object.assign(Object.assign({},o.data()),{[e.idField]:o.id}):o.data())),_e.iC)}get(e){return(0,ae.D)(this.query.get(e)).pipe(_e.iC)}add(e){return this.ref.add(e)}doc(e){return new Jf(this.ref.doc(e),this.afs)}}class Jf{constructor(e,t){this.ref=e,this.afs=t}set(e,t){return this.ref.set(e,t)}update(e){return this.ref.update(e)}delete(){return this.ref.delete()}collection(e,t){const o=this.ref.collection(e),{ref:u,query:h}=Hy(o,t);return new lv(u,h,this.afs)}snapshotChanges(){return function By(i,e){return Gg(i,e).pipe((0,ie.O)(void 0),he(),(0,ce.U)(([t,o])=>o.exists?t?.exists?{payload:o,type:"modified"}:{payload:o,type:"added"}:{payload:o,type:"removed"}))}(this.ref,this.afs.schedulers.outsideAngular).pipe(_e.iC)}valueChanges(e={}){return this.snapshotChanges().pipe((0,ce.U)(({payload:t})=>e.idField?Object.assign(Object.assign({},t.data()),{[e.idField]:t.id}):t.data()))}get(e){return(0,ae.D)(this.ref.get(e)).pipe(_e.iC)}}class vE{constructor(e,t){this.query=e,this.afs=t}stateChanges(e){return e&&0!==e.length?wh(this.query,this.afs.schedulers.outsideAngular).pipe((0,ce.U)(t=>t.filter(o=>e.indexOf(o.type)>-1)),(0,Ke.h)(t=>t.length>0),_e.iC):wh(this.query,this.afs.schedulers.outsideAngular).pipe(_e.iC)}auditTrail(e){return this.stateChanges(e).pipe((0,me.R)((t,o)=>[...t,...o],[]))}snapshotChanges(e){const t=uc(e);return zg(this.query,t,this.afs.schedulers.outsideAngular).pipe(_e.iC)}valueChanges(e={}){return Qf(this.query,this.afs.schedulers.outsideAngular).pipe((0,ce.U)(o=>o.payload.docs.map(u=>e.idField?Object.assign({[e.idField]:u.id},u.data()):u.data())),_e.iC)}get(e){return(0,ae.D)(this.query.get(e)).pipe(_e.iC)}}const jy=new m.OlP("angularfire2.enableFirestorePersistence"),$y=new m.OlP("angularfire2.firestore.persistenceSettings"),EE=new m.OlP("angularfire2.firestore.settings"),rr=new m.OlP("angularfire2.firestore.use-emulator");function Hy(i,e=(t=>t)){return{query:e(i),ref:i}}let cv=(()=>{class i{constructor(t,o,u,h,v,M,j,W,de,Fe,vt,jt,en,Mn,Gn,Ci,is){this.schedulers=j;const Ni=(0,Ye.on)(t,M,o),Ss=de;Fe&&(0,rl.nw)(Ni,M,vt,en,Mn,Gn,jt,Ci),[this.firestore,this.persistenceEnabled$]=(0,Ye.cc)(`${Ni.name}.firestore`,"AngularFirestore",Ni.name,()=>{const Qi=M.runOutsideAngular(()=>Ni.firestore());if(h&&Qi.settings(h),Ss&&Qi.useEmulator(...Ss),u&&!(0,ht.PM)(v)){const fs=()=>{try{return(0,ae.D)(Qi.enablePersistence(W||void 0).then(()=>!0,()=>!1))}catch(Vo){return typeof console<"u"&&console.warn(Vo),(0,oe.of)(!1)}};return[Qi,M.runOutsideAngular(fs)]}return[Qi,(0,oe.of)(!1)]},[h,Ss,u])}collection(t,o){let u;u="string"==typeof t?this.firestore.collection(t):t;const{ref:h,query:v}=Hy(u,o),M=this.schedulers.ngZone.run(()=>h);return new lv(M,v,this)}collectionGroup(t,o){const u=o||(v=>v),h=this.firestore.collectionGroup(t);return new vE(u(h),this)}doc(t){let o;o="string"==typeof t?this.firestore.doc(t):t;const u=this.schedulers.ngZone.run(()=>o);return new Jf(u,this)}createId(){return this.firestore.collection("_").doc().id}}return i.\u0275fac=function(t){return new(t||i)(m.LFG(Ye.Dh),m.LFG(Ye.xv,8),m.LFG(jy,8),m.LFG(EE,8),m.LFG(m.Lbi),m.LFG(m.R0b),m.LFG(_e.HU),m.LFG($y,8),m.LFG(rr,8),m.LFG(rl.zQ,8),m.LFG(rl.Qv,8),m.LFG(rl.L6,8),m.LFG(rl._Q,8),m.LFG(rl.rT,8),m.LFG(rl.lh,8),m.LFG(rl.f7,8),m.LFG(Vy.nm,8))},i.\u0275prov=m.Yz7({token:i,factory:i.\u0275fac,providedIn:"any"}),i})()},2011:(Wt,je,S)=>{S.d(je,{Dh:()=>ge,GT:()=>_e,cc:()=>Ke,hO:()=>it,on:()=>ie,pX:()=>oe,xv:()=>he});var m=S(4650),g=S(127),K=S(5813);Wt=S.hmd(Wt);const ae=["ngOnDestroy"],oe=(Qe,Ee,kt,ot={})=>new Proxy(Qe,{get:(Ne,xe)=>kt.runOutsideAngular(()=>{var Nt;if(Qe[xe])return!(null===(Nt=ot?.spy)||void 0===Nt)&&Nt.get&&ot.spy.get(xe,Qe[xe]),Qe[xe];if(ae.indexOf(xe)>-1)return()=>{};const Lt=Ee.toPromise().then(Se=>{const Ie=Se&&Se[xe];return"function"==typeof Ie?Ie.bind(Se):Ie&&Ie.then?Ie.then(Ce=>kt.run(()=>Ce)):kt.run(()=>Ie)});return new Proxy(()=>{},{get:(Se,Ie)=>Lt[Ie],apply:(Se,Ie,Ce)=>Lt.then(et=>{var lt;const at=et&&et(...Ce);return!(null===(lt=ot?.spy)||void 0===lt)&<.apply&&ot.spy.apply(xe,Ce,at),at})})})}),_e=(Qe,Ee)=>{Ee.forEach(kt=>{Object.getOwnPropertyNames(kt.prototype||kt).forEach(ot=>{Object.defineProperty(Qe.prototype,ot,Object.getOwnPropertyDescriptor(kt.prototype||kt,ot))})})};class fe{constructor(Ee){return Ee}}const ge=new m.OlP("angularfire2.app.options"),he=new m.OlP("angularfire2.app.name");function ie(Qe,Ee,kt){const Ne="object"==typeof kt&&kt||{};Ne.name=Ne.name||"string"==typeof kt&&kt||"[DEFAULT]";const Nt=g.Z.apps.filter(Lt=>Lt&&Lt.name===Ne.name)[0]||Ee.runOutsideAngular(()=>g.Z.initializeApp(Qe,Ne));try{JSON.stringify(Qe)!==JSON.stringify(Nt.options)&&ce("error",`${Nt.name} Firebase App already initialized with different options${Wt.hot?", you may need to reload as Firebase is not HMR aware.":"."}`)}catch{}return new fe(Nt)}const ce=(Qe,...Ee)=>{(0,m.X6Q)()&&typeof console<"u"&&console[Qe](...Ee)},me={provide:fe,useFactory:ie,deps:[ge,m.R0b,[new m.FiY,he]]};let it=(()=>{class Qe{constructor(kt){g.Z.registerVersion("angularfire",K.q4.full,"core"),g.Z.registerVersion("angularfire",K.q4.full,"app-compat"),g.Z.registerVersion("angular",m.q4F.full,kt.toString())}static initializeApp(kt,ot){return{ngModule:Qe,providers:[{provide:ge,useValue:kt},{provide:he,useValue:ot}]}}}return Qe.\u0275fac=function(kt){return new(kt||Qe)(m.LFG(m.Lbi))},Qe.\u0275mod=m.oAB({type:Qe}),Qe.\u0275inj=m.cJS({providers:[me]}),Qe})();function Ke(Qe,Ee,kt,ot,Ne){const[,xe,Nt]=globalThis.\u0275AngularfireInstanceCache.find(Lt=>Lt[0]===Qe)||[];if(xe)return function Ye(Qe,Ee){try{return Qe.toString()===Ee.toString()}catch{return Qe===Ee}}(Ne,Nt)||(Ze("error",`${Ee} was already initialized on the ${kt} Firebase App with different settings.${ht?" You may need to reload as Firebase is not HMR aware.":""}`),Ze("warn",{is:Ne,was:Nt})),xe;{const Lt=ot();return globalThis.\u0275AngularfireInstanceCache.push([Qe,Lt,Ne]),Lt}}const ht=!!Wt.hot,Ze=(Qe,...Ee)=>{(0,m.X6Q)()&&typeof console<"u"&&console[Qe](...Ee)};globalThis.\u0275AngularfireInstanceCache||(globalThis.\u0275AngularfireInstanceCache=[])},5813:(Wt,je,S)=>{S.d(je,{q4:()=>Ls,iC:()=>Te,fc:()=>ne,HU:()=>y,vb:()=>ts,JM:()=>ju});var m=S(4650),g=S(5867),K=S(5861),ae=S(9681),oe=S(2090),_e=S(4859),fe=S(1877),ge=S(8766);const he="@firebase/installations",ie="0.5.10",me=`w:${ie}`,it="FIS_v2",Ee=new oe.LL("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function kt(x){return x instanceof oe.ZR&&x.code.includes("request-failed")}function ot({projectId:x}){return`https://firebaseinstallations.googleapis.com/v1/projects/${x}/installations`}function Ne(x){return{token:x.token,requestStatus:2,expiresIn:et(x.expiresIn),creationTime:Date.now()}}function xe(x,F){return Nt.apply(this,arguments)}function Nt(){return(Nt=(0,K.Z)(function*(x,F){const ue=(yield F.json()).error;return Ee.create("request-failed",{requestName:x,serverCode:ue.code,serverMessage:ue.message,serverStatus:ue.status})})).apply(this,arguments)}function Lt({apiKey:x}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":x})}function Se(x,{refreshToken:F}){const Y=Lt(x);return Y.append("Authorization",function lt(x){return`${it} ${x}`}(F)),Y}function Ie(x){return Ce.apply(this,arguments)}function Ce(){return(Ce=(0,K.Z)(function*(x){const F=yield x();return F.status>=500&&F.status<600?x():F})).apply(this,arguments)}function et(x){return Number(x.replace("s","000"))}function at(x,F){return Je.apply(this,arguments)}function Je(){return(Je=(0,K.Z)(function*({appConfig:x,heartbeatServiceProvider:F},{fid:Y}){const ue=ot(x),ke=Lt(x),tt=F.getImmediate({optional:!0});if(tt){const kn=yield tt.getHeartbeatsHeader();kn&&ke.append("x-firebase-client",kn)}const an={method:"POST",headers:ke,body:JSON.stringify({fid:Y,authVersion:it,appId:x.appId,sdkVersion:me})},Sn=yield Ie(()=>fetch(ue,an));if(Sn.ok){const kn=yield Sn.json();return{fid:kn.fid||Y,registrationStatus:2,refreshToken:kn.refreshToken,authToken:Ne(kn.authToken)}}throw yield xe("Create Installation",Sn)})).apply(this,arguments)}function pn(x){return new Promise(F=>{setTimeout(F,x)})}const St=/^[cdef][\w-]{21}$/;function pe(){try{const x=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(x),x[0]=112+x[0]%16;const Y=function ft(x){return function Tn(x){return btoa(String.fromCharCode(...x)).replace(/\+/g,"-").replace(/\//g,"_")}(x).substr(0,22)}(x);return St.test(Y)?Y:""}catch{return""}}function Et(x){return`${x.appName}!${x.appId}`}const sn=new Map;function It(x,F){const Y=Et(x);ut(Y,F),function Kt(x,F){const Y=function Zt(){return!Ht&&"BroadcastChannel"in self&&(Ht=new BroadcastChannel("[Firebase] FID Change"),Ht.onmessage=x=>{ut(x.data.key,x.data.fid)}),Ht}();Y&&Y.postMessage({key:x,fid:F}),function wn(){0===sn.size&&Ht&&(Ht.close(),Ht=null)}()}(Y,F)}function ut(x,F){const Y=sn.get(x);if(Y)for(const ue of Y)ue(F)}let Ht=null;const bt="firebase-installations-store";let Un=null;function ln(){return Un||(Un=(0,ge.X3)("firebase-installations-database",1,{upgrade:(x,F)=>{0===F&&x.createObjectStore(bt)}})),Un}function yr(x,F){return Yn.apply(this,arguments)}function Yn(){return(Yn=(0,K.Z)(function*(x,F){const Y=Et(x),ke=(yield ln()).transaction(bt,"readwrite"),tt=ke.objectStore(bt),Ot=yield tt.get(Y);return yield tt.put(F,Y),yield ke.done,(!Ot||Ot.fid!==F.fid)&&It(x,F.fid),F})).apply(this,arguments)}function gn(x){return Ti.apply(this,arguments)}function Ti(){return(Ti=(0,K.Z)(function*(x){const F=Et(x),ue=(yield ln()).transaction(bt,"readwrite");yield ue.objectStore(bt).delete(F),yield ue.done})).apply(this,arguments)}function Dr(x,F){return Or.apply(this,arguments)}function Or(){return(Or=(0,K.Z)(function*(x,F){const Y=Et(x),ke=(yield ln()).transaction(bt,"readwrite"),tt=ke.objectStore(bt),Ot=yield tt.get(Y),an=F(Ot);return void 0===an?yield tt.delete(Y):yield tt.put(an,Y),yield ke.done,an&&(!Ot||Ot.fid!==an.fid)&&It(x,an.fid),an})).apply(this,arguments)}function Ct(x){return Be.apply(this,arguments)}function Be(){return(Be=(0,K.Z)(function*(x){let F;const Y=yield Dr(x.appConfig,ue=>{const ke=Ge(ue),tt=xt(x,ke);return F=tt.registrationPromise,tt.installationEntry});return""===Y.fid?{installationEntry:yield F}:{installationEntry:Y,registrationPromise:F}})).apply(this,arguments)}function Ge(x){return mn(x||{fid:pe(),registrationStatus:0})}function xt(x,F){if(0===F.registrationStatus){if(!navigator.onLine)return{installationEntry:F,registrationPromise:Promise.reject(Ee.create("app-offline"))};const Y={fid:F.fid,registrationStatus:1,registrationTime:Date.now()},ue=function Xe(x,F){return qt.apply(this,arguments)}(x,Y);return{installationEntry:Y,registrationPromise:ue}}return 1===F.registrationStatus?{installationEntry:F,registrationPromise:nr(x)}:{installationEntry:F}}function qt(){return(qt=(0,K.Z)(function*(x,F){try{const Y=yield at(x,F);return yr(x.appConfig,Y)}catch(Y){throw kt(Y)&&409===Y.customData.serverCode?yield gn(x.appConfig):yield yr(x.appConfig,{fid:F.fid,registrationStatus:0}),Y}})).apply(this,arguments)}function nr(x){return Kn.apply(this,arguments)}function Kn(){return(Kn=(0,K.Z)(function*(x){let F=yield Ut(x.appConfig);for(;1===F.registrationStatus;)yield pn(100),F=yield Ut(x.appConfig);if(0===F.registrationStatus){const{installationEntry:Y,registrationPromise:ue}=yield Ct(x);return ue||Y}return F})).apply(this,arguments)}function Ut(x){return Dr(x,F=>{if(!F)throw Ee.create("installation-not-found");return mn(F)})}function mn(x){return function Xn(x){return 1===x.registrationStatus&&x.registrationTime+1e4fetch(ue,an));if(Sn.ok)return Ne(yield Sn.json());throw yield xe("Generate Auth Token",Sn)})).apply(this,arguments)}function we(x,{fid:F}){return`${ot(x)}/${F}/authTokens:generate`}function Ae(x){return Tt.apply(this,arguments)}function Tt(){return(Tt=(0,K.Z)(function*(x,F=!1){let Y;const ue=yield Dr(x.appConfig,tt=>{if(!hn(tt))throw Ee.create("not-registered");const Ot=tt.authToken;if(!F&&fn(Ot))return tt;if(1===Ot.requestStatus)return Y=se(x,F),tt;{if(!navigator.onLine)throw Ee.create("app-offline");const an=Pr(tt);return Y=rt(x,an),an}});return Y?yield Y:ue.authToken})).apply(this,arguments)}function se(x,F){return J.apply(this,arguments)}function J(){return(J=(0,K.Z)(function*(x,F){let Y=yield le(x.appConfig);for(;1===Y.authToken.requestStatus;)yield pn(100),Y=yield le(x.appConfig);const ue=Y.authToken;return 0===ue.requestStatus?Ae(x,F):ue})).apply(this,arguments)}function le(x){return Dr(x,F=>{if(!hn(F))throw Ee.create("not-registered");return function Nr(x){return 1===x.requestStatus&&x.requestTime+1e4{const F=x.getProvider("app").getImmediate(),Y=function qn(x){if(!x||!x.options)throw _r("App Configuration");if(!x.name)throw _r("App Name");const F=["projectId","apiKey","appId"];for(const Y of F)if(!x.options[Y])throw _r(Y);return{appName:x.name,projectId:x.options.projectId,apiKey:x.options.apiKey,appId:x.options.appId}}(F);return{app:F,appConfig:Y,heartbeatServiceProvider:(0,ae._getProvider)(F,"heartbeat"),_delete:()=>Promise.resolve()}},ki=x=>{const F=x.getProvider("app").getImmediate(),Y=(0,ae._getProvider)(F,yn).getImmediate();return{getId:()=>function jn(x){return kr.apply(this,arguments)}(Y),getToken:ke=>function jr(x){return Fr.apply(this,arguments)}(Y,ke)}};(function wi(){(0,ae._registerComponent)(new _e.wA(yn,Ji,"PUBLIC")),(0,ae._registerComponent)(new _e.wA("installations-internal",ki,"PRIVATE"))})(),(0,ae.registerVersion)(he,ie),(0,ae.registerVersion)(he,ie,"esm2017");const Vr="@firebase/remote-config",Ur=new oe.LL("remoteconfig","Remote Config",{"registration-window":"Undefined window object. This SDK only supports usage in a browser environment.","registration-project-id":"Undefined project identifier. Check Firebase app initialization.","registration-api-key":"Undefined API key. Check Firebase app initialization.","registration-app-id":"Undefined app identifier. Check Firebase app initialization.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","storage-delete":"Error thrown when deleting from storage. Original error: {$originalErrorMessage}.","fetch-client-network":"Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-timeout":'The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',"fetch-throttle":'The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',"fetch-client-parse":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","indexed-db-unavailable":"Indexed DB is not supported by current browser"});class Pi{constructor(F,Y,ue,ke){this.client=F,this.storage=Y,this.storageCache=ue,this.logger=ke}isCachedDataFresh(F,Y){if(!Y)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;const ue=Date.now()-Y,ke=ue<=F;return this.logger.debug(`Config fetch cache check. Cache age millis: ${ue}. Cache max age millis (minimumFetchIntervalMillis setting): ${F}. Is cache hit: ${ke}.`),ke}fetch(F){var Y=this;return(0,K.Z)(function*(){const[ue,ke]=yield Promise.all([Y.storage.getLastSuccessfulFetchTimestampMillis(),Y.storage.getLastSuccessfulFetchResponse()]);if(ke&&Y.isCachedDataFresh(F.cacheMaxAgeMillis,ue))return ke;F.eTag=ke&&ke.eTag;const tt=yield Y.client.fetch(F),Ot=[Y.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())];return 200===tt.status&&Ot.push(Y.storage.setLastSuccessfulFetchResponse(tt)),yield Promise.all(Ot),tt})()}}function yo(x=navigator){return x.languages&&x.languages[0]||x.language}class Bs{constructor(F,Y,ue,ke,tt,Ot){this.firebaseInstallations=F,this.sdkVersion=Y,this.namespace=ue,this.projectId=ke,this.apiKey=tt,this.appId=Ot}fetch(F){var Y=this;return(0,K.Z)(function*(){var ue,ke,tt;const[Ot,an]=yield Promise.all([Y.firebaseInstallations.getId(),Y.firebaseInstallations.getToken()]),kn=`${window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com"}/v1/projects/${Y.projectId}/namespaces/${Y.namespace}:fetch?key=${Y.apiKey}`,Vn={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":F.eTag||"*"},xn={sdk_version:Y.sdkVersion,app_instance_id:Ot,app_instance_id_token:an,app_id:Y.appId,language_code:yo()},mr={method:"POST",headers:Vn,body:JSON.stringify(xn)},fi=fetch(kn,mr),Ii=new Promise((lo,bn)=>{F.signal.addEventListener(()=>{const Hn=new Error("The operation was aborted.");Hn.name="AbortError",bn(Hn)})});let Xs;try{yield Promise.race([fi,Ii]),Xs=yield fi}catch(lo){let bn="fetch-client-network";throw"AbortError"===(null===(ue=lo)||void 0===ue?void 0:ue.name)&&(bn="fetch-timeout"),Ur.create(bn,{originalErrorMessage:null===(ke=lo)||void 0===ke?void 0:ke.message})}let eo=Xs.status;const ia=Xs.headers.get("ETag")||void 0;let ls,Vs;if(200===Xs.status){let lo;try{lo=yield Xs.json()}catch(bn){throw Ur.create("fetch-client-parse",{originalErrorMessage:null===(tt=bn)||void 0===tt?void 0:tt.message})}ls=lo.entries,Vs=lo.state}if("INSTANCE_STATE_UNSPECIFIED"===Vs?eo=500:"NO_CHANGE"===Vs?eo=304:("NO_TEMPLATE"===Vs||"EMPTY_CONFIG"===Vs)&&(ls={}),304!==eo&&200!==eo)throw Ur.create("fetch-status",{httpStatus:eo});return{status:eo,eTag:ia,config:ls}})()}}class qe{constructor(F,Y){this.client=F,this.storage=Y}fetch(F){var Y=this;return(0,K.Z)(function*(){const ue=(yield Y.storage.getThrottleMetadata())||{backoffCount:0,throttleEndTimeMillis:Date.now()};return Y.attemptFetch(F,ue)})()}attemptFetch(F,{throttleEndTimeMillis:Y,backoffCount:ue}){var ke=this;return(0,K.Z)(function*(){yield function ji(x,F){return new Promise((Y,ue)=>{const ke=Math.max(F-Date.now(),0),tt=setTimeout(Y,ke);x.addEventListener(()=>{clearTimeout(tt),ue(Ur.create("fetch-throttle",{throttleEndTimeMillis:F}))})})}(F.signal,Y);try{const tt=yield ke.client.fetch(F);return yield ke.storage.deleteThrottleMetadata(),tt}catch(tt){if(!function Ui(x){if(!(x instanceof oe.ZR&&x.customData))return!1;const F=Number(x.customData.httpStatus);return 429===F||500===F||503===F||504===F}(tt))throw tt;const Ot={throttleEndTimeMillis:Date.now()+(0,oe.$s)(ue),backoffCount:ue+1};return yield ke.storage.setThrottleMetadata(Ot),ke.attemptFetch(F,Ot)}})()}}class Rt{constructor(F,Y,ue,ke,tt){this.app=F,this._client=Y,this._storageCache=ue,this._storage=ke,this._logger=tt,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}get fetchTimeMillis(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1}get lastFetchStatus(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"}}function tn(x,F){var Y;const ue=x.target.error||void 0;return Ur.create(F,{originalErrorMessage:ue&&(null===(Y=ue)||void 0===Y?void 0:Y.message)})}const cn="app_namespace_store";class Cr{constructor(F,Y,ue,ke=function Wn(){return new Promise((x,F)=>{var Y;try{const ue=indexedDB.open("firebase_remote_config",1);ue.onerror=ke=>{F(tn(ke,"storage-open"))},ue.onsuccess=ke=>{x(ke.target.result)},ue.onupgradeneeded=ke=>{0===ke.oldVersion&&ke.target.result.createObjectStore(cn,{keyPath:"compositeKey"})}}catch(ue){F(Ur.create("storage-open",{originalErrorMessage:null===(Y=ue)||void 0===Y?void 0:Y.message}))}})}()){this.appId=F,this.appName=Y,this.namespace=ue,this.openDbPromise=ke}getLastFetchStatus(){return this.get("last_fetch_status")}setLastFetchStatus(F){return this.set("last_fetch_status",F)}getLastSuccessfulFetchTimestampMillis(){return this.get("last_successful_fetch_timestamp_millis")}setLastSuccessfulFetchTimestampMillis(F){return this.set("last_successful_fetch_timestamp_millis",F)}getLastSuccessfulFetchResponse(){return this.get("last_successful_fetch_response")}setLastSuccessfulFetchResponse(F){return this.set("last_successful_fetch_response",F)}getActiveConfig(){return this.get("active_config")}setActiveConfig(F){return this.set("active_config",F)}getActiveConfigEtag(){return this.get("active_config_etag")}setActiveConfigEtag(F){return this.set("active_config_etag",F)}getThrottleMetadata(){return this.get("throttle_metadata")}setThrottleMetadata(F){return this.set("throttle_metadata",F)}deleteThrottleMetadata(){return this.delete("throttle_metadata")}get(F){var Y=this;return(0,K.Z)(function*(){const ue=yield Y.openDbPromise;return new Promise((ke,tt)=>{var Ot;const Sn=ue.transaction([cn],"readonly").objectStore(cn),kn=Y.createCompositeKey(F);try{const Vn=Sn.get(kn);Vn.onerror=xn=>{tt(tn(xn,"storage-get"))},Vn.onsuccess=xn=>{const mr=xn.target.result;ke(mr?mr.value:void 0)}}catch(Vn){tt(Ur.create("storage-get",{originalErrorMessage:null===(Ot=Vn)||void 0===Ot?void 0:Ot.message}))}})})()}set(F,Y){var ue=this;return(0,K.Z)(function*(){const ke=yield ue.openDbPromise;return new Promise((tt,Ot)=>{var an;const kn=ke.transaction([cn],"readwrite").objectStore(cn),Vn=ue.createCompositeKey(F);try{const xn=kn.put({compositeKey:Vn,value:Y});xn.onerror=mr=>{Ot(tn(mr,"storage-set"))},xn.onsuccess=()=>{tt()}}catch(xn){Ot(Ur.create("storage-set",{originalErrorMessage:null===(an=xn)||void 0===an?void 0:an.message}))}})})()}delete(F){var Y=this;return(0,K.Z)(function*(){const ue=yield Y.openDbPromise;return new Promise((ke,tt)=>{var Ot;const Sn=ue.transaction([cn],"readwrite").objectStore(cn),kn=Y.createCompositeKey(F);try{const Vn=Sn.delete(kn);Vn.onerror=xn=>{tt(tn(xn,"storage-delete"))},Vn.onsuccess=()=>{ke()}}catch(Vn){tt(Ur.create("storage-delete",{originalErrorMessage:null===(Ot=Vn)||void 0===Ot?void 0:Ot.message}))}})})()}createCompositeKey(F){return[this.appId,this.appName,this.namespace,F].join()}}class $i{constructor(F){this.storage=F}getLastFetchStatus(){return this.lastFetchStatus}getLastSuccessfulFetchTimestampMillis(){return this.lastSuccessfulFetchTimestampMillis}getActiveConfig(){return this.activeConfig}loadFromStorage(){var F=this;return(0,K.Z)(function*(){const Y=F.storage.getLastFetchStatus(),ue=F.storage.getLastSuccessfulFetchTimestampMillis(),ke=F.storage.getActiveConfig(),tt=yield Y;tt&&(F.lastFetchStatus=tt);const Ot=yield ue;Ot&&(F.lastSuccessfulFetchTimestampMillis=Ot);const an=yield ke;an&&(F.activeConfig=an)})()}setLastFetchStatus(F){return this.lastFetchStatus=F,this.storage.setLastFetchStatus(F)}setLastSuccessfulFetchTimestampMillis(F){return this.lastSuccessfulFetchTimestampMillis=F,this.storage.setLastSuccessfulFetchTimestampMillis(F)}setActiveConfig(F){return this.activeConfig=F,this.storage.setActiveConfig(F)}}function ro(){return Xi.apply(this,arguments)}function Xi(){return(Xi=(0,K.Z)(function*(){if(!(0,oe.hl)())return!1;try{return yield(0,oe.eu)()}catch{return!1}})).apply(this,arguments)}!function Hi(){(0,ae._registerComponent)(new _e.wA("remote-config",function x(F,{instanceIdentifier:Y}){const ue=F.getProvider("app").getImmediate(),ke=F.getProvider("installations-internal").getImmediate();if(typeof window>"u")throw Ur.create("registration-window");if(!(0,oe.hl)())throw Ur.create("indexed-db-unavailable");const{projectId:tt,apiKey:Ot,appId:an}=ue.options;if(!tt)throw Ur.create("registration-project-id");if(!Ot)throw Ur.create("registration-api-key");if(!an)throw Ur.create("registration-app-id");const Sn=new Cr(an,ue.name,Y=Y||"firebase"),kn=new $i(Sn),Vn=new fe.Yd(Vr);Vn.logLevel=fe.in.ERROR;const xn=new Bs(ke,ae.SDK_VERSION,Y,tt,Ot,an),mr=new qe(xn,Sn),fi=new Pi(mr,Sn,kn,Vn),Ii=new Rt(ue,fi,kn,Sn,Vn);return function ys(x){const F=(0,oe.m9)(x);F._initializePromise||(F._initializePromise=F._storageCache.loadFromStorage().then(()=>{F._isInitializationComplete=!0}))}(Ii),Ii},"PUBLIC").setMultipleInstances(!0)),(0,ae.registerVersion)(Vr,"0.3.9"),(0,ae.registerVersion)(Vr,"0.3.9","esm2017")}();const Gi="/firebase-messaging-sw.js",Es="/firebase-cloud-messaging-push-scope",io="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",qs="google.c.a.c_id",Rs="google.c.a.c_l",ws="google.c.a.ts",Ps="google.c.a.e";var ks=(()=>{return(x=ks||(ks={})).PUSH_RECEIVED="push-received",x.NOTIFICATION_CLICKED="notification-clicked",ks;var x})();function lr(x){const F=new Uint8Array(x);return btoa(String.fromCharCode(...F)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function ui(x){const Y=(x+"=".repeat((4-x.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),ue=atob(Y),ke=new Uint8Array(ue.length);for(let tt=0;tttt.name).includes(zi))return null;let F=null;return(yield(0,ge.X3)(zi,5,{upgrade:(ue=(0,K.Z)(function*(ke,tt,Ot,an){var Sn;if(tt<2||!ke.objectStoreNames.contains(Ki))return;const kn=an.objectStore(Ki),Vn=yield kn.index("fcmSenderId").get(x);if(yield kn.clear(),Vn)if(2===tt){const xn=Vn;if(!xn.auth||!xn.p256dh||!xn.endpoint)return;F={token:xn.fcmToken,createTime:null!==(Sn=xn.createTime)&&void 0!==Sn?Sn:Date.now(),subscriptionOptions:{auth:xn.auth,p256dh:xn.p256dh,endpoint:xn.endpoint,swScope:xn.swScope,vapidKey:"string"==typeof xn.vapidKey?xn.vapidKey:lr(xn.vapidKey)}}}else if(3===tt){const xn=Vn;F={token:xn.fcmToken,createTime:xn.createTime,subscriptionOptions:{auth:lr(xn.auth),p256dh:lr(xn.p256dh),endpoint:xn.endpoint,swScope:xn.swScope,vapidKey:lr(xn.vapidKey)}}}else if(4===tt){const xn=Vn;F={token:xn.fcmToken,createTime:xn.createTime,subscriptionOptions:{auth:lr(xn.auth),p256dh:lr(xn.p256dh),endpoint:xn.endpoint,swScope:xn.swScope,vapidKey:lr(xn.vapidKey)}}}}),function(tt,Ot,an,Sn){return ue.apply(this,arguments)})})).close(),yield(0,ge.Lj)(zi),yield(0,ge.Lj)("fcm_vapid_details_db"),yield(0,ge.Lj)("undefined"),Uo(F)?F:null;var ue}),Qr.apply(this,arguments)}function Uo(x){if(!x||!x.subscriptionOptions)return!1;const{subscriptionOptions:F}=x;return"number"==typeof x.createTime&&x.createTime>0&&"string"==typeof x.token&&x.token.length>0&&"string"==typeof F.auth&&F.auth.length>0&&"string"==typeof F.p256dh&&F.p256dh.length>0&&"string"==typeof F.endpoint&&F.endpoint.length>0&&"string"==typeof F.swScope&&F.swScope.length>0&&"string"==typeof F.vapidKey&&F.vapidKey.length>0}const ir="firebase-messaging-store";let xi=null;function es(){return xi||(xi=(0,ge.X3)("firebase-messaging-database",1,{upgrade:(x,F)=>{0===F&&x.createObjectStore(ir)}})),xi}function sr(x){return L.apply(this,arguments)}function L(){return(L=(0,K.Z)(function*(x){const F=At(x),ue=yield(yield es()).transaction(ir).objectStore(ir).get(F);if(ue)return ue;{const ke=yield vo(x.appConfig.senderId);if(ke)return yield ee(x,ke),ke}})).apply(this,arguments)}function ee(x,F){return V.apply(this,arguments)}function V(){return(V=(0,K.Z)(function*(x,F){const Y=At(x),ke=(yield es()).transaction(ir,"readwrite");return yield ke.objectStore(ir).put(F,Y),yield ke.done,F})).apply(this,arguments)}function Q(x){return Ve.apply(this,arguments)}function Ve(){return(Ve=(0,K.Z)(function*(x){const F=At(x),ue=(yield es()).transaction(ir,"readwrite");yield ue.objectStore(ir).delete(F),yield ue.done})).apply(this,arguments)}function At({appConfig:x}){return x.appId}const Jt=new oe.LL("messaging","Messaging",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invalid-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."});function cr(x,F){return gr.apply(this,arguments)}function gr(){return(gr=(0,K.Z)(function*(x,F){const Y=yield $r(x),ue=as(F),ke={method:"POST",headers:Y,body:JSON.stringify(ue)};let tt;try{tt=yield(yield fetch(Dn(x.appConfig),ke)).json()}catch(Ot){throw Jt.create("token-subscribe-failed",{errorInfo:Ot})}if(tt.error)throw Jt.create("token-subscribe-failed",{errorInfo:tt.error.message});if(!tt.token)throw Jt.create("token-subscribe-no-token");return tt.token})).apply(this,arguments)}function Tr(x,F){return Zn.apply(this,arguments)}function Zn(){return(Zn=(0,K.Z)(function*(x,F){const Y=yield $r(x),ue=as(F.subscriptionOptions),ke={method:"PATCH",headers:Y,body:JSON.stringify(ue)};let tt;try{tt=yield(yield fetch(`${Dn(x.appConfig)}/${F.token}`,ke)).json()}catch(Ot){throw Jt.create("token-update-failed",{errorInfo:Ot})}if(tt.error)throw Jt.create("token-update-failed",{errorInfo:tt.error.message});if(!tt.token)throw Jt.create("token-update-no-token");return tt.token})).apply(this,arguments)}function Lr(x,F){return or.apply(this,arguments)}function or(){return(or=(0,K.Z)(function*(x,F){const ue={method:"DELETE",headers:yield $r(x)};try{const tt=yield(yield fetch(`${Dn(x.appConfig)}/${F}`,ue)).json();if(tt.error)throw Jt.create("token-unsubscribe-failed",{errorInfo:tt.error.message})}catch(ke){throw Jt.create("token-unsubscribe-failed",{errorInfo:ke})}})).apply(this,arguments)}function Dn({projectId:x}){return`https://fcmregistrations.googleapis.com/v1/projects/${x}/registrations`}function $r(x){return li.apply(this,arguments)}function li(){return(li=(0,K.Z)(function*({appConfig:x,installations:F}){const Y=yield F.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":x.apiKey,"x-goog-firebase-installations-auth":`FIS ${Y}`})})).apply(this,arguments)}function as({p256dh:x,auth:F,endpoint:Y,vapidKey:ue}){const ke={web:{endpoint:Y,auth:F,p256dh:x}};return ue!==io&&(ke.web.applicationPubKey=ue),ke}const bs=6048e5;function Si(x){return Oi.apply(this,arguments)}function Oi(){return(Oi=(0,K.Z)(function*(x){const F=yield un(x.swRegistration,x.vapidKey),Y={vapidKey:x.vapidKey,swScope:x.swRegistration.scope,endpoint:F.endpoint,auth:lr(F.getKey("auth")),p256dh:lr(F.getKey("p256dh"))},ue=yield sr(x.firebaseDependencies);if(ue){if(ci(ue.subscriptionOptions,Y))return Date.now()>=ue.createTime+bs?O(x,{token:ue.token,createTime:Date.now(),subscriptionOptions:Y}):ue.token;try{yield Lr(x.firebaseDependencies,ue.token)}catch(ke){console.warn(ke)}return X(x.firebaseDependencies,Y)}return X(x.firebaseDependencies,Y)})).apply(this,arguments)}function so(x){return U.apply(this,arguments)}function U(){return(U=(0,K.Z)(function*(x){const F=yield sr(x.firebaseDependencies);F&&(yield Lr(x.firebaseDependencies,F.token),yield Q(x.firebaseDependencies));const Y=yield x.swRegistration.pushManager.getSubscription();return!Y||Y.unsubscribe()})).apply(this,arguments)}function O(x,F){return P.apply(this,arguments)}function P(){return(P=(0,K.Z)(function*(x,F){try{const Y=yield Tr(x.firebaseDependencies,F),ue=Object.assign(Object.assign({},F),{token:Y,createTime:Date.now()});return yield ee(x.firebaseDependencies,ue),Y}catch(Y){throw yield so(x),Y}})).apply(this,arguments)}function X(x,F){return gt.apply(this,arguments)}function gt(){return(gt=(0,K.Z)(function*(x,F){const ue={token:yield cr(x,F),createTime:Date.now(),subscriptionOptions:F};return yield ee(x,ue),ue.token})).apply(this,arguments)}function un(x,F){return Br.apply(this,arguments)}function Br(){return(Br=(0,K.Z)(function*(x,F){return(yield x.pushManager.getSubscription())||x.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:ui(F)})})).apply(this,arguments)}function ci(x,F){return F.vapidKey===x.vapidKey&&F.endpoint===x.endpoint&&F.auth===x.auth&&F.p256dh===x.p256dh}function ri(x){const F={from:x.from,collapseKey:x.collapse_key,messageId:x.fcmMessageId};return function js(x,F){if(!F.notification)return;x.notification={};const Y=F.notification.title;Y&&(x.notification.title=Y);const ue=F.notification.body;ue&&(x.notification.body=ue);const ke=F.notification.image;ke&&(x.notification.image=ke)}(F,x),function Ko(x,F){!F.data||(x.data=F.data)}(F,x),function Dt(x,F){var Y,ue,ke,tt,Ot;if(!(F.fcmOptions||null!==(Y=F.notification)&&void 0!==Y&&Y.click_action))return;x.fcmOptions={};const an=null!==(ke=null===(ue=F.fcmOptions)||void 0===ue?void 0:ue.link)&&void 0!==ke?ke:null===(tt=F.notification)||void 0===tt?void 0:tt.click_action;an&&(x.fcmOptions.link=an);const Sn=null===(Ot=F.fcmOptions)||void 0===Ot?void 0:Ot.analytics_label;Sn&&(x.fcmOptions.analyticsLabel=Sn)}(F,x),F}function ze(x){return"object"==typeof x&&!!x&&qs in x}function Oe(x,F){const Y=[];for(let ue=0;ue{})}catch(Y){throw Jt.create("failed-service-worker-registration",{browserErrorMessage:null===(F=Y)||void 0===F?void 0:F.message})}})).apply(this,arguments)}function di(x,F){return Eo.apply(this,arguments)}function Eo(){return(Eo=(0,K.Z)(function*(x,F){if(!F&&!x.swRegistration&&(yield ar(x)),F||!x.swRegistration){if(!(F instanceof ServiceWorkerRegistration))throw Jt.create("invalid-sw-registration");x.swRegistration=F}})).apply(this,arguments)}function Zr(x,F){return Wo.apply(this,arguments)}function Wo(){return(Wo=(0,K.Z)(function*(x,F){F?x.vapidKey=F:x.vapidKey||(x.vapidKey=io)})).apply(this,arguments)}function $s(){return($s=(0,K.Z)(function*(x,F){if(!navigator)throw Jt.create("only-available-in-window");if("default"===Notification.permission&&(yield Notification.requestPermission()),"granted"!==Notification.permission)throw Jt.create("permission-blocked");return yield Zr(x,F?.vapidKey),yield di(x,F?.serviceWorkerRegistration),Si(x)})).apply(this,arguments)}function da(x,F,Y){return Zo.apply(this,arguments)}function Zo(){return(Zo=(0,K.Z)(function*(x,F,Y){const ue=Bo(F);(yield x.firebaseDependencies.analyticsProvider.get()).logEvent(ue,{message_id:Y[qs],message_name:Y[Rs],message_time:Y[ws],message_device_time:Math.floor(Date.now()/1e3)})})).apply(this,arguments)}function Bo(x){switch(x){case ks.NOTIFICATION_CLICKED:return"notification_open";case ks.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}function qo(){return(qo=(0,K.Z)(function*(x,F){const Y=F.data;if(!Y.isFirebaseMessaging)return;x.onMessageHandler&&Y.messageType===ks.PUSH_RECEIVED&&("function"==typeof x.onMessageHandler?x.onMessageHandler(ri(Y)):x.onMessageHandler.next(ri(Y)));const ue=Y.data;ze(ue)&&"1"===ue[Ps]&&(yield da(x,Y.messageType,ue))})).apply(this,arguments)}const oo="@firebase/messaging",Ys=x=>{const F=new In(x.getProvider("app").getImmediate(),x.getProvider("installations-internal").getImmediate(),x.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",Y=>function Ea(x,F){return qo.apply(this,arguments)}(F,Y)),F},Yo=x=>{const F=x.getProvider("messaging").getImmediate();return{getToken:ue=>function yu(x,F){return $s.apply(this,arguments)}(F,ue)}};function wo(){return xo.apply(this,arguments)}function xo(){return(xo=(0,K.Z)(function*(){try{yield(0,oe.eu)()}catch{return!1}return typeof window<"u"&&(0,oe.hl)()&&(0,oe.zI)()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")})).apply(this,arguments)}!function Pa(){(0,ae._registerComponent)(new _e.wA("messaging",Ys,"PUBLIC")),(0,ae._registerComponent)(new _e.wA("messaging-internal",Yo,"PRIVATE")),(0,ae.registerVersion)(oo,"0.9.14"),(0,ae.registerVersion)(oo,"0.9.14","esm2017")}();const Do="analytics",Jo="firebase_id",ha="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",ea="https://www.googletagmanager.com/gtag/js",Ri=new fe.Yd("@firebase/analytics");function ba(x){return Promise.all(x.map(F=>F.catch(Y=>Y)))}function Ro(x,F){const Y=document.createElement("script");Y.src=`${ea}?l=${x}&id=${F}`,Y.async=!0,document.head.appendChild(Y)}function ka(x,F,Y,ue,ke,tt){return ta.apply(this,arguments)}function ta(){return(ta=(0,K.Z)(function*(x,F,Y,ue,ke,tt){const Ot=ue[ke];try{if(Ot)yield F[Ot];else{const Sn=(yield ba(Y)).find(kn=>kn.measurementId===ke);Sn&&(yield F[Sn.appId])}}catch(an){Ri.error(an)}x("config",ke,tt)})).apply(this,arguments)}function Po(x,F,Y,ue,ke){return Ds.apply(this,arguments)}function Ds(){return(Ds=(0,K.Z)(function*(x,F,Y,ue,ke){try{let tt=[];if(ke&&ke.send_to){let Ot=ke.send_to;Array.isArray(Ot)||(Ot=[Ot]);const an=yield ba(Y);for(const Sn of Ot){const kn=an.find(xn=>xn.measurementId===Sn),Vn=kn&&F[kn.appId];if(!Vn){tt=[];break}tt.push(Vn)}}0===tt.length&&(tt=Object.values(F)),yield Promise.all(tt),x("event",ue,ke||{})}catch(tt){Ri.error(tt)}})).apply(this,arguments)}function vu(){const x=window.document.getElementsByTagName("script");for(const F of Object.values(x))if(F.src&&F.src.includes(ea))return F;return null}const Mi=new oe.LL("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.'}),Cs=new class pa{constructor(F={},Y=1e3){this.throttleMetadata=F,this.intervalMillis=Y}getThrottleMetadata(F){return this.throttleMetadata[F]}setThrottleMetadata(F,Y){this.throttleMetadata[F]=Y}deleteThrottleMetadata(F){delete this.throttleMetadata[F]}};function wu(x){return new Headers({Accept:"application/json","x-goog-api-key":x})}function us(x){return Da.apply(this,arguments)}function Da(){return(Da=(0,K.Z)(function*(x){var F;const{appId:Y,apiKey:ue}=x,ke={method:"GET",headers:wu(ue)},tt=ha.replace("{app-id}",Y),Ot=yield fetch(tt,ke);if(200!==Ot.status&&304!==Ot.status){let an="";try{const Sn=yield Ot.json();null!==(F=Sn.error)&&void 0!==F&&F.message&&(an=Sn.error.message)}catch{}throw Mi.create("config-fetch-failed",{httpStatus:Ot.status,responseMessage:an})}return Ot.json()})).apply(this,arguments)}function jo(x){return La.apply(this,arguments)}function La(){return(La=(0,K.Z)(function*(x,F=Cs,Y){const{appId:ue,apiKey:ke,measurementId:tt}=x.options;if(!ue)throw Mi.create("no-app-id");if(!ke){if(tt)return{measurementId:tt,appId:ue};throw Mi.create("no-api-key")}const Ot=F.getThrottleMetadata(ue)||{backoffCount:0,throttleEndTimeMillis:Date.now()},an=new Va;return setTimeout((0,K.Z)(function*(){an.abort()}),void 0!==Y?Y:6e4),Io({appId:ue,apiKey:ke,measurementId:tt},Ot,an,F)})).apply(this,arguments)}function Io(x,F,Y){return hi.apply(this,arguments)}function hi(){return(hi=(0,K.Z)(function*(x,{throttleEndTimeMillis:F,backoffCount:Y},ue,ke=Cs){const{appId:tt,measurementId:Ot}=x;try{yield No(ue,F)}catch(an){if(Ot)return Ri.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${Ot} provided in the "measurementId" field in the local Firebase config. [${an.message}]`),{appId:tt,measurementId:Ot};throw an}try{const an=yield us(x);return ke.deleteThrottleMetadata(tt),an}catch(an){if(!Qs(an)){if(ke.deleteThrottleMetadata(tt),Ot)return Ri.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${Ot} provided in the "measurementId" field in the local Firebase config. [${an.message}]`),{appId:tt,measurementId:Ot};throw an}const Sn=503===Number(an.customData.httpStatus)?(0,oe.$s)(Y,ke.intervalMillis,30):(0,oe.$s)(Y,ke.intervalMillis),kn={throttleEndTimeMillis:Date.now()+Sn,backoffCount:Y+1};return ke.setThrottleMetadata(tt,kn),Ri.debug(`Calling attemptFetch again in ${Sn} millis`),Io(x,kn,ue,ke)}})).apply(this,arguments)}function No(x,F){return new Promise((Y,ue)=>{const ke=Math.max(F-Date.now(),0),tt=setTimeout(Y,ke);x.addEventListener(()=>{clearTimeout(tt),ue(Mi.create("fetch-throttle",{throttleEndTimeMillis:F}))})})}function Qs(x){if(!(x instanceof oe.ZR&&x.customData))return!1;const F=Number(x.customData.httpStatus);return 429===F||500===F||503===F||504===F}class Va{constructor(){this.listeners=[]}addEventListener(F){this.listeners.push(F)}abort(){this.listeners.forEach(F=>F())}}function ao(){return Xt.apply(this,arguments)}function Xt(){return(Xt=(0,K.Z)(function*(){if(!(0,oe.hl)())return Ri.warn(Mi.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{yield(0,oe.eu)()}catch(x){return Ri.warn(Mi.create("indexeddb-unavailable",{errorInfo:x}).message),!1}return!0})).apply(this,arguments)}function vi(){return(vi=(0,K.Z)(function*(x,F,Y,ue,ke,tt,Ot){var an;const Sn=jo(x);Sn.then(fi=>{Y[fi.measurementId]=fi.appId,x.options.measurementId&&fi.measurementId!==x.options.measurementId&&Ri.warn(`The measurement ID in the local Firebase config (${x.options.measurementId}) does not match the measurement ID fetched from the server (${fi.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(fi=>Ri.error(fi)),F.push(Sn);const kn=ao().then(fi=>{if(fi)return ue.getId()}),[Vn,xn]=yield Promise.all([Sn,kn]);vu()||Ro(tt,Vn.measurementId),ke("js",new Date);const mr=null!==(an=Ot?.config)&&void 0!==an?an:{};return mr.origin="firebase",mr.update=!0,null!=xn&&(mr[Jo]=xn),ke("config",Vn.measurementId,mr),Vn.measurementId})).apply(this,arguments)}class Co{constructor(F){this.app=F}_delete(){return delete _n[this.app.options.appId],Promise.resolve()}}let _n={},zn=[];const eu={};let D,I,En="dataLayer",k=!1;function be(x,F,Y){!function re(){const x=[];if((0,oe.ru)()&&x.push("This is a browser extension environment."),(0,oe.zI)()||x.push("Cookies are not available."),x.length>0){const F=x.map((ue,ke)=>`(${ke+1}) ${ue}`).join(" "),Y=Mi.create("invalid-analytics-context",{errorInfo:F});Ri.warn(Y.message)}}();const ue=x.options.appId;if(!ue)throw Mi.create("no-app-id");if(!x.options.apiKey){if(!x.options.measurementId)throw Mi.create("no-api-key");Ri.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${x.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=_n[ue])throw Mi.create("already-exists",{id:ue});if(!k){!function _i(x){let F=[];Array.isArray(window[x])?F=window[x]:window[x]=F}(En);const{wrappedGtag:tt,gtagCore:Ot}=function Is(x,F,Y,ue,ke){let tt=function(...Ot){window[ue].push(arguments)};return window[ke]&&"function"==typeof window[ke]&&(tt=window[ke]),window[ke]=function fa(x,F,Y,ue){function tt(){return(tt=(0,K.Z)(function*(Ot,an,Sn){try{"event"===Ot?yield Po(x,F,Y,an,Sn):"config"===Ot?yield ka(x,F,Y,ue,an,Sn):x("set",an)}catch(kn){Ri.error(kn)}})).apply(this,arguments)}return function ke(Ot,an,Sn){return tt.apply(this,arguments)}}(tt,x,F,Y),{gtagCore:tt,wrappedGtag:window[ke]}}(_n,zn,eu,En,"gtag");I=tt,D=Ot,k=!0}return _n[ue]=function Jr(x,F,Y,ue,ke,tt,Ot){return vi.apply(this,arguments)}(x,zn,eu,F,D,En,Y),new Co(x)}function Ft(){return(Ft=(0,K.Z)(function*(x,F,Y,ue,ke){if(ke&&ke.global)x("event",Y,ue);else{const tt=yield F;x("event",Y,Object.assign(Object.assign({},ue),{send_to:tt}))}})).apply(this,arguments)}function na(){return dr.apply(this,arguments)}function dr(){return(dr=(0,K.Z)(function*(){if((0,oe.ru)()||!(0,oe.zI)()||!(0,oe.hl)())return!1;try{return yield(0,oe.eu)()}catch{return!1}})).apply(this,arguments)}const Ua="@firebase/analytics";!function ra(){(0,ae._registerComponent)(new _e.wA(Do,(F,{options:Y})=>be(F.getProvider("app").getImmediate(),F.getProvider("installations-internal").getImmediate(),Y),"PUBLIC")),(0,ae._registerComponent)(new _e.wA("analytics-internal",function x(F){try{const Y=F.getProvider(Do).getImmediate();return{logEvent:(ue,ke,tt)=>function tu(x,F,Y,ue){x=(0,oe.m9)(x),function Ue(x,F,Y,ue,ke){return Ft.apply(this,arguments)}(I,_n[x.app.options.appId],F,Y,ue).catch(ke=>Ri.error(ke))}(Y,ue,ke,tt)}}catch(Y){throw Mi.create("interop-component-reg-failed",{reason:Y})}},"PRIVATE")),(0,ae.registerVersion)(Ua,"0.7.10"),(0,ae.registerVersion)(Ua,"0.7.10","esm2017")}();var lc=S(4408),$o=S(7565);const dc=new class ko extends $o.v{}(class cc extends lc.o{constructor(F,Y){super(F,Y),this.scheduler=F,this.work=Y}schedule(F,Y=0){return Y>0?super.schedule(F,Y):(this.delay=Y,this.state=F,this.scheduler.flush(this),this)}execute(F,Y){return Y>0||this.closed?super.execute(F,Y):this._execute(F,Y)}requestAsyncId(F,Y,ue=0){return null!=ue&&ue>0||null==ue&&this.delay>0?super.requestAsyncId(F,Y,ue):F.flush(this)}});var Di=S(4986),ja=S(8505),mt=S(5363),bu=S(9468);const Ls=new m.GfV("7.4.1"),zs="__angularfire_symbol__analyticsIsSupportedValue",Ks="__angularfire_symbol__analyticsIsSupported",Ws="__angularfire_symbol__remoteConfigIsSupportedValue",Ia="__angularfire_symbol__remoteConfigIsSupported",uo="__angularfire_symbol__messagingIsSupportedValue",$a="__angularfire_symbol__messagingIsSupported";function ju(x,F,Y){if(F){if(1===F.length)return F[0];const tt=F.filter(Ot=>Ot.app===Y);if(1===tt.length)return tt[0]}return Y.container.getProvider(x).getImmediate({optional:!0})}globalThis[Ks]||(globalThis[Ks]=na().then(x=>globalThis[zs]=x).catch(()=>globalThis[zs]=!1)),globalThis[$a]||(globalThis[$a]=wo().then(x=>globalThis[uo]=x).catch(()=>globalThis[uo]=!1)),globalThis[Ia]||(globalThis[Ia]=ro().then(x=>globalThis[Ws]=x).catch(()=>globalThis[Ws]=!1));const ts=(x,F)=>{const Y=F?[F]:(0,g.C6)(),ue=[];return Y.forEach(ke=>{ke.container.getProvider(x).instances.forEach(Ot=>{ue.includes(Ot)||ue.push(Ot)})}),ue};function Ho(){}class Xr{constructor(F,Y=dc){this.zone=F,this.delegate=Y}now(){return this.delegate.now()}schedule(F,Y,ue){const ke=this.zone;return this.delegate.schedule(function(Ot){ke.runGuarded(()=>{F.apply(this,[Ot])})},Y,ue)}}class N{constructor(F){this.zone=F,this.task=null}call(F,Y){const ue=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Ho,{},Ho,Ho)),Y.pipe((0,ja.b)({next:ue,complete:ue,error:ue})).subscribe(F).add(ue)}unscheduleTask(){setTimeout(()=>{null!=this.task&&"scheduled"===this.task.state&&(this.task.invoke(),this.task=null)},10)}}let y=(()=>{class x{constructor(Y){this.ngZone=Y,this.outsideAngular=Y.runOutsideAngular(()=>new Xr(Zone.current)),this.insideAngular=Y.run(()=>new Xr(Zone.current,Di.z)),globalThis.\u0275AngularFireScheduler||(globalThis.\u0275AngularFireScheduler=this)}}return x.\u0275fac=function(Y){return new(Y||x)(m.LFG(m.R0b))},x.\u0275prov=m.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})();function p(){const x=globalThis.\u0275AngularFireScheduler;if(!x)throw new Error("Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).");return x}function ne(x){return x.pipe((0,mt.Q)(p().outsideAngular))}function Te(x){return p(),function st(x){return function(Y){return(Y=Y.lift(new N(x.ngZone))).pipe((0,bu.R)(x.outsideAngular),(0,mt.Q)(x.insideAngular))}}(p())(x)}},2090:(Wt,je,S)=>{S.d(je,{$s:()=>Ut,BH:()=>it,G6:()=>Lt,L:()=>ge,LL:()=>Je,Mn:()=>xe,Sg:()=>Ke,UG:()=>Ze,US:()=>_e,ZB:()=>ce,ZR:()=>at,b$:()=>kt,d:()=>ot,eu:()=>Ie,hl:()=>Se,jU:()=>Qe,m9:()=>Rr,ne:()=>Un,pd:()=>Jn,r3:()=>Rn,ru:()=>Ee,tV:()=>he,uI:()=>ht,vZ:()=>Ht,w1:()=>Ne,xO:()=>wn,xb:()=>ut,z$:()=>Ye,zI:()=>Ce,zd:()=>er});const ae=function(Me){const we=[];let Ae=0;for(let Tt=0;Tt>6|192,we[Ae++]=63&se|128):55296==(64512&se)&&Tt+1>18|240,we[Ae++]=se>>12&63|128,we[Ae++]=se>>6&63|128,we[Ae++]=63&se|128):(we[Ae++]=se>>12|224,we[Ae++]=se>>6&63|128,we[Ae++]=63&se|128)}return we},_e={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(Me,we){if(!Array.isArray(Me))throw Error("encodeByteArray takes an array as a parameter");this.init_();const Ae=we?this.byteToCharMapWebSafe_:this.byteToCharMap_,Tt=[];for(let se=0;se>6,Nr=63&hn;Qt||(Nr=64,le||(Pr=64)),Tt.push(Ae[J>>2],Ae[(3&J)<<4|rt>>4],Ae[Pr],Ae[Nr])}return Tt.join("")},encodeString(Me,we){return this.HAS_NATIVE_SUPPORT&&!we?btoa(Me):this.encodeByteArray(ae(Me),we)},decodeString(Me,we){return this.HAS_NATIVE_SUPPORT&&!we?atob(Me):function(Me){const we=[];let Ae=0,Tt=0;for(;Ae191&&se<224){const J=Me[Ae++];we[Tt++]=String.fromCharCode((31&se)<<6|63&J)}else if(se>239&&se<365){const Qt=((7&se)<<18|(63&Me[Ae++])<<12|(63&Me[Ae++])<<6|63&Me[Ae++])-65536;we[Tt++]=String.fromCharCode(55296+(Qt>>10)),we[Tt++]=String.fromCharCode(56320+(1023&Qt))}else{const J=Me[Ae++],le=Me[Ae++];we[Tt++]=String.fromCharCode((15&se)<<12|(63&J)<<6|63&le)}}return we.join("")}(this.decodeStringToByteArray(Me,we))},decodeStringToByteArray(Me,we){this.init_();const Ae=we?this.charToByteMapWebSafe_:this.charToByteMap_,Tt=[];for(let se=0;se>4),64!==hn&&(Tt.push(rt<<4&240|hn>>2),64!==Pn&&Tt.push(hn<<6&192|Pn))}return Tt},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let Me=0;Me=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(Me)]=Me,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(Me)]=Me)}}},ge=function(Me){return function(Me){const we=ae(Me);return _e.encodeByteArray(we,!0)}(Me).replace(/\./g,"")},he=function(Me){try{return _e.decodeString(Me,!0)}catch(we){console.error("base64Decode failed: ",we)}return null};function ce(Me,we){if(!(we instanceof Object))return we;switch(we.constructor){case Date:return new Date(we.getTime());case Object:void 0===Me&&(Me={});break;case Array:Me=[];break;default:return we}for(const Ae in we)!we.hasOwnProperty(Ae)||!me(Ae)||(Me[Ae]=ce(Me[Ae],we[Ae]));return Me}function me(Me){return"__proto__"!==Me}class it{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((we,Ae)=>{this.resolve=we,this.reject=Ae})}wrapCallback(we){return(Ae,Tt)=>{Ae?this.reject(Ae):this.resolve(Tt),"function"==typeof we&&(this.promise.catch(()=>{}),1===we.length?we(Ae):we(Ae,Tt))}}}function Ke(Me,we){if(Me.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const Tt=we||"demo-project",se=Me.iat||0,J=Me.sub||Me.user_id;if(!J)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const le=Object.assign({iss:`https://securetoken.google.com/${Tt}`,aud:Tt,iat:se,exp:se+3600,auth_time:se,sub:J,user_id:J,firebase:{sign_in_provider:"custom",identities:{}}},Me);return[ge(JSON.stringify({alg:"none",type:"JWT"})),ge(JSON.stringify(le)),""].join(".")}function Ye(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function ht(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ye())}function Ze(){try{return"[object process]"===Object.prototype.toString.call(global.process)}catch{return!1}}function Qe(){return"object"==typeof self&&self.self===self}function Ee(){const Me="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof Me&&void 0!==Me.id}function kt(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function ot(){return Ye().indexOf("Electron/")>=0}function Ne(){const Me=Ye();return Me.indexOf("MSIE ")>=0||Me.indexOf("Trident/")>=0}function xe(){return Ye().indexOf("MSAppHost/")>=0}function Lt(){return!Ze()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function Se(){return"object"==typeof indexedDB}function Ie(){return new Promise((Me,we)=>{try{let Ae=!0;const Tt="validate-browser-context-for-indexeddb-analytics-module",se=self.indexedDB.open(Tt);se.onsuccess=()=>{se.result.close(),Ae||self.indexedDB.deleteDatabase(Tt),Me(!0)},se.onupgradeneeded=()=>{Ae=!1},se.onerror=()=>{var J;we((null===(J=se.error)||void 0===J?void 0:J.message)||"")}}catch(Ae){we(Ae)}})}function Ce(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}class at extends Error{constructor(we,Ae,Tt){super(Ae),this.code=we,this.customData=Tt,this.name="FirebaseError",Object.setPrototypeOf(this,at.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Je.prototype.create)}}class Je{constructor(we,Ae,Tt){this.service=we,this.serviceName=Ae,this.errors=Tt}create(we,...Ae){const Tt=Ae[0]||{},se=`${this.service}/${we}`,J=this.errors[we],le=J?function pn(Me,we){return Me.replace(Tn,(Ae,Tt)=>{const se=we[Tt];return null!=se?String(se):`<${Tt}?>`})}(J,Tt):"Error";return new at(se,`${this.serviceName}: ${le} (${se}).`,Tt)}}const Tn=/\{\$([^}]+)}/g;function Rn(Me,we){return Object.prototype.hasOwnProperty.call(Me,we)}function ut(Me){for(const we in Me)if(Object.prototype.hasOwnProperty.call(Me,we))return!1;return!0}function Ht(Me,we){if(Me===we)return!0;const Ae=Object.keys(Me),Tt=Object.keys(we);for(const se of Ae){if(!Tt.includes(se))return!1;const J=Me[se],le=we[se];if(Zt(J)&&Zt(le)){if(!Ht(J,le))return!1}else if(J!==le)return!1}for(const se of Tt)if(!Ae.includes(se))return!1;return!0}function Zt(Me){return null!==Me&&"object"==typeof Me}function wn(Me){const we=[];for(const[Ae,Tt]of Object.entries(Me))Array.isArray(Tt)?Tt.forEach(se=>{we.push(encodeURIComponent(Ae)+"="+encodeURIComponent(se))}):we.push(encodeURIComponent(Ae)+"="+encodeURIComponent(Tt));return we.length?"&"+we.join("&"):""}function er(Me){const we={};return Me.replace(/^\?/,"").split("&").forEach(Tt=>{if(Tt){const[se,J]=Tt.split("=");we[decodeURIComponent(se)]=decodeURIComponent(J)}}),we}function Jn(Me){const we=Me.indexOf("?");if(!we)return"";const Ae=Me.indexOf("#",we);return Me.substring(we,Ae>0?Ae:void 0)}function Un(Me,we){const Ae=new ln(Me,we);return Ae.subscribe.bind(Ae)}class ln{constructor(we,Ae){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=Ae,this.task.then(()=>{we(this)}).catch(Tt=>{this.error(Tt)})}next(we){this.forEachObserver(Ae=>{Ae.next(we)})}error(we){this.forEachObserver(Ae=>{Ae.error(we)}),this.close(we)}complete(){this.forEachObserver(we=>{we.complete()}),this.close()}subscribe(we,Ae,Tt){let se;if(void 0===we&&void 0===Ae&&void 0===Tt)throw new Error("Missing Observer.");se=function Yn(Me,we){if("object"!=typeof Me||null===Me)return!1;for(const Ae of we)if(Ae in Me&&"function"==typeof Me[Ae])return!0;return!1}(we,["next","error","complete"])?we:{next:we,error:Ae,complete:Tt},void 0===se.next&&(se.next=gn),void 0===se.error&&(se.error=gn),void 0===se.complete&&(se.complete=gn);const J=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?se.error(this.finalError):se.complete()}catch{}}),this.observers.push(se),J}unsubscribeOne(we){void 0===this.observers||void 0===this.observers[we]||(delete this.observers[we],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(we){if(!this.finalized)for(let Ae=0;Ae{if(void 0!==this.observers&&void 0!==this.observers[we])try{Ae(this.observers[we])}catch(Tt){typeof console<"u"&&console.error&&console.error(Tt)}})}close(we){this.finalized||(this.finalized=!0,void 0!==we&&(this.finalError=we),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function gn(){}function Ut(Me,we=1e3,Ae=2){const Tt=we*Math.pow(Ae,Me),se=Math.round(.5*Tt*(Math.random()-.5)*2);return Math.min(144e5,Tt+se)}function Rr(Me){return Me&&Me._delegate?Me._delegate:Me}},6471:(Wt,je,S)=>{S.d(je,{a:()=>K});var m=S(4650),g=S(3385);let K=(()=>{class ae{constructor(_e){this.afAuth=_e}canLoad(_e,fe){return this.checkAuthentication()}canActivate(_e,fe){return this.checkAuthentication()}checkAuthentication(){return new Promise((_e,fe)=>{this.afAuth.onAuthStateChanged(ge=>{ge?_e(!0):fe()})})}}return ae.\u0275fac=function(_e){return new(_e||ae)(m.LFG(g.zQ))},ae.\u0275prov=m.Yz7({token:ae,factory:ae.\u0275fac,providedIn:"root"}),ae})()},6518:(Wt,je,S)=>{S.d(je,{e:()=>he});var m=S(5861),g=S(5783),K=S(3900),ae=S(9646),oe=S(127),_e=S(4650),fe=S(3385),ge=S(7407);let he=(()=>{class ie{constructor(me,it){this.afAuth=me,this.fireStore=it,this.logOut=()=>this.afAuth.signOut()}getUser(){return this.afAuth.authState.pipe((0,K.w)(me=>me?this.fireStore.doc(`profiles/${me.uid}`).valueChanges():(0,ae.of)(null)))}get isEmailVerified(){return this.afAuth.authState.pipe((0,K.w)(me=>(0,ae.of)(!!me?.emailVerified)))}vefifyPhoneNumberAndSignin(me){var it=this;return(0,m.Z)(function*(){const Ke=JSON.parse(localStorage.getItem("verificationId")),Ye=oe.Z.auth.PhoneAuthProvider.credential(Ke,me),ht=yield it.afAuth.signInWithCredential(Ye);return ht?.additionalUserInfo?.isNewUser??(yield it.createProfileInFirestore(ht.user))})()}signinWithGoogle(){var me=this;return(0,m.Z)(function*(){const it=new oe.Z.auth.GoogleAuthProvider,Ke=yield me.afAuth.signInWithPopup(it);return Ke?.additionalUserInfo?.isNewUser??(yield me.createProfileInFirestore(Ke.user))})()}createNewUser(me,it){var Ke=this;return(0,m.Z)(function*(){const Ye=yield Ke.afAuth.createUserWithEmailAndPassword(me.email,it);yield Ye.user?.sendEmailVerification(),me.uid=Ye.user?.uid,me.role=g.K.PATIENT,me.created_at=new Date,me.imageURL="assets/unknown-profile-picture.jpg",yield Ke.fireStore.doc("/profiles/"+me.uid).set(me)})()}logIn(me,it){var Ke=this;return(0,m.Z)(function*(){return yield Ke.afAuth.signInWithEmailAndPassword(me,it)})()}resetPassword(me){var it=this;return(0,m.Z)(function*(){return yield it.afAuth.sendPasswordResetEmail(me)})()}createProfileInFirestore(me){const it={uid:me.uid,email:me.email,imageURL:me.photoURL||"assets/unknown-profile-picture.jpg",created_at:new Date,firstName:me.displayName||"User",phoneNumber:me.phoneNumber?parseInt(me.phoneNumber):null,role:g.K.PATIENT};return this.fireStore.doc(`profiles/${me.uid}`).set(it,{merge:!0})}checkAuthorization(me,it){if(!me)return!1;for(let Ke of it)if(me.role===Ke)return!0;return!1}canRead(me){return this.checkAuthorization(me,[g.K.ADMIN,g.K.MODERATOR,g.K.PATIENT,g.K.MEDECIN])}canAccessDashboard(me){return this.checkAuthorization(me,[g.K.ADMIN,g.K.MODERATOR,g.K.MEDECIN])}canCRUDrendezvous(me){return this.checkAuthorization(me,[g.K.ADMIN,g.K.MODERATOR,g.K.MEDECIN])}canCRUDusers(me){return this.checkAuthorization(me,[g.K.ADMIN])}}return ie.\u0275fac=function(me){return new(me||ie)(_e.LFG(fe.zQ),_e.LFG(ge.ST))},ie.\u0275prov=_e.Yz7({token:ie,factory:ie.\u0275fac,providedIn:"root"}),ie})()},5412:(Wt,je,S)=>{S.d(je,{a:()=>m});var m=(()=>{return(g=m||(m={})).ENG="en",g.FR="fr",g.AR="ar",m;var g})()},5783:(Wt,je,S)=>{S.d(je,{K:()=>m,y:()=>g});var m=(()=>{return(K=m||(m={})).ADMIN="ADMIN",K.MODERATOR="MODERATOR",K.PATIENT="PATIENT",K.MEDECIN="MEDECIN",m;var K})(),g=(()=>{return(K=g||(g={})).DARK="dark",K.LIGHT="light;",g;var K})()},7767:(Wt,je,S)=>{S.d(je,{u:()=>ae});var m=S(4650),g=S(6518),K=S(9116);let ae=(()=>{class oe{constructor(fe,ge){this.authService=fe,this.router=ge}canActivate(fe,ge){return this.CheckAccessPermissions()}canActivateChild(fe,ge){return!0}canLoad(fe,ge){return this.CheckAccessPermissions()}CheckAccessPermissions(){return new Promise((fe,ge)=>{this.authService.getUser().subscribe(he=>{this.authService.canAccessDashboard(he)?fe(!0):(this.router.navigate([""]),ge())})})}}return oe.\u0275fac=function(fe){return new(fe||oe)(m.LFG(g.e),m.LFG(K.F0))},oe.\u0275prov=m.Yz7({token:oe,factory:oe.\u0275fac,providedIn:"root"}),oe})()},7694:(Wt,je,S)=>{S.d(je,{o:()=>ae});var m=S(5412),g=S(4650),K=S(6188);let ae=(()=>{class oe{constructor(fe){this.translate=fe}get deviceLanguage(){const fe=navigator.language;return"fr"===fe?m.a.FR:"ar"===fe?m.a.AR:m.a.ENG}getUsersCols(){return[{title:this.translate.instant("First Name"),data:"firstName"},{title:this.translate.instant("Last Name"),data:"lastName"},{title:this.translate.instant("Phone Number"),data:"phoneNumber"},{title:this.translate.instant("Email"),data:"email"},{title:this.translate.instant("Created At"),data:"created_at"},{title:this.translate.instant("Role"),data:"role"}]}getPendingRDVsCols(){return[{title:this.translate.instant("Order"),data:"order"},{title:this.translate.instant("Display Name"),data:"displayName"},{title:this.translate.instant("Phone Number"),data:"phoneNumber"},{title:this.translate.instant("Created At"),data:"createdAt"},{title:this.translate.instant("Last Update"),data:"lastUpdate"}]}getApprovedRDVsCols(){return[{title:this.translate.instant("Order"),data:"order"},{title:this.translate.instant("Display Name"),data:"displayName"},{title:this.translate.instant("Phone Number"),data:"phoneNumber"},{title:this.translate.instant("Created At"),data:"createdAt"},{title:this.translate.instant("Last Update"),data:"lastUpdate"},{title:this.translate.instant("Rendezvous Date"),data:"rdvDate"}]}getDeleteConfirmMsg(fe){return`${this.translate.instant("Are you sure You want to Delete this Rendezvous?")}\n - ${this.translate.instant("Name:")} ${fe.displayName}\n - ${this.translate.instant("Created At:")} ${fe.createdAt}\n `}getCancelConfirmMsg(fe){return`${this.translate.instant("Are you sure You want to Cancel this Rendezvous?")}\n - ${this.translate.instant("Name:")} ${fe.displayName}\n - ${this.translate.instant("Created At:")} ${fe.createdAt}\n `}getMonths(){return Array.from({length:12},(fe,ge)=>new Date(0,ge).toLocaleString(this.translate.instant("en"),{month:"short"}))}getEngMonths(){return Array.from({length:12},(fe,ge)=>new Date(0,ge).toLocaleString("en",{month:"short"}))}convertToDateString(fe){return fe.toDate().toLocaleString(this.translate.instant("en"),{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}}return oe.\u0275fac=function(fe){return new(fe||oe)(g.LFG(K.sK))},oe.\u0275prov=g.Yz7({token:oe,factory:oe.\u0275fac,providedIn:"root"}),oe})()},4961:(Wt,je,S)=>{S.d(je,{f:()=>_e});var m=S(5861),g=S(4004),K=S(4650),ae=S(7407),oe=S(7694);let _e=(()=>{class fe{constructor(he,ie){this.afStore=he,this.translatingService=ie}getCurrentProfile(he){return this.afStore.doc(`profiles/${he}`).valueChanges()}updateProfile(he,ie){var ce=this;return(0,m.Z)(function*(){yield ce.afStore.collection("profiles").doc(he).update(ie)})()}getAllUsers(){return this.afStore.collection("profiles",he=>he.orderBy("created_at")).valueChanges().pipe((0,g.U)(he=>he.map(ie=>({...ie,created_at:this.translatingService.convertToDateString(ie.created_at)}))))}}return fe.\u0275fac=function(he){return new(he||fe)(K.LFG(ae.ST),K.LFG(oe.o))},fe.\u0275prov=K.Yz7({token:fe,factory:fe.\u0275fac,providedIn:"root"}),fe})()},2084:(Wt,je,S)=>{S.d(je,{Bo:()=>ae,Dc:()=>fe,kY:()=>K});var m=S(5861),g=S(5783);const K=ge=>"string"==typeof ge.message;function ae(ge){return oe.apply(this,arguments)}function oe(){return(oe=(0,m.Z)(function*(ge){const ie=yield(yield fetch(ge)).blob();return new File([ie],`${Date.now()}`,{type:"image/png"})})).apply(this,arguments)}function fe(ge){const he=document.querySelector(":root");ge===g.y.DARK?(he.style.setProperty("--font-color","rgba(100%, 100%, 100%, 87%)"),he.style.setProperty("--header-font","rgba(100%, 100%, 100%, 87%)"),he.style.setProperty("--template-bg-color","#121212"),he.style.setProperty("--popup-bg-color","#000000"),he.style.setProperty("--body-bg-color","#000000"),he.style.setProperty("--mainToSide-color","#ecf39e"),he.style.setProperty("--overlay-color","#ffffff")):(he.style.setProperty("--font-color","#121212"),he.style.setProperty("--header-font","#ffffff"),he.style.setProperty("--template-bg-color","#ffffff"),he.style.setProperty("--popup-bg-color","#ffffff"),he.style.setProperty("--body-bg-color","#ebebeb"),he.style.setProperty("--mainToSide-color","#191970"),he.style.setProperty("--overlay-color","#000000"))}},208:(Wt,je,S)=>{var m=S(1481),g=S(4650),K=S(2011),ae=S(3385),oe=S(9116),_e=S(6471),fe=S(7767);const ge=[{path:"",loadChildren:()=>Promise.all([S.e(552),S.e(865)]).then(S.bind(S,1865)).then(N=>N.LandingPageModule)},{path:"auth",loadChildren:()=>Promise.all([S.e(552),S.e(469)]).then(S.bind(S,6469)).then(N=>N.AuthModule)},{path:"home",loadChildren:()=>Promise.all([S.e(552),S.e(698)]).then(S.bind(S,3698)).then(N=>N.HomeModule),canLoad:[_e.a]},{path:"rendezvous",loadChildren:()=>Promise.all([S.e(552),S.e(36),S.e(781)]).then(S.bind(S,7781)).then(N=>N.RendezvousModule),canLoad:[_e.a]},{path:"profile/:id",loadChildren:()=>Promise.all([S.e(552),S.e(592),S.e(284)]).then(S.bind(S,8284)).then(N=>N.ProfileModule),canLoad:[_e.a]},{path:"dashboard",loadChildren:()=>Promise.all([S.e(552),S.e(36),S.e(592),S.e(642)]).then(S.bind(S,3642)).then(N=>N.DashboardModule),canLoad:[_e.a,fe.u]},{path:"**",loadChildren:()=>Promise.all([S.e(552),S.e(197)]).then(S.bind(S,197)).then(N=>N.NotFoundModule)}];let he=(()=>{class N{}return N.\u0275fac=function(p){return new(p||N)},N.\u0275mod=g.oAB({type:N}),N.\u0275inj=g.cJS({imports:[oe.Bz.forRoot(ge,{initialNavigation:"enabledBlocking"}),oe.Bz]}),N})();var ie=S(5412),ce=S(5783),me=S(2084),it=S(590),Ke=S(9718),Ye=S(4986),ht=S(8306),Ze=S(3532);function Ee(N=0,y,p=Ye.P){let T=-1;return null!=y&&((0,Ze.K)(y)?p=y:T=y),new ht.y(H=>{let ne=function Qe(N){return N instanceof Date&&!isNaN(N)}(N)?+N-p.now():N;ne<0&&(ne=0);let De=0;return p.schedule(function(){H.closed||(H.next(De++),0<=T?this.schedule(void 0,T):H.complete())},ne)})}var ot=S(7272),Ne=S(6451),xe=S(9646),Nt=S(4968),Lt=S(6518),Se=S(6188),Ie=S(7694),Ce=S(6895),et=S(9770),lt=S(2843),at=S(7579),Je=S(5032);const pn=new ht.y(Je.Z);var St=S(4004),Mt=S(9300),pe=S(3900),ft=S(4033),Et=S(576),sn=S(8996),It=S(4482);const nt={connector:()=>new at.x};function ut(N,y=nt){const{connector:p}=y;return(0,It.e)((T,H)=>{const ne=p();(0,sn.D)(N(function Rn(N){return new ht.y(y=>N.subscribe(y))}(ne))).subscribe(H),H.add(T.subscribe(ne))})}var Zt=S(5698),wn=S(8505),er=S(5403),bt=S(5577);function Un(N,y){return y?p=>(0,ot.z)(y.pipe((0,Zt.q)(1),function Jn(){return(0,It.e)((N,y)=>{N.subscribe(new er.Q(y,Je.Z))})}()),p.pipe(Un(N))):(0,bt.z)((p,T)=>N(p,T).pipe((0,Zt.q)(1),(0,Ke.h)(p)))}const yr="Service workers are disabled or not supported by this browser";class gn{constructor(y){if(this.serviceWorker=y,y){const T=(0,Nt.R)(y,"controllerchange").pipe((0,St.U)(()=>y.controller)),H=(0,et.P)(()=>(0,xe.of)(y.controller)),ne=(0,ot.z)(H,T);this.worker=ne.pipe((0,Mt.h)(Bt=>!!Bt)),this.registration=this.worker.pipe((0,pe.w)(()=>y.getRegistration()));const wt=(0,Nt.R)(y,"message").pipe((0,St.U)(Bt=>Bt.data)).pipe((0,Mt.h)(Bt=>Bt&&Bt.type)).pipe(function Ht(N){return N?y=>ut(N)(y):y=>function Kt(N,y){const p=(0,Et.m)(N)?N:()=>N;return(0,Et.m)(y)?ut(y,{connector:p}):T=>new ft.c(T,p)}(new at.x)(y)}());wt.connect(),this.events=wt}else this.worker=this.events=this.registration=function Yn(N){return(0,et.P)(()=>(0,lt._)(new Error(N)))}(yr)}postMessage(y,p){return this.worker.pipe((0,Zt.q)(1),(0,wn.b)(T=>{T.postMessage({action:y,...p})})).toPromise().then(()=>{})}postMessageWithOperation(y,p,T){const H=this.waitForOperationCompleted(T),ne=this.postMessage(y,p);return Promise.all([ne,H]).then(([,De])=>De)}generateNonce(){return Math.round(1e7*Math.random())}eventsOfType(y){let p;return p="string"==typeof y?T=>T.type===y:T=>y.includes(T.type),this.events.pipe((0,Mt.h)(p))}nextEventOfType(y){return this.eventsOfType(y).pipe((0,Zt.q)(1))}waitForOperationCompleted(y){return this.eventsOfType("OPERATION_COMPLETED").pipe((0,Mt.h)(p=>p.nonce===y),(0,Zt.q)(1),(0,St.U)(p=>{if(void 0!==p.result)return p.result;throw new Error(p.error)})).toPromise()}get isEnabled(){return!!this.serviceWorker}}let Ti=(()=>{class N{constructor(p){if(this.sw=p,this.subscriptionChanges=new at.x,!p.isEnabled)return this.messages=pn,this.notificationClicks=pn,void(this.subscription=pn);this.messages=this.sw.eventsOfType("PUSH").pipe((0,St.U)(H=>H.data)),this.notificationClicks=this.sw.eventsOfType("NOTIFICATION_CLICK").pipe((0,St.U)(H=>H.data)),this.pushManager=this.sw.registration.pipe((0,St.U)(H=>H.pushManager));const T=this.pushManager.pipe((0,pe.w)(H=>H.getSubscription()));this.subscription=(0,Ne.T)(T,this.subscriptionChanges)}get isEnabled(){return this.sw.isEnabled}requestSubscription(p){if(!this.sw.isEnabled)return Promise.reject(new Error(yr));const T={userVisibleOnly:!0};let H=this.decodeBase64(p.serverPublicKey.replace(/_/g,"/").replace(/-/g,"+")),ne=new Uint8Array(new ArrayBuffer(H.length));for(let De=0;DeDe.subscribe(T)),(0,Zt.q)(1)).toPromise().then(De=>(this.subscriptionChanges.next(De),De))}unsubscribe(){return this.sw.isEnabled?this.subscription.pipe((0,Zt.q)(1),(0,pe.w)(T=>{if(null===T)throw new Error("Not subscribed to push notifications.");return T.unsubscribe().then(H=>{if(!H)throw new Error("Unsubscribe failed!");this.subscriptionChanges.next(null)})})).toPromise():Promise.reject(new Error(yr))}decodeBase64(p){return atob(p)}}return N.\u0275fac=function(p){return new(p||N)(g.LFG(gn))},N.\u0275prov=g.Yz7({token:N,factory:N.\u0275fac}),N})(),Dr=(()=>{class N{constructor(p){if(this.sw=p,!p.isEnabled)return this.versionUpdates=pn,this.available=pn,this.activated=pn,void(this.unrecoverable=pn);this.versionUpdates=this.sw.eventsOfType(["VERSION_DETECTED","VERSION_INSTALLATION_FAILED","VERSION_READY","NO_NEW_VERSION_DETECTED"]),this.available=this.versionUpdates.pipe((0,Mt.h)(T=>"VERSION_READY"===T.type),(0,St.U)(T=>({type:"UPDATE_AVAILABLE",current:T.currentVersion,available:T.latestVersion}))),this.activated=this.sw.eventsOfType("UPDATE_ACTIVATED"),this.unrecoverable=this.sw.eventsOfType("UNRECOVERABLE_STATE")}get isEnabled(){return this.sw.isEnabled}checkForUpdate(){if(!this.sw.isEnabled)return Promise.reject(new Error(yr));const p=this.sw.generateNonce();return this.sw.postMessageWithOperation("CHECK_FOR_UPDATES",{nonce:p},p)}activateUpdate(){if(!this.sw.isEnabled)return Promise.reject(new Error(yr));const p=this.sw.generateNonce();return this.sw.postMessageWithOperation("ACTIVATE_UPDATE",{nonce:p},p)}}return N.\u0275fac=function(p){return new(p||N)(g.LFG(gn))},N.\u0275prov=g.Yz7({token:N,factory:N.\u0275fac}),N})();class Or{}const Ct=new g.OlP("NGSW_REGISTER_SCRIPT");function Be(N,y,p,T){return()=>{if(!(0,Ce.NF)(T)||!("serviceWorker"in navigator)||!1===p.enabled)return;let ne;if(navigator.serviceWorker.addEventListener("controllerchange",()=>{null!==navigator.serviceWorker.controller&&navigator.serviceWorker.controller.postMessage({action:"INITIALIZE"})}),"function"==typeof p.registrationStrategy)ne=p.registrationStrategy();else{const[Te,...st]=(p.registrationStrategy||"registerWhenStable:30000").split(":");switch(Te){case"registerImmediately":ne=(0,xe.of)(null);break;case"registerWithDelay":ne=Ge(+st[0]||0);break;case"registerWhenStable":ne=st[0]?(0,Ne.T)(xt(N),Ge(+st[0])):xt(N);break;default:throw new Error(`Unknown ServiceWorker registration strategy: ${p.registrationStrategy}`)}}N.get(g.R0b).runOutsideAngular(()=>ne.pipe((0,Zt.q)(1)).subscribe(()=>navigator.serviceWorker.register(y,{scope:p.scope}).catch(Te=>console.error("Service worker registration failed with:",Te))))}}function Ge(N){return(0,xe.of)(null).pipe(function ln(N,y=Ye.z){const p=Ee(N,y);return Un(()=>p)}(N))}function xt(N){return N.get(g.z2F).isStable.pipe((0,Mt.h)(p=>p))}function Xe(N,y){return new gn((0,Ce.NF)(y)&&!1!==N.enabled?navigator.serviceWorker:void 0)}let qt=(()=>{class N{static register(p,T={}){return{ngModule:N,providers:[{provide:Ct,useValue:p},{provide:Or,useValue:T},{provide:gn,useFactory:Xe,deps:[Or,g.Lbi]},{provide:g.ip1,useFactory:Be,deps:[g.zs3,Ct,Or,g.Lbi],multi:!0}]}}}return N.\u0275fac=function(p){return new(p||N)},N.\u0275mod=g.oAB({type:N}),N.\u0275inj=g.cJS({providers:[Ti,Dr]}),N})();var nr=S(5861),Kn=S(4961),Ut=S(7392);const mn=function(){return{exact:!0}};function Xn(N,y){1&N&&(g.TgZ(0,"a",14),g._uU(1),g.ALo(2,"translate"),g.qZA()),2&N&&(g.Q6J("routerLinkActiveOptions",g.DdM(4,mn)),g.xp6(1),g.hij(" ",g.lcZ(2,2,"Dashboard")," "))}function Rr(N,y){if(1&N&&(g.TgZ(0,"div",10)(1,"a",11),g._uU(2),g.ALo(3,"translate"),g.qZA(),g.TgZ(4,"a",12),g._uU(5),g.ALo(6,"translate"),g.qZA(),g.YNc(7,Xn,3,5,"a",13),g.qZA()),2&N){const p=g.oxw();g.xp6(1),g.Q6J("routerLinkActiveOptions",g.DdM(9,mn)),g.xp6(1),g.hij(" ",g.lcZ(3,5,"Home")," "),g.xp6(2),g.Q6J("routerLinkActiveOptions",g.DdM(10,mn)),g.xp6(1),g.hij(" ",g.lcZ(6,7,"Rendezvous")," "),g.xp6(2),g.Q6J("ngIf",p.dashboardAuth)}}function Me(N,y){1&N&&(g.TgZ(0,"span",26),g.ALo(1,"translate"),g.O4$(),g.TgZ(2,"svg",27),g._UZ(3,"path",28),g.qZA()()),2&N&&g.s9C("title",g.lcZ(1,1,"Switch to Dark Mode"))}function we(N,y){1&N&&(g.TgZ(0,"span",26),g.ALo(1,"translate"),g.O4$(),g.TgZ(2,"svg",29),g._UZ(3,"path",30),g.qZA()()),2&N&&g.s9C("title",g.lcZ(1,1,"Switch to Light Mode"))}function Ae(N,y){if(1&N&&g._UZ(0,"img",31),2&N){const p=g.oxw(2);g.Q6J("src",p.user.imageURL,g.LSH)}}function Tt(N,y){if(1&N){const p=g.EpF();g.TgZ(0,"div",32),g._UZ(1,"hr",33),g.TgZ(2,"div",34),g.NdJ("click",function(){g.CHM(p);const H=g.oxw(2);return g.KtG(H.goToProfile())}),g.TgZ(3,"div"),g._UZ(4,"img",35),g.qZA(),g.TgZ(5,"div",36)(6,"div",37)(7,"strong"),g._uU(8),g.qZA()(),g.TgZ(9,"div",38),g._uU(10),g.qZA(),g.TgZ(11,"div",38)(12,"em"),g._uU(13),g.qZA()()()(),g._UZ(14,"hr",39),g.TgZ(15,"div",34),g.NdJ("click",function(){g.CHM(p);const H=g.oxw(2);return g.KtG(H.goToMyRDVs())}),g.TgZ(16,"div"),g._UZ(17,"i",40),g.qZA(),g.TgZ(18,"div",36)(19,"a",41),g._uU(20),g.ALo(21,"translate"),g.qZA()()(),g._UZ(22,"hr",39),g.TgZ(23,"div",42),g.NdJ("click",function(){g.CHM(p);const H=g.oxw(2);return g.KtG(H.logOut())}),g.TgZ(24,"div",43),g._UZ(25,"i",44),g.qZA(),g.TgZ(26,"div",45),g._uU(27),g.ALo(28,"translate"),g.qZA()(),g._UZ(29,"hr",46),g.qZA()}if(2&N){const p=g.oxw(2);g.xp6(4),g.Q6J("src",p.user.imageURL,g.LSH),g.xp6(4),g.AsE("",p.user.firstName," ",p.user.lastName,""),g.xp6(2),g.Oqu(p.user.email),g.xp6(3),g.Oqu(p.user.role),g.xp6(7),g.Oqu(g.lcZ(21,7,"My Rendezvous")),g.xp6(7),g.Oqu(g.lcZ(28,9,"Sign out"))}}function se(N,y){if(1&N){const p=g.EpF();g.TgZ(0,"div",15)(1,"select",16),g.NdJ("change",function(H){g.CHM(p);const ne=g.oxw();return g.KtG(ne.changeLanguage(H))}),g.ALo(2,"translate"),g.TgZ(3,"option",17),g._uU(4,"Eng"),g.qZA(),g.TgZ(5,"option",17),g._uU(6,"Fr"),g.qZA(),g.TgZ(7,"option",17),g._uU(8,"\u0639\u0631"),g.qZA()(),g.TgZ(9,"div",18),g.NdJ("click",function(){g.CHM(p);const H=g.oxw();return g.KtG(H.changeTheme())}),g.YNc(10,Me,4,3,"span",19),g.YNc(11,we,4,3,"span",19),g.qZA(),g.TgZ(12,"button",20),g.NdJ("click",function(){g.CHM(p);const H=g.oxw();return g.KtG(H.toggleMenu())})("blur",function(){g.CHM(p);const H=g.oxw();return g.KtG(H.showMenu=!1)}),g.TgZ(13,"div",21),g.YNc(14,Ae,1,1,"img",22),g.TgZ(15,"span",23),g._uU(16),g.qZA(),g._UZ(17,"i",24),g.qZA(),g.YNc(18,Tt,30,11,"div",25),g.qZA()()}if(2&N){const p=g.oxw();g.xp6(1),g.s9C("title",g.lcZ(2,12,"Change Language")),g.xp6(2),g.Q6J("value",p.langs.ENG)("selected",p.language==p.langs.ENG),g.xp6(2),g.Q6J("value",p.langs.FR)("selected",p.language==p.langs.FR),g.xp6(2),g.Q6J("value",p.langs.AR)("selected",p.language==p.langs.AR),g.xp6(3),g.Q6J("ngIf",!p.darkMode),g.xp6(1),g.Q6J("ngIf",p.darkMode),g.xp6(3),g.Q6J("ngIf",p.user.imageURL),g.xp6(2),g.Oqu(p.user.firstName),g.xp6(2),g.Q6J("ngIf",p.showMenu)}}function J(N,y){1&N&&(g.TgZ(0,"mat-icon"),g._uU(1,"menu"),g.qZA())}function le(N,y){1&N&&(g.TgZ(0,"mat-icon"),g._uU(1,"close"),g.qZA())}function rt(N,y){1&N&&(g.TgZ(0,"a",63),g._uU(1),g.ALo(2,"translate"),g.qZA()),2&N&&(g.Q6J("routerLinkActiveOptions",g.DdM(4,mn)),g.xp6(1),g.hij(" ",g.lcZ(2,2,"Dashboard")," "))}function Qt(N,y){if(1&N){const p=g.EpF();g.TgZ(0,"select",64),g.NdJ("change",function(H){g.CHM(p);const ne=g.oxw(3);return g.KtG(ne.changeLanguage(H))}),g.TgZ(1,"option",65),g._uU(2,"Eng"),g.qZA(),g.TgZ(3,"option",65),g._uU(4,"Fr"),g.qZA(),g.TgZ(5,"option",65),g._uU(6,"\u0639\u0631"),g.qZA()()}if(2&N){const p=g.oxw(3);g.xp6(1),g.Q6J("value",p.langs.ENG)("selected",p.language==p.langs.ENG),g.xp6(2),g.Q6J("value",p.langs.FR)("selected",p.language==p.langs.FR),g.xp6(2),g.Q6J("value",p.langs.AR)("selected",p.language==p.langs.AR)}}function hn(N,y){1&N&&(g.TgZ(0,"span",26),g.ALo(1,"translate"),g.O4$(),g.TgZ(2,"svg",27),g._UZ(3,"path",28),g.qZA()()),2&N&&g.s9C("title",g.lcZ(1,1,"Switch to Dark Mode"))}function fn(N,y){1&N&&(g.TgZ(0,"span",26),g.ALo(1,"translate"),g.O4$(),g.TgZ(2,"svg",29),g._UZ(3,"path",30),g.qZA()()),2&N&&g.s9C("title",g.lcZ(1,1,"Switch to Light Mode"))}function Pn(N,y){if(1&N){const p=g.EpF();g.TgZ(0,"div",51)(1,"a",52),g._UZ(2,"img",53),g.TgZ(3,"span",54),g._uU(4),g.ALo(5,"translate"),g.qZA()(),g.TgZ(6,"a",55),g._uU(7),g.ALo(8,"translate"),g.qZA(),g.TgZ(9,"a",56),g._uU(10),g.ALo(11,"translate"),g.qZA(),g.TgZ(12,"a",57),g._uU(13),g.ALo(14,"translate"),g.qZA(),g.YNc(15,rt,3,5,"a",58),g.TgZ(16,"a",59),g.NdJ("click",function(){g.CHM(p);const H=g.oxw(2);return g.KtG(H.logOut())}),g._UZ(17,"i",44),g.TgZ(18,"span",54),g._uU(19),g.ALo(20,"translate"),g.qZA()(),g.TgZ(21,"a",60),g.YNc(22,Qt,7,6,"select",61),g.TgZ(23,"div",62),g.NdJ("click",function(){g.CHM(p);const H=g.oxw(2);return g.KtG(H.changeTheme())}),g.YNc(24,hn,4,3,"span",19),g.YNc(25,fn,4,3,"span",19),g.qZA()()()}if(2&N){const p=g.oxw(2);g.xp6(1),g.MGl("routerLink","/profile/",p.user.uid,""),g.Q6J("routerLinkActiveOptions",g.DdM(25,mn)),g.xp6(1),g.Q6J("src",p.user.imageURL,g.LSH),g.xp6(2),g.Oqu(g.lcZ(5,15,"Profile")),g.xp6(2),g.Q6J("routerLinkActiveOptions",g.DdM(26,mn)),g.xp6(1),g.hij(" ",g.lcZ(8,17,"Home")," "),g.xp6(2),g.Q6J("routerLinkActiveOptions",g.DdM(27,mn)),g.xp6(1),g.hij(" ",g.lcZ(11,19,"Rendezvous")," "),g.xp6(2),g.Q6J("routerLinkActiveOptions",g.DdM(28,mn)),g.xp6(1),g.hij(" ",g.lcZ(14,21,"My Rendezvous")," "),g.xp6(2),g.Q6J("ngIf",p.dashboardAuth),g.xp6(4),g.Oqu(g.lcZ(20,23,"Sign out")),g.xp6(3),g.Q6J("ngIf",p.user),g.xp6(2),g.Q6J("ngIf",!p.darkMode),g.xp6(1),g.Q6J("ngIf",p.darkMode)}}function Pr(N,y){if(1&N){const p=g.EpF();g.TgZ(0,"div",47)(1,"div",48),g.NdJ("click",function(){g.CHM(p);const H=g.oxw();return g.KtG(H.toggleMobileNav())}),g.YNc(2,J,2,0,"mat-icon",49),g.YNc(3,le,2,0,"mat-icon",49),g.qZA(),g.YNc(4,Pn,26,29,"div",50),g.qZA()}if(2&N){const p=g.oxw();g.xp6(2),g.Q6J("ngIf",!p.showMobileLinks),g.xp6(1),g.Q6J("ngIf",p.showMobileLinks),g.xp6(1),g.Q6J("ngIf",p.showMobileLinks)}}function Nr(N,y){if(1&N){const p=g.EpF();g.TgZ(0,"div",66),g.NdJ("click",function(){g.CHM(p);const H=g.oxw();return g.KtG(H.showMobileLinks=!1)}),g.qZA()}}function jn(N,y){1&N&&(g.TgZ(0,"button",67),g._uU(1),g.ALo(2,"translate"),g.qZA()),2&N&&(g.xp6(1),g.Oqu(g.lcZ(2,1,"Sign Up")))}const kr=function(N){return{"header-logout":N}},jr=function(N){return{"logout-logo":N}};let Fr=(()=>{class N{constructor(p,T,H,ne){this.router=p,this.authService=T,this.usersService=H,this.translatingService=ne,this.showMenu=!1,this.language=this.translatingService.deviceLanguage,this.langs=ie.a,this.showMobileLinks=!1,this.goToMyRDVs=()=>this.router.navigate(["/rendezvous/my-rendezvous"]),this.goToProfile=()=>this.router.navigate(["/profile/",this.user.uid]),this.toggleMenu=()=>this.showMenu=!this.showMenu,this.toggleMobileNav=()=>this.showMobileLinks=!this.showMobileLinks}ngOnInit(){this.getCurrentUser()}getCurrentUser(){this.authService.getUser().subscribe(p=>{this.user=p,this.user.language&&(this.language=this.user.language),this.darkMode=!!p?.darkTheme})}get dashboardAuth(){return this.authService.canAccessDashboard(this.user)}logOut(){var p=this;return(0,nr.Z)(function*(){yield p.authService.logOut(),yield p.router.navigate(["/auth/login"]),window.location.reload()})()}changeLanguage(p){var T=this;return(0,nr.Z)(function*(){T.user.language=p.target.value;try{yield T.usersService.updateProfile(T.user.uid,T.user)}catch(ne){window.alert(ne)}window.location.reload()})()}changeTheme(){var p=this;return(0,nr.Z)(function*(){if(p.darkMode){p.user.darkTheme=!1;try{yield p.usersService.updateProfile(p.user.uid,p.user),(0,me.Dc)(ce.y.LIGHT),p.darkMode=!1}catch(T){window.alert(T)}}else{p.user.darkTheme=!0;try{yield p.usersService.updateProfile(p.user.uid,p.user),(0,me.Dc)(ce.y.DARK),p.darkMode=!0}catch(T){window.alert(T)}}})()}}return N.\u0275fac=function(p){return new(p||N)(g.Y36(oe.F0),g.Y36(Lt.e),g.Y36(Kn.f),g.Y36(Ie.o))},N.\u0275cmp=g.Xpm({type:N,selectors:[["app-header"]],decls:11,vars:11,consts:[[1,"header-container",3,"ngClass"],["routerLink","","id","logo",1,"logo-container",3,"ngClass"],["src","../../../assets/rendezvous-icon.svg","alt","Logo Icon",2,"height","40px"],[1,"logo-word"],["class","web-nav-container",4,"ngIf"],["class","web-right-block",4,"ngIf"],["class","toggle-menu",4,"ngIf"],["class","overlay-menu",3,"click",4,"ngIf"],["routerLink","auth/signup","class","signup-btn",4,"ngIf"],[1,"sub-hdr"],[1,"web-nav-container"],["routerLink","/home","routerLinkActive","active-link",1,"web-nav-link",3,"routerLinkActiveOptions"],["routerLink","/rendezvous","routerLinkActive","active-link",1,"web-nav-link","mdl-link",3,"routerLinkActiveOptions"],["class","web-nav-link","routerLink","/dashboard","routerLinkActive","active-link",3,"routerLinkActiveOptions",4,"ngIf"],["routerLink","/dashboard","routerLinkActive","active-link",1,"web-nav-link",3,"routerLinkActiveOptions"],[1,"web-right-block"],[1,"select-lang",3,"title","change"],[3,"value","selected"],[1,"dark-mode",3,"click"],[3,"title",4,"ngIf"],[1,"web-toggle-menu",3,"click","blur"],[1,"menu-header"],["class","userIMG","onerror","this.src='../../../assets/unknown-profile-picture.jpg'",3,"src",4,"ngIf"],[1,"userName"],[1,"fas","fa-caret-down"],["class","menu",4,"ngIf"],[3,"title"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512",1,"moon-svg"],["d","M32 256c0-123.8 100.3-224 223.8-224c11.36 0 29.7 1.668 40.9 3.746c9.616 1.777 11.75 14.63 3.279 19.44C245 86.5 211.2 144.6 211.2 207.8c0 109.7 99.71 193 208.3 172.3c9.561-1.805 16.28 9.324 10.11 16.95C387.9 448.6 324.8 480 255.8 480C132.1 480 32 379.6 32 256z"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512",1,"sun-svg"],["d","M256 159.1c-53.02 0-95.1 42.98-95.1 95.1S202.1 351.1 256 351.1s95.1-42.98 95.1-95.1S309 159.1 256 159.1zM509.3 347L446.1 255.1l63.15-91.01c6.332-9.125 1.104-21.74-9.826-23.72l-109-19.7l-19.7-109c-1.975-10.93-14.59-16.16-23.72-9.824L256 65.89L164.1 2.736c-9.125-6.332-21.74-1.107-23.72 9.824L121.6 121.6L12.56 141.3C1.633 143.2-3.596 155.9 2.736 164.1L65.89 256l-63.15 91.01c-6.332 9.125-1.105 21.74 9.824 23.72l109 19.7l19.7 109c1.975 10.93 14.59 16.16 23.72 9.824L256 446.1l91.01 63.15c9.127 6.334 21.75 1.107 23.72-9.822l19.7-109l109-19.7C510.4 368.8 515.6 356.1 509.3 347zM256 383.1c-70.69 0-127.1-57.31-127.1-127.1c0-70.69 57.31-127.1 127.1-127.1s127.1 57.3 127.1 127.1C383.1 326.7 326.7 383.1 256 383.1z"],["onerror","this.src='../../../assets/unknown-profile-picture.jpg'",1,"userIMG",3,"src"],[1,"menu"],[2,"margin","0 0 7px 0","opacity","0"],[1,"profile-sec",3,"click"],["onerror","this.src='../../../assets/unknown-profile-picture.jpg'",1,"rounded-circle",2,"width","50px","height","50px",3,"src"],[2,"text-align","left","margin-left","11px"],[2,"font-size","medium"],[2,"font-size","smaller"],[2,"margin","7px 0"],[1,"fas","fa-calendar-check"],[2,"color","inherit"],[1,"log-out-sec",3,"click"],[1,"inside",2,"font-size","1rem"],[1,"fas","fa-power-off"],[2,"margin-left","15px","font-size","1rem"],[2,"margin","7px 0 0 0","opacity","0"],[1,"toggle-menu"],[1,"menu-icon-container",3,"click"],[4,"ngIf"],["class","mobile-nav",4,"ngIf"],[1,"mobile-nav"],["routerLinkActive","active-link-mobile",1,"mobile-nav-link",3,"routerLink","routerLinkActiveOptions"],["onerror","this.src='../../../assets/unknown-profile-picture.jpg'",1,"rounded-circle",2,"width","25px","height","25px",3,"src"],[2,"margin-left","7px"],["routerLink","/home","routerLinkActive","active-link-mobile",1,"mobile-nav-link",3,"routerLinkActiveOptions"],["routerLink","/rendezvous","routerLinkActive","active-link-mobile",1,"mobile-nav-link",3,"routerLinkActiveOptions"],["routerLink","/rendezvous/my-rendezvous","routerLinkActive","active-link-mobile",1,"mobile-nav-link",3,"routerLinkActiveOptions"],["class","mobile-nav-link","routerLink","/dashboard","routerLinkActive","active-link-mobile",3,"routerLinkActiveOptions",4,"ngIf"],[1,"logout-link",3,"click"],["id","lang",1,"mobile-nav-link","last"],["class","select-lang-mobile",3,"change",4,"ngIf"],[1,"dark-mode-mobile",3,"click"],["routerLink","/dashboard","routerLinkActive","active-link-mobile",1,"mobile-nav-link",3,"routerLinkActiveOptions"],[1,"select-lang-mobile",3,"change"],[1,"opt",3,"value","selected"],[1,"overlay-menu",3,"click"],["routerLink","auth/signup",1,"signup-btn"]],template:function(p,T){1&p&&(g.TgZ(0,"div",0)(1,"a",1),g._UZ(2,"img",2),g.TgZ(3,"span",3),g._uU(4,"RENDEZVOUS"),g.qZA()(),g.YNc(5,Rr,8,11,"div",4),g.YNc(6,se,19,14,"div",5),g.YNc(7,Pr,5,3,"div",6),g.YNc(8,Nr,1,0,"div",7),g.YNc(9,jn,3,3,"button",8),g.qZA(),g._UZ(10,"div",9)),2&p&&(g.Q6J("ngClass",g.VKq(7,kr,!T.user)),g.xp6(1),g.Q6J("ngClass",g.VKq(9,jr,!T.user)),g.xp6(4),g.Q6J("ngIf",T.user),g.xp6(1),g.Q6J("ngIf",T.user),g.xp6(1),g.Q6J("ngIf",T.user),g.xp6(1),g.Q6J("ngIf",T.showMobileLinks),g.xp6(1),g.Q6J("ngIf",!T.user))},dependencies:[Ce.mk,Ce.O5,oe.rH,oe.yS,oe.Od,Ut.Hw,Se.X$],styles:['.header-container[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-areas:"logo nav right-block";align-items:center;padding:0 15px;min-width:-moz-fit-content;min-width:fit-content;width:100%;height:55px;font-size:1rem;color:var(--header-font);background-color:var(--main-color);box-shadow:0 0 5px #99999980;z-index:100}.sub-hdr[_ngcontent-%COMP%]{height:55px}.toggle-menu[_ngcontent-%COMP%]{display:none}.logo-container[_ngcontent-%COMP%]{grid-area:logo;display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:center;color:var(--header-font)}.logo-word[_ngcontent-%COMP%]{font-size:25px;margin-left:7px}.web-nav-container[_ngcontent-%COMP%]{grid-area:nav;display:flex;flex-wrap:nowrap;justify-content:center;align-items:center;white-space:nowrap}.web-right-block[_ngcontent-%COMP%]{grid-area:right-block;display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:center}a[_ngcontent-%COMP%]{text-decoration:none}.web-nav-link[_ngcontent-%COMP%]{padding:5px 7px;border-radius:3px;color:var(--header-font)}.mdl-link[_ngcontent-%COMP%]{margin:0 5px}.web-nav-link[_ngcontent-%COMP%]:hover{color:#121212;background-color:var(--side-color)}.select-lang[_ngcontent-%COMP%]{border:none;padding:3px 5px;border-radius:3px;color:var(--header-font);cursor:pointer;background-color:transparent;width:-moz-fit-content;width:fit-content}.select-lang[_ngcontent-%COMP%]:hover{color:#121212;background-color:var(--side-color)}.select-lang[_ngcontent-%COMP%]:focus{outline:none}.select-lang[_ngcontent-%COMP%] > option[_ngcontent-%COMP%]{background-color:var(--side-color)}.dark-mode[_ngcontent-%COMP%]{margin-inline:5px;padding:5px;cursor:pointer}.moon-svg[_ngcontent-%COMP%]{fill:var(--side-color);width:30px;padding:5px;border-radius:50%}.sun-svg[_ngcontent-%COMP%]{fill:var(--header-font);width:30px;padding:5px;border-radius:50%}.moon-svg[_ngcontent-%COMP%]:hover{fill:#121212;background-color:var(--side-color)}.sun-svg[_ngcontent-%COMP%]:hover{fill:var(--main-color);background-color:var(--side-color)}.web-toggle-menu[_ngcontent-%COMP%]{position:relative;background-color:transparent;color:var(--header-font);border:none;padding:0;margin:0}.menu-header[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;justify-content:center;align-items:center;padding:5px;border-radius:40px}.menu-header[_ngcontent-%COMP%]:hover{color:#121212;background-color:var(--side-color);transition:.2s}.fa-caret-down[_ngcontent-%COMP%]{margin-left:0 3px}.userIMG[_ngcontent-%COMP%]{width:35px;height:35px;border-radius:50%}.userName[_ngcontent-%COMP%]{display:inline-block;width:-moz-fit-content;width:fit-content;margin:0 5px 0 7px}.menu[_ngcontent-%COMP%]{position:absolute;top:50px;right:5px;padding:0;color:var(--font-color);width:max-content;border-radius:5px;background-color:var(--template-bg-color);box-shadow:0 0 9px 0 var(--font-color);z-index:100}.profile-sec[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding:5px 11px}.profile-sec[_ngcontent-%COMP%]:hover{color:#121212;background-color:var(--side-color)}.log-out-sec[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding:5px 11px;color:var(--danger-color)}.log-out-sec[_ngcontent-%COMP%]:hover{background-color:var(--danger-color);color:#fff;transition:.3s}.signup-btn[_ngcontent-%COMP%]{background-color:transparent;color:var(--header-font);padding:5px 9px;border:2px solid var(--header-font);border-radius:9px;width:max-content;white-space:nowrap}.signup-btn[_ngcontent-%COMP%]:hover{color:#fff;border-color:var(--side-color)}@media screen and (max-width: 850px){.header-container[_ngcontent-%COMP%]{grid-template-areas:"nav logo right-block"}.logo-container[_ngcontent-%COMP%]{justify-content:center}.logo-word[_ngcontent-%COMP%]{display:none}}@media screen and (max-width: 650px){.web-nav-container[_ngcontent-%COMP%], .web-right-block[_ngcontent-%COMP%]{display:none}.toggle-menu[_ngcontent-%COMP%]{all:unset}.logo-word[_ngcontent-%COMP%]{display:inherit}.header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;height:55px;top:0}.logo-container[_ngcontent-%COMP%]{margin:0}.toggle-menu[_ngcontent-%COMP%]{position:relative;color:var(--header-font)}.menu-icon-container[_ngcontent-%COMP%]{cursor:pointer}.mobile-nav[_ngcontent-%COMP%]{position:absolute;top:35px;right:0;display:flex;flex-direction:column;padding:5px 0;width:max-content;background-color:var(--popup-bg-color);box-shadow:0 0 9px 0 var(--font-color);border-radius:3px;cursor:zoom-in;z-index:121}.mobile-nav-link[_ngcontent-%COMP%]{color:var(--font-color);margin:5px 0;padding:5px 15px;border-radius:3px}.mobile-nav-link[_ngcontent-%COMP%]:hover{color:#121212;background-color:var(--side-color)}.last[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;margin-block:0}.last[_ngcontent-%COMP%]:hover{color:#121212;background-color:transparent}.last[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{background-color:var(--side-color)}.select-lang-mobile[_ngcontent-%COMP%]{padding:5px;border:none;outline:none;border-radius:3px;cursor:pointer}.dark-mode-mobile[_ngcontent-%COMP%]{cursor:pointer;margin-left:15px;border-radius:50%;fill:var(--main-color)}.dark-mode-mobile[_ngcontent-%COMP%] .moon-svg[_ngcontent-%COMP%]{fill:#121212}.dark-mode-mobile[_ngcontent-%COMP%] .sun-svg[_ngcontent-%COMP%]{fill:var(--main-color)}.logout-link[_ngcontent-%COMP%]{margin:5px 0;padding:5px 15px;border-radius:3px;cursor:pointer;color:var(--danger-color)}.logout-link[_ngcontent-%COMP%]:hover{color:#fff;background-color:var(--danger-color)}.overlay-menu[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:120}}.active-link[_ngcontent-%COMP%], .active-link-mobile[_ngcontent-%COMP%]{color:#121212;background-color:var(--side-color)}.header-logout[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;height:50px}.logout-logo[_ngcontent-%COMP%]{margin:0}']}),N})(),Sr=(()=>{class N{constructor(){}ngOnInit(){}get year(){return(new Date).getFullYear()}}return N.\u0275fac=function(p){return new(p||N)},N.\u0275cmp=g.Xpm({type:N,selectors:[["app-footer"]],decls:9,vars:4,consts:[[1,"footer-text"],["href","https://analygital.com","target","_blank","title","https://analygital.com"]],template:function(p,T){1&p&&(g.TgZ(0,"footer")(1,"div",0)(2,"span"),g._uU(3,"\xa9"),g.qZA(),g._uU(4),g.ALo(5,"translate"),g.TgZ(6,"a",1),g._uU(7," Analygital "),g.qZA(),g._uU(8),g.qZA()()),2&p&&(g.xp6(4),g.hij(" ",g.lcZ(5,2,"Copyrights to")," "),g.xp6(4),g.hij(" ",T.year," "))},dependencies:[Se.X$],styles:["footer[_ngcontent-%COMP%]{background-color:var(--main-color);color:#fff;text-align:center;font-size:1em;padding:15px 0}.footer-text[_ngcontent-%COMP%]{width:max-content;margin:0 auto;font-size:.9rem;font-weight:500}.footer-text[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:#fff}.footer-text[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--side-color);transition:.2s}"]}),N})();function zt(N,y){if(1&N){const p=g.EpF();g.TgZ(0,"p",2)(1,"span"),g._uU(2,"You're offline"),g.qZA(),g.TgZ(3,"span",3),g.NdJ("click",function(){g.CHM(p);const H=g.oxw();return g.KtG(H.closeNotification())}),g._uU(4,"\xd7"),g.qZA()()}}let Nn=(()=>{class N{constructor(p,T,H,ne,De){this.authService=p,this.translateService=T,this.translatingService=H,this.appRef=ne,this.swUpdate=De,this.showNotification=!1,this.translateService.setDefaultLang(ie.a.ENG),this.authService.getUser().subscribe(Bt=>{this.translateService.use(Bt?.language||this.translatingService.deviceLanguage),(0,me.Dc)(Bt?.darkTheme?ce.y.DARK:ce.y.LIGHT)});const Te=ne.isStable.pipe((0,it.P)(Bt=>!0===Bt)),st=function kt(N=0,y=Ye.z){return N<0&&(N=0),Ee(N,N,y)}(6e4);(0,ot.z)(Te,st).subscribe(()=>{De.checkForUpdate().then(Bt=>{!0===Bt&&this.updateApp()})}),this.isConnected=(0,Ne.T)((0,xe.of)(navigator.onLine),(0,Nt.R)(window,"online").pipe((0,Ke.h)(!0)),(0,Nt.R)(window,"offline").pipe((0,Ke.h)(!1))),this.isConnected.subscribe(Bt=>{Bt||(this.showNotification=!0)})}updateApp(){confirm("A new version is available. wanna install it?")&&this.swUpdate.activateUpdate().then(()=>window.location.reload())}closeNotification(){this.showNotification=!1}}return N.\u0275fac=function(p){return new(p||N)(g.Y36(Lt.e),g.Y36(Se.sK),g.Y36(Ie.o),g.Y36(g.z2F),g.Y36(Dr))},N.\u0275cmp=g.Xpm({type:N,selectors:[["app-root"]],decls:6,vars:3,consts:[[2,"position","relative"],["class","alert alert-danger",4,"ngIf"],[1,"alert","alert-danger"],[1,"close",3,"click"]],template:function(p,T){1&p&&(g._UZ(0,"app-header"),g.TgZ(1,"div",0),g._UZ(2,"router-outlet"),g.YNc(3,zt,5,0,"p",1),g.ALo(4,"async"),g.qZA(),g._UZ(5,"app-footer")),2&p&&(g.xp6(3),g.Q6J("ngIf",!g.lcZ(4,1,T.isConnected)&&T.showNotification))},dependencies:[Ce.O5,oe.lC,Fr,Sr,Ce.Ov],styles:[".alert[_ngcontent-%COMP%]{position:sticky;bottom:0;text-align:center;padding-block:7px}.close[_ngcontent-%COMP%]{font-size:1.7rem;float:right;padding:3px;cursor:pointer}"]}),N})();const $e_firebase={apiKey:"AIzaSyAWW3RAmqZsTMr1I-mkgFp-NL7qoTMxtBU",authDomain:"ngauth-d9be6.firebaseapp.com",projectId:"ngauth-d9be6",storageBucket:"ngauth-d9be6.appspot.com",messagingSenderId:"80755048338",appId:"1:80755048338:web:86db9dd52a7b2bcfba4b4b",measurementId:"G-B0TT7KB705"};var Re=S(5415),ve=S(529),We=S(9832),_t=S(7340);const $t=!1;function _r(N){return new g.vHH(3e3,$t)}function Le(){return typeof window<"u"&&typeof window.document<"u"}function ct(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Rt(N){switch(N.length){case 0:return new _t.ZN;case 1:return N[0];default:return new _t.ZE(N)}}function tn(N,y,p,T,H=new Map,ne=new Map){const De=[],Te=[];let st=-1,wt=null;if(T.forEach(Bt=>{const x=Bt.get("offset"),F=x==st,Y=F&&wt||new Map;Bt.forEach((ue,ke)=>{let tt=ke,Ot=ue;if("offset"!==ke)switch(tt=y.normalizePropertyName(tt,De),Ot){case _t.k1:Ot=H.get(ke);break;case _t.l3:Ot=ne.get(ke);break;default:Ot=y.normalizeStyleValue(ke,tt,Ot,De)}Y.set(tt,Ot)}),F||Te.push(Y),wt=Y,st=x}),De.length)throw function Us(N){return new g.vHH(3502,$t)}();return Te}function cn(N,y,p,T){switch(y){case"start":N.onStart(()=>T(p&&Ir(p,"start",N)));break;case"done":N.onDone(()=>T(p&&Ir(p,"done",N)));break;case"destroy":N.onDestroy(()=>T(p&&Ir(p,"destroy",N)))}}function Ir(N,y,p){const ne=Wr(N.element,N.triggerName,N.fromState,N.toState,y||N.phaseName,p.totalTime??N.totalTime,!!p.disabled),De=N._data;return null!=De&&(ne._data=De),ne}function Wr(N,y,p,T,H="",ne=0,De){return{element:N,triggerName:y,fromState:p,toState:T,phaseName:H,totalTime:ne,disabled:!!De}}function Wn(N,y,p){let T=N.get(y);return T||N.set(y,T=p),T}function Cr(N){const y=N.indexOf(":");return[N.substring(1,y),N.slice(y+1)]}let $i=(N,y)=>!1,Hi=(N,y,p)=>[],vs=null;function ni(N){const y=N.parentNode||N.host;return y===vs?null:y}(ct()||typeof Element<"u")&&(Le()?(vs=(()=>document.documentElement)(),$i=(N,y)=>{for(;y;){if(y===N)return!0;y=ni(y)}return!1}):$i=(N,y)=>N.contains(y),Hi=(N,y,p)=>{if(p)return Array.from(N.querySelectorAll(y));const T=N.querySelector(y);return T?[T]:[]});let Gi=null,Es=!1;const Rs=$i,ws=Hi;let Ns=(()=>{class N{validateStyleProperty(p){return function io(N){Gi||(Gi=function qs(){return typeof document<"u"?document.body:null}()||{},Es=!!Gi.style&&"WebkitAppearance"in Gi.style);let y=!0;return Gi.style&&!function Xi(N){return"ebkit"==N.substring(1,6)}(N)&&(y=N in Gi.style,!y&&Es&&(y="Webkit"+N.charAt(0).toUpperCase()+N.slice(1)in Gi.style)),y}(p)}matchesElement(p,T){return!1}containsElement(p,T){return Rs(p,T)}getParentElement(p){return ni(p)}query(p,T,H){return ws(p,T,H)}computeStyle(p,T,H){return H||""}animate(p,T,H,ne,De,Te=[],st){return new _t.ZN(H,ne)}}return N.\u0275fac=function(p){return new(p||N)},N.\u0275prov=g.Yz7({token:N,factory:N.\u0275fac}),N})(),ks=(()=>{class N{}return N.NOOP=new Ns,N})();const Fs="ng-enter",Ki="ng-leave",vo="ng-trigger",Qr=".ng-trigger",Uo="ng-animating",yi=".ng-animating";function os(N){if("number"==typeof N)return N;const y=N.match(/^(-?[\.\d]+)(m?s)/);return!y||y.length<2?0:ir(parseFloat(y[1]),y[2])}function ir(N,y){return"s"===y?1e3*N:N}function xi(N,y,p){return N.hasOwnProperty("duration")?N:function es(N,y,p){let H,ne=0,De="";if("string"==typeof N){const Te=N.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===Te)return y.push(_r()),{duration:0,delay:0,easing:""};H=ir(parseFloat(Te[1]),Te[2]);const st=Te[3];null!=st&&(ne=ir(parseFloat(st),Te[4]));const wt=Te[5];wt&&(De=wt)}else H=N;if(!p){let Te=!1,st=y.length;H<0&&(y.push(function yn(){return new g.vHH(3100,$t)}()),Te=!0),ne<0&&(y.push(function Mr(){return new g.vHH(3101,$t)}()),Te=!0),Te&&y.splice(st,0,_r())}return{duration:H,delay:ne,easing:De}}(N,y,p)}function sr(N,y={}){return Object.keys(N).forEach(p=>{y[p]=N[p]}),y}function L(N){const y=new Map;return Object.keys(N).forEach(p=>{y.set(p,N[p])}),y}function Q(N,y=new Map,p){if(p)for(let[T,H]of p)y.set(T,H);for(let[T,H]of N)y.set(T,H);return y}function Ve(N,y,p){return p?y+":"+p+";":""}function At(N){let y="";for(let p=0;p{const ne=$r(H);p&&!p.has(H)&&p.set(H,N.style[ne]),N.style[ne]=T}),ct()&&At(N))}function Jt(N,y){N.style&&(y.forEach((p,T)=>{const H=$r(T);N.style[H]=""}),ct()&&At(N))}function cr(N){return Array.isArray(N)?1==N.length?N[0]:(0,_t.vP)(N):N}const Tr=new RegExp("{{\\s*(.+?)\\s*}}","g");function Zn(N){let y=[];if("string"==typeof N){let p;for(;p=Tr.exec(N);)y.push(p[1]);Tr.lastIndex=0}return y}function Lr(N,y,p){const T=N.toString(),H=T.replace(Tr,(ne,De)=>{let Te=y[De];return null==Te&&(p.push(function ki(N){return new g.vHH(3003,$t)}()),Te=""),Te.toString()});return H==T?N:H}function or(N){const y=[];let p=N.next();for(;!p.done;)y.push(p.value),p=N.next();return y}const Dn=/-+([a-z0-9])/g;function $r(N){return N.replace(Dn,(...y)=>y[1].toUpperCase())}function li(N){return N.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Si(N,y,p){switch(y.type){case 7:return N.visitTrigger(y,p);case 0:return N.visitState(y,p);case 1:return N.visitTransition(y,p);case 2:return N.visitSequence(y,p);case 3:return N.visitGroup(y,p);case 4:return N.visitAnimate(y,p);case 5:return N.visitKeyframes(y,p);case 6:return N.visitStyle(y,p);case 8:return N.visitReference(y,p);case 9:return N.visitAnimateChild(y,p);case 10:return N.visitAnimateRef(y,p);case 11:return N.visitQuery(y,p);case 12:return N.visitStagger(y,p);default:throw function wi(N){return new g.vHH(3004,$t)}()}}function Oi(N,y){return window.getComputedStyle(N)[y]}function ri(N,y){const p=[];return"string"==typeof N?N.split(/\s*,\s*/).forEach(T=>function js(N,y,p){if(":"==N[0]){const st=function Ko(N,y){switch(N){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(p,T)=>parseFloat(T)>parseFloat(p);case":decrement":return(p,T)=>parseFloat(T) *"}}(N,p);if("function"==typeof st)return void y.push(st);N=st}const T=N.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==T||T.length<4)return p.push(function ai(N){return new g.vHH(3015,$t)}()),y;const H=T[1],ne=T[2],De=T[3];y.push(Oe(H,De));"<"==ne[0]&&!("*"==H&&"*"==De)&&y.push(Oe(De,H))}(T,p,y)):p.push(N),p}const Dt=new Set(["true","1"]),ze=new Set(["false","0"]);function Oe(N,y){const p=Dt.has(N)||ze.has(N),T=Dt.has(y)||ze.has(y);return(H,ne)=>{let De="*"==N||N==H,Te="*"==y||y==ne;return!De&&p&&"boolean"==typeof H&&(De=H?Dt.has(N):ze.has(N)),!Te&&T&&"boolean"==typeof ne&&(Te=ne?Dt.has(y):ze.has(y)),De&&Te}}const Pt=new RegExp("s*:selfs*,?","g");function In(N,y,p,T){return new br(N).build(y,p,T)}class br{constructor(y){this._driver=y}build(y,p,T){const H=new Zr(p);return this._resetContextStyleTimingState(H),Si(this,cr(y),H)}_resetContextStyleTimingState(y){y.currentQuerySelector="",y.collectedStyles=new Map,y.collectedStyles.set("",new Map),y.currentTime=0}visitTrigger(y,p){let T=p.queryCount=0,H=p.depCount=0;const ne=[],De=[];return"@"==y.name.charAt(0)&&p.errors.push(function ss(){return new g.vHH(3006,$t)}()),y.definitions.forEach(Te=>{if(this._resetContextStyleTimingState(p),0==Te.type){const st=Te,wt=st.name;wt.toString().split(/\s*,\s*/).forEach(Bt=>{st.name=Bt,ne.push(this.visitState(st,p))}),st.name=wt}else if(1==Te.type){const st=this.visitTransition(Te,p);T+=st.queryCount,H+=st.depCount,De.push(st)}else p.errors.push(function Ai(){return new g.vHH(3007,$t)}())}),{type:7,name:y.name,states:ne,transitions:De,queryCount:T,depCount:H,options:null}}visitState(y,p){const T=this.visitStyle(y.styles,p),H=y.options&&y.options.params||null;if(T.containsDynamicStyles){const ne=new Set,De=H||{};T.styles.forEach(Te=>{Te instanceof Map&&Te.forEach(st=>{Zn(st).forEach(wt=>{De.hasOwnProperty(wt)||ne.add(wt)})})}),ne.size&&(or(ne.values()),p.errors.push(function Gr(N,y){return new g.vHH(3008,$t)}()))}return{type:0,name:y.name,style:T,options:H?{params:H}:null}}visitTransition(y,p){p.queryCount=0,p.depCount=0;const T=Si(this,cr(y.animation),p);return{type:1,matchers:ri(y.expr,p.errors),animation:T,queryCount:p.queryCount,depCount:p.depCount,options:$s(y.options)}}visitSequence(y,p){return{type:2,steps:y.steps.map(T=>Si(this,T,p)),options:$s(y.options)}}visitGroup(y,p){const T=p.currentTime;let H=0;const ne=y.steps.map(De=>{p.currentTime=T;const Te=Si(this,De,p);return H=Math.max(H,p.currentTime),Te});return p.currentTime=H,{type:3,steps:ne,options:$s(y.options)}}visitAnimate(y,p){const T=function yu(N,y){if(N.hasOwnProperty("duration"))return N;if("number"==typeof N)return da(xi(N,y).duration,0,"");const p=N;if(p.split(/\s+/).some(ne=>"{"==ne.charAt(0)&&"{"==ne.charAt(1))){const ne=da(0,0,"");return ne.dynamic=!0,ne.strValue=p,ne}const H=xi(p,y);return da(H.duration,H.delay,H.easing)}(y.timings,p.errors);p.currentAnimateTimings=T;let H,ne=y.styles?y.styles:(0,_t.oB)({});if(5==ne.type)H=this.visitKeyframes(ne,p);else{let De=y.styles,Te=!1;if(!De){Te=!0;const wt={};T.easing&&(wt.easing=T.easing),De=(0,_t.oB)(wt)}p.currentTime+=T.duration+T.delay;const st=this.visitStyle(De,p);st.isEmptyStep=Te,H=st}return p.currentAnimateTimings=null,{type:4,timings:T,style:H,options:null}}visitStyle(y,p){const T=this._makeStyleAst(y,p);return this._validateStyleAst(T,p),T}_makeStyleAst(y,p){const T=[],H=Array.isArray(y.styles)?y.styles:[y.styles];for(let Te of H)"string"==typeof Te?Te===_t.l3?T.push(Te):p.errors.push(new g.vHH(3002,$t)):T.push(L(Te));let ne=!1,De=null;return T.forEach(Te=>{if(Te instanceof Map&&(Te.has("easing")&&(De=Te.get("easing"),Te.delete("easing")),!ne))for(let st of Te.values())if(st.toString().indexOf("{{")>=0){ne=!0;break}}),{type:6,styles:T,easing:De,offset:y.offset,containsDynamicStyles:ne,options:null}}_validateStyleAst(y,p){const T=p.currentAnimateTimings;let H=p.currentTime,ne=p.currentTime;T&&ne>0&&(ne-=T.duration+T.delay),y.styles.forEach(De=>{"string"!=typeof De&&De.forEach((Te,st)=>{const wt=p.collectedStyles.get(p.currentQuerySelector),Bt=wt.get(st);let x=!0;Bt&&(ne!=H&&ne>=Bt.startTime&&H<=Bt.endTime&&(p.errors.push(function vr(N,y,p,T,H){return new g.vHH(3010,$t)}()),x=!1),ne=Bt.startTime),x&&wt.set(st,{startTime:ne,endTime:H}),p.options&&function gr(N,y,p){const T=y.params||{},H=Zn(N);H.length&&H.forEach(ne=>{T.hasOwnProperty(ne)||p.push(function Ji(N){return new g.vHH(3001,$t)}())})}(Te,p.options,p.errors)})})}visitKeyframes(y,p){const T={type:5,styles:[],options:null};if(!p.currentAnimateTimings)return p.errors.push(function ps(){return new g.vHH(3011,$t)}()),T;let ne=0;const De=[];let Te=!1,st=!1,wt=0;const Bt=y.steps.map(Ot=>{const an=this._makeStyleAst(Ot,p);let Sn=null!=an.offset?an.offset:function Wo(N){if("string"==typeof N)return null;let y=null;if(Array.isArray(N))N.forEach(p=>{if(p instanceof Map&&p.has("offset")){const T=p;y=parseFloat(T.get("offset")),T.delete("offset")}});else if(N instanceof Map&&N.has("offset")){const p=N;y=parseFloat(p.get("offset")),p.delete("offset")}return y}(an.styles),kn=0;return null!=Sn&&(ne++,kn=an.offset=Sn),st=st||kn<0||kn>1,Te=Te||kn0&&ne{const Sn=F>0?an==Y?1:F*an:De[an],kn=Sn*tt;p.currentTime=ue+ke.delay+kn,ke.duration=kn,this._validateStyleAst(Ot,p),Ot.offset=Sn,T.styles.push(Ot)}),T}visitReference(y,p){return{type:8,animation:Si(this,cr(y.animation),p),options:$s(y.options)}}visitAnimateChild(y,p){return p.depCount++,{type:9,options:$s(y.options)}}visitAnimateRef(y,p){return{type:10,animation:this.visitReference(y.animation,p),options:$s(y.options)}}visitQuery(y,p){const T=p.currentQuerySelector,H=y.options||{};p.queryCount++,p.currentQuery=y;const[ne,De]=function di(N){const y=!!N.split(/\s*,\s*/).find(p=>":self"==p);return y&&(N=N.replace(Pt,"")),N=N.replace(/@\*/g,Qr).replace(/@\w+/g,p=>Qr+"-"+p.slice(1)).replace(/:animating/g,yi),[N,y]}(y.selector);p.currentQuerySelector=T.length?T+" "+ne:ne,Wn(p.collectedStyles,p.currentQuerySelector,new Map);const Te=Si(this,cr(y.animation),p);return p.currentQuery=null,p.currentQuerySelector=T,{type:11,selector:ne,limit:H.limit||0,optional:!!H.optional,includeSelf:De,animation:Te,originalSelector:y.selector,options:$s(y.options)}}visitStagger(y,p){p.currentQuery||p.errors.push(function Fi(){return new g.vHH(3013,$t)}());const T="full"===y.timings?{duration:0,delay:0,easing:"full"}:xi(y.timings,p.errors,!0);return{type:12,animation:Si(this,cr(y.animation),p),timings:T,options:null}}}class Zr{constructor(y){this.errors=y,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set,this.nonAnimatableCSSPropertiesFound=new Set}}function $s(N){return N?(N=sr(N)).params&&(N.params=function Eo(N){return N?sr(N):null}(N.params)):N={},N}function da(N,y,p){return{duration:N,delay:y,easing:p}}function Zo(N,y,p,T,H,ne,De=null,Te=!1){return{type:1,element:N,keyframes:y,preStyleProps:p,postStyleProps:T,duration:H,delay:ne,totalTime:H+ne,easing:De,subTimeline:Te}}class Bo{constructor(){this._map=new Map}get(y){return this._map.get(y)||[]}append(y,p){let T=this._map.get(y);T||this._map.set(y,T=[]),T.push(...p)}has(y){return this._map.has(y)}clear(){this._map.clear()}}const oo=new RegExp(":enter","g"),Ys=new RegExp(":leave","g");function Yo(N,y,p,T,H,ne=new Map,De=new Map,Te,st,wt=[]){return(new Pa).buildKeyframes(N,y,p,T,H,ne,De,Te,st,wt)}class Pa{buildKeyframes(y,p,T,H,ne,De,Te,st,wt,Bt=[]){wt=wt||new Bo;const x=new xo(y,p,wt,H,ne,Bt,[]);x.options=st;const F=st.delay?os(st.delay):0;x.currentTimeline.delayNextStep(F),x.currentTimeline.setStyles([De],null,x.errors,st),Si(this,T,x);const Y=x.timelines.filter(ue=>ue.containsAnimation());if(Y.length&&Te.size){let ue;for(let ke=Y.length-1;ke>=0;ke--){const tt=Y[ke];if(tt.element===p){ue=tt;break}}ue&&!ue.allowOnlyTimelineStyles()&&ue.setStyles([Te],null,x.errors,st)}return Y.length?Y.map(ue=>ue.buildKeyframes()):[Zo(p,[],[],[],0,F,"",!1)]}visitTrigger(y,p){}visitState(y,p){}visitTransition(y,p){}visitAnimateChild(y,p){const T=p.subInstructions.get(p.element);if(T){const H=p.createSubContext(y.options),ne=p.currentTimeline.currentTime,De=this._visitSubInstructions(T,H,H.options);ne!=De&&p.transformIntoNewTimeline(De)}p.previousNode=y}visitAnimateRef(y,p){const T=p.createSubContext(y.options);T.transformIntoNewTimeline(),this.visitReference(y.animation,T),p.transformIntoNewTimeline(T.currentTimeline.currentTime),p.previousNode=y}_visitSubInstructions(y,p,T){let ne=p.currentTimeline.currentTime;const De=null!=T.duration?os(T.duration):null,Te=null!=T.delay?os(T.delay):null;return 0!==De&&y.forEach(st=>{const wt=p.appendInstructionToTimeline(st,De,Te);ne=Math.max(ne,wt.duration+wt.delay)}),ne}visitReference(y,p){p.updateOptions(y.options,!0),Si(this,y.animation,p),p.previousNode=y}visitSequence(y,p){const T=p.subContextCount;let H=p;const ne=y.options;if(ne&&(ne.params||ne.delay)&&(H=p.createSubContext(ne),H.transformIntoNewTimeline(),null!=ne.delay)){6==H.previousNode.type&&(H.currentTimeline.snapshotCurrentStyles(),H.previousNode=wo);const De=os(ne.delay);H.delayNextStep(De)}y.steps.length&&(y.steps.forEach(De=>Si(this,De,H)),H.currentTimeline.applyStylesToKeyframe(),H.subContextCount>T&&H.transformIntoNewTimeline()),p.previousNode=y}visitGroup(y,p){const T=[];let H=p.currentTimeline.currentTime;const ne=y.options&&y.options.delay?os(y.options.delay):0;y.steps.forEach(De=>{const Te=p.createSubContext(y.options);ne&&Te.delayNextStep(ne),Si(this,De,Te),H=Math.max(H,Te.currentTimeline.currentTime),T.push(Te.currentTimeline)}),T.forEach(De=>p.currentTimeline.mergeTimelineCollectedStyles(De)),p.transformIntoNewTimeline(H),p.previousNode=y}_visitTiming(y,p){if(y.dynamic){const T=y.strValue;return xi(p.params?Lr(T,p.params,p.errors):T,p.errors)}return{duration:y.duration,delay:y.delay,easing:y.easing}}visitAnimate(y,p){const T=p.currentAnimateTimings=this._visitTiming(y.timings,p),H=p.currentTimeline;T.delay&&(p.incrementTime(T.delay),H.snapshotCurrentStyles());const ne=y.style;5==ne.type?this.visitKeyframes(ne,p):(p.incrementTime(T.duration),this.visitStyle(ne,p),H.applyStylesToKeyframe()),p.currentAnimateTimings=null,p.previousNode=y}visitStyle(y,p){const T=p.currentTimeline,H=p.currentAnimateTimings;!H&&T.hasCurrentStyleProperties()&&T.forwardFrame();const ne=H&&H.easing||y.easing;y.isEmptyStep?T.applyEmptyStep(ne):T.setStyles(y.styles,ne,p.errors,p.options),p.previousNode=y}visitKeyframes(y,p){const T=p.currentAnimateTimings,H=p.currentTimeline.duration,ne=T.duration,Te=p.createSubContext().currentTimeline;Te.easing=T.easing,y.styles.forEach(st=>{Te.forwardTime((st.offset||0)*ne),Te.setStyles(st.styles,st.easing,p.errors,p.options),Te.applyStylesToKeyframe()}),p.currentTimeline.mergeTimelineCollectedStyles(Te),p.transformIntoNewTimeline(H+ne),p.previousNode=y}visitQuery(y,p){const T=p.currentTimeline.currentTime,H=y.options||{},ne=H.delay?os(H.delay):0;ne&&(6===p.previousNode.type||0==T&&p.currentTimeline.hasCurrentStyleProperties())&&(p.currentTimeline.snapshotCurrentStyles(),p.previousNode=wo);let De=T;const Te=p.invokeQuery(y.selector,y.originalSelector,y.limit,y.includeSelf,!!H.optional,p.errors);p.currentQueryTotal=Te.length;let st=null;Te.forEach((wt,Bt)=>{p.currentQueryIndex=Bt;const x=p.createSubContext(y.options,wt);ne&&x.delayNextStep(ne),wt===p.element&&(st=x.currentTimeline),Si(this,y.animation,x),x.currentTimeline.applyStylesToKeyframe(),De=Math.max(De,x.currentTimeline.currentTime)}),p.currentQueryIndex=0,p.currentQueryTotal=0,p.transformIntoNewTimeline(De),st&&(p.currentTimeline.mergeTimelineCollectedStyles(st),p.currentTimeline.snapshotCurrentStyles()),p.previousNode=y}visitStagger(y,p){const T=p.parentContext,H=p.currentTimeline,ne=y.timings,De=Math.abs(ne.duration),Te=De*(p.currentQueryTotal-1);let st=De*p.currentQueryIndex;switch(ne.duration<0?"reverse":ne.easing){case"reverse":st=Te-st;break;case"full":st=T.currentStaggerTime}const Bt=p.currentTimeline;st&&Bt.delayNextStep(st);const x=Bt.currentTime;Si(this,y.animation,p),p.previousNode=y,T.currentStaggerTime=H.currentTime-x+(H.startTime-T.currentTimeline.startTime)}}const wo={};class xo{constructor(y,p,T,H,ne,De,Te,st){this._driver=y,this.element=p,this.subInstructions=T,this._enterClassName=H,this._leaveClassName=ne,this.errors=De,this.timelines=Te,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=wo,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=st||new Qo(this._driver,p,0),Te.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(y,p){if(!y)return;const T=y;let H=this.options;null!=T.duration&&(H.duration=os(T.duration)),null!=T.delay&&(H.delay=os(T.delay));const ne=T.params;if(ne){let De=H.params;De||(De=this.options.params={}),Object.keys(ne).forEach(Te=>{(!p||!De.hasOwnProperty(Te))&&(De[Te]=Lr(ne[Te],De,this.errors))})}}_copyOptions(){const y={};if(this.options){const p=this.options.params;if(p){const T=y.params={};Object.keys(p).forEach(H=>{T[H]=p[H]})}}return y}createSubContext(y=null,p,T){const H=p||this.element,ne=new xo(this._driver,H,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(H,T||0));return ne.previousNode=this.previousNode,ne.currentAnimateTimings=this.currentAnimateTimings,ne.options=this._copyOptions(),ne.updateOptions(y),ne.currentQueryIndex=this.currentQueryIndex,ne.currentQueryTotal=this.currentQueryTotal,ne.parentContext=this,this.subContextCount++,ne}transformIntoNewTimeline(y){return this.previousNode=wo,this.currentTimeline=this.currentTimeline.fork(this.element,y),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(y,p,T){const H={duration:p??y.duration,delay:this.currentTimeline.currentTime+(T??0)+y.delay,easing:""},ne=new Bi(this._driver,y.element,y.keyframes,y.preStyleProps,y.postStyleProps,H,y.stretchStartingKeyframe);return this.timelines.push(ne),H}incrementTime(y){this.currentTimeline.forwardTime(this.currentTimeline.duration+y)}delayNextStep(y){y>0&&this.currentTimeline.delayNextStep(y)}invokeQuery(y,p,T,H,ne,De){let Te=[];if(H&&Te.push(this.element),y.length>0){y=(y=y.replace(oo,"."+this._enterClassName)).replace(Ys,"."+this._leaveClassName);let wt=this._driver.query(this.element,y,1!=T);0!==T&&(wt=T<0?wt.slice(wt.length+T,wt.length):wt.slice(0,T)),Te.push(...wt)}return!ne&&0==Te.length&&De.push(function Li(N){return new g.vHH(3014,$t)}()),Te}}class Qo{constructor(y,p,T,H){this._driver=y,this.element=p,this.startTime=T,this._elementTimelineStylesLookup=H,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(p),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(p,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(y){const p=1===this._keyframes.size&&this._pendingStyles.size;this.duration||p?(this.forwardTime(this.currentTime+y),p&&this.snapshotCurrentStyles()):this.startTime+=y}fork(y,p){return this.applyStylesToKeyframe(),new Qo(this._driver,y,p||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(y){this.applyStylesToKeyframe(),this.duration=y,this._loadKeyframe()}_updateStyle(y,p){this._localTimelineStyles.set(y,p),this._globalTimelineStyles.set(y,p),this._styleSummary.set(y,{time:this.currentTime,value:p})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(y){y&&this._previousKeyframe.set("easing",y);for(let[p,T]of this._globalTimelineStyles)this._backFill.set(p,T||_t.l3),this._currentKeyframe.set(p,_t.l3);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(y,p,T,H){p&&this._previousKeyframe.set("easing",p);const ne=H&&H.params||{},De=function ii(N,y){const p=new Map;let T;return N.forEach(H=>{if("*"===H){T=T||y.keys();for(let ne of T)p.set(ne,_t.l3)}else Q(H,p)}),p}(y,this._globalTimelineStyles);for(let[Te,st]of De){const wt=Lr(st,ne,T);this._pendingStyles.set(Te,wt),this._localTimelineStyles.has(Te)||this._backFill.set(Te,this._globalTimelineStyles.get(Te)||_t.l3),this._updateStyle(Te,wt)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((y,p)=>{this._currentKeyframe.set(p,y)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((y,p)=>{this._currentKeyframe.has(p)||this._currentKeyframe.set(p,y)}))}snapshotCurrentStyles(){for(let[y,p]of this._localTimelineStyles)this._pendingStyles.set(y,p),this._updateStyle(y,p)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const y=[];for(let p in this._currentKeyframe)y.push(p);return y}mergeTimelineCollectedStyles(y){y._styleSummary.forEach((p,T)=>{const H=this._styleSummary.get(T);(!H||p.time>H.time)&&this._updateStyle(T,p.value)})}buildKeyframes(){this.applyStylesToKeyframe();const y=new Set,p=new Set,T=1===this._keyframes.size&&0===this.duration;let H=[];this._keyframes.forEach((Te,st)=>{const wt=Q(Te,new Map,this._backFill);wt.forEach((Bt,x)=>{Bt===_t.k1?y.add(x):Bt===_t.l3&&p.add(x)}),T||wt.set("offset",st/this.duration),H.push(wt)});const ne=y.size?or(y.values()):[],De=p.size?or(p.values()):[];if(T){const Te=H[0],st=new Map(Te);Te.set("offset",0),st.set("offset",1),H=[Te,st]}return Zo(this.element,H,ne,De,this.duration,this.startTime,this.easing,!1)}}class Bi extends Qo{constructor(y,p,T,H,ne,De,Te=!1){super(y,p,De.delay),this.keyframes=T,this.preStyleProps=H,this.postStyleProps=ne,this._stretchStartingKeyframe=Te,this.timings={duration:De.duration,delay:De.delay,easing:De.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let y=this.keyframes,{delay:p,duration:T,easing:H}=this.timings;if(this._stretchStartingKeyframe&&p){const ne=[],De=T+p,Te=p/De,st=Q(y[0]);st.set("offset",0),ne.push(st);const wt=Q(y[0]);wt.set("offset",Hs(Te)),ne.push(wt);const Bt=y.length-1;for(let x=1;x<=Bt;x++){let F=Q(y[x]);const Y=F.get("offset");F.set("offset",Hs((p+Y*T)/De)),ne.push(F)}T=De,p=0,H="",y=ne}return Zo(this.element,y,this.preStyleProps,this.postStyleProps,T,p,H,!0)}}function Hs(N,y=3){const p=Math.pow(10,y-1);return Math.round(N*p)/p}class bo{}const Na=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class Do extends bo{normalizePropertyName(y,p){return $r(y)}normalizeStyleValue(y,p,T,H){let ne="";const De=T.toString().trim();if(Na.has(p)&&0!==T&&"0"!==T)if("number"==typeof T)ne="px";else{const Te=T.match(/^[+-]?[\d\.]+([a-z]*)$/);Te&&0==Te[1].length&&H.push(function Vr(N,y){return new g.vHH(3005,$t)}())}return De+ne}}function Jo(N,y,p,T,H,ne,De,Te,st,wt,Bt,x,F){return{type:0,element:N,triggerName:y,isRemovalTransition:H,fromState:p,fromStyles:ne,toState:T,toStyles:De,timelines:Te,queriedElements:st,preStyleProps:wt,postStyleProps:Bt,totalTime:x,errors:F}}const Xo={};class Oo{constructor(y,p,T){this._triggerName=y,this.ast=p,this._stateStyles=T}match(y,p,T,H){return function ha(N,y,p,T,H){return N.some(ne=>ne(y,p,T,H))}(this.ast.matchers,y,p,T,H)}buildStyles(y,p,T){let H=this._stateStyles.get("*");return void 0!==y&&(H=this._stateStyles.get(y?.toString())||H),H?H.buildStyles(p,T):new Map}build(y,p,T,H,ne,De,Te,st,wt,Bt){const x=[],F=this.ast.options&&this.ast.options.params||Xo,ue=this.buildStyles(T,Te&&Te.params||Xo,x),ke=st&&st.params||Xo,tt=this.buildStyles(H,ke,x),Ot=new Set,an=new Map,Sn=new Map,kn="void"===H,Vn={params:ea(ke,F),delay:this.ast.options?.delay},xn=Bt?[]:Yo(y,p,this.ast.animation,ne,De,ue,tt,Vn,wt,x);let mr=0;if(xn.forEach(Ii=>{mr=Math.max(Ii.duration+Ii.delay,mr)}),x.length)return Jo(p,this._triggerName,T,H,kn,ue,tt,[],[],an,Sn,mr,x);xn.forEach(Ii=>{const Xs=Ii.element,eo=Wn(an,Xs,new Set);Ii.preStyleProps.forEach(ls=>eo.add(ls));const ia=Wn(Sn,Xs,new Set);Ii.postStyleProps.forEach(ls=>ia.add(ls)),Xs!==p&&Ot.add(Xs)});const fi=or(Ot.values());return Jo(p,this._triggerName,T,H,kn,ue,tt,xn,fi,an,Sn,mr)}}function ea(N,y){const p=sr(y);for(const T in N)N.hasOwnProperty(T)&&null!=N[T]&&(p[T]=N[T]);return p}class Ri{constructor(y,p,T){this.styles=y,this.defaultParams=p,this.normalizer=T}buildStyles(y,p){const T=new Map,H=sr(this.defaultParams);return Object.keys(y).forEach(ne=>{const De=y[ne];null!==De&&(H[ne]=De)}),this.styles.styles.forEach(ne=>{"string"!=typeof ne&&ne.forEach((De,Te)=>{De&&(De=Lr(De,H,p));const st=this.normalizer.normalizePropertyName(Te,p);De=this.normalizer.normalizeStyleValue(Te,st,De,p),T.set(st,De)})}),T}}class Ro{constructor(y,p,T){this.name=y,this.ast=p,this._normalizer=T,this.transitionFactories=[],this.states=new Map,p.states.forEach(H=>{this.states.set(H.name,new Ri(H.style,H.options&&H.options.params||{},T))}),ka(this.states,"true","1"),ka(this.states,"false","0"),p.transitions.forEach(H=>{this.transitionFactories.push(new Oo(y,H,this.states))}),this.fallbackTransition=function _i(N,y,p){return new Oo(N,{type:1,animation:{type:2,steps:[],options:null},matchers:[(De,Te)=>!0],options:null,queryCount:0,depCount:0},y)}(y,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(y,p,T,H){return this.transitionFactories.find(De=>De.match(y,p,T,H))||null}matchStyles(y,p,T){return this.fallbackTransition.buildStyles(y,p,T)}}function ka(N,y,p){N.has(y)?N.has(p)||N.set(p,N.get(y)):N.has(p)&&N.set(y,N.get(p))}const ta=new Bo;class Po{constructor(y,p,T){this.bodyNode=y,this._driver=p,this._normalizer=T,this._animations=new Map,this._playersById=new Map,this.players=[]}register(y,p){const T=[],ne=In(this._driver,p,T,[]);if(T.length)throw function _s(N){return new g.vHH(3503,$t)}();this._animations.set(y,ne)}_buildPlayer(y,p,T){const H=y.element,ne=tn(0,this._normalizer,0,y.keyframes,p,T);return this._driver.animate(H,ne,y.duration,y.delay,y.easing,[],!0)}create(y,p,T={}){const H=[],ne=this._animations.get(y);let De;const Te=new Map;if(ne?(De=Yo(this._driver,p,ne,Fs,Ki,new Map,new Map,T,ta,H),De.forEach(Bt=>{const x=Wn(Te,Bt.element,new Map);Bt.postStyleProps.forEach(F=>x.set(F,null))})):(H.push(function xs(){return new g.vHH(3300,$t)}()),De=[]),H.length)throw function Vi(N){return new g.vHH(3504,$t)}();Te.forEach((Bt,x)=>{Bt.forEach((F,Y)=>{Bt.set(Y,this._driver.computeStyle(x,Y,_t.l3))})});const wt=Rt(De.map(Bt=>{const x=Te.get(Bt.element);return this._buildPlayer(Bt,new Map,x)}));return this._playersById.set(y,wt),wt.onDestroy(()=>this.destroy(y)),this.players.push(wt),wt}destroy(y){const p=this._getPlayer(y);p.destroy(),this._playersById.delete(y);const T=this.players.indexOf(p);T>=0&&this.players.splice(T,1)}_getPlayer(y){const p=this._playersById.get(y);if(!p)throw function xr(N){return new g.vHH(3301,$t)}();return p}listen(y,p,T,H){const ne=Wr(p,"","","");return cn(this._getPlayer(y),T,ne,H),()=>{}}command(y,p,T,H){if("register"==T)return void this.register(y,H[0]);if("create"==T)return void this.create(y,p,H[0]||{});const ne=this._getPlayer(y);switch(T){case"play":ne.play();break;case"pause":ne.pause();break;case"reset":ne.reset();break;case"restart":ne.restart();break;case"finish":ne.finish();break;case"init":ne.init();break;case"setPosition":ne.setPosition(parseFloat(H[0]));break;case"destroy":this.destroy(y)}}}const Ds="ng-animate-queued",Is="ng-animate-disabled",Eu=[],Fa={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},pa={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Cs="__ng_removed";class wu{constructor(y,p=""){this.namespaceId=p;const T=y&&y.hasOwnProperty("value");if(this.value=function No(N){return N??null}(T?y.value:y),T){const ne=sr(y);delete ne.value,this.options=ne}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(y){const p=y.params;if(p){const T=this.options.params;Object.keys(p).forEach(H=>{null==T[H]&&(T[H]=p[H])})}}}const us="void",Da=new wu(us);class jo{constructor(y,p,T){this.id=y,this.hostElement=p,this._engine=T,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+y,vi(p,this._hostClassName)}listen(y,p,T,H){if(!this._triggers.has(p))throw function Mo(N,y){return new g.vHH(3302,$t)}();if(null==T||0==T.length)throw function Os(N){return new g.vHH(3303,$t)}();if(!function Va(N){return"start"==N||"done"==N}(T))throw function Pi(N,y){return new g.vHH(3400,$t)}();const ne=Wn(this._elementListeners,y,[]),De={name:p,phase:T,callback:H};ne.push(De);const Te=Wn(this._engine.statesByElement,y,new Map);return Te.has(p)||(vi(y,vo),vi(y,vo+"-"+p),Te.set(p,Da)),()=>{this._engine.afterFlush(()=>{const st=ne.indexOf(De);st>=0&&ne.splice(st,1),this._triggers.has(p)||Te.delete(p)})}}register(y,p){return!this._triggers.has(y)&&(this._triggers.set(y,p),!0)}_getTrigger(y){const p=this._triggers.get(y);if(!p)throw function yo(N){return new g.vHH(3401,$t)}();return p}trigger(y,p,T,H=!0){const ne=this._getTrigger(p),De=new Io(this.id,p,y);let Te=this._engine.statesByElement.get(y);Te||(vi(y,vo),vi(y,vo+"-"+p),this._engine.statesByElement.set(y,Te=new Map));let st=Te.get(p);const wt=new wu(T,this.id);if(!(T&&T.hasOwnProperty("value"))&&st&&wt.absorbOptions(st.options),Te.set(p,wt),st||(st=Da),wt.value!==us&&st.value===wt.value){if(!function En(N,y){const p=Object.keys(N),T=Object.keys(y);if(p.length!=T.length)return!1;for(let H=0;H{Jt(y,tt),Vt(y,Ot)})}return}const F=Wn(this._engine.playersByElement,y,[]);F.forEach(ke=>{ke.namespaceId==this.id&&ke.triggerName==p&&ke.queued&&ke.destroy()});let Y=ne.matchTransition(st.value,wt.value,y,wt.params),ue=!1;if(!Y){if(!H)return;Y=ne.fallbackTransition,ue=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:y,triggerName:p,transition:Y,fromState:st,toState:wt,player:De,isFallbackTransition:ue}),ue||(vi(y,Ds),De.onStart(()=>{Co(y,Ds)})),De.onDone(()=>{let ke=this.players.indexOf(De);ke>=0&&this.players.splice(ke,1);const tt=this._engine.playersByElement.get(y);if(tt){let Ot=tt.indexOf(De);Ot>=0&&tt.splice(Ot,1)}}),this.players.push(De),F.push(De),De}deregister(y){this._triggers.delete(y),this._engine.statesByElement.forEach(p=>p.delete(y)),this._elementListeners.forEach((p,T)=>{this._elementListeners.set(T,p.filter(H=>H.name!=y))})}clearElementCache(y){this._engine.statesByElement.delete(y),this._elementListeners.delete(y);const p=this._engine.playersByElement.get(y);p&&(p.forEach(T=>T.destroy()),this._engine.playersByElement.delete(y))}_signalRemovalForInnerTriggers(y,p){const T=this._engine.driver.query(y,Qr,!0);T.forEach(H=>{if(H[Cs])return;const ne=this._engine.fetchNamespacesByElement(H);ne.size?ne.forEach(De=>De.triggerLeaveAnimation(H,p,!1,!0)):this.clearElementCache(H)}),this._engine.afterFlushAnimationsDone(()=>T.forEach(H=>this.clearElementCache(H)))}triggerLeaveAnimation(y,p,T,H){const ne=this._engine.statesByElement.get(y),De=new Map;if(ne){const Te=[];if(ne.forEach((st,wt)=>{if(De.set(wt,st.value),this._triggers.has(wt)){const Bt=this.trigger(y,wt,us,H);Bt&&Te.push(Bt)}}),Te.length)return this._engine.markElementAsRemoved(this.id,y,!0,p,De),T&&Rt(Te).onDone(()=>this._engine.processLeaveNode(y)),!0}return!1}prepareLeaveAnimationListeners(y){const p=this._elementListeners.get(y),T=this._engine.statesByElement.get(y);if(p&&T){const H=new Set;p.forEach(ne=>{const De=ne.name;if(H.has(De))return;H.add(De);const st=this._triggers.get(De).fallbackTransition,wt=T.get(De)||Da,Bt=new wu(us),x=new Io(this.id,De,y);this._engine.totalQueuedPlayers++,this._queue.push({element:y,triggerName:De,transition:st,fromState:wt,toState:Bt,player:x,isFallbackTransition:!0})})}}removeNode(y,p){const T=this._engine;if(y.childElementCount&&this._signalRemovalForInnerTriggers(y,p),this.triggerLeaveAnimation(y,p,!0))return;let H=!1;if(T.totalAnimations){const ne=T.players.length?T.playersByQueriedElement.get(y):[];if(ne&&ne.length)H=!0;else{let De=y;for(;De=De.parentNode;)if(T.statesByElement.get(De)){H=!0;break}}}if(this.prepareLeaveAnimationListeners(y),H)T.markElementAsRemoved(this.id,y,!1,p);else{const ne=y[Cs];(!ne||ne===Fa)&&(T.afterFlush(()=>this.clearElementCache(y)),T.destroyInnerAnimations(y),T._onRemovalComplete(y,p))}}insertNode(y,p){vi(y,this._hostClassName)}drainQueuedTransitions(y){const p=[];return this._queue.forEach(T=>{const H=T.player;if(H.destroyed)return;const ne=T.element,De=this._elementListeners.get(ne);De&&De.forEach(Te=>{if(Te.name==T.triggerName){const st=Wr(ne,T.triggerName,T.fromState.value,T.toState.value);st._data=y,cn(T.player,Te.phase,st,Te.callback)}}),H.markedForDestroy?this._engine.afterFlush(()=>{H.destroy()}):p.push(T)}),this._queue=[],p.sort((T,H)=>{const ne=T.transition.ast.depCount,De=H.transition.ast.depCount;return 0==ne||0==De?ne-De:this._engine.driver.containsElement(T.element,H.element)?1:-1})}destroy(y){this.players.forEach(p=>p.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,y)}elementContainsData(y){let p=!1;return this._elementListeners.has(y)&&(p=!0),p=!!this._queue.find(T=>T.element===y)||p,p}}class La{constructor(y,p,T){this.bodyNode=y,this.driver=p,this._normalizer=T,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(H,ne)=>{}}_onRemovalComplete(y,p){this.onRemovalComplete(y,p)}get queuedPlayers(){const y=[];return this._namespaceList.forEach(p=>{p.players.forEach(T=>{T.queued&&y.push(T)})}),y}createNamespace(y,p){const T=new jo(y,p,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,p)?this._balanceNamespaceList(T,p):(this.newHostElements.set(p,T),this.collectEnterElement(p)),this._namespaceLookup[y]=T}_balanceNamespaceList(y,p){const T=this._namespaceList,H=this.namespacesByHostElement;if(T.length-1>=0){let De=!1,Te=this.driver.getParentElement(p);for(;Te;){const st=H.get(Te);if(st){const wt=T.indexOf(st);T.splice(wt+1,0,y),De=!0;break}Te=this.driver.getParentElement(Te)}De||T.unshift(y)}else T.push(y);return H.set(p,y),y}register(y,p){let T=this._namespaceLookup[y];return T||(T=this.createNamespace(y,p)),T}registerTrigger(y,p,T){let H=this._namespaceLookup[y];H&&H.register(p,T)&&this.totalAnimations++}destroy(y,p){if(!y)return;const T=this._fetchNamespace(y);this.afterFlush(()=>{this.namespacesByHostElement.delete(T.hostElement),delete this._namespaceLookup[y];const H=this._namespaceList.indexOf(T);H>=0&&this._namespaceList.splice(H,1)}),this.afterFlushAnimationsDone(()=>T.destroy(p))}_fetchNamespace(y){return this._namespaceLookup[y]}fetchNamespacesByElement(y){const p=new Set,T=this.statesByElement.get(y);if(T)for(let H of T.values())if(H.namespaceId){const ne=this._fetchNamespace(H.namespaceId);ne&&p.add(ne)}return p}trigger(y,p,T,H){if(Qs(p)){const ne=this._fetchNamespace(y);if(ne)return ne.trigger(p,T,H),!0}return!1}insertNode(y,p,T,H){if(!Qs(p))return;const ne=p[Cs];if(ne&&ne.setForRemoval){ne.setForRemoval=!1,ne.setForMove=!0;const De=this.collectedLeaveElements.indexOf(p);De>=0&&this.collectedLeaveElements.splice(De,1)}if(y){const De=this._fetchNamespace(y);De&&De.insertNode(p,T)}H&&this.collectEnterElement(p)}collectEnterElement(y){this.collectedEnterElements.push(y)}markElementAsDisabled(y,p){p?this.disabledNodes.has(y)||(this.disabledNodes.add(y),vi(y,Is)):this.disabledNodes.has(y)&&(this.disabledNodes.delete(y),Co(y,Is))}removeNode(y,p,T,H){if(Qs(p)){const ne=y?this._fetchNamespace(y):null;if(ne?ne.removeNode(p,H):this.markElementAsRemoved(y,p,!1,H),T){const De=this.namespacesByHostElement.get(p);De&&De.id!==y&&De.removeNode(p,H)}}else this._onRemovalComplete(p,H)}markElementAsRemoved(y,p,T,H,ne){this.collectedLeaveElements.push(p),p[Cs]={namespaceId:y,setForRemoval:H,hasAnimation:T,removedBeforeQueried:!1,previousTriggersValues:ne}}listen(y,p,T,H,ne){return Qs(p)?this._fetchNamespace(y).listen(p,T,H,ne):()=>{}}_buildInstruction(y,p,T,H,ne){return y.transition.build(this.driver,y.element,y.fromState.value,y.toState.value,T,H,y.fromState.options,y.toState.options,p,ne)}destroyInnerAnimations(y){let p=this.driver.query(y,Qr,!0);p.forEach(T=>this.destroyActiveAnimationsForElement(T)),0!=this.playersByQueriedElement.size&&(p=this.driver.query(y,yi,!0),p.forEach(T=>this.finishActiveQueriedAnimationOnElement(T)))}destroyActiveAnimationsForElement(y){const p=this.playersByElement.get(y);p&&p.forEach(T=>{T.queued?T.markedForDestroy=!0:T.destroy()})}finishActiveQueriedAnimationOnElement(y){const p=this.playersByQueriedElement.get(y);p&&p.forEach(T=>T.finish())}whenRenderingDone(){return new Promise(y=>{if(this.players.length)return Rt(this.players).onDone(()=>y());y()})}processLeaveNode(y){const p=y[Cs];if(p&&p.setForRemoval){if(y[Cs]=Fa,p.namespaceId){this.destroyInnerAnimations(y);const T=this._fetchNamespace(p.namespaceId);T&&T.clearElementCache(y)}this._onRemovalComplete(y,p.setForRemoval)}y.classList?.contains(Is)&&this.markElementAsDisabled(y,!1),this.driver.query(y,".ng-animate-disabled",!0).forEach(T=>{this.markElementAsDisabled(T,!1)})}flush(y=-1){let p=[];if(this.newHostElements.size&&(this.newHostElements.forEach((T,H)=>this._balanceNamespaceList(T,H)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let T=0;TT()),this._flushFns=[],this._whenQuietFns.length){const T=this._whenQuietFns;this._whenQuietFns=[],p.length?Rt(p).onDone(()=>{T.forEach(H=>H())}):T.forEach(H=>H())}}reportError(y){throw function Bs(N){return new g.vHH(3402,$t)}()}_flushAnimations(y,p){const T=new Bo,H=[],ne=new Map,De=[],Te=new Map,st=new Map,wt=new Map,Bt=new Set;this.disabledNodes.forEach(bn=>{Bt.add(bn);const Hn=this.driver.query(bn,".ng-animate-queued",!0);for(let Qn=0;Qn{const Qn=Fs+ke++;ue.set(Hn,Qn),bn.forEach(pr=>vi(pr,Qn))});const tt=[],Ot=new Set,an=new Set;for(let bn=0;bnOt.add(pr)):an.add(Hn))}const Sn=new Map,kn=Jr(F,Array.from(Ot));kn.forEach((bn,Hn)=>{const Qn=Ki+ke++;Sn.set(Hn,Qn),bn.forEach(pr=>vi(pr,Qn))}),y.push(()=>{Y.forEach((bn,Hn)=>{const Qn=ue.get(Hn);bn.forEach(pr=>Co(pr,Qn))}),kn.forEach((bn,Hn)=>{const Qn=Sn.get(Hn);bn.forEach(pr=>Co(pr,Qn))}),tt.forEach(bn=>{this.processLeaveNode(bn)})});const Vn=[],xn=[];for(let bn=this._namespaceList.length-1;bn>=0;bn--)this._namespaceList[bn].drainQueuedTransitions(p).forEach(Qn=>{const pr=Qn.player,Zi=Qn.element;if(Vn.push(pr),this.collectedEnterElements.length){const Er=Zi[Cs];if(Er&&Er.setForMove){if(Er.previousTriggersValues&&Er.previousTriggersValues.has(Qn.triggerName)){const Ha=Er.previousTriggersValues.get(Qn.triggerName),co=this.statesByElement.get(Qn.element);if(co&&co.has(Qn.triggerName)){const Ca=co.get(Qn.triggerName);Ca.value=Ha,co.set(Qn.triggerName,Ca)}}return void pr.destroy()}}const Fo=!x||!this.driver.containsElement(x,Zi),Ao=Sn.get(Zi),ya=ue.get(Zi),pi=this._buildInstruction(Qn,T,ya,Ao,Fo);if(pi.errors&&pi.errors.length)return void xn.push(pi);if(Fo)return pr.onStart(()=>Jt(Zi,pi.fromStyles)),pr.onDestroy(()=>Vt(Zi,pi.toStyles)),void H.push(pr);if(Qn.isFallbackTransition)return pr.onStart(()=>Jt(Zi,pi.fromStyles)),pr.onDestroy(()=>Vt(Zi,pi.toStyles)),void H.push(pr);const qi=[];pi.timelines.forEach(Er=>{Er.stretchStartingKeyframe=!0,this.disabledNodes.has(Er.element)||qi.push(Er)}),pi.timelines=qi,T.append(Zi,pi.timelines),De.push({instruction:pi,player:pr,element:Zi}),pi.queriedElements.forEach(Er=>Wn(Te,Er,[]).push(pr)),pi.preStyleProps.forEach((Er,Ha)=>{if(Er.size){let co=st.get(Ha);co||st.set(Ha,co=new Set),Er.forEach((Ca,Tl)=>co.add(Tl))}}),pi.postStyleProps.forEach((Er,Ha)=>{let co=wt.get(Ha);co||wt.set(Ha,co=new Set),Er.forEach((Ca,Tl)=>co.add(Tl))})});if(xn.length){const bn=[];xn.forEach(Hn=>{bn.push(function Ui(N,y){return new g.vHH(3505,$t)}())}),Vn.forEach(Hn=>Hn.destroy()),this.reportError(bn)}const mr=new Map,fi=new Map;De.forEach(bn=>{const Hn=bn.element;T.has(Hn)&&(fi.set(Hn,Hn),this._beforeAnimationBuild(bn.player.namespaceId,bn.instruction,mr))}),H.forEach(bn=>{const Hn=bn.element;this._getPreviousPlayers(Hn,!1,bn.namespaceId,bn.triggerName,null).forEach(pr=>{Wn(mr,Hn,[]).push(pr),pr.destroy()})});const Ii=tt.filter(bn=>b(bn,st,wt)),Xs=new Map;Xt(Xs,this.driver,an,wt,_t.l3).forEach(bn=>{b(bn,st,wt)&&Ii.push(bn)});const ia=new Map;Y.forEach((bn,Hn)=>{Xt(ia,this.driver,new Set(bn),st,_t.k1)}),Ii.forEach(bn=>{const Hn=Xs.get(bn),Qn=ia.get(bn);Xs.set(bn,new Map([...Array.from(Hn?.entries()??[]),...Array.from(Qn?.entries()??[])]))});const ls=[],Vs=[],lo={};De.forEach(bn=>{const{element:Hn,player:Qn,instruction:pr}=bn;if(T.has(Hn)){if(Bt.has(Hn))return Qn.onDestroy(()=>Vt(Hn,pr.toStyles)),Qn.disabled=!0,Qn.overrideTotalTime(pr.totalTime),void H.push(Qn);let Zi=lo;if(fi.size>1){let Ao=Hn;const ya=[];for(;Ao=Ao.parentNode;){const pi=fi.get(Ao);if(pi){Zi=pi;break}ya.push(Ao)}ya.forEach(pi=>fi.set(pi,Zi))}const Fo=this._buildAnimation(Qn.namespaceId,pr,mr,ne,ia,Xs);if(Qn.setRealPlayer(Fo),Zi===lo)ls.push(Qn);else{const Ao=this.playersByElement.get(Zi);Ao&&Ao.length&&(Qn.parentPlayer=Rt(Ao)),H.push(Qn)}}else Jt(Hn,pr.fromStyles),Qn.onDestroy(()=>Vt(Hn,pr.toStyles)),Vs.push(Qn),Bt.has(Hn)&&H.push(Qn)}),Vs.forEach(bn=>{const Hn=ne.get(bn.element);if(Hn&&Hn.length){const Qn=Rt(Hn);bn.setRealPlayer(Qn)}}),H.forEach(bn=>{bn.parentPlayer?bn.syncPlayerEvents(bn.parentPlayer):bn.destroy()});for(let bn=0;bn!Fo.destroyed);Zi.length?_n(this,Hn,Zi):this.processLeaveNode(Hn)}return tt.length=0,ls.forEach(bn=>{this.players.push(bn),bn.onDone(()=>{bn.destroy();const Hn=this.players.indexOf(bn);this.players.splice(Hn,1)}),bn.play()}),ls}elementContainsData(y,p){let T=!1;const H=p[Cs];return H&&H.setForRemoval&&(T=!0),this.playersByElement.has(p)&&(T=!0),this.playersByQueriedElement.has(p)&&(T=!0),this.statesByElement.has(p)&&(T=!0),this._fetchNamespace(y).elementContainsData(p)||T}afterFlush(y){this._flushFns.push(y)}afterFlushAnimationsDone(y){this._whenQuietFns.push(y)}_getPreviousPlayers(y,p,T,H,ne){let De=[];if(p){const Te=this.playersByQueriedElement.get(y);Te&&(De=Te)}else{const Te=this.playersByElement.get(y);if(Te){const st=!ne||ne==us;Te.forEach(wt=>{wt.queued||!st&&wt.triggerName!=H||De.push(wt)})}}return(T||H)&&(De=De.filter(Te=>!(T&&T!=Te.namespaceId||H&&H!=Te.triggerName))),De}_beforeAnimationBuild(y,p,T){const ne=p.element,De=p.isRemovalTransition?void 0:y,Te=p.isRemovalTransition?void 0:p.triggerName;for(const st of p.timelines){const wt=st.element,Bt=wt!==ne,x=Wn(T,wt,[]);this._getPreviousPlayers(wt,Bt,De,Te,p.toState).forEach(Y=>{const ue=Y.getRealPlayer();ue.beforeDestroy&&ue.beforeDestroy(),Y.destroy(),x.push(Y)})}Jt(ne,p.fromStyles)}_buildAnimation(y,p,T,H,ne,De){const Te=p.triggerName,st=p.element,wt=[],Bt=new Set,x=new Set,F=p.timelines.map(ue=>{const ke=ue.element;Bt.add(ke);const tt=ke[Cs];if(tt&&tt.removedBeforeQueried)return new _t.ZN(ue.duration,ue.delay);const Ot=ke!==st,an=function zn(N){const y=[];return eu(N,y),y}((T.get(ke)||Eu).map(mr=>mr.getRealPlayer())).filter(mr=>!!mr.element&&mr.element===ke),Sn=ne.get(ke),kn=De.get(ke),Vn=tn(0,this._normalizer,0,ue.keyframes,Sn,kn),xn=this._buildPlayer(ue,Vn,an);if(ue.subTimeline&&H&&x.add(ke),Ot){const mr=new Io(y,Te,ke);mr.setRealPlayer(xn),wt.push(mr)}return xn});wt.forEach(ue=>{Wn(this.playersByQueriedElement,ue.element,[]).push(ue),ue.onDone(()=>function hi(N,y,p){let T=N.get(y);if(T){if(T.length){const H=T.indexOf(p);T.splice(H,1)}0==T.length&&N.delete(y)}return T}(this.playersByQueriedElement,ue.element,ue))}),Bt.forEach(ue=>vi(ue,Uo));const Y=Rt(F);return Y.onDestroy(()=>{Bt.forEach(ue=>Co(ue,Uo)),Vt(st,p.toStyles)}),x.forEach(ue=>{Wn(H,ue,[]).push(Y)}),Y}_buildPlayer(y,p,T){return p.length>0?this.driver.animate(y.element,p,y.duration,y.delay,y.easing,T):new _t.ZN(y.duration,y.delay)}}class Io{constructor(y,p,T){this.namespaceId=y,this.triggerName=p,this.element=T,this._player=new _t.ZN,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(y){this._containsRealPlayer||(this._player=y,this._queuedCallbacks.forEach((p,T)=>{p.forEach(H=>cn(y,T,void 0,H))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(y.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(y){this.totalTime=y}syncPlayerEvents(y){const p=this._player;p.triggerCallback&&y.onStart(()=>p.triggerCallback("start")),y.onDone(()=>this.finish()),y.onDestroy(()=>this.destroy())}_queueEvent(y,p){Wn(this._queuedCallbacks,y,[]).push(p)}onDone(y){this.queued&&this._queueEvent("done",y),this._player.onDone(y)}onStart(y){this.queued&&this._queueEvent("start",y),this._player.onStart(y)}onDestroy(y){this.queued&&this._queueEvent("destroy",y),this._player.onDestroy(y)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(y){this.queued||this._player.setPosition(y)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(y){const p=this._player;p.triggerCallback&&p.triggerCallback(y)}}function Qs(N){return N&&1===N.nodeType}function ao(N,y){const p=N.style.display;return N.style.display=y??"none",p}function Xt(N,y,p,T,H){const ne=[];p.forEach(st=>ne.push(ao(st)));const De=[];T.forEach((st,wt)=>{const Bt=new Map;st.forEach(x=>{const F=y.computeStyle(wt,x,H);Bt.set(x,F),(!F||0==F.length)&&(wt[Cs]=pa,De.push(wt))}),N.set(wt,Bt)});let Te=0;return p.forEach(st=>ao(st,ne[Te++])),De}function Jr(N,y){const p=new Map;if(N.forEach(Te=>p.set(Te,[])),0==y.length)return p;const H=new Set(y),ne=new Map;function De(Te){if(!Te)return 1;let st=ne.get(Te);if(st)return st;const wt=Te.parentNode;return st=p.has(wt)?wt:H.has(wt)?1:De(wt),ne.set(Te,st),st}return y.forEach(Te=>{const st=De(Te);1!==st&&p.get(st).push(Te)}),p}function vi(N,y){N.classList?.add(y)}function Co(N,y){N.classList?.remove(y)}function _n(N,y,p){Rt(p).onDone(()=>N.processLeaveNode(y))}function eu(N,y){for(let p=0;pH.add(ne)):y.set(N,T),p.delete(N),!0}class D{constructor(y,p,T){this.bodyNode=y,this._driver=p,this._normalizer=T,this._triggerCache={},this.onRemovalComplete=(H,ne)=>{},this._transitionEngine=new La(y,p,T),this._timelineEngine=new Po(y,p,T),this._transitionEngine.onRemovalComplete=(H,ne)=>this.onRemovalComplete(H,ne)}registerTrigger(y,p,T,H,ne){const De=y+"-"+H;let Te=this._triggerCache[De];if(!Te){const st=[],Bt=In(this._driver,ne,st,[]);if(st.length)throw function bi(N,y){return new g.vHH(3404,$t)}();Te=function ba(N,y,p){return new Ro(N,y,p)}(H,Bt,this._normalizer),this._triggerCache[De]=Te}this._transitionEngine.registerTrigger(p,H,Te)}register(y,p){this._transitionEngine.register(y,p)}destroy(y,p){this._transitionEngine.destroy(y,p)}onInsert(y,p,T,H){this._transitionEngine.insertNode(y,p,T,H)}onRemove(y,p,T,H){this._transitionEngine.removeNode(y,p,H||!1,T)}disableAnimations(y,p){this._transitionEngine.markElementAsDisabled(y,p)}process(y,p,T,H){if("@"==T.charAt(0)){const[ne,De]=Cr(T);this._timelineEngine.command(ne,p,De,H)}else this._transitionEngine.trigger(y,p,T,H)}listen(y,p,T,H,ne){if("@"==T.charAt(0)){const[De,Te]=Cr(T);return this._timelineEngine.listen(De,p,Te,ne)}return this._transitionEngine.listen(y,p,T,H,ne)}flush(y=-1){this._transitionEngine.flush(y)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let k=(()=>{class N{constructor(p,T,H){this._element=p,this._startStyles=T,this._endStyles=H,this._state=0;let ne=N.initialStylesByElement.get(p);ne||N.initialStylesByElement.set(p,ne=new Map),this._initialStyles=ne}start(){this._state<1&&(this._startStyles&&Vt(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Vt(this._element,this._initialStyles),this._endStyles&&(Vt(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(N.initialStylesByElement.delete(this._element),this._startStyles&&(Jt(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Jt(this._element,this._endStyles),this._endStyles=null),Vt(this._element,this._initialStyles),this._state=3)}}return N.initialStylesByElement=new WeakMap,N})();function G(N){let y=null;return N.forEach((p,T)=>{(function re(N){return"display"===N||"position"===N})(T)&&(y=y||new Map,y.set(T,p))}),y}class be{constructor(y,p,T,H){this.element=y,this.keyframes=p,this.options=T,this._specialStyles=H,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=T.duration,this._delay=T.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(y=>y()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const y=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,y,this.options),this._finalKeyframe=y.length?y[y.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(y){const p=[];return y.forEach(T=>{p.push(Object.fromEntries(T))}),p}_triggerWebAnimation(y,p,T){return y.animate(this._convertKeyframesToObject(p),T)}onStart(y){this._onStartFns.push(y)}onDone(y){this._onDoneFns.push(y)}onDestroy(y){this._onDestroyFns.push(y)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(y=>y()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(y=>y()),this._onDestroyFns=[])}setPosition(y){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=y*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const y=new Map;this.hasStarted()&&this._finalKeyframe.forEach((T,H)=>{"offset"!==H&&y.set(H,this._finished?T:Oi(this.element,H))}),this.currentSnapshot=y}triggerCallback(y){const p="start"===y?this._onStartFns:this._onDoneFns;p.forEach(T=>T()),p.length=0}}class Ue{validateStyleProperty(y){return!0}validateAnimatableStyleProperty(y){return!0}matchesElement(y,p){return!1}containsElement(y,p){return Rs(y,p)}getParentElement(y){return ni(y)}query(y,p,T){return ws(y,p,T)}computeStyle(y,p,T){return window.getComputedStyle(y)[p]}animate(y,p,T,H,ne,De=[]){const st={duration:T,delay:H,fill:0==H?"both":"forwards"};ne&&(st.easing=ne);const wt=new Map,Bt=De.filter(Y=>Y instanceof be);(function as(N,y){return 0===N||0===y})(T,H)&&Bt.forEach(Y=>{Y.currentSnapshot.forEach((ue,ke)=>wt.set(ke,ue))});let x=function ee(N){return N.length?N[0]instanceof Map?N:N.map(y=>L(y)):[]}(p).map(Y=>Q(Y));x=function bs(N,y,p){if(p.size&&y.length){let T=y[0],H=[];if(p.forEach((ne,De)=>{T.has(De)||H.push(De),T.set(De,ne)}),H.length)for(let ne=1;neDe.set(Te,Oi(N,Te)))}}return y}(y,x,wt);const F=function I(N,y){let p=null,T=null;return Array.isArray(y)&&y.length?(p=G(y[0]),y.length>1&&(T=G(y[y.length-1]))):y instanceof Map&&(p=G(y)),p||T?new k(N,p,T):null}(y,x);return new be(y,x,st,F)}}let Ft=(()=>{class N extends _t._j{constructor(p,T){super(),this._nextAnimationId=0,this._renderer=p.createRenderer(T.body,{id:"0",encapsulation:g.ifc.None,styles:[],data:{animation:[]}})}build(p){const T=this._nextAnimationId.toString();this._nextAnimationId++;const H=Array.isArray(p)?(0,_t.vP)(p):p;return An(this._renderer,null,T,"register",[H]),new Yt(T,this._renderer)}}return N.\u0275fac=function(p){return new(p||N)(g.LFG(g.FYo),g.LFG(Ce.K0))},N.\u0275prov=g.Yz7({token:N,factory:N.\u0275fac}),N})();class Yt extends _t.LC{constructor(y,p){super(),this._id=y,this._renderer=p}create(y,p){return new fr(this._id,y,p||{},this._renderer)}}class fr{constructor(y,p,T,H){this.id=y,this.element=p,this._renderer=H,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",T)}_listen(y,p){return this._renderer.listen(this.element,`@@${this.id}:${y}`,p)}_command(y,...p){return An(this._renderer,this.element,this.id,y,p)}onDone(y){this._listen("done",y)}onStart(y){this._listen("start",y)}onDestroy(y){this._listen("destroy",y)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(y){this._command("setPosition",y)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function An(N,y,p,T,H){return N.setProperty(y,`@@${p}:${T}`,H)}const si="@.disabled";let $n=(()=>{class N{constructor(p,T,H){this.delegate=p,this.engine=T,this._zone=H,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),T.onRemovalComplete=(ne,De)=>{const Te=De?.parentNode(ne);Te&&De.removeChild(Te,ne)}}createRenderer(p,T){const ne=this.delegate.createRenderer(p,T);if(!(p&&T&&T.data&&T.data.animation)){let Bt=this._rendererCache.get(ne);return Bt||(Bt=new Gs("",ne,this.engine),this._rendererCache.set(ne,Bt)),Bt}const De=T.id,Te=T.id+"-"+this._currentId;this._currentId++,this.engine.register(Te,p);const st=Bt=>{Array.isArray(Bt)?Bt.forEach(st):this.engine.registerTrigger(De,Te,p,Bt.name,Bt)};return T.data.animation.forEach(st),new Js(this,Te,ne,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(p,T,H){p>=0&&pT(H)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(ne=>{const[De,Te]=ne;De(Te)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([T,H]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return N.\u0275fac=function(p){return new(p||N)(g.LFG(g.FYo),g.LFG(D),g.LFG(g.R0b))},N.\u0275prov=g.Yz7({token:N,factory:N.\u0275fac}),N})();class Gs{constructor(y,p,T){this.namespaceId=y,this.delegate=p,this.engine=T,this.destroyNode=this.delegate.destroyNode?H=>p.destroyNode(H):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(y,p){return this.delegate.createElement(y,p)}createComment(y){return this.delegate.createComment(y)}createText(y){return this.delegate.createText(y)}appendChild(y,p){this.delegate.appendChild(y,p),this.engine.onInsert(this.namespaceId,p,y,!1)}insertBefore(y,p,T,H=!0){this.delegate.insertBefore(y,p,T),this.engine.onInsert(this.namespaceId,p,y,H)}removeChild(y,p,T){this.engine.onRemove(this.namespaceId,p,this.delegate,T)}selectRootElement(y,p){return this.delegate.selectRootElement(y,p)}parentNode(y){return this.delegate.parentNode(y)}nextSibling(y){return this.delegate.nextSibling(y)}setAttribute(y,p,T,H){this.delegate.setAttribute(y,p,T,H)}removeAttribute(y,p,T){this.delegate.removeAttribute(y,p,T)}addClass(y,p){this.delegate.addClass(y,p)}removeClass(y,p){this.delegate.removeClass(y,p)}setStyle(y,p,T,H){this.delegate.setStyle(y,p,T,H)}removeStyle(y,p,T){this.delegate.removeStyle(y,p,T)}setProperty(y,p,T){"@"==p.charAt(0)&&p==si?this.disableAnimations(y,!!T):this.delegate.setProperty(y,p,T)}setValue(y,p){this.delegate.setValue(y,p)}listen(y,p,T){return this.delegate.listen(y,p,T)}disableAnimations(y,p){this.engine.disableAnimations(y,p)}}class Js extends Gs{constructor(y,p,T,H){super(p,T,H),this.factory=y,this.namespaceId=p}setProperty(y,p,T){"@"==p.charAt(0)?"."==p.charAt(1)&&p==si?this.disableAnimations(y,T=void 0===T||!!T):this.engine.process(this.namespaceId,y,p.slice(1),T):this.delegate.setProperty(y,p,T)}listen(y,p,T){if("@"==p.charAt(0)){const H=function zr(N){switch(N){case"body":return document.body;case"document":return document;case"window":return window;default:return N}}(y);let ne=p.slice(1),De="";return"@"!=ne.charAt(0)&&([ne,De]=function On(N){const y=N.indexOf(".");return[N.substring(0,y),N.slice(y+1)]}(ne)),this.engine.listen(this.namespaceId,H,ne,De,Te=>{this.factory.scheduleListenerCallback(Te._data||-1,T,Te)})}return this.delegate.listen(y,p,T)}}const Wi=[{provide:_t._j,useClass:Ft},{provide:bo,useFactory:function dr(){return new Do}},{provide:D,useClass:(()=>{class N extends D{constructor(p,T,H){super(p.body,T,H)}ngOnDestroy(){this.flush()}}return N.\u0275fac=function(p){return new(p||N)(g.LFG(Ce.K0),g.LFG(ks),g.LFG(bo))},N.\u0275prov=g.Yz7({token:N,factory:N.\u0275fac}),N})()},{provide:g.FYo,useFactory:function ga(N,y,p){return new $n(N,y,p)},deps:[m.se,D,g.R0b]}],vn=[{provide:ks,useFactory:()=>new Ue},{provide:g.QbO,useValue:"BrowserAnimations"},...Wi],qr=[{provide:ks,useClass:Ns},{provide:g.QbO,useValue:"NoopAnimations"},...Wi];let tu=(()=>{class N{static withConfig(p){return{ngModule:N,providers:p.disableAnimations?qr:vn}}}return N.\u0275fac=function(p){return new(p||N)},N.\u0275mod=g.oAB({type:N}),N.\u0275inj=g.cJS({providers:vn,imports:[m.b2]}),N})();S(4827),S(1281),S(4006);var Ls=S(2327);let ju=(()=>{class N{}return N.\u0275fac=function(p){return new(p||N)},N.\u0275mod=g.oAB({type:N}),N.\u0275inj=g.cJS({imports:[Ls.BQ,Ls.si,Ls.BQ]}),N})();function ts(N){return new We.w(N)}let Ho=(()=>{class N{}return N.\u0275fac=function(p){return new(p||N)},N.\u0275mod=g.oAB({type:N,bootstrap:[Nn]}),N.\u0275inj=g.cJS({providers:[ve.eN],imports:[m.b2.withServerTransition({appId:"new-rdv-app"}),he,ae.ww,K.hO.initializeApp($e_firebase),Re.T,ve.JF,ju,Ut.Ps,Ce.ez,Se.aw.forRoot({loader:{provide:Se.Zw,useFactory:ts,deps:[ve.eN]}}),tu,qt.register("ngsw-worker.js",{enabled:true,registrationStrategy:"registerWhenStable:30000"})]}),N})();function Xr(){m.q6().bootstrapModule(Ho).catch(N=>console.error(N))}(0,g.G48)(),"complete"===document.readyState?Xr():document.addEventListener("DOMContentLoaded",Xr)},5415:(Wt,je,S)=>{S.d(je,{G:()=>g,T:()=>ae});var m=S(4650),g=function(){function oe(_e,fe,ge){this.el=_e,this.vcr=fe,this.renderer=ge,this.dtOptions={}}return oe.prototype.ngOnInit=function(){var _e=this;this.dtTrigger?this.dtTrigger.subscribe(function(fe){_e.displayTable(fe)}):this.displayTable(null)},oe.prototype.ngOnDestroy=function(){this.dtTrigger&&this.dtTrigger.unsubscribe(),this.dt&&this.dt.destroy(!0)},oe.prototype.displayTable=function(_e){var fe=this;_e&&(this.dtOptions=_e),this.dtInstance=new Promise(function(ge,he){Promise.resolve(fe.dtOptions).then(function(ie){0===Object.keys(ie).length&&0===$("tbody tr",fe.el.nativeElement).length?he("Both the table and dtOptions cannot be empty"):setTimeout(function(){var me={rowCallback:function(it,Ke,Ye){if(ie.columns){var ht=ie.columns;fe.applyNgPipeTransform(it,ht),fe.applyNgRefTemplate(it,ht,Ke)}ie.rowCallback&&ie.rowCallback(it,Ke,Ye)}};me=Object.assign({},ie,me),fe.dt=$(fe.el.nativeElement).DataTable(me),ge(fe.dt)})})})},oe.prototype.applyNgPipeTransform=function(_e,fe){fe.filter(function(he){return he.ngPipeInstance&&!he.ngTemplateRef}).forEach(function(he){var ie=he.ngPipeInstance,ce=fe.findIndex(function(Ye){return Ye.data===he.data}),me=_e.childNodes.item(ce),it=$(me).text(),Ke=ie.transform(it);$(me).text(Ke)})},oe.prototype.applyNgRefTemplate=function(_e,fe,ge){var he=this;fe.filter(function(ce){return ce.ngTemplateRef&&!ce.ngPipeInstance}).forEach(function(ce){var me=ce.ngTemplateRef,it=me.ref,Ke=me.context,Ye=fe.findIndex(function(Ee){return Ee.data===ce.data}),ht=_e.childNodes.item(Ye);$(ht).html("");var Ze=Object.assign({},Ke,Ke?.userData,{adtData:ge}),Qe=he.vcr.createEmbeddedView(it,Ze);he.renderer.appendChild(ht,Qe.rootNodes[0])})},oe.\u0275fac=function(fe){return new(fe||oe)(m.Y36(m.SBq),m.Y36(m.s_b),m.Y36(m.Qsj))},oe.\u0275dir=m.lG2({type:oe,selectors:[["","datatable",""]],inputs:{dtOptions:"dtOptions",dtTrigger:"dtTrigger"}}),oe}(),K=S(6895),ae=function(){function oe(){}return oe.forRoot=function(){return{ngModule:oe}},oe.\u0275fac=function(fe){return new(fe||oe)},oe.\u0275mod=m.oAB({type:oe}),oe.\u0275inj=m.cJS({imports:[[K.ez]]}),oe}()},5867:(Wt,je,S)=>{S.d(je,{C6:()=>m.getApps,Mq:()=>m.getApp});var m=S(9681);(0,m.registerVersion)("firebase","9.8.3","app")},127:(Wt,je,S)=>{S.d(je,{Z:()=>m.Z});var m=S(3942);m.Z.registerVersion("firebase","9.8.3","app-compat")},1515:(Wt,je,S)=>{S.r(je);var m=S(5861),g=S(3942),K=S(2090),ae=S(9681);function ge(_,c){var d={};for(var w in _)Object.prototype.hasOwnProperty.call(_,w)&&c.indexOf(w)<0&&(d[w]=_[w]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols){var B=0;for(w=Object.getOwnPropertySymbols(_);Bc,"Short delay should be less than long delay!"),this.isMobile=(0,K.uI)()||(0,K.b$)()}get(){return function Be(){return!(typeof navigator<"u"&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(Or()||(0,K.ru)()||"connection"in navigator))||navigator.onLine}()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function Xe(_,c){ln(_.emulator,"Emulator should always be set here");const{url:d}=_.emulator;return c?`${d}${c.startsWith("/")?c.slice(1):c}`:d}class qt{static initialize(c,d,w){this.fetchImpl=c,d&&(this.headersImpl=d),w&&(this.responseImpl=w)}static fetch(){return this.fetchImpl?this.fetchImpl:typeof self<"u"&&"fetch"in self?self.fetch:void Un("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:typeof self<"u"&&"Headers"in self?self.Headers:void Un("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:typeof self<"u"&&"Response"in self?self.Response:void Un("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const nr={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"},Kn=new xt(3e4,6e4);function Ut(_,c){return _.tenantId&&!c.tenantId?Object.assign(Object.assign({},c),{tenantId:_.tenantId}):c}function mn(_,c,d,w){return Xn.apply(this,arguments)}function Xn(){return(Xn=(0,m.Z)(function*(_,c,d,w,B={}){return Rr(_,B,(0,m.Z)(function*(){let q={},Pe={};w&&("GET"===c?Pe=w:q={body:JSON.stringify(w)});const yt=(0,K.xO)(Object.assign({key:_.config.apiKey},Pe)).slice(1),on=yield _._getAdditionalHeaders();return on["Content-Type"]="application/json",_.languageCode&&(on["X-Firebase-Locale"]=_.languageCode),qt.fetch()(Tt(_,_.config.apiHost,d,yt),Object.assign({method:c,headers:on,referrerPolicy:"no-referrer"},q))}))})).apply(this,arguments)}function Rr(_,c,d){return Me.apply(this,arguments)}function Me(){return(Me=(0,m.Z)(function*(_,c,d){_._canInitEmulator=!1;const w=Object.assign(Object.assign({},nr),c);try{const B=new se(_),q=yield Promise.race([d(),B.promise]);B.clearNetworkTimeout();const Pe=yield q.json();if("needConfirmation"in Pe)throw J(_,"account-exists-with-different-credential",Pe);if(q.ok&&!("errorMessage"in Pe))return Pe;{const yt=q.ok?Pe.errorMessage:Pe.error.message,[on,nn]=yt.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===on)throw J(_,"credential-already-in-use",Pe);if("EMAIL_EXISTS"===on)throw J(_,"email-already-in-use",Pe);if("USER_DISABLED"===on)throw J(_,"user-disabled",Pe);const Fn=w[on]||on.toLowerCase().replace(/[_\s]+/g,"-");if(nn)throw wn(_,Fn,nn);Ht(_,Fn)}}catch(B){if(B instanceof K.ZR)throw B;Ht(_,"network-request-failed")}})).apply(this,arguments)}function we(_,c,d,w){return Ae.apply(this,arguments)}function Ae(){return(Ae=(0,m.Z)(function*(_,c,d,w,B={}){const q=yield mn(_,c,d,w,B);return"mfaPendingCredential"in q&&Ht(_,"multi-factor-auth-required",{_serverResponse:q}),q})).apply(this,arguments)}function Tt(_,c,d,w){const B=`${c}${d}?${w}`;return _.config.emulator?Xe(_.config,B):`${_.config.apiScheme}://${B}`}class se{constructor(c){this.auth=c,this.timer=null,this.promise=new Promise((d,w)=>{this.timer=setTimeout(()=>w(Zt(this.auth,"network-request-failed")),Kn.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function J(_,c,d){const w={appName:_.name};d.email&&(w.email=d.email),d.phoneNumber&&(w.phoneNumber=d.phoneNumber);const B=Zt(_,c,w);return B.customData._tokenResponse=d,B}function rt(){return(rt=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:delete",c)})).apply(this,arguments)}function Qt(_,c){return hn.apply(this,arguments)}function hn(){return(hn=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:update",c)})).apply(this,arguments)}function fn(_,c){return Pn.apply(this,arguments)}function Pn(){return(Pn=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:lookup",c)})).apply(this,arguments)}function Pr(_){if(_)try{const c=new Date(Number(_));if(!isNaN(c.getTime()))return c.toUTCString()}catch{}}function kr(){return(kr=(0,m.Z)(function*(_,c=!1){const d=(0,K.m9)(_),w=yield d.getIdToken(c),B=Fr(w);bt(B&&B.exp&&B.auth_time&&B.iat,d.auth,"internal-error");const q="object"==typeof B.firebase?B.firebase:void 0,Pe=q?.sign_in_provider;return{claims:B,token:w,authTime:Pr(jr(B.auth_time)),issuedAtTime:Pr(jr(B.iat)),expirationTime:Pr(jr(B.exp)),signInProvider:Pe||null,signInSecondFactor:q?.sign_in_second_factor||null}})).apply(this,arguments)}function jr(_){return 1e3*Number(_)}function Fr(_){const[c,d,w]=_.split(".");if(void 0===c||void 0===d||void 0===w)return Kt("JWT malformed, contained fewer than 3 sections"),null;try{const B=(0,K.tV)(d);return B?JSON.parse(B):(Kt("Failed to decode base64 JWT payload"),null)}catch(B){return Kt("Caught error parsing JWT payload as JSON",B),null}}function zt(_,c){return Nn.apply(this,arguments)}function Nn(){return(Nn=(0,m.Z)(function*(_,c,d=!1){if(d)return c;try{return yield c}catch(w){throw w instanceof K.ZR&&$e(w)&&_.auth.currentUser===_&&(yield _.auth.signOut()),w}})).apply(this,arguments)}function $e({code:_}){return"auth/user-disabled"===_||"auth/user-token-expired"===_}class Re{constructor(c){this.user=c,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(c){var d;if(c){const w=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),w}{this.errorBackoff=3e4;const B=(null!==(d=this.user.stsTokenManager.expirationTime)&&void 0!==d?d:0)-Date.now()-3e5;return Math.max(0,B)}}schedule(c=!1){var d=this;if(!this.isRunning)return;const w=this.getInterval(c);this.timerId=setTimeout((0,m.Z)(function*(){yield d.iteration()}),w)}iteration(){var c=this;return(0,m.Z)(function*(){try{yield c.user.getIdToken(!0)}catch(d){return void("auth/network-request-failed"===d.code&&c.schedule(!0))}c.schedule()})()}}class ve{constructor(c,d){this.createdAt=c,this.lastLoginAt=d,this._initializeTime()}_initializeTime(){this.lastSignInTime=Pr(this.lastLoginAt),this.creationTime=Pr(this.createdAt)}_copy(c){this.createdAt=c.createdAt,this.lastLoginAt=c.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}function We(_){return _t.apply(this,arguments)}function _t(){return(_t=(0,m.Z)(function*(_){var c;const d=_.auth,w=yield _.getIdToken(),B=yield zt(_,fn(d,{idToken:w}));bt(B?.users.length,d,"internal-error");const q=B.users[0];_._notifyReloadListener(q);const Pe=null!==(c=q.providerUserInfo)&&void 0!==c&&c.length?yn(q.providerUserInfo):[],yt=_r(_.providerData,Pe),Fn=!!_.isAnonymous&&!(_.email&&q.passwordHash||yt?.length),Bn={uid:q.localId,displayName:q.displayName||null,photoURL:q.photoUrl||null,email:q.email||null,emailVerified:q.emailVerified||!1,phoneNumber:q.phoneNumber||null,tenantId:q.tenantId||null,providerData:yt,metadata:new ve(q.createdAt,q.lastLoginAt),isAnonymous:Fn};Object.assign(_,Bn)})).apply(this,arguments)}function qn(){return(qn=(0,m.Z)(function*(_){const c=(0,K.m9)(_);yield We(c),yield c.auth._persistUserIfCurrent(c),c.auth._notifyListenersIfCurrent(c)})).apply(this,arguments)}function _r(_,c){return[..._.filter(w=>!c.some(B=>B.providerId===w.providerId)),...c]}function yn(_){return _.map(c=>{var{providerId:d}=c,w=ge(c,["providerId"]);return{providerId:d,uid:w.rawId||"",displayName:w.displayName||null,email:w.email||null,phoneNumber:w.phoneNumber||null,photoURL:w.photoUrl||null}})}function Ji(){return(Ji=(0,m.Z)(function*(_,c){const d=yield Rr(_,{},(0,m.Z)(function*(){const w=(0,K.xO)({grant_type:"refresh_token",refresh_token:c}).slice(1),{tokenApiHost:B,apiKey:q}=_.config,Pe=Tt(_,B,"/v1/token",`key=${q}`),yt=yield _._getAdditionalHeaders();return yt["Content-Type"]="application/x-www-form-urlencoded",qt.fetch()(Pe,{method:"POST",headers:yt,body:w})}));return{accessToken:d.access_token,expiresIn:d.expires_in,refreshToken:d.refresh_token}})).apply(this,arguments)}class ki{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(c){bt(c.idToken,"internal-error"),bt(typeof c.idToken<"u","internal-error"),bt(typeof c.refreshToken<"u","internal-error");const d="expiresIn"in c&&typeof c.expiresIn<"u"?Number(c.expiresIn):function Sr(_){const c=Fr(_);return bt(c,"internal-error"),bt(typeof c.exp<"u","internal-error"),bt(typeof c.iat<"u","internal-error"),Number(c.exp)-Number(c.iat)}(c.idToken);this.updateTokensAndExpiration(c.idToken,c.refreshToken,d)}getToken(c,d=!1){var w=this;return(0,m.Z)(function*(){return bt(!w.accessToken||w.refreshToken,c,"user-token-expired"),d||!w.accessToken||w.isExpired?w.refreshToken?(yield w.refresh(c,w.refreshToken),w.accessToken):null:w.accessToken})()}clearRefreshToken(){this.refreshToken=null}refresh(c,d){var w=this;return(0,m.Z)(function*(){const{accessToken:B,refreshToken:q,expiresIn:Pe}=yield function Mr(_,c){return Ji.apply(this,arguments)}(c,d);w.updateTokensAndExpiration(B,q,Number(Pe))})()}updateTokensAndExpiration(c,d,w){this.refreshToken=d||null,this.accessToken=c||null,this.expirationTime=Date.now()+1e3*w}static fromJSON(c,d){const{refreshToken:w,accessToken:B,expirationTime:q}=d,Pe=new ki;return w&&(bt("string"==typeof w,"internal-error",{appName:c}),Pe.refreshToken=w),B&&(bt("string"==typeof B,"internal-error",{appName:c}),Pe.accessToken=B),q&&(bt("number"==typeof q,"internal-error",{appName:c}),Pe.expirationTime=q),Pe}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(c){this.accessToken=c.accessToken,this.refreshToken=c.refreshToken,this.expirationTime=c.expirationTime}_clone(){return Object.assign(new ki,this.toJSON())}_performRefresh(){return Un("not implemented")}}function wi(_,c){bt("string"==typeof _||typeof _>"u","internal-error",{appName:c})}class Vr{constructor(c){var{uid:d,auth:w,stsTokenManager:B}=c,q=ge(c,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Re(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=d,this.auth=w,this.stsTokenManager=B,this.accessToken=B.accessToken,this.displayName=q.displayName||null,this.email=q.email||null,this.emailVerified=q.emailVerified||!1,this.phoneNumber=q.phoneNumber||null,this.photoURL=q.photoURL||null,this.isAnonymous=q.isAnonymous||!1,this.tenantId=q.tenantId||null,this.providerData=q.providerData?[...q.providerData]:[],this.metadata=new ve(q.createdAt||void 0,q.lastLoginAt||void 0)}getIdToken(c){var d=this;return(0,m.Z)(function*(){const w=yield zt(d,d.stsTokenManager.getToken(d.auth,c));return bt(w,d.auth,"internal-error"),d.accessToken!==w&&(d.accessToken=w,yield d.auth._persistUserIfCurrent(d),d.auth._notifyListenersIfCurrent(d)),w})()}getIdTokenResult(c){return function jn(_){return kr.apply(this,arguments)}(this,c)}reload(){return function $t(_){return qn.apply(this,arguments)}(this)}_assign(c){this!==c&&(bt(this.uid===c.uid,this.auth,"internal-error"),this.displayName=c.displayName,this.photoURL=c.photoURL,this.email=c.email,this.emailVerified=c.emailVerified,this.phoneNumber=c.phoneNumber,this.isAnonymous=c.isAnonymous,this.tenantId=c.tenantId,this.providerData=c.providerData.map(d=>Object.assign({},d)),this.metadata._copy(c.metadata),this.stsTokenManager._assign(c.stsTokenManager))}_clone(c){return new Vr(Object.assign(Object.assign({},this),{auth:c,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(c){bt(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=c,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(c){this.reloadListener?this.reloadListener(c):this.reloadUserInfo=c}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(c,d=!1){var w=this;return(0,m.Z)(function*(){let B=!1;c.idToken&&c.idToken!==w.stsTokenManager.accessToken&&(w.stsTokenManager.updateFromServerResponse(c),B=!0),d&&(yield We(w)),yield w.auth._persistUserIfCurrent(w),B&&w.auth._notifyListenersIfCurrent(w)})()}delete(){var c=this;return(0,m.Z)(function*(){const d=yield c.getIdToken();return yield zt(c,function le(_,c){return rt.apply(this,arguments)}(c.auth,{idToken:d})),c.stsTokenManager.clearRefreshToken(),c.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(c=>Object.assign({},c)),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(c,d){var w,B,q,Pe,yt,on,nn,Fn;const Bn=null!==(w=d.displayName)&&void 0!==w?w:void 0,Hr=null!==(B=d.email)&&void 0!==B?B:void 0,no=null!==(q=d.phoneNumber)&&void 0!==q?q:void 0,Au=null!==(Pe=d.photoURL)&&void 0!==Pe?Pe:void 0,Bl=null!==(yt=d.tenantId)&&void 0!==yt?yt:void 0,jl=null!==(on=d._redirectEventId)&&void 0!==on?on:void 0,Od=null!==(nn=d.createdAt)&&void 0!==nn?nn:void 0,Cc=null!==(Fn=d.lastLoginAt)&&void 0!==Fn?Fn:void 0,{uid:Rd,emailVerified:Kh,isAnonymous:Tc,providerData:Ac,stsTokenManager:cu}=d;bt(Rd&&cu,c,"internal-error");const Pd=ki.fromJSON(this.name,cu);bt("string"==typeof Rd,c,"internal-error"),wi(Bn,c.name),wi(Hr,c.name),bt("boolean"==typeof Kh,c,"internal-error"),bt("boolean"==typeof Tc,c,"internal-error"),wi(no,c.name),wi(Au,c.name),wi(Bl,c.name),wi(jl,c.name),wi(Od,c.name),wi(Cc,c.name);const Sc=new Vr({uid:Rd,auth:c,email:Hr,emailVerified:Kh,displayName:Bn,isAnonymous:Tc,photoURL:Au,phoneNumber:no,tenantId:Bl,stsTokenManager:Pd,createdAt:Od,lastLoginAt:Cc});return Ac&&Array.isArray(Ac)&&(Sc.providerData=Ac.map(Nd=>Object.assign({},Nd))),jl&&(Sc._redirectEventId=jl),Sc}static _fromIdTokenResponse(c,d,w=!1){return(0,m.Z)(function*(){const B=new ki;B.updateFromServerResponse(d);const q=new Vr({uid:d.localId,auth:c,stsTokenManager:B,isAnonymous:w});return yield We(q),q})()}}const Ai=(()=>{class _{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return(0,m.Z)(function*(){return!0})()}_set(d,w){var B=this;return(0,m.Z)(function*(){B.storage[d]=w})()}_get(d){var w=this;return(0,m.Z)(function*(){const B=w.storage[d];return void 0===B?null:B})()}_remove(d){var w=this;return(0,m.Z)(function*(){delete w.storage[d]})()}_addListener(d,w){}_removeListener(d,w){}}return _.type="NONE",_})();function Gr(_,c,d){return`firebase:${_}:${c}:${d}`}class oi{constructor(c,d,w){this.persistence=c,this.auth=d,this.userKey=w;const{config:B,name:q}=this.auth;this.fullUserKey=Gr(this.userKey,B.apiKey,q),this.fullPersistenceKey=Gr("persistence",B.apiKey,q),this.boundEventHandler=d._onStorageEvent.bind(d),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(c){return this.persistence._set(this.fullUserKey,c.toJSON())}getCurrentUser(){var c=this;return(0,m.Z)(function*(){const d=yield c.persistence._get(c.fullUserKey);return d?Vr._fromJSON(c.auth,d):null})()}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(c){var d=this;return(0,m.Z)(function*(){if(d.persistence===c)return;const w=yield d.getCurrentUser();return yield d.removeCurrentUser(),d.persistence=c,w?d.setCurrentUser(w):void 0})()}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(c,d,w="authUser"){return(0,m.Z)(function*(){if(!d.length)return new oi(Yn(Ai),c,w);const B=(yield Promise.all(d.map(function(){var nn=(0,m.Z)(function*(Fn){if(yield Fn._isAvailable())return Fn});return function(Fn){return nn.apply(this,arguments)}}()))).filter(nn=>nn);let q=B[0]||Yn(Ai);const Pe=Gr(w,c.config.apiKey,c.name);let yt=null;for(const nn of d)try{const Fn=yield nn._get(Pe);if(Fn){const Bn=Vr._fromJSON(c,Fn);nn!==q&&(yt=Bn),q=nn;break}}catch{}const on=B.filter(nn=>nn._shouldAllowMigration);return q._shouldAllowMigration&&on.length?(q=on[0],yt&&(yield q._set(Pe,yt.toJSON())),yield Promise.all(d.map(function(){var nn=(0,m.Z)(function*(Fn){if(Fn!==q)try{yield Fn._remove(Pe)}catch{}});return function(Fn){return nn.apply(this,arguments)}}())),new oi(q,c,w)):new oi(q,c,w)})()}}function Ur(_){const c=_.toLowerCase();if(c.includes("opera/")||c.includes("opr/")||c.includes("opios/"))return"Opera";if(ms(c))return"IEMobile";if(c.includes("msie")||c.includes("trident/"))return"IE";if(c.includes("edge/"))return"Edge";if(vr(c))return"Firefox";if(c.includes("silk/"))return"Silk";if(Fi(c))return"Blackberry";if(Li(c))return"Webos";if(ps(c))return"Safari";if((c.includes("chrome/")||gs(c))&&!c.includes("edge/"))return"Chrome";if(ei(c))return"Android";{const w=_.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(2===w?.length)return w[1]}return"Other"}function vr(_=(0,K.z$)()){return/firefox\//i.test(_)}function ps(_=(0,K.z$)()){const c=_.toLowerCase();return c.includes("safari/")&&!c.includes("chrome/")&&!c.includes("crios/")&&!c.includes("android")}function gs(_=(0,K.z$)()){return/crios\//i.test(_)}function ms(_=(0,K.z$)()){return/iemobile/i.test(_)}function ei(_=(0,K.z$)()){return/android/i.test(_)}function Fi(_=(0,K.z$)()){return/blackberry/i.test(_)}function Li(_=(0,K.z$)()){return/webos/i.test(_)}function ai(_=(0,K.z$)()){return/iphone|ipad|ipod/i.test(_)}function bi(_=(0,K.z$)()){return ai(_)||ei(_)||Li(_)||Fi(_)||/windows phone/i.test(_)||ms(_)}function _s(_,c=[]){let d;switch(_){case"Browser":d=Ur((0,K.z$)());break;case"Worker":d=`${Ur((0,K.z$)())}-${_}`;break;default:d=_}const w=c.length?c.join(","):"FirebaseCore-web";return`${d}/JsCore/${ae.SDK_VERSION}/${w}`}class xs{constructor(c){this.auth=c,this.queue=[]}pushCallback(c,d){const w=q=>new Promise((Pe,yt)=>{try{Pe(c(q))}catch(on){yt(on)}});w.onAbort=d,this.queue.push(w);const B=this.queue.length-1;return()=>{this.queue[B]=()=>Promise.resolve()}}runMiddleware(c){var d=this;return(0,m.Z)(function*(){var w;if(d.auth.currentUser===c)return;const B=[];try{for(const q of d.queue)yield q(c),q.onAbort&&B.push(q.onAbort)}catch(q){B.reverse();for(const Pe of B)try{Pe()}catch{}throw d.auth._errorFactory.create("login-blocked",{originalMessage:null===(w=q)||void 0===w?void 0:w.message})}})()}}class Vi{constructor(c,d,w){this.app=c,this.heartbeatServiceProvider=d,this.config=w,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Mo(this),this.idTokenSubscription=new Mo(this),this.beforeStateQueue=new xs(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Rn,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=c.name,this.clientVersion=w.sdkClientVersion}_initializeWithPersistence(c,d){var w=this;return d&&(this._popupRedirectResolver=Yn(d)),this._initializationPromise=this.queue((0,m.Z)(function*(){var B,q;if(!w._deleted&&(w.persistenceManager=yield oi.create(w,c),!w._deleted)){if(null!==(B=w._popupRedirectResolver)&&void 0!==B&&B._shouldInitProactively)try{yield w._popupRedirectResolver._initialize(w)}catch{}yield w.initializeCurrentUser(d),w.lastNotifiedUid=(null===(q=w.currentUser)||void 0===q?void 0:q.uid)||null,!w._deleted&&(w._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){var c=this;return(0,m.Z)(function*(){if(c._deleted)return;const d=yield c.assertedPersistence.getCurrentUser();if(c.currentUser||d){if(c.currentUser&&d&&c.currentUser.uid===d.uid)return c._currentUser._assign(d),void(yield c.currentUser.getIdToken());yield c._updateCurrentUser(d,!0)}})()}initializeCurrentUser(c){var d=this;return(0,m.Z)(function*(){var w;const B=yield d.assertedPersistence.getCurrentUser();let q=B,Pe=!1;if(c&&d.config.authDomain){yield d.getOrInitRedirectPersistenceManager();const yt=null===(w=d.redirectUser)||void 0===w?void 0:w._redirectEventId,on=q?._redirectEventId,nn=yield d.tryRedirectSignIn(c);(!yt||yt===on)&&nn?.user&&(q=nn.user,Pe=!0)}if(!q)return d.directlySetCurrentUser(null);if(!q._redirectEventId){if(Pe)try{yield d.beforeStateQueue.runMiddleware(q)}catch(yt){q=B,d._popupRedirectResolver._overrideRedirectResult(d,()=>Promise.reject(yt))}return q?d.reloadAndSetCurrentUserOrClear(q):d.directlySetCurrentUser(null)}return bt(d._popupRedirectResolver,d,"argument-error"),yield d.getOrInitRedirectPersistenceManager(),d.redirectUser&&d.redirectUser._redirectEventId===q._redirectEventId?d.directlySetCurrentUser(q):d.reloadAndSetCurrentUserOrClear(q)})()}tryRedirectSignIn(c){var d=this;return(0,m.Z)(function*(){let w=null;try{w=yield d._popupRedirectResolver._completeRedirectFn(d,c,!0)}catch{yield d._setRedirectUser(null)}return w})()}reloadAndSetCurrentUserOrClear(c){var d=this;return(0,m.Z)(function*(){try{yield We(c)}catch(w){if("auth/network-request-failed"!==w.code)return d.directlySetCurrentUser(null)}return d.directlySetCurrentUser(c)})()}useDeviceLanguage(){this.languageCode=function Ge(){if(typeof navigator>"u")return null;const _=navigator;return _.languages&&_.languages[0]||_.language||null}()}_delete(){var c=this;return(0,m.Z)(function*(){c._deleted=!0})()}updateCurrentUser(c){var d=this;return(0,m.Z)(function*(){const w=c?(0,K.m9)(c):null;return w&&bt(w.auth.config.apiKey===d.config.apiKey,d,"invalid-user-token"),d._updateCurrentUser(w&&w._clone(d))})()}_updateCurrentUser(c,d=!1){var w=this;return(0,m.Z)(function*(){if(!w._deleted)return c&&bt(w.tenantId===c.tenantId,w,"tenant-id-mismatch"),d||(yield w.beforeStateQueue.runMiddleware(c)),w.queue((0,m.Z)(function*(){yield w.directlySetCurrentUser(c),w.notifyAuthListeners()}))})()}signOut(){var c=this;return(0,m.Z)(function*(){return yield c.beforeStateQueue.runMiddleware(null),(c.redirectPersistenceManager||c._popupRedirectResolver)&&(yield c._setRedirectUser(null)),c._updateCurrentUser(null,!0)})()}setPersistence(c){var d=this;return this.queue((0,m.Z)(function*(){yield d.assertedPersistence.setPersistence(Yn(c))}))}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(c){this._errorFactory=new K.LL("auth","Firebase",c())}onAuthStateChanged(c,d,w){return this.registerStateListener(this.authStateSubscription,c,d,w)}beforeAuthStateChanged(c,d){return this.beforeStateQueue.pushCallback(c,d)}onIdTokenChanged(c,d,w){return this.registerStateListener(this.idTokenSubscription,c,d,w)}toJSON(){var c;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(c=this._currentUser)||void 0===c?void 0:c.toJSON()}}_setRedirectUser(c,d){var w=this;return(0,m.Z)(function*(){const B=yield w.getOrInitRedirectPersistenceManager(d);return null===c?B.removeCurrentUser():B.setCurrentUser(c)})()}getOrInitRedirectPersistenceManager(c){var d=this;return(0,m.Z)(function*(){if(!d.redirectPersistenceManager){const w=c&&Yn(c)||d._popupRedirectResolver;bt(w,d,"argument-error"),d.redirectPersistenceManager=yield oi.create(d,[Yn(w._redirectPersistence)],"redirectUser"),d.redirectUser=yield d.redirectPersistenceManager.getCurrentUser()}return d.redirectPersistenceManager})()}_redirectUserForId(c){var d=this;return(0,m.Z)(function*(){var w,B;return d._isInitialized&&(yield d.queue((0,m.Z)(function*(){}))),(null===(w=d._currentUser)||void 0===w?void 0:w._redirectEventId)===c?d._currentUser:(null===(B=d.redirectUser)||void 0===B?void 0:B._redirectEventId)===c?d.redirectUser:null})()}_persistUserIfCurrent(c){var d=this;return(0,m.Z)(function*(){if(c===d.currentUser)return d.queue((0,m.Z)(function*(){return d.directlySetCurrentUser(c)}))})()}_notifyListenersIfCurrent(c){c===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 c,d;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const w=null!==(d=null===(c=this.currentUser)||void 0===c?void 0:c.uid)&&void 0!==d?d:null;this.lastNotifiedUid!==w&&(this.lastNotifiedUid=w,this.authStateSubscription.next(this.currentUser))}registerStateListener(c,d,w,B){if(this._deleted)return()=>{};const q="function"==typeof d?d:d.next.bind(d),Pe=this._isInitialized?Promise.resolve():this._initializationPromise;return bt(Pe,this,"internal-error"),Pe.then(()=>q(this.currentUser)),"function"==typeof d?c.addObserver(d,w,B):c.addObserver(d)}directlySetCurrentUser(c){var d=this;return(0,m.Z)(function*(){d.currentUser&&d.currentUser!==c&&(d._currentUser._stopProactiveRefresh(),c&&d.isProactiveRefreshEnabled&&c._startProactiveRefresh()),d.currentUser=c,c?yield d.assertedPersistence.setCurrentUser(c):yield d.assertedPersistence.removeCurrentUser()})()}queue(c){return this.operations=this.operations.then(c,c),this.operations}get assertedPersistence(){return bt(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(c){!c||this.frameworks.includes(c)||(this.frameworks.push(c),this.frameworks.sort(),this.clientVersion=_s(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){var c=this;return(0,m.Z)(function*(){var d;const w={"X-Client-Version":c.clientVersion};c.app.options.appId&&(w["X-Firebase-gmpid"]=c.app.options.appId);const B=yield null===(d=c.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===d?void 0:d.getHeartbeatsHeader();return B&&(w["X-Firebase-Client"]=B),w})()}}function xr(_){return(0,K.m9)(_)}class Mo{constructor(c){this.auth=c,this.observer=null,this.addObserver=(0,K.ne)(d=>this.observer=d)}get next(){return bt(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function Pi(_){const c=_.indexOf(":");return c<0?"":_.substr(0,c+1)}function Bs(_){if(!_)return null;const c=Number(_);return isNaN(c)?null:c}class Ui{constructor(c,d){this.providerId=c,this.signInMethod=d}toJSON(){return Un("not implemented")}_getIdTokenResponse(c){return Un("not implemented")}_linkToIdToken(c,d){return Un("not implemented")}_getReauthenticationResolver(c){return Un("not implemented")}}function qe(_,c){return Le.apply(this,arguments)}function Le(){return(Le=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:resetPassword",Ut(_,c))})).apply(this,arguments)}function ct(_,c){return Rt.apply(this,arguments)}function Rt(){return(Rt=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:update",c)})).apply(this,arguments)}function tn(_,c){return cn.apply(this,arguments)}function cn(){return(cn=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:update",Ut(_,c))})).apply(this,arguments)}function Wr(){return(Wr=(0,m.Z)(function*(_,c){return we(_,"POST","/v1/accounts:signInWithPassword",Ut(_,c))})).apply(this,arguments)}function Wn(_,c){return Cr.apply(this,arguments)}function Cr(){return(Cr=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:sendOobCode",Ut(_,c))})).apply(this,arguments)}function $i(_,c){return Hi.apply(this,arguments)}function Hi(){return(Hi=(0,m.Z)(function*(_,c){return Wn(_,c)})).apply(this,arguments)}function vs(_,c){return ni.apply(this,arguments)}function ni(){return(ni=(0,m.Z)(function*(_,c){return Wn(_,c)})).apply(this,arguments)}function ro(_,c){return Xi.apply(this,arguments)}function Xi(){return(Xi=(0,m.Z)(function*(_,c){return Wn(_,c)})).apply(this,arguments)}function Gi(_,c){return Es.apply(this,arguments)}function Es(){return(Es=(0,m.Z)(function*(_,c){return Wn(_,c)})).apply(this,arguments)}function _o(){return(_o=(0,m.Z)(function*(_,c){return we(_,"POST","/v1/accounts:signInWithEmailLink",Ut(_,c))})).apply(this,arguments)}function Rs(){return(Rs=(0,m.Z)(function*(_,c){return we(_,"POST","/v1/accounts:signInWithEmailLink",Ut(_,c))})).apply(this,arguments)}class ws extends Ui{constructor(c,d,w,B=null){super("password",w),this._email=c,this._password=d,this._tenantId=B}static _fromEmailAndPassword(c,d){return new ws(c,d,"password")}static _fromEmailAndCode(c,d,w=null){return new ws(c,d,"emailLink",w)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(c){const d="string"==typeof c?JSON.parse(c):c;if(d?.email&&d?.password){if("password"===d.signInMethod)return this._fromEmailAndPassword(d.email,d.password);if("emailLink"===d.signInMethod)return this._fromEmailAndCode(d.email,d.password,d.tenantId)}return null}_getIdTokenResponse(c){var d=this;return(0,m.Z)(function*(){switch(d.signInMethod){case"password":return function Ir(_,c){return Wr.apply(this,arguments)}(c,{returnSecureToken:!0,email:d._email,password:d._password});case"emailLink":return function io(_,c){return _o.apply(this,arguments)}(c,{email:d._email,oobCode:d._password});default:Ht(c,"internal-error")}})()}_linkToIdToken(c,d){var w=this;return(0,m.Z)(function*(){switch(w.signInMethod){case"password":return ct(c,{idToken:d,returnSecureToken:!0,email:w._email,password:w._password});case"emailLink":return function qs(_,c){return Rs.apply(this,arguments)}(c,{idToken:d,email:w._email,oobCode:w._password});default:Ht(c,"internal-error")}})()}_getReauthenticationResolver(c){return this._getIdTokenResponse(c)}}function Ps(_,c){return Ns.apply(this,arguments)}function Ns(){return(Ns=(0,m.Z)(function*(_,c){return we(_,"POST","/v1/accounts:signInWithIdp",Ut(_,c))})).apply(this,arguments)}class lr extends Ui{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(c){const d=new lr(c.providerId,c.signInMethod);return c.idToken||c.accessToken?(c.idToken&&(d.idToken=c.idToken),c.accessToken&&(d.accessToken=c.accessToken),c.nonce&&!c.pendingToken&&(d.nonce=c.nonce),c.pendingToken&&(d.pendingToken=c.pendingToken)):c.oauthToken&&c.oauthTokenSecret?(d.accessToken=c.oauthToken,d.secret=c.oauthTokenSecret):Ht("argument-error"),d}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(c){const d="string"==typeof c?JSON.parse(c):c,{providerId:w,signInMethod:B}=d,q=ge(d,["providerId","signInMethod"]);if(!w||!B)return null;const Pe=new lr(w,B);return Pe.idToken=q.idToken||void 0,Pe.accessToken=q.accessToken||void 0,Pe.secret=q.secret,Pe.nonce=q.nonce,Pe.pendingToken=q.pendingToken||null,Pe}_getIdTokenResponse(c){return Ps(c,this.buildRequest())}_linkToIdToken(c,d){const w=this.buildRequest();return w.idToken=d,Ps(c,w)}_getReauthenticationResolver(c){const d=this.buildRequest();return d.autoCreate=!1,Ps(c,d)}buildRequest(){const c={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)c.pendingToken=this.pendingToken;else{const d={};this.idToken&&(d.id_token=this.idToken),this.accessToken&&(d.access_token=this.accessToken),this.secret&&(d.oauth_token_secret=this.secret),d.providerId=this.providerId,this.nonce&&!this.pendingToken&&(d.nonce=this.nonce),c.postBody=(0,K.xO)(d)}return c}}function ui(_,c){return zi.apply(this,arguments)}function zi(){return(zi=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:sendVerificationCode",Ut(_,c))})).apply(this,arguments)}function Ki(){return(Ki=(0,m.Z)(function*(_,c){return we(_,"POST","/v1/accounts:signInWithPhoneNumber",Ut(_,c))})).apply(this,arguments)}function Qr(){return(Qr=(0,m.Z)(function*(_,c){const d=yield we(_,"POST","/v1/accounts:signInWithPhoneNumber",Ut(_,c));if(d.temporaryProof)throw J(_,"account-exists-with-different-credential",d);return d})).apply(this,arguments)}const Uo={USER_NOT_FOUND:"user-not-found"};function os(){return(os=(0,m.Z)(function*(_,c){return we(_,"POST","/v1/accounts:signInWithPhoneNumber",Ut(_,Object.assign(Object.assign({},c),{operation:"REAUTH"})),Uo)})).apply(this,arguments)}class ir extends Ui{constructor(c){super("phone","phone"),this.params=c}static _fromVerification(c,d){return new ir({verificationId:c,verificationCode:d})}static _fromTokenResponse(c,d){return new ir({phoneNumber:c,temporaryProof:d})}_getIdTokenResponse(c){return function Fs(_,c){return Ki.apply(this,arguments)}(c,this._makeVerificationRequest())}_linkToIdToken(c,d){return function vo(_,c){return Qr.apply(this,arguments)}(c,Object.assign({idToken:d},this._makeVerificationRequest()))}_getReauthenticationResolver(c){return function yi(_,c){return os.apply(this,arguments)}(c,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:c,phoneNumber:d,verificationId:w,verificationCode:B}=this.params;return c&&d?{temporaryProof:c,phoneNumber:d}:{sessionInfo:w,code:B}}toJSON(){const c={providerId:this.providerId};return this.params.phoneNumber&&(c.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(c.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(c.verificationCode=this.params.verificationCode),this.params.verificationId&&(c.verificationId=this.params.verificationId),c}static fromJSON(c){"string"==typeof c&&(c=JSON.parse(c));const{verificationId:d,verificationCode:w,phoneNumber:B,temporaryProof:q}=c;return w||d||B||q?new ir({verificationId:d,verificationCode:w,phoneNumber:B,temporaryProof:q}):null}}class sr{constructor(c){var d,w,B,q,Pe,yt;const on=(0,K.zd)((0,K.pd)(c)),nn=null!==(d=on.apiKey)&&void 0!==d?d:null,Fn=null!==(w=on.oobCode)&&void 0!==w?w:null,Bn=function xi(_){switch(_){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!==(B=on.mode)&&void 0!==B?B:null);bt(nn&&Fn&&Bn,"argument-error"),this.apiKey=nn,this.operation=Bn,this.code=Fn,this.continueUrl=null!==(q=on.continueUrl)&&void 0!==q?q:null,this.languageCode=null!==(Pe=on.languageCode)&&void 0!==Pe?Pe:null,this.tenantId=null!==(yt=on.tenantId)&&void 0!==yt?yt:null}static parseLink(c){const d=function es(_){const c=(0,K.zd)((0,K.pd)(_)).link,d=c?(0,K.zd)((0,K.pd)(c)).deep_link_id:null,w=(0,K.zd)((0,K.pd)(_)).deep_link_id;return(w?(0,K.zd)((0,K.pd)(w)).link:null)||w||d||c||_}(c);try{return new sr(d)}catch{return null}}}let ee=(()=>{class _{constructor(){this.providerId=_.PROVIDER_ID}static credential(d,w){return ws._fromEmailAndPassword(d,w)}static credentialWithLink(d,w){const B=sr.parseLink(w);return bt(B,"argument-error"),ws._fromEmailAndCode(d,B.code,B.tenantId)}}return _.PROVIDER_ID="password",_.EMAIL_PASSWORD_SIGN_IN_METHOD="password",_.EMAIL_LINK_SIGN_IN_METHOD="emailLink",_})();class V{constructor(c){this.providerId=c,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(c){this.defaultLanguageCode=c}setCustomParameters(c){return this.customParameters=c,this}getCustomParameters(){return this.customParameters}}class Q extends V{constructor(){super(...arguments),this.scopes=[]}addScope(c){return this.scopes.includes(c)||this.scopes.push(c),this}getScopes(){return[...this.scopes]}}class Ve extends Q{static credentialFromJSON(c){const d="string"==typeof c?JSON.parse(c):c;return bt("providerId"in d&&"signInMethod"in d,"argument-error"),lr._fromParams(d)}credential(c){return this._credential(Object.assign(Object.assign({},c),{nonce:c.rawNonce}))}_credential(c){return bt(c.idToken||c.accessToken,"argument-error"),lr._fromParams(Object.assign(Object.assign({},c),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(c){return Ve.oauthCredentialFromTaggedObject(c)}static credentialFromError(c){return Ve.oauthCredentialFromTaggedObject(c.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:c}){if(!c)return null;const{oauthIdToken:d,oauthAccessToken:w,oauthTokenSecret:B,pendingToken:q,nonce:Pe,providerId:yt}=c;if(!w&&!B&&!d&&!q||!yt)return null;try{return new Ve(yt)._credential({idToken:d,accessToken:w,nonce:Pe,pendingToken:q})}catch{return null}}}let At=(()=>{class _ extends Q{constructor(){super("facebook.com")}static credential(d){return lr._fromParams({providerId:_.PROVIDER_ID,signInMethod:_.FACEBOOK_SIGN_IN_METHOD,accessToken:d})}static credentialFromResult(d){return _.credentialFromTaggedObject(d)}static credentialFromError(d){return _.credentialFromTaggedObject(d.customData||{})}static credentialFromTaggedObject({_tokenResponse:d}){if(!d||!("oauthAccessToken"in d)||!d.oauthAccessToken)return null;try{return _.credential(d.oauthAccessToken)}catch{return null}}}return _.FACEBOOK_SIGN_IN_METHOD="facebook.com",_.PROVIDER_ID="facebook.com",_})(),Vt=(()=>{class _ extends Q{constructor(){super("google.com"),this.addScope("profile")}static credential(d,w){return lr._fromParams({providerId:_.PROVIDER_ID,signInMethod:_.GOOGLE_SIGN_IN_METHOD,idToken:d,accessToken:w})}static credentialFromResult(d){return _.credentialFromTaggedObject(d)}static credentialFromError(d){return _.credentialFromTaggedObject(d.customData||{})}static credentialFromTaggedObject({_tokenResponse:d}){if(!d)return null;const{oauthIdToken:w,oauthAccessToken:B}=d;if(!w&&!B)return null;try{return _.credential(w,B)}catch{return null}}}return _.GOOGLE_SIGN_IN_METHOD="google.com",_.PROVIDER_ID="google.com",_})(),Jt=(()=>{class _ extends Q{constructor(){super("github.com")}static credential(d){return lr._fromParams({providerId:_.PROVIDER_ID,signInMethod:_.GITHUB_SIGN_IN_METHOD,accessToken:d})}static credentialFromResult(d){return _.credentialFromTaggedObject(d)}static credentialFromError(d){return _.credentialFromTaggedObject(d.customData||{})}static credentialFromTaggedObject({_tokenResponse:d}){if(!d||!("oauthAccessToken"in d)||!d.oauthAccessToken)return null;try{return _.credential(d.oauthAccessToken)}catch{return null}}}return _.GITHUB_SIGN_IN_METHOD="github.com",_.PROVIDER_ID="github.com",_})();class gr extends Ui{constructor(c,d){super(c,c),this.pendingToken=d}_getIdTokenResponse(c){return Ps(c,this.buildRequest())}_linkToIdToken(c,d){const w=this.buildRequest();return w.idToken=d,Ps(c,w)}_getReauthenticationResolver(c){const d=this.buildRequest();return d.autoCreate=!1,Ps(c,d)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(c){const d="string"==typeof c?JSON.parse(c):c,{providerId:w,signInMethod:B,pendingToken:q}=d;return w&&B&&q&&w===B?new gr(w,q):null}static _create(c,d){return new gr(c,d)}buildRequest(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}}}class Zn extends V{constructor(c){bt(c.startsWith("saml."),"argument-error"),super(c)}static credentialFromResult(c){return Zn.samlCredentialFromTaggedObject(c)}static credentialFromError(c){return Zn.samlCredentialFromTaggedObject(c.customData||{})}static credentialFromJSON(c){const d=gr.fromJSON(c);return bt(d,"argument-error"),d}static samlCredentialFromTaggedObject({_tokenResponse:c}){if(!c)return null;const{pendingToken:d,providerId:w}=c;if(!d||!w)return null;try{return gr._create(w,d)}catch{return null}}}let Lr=(()=>{class _ extends Q{constructor(){super("twitter.com")}static credential(d,w){return lr._fromParams({providerId:_.PROVIDER_ID,signInMethod:_.TWITTER_SIGN_IN_METHOD,oauthToken:d,oauthTokenSecret:w})}static credentialFromResult(d){return _.credentialFromTaggedObject(d)}static credentialFromError(d){return _.credentialFromTaggedObject(d.customData||{})}static credentialFromTaggedObject({_tokenResponse:d}){if(!d)return null;const{oauthAccessToken:w,oauthTokenSecret:B}=d;if(!w||!B)return null;try{return _.credential(w,B)}catch{return null}}}return _.TWITTER_SIGN_IN_METHOD="twitter.com",_.PROVIDER_ID="twitter.com",_})();function or(_,c){return Dn.apply(this,arguments)}function Dn(){return(Dn=(0,m.Z)(function*(_,c){return we(_,"POST","/v1/accounts:signUp",Ut(_,c))})).apply(this,arguments)}class $r{constructor(c){this.user=c.user,this.providerId=c.providerId,this._tokenResponse=c._tokenResponse,this.operationType=c.operationType}static _fromIdTokenResponse(c,d,w,B=!1){return(0,m.Z)(function*(){const q=yield Vr._fromIdTokenResponse(c,w,B),Pe=li(w);return new $r({user:q,providerId:Pe,_tokenResponse:w,operationType:d})})()}static _forOperation(c,d,w){return(0,m.Z)(function*(){yield c._updateTokensIfNecessary(w,!0);const B=li(w);return new $r({user:c,providerId:B,_tokenResponse:w,operationType:d})})()}}function li(_){return _.providerId?_.providerId:"phoneNumber"in _?"phone":null}function bs(){return(bs=(0,m.Z)(function*(_){var c;const d=xr(_);if(yield d._initializationPromise,null!==(c=d.currentUser)&&void 0!==c&&c.isAnonymous)return new $r({user:d.currentUser,providerId:null,operationType:"signIn"});const w=yield or(d,{returnSecureToken:!0}),B=yield $r._fromIdTokenResponse(d,"signIn",w,!0);return yield d._updateCurrentUser(B.user),B})).apply(this,arguments)}class Si extends K.ZR{constructor(c,d,w,B){var q;super(d.code,d.message),this.operationType=w,this.user=B,Object.setPrototypeOf(this,Si.prototype),this.customData={appName:c.name,tenantId:null!==(q=c.tenantId)&&void 0!==q?q:void 0,_serverResponse:d.customData._serverResponse,operationType:w}}static _fromErrorAndOperation(c,d,w,B){return new Si(c,d,w,B)}}function Oi(_,c,d,w){return("reauthenticate"===c?d._getReauthenticationResolver(_):d._getIdTokenResponse(_)).catch(q=>{throw"auth/multi-factor-auth-required"===q.code?Si._fromErrorAndOperation(_,q,c,w):q})}function so(_){return new Set(_.map(({providerId:c})=>c).filter(c=>!!c))}function O(){return(O=(0,m.Z)(function*(_,c){const d=(0,K.m9)(_);yield gt(!0,d,c);const{providerUserInfo:w}=yield Qt(d.auth,{idToken:yield d.getIdToken(),deleteProvider:[c]}),B=so(w||[]);return d.providerData=d.providerData.filter(q=>B.has(q.providerId)),B.has("phone")||(d.phoneNumber=null),yield d.auth._persistUserIfCurrent(d),d})).apply(this,arguments)}function P(_,c){return X.apply(this,arguments)}function X(){return(X=(0,m.Z)(function*(_,c,d=!1){const w=yield zt(_,c._linkToIdToken(_.auth,yield _.getIdToken()),d);return $r._forOperation(_,"link",w)})).apply(this,arguments)}function gt(_,c,d){return un.apply(this,arguments)}function un(){return(un=(0,m.Z)(function*(_,c,d){yield We(c);const B=!1===_?"provider-already-linked":"no-such-provider";bt(so(c.providerData).has(d)===_,c.auth,B)})).apply(this,arguments)}function Br(_,c){return ci.apply(this,arguments)}function ci(){return(ci=(0,m.Z)(function*(_,c,d=!1){const{auth:w}=_,B="reauthenticate";try{const q=yield zt(_,Oi(w,B,c,_),d);bt(q.idToken,w,"internal-error");const Pe=Fr(q.idToken);bt(Pe,w,"internal-error");const{sub:yt}=Pe;return bt(_.uid===yt,w,"user-mismatch"),$r._forOperation(_,B,q)}catch(q){throw"auth/user-not-found"===q?.code&&Ht(w,"user-mismatch"),q}})).apply(this,arguments)}function ri(_,c){return js.apply(this,arguments)}function js(){return(js=(0,m.Z)(function*(_,c,d=!1){const w="signIn",B=yield Oi(_,w,c),q=yield $r._fromIdTokenResponse(_,w,B);return d||(yield _._updateCurrentUser(q.user)),q})).apply(this,arguments)}function Ko(_,c){return Dt.apply(this,arguments)}function Dt(){return(Dt=(0,m.Z)(function*(_,c){return ri(xr(_),c)})).apply(this,arguments)}function ze(_,c){return Oe.apply(this,arguments)}function Oe(){return(Oe=(0,m.Z)(function*(_,c){const d=(0,K.m9)(_);return yield gt(!1,d,c.providerId),P(d,c)})).apply(this,arguments)}function pt(_,c){return Pt.apply(this,arguments)}function Pt(){return(Pt=(0,m.Z)(function*(_,c){return Br((0,K.m9)(_),c)})).apply(this,arguments)}function In(_,c){return ar.apply(this,arguments)}function ar(){return(ar=(0,m.Z)(function*(_,c){return we(_,"POST","/v1/accounts:signInWithCustomToken",Ut(_,c))})).apply(this,arguments)}function di(){return(di=(0,m.Z)(function*(_,c){const d=xr(_),w=yield In(d,{token:c,returnSecureToken:!0}),B=yield $r._fromIdTokenResponse(d,"signIn",w);return yield d._updateCurrentUser(B.user),B})).apply(this,arguments)}class Eo{constructor(c,d){this.factorId=c,this.uid=d.mfaEnrollmentId,this.enrollmentTime=new Date(d.enrolledAt).toUTCString(),this.displayName=d.displayName}static _fromServerResponse(c,d){return"phoneInfo"in d?Zr._fromServerResponse(c,d):Ht(c,"internal-error")}}class Zr extends Eo{constructor(c){super("phone",c),this.phoneNumber=c.phoneInfo}static _fromServerResponse(c,d){return new Zr(d)}}function Wo(_,c,d){var w;bt((null===(w=d.url)||void 0===w?void 0:w.length)>0,_,"invalid-continue-uri"),bt(typeof d.dynamicLinkDomain>"u"||d.dynamicLinkDomain.length>0,_,"invalid-dynamic-link-domain"),c.continueUrl=d.url,c.dynamicLinkDomain=d.dynamicLinkDomain,c.canHandleCodeInApp=d.handleCodeInApp,d.iOS&&(bt(d.iOS.bundleId.length>0,_,"missing-ios-bundle-id"),c.iOSBundleId=d.iOS.bundleId),d.android&&(bt(d.android.packageName.length>0,_,"missing-android-pkg-name"),c.androidInstallApp=d.android.installApp,c.androidMinimumVersionCode=d.android.minimumVersion,c.androidPackageName=d.android.packageName)}function $s(){return($s=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_),B={requestType:"PASSWORD_RESET",email:c};d&&Wo(w,B,d),yield vs(w,B)})).apply(this,arguments)}function Zo(){return(Zo=(0,m.Z)(function*(_,c,d){yield qe((0,K.m9)(_),{oobCode:c,newPassword:d})})).apply(this,arguments)}function Ea(){return(Ea=(0,m.Z)(function*(_,c){yield tn((0,K.m9)(_),{oobCode:c})})).apply(this,arguments)}function qo(_,c){return oo.apply(this,arguments)}function oo(){return(oo=(0,m.Z)(function*(_,c){const d=(0,K.m9)(_),w=yield qe(d,{oobCode:c}),B=w.requestType;switch(bt(B,d,"internal-error"),B){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":bt(w.newEmail,d,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":bt(w.mfaInfo,d,"internal-error");default:bt(w.email,d,"internal-error")}let q=null;return w.mfaInfo&&(q=Eo._fromServerResponse(xr(d),w.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===w.requestType?w.newEmail:w.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===w.requestType?w.email:w.newEmail)||null,multiFactorInfo:q},operation:B}})).apply(this,arguments)}function Ys(){return(Ys=(0,m.Z)(function*(_,c){const{data:d}=yield qo((0,K.m9)(_),c);return d.email})).apply(this,arguments)}function Pa(){return(Pa=(0,m.Z)(function*(_,c,d){const w=xr(_),B=yield or(w,{returnSecureToken:!0,email:c,password:d}),q=yield $r._fromIdTokenResponse(w,"signIn",B);return yield w._updateCurrentUser(q.user),q})).apply(this,arguments)}function Qo(){return(Qo=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_),B={requestType:"EMAIL_SIGNIN",email:c};bt(d.handleCodeInApp,w,"argument-error"),d&&Wo(w,B,d),yield ro(w,B)})).apply(this,arguments)}function ii(){return(ii=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_),B=ee.credentialWithLink(c,d||Dr());return bt(B._tenantId===(w.tenantId||null),w,"tenant-id-mismatch"),Ko(w,B)})).apply(this,arguments)}function _u(_,c){return bo.apply(this,arguments)}function bo(){return(bo=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:createAuthUri",Ut(_,c))})).apply(this,arguments)}function Na(){return(Na=(0,m.Z)(function*(_,c){const w={identifier:c,continueUri:Or()?Dr():"http://localhost"},{signinMethods:B}=yield _u((0,K.m9)(_),w);return B||[]})).apply(this,arguments)}function Jo(){return(Jo=(0,m.Z)(function*(_,c){const d=(0,K.m9)(_),B={requestType:"VERIFY_EMAIL",idToken:yield _.getIdToken()};c&&Wo(d.auth,B,c);const{email:q}=yield $i(d.auth,B);q!==_.email&&(yield _.reload())})).apply(this,arguments)}function Oo(){return(Oo=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_),q={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:yield _.getIdToken(),newEmail:c};d&&Wo(w.auth,q,d);const{email:Pe}=yield Gi(w.auth,q);Pe!==_.email&&(yield _.reload())})).apply(this,arguments)}function ha(_,c){return ea.apply(this,arguments)}function ea(){return(ea=(0,m.Z)(function*(_,c){return mn(_,"POST","/v1/accounts:update",c)})).apply(this,arguments)}function ba(){return(ba=(0,m.Z)(function*(_,{displayName:c,photoURL:d}){if(void 0===c&&void 0===d)return;const w=(0,K.m9)(_),q={idToken:yield w.getIdToken(),displayName:c,photoUrl:d,returnSecureToken:!0},Pe=yield zt(w,ha(w.auth,q));w.displayName=Pe.displayName||null,w.photoURL=Pe.photoUrl||null;const yt=w.providerData.find(({providerId:on})=>"password"===on);yt&&(yt.displayName=w.displayName,yt.photoURL=w.photoURL),yield w._updateTokensIfNecessary(Pe)})).apply(this,arguments)}function ka(_,c,d){return ta.apply(this,arguments)}function ta(){return(ta=(0,m.Z)(function*(_,c,d){const{auth:w}=_,q={idToken:yield _.getIdToken(),returnSecureToken:!0};c&&(q.email=c),d&&(q.password=d);const Pe=yield zt(_,ct(w,q));yield _._updateTokensIfNecessary(Pe,!0)})).apply(this,arguments)}class Ds{constructor(c,d,w={}){this.isNewUser=c,this.providerId=d,this.profile=w}}class fa extends Ds{constructor(c,d,w,B){super(c,d,w),this.username=B}}class Is extends Ds{constructor(c,d){super(c,"facebook.com",d)}}class vu extends fa{constructor(c,d){super(c,"github.com",d,"string"==typeof d?.login?d?.login:null)}}class Bu extends Ds{constructor(c,d){super(c,"google.com",d)}}class Mi extends fa{constructor(c,d,w){super(c,"twitter.com",d,w)}}function Eu(_){const{user:c,_tokenResponse:d}=_;return c.isAnonymous&&!d?{providerId:null,isNewUser:!1,profile:null}:function Po(_){var c,d;if(!_)return null;const{providerId:w}=_,B=_.rawUserInfo?JSON.parse(_.rawUserInfo):{},q=_.isNewUser||"identitytoolkit#SignupNewUserResponse"===_.kind;if(!w&&_?.idToken){const Pe=null===(d=null===(c=Fr(_.idToken))||void 0===c?void 0:c.firebase)||void 0===d?void 0:d.sign_in_provider;if(Pe)return new Ds(q,"anonymous"!==Pe&&"custom"!==Pe?Pe:null)}if(!w)return null;switch(w){case"facebook.com":return new Is(q,B);case"github.com":return new vu(q,B);case"google.com":return new Bu(q,B);case"twitter.com":return new Mi(q,B,_.screenName||null);case"custom":case"anonymous":return new Ds(q,null);default:return new Ds(q,w,B)}}(d)}class hi{constructor(c,d){this.type=c,this.credential=d}static _fromIdtoken(c){return new hi("enroll",c)}static _fromMfaPendingCredential(c){return new hi("signin",c)}toJSON(){return{multiFactorSession:{["enroll"===this.type?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(c){var d,w;if(c?.multiFactorSession){if(null!==(d=c.multiFactorSession)&&void 0!==d&&d.pendingCredential)return hi._fromMfaPendingCredential(c.multiFactorSession.pendingCredential);if(null!==(w=c.multiFactorSession)&&void 0!==w&&w.idToken)return hi._fromIdtoken(c.multiFactorSession.idToken)}return null}}class No{constructor(c,d,w){this.session=c,this.hints=d,this.signInResolver=w}static _fromError(c,d){const w=xr(c),B=d.customData._serverResponse,q=(B.mfaInfo||[]).map(yt=>Eo._fromServerResponse(w,yt));bt(B.mfaPendingCredential,w,"internal-error");const Pe=hi._fromMfaPendingCredential(B.mfaPendingCredential);return new No(Pe,q,function(){var yt=(0,m.Z)(function*(on){const nn=yield on._process(w,Pe);delete B.mfaInfo,delete B.mfaPendingCredential;const Fn=Object.assign(Object.assign({},B),{idToken:nn.idToken,refreshToken:nn.refreshToken});switch(d.operationType){case"signIn":const Bn=yield $r._fromIdTokenResponse(w,d.operationType,Fn);return yield w._updateCurrentUser(Bn.user),Bn;case"reauthenticate":return bt(d.user,w,"internal-error"),$r._forOperation(d.user,d.operationType,Fn);default:Ht(w,"internal-error")}});return function(on){return yt.apply(this,arguments)}}())}resolveSignIn(c){var d=this;return(0,m.Z)(function*(){return d.signInResolver(c)})()}}function Va(_,c){return mn(_,"POST","/v2/accounts/mfaEnrollment:start",Ut(_,c))}class Jr{constructor(c){this.user=c,this.enrolledFactors=[],c._onReload(d=>{d.mfaInfo&&(this.enrolledFactors=d.mfaInfo.map(w=>Eo._fromServerResponse(c.auth,w)))})}static _fromUser(c){return new Jr(c)}getSession(){var c=this;return(0,m.Z)(function*(){return hi._fromIdtoken(yield c.user.getIdToken())})()}enroll(c,d){var w=this;return(0,m.Z)(function*(){const B=c,q=yield w.getSession(),Pe=yield zt(w.user,B._process(w.user.auth,q,d));return yield w.user._updateTokensIfNecessary(Pe),w.user.reload()})()}unenroll(c){var d=this;return(0,m.Z)(function*(){const w="string"==typeof c?c:c.uid,B=yield d.user.getIdToken(),q=yield zt(d.user,function Xt(_,c){return mn(_,"POST","/v2/accounts/mfaEnrollment:withdraw",Ut(_,c))}(d.user.auth,{idToken:B,mfaEnrollmentId:w}));d.enrolledFactors=d.enrolledFactors.filter(({uid:Pe})=>Pe!==w),yield d.user._updateTokensIfNecessary(q);try{yield d.user.reload()}catch(Pe){if("auth/user-token-expired"!==Pe.code)throw Pe}})()}}const vi=new WeakMap,_n="__sak";class zn{constructor(c,d){this.storageRetriever=c,this.type=d}_isAvailable(){try{return this.storage?(this.storage.setItem(_n,"1"),this.storage.removeItem(_n),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(c,d){return this.storage.setItem(c,JSON.stringify(d)),Promise.resolve()}_get(c){const d=this.storage.getItem(c);return Promise.resolve(d?JSON.parse(d):null)}_remove(c){return this.storage.removeItem(c),Promise.resolve()}get storage(){return this.storageRetriever()}}const I=(()=>{class _ extends zn{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(d,w)=>this.onStorageEvent(d,w),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function eu(){const _=(0,K.z$)();return ps(_)||ai(_)}()&&function Us(){try{return!(!window||window===window.top)}catch{return!1}}(),this.fallbackToPolling=bi(),this._shouldAllowMigration=!0}forAllChangedKeys(d){for(const w of Object.keys(this.listeners)){const B=this.storage.getItem(w),q=this.localCache[w];B!==q&&d(w,q,B)}}onStorageEvent(d,w=!1){if(!d.key)return void this.forAllChangedKeys((yt,on,nn)=>{this.notifyListeners(yt,nn)});const B=d.key;if(w?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const yt=this.storage.getItem(B);if(d.newValue!==yt)null!==d.newValue?this.storage.setItem(B,d.newValue):this.storage.removeItem(B);else if(this.localCache[B]===d.newValue&&!w)return}const q=()=>{const yt=this.storage.getItem(B);!w&&this.localCache[B]===yt||this.notifyListeners(B,yt)},Pe=this.storage.getItem(B);!function mi(){return(0,K.w1)()&&10===document.documentMode}()||Pe===d.newValue||d.newValue===d.oldValue?q():setTimeout(q,10)}notifyListeners(d,w){this.localCache[d]=w;const B=this.listeners[d];if(B)for(const q of Array.from(B))q(w&&JSON.parse(w))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((d,w,B)=>{this.onStorageEvent(new StorageEvent("storage",{key:d,oldValue:w,newValue:B}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(d,w){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[d]||(this.listeners[d]=new Set,this.localCache[d]=this.storage.getItem(d)),this.listeners[d].add(w)}_removeListener(d,w){this.listeners[d]&&(this.listeners[d].delete(w),0===this.listeners[d].size&&delete this.listeners[d]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}_set(d,w){var B=()=>super._set,q=this;return(0,m.Z)(function*(){yield B().call(q,d,w),q.localCache[d]=JSON.stringify(w)})()}_get(d){var w=()=>super._get,B=this;return(0,m.Z)(function*(){const q=yield w().call(B,d);return B.localCache[d]=JSON.stringify(q),q})()}_remove(d){var w=()=>super._remove,B=this;return(0,m.Z)(function*(){yield w().call(B,d),delete B.localCache[d]})()}}return _.type="LOCAL",_})(),G=(()=>{class _ extends zn{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(d,w){}_removeListener(d,w){}}return _.type="SESSION",_})();let be=(()=>{class _{constructor(d){this.eventTarget=d,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(d){const w=this.receivers.find(q=>q.isListeningto(d));if(w)return w;const B=new _(d);return this.receivers.push(B),B}isListeningto(d){return this.eventTarget===d}handleEvent(d){var w=this;return(0,m.Z)(function*(){const B=d,{eventId:q,eventType:Pe,data:yt}=B.data,on=w.handlersMap[Pe];if(!on?.size)return;B.ports[0].postMessage({status:"ack",eventId:q,eventType:Pe});const nn=Array.from(on).map(function(){var Bn=(0,m.Z)(function*(Hr){return Hr(B.origin,yt)});return function(Hr){return Bn.apply(this,arguments)}}()),Fn=yield function re(_){return Promise.all(_.map(function(){var c=(0,m.Z)(function*(d){try{return{fulfilled:!0,value:yield d}}catch(w){return{fulfilled:!1,reason:w}}});return function(d){return c.apply(this,arguments)}}()))}(nn);B.ports[0].postMessage({status:"done",eventId:q,eventType:Pe,response:Fn})})()}_subscribe(d,w){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[d]||(this.handlersMap[d]=new Set),this.handlersMap[d].add(w)}_unsubscribe(d,w){this.handlersMap[d]&&w&&this.handlersMap[d].delete(w),(!w||0===this.handlersMap[d].size)&&delete this.handlersMap[d],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}return _.receivers=[],_})();function Ue(_="",c=10){let d="";for(let w=0;w{const Fn=Ue("",20);q.port1.start();const Bn=setTimeout(()=>{nn(new Error("unsupported_event"))},w);yt={messageChannel:q,onMessage(Hr){const no=Hr;if(no.data.eventId===Fn)switch(no.data.status){case"ack":clearTimeout(Bn),Pe=setTimeout(()=>{nn(new Error("timeout"))},3e3);break;case"done":clearTimeout(Pe),on(no.data.response);break;default:clearTimeout(Bn),clearTimeout(Pe),nn(new Error("invalid_response"))}}},B.handlers.add(yt),q.port1.addEventListener("message",yt.onMessage),B.target.postMessage({eventType:c,eventId:Fn,data:d},[q.port2])}).finally(()=>{yt&&B.removeMessageHandler(yt)})})()}}function Yt(){return window}function An(){return typeof Yt().WorkerGlobalScope<"u"&&"function"==typeof Yt().importScripts}function si(){return(si=(0,m.Z)(function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})).apply(this,arguments)}const Js="firebaseLocalStorageDb",On="firebaseLocalStorage",na="fbase_key";class dr{constructor(c){this.request=c}toPromise(){return new Promise((c,d)=>{this.request.addEventListener("success",()=>{c(this.request.result)}),this.request.addEventListener("error",()=>{d(this.request.error)})})}}function ga(_,c){return _.transaction([On],c?"readwrite":"readonly").objectStore(On)}function vn(){const _=indexedDB.open(Js,1);return new Promise((c,d)=>{_.addEventListener("error",()=>{d(_.error)}),_.addEventListener("upgradeneeded",()=>{const w=_.result;try{w.createObjectStore(On,{keyPath:na})}catch(B){d(B)}}),_.addEventListener("success",(0,m.Z)(function*(){const w=_.result;w.objectStoreNames.contains(On)?c(w):(w.close(),yield function Wi(){const _=indexedDB.deleteDatabase(Js);return new dr(_).toPromise()}(),c(yield vn()))}))})}function qr(_,c,d){return tu.apply(this,arguments)}function tu(){return(tu=(0,m.Z)(function*(_,c,d){const w=ga(_,!0).put({[na]:c,value:d});return new dr(w).toPromise()})).apply(this,arguments)}function Ba(){return(Ba=(0,m.Z)(function*(_,c){const d=ga(_,!1).get(c),w=yield new dr(d).toPromise();return void 0===w?null:w.value})).apply(this,arguments)}function ra(_,c){const d=ga(_,!0).delete(c);return new dr(d).toPromise()}const ko=(()=>{class _{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(()=>{},()=>{})}_openDb(){var d=this;return(0,m.Z)(function*(){return d.db||(d.db=yield vn()),d.db})()}_withRetries(d){var w=this;return(0,m.Z)(function*(){let B=0;for(;;)try{const q=yield w._openDb();return yield d(q)}catch(q){if(B++>3)throw q;w.db&&(w.db.close(),w.db=void 0)}})()}initializeServiceWorkerMessaging(){var d=this;return(0,m.Z)(function*(){return An()?d.initializeReceiver():d.initializeSender()})()}initializeReceiver(){var d=this;return(0,m.Z)(function*(){d.receiver=be._getInstance(function Gs(){return An()?self:null}()),d.receiver._subscribe("keyChanged",function(){var w=(0,m.Z)(function*(B,q){return{keyProcessed:(yield d._poll()).includes(q.key)}});return function(B,q){return w.apply(this,arguments)}}()),d.receiver._subscribe("ping",function(){var w=(0,m.Z)(function*(B,q){return["keyChanged"]});return function(B,q){return w.apply(this,arguments)}}())})()}initializeSender(){var d=this;return(0,m.Z)(function*(){var w,B;if(d.activeServiceWorker=yield function Ar(){return si.apply(this,arguments)}(),!d.activeServiceWorker)return;d.sender=new Ft(d.activeServiceWorker);const q=yield d.sender._send("ping",{},800);!q||(null===(w=q[0])||void 0===w?void 0:w.fulfilled)&&(null===(B=q[0])||void 0===B?void 0:B.value.includes("keyChanged"))&&(d.serviceWorkerReceiverAvailable=!0)})()}notifyServiceWorker(d){var w=this;return(0,m.Z)(function*(){if(w.sender&&w.activeServiceWorker&&function $n(){var _;return(null===(_=navigator?.serviceWorker)||void 0===_?void 0:_.controller)||null}()===w.activeServiceWorker)try{yield w.sender._send("keyChanged",{key:d},w.serviceWorkerReceiverAvailable?800:50)}catch{}})()}_isAvailable(){return(0,m.Z)(function*(){try{if(!indexedDB)return!1;const d=yield vn();return yield qr(d,_n,"1"),yield ra(d,_n),!0}catch{}return!1})()}_withPendingWrite(d){var w=this;return(0,m.Z)(function*(){w.pendingWrites++;try{yield d()}finally{w.pendingWrites--}})()}_set(d,w){var B=this;return(0,m.Z)(function*(){return B._withPendingWrite((0,m.Z)(function*(){return yield B._withRetries(q=>qr(q,d,w)),B.localCache[d]=w,B.notifyServiceWorker(d)}))})()}_get(d){var w=this;return(0,m.Z)(function*(){const B=yield w._withRetries(q=>function Ua(_,c){return Ba.apply(this,arguments)}(q,d));return w.localCache[d]=B,B})()}_remove(d){var w=this;return(0,m.Z)(function*(){return w._withPendingWrite((0,m.Z)(function*(){return yield w._withRetries(B=>ra(B,d)),delete w.localCache[d],w.notifyServiceWorker(d)}))})()}_poll(){var d=this;return(0,m.Z)(function*(){const w=yield d._withRetries(Pe=>{const yt=ga(Pe,!1).getAll();return new dr(yt).toPromise()});if(!w)return[];if(0!==d.pendingWrites)return[];const B=[],q=new Set;for(const{fbase_key:Pe,value:yt}of w)q.add(Pe),JSON.stringify(d.localCache[Pe])!==JSON.stringify(yt)&&(d.notifyListeners(Pe,yt),B.push(Pe));for(const Pe of Object.keys(d.localCache))d.localCache[Pe]&&!q.has(Pe)&&(d.notifyListeners(Pe,null),B.push(Pe));return B})()}notifyListeners(d,w){this.localCache[d]=w;const B=this.listeners[d];if(B)for(const q of Array.from(B))q(w)}startPolling(){var d=this;this.stopPolling(),this.pollTimer=setInterval((0,m.Z)(function*(){return d._poll()}),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(d,w){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[d]||(this.listeners[d]=new Set,this._get(d)),this.listeners[d].add(w)}_removeListener(d,w){this.listeners[d]&&(this.listeners[d].delete(w),0===this.listeners[d].size&&delete this.listeners[d]),0===Object.keys(this.listeners).length&&this.stopPolling()}}return _.type="LOCAL",_})();function dc(_,c){return mn(_,"POST","/v2/accounts/mfaSignIn:start",Ut(_,c))}function ja(){return(ja=(0,m.Z)(function*(_){return(yield mn(_,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""})).apply(this,arguments)}function bu(_){return new Promise((c,d)=>{const w=document.createElement("script");w.setAttribute("src",_),w.onload=c,w.onerror=B=>{const q=Zt("internal-error");q.customData=B,d(q)},w.type="text/javascript",w.charset="UTF-8",function mt(){var _,c;return null!==(c=null===(_=document.getElementsByTagName("head"))||void 0===_?void 0:_[0])&&void 0!==c?c:document}().appendChild(w)})}function Ls(_){return`__${_}${Math.floor(1e6*Math.random())}`}const Ws=1e12;class Ia{constructor(c){this.auth=c,this.counter=Ws,this._widgets=new Map}render(c,d){const w=this.counter;return this._widgets.set(w,new uo(c,this.auth.name,d||{})),this.counter++,w}reset(c){var d;const w=c||Ws;null===(d=this._widgets.get(w))||void 0===d||d.delete(),this._widgets.delete(w)}getResponse(c){var d;return(null===(d=this._widgets.get(c||Ws))||void 0===d?void 0:d.getResponse())||""}execute(c){var d=this;return(0,m.Z)(function*(){var w;return null===(w=d._widgets.get(c||Ws))||void 0===w||w.execute(),""})()}}class uo{constructor(c,d,w){this.params=w,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const B="string"==typeof c?document.getElementById(c):c;bt(B,"argument-error",{appName:d}),this.container=B,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),!this.timerId&&(this.timerId=window.setTimeout(()=>{this.responseToken=function $a(_){const c=[],d="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let w=0;w<_;w++)c.push(d.charAt(Math.floor(Math.random()*d.length)));return c.join("")}(50);const{callback:c,"expired-callback":d}=this.params;if(c)try{c(this.responseToken)}catch{}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,d)try{d()}catch{}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const ma=Ls("rcb"),fc=new xt(3e4,6e4);class To{constructor(){this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!Yt().grecaptcha}load(c,d=""){return bt(function ju(_){return _.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(_)}(d),c,"argument-error"),this.shouldResolveImmediately(d)?Promise.resolve(Yt().grecaptcha):new Promise((w,B)=>{const q=Yt().setTimeout(()=>{B(Zt(c,"network-request-failed"))},fc.get());Yt()[ma]=()=>{Yt().clearTimeout(q),delete Yt()[ma];const yt=Yt().grecaptcha;if(!yt)return void B(Zt(c,"internal-error"));const on=yt.render;yt.render=(nn,Fn)=>{const Bn=on(nn,Fn);return this.counter++,Bn},this.hostLanguage=d,w(yt)},bu(`https://www.google.com/recaptcha/api.js??${(0,K.xO)({onload:ma,render:"explicit",hl:d})}`).catch(()=>{clearTimeout(q),B(Zt(c,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(c){return!!Yt().grecaptcha&&(c===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class ts{load(c){return(0,m.Z)(function*(){return new Ia(c)})()}clearedOneInstance(){}}const Ho="recaptcha",Xr={theme:"light",type:"image"};class N{constructor(c,d=Object.assign({},Xr),w){this.parameters=d,this.type=Ho,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=xr(w),this.isInvisible="invisible"===this.parameters.size,bt(typeof document<"u",this.auth,"operation-not-supported-in-this-environment");const B="string"==typeof c?document.getElementById(c):c;bt(B,this.auth,"argument-error"),this.container=B,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new ts:new To,this.validateStartingState()}verify(){var c=this;return(0,m.Z)(function*(){c.assertNotDestroyed();const d=yield c.render(),w=c.getAssertedRecaptcha();return w.getResponse(d)||new Promise(q=>{const Pe=yt=>{!yt||(c.tokenChangeListeners.delete(Pe),q(yt))};c.tokenChangeListeners.add(Pe),c.isInvisible&&w.execute(d)})})()}render(){try{this.assertNotDestroyed()}catch(c){return Promise.reject(c)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(c=>{throw this.renderPromise=null,c})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(c=>{this.container.removeChild(c)})}validateStartingState(){bt(!this.parameters.sitekey,this.auth,"argument-error"),bt(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),bt(typeof document<"u",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(c){return d=>{if(this.tokenChangeListeners.forEach(w=>w(d)),"function"==typeof c)c(d);else if("string"==typeof c){const w=Yt()[c];"function"==typeof w&&w(d)}}}assertNotDestroyed(){bt(!this.destroyed,this.auth,"internal-error")}makeRenderPromise(){var c=this;return(0,m.Z)(function*(){if(yield c.init(),!c.widgetId){let d=c.container;if(!c.isInvisible){const w=document.createElement("div");d.appendChild(w),d=w}c.widgetId=c.getAssertedRecaptcha().render(d,c.parameters)}return c.widgetId})()}init(){var c=this;return(0,m.Z)(function*(){bt(Or()&&!An(),c.auth,"internal-error"),yield function y(){let _=null;return new Promise(c=>{"complete"!==document.readyState?(_=()=>c(),window.addEventListener("load",_)):c()}).catch(c=>{throw _&&window.removeEventListener("load",_),c})}(),c.recaptcha=yield c._recaptchaLoader.load(c.auth,c.auth.languageCode||void 0);const d=yield function Di(_){return ja.apply(this,arguments)}(c.auth);bt(d,c.auth,"internal-error"),c.parameters.sitekey=d})()}getAssertedRecaptcha(){return bt(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}class p{constructor(c,d){this.verificationId=c,this.onConfirmation=d}confirm(c){const d=ir._fromVerification(this.verificationId,c);return this.onConfirmation(d)}}function H(){return(H=(0,m.Z)(function*(_,c,d){const w=xr(_),B=yield wt(w,c,(0,K.m9)(d));return new p(B,q=>Ko(w,q))})).apply(this,arguments)}function De(){return(De=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_);yield gt(!1,w,"phone");const B=yield wt(w.auth,c,(0,K.m9)(d));return new p(B,q=>ze(w,q))})).apply(this,arguments)}function st(){return(st=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_),B=yield wt(w.auth,c,(0,K.m9)(d));return new p(B,q=>pt(w,q))})).apply(this,arguments)}function wt(_,c,d){return Bt.apply(this,arguments)}function Bt(){return(Bt=(0,m.Z)(function*(_,c,d){var w;const B=yield d.verify();try{let q;if(bt("string"==typeof B,_,"argument-error"),bt(d.type===Ho,_,"argument-error"),q="string"==typeof c?{phoneNumber:c}:c,"session"in q){const Pe=q.session;if("phoneNumber"in q)return bt("enroll"===Pe.type,_,"internal-error"),(yield Va(_,{idToken:Pe.credential,phoneEnrollmentInfo:{phoneNumber:q.phoneNumber,recaptchaToken:B}})).phoneSessionInfo.sessionInfo;{bt("signin"===Pe.type,_,"internal-error");const yt=(null===(w=q.multiFactorHint)||void 0===w?void 0:w.uid)||q.multiFactorUid;return bt(yt,_,"missing-multi-factor-info"),(yield dc(_,{mfaPendingCredential:Pe.credential,mfaEnrollmentId:yt,phoneSignInInfo:{recaptchaToken:B}})).phoneResponseInfo.sessionInfo}}{const{sessionInfo:Pe}=yield ui(_,{phoneNumber:q.phoneNumber,recaptchaToken:B});return Pe}}finally{d._reset()}})).apply(this,arguments)}function F(){return(F=(0,m.Z)(function*(_,c){yield P((0,K.m9)(_),c)})).apply(this,arguments)}let Y=(()=>{class _{constructor(d){this.providerId=_.PROVIDER_ID,this.auth=xr(d)}verifyPhoneNumber(d,w){return wt(this.auth,d,(0,K.m9)(w))}static credential(d,w){return ir._fromVerification(d,w)}static credentialFromResult(d){return _.credentialFromTaggedObject(d)}static credentialFromError(d){return _.credentialFromTaggedObject(d.customData||{})}static credentialFromTaggedObject({_tokenResponse:d}){if(!d)return null;const{phoneNumber:w,temporaryProof:B}=d;return w&&B?ir._fromTokenResponse(w,B):null}}return _.PROVIDER_ID="phone",_.PHONE_SIGN_IN_METHOD="phone",_})();function ue(_,c){return c?Yn(c):(bt(_._popupRedirectResolver,_,"argument-error"),_._popupRedirectResolver)}class ke extends Ui{constructor(c){super("custom","custom"),this.params=c}_getIdTokenResponse(c){return Ps(c,this._buildIdpRequest())}_linkToIdToken(c,d){return Ps(c,this._buildIdpRequest(d))}_getReauthenticationResolver(c){return Ps(c,this._buildIdpRequest())}_buildIdpRequest(c){const d={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 c&&(d.idToken=c),d}}function tt(_){return ri(_.auth,new ke(_),_.bypassAuthState)}function Ot(_){const{auth:c,user:d}=_;return bt(d,c,"internal-error"),Br(d,new ke(_),_.bypassAuthState)}function an(_){return Sn.apply(this,arguments)}function Sn(){return(Sn=(0,m.Z)(function*(_){const{auth:c,user:d}=_;return bt(d,c,"internal-error"),P(d,new ke(_),_.bypassAuthState)})).apply(this,arguments)}class kn{constructor(c,d,w,B,q=!1){this.auth=c,this.resolver=w,this.user=B,this.bypassAuthState=q,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(d)?d:[d]}execute(){var c=this;return new Promise(function(){var d=(0,m.Z)(function*(w,B){c.pendingPromise={resolve:w,reject:B};try{c.eventManager=yield c.resolver._initialize(c.auth),yield c.onExecution(),c.eventManager.registerConsumer(c)}catch(q){c.reject(q)}});return function(w,B){return d.apply(this,arguments)}}())}onAuthEvent(c){var d=this;return(0,m.Z)(function*(){const{urlResponse:w,sessionId:B,postBody:q,tenantId:Pe,error:yt,type:on}=c;if(yt)return void d.reject(yt);const nn={auth:d.auth,requestUri:w,sessionId:B,tenantId:Pe||void 0,postBody:q||void 0,user:d.user,bypassAuthState:d.bypassAuthState};try{d.resolve(yield d.getIdpTask(on)(nn))}catch(Fn){d.reject(Fn)}})()}onError(c){this.reject(c)}getIdpTask(c){switch(c){case"signInViaPopup":case"signInViaRedirect":return tt;case"linkViaPopup":case"linkViaRedirect":return an;case"reauthViaPopup":case"reauthViaRedirect":return Ot;default:Ht(this.auth,"internal-error")}}resolve(c){ln(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(c),this.unregisterAndCleanUp()}reject(c){ln(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(c),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const Vn=new xt(2e3,1e4);function mr(){return(mr=(0,m.Z)(function*(_,c,d){const w=xr(_);er(_,c,V);const B=ue(w,d);return new ia(w,"signInViaPopup",c,B).executeNotNull()})).apply(this,arguments)}function Ii(){return(Ii=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_);er(w.auth,c,V);const B=ue(w.auth,d);return new ia(w.auth,"reauthViaPopup",c,B,w).executeNotNull()})).apply(this,arguments)}function eo(){return(eo=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_);er(w.auth,c,V);const B=ue(w.auth,d);return new ia(w.auth,"linkViaPopup",c,B,w).executeNotNull()})).apply(this,arguments)}let ia=(()=>{class _ extends kn{constructor(d,w,B,q,Pe){super(d,w,q,Pe),this.provider=B,this.authWindow=null,this.pollId=null,_.currentPopupAction&&_.currentPopupAction.cancel(),_.currentPopupAction=this}executeNotNull(){var d=this;return(0,m.Z)(function*(){const w=yield d.execute();return bt(w,d.auth,"internal-error"),w})()}onExecution(){var d=this;return(0,m.Z)(function*(){ln(1===d.filter.length,"Popup operations only handle one event");const w=Ue();d.authWindow=yield d.resolver._openPopup(d.auth,d.provider,d.filter[0],w),d.authWindow.associatedEvent=w,d.resolver._originValidation(d.auth).catch(B=>{d.reject(B)}),d.resolver._isIframeWebStorageSupported(d.auth,B=>{B||d.reject(Zt(d.auth,"web-storage-unsupported"))}),d.pollUserCancellation()})()}get eventId(){var d;return(null===(d=this.authWindow)||void 0===d?void 0:d.associatedEvent)||null}cancel(){this.reject(Zt(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,_.currentPopupAction=null}pollUserCancellation(){const d=()=>{var w,B;this.pollId=null!==(B=null===(w=this.authWindow)||void 0===w?void 0:w.window)&&void 0!==B&&B.closed?window.setTimeout(()=>{this.pollId=null,this.reject(Zt(this.auth,"popup-closed-by-user"))},2e3):window.setTimeout(d,Vn.get())};d()}}return _.currentPopupAction=null,_})();const Vs=new Map;class lo extends kn{constructor(c,d,w=!1){super(c,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],d,void 0,w),this.eventId=null}execute(){var c=()=>super.execute,d=this;return(0,m.Z)(function*(){let w=Vs.get(d.auth._key());if(!w){try{const q=(yield function bn(_,c){return Hn.apply(this,arguments)}(d.resolver,d.auth))?yield c().call(d):null;w=()=>Promise.resolve(q)}catch(B){w=()=>Promise.reject(B)}Vs.set(d.auth._key(),w)}return d.bypassAuthState||Vs.set(d.auth._key(),()=>Promise.resolve(null)),w()})()}onAuthEvent(c){var d=()=>super.onAuthEvent,w=this;return(0,m.Z)(function*(){if("signInViaRedirect"===c.type)return d().call(w,c);if("unknown"!==c.type){if(c.eventId){const B=yield w.auth._redirectUserForId(c.eventId);if(B)return w.user=B,d().call(w,c);w.resolve(null)}}else w.resolve(null)})()}onExecution(){return(0,m.Z)(function*(){})()}cleanUp(){}}function Hn(){return(Hn=(0,m.Z)(function*(_,c){const d=ya(c),w=Ao(_);if(!(yield w._isAvailable()))return!1;const B="true"===(yield w._get(d));return yield w._remove(d),B})).apply(this,arguments)}function Qn(_,c){return pr.apply(this,arguments)}function pr(){return(pr=(0,m.Z)(function*(_,c){return Ao(_)._set(ya(c),"true")})).apply(this,arguments)}function Fo(_,c){Vs.set(_._key(),c)}function Ao(_){return Yn(_._redirectPersistence)}function ya(_){return Gr("pendingRedirect",_.config.apiKey,_.name)}function il(){return(il=(0,m.Z)(function*(_,c,d){const w=xr(_);er(_,c,V);const B=ue(w,d);return yield Qn(B,w),B._openRedirect(w,c,"signInViaRedirect")})).apply(this,arguments)}function co(){return(co=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_);er(w.auth,c,V);const B=ue(w.auth,d);yield Qn(B,w.auth);const q=yield Zs(w);return B._openRedirect(w.auth,c,"reauthViaRedirect",q)})).apply(this,arguments)}function $u(){return($u=(0,m.Z)(function*(_,c,d){const w=(0,K.m9)(_);er(w.auth,c,V);const B=ue(w.auth,d);yield gt(!1,w,c.providerId),yield Qn(B,w.auth);const q=yield Zs(w);return B._openRedirect(w.auth,c,"linkViaRedirect",q)})).apply(this,arguments)}function nu(){return(nu=(0,m.Z)(function*(_,c){return yield xr(_)._initializationPromise,sl(_,c,!1)})).apply(this,arguments)}function sl(_,c){return gc.apply(this,arguments)}function gc(){return(gc=(0,m.Z)(function*(_,c,d=!1){const w=xr(_),B=ue(w,c),Pe=yield new lo(w,B,d).execute();return Pe&&!d&&(delete Pe.user._redirectEventId,yield w._persistUserIfCurrent(Pe.user),yield w._setRedirectUser(null,c)),Pe})).apply(this,arguments)}function Zs(_){return Th.apply(this,arguments)}function Th(){return(Th=(0,m.Z)(function*(_){const c=Ue(`${_.uid}:::`);return _._redirectEventId=c,yield _.auth._setRedirectUser(_),yield _.auth._persistUserIfCurrent(_),c})).apply(this,arguments)}class ip{constructor(c){this.auth=c,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(c){this.consumers.add(c),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,c)&&(this.sendToConsumer(this.queuedRedirectEvent,c),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(c){this.consumers.delete(c)}onEvent(c){if(this.hasEventBeenHandled(c))return!1;let d=!1;return this.consumers.forEach(w=>{this.isEventForConsumer(c,w)&&(d=!0,this.sendToConsumer(c,w),this.saveEventToCache(c))}),this.hasHandledPotentialRedirect||!function al(_){switch(_.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return mc(_);default:return!1}}(c)||(this.hasHandledPotentialRedirect=!0,d||(this.queuedRedirectEvent=c,d=!0)),d}sendToConsumer(c,d){var w;if(c.error&&!mc(c)){const B=(null===(w=c.error.code)||void 0===w?void 0:w.split("auth/")[1])||"internal-error";d.onError(Zt(this.auth,B))}else d.onAuthEvent(c)}isEventForConsumer(c,d){const w=null===d.eventId||!!c.eventId&&c.eventId===d.eventId;return d.filter.includes(c.type)&&w}hasEventBeenHandled(c){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(ol(c))}saveEventToCache(c){this.cachedEventUids.add(ol(c)),this.lastProcessedEventTime=Date.now()}}function ol(_){return[_.type,_.eventId,_.sessionId,_.tenantId].filter(c=>c).join("-")}function mc({type:_,error:c}){return"unknown"===_&&"auth/no-auth-event"===c?.code}function Sh(_){return od.apply(this,arguments)}function od(){return(od=(0,m.Z)(function*(_,c={}){return mn(_,"GET","/v1/projects",c)})).apply(this,arguments)}const Hu=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ru=/^https?/;function Al(){return(Al=(0,m.Z)(function*(_){if(_.config.emulator)return;const{authorizedDomains:c}=yield Sh(_);for(const d of c)try{if(ud(d))return}catch{}Ht(_,"unauthorized-domain")})).apply(this,arguments)}function ud(_){const c=Dr(),{protocol:d,hostname:w}=new URL(c);if(_.startsWith("chrome-extension://")){const Pe=new URL(_);return""===Pe.hostname&&""===w?"chrome-extension:"===d&&_.replace("chrome-extension://","")===c.replace("chrome-extension://",""):"chrome-extension:"===d&&Pe.hostname===w}if(!ru.test(d))return!1;if(Hu.test(_))return w===_;const B=_.replace(/\./g,"\\.");return new RegExp("^(.+\\."+B+"|"+B+")$","i").test(w)}const Ga=new xt(3e4,6e4);function iu(){const _=Yt().___jsl;if(_?.H)for(const c of Object.keys(_.H))if(_.H[c].r=_.H[c].r||[],_.H[c].L=_.H[c].L||[],_.H[c].r=[..._.H[c].L],_.CP)for(let d=0;d<_.CP.length;d++)_.CP[d]=null}let yc=null;function ld(_){return yc=yc||function ul(_){return new Promise((c,d)=>{var w,B,q;function Pe(){iu(),gapi.load("gapi.iframes",{callback:()=>{c(gapi.iframes.getContext())},ontimeout:()=>{iu(),d(Zt(_,"network-request-failed"))},timeout:Ga.get()})}if(null!==(B=null===(w=Yt().gapi)||void 0===w?void 0:w.iframes)&&void 0!==B&&B.Iframe)c(gapi.iframes.getContext());else{if(null===(q=Yt().gapi)||void 0===q||!q.load){const yt=Ls("iframefcb");return Yt()[yt]=()=>{gapi.load?Pe():d(Zt(_,"network-request-failed"))},bu(`https://apis.google.com/js/api.js?onload=${yt}`).catch(on=>d(on))}Pe()}}).catch(c=>{throw yc=null,c})}(_),yc}const cd=new xt(5e3,15e3),ho={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},hd=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Sl(_){const c=_.config;bt(c.authDomain,_,"auth-domain-config-required");const d=c.emulator?Xe(c,"emulator/auth/iframe"):`https://${_.config.authDomain}/__/auth/iframe`,w={apiKey:c.apiKey,appName:_.name,v:ae.SDK_VERSION},B=hd.get(_.config.apiHost);B&&(w.eid=B);const q=_._getFrameworks();return q.length&&(w.fw=q.join(",")),`${d}?${(0,K.xO)(w).slice(1)}`}function Ml(){return Ml=(0,m.Z)(function*(_){const c=yield ld(_),d=Yt().gapi;return bt(d,_,"internal-error"),c.open({where:document.body,url:Sl(_),messageHandlersFilter:d.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:ho,dontclear:!0},w=>new Promise(function(){var B=(0,m.Z)(function*(q,Pe){yield w.restyle({setHideOnLeave:!1});const yt=Zt(_,"network-request-failed"),on=Yt().setTimeout(()=>{Pe(yt)},cd.get());function nn(){Yt().clearTimeout(on),q(w)}w.ping(nn).then(nn,()=>{Pe(yt)})});return function(q,Pe){return B.apply(this,arguments)}}()))}),Ml.apply(this,arguments)}const fd={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class gd{constructor(c){this.window=c,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function Ol(_,c,d,w,B,q){bt(_.config.authDomain,_,"auth-domain-config-required"),bt(_.config.apiKey,_,"invalid-api-key");const Pe={apiKey:_.config.apiKey,appName:_.name,authType:d,redirectUrl:w,v:ae.SDK_VERSION,eventId:B};if(c instanceof V){c.setDefaultLanguage(_.languageCode),Pe.providerId=c.providerId||"",(0,K.xb)(c.getCustomParameters())||(Pe.customParameters=JSON.stringify(c.getCustomParameters()));for(const[on,nn]of Object.entries(q||{}))Pe[on]=nn}if(c instanceof Q){const on=c.getScopes().filter(nn=>""!==nn);on.length>0&&(Pe.scopes=on.join(","))}_.tenantId&&(Pe.tid=_.tenantId);const yt=Pe;for(const on of Object.keys(yt))void 0===yt[on]&&delete yt[on];return`${function Lo({config:_}){return _.emulator?Xe(_,"emulator/auth/handler"):`https://${_.authDomain}/__/auth/handler`}(_)}?${(0,K.xO)(yt).slice(1)}`}const sa="webStorageSupport";class Gu extends class _d{constructor(c){this.factorId=c}_process(c,d,w){switch(d.type){case"enroll":return this._finalizeEnroll(c,d.credential,w);case"signin":return this._finalizeSignIn(c,d.credential);default:return Un("unexpected MultiFactorSessionType")}}}{constructor(c){super("phone"),this.credential=c}static _fromCredential(c){return new Gu(c)}_finalizeEnroll(c,d,w){return function ao(_,c){return mn(_,"POST","/v2/accounts/mfaEnrollment:finalize",Ut(_,c))}(c,{idToken:d,displayName:w,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(c,d){return function hc(_,c){return mn(_,"POST","/v2/accounts/mfaSignIn:finalize",Ut(_,c))}(c,{mfaPendingCredential:d,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}let ap=(()=>{class _{constructor(){}static assertion(d){return Gu._fromCredential(d)}}return _.FACTOR_ID="phone",_})();var Ph="@firebase/auth";class vd{constructor(c){this.auth=c,this.internalListeners=new Map}getUid(){var c;return this.assertAuthConfigured(),(null===(c=this.auth.currentUser)||void 0===c?void 0:c.uid)||null}getToken(c){var d=this;return(0,m.Z)(function*(){return d.assertAuthConfigured(),yield d.auth._initializationPromise,d.auth.currentUser?{accessToken:yield d.auth.currentUser.getIdToken(c)}:null})()}addAuthTokenListener(c){if(this.assertAuthConfigured(),this.internalListeners.has(c))return;const d=this.auth.onIdTokenChanged(w=>{var B;c((null===(B=w)||void 0===B?void 0:B.stsTokenManager.accessToken)||null)});this.internalListeners.set(c,d),this.updateProactiveRefresh()}removeAuthTokenListener(c){this.assertAuthConfigured();const d=this.internalListeners.get(c);!d||(this.internalListeners.delete(c),d(),this.updateProactiveRefresh())}assertAuthConfigured(){bt(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}function Ta(){return window}function zu(){return(zu=(0,m.Z)(function*(_,c,d){var w;const{BuildInfo:B}=Ta();ln(c.sessionId,"AuthEvent did not contain a session ID");const q=yield ds(c.sessionId),Pe={};return ai()?Pe.ibi=B.packageName:ei()?Pe.apn=B.packageName:Ht(_,"operation-not-supported-in-this-environment"),B.displayName&&(Pe.appDisplayName=B.displayName),Pe.sessionId=q,Ol(_,d,c.type,void 0,null!==(w=c.eventId)&&void 0!==w?w:void 0,Pe)})).apply(this,arguments)}function Rl(){return(Rl=(0,m.Z)(function*(_){const{BuildInfo:c}=Ta(),d={};ai()?d.iosBundleId=c.packageName:ei()?d.androidPackageName=c.packageName:Ht(_,"operation-not-supported-in-this-environment"),yield Sh(_,d)})).apply(this,arguments)}function ll(){return(ll=(0,m.Z)(function*(_,c,d){const{cordova:w}=Ta();let B=()=>{};try{yield new Promise((q,Pe)=>{let yt=null;function on(){var Bn;q();const Hr=null===(Bn=w.plugins.browsertab)||void 0===Bn?void 0:Bn.close;"function"==typeof Hr&&Hr(),"function"==typeof d?.close&&d.close()}function nn(){yt||(yt=window.setTimeout(()=>{Pe(Zt(_,"redirect-cancelled-by-user"))},2e3))}function Fn(){"visible"===document?.visibilityState&&nn()}c.addPassiveListener(on),document.addEventListener("resume",nn,!1),ei()&&document.addEventListener("visibilitychange",Fn,!1),B=()=>{c.removePassiveListener(on),document.removeEventListener("resume",nn,!1),document.removeEventListener("visibilitychange",Fn,!1),yt&&window.clearTimeout(yt)}})}finally{B()}})).apply(this,arguments)}function ds(_){return Iu.apply(this,arguments)}function Iu(){return(Iu=(0,m.Z)(function*(_){const c=wd(_),d=yield crypto.subtle.digest("SHA-256",c);return Array.from(new Uint8Array(d)).map(B=>B.toString(16).padStart(2,"0")).join("")})).apply(this,arguments)}function wd(_){if(ln(/[0-9a-zA-Z]+/.test(_),"Can only convert alpha-numeric strings"),typeof TextEncoder<"u")return(new TextEncoder).encode(_);const c=new ArrayBuffer(_.length),d=new Uint8Array(c);for(let w=0;w<_.length;w++)d[w]=_.charCodeAt(w);return d}!function cs(_){(0,ae._registerComponent)(new Je.wA("auth",(c,{options:d})=>{const w=c.getProvider("app").getImmediate(),B=c.getProvider("heartbeat"),{apiKey:q,authDomain:Pe}=w.options;return((yt,on)=>{bt(q&&!q.includes(":"),"invalid-api-key",{appName:yt.name}),bt(!Pe?.includes(":"),"argument-error",{appName:yt.name});const nn={apiKey:q,authDomain:Pe,clientPlatform:_,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:_s(_)},Fn=new Vi(yt,on,nn);return function Ti(_,c){const d=c?.persistence||[],w=(Array.isArray(d)?d:[d]).map(Yn);c?.errorMap&&_._updateErrorMap(c.errorMap),_._initializeWithPersistence(w,c?.popupRedirectResolver)}(Fn,d),Fn})(w,B)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((c,d,w)=>{c.getProvider("auth-internal").initialize()})),(0,ae._registerComponent)(new Je.wA("auth-internal",c=>{const d=xr(c.getProvider("auth").getImmediate());return new vd(d)},"PRIVATE").setInstantiationMode("EXPLICIT")),(0,ae.registerVersion)(Ph,"0.20.3",function Ed(_){switch(_){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(_)),(0,ae.registerVersion)(Ph,"0.20.3","esm2017")}("Browser");class Ts extends ip{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(c=>{this.resolveInialized=c})}addPassiveListener(c){this.passiveListeners.add(c)}removePassiveListener(c){this.passiveListeners.delete(c)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(c){return this.resolveInialized(),this.passiveListeners.forEach(d=>d(c)),super.onEvent(c)}initialized(){var c=this;return(0,m.Z)(function*(){yield c.initPromise})()}}function Dd(_){return Ka.apply(this,arguments)}function Ka(){return(Ka=(0,m.Z)(function*(_){const c=yield Id()._get(Aa(_));return c&&(yield Id()._remove(Aa(_))),c})).apply(this,arguments)}function oa(){const _=[],c="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let d=0;d<20;d++){const w=Math.floor(Math.random()*c.length);_.push(c.charAt(w))}return _.join("")}function Id(){return Yn(I)}function Aa(_){return Gr("authEvent",_.config.apiKey,_.name)}function Ku(_){if(!_?.includes("?"))return{};const[c,...d]=_.split("?");return(0,K.zd)(d.join("?"))}function wr(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:Zt("no-auth-event")}}function Cu(){var _;return(null===(_=self?.location)||void 0===_?void 0:_.protocol)||null}function Cd(_=(0,K.z$)()){return!("file:"!==Cu()&&"ionic:"!==Cu()&&"capacitor:"!==Cu()||!_.toLowerCase().match(/iphone|ipad|ipod|android/))}function jh(){try{const _=self.localStorage,c=Ue();if(_)return _.setItem(c,"1"),_.removeItem(c),!function Bh(_=(0,K.z$)()){return function fp(){return(0,K.w1)()&&11===document?.documentMode}()||function Td(_=(0,K.z$)()){return/Edge\/\d+/.test(_)}(_)}()||(0,K.hl)()}catch{return fo()&&(0,K.hl)()}return!1}function fo(){return typeof global<"u"&&"WorkerGlobalScope"in global&&"importScripts"in global}function kl(){return(function Ec(){return"http:"===Cu()||"https:"===Cu()}()||(0,K.ru)()||Cd())&&!function Uh(){return(0,K.b$)()||(0,K.UG)()}()&&jh()&&!fo()}function Wu(){return Cd()&&typeof document<"u"}function to(){return(to=(0,m.Z)(function*(){return!!Wu()&&new Promise(_=>{const c=setTimeout(()=>{_(!1)},1e3);document.addEventListener("deviceready",()=>{clearTimeout(c),_(!0)})})})).apply(this,arguments)}const po={LOCAL:"local",NONE:"none",SESSION:"session"},cl=bt,dl="persistence";function Fl(_){return Ll.apply(this,arguments)}function Ll(){return(Ll=(0,m.Z)(function*(_){yield _._initializationPromise;const c=bc(),d=Gr(dl,_.config.apiKey,_.name);c&&c.setItem(d,_._getPersistence())})).apply(this,arguments)}function bc(){var _;try{return(null===(_=function hs(){return typeof window<"u"?window:null}())||void 0===_?void 0:_.sessionStorage)||null}catch{return null}}const $h=bt;class uu{constructor(){this.browserResolver=Yn(class yd{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=G,this._completeRedirectFn=sl,this._overrideRedirectResult=Fo}_openPopup(c,d,w,B){var q=this;return(0,m.Z)(function*(){var Pe;ln(null===(Pe=q.eventManagers[c._key()])||void 0===Pe?void 0:Pe.manager,"_initialize() not called before _openPopup()");const yt=Ol(c,d,w,Dr(),B);return function Rh(_,c,d,w=500,B=600){const q=Math.max((window.screen.availHeight-B)/2,0).toString(),Pe=Math.max((window.screen.availWidth-w)/2,0).toString();let yt="";const on=Object.assign(Object.assign({},fd),{width:w.toString(),height:B.toString(),top:q,left:Pe}),nn=(0,K.z$)().toLowerCase();d&&(yt=gs(nn)?"_blank":d),vr(nn)&&(c=c||"http://localhost",on.scrollbars="yes");const Fn=Object.entries(on).reduce((Hr,[no,Au])=>`${Hr}${no}=${Au},`,"");if(function ys(_=(0,K.z$)()){var c;return ai(_)&&!(null===(c=window.navigator)||void 0===c||!c.standalone)}(nn)&&"_self"!==yt)return function md(_,c){const d=document.createElement("a");d.href=_,d.target=c;const w=document.createEvent("MouseEvent");w.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),d.dispatchEvent(w)}(c||"",yt),new gd(null);const Bn=window.open(c||"",yt,Fn);bt(Bn,_,"popup-blocked");try{Bn.focus()}catch{}return new gd(Bn)}(c,yt,Ue())})()}_openRedirect(c,d,w,B){var q=this;return(0,m.Z)(function*(){return yield q._originValidation(c),function fr(_){Yt().location.href=_}(Ol(c,d,w,Dr(),B)),new Promise(()=>{})})()}_initialize(c){const d=c._key();if(this.eventManagers[d]){const{manager:B,promise:q}=this.eventManagers[d];return B?Promise.resolve(B):(ln(q,"If manager is not set, promise should be"),q)}const w=this.initAndGetManager(c);return this.eventManagers[d]={promise:w},w.catch(()=>{delete this.eventManagers[d]}),w}initAndGetManager(c){var d=this;return(0,m.Z)(function*(){const w=yield function Mh(_){return Ml.apply(this,arguments)}(c),B=new ip(c);return w.register("authEvent",q=>(bt(q?.authEvent,c,"invalid-auth-event"),{status:B.onEvent(q.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),d.eventManagers[c._key()]={manager:B},d.iframes[c._key()]=w,B})()}_isIframeWebStorageSupported(c,d){this.iframes[c._key()].send(sa,{type:sa},B=>{var q;const Pe=null===(q=B?.[0])||void 0===q?void 0:q[sa];void 0!==Pe&&d(!!Pe),Ht(c,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(c){const d=c._key();return this.originValidationPromises[d]||(this.originValidationPromises[d]=function ad(_){return Al.apply(this,arguments)}(c)),this.originValidationPromises[d]}get _shouldInitProactively(){return bi()||ps()||ai()}}),this.cordovaResolver=Yn(class dp{constructor(){this._redirectPersistence=G,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=sl,this._overrideRedirectResult=Fo}_initialize(c){var d=this;return(0,m.Z)(function*(){const w=c._key();let B=d.eventManagers.get(w);return B||(B=new Ts(c),d.eventManagers.set(w,B),d.attachCallbackListeners(c,B)),B})()}_openPopup(c){Ht(c,"operation-not-supported-in-this-environment")}_openRedirect(c,d,w,B){var q=this;return(0,m.Z)(function*(){!function Fh(_){var c,d,w,B,q,Pe,yt,on,nn,Fn;const Bn=Ta();bt("function"==typeof(null===(c=Bn?.universalLinks)||void 0===c?void 0:c.subscribe),_,"invalid-cordova-configuration",{missingPlugin:"cordova-universal-links-plugin-fix"}),bt(typeof(null===(d=Bn?.BuildInfo)||void 0===d?void 0:d.packageName)<"u",_,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-buildInfo"}),bt("function"==typeof(null===(q=null===(B=null===(w=Bn?.cordova)||void 0===w?void 0:w.plugins)||void 0===B?void 0:B.browsertab)||void 0===q?void 0:q.openUrl),_,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),bt("function"==typeof(null===(on=null===(yt=null===(Pe=Bn?.cordova)||void 0===Pe?void 0:Pe.plugins)||void 0===yt?void 0:yt.browsertab)||void 0===on?void 0:on.isAvailable),_,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),bt("function"==typeof(null===(Fn=null===(nn=Bn?.cordova)||void 0===nn?void 0:nn.InAppBrowser)||void 0===Fn?void 0:Fn.open),_,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-inappbrowser"})}(c);const Pe=yield q._initialize(c);yield Pe.initialized(),Pe.resetRedirect(),function Zi(){Vs.clear()}(),yield q._originValidation(c);const yt=function Yr(_,c,d=null){return{type:c,eventId:d,urlResponse:null,sessionId:oa(),postBody:null,tenantId:_.tenantId,error:Zt(_,"no-auth-event")}}(c,w,B);yield function Lh(_,c){return Id()._set(Aa(_),c)}(c,yt);const on=yield function up(_,c,d){return zu.apply(this,arguments)}(c,yt,d),nn=yield function ou(_){const{cordova:c}=Ta();return new Promise(d=>{c.plugins.browsertab.isAvailable(w=>{let B=null;w?c.plugins.browsertab.openUrl(_):B=c.InAppBrowser.open(_,function ti(_=(0,K.z$)()){return/(iPad|iPhone|iPod).*OS 7_\d/i.test(_)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(_)}()?"_blank":"_system","location=yes"),d(B)})})}(on);return function za(_,c,d){return ll.apply(this,arguments)}(c,Pe,nn)})()}_isIframeWebStorageSupported(c,d){throw new Error("Method not implemented.")}_originValidation(c){const d=c._key();return this.originValidationPromises[d]||(this.originValidationPromises[d]=function lp(_){return Rl.apply(this,arguments)}(c)),this.originValidationPromises[d]}attachCallbackListeners(c,d){const{universalLinks:w,handleOpenURL:B,BuildInfo:q}=Ta(),Pe=setTimeout((0,m.Z)(function*(){yield Dd(c),d.onEvent(wr())}),500),yt=function(){var Fn=(0,m.Z)(function*(Bn){clearTimeout(Pe);const Hr=yield Dd(c);let no=null;Hr&&Bn?.url&&(no=function cp(_,c){var d,w;const B=function Wa(_){const c=Ku(_),d=c.link?decodeURIComponent(c.link):void 0,w=Ku(d).link,B=c.deep_link_id?decodeURIComponent(c.deep_link_id):void 0;return Ku(B).link||B||w||d||_}(c);if(B.includes("/__/auth/callback")){const q=Ku(B),Pe=q.firebaseError?function _c(_){try{return JSON.parse(_)}catch{return null}}(decodeURIComponent(q.firebaseError)):null,yt=null===(w=null===(d=Pe?.code)||void 0===d?void 0:d.split("auth/"))||void 0===w?void 0:w[1],on=yt?Zt(yt):null;return on?{type:_.type,eventId:_.eventId,tenantId:_.tenantId,error:on,urlResponse:null,sessionId:null,postBody:null}:{type:_.type,eventId:_.eventId,tenantId:_.tenantId,sessionId:_.sessionId,urlResponse:B,postBody:null}}return null}(Hr,Bn.url)),d.onEvent(no||wr())});return function(Hr){return Fn.apply(this,arguments)}}();typeof w<"u"&&"function"==typeof w.subscribe&&w.subscribe(null,yt);const on=B,nn=`${q.packageName.toLowerCase()}://`;Ta().handleOpenURL=function(){var Fn=(0,m.Z)(function*(Bn){if(Bn.toLowerCase().startsWith(nn)&&yt({url:Bn}),"function"==typeof on)try{on(Bn)}catch(Hr){console.error(Hr)}});return function(Bn){return Fn.apply(this,arguments)}}()}}),this.underlyingResolver=null,this._redirectPersistence=G,this._completeRedirectFn=sl,this._overrideRedirectResult=Fo}_initialize(c){var d=this;return(0,m.Z)(function*(){return yield d.selectUnderlyingResolver(),d.assertedUnderlyingResolver._initialize(c)})()}_openPopup(c,d,w,B){var q=this;return(0,m.Z)(function*(){return yield q.selectUnderlyingResolver(),q.assertedUnderlyingResolver._openPopup(c,d,w,B)})()}_openRedirect(c,d,w,B){var q=this;return(0,m.Z)(function*(){return yield q.selectUnderlyingResolver(),q.assertedUnderlyingResolver._openRedirect(c,d,w,B)})()}_isIframeWebStorageSupported(c,d){this.assertedUnderlyingResolver._isIframeWebStorageSupported(c,d)}_originValidation(c){return this.assertedUnderlyingResolver._originValidation(c)}get _shouldInitProactively(){return Wu()||this.browserResolver._shouldInitProactively}get assertedUnderlyingResolver(){return $h(this.underlyingResolver,"internal-error"),this.underlyingResolver}selectUnderlyingResolver(){var c=this;return(0,m.Z)(function*(){if(c.underlyingResolver)return;const d=yield function wc(){return to.apply(this,arguments)}();c.underlyingResolver=d?c.cordovaResolver:c.browserResolver})()}}function Hh(_){return _.unwrap()}function hl(_){return Zu(_)}function Zu(_){const{_tokenResponse:c}=_ instanceof K.ZR?_.customData:_;if(!c)return null;if(!(_ instanceof K.ZR)&&"temporaryProof"in c&&"phoneNumber"in c)return Y.credentialFromResult(_);const d=c.providerId;if(!d||"password"===d)return null;let w;switch(d){case"google.com":w=Vt;break;case"facebook.com":w=At;break;case"github.com":w=Jt;break;case"twitter.com":w=Lr;break;default:const{oauthIdToken:B,oauthAccessToken:q,oauthTokenSecret:Pe,pendingToken:yt,nonce:on}=c;return q||Pe||B||yt?yt?d.startsWith("saml.")?gr._create(d,yt):lr._fromParams({providerId:d,signInMethod:d,pendingToken:yt,idToken:B,accessToken:q}):new Ve(d).credential({idToken:B,accessToken:q,rawNonce:on}):null}return _ instanceof K.ZR?w.credentialFromError(_):w.credentialFromResult(_)}function ns(_,c){return c.catch(d=>{throw d instanceof K.ZR&&function Ad(_,c){var d;const w=null===(d=c.customData)||void 0===d?void 0:d._tokenResponse;if("auth/multi-factor-auth-required"===c.code)c.resolver=new rm(_,function Qs(_,c){var d;const w=(0,K.m9)(_),B=c;return bt(c.customData.operationType,w,"argument-error"),bt(null===(d=B.customData._serverResponse)||void 0===d?void 0:d.mfaPendingCredential,w,"argument-error"),No._fromError(w,B)}(_,c));else if(w){const B=Zu(c),q=c;B&&(q.credential=B,q.tenantId=w.tenantId||void 0,q.email=w.email||void 0,q.phoneNumber=w.phoneNumber||void 0)}}(_,d),d}).then(d=>{const B=d.user;return{operationType:d.operationType,credential:hl(d),additionalUserInfo:Eu(d),user:Ma.getOrCreate(B)}})}function Dc(_,c){return Sd.apply(this,arguments)}function Sd(){return(Sd=(0,m.Z)(function*(_,c){const d=yield c;return{verificationId:d.verificationId,confirm:w=>ns(_,d.confirm(w))}})).apply(this,arguments)}class rm{constructor(c,d){this.resolver=d,this.auth=function Gh(_){return _.wrapped()}(c)}get session(){return this.resolver.session}get hints(){return this.resolver.hints}resolveSignIn(c){return ns(Hh(this.auth),this.resolver.resolveSignIn(c))}}class Ma{constructor(c){this._delegate=c,this.multiFactor=function Co(_){const c=(0,K.m9)(_);return vi.has(c)||vi.set(c,Jr._fromUser(c)),vi.get(c)}(c)}static getOrCreate(c){return Ma.USER_MAP.has(c)||Ma.USER_MAP.set(c,new Ma(c)),Ma.USER_MAP.get(c)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(c){return this._delegate.getIdTokenResult(c)}getIdToken(c){return this._delegate.getIdToken(c)}linkAndRetrieveDataWithCredential(c){return this.linkWithCredential(c)}linkWithCredential(c){var d=this;return(0,m.Z)(function*(){return ns(d.auth,ze(d._delegate,c))})()}linkWithPhoneNumber(c,d){var w=this;return(0,m.Z)(function*(){return Dc(w.auth,function ne(_,c,d){return De.apply(this,arguments)}(w._delegate,c,d))})()}linkWithPopup(c){var d=this;return(0,m.Z)(function*(){return ns(d.auth,function Xs(_,c,d){return eo.apply(this,arguments)}(d._delegate,c,uu))})()}linkWithRedirect(c){var d=this;return(0,m.Z)(function*(){return yield Fl(xr(d.auth)),function Ca(_,c,d){return function Tl(_,c,d){return $u.apply(this,arguments)}(_,c,d)}(d._delegate,c,uu)})()}reauthenticateAndRetrieveDataWithCredential(c){return this.reauthenticateWithCredential(c)}reauthenticateWithCredential(c){var d=this;return(0,m.Z)(function*(){return ns(d.auth,pt(d._delegate,c))})()}reauthenticateWithPhoneNumber(c,d){return Dc(this.auth,function Te(_,c,d){return st.apply(this,arguments)}(this._delegate,c,d))}reauthenticateWithPopup(c){return ns(this.auth,function fi(_,c,d){return Ii.apply(this,arguments)}(this._delegate,c,uu))}reauthenticateWithRedirect(c){var d=this;return(0,m.Z)(function*(){return yield Fl(xr(d.auth)),function Er(_,c,d){return function Ha(_,c,d){return co.apply(this,arguments)}(_,c,d)}(d._delegate,c,uu)})()}sendEmailVerification(c){return function Do(_,c){return Jo.apply(this,arguments)}(this._delegate,c)}unlink(c){var d=this;return(0,m.Z)(function*(){return yield function U(_,c){return O.apply(this,arguments)}(d._delegate,c),d})()}updateEmail(c){return function Ro(_,c){return ka((0,K.m9)(_),c,null)}(this._delegate,c)}updatePassword(c){return function _i(_,c){return ka((0,K.m9)(_),null,c)}(this._delegate,c)}updatePhoneNumber(c){return function x(_,c){return F.apply(this,arguments)}(this._delegate,c)}updateProfile(c){return function Ri(_,c){return ba.apply(this,arguments)}(this._delegate,c)}verifyBeforeUpdateEmail(c,d){return function Xo(_,c,d){return Oo.apply(this,arguments)}(this._delegate,c,d)}get emailVerified(){return this._delegate.emailVerified}get isAnonymous(){return this._delegate.isAnonymous}get metadata(){return this._delegate.metadata}get phoneNumber(){return this._delegate.phoneNumber}get providerData(){return this._delegate.providerData}get refreshToken(){return this._delegate.refreshToken}get tenantId(){return this._delegate.tenantId}get displayName(){return this._delegate.displayName}get email(){return this._delegate.email}get photoURL(){return this._delegate.photoURL}get providerId(){return this._delegate.providerId}get uid(){return this._delegate.uid}get auth(){return this._delegate.auth}}Ma.USER_MAP=new WeakMap;const Ic=bt;let xa=(()=>{class _{constructor(d,w){if(this.app=d,w.isInitialized())return this._delegate=w.getImmediate(),void this.linkUnderlyingAuth();const{apiKey:B}=d.options;Ic(B,"invalid-api-key",{appName:d.name}),Ic(B,"invalid-api-key",{appName:d.name});const q=typeof window<"u"?uu:void 0;this._delegate=w.initialize({options:{persistence:Tu(B,d.name),popupRedirectResolver:q}}),this._delegate._updateErrorMap(sn),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Ma.getOrCreate(this._delegate.currentUser):null}get languageCode(){return this._delegate.languageCode}set languageCode(d){this._delegate.languageCode=d}get settings(){return this._delegate.settings}get tenantId(){return this._delegate.tenantId}set tenantId(d){this._delegate.tenantId=d}useDeviceLanguage(){this._delegate.useDeviceLanguage()}signOut(){return this._delegate.signOut()}useEmulator(d,w){!function Os(_,c,d){const w=xr(_);bt(w._canInitEmulator,w,"emulator-config-failed"),bt(/^https?:\/\//.test(c),w,"invalid-emulator-scheme");const B=!!d?.disableWarnings,q=Pi(c),{host:Pe,port:yt}=function yo(_){const c=Pi(_),d=/(\/\/)?([^?#/]+)/.exec(_.substr(c.length));if(!d)return{host:"",port:null};const w=d[2].split("@").pop()||"",B=/^(\[[^\]]+\])(:|$)/.exec(w);if(B){const q=B[1];return{host:q,port:Bs(w.substr(q.length+1))}}{const[q,Pe]=w.split(":");return{host:q,port:Bs(Pe)}}}(c);w.config.emulator={url:`${q}//${Pe}${null===yt?"":`:${yt}`}/`},w.settings.appVerificationDisabledForTesting=!0,w.emulatorConfig=Object.freeze({host:Pe,port:yt,protocol:q.replace(":",""),options:Object.freeze({disableWarnings:B})}),B||function ji(){function _(){const c=document.createElement("p"),d=c.style;c.innerText="Running in emulator mode. Do not use with production credentials.",d.position="fixed",d.width="100%",d.backgroundColor="#ffffff",d.border=".1em solid #000000",d.color="#b50000",d.bottom="0px",d.left="0px",d.margin="0px",d.zIndex="10000",d.textAlign="center",c.classList.add("firebase-emulator-warning"),document.body.appendChild(c)}typeof console<"u"&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",_):_())}()}(this._delegate,d,w)}applyActionCode(d){return function Bo(_,c){return Ea.apply(this,arguments)}(this._delegate,d)}checkActionCode(d){return qo(this._delegate,d)}confirmPasswordReset(d,w){return function da(_,c,d){return Zo.apply(this,arguments)}(this._delegate,d,w)}createUserWithEmailAndPassword(d,w){var B=this;return(0,m.Z)(function*(){return ns(B._delegate,function Yo(_,c,d){return Pa.apply(this,arguments)}(B._delegate,d,w))})()}fetchProvidersForEmail(d){return this.fetchSignInMethodsForEmail(d)}fetchSignInMethodsForEmail(d){return function Cl(_,c){return Na.apply(this,arguments)}(this._delegate,d)}isSignInWithEmailLink(d){return function Bi(_,c){return"EMAIL_SIGNIN"===sr.parseLink(c)?.operation}(0,d)}getRedirectResult(){var d=this;return(0,m.Z)(function*(){Ic(kl(),d._delegate,"operation-not-supported-in-this-environment");const w=yield function pc(_,c){return nu.apply(this,arguments)}(d._delegate,uu);return w?ns(d._delegate,Promise.resolve(w)):{credential:null,user:null}})()}addFrameworkForLogging(d){!function Vh(_,c){xr(_)._logFramework(c)}(this._delegate,d)}onAuthStateChanged(d,w,B){const{next:q,error:Pe,complete:yt}=lu(d,w,B);return this._delegate.onAuthStateChanged(q,Pe,yt)}onIdTokenChanged(d,w,B){const{next:q,error:Pe,complete:yt}=lu(d,w,B);return this._delegate.onIdTokenChanged(q,Pe,yt)}sendSignInLinkToEmail(d,w){return function xo(_,c,d){return Qo.apply(this,arguments)}(this._delegate,d,w)}sendPasswordResetEmail(d,w){return function yu(_,c,d){return $s.apply(this,arguments)}(this._delegate,d,w||void 0)}setPersistence(d){var w=this;return(0,m.Z)(function*(){let B;switch(function Sa(_,c){cl(Object.values(po).includes(c),_,"invalid-persistence-type"),(0,K.b$)()?cl(c!==po.SESSION,_,"unsupported-persistence-type"):(0,K.UG)()?cl(c===po.NONE,_,"unsupported-persistence-type"):fo()?cl(c===po.NONE||c===po.LOCAL&&(0,K.hl)(),_,"unsupported-persistence-type"):cl(c===po.NONE||jh(),_,"unsupported-persistence-type")}(w._delegate,d),d){case po.SESSION:B=G;break;case po.LOCAL:B=(yield Yn(ko)._isAvailable())?ko:I;break;case po.NONE:B=Ai;break;default:return Ht("argument-error",{appName:w._delegate.name})}return w._delegate.setPersistence(B)})()}signInAndRetrieveDataWithCredential(d){return this.signInWithCredential(d)}signInAnonymously(){return ns(this._delegate,function as(_){return bs.apply(this,arguments)}(this._delegate))}signInWithCredential(d){return ns(this._delegate,Ko(this._delegate,d))}signInWithCustomToken(d){return ns(this._delegate,function br(_,c){return di.apply(this,arguments)}(this._delegate,d))}signInWithEmailAndPassword(d,w){return ns(this._delegate,function wo(_,c,d){return Ko((0,K.m9)(_),ee.credential(c,d))}(this._delegate,d,w))}signInWithEmailLink(d,w){return ns(this._delegate,function Hs(_,c,d){return ii.apply(this,arguments)}(this._delegate,d,w))}signInWithPhoneNumber(d,w){return Dc(this._delegate,function T(_,c,d){return H.apply(this,arguments)}(this._delegate,d,w))}signInWithPopup(d){var w=this;return(0,m.Z)(function*(){return Ic(kl(),w._delegate,"operation-not-supported-in-this-environment"),ns(w._delegate,function xn(_,c,d){return mr.apply(this,arguments)}(w._delegate,d,uu))})()}signInWithRedirect(d){var w=this;return(0,m.Z)(function*(){return Ic(kl(),w._delegate,"operation-not-supported-in-this-environment"),yield Fl(w._delegate),function pi(_,c,d){return function qi(_,c,d){return il.apply(this,arguments)}(_,c,d)}(w._delegate,d,uu)})()}updateCurrentUser(d){return this._delegate.updateCurrentUser(d)}verifyPasswordResetCode(d){return function wa(_,c){return Ys.apply(this,arguments)}(this._delegate,d)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}return _.Persistence=po,_})();function lu(_,c,d){let w=_;"function"!=typeof _&&({next:w,error:c,complete:d}=_);const B=w;return{next:Pe=>B(Pe&&Ma.getOrCreate(Pe)),error:c,complete:d}}function Tu(_,c){const d=function Vl(_,c){const d=bc();if(!d)return[];const w=Gr(dl,_,c);switch(d.getItem(w)){case po.NONE:return[Ai];case po.LOCAL:return[ko,G];case po.SESSION:return[G];default:return[]}}(_,c);if(typeof self<"u"&&!d.includes(ko)&&d.push(ko),typeof window<"u")for(const w of[I,G])d.includes(w)||d.push(w);return d.includes(Ai)||d.push(Ai),d}class Md{constructor(){this.providerId="phone",this._delegate=new Y(Hh(g.Z.auth()))}static credential(c,d){return Y.credential(c,d)}verifyPhoneNumber(c,d){return this._delegate.verifyPhoneNumber(c,d)}unwrap(){return this._delegate}}Md.PHONE_SIGN_IN_METHOD=Y.PHONE_SIGN_IN_METHOD,Md.PROVIDER_ID=Y.PROVIDER_ID;const zh=bt;class Ul{constructor(c,d,w=g.Z.app()){var B;zh(null===(B=w.options)||void 0===B?void 0:B.apiKey,"invalid-api-key",{appName:w.name}),this._delegate=new N(c,d,w.auth()),this.type=this._delegate.type}clear(){this._delegate.clear()}render(){return this._delegate.render()}verify(){return this._delegate.verify()}}!function So(_){_.INTERNAL.registerComponent(new Je.wA("auth-compat",c=>{const d=c.getProvider("app-compat").getImmediate(),w=c.getProvider("auth");return new xa(d,w)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"}},EmailAuthProvider:ee,FacebookAuthProvider:At,GithubAuthProvider:Jt,GoogleAuthProvider:Vt,OAuthProvider:Ve,SAMLAuthProvider:Zn,PhoneAuthProvider:Md,PhoneMultiFactorGenerator:ap,RecaptchaVerifier:Ul,TwitterAuthProvider:Lr,Auth:xa,AuthCredential:Ui,Error:K.ZR}).setInstantiationMode("LAZY").setMultipleInstances(!1)),_.registerVersion("@firebase/auth-compat","0.2.16")}(g.Z)},1135:(Wt,je,S)=>{S.d(je,{X:()=>g});var m=S(7579);class g extends m.x{constructor(ae){super(),this._value=ae}get value(){return this.getValue()}_subscribe(ae){const oe=super._subscribe(ae);return!oe.closed&&ae.next(this._value),oe}getValue(){const{hasError:ae,thrownError:oe,_value:_e}=this;if(ae)throw oe;return this._throwIfClosed(),_e}next(ae){super.next(this._value=ae)}}},8306:(Wt,je,S)=>{S.d(je,{y:()=>ie});var m=S(930),g=S(727),K=S(8822),ae=S(4671);var fe=S(2416),ge=S(576),he=S(2806);let ie=(()=>{class Ke{constructor(ht){ht&&(this._subscribe=ht)}lift(ht){const Ze=new Ke;return Ze.source=this,Ze.operator=ht,Ze}subscribe(ht,Ze,Qe){const Ee=function it(Ke){return Ke&&Ke instanceof m.Lv||function me(Ke){return Ke&&(0,ge.m)(Ke.next)&&(0,ge.m)(Ke.error)&&(0,ge.m)(Ke.complete)}(Ke)&&(0,g.Nn)(Ke)}(ht)?ht:new m.Hp(ht,Ze,Qe);return(0,he.x)(()=>{const{operator:kt,source:ot}=this;Ee.add(kt?kt.call(Ee,ot):ot?this._subscribe(Ee):this._trySubscribe(Ee))}),Ee}_trySubscribe(ht){try{return this._subscribe(ht)}catch(Ze){ht.error(Ze)}}forEach(ht,Ze){return new(Ze=ce(Ze))((Qe,Ee)=>{let kt;kt=this.subscribe(ot=>{try{ht(ot)}catch(Ne){Ee(Ne),kt?.unsubscribe()}},Ee,Qe)})}_subscribe(ht){var Ze;return null===(Ze=this.source)||void 0===Ze?void 0:Ze.subscribe(ht)}[K.L](){return this}pipe(...ht){return function _e(Ke){return 0===Ke.length?ae.y:1===Ke.length?Ke[0]:function(ht){return Ke.reduce((Ze,Qe)=>Qe(Ze),ht)}}(ht)(this)}toPromise(ht){return new(ht=ce(ht))((Ze,Qe)=>{let Ee;this.subscribe(kt=>Ee=kt,kt=>Qe(kt),()=>Ze(Ee))})}}return Ke.create=Ye=>new Ke(Ye),Ke})();function ce(Ke){var Ye;return null!==(Ye=Ke??fe.v.Promise)&&void 0!==Ye?Ye:Promise}},7579:(Wt,je,S)=>{S.d(je,{x:()=>fe});var m=S(8306),g=S(727);const ae=(0,S(3888).d)(he=>function(){he(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var oe=S(8737),_e=S(2806);let fe=(()=>{class he extends m.y{constructor(){super(),this.closed=!1,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(ce){const me=new ge(this,this);return me.operator=ce,me}_throwIfClosed(){if(this.closed)throw new ae}next(ce){(0,_e.x)(()=>{if(this._throwIfClosed(),!this.isStopped){const me=this.observers.slice();for(const it of me)it.next(ce)}})}error(ce){(0,_e.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=ce;const{observers:me}=this;for(;me.length;)me.shift().error(ce)}})}complete(){(0,_e.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:ce}=this;for(;ce.length;)ce.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=null}get observed(){var ce;return(null===(ce=this.observers)||void 0===ce?void 0:ce.length)>0}_trySubscribe(ce){return this._throwIfClosed(),super._trySubscribe(ce)}_subscribe(ce){return this._throwIfClosed(),this._checkFinalizedStatuses(ce),this._innerSubscribe(ce)}_innerSubscribe(ce){const{hasError:me,isStopped:it,observers:Ke}=this;return me||it?g.Lc:(Ke.push(ce),new g.w0(()=>(0,oe.P)(Ke,ce)))}_checkFinalizedStatuses(ce){const{hasError:me,thrownError:it,isStopped:Ke}=this;me?ce.error(it):Ke&&ce.complete()}asObservable(){const ce=new m.y;return ce.source=this,ce}}return he.create=(ie,ce)=>new ge(ie,ce),he})();class ge extends fe{constructor(ie,ce){super(),this.destination=ie,this.source=ce}next(ie){var ce,me;null===(me=null===(ce=this.destination)||void 0===ce?void 0:ce.next)||void 0===me||me.call(ce,ie)}error(ie){var ce,me;null===(me=null===(ce=this.destination)||void 0===ce?void 0:ce.error)||void 0===me||me.call(ce,ie)}complete(){var ie,ce;null===(ce=null===(ie=this.destination)||void 0===ie?void 0:ie.complete)||void 0===ce||ce.call(ie)}_subscribe(ie){var ce,me;return null!==(me=null===(ce=this.source)||void 0===ce?void 0:ce.subscribe(ie))&&void 0!==me?me:g.Lc}}},930:(Wt,je,S)=>{S.d(je,{Hp:()=>it,Lv:()=>me});var m=S(576),g=S(727),K=S(2416),ae=S(7849),oe=S(5032);const _e=he("C",void 0,void 0);function he(Qe,Ee,kt){return{kind:Qe,value:Ee,error:kt}}var ie=S(3410),ce=S(2806);class me extends g.w0{constructor(Ee){super(),this.isStopped=!1,Ee?(this.destination=Ee,(0,g.Nn)(Ee)&&Ee.add(this)):this.destination=Ze}static create(Ee,kt,ot){return new it(Ee,kt,ot)}next(Ee){this.isStopped?ht(function ge(Qe){return he("N",Qe,void 0)}(Ee),this):this._next(Ee)}error(Ee){this.isStopped?ht(function fe(Qe){return he("E",void 0,Qe)}(Ee),this):(this.isStopped=!0,this._error(Ee))}complete(){this.isStopped?ht(_e,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(Ee){this.destination.next(Ee)}_error(Ee){try{this.destination.error(Ee)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}class it extends me{constructor(Ee,kt,ot){let Ne;if(super(),(0,m.m)(Ee))Ne=Ee;else if(Ee){let xe;({next:Ne,error:kt,complete:ot}=Ee),this&&K.v.useDeprecatedNextContext?(xe=Object.create(Ee),xe.unsubscribe=()=>this.unsubscribe()):xe=Ee,Ne=Ne?.bind(xe),kt=kt?.bind(xe),ot=ot?.bind(xe)}this.destination={next:Ne?Ke(Ne):oe.Z,error:Ke(kt??Ye),complete:ot?Ke(ot):oe.Z}}}function Ke(Qe,Ee){return(...kt)=>{try{Qe(...kt)}catch(ot){K.v.useDeprecatedSynchronousErrorHandling?(0,ce.O)(ot):(0,ae.h)(ot)}}}function Ye(Qe){throw Qe}function ht(Qe,Ee){const{onStoppedNotification:kt}=K.v;kt&&ie.z.setTimeout(()=>kt(Qe,Ee))}const Ze={closed:!0,next:oe.Z,error:Ye,complete:oe.Z}},727:(Wt,je,S)=>{S.d(je,{Lc:()=>_e,w0:()=>oe,Nn:()=>fe});var m=S(576);const K=(0,S(3888).d)(he=>function(ce){he(this),this.message=ce?`${ce.length} errors occurred during unsubscription:\n${ce.map((me,it)=>`${it+1}) ${me.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=ce});var ae=S(8737);class oe{constructor(ie){this.initialTeardown=ie,this.closed=!1,this._parentage=null,this._teardowns=null}unsubscribe(){let ie;if(!this.closed){this.closed=!0;const{_parentage:ce}=this;if(ce)if(this._parentage=null,Array.isArray(ce))for(const Ke of ce)Ke.remove(this);else ce.remove(this);const{initialTeardown:me}=this;if((0,m.m)(me))try{me()}catch(Ke){ie=Ke instanceof K?Ke.errors:[Ke]}const{_teardowns:it}=this;if(it){this._teardowns=null;for(const Ke of it)try{ge(Ke)}catch(Ye){ie=ie??[],Ye instanceof K?ie=[...ie,...Ye.errors]:ie.push(Ye)}}if(ie)throw new K(ie)}}add(ie){var ce;if(ie&&ie!==this)if(this.closed)ge(ie);else{if(ie instanceof oe){if(ie.closed||ie._hasParent(this))return;ie._addParent(this)}(this._teardowns=null!==(ce=this._teardowns)&&void 0!==ce?ce:[]).push(ie)}}_hasParent(ie){const{_parentage:ce}=this;return ce===ie||Array.isArray(ce)&&ce.includes(ie)}_addParent(ie){const{_parentage:ce}=this;this._parentage=Array.isArray(ce)?(ce.push(ie),ce):ce?[ce,ie]:ie}_removeParent(ie){const{_parentage:ce}=this;ce===ie?this._parentage=null:Array.isArray(ce)&&(0,ae.P)(ce,ie)}remove(ie){const{_teardowns:ce}=this;ce&&(0,ae.P)(ce,ie),ie instanceof oe&&ie._removeParent(this)}}oe.EMPTY=(()=>{const he=new oe;return he.closed=!0,he})();const _e=oe.EMPTY;function fe(he){return he instanceof oe||he&&"closed"in he&&(0,m.m)(he.remove)&&(0,m.m)(he.add)&&(0,m.m)(he.unsubscribe)}function ge(he){(0,m.m)(he)?he():he.unsubscribe()}},2416:(Wt,je,S)=>{S.d(je,{v:()=>m});const m={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},4033:(Wt,je,S)=>{S.d(je,{c:()=>_e});var m=S(8306),g=S(727),K=S(8343),ae=S(5403),oe=S(4482);class _e extends m.y{constructor(ge,he){super(),this.source=ge,this.subjectFactory=he,this._subject=null,this._refCount=0,this._connection=null,(0,oe.A)(ge)&&(this.lift=ge.lift)}_subscribe(ge){return this.getSubject().subscribe(ge)}getSubject(){const ge=this._subject;return(!ge||ge.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:ge}=this;this._subject=this._connection=null,ge?.unsubscribe()}connect(){let ge=this._connection;if(!ge){ge=this._connection=new g.w0;const he=this.getSubject();ge.add(this.source.subscribe(new ae.Q(he,void 0,()=>{this._teardown(),he.complete()},ie=>{this._teardown(),he.error(ie)},()=>this._teardown()))),ge.closed&&(this._connection=null,ge=g.w0.EMPTY)}return ge}refCount(){return(0,K.x)()(this)}}},9841:(Wt,je,S)=>{S.d(je,{a:()=>ie});var m=S(8306),g=S(4742),K=S(8996),ae=S(4671),oe=S(3268),_e=S(3269),fe=S(1810),ge=S(5403),he=S(9672);function ie(...it){const Ke=(0,_e.yG)(it),Ye=(0,_e.jO)(it),{args:ht,keys:Ze}=(0,g.D)(it);if(0===ht.length)return(0,K.D)([],Ke);const Qe=new m.y(function ce(it,Ke,Ye=ae.y){return ht=>{me(Ke,()=>{const{length:Ze}=it,Qe=new Array(Ze);let Ee=Ze,kt=Ze;for(let ot=0;ot{const Ne=(0,K.D)(it[ot],Ke);let xe=!1;Ne.subscribe(new ge.Q(ht,Nt=>{Qe[ot]=Nt,xe||(xe=!0,kt--),kt||ht.next(Ye(Qe.slice()))},()=>{--Ee||ht.complete()}))},ht)},ht)}}(ht,Ke,Ze?Ee=>(0,fe.n)(Ze,Ee):ae.y));return Ye?Qe.pipe((0,oe.Z)(Ye)):Qe}function me(it,Ke,Ye){it?(0,he.f)(Ye,it,Ke):Ke()}},7272:(Wt,je,S)=>{S.d(je,{z:()=>oe});var m=S(8189),K=S(3269),ae=S(8996);function oe(..._e){return function g(){return(0,m.J)(1)}()((0,ae.D)(_e,(0,K.yG)(_e)))}},9770:(Wt,je,S)=>{S.d(je,{P:()=>K});var m=S(8306),g=S(8421);function K(ae){return new m.y(oe=>{(0,g.Xf)(ae()).subscribe(oe)})}},515:(Wt,je,S)=>{S.d(je,{E:()=>g});const g=new(S(8306).y)(oe=>oe.complete())},4128:(Wt,je,S)=>{S.d(je,{D:()=>ge});var m=S(8306),g=S(4742),K=S(8421),ae=S(3269),oe=S(5403),_e=S(3268),fe=S(1810);function ge(...he){const ie=(0,ae.jO)(he),{args:ce,keys:me}=(0,g.D)(he),it=new m.y(Ke=>{const{length:Ye}=ce;if(!Ye)return void Ke.complete();const ht=new Array(Ye);let Ze=Ye,Qe=Ye;for(let Ee=0;Ee{kt||(kt=!0,Qe--),ht[Ee]=ot},()=>Ze--,void 0,()=>{(!Ze||!kt)&&(Qe||Ke.next(me?(0,fe.n)(me,ht):ht),Ke.complete())}))}});return ie?it.pipe((0,_e.Z)(ie)):it}},8996:(Wt,je,S)=>{S.d(je,{D:()=>Ne});var m=S(8421),g=S(5363),K=S(9468),_e=S(8306),ge=S(2202),he=S(576),ie=S(9672);function me(xe,Nt){if(!xe)throw new Error("Iterable cannot be null");return new _e.y(Lt=>{(0,ie.f)(Lt,Nt,()=>{const Se=xe[Symbol.asyncIterator]();(0,ie.f)(Lt,Nt,()=>{Se.next().then(Ie=>{Ie.done?Lt.complete():Lt.next(Ie.value)})},0,!0)})})}var it=S(3670),Ke=S(8239),Ye=S(1144),ht=S(6495),Ze=S(2206),Qe=S(4532),Ee=S(3260);function Ne(xe,Nt){return Nt?function ot(xe,Nt){if(null!=xe){if((0,it.c)(xe))return function ae(xe,Nt){return(0,m.Xf)(xe).pipe((0,K.R)(Nt),(0,g.Q)(Nt))}(xe,Nt);if((0,Ye.z)(xe))return function fe(xe,Nt){return new _e.y(Lt=>{let Se=0;return Nt.schedule(function(){Se===xe.length?Lt.complete():(Lt.next(xe[Se++]),Lt.closed||this.schedule())})})}(xe,Nt);if((0,Ke.t)(xe))return function oe(xe,Nt){return(0,m.Xf)(xe).pipe((0,K.R)(Nt),(0,g.Q)(Nt))}(xe,Nt);if((0,Ze.D)(xe))return me(xe,Nt);if((0,ht.T)(xe))return function ce(xe,Nt){return new _e.y(Lt=>{let Se;return(0,ie.f)(Lt,Nt,()=>{Se=xe[ge.h](),(0,ie.f)(Lt,Nt,()=>{let Ie,Ce;try{({value:Ie,done:Ce}=Se.next())}catch(et){return void Lt.error(et)}Ce?Lt.complete():Lt.next(Ie)},0,!0)}),()=>(0,he.m)(Se?.return)&&Se.return()})}(xe,Nt);if((0,Ee.L)(xe))return function kt(xe,Nt){return me((0,Ee.Q)(xe),Nt)}(xe,Nt)}throw(0,Qe.z)(xe)}(xe,Nt):(0,m.Xf)(xe)}},4968:(Wt,je,S)=>{S.d(je,{R:()=>ie});var m=S(8421),g=S(8306),K=S(5577),ae=S(1144),oe=S(576),_e=S(3268);const fe=["addListener","removeListener"],ge=["addEventListener","removeEventListener"],he=["on","off"];function ie(Ye,ht,Ze,Qe){if((0,oe.m)(Ze)&&(Qe=Ze,Ze=void 0),Qe)return ie(Ye,ht,Ze).pipe((0,_e.Z)(Qe));const[Ee,kt]=function Ke(Ye){return(0,oe.m)(Ye.addEventListener)&&(0,oe.m)(Ye.removeEventListener)}(Ye)?ge.map(ot=>Ne=>Ye[ot](ht,Ne,Ze)):function me(Ye){return(0,oe.m)(Ye.addListener)&&(0,oe.m)(Ye.removeListener)}(Ye)?fe.map(ce(Ye,ht)):function it(Ye){return(0,oe.m)(Ye.on)&&(0,oe.m)(Ye.off)}(Ye)?he.map(ce(Ye,ht)):[];if(!Ee&&(0,ae.z)(Ye))return(0,K.z)(ot=>ie(ot,ht,Ze))((0,m.Xf)(Ye));if(!Ee)throw new TypeError("Invalid event target");return new g.y(ot=>{const Ne=(...xe)=>ot.next(1kt(Ne)})}function ce(Ye,ht){return Ze=>Qe=>Ye[Ze](ht,Qe)}},8421:(Wt,je,S)=>{S.d(je,{Xf:()=>it});var m=S(5987),g=S(1144),K=S(8239),ae=S(8306),oe=S(3670),_e=S(2206),fe=S(4532),ge=S(6495),he=S(3260),ie=S(576),ce=S(7849),me=S(8822);function it(ot){if(ot instanceof ae.y)return ot;if(null!=ot){if((0,oe.c)(ot))return function Ke(ot){return new ae.y(Ne=>{const xe=ot[me.L]();if((0,ie.m)(xe.subscribe))return xe.subscribe(Ne);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(ot);if((0,g.z)(ot))return function Ye(ot){return new ae.y(Ne=>{for(let xe=0;xe{ot.then(xe=>{Ne.closed||(Ne.next(xe),Ne.complete())},xe=>Ne.error(xe)).then(null,ce.h)})}(ot);if((0,_e.D)(ot))return Qe(ot);if((0,ge.T)(ot))return function Ze(ot){return new ae.y(Ne=>{for(const xe of ot)if(Ne.next(xe),Ne.closed)return;Ne.complete()})}(ot);if((0,he.L)(ot))return function Ee(ot){return Qe((0,he.Q)(ot))}(ot)}throw(0,fe.z)(ot)}function Qe(ot){return new ae.y(Ne=>{(function kt(ot,Ne){var xe,Nt,Lt,Se;return(0,m.mG)(this,void 0,void 0,function*(){try{for(xe=(0,m.KL)(ot);!(Nt=yield xe.next()).done;)if(Ne.next(Nt.value),Ne.closed)return}catch(Ie){Lt={error:Ie}}finally{try{Nt&&!Nt.done&&(Se=xe.return)&&(yield Se.call(xe))}finally{if(Lt)throw Lt.error}}Ne.complete()})})(ot,Ne).catch(xe=>Ne.error(xe))})}},6451:(Wt,je,S)=>{S.d(je,{T:()=>_e});var m=S(8189),g=S(8421),K=S(515),ae=S(3269),oe=S(8996);function _e(...fe){const ge=(0,ae.yG)(fe),he=(0,ae._6)(fe,1/0),ie=fe;return ie.length?1===ie.length?(0,g.Xf)(ie[0]):(0,m.J)(he)((0,oe.D)(ie,ge)):K.E}},9646:(Wt,je,S)=>{S.d(je,{of:()=>K});var m=S(3269),g=S(8996);function K(...ae){const oe=(0,m.yG)(ae);return(0,g.D)(ae,oe)}},2843:(Wt,je,S)=>{S.d(je,{_:()=>K});var m=S(8306),g=S(576);function K(ae,oe){const _e=(0,g.m)(ae)?ae:()=>ae,fe=ge=>ge.error(_e());return new m.y(oe?ge=>oe.schedule(fe,0,ge):fe)}},5403:(Wt,je,S)=>{S.d(je,{Q:()=>g});var m=S(930);class g extends m.Lv{constructor(ae,oe,_e,fe,ge){super(ae),this.onFinalize=ge,this._next=oe?function(he){try{oe(he)}catch(ie){ae.error(ie)}}:super._next,this._error=fe?function(he){try{fe(he)}catch(ie){ae.error(ie)}finally{this.unsubscribe()}}:super._error,this._complete=_e?function(){try{_e()}catch(he){ae.error(he)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var ae;const{closed:oe}=this;super.unsubscribe(),!oe&&(null===(ae=this.onFinalize)||void 0===ae||ae.call(this))}}},262:(Wt,je,S)=>{S.d(je,{K:()=>ae});var m=S(8421),g=S(5403),K=S(4482);function ae(oe){return(0,K.e)((_e,fe)=>{let ie,ge=null,he=!1;ge=_e.subscribe(new g.Q(fe,void 0,void 0,ce=>{ie=(0,m.Xf)(oe(ce,ae(oe)(_e))),ge?(ge.unsubscribe(),ge=null,ie.subscribe(fe)):he=!0})),he&&(ge.unsubscribe(),ge=null,ie.subscribe(fe))})}},4351:(Wt,je,S)=>{S.d(je,{b:()=>K});var m=S(5577),g=S(576);function K(ae,oe){return(0,g.m)(oe)?(0,m.z)(ae,oe,1):(0,m.z)(ae,1)}},8372:(Wt,je,S)=>{S.d(je,{b:()=>ae});var m=S(4986),g=S(4482),K=S(5403);function ae(oe,_e=m.z){return(0,g.e)((fe,ge)=>{let he=null,ie=null,ce=null;const me=()=>{if(he){he.unsubscribe(),he=null;const Ke=ie;ie=null,ge.next(Ke)}};function it(){const Ke=ce+oe,Ye=_e.now();if(Ye{ie=Ke,ce=_e.now(),he||(he=_e.schedule(it,oe),ge.add(he))},()=>{me(),ge.complete()},void 0,()=>{ie=he=null}))})}},6590:(Wt,je,S)=>{S.d(je,{d:()=>K});var m=S(4482),g=S(5403);function K(ae){return(0,m.e)((oe,_e)=>{let fe=!1;oe.subscribe(new g.Q(_e,ge=>{fe=!0,_e.next(ge)},()=>{fe||_e.next(ae),_e.complete()}))})}},1884:(Wt,je,S)=>{S.d(je,{x:()=>ae});var m=S(4671),g=S(4482),K=S(5403);function ae(_e,fe=m.y){return _e=_e??oe,(0,g.e)((ge,he)=>{let ie,ce=!0;ge.subscribe(new K.Q(he,me=>{const it=fe(me);(ce||!_e(ie,it))&&(ce=!1,ie=it,he.next(me))}))})}function oe(_e,fe){return _e===fe}},9300:(Wt,je,S)=>{S.d(je,{h:()=>K});var m=S(4482),g=S(5403);function K(ae,oe){return(0,m.e)((_e,fe)=>{let ge=0;_e.subscribe(new g.Q(fe,he=>ae.call(oe,he,ge++)&&fe.next(he)))})}},8746:(Wt,je,S)=>{S.d(je,{x:()=>g});var m=S(4482);function g(K){return(0,m.e)((ae,oe)=>{try{ae.subscribe(oe)}finally{oe.add(K)}})}},590:(Wt,je,S)=>{S.d(je,{P:()=>fe});var m=S(6805),g=S(9300),K=S(5698),ae=S(6590),oe=S(8068),_e=S(4671);function fe(ge,he){const ie=arguments.length>=2;return ce=>ce.pipe(ge?(0,g.h)((me,it)=>ge(me,it,ce)):_e.y,(0,K.q)(1),ie?(0,ae.d)(he):(0,oe.T)(()=>new m.K))}},4004:(Wt,je,S)=>{S.d(je,{U:()=>K});var m=S(4482),g=S(5403);function K(ae,oe){return(0,m.e)((_e,fe)=>{let ge=0;_e.subscribe(new g.Q(fe,he=>{fe.next(ae.call(oe,he,ge++))}))})}},9718:(Wt,je,S)=>{S.d(je,{h:()=>g});var m=S(4004);function g(K){return(0,m.U)(()=>K)}},8189:(Wt,je,S)=>{S.d(je,{J:()=>K});var m=S(5577),g=S(4671);function K(ae=1/0){return(0,m.z)(g.y,ae)}},5577:(Wt,je,S)=>{S.d(je,{z:()=>ge});var m=S(4004),g=S(8421),K=S(4482),ae=S(9672),oe=S(5403),fe=S(576);function ge(he,ie,ce=1/0){return(0,fe.m)(ie)?ge((me,it)=>(0,m.U)((Ke,Ye)=>ie(me,Ke,it,Ye))((0,g.Xf)(he(me,it))),ce):("number"==typeof ie&&(ce=ie),(0,K.e)((me,it)=>function _e(he,ie,ce,me,it,Ke,Ye,ht){const Ze=[];let Qe=0,Ee=0,kt=!1;const ot=()=>{kt&&!Ze.length&&!Qe&&ie.complete()},Ne=Nt=>Qe{Ke&&ie.next(Nt),Qe++;let Lt=!1;(0,g.Xf)(ce(Nt,Ee++)).subscribe(new oe.Q(ie,Se=>{it?.(Se),Ke?Ne(Se):ie.next(Se)},()=>{Lt=!0},void 0,()=>{if(Lt)try{for(Qe--;Ze.length&&Qexe(Se)):xe(Se)}ot()}catch(Se){ie.error(Se)}}))};return he.subscribe(new oe.Q(ie,Ne,()=>{kt=!0,ot()})),()=>{ht?.()}}(me,it,he,ce)))}},5363:(Wt,je,S)=>{S.d(je,{Q:()=>ae});var m=S(9672),g=S(4482),K=S(5403);function ae(oe,_e=0){return(0,g.e)((fe,ge)=>{fe.subscribe(new K.Q(ge,he=>(0,m.f)(ge,oe,()=>ge.next(he),_e),()=>(0,m.f)(ge,oe,()=>ge.complete(),_e),he=>(0,m.f)(ge,oe,()=>ge.error(he),_e)))})}},8343:(Wt,je,S)=>{S.d(je,{x:()=>K});var m=S(4482),g=S(5403);function K(){return(0,m.e)((ae,oe)=>{let _e=null;ae._refCount++;const fe=new g.Q(oe,void 0,void 0,void 0,()=>{if(!ae||ae._refCount<=0||0<--ae._refCount)return void(_e=null);const ge=ae._connection,he=_e;_e=null,ge&&(!he||ge===he)&&ge.unsubscribe(),oe.unsubscribe()});ae.subscribe(fe),fe.closed||(_e=ae.connect())})}},5026:(Wt,je,S)=>{S.d(je,{R:()=>ae});var m=S(4482),g=S(5403);function K(oe,_e,fe,ge,he){return(ie,ce)=>{let me=fe,it=_e,Ke=0;ie.subscribe(new g.Q(ce,Ye=>{const ht=Ke++;it=me?oe(it,Ye,ht):(me=!0,Ye),ge&&ce.next(it)},he&&(()=>{me&&ce.next(it),ce.complete()})))}}function ae(oe,_e){return(0,m.e)(K(oe,_e,arguments.length>=2,!0))}},3099:(Wt,je,S)=>{S.d(je,{B:()=>_e});var m=S(8996),g=S(5698),K=S(7579),ae=S(930),oe=S(4482);function _e(ge={}){const{connector:he=(()=>new K.x),resetOnError:ie=!0,resetOnComplete:ce=!0,resetOnRefCountZero:me=!0}=ge;return it=>{let Ke=null,Ye=null,ht=null,Ze=0,Qe=!1,Ee=!1;const kt=()=>{Ye?.unsubscribe(),Ye=null},ot=()=>{kt(),Ke=ht=null,Qe=Ee=!1},Ne=()=>{const xe=Ke;ot(),xe?.unsubscribe()};return(0,oe.e)((xe,Nt)=>{Ze++,!Ee&&!Qe&&kt();const Lt=ht=ht??he();Nt.add(()=>{Ze--,0===Ze&&!Ee&&!Qe&&(Ye=fe(Ne,me))}),Lt.subscribe(Nt),Ke||(Ke=new ae.Hp({next:Se=>Lt.next(Se),error:Se=>{Ee=!0,kt(),Ye=fe(ot,ie,Se),Lt.error(Se)},complete:()=>{Qe=!0,kt(),Ye=fe(ot,ce),Lt.complete()}}),(0,m.D)(xe).subscribe(Ke))})(it)}}function fe(ge,he,...ie){return!0===he?(ge(),null):!1===he?null:he(...ie).pipe((0,g.q)(1)).subscribe(()=>ge())}},3151:(Wt,je,S)=>{S.d(je,{d:()=>oe});var m=S(7579),g=S(6063);class K extends m.x{constructor(fe=1/0,ge=1/0,he=g.l){super(),this._bufferSize=fe,this._windowTime=ge,this._timestampProvider=he,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=ge===1/0,this._bufferSize=Math.max(1,fe),this._windowTime=Math.max(1,ge)}next(fe){const{isStopped:ge,_buffer:he,_infiniteTimeWindow:ie,_timestampProvider:ce,_windowTime:me}=this;ge||(he.push(fe),!ie&&he.push(ce.now()+me)),this._trimBuffer(),super.next(fe)}_subscribe(fe){this._throwIfClosed(),this._trimBuffer();const ge=this._innerSubscribe(fe),{_infiniteTimeWindow:he,_buffer:ie}=this,ce=ie.slice();for(let me=0;menew K(ce,fe,ge),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:me})}},8675:(Wt,je,S)=>{S.d(je,{O:()=>ae});var m=S(7272),g=S(3269),K=S(4482);function ae(...oe){const _e=(0,g.yG)(oe);return(0,K.e)((fe,ge)=>{(_e?(0,m.z)(oe,fe,_e):(0,m.z)(oe,fe)).subscribe(ge)})}},9468:(Wt,je,S)=>{S.d(je,{R:()=>g});var m=S(4482);function g(K,ae=0){return(0,m.e)((oe,_e)=>{_e.add(K.schedule(()=>oe.subscribe(_e),ae))})}},3900:(Wt,je,S)=>{S.d(je,{w:()=>ae});var m=S(8421),g=S(4482),K=S(5403);function ae(oe,_e){return(0,g.e)((fe,ge)=>{let he=null,ie=0,ce=!1;const me=()=>ce&&!he&&ge.complete();fe.subscribe(new K.Q(ge,it=>{he?.unsubscribe();let Ke=0;const Ye=ie++;(0,m.Xf)(oe(it,Ye)).subscribe(he=new K.Q(ge,ht=>ge.next(_e?_e(it,ht,Ye,Ke++):ht),()=>{he=null,me()}))},()=>{ce=!0,me()}))})}},5698:(Wt,je,S)=>{S.d(je,{q:()=>ae});var m=S(515),g=S(4482),K=S(5403);function ae(oe){return oe<=0?()=>m.E:(0,g.e)((_e,fe)=>{let ge=0;_e.subscribe(new K.Q(fe,he=>{++ge<=oe&&(fe.next(he),oe<=ge&&fe.complete())}))})}},8505:(Wt,je,S)=>{S.d(je,{b:()=>oe});var m=S(576),g=S(4482),K=S(5403),ae=S(4671);function oe(_e,fe,ge){const he=(0,m.m)(_e)||fe||ge?{next:_e,error:fe,complete:ge}:_e;return he?(0,g.e)((ie,ce)=>{var me;null===(me=he.subscribe)||void 0===me||me.call(he);let it=!0;ie.subscribe(new K.Q(ce,Ke=>{var Ye;null===(Ye=he.next)||void 0===Ye||Ye.call(he,Ke),ce.next(Ke)},()=>{var Ke;it=!1,null===(Ke=he.complete)||void 0===Ke||Ke.call(he),ce.complete()},Ke=>{var Ye;it=!1,null===(Ye=he.error)||void 0===Ye||Ye.call(he,Ke),ce.error(Ke)},()=>{var Ke,Ye;it&&(null===(Ke=he.unsubscribe)||void 0===Ke||Ke.call(he)),null===(Ye=he.finalize)||void 0===Ye||Ye.call(he)}))}):ae.y}},8068:(Wt,je,S)=>{S.d(je,{T:()=>ae});var m=S(6805),g=S(4482),K=S(5403);function ae(_e=oe){return(0,g.e)((fe,ge)=>{let he=!1;fe.subscribe(new K.Q(ge,ie=>{he=!0,ge.next(ie)},()=>he?ge.complete():ge.error(_e())))})}function oe(){return new m.K}},4408:(Wt,je,S)=>{S.d(je,{o:()=>oe});var m=S(727);class g extends m.w0{constructor(fe,ge){super()}schedule(fe,ge=0){return this}}const K={setInterval(..._e){const{delegate:fe}=K;return(fe?.setInterval||setInterval)(..._e)},clearInterval(_e){const{delegate:fe}=K;return(fe?.clearInterval||clearInterval)(_e)},delegate:void 0};var ae=S(8737);class oe extends g{constructor(fe,ge){super(fe,ge),this.scheduler=fe,this.work=ge,this.pending=!1}schedule(fe,ge=0){if(this.closed)return this;this.state=fe;const he=this.id,ie=this.scheduler;return null!=he&&(this.id=this.recycleAsyncId(ie,he,ge)),this.pending=!0,this.delay=ge,this.id=this.id||this.requestAsyncId(ie,this.id,ge),this}requestAsyncId(fe,ge,he=0){return K.setInterval(fe.flush.bind(fe,this),he)}recycleAsyncId(fe,ge,he=0){if(null!=he&&this.delay===he&&!1===this.pending)return ge;K.clearInterval(ge)}execute(fe,ge){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const he=this._execute(fe,ge);if(he)return he;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(fe,ge){let ie,he=!1;try{this.work(fe)}catch(ce){he=!0,ie=ce||new Error("Scheduled action threw falsy error")}if(he)return this.unsubscribe(),ie}unsubscribe(){if(!this.closed){const{id:fe,scheduler:ge}=this,{actions:he}=ge;this.work=this.state=this.scheduler=null,this.pending=!1,(0,ae.P)(he,this),null!=fe&&(this.id=this.recycleAsyncId(ge,fe,null)),this.delay=null,super.unsubscribe()}}}},7565:(Wt,je,S)=>{S.d(je,{v:()=>K});var m=S(6063);class g{constructor(oe,_e=g.now){this.schedulerActionCtor=oe,this.now=_e}schedule(oe,_e=0,fe){return new this.schedulerActionCtor(this,oe).schedule(fe,_e)}}g.now=m.l.now;class K extends g{constructor(oe,_e=g.now){super(oe,_e),this.actions=[],this._active=!1,this._scheduled=void 0}flush(oe){const{actions:_e}=this;if(this._active)return void _e.push(oe);let fe;this._active=!0;do{if(fe=oe.execute(oe.state,oe.delay))break}while(oe=_e.shift());if(this._active=!1,fe){for(;oe=_e.shift();)oe.unsubscribe();throw fe}}}},4986:(Wt,je,S)=>{S.d(je,{P:()=>ae,z:()=>K});var m=S(4408);const K=new(S(7565).v)(m.o),ae=K},6063:(Wt,je,S)=>{S.d(je,{l:()=>m});const m={now:()=>(m.delegate||Date).now(),delegate:void 0}},3410:(Wt,je,S)=>{S.d(je,{z:()=>m});const m={setTimeout(...g){const{delegate:K}=m;return(K?.setTimeout||setTimeout)(...g)},clearTimeout(g){const{delegate:K}=m;return(K?.clearTimeout||clearTimeout)(g)},delegate:void 0}},2202:(Wt,je,S)=>{S.d(je,{h:()=>g});const g=function m(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},8822:(Wt,je,S)=>{S.d(je,{L:()=>m});const m="function"==typeof Symbol&&Symbol.observable||"@@observable"},6805:(Wt,je,S)=>{S.d(je,{K:()=>g});const g=(0,S(3888).d)(K=>function(){K(this),this.name="EmptyError",this.message="no elements in sequence"})},3269:(Wt,je,S)=>{S.d(je,{_6:()=>_e,jO:()=>ae,yG:()=>oe});var m=S(576),g=S(3532);function K(fe){return fe[fe.length-1]}function ae(fe){return(0,m.m)(K(fe))?fe.pop():void 0}function oe(fe){return(0,g.K)(K(fe))?fe.pop():void 0}function _e(fe,ge){return"number"==typeof K(fe)?fe.pop():ge}},4742:(Wt,je,S)=>{S.d(je,{D:()=>oe});const{isArray:m}=Array,{getPrototypeOf:g,prototype:K,keys:ae}=Object;function oe(fe){if(1===fe.length){const ge=fe[0];if(m(ge))return{args:ge,keys:null};if(function _e(fe){return fe&&"object"==typeof fe&&g(fe)===K}(ge)){const he=ae(ge);return{args:he.map(ie=>ge[ie]),keys:he}}}return{args:fe,keys:null}}},8737:(Wt,je,S)=>{function m(g,K){if(g){const ae=g.indexOf(K);0<=ae&&g.splice(ae,1)}}S.d(je,{P:()=>m})},3888:(Wt,je,S)=>{function m(g){const ae=g(oe=>{Error.call(oe),oe.stack=(new Error).stack});return ae.prototype=Object.create(Error.prototype),ae.prototype.constructor=ae,ae}S.d(je,{d:()=>m})},1810:(Wt,je,S)=>{function m(g,K){return g.reduce((ae,oe,_e)=>(ae[oe]=K[_e],ae),{})}S.d(je,{n:()=>m})},2806:(Wt,je,S)=>{S.d(je,{O:()=>ae,x:()=>K});var m=S(2416);let g=null;function K(oe){if(m.v.useDeprecatedSynchronousErrorHandling){const _e=!g;if(_e&&(g={errorThrown:!1,error:null}),oe(),_e){const{errorThrown:fe,error:ge}=g;if(g=null,fe)throw ge}}else oe()}function ae(oe){m.v.useDeprecatedSynchronousErrorHandling&&g&&(g.errorThrown=!0,g.error=oe)}},9672:(Wt,je,S)=>{function m(g,K,ae,oe=0,_e=!1){const fe=K.schedule(function(){ae(),_e?g.add(this.schedule(null,oe)):this.unsubscribe()},oe);if(g.add(fe),!_e)return fe}S.d(je,{f:()=>m})},4671:(Wt,je,S)=>{function m(g){return g}S.d(je,{y:()=>m})},1144:(Wt,je,S)=>{S.d(je,{z:()=>m});const m=g=>g&&"number"==typeof g.length&&"function"!=typeof g},2206:(Wt,je,S)=>{S.d(je,{D:()=>g});var m=S(576);function g(K){return Symbol.asyncIterator&&(0,m.m)(K?.[Symbol.asyncIterator])}},576:(Wt,je,S)=>{function m(g){return"function"==typeof g}S.d(je,{m:()=>m})},3670:(Wt,je,S)=>{S.d(je,{c:()=>K});var m=S(8822),g=S(576);function K(ae){return(0,g.m)(ae[m.L])}},6495:(Wt,je,S)=>{S.d(je,{T:()=>K});var m=S(2202),g=S(576);function K(ae){return(0,g.m)(ae?.[m.h])}},8239:(Wt,je,S)=>{S.d(je,{t:()=>g});var m=S(576);function g(K){return(0,m.m)(K?.then)}},3260:(Wt,je,S)=>{S.d(je,{L:()=>ae,Q:()=>K});var m=S(5987),g=S(576);function K(oe){return(0,m.FC)(this,arguments,function*(){const fe=oe.getReader();try{for(;;){const{value:ge,done:he}=yield(0,m.qq)(fe.read());if(he)return yield(0,m.qq)(void 0);yield yield(0,m.qq)(ge)}}finally{fe.releaseLock()}})}function ae(oe){return(0,g.m)(oe?.getReader)}},3532:(Wt,je,S)=>{S.d(je,{K:()=>g});var m=S(576);function g(K){return K&&(0,m.m)(K.schedule)}},4482:(Wt,je,S)=>{S.d(je,{A:()=>g,e:()=>K});var m=S(576);function g(ae){return(0,m.m)(ae?.lift)}function K(ae){return oe=>{if(g(oe))return oe.lift(function(_e){try{return ae(_e,this)}catch(fe){this.error(fe)}});throw new TypeError("Unable to lift unknown Observable type")}}},3268:(Wt,je,S)=>{S.d(je,{Z:()=>ae});var m=S(4004);const{isArray:g}=Array;function ae(oe){return(0,m.U)(_e=>function K(oe,_e){return g(_e)?oe(..._e):oe(_e)}(oe,_e))}},5032:(Wt,je,S)=>{function m(){}S.d(je,{Z:()=>m})},7849:(Wt,je,S)=>{S.d(je,{h:()=>K});var m=S(2416),g=S(3410);function K(ae){g.z.setTimeout(()=>{const{onUnhandledError:oe}=m.v;if(!oe)throw ae;oe(ae)})}},4532:(Wt,je,S)=>{function m(g){return new TypeError(`You provided ${null!==g&&"object"==typeof g?"an invalid object":`'${g}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}S.d(je,{z:()=>m})},5987:(Wt,je,S)=>{function ge(Ie,Ce,et,lt){return new(et||(et=Promise))(function(Je,pn){function Tn(pe){try{Mt(lt.next(pe))}catch(ft){pn(ft)}}function St(pe){try{Mt(lt.throw(pe))}catch(ft){pn(ft)}}function Mt(pe){pe.done?Je(pe.value):function at(Je){return Je instanceof et?Je:new et(function(pn){pn(Je)})}(pe.value).then(Tn,St)}Mt((lt=lt.apply(Ie,Ce||[])).next())})}function Ze(Ie){return this instanceof Ze?(this.v=Ie,this):new Ze(Ie)}function Qe(Ie,Ce,et){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var at,lt=et.apply(Ie,Ce||[]),Je=[];return at={},pn("next"),pn("throw"),pn("return"),at[Symbol.asyncIterator]=function(){return this},at;function pn(Et){lt[Et]&&(at[Et]=function(sn){return new Promise(function(It,Rn){Je.push([Et,sn,It,Rn])>1||Tn(Et,sn)})})}function Tn(Et,sn){try{!function St(Et){Et.value instanceof Ze?Promise.resolve(Et.value.v).then(Mt,pe):ft(Je[0][2],Et)}(lt[Et](sn))}catch(It){ft(Je[0][3],It)}}function Mt(Et){Tn("next",Et)}function pe(Et){Tn("throw",Et)}function ft(Et,sn){Et(sn),Je.shift(),Je.length&&Tn(Je[0][0],Je[0][1])}}function kt(Ie){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var et,Ce=Ie[Symbol.asyncIterator];return Ce?Ce.call(Ie):(Ie=function me(Ie){var Ce="function"==typeof Symbol&&Symbol.iterator,et=Ce&&Ie[Ce],lt=0;if(et)return et.call(Ie);if(Ie&&"number"==typeof Ie.length)return{next:function(){return Ie&<>=Ie.length&&(Ie=void 0),{value:Ie&&Ie[lt++],done:!Ie}}};throw new TypeError(Ce?"Object is not iterable.":"Symbol.iterator is not defined.")}(Ie),et={},lt("next"),lt("throw"),lt("return"),et[Symbol.asyncIterator]=function(){return this},et);function lt(Je){et[Je]=Ie[Je]&&function(pn){return new Promise(function(Tn,St){!function at(Je,pn,Tn,St){Promise.resolve(St).then(function(Mt){Je({value:Mt,done:Tn})},pn)}(Tn,St,(pn=Ie[Je](pn)).done,pn.value)})}}}S.d(je,{FC:()=>Qe,KL:()=>kt,mG:()=>ge,qq:()=>Ze})},7340:(Wt,je,S)=>{S.d(je,{LC:()=>g,ZE:()=>Ee,ZN:()=>Qe,_j:()=>m,jt:()=>oe,k1:()=>kt,l3:()=>K,oB:()=>ge,vP:()=>fe});class m{}class g{}const K="*";function oe(ot,Ne=null){return{type:4,styles:Ne,timings:ot}}function fe(ot,Ne=null){return{type:2,steps:ot,options:Ne}}function ge(ot){return{type:6,styles:ot,offset:null}}function Ze(ot){Promise.resolve(null).then(ot)}class Qe{constructor(Ne=0,xe=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=Ne+xe}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(Ne=>Ne()),this._onDoneFns=[])}onStart(Ne){this._onStartFns.push(Ne)}onDone(Ne){this._onDoneFns.push(Ne)}onDestroy(Ne){this._onDestroyFns.push(Ne)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){Ze(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(Ne=>Ne()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(Ne=>Ne()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(Ne){this._position=this.totalTime?Ne*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(Ne){const xe="start"==Ne?this._onStartFns:this._onDoneFns;xe.forEach(Nt=>Nt()),xe.length=0}}class Ee{constructor(Ne){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=Ne;let xe=0,Nt=0,Lt=0;const Se=this.players.length;0==Se?Ze(()=>this._onFinish()):this.players.forEach(Ie=>{Ie.onDone(()=>{++xe==Se&&this._onFinish()}),Ie.onDestroy(()=>{++Nt==Se&&this._onDestroy()}),Ie.onStart(()=>{++Lt==Se&&this._onStart()})}),this.totalTime=this.players.reduce((Ie,Ce)=>Math.max(Ie,Ce.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(Ne=>Ne()),this._onDoneFns=[])}init(){this.players.forEach(Ne=>Ne.init())}onStart(Ne){this._onStartFns.push(Ne)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(Ne=>Ne()),this._onStartFns=[])}onDone(Ne){this._onDoneFns.push(Ne)}onDestroy(Ne){this._onDestroyFns.push(Ne)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(Ne=>Ne.play())}pause(){this.players.forEach(Ne=>Ne.pause())}restart(){this.players.forEach(Ne=>Ne.restart())}finish(){this._onFinish(),this.players.forEach(Ne=>Ne.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(Ne=>Ne.destroy()),this._onDestroyFns.forEach(Ne=>Ne()),this._onDestroyFns=[])}reset(){this.players.forEach(Ne=>Ne.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(Ne){const xe=Ne*this.totalTime;this.players.forEach(Nt=>{const Lt=Nt.totalTime?Math.min(1,xe/Nt.totalTime):1;Nt.setPosition(Lt)})}getPosition(){const Ne=this.players.reduce((xe,Nt)=>null===xe||Nt.totalTime>xe.totalTime?Nt:xe,null);return null!=Ne?Ne.getPosition():0}beforeDestroy(){this.players.forEach(Ne=>{Ne.beforeDestroy&&Ne.beforeDestroy()})}triggerCallback(Ne){const xe="start"==Ne?this._onStartFns:this._onDoneFns;xe.forEach(Nt=>Nt()),xe.length=0}}const kt="!"},4827:(Wt,je,S)=>{S.d(je,{tE:()=>gt,qm:()=>js,X6:()=>Lr,yG:()=>or});var m=S(6895),g=S(4650),K=S(3353),ae=S(1135),oe=S(7579),_e=S(9646),Vi=S(9300);function xr(Dt){return(0,Vi.h)((ze,Oe)=>Dt<=Oe)}var Mo=S(4482),Os=S(5403),Pi=S(8421),yo=S(5032);function Bs(Dt){return(0,Mo.e)((ze,Oe)=>{(0,Pi.Xf)(Dt).subscribe(new Os.Q(Oe,()=>Oe.complete(),yo.Z)),!Oe.closed&&ze.subscribe(Oe)})}var ji=S(1884),Ui=S(1281),qe=S(9841),Le=S(7272),ct=S(8306),Rt=S(5698),tn=S(8372),cn=S(4004),Ir=S(8675);const Wn=new Set;let Cr,$i=(()=>{class Dt{constructor(Oe){this._platform=Oe,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):vs}matchMedia(Oe){return(this._platform.WEBKIT||this._platform.BLINK)&&function Hi(Dt){if(!Wn.has(Dt))try{Cr||(Cr=document.createElement("style"),Cr.setAttribute("type","text/css"),document.head.appendChild(Cr)),Cr.sheet&&(Cr.sheet.insertRule(`@media ${Dt} {body{ }}`,0),Wn.add(Dt))}catch(ze){console.error(ze)}}(Oe),this._matchMedia(Oe)}}return Dt.\u0275fac=function(Oe){return new(Oe||Dt)(g.LFG(K.t4))},Dt.\u0275prov=g.Yz7({token:Dt,factory:Dt.\u0275fac,providedIn:"root"}),Dt})();function vs(Dt){return{matches:"all"===Dt||""===Dt,media:Dt,addListener:()=>{},removeListener:()=>{}}}let ni=(()=>{class Dt{constructor(Oe,pt){this._mediaMatcher=Oe,this._zone=pt,this._queries=new Map,this._destroySubject=new oe.x}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(Oe){return ro((0,Ui.Eq)(Oe)).some(Pt=>this._registerQuery(Pt).mql.matches)}observe(Oe){const Pt=ro((0,Ui.Eq)(Oe)).map(ar=>this._registerQuery(ar).observable);let In=(0,qe.a)(Pt);return In=(0,Le.z)(In.pipe((0,Rt.q)(1)),In.pipe(xr(1),(0,tn.b)(0))),In.pipe((0,cn.U)(ar=>{const br={matches:!1,breakpoints:{}};return ar.forEach(({matches:di,query:Eo})=>{br.matches=br.matches||di,br.breakpoints[Eo]=di}),br}))}_registerQuery(Oe){if(this._queries.has(Oe))return this._queries.get(Oe);const pt=this._mediaMatcher.matchMedia(Oe),In={observable:new ct.y(ar=>{const br=di=>this._zone.run(()=>ar.next(di));return pt.addListener(br),()=>{pt.removeListener(br)}}).pipe((0,Ir.O)(pt),(0,cn.U)(({matches:ar})=>({query:Oe,matches:ar})),Bs(this._destroySubject)),mql:pt};return this._queries.set(Oe,In),In}}return Dt.\u0275fac=function(Oe){return new(Oe||Dt)(g.LFG($i),g.LFG(g.R0b))},Dt.\u0275prov=g.Yz7({token:Dt,factory:Dt.\u0275fac,providedIn:"root"}),Dt})();function ro(Dt){return Dt.map(ze=>ze.split(",")).reduce((ze,Oe)=>ze.concat(Oe)).map(ze=>ze.trim())}function Lr(Dt){return 0===Dt.buttons||0===Dt.offsetX&&0===Dt.offsetY}function or(Dt){const ze=Dt.touches&&Dt.touches[0]||Dt.changedTouches&&Dt.changedTouches[0];return!(!ze||-1!==ze.identifier||null!=ze.radiusX&&1!==ze.radiusX||null!=ze.radiusY&&1!==ze.radiusY)}const Dn=new g.OlP("cdk-input-modality-detector-options"),$r={ignoreKeys:[18,17,224,91,16]},as=(0,K.i$)({passive:!0,capture:!0});let bs=(()=>{class Dt{constructor(Oe,pt,Pt,In){this._platform=Oe,this._mostRecentTarget=null,this._modality=new ae.X(null),this._lastTouchMs=0,this._onKeydown=ar=>{this._options?.ignoreKeys?.some(br=>br===ar.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=(0,K.sA)(ar))},this._onMousedown=ar=>{Date.now()-this._lastTouchMs<650||(this._modality.next(Lr(ar)?"keyboard":"mouse"),this._mostRecentTarget=(0,K.sA)(ar))},this._onTouchstart=ar=>{or(ar)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=(0,K.sA)(ar))},this._options={...$r,...In},this.modalityDetected=this._modality.pipe(xr(1)),this.modalityChanged=this.modalityDetected.pipe((0,ji.x)()),Oe.isBrowser&&pt.runOutsideAngular(()=>{Pt.addEventListener("keydown",this._onKeydown,as),Pt.addEventListener("mousedown",this._onMousedown,as),Pt.addEventListener("touchstart",this._onTouchstart,as)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,as),document.removeEventListener("mousedown",this._onMousedown,as),document.removeEventListener("touchstart",this._onTouchstart,as))}}return Dt.\u0275fac=function(Oe){return new(Oe||Dt)(g.LFG(K.t4),g.LFG(g.R0b),g.LFG(m.K0),g.LFG(Dn,8))},Dt.\u0275prov=g.Yz7({token:Dt,factory:Dt.\u0275fac,providedIn:"root"}),Dt})();const P=new g.OlP("cdk-focus-monitor-default-options"),X=(0,K.i$)({passive:!0,capture:!0});let gt=(()=>{class Dt{constructor(Oe,pt,Pt,In,ar){this._ngZone=Oe,this._platform=pt,this._inputModalityDetector=Pt,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new oe.x,this._rootNodeFocusAndBlurListener=br=>{const di=(0,K.sA)(br),Eo="focus"===br.type?this._onFocus:this._onBlur;for(let Zr=di;Zr;Zr=Zr.parentElement)Eo.call(this,br,Zr)},this._document=In,this._detectionMode=ar?.detectionMode||0}monitor(Oe,pt=!1){const Pt=(0,Ui.fI)(Oe);if(!this._platform.isBrowser||1!==Pt.nodeType)return(0,_e.of)(null);const In=(0,K.kV)(Pt)||this._getDocument(),ar=this._elementInfo.get(Pt);if(ar)return pt&&(ar.checkChildren=!0),ar.subject;const br={checkChildren:pt,subject:new oe.x,rootNode:In};return this._elementInfo.set(Pt,br),this._registerGlobalListeners(br),br.subject}stopMonitoring(Oe){const pt=(0,Ui.fI)(Oe),Pt=this._elementInfo.get(pt);Pt&&(Pt.subject.complete(),this._setClasses(pt),this._elementInfo.delete(pt),this._removeGlobalListeners(Pt))}focusVia(Oe,pt,Pt){const In=(0,Ui.fI)(Oe);In===this._getDocument().activeElement?this._getClosestElementsInfo(In).forEach(([br,di])=>this._originChanged(br,pt,di)):(this._setOrigin(pt),"function"==typeof In.focus&&In.focus(Pt))}ngOnDestroy(){this._elementInfo.forEach((Oe,pt)=>this.stopMonitoring(pt))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(Oe){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(Oe)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:"program"}_shouldBeAttributedToTouch(Oe){return 1===this._detectionMode||!!Oe?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(Oe,pt){Oe.classList.toggle("cdk-focused",!!pt),Oe.classList.toggle("cdk-touch-focused","touch"===pt),Oe.classList.toggle("cdk-keyboard-focused","keyboard"===pt),Oe.classList.toggle("cdk-mouse-focused","mouse"===pt),Oe.classList.toggle("cdk-program-focused","program"===pt)}_setOrigin(Oe,pt=!1){this._ngZone.runOutsideAngular(()=>{this._origin=Oe,this._originFromTouchInteraction="touch"===Oe&&pt,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(Oe,pt){const Pt=this._elementInfo.get(pt),In=(0,K.sA)(Oe);!Pt||!Pt.checkChildren&&pt!==In||this._originChanged(pt,this._getFocusOrigin(In),Pt)}_onBlur(Oe,pt){const Pt=this._elementInfo.get(pt);!Pt||Pt.checkChildren&&Oe.relatedTarget instanceof Node&&pt.contains(Oe.relatedTarget)||(this._setClasses(pt),this._emitOrigin(Pt,null))}_emitOrigin(Oe,pt){Oe.subject.observers.length&&this._ngZone.run(()=>Oe.subject.next(pt))}_registerGlobalListeners(Oe){if(!this._platform.isBrowser)return;const pt=Oe.rootNode,Pt=this._rootNodeFocusListenerCount.get(pt)||0;Pt||this._ngZone.runOutsideAngular(()=>{pt.addEventListener("focus",this._rootNodeFocusAndBlurListener,X),pt.addEventListener("blur",this._rootNodeFocusAndBlurListener,X)}),this._rootNodeFocusListenerCount.set(pt,Pt+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Bs(this._stopInputModalityDetector)).subscribe(In=>{this._setOrigin(In,!0)}))}_removeGlobalListeners(Oe){const pt=Oe.rootNode;if(this._rootNodeFocusListenerCount.has(pt)){const Pt=this._rootNodeFocusListenerCount.get(pt);Pt>1?this._rootNodeFocusListenerCount.set(pt,Pt-1):(pt.removeEventListener("focus",this._rootNodeFocusAndBlurListener,X),pt.removeEventListener("blur",this._rootNodeFocusAndBlurListener,X),this._rootNodeFocusListenerCount.delete(pt))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(Oe,pt,Pt){this._setClasses(Oe,pt),this._emitOrigin(Pt,pt),this._lastFocusOrigin=pt}_getClosestElementsInfo(Oe){const pt=[];return this._elementInfo.forEach((Pt,In)=>{(In===Oe||Pt.checkChildren&&In.contains(Oe))&&pt.push([In,Pt])}),pt}}return Dt.\u0275fac=function(Oe){return new(Oe||Dt)(g.LFG(g.R0b),g.LFG(K.t4),g.LFG(bs),g.LFG(m.K0,8),g.LFG(P,8))},Dt.\u0275prov=g.Yz7({token:Dt,factory:Dt.\u0275fac,providedIn:"root"}),Dt})();const Br="cdk-high-contrast-black-on-white",ci="cdk-high-contrast-white-on-black",ri="cdk-high-contrast-active";let js=(()=>{class Dt{constructor(Oe,pt){this._platform=Oe,this._document=pt,this._breakpointSubscription=(0,g.f3M)(ni).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const Oe=this._document.createElement("div");Oe.style.backgroundColor="rgb(1,2,3)",Oe.style.position="absolute",this._document.body.appendChild(Oe);const pt=this._document.defaultView||window,Pt=pt&&pt.getComputedStyle?pt.getComputedStyle(Oe):null,In=(Pt&&Pt.backgroundColor||"").replace(/ /g,"");switch(Oe.remove(),In){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const Oe=this._document.body.classList;Oe.remove(ri,Br,ci),this._hasCheckedHighContrastMode=!0;const pt=this.getHighContrastMode();1===pt?Oe.add(ri,Br):2===pt&&Oe.add(ri,ci)}}}return Dt.\u0275fac=function(Oe){return new(Oe||Dt)(g.LFG(K.t4),g.LFG(m.K0))},Dt.\u0275prov=g.Yz7({token:Dt,factory:Dt.\u0275fac,providedIn:"root"}),Dt})()},1281:(Wt,je,S)=>{S.d(je,{Eq:()=>oe,Ig:()=>g,fI:()=>fe});var m=S(4650);function g(he){return null!=he&&"false"!=`${he}`}function oe(he){return Array.isArray(he)?he:[he]}function fe(he){return he instanceof m.SBq?he.nativeElement:he}},3353:(Wt,je,S)=>{S.d(je,{Oy:()=>ot,i$:()=>ce,kV:()=>Qe,sA:()=>kt,t4:()=>ae});var m=S(4650),g=S(6895);let K;try{K=typeof Intl<"u"&&Intl.v8BreakIterator}catch{K=!1}let he,ht,ae=(()=>{class Ne{constructor(Nt){this._platformId=Nt,this.isBrowser=this._platformId?(0,g.NF)(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!K)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return Ne.\u0275fac=function(Nt){return new(Nt||Ne)(m.LFG(m.Lbi))},Ne.\u0275prov=m.Yz7({token:Ne,factory:Ne.\u0275fac,providedIn:"root"}),Ne})();function ce(Ne){return function ie(){if(null==he&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>he=!0}))}finally{he=he||!1}return he}()?Ne:!!Ne.capture}function Qe(Ne){if(function Ze(){if(null==ht){const Ne=typeof document<"u"?document.head:null;ht=!(!Ne||!Ne.createShadowRoot&&!Ne.attachShadow)}return ht}()){const xe=Ne.getRootNode?Ne.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&xe instanceof ShadowRoot)return xe}return null}function kt(Ne){return Ne.composedPath?Ne.composedPath()[0]:Ne.target}function ot(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}},6895:(Wt,je,S)=>{S.d(je,{Do:()=>ot,EM:()=>yi,HT:()=>oe,JF:()=>sr,JJ:()=>Es,K0:()=>fe,Mx:()=>ps,NF:()=>Fs,O5:()=>ys,Ov:()=>Rt,PM:()=>Ki,S$:()=>Ze,V_:()=>ie,Ye:()=>Ne,b0:()=>kt,bD:()=>ks,ez:()=>Ns,lw:()=>ge,mk:()=>gs,mr:()=>Ee,q:()=>K,sg:()=>Li,uU:()=>Cr,w_:()=>_e});var m=S(4650);let g=null;function K(){return g}function oe(L){g||(g=L)}class _e{}const fe=new m.OlP("DocumentToken");let ge=(()=>{class L{historyGo(V){throw new Error("Not implemented")}}return L.\u0275fac=function(V){return new(V||L)},L.\u0275prov=m.Yz7({token:L,factory:function(){return function he(){return(0,m.LFG)(ce)}()},providedIn:"platform"}),L})();const ie=new m.OlP("Location Initialized");let ce=(()=>{class L extends ge{constructor(V){super(),this._doc=V,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return K().getBaseHref(this._doc)}onPopState(V){const Q=K().getGlobalEventTarget(this._doc,"window");return Q.addEventListener("popstate",V,!1),()=>Q.removeEventListener("popstate",V)}onHashChange(V){const Q=K().getGlobalEventTarget(this._doc,"window");return Q.addEventListener("hashchange",V,!1),()=>Q.removeEventListener("hashchange",V)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(V){this.location.pathname=V}pushState(V,Q,Ve){me()?this._history.pushState(V,Q,Ve):this.location.hash=Ve}replaceState(V,Q,Ve){me()?this._history.replaceState(V,Q,Ve):this.location.hash=Ve}forward(){this._history.forward()}back(){this._history.back()}historyGo(V=0){this._history.go(V)}getState(){return this._history.state}}return L.\u0275fac=function(V){return new(V||L)(m.LFG(fe))},L.\u0275prov=m.Yz7({token:L,factory:function(){return function it(){return new ce((0,m.LFG)(fe))}()},providedIn:"platform"}),L})();function me(){return!!window.history.pushState}function Ke(L,ee){if(0==L.length)return ee;if(0==ee.length)return L;let V=0;return L.endsWith("/")&&V++,ee.startsWith("/")&&V++,2==V?L+ee.substring(1):1==V?L+ee:L+"/"+ee}function Ye(L){const ee=L.match(/#|\?|$/),V=ee&&ee.index||L.length;return L.slice(0,V-("/"===L[V-1]?1:0))+L.slice(V)}function ht(L){return L&&"?"!==L[0]?"?"+L:L}let Ze=(()=>{class L{historyGo(V){throw new Error("Not implemented")}}return L.\u0275fac=function(V){return new(V||L)},L.\u0275prov=m.Yz7({token:L,factory:function(){return function Qe(){const L=(0,m.LFG)(fe).location;return new kt((0,m.LFG)(ge),L&&L.origin||"")}()},providedIn:"root"}),L})();const Ee=new m.OlP("appBaseHref");let kt=(()=>{class L extends Ze{constructor(V,Q){if(super(),this._platformLocation=V,this._removeListenerFns=[],null==Q&&(Q=this._platformLocation.getBaseHrefFromDOM()),null==Q)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=Q}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(V){this._removeListenerFns.push(this._platformLocation.onPopState(V),this._platformLocation.onHashChange(V))}getBaseHref(){return this._baseHref}prepareExternalUrl(V){return Ke(this._baseHref,V)}path(V=!1){const Q=this._platformLocation.pathname+ht(this._platformLocation.search),Ve=this._platformLocation.hash;return Ve&&V?`${Q}${Ve}`:Q}pushState(V,Q,Ve,At){const Vt=this.prepareExternalUrl(Ve+ht(At));this._platformLocation.pushState(V,Q,Vt)}replaceState(V,Q,Ve,At){const Vt=this.prepareExternalUrl(Ve+ht(At));this._platformLocation.replaceState(V,Q,Vt)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(V=0){this._platformLocation.historyGo?.(V)}}return L.\u0275fac=function(V){return new(V||L)(m.LFG(ge),m.LFG(Ee,8))},L.\u0275prov=m.Yz7({token:L,factory:L.\u0275fac}),L})(),ot=(()=>{class L extends Ze{constructor(V,Q){super(),this._platformLocation=V,this._baseHref="",this._removeListenerFns=[],null!=Q&&(this._baseHref=Q)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(V){this._removeListenerFns.push(this._platformLocation.onPopState(V),this._platformLocation.onHashChange(V))}getBaseHref(){return this._baseHref}path(V=!1){let Q=this._platformLocation.hash;return null==Q&&(Q="#"),Q.length>0?Q.substring(1):Q}prepareExternalUrl(V){const Q=Ke(this._baseHref,V);return Q.length>0?"#"+Q:Q}pushState(V,Q,Ve,At){let Vt=this.prepareExternalUrl(Ve+ht(At));0==Vt.length&&(Vt=this._platformLocation.pathname),this._platformLocation.pushState(V,Q,Vt)}replaceState(V,Q,Ve,At){let Vt=this.prepareExternalUrl(Ve+ht(At));0==Vt.length&&(Vt=this._platformLocation.pathname),this._platformLocation.replaceState(V,Q,Vt)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(V=0){this._platformLocation.historyGo?.(V)}}return L.\u0275fac=function(V){return new(V||L)(m.LFG(ge),m.LFG(Ee,8))},L.\u0275prov=m.Yz7({token:L,factory:L.\u0275fac}),L})(),Ne=(()=>{class L{constructor(V){this._subject=new m.vpe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=V;const Q=this._locationStrategy.getBaseHref();this._baseHref=Ye(Lt(Q)),this._locationStrategy.onPopState(Ve=>{this._subject.emit({url:this.path(!0),pop:!0,state:Ve.state,type:Ve.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(V=!1){return this.normalize(this._locationStrategy.path(V))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(V,Q=""){return this.path()==this.normalize(V+ht(Q))}normalize(V){return L.stripTrailingSlash(function Nt(L,ee){return L&&ee.startsWith(L)?ee.substring(L.length):ee}(this._baseHref,Lt(V)))}prepareExternalUrl(V){return V&&"/"!==V[0]&&(V="/"+V),this._locationStrategy.prepareExternalUrl(V)}go(V,Q="",Ve=null){this._locationStrategy.pushState(Ve,"",V,Q),this._notifyUrlChangeListeners(this.prepareExternalUrl(V+ht(Q)),Ve)}replaceState(V,Q="",Ve=null){this._locationStrategy.replaceState(Ve,"",V,Q),this._notifyUrlChangeListeners(this.prepareExternalUrl(V+ht(Q)),Ve)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(V=0){this._locationStrategy.historyGo?.(V)}onUrlChange(V){return this._urlChangeListeners.push(V),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(Q=>{this._notifyUrlChangeListeners(Q.url,Q.state)})),()=>{const Q=this._urlChangeListeners.indexOf(V);this._urlChangeListeners.splice(Q,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(V="",Q){this._urlChangeListeners.forEach(Ve=>Ve(V,Q))}subscribe(V,Q,Ve){return this._subject.subscribe({next:V,error:Q,complete:Ve})}}return L.normalizeQueryParams=ht,L.joinWithSlash=Ke,L.stripTrailingSlash=Ye,L.\u0275fac=function(V){return new(V||L)(m.LFG(Ze))},L.\u0275prov=m.Yz7({token:L,factory:function(){return function xe(){return new Ne((0,m.LFG)(Ze))}()},providedIn:"root"}),L})();function Lt(L){return L.replace(/\/index.html$/,"")}var Ie=(()=>((Ie=Ie||{})[Ie.Decimal=0]="Decimal",Ie[Ie.Percent=1]="Percent",Ie[Ie.Currency=2]="Currency",Ie[Ie.Scientific=3]="Scientific",Ie))(),et=(()=>((et=et||{})[et.Format=0]="Format",et[et.Standalone=1]="Standalone",et))(),lt=(()=>((lt=lt||{})[lt.Narrow=0]="Narrow",lt[lt.Abbreviated=1]="Abbreviated",lt[lt.Wide=2]="Wide",lt[lt.Short=3]="Short",lt))(),at=(()=>((at=at||{})[at.Short=0]="Short",at[at.Medium=1]="Medium",at[at.Long=2]="Long",at[at.Full=3]="Full",at))(),Je=(()=>((Je=Je||{})[Je.Decimal=0]="Decimal",Je[Je.Group=1]="Group",Je[Je.List=2]="List",Je[Je.PercentSign=3]="PercentSign",Je[Je.PlusSign=4]="PlusSign",Je[Je.MinusSign=5]="MinusSign",Je[Je.Exponential=6]="Exponential",Je[Je.SuperscriptingExponent=7]="SuperscriptingExponent",Je[Je.PerMille=8]="PerMille",Je[Je.Infinity=9]="Infinity",Je[Je.NaN=10]="NaN",Je[Je.TimeSeparator=11]="TimeSeparator",Je[Je.CurrencyDecimal=12]="CurrencyDecimal",Je[Je.CurrencyGroup=13]="CurrencyGroup",Je))();function It(L,ee){return Yn((0,m.cg1)(L)[m.wAp.DateFormat],ee)}function Rn(L,ee){return Yn((0,m.cg1)(L)[m.wAp.TimeFormat],ee)}function nt(L,ee){return Yn((0,m.cg1)(L)[m.wAp.DateTimeFormat],ee)}function ut(L,ee){const V=(0,m.cg1)(L),Q=V[m.wAp.NumberSymbols][ee];if(typeof Q>"u"){if(ee===Je.CurrencyDecimal)return V[m.wAp.NumberSymbols][Je.Decimal];if(ee===Je.CurrencyGroup)return V[m.wAp.NumberSymbols][Je.Group]}return Q}function bt(L){if(!L[m.wAp.ExtraData])throw new Error(`Missing extra locale data for the locale "${L[m.wAp.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Yn(L,ee){for(let V=ee;V>-1;V--)if(typeof L[V]<"u")return L[V];throw new Error("Locale data API: locale data undefined")}function gn(L){const[ee,V]=L.split(":");return{hours:+ee,minutes:+V}}const Ct=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Be={},Ge=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var xt=(()=>((xt=xt||{})[xt.Short=0]="Short",xt[xt.ShortGMT=1]="ShortGMT",xt[xt.Long=2]="Long",xt[xt.Extended=3]="Extended",xt))(),Xe=(()=>((Xe=Xe||{})[Xe.FullYear=0]="FullYear",Xe[Xe.Month=1]="Month",Xe[Xe.Date=2]="Date",Xe[Xe.Hours=3]="Hours",Xe[Xe.Minutes=4]="Minutes",Xe[Xe.Seconds=5]="Seconds",Xe[Xe.FractionalSeconds=6]="FractionalSeconds",Xe[Xe.Day=7]="Day",Xe))(),qt=(()=>((qt=qt||{})[qt.DayPeriods=0]="DayPeriods",qt[qt.Days=1]="Days",qt[qt.Months=2]="Months",qt[qt.Eras=3]="Eras",qt))();function nr(L,ee,V,Q){let Ve=function jr(L){if(Sr(L))return L;if("number"==typeof L&&!isNaN(L))return new Date(L);if("string"==typeof L){if(L=L.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(L)){const[Ve,At=1,Vt=1]=L.split("-").map(Jt=>+Jt);return Kn(Ve,At-1,Vt)}const V=parseFloat(L);if(!isNaN(L-V))return new Date(V);let Q;if(Q=L.match(Ct))return function Fr(L){const ee=new Date(0);let V=0,Q=0;const Ve=L[8]?ee.setUTCFullYear:ee.setFullYear,At=L[8]?ee.setUTCHours:ee.setHours;L[9]&&(V=Number(L[9]+L[10]),Q=Number(L[9]+L[11])),Ve.call(ee,Number(L[1]),Number(L[2])-1,Number(L[3]));const Vt=Number(L[4]||0)-V,Jt=Number(L[5]||0)-Q,cr=Number(L[6]||0),gr=Math.floor(1e3*parseFloat("0."+(L[7]||0)));return At.call(ee,Vt,Jt,cr,gr),ee}(Q)}const ee=new Date(L);if(!Sr(ee))throw new Error(`Unable to convert "${L}" into a date`);return ee}(L);ee=Ut(V,ee)||ee;let Jt,Vt=[];for(;ee;){if(Jt=Ge.exec(ee),!Jt){Vt.push(ee);break}{Vt=Vt.concat(Jt.slice(1));const Tr=Vt.pop();if(!Tr)break;ee=Tr}}let cr=Ve.getTimezoneOffset();Q&&(cr=Nr(Q,cr),Ve=function kr(L,ee,V){const Q=V?-1:1,Ve=L.getTimezoneOffset();return function jn(L,ee){return(L=new Date(L.getTime())).setMinutes(L.getMinutes()+ee),L}(L,Q*(Nr(ee,Ve)-Ve))}(Ve,Q,!0));let gr="";return Vt.forEach(Tr=>{const Zn=function Pr(L){if(Pn[L])return Pn[L];let ee;switch(L){case"G":case"GG":case"GGG":ee=Ae(qt.Eras,lt.Abbreviated);break;case"GGGG":ee=Ae(qt.Eras,lt.Wide);break;case"GGGGG":ee=Ae(qt.Eras,lt.Narrow);break;case"y":ee=Me(Xe.FullYear,1,0,!1,!0);break;case"yy":ee=Me(Xe.FullYear,2,0,!0,!0);break;case"yyy":ee=Me(Xe.FullYear,3,0,!1,!0);break;case"yyyy":ee=Me(Xe.FullYear,4,0,!1,!0);break;case"Y":ee=fn(1);break;case"YY":ee=fn(2,!0);break;case"YYY":ee=fn(3);break;case"YYYY":ee=fn(4);break;case"M":case"L":ee=Me(Xe.Month,1,1);break;case"MM":case"LL":ee=Me(Xe.Month,2,1);break;case"MMM":ee=Ae(qt.Months,lt.Abbreviated);break;case"MMMM":ee=Ae(qt.Months,lt.Wide);break;case"MMMMM":ee=Ae(qt.Months,lt.Narrow);break;case"LLL":ee=Ae(qt.Months,lt.Abbreviated,et.Standalone);break;case"LLLL":ee=Ae(qt.Months,lt.Wide,et.Standalone);break;case"LLLLL":ee=Ae(qt.Months,lt.Narrow,et.Standalone);break;case"w":ee=hn(1);break;case"ww":ee=hn(2);break;case"W":ee=hn(1,!0);break;case"d":ee=Me(Xe.Date,1);break;case"dd":ee=Me(Xe.Date,2);break;case"c":case"cc":ee=Me(Xe.Day,1);break;case"ccc":ee=Ae(qt.Days,lt.Abbreviated,et.Standalone);break;case"cccc":ee=Ae(qt.Days,lt.Wide,et.Standalone);break;case"ccccc":ee=Ae(qt.Days,lt.Narrow,et.Standalone);break;case"cccccc":ee=Ae(qt.Days,lt.Short,et.Standalone);break;case"E":case"EE":case"EEE":ee=Ae(qt.Days,lt.Abbreviated);break;case"EEEE":ee=Ae(qt.Days,lt.Wide);break;case"EEEEE":ee=Ae(qt.Days,lt.Narrow);break;case"EEEEEE":ee=Ae(qt.Days,lt.Short);break;case"a":case"aa":case"aaa":ee=Ae(qt.DayPeriods,lt.Abbreviated);break;case"aaaa":ee=Ae(qt.DayPeriods,lt.Wide);break;case"aaaaa":ee=Ae(qt.DayPeriods,lt.Narrow);break;case"b":case"bb":case"bbb":ee=Ae(qt.DayPeriods,lt.Abbreviated,et.Standalone,!0);break;case"bbbb":ee=Ae(qt.DayPeriods,lt.Wide,et.Standalone,!0);break;case"bbbbb":ee=Ae(qt.DayPeriods,lt.Narrow,et.Standalone,!0);break;case"B":case"BB":case"BBB":ee=Ae(qt.DayPeriods,lt.Abbreviated,et.Format,!0);break;case"BBBB":ee=Ae(qt.DayPeriods,lt.Wide,et.Format,!0);break;case"BBBBB":ee=Ae(qt.DayPeriods,lt.Narrow,et.Format,!0);break;case"h":ee=Me(Xe.Hours,1,-12);break;case"hh":ee=Me(Xe.Hours,2,-12);break;case"H":ee=Me(Xe.Hours,1);break;case"HH":ee=Me(Xe.Hours,2);break;case"m":ee=Me(Xe.Minutes,1);break;case"mm":ee=Me(Xe.Minutes,2);break;case"s":ee=Me(Xe.Seconds,1);break;case"ss":ee=Me(Xe.Seconds,2);break;case"S":ee=Me(Xe.FractionalSeconds,1);break;case"SS":ee=Me(Xe.FractionalSeconds,2);break;case"SSS":ee=Me(Xe.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":ee=se(xt.Short);break;case"ZZZZZ":ee=se(xt.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":ee=se(xt.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":ee=se(xt.Long);break;default:return null}return Pn[L]=ee,ee}(Tr);gr+=Zn?Zn(Ve,V,cr):"''"===Tr?"'":Tr.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),gr}function Kn(L,ee,V){const Q=new Date(0);return Q.setFullYear(L,ee,V),Q.setHours(0,0,0),Q}function Ut(L,ee){const V=function Tn(L){return(0,m.cg1)(L)[m.wAp.LocaleId]}(L);if(Be[V]=Be[V]||{},Be[V][ee])return Be[V][ee];let Q="";switch(ee){case"shortDate":Q=It(L,at.Short);break;case"mediumDate":Q=It(L,at.Medium);break;case"longDate":Q=It(L,at.Long);break;case"fullDate":Q=It(L,at.Full);break;case"shortTime":Q=Rn(L,at.Short);break;case"mediumTime":Q=Rn(L,at.Medium);break;case"longTime":Q=Rn(L,at.Long);break;case"fullTime":Q=Rn(L,at.Full);break;case"short":const Ve=Ut(L,"shortTime"),At=Ut(L,"shortDate");Q=mn(nt(L,at.Short),[Ve,At]);break;case"medium":const Vt=Ut(L,"mediumTime"),Jt=Ut(L,"mediumDate");Q=mn(nt(L,at.Medium),[Vt,Jt]);break;case"long":const cr=Ut(L,"longTime"),gr=Ut(L,"longDate");Q=mn(nt(L,at.Long),[cr,gr]);break;case"full":const Tr=Ut(L,"fullTime"),Zn=Ut(L,"fullDate");Q=mn(nt(L,at.Full),[Tr,Zn])}return Q&&(Be[V][ee]=Q),Q}function mn(L,ee){return ee&&(L=L.replace(/\{([^}]+)}/g,function(V,Q){return null!=ee&&Q in ee?ee[Q]:V})),L}function Xn(L,ee,V="-",Q,Ve){let At="";(L<0||Ve&&L<=0)&&(Ve?L=1-L:(L=-L,At=V));let Vt=String(L);for(;Vt.length0||Jt>-V)&&(Jt+=V),L===Xe.Hours)0===Jt&&-12===V&&(Jt=12);else if(L===Xe.FractionalSeconds)return function Rr(L,ee){return Xn(L,3).substring(0,ee)}(Jt,ee);const cr=ut(Vt,Je.MinusSign);return Xn(Jt,ee,cr,Q,Ve)}}function Ae(L,ee,V=et.Format,Q=!1){return function(Ve,At){return function Tt(L,ee,V,Q,Ve,At){switch(V){case qt.Months:return function pe(L,ee,V){const Q=(0,m.cg1)(L),At=Yn([Q[m.wAp.MonthsFormat],Q[m.wAp.MonthsStandalone]],ee);return Yn(At,V)}(ee,Ve,Q)[L.getMonth()];case qt.Days:return function Mt(L,ee,V){const Q=(0,m.cg1)(L),At=Yn([Q[m.wAp.DaysFormat],Q[m.wAp.DaysStandalone]],ee);return Yn(At,V)}(ee,Ve,Q)[L.getDay()];case qt.DayPeriods:const Vt=L.getHours(),Jt=L.getMinutes();if(At){const gr=function Un(L){const ee=(0,m.cg1)(L);return bt(ee),(ee[m.wAp.ExtraData][2]||[]).map(Q=>"string"==typeof Q?gn(Q):[gn(Q[0]),gn(Q[1])])}(ee),Tr=function ln(L,ee,V){const Q=(0,m.cg1)(L);bt(Q);const At=Yn([Q[m.wAp.ExtraData][0],Q[m.wAp.ExtraData][1]],ee)||[];return Yn(At,V)||[]}(ee,Ve,Q),Zn=gr.findIndex(Lr=>{if(Array.isArray(Lr)){const[or,Dn]=Lr,$r=Vt>=or.hours&&Jt>=or.minutes,li=Vt0?Math.floor(Ve/60):Math.ceil(Ve/60);switch(L){case xt.Short:return(Ve>=0?"+":"")+Xn(Vt,2,At)+Xn(Math.abs(Ve%60),2,At);case xt.ShortGMT:return"GMT"+(Ve>=0?"+":"")+Xn(Vt,1,At);case xt.Long:return"GMT"+(Ve>=0?"+":"")+Xn(Vt,2,At)+":"+Xn(Math.abs(Ve%60),2,At);case xt.Extended:return 0===Q?"Z":(Ve>=0?"+":"")+Xn(Vt,2,At)+":"+Xn(Math.abs(Ve%60),2,At);default:throw new Error(`Unknown zone width "${L}"`)}}}function Qt(L){return Kn(L.getFullYear(),L.getMonth(),L.getDate()+(4-L.getDay()))}function hn(L,ee=!1){return function(V,Q){let Ve;if(ee){const At=new Date(V.getFullYear(),V.getMonth(),1).getDay()-1,Vt=V.getDate();Ve=1+Math.floor((Vt+At)/7)}else{const At=Qt(V),Vt=function rt(L){const ee=Kn(L,0,1).getDay();return Kn(L,0,1+(ee<=4?4:11)-ee)}(At.getFullYear()),Jt=At.getTime()-Vt.getTime();Ve=1+Math.round(Jt/6048e5)}return Xn(Ve,L,ut(Q,Je.MinusSign))}}function fn(L,ee=!1){return function(V,Q){return Xn(Qt(V).getFullYear(),L,ut(Q,Je.MinusSign),ee)}}const Pn={};function Nr(L,ee){L=L.replace(/:/g,"");const V=Date.parse("Jan 01, 1970 00:00:00 "+L)/6e4;return isNaN(V)?ee:V}function Sr(L){return L instanceof Date&&!isNaN(L.valueOf())}const zt=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function Ai(L){const ee=parseInt(L);if(isNaN(ee))throw new Error("Invalid integer literal when parsing "+L);return ee}function ps(L,ee){ee=encodeURIComponent(ee);for(const V of L.split(";")){const Q=V.indexOf("="),[Ve,At]=-1==Q?[V,""]:[V.slice(0,Q),V.slice(Q+1)];if(Ve.trim()===ee)return decodeURIComponent(At)}return null}let gs=(()=>{class L{constructor(V,Q,Ve,At){this._iterableDiffers=V,this._keyValueDiffers=Q,this._ngEl=Ve,this._renderer=At,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(V){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof V?V.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(V){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof V?V.split(/\s+/):V,this._rawClass&&((0,m.sIi)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const V=this._iterableDiffer.diff(this._rawClass);V&&this._applyIterableChanges(V)}else if(this._keyValueDiffer){const V=this._keyValueDiffer.diff(this._rawClass);V&&this._applyKeyValueChanges(V)}}_applyKeyValueChanges(V){V.forEachAddedItem(Q=>this._toggleClass(Q.key,Q.currentValue)),V.forEachChangedItem(Q=>this._toggleClass(Q.key,Q.currentValue)),V.forEachRemovedItem(Q=>{Q.previousValue&&this._toggleClass(Q.key,!1)})}_applyIterableChanges(V){V.forEachAddedItem(Q=>{if("string"!=typeof Q.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${(0,m.AaK)(Q.item)}`);this._toggleClass(Q.item,!0)}),V.forEachRemovedItem(Q=>this._toggleClass(Q.item,!1))}_applyClasses(V){V&&(Array.isArray(V)||V instanceof Set?V.forEach(Q=>this._toggleClass(Q,!0)):Object.keys(V).forEach(Q=>this._toggleClass(Q,!!V[Q])))}_removeClasses(V){V&&(Array.isArray(V)||V instanceof Set?V.forEach(Q=>this._toggleClass(Q,!1)):Object.keys(V).forEach(Q=>this._toggleClass(Q,!1)))}_toggleClass(V,Q){(V=V.trim())&&V.split(/\s+/g).forEach(Ve=>{Q?this._renderer.addClass(this._ngEl.nativeElement,Ve):this._renderer.removeClass(this._ngEl.nativeElement,Ve)})}}return L.\u0275fac=function(V){return new(V||L)(m.Y36(m.ZZ4),m.Y36(m.aQg),m.Y36(m.SBq),m.Y36(m.Qsj))},L.\u0275dir=m.lG2({type:L,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),L})();class Fi{constructor(ee,V,Q,Ve){this.$implicit=ee,this.ngForOf=V,this.index=Q,this.count=Ve}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Li=(()=>{class L{constructor(V,Q,Ve){this._viewContainer=V,this._template=Q,this._differs=Ve,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(V){this._ngForOf=V,this._ngForOfDirty=!0}set ngForTrackBy(V){this._trackByFn=V}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(V){V&&(this._template=V)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const V=this._ngForOf;!this._differ&&V&&(this._differ=this._differs.find(V).create(this.ngForTrackBy))}if(this._differ){const V=this._differ.diff(this._ngForOf);V&&this._applyChanges(V)}}_applyChanges(V){const Q=this._viewContainer;V.forEachOperation((Ve,At,Vt)=>{if(null==Ve.previousIndex)Q.createEmbeddedView(this._template,new Fi(Ve.item,this._ngForOf,-1,-1),null===Vt?void 0:Vt);else if(null==Vt)Q.remove(null===At?void 0:At);else if(null!==At){const Jt=Q.get(At);Q.move(Jt,Vt),ai(Jt,Ve)}});for(let Ve=0,At=Q.length;Ve{ai(Q.get(Ve.currentIndex),Ve)})}static ngTemplateContextGuard(V,Q){return!0}}return L.\u0275fac=function(V){return new(V||L)(m.Y36(m.s_b),m.Y36(m.Rgc),m.Y36(m.ZZ4))},L.\u0275dir=m.lG2({type:L,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),L})();function ai(L,ee){L.context.$implicit=ee.item}let ys=(()=>{class L{constructor(V,Q){this._viewContainer=V,this._context=new mi,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=Q}set ngIf(V){this._context.$implicit=this._context.ngIf=V,this._updateView()}set ngIfThen(V){bi("ngIfThen",V),this._thenTemplateRef=V,this._thenViewRef=null,this._updateView()}set ngIfElse(V){bi("ngIfElse",V),this._elseTemplateRef=V,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(V,Q){return!0}}return L.\u0275fac=function(V){return new(V||L)(m.Y36(m.s_b),m.Y36(m.Rgc))},L.\u0275dir=m.lG2({type:L,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),L})();class mi{constructor(){this.$implicit=null,this.ngIf=null}}function bi(L,ee){if(ee&&!ee.createEmbeddedView)throw new Error(`${L} must be a TemplateRef, but received '${(0,m.AaK)(ee)}'.`)}function ji(L,ee){return new m.vHH(2100,"")}class Ui{createSubscription(ee,V){return ee.subscribe({next:V,error:Q=>{throw Q}})}dispose(ee){ee.unsubscribe()}}class qe{createSubscription(ee,V){return ee.then(V,Q=>{throw Q})}dispose(ee){}}const Le=new qe,ct=new Ui;let Rt=(()=>{class L{constructor(V){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=V}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(V){return this._obj?V!==this._obj?(this._dispose(),this.transform(V)):this._latestValue:(V&&this._subscribe(V),this._latestValue)}_subscribe(V){this._obj=V,this._strategy=this._selectStrategy(V),this._subscription=this._strategy.createSubscription(V,Q=>this._updateLatestValue(V,Q))}_selectStrategy(V){if((0,m.QGY)(V))return Le;if((0,m.F4k)(V))return ct;throw ji()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(V,Q){V===this._obj&&(this._latestValue=Q,this._ref.markForCheck())}}return L.\u0275fac=function(V){return new(V||L)(m.Y36(m.sBO,16))},L.\u0275pipe=m.Yjl({name:"async",type:L,pure:!1}),L})();const Wn=new m.OlP("DATE_PIPE_DEFAULT_TIMEZONE");let Cr=(()=>{class L{constructor(V,Q){this.locale=V,this.defaultTimezone=Q}transform(V,Q="mediumDate",Ve,At){if(null==V||""===V||V!=V)return null;try{return nr(V,Q,At||this.locale,Ve??this.defaultTimezone??void 0)}catch(Vt){throw ji()}}}return L.\u0275fac=function(V){return new(V||L)(m.Y36(m.soG,16),m.Y36(Wn,24))},L.\u0275pipe=m.Yjl({name:"date",type:L,pure:!0}),L})(),Es=(()=>{class L{constructor(V){this._locale=V}transform(V,Q,Ve){if(!function qs(L){return!(null==L||""===L||L!=L)}(V))return null;Ve=Ve||this._locale;try{return function Ji(L,ee,V){return function _r(L,ee,V,Q,Ve,At,Vt=!1){let Jt="",cr=!1;if(isFinite(L)){let gr=function Vr(L){let Q,Ve,At,Vt,Jt,ee=Math.abs(L)+"",V=0;for((Ve=ee.indexOf("."))>-1&&(ee=ee.replace(".","")),(At=ee.search(/e/i))>0?(Ve<0&&(Ve=At),Ve+=+ee.slice(At+1),ee=ee.substring(0,At)):Ve<0&&(Ve=ee.length),At=0;"0"===ee.charAt(At);At++);if(At===(Jt=ee.length))Q=[0],Ve=1;else{for(Jt--;"0"===ee.charAt(Jt);)Jt--;for(Ve-=At,Q=[],Vt=0;At<=Jt;At++,Vt++)Q[Vt]=Number(ee.charAt(At))}return Ve>22&&(Q=Q.splice(0,21),V=Ve-1,Ve=1),{digits:Q,exponent:V,integerLen:Ve}}(L);Vt&&(gr=function wi(L){if(0===L.digits[0])return L;const ee=L.digits.length-L.integerLen;return L.exponent?L.exponent+=2:(0===ee?L.digits.push(0,0):1===ee&&L.digits.push(0),L.integerLen+=2),L}(gr));let Tr=ee.minInt,Zn=ee.minFrac,Lr=ee.maxFrac;if(At){const bs=At.match(zt);if(null===bs)throw new Error(`${At} is not a valid digit info`);const Si=bs[1],Oi=bs[3],so=bs[5];null!=Si&&(Tr=Ai(Si)),null!=Oi&&(Zn=Ai(Oi)),null!=so?Lr=Ai(so):null!=Oi&&Zn>Lr&&(Lr=Zn)}!function ss(L,ee,V){if(ee>V)throw new Error(`The minimum number of digits after fraction (${ee}) is higher than the maximum (${V}).`);let Q=L.digits,Ve=Q.length-L.integerLen;const At=Math.min(Math.max(ee,Ve),V);let Vt=At+L.integerLen,Jt=Q[Vt];if(Vt>0){Q.splice(Math.max(L.integerLen,Vt));for(let Zn=Vt;Zn=5)if(Vt-1<0){for(let Zn=0;Zn>Vt;Zn--)Q.unshift(0),L.integerLen++;Q.unshift(1),L.integerLen++}else Q[Vt-1]++;for(;Ve=gr?Dn.pop():cr=!1),Lr>=10?1:0},0);Tr&&(Q.unshift(Tr),L.integerLen++)}(gr,Zn,Lr);let or=gr.digits,Dn=gr.integerLen;const $r=gr.exponent;let li=[];for(cr=or.every(bs=>!bs);Dn0?li=or.splice(Dn,or.length):(li=or,or=[0]);const as=[];for(or.length>=ee.lgSize&&as.unshift(or.splice(-ee.lgSize,or.length).join(""));or.length>ee.gSize;)as.unshift(or.splice(-ee.gSize,or.length).join(""));or.length&&as.unshift(or.join("")),Jt=as.join(ut(V,Q)),li.length&&(Jt+=ut(V,Ve)+li.join("")),$r&&(Jt+=ut(V,Je.Exponential)+"+"+$r)}else Jt=ut(V,Je.Infinity);return Jt=L<0&&!cr?ee.negPre+Jt+ee.negSuf:ee.posPre+Jt+ee.posSuf,Jt}(L,function ki(L,ee="-"){const V={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},Q=L.split(";"),Ve=Q[0],At=Q[1],Vt=-1!==Ve.indexOf(".")?Ve.split("."):[Ve.substring(0,Ve.lastIndexOf("0")+1),Ve.substring(Ve.lastIndexOf("0")+1)],Jt=Vt[0],cr=Vt[1]||"";V.posPre=Jt.substring(0,Jt.indexOf("#"));for(let Tr=0;Tr{class L{}return L.\u0275fac=function(V){return new(V||L)},L.\u0275mod=m.oAB({type:L}),L.\u0275inj=m.cJS({}),L})();const ks="browser";function Fs(L){return L===ks}function Ki(L){return"server"===L}let yi=(()=>{class L{}return L.\u0275prov=(0,m.Yz7)({token:L,providedIn:"root",factory:()=>new os((0,m.LFG)(fe),window)}),L})();class os{constructor(ee,V){this.document=ee,this.window=V,this.offset=()=>[0,0]}setOffset(ee){this.offset=Array.isArray(ee)?()=>ee:ee}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(ee){this.supportsScrolling()&&this.window.scrollTo(ee[0],ee[1])}scrollToAnchor(ee){if(!this.supportsScrolling())return;const V=function xi(L,ee){const V=L.getElementById(ee)||L.getElementsByName(ee)[0];if(V)return V;if("function"==typeof L.createTreeWalker&&L.body&&(L.body.createShadowRoot||L.body.attachShadow)){const Q=L.createTreeWalker(L.body,NodeFilter.SHOW_ELEMENT);let Ve=Q.currentNode;for(;Ve;){const At=Ve.shadowRoot;if(At){const Vt=At.getElementById(ee)||At.querySelector(`[name="${ee}"]`);if(Vt)return Vt}Ve=Q.nextNode()}}return null}(this.document,ee);V&&(this.scrollToElement(V),V.focus())}setHistoryScrollRestoration(ee){if(this.supportScrollRestoration()){const V=this.window.history;V&&V.scrollRestoration&&(V.scrollRestoration=ee)}}scrollToElement(ee){const V=ee.getBoundingClientRect(),Q=V.left+this.window.pageXOffset,Ve=V.top+this.window.pageYOffset,At=this.offset();this.window.scrollTo(Q-At[0],Ve-At[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const ee=ir(this.window.history)||ir(Object.getPrototypeOf(this.window.history));return!(!ee||!ee.writable&&!ee.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function ir(L){return Object.getOwnPropertyDescriptor(L,"scrollRestoration")}class sr{}},529:(Wt,je,S)=>{S.d(je,{JF:()=>Ti,eN:()=>Je});var m=S(6895),g=S(4650),K=S(9646),ae=S(8306),oe=S(4351),_e=S(9300),fe=S(4004);class ge{}class he{}class ie{constructor(Be){this.normalizedNames=new Map,this.lazyUpdate=null,Be?this.lazyInit="string"==typeof Be?()=>{this.headers=new Map,Be.split("\n").forEach(Ge=>{const xt=Ge.indexOf(":");if(xt>0){const Xe=Ge.slice(0,xt),qt=Xe.toLowerCase(),nr=Ge.slice(xt+1).trim();this.maybeSetNormalizedName(Xe,qt),this.headers.has(qt)?this.headers.get(qt).push(nr):this.headers.set(qt,[nr])}})}:()=>{this.headers=new Map,Object.keys(Be).forEach(Ge=>{let xt=Be[Ge];const Xe=Ge.toLowerCase();"string"==typeof xt&&(xt=[xt]),xt.length>0&&(this.headers.set(Xe,xt),this.maybeSetNormalizedName(Ge,Xe))})}:this.headers=new Map}has(Be){return this.init(),this.headers.has(Be.toLowerCase())}get(Be){this.init();const Ge=this.headers.get(Be.toLowerCase());return Ge&&Ge.length>0?Ge[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(Be){return this.init(),this.headers.get(Be.toLowerCase())||null}append(Be,Ge){return this.clone({name:Be,value:Ge,op:"a"})}set(Be,Ge){return this.clone({name:Be,value:Ge,op:"s"})}delete(Be,Ge){return this.clone({name:Be,value:Ge,op:"d"})}maybeSetNormalizedName(Be,Ge){this.normalizedNames.has(Ge)||this.normalizedNames.set(Ge,Be)}init(){this.lazyInit&&(this.lazyInit instanceof ie?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(Be=>this.applyUpdate(Be)),this.lazyUpdate=null))}copyFrom(Be){Be.init(),Array.from(Be.headers.keys()).forEach(Ge=>{this.headers.set(Ge,Be.headers.get(Ge)),this.normalizedNames.set(Ge,Be.normalizedNames.get(Ge))})}clone(Be){const Ge=new ie;return Ge.lazyInit=this.lazyInit&&this.lazyInit instanceof ie?this.lazyInit:this,Ge.lazyUpdate=(this.lazyUpdate||[]).concat([Be]),Ge}applyUpdate(Be){const Ge=Be.name.toLowerCase();switch(Be.op){case"a":case"s":let xt=Be.value;if("string"==typeof xt&&(xt=[xt]),0===xt.length)return;this.maybeSetNormalizedName(Be.name,Ge);const Xe=("a"===Be.op?this.headers.get(Ge):void 0)||[];Xe.push(...xt),this.headers.set(Ge,Xe);break;case"d":const qt=Be.value;if(qt){let nr=this.headers.get(Ge);if(!nr)return;nr=nr.filter(Kn=>-1===qt.indexOf(Kn)),0===nr.length?(this.headers.delete(Ge),this.normalizedNames.delete(Ge)):this.headers.set(Ge,nr)}else this.headers.delete(Ge),this.normalizedNames.delete(Ge)}}forEach(Be){this.init(),Array.from(this.normalizedNames.keys()).forEach(Ge=>Be(this.normalizedNames.get(Ge),this.headers.get(Ge)))}}class ce{encodeKey(Be){return Ye(Be)}encodeValue(Be){return Ye(Be)}decodeKey(Be){return decodeURIComponent(Be)}decodeValue(Be){return decodeURIComponent(Be)}}const it=/%(\d[a-f0-9])/gi,Ke={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Ye(Ct){return encodeURIComponent(Ct).replace(it,(Be,Ge)=>Ke[Ge]??Be)}function ht(Ct){return`${Ct}`}class Ze{constructor(Be={}){if(this.updates=null,this.cloneFrom=null,this.encoder=Be.encoder||new ce,Be.fromString){if(Be.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function me(Ct,Be){const Ge=new Map;return Ct.length>0&&Ct.replace(/^\?/,"").split("&").forEach(Xe=>{const qt=Xe.indexOf("="),[nr,Kn]=-1==qt?[Be.decodeKey(Xe),""]:[Be.decodeKey(Xe.slice(0,qt)),Be.decodeValue(Xe.slice(qt+1))],Ut=Ge.get(nr)||[];Ut.push(Kn),Ge.set(nr,Ut)}),Ge}(Be.fromString,this.encoder)}else Be.fromObject?(this.map=new Map,Object.keys(Be.fromObject).forEach(Ge=>{const xt=Be.fromObject[Ge],Xe=Array.isArray(xt)?xt.map(ht):[ht(xt)];this.map.set(Ge,Xe)})):this.map=null}has(Be){return this.init(),this.map.has(Be)}get(Be){this.init();const Ge=this.map.get(Be);return Ge?Ge[0]:null}getAll(Be){return this.init(),this.map.get(Be)||null}keys(){return this.init(),Array.from(this.map.keys())}append(Be,Ge){return this.clone({param:Be,value:Ge,op:"a"})}appendAll(Be){const Ge=[];return Object.keys(Be).forEach(xt=>{const Xe=Be[xt];Array.isArray(Xe)?Xe.forEach(qt=>{Ge.push({param:xt,value:qt,op:"a"})}):Ge.push({param:xt,value:Xe,op:"a"})}),this.clone(Ge)}set(Be,Ge){return this.clone({param:Be,value:Ge,op:"s"})}delete(Be,Ge){return this.clone({param:Be,value:Ge,op:"d"})}toString(){return this.init(),this.keys().map(Be=>{const Ge=this.encoder.encodeKey(Be);return this.map.get(Be).map(xt=>Ge+"="+this.encoder.encodeValue(xt)).join("&")}).filter(Be=>""!==Be).join("&")}clone(Be){const Ge=new Ze({encoder:this.encoder});return Ge.cloneFrom=this.cloneFrom||this,Ge.updates=(this.updates||[]).concat(Be),Ge}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(Be=>this.map.set(Be,this.cloneFrom.map.get(Be))),this.updates.forEach(Be=>{switch(Be.op){case"a":case"s":const Ge=("a"===Be.op?this.map.get(Be.param):void 0)||[];Ge.push(ht(Be.value)),this.map.set(Be.param,Ge);break;case"d":if(void 0===Be.value){this.map.delete(Be.param);break}{let xt=this.map.get(Be.param)||[];const Xe=xt.indexOf(ht(Be.value));-1!==Xe&&xt.splice(Xe,1),xt.length>0?this.map.set(Be.param,xt):this.map.delete(Be.param)}}}),this.cloneFrom=this.updates=null)}}class Ee{constructor(){this.map=new Map}set(Be,Ge){return this.map.set(Be,Ge),this}get(Be){return this.map.has(Be)||this.map.set(Be,Be.defaultValue()),this.map.get(Be)}delete(Be){return this.map.delete(Be),this}has(Be){return this.map.has(Be)}keys(){return this.map.keys()}}function ot(Ct){return typeof ArrayBuffer<"u"&&Ct instanceof ArrayBuffer}function Ne(Ct){return typeof Blob<"u"&&Ct instanceof Blob}function xe(Ct){return typeof FormData<"u"&&Ct instanceof FormData}class Lt{constructor(Be,Ge,xt,Xe){let qt;if(this.url=Ge,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=Be.toUpperCase(),function kt(Ct){switch(Ct){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||Xe?(this.body=void 0!==xt?xt:null,qt=Xe):qt=xt,qt&&(this.reportProgress=!!qt.reportProgress,this.withCredentials=!!qt.withCredentials,qt.responseType&&(this.responseType=qt.responseType),qt.headers&&(this.headers=qt.headers),qt.context&&(this.context=qt.context),qt.params&&(this.params=qt.params)),this.headers||(this.headers=new ie),this.context||(this.context=new Ee),this.params){const nr=this.params.toString();if(0===nr.length)this.urlWithParams=Ge;else{const Kn=Ge.indexOf("?");this.urlWithParams=Ge+(-1===Kn?"?":KnRr.set(Me,Be.setHeaders[Me]),Ut)),Be.setParams&&(mn=Object.keys(Be.setParams).reduce((Rr,Me)=>Rr.set(Me,Be.setParams[Me]),mn)),new Lt(Ge,xt,qt,{params:mn,headers:Ut,context:Xn,reportProgress:Kn,responseType:Xe,withCredentials:nr})}}var Se=(()=>((Se=Se||{})[Se.Sent=0]="Sent",Se[Se.UploadProgress=1]="UploadProgress",Se[Se.ResponseHeader=2]="ResponseHeader",Se[Se.DownloadProgress=3]="DownloadProgress",Se[Se.Response=4]="Response",Se[Se.User=5]="User",Se))();class Ie{constructor(Be,Ge=200,xt="OK"){this.headers=Be.headers||new ie,this.status=void 0!==Be.status?Be.status:Ge,this.statusText=Be.statusText||xt,this.url=Be.url||null,this.ok=this.status>=200&&this.status<300}}class Ce extends Ie{constructor(Be={}){super(Be),this.type=Se.ResponseHeader}clone(Be={}){return new Ce({headers:Be.headers||this.headers,status:void 0!==Be.status?Be.status:this.status,statusText:Be.statusText||this.statusText,url:Be.url||this.url||void 0})}}class et extends Ie{constructor(Be={}){super(Be),this.type=Se.Response,this.body=void 0!==Be.body?Be.body:null}clone(Be={}){return new et({body:void 0!==Be.body?Be.body:this.body,headers:Be.headers||this.headers,status:void 0!==Be.status?Be.status:this.status,statusText:Be.statusText||this.statusText,url:Be.url||this.url||void 0})}}class lt extends Ie{constructor(Be){super(Be,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${Be.url||"(unknown url)"}`:`Http failure response for ${Be.url||"(unknown url)"}: ${Be.status} ${Be.statusText}`,this.error=Be.error||null}}function at(Ct,Be){return{body:Be,headers:Ct.headers,context:Ct.context,observe:Ct.observe,params:Ct.params,reportProgress:Ct.reportProgress,responseType:Ct.responseType,withCredentials:Ct.withCredentials}}let Je=(()=>{class Ct{constructor(Ge){this.handler=Ge}request(Ge,xt,Xe={}){let qt;if(Ge instanceof Lt)qt=Ge;else{let Ut,mn;Ut=Xe.headers instanceof ie?Xe.headers:new ie(Xe.headers),Xe.params&&(mn=Xe.params instanceof Ze?Xe.params:new Ze({fromObject:Xe.params})),qt=new Lt(Ge,xt,void 0!==Xe.body?Xe.body:null,{headers:Ut,context:Xe.context,params:mn,reportProgress:Xe.reportProgress,responseType:Xe.responseType||"json",withCredentials:Xe.withCredentials})}const nr=(0,K.of)(qt).pipe((0,oe.b)(Ut=>this.handler.handle(Ut)));if(Ge instanceof Lt||"events"===Xe.observe)return nr;const Kn=nr.pipe((0,_e.h)(Ut=>Ut instanceof et));switch(Xe.observe||"body"){case"body":switch(qt.responseType){case"arraybuffer":return Kn.pipe((0,fe.U)(Ut=>{if(null!==Ut.body&&!(Ut.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return Ut.body}));case"blob":return Kn.pipe((0,fe.U)(Ut=>{if(null!==Ut.body&&!(Ut.body instanceof Blob))throw new Error("Response is not a Blob.");return Ut.body}));case"text":return Kn.pipe((0,fe.U)(Ut=>{if(null!==Ut.body&&"string"!=typeof Ut.body)throw new Error("Response is not a string.");return Ut.body}));default:return Kn.pipe((0,fe.U)(Ut=>Ut.body))}case"response":return Kn;default:throw new Error(`Unreachable: unhandled observe type ${Xe.observe}}`)}}delete(Ge,xt={}){return this.request("DELETE",Ge,xt)}get(Ge,xt={}){return this.request("GET",Ge,xt)}head(Ge,xt={}){return this.request("HEAD",Ge,xt)}jsonp(Ge,xt){return this.request("JSONP",Ge,{params:(new Ze).append(xt,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(Ge,xt={}){return this.request("OPTIONS",Ge,xt)}patch(Ge,xt,Xe={}){return this.request("PATCH",Ge,at(Xe,xt))}post(Ge,xt,Xe={}){return this.request("POST",Ge,at(Xe,xt))}put(Ge,xt,Xe={}){return this.request("PUT",Ge,at(Xe,xt))}}return Ct.\u0275fac=function(Ge){return new(Ge||Ct)(g.LFG(ge))},Ct.\u0275prov=g.Yz7({token:Ct,factory:Ct.\u0275fac}),Ct})();class pn{constructor(Be,Ge){this.next=Be,this.interceptor=Ge}handle(Be){return this.interceptor.intercept(Be,this.next)}}const Tn=new g.OlP("HTTP_INTERCEPTORS");let St=(()=>{class Ct{intercept(Ge,xt){return xt.handle(Ge)}}return Ct.\u0275fac=function(Ge){return new(Ge||Ct)},Ct.\u0275prov=g.Yz7({token:Ct,factory:Ct.\u0275fac}),Ct})();const Kt=/^\)\]\}',?\n/;let Zt=(()=>{class Ct{constructor(Ge){this.xhrFactory=Ge}handle(Ge){if("JSONP"===Ge.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new ae.y(xt=>{const Xe=this.xhrFactory.build();if(Xe.open(Ge.method,Ge.urlWithParams),Ge.withCredentials&&(Xe.withCredentials=!0),Ge.headers.forEach((we,Ae)=>Xe.setRequestHeader(we,Ae.join(","))),Ge.headers.has("Accept")||Xe.setRequestHeader("Accept","application/json, text/plain, */*"),!Ge.headers.has("Content-Type")){const we=Ge.detectContentTypeHeader();null!==we&&Xe.setRequestHeader("Content-Type",we)}if(Ge.responseType){const we=Ge.responseType.toLowerCase();Xe.responseType="json"!==we?we:"text"}const qt=Ge.serializeBody();let nr=null;const Kn=()=>{if(null!==nr)return nr;const we=Xe.statusText||"OK",Ae=new ie(Xe.getAllResponseHeaders()),Tt=function Ht(Ct){return"responseURL"in Ct&&Ct.responseURL?Ct.responseURL:/^X-Request-URL:/m.test(Ct.getAllResponseHeaders())?Ct.getResponseHeader("X-Request-URL"):null}(Xe)||Ge.url;return nr=new Ce({headers:Ae,status:Xe.status,statusText:we,url:Tt}),nr},Ut=()=>{let{headers:we,status:Ae,statusText:Tt,url:se}=Kn(),J=null;204!==Ae&&(J=typeof Xe.response>"u"?Xe.responseText:Xe.response),0===Ae&&(Ae=J?200:0);let le=Ae>=200&&Ae<300;if("json"===Ge.responseType&&"string"==typeof J){const rt=J;J=J.replace(Kt,"");try{J=""!==J?JSON.parse(J):null}catch(Qt){J=rt,le&&(le=!1,J={error:Qt,text:J})}}le?(xt.next(new et({body:J,headers:we,status:Ae,statusText:Tt,url:se||void 0})),xt.complete()):xt.error(new lt({error:J,headers:we,status:Ae,statusText:Tt,url:se||void 0}))},mn=we=>{const{url:Ae}=Kn(),Tt=new lt({error:we,status:Xe.status||0,statusText:Xe.statusText||"Unknown Error",url:Ae||void 0});xt.error(Tt)};let Xn=!1;const Rr=we=>{Xn||(xt.next(Kn()),Xn=!0);let Ae={type:Se.DownloadProgress,loaded:we.loaded};we.lengthComputable&&(Ae.total=we.total),"text"===Ge.responseType&&!!Xe.responseText&&(Ae.partialText=Xe.responseText),xt.next(Ae)},Me=we=>{let Ae={type:Se.UploadProgress,loaded:we.loaded};we.lengthComputable&&(Ae.total=we.total),xt.next(Ae)};return Xe.addEventListener("load",Ut),Xe.addEventListener("error",mn),Xe.addEventListener("timeout",mn),Xe.addEventListener("abort",mn),Ge.reportProgress&&(Xe.addEventListener("progress",Rr),null!==qt&&Xe.upload&&Xe.upload.addEventListener("progress",Me)),Xe.send(qt),xt.next({type:Se.Sent}),()=>{Xe.removeEventListener("error",mn),Xe.removeEventListener("abort",mn),Xe.removeEventListener("load",Ut),Xe.removeEventListener("timeout",mn),Ge.reportProgress&&(Xe.removeEventListener("progress",Rr),null!==qt&&Xe.upload&&Xe.upload.removeEventListener("progress",Me)),Xe.readyState!==Xe.DONE&&Xe.abort()}})}}return Ct.\u0275fac=function(Ge){return new(Ge||Ct)(g.LFG(m.JF))},Ct.\u0275prov=g.Yz7({token:Ct,factory:Ct.\u0275fac}),Ct})();const wn=new g.OlP("XSRF_COOKIE_NAME"),er=new g.OlP("XSRF_HEADER_NAME");class Jn{}let bt=(()=>{class Ct{constructor(Ge,xt,Xe){this.doc=Ge,this.platform=xt,this.cookieName=Xe,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const Ge=this.doc.cookie||"";return Ge!==this.lastCookieString&&(this.parseCount++,this.lastToken=(0,m.Mx)(Ge,this.cookieName),this.lastCookieString=Ge),this.lastToken}}return Ct.\u0275fac=function(Ge){return new(Ge||Ct)(g.LFG(m.K0),g.LFG(g.Lbi),g.LFG(wn))},Ct.\u0275prov=g.Yz7({token:Ct,factory:Ct.\u0275fac}),Ct})(),Un=(()=>{class Ct{constructor(Ge,xt){this.tokenService=Ge,this.headerName=xt}intercept(Ge,xt){const Xe=Ge.url.toLowerCase();if("GET"===Ge.method||"HEAD"===Ge.method||Xe.startsWith("http://")||Xe.startsWith("https://"))return xt.handle(Ge);const qt=this.tokenService.getToken();return null!==qt&&!Ge.headers.has(this.headerName)&&(Ge=Ge.clone({headers:Ge.headers.set(this.headerName,qt)})),xt.handle(Ge)}}return Ct.\u0275fac=function(Ge){return new(Ge||Ct)(g.LFG(Jn),g.LFG(er))},Ct.\u0275prov=g.Yz7({token:Ct,factory:Ct.\u0275fac}),Ct})(),ln=(()=>{class Ct{constructor(Ge,xt){this.backend=Ge,this.injector=xt,this.chain=null}handle(Ge){if(null===this.chain){const xt=this.injector.get(Tn,[]);this.chain=xt.reduceRight((Xe,qt)=>new pn(Xe,qt),this.backend)}return this.chain.handle(Ge)}}return Ct.\u0275fac=function(Ge){return new(Ge||Ct)(g.LFG(he),g.LFG(g.zs3))},Ct.\u0275prov=g.Yz7({token:Ct,factory:Ct.\u0275fac}),Ct})(),gn=(()=>{class Ct{static disable(){return{ngModule:Ct,providers:[{provide:Un,useClass:St}]}}static withOptions(Ge={}){return{ngModule:Ct,providers:[Ge.cookieName?{provide:wn,useValue:Ge.cookieName}:[],Ge.headerName?{provide:er,useValue:Ge.headerName}:[]]}}}return Ct.\u0275fac=function(Ge){return new(Ge||Ct)},Ct.\u0275mod=g.oAB({type:Ct}),Ct.\u0275inj=g.cJS({providers:[Un,{provide:Tn,useExisting:Un,multi:!0},{provide:Jn,useClass:bt},{provide:wn,useValue:"XSRF-TOKEN"},{provide:er,useValue:"X-XSRF-TOKEN"}]}),Ct})(),Ti=(()=>{class Ct{}return Ct.\u0275fac=function(Ge){return new(Ge||Ct)},Ct.\u0275mod=g.oAB({type:Ct}),Ct.\u0275inj=g.cJS({providers:[Je,{provide:ge,useClass:ln},Zt,{provide:he,useExisting:Zt}],imports:[gn.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]}),Ct})()},4650:(Wt,je,S)=>{S.d(je,{$8M:()=>Gs,$Z:()=>Nc,AFp:()=>L0,ALo:()=>n0,AaK:()=>ge,AsE:()=>qf,BQk:()=>ph,CHM:()=>X,CRH:()=>p0,CZH:()=>Yy,CqO:()=>zf,D6c:()=>XD,DdM:()=>ZE,EJc:()=>pD,EiD:()=>za,EpF:()=>bg,F$t:()=>Fu,F4k:()=>Gf,FYo:()=>HE,FiY:()=>Vs,G48:()=>kD,Gf:()=>h0,GfV:()=>GE,Gpc:()=>ce,Hsn:()=>Qc,JOm:()=>xa,JVY:()=>Sl,Jf7:()=>Gh,KtG:()=>gt,L6k:()=>Mh,LAX:()=>fd,LFG:()=>Vn,LSH:()=>bd,Lbi:()=>cD,MAs:()=>fh,MGl:()=>Wf,MMx:()=>wv,NdJ:()=>Dg,O4$:()=>_u,OlP:()=>qr,Oqu:()=>Ug,PXZ:()=>SD,Q6J:()=>nc,QGY:()=>Hf,QP$:()=>np,QbO:()=>dD,Qsj:()=>ib,R0b:()=>mu,RDi:()=>Uo,Rgc:()=>tm,SBq:()=>Qg,Sil:()=>mD,Suo:()=>f0,TTD:()=>Es,TgZ:()=>jf,Udp:()=>nl,VKq:()=>qE,WLB:()=>YE,X6Q:()=>ND,XFs:()=>ln,Xpm:()=>se,Y36:()=>Qu,YKP:()=>jE,YNc:()=>gy,Yjl:()=>Nr,Yz7:()=>It,ZZ4:()=>Gv,_Bn:()=>UE,_UZ:()=>Eg,_Vd:()=>Yg,_c5:()=>QD,_uU:()=>My,aQg:()=>zv,c2e:()=>hD,cJS:()=>nt,cg1:()=>Jf,dDg:()=>ID,deG:()=>tu,dqk:()=>Xe,eBb:()=>Ml,eFA:()=>q0,ekj:()=>Ng,eoX:()=>z0,evT:()=>hl,f3M:()=>mr,g9A:()=>U0,h0i:()=>Dh,hGG:()=>JD,hM9:()=>fb,hij:()=>td,iGM:()=>d0,ifc:()=>xt,ip1:()=>F0,kL8:()=>jy,kYT:()=>fn,lG2:()=>Pr,lcZ:()=>r0,lqb:()=>Zl,lri:()=>H0,mCW:()=>xl,n5z:()=>An,oAB:()=>hn,oxw:()=>mh,pB0:()=>xh,q3G:()=>ds,q4F:()=>zE,qLn:()=>au,qOj:()=>Kr,qZA:()=>$f,qzn:()=>ho,rWj:()=>G0,s9C:()=>Lu,sBO:()=>FD,sIi:()=>$c,s_b:()=>Wy,soG:()=>Qy,tBr:()=>ls,tb:()=>B0,tp0:()=>bn,uIk:()=>mg,vHH:()=>Ye,vpe:()=>Dl,wAp:()=>rr,xi3:()=>s0,xp6:()=>Ld,yhl:()=>hd,ynx:()=>qc,z2F:()=>Jy,z3N:()=>Go,zSh:()=>Mp,zs3:()=>Ou});var m=S(7579),g=S(727),K=S(8306),ae=S(6451),oe=S(3099);function _e(n){for(let r in n)if(n[r]===_e)return r;throw Error("Could not find renamed property on target object.")}function fe(n,r){for(const s in r)r.hasOwnProperty(s)&&!n.hasOwnProperty(s)&&(n[s]=r[s])}function ge(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(ge).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const r=n.toString();if(null==r)return""+r;const s=r.indexOf("\n");return-1===s?r:r.substring(0,s)}function he(n,r){return null==n||""===n?null===r?"":r:null==r||""===r?n:n+" "+r}const ie=_e({__forward_ref__:_e});function ce(n){return n.__forward_ref__=ce,n.toString=function(){return ge(this())},n}function me(n){return it(n)?n():n}function it(n){return"function"==typeof n&&n.hasOwnProperty(ie)&&n.__forward_ref__===ce}class Ye extends Error{constructor(r,s){super(function ht(n,r){return`NG0${Math.abs(n)}${r?": "+r.trim():""}`}(r,s)),this.code=r}}function Ze(n){return"string"==typeof n?n:null==n?"":String(n)}function Ne(n,r){throw new Ye(-201,!1)}function Mt(n,r){null==n&&function pe(n,r,s,a){throw new Error(`ASSERTION ERROR: ${n}`+(null==a?"":` [Expected=> ${s} ${a} ${r} <=Actual]`))}(r,n,null,"!=")}function It(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function nt(n){return{providers:n.providers||[],imports:n.imports||[]}}function ut(n){return Kt(n,er)||Kt(n,bt)}function Kt(n,r){return n.hasOwnProperty(r)?n[r]:null}function wn(n){return n&&(n.hasOwnProperty(Jn)||n.hasOwnProperty(Un))?n[Jn]:null}const er=_e({\u0275prov:_e}),Jn=_e({\u0275inj:_e}),bt=_e({ngInjectableDef:_e}),Un=_e({ngInjectorDef:_e});var ln=(()=>((ln=ln||{})[ln.Default=0]="Default",ln[ln.Host=1]="Host",ln[ln.Self=2]="Self",ln[ln.SkipSelf=4]="SkipSelf",ln[ln.Optional=8]="Optional",ln))();let yr;function gn(n){const r=yr;return yr=n,r}function Ti(n,r,s){const a=ut(n);return a&&"root"==a.providedIn?void 0===a.value?a.value=a.factory():a.value:s&ln.Optional?null:void 0!==r?r:void Ne(ge(n))}function Or(n){return{toString:n}.toString()}var Ct=(()=>((Ct=Ct||{})[Ct.OnPush=0]="OnPush",Ct[Ct.Default=1]="Default",Ct))(),xt=(()=>{return(n=xt||(xt={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",xt;var n})();const Xe=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Kn={},Ut=[],mn=_e({\u0275cmp:_e}),Xn=_e({\u0275dir:_e}),Rr=_e({\u0275pipe:_e}),Me=_e({\u0275mod:_e}),we=_e({\u0275fac:_e}),Ae=_e({__NG_ELEMENT_ID__:_e});let Tt=0;function se(n){return Or(()=>{const s=!0===n.standalone,a={},l={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:a,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===Ct.OnPush,directiveDefs:null,pipeDefs:null,standalone:s,dependencies:s&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||Ut,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||xt.Emulated,id:"c"+Tt++,styles:n.styles||Ut,_:null,setInput:null,schemas:n.schemas||null,tView:null},f=n.dependencies,E=n.features;return l.inputs=Pn(n.inputs,a),l.outputs=Pn(n.outputs),E&&E.forEach(C=>C(l)),l.directiveDefs=f?()=>("function"==typeof f?f():f).map(le).filter(rt):null,l.pipeDefs=f?()=>("function"==typeof f?f():f).map(jr).filter(rt):null,l})}function le(n){return jn(n)||kr(n)}function rt(n){return null!==n}const Qt={};function hn(n){return Or(()=>{const r={type:n.type,bootstrap:n.bootstrap||Ut,declarations:n.declarations||Ut,imports:n.imports||Ut,exports:n.exports||Ut,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(Qt[n.id]=n.type),r})}function fn(n,r){return Or(()=>{const s=Fr(n,!0);s.declarations=r.declarations||Ut,s.imports=r.imports||Ut,s.exports=r.exports||Ut})}function Pn(n,r){if(null==n)return Kn;const s={};for(const a in n)if(n.hasOwnProperty(a)){let l=n[a],f=l;Array.isArray(l)&&(f=l[1],l=l[0]),s[l]=a,r&&(r[l]=f)}return s}const Pr=se;function Nr(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function jn(n){return n[mn]||null}function kr(n){return n[Xn]||null}function jr(n){return n[Rr]||null}function Fr(n,r){const s=n[Me]||null;if(!s&&!0===r)throw new Error(`Type ${ge(n)} does not have '\u0275mod' property.`);return s}function mi(n){return Array.isArray(n)&&"object"==typeof n[1]}function bi(n){return Array.isArray(n)&&!0===n[1]}function Us(n){return 0!=(8&n.flags)}function _s(n){return 2==(2&n.flags)}function xs(n){return 1==(1&n.flags)}function Vi(n){return null!==n.template}function xr(n){return 0!=(256&n[2])}function Xi(n,r){return n.hasOwnProperty(we)?n[we]:null}class Gi{constructor(r,s,a){this.previousValue=r,this.currentValue=s,this.firstChange=a}isFirstChange(){return this.firstChange}}function Es(){return io}function io(n){return n.type.prototype.ngOnChanges&&(n.setInput=qs),_o}function _o(){const n=ws(this),r=n?.current;if(r){const s=n.previous;if(s===Kn)n.previous=r;else for(let a in r)s[a]=r[a];n.current=null,this.ngOnChanges(r)}}function qs(n,r,s,a){const l=ws(n)||function Ps(n,r){return n[Rs]=r}(n,{previous:Kn,current:null}),f=l.current||(l.current={}),E=l.previous,C=this.declaredInputs[s],R=E[C];f[C]=new Gi(R&&R.currentValue,r,E===Kn),n[a]=r}Es.ngInherit=!0;const Rs="__ngSimpleChanges__";function ws(n){return n[Rs]||null}let Qr;function Uo(n){Qr=n}function ir(n){return!!n.listen}const xi={createRenderer:(n,r)=>function yi(){return void 0!==Qr?Qr:typeof document<"u"?document:void 0}()};function sr(n){for(;Array.isArray(n);)n=n[0];return n}function V(n,r){return sr(r[n])}function Q(n,r){return sr(r[n.index])}function At(n,r){return n.data[r]}function Vt(n,r){return n[r]}function Jt(n,r){const s=r[n];return mi(s)?s:s[0]}function cr(n){return 4==(4&n[2])}function gr(n){return 64==(64&n[2])}function Zn(n,r){return null==r?null:n[r]}function Lr(n){n[18]=0}function or(n,r){n[5]+=r;let s=n,a=n[3];for(;null!==a&&(1===r&&1===s[5]||-1===r&&0===s[5]);)a[5]+=r,s=a,a=a[3]}const Dn={lFrame:Ys(null),bindingsEnabled:!0};function Oi(){return Dn.bindingsEnabled}function O(){return Dn.lFrame.lView}function P(){return Dn.lFrame.tView}function X(n){return Dn.lFrame.contextLView=n,n[8]}function gt(n){return Dn.lFrame.contextLView=null,n}function un(){let n=Br();for(;null!==n&&64===n.type;)n=n.parent;return n}function Br(){return Dn.lFrame.currentTNode}function ri(n,r){const s=Dn.lFrame;s.currentTNode=n,s.isParent=r}function js(){return Dn.lFrame.isParent}function Ko(){Dn.lFrame.isParent=!1}function Pt(){const n=Dn.lFrame;let r=n.bindingRootIndex;return-1===r&&(r=n.bindingRootIndex=n.tView.bindingStartIndex),r}function br(){return Dn.lFrame.bindingIndex++}function di(n){const r=Dn.lFrame,s=r.bindingIndex;return r.bindingIndex=r.bindingIndex+n,s}function Wo(n,r){const s=Dn.lFrame;s.bindingIndex=s.bindingRootIndex=n,$s(r)}function $s(n){Dn.lFrame.currentDirectiveIndex=n}function Zo(){return Dn.lFrame.currentQueryIndex}function Bo(n){Dn.lFrame.currentQueryIndex=n}function Ea(n){const r=n[1];return 2===r.type?r.declTNode:1===r.type?n[6]:null}function qo(n,r,s){if(s&ln.SkipSelf){let l=r,f=n;for(;!(l=l.parent,null!==l||s&ln.Host||(l=Ea(f),null===l||(f=f[15],10&l.type))););if(null===l)return!1;r=l,n=f}const a=Dn.lFrame=wa();return a.currentTNode=r,a.lView=n,!0}function oo(n){const r=wa(),s=n[1];Dn.lFrame=r,r.currentTNode=s.firstChild,r.lView=n,r.tView=s,r.contextLView=n,r.bindingIndex=s.bindingStartIndex,r.inI18n=!1}function wa(){const n=Dn.lFrame,r=null===n?null:n.child;return null===r?Ys(n):r}function Ys(n){const r={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=r),r}function Yo(){const n=Dn.lFrame;return Dn.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Pa=Yo;function wo(){const n=Yo();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Bi(){return Dn.lFrame.selectedIndex}function Hs(n){Dn.lFrame.selectedIndex=n}function ii(){const n=Dn.lFrame;return At(n.tView,n.selectedIndex)}function _u(){Dn.lFrame.currentNamespace="svg"}function Xo(n,r){for(let s=r.directiveStart,a=r.directiveEnd;s=a)break}else r[R]<0&&(n[18]+=65536),(C>11>16&&(3&n[2])===r){n[2]+=2048;try{f.call(C)}finally{}}}else try{f.call(C)}finally{}}class _i{constructor(r,s,a){this.factory=r,this.resolving=!1,this.canSeeViewProviders=s,this.injectImpl=a}}function Mi(n,r,s){const a=ir(n);let l=0;for(;lr){E=f-1;break}}}for(;f>16}(n),a=r;for(;s>0;)a=a[15],s--;return a}let La=!0;function Io(n){const r=La;return La=n,r}let Va=0;const ao={};function Jr(n,r){const s=Co(n,r);if(-1!==s)return s;const a=r[1];a.firstCreatePass&&(n.injectorIndex=r.length,vi(a.data,n),vi(r,null),vi(a.blueprint,null));const l=_n(n,r),f=n.injectorIndex;if(wu(l)){const E=us(l),C=jo(l,r),R=C[1].data;for(let z=0;z<8;z++)r[f+z]=C[E+z]|R[E+z]}return r[f+8]=l,f}function vi(n,r){n.push(0,0,0,0,0,0,0,0,r)}function Co(n,r){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===r[n.injectorIndex+8]?-1:n.injectorIndex}function _n(n,r){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let s=0,a=null,l=r;for(;null!==l;){if(a=$n(l),null===a)return-1;if(s++,l=l[15],-1!==a.injectorIndex)return a.injectorIndex|s<<16}return-1}function zn(n,r,s){!function Xt(n,r,s){let a;"string"==typeof s?a=s.charCodeAt(0)||0:s.hasOwnProperty(Ae)&&(a=s[Ae]),null==a&&(a=s[Ae]=Va++);const l=255&a;r.data[n+(l>>5)]|=1<=0?255&r:fr:r}(s);if("function"==typeof f){if(!qo(r,n,a))return a&ln.Host?En(l,0,a):b(r,s,a,l);try{const E=f(a);if(null!=E||a&ln.Optional)return E;Ne()}finally{Pa()}}else if("number"==typeof f){let E=null,C=Co(n,r),R=-1,z=a&ln.Host?r[16][6]:null;for((-1===C||a&ln.SkipSelf)&&(R=-1===C?_n(n,r):r[C+8],-1!==R&&Ft(a,!1)?(E=r[1],C=us(R),r=jo(R,r)):C=-1);-1!==C;){const te=r[1];if(Ue(f,C,te.data)){const ye=k(C,r,s,E,a,z);if(ye!==ao)return ye}R=r[C+8],-1!==R&&Ft(a,r[1].data[C+8]===z)&&Ue(f,C,r)?(E=te,C=us(R),r=jo(R,r)):C=-1}}return l}function k(n,r,s,a,l,f){const E=r[1],C=E.data[n+8],te=G(C,E,s,null==a?_s(C)&&La:a!=E&&0!=(3&C.type),l&ln.Host&&f===C);return null!==te?re(r,E,te,C):ao}function G(n,r,s,a,l){const f=n.providerIndexes,E=r.data,C=1048575&f,R=n.directiveStart,te=f>>20,He=l?C+te:n.directiveEnd;for(let dt=a?C:C+te;dt=R&&Gt.type===s)return dt}if(l){const dt=E[R];if(dt&&Vi(dt)&&dt.type===s)return R}return null}function re(n,r,s,a){let l=n[s];const f=r.data;if(function ka(n){return n instanceof _i}(l)){const E=l;E.resolving&&function Ee(n,r){const s=r?`. Dependency path: ${r.join(" > ")} > ${n}`:"";throw new Ye(-200,`Circular dependency in DI detected for ${n}${s}`)}(function Qe(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():Ze(n)}(f[s]));const C=Io(E.canSeeViewProviders);E.resolving=!0;const R=E.injectImpl?gn(E.injectImpl):null;qo(n,a,ln.Default);try{l=n[s]=E.factory(void 0,f,n,a),r.firstCreatePass&&s>=a.directiveStart&&function Jo(n,r,s){const{ngOnChanges:a,ngOnInit:l,ngDoCheck:f}=r.type.prototype;if(a){const E=io(r);(s.preOrderHooks||(s.preOrderHooks=[])).push(n,E),(s.preOrderCheckHooks||(s.preOrderCheckHooks=[])).push(n,E)}l&&(s.preOrderHooks||(s.preOrderHooks=[])).push(0-n,l),f&&((s.preOrderHooks||(s.preOrderHooks=[])).push(n,f),(s.preOrderCheckHooks||(s.preOrderCheckHooks=[])).push(n,f))}(s,f[s],r)}finally{null!==R&&gn(R),Io(C),E.resolving=!1,Pa()}}return l}function Ue(n,r,s){return!!(s[r+(n>>5)]&1<{const r=n.prototype.constructor,s=r[we]||Ar(r),a=Object.prototype;let l=Object.getPrototypeOf(n.prototype).constructor;for(;l&&l!==a;){const f=l[we]||Ar(l);if(f&&f!==s)return f;l=Object.getPrototypeOf(l)}return f=>new f})}function Ar(n){return it(n)?()=>{const r=Ar(me(n));return r&&r()}:Xi(n)}function $n(n){const r=n[1],s=r.type;return 2===s?r.declTNode:1===s?n[6]:null}function Gs(n){return function eu(n,r){if("class"===r)return n.classes;if("style"===r)return n.styles;const s=n.attrs;if(s){const a=s.length;let l=0;for(;l{const a=function dr(n){return function(...s){if(n){const a=n(...s);for(const l in a)this[l]=a[l]}}}(r);function l(...f){if(this instanceof l)return a.apply(this,f),this;const E=new l(...f);return C.annotation=E,C;function C(R,z,te){const ye=R.hasOwnProperty(zr)?R[zr]:Object.defineProperty(R,zr,{value:[]})[zr];for(;ye.length<=te;)ye.push(null);return(ye[te]=ye[te]||[]).push(E),R}}return s&&(l.prototype=Object.create(s.prototype)),l.prototype.ngMetadataName=n,l.annotationCls=l,l})}class qr{constructor(r,s){this._desc=r,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof s?this.__NG_ELEMENT_ID__=s:void 0!==s&&(this.\u0275prov=It({token:this,providedIn:s.providedIn||"root",factory:s.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}const tu=new qr("AnalyzeForEntryComponents");function zs(n,r){void 0===r&&(r=n);for(let s=0;sArray.isArray(s)?Ks(s,r):r(s))}function Ws(n,r,s){r>=n.length?n.push(s):n.splice(r,0,s)}function Ia(n,r){return r>=n.length-1?n.pop():n.splice(r,1)[0]}function uo(n,r){const s=[];for(let a=0;a=0?n[1|a]=s:(a=~a,function fc(n,r,s,a){let l=n.length;if(l==r)n.push(s,a);else if(1===l)n.push(a,n[0]),n[0]=s;else{for(l--,n.push(n[l-1],n[l]);l>r;)n[l]=n[l-2],l--;n[r]=s,n[r+1]=a}}(n,a,r,s)),a}function Ho(n,r){const s=Xr(n,r);if(s>=0)return n[1|s]}function Xr(n,r){return function y(n,r,s){let a=0,l=n.length>>s;for(;l!==a;){const f=a+(l-a>>1),E=n[f<r?l=f:a=f+1}return~(l<({token:n})),-1),Vs=Ii(ga("Optional"),8),bn=Ii(ga("SkipSelf"),4);let ol;function al(n){return function mc(){if(void 0===ol&&(ol=null,Xe.trustedTypes))try{ol=Xe.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return ol}()?.createHTML(n)||n}class iu{constructor(r){this.changingThisBreaksApplicationSecurity=r}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class ul extends iu{getTypeName(){return"HTML"}}class yc extends iu{getTypeName(){return"Style"}}class ld extends iu{getTypeName(){return"Script"}}class cd extends iu{getTypeName(){return"URL"}}class dd extends iu{getTypeName(){return"ResourceURL"}}function Go(n){return n instanceof iu?n.changingThisBreaksApplicationSecurity:n}function ho(n,r){const s=hd(n);if(null!=s&&s!==r){if("ResourceURL"===s&&"URL"===r)return!0;throw new Error(`Required a safe ${r}, got a ${s} (see https://g.co/ng/security#xss)`)}return s===r}function hd(n){return n instanceof iu&&n.getTypeName()||null}function Sl(n){return new ul(n)}function Mh(n){return new yc(n)}function Ml(n){return new ld(n)}function fd(n){return new cd(n)}function xh(n){return new dd(n)}class sp{constructor(r){this.inertDocumentHelper=r}getInertBodyElement(r){r=""+r;try{const s=(new window.DOMParser).parseFromString(al(r),"text/html").body;return null===s?this.inertDocumentHelper.getInertBodyElement(r):(s.removeChild(s.firstChild),s)}catch{return null}}}class Oh{constructor(r){if(this.defaultDoc=r,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const s=this.inertDocument.createElement("html");this.inertDocument.appendChild(s);const a=this.inertDocument.createElement("body");s.appendChild(a)}}getInertBodyElement(r){const s=this.inertDocument.createElement("template");if("content"in s)return s.innerHTML=al(r),s;const a=this.inertDocument.createElement("body");return a.innerHTML=al(r),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(a),a}stripCustomNsAttrs(r){const s=r.attributes;for(let l=s.length-1;0xl(r.trim())).join(", ")),this.buf.push(" ",E,'="',Rl(R),'"')}var n;return this.buf.push(">"),!0}endElement(r){const s=r.nodeName.toLowerCase();Du.hasOwnProperty(s)&&!yd.hasOwnProperty(s)&&(this.buf.push(""))}chars(r){this.buf.push(Rl(r))}checkClobberedElement(r,s){if(s&&(r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${r.outerHTML}`);return s}}const zu=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,lp=/([^\#-~ |!])/g;function Rl(n){return n.replace(/&/g,"&").replace(zu,function(r){return"&#"+(1024*(r.charCodeAt(0)-55296)+(r.charCodeAt(1)-56320)+65536)+";"}).replace(lp,function(r){return"&#"+r.charCodeAt(0)+";"}).replace(//g,">")}let ou;function za(n,r){let s=null;try{ou=ou||function pd(n){const r=new Oh(n);return function gd(){try{return!!(new window.DOMParser).parseFromString(al(""),"text/html")}catch{return!1}}()?new sp(r):r}(n);let a=r?String(r):"";s=ou.getInertBodyElement(a);let l=5,f=a;do{if(0===l)throw new Error("Failed to sanitize html because the input is unstable");l--,a=f,f=s.innerHTML,s=ou.getInertBodyElement(a)}while(a!==f);return al((new up).sanitizeChildren(ll(s)||s))}finally{if(s){const a=ll(s)||s;for(;a.firstChild;)a.removeChild(a.firstChild)}}}function ll(n){return"content"in n&&function Fh(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var ds=(()=>((ds=ds||{})[ds.NONE=0]="NONE",ds[ds.HTML=1]="HTML",ds[ds.STYLE=2]="STYLE",ds[ds.SCRIPT=3]="SCRIPT",ds[ds.URL=4]="URL",ds[ds.RESOURCE_URL=5]="RESOURCE_URL",ds))();function bd(n){const r=function Aa(){const n=O();return n&&n[12]}();return r?r.sanitize(ds.URL,n)||"":ho(n,"URL")?Go(n):xl(Ze(n))}function Ku(n){return n.ngOriginalError}class au{constructor(){this._console=console}handleError(r){const s=this._findOriginalError(r);this._console.error("ERROR",r),s&&this._console.error("ORIGINAL ERROR",s)}_findOriginalError(r){let s=r&&Ku(r);for(;s&&Ku(s);)s=Ku(s);return s||null}}const Ec=new Map;let Cd=0;const wc="__ngContext__";function to(n,r){mi(r)?(n[wc]=r[20],function fp(n){Ec.set(n[20],n)}(r)):n[wc]=r}function hs(n){const r=n[wc];return"number"==typeof r?function Td(n){return Ec.get(n)||null}(r):r||null}function po(n){const r=hs(n);return r?mi(r)?r:r.lView:null}const Hh=(()=>(typeof requestAnimationFrame<"u"&&requestAnimationFrame||setTimeout).bind(Xe))();function Gh(n){return n.ownerDocument.defaultView}function hl(n){return n.ownerDocument}function ns(n){return n instanceof Function?n():n}var xa=(()=>((xa=xa||{})[xa.Important=1]="Important",xa[xa.DashCase=2]="DashCase",xa))();function Tu(n,r){return undefined(n,r)}function Ul(n){const r=n[3];return bi(r)?r[3]:r}function _(n){return d(n[13])}function c(n){return d(n[4])}function d(n){for(;null!==n&&!bi(n);)n=n[4];return n}function B(n,r,s,a,l){if(null!=a){let f,E=!1;bi(a)?f=a:mi(a)&&(E=!0,a=a[0]);const C=sr(a);0===n&&null!==s?null==l?Pd(r,s,C):cu(r,s,C,l||null,!0):1===n&&null!==s?cu(r,s,C,l||null,!0):2===n?function xc(n,r,s){const a=Mc(n,r);a&&function Nd(n,r,s,a){ir(n)?n.removeChild(r,s,a):r.removeChild(s)}(n,a,r,s)}(r,C,E):3===n&&r.destroyNode(C),null!=f&&function im(n,r,s,a,l){const f=s[7];f!==sr(s)&&B(r,n,a,f,l);for(let C=10;C0&&(n[s-1][4]=a[4]);const f=Ia(n,10+r);!function nn(n,r){Hl(n,r,r[11],2,null,null),r[0]=null,r[6]=null}(a[1],a);const E=f[19];null!==E&&E.detachView(f[1]),a[3]=null,a[4]=null,a[2]&=-65}return a}function Od(n,r){if(!(128&r[2])){const s=r[11];ir(s)&&s.destroyNode&&Hl(n,r,s,3,null,null),function Hr(n){let r=n[13];if(!r)return Cc(n[1],n);for(;r;){let s=null;if(mi(r))s=r[13];else{const a=r[10];a&&(s=a)}if(!s){for(;r&&!r[4]&&r!==n;)mi(r)&&Cc(r[1],r),r=r[3];null===r&&(r=n),mi(r)&&Cc(r[1],r),s=r&&r[4]}r=s}}(r)}}function Cc(n,r){if(!(128&r[2])){r[2]&=-65,r[2]|=128,function Kh(n,r){let s;if(null!=n&&null!=(s=n.destroyHooks))for(let a=0;a=0?a[l=z]():a[l=-z].unsubscribe(),f+=2}else{const E=a[l=s[f+1]];s[f].call(E)}if(null!==a){for(let f=l+1;ff?"":l[ye+1].toLowerCase();const dt=8&a?He:null;if(dt&&-1!==kd(dt,z,0)||2&a&&z!==He){if(du(a))return!1;E=!0}}}}else{if(!E&&!du(a)&&!du(R))return!1;if(E&&du(R))continue;E=!1,a=R|1&a}}return du(a)||E}function du(n){return 0==(1&n)}function Fd(n,r,s,a){if(null===r)return-1;let l=0;if(a||!s){let f=!1;for(;l-1)for(s++;s0?'="'+C+'"':"")+"]"}else 8&a?l+="."+E:4&a&&(l+=" "+E);else""!==l&&!du(E)&&(r+=Qh(f,l),l=""),a=E,f=f||!du(a);s++}return""!==l&&(r+=Qh(f,l)),r}const hr={};function Ld(n){Oc(P(),O(),Bi()+n,!1)}function Oc(n,r,s,a){if(!a)if(3==(3&r[2])){const f=n.preOrderCheckHooks;null!==f&&Oo(r,f,s)}else{const f=n.preOrderHooks;null!==f&&ha(r,f,0,s)}Hs(s)}const Ip=new qr("ENVIRONMENT_INITIALIZER"),yl=new qr("INJECTOR_DEF_TYPES");function l_(...n){return{\u0275providers:zl(0,n)}}function zl(n,...r){const s=[],a=new Set;let l;return Ks(r,f=>{const E=f;Mu(E,s,[],a)&&(l||(l=[]),l.push(E))}),void 0!==l&&Cp(l,s),s}function Cp(n,r){for(let s=0;s{r.push(f)})}}function Mu(n,r,s,a){if(!(n=me(n)))return!1;let l=null,f=wn(n);const E=!f&&jn(n);if(f||E){if(E&&!E.standalone)return!1;l=n}else{const R=n.ngModule;if(f=wn(R),!f)return!1;l=R}const C=a.has(l);if(E){if(C)return!1;if(a.add(l),E.dependencies){const R="function"==typeof E.dependencies?E.dependencies():E.dependencies;for(const z of R)Mu(z,r,s,a)}}else{if(!f)return!1;{if(null!=f.imports&&!C){let z;a.add(l);try{Ks(f.imports,te=>{Mu(te,r,s,a)&&(z||(z=[]),z.push(te))})}finally{}void 0!==z&&Cp(z,r)}if(!C){const z=Xi(l)||(()=>new l);r.push({provide:l,useFactory:z,deps:Ut},{provide:yl,useValue:l,multi:!0},{provide:Ip,useValue:()=>Vn(l),multi:!0})}const R=f.providers;null==R||C||Ks(R,te=>{r.push(te)})}}return l!==n&&void 0!==n.providers}const d_=_e({provide:String,useValue:_e});function Tp(n){return null!==n&&"object"==typeof n&&d_ in n}function xu(n){return"function"==typeof n}const Ap=new qr("INJECTOR",-1);class Sp{get(r,s=x){if(s===x){const a=new Error(`NullInjectorError: No provider for ${ge(r)}!`);throw a.name="NullInjectorError",a}return s}}const Mp=new qr("Set Injector scope."),Bd={},Kl={};let Wl;function ef(){return void 0===Wl&&(Wl=new Sp),Wl}class Zl{}class hm extends Zl{constructor(r,s,a,l){super(),this.parent=s,this.source=a,this.scopes=l,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,rf(r,E=>this.processProvider(E)),this.records.set(Ap,As(void 0,this)),l.has("environment")&&this.records.set(Zl,As(void 0,this));const f=this.records.get(Mp);null!=f&&"string"==typeof f.value&&this.scopes.add(f.value),this.injectorDefTypes=new Set(this.get(yl.multi,Ut,ln.Self))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const r of this._ngOnDestroyHooks)r.ngOnDestroy();for(const r of this._onDestroyHooks)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(r){this._onDestroyHooks.push(r)}get(r,s=x,a=ln.Default){this.assertNotDestroyed();const l=Sn(this),f=gn(void 0);try{if(!(a&ln.SkipSelf)){let C=this.records.get(r);if(void 0===C){const R=function m_(n){return"function"==typeof n||"object"==typeof n&&n instanceof qr}(r)&&ut(r);C=R&&this.injectableDefInScope(R)?As(tf(r),Bd):null,this.records.set(r,C)}if(null!=C)return this.hydrate(r,C)}return(a&ln.Self?ef():this.parent).get(r,s=a&ln.Optional&&s===x?null:s)}catch(E){if("NullInjectorError"===E.name){if((E[Y]=E[Y]||[]).unshift(ge(r)),l)throw E;return function eo(n,r,s,a){const l=n[Y];throw r[Ot]&&l.unshift(r[Ot]),n.message=function ia(n,r,s,a=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let l=ge(r);if(Array.isArray(r))l=r.map(ge).join(" -> ");else if("object"==typeof r){let f=[];for(let E in r)if(r.hasOwnProperty(E)){let C=r[E];f.push(E+":"+("string"==typeof C?JSON.stringify(C):ge(C)))}l=`{${f.join(", ")}}`}return`${s}${a?"("+a+")":""}[${l}]: ${n.replace(ke,"\n ")}`}("\n"+n.message,l,s,a),n.ngTokenPath=l,n[Y]=null,n}(E,r,"R3InjectorError",this.source)}throw E}finally{gn(f),Sn(l)}}resolveInjectorInitializers(){const r=Sn(this),s=gn(void 0);try{const a=this.get(Ip.multi,Ut,ln.Self);for(const l of a)l()}finally{Sn(r),gn(s)}}toString(){const r=[],s=this.records;for(const a of s.keys())r.push(ge(a));return`R3Injector[${r.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Ye(205,!1)}processProvider(r){let s=xu(r=me(r))?r:me(r&&r.provide);const a=function f_(n){return Tp(n)?As(void 0,n.useValue):As(nf(n),Bd)}(r);if(xu(r)||!0!==r.multi)this.records.get(s);else{let l=this.records.get(s);l||(l=As(void 0,Bd,!0),l.factory=()=>fi(l.multi),this.records.set(s,l)),s=r,l.multi.push(r)}this.records.set(s,a)}hydrate(r,s){return s.value===Bd&&(s.value=Kl,s.value=s.factory()),"object"==typeof s.value&&s.value&&function g_(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(s.value)&&this._ngOnDestroyHooks.add(s.value),s.value}injectableDefInScope(r){if(!r.providedIn)return!1;const s=me(r.providedIn);return"string"==typeof s?"any"===s||this.scopes.has(s):this.injectorDefTypes.has(s)}}function tf(n){const r=ut(n),s=null!==r?r.factory:Xi(n);if(null!==s)return s;if(n instanceof qr)throw new Ye(204,!1);if(n instanceof Function)return function h_(n){const r=n.length;if(r>0)throw uo(r,"?"),new Ye(204,!1);const s=function Ht(n){const r=n&&(n[er]||n[bt]);if(r){const s=function Zt(n){if(n.hasOwnProperty("name"))return n.name;const r=(""+n).match(/^function\s*([^\s(]+)/);return null===r?"":r[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${s}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${s}" class.`),r}return null}(n);return null!==s?()=>s.factory(n):()=>new n}(n);throw new Ye(204,!1)}function nf(n,r,s){let a;if(xu(n)){const l=me(n);return Xi(l)||tf(l)}if(Tp(n))a=()=>me(n.useValue);else if(function cm(n){return!(!n||!n.useFactory)}(n))a=()=>n.useFactory(...fi(n.deps||[]));else if(function lm(n){return!(!n||!n.useExisting)}(n))a=()=>Vn(me(n.useExisting));else{const l=me(n&&(n.useClass||n.provide));if(!function p_(n){return!!n.deps}(n))return Xi(l)||tf(l);a=()=>new l(...fi(n.deps))}return a}function As(n,r,s=!1){return{factory:n,value:r,multi:s?[]:void 0}}function y_(n){return!!n.\u0275providers}function rf(n,r){for(const s of n)Array.isArray(s)?rf(s,r):y_(s)?rf(s.\u0275providers,r):r(s)}function fm(n,r=null,s=null,a){const l=jd(n,r,s,a);return l.resolveInjectorInitializers(),l}function jd(n,r=null,s=null,a,l=new Set){const f=[s||Ut,l_(n)];return a=a||("object"==typeof n?void 0:ge(n)),new hm(f,r||ef(),a||null,l)}let Ou=(()=>{class n{static create(s,a){if(Array.isArray(s))return fm({name:""},a,s,"");{const l=s.name??"";return fm({name:l},s.parent,s.providers,l)}}}return n.THROW_IF_NOT_FOUND=x,n.NULL=new Sp,n.\u0275prov=It({token:n,providedIn:"any",factory:()=>Vn(Ap)}),n.__NG_ELEMENT_ID__=-1,n})();function Qu(n,r=ln.Default){const s=O();return null===s?Vn(n,r):D(un(),s,me(n),r)}function Nc(){throw new Error("invalid")}function hf(n,r){return n<<17|r<<2}function hu(n){return n>>17&32767}function Zd(n){return 2|n}function va(n){return(131068&n)>>2}function qd(n,r){return-131069&n|r<<2}function Yl(n){return 1|n}function yf(n,r){const s=n.contentQueries;if(null!==s)for(let a=0;a22&&Oc(n,r,22,!1),s(a,l)}finally{Hs(f)}}function Gp(n,r,s){if(Us(r)){const l=r.directiveEnd;for(let f=r.directiveStart;f0;){const s=n[--r];if("number"==typeof s&&s<0)return s}return 0})(C)!=R&&C.push(R),C.push(a,l,E)}}function bf(n,r){null!==n.hostBindings&&n.hostBindings(1,r)}function Jl(n,r){r.flags|=2,(n.components||(n.components=[])).push(r.index)}function Qp(n,r,s){if(s){if(r.exportAs)for(let a=0;a0&&ih(s)}}function ih(n){for(let a=_(n);null!==a;a=c(a))for(let l=10;l0&&ih(f)}const s=n[1].components;if(null!==s)for(let a=0;a0&&ih(l)}}function k_(n,r){const s=Jt(r,n),a=s[1];(function tg(n,r){for(let s=r.length;sPromise.resolve(null))();function ig(n){return n[7]||(n[7]=[])}function sg(n){return n.cleanup||(n.cleanup=[])}function Tf(n,r){const s=n[9],a=s?s.get(au,null):null;a&&a.handleError(r)}function og(n,r,s,a,l){for(let f=0;f=0;a--){const l=n[a];l.hostVars=r+=l.hostVars,l.hostAttrs=pa(l.hostAttrs,s=pa(s,l.hostAttrs))}}(a)}function Ff(n){return n===Kn?{}:n===Ut?[]:n}function lh(n,r){const s=n.viewQuery;n.viewQuery=s?(a,l)=>{r(a,l),s(a,l)}:r}function $_(n,r){const s=n.contentQueries;n.contentQueries=s?(a,l,f)=>{r(a,l,f),s(a,l,f)}:r}function rs(n,r){const s=n.hostBindings;n.hostBindings=s?(a,l)=>{r(a,l),s(a,l)}:r}let Lf=null;function Nu(){if(!Lf){const n=Xe.Symbol;if(n&&n.iterator)Lf=n.iterator;else{const r=Object.getOwnPropertyNames(Map.prototype);for(let s=0;sC(sr(tr[a.index])):a.index;if(ir(s)){let tr=null;if(!C&&R&&(tr=function Kf(n,r,s,a){const l=n.cleanup;if(null!=l)for(let f=0;fR?C[R]:null}"string"==typeof E&&(f+=2)}return null}(n,r,l,a.index)),null!==tr)(tr.__ngLastListenerFn__||tr).__ngNextListenerFn__=f,tr.__ngLastListenerFn__=f,dt=!1;else{f=Cg(a,r,ye,f,!1);const Ei=s.listen(Ln,l,f);He.push(f,Ei),te&&te.push(l,rn,ur,ur+1)}}else f=Cg(a,r,ye,f,!0),Ln.addEventListener(l,f,E),He.push(f),te&&te.push(l,rn,ur,E)}else f=Cg(a,r,ye,f,!1);const Gt=a.outputs;let dn;if(dt&&null!==Gt&&(dn=Gt[l])){const Cn=dn.length;if(Cn)for(let Ln=0;Ln0;)r=r[15],n--;return r}(n,Dn.lFrame.contextLView))[8]}(n)}function rc(n,r){let s=null;const a=function Gl(n){const r=n.attrs;if(null!=r){const s=r.indexOf(5);if(0==(1&s))return r[s+1]}return null}(n);for(let l=0;l=0}function nl(n,r,s){return Qa(n,r,s,!1),nl}function Ng(n,r){return Qa(n,r,null,!0),Ng}function Qa(n,r,s,a){const l=O(),f=P(),E=di(2);f.firstUpdatePass&&function Iy(n,r,s,a){const l=n.data;if(null===l[s+1]){const f=l[Bi()],E=function Dy(n,r){return r>=n.expandoStartIndex}(n,s);(function Vg(n,r){return 0!=(n.flags&(r?16:32))})(f,a)&&null===r&&!E&&(r=!1),r=function Cy(n,r,s,a){const l=function da(n){const r=Dn.lFrame.currentDirectiveIndex;return-1===r?null:n[r]}(n);let f=a?r.residualClasses:r.residualStyles;if(null===l)0===(a?r.classBindings:r.styleBindings)&&(s=yh(s=Fg(null,n,r,s,a),r.attrs,a),f=null);else{const E=r.directiveStylingLast;if(-1===E||n[E]!==l)if(s=Fg(l,n,r,s,a),null===f){let R=function tv(n,r,s){const a=s?r.classBindings:r.styleBindings;if(0!==va(a))return n[hu(a)]}(n,r,a);void 0!==R&&Array.isArray(R)&&(R=Fg(null,n,r,R[1],a),R=yh(R,r.attrs,a),function ed(n,r,s,a){n[hu(s?r.classBindings:r.styleBindings)]=a}(n,r,a,R))}else f=function kg(n,r,s){let a;const l=r.directiveEnd;for(let f=1+r.directiveStylingLast;f0)&&(z=!0)}else te=s;if(l)if(0!==R){const He=hu(n[C+1]);n[a+1]=hf(He,C),0!==He&&(n[He+1]=qd(n[He+1],a)),n[C+1]=function Wd(n,r){return 131071&n|r<<17}(n[C+1],a)}else n[a+1]=hf(C,0),0!==C&&(n[C+1]=qd(n[C+1],a)),C=a;else n[a+1]=hf(R,0),0===C?C=a:n[R+1]=qd(n[R+1],a),R=a;z&&(n[a+1]=Zd(n[a+1])),Sg(n,te,a,!0),Sg(n,te,a,!1),function q_(n,r,s,a,l){const f=l?n.residualClasses:n.residualStyles;null!=f&&"string"==typeof r&&Xr(f,r)>=0&&(s[a+1]=Yl(s[a+1]))}(r,te,n,a,f),E=hf(C,R),f?r.classBindings=E:r.styleBindings=E}(l,f,r,s,E,a)}}(f,n,E,a),r!==hr&&ua(l,E,r)&&function Ay(n,r,s,a,l,f,E,C){if(!(3&r.type))return;const R=n.data,z=R[C+1];Lg(function Yd(n){return 1==(1&n)}(z)?Sy(R,r,s,l,va(z),E):void 0)||(Lg(f)||function Rm(n){return 2==(2&n)}(z)&&(f=Sy(R,null,s,l,C,E)),function n_(n,r,s,a,l){const f=ir(n);if(r)l?f?n.addClass(s,a):s.classList.add(a):f?n.removeClass(s,a):s.classList.remove(a);else{let E=-1===a.indexOf("-")?void 0:xa.DashCase;if(null==l)f?n.removeStyle(s,a,E):s.style.removeProperty(a);else{const C="string"==typeof l&&l.endsWith("!important");C&&(l=l.slice(0,-10),E|=xa.Important),f?n.setStyle(s,a,l,E):s.style.setProperty(a,l,C?"important":"")}}}(a,E,V(Bi(),s),l,f))}(f,f.data[Bi()],l,l[11],n,l[E+1]=function _E(n,r){return null==n||("string"==typeof r?n+=r:"object"==typeof n&&(n=ge(Go(n)))),n}(r,s),a,E)}function Fg(n,r,s,a,l){let f=null;const E=s.directiveEnd;let C=s.directiveStylingLast;for(-1===C?C=s.directiveStart:C++;C0;){const R=n[l],z=Array.isArray(R),te=z?R[1]:R,ye=null===te;let He=s[l+1];He===hr&&(He=ye?Ut:void 0);let dt=ye?Ho(He,a):te===a?He:void 0;if(z&&!Lg(dt)&&(dt=Ho(R,a)),Lg(dt)&&(C=dt,E))return C;const Gt=n[l+1];l=E?hu(Gt):va(Gt)}if(null!==r){let R=f?r.residualClasses:r.residualStyles;null!=R&&(C=Ho(R,a))}return C}function Lg(n){return void 0!==n}function My(n,r=""){const s=O(),a=P(),l=n+22,f=a.firstCreatePass?El(a,l,1,r,null):a.data[l],E=s[l]=function q(n,r){return ir(n)?n.createText(r):n.createTextNode(r)}(s[11],r);$l(a,s,E,f),ri(f,!1)}function Ug(n){return td("",n,""),Ug}function td(n,r,s){const a=O(),l=Hc(a,n,r,s);return l!==hr&&qa(a,Bi(),l),td}function qf(n,r,s,a,l){const f=O(),E=Gc(f,n,r,s,a,l);return E!==hr&&qa(f,Bi(),E),qf}const ac=void 0;var uv=["en",[["a","p"],["AM","PM"],ac],[["AM","PM"],ac,ac],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],ac,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],ac,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",ac,"{1} 'at' {0}",ac],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function Kg(n){const s=Math.floor(Math.abs(n)),a=n.toString().replace(/^[^.]*\.?/,"").length;return 1===s&&0===a?1:5}];let uc={};function Jf(n){const r=function Hy(n){return n.toLowerCase().replace(/_/g,"-")}(n);let s=$y(r);if(s)return s;const a=r.split("-")[0];if(s=$y(a),s)return s;if("en"===a)return uv;throw new Error(`Missing locale data for the locale "${n}".`)}function jy(n){return Jf(n)[rr.PluralCase]}function $y(n){return n in uc||(uc[n]=Xe.ng&&Xe.ng.common&&Xe.ng.common.locales&&Xe.ng.common.locales[n]),uc[n]}var rr=(()=>((rr=rr||{})[rr.LocaleId=0]="LocaleId",rr[rr.DayPeriodsFormat=1]="DayPeriodsFormat",rr[rr.DayPeriodsStandalone=2]="DayPeriodsStandalone",rr[rr.DaysFormat=3]="DaysFormat",rr[rr.DaysStandalone=4]="DaysStandalone",rr[rr.MonthsFormat=5]="MonthsFormat",rr[rr.MonthsStandalone=6]="MonthsStandalone",rr[rr.Eras=7]="Eras",rr[rr.FirstDayOfWeek=8]="FirstDayOfWeek",rr[rr.WeekendRange=9]="WeekendRange",rr[rr.DateFormat=10]="DateFormat",rr[rr.TimeFormat=11]="TimeFormat",rr[rr.DateTimeFormat=12]="DateTimeFormat",rr[rr.NumberSymbols=13]="NumberSymbols",rr[rr.NumberFormats=14]="NumberFormats",rr[rr.CurrencyCode=15]="CurrencyCode",rr[rr.CurrencySymbol=16]="CurrencySymbol",rr[rr.CurrencyName=17]="CurrencyName",rr[rr.Currencies=18]="Currencies",rr[rr.Directionality=19]="Directionality",rr[rr.PluralCase=20]="PluralCase",rr[rr.ExtraData=21]="ExtraData",rr))();const i="en-US";let v=i;function fv(n,r,s,a,l){if(n=me(n),Array.isArray(n))for(let f=0;f>20;if(xu(n)||!n.multi){const dt=new _i(R,l,Qu),Gt=gv(C,r,l?te:te+He,ye);-1===Gt?(zn(Jr(z,E),f,C),pv(f,n,r.length),r.push(C),z.directiveStart++,z.directiveEnd++,l&&(z.providerIndexes+=1048576),s.push(dt),E.push(dt)):(s[Gt]=dt,E[Gt]=dt)}else{const dt=gv(C,r,te+He,ye),Gt=gv(C,r,te,te+He),dn=dt>=0&&s[dt],Cn=Gt>=0&&s[Gt];if(l&&!Cn||!l&&!dn){zn(Jr(z,E),f,C);const Ln=function Jw(n,r,s,a,l){const f=new _i(n,s,Qu);return f.multi=[],f.index=r,f.componentProviders=0,VE(f,l,a&&!s),f}(l?Qw:Yw,s.length,l,a,R);!l&&Cn&&(s[Gt].providerFactory=Ln),pv(f,n,r.length,0),r.push(C),z.directiveStart++,z.directiveEnd++,l&&(z.providerIndexes+=1048576),s.push(Ln),E.push(Ln)}else pv(f,n,dt>-1?dt:Gt,VE(s[l?Gt:dt],R,!l&&a));!l&&a&&Cn&&s[Gt].componentProviders++}}}function pv(n,r,s,a){const l=xu(r),f=function dm(n){return!!n.useClass}(r);if(l||f){const R=(f?me(r.useClass):r).prototype.ngOnDestroy;if(R){const z=n.destroyHooks||(n.destroyHooks=[]);if(!l&&r.multi){const te=z.indexOf(s);-1===te?z.push(s,[a,R]):z[te+1].push(a,R)}else z.push(s,R)}}}function VE(n,r,s){return s&&n.componentProviders++,n.multi.push(r)-1}function gv(n,r,s,a){for(let l=s;l{s.providersResolver=(a,l)=>function qw(n,r,s){const a=P();if(a.firstCreatePass){const l=Vi(n);fv(s,a.data,a.blueprint,l,!0),fv(r,a.data,a.blueprint,l,!1)}}(a,l?l(n):n,r)}}class eb{resolveComponentFactory(r){throw function Xw(n){const r=Error(`No component factory found for ${ge(n)}. Did you add it to @NgModule.entryComponents?`);return r.ngComponent=n,r}(r)}}let Yg=(()=>{class n{}return n.NULL=new eb,n})();class Dh{}class jE{}class $E{}function nb(){return ep(un(),O())}function ep(n,r){return new Qg(Q(n,r))}let Qg=(()=>{class n{constructor(s){this.nativeElement=s}}return n.__NG_ELEMENT_ID__=nb,n})();function rb(n){return n instanceof Qg?n.nativeElement:n}class HE{}let ib=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function ob(){const n=O(),s=Jt(un().index,n);return function sb(n){return n[11]}(mi(s)?s:n)}(),n})(),ab=(()=>{class n{}return n.\u0275prov=It({token:n,providedIn:"root",factory:()=>null}),n})();class GE{constructor(r){this.full=r,this.major=r.split(".")[0],this.minor=r.split(".")[1],this.patch=r.split(".").slice(2).join(".")}}const zE=new GE("14.0.2"),yv={};function zy(n,r,s,a,l=!1){for(;null!==s;){const f=r[s.index];if(null!==f&&a.push(sr(f)),bi(f))for(let C=10;C-1&&(jl(r,a),Ia(s,a))}this._attachedToViewContainer=!1}Od(this._lView[1],this._lView)}onDestroy(r){qm(this._lView[1],this._lView,null,r)}markForCheck(){oh(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){!function rg(n,r,s){const a=r[10];a.begin&&a.begin();try{Bc(n,r,n.template,s)}catch(l){throw Tf(r,l),l}finally{a.end&&a.end()}}(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ye(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Bn(n,r){Hl(n,r,r[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(r){if(this._attachedToViewContainer)throw new Ye(902,"");this._appRef=r}}class ub extends Jg{constructor(r){super(r),this._view=r}detectChanges(){Cf(this._view)}checkNoChanges(){}get context(){return null}}class _v extends Yg{constructor(r){super(),this.ngModule=r}resolveComponentFactory(r){const s=jn(r);return new vv(s,this.ngModule)}}function KE(n){const r=[];for(let s in n)n.hasOwnProperty(s)&&r.push({propName:n[s],templateName:s});return r}class cb{constructor(r,s){this.injector=r,this.parentInjector=s}get(r,s,a){const l=this.injector.get(r,yv,a);return l!==yv||s===yv?l:this.parentInjector.get(r,s,a)}}class vv extends $E{constructor(r,s){super(),this.componentDef=r,this.ngModule=s,this.componentType=r.type,this.selector=function u_(n){return n.map(Jh).join(",")}(r.selectors),this.ngContentSelectors=r.ngContentSelectors?r.ngContentSelectors:[],this.isBoundToModule=!!s}get inputs(){return KE(this.componentDef.inputs)}get outputs(){return KE(this.componentDef.outputs)}create(r,s,a,l){let f=(l=l||this.ngModule)instanceof Zl?l:l?.injector;f&&null!==this.componentDef.getStandaloneInjector&&(f=this.componentDef.getStandaloneInjector(f)||f);const E=f?new cb(r,f):r,C=E.get(HE,xi),R=E.get(ab,null),z=C.createRenderer(null,this.componentDef),te=this.componentDef.selectors[0][0]||"div",ye=a?function wf(n,r,s){if(ir(n))return n.selectRootElement(r,s===xt.ShadowDom);let a="string"==typeof r?n.querySelector(r):r;return a.textContent="",a}(z,a,this.componentDef.encapsulation):on(C.createRenderer(null,this.componentDef),te,function lb(n){const r=n.toLowerCase();return"svg"===r?"svg":"math"===r?"math":null}(te)),He=this.componentDef.onPush?288:272,dt=function fg(n,r){return{components:[],scheduler:n||Hh,clean:F_,playerHandler:r||null,flags:0}}(),Gt=vf(0,null,null,1,0,null,null,null,null,null),dn=th(null,Gt,dt,He,null,null,C,z,R,E,null);let Cn,Ln;oo(dn);try{const ur=function hg(n,r,s,a,l,f){const E=s[1];s[22]=n;const R=El(E,22,2,"#host",null),z=R.mergedAttrs=r.hostAttrs;null!==z&&(Af(R,z,!0),null!==n&&(Mi(l,n,z),null!==R.classes&&qh(l,n,R.classes),null!==R.styles&&Ep(l,n,R.styles)));const te=a.createRenderer(n,r),ye=th(s,Wm(r),null,r.onPush?32:16,s[22],R,a,te,f||null,null,null);return E.firstCreatePass&&(zn(Jr(R,s),E,r.type),Jl(E,R),ny(R,s.length,1)),sh(s,ye),s[22]=ye}(ye,this.componentDef,dn,C,z);if(ye)if(a)Mi(z,ye,["ng-version",zE.full]);else{const{attrs:rn,classes:tr}=function om(n){const r=[],s=[];let a=1,l=2;for(;a0&&qh(z,ye,tr.join(" "))}if(Ln=At(Gt,22),void 0!==s){const rn=Ln.projection=[];for(let tr=0;trs()),this.destroyCbs=null}onDestroy(r){this.destroyCbs.push(r)}}class Ev extends jE{constructor(r){super(),this.moduleType=r}create(r){return new WE(this.moduleType,r)}}class pb extends Dh{constructor(r,s,a){super(),this.componentFactoryResolver=new _v(this),this.instance=null;const l=new hm([...r,{provide:Dh,useValue:this},{provide:Yg,useValue:this.componentFactoryResolver}],s||ef(),a,new Set(["environment"]));this.injector=l,l.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(r){this.injector.onDestroy(r)}}function wv(n,r=null,s=null){return new pb(n,r,s).injector}function ZE(n,r,s){const a=Pt()+n,l=O();return l[a]===hr?gi(l,a,s?r.call(s):r()):function Vf(n,r){return n[r]}(l,a)}function qE(n,r,s,a){return QE(O(),Pt(),n,r,s,a)}function YE(n,r,s,a,l){return JE(O(),Pt(),n,r,s,a,l)}function Xg(n,r){const s=n[r];return s===hr?void 0:s}function QE(n,r,s,a,l,f){const E=r+s;return ua(n,E,l)?gi(n,E+1,f?a.call(f,l):a(l)):Xg(n,E+1)}function JE(n,r,s,a,l,f,E){const C=r+s;return Yi(n,C,l,f)?gi(n,C+2,E?a.call(E,l,f):a(l,f)):Xg(n,C+2)}function n0(n,r){const s=P();let a;const l=n+22;s.firstCreatePass?(a=function Cb(n,r){if(r)for(let s=r.length-1;s>=0;s--){const a=r[s];if(n===a.name)return a}}(r,s.pipeRegistry),s.data[l]=a,a.onDestroy&&(s.destroyHooks||(s.destroyHooks=[])).push(l,a.onDestroy)):a=s.data[l];const f=a.factory||(a.factory=Xi(a.type)),E=gn(Qu);try{const C=Io(!1),R=f();return Io(C),function tc(n,r,s,a){s>=n.data.length&&(n.data[s]=null,n.blueprint[s]=null),r[s]=a}(s,O(),l,R),R}finally{gn(E)}}function r0(n,r,s){const a=n+22,l=O(),f=Vt(l,a);return em(l,a)?QE(l,Pt(),r,f.transform,s,f):f.transform(s)}function s0(n,r,s,a){const l=n+22,f=O(),E=Vt(f,l);return em(f,l)?JE(f,Pt(),r,E.transform,s,a,E):E.transform(s,a)}function em(n,r){return n[1].data[r].pure}function bv(n){return r=>{setTimeout(n,void 0,r)}}const Dl=class Mb extends m.x{constructor(r=!1){super(),this.__isAsync=r}emit(r){super.next(r)}subscribe(r,s,a){let l=r,f=s||(()=>null),E=a;if(r&&"object"==typeof r){const R=r;l=R.next?.bind(R),f=R.error?.bind(R),E=R.complete?.bind(R)}this.__isAsync&&(f=bv(f),l&&(l=bv(l)),E&&(E=bv(E)));const C=super.subscribe({next:l,error:f,complete:E});return r instanceof g.w0&&r.add(C),C}};function xb(){return this._results[Nu()]()}class Dv{constructor(r=!1){this._emitDistinctChangesOnly=r,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const s=Nu(),a=Dv.prototype;a[s]||(a[s]=xb)}get changes(){return this._changes||(this._changes=new Dl)}get(r){return this._results[r]}map(r){return this._results.map(r)}filter(r){return this._results.filter(r)}find(r){return this._results.find(r)}reduce(r,s){return this._results.reduce(r,s)}forEach(r){this._results.forEach(r)}some(r){return this._results.some(r)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(r,s){const a=this;a.dirty=!1;const l=zs(r);(this._changesDetected=!function Ls(n,r,s){if(n.length!==r.length)return!1;for(let a=0;a{class n{}return n.__NG_ELEMENT_ID__=Pb,n})();const Ob=tm,Rb=class extends Ob{constructor(r,s,a){super(),this._declarationLView=r,this._declarationTContainer=s,this.elementRef=a}createEmbeddedView(r,s){const a=this._declarationTContainer.tViews,l=th(this._declarationLView,a,r,16,null,a.declTNode,null,null,null,null,s||null);l[17]=this._declarationLView[this._declarationTContainer.index];const E=this._declarationLView[19];return null!==E&&(l[19]=E.createEmbeddedView(a)),Uc(a,l,r),new Jg(l)}};function Pb(){return Ky(un(),O())}function Ky(n,r){return 4&n.type?new Rb(r,n,ep(n,r)):null}let Wy=(()=>{class n{}return n.__NG_ELEMENT_ID__=Nb,n})();function Nb(){return u0(un(),O())}const kb=Wy,o0=class extends kb{constructor(r,s,a){super(),this._lContainer=r,this._hostTNode=s,this._hostLView=a}get element(){return ep(this._hostTNode,this._hostLView)}get injector(){return new Yt(this._hostTNode,this._hostLView)}get parentInjector(){const r=_n(this._hostTNode,this._hostLView);if(wu(r)){const s=jo(r,this._hostLView),a=us(r);return new Yt(s[1].data[a+8],s)}return new Yt(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(r){const s=a0(this._lContainer);return null!==s&&s[r]||null}get length(){return this._lContainer.length-10}createEmbeddedView(r,s,a){let l,f;"number"==typeof a?l=a:null!=a&&(l=a.index,f=a.injector);const E=r.createEmbeddedView(s||{},f);return this.insert(E,l),E}createComponent(r,s,a,l,f){const E=r&&!function mt(n){return"function"==typeof n}(r);let C;if(E)C=s;else{const ye=s||{};C=ye.index,a=ye.injector,l=ye.projectableNodes,f=ye.environmentInjector||ye.ngModuleRef}const R=E?r:new vv(jn(r)),z=a||this.parentInjector;if(!f&&null==R.ngModule){const He=(E?z:this.parentInjector).get(Zl,null);He&&(f=He)}const te=R.create(z,l,void 0,f);return this.insert(te.hostView,C),te}insert(r,s){const a=r._lView,l=a[1];if(function Tr(n){return bi(n[3])}(a)){const te=this.indexOf(r);if(-1!==te)this.detach(te);else{const ye=a[3],He=new o0(ye,ye[6],ye[3]);He.detach(He.indexOf(r))}}const f=this._adjustIndex(s),E=this._lContainer;!function no(n,r,s,a){const l=10+a,f=s.length;a>0&&(s[l-1][4]=r),a0)a.push(E[C/2]);else{const z=f[C+1],te=r[-R];for(let ye=10;ye{class n{constructor(s){this.appInits=s,this.resolve=qy,this.reject=qy,this.initialized=!1,this.done=!1,this.donePromise=new Promise((a,l)=>{this.resolve=a,this.reject=l})}runInitializers(){if(this.initialized)return;const s=[],a=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let l=0;l{f.subscribe({complete:C,error:R})});s.push(E)}}Promise.all(s).then(()=>{a()}).catch(l=>{this.reject(l)}),0===s.length&&a(),this.initialized=!0}}return n.\u0275fac=function(s){return new(s||n)(Vn(F0,8))},n.\u0275prov=It({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const L0=new qr("AppId",{providedIn:"root",factory:function V0(){return`${Nv()}${Nv()}${Nv()}`}});function Nv(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const U0=new qr("Platform Initializer"),cD=new qr("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),B0=new qr("appBootstrapListener"),dD=new qr("AnimationModuleType");let hD=(()=>{class n{log(s){console.log(s)}warn(s){console.warn(s)}}return n.\u0275fac=function(s){return new(s||n)},n.\u0275prov=It({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Qy=new qr("LocaleId",{providedIn:"root",factory:()=>mr(Qy,ln.Optional|ln.SkipSelf)||function fD(){return typeof $localize<"u"&&$localize.locale||i}()}),pD=new qr("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});class gD{constructor(r,s){this.ngModuleFactory=r,this.componentFactories=s}}let mD=(()=>{class n{compileModuleSync(s){return new Ev(s)}compileModuleAsync(s){return Promise.resolve(this.compileModuleSync(s))}compileModuleAndAllComponentsSync(s){const a=this.compileModuleSync(s),f=ns(Fr(s).declarations).reduce((E,C)=>{const R=jn(C);return R&&E.push(new vv(R)),E},[]);return new gD(a,f)}compileModuleAndAllComponentsAsync(s){return Promise.resolve(this.compileModuleAndAllComponentsSync(s))}clearCache(){}clearCacheFor(s){}getModuleId(s){}}return n.\u0275fac=function(s){return new(s||n)},n.\u0275prov=It({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const _D=(()=>Promise.resolve(0))();function kv(n){typeof Zone>"u"?_D.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class mu{constructor({enableLongStackTrace:r=!1,shouldCoalesceEventChangeDetection:s=!1,shouldCoalesceRunChangeDetection:a=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Dl(!1),this.onMicrotaskEmpty=new Dl(!1),this.onStable=new Dl(!1),this.onError=new Dl(!1),typeof Zone>"u")throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const l=this;l._nesting=0,l._outer=l._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(l._inner=l._inner.fork(new Zone.TaskTrackingZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(l._inner=l._inner.fork(Zone.longStackTraceZoneSpec)),l.shouldCoalesceEventChangeDetection=!a&&s,l.shouldCoalesceRunChangeDetection=a,l.lastRequestAnimationFrameId=-1,l.nativeRequestAnimationFrame=function vD(){let n=Xe.requestAnimationFrame,r=Xe.cancelAnimationFrame;if(typeof Zone<"u"&&n&&r){const s=n[Zone.__symbol__("OriginalDelegate")];s&&(n=s);const a=r[Zone.__symbol__("OriginalDelegate")];a&&(r=a)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:r}}().nativeRequestAnimationFrame,function bD(n){const r=()=>{!function wD(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(Xe,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Lv(n),n.isCheckStableRunning=!0,Fv(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Lv(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(s,a,l,f,E,C)=>{try{return j0(n),s.invokeTask(l,f,E,C)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===f.type||n.shouldCoalesceRunChangeDetection)&&r(),$0(n)}},onInvoke:(s,a,l,f,E,C,R)=>{try{return j0(n),s.invoke(l,f,E,C,R)}finally{n.shouldCoalesceRunChangeDetection&&r(),$0(n)}},onHasTask:(s,a,l,f)=>{s.hasTask(l,f),a===l&&("microTask"==f.change?(n._hasPendingMicrotasks=f.microTask,Lv(n),Fv(n)):"macroTask"==f.change&&(n.hasPendingMacrotasks=f.macroTask))},onHandleError:(s,a,l,f)=>(s.handleError(l,f),n.runOutsideAngular(()=>n.onError.emit(f)),!1)})}(l)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!mu.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(mu.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(r,s,a){return this._inner.run(r,s,a)}runTask(r,s,a,l){const f=this._inner,E=f.scheduleEventTask("NgZoneEvent: "+l,r,ED,qy,qy);try{return f.runTask(E,s,a)}finally{f.cancelTask(E)}}runGuarded(r,s,a){return this._inner.runGuarded(r,s,a)}runOutsideAngular(r){return this._outer.run(r)}}const ED={};function Fv(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Lv(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function j0(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function $0(n){n._nesting--,Fv(n)}class DD{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Dl,this.onMicrotaskEmpty=new Dl,this.onStable=new Dl,this.onError=new Dl}run(r,s,a){return r.apply(s,a)}runGuarded(r,s,a){return r.apply(s,a)}runOutsideAngular(r){return r()}runTask(r,s,a,l){return r.apply(s,a)}}const H0=new qr(""),G0=new qr("");let Vv,ID=(()=>{class n{constructor(s,a,l){this._ngZone=s,this.registry=a,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,Vv||(function CD(n){Vv=n}(l),l.addToWindow(a)),this._watchAngularEvents(),s.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{mu.assertNotInAngularZone(),kv(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())kv(()=>{for(;0!==this._callbacks.length;){let s=this._callbacks.pop();clearTimeout(s.timeoutId),s.doneCb(this._didWork)}this._didWork=!1});else{let s=this.getPendingTasks();this._callbacks=this._callbacks.filter(a=>!a.updateCb||!a.updateCb(s)||(clearTimeout(a.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(s=>({source:s.source,creationLocation:s.creationLocation,data:s.data})):[]}addCallback(s,a,l){let f=-1;a&&a>0&&(f=setTimeout(()=>{this._callbacks=this._callbacks.filter(E=>E.timeoutId!==f),s(this._didWork,this.getPendingTasks())},a)),this._callbacks.push({doneCb:s,timeoutId:f,updateCb:l})}whenStable(s,a,l){if(l&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(s,a,l),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(s){this.registry.registerApplication(s,this)}unregisterApplication(s){this.registry.unregisterApplication(s)}findProviders(s,a,l){return[]}}return n.\u0275fac=function(s){return new(s||n)(Vn(mu),Vn(z0),Vn(G0))},n.\u0275prov=It({token:n,factory:n.\u0275fac}),n})(),z0=(()=>{class n{constructor(){this._applications=new Map}registerApplication(s,a){this._applications.set(s,a)}unregisterApplication(s){this._applications.delete(s)}unregisterAllApplications(){this._applications.clear()}getTestability(s){return this._applications.get(s)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(s,a=!0){return Vv?.findTestabilityInTree(this,s,a)??null}}return n.\u0275fac=function(s){return new(s||n)},n.\u0275prov=It({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),id=null;const K0=new qr("AllowMultipleToken"),W0=new qr("PlatformOnDestroy");class SD{constructor(r,s){this.name=r,this.token=s}}function q0(n,r,s=[]){const a=`Platform: ${r}`,l=new qr(a);return(f=[])=>{let E=Uv();if(!E||E.injector.get(K0,!1)){const C=[...s,...f,{provide:l,useValue:!0}];n?n(C):function MD(n){if(id&&!id.get(K0,!1))throw new Ye(400,"");id=n;const r=n.get(Q0);(function Z0(n){const r=n.get(U0,null);r&&r.forEach(s=>s())})(n)}(function Y0(n=[],r){return Ou.create({name:r,providers:[{provide:Mp,useValue:"platform"},{provide:W0,useValue:()=>id=null},...n]})}(C,a))}return function OD(n){const r=Uv();if(!r)throw new Ye(401,"");return r}()}}function Uv(){return id?.get(Q0)??null}let Q0=(()=>{class n{constructor(s){this._injector=s,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(s,a){const l=function RD(n,r){let s;return s="noop"===n?new DD:("zone.js"===n?void 0:n)||new mu(r),s}(a?.ngZone,function J0(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(a)),f=[{provide:mu,useValue:l}];return l.run(()=>{const E=Ou.create({providers:f,parent:this.injector,name:s.moduleType.name}),C=s.create(E),R=C.injector.get(au,null);if(!R)throw new Ye(402,"");return l.runOutsideAngular(()=>{const z=l.onError.subscribe({next:te=>{R.handleError(te)}});C.onDestroy(()=>{Xy(this._modules,C),z.unsubscribe()})}),function X0(n,r,s){try{const a=s();return Hf(a)?a.catch(l=>{throw r.runOutsideAngular(()=>n.handleError(l)),l}):a}catch(a){throw r.runOutsideAngular(()=>n.handleError(a)),a}}(R,l,()=>{const z=C.injector.get(Yy);return z.runInitializers(),z.donePromise.then(()=>(function M(n){Mt(n,"Expected localeId to be defined"),"string"==typeof n&&(v=n.toLowerCase().replace(/_/g,"-"))}(C.injector.get(Qy,i)||i),this._moduleDoBootstrap(C),C))})})}bootstrapModule(s,a=[]){const l=ew({},a);return function TD(n,r,s){const a=new Ev(s);return Promise.resolve(a)}(0,0,s).then(f=>this.bootstrapModuleFactory(f,l))}_moduleDoBootstrap(s){const a=s.injector.get(Jy);if(s._bootstrapComponents.length>0)s._bootstrapComponents.forEach(l=>a.bootstrap(l));else{if(!s.instance.ngDoBootstrap)throw new Ye(403,"");s.instance.ngDoBootstrap(a)}this._modules.push(s)}onDestroy(s){this._destroyListeners.push(s)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Ye(404,"");this._modules.slice().forEach(a=>a.destroy()),this._destroyListeners.forEach(a=>a()),this._injector.get(W0,null)?.(),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(s){return new(s||n)(Vn(Ou))},n.\u0275prov=It({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function ew(n,r){return Array.isArray(r)?r.reduce(ew,n):{...n,...r}}let Jy=(()=>{class n{constructor(s,a,l,f){this._zone=s,this._injector=a,this._exceptionHandler=l,this._initStatus=f,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const E=new K.y(R=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{R.next(this._stable),R.complete()})}),C=new K.y(R=>{let z;this._zone.runOutsideAngular(()=>{z=this._zone.onStable.subscribe(()=>{mu.assertNotInAngularZone(),kv(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,R.next(!0))})})});const te=this._zone.onUnstable.subscribe(()=>{mu.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{R.next(!1)}))});return()=>{z.unsubscribe(),te.unsubscribe()}});this.isStable=(0,ae.T)(E,C.pipe((0,oe.B)()))}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(s,a){const l=s instanceof $E;if(!this._initStatus.done)throw!l&&np(s),new Ye(405,false);let f;f=l?s:this._injector.get(Yg).resolveComponentFactory(s),this.componentTypes.push(f.componentType);const E=function AD(n){return n.isBoundToModule}(f)?void 0:this._injector.get(Dh),R=f.create(Ou.NULL,[],a||f.selector,E),z=R.location.nativeElement,te=R.injector.get(H0,null);return te?.registerApplication(z),R.onDestroy(()=>{this.detachView(R.hostView),Xy(this.components,R),te?.unregisterApplication(z)}),this._loadComponent(R),R}tick(){if(this._runningTick)throw new Ye(101,"");try{this._runningTick=!0;for(let s of this._views)s.detectChanges()}catch(s){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(s))}finally{this._runningTick=!1}}attachView(s){const a=s;this._views.push(a),a.attachToAppRef(this)}detachView(s){const a=s;Xy(this._views,a),a.detachFromAppRef()}_loadComponent(s){this.attachView(s.hostView),this.tick(),this.components.push(s),this._injector.get(B0,[]).concat(this._bootstrapListeners).forEach(l=>l(s))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(s=>s()),this._views.slice().forEach(s=>s.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(s){return this._destroyListeners.push(s),()=>Xy(this._destroyListeners,s)}destroy(){if(this._destroyed)throw new Ye(406,false);const s=this._injector;s.destroy&&!s.destroyed&&s.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(s){return new(s||n)(Vn(mu),Vn(Ou),Vn(au),Vn(Yy))},n.\u0275prov=It({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Xy(n,r){const s=n.indexOf(r);s>-1&&n.splice(s,1)}let nw=!0,rw=!1;function ND(){return rw=!0,nw}function kD(){if(rw)throw new Error("Cannot enable prod mode after platform setup.");nw=!1}let FD=(()=>{class n{}return n.__NG_ELEMENT_ID__=LD,n})();function LD(n){return function VD(n,r,s){if(_s(n)&&!s){const a=Jt(n.index,r);return new Jg(a,a)}return 47&n.type?new Jg(r[16],r):null}(un(),O(),16==(16&n))}class aw{constructor(){}supports(r){return $c(r)}create(r){return new GD(r)}}const HD=(n,r)=>r;class GD{constructor(r){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=r||HD}forEachItem(r){let s;for(s=this._itHead;null!==s;s=s._next)r(s)}forEachOperation(r){let s=this._itHead,a=this._removalsHead,l=0,f=null;for(;s||a;){const E=!a||s&&s.currentIndex{E=this._trackByFn(l,C),null!==s&&Object.is(s.trackById,E)?(a&&(s=this._verifyReinsertion(s,C,E,l)),Object.is(s.item,C)||this._addIdentityChange(s,C)):(s=this._mismatch(s,C,E,l),a=!0),s=s._next,l++}),this.length=l;return this._truncate(s),this.collection=r,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let r;for(r=this._previousItHead=this._itHead;null!==r;r=r._next)r._nextPrevious=r._next;for(r=this._additionsHead;null!==r;r=r._nextAdded)r.previousIndex=r.currentIndex;for(this._additionsHead=this._additionsTail=null,r=this._movesHead;null!==r;r=r._nextMoved)r.previousIndex=r.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(r,s,a,l){let f;return null===r?f=this._itTail:(f=r._prev,this._remove(r)),null!==(r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(a,null))?(Object.is(r.item,s)||this._addIdentityChange(r,s),this._reinsertAfter(r,f,l)):null!==(r=null===this._linkedRecords?null:this._linkedRecords.get(a,l))?(Object.is(r.item,s)||this._addIdentityChange(r,s),this._moveAfter(r,f,l)):r=this._addAfter(new zD(s,a),f,l),r}_verifyReinsertion(r,s,a,l){let f=null===this._unlinkedRecords?null:this._unlinkedRecords.get(a,null);return null!==f?r=this._reinsertAfter(f,r._prev,l):r.currentIndex!=l&&(r.currentIndex=l,this._addToMoves(r,l)),r}_truncate(r){for(;null!==r;){const s=r._next;this._addToRemovals(this._unlink(r)),r=s}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(r,s,a){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(r);const l=r._prevRemoved,f=r._nextRemoved;return null===l?this._removalsHead=f:l._nextRemoved=f,null===f?this._removalsTail=l:f._prevRemoved=l,this._insertAfter(r,s,a),this._addToMoves(r,a),r}_moveAfter(r,s,a){return this._unlink(r),this._insertAfter(r,s,a),this._addToMoves(r,a),r}_addAfter(r,s,a){return this._insertAfter(r,s,a),this._additionsTail=null===this._additionsTail?this._additionsHead=r:this._additionsTail._nextAdded=r,r}_insertAfter(r,s,a){const l=null===s?this._itHead:s._next;return r._next=l,r._prev=s,null===l?this._itTail=r:l._prev=r,null===s?this._itHead=r:s._next=r,null===this._linkedRecords&&(this._linkedRecords=new uw),this._linkedRecords.put(r),r.currentIndex=a,r}_remove(r){return this._addToRemovals(this._unlink(r))}_unlink(r){null!==this._linkedRecords&&this._linkedRecords.remove(r);const s=r._prev,a=r._next;return null===s?this._itHead=a:s._next=a,null===a?this._itTail=s:a._prev=s,r}_addToMoves(r,s){return r.previousIndex===s||(this._movesTail=null===this._movesTail?this._movesHead=r:this._movesTail._nextMoved=r),r}_addToRemovals(r){return null===this._unlinkedRecords&&(this._unlinkedRecords=new uw),this._unlinkedRecords.put(r),r.currentIndex=null,r._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=r,r._prevRemoved=null):(r._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=r),r}_addIdentityChange(r,s){return r.item=s,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=r:this._identityChangesTail._nextIdentityChange=r,r}}class zD{constructor(r,s){this.item=r,this.trackById=s,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class KD{constructor(){this._head=null,this._tail=null}add(r){null===this._head?(this._head=this._tail=r,r._nextDup=null,r._prevDup=null):(this._tail._nextDup=r,r._prevDup=this._tail,r._nextDup=null,this._tail=r)}get(r,s){let a;for(a=this._head;null!==a;a=a._nextDup)if((null===s||s<=a.currentIndex)&&Object.is(a.trackById,r))return a;return null}remove(r){const s=r._prevDup,a=r._nextDup;return null===s?this._head=a:s._nextDup=a,null===a?this._tail=s:a._prevDup=s,null===this._head}}class uw{constructor(){this.map=new Map}put(r){const s=r.trackById;let a=this.map.get(s);a||(a=new KD,this.map.set(s,a)),a.add(r)}get(r,s){const l=this.map.get(r);return l?l.get(r,s):null}remove(r){const s=r.trackById;return this.map.get(s).remove(r)&&this.map.delete(s),r}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function lw(n,r,s){const a=n.previousIndex;if(null===a)return a;let l=0;return s&&a{if(s&&s.key===l)this._maybeAddToChanges(s,a),this._appendAfter=s,s=s._next;else{const f=this._getOrCreateRecordForKey(l,a);s=this._insertBeforeOrAppend(s,f)}}),s){s._prev&&(s._prev._next=null),this._removalsHead=s;for(let a=s;null!==a;a=a._nextRemoved)a===this._mapHead&&(this._mapHead=null),this._records.delete(a.key),a._nextRemoved=a._next,a.previousValue=a.currentValue,a.currentValue=null,a._prev=null,a._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(r,s){if(r){const a=r._prev;return s._next=r,s._prev=a,r._prev=s,a&&(a._next=s),r===this._mapHead&&(this._mapHead=s),this._appendAfter=r,r}return this._appendAfter?(this._appendAfter._next=s,s._prev=this._appendAfter):this._mapHead=s,this._appendAfter=s,null}_getOrCreateRecordForKey(r,s){if(this._records.has(r)){const l=this._records.get(r);this._maybeAddToChanges(l,s);const f=l._prev,E=l._next;return f&&(f._next=E),E&&(E._prev=f),l._next=null,l._prev=null,l}const a=new ZD(r);return this._records.set(r,a),a.currentValue=s,this._addToAdditions(a),a}_reset(){if(this.isDirty){let r;for(this._previousMapHead=this._mapHead,r=this._previousMapHead;null!==r;r=r._next)r._nextPrevious=r._next;for(r=this._changesHead;null!==r;r=r._nextChanged)r.previousValue=r.currentValue;for(r=this._additionsHead;null!=r;r=r._nextAdded)r.previousValue=r.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(r,s){Object.is(s,r.currentValue)||(r.previousValue=r.currentValue,r.currentValue=s,this._addToChanges(r))}_addToAdditions(r){null===this._additionsHead?this._additionsHead=this._additionsTail=r:(this._additionsTail._nextAdded=r,this._additionsTail=r)}_addToChanges(r){null===this._changesHead?this._changesHead=this._changesTail=r:(this._changesTail._nextChanged=r,this._changesTail=r)}_forEach(r,s){r instanceof Map?r.forEach(s):Object.keys(r).forEach(a=>s(r[a],a))}}class ZD{constructor(r){this.key=r,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function dw(){return new Gv([new aw])}let Gv=(()=>{class n{constructor(s){this.factories=s}static create(s,a){if(null!=a){const l=a.factories.slice();s=s.concat(l)}return new n(s)}static extend(s){return{provide:n,useFactory:a=>n.create(s,a||dw()),deps:[[n,new bn,new Vs]]}}find(s){const a=this.factories.find(l=>l.supports(s));if(null!=a)return a;throw new Ye(901,"")}}return n.\u0275prov=It({token:n,providedIn:"root",factory:dw}),n})();function hw(){return new zv([new cw])}let zv=(()=>{class n{constructor(s){this.factories=s}static create(s,a){if(a){const l=a.factories.slice();s=s.concat(l)}return new n(s)}static extend(s){return{provide:n,useFactory:a=>n.create(s,a||hw()),deps:[[n,new bn,new Vs]]}}find(s){const a=this.factories.find(f=>f.supports(s));if(a)return a;throw new Ye(901,"")}}return n.\u0275prov=It({token:n,providedIn:"root",factory:hw}),n})();const QD=q0(null,"core",[]);let JD=(()=>{class n{constructor(s){}}return n.\u0275fac=function(s){return new(s||n)(Vn(Jy))},n.\u0275mod=hn({type:n}),n.\u0275inj=nt({}),n})();function XD(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}},4006:(Wt,je,S)=>{S.d(je,{Cf:()=>Ze,EJ:()=>qs,Fj:()=>Ke,JJ:()=>ln,JL:()=>yr,JU:()=>ge,Kr:()=>ui,On:()=>Os,QS:()=>Oi,UX:()=>Lr,YN:()=>Rs,_Y:()=>Pi,a5:()=>er,kI:()=>kt,sg:()=>Cr,u:()=>Gi,u5:()=>Zn});var m=S(4650),g=S(6895),K=S(8996),ae=S(4128),oe=S(4004);let _e=(()=>{class U{constructor(P,X){this._renderer=P,this._elementRef=X,this.onChange=gt=>{},this.onTouched=()=>{}}setProperty(P,X){this._renderer.setProperty(this._elementRef.nativeElement,P,X)}registerOnTouched(P){this.onTouched=P}registerOnChange(P){this.onChange=P}setDisabledState(P){this.setProperty("disabled",P)}}return U.\u0275fac=function(P){return new(P||U)(m.Y36(m.Qsj),m.Y36(m.SBq))},U.\u0275dir=m.lG2({type:U}),U})(),fe=(()=>{class U extends _e{}return U.\u0275fac=function(){let O;return function(X){return(O||(O=m.n5z(U)))(X||U)}}(),U.\u0275dir=m.lG2({type:U,features:[m.qOj]}),U})();const ge=new m.OlP("NgValueAccessor"),ce={provide:ge,useExisting:(0,m.Gpc)(()=>Ke),multi:!0},it=new m.OlP("CompositionEventMode");let Ke=(()=>{class U extends _e{constructor(P,X,gt){super(P,X),this._compositionMode=gt,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function me(){const U=(0,g.q)()?(0,g.q)().getUserAgent():"";return/android (\d+)/.test(U.toLowerCase())}())}writeValue(P){this.setProperty("value",P??"")}_handleInput(P){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(P)}_compositionStart(){this._composing=!0}_compositionEnd(P){this._composing=!1,this._compositionMode&&this.onChange(P)}}return U.\u0275fac=function(P){return new(P||U)(m.Y36(m.Qsj),m.Y36(m.SBq),m.Y36(it,8))},U.\u0275dir=m.lG2({type:U,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(P,X){1&P&&m.NdJ("input",function(un){return X._handleInput(un.target.value)})("blur",function(){return X.onTouched()})("compositionstart",function(){return X._compositionStart()})("compositionend",function(un){return X._compositionEnd(un.target.value)})},features:[m._Bn([ce]),m.qOj]}),U})();function Ye(U){return null==U||("string"==typeof U||Array.isArray(U))&&0===U.length}function ht(U){return null!=U&&"number"==typeof U.length}const Ze=new m.OlP("NgValidators"),Qe=new m.OlP("NgAsyncValidators"),Ee=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class kt{static min(O){return function ot(U){return O=>{if(Ye(O.value)||Ye(U))return null;const P=parseFloat(O.value);return!isNaN(P)&&P{if(Ye(O.value)||Ye(U))return null;const P=parseFloat(O.value);return!isNaN(P)&&P>U?{max:{max:U,actual:O.value}}:null}}(O)}static required(O){return function xe(U){return Ye(U.value)?{required:!0}:null}(O)}static requiredTrue(O){return function Nt(U){return!0===U.value?null:{required:!0}}(O)}static email(O){return function Lt(U){return Ye(U.value)||Ee.test(U.value)?null:{email:!0}}(O)}static minLength(O){return function Se(U){return O=>Ye(O.value)||!ht(O.value)?null:O.value.lengthht(O.value)&&O.value.length>U?{maxlength:{requiredLength:U,actualLength:O.value.length}}:null}(O)}static pattern(O){return function Ce(U){if(!U)return et;let O,P;return"string"==typeof U?(P="","^"!==U.charAt(0)&&(P+="^"),P+=U,"$"!==U.charAt(U.length-1)&&(P+="$"),O=new RegExp(P)):(P=U.toString(),O=U),X=>{if(Ye(X.value))return null;const gt=X.value;return O.test(gt)?null:{pattern:{requiredPattern:P,actualValue:gt}}}}(O)}static nullValidator(O){return null}static compose(O){return Mt(O)}static composeAsync(O){return ft(O)}}function et(U){return null}function lt(U){return null!=U}function at(U){const O=(0,m.QGY)(U)?(0,K.D)(U):U;return(0,m.CqO)(O),O}function Je(U){let O={};return U.forEach(P=>{O=null!=P?{...O,...P}:O}),0===Object.keys(O).length?null:O}function pn(U,O){return O.map(P=>P(U))}function St(U){return U.map(O=>function Tn(U){return!U.validate}(O)?O:P=>O.validate(P))}function Mt(U){if(!U)return null;const O=U.filter(lt);return 0==O.length?null:function(P){return Je(pn(P,O))}}function pe(U){return null!=U?Mt(St(U)):null}function ft(U){if(!U)return null;const O=U.filter(lt);return 0==O.length?null:function(P){const X=pn(P,O).map(at);return(0,ae.D)(X).pipe((0,oe.U)(Je))}}function Et(U){return null!=U?ft(St(U)):null}function sn(U,O){return null===U?[O]:Array.isArray(U)?[...U,O]:[U,O]}function It(U){return U._rawValidators}function Rn(U){return U._rawAsyncValidators}function nt(U){return U?Array.isArray(U)?U:[U]:[]}function ut(U,O){return Array.isArray(U)?U.includes(O):U===O}function Kt(U,O){const P=nt(O);return nt(U).forEach(gt=>{ut(P,gt)||P.push(gt)}),P}function Ht(U,O){return nt(O).filter(P=>!ut(U,P))}class Zt{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(O){this._rawValidators=O||[],this._composedValidatorFn=pe(this._rawValidators)}_setAsyncValidators(O){this._rawAsyncValidators=O||[],this._composedAsyncValidatorFn=Et(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(O){this._onDestroyCallbacks.push(O)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(O=>O()),this._onDestroyCallbacks=[]}reset(O){this.control&&this.control.reset(O)}hasError(O,P){return!!this.control&&this.control.hasError(O,P)}getError(O,P){return this.control?this.control.getError(O,P):null}}class wn extends Zt{get formDirective(){return null}get path(){return null}}class er extends Zt{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Jn{constructor(O){this._cd=O}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let ln=(()=>{class U extends Jn{constructor(P){super(P)}}return U.\u0275fac=function(P){return new(P||U)(m.Y36(er,2))},U.\u0275dir=m.lG2({type:U,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(P,X){2&P&&m.ekj("ng-untouched",X.isUntouched)("ng-touched",X.isTouched)("ng-pristine",X.isPristine)("ng-dirty",X.isDirty)("ng-valid",X.isValid)("ng-invalid",X.isInvalid)("ng-pending",X.isPending)},features:[m.qOj]}),U})(),yr=(()=>{class U extends Jn{constructor(P){super(P)}}return U.\u0275fac=function(P){return new(P||U)(m.Y36(wn,10))},U.\u0275dir=m.lG2({type:U,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(P,X){2&P&&m.ekj("ng-untouched",X.isUntouched)("ng-touched",X.isTouched)("ng-pristine",X.isPristine)("ng-dirty",X.isDirty)("ng-valid",X.isValid)("ng-invalid",X.isInvalid)("ng-pending",X.isPending)("ng-submitted",X.isSubmitted)},features:[m.qOj]}),U})();const we="VALID",Ae="INVALID",Tt="PENDING",se="DISABLED";function J(U){return(hn(U)?U.validators:U)||null}function le(U){return Array.isArray(U)?pe(U):U||null}function rt(U,O){return(hn(O)?O.asyncValidators:U)||null}function Qt(U){return Array.isArray(U)?Et(U):U||null}function hn(U){return null!=U&&!Array.isArray(U)&&"object"==typeof U}function fn(U,O,P){const X=U.controls;if(!(O?Object.keys(X):X).length)throw new m.vHH(1e3,"");if(!X[P])throw new m.vHH(1001,"")}function Pn(U,O,P){U._forEachChild((X,gt)=>{if(void 0===P[gt])throw new m.vHH(1002,"")})}class Pr{constructor(O,P){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=O,this._rawAsyncValidators=P,this._composedValidatorFn=le(this._rawValidators),this._composedAsyncValidatorFn=Qt(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(O){this._rawValidators=this._composedValidatorFn=O}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(O){this._rawAsyncValidators=this._composedAsyncValidatorFn=O}get parent(){return this._parent}get valid(){return this.status===we}get invalid(){return this.status===Ae}get pending(){return this.status==Tt}get disabled(){return this.status===se}get enabled(){return this.status!==se}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(O){this._rawValidators=O,this._composedValidatorFn=le(O)}setAsyncValidators(O){this._rawAsyncValidators=O,this._composedAsyncValidatorFn=Qt(O)}addValidators(O){this.setValidators(Kt(O,this._rawValidators))}addAsyncValidators(O){this.setAsyncValidators(Kt(O,this._rawAsyncValidators))}removeValidators(O){this.setValidators(Ht(O,this._rawValidators))}removeAsyncValidators(O){this.setAsyncValidators(Ht(O,this._rawAsyncValidators))}hasValidator(O){return ut(this._rawValidators,O)}hasAsyncValidator(O){return ut(this._rawAsyncValidators,O)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(O={}){this.touched=!0,this._parent&&!O.onlySelf&&this._parent.markAsTouched(O)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(O=>O.markAllAsTouched())}markAsUntouched(O={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(P=>{P.markAsUntouched({onlySelf:!0})}),this._parent&&!O.onlySelf&&this._parent._updateTouched(O)}markAsDirty(O={}){this.pristine=!1,this._parent&&!O.onlySelf&&this._parent.markAsDirty(O)}markAsPristine(O={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(P=>{P.markAsPristine({onlySelf:!0})}),this._parent&&!O.onlySelf&&this._parent._updatePristine(O)}markAsPending(O={}){this.status=Tt,!1!==O.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!O.onlySelf&&this._parent.markAsPending(O)}disable(O={}){const P=this._parentMarkedDirty(O.onlySelf);this.status=se,this.errors=null,this._forEachChild(X=>{X.disable({...O,onlySelf:!0})}),this._updateValue(),!1!==O.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...O,skipPristineCheck:P}),this._onDisabledChange.forEach(X=>X(!0))}enable(O={}){const P=this._parentMarkedDirty(O.onlySelf);this.status=we,this._forEachChild(X=>{X.enable({...O,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:O.emitEvent}),this._updateAncestors({...O,skipPristineCheck:P}),this._onDisabledChange.forEach(X=>X(!1))}_updateAncestors(O){this._parent&&!O.onlySelf&&(this._parent.updateValueAndValidity(O),O.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(O){this._parent=O}getRawValue(){return this.value}updateValueAndValidity(O={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===we||this.status===Tt)&&this._runAsyncValidator(O.emitEvent)),!1!==O.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!O.onlySelf&&this._parent.updateValueAndValidity(O)}_updateTreeValidity(O={emitEvent:!0}){this._forEachChild(P=>P._updateTreeValidity(O)),this.updateValueAndValidity({onlySelf:!0,emitEvent:O.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?se:we}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(O){if(this.asyncValidator){this.status=Tt,this._hasOwnPendingAsyncValidator=!0;const P=at(this.asyncValidator(this));this._asyncValidationSubscription=P.subscribe(X=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(X,{emitEvent:O})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(O,P={}){this.errors=O,this._updateControlsErrors(!1!==P.emitEvent)}get(O){let P=O;return null==P||(Array.isArray(P)||(P=P.split(".")),0===P.length)?null:P.reduce((X,gt)=>X&&X._find(gt),this)}getError(O,P){const X=P?this.get(P):this;return X&&X.errors?X.errors[O]:null}hasError(O,P){return!!this.getError(O,P)}get root(){let O=this;for(;O._parent;)O=O._parent;return O}_updateControlsErrors(O){this.status=this._calculateStatus(),O&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(O)}_initObservables(){this.valueChanges=new m.vpe,this.statusChanges=new m.vpe}_calculateStatus(){return this._allControlsDisabled()?se:this.errors?Ae:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Tt)?Tt:this._anyControlsHaveStatus(Ae)?Ae:we}_anyControlsHaveStatus(O){return this._anyControls(P=>P.status===O)}_anyControlsDirty(){return this._anyControls(O=>O.dirty)}_anyControlsTouched(){return this._anyControls(O=>O.touched)}_updatePristine(O={}){this.pristine=!this._anyControlsDirty(),this._parent&&!O.onlySelf&&this._parent._updatePristine(O)}_updateTouched(O={}){this.touched=this._anyControlsTouched(),this._parent&&!O.onlySelf&&this._parent._updateTouched(O)}_registerOnCollectionChange(O){this._onCollectionChange=O}_setUpdateStrategy(O){hn(O)&&null!=O.updateOn&&(this._updateOn=O.updateOn)}_parentMarkedDirty(O){return!O&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(O){return null}}class Nr extends Pr{constructor(O,P,X){super(J(P),rt(X,P)),this.controls=O,this._initObservables(),this._setUpdateStrategy(P),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(O,P){return this.controls[O]?this.controls[O]:(this.controls[O]=P,P.setParent(this),P._registerOnCollectionChange(this._onCollectionChange),P)}addControl(O,P,X={}){this.registerControl(O,P),this.updateValueAndValidity({emitEvent:X.emitEvent}),this._onCollectionChange()}removeControl(O,P={}){this.controls[O]&&this.controls[O]._registerOnCollectionChange(()=>{}),delete this.controls[O],this.updateValueAndValidity({emitEvent:P.emitEvent}),this._onCollectionChange()}setControl(O,P,X={}){this.controls[O]&&this.controls[O]._registerOnCollectionChange(()=>{}),delete this.controls[O],P&&this.registerControl(O,P),this.updateValueAndValidity({emitEvent:X.emitEvent}),this._onCollectionChange()}contains(O){return this.controls.hasOwnProperty(O)&&this.controls[O].enabled}setValue(O,P={}){Pn(this,0,O),Object.keys(O).forEach(X=>{fn(this,!0,X),this.controls[X].setValue(O[X],{onlySelf:!0,emitEvent:P.emitEvent})}),this.updateValueAndValidity(P)}patchValue(O,P={}){null!=O&&(Object.keys(O).forEach(X=>{const gt=this.controls[X];gt&>.patchValue(O[X],{onlySelf:!0,emitEvent:P.emitEvent})}),this.updateValueAndValidity(P))}reset(O={},P={}){this._forEachChild((X,gt)=>{X.reset(O[gt],{onlySelf:!0,emitEvent:P.emitEvent})}),this._updatePristine(P),this._updateTouched(P),this.updateValueAndValidity(P)}getRawValue(){return this._reduceChildren({},(O,P,X)=>(O[X]=P.getRawValue(),O))}_syncPendingControls(){let O=this._reduceChildren(!1,(P,X)=>!!X._syncPendingControls()||P);return O&&this.updateValueAndValidity({onlySelf:!0}),O}_forEachChild(O){Object.keys(this.controls).forEach(P=>{const X=this.controls[P];X&&O(X,P)})}_setUpControls(){this._forEachChild(O=>{O.setParent(this),O._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(O){for(const[P,X]of Object.entries(this.controls))if(this.contains(P)&&O(X))return!0;return!1}_reduceValue(){return this._reduceChildren({},(P,X,gt)=>((X.enabled||this.disabled)&&(P[gt]=X.value),P))}_reduceChildren(O,P){let X=O;return this._forEachChild((gt,un)=>{X=P(X,gt,un)}),X}_allControlsDisabled(){for(const O of Object.keys(this.controls))if(this.controls[O].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(O){return this.controls.hasOwnProperty(O)?this.controls[O]:null}}function Sr(U,O){return[...O.path,U]}function zt(U,O){ve(U,O),O.valueAccessor.writeValue(U.value),U.disabled&&O.valueAccessor.setDisabledState?.(!0),function _t(U,O){O.valueAccessor.registerOnChange(P=>{U._pendingValue=P,U._pendingChange=!0,U._pendingDirty=!0,"change"===U.updateOn&&qn(U,O)})}(U,O),function _r(U,O){const P=(X,gt)=>{O.valueAccessor.writeValue(X),gt&&O.viewToModelUpdate(X)};U.registerOnChange(P),O._registerOnDestroy(()=>{U._unregisterOnChange(P)})}(U,O),function $t(U,O){O.valueAccessor.registerOnTouched(()=>{U._pendingTouched=!0,"blur"===U.updateOn&&U._pendingChange&&qn(U,O),"submit"!==U.updateOn&&U.markAsTouched()})}(U,O),function Re(U,O){if(O.valueAccessor.setDisabledState){const P=X=>{O.valueAccessor.setDisabledState(X)};U.registerOnDisabledChange(P),O._registerOnDestroy(()=>{U._unregisterOnDisabledChange(P)})}}(U,O)}function Nn(U,O,P=!0){const X=()=>{};O.valueAccessor&&(O.valueAccessor.registerOnChange(X),O.valueAccessor.registerOnTouched(X)),We(U,O),U&&(O._invokeOnDestroyCallbacks(),U._registerOnCollectionChange(()=>{}))}function $e(U,O){U.forEach(P=>{P.registerOnValidatorChange&&P.registerOnValidatorChange(O)})}function ve(U,O){const P=It(U);null!==O.validator?U.setValidators(sn(P,O.validator)):"function"==typeof P&&U.setValidators([P]);const X=Rn(U);null!==O.asyncValidator?U.setAsyncValidators(sn(X,O.asyncValidator)):"function"==typeof X&&U.setAsyncValidators([X]);const gt=()=>U.updateValueAndValidity();$e(O._rawValidators,gt),$e(O._rawAsyncValidators,gt)}function We(U,O){let P=!1;if(null!==U){if(null!==O.validator){const gt=It(U);if(Array.isArray(gt)&>.length>0){const un=gt.filter(Br=>Br!==O.validator);un.length!==gt.length&&(P=!0,U.setValidators(un))}}if(null!==O.asyncValidator){const gt=Rn(U);if(Array.isArray(gt)&>.length>0){const un=gt.filter(Br=>Br!==O.asyncValidator);un.length!==gt.length&&(P=!0,U.setAsyncValidators(un))}}}const X=()=>{};return $e(O._rawValidators,X),$e(O._rawAsyncValidators,X),P}function qn(U,O){U._pendingDirty&&U.markAsDirty(),U.setValue(U._pendingValue,{emitModelToViewChange:!1}),O.viewToModelUpdate(U._pendingValue),U._pendingChange=!1}function ss(U,O){if(!U.hasOwnProperty("model"))return!1;const P=U.model;return!!P.isFirstChange()||!Object.is(O,P.currentValue)}function oi(U,O){if(!O)return null;let P,X,gt;return Array.isArray(O),O.forEach(un=>{un.constructor===Ke?P=un:function Ai(U){return Object.getPrototypeOf(U.constructor)===fe}(un)?X=un:gt=un}),gt||X||P||null}function ei(U,O){const P=U.indexOf(O);P>-1&&U.splice(P,1)}function Fi(U){return"object"==typeof U&&null!==U&&2===Object.keys(U).length&&"value"in U&&"disabled"in U}const Li=class extends Pr{constructor(O=null,P,X){super(J(P),rt(X,P)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(O),this._setUpdateStrategy(P),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),hn(P)&&(P.nonNullable||P.initialValueIsDefault)&&(this.defaultValue=Fi(O)?O.value:O)}setValue(O,P={}){this.value=this._pendingValue=O,this._onChange.length&&!1!==P.emitModelToViewChange&&this._onChange.forEach(X=>X(this.value,!1!==P.emitViewToModelChange)),this.updateValueAndValidity(P)}patchValue(O,P={}){this.setValue(O,P)}reset(O=this.defaultValue,P={}){this._applyFormState(O),this.markAsPristine(P),this.markAsUntouched(P),this.setValue(this.value,P),this._pendingChange=!1}_updateValue(){}_anyControls(O){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(O){this._onChange.push(O)}_unregisterOnChange(O){ei(this._onChange,O)}registerOnDisabledChange(O){this._onDisabledChange.push(O)}_unregisterOnDisabledChange(O){ei(this._onDisabledChange,O)}_forEachChild(O){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(O){Fi(O)?(this.value=this._pendingValue=O.value,O.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=O}},xr={provide:er,useExisting:(0,m.Gpc)(()=>Os)},Mo=(()=>Promise.resolve(null))();let Os=(()=>{class U extends er{constructor(P,X,gt,un,Br){super(),this._changeDetectorRef=Br,this.control=new Li,this._registered=!1,this.update=new m.vpe,this._parent=P,this._setValidators(X),this._setAsyncValidators(gt),this.valueAccessor=oi(0,un)}ngOnChanges(P){if(this._checkForErrors(),!this._registered||"name"in P){if(this._registered&&(this._checkName(),this.formDirective)){const X=P.name.previousValue;this.formDirective.removeControl({name:X,path:this._getPath(X)})}this._setUpControl()}"isDisabled"in P&&this._updateDisabled(P),ss(P,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(P){this.viewModel=P,this.update.emit(P)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){zt(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(P){Mo.then(()=>{this.control.setValue(P,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(P){const X=P.isDisabled.currentValue,gt=0!==X&&(0,m.D6c)(X);Mo.then(()=>{gt&&!this.control.disabled?this.control.disable():!gt&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(P){return this._parent?Sr(P,this._parent):[P]}}return U.\u0275fac=function(P){return new(P||U)(m.Y36(wn,9),m.Y36(Ze,10),m.Y36(Qe,10),m.Y36(ge,10),m.Y36(m.sBO,8))},U.\u0275dir=m.lG2({type:U,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[m._Bn([xr]),m.qOj,m.TTD]}),U})(),Pi=(()=>{class U{}return U.\u0275fac=function(P){return new(P||U)},U.\u0275dir=m.lG2({type:U,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),U})(),qe=(()=>{class U{}return U.\u0275fac=function(P){return new(P||U)},U.\u0275mod=m.oAB({type:U}),U.\u0275inj=m.cJS({}),U})();const cn=new m.OlP("NgModelWithFormControlWarning"),Wn={provide:wn,useExisting:(0,m.Gpc)(()=>Cr)};let Cr=(()=>{class U extends wn{constructor(P,X){super(),this.validators=P,this.asyncValidators=X,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new m.vpe,this._setValidators(P),this._setAsyncValidators(X)}ngOnChanges(P){this._checkFormPresent(),P.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(We(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(P){const X=this.form.get(P.path);return zt(X,P),X.updateValueAndValidity({emitEvent:!1}),this.directives.push(P),X}getControl(P){return this.form.get(P.path)}removeControl(P){Nn(P.control||null,P,!1),function Ur(U,O){const P=U.indexOf(O);P>-1&&U.splice(P,1)}(this.directives,P)}addFormGroup(P){this._setUpFormContainer(P)}removeFormGroup(P){this._cleanUpFormContainer(P)}getFormGroup(P){return this.form.get(P.path)}addFormArray(P){this._setUpFormContainer(P)}removeFormArray(P){this._cleanUpFormContainer(P)}getFormArray(P){return this.form.get(P.path)}updateModel(P,X){this.form.get(P.path).setValue(X)}onSubmit(P){return this.submitted=!0,function Gr(U,O){U._syncPendingControls(),O.forEach(P=>{const X=P.control;"submit"===X.updateOn&&X._pendingChange&&(P.viewToModelUpdate(X._pendingValue),X._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(P),!1}onReset(){this.resetForm()}resetForm(P){this.form.reset(P),this.submitted=!1}_updateDomValue(){this.directives.forEach(P=>{const X=P.control,gt=this.form.get(P.path);X!==gt&&(Nn(X||null,P),(U=>U instanceof Li)(gt)&&(zt(gt,P),P.control=gt))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(P){const X=this.form.get(P.path);(function yn(U,O){ve(U,O)})(X,P),X.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(P){if(this.form){const X=this.form.get(P.path);X&&function Mr(U,O){return We(U,O)}(X,P)&&X.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ve(this.form,this),this._oldForm&&We(this._oldForm,this)}_checkFormPresent(){}}return U.\u0275fac=function(P){return new(P||U)(m.Y36(Ze,10),m.Y36(Qe,10))},U.\u0275dir=m.lG2({type:U,selectors:[["","formGroup",""]],hostBindings:function(P,X){1&P&&m.NdJ("submit",function(un){return X.onSubmit(un)})("reset",function(){return X.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[m._Bn([Wn]),m.qOj,m.TTD]}),U})();const Xi={provide:er,useExisting:(0,m.Gpc)(()=>Gi)};let Gi=(()=>{class U extends er{constructor(P,X,gt,un,Br){super(),this._ngModelWarningConfig=Br,this._added=!1,this.update=new m.vpe,this._ngModelWarningSent=!1,this._parent=P,this._setValidators(X),this._setAsyncValidators(gt),this.valueAccessor=oi(0,un)}set isDisabled(P){}ngOnChanges(P){this._added||this._setUpControl(),ss(P,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(P){this.viewModel=P,this.update.emit(P)}get path(){return Sr(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return U._ngModelWarningSentOnce=!1,U.\u0275fac=function(P){return new(P||U)(m.Y36(wn,13),m.Y36(Ze,10),m.Y36(Qe,10),m.Y36(ge,10),m.Y36(cn,8))},U.\u0275dir=m.lG2({type:U,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[m._Bn([Xi]),m.qOj,m.TTD]}),U})();const Es={provide:ge,useExisting:(0,m.Gpc)(()=>qs),multi:!0};function io(U,O){return null==U?`${O}`:(O&&"object"==typeof O&&(O="Object"),`${U}: ${O}`.slice(0,50))}let qs=(()=>{class U extends fe{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(P){this._compareWith=P}writeValue(P){this.value=P;const gt=io(this._getOptionId(P),P);this.setProperty("value",gt)}registerOnChange(P){this.onChange=X=>{this.value=this._getOptionValue(X),P(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(P){for(const X of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(X),P))return X;return null}_getOptionValue(P){const X=function _o(U){return U.split(":")[0]}(P);return this._optionMap.has(X)?this._optionMap.get(X):P}}return U.\u0275fac=function(){let O;return function(X){return(O||(O=m.n5z(U)))(X||U)}}(),U.\u0275dir=m.lG2({type:U,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(P,X){1&P&&m.NdJ("change",function(un){return X.onChange(un.target.value)})("blur",function(){return X.onTouched()})},inputs:{compareWith:"compareWith"},features:[m._Bn([Es]),m.qOj]}),U})(),Rs=(()=>{class U{constructor(P,X,gt){this._element=P,this._renderer=X,this._select=gt,this._select&&(this.id=this._select._registerOption())}set ngValue(P){null!=this._select&&(this._select._optionMap.set(this.id,P),this._setElementValue(io(this.id,P)),this._select.writeValue(this._select.value))}set value(P){this._setElementValue(P),this._select&&this._select.writeValue(this._select.value)}_setElementValue(P){this._renderer.setProperty(this._element.nativeElement,"value",P)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return U.\u0275fac=function(P){return new(P||U)(m.Y36(m.SBq),m.Y36(m.Qsj),m.Y36(qs,9))},U.\u0275dir=m.lG2({type:U,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),U})();const ws={provide:ge,useExisting:(0,m.Gpc)(()=>lr),multi:!0};function Ps(U,O){return null==U?`${O}`:("string"==typeof O&&(O=`'${O}'`),O&&"object"==typeof O&&(O="Object"),`${U}: ${O}`.slice(0,50))}let lr=(()=>{class U extends fe{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(P){this._compareWith=P}writeValue(P){let X;if(this.value=P,Array.isArray(P)){const gt=P.map(un=>this._getOptionId(un));X=(un,Br)=>{un._setSelected(gt.indexOf(Br.toString())>-1)}}else X=(gt,un)=>{gt._setSelected(!1)};this._optionMap.forEach(X)}registerOnChange(P){this.onChange=X=>{const gt=[],un=X.selectedOptions;if(void 0!==un){const Br=un;for(let ci=0;ci{class U{constructor(P,X,gt){this._element=P,this._renderer=X,this._select=gt,this._select&&(this.id=this._select._registerOption(this))}set ngValue(P){null!=this._select&&(this._value=P,this._setElementValue(Ps(this.id,P)),this._select.writeValue(this._select.value))}set value(P){this._select?(this._value=P,this._setElementValue(Ps(this.id,P)),this._select.writeValue(this._select.value)):this._setElementValue(P)}_setElementValue(P){this._renderer.setProperty(this._element.nativeElement,"value",P)}_setSelected(P){this._renderer.setProperty(this._element.nativeElement,"selected",P)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return U.\u0275fac=function(P){return new(P||U)(m.Y36(m.SBq),m.Y36(m.Qsj),m.Y36(lr,9))},U.\u0275dir=m.lG2({type:U,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),U})(),Tr=(()=>{class U{}return U.\u0275fac=function(P){return new(P||U)},U.\u0275mod=m.oAB({type:U}),U.\u0275inj=m.cJS({imports:[qe]}),U})(),Zn=(()=>{class U{}return U.\u0275fac=function(P){return new(P||U)},U.\u0275mod=m.oAB({type:U}),U.\u0275inj=m.cJS({imports:[Tr]}),U})(),Lr=(()=>{class U{static withConfig(P){return{ngModule:U,providers:[{provide:cn,useValue:P.warnOnNgModelWithFormControl}]}}}return U.\u0275fac=function(P){return new(P||U)},U.\u0275mod=m.oAB({type:U}),U.\u0275inj=m.cJS({imports:[Tr]}),U})();class or extends Pr{constructor(O,P,X){super(J(P),rt(X,P)),this.controls=O,this._initObservables(),this._setUpdateStrategy(P),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(O){return this.controls[this._adjustIndex(O)]}push(O,P={}){this.controls.push(O),this._registerControl(O),this.updateValueAndValidity({emitEvent:P.emitEvent}),this._onCollectionChange()}insert(O,P,X={}){this.controls.splice(O,0,P),this._registerControl(P),this.updateValueAndValidity({emitEvent:X.emitEvent})}removeAt(O,P={}){let X=this._adjustIndex(O);X<0&&(X=0),this.controls[X]&&this.controls[X]._registerOnCollectionChange(()=>{}),this.controls.splice(X,1),this.updateValueAndValidity({emitEvent:P.emitEvent})}setControl(O,P,X={}){let gt=this._adjustIndex(O);gt<0&&(gt=0),this.controls[gt]&&this.controls[gt]._registerOnCollectionChange(()=>{}),this.controls.splice(gt,1),P&&(this.controls.splice(gt,0,P),this._registerControl(P)),this.updateValueAndValidity({emitEvent:X.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(O,P={}){Pn(this,0,O),O.forEach((X,gt)=>{fn(this,!1,gt),this.at(gt).setValue(X,{onlySelf:!0,emitEvent:P.emitEvent})}),this.updateValueAndValidity(P)}patchValue(O,P={}){null!=O&&(O.forEach((X,gt)=>{this.at(gt)&&this.at(gt).patchValue(X,{onlySelf:!0,emitEvent:P.emitEvent})}),this.updateValueAndValidity(P))}reset(O=[],P={}){this._forEachChild((X,gt)=>{X.reset(O[gt],{onlySelf:!0,emitEvent:P.emitEvent})}),this._updatePristine(P),this._updateTouched(P),this.updateValueAndValidity(P)}getRawValue(){return this.controls.map(O=>O.getRawValue())}clear(O={}){this.controls.length<1||(this._forEachChild(P=>P._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:O.emitEvent}))}_adjustIndex(O){return O<0?O+this.length:O}_syncPendingControls(){let O=this.controls.reduce((P,X)=>!!X._syncPendingControls()||P,!1);return O&&this.updateValueAndValidity({onlySelf:!0}),O}_forEachChild(O){this.controls.forEach((P,X)=>{O(P,X)})}_updateValue(){this.value=this.controls.filter(O=>O.enabled||this.disabled).map(O=>O.value)}_anyControls(O){return this.controls.some(P=>P.enabled&&O(P))}_setUpControls(){this._forEachChild(O=>this._registerControl(O))}_allControlsDisabled(){for(const O of this.controls)if(O.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(O){O.setParent(this),O._registerOnCollectionChange(this._onCollectionChange)}_find(O){return this.at(O)??null}}function li(U){return!!U&&(void 0!==U.asyncValidators||void 0!==U.validators||void 0!==U.updateOn)}let bs=(()=>{class U{constructor(){this.useNonNullable=!1}get nonNullable(){const P=new U;return P.useNonNullable=!0,P}group(P,X=null){const gt=this._reduceControls(P);let ci,un=null,Br=null;return null!==X&&(li(X)?(un=null!=X.validators?X.validators:null,Br=null!=X.asyncValidators?X.asyncValidators:null,ci=null!=X.updateOn?X.updateOn:void 0):(un=null!=X.validator?X.validator:null,Br=null!=X.asyncValidator?X.asyncValidator:null)),new Nr(gt,{asyncValidators:Br,updateOn:ci,validators:un})}control(P,X,gt){let un={};return this.useNonNullable?(li(X)?un=X:(un.validators=X,un.asyncValidators=gt),new Li(P,{...un,nonNullable:!0})):new Li(P,X,gt)}array(P,X,gt){const un=P.map(Br=>this._createControl(Br));return new or(un,X,gt)}_reduceControls(P){const X={};return Object.keys(P).forEach(gt=>{X[gt]=this._createControl(P[gt])}),X}_createControl(P){return P instanceof Li||P instanceof Pr?P:Array.isArray(P)?this.control(P[0],P.length>1?P[1]:null,P.length>2?P[2]:null):this.control(P)}}return U.\u0275fac=function(P){return new(P||U)},U.\u0275prov=m.Yz7({token:U,factory:U.\u0275fac,providedIn:Lr}),U})(),Oi=(()=>{class U extends bs{group(P,X=null){return super.group(P,X)}control(P,X,gt){return super.control(P,X,gt)}array(P,X,gt){return super.array(P,X,gt)}}return U.\u0275fac=function(){let O;return function(X){return(O||(O=m.n5z(U)))(X||U)}}(),U.\u0275prov=m.Yz7({token:U,factory:U.\u0275fac,providedIn:Lr}),U})()},2327:(Wt,je,S)=>{S.d(je,{BQ:()=>Nt,wG:()=>Or,si:()=>Ct,pj:()=>et,Kr:()=>lt});var m=S(4650),g=S(4827),K=S(6895);let ie=(()=>{class se{}return se.\u0275fac=function(le){return new(le||se)},se.\u0275mod=m.oAB({type:se}),se.\u0275inj=m.cJS({}),se})();var me=S(3353),it=S(1281);const xe=new m.OlP("mat-sanity-checks",{providedIn:"root",factory:function Ne(){return!0}});let Nt=(()=>{class se{constructor(le,rt,Qt){this._sanityChecks=rt,this._document=Qt,this._hasDoneGlobalChecks=!1,le._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(le){return!(0,me.Oy)()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[le])}}return se.\u0275fac=function(le){return new(le||se)(m.LFG(g.qm),m.LFG(xe,8),m.LFG(K.K0))},se.\u0275mod=m.oAB({type:se}),se.\u0275inj=m.cJS({imports:[ie,ie]}),se})();function et(se,J){return class extends se{constructor(...le){super(...le),this.defaultColor=J,this.color=J}get color(){return this._color}set color(le){const rt=le||this.defaultColor;rt!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),rt&&this._elementRef.nativeElement.classList.add(`mat-${rt}`),this._color=rt)}}}function lt(se){return class extends se{constructor(...J){super(...J),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(J){this._disableRipple=(0,it.Ig)(J)}}}class Jn{constructor(J,le,rt,Qt=!1){this._renderer=J,this.element=le,this.config=rt,this._animationForciblyDisabledThroughCss=Qt,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const bt={enterDuration:225,exitDuration:150},ln=(0,me.i$)({passive:!0}),yr=["mousedown","touchstart"],Yn=["mouseup","mouseleave","touchend","touchcancel"];class gn{constructor(J,le,rt,Qt){this._target=J,this._ngZone=le,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,Qt.isBrowser&&(this._containerElement=(0,it.fI)(rt))}fadeInRipple(J,le,rt={}){const Qt=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),hn={...bt,...rt.animation};rt.centered&&(J=Qt.left+Qt.width/2,le=Qt.top+Qt.height/2);const fn=rt.radius||function Ti(se,J,le){const rt=Math.max(Math.abs(se-le.left),Math.abs(se-le.right)),Qt=Math.max(Math.abs(J-le.top),Math.abs(J-le.bottom));return Math.sqrt(rt*rt+Qt*Qt)}(J,le,Qt),Pn=J-Qt.left,Pr=le-Qt.top,Nr=hn.enterDuration,jn=document.createElement("div");jn.classList.add("mat-ripple-element"),jn.style.left=Pn-fn+"px",jn.style.top=Pr-fn+"px",jn.style.height=2*fn+"px",jn.style.width=2*fn+"px",null!=rt.color&&(jn.style.backgroundColor=rt.color),jn.style.transitionDuration=`${Nr}ms`,this._containerElement.appendChild(jn);const kr=window.getComputedStyle(jn),Fr=kr.transitionDuration,Sr="none"===kr.transitionProperty||"0s"===Fr||"0s, 0s"===Fr,zt=new Jn(this,jn,rt,Sr);jn.style.transform="scale3d(1, 1, 1)",zt.state=0,rt.persistent||(this._mostRecentTransientRipple=zt);let Nn=null;return!Sr&&(Nr||hn.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const $e=()=>this._finishRippleTransition(zt),Re=()=>this._destroyRipple(zt);jn.addEventListener("transitionend",$e),jn.addEventListener("transitioncancel",Re),Nn={onTransitionEnd:$e,onTransitionCancel:Re}}),this._activeRipples.set(zt,Nn),(Sr||!Nr)&&this._finishRippleTransition(zt),zt}fadeOutRipple(J){if(2===J.state||3===J.state)return;const le=J.element,rt={...bt,...J.config.animation};le.style.transitionDuration=`${rt.exitDuration}ms`,le.style.opacity="0",J.state=2,(J._animationForciblyDisabledThroughCss||!rt.exitDuration)&&this._finishRippleTransition(J)}fadeOutAll(){this._getActiveRipples().forEach(J=>J.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(J=>{J.config.persistent||J.fadeOut()})}setupTriggerEvents(J){const le=(0,it.fI)(J);!le||le===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=le,this._registerEvents(yr))}handleEvent(J){"mousedown"===J.type?this._onMousedown(J):"touchstart"===J.type?this._onTouchStart(J):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(Yn),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(J){0===J.state?this._startFadeOutTransition(J):2===J.state&&this._destroyRipple(J)}_startFadeOutTransition(J){const le=J===this._mostRecentTransientRipple,{persistent:rt}=J.config;J.state=1,!rt&&(!le||!this._isPointerDown)&&J.fadeOut()}_destroyRipple(J){const le=this._activeRipples.get(J)??null;this._activeRipples.delete(J),this._activeRipples.size||(this._containerRect=null),J===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),J.state=3,null!==le&&(J.element.removeEventListener("transitionend",le.onTransitionEnd),J.element.removeEventListener("transitioncancel",le.onTransitionCancel)),J.element.remove()}_onMousedown(J){const le=(0,g.X6)(J),rt=this._lastTouchStartEvent&&Date.now(){!J.config.persistent&&(1===J.state||J.config.terminateOnPointerUp&&0===J.state)&&J.fadeOut()}))}_registerEvents(J){this._ngZone.runOutsideAngular(()=>{J.forEach(le=>{this._triggerElement.addEventListener(le,this,ln)})})}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){this._triggerElement&&(yr.forEach(J=>{this._triggerElement.removeEventListener(J,this,ln)}),this._pointerUpEventsRegistered&&Yn.forEach(J=>{this._triggerElement.removeEventListener(J,this,ln)}))}}const Dr=new m.OlP("mat-ripple-global-options");let Or=(()=>{class se{constructor(le,rt,Qt,hn,fn){this._elementRef=le,this._animationMode=fn,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=hn||{},this._rippleRenderer=new gn(this,rt,le,Qt)}get disabled(){return this._disabled}set disabled(le){le&&this.fadeOutAllNonPersistent(),this._disabled=le,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(le){this._trigger=le,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(le,rt=0,Qt){return"number"==typeof le?this._rippleRenderer.fadeInRipple(le,rt,{...this.rippleConfig,...Qt}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...le})}}return se.\u0275fac=function(le){return new(le||se)(m.Y36(m.SBq),m.Y36(m.R0b),m.Y36(me.t4),m.Y36(Dr,8),m.Y36(m.QbO,8))},se.\u0275dir=m.lG2({type:se,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(le,rt){2&le&&m.ekj("mat-ripple-unbounded",rt.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),se})(),Ct=(()=>{class se{}return se.\u0275fac=function(le){return new(le||se)},se.\u0275mod=m.oAB({type:se}),se.\u0275inj=m.cJS({imports:[Nt,Nt]}),se})()},7392:(Wt,je,S)=>{S.d(je,{Hw:()=>Et,Ps:()=>sn});var m=S(4650),g=S(2327),K=S(1281),ae=S(6895),oe=S(9646),_e=S(2843),fe=S(4128),ge=S(727),he=S(8505),ie=S(4004),ce=S(262),me=S(8746),it=S(3099),Ke=S(5698),Ye=S(529),ht=S(1481);const Ze=["*"];let Qe;function kt(It){return function Ee(){if(void 0===Qe&&(Qe=null,typeof window<"u")){const It=window;void 0!==It.trustedTypes&&(Qe=It.trustedTypes.createPolicy("angular#components",{createHTML:Rn=>Rn}))}return Qe}()?.createHTML(It)||It}function ot(It){return Error(`Unable to find icon with the name "${It}"`)}function xe(It){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${It}".`)}function Nt(It){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${It}".`)}class Lt{constructor(Rn,nt,ut){this.url=Rn,this.svgText=nt,this.options=ut}}let Se=(()=>{class It{constructor(nt,ut,Kt,Ht){this._httpClient=nt,this._sanitizer=ut,this._errorHandler=Ht,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons"],this._document=Kt}addSvgIcon(nt,ut,Kt){return this.addSvgIconInNamespace("",nt,ut,Kt)}addSvgIconLiteral(nt,ut,Kt){return this.addSvgIconLiteralInNamespace("",nt,ut,Kt)}addSvgIconInNamespace(nt,ut,Kt,Ht){return this._addSvgIconConfig(nt,ut,new Lt(Kt,null,Ht))}addSvgIconResolver(nt){return this._resolvers.push(nt),this}addSvgIconLiteralInNamespace(nt,ut,Kt,Ht){const Zt=this._sanitizer.sanitize(m.q3G.HTML,Kt);if(!Zt)throw Nt(Kt);const wn=kt(Zt);return this._addSvgIconConfig(nt,ut,new Lt("",wn,Ht))}addSvgIconSet(nt,ut){return this.addSvgIconSetInNamespace("",nt,ut)}addSvgIconSetLiteral(nt,ut){return this.addSvgIconSetLiteralInNamespace("",nt,ut)}addSvgIconSetInNamespace(nt,ut,Kt){return this._addSvgIconSetConfig(nt,new Lt(ut,null,Kt))}addSvgIconSetLiteralInNamespace(nt,ut,Kt){const Ht=this._sanitizer.sanitize(m.q3G.HTML,ut);if(!Ht)throw Nt(ut);const Zt=kt(Ht);return this._addSvgIconSetConfig(nt,new Lt("",Zt,Kt))}registerFontClassAlias(nt,ut=nt){return this._fontCssClassesByAlias.set(nt,ut),this}classNameForFontAlias(nt){return this._fontCssClassesByAlias.get(nt)||nt}setDefaultFontSetClass(...nt){return this._defaultFontSetClass=nt,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(nt){const ut=this._sanitizer.sanitize(m.q3G.RESOURCE_URL,nt);if(!ut)throw xe(nt);const Kt=this._cachedIconsByUrl.get(ut);return Kt?(0,oe.of)(et(Kt)):this._loadSvgIconFromConfig(new Lt(nt,null)).pipe((0,he.b)(Ht=>this._cachedIconsByUrl.set(ut,Ht)),(0,ie.U)(Ht=>et(Ht)))}getNamedSvgIcon(nt,ut=""){const Kt=lt(ut,nt);let Ht=this._svgIconConfigs.get(Kt);if(Ht)return this._getSvgFromConfig(Ht);if(Ht=this._getIconConfigFromResolvers(ut,nt),Ht)return this._svgIconConfigs.set(Kt,Ht),this._getSvgFromConfig(Ht);const Zt=this._iconSetConfigs.get(ut);return Zt?this._getSvgFromIconSetConfigs(nt,Zt):(0,_e._)(ot(Kt))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(nt){return nt.svgText?(0,oe.of)(et(this._svgElementFromConfig(nt))):this._loadSvgIconFromConfig(nt).pipe((0,ie.U)(ut=>et(ut)))}_getSvgFromIconSetConfigs(nt,ut){const Kt=this._extractIconWithNameFromAnySet(nt,ut);if(Kt)return(0,oe.of)(Kt);const Ht=ut.filter(Zt=>!Zt.svgText).map(Zt=>this._loadSvgIconSetFromConfig(Zt).pipe((0,ce.K)(wn=>{const Jn=`Loading icon set URL: ${this._sanitizer.sanitize(m.q3G.RESOURCE_URL,Zt.url)} failed: ${wn.message}`;return this._errorHandler.handleError(new Error(Jn)),(0,oe.of)(null)})));return(0,fe.D)(Ht).pipe((0,ie.U)(()=>{const Zt=this._extractIconWithNameFromAnySet(nt,ut);if(!Zt)throw ot(nt);return Zt}))}_extractIconWithNameFromAnySet(nt,ut){for(let Kt=ut.length-1;Kt>=0;Kt--){const Ht=ut[Kt];if(Ht.svgText&&Ht.svgText.toString().indexOf(nt)>-1){const Zt=this._svgElementFromConfig(Ht),wn=this._extractSvgIconFromSet(Zt,nt,Ht.options);if(wn)return wn}}return null}_loadSvgIconFromConfig(nt){return this._fetchIcon(nt).pipe((0,he.b)(ut=>nt.svgText=ut),(0,ie.U)(()=>this._svgElementFromConfig(nt)))}_loadSvgIconSetFromConfig(nt){return nt.svgText?(0,oe.of)(null):this._fetchIcon(nt).pipe((0,he.b)(ut=>nt.svgText=ut))}_extractSvgIconFromSet(nt,ut,Kt){const Ht=nt.querySelector(`[id="${ut}"]`);if(!Ht)return null;const Zt=Ht.cloneNode(!0);if(Zt.removeAttribute("id"),"svg"===Zt.nodeName.toLowerCase())return this._setSvgAttributes(Zt,Kt);if("symbol"===Zt.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(Zt),Kt);const wn=this._svgElementFromString(kt(""));return wn.appendChild(Zt),this._setSvgAttributes(wn,Kt)}_svgElementFromString(nt){const ut=this._document.createElement("DIV");ut.innerHTML=nt;const Kt=ut.querySelector("svg");if(!Kt)throw Error(" tag not found");return Kt}_toSvgElement(nt){const ut=this._svgElementFromString(kt("")),Kt=nt.attributes;for(let Ht=0;Htkt(Jn)),(0,me.x)(()=>this._inProgressUrlFetches.delete(Zt)),(0,it.B)());return this._inProgressUrlFetches.set(Zt,er),er}_addSvgIconConfig(nt,ut,Kt){return this._svgIconConfigs.set(lt(nt,ut),Kt),this}_addSvgIconSetConfig(nt,ut){const Kt=this._iconSetConfigs.get(nt);return Kt?Kt.push(ut):this._iconSetConfigs.set(nt,[ut]),this}_svgElementFromConfig(nt){if(!nt.svgElement){const ut=this._svgElementFromString(nt.svgText);this._setSvgAttributes(ut,nt.options),nt.svgElement=ut}return nt.svgElement}_getIconConfigFromResolvers(nt,ut){for(let Kt=0;KtRn?Rn.pathname+Rn.search:""}}}),Mt=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],pe=Mt.map(It=>`[${It}]`).join(", "),ft=/^url\(['"]?#(.*?)['"]?\)$/;let Et=(()=>{class It extends Je{constructor(nt,ut,Kt,Ht,Zt,wn){super(nt),this._iconRegistry=ut,this._location=Ht,this._errorHandler=Zt,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=ge.w0.EMPTY,wn&&(wn.color&&(this.color=this.defaultColor=wn.color),wn.fontSet&&(this.fontSet=wn.fontSet)),Kt||nt.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(nt){this._inline=(0,K.Ig)(nt)}get svgIcon(){return this._svgIcon}set svgIcon(nt){nt!==this._svgIcon&&(nt?this._updateSvgIcon(nt):this._svgIcon&&this._clearSvgElement(),this._svgIcon=nt)}get fontSet(){return this._fontSet}set fontSet(nt){const ut=this._cleanupFontValue(nt);ut!==this._fontSet&&(this._fontSet=ut,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(nt){const ut=this._cleanupFontValue(nt);ut!==this._fontIcon&&(this._fontIcon=ut,this._updateFontIconClasses())}_splitIconName(nt){if(!nt)return["",""];const ut=nt.split(":");switch(ut.length){case 1:return["",ut[0]];case 2:return ut;default:throw Error(`Invalid icon name: "${nt}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const nt=this._elementsWithExternalReferences;if(nt&&nt.size){const ut=this._location.getPathname();ut!==this._previousPath&&(this._previousPath=ut,this._prependPathToReferences(ut))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(nt){this._clearSvgElement();const ut=this._location.getPathname();this._previousPath=ut,this._cacheChildrenWithExternalReferences(nt),this._prependPathToReferences(ut),this._elementRef.nativeElement.appendChild(nt)}_clearSvgElement(){const nt=this._elementRef.nativeElement;let ut=nt.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();ut--;){const Kt=nt.childNodes[ut];(1!==Kt.nodeType||"svg"===Kt.nodeName.toLowerCase())&&Kt.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const nt=this._elementRef.nativeElement,ut=(this.fontSet?[this._iconRegistry.classNameForFontAlias(this.fontSet)]:this._iconRegistry.getDefaultFontSetClass()).filter(Kt=>Kt.length>0);this._previousFontSetClass.forEach(Kt=>nt.classList.remove(Kt)),ut.forEach(Kt=>nt.classList.add(Kt)),this._previousFontSetClass=ut,this.fontIcon!==this._previousFontIconClass&&(this._previousFontIconClass&&nt.classList.remove(this._previousFontIconClass),this.fontIcon&&nt.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(nt){return"string"==typeof nt?nt.trim().split(" ")[0]:nt}_prependPathToReferences(nt){const ut=this._elementsWithExternalReferences;ut&&ut.forEach((Kt,Ht)=>{Kt.forEach(Zt=>{Ht.setAttribute(Zt.name,`url('${nt}#${Zt.value}')`)})})}_cacheChildrenWithExternalReferences(nt){const ut=nt.querySelectorAll(pe),Kt=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let Ht=0;Ht{const wn=ut[Ht],er=wn.getAttribute(Zt),Jn=er?er.match(ft):null;if(Jn){let bt=Kt.get(wn);bt||(bt=[],Kt.set(wn,bt)),bt.push({name:Zt,value:Jn[1]})}})}_updateSvgIcon(nt){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),nt){const[ut,Kt]=this._splitIconName(nt);ut&&(this._svgNamespace=ut),Kt&&(this._svgName=Kt),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(Kt,ut).pipe((0,Ke.q)(1)).subscribe(Ht=>this._setSvgElement(Ht),Ht=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${ut}:${Kt}! ${Ht.message}`))})}}}return It.\u0275fac=function(nt){return new(nt||It)(m.Y36(m.SBq),m.Y36(Se),m.$8M("aria-hidden"),m.Y36(Tn),m.Y36(m.qLn),m.Y36(pn,8))},It.\u0275cmp=m.Xpm({type:It,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(nt,ut){2&nt&&(m.uIk("data-mat-icon-type",ut._usingFontIcon()?"font":"svg")("data-mat-icon-name",ut._svgName||ut.fontIcon)("data-mat-icon-namespace",ut._svgNamespace||ut.fontSet),m.ekj("mat-icon-inline",ut.inline)("mat-icon-no-color","primary"!==ut.color&&"accent"!==ut.color&&"warn"!==ut.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[m.qOj],ngContentSelectors:Ze,decls:1,vars:0,template:function(nt,ut){1&nt&&(m.F$t(),m.Hsn(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),It})(),sn=(()=>{class It{}return It.\u0275fac=function(nt){return new(nt||It)},It.\u0275mod=m.oAB({type:It}),It.\u0275inj=m.cJS({imports:[g.BQ,g.BQ]}),It})()},1481:(Wt,je,S)=>{S.d(je,{Dx:()=>Ge,H7:()=>Fr,b2:()=>Ti,q6:()=>ln,se:()=>at});var m=S(6895),g=S(4650);class K extends m.w_{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class ae extends K{static makeCurrent(){(0,m.HT)(new ae)}onAndCancel(Re,ve,We){return Re.addEventListener(ve,We,!1),()=>{Re.removeEventListener(ve,We,!1)}}dispatchEvent(Re,ve){Re.dispatchEvent(ve)}remove(Re){Re.parentNode&&Re.parentNode.removeChild(Re)}createElement(Re,ve){return(ve=ve||this.getDefaultDocument()).createElement(Re)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(Re){return Re.nodeType===Node.ELEMENT_NODE}isShadowRoot(Re){return Re instanceof DocumentFragment}getGlobalEventTarget(Re,ve){return"window"===ve?window:"document"===ve?Re:"body"===ve?Re.body:null}getBaseHref(Re){const ve=function _e(){return oe=oe||document.querySelector("base"),oe?oe.getAttribute("href"):null}();return null==ve?null:function ge($e){fe=fe||document.createElement("a"),fe.setAttribute("href",$e);const Re=fe.pathname;return"/"===Re.charAt(0)?Re:`/${Re}`}(ve)}resetBaseElement(){oe=null}getUserAgent(){return window.navigator.userAgent}getCookie(Re){return(0,m.Mx)(document.cookie,Re)}}let fe,oe=null;const he=new g.OlP("TRANSITION_ID"),ce=[{provide:g.ip1,useFactory:function ie($e,Re,ve){return()=>{ve.get(g.CZH).donePromise.then(()=>{const We=(0,m.q)(),_t=Re.querySelectorAll(`style[ng-transition="${$e}"]`);for(let $t=0;$t<_t.length;$t++)We.remove(_t[$t])})}},deps:[he,m.K0,g.zs3],multi:!0}];let it=(()=>{class $e{build(){return new XMLHttpRequest}}return $e.\u0275fac=function(ve){return new(ve||$e)},$e.\u0275prov=g.Yz7({token:$e,factory:$e.\u0275fac}),$e})();const Ke=new g.OlP("EventManagerPlugins");let Ye=(()=>{class $e{constructor(ve,We){this._zone=We,this._eventNameToPlugin=new Map,ve.forEach(_t=>_t.manager=this),this._plugins=ve.slice().reverse()}addEventListener(ve,We,_t){return this._findPluginFor(We).addEventListener(ve,We,_t)}addGlobalEventListener(ve,We,_t){return this._findPluginFor(We).addGlobalEventListener(ve,We,_t)}getZone(){return this._zone}_findPluginFor(ve){const We=this._eventNameToPlugin.get(ve);if(We)return We;const _t=this._plugins;for(let $t=0;$t<_t.length;$t++){const qn=_t[$t];if(qn.supports(ve))return this._eventNameToPlugin.set(ve,qn),qn}throw new Error(`No event manager plugin found for event ${ve}`)}}return $e.\u0275fac=function(ve){return new(ve||$e)(g.LFG(Ke),g.LFG(g.R0b))},$e.\u0275prov=g.Yz7({token:$e,factory:$e.\u0275fac}),$e})();class ht{constructor(Re){this._doc=Re}addGlobalEventListener(Re,ve,We){const _t=(0,m.q)().getGlobalEventTarget(this._doc,Re);if(!_t)throw new Error(`Unsupported event target ${_t} for event ${ve}`);return this.addEventListener(_t,ve,We)}}let Ze=(()=>{class $e{constructor(){this._stylesSet=new Set}addStyles(ve){const We=new Set;ve.forEach(_t=>{this._stylesSet.has(_t)||(this._stylesSet.add(_t),We.add(_t))}),this.onStylesAdded(We)}onStylesAdded(ve){}getAllStyles(){return Array.from(this._stylesSet)}}return $e.\u0275fac=function(ve){return new(ve||$e)},$e.\u0275prov=g.Yz7({token:$e,factory:$e.\u0275fac}),$e})(),Qe=(()=>{class $e extends Ze{constructor(ve){super(),this._doc=ve,this._hostNodes=new Map,this._hostNodes.set(ve.head,[])}_addStylesToHost(ve,We,_t){ve.forEach($t=>{const qn=this._doc.createElement("style");qn.textContent=$t,_t.push(We.appendChild(qn))})}addHost(ve){const We=[];this._addStylesToHost(this._stylesSet,ve,We),this._hostNodes.set(ve,We)}removeHost(ve){const We=this._hostNodes.get(ve);We&&We.forEach(Ee),this._hostNodes.delete(ve)}onStylesAdded(ve){this._hostNodes.forEach((We,_t)=>{this._addStylesToHost(ve,_t,We)})}ngOnDestroy(){this._hostNodes.forEach(ve=>ve.forEach(Ee))}}return $e.\u0275fac=function(ve){return new(ve||$e)(g.LFG(m.K0))},$e.\u0275prov=g.Yz7({token:$e,factory:$e.\u0275fac}),$e})();function Ee($e){(0,m.q)().remove($e)}const kt={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},ot=/%COMP%/g;function Ce($e,Re,ve){for(let We=0;We{if("__ngUnwrap__"===Re)return $e;!1===$e(Re)&&(Re.preventDefault(),Re.returnValue=!1)}}let at=(()=>{class $e{constructor(ve,We,_t){this.eventManager=ve,this.sharedStylesHost=We,this.appId=_t,this.rendererByCompId=new Map,this.defaultRenderer=new Je(ve)}createRenderer(ve,We){if(!ve||!We)return this.defaultRenderer;switch(We.encapsulation){case g.ifc.Emulated:{let _t=this.rendererByCompId.get(We.id);return _t||(_t=new Mt(this.eventManager,this.sharedStylesHost,We,this.appId),this.rendererByCompId.set(We.id,_t)),_t.applyToHost(ve),_t}case 1:case g.ifc.ShadowDom:return new pe(this.eventManager,this.sharedStylesHost,ve,We);default:if(!this.rendererByCompId.has(We.id)){const _t=Ce(We.id,We.styles,[]);this.sharedStylesHost.addStyles(_t),this.rendererByCompId.set(We.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return $e.\u0275fac=function(ve){return new(ve||$e)(g.LFG(Ye),g.LFG(Qe),g.LFG(g.AFp))},$e.\u0275prov=g.Yz7({token:$e,factory:$e.\u0275fac}),$e})();class Je{constructor(Re){this.eventManager=Re,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(Re,ve){return ve?document.createElementNS(kt[ve]||ve,Re):document.createElement(Re)}createComment(Re){return document.createComment(Re)}createText(Re){return document.createTextNode(Re)}appendChild(Re,ve){(St(Re)?Re.content:Re).appendChild(ve)}insertBefore(Re,ve,We){Re&&(St(Re)?Re.content:Re).insertBefore(ve,We)}removeChild(Re,ve){Re&&Re.removeChild(ve)}selectRootElement(Re,ve){let We="string"==typeof Re?document.querySelector(Re):Re;if(!We)throw new Error(`The selector "${Re}" did not match any elements`);return ve||(We.textContent=""),We}parentNode(Re){return Re.parentNode}nextSibling(Re){return Re.nextSibling}setAttribute(Re,ve,We,_t){if(_t){ve=_t+":"+ve;const $t=kt[_t];$t?Re.setAttributeNS($t,ve,We):Re.setAttribute(ve,We)}else Re.setAttribute(ve,We)}removeAttribute(Re,ve,We){if(We){const _t=kt[We];_t?Re.removeAttributeNS(_t,ve):Re.removeAttribute(`${We}:${ve}`)}else Re.removeAttribute(ve)}addClass(Re,ve){Re.classList.add(ve)}removeClass(Re,ve){Re.classList.remove(ve)}setStyle(Re,ve,We,_t){_t&(g.JOm.DashCase|g.JOm.Important)?Re.style.setProperty(ve,We,_t&g.JOm.Important?"important":""):Re.style[ve]=We}removeStyle(Re,ve,We){We&g.JOm.DashCase?Re.style.removeProperty(ve):Re.style[ve]=""}setProperty(Re,ve,We){Re[ve]=We}setValue(Re,ve){Re.nodeValue=ve}listen(Re,ve,We){return"string"==typeof Re?this.eventManager.addGlobalEventListener(Re,ve,et(We)):this.eventManager.addEventListener(Re,ve,et(We))}}function St($e){return"TEMPLATE"===$e.tagName&&void 0!==$e.content}class Mt extends Je{constructor(Re,ve,We,_t){super(Re),this.component=We;const $t=Ce(_t+"-"+We.id,We.styles,[]);ve.addStyles($t),this.contentAttr=function Se($e){return"_ngcontent-%COMP%".replace(ot,$e)}(_t+"-"+We.id),this.hostAttr=function Ie($e){return"_nghost-%COMP%".replace(ot,$e)}(_t+"-"+We.id)}applyToHost(Re){super.setAttribute(Re,this.hostAttr,"")}createElement(Re,ve){const We=super.createElement(Re,ve);return super.setAttribute(We,this.contentAttr,""),We}}class pe extends Je{constructor(Re,ve,We,_t){super(Re),this.sharedStylesHost=ve,this.hostEl=We,this.shadowRoot=We.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const $t=Ce(_t.id,_t.styles,[]);for(let qn=0;qn<$t.length;qn++){const _r=document.createElement("style");_r.textContent=$t[qn],this.shadowRoot.appendChild(_r)}}nodeOrShadowRoot(Re){return Re===this.hostEl?this.shadowRoot:Re}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(Re,ve){return super.appendChild(this.nodeOrShadowRoot(Re),ve)}insertBefore(Re,ve,We){return super.insertBefore(this.nodeOrShadowRoot(Re),ve,We)}removeChild(Re,ve){return super.removeChild(this.nodeOrShadowRoot(Re),ve)}parentNode(Re){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(Re)))}}let ft=(()=>{class $e extends ht{constructor(ve){super(ve)}supports(ve){return!0}addEventListener(ve,We,_t){return ve.addEventListener(We,_t,!1),()=>this.removeEventListener(ve,We,_t)}removeEventListener(ve,We,_t){return ve.removeEventListener(We,_t)}}return $e.\u0275fac=function(ve){return new(ve||$e)(g.LFG(m.K0))},$e.\u0275prov=g.Yz7({token:$e,factory:$e.\u0275fac}),$e})();const Et=["alt","control","meta","shift"],It={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Rn={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},nt={alt:$e=>$e.altKey,control:$e=>$e.ctrlKey,meta:$e=>$e.metaKey,shift:$e=>$e.shiftKey};let ut=(()=>{class $e extends ht{constructor(ve){super(ve)}supports(ve){return null!=$e.parseEventName(ve)}addEventListener(ve,We,_t){const $t=$e.parseEventName(We),qn=$e.eventCallback($t.fullKey,_t,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>(0,m.q)().onAndCancel(ve,$t.domEventName,qn))}static parseEventName(ve){const We=ve.toLowerCase().split("."),_t=We.shift();if(0===We.length||"keydown"!==_t&&"keyup"!==_t)return null;const $t=$e._normalizeKey(We.pop());let qn="";if(Et.forEach(yn=>{const Mr=We.indexOf(yn);Mr>-1&&(We.splice(Mr,1),qn+=yn+".")}),qn+=$t,0!=We.length||0===$t.length)return null;const _r={};return _r.domEventName=_t,_r.fullKey=qn,_r}static getEventFullKey(ve){let We="",_t=function Kt($e){let Re=$e.key;if(null==Re){if(Re=$e.keyIdentifier,null==Re)return"Unidentified";Re.startsWith("U+")&&(Re=String.fromCharCode(parseInt(Re.substring(2),16)),3===$e.location&&Rn.hasOwnProperty(Re)&&(Re=Rn[Re]))}return It[Re]||Re}(ve);return _t=_t.toLowerCase()," "===_t?_t="space":"."===_t&&(_t="dot"),Et.forEach($t=>{$t!=_t&&nt[$t](ve)&&(We+=$t+".")}),We+=_t,We}static eventCallback(ve,We,_t){return $t=>{$e.getEventFullKey($t)===ve&&_t.runGuarded(()=>We($t))}}static _normalizeKey(ve){return"esc"===ve?"escape":ve}}return $e.\u0275fac=function(ve){return new(ve||$e)(g.LFG(m.K0))},$e.\u0275prov=g.Yz7({token:$e,factory:$e.\u0275fac}),$e})();const ln=(0,g.eFA)(g._c5,"browser",[{provide:g.Lbi,useValue:m.bD},{provide:g.g9A,useValue:function er(){ae.makeCurrent()},multi:!0},{provide:m.K0,useFactory:function bt(){return(0,g.RDi)(document),document},deps:[]}]),yr=new g.OlP(""),Yn=[{provide:g.rWj,useClass:class me{addToWindow(Re){g.dqk.getAngularTestability=(We,_t=!0)=>{const $t=Re.findTestabilityInTree(We,_t);if(null==$t)throw new Error("Could not find testability for element.");return $t},g.dqk.getAllAngularTestabilities=()=>Re.getAllTestabilities(),g.dqk.getAllAngularRootElements=()=>Re.getAllRootElements(),g.dqk.frameworkStabilizers||(g.dqk.frameworkStabilizers=[]),g.dqk.frameworkStabilizers.push(We=>{const _t=g.dqk.getAllAngularTestabilities();let $t=_t.length,qn=!1;const _r=function(yn){qn=qn||yn,$t--,0==$t&&We(qn)};_t.forEach(function(yn){yn.whenStable(_r)})})}findTestabilityInTree(Re,ve,We){return null==ve?null:Re.getTestability(ve)??(We?(0,m.q)().isShadowRoot(ve)?this.findTestabilityInTree(Re,ve.host,!0):this.findTestabilityInTree(Re,ve.parentElement,!0):null)}},deps:[]},{provide:g.lri,useClass:g.dDg,deps:[g.R0b,g.eoX,g.rWj]},{provide:g.dDg,useClass:g.dDg,deps:[g.R0b,g.eoX,g.rWj]}],gn=[{provide:g.zSh,useValue:"root"},{provide:g.qLn,useFactory:function Jn(){return new g.qLn},deps:[]},{provide:Ke,useClass:ft,multi:!0,deps:[m.K0,g.R0b,g.Lbi]},{provide:Ke,useClass:ut,multi:!0,deps:[m.K0]},{provide:at,useClass:at,deps:[Ye,Qe,g.AFp]},{provide:g.FYo,useExisting:at},{provide:Ze,useExisting:Qe},{provide:Qe,useClass:Qe,deps:[m.K0]},{provide:Ye,useClass:Ye,deps:[Ke,g.R0b]},{provide:m.JF,useClass:it,deps:[]},[]];let Ti=(()=>{class $e{constructor(ve){}static withServerTransition(ve){return{ngModule:$e,providers:[{provide:g.AFp,useValue:ve.appId},{provide:he,useExisting:g.AFp},ce]}}}return $e.\u0275fac=function(ve){return new(ve||$e)(g.LFG(yr,12))},$e.\u0275mod=g.oAB({type:$e}),$e.\u0275inj=g.cJS({providers:[...gn,...Yn],imports:[m.ez,g.hGG]}),$e})(),Ge=(()=>{class $e{constructor(ve){this._doc=ve}getTitle(){return this._doc.title}setTitle(ve){this._doc.title=ve||""}}return $e.\u0275fac=function(ve){return new(ve||$e)(g.LFG(m.K0))},$e.\u0275prov=g.Yz7({token:$e,factory:function(ve){let We=null;return We=ve?new ve:function Be(){return new Ge((0,g.LFG)(m.K0))}(),We},providedIn:"root"}),$e})();typeof window<"u"&&window;let Fr=(()=>{class $e{}return $e.\u0275fac=function(ve){return new(ve||$e)},$e.\u0275prov=g.Yz7({token:$e,factory:function(ve){let We=null;return We=ve?new(ve||$e):g.LFG(zt),We},providedIn:"root"}),$e})(),zt=(()=>{class $e extends Fr{constructor(ve){super(),this._doc=ve}sanitize(ve,We){if(null==We)return null;switch(ve){case g.q3G.NONE:return We;case g.q3G.HTML:return(0,g.qzn)(We,"HTML")?(0,g.z3N)(We):(0,g.EiD)(this._doc,String(We)).toString();case g.q3G.STYLE:return(0,g.qzn)(We,"Style")?(0,g.z3N)(We):We;case g.q3G.SCRIPT:if((0,g.qzn)(We,"Script"))return(0,g.z3N)(We);throw new Error("unsafe value used in a script context");case g.q3G.URL:return(0,g.yhl)(We),(0,g.qzn)(We,"URL")?(0,g.z3N)(We):(0,g.mCW)(String(We));case g.q3G.RESOURCE_URL:if((0,g.qzn)(We,"ResourceURL"))return(0,g.z3N)(We);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${ve} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(ve){return(0,g.JVY)(ve)}bypassSecurityTrustStyle(ve){return(0,g.L6k)(ve)}bypassSecurityTrustScript(ve){return(0,g.eBb)(ve)}bypassSecurityTrustUrl(ve){return(0,g.LAX)(ve)}bypassSecurityTrustResourceUrl(ve){return(0,g.pB0)(ve)}}return $e.\u0275fac=function(ve){return new(ve||$e)(g.LFG(m.K0))},$e.\u0275prov=g.Yz7({token:$e,factory:function(ve){let We=null;return We=ve?new ve:function Sr($e){return new zt($e.get(m.K0))}(g.LFG(g.zs3)),We},providedIn:"root"}),$e})()},9116:(Wt,je,S)=>{S.d(je,{gz:()=>ei,F0:()=>_i,rH:()=>Po,Od:()=>fa,yS:()=>Ds,Bz:()=>Io,lC:()=>ni});var m=S(6895),g=S(4650),K=S(8996),ae=S(9646),oe=S(1135),_e=S(9841),fe=S(2843),ge=S(6805),he=S(7272),ie=S(9770),ce=S(8306),me=S(515),it=S(4033),Ke=S(7579),Ye=S(9300),ht=S(4482),Ze=S(5403);function Qe(b){return b<=0?()=>me.E:(0,ht.e)((D,I)=>{let k=[];D.subscribe(new Ze.Q(I,G=>{k.push(G),b{for(const G of k)I.next(G);I.complete()},void 0,()=>{k=null}))})}var Ee=S(8068),kt=S(6590),ot=S(4671),xe=S(4004),Nt=S(3900),Lt=S(5698),Se=S(8675),Ie=S(5026),Ce=S(262),et=S(4351),lt=S(590),at=S(5577),Je=S(8505),pn=S(9718),Tn=S(8746),St=S(8343),Mt=S(8189),pe=S(1481);class ft{constructor(D,I){this.id=D,this.url=I}}class Et extends ft{constructor(D,I,k="imperative",G=null){super(D,I),this.type=0,this.navigationTrigger=k,this.restoredState=G}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class sn extends ft{constructor(D,I,k){super(D,I),this.urlAfterRedirects=k,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class It extends ft{constructor(D,I,k){super(D,I),this.reason=k,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Rn extends ft{constructor(D,I,k){super(D,I),this.error=k,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class nt extends ft{constructor(D,I,k,G){super(D,I),this.urlAfterRedirects=k,this.state=G,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ut extends ft{constructor(D,I,k,G){super(D,I),this.urlAfterRedirects=k,this.state=G,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Kt extends ft{constructor(D,I,k,G,re){super(D,I),this.urlAfterRedirects=k,this.state=G,this.shouldActivate=re,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Ht extends ft{constructor(D,I,k,G){super(D,I),this.urlAfterRedirects=k,this.state=G,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Zt extends ft{constructor(D,I,k,G){super(D,I),this.urlAfterRedirects=k,this.state=G,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class wn{constructor(D){this.route=D,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class er{constructor(D){this.route=D,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Jn{constructor(D){this.snapshot=D,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class bt{constructor(D){this.snapshot=D,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Un{constructor(D){this.snapshot=D,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ln{constructor(D){this.snapshot=D,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class yr{constructor(D,I,k){this.routerEvent=D,this.position=I,this.anchor=k,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const gn="primary";class Ti{constructor(D){this.params=D||{}}has(D){return Object.prototype.hasOwnProperty.call(this.params,D)}get(D){if(this.has(D)){const I=this.params[D];return Array.isArray(I)?I[0]:I}return null}getAll(D){if(this.has(D)){const I=this.params[D];return Array.isArray(I)?I:[I]}return[]}get keys(){return Object.keys(this.params)}}function Dr(b){return new Ti(b)}const Or="ngNavigationCancelingError";function Ct(b){const D=Error("NavigationCancelingError: "+b);return D[Or]=!0,D}function Ge(b,D,I){const k=I.path.split("/");if(k.length>b.length||"full"===I.pathMatch&&(D.hasChildren()||k.lengthk[re]===G)}return b===D}function nr(b){return Array.prototype.concat.apply([],b)}function Kn(b){return b.length>0?b[b.length-1]:null}function mn(b,D){for(const I in b)b.hasOwnProperty(I)&&D(b[I],I)}function Xn(b){return(0,g.CqO)(b)?b:(0,g.QGY)(b)?(0,K.D)(Promise.resolve(b)):(0,ae.of)(b)}const Me={exact:function se(b,D,I){if(!Nr(b.segments,D.segments)||!Qt(b.segments,D.segments,I)||b.numberOfChildren!==D.numberOfChildren)return!1;for(const k in D.children)if(!b.children[k]||!se(b.children[k],D.children[k],I))return!1;return!0},subset:le},we={exact:function Tt(b,D){return Xe(b,D)},subset:function J(b,D){return Object.keys(D).length<=Object.keys(b).length&&Object.keys(D).every(I=>qt(b[I],D[I]))},ignored:()=>!0};function Ae(b,D,I){return Me[I.paths](b.root,D.root,I.matrixParams)&&we[I.queryParams](b.queryParams,D.queryParams)&&!("exact"===I.fragment&&b.fragment!==D.fragment)}function le(b,D,I){return rt(b,D,D.segments,I)}function rt(b,D,I,k){if(b.segments.length>I.length){const G=b.segments.slice(0,I.length);return!(!Nr(G,I)||D.hasChildren()||!Qt(G,I,k))}if(b.segments.length===I.length){if(!Nr(b.segments,I)||!Qt(b.segments,I,k))return!1;for(const G in D.children)if(!b.children[G]||!le(b.children[G],D.children[G],k))return!1;return!0}{const G=I.slice(0,b.segments.length),re=I.slice(b.segments.length);return!!(Nr(b.segments,G)&&Qt(b.segments,G,k)&&b.children[gn])&&rt(b.children[gn],D,re,k)}}function Qt(b,D,I){return D.every((k,G)=>we[I](b[G].parameters,k.parameters))}class hn{constructor(D,I,k){this.root=D,this.queryParams=I,this.fragment=k}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Dr(this.queryParams)),this._queryParamMap}toString(){return Fr.serialize(this)}}class fn{constructor(D,I){this.segments=D,this.children=I,this.parent=null,mn(I,(k,G)=>k.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Sr(this)}}class Pn{constructor(D,I){this.path=D,this.parameters=I}get parameterMap(){return this._parameterMap||(this._parameterMap=Dr(this.parameters)),this._parameterMap}toString(){return $t(this)}}function Nr(b,D){return b.length===D.length&&b.every((I,k)=>I.path===D[k].path)}class kr{}class jr{parse(D){const I=new ss(D);return new hn(I.parseRootSegment(),I.parseQueryParams(),I.parseFragment())}serialize(D){const I=`/${zt(D.root,!0)}`,k=function _r(b){const D=Object.keys(b).map(I=>{const k=b[I];return Array.isArray(k)?k.map(G=>`${$e(I)}=${$e(G)}`).join("&"):`${$e(I)}=${$e(k)}`}).filter(I=>!!I);return D.length?`?${D.join("&")}`:""}(D.queryParams);return`${I}${k}${"string"==typeof D.fragment?`#${function Re(b){return encodeURI(b)}(D.fragment)}`:""}`}}const Fr=new jr;function Sr(b){return b.segments.map(D=>$t(D)).join("/")}function zt(b,D){if(!b.hasChildren())return Sr(b);if(D){const I=b.children[gn]?zt(b.children[gn],!1):"",k=[];return mn(b.children,(G,re)=>{re!==gn&&k.push(`${re}:${zt(G,!1)}`)}),k.length>0?`${I}(${k.join("//")})`:I}{const I=function jn(b,D){let I=[];return mn(b.children,(k,G)=>{G===gn&&(I=I.concat(D(k,G)))}),mn(b.children,(k,G)=>{G!==gn&&(I=I.concat(D(k,G)))}),I}(b,(k,G)=>G===gn?[zt(b.children[gn],!1)]:[`${G}:${zt(k,!1)}`]);return 1===Object.keys(b.children).length&&null!=b.children[gn]?`${Sr(b)}/${I[0]}`:`${Sr(b)}/(${I.join("//")})`}}function Nn(b){return encodeURIComponent(b).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $e(b){return Nn(b).replace(/%3B/gi,";")}function ve(b){return Nn(b).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function We(b){return decodeURIComponent(b)}function _t(b){return We(b.replace(/\+/g,"%20"))}function $t(b){return`${ve(b.path)}${function qn(b){return Object.keys(b).map(D=>`;${ve(D)}=${ve(b[D])}`).join("")}(b.parameters)}`}const yn=/^[^\/()?;=#]+/;function Mr(b){const D=b.match(yn);return D?D[0]:""}const Ji=/^[^=?&#]+/,wi=/^[^&#]+/;class ss{constructor(D){this.url=D,this.remaining=D}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new fn([],{}):new fn([],this.parseChildren())}parseQueryParams(){const D={};if(this.consumeOptional("?"))do{this.parseQueryParam(D)}while(this.consumeOptional("&"));return D}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const D=[];for(this.peekStartsWith("(")||D.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),D.push(this.parseSegment());let I={};this.peekStartsWith("/(")&&(this.capture("/"),I=this.parseParens(!0));let k={};return this.peekStartsWith("(")&&(k=this.parseParens(!1)),(D.length>0||Object.keys(I).length>0)&&(k[gn]=new fn(D,I)),k}parseSegment(){const D=Mr(this.remaining);if(""===D&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(D),new Pn(We(D),this.parseMatrixParams())}parseMatrixParams(){const D={};for(;this.consumeOptional(";");)this.parseParam(D);return D}parseParam(D){const I=Mr(this.remaining);if(!I)return;this.capture(I);let k="";if(this.consumeOptional("=")){const G=Mr(this.remaining);G&&(k=G,this.capture(k))}D[We(I)]=We(k)}parseQueryParam(D){const I=function ki(b){const D=b.match(Ji);return D?D[0]:""}(this.remaining);if(!I)return;this.capture(I);let k="";if(this.consumeOptional("=")){const be=function Vr(b){const D=b.match(wi);return D?D[0]:""}(this.remaining);be&&(k=be,this.capture(k))}const G=_t(I),re=_t(k);if(D.hasOwnProperty(G)){let be=D[G];Array.isArray(be)||(be=[be],D[G]=be),be.push(re)}else D[G]=re}parseParens(D){const I={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const k=Mr(this.remaining),G=this.remaining[k.length];if("/"!==G&&")"!==G&&";"!==G)throw new Error(`Cannot parse url '${this.url}'`);let re;k.indexOf(":")>-1?(re=k.slice(0,k.indexOf(":")),this.capture(re),this.capture(":")):D&&(re=gn);const be=this.parseChildren();I[re]=1===Object.keys(be).length?be[gn]:new fn([],be),this.consumeOptional("//")}return I}peekStartsWith(D){return this.remaining.startsWith(D)}consumeOptional(D){return!!this.peekStartsWith(D)&&(this.remaining=this.remaining.substring(D.length),!0)}capture(D){if(!this.consumeOptional(D))throw new Error(`Expected "${D}".`)}}class Ai{constructor(D){this._root=D}get root(){return this._root.value}parent(D){const I=this.pathFromRoot(D);return I.length>1?I[I.length-2]:null}children(D){const I=Gr(D,this._root);return I?I.children.map(k=>k.value):[]}firstChild(D){const I=Gr(D,this._root);return I&&I.children.length>0?I.children[0].value:null}siblings(D){const I=oi(D,this._root);return I.length<2?[]:I[I.length-2].children.map(G=>G.value).filter(G=>G!==D)}pathFromRoot(D){return oi(D,this._root).map(I=>I.value)}}function Gr(b,D){if(b===D.value)return D;for(const I of D.children){const k=Gr(b,I);if(k)return k}return null}function oi(b,D){if(b===D.value)return[D];for(const I of D.children){const k=oi(b,I);if(k.length)return k.unshift(D),k}return[]}class Ur{constructor(D,I){this.value=D,this.children=I}toString(){return`TreeNode(${this.value})`}}function vr(b){const D={};return b&&b.children.forEach(I=>D[I.value.outlet]=I),D}class ps extends Ai{constructor(D,I){super(D),this.snapshot=I,ys(this,D)}toString(){return this.snapshot.toString()}}function gs(b,D){const I=function ms(b,D){const be=new ai([],{},{},"",{},gn,D,null,b.root,-1,{});return new ti("",new Ur(be,[]))}(b,D),k=new oe.X([new Pn("",{})]),G=new oe.X({}),re=new oe.X({}),be=new oe.X({}),Ue=new oe.X(""),Ft=new ei(k,G,be,Ue,re,gn,D,I.root);return Ft.snapshot=I.root,new ps(new Ur(Ft,[]),I)}class ei{constructor(D,I,k,G,re,be,Ue,Ft){this.url=D,this.params=I,this.queryParams=k,this.fragment=G,this.data=re,this.outlet=be,this.component=Ue,this._futureSnapshot=Ft}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe((0,xe.U)(D=>Dr(D)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,xe.U)(D=>Dr(D)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Fi(b,D="emptyOnly"){const I=b.pathFromRoot;let k=0;if("always"!==D)for(k=I.length-1;k>=1;){const G=I[k],re=I[k-1];if(G.routeConfig&&""===G.routeConfig.path)k--;else{if(re.component)break;k--}}return function Li(b){return b.reduce((D,I)=>({params:{...D.params,...I.params},data:{...D.data,...I.data},resolve:{...I.data,...D.resolve,...I.routeConfig?.data,...I._resolvedData}}),{params:{},data:{},resolve:{}})}(I.slice(k))}class ai{constructor(D,I,k,G,re,be,Ue,Ft,Yt,fr,An,Ar){this.url=D,this.params=I,this.queryParams=k,this.fragment=G,this.data=re,this.outlet=be,this.component=Ue,this.routeConfig=Ft,this._urlSegment=Yt,this._lastPathIndex=fr,this._correctedLastPathIndex=Ar??fr,this._resolve=An}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Dr(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Dr(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(k=>k.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class ti extends Ai{constructor(D,I){super(I),this.url=D,ys(this,I)}toString(){return mi(this._root)}}function ys(b,D){D.value._routerState=b,D.children.forEach(I=>ys(b,I))}function mi(b){const D=b.children.length>0?` { ${b.children.map(mi).join(", ")} } `:"";return`${b.value}${D}`}function bi(b){if(b.snapshot){const D=b.snapshot,I=b._futureSnapshot;b.snapshot=I,Xe(D.queryParams,I.queryParams)||b.queryParams.next(I.queryParams),D.fragment!==I.fragment&&b.fragment.next(I.fragment),Xe(D.params,I.params)||b.params.next(I.params),function xt(b,D){if(b.length!==D.length)return!1;for(let I=0;IXe(I.parameters,D[k].parameters))}(b.url,D.url);return I&&!(!b.parent!=!D.parent)&&(!b.parent||Us(b.parent,D.parent))}function xs(b,D,I){if(I&&b.shouldReuseRoute(D.value,I.value.snapshot)){const k=I.value;k._futureSnapshot=D.value;const G=function Vi(b,D,I){return D.children.map(k=>{for(const G of I.children)if(b.shouldReuseRoute(k.value,G.value.snapshot))return xs(b,k,G);return xs(b,k)})}(b,D,I);return new Ur(k,G)}{if(b.shouldAttach(D.value)){const re=b.retrieve(D.value);if(null!==re){const be=re.route;return be.value._futureSnapshot=D.value,be.children=D.children.map(Ue=>xs(b,Ue)),be}}const k=function xr(b){return new ei(new oe.X(b.url),new oe.X(b.params),new oe.X(b.queryParams),new oe.X(b.fragment),new oe.X(b.data),b.outlet,b.component,b)}(D.value),G=D.children.map(re=>xs(b,re));return new Ur(k,G)}}function Os(b){return"object"==typeof b&&null!=b&&!b.outlets&&!b.segmentPath}function Pi(b){return"object"==typeof b&&null!=b&&b.outlets}function yo(b,D,I,k,G){let re={};if(k&&mn(k,(Ue,Ft)=>{re[Ft]=Array.isArray(Ue)?Ue.map(Yt=>`${Yt}`):`${Ue}`}),b===D)return new hn(I,re,G);const be=Bs(b,D,I);return new hn(be,re,G)}function Bs(b,D,I){const k={};return mn(b.children,(G,re)=>{k[re]=G===D?I:Bs(G,D,I)}),new fn(b.segments,k)}class ji{constructor(D,I,k){if(this.isAbsolute=D,this.numberOfDoubleDots=I,this.commands=k,D&&k.length>0&&Os(k[0]))throw new Error("Root segment cannot have matrix parameters");const G=k.find(Pi);if(G&&G!==Kn(k))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class qe{constructor(D,I,k){this.segmentGroup=D,this.processChildren=I,this.index=k}}function tn(b,D,I){if(b||(b=new fn([],{})),0===b.segments.length&&b.hasChildren())return cn(b,D,I);const k=function Ir(b,D,I){let k=0,G=D;const re={match:!1,pathIndex:0,commandIndex:0};for(;G=I.length)return re;const be=b.segments[G],Ue=I[k];if(Pi(Ue))break;const Ft=`${Ue}`,Yt=k0&&void 0===Ft)break;if(Ft&&Yt&&"object"==typeof Yt&&void 0===Yt.outlets){if(!$i(Ft,Yt,be))return re;k+=2}else{if(!$i(Ft,{},be))return re;k++}G++}return{match:!0,pathIndex:G,commandIndex:k}}(b,D,I),G=I.slice(k.commandIndex);if(k.match&&k.pathIndex{"string"==typeof re&&(re=[re]),null!==re&&(G[be]=tn(b.children[be],D,re))}),mn(b.children,(re,be)=>{void 0===k[be]&&(G[be]=re)}),new fn(b.segments,G)}}function Wr(b,D,I){const k=b.segments.slice(0,D);let G=0;for(;G{"string"==typeof I&&(I=[I]),null!==I&&(D[k]=Wr(new fn([],{}),0,I))}),D}function Cr(b){const D={};return mn(b,(I,k)=>D[k]=`${I}`),D}function $i(b,D,I){return b==I.path&&Xe(D,I.parameters)}class Hi{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new vs,this.attachRef=null}}class vs{constructor(){this.contexts=new Map}onChildOutletCreated(D,I){const k=this.getOrCreateContext(D);k.outlet=I,this.contexts.set(D,k)}onChildOutletDestroyed(D){const I=this.getContext(D);I&&(I.outlet=null,I.attachRef=null)}onOutletDeactivated(){const D=this.contexts;return this.contexts=new Map,D}onOutletReAttached(D){this.contexts=D}getOrCreateContext(D){let I=this.getContext(D);return I||(I=new Hi,this.contexts.set(D,I)),I}getContext(D){return this.contexts.get(D)||null}}let ni=(()=>{class b{constructor(I,k,G,re,be){this.parentContexts=I,this.location=k,this.changeDetector=re,this.environmentInjector=be,this.activated=null,this._activatedRoute=null,this.activateEvents=new g.vpe,this.deactivateEvents=new g.vpe,this.attachEvents=new g.vpe,this.detachEvents=new g.vpe,this.name=G||gn,I.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const I=this.parentContexts.getContext(this.name);I&&I.route&&(I.attachRef?this.attach(I.attachRef,I.route):this.activateWith(I.route,I.injector))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const I=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(I.instance),I}attach(I,k){this.activated=I,this._activatedRoute=k,this.location.insert(I.hostView),this.attachEvents.emit(I.instance)}deactivate(){if(this.activated){const I=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(I)}}activateWith(I,k){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=I;const G=this.location,be=I._futureSnapshot.component,Ue=this.parentContexts.getOrCreateContext(this.name).children,Ft=new ro(I,Ue,G.injector);if(k&&function Xi(b){return!!b.resolveComponentFactory}(k)){const Yt=k.resolveComponentFactory(be);this.activated=G.createComponent(Yt,G.length,Ft)}else this.activated=G.createComponent(be,{index:G.length,injector:Ft,environmentInjector:k??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return b.\u0275fac=function(I){return new(I||b)(g.Y36(vs),g.Y36(g.s_b),g.$8M("name"),g.Y36(g.sBO),g.Y36(g.lqb))},b.\u0275dir=g.lG2({type:b,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"]}),b})();class ro{constructor(D,I,k){this.route=D,this.childContexts=I,this.parent=k}get(D,I){return D===ei?this.route:D===vs?this.childContexts:this.parent.get(D,I)}}let Gi=(()=>{class b{}return b.\u0275fac=function(I){return new(I||b)},b.\u0275cmp=g.Xpm({type:b,selectors:[["ng-component"]],decls:1,vars:0,template:function(I,k){1&I&&g._UZ(0,"router-outlet")},dependencies:[ni],encapsulation:2}),b})();function Es(b,D){return b.providers&&!b._injector&&(b._injector=(0,g.MMx)(b.providers,D,`Route: ${b.path}`)),b._injector??D}function lr(b){const D=b.children&&b.children.map(lr),I=D?{...b,children:D}:{...b};return!I.component&&!I.loadComponent&&(D||I.loadChildren)&&I.outlet&&I.outlet!==gn&&(I.component=Gi),I}function ui(b){return b.outlet||gn}function zi(b,D){const I=b.filter(k=>ui(k)===D);return I.push(...b.filter(k=>ui(k)!==D)),I}function Fs(b){if(!b)return null;if(b.routeConfig?._injector)return b.routeConfig._injector;for(let D=b.parent;D;D=D.parent){const I=D.routeConfig;if(I?._loadedInjector)return I._loadedInjector;if(I?._injector)return I._injector}return null}class vo{constructor(D,I,k,G){this.routeReuseStrategy=D,this.futureState=I,this.currState=k,this.forwardEvent=G}activate(D){const I=this.futureState._root,k=this.currState?this.currState._root:null;this.deactivateChildRoutes(I,k,D),bi(this.futureState.root),this.activateChildRoutes(I,k,D)}deactivateChildRoutes(D,I,k){const G=vr(I);D.children.forEach(re=>{const be=re.value.outlet;this.deactivateRoutes(re,G[be],k),delete G[be]}),mn(G,(re,be)=>{this.deactivateRouteAndItsChildren(re,k)})}deactivateRoutes(D,I,k){const G=D.value,re=I?I.value:null;if(G===re)if(G.component){const be=k.getContext(G.outlet);be&&this.deactivateChildRoutes(D,I,be.children)}else this.deactivateChildRoutes(D,I,k);else re&&this.deactivateRouteAndItsChildren(I,k)}deactivateRouteAndItsChildren(D,I){D.value.component&&this.routeReuseStrategy.shouldDetach(D.value.snapshot)?this.detachAndStoreRouteSubtree(D,I):this.deactivateRouteAndOutlet(D,I)}detachAndStoreRouteSubtree(D,I){const k=I.getContext(D.value.outlet),G=k&&D.value.component?k.children:I,re=vr(D);for(const be of Object.keys(re))this.deactivateRouteAndItsChildren(re[be],G);if(k&&k.outlet){const be=k.outlet.detach(),Ue=k.children.onOutletDeactivated();this.routeReuseStrategy.store(D.value.snapshot,{componentRef:be,route:D,contexts:Ue})}}deactivateRouteAndOutlet(D,I){const k=I.getContext(D.value.outlet),G=k&&D.value.component?k.children:I,re=vr(D);for(const be of Object.keys(re))this.deactivateRouteAndItsChildren(re[be],G);k&&k.outlet&&(k.outlet.deactivate(),k.children.onOutletDeactivated(),k.attachRef=null,k.resolver=null,k.route=null)}activateChildRoutes(D,I,k){const G=vr(I);D.children.forEach(re=>{this.activateRoutes(re,G[re.value.outlet],k),this.forwardEvent(new ln(re.value.snapshot))}),D.children.length&&this.forwardEvent(new bt(D.value.snapshot))}activateRoutes(D,I,k){const G=D.value,re=I?I.value:null;if(bi(G),G===re)if(G.component){const be=k.getOrCreateContext(G.outlet);this.activateChildRoutes(D,I,be.children)}else this.activateChildRoutes(D,I,k);else if(G.component){const be=k.getOrCreateContext(G.outlet);if(this.routeReuseStrategy.shouldAttach(G.snapshot)){const Ue=this.routeReuseStrategy.retrieve(G.snapshot);this.routeReuseStrategy.store(G.snapshot,null),be.children.onOutletReAttached(Ue.contexts),be.attachRef=Ue.componentRef,be.route=Ue.route.value,be.outlet&&be.outlet.attach(Ue.componentRef,Ue.route.value),bi(Ue.route.value),this.activateChildRoutes(D,null,be.children)}else{const Ue=Fs(G.snapshot),Ft=Ue?.get(g._Vd)??null;be.attachRef=null,be.route=G,be.resolver=Ft,be.injector=Ue,be.outlet&&be.outlet.activateWith(G,be.injector),this.activateChildRoutes(D,null,be.children)}}else this.activateChildRoutes(D,null,k)}}function Qr(b){return"function"==typeof b}function yi(b){return b instanceof hn}const sr=Symbol("INITIAL_VALUE");function L(){return(0,Nt.w)(b=>(0,_e.a)(b.map(D=>D.pipe((0,Lt.q)(1),(0,Se.O)(sr)))).pipe((0,Ie.R)((D,I)=>{let k=!1;return I.reduce((G,re,be)=>G!==sr?G:(re===sr&&(k=!0),k||!1!==re&&be!==I.length-1&&!yi(re)?G:re),D)},sr),(0,Ye.h)(D=>D!==sr),(0,xe.U)(D=>yi(D)?D:!0===D),(0,Lt.q)(1)))}const ee={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function V(b,D,I){if(""===D.path)return"full"===D.pathMatch&&(b.hasChildren()||I.length>0)?{...ee}:{matched:!0,consumedSegments:[],remainingSegments:I,parameters:{},positionalParamSegments:{}};const G=(D.matcher||Ge)(I,b,D);if(!G)return{...ee};const re={};mn(G.posParams,(Ue,Ft)=>{re[Ft]=Ue.path});const be=G.consumed.length>0?{...re,...G.consumed[G.consumed.length-1].parameters}:re;return{matched:!0,consumedSegments:G.consumed,remainingSegments:I.slice(G.consumed.length),parameters:be,positionalParamSegments:G.posParams??{}}}function Q(b,D,I,k,G="corrected"){if(I.length>0&&function Vt(b,D,I){return I.some(k=>cr(b,D,k)&&ui(k)!==gn)}(b,I,k)){const be=new fn(D,function At(b,D,I,k){const G={};G[gn]=k,k._sourceSegment=b,k._segmentIndexShift=D.length;for(const re of I)if(""===re.path&&ui(re)!==gn){const be=new fn([],{});be._sourceSegment=b,be._segmentIndexShift=D.length,G[ui(re)]=be}return G}(b,D,k,new fn(I,b.children)));return be._sourceSegment=b,be._segmentIndexShift=D.length,{segmentGroup:be,slicedSegments:[]}}if(0===I.length&&function Jt(b,D,I){return I.some(k=>cr(b,D,k))}(b,I,k)){const be=new fn(b.segments,function Ve(b,D,I,k,G,re){const be={};for(const Ue of k)if(cr(b,I,Ue)&&!G[ui(Ue)]){const Ft=new fn([],{});Ft._sourceSegment=b,Ft._segmentIndexShift="legacy"===re?b.segments.length:D.length,be[ui(Ue)]=Ft}return{...G,...be}}(b,D,I,k,b.children,G));return be._sourceSegment=b,be._segmentIndexShift=D.length,{segmentGroup:be,slicedSegments:I}}const re=new fn(b.segments,b.children);return re._sourceSegment=b,re._segmentIndexShift=D.length,{segmentGroup:re,slicedSegments:I}}function cr(b,D,I){return(!(b.hasChildren()||D.length>0)||"full"!==I.pathMatch)&&""===I.path}function gr(b,D,I,k){return!!(ui(b)===k||k!==gn&&cr(D,I,b))&&("**"===b.path||V(D,b,I).matched)}function Tr(b,D,I){return 0===D.length&&!b.children[I]}class Zn{constructor(D){this.segmentGroup=D||null}}class Lr{constructor(D){this.urlTree=D}}function or(b){return(0,fe._)(new Zn(b))}function Dn(b){return(0,fe._)(new Lr(b))}class bs{constructor(D,I,k,G,re){this.injector=D,this.configLoader=I,this.urlSerializer=k,this.urlTree=G,this.config=re,this.allowRedirects=!0}apply(){const D=Q(this.urlTree.root,[],[],this.config).segmentGroup,I=new fn(D.segments,D.children);return this.expandSegmentGroup(this.injector,this.config,I,gn).pipe((0,xe.U)(re=>this.createUrlTree(Oi(re),this.urlTree.queryParams,this.urlTree.fragment))).pipe((0,Ce.K)(re=>{if(re instanceof Lr)return this.allowRedirects=!1,this.match(re.urlTree);throw re instanceof Zn?this.noMatchError(re):re}))}match(D){return this.expandSegmentGroup(this.injector,this.config,D.root,gn).pipe((0,xe.U)(G=>this.createUrlTree(Oi(G),D.queryParams,D.fragment))).pipe((0,Ce.K)(G=>{throw G instanceof Zn?this.noMatchError(G):G}))}noMatchError(D){return new Error(`Cannot match any routes. URL Segment: '${D.segmentGroup}'`)}createUrlTree(D,I,k){const G=D.segments.length>0?new fn([],{[gn]:D}):D;return new hn(G,I,k)}expandSegmentGroup(D,I,k,G){return 0===k.segments.length&&k.hasChildren()?this.expandChildren(D,I,k).pipe((0,xe.U)(re=>new fn([],re))):this.expandSegment(D,k,I,k.segments,G,!0)}expandChildren(D,I,k){const G=[];for(const re of Object.keys(k.children))"primary"===re?G.unshift(re):G.push(re);return(0,K.D)(G).pipe((0,et.b)(re=>{const be=k.children[re],Ue=zi(I,re);return this.expandSegmentGroup(D,Ue,be,re).pipe((0,xe.U)(Ft=>({segment:Ft,outlet:re})))}),(0,Ie.R)((re,be)=>(re[be.outlet]=be.segment,re),{}),function Ne(b,D){const I=arguments.length>=2;return k=>k.pipe(b?(0,Ye.h)((G,re)=>b(G,re,k)):ot.y,Qe(1),I?(0,kt.d)(D):(0,Ee.T)(()=>new ge.K))}())}expandSegment(D,I,k,G,re,be){return(0,K.D)(k).pipe((0,et.b)(Ue=>this.expandSegmentAgainstRoute(D,I,k,Ue,G,re,be).pipe((0,Ce.K)(Yt=>{if(Yt instanceof Zn)return(0,ae.of)(null);throw Yt}))),(0,lt.P)(Ue=>!!Ue),(0,Ce.K)((Ue,Ft)=>{if(Ue instanceof ge.K||"EmptyError"===Ue.name)return Tr(I,G,re)?(0,ae.of)(new fn([],{})):or(I);throw Ue}))}expandSegmentAgainstRoute(D,I,k,G,re,be,Ue){return gr(G,I,re,be)?void 0===G.redirectTo?this.matchSegmentAgainstRoute(D,I,G,re,be):Ue&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(D,I,k,G,re,be):or(I):or(I)}expandSegmentAgainstRouteUsingRedirect(D,I,k,G,re,be){return"**"===G.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(D,k,G,be):this.expandRegularSegmentAgainstRouteUsingRedirect(D,I,k,G,re,be)}expandWildCardWithParamsAgainstRouteUsingRedirect(D,I,k,G){const re=this.applyRedirectCommands([],k.redirectTo,{});return k.redirectTo.startsWith("/")?Dn(re):this.lineralizeSegments(k,re).pipe((0,at.z)(be=>{const Ue=new fn(be,{});return this.expandSegment(D,Ue,I,be,G,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(D,I,k,G,re,be){const{matched:Ue,consumedSegments:Ft,remainingSegments:Yt,positionalParamSegments:fr}=V(I,G,re);if(!Ue)return or(I);const An=this.applyRedirectCommands(Ft,G.redirectTo,fr);return G.redirectTo.startsWith("/")?Dn(An):this.lineralizeSegments(G,An).pipe((0,at.z)(Ar=>this.expandSegment(D,I,k,Ar.concat(Yt),be,!1)))}matchSegmentAgainstRoute(D,I,k,G,re){if("**"===k.path)return D=Es(k,D),k.loadChildren?(k._loadedRoutes?(0,ae.of)({routes:k._loadedRoutes,injector:k._loadedInjector}):this.configLoader.loadChildren(D,k)).pipe((0,xe.U)(An=>(k._loadedRoutes=An.routes,k._loadedInjector=An.injector,new fn(G,{})))):(0,ae.of)(new fn(G,{}));const{matched:be,consumedSegments:Ue,remainingSegments:Ft}=V(I,k,G);return be?(D=Es(k,D),this.getChildConfig(D,k,G).pipe((0,at.z)(fr=>{const An=fr.injector??D,Ar=fr.routes,{segmentGroup:si,slicedSegments:$n}=Q(I,Ue,Ft,Ar),Gs=new fn(si.segments,si.children);if(0===$n.length&&Gs.hasChildren())return this.expandChildren(An,Ar,Gs).pipe((0,xe.U)(na=>new fn(Ue,na)));if(0===Ar.length&&0===$n.length)return(0,ae.of)(new fn(Ue,{}));const Js=ui(k)===re;return this.expandSegment(An,Gs,Ar,$n,Js?gn:re,!0).pipe((0,xe.U)(On=>new fn(Ue.concat(On.segments),On.children)))}))):or(I)}getChildConfig(D,I,k){return I.children?(0,ae.of)({routes:I.children,injector:D}):I.loadChildren?void 0!==I._loadedRoutes?(0,ae.of)({routes:I._loadedRoutes,injector:I._loadedInjector}):this.runCanLoadGuards(D,I,k).pipe((0,at.z)(G=>G?this.configLoader.loadChildren(D,I).pipe((0,Je.b)(re=>{I._loadedRoutes=re.routes,I._loadedInjector=re.injector})):function li(b){return(0,fe._)(Ct(`Cannot load children because the guard of the route "path: '${b.path}'" returned false`))}(I))):(0,ae.of)({routes:[],injector:D})}runCanLoadGuards(D,I,k){const G=I.canLoad;if(!G||0===G.length)return(0,ae.of)(!0);const re=G.map(be=>{const Ue=D.get(be);let Ft;if(function os(b){return b&&Qr(b.canLoad)}(Ue))Ft=Ue.canLoad(I,k);else{if(!Qr(Ue))throw new Error("Invalid CanLoad guard");Ft=Ue(I,k)}return Xn(Ft)});return(0,ae.of)(re).pipe(L(),(0,Je.b)(be=>{if(!yi(be))return;const Ue=Ct(`Redirecting to "${this.urlSerializer.serialize(be)}"`);throw Ue.url=be,Ue}),(0,xe.U)(be=>!0===be))}lineralizeSegments(D,I){let k=[],G=I.root;for(;;){if(k=k.concat(G.segments),0===G.numberOfChildren)return(0,ae.of)(k);if(G.numberOfChildren>1||!G.children[gn])return(0,fe._)(new Error(`Only absolute redirects can have named outlets. redirectTo: '${D.redirectTo}'`));G=G.children[gn]}}applyRedirectCommands(D,I,k){return this.applyRedirectCreatreUrlTree(I,this.urlSerializer.parse(I),D,k)}applyRedirectCreatreUrlTree(D,I,k,G){const re=this.createSegmentGroup(D,I.root,k,G);return new hn(re,this.createQueryParams(I.queryParams,this.urlTree.queryParams),I.fragment)}createQueryParams(D,I){const k={};return mn(D,(G,re)=>{if("string"==typeof G&&G.startsWith(":")){const Ue=G.substring(1);k[re]=I[Ue]}else k[re]=G}),k}createSegmentGroup(D,I,k,G){const re=this.createSegments(D,I.segments,k,G);let be={};return mn(I.children,(Ue,Ft)=>{be[Ft]=this.createSegmentGroup(D,Ue,k,G)}),new fn(re,be)}createSegments(D,I,k,G){return I.map(re=>re.path.startsWith(":")?this.findPosParam(D,re,G):this.findOrReturn(re,k))}findPosParam(D,I,k){const G=k[I.path.substring(1)];if(!G)throw new Error(`Cannot redirect to '${D}'. Cannot find '${I.path}'.`);return G}findOrReturn(D,I){let k=0;for(const G of I){if(G.path===D.path)return I.splice(k),G;k++}return D}}function Oi(b){const D={};for(const k of Object.keys(b.children)){const re=Oi(b.children[k]);(re.segments.length>0||re.hasChildren())&&(D[k]=re)}return function Si(b){if(1===b.numberOfChildren&&b.children[gn]){const D=b.children[gn];return new fn(b.segments.concat(D.segments),D.children)}return b}(new fn(b.segments,D))}class U{constructor(D){this.path=D,this.route=this.path[this.path.length-1]}}class O{constructor(D,I){this.component=D,this.route=I}}function P(b,D,I){const k=b._root;return un(k,D?D._root:null,I,[k.value])}function gt(b,D,I){return(Fs(D)??I).get(b)}function un(b,D,I,k,G={canDeactivateChecks:[],canActivateChecks:[]}){const re=vr(D);return b.children.forEach(be=>{(function Br(b,D,I,k,G={canDeactivateChecks:[],canActivateChecks:[]}){const re=b.value,be=D?D.value:null,Ue=I?I.getContext(b.value.outlet):null;if(be&&re.routeConfig===be.routeConfig){const Ft=function ci(b,D,I){if("function"==typeof I)return I(b,D);switch(I){case"pathParamsChange":return!Nr(b.url,D.url);case"pathParamsOrQueryParamsChange":return!Nr(b.url,D.url)||!Xe(b.queryParams,D.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Us(b,D)||!Xe(b.queryParams,D.queryParams);default:return!Us(b,D)}}(be,re,re.routeConfig.runGuardsAndResolvers);Ft?G.canActivateChecks.push(new U(k)):(re.data=be.data,re._resolvedData=be._resolvedData),un(b,D,re.component?Ue?Ue.children:null:I,k,G),Ft&&Ue&&Ue.outlet&&Ue.outlet.isActivated&&G.canDeactivateChecks.push(new O(Ue.outlet.component,be))}else be&&ri(D,Ue,G),G.canActivateChecks.push(new U(k)),un(b,null,re.component?Ue?Ue.children:null:I,k,G)})(be,re[be.value.outlet],I,k.concat([be.value]),G),delete re[be.value.outlet]}),mn(re,(be,Ue)=>ri(be,I.getContext(Ue),G)),G}function ri(b,D,I){const k=vr(b),G=b.value;mn(k,(re,be)=>{ri(re,G.component?D?D.children.getContext(be):null:D,I)}),I.canDeactivateChecks.push(new O(G.component&&D&&D.outlet&&D.outlet.isActivated?D.outlet.component:null,G))}class br{}function di(b){return new ce.y(D=>D.error(b))}class Zr{constructor(D,I,k,G,re,be){this.rootComponentType=D,this.config=I,this.urlTree=k,this.url=G,this.paramsInheritanceStrategy=re,this.relativeLinkResolution=be}recognize(){const D=Q(this.urlTree.root,[],[],this.config.filter(be=>void 0===be.redirectTo),this.relativeLinkResolution).segmentGroup,I=this.processSegmentGroup(this.config,D,gn);if(null===I)return null;const k=new ai([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},gn,this.rootComponentType,null,this.urlTree.root,-1,{}),G=new Ur(k,I),re=new ti(this.url,G);return this.inheritParamsAndData(re._root),re}inheritParamsAndData(D){const I=D.value,k=Fi(I,this.paramsInheritanceStrategy);I.params=Object.freeze(k.params),I.data=Object.freeze(k.data),D.children.forEach(G=>this.inheritParamsAndData(G))}processSegmentGroup(D,I,k){return 0===I.segments.length&&I.hasChildren()?this.processChildren(D,I):this.processSegment(D,I,I.segments,k)}processChildren(D,I){const k=[];for(const re of Object.keys(I.children)){const be=I.children[re],Ue=zi(D,re),Ft=this.processSegmentGroup(Ue,be,re);if(null===Ft)return null;k.push(...Ft)}const G=da(k);return function Wo(b){b.sort((D,I)=>D.value.outlet===gn?-1:I.value.outlet===gn?1:D.value.outlet.localeCompare(I.value.outlet))}(G),G}processSegment(D,I,k,G){for(const re of D){const be=this.processSegmentAgainstRoute(re,I,k,G);if(null!==be)return be}return Tr(I,k,G)?[]:null}processSegmentAgainstRoute(D,I,k,G){if(D.redirectTo||!gr(D,I,k,G))return null;let re,be=[],Ue=[];if("**"===D.path){const si=k.length>0?Kn(k).parameters:{},$n=Ea(I)+k.length;re=new ai(k,si,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,oo(D),ui(D),D.component??D._loadedComponent??null,D,Bo(I),$n,wa(D),$n)}else{const si=V(I,D,k);if(!si.matched)return null;be=si.consumedSegments,Ue=si.remainingSegments;const $n=Ea(I)+be.length;re=new ai(be,si.parameters,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,oo(D),ui(D),D.component??D._loadedComponent??null,D,Bo(I),$n,wa(D),$n)}const Ft=function yu(b){return b.children?b.children:b.loadChildren?b._loadedRoutes:[]}(D),{segmentGroup:Yt,slicedSegments:fr}=Q(I,be,Ue,Ft.filter(si=>void 0===si.redirectTo),this.relativeLinkResolution);if(0===fr.length&&Yt.hasChildren()){const si=this.processChildren(Ft,Yt);return null===si?null:[new Ur(re,si)]}if(0===Ft.length&&0===fr.length)return[new Ur(re,[])];const An=ui(D)===G,Ar=this.processSegment(Ft,Yt,fr,An?gn:G);return null===Ar?null:[new Ur(re,Ar)]}}function $s(b){const D=b.value.routeConfig;return D&&""===D.path&&void 0===D.redirectTo}function da(b){const D=[],I=new Set;for(const k of b){if(!$s(k)){D.push(k);continue}const G=D.find(re=>k.value.routeConfig===re.value.routeConfig);void 0!==G?(G.children.push(...k.children),I.add(G)):D.push(k)}for(const k of I){const G=da(k.children);D.push(new Ur(k.value,G))}return D.filter(k=>!I.has(k))}function Bo(b){let D=b;for(;D._sourceSegment;)D=D._sourceSegment;return D}function Ea(b){let D=b,I=D._segmentIndexShift??0;for(;D._sourceSegment;)D=D._sourceSegment,I+=D._segmentIndexShift??0;return I-1}function oo(b){return b.data||{}}function wa(b){return b.resolve||{}}const Yo=Symbol("RouteTitle");function Hs(b){return"string"==typeof b.title||null===b.title}function ii(b){return(0,Nt.w)(D=>{const I=b(D);return I?(0,K.D)(I).pipe((0,xe.U)(()=>D)):(0,ae.of)(D)})}class Cl extends class bo{shouldDetach(D){return!1}store(D,I){}shouldAttach(D){return!1}retrieve(D){return null}shouldReuseRoute(D,I){return D.routeConfig===I.routeConfig}}{}const Do=new g.OlP("ROUTES");let Jo=(()=>{class b{constructor(I,k){this.injector=I,this.compiler=k,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(I){if(this.componentLoaders.get(I))return this.componentLoaders.get(I);if(I._loadedComponent)return(0,ae.of)(I._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(I);const k=Xn(I.loadComponent()).pipe((0,Je.b)(re=>{this.onLoadEndListener&&this.onLoadEndListener(I),I._loadedComponent=re}),(0,Tn.x)(()=>{this.componentLoaders.delete(I)})),G=new it.c(k,()=>new Ke.x).pipe((0,St.x)());return this.componentLoaders.set(I,G),G}loadChildren(I,k){if(this.childrenLoaders.get(k))return this.childrenLoaders.get(k);if(k._loadedRoutes)return(0,ae.of)({routes:k._loadedRoutes,injector:k._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(k);const re=this.loadModuleFactoryOrRoutes(k.loadChildren).pipe((0,xe.U)(Ue=>{this.onLoadEndListener&&this.onLoadEndListener(k);let Ft,Yt,fr=!1;Array.isArray(Ue)?Yt=Ue:(Ft=Ue.create(I).injector,Yt=nr(Ft.get(Do,[],g.XFs.Self|g.XFs.Optional)));return{routes:Yt.map(lr),injector:Ft}}),(0,Tn.x)(()=>{this.childrenLoaders.delete(k)})),be=new it.c(re,()=>new Ke.x).pipe((0,St.x)());return this.childrenLoaders.set(k,be),be}loadModuleFactoryOrRoutes(I){return Xn(I()).pipe((0,at.z)(k=>k instanceof g.YKP||Array.isArray(k)?(0,ae.of)(k):(0,K.D)(this.compiler.compileModuleAsync(k))))}}return b.\u0275fac=function(I){return new(I||b)(g.LFG(g.zs3),g.LFG(g.Sil))},b.\u0275prov=g.Yz7({token:b,factory:b.\u0275fac}),b})();class Oo{shouldProcessUrl(D){return!0}extract(D){return D}merge(D,I){return D}}function ea(b){throw b}function Ri(b,D,I){return D.parse("/")}const ba={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Ro={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let _i=(()=>{class b{constructor(I,k,G,re,be,Ue,Ft){this.rootComponentType=I,this.urlSerializer=k,this.rootContexts=G,this.location=re,this.config=Ft,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new Ke.x,this.errorHandler=ea,this.malformedUriErrorHandler=Ri,this.navigated=!1,this.lastSuccessfulId=-1,this.afterPreactivation=()=>(0,ae.of)(void 0),this.urlHandlingStrategy=new Oo,this.routeReuseStrategy=new Cl,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.configLoader=be.get(Jo),this.configLoader.onLoadEndListener=Ar=>this.triggerEvent(new er(Ar)),this.configLoader.onLoadStartListener=Ar=>this.triggerEvent(new wn(Ar)),this.ngModule=be.get(g.h0i),this.console=be.get(g.c2e);const An=be.get(g.R0b);this.isNgZoneEnabled=An instanceof g.R0b&&g.R0b.isInAngularZone(),this.resetConfig(Ft),this.currentUrlTree=function Rr(){return new hn(new fn([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=gs(this.currentUrlTree,this.rootComponentType),this.transitions=new oe.X({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){return this.location.getState()?.\u0275routerPageId}setupNavigations(I){const k=this.events;return I.pipe((0,Ye.h)(G=>0!==G.id),(0,xe.U)(G=>({...G,extractedUrl:this.urlHandlingStrategy.extract(G.rawUrl)})),(0,Nt.w)(G=>{let re=!1,be=!1;return(0,ae.of)(G).pipe((0,Je.b)(Ue=>{this.currentNavigation={id:Ue.id,initialUrl:Ue.rawUrl,extractedUrl:Ue.extractedUrl,trigger:Ue.source,extras:Ue.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),(0,Nt.w)(Ue=>{const Ft=this.browserUrlTree.toString(),Yt=!this.navigated||Ue.extractedUrl.toString()!==Ft||Ft!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||Yt)&&this.urlHandlingStrategy.shouldProcessUrl(Ue.rawUrl))return ta(Ue.source)&&(this.browserUrlTree=Ue.extractedUrl),(0,ae.of)(Ue).pipe((0,Nt.w)(An=>{const Ar=this.transitions.getValue();return k.next(new Et(An.id,this.serializeUrl(An.extractedUrl),An.source,An.restoredState)),Ar!==this.transitions.getValue()?me.E:Promise.resolve(An)}),function so(b,D,I,k){return(0,Nt.w)(G=>function as(b,D,I,k,G){return new bs(b,D,I,k,G).apply()}(b,D,I,G.extractedUrl,k).pipe((0,xe.U)(re=>({...G,urlAfterRedirects:re}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),(0,Je.b)(An=>{this.currentNavigation={...this.currentNavigation,finalUrl:An.urlAfterRedirects}}),function Ys(b,D,I,k,G){return(0,at.z)(re=>function Eo(b,D,I,k,G="emptyOnly",re="legacy"){try{const be=new Zr(b,D,I,k,G,re).recognize();return null===be?di(new br):(0,ae.of)(be)}catch(be){return di(be)}}(b,D,re.urlAfterRedirects,I(re.urlAfterRedirects),k,G).pipe((0,xe.U)(be=>({...re,targetSnapshot:be}))))}(this.rootComponentType,this.config,An=>this.serializeUrl(An),this.paramsInheritanceStrategy,this.relativeLinkResolution),(0,Je.b)(An=>{if("eager"===this.urlUpdateStrategy){if(!An.extras.skipLocationChange){const si=this.urlHandlingStrategy.merge(An.urlAfterRedirects,An.rawUrl);this.setBrowserUrl(si,An)}this.browserUrlTree=An.urlAfterRedirects}const Ar=new nt(An.id,this.serializeUrl(An.extractedUrl),this.serializeUrl(An.urlAfterRedirects),An.targetSnapshot);k.next(Ar)}));if(Yt&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:Ar,extractedUrl:si,source:$n,restoredState:Gs,extras:Js}=Ue,zr=new Et(Ar,this.serializeUrl(si),$n,Gs);k.next(zr);const On=gs(si,this.rootComponentType).snapshot;return(0,ae.of)({...Ue,targetSnapshot:On,urlAfterRedirects:si,extras:{...Js,skipLocationChange:!1,replaceUrl:!1}})}return this.rawUrlTree=Ue.rawUrl,Ue.resolve(null),me.E}),(0,Je.b)(Ue=>{const Ft=new ut(Ue.id,this.serializeUrl(Ue.extractedUrl),this.serializeUrl(Ue.urlAfterRedirects),Ue.targetSnapshot);this.triggerEvent(Ft)}),(0,xe.U)(Ue=>({...Ue,guards:P(Ue.targetSnapshot,Ue.currentSnapshot,this.rootContexts)})),function js(b,D){return(0,at.z)(I=>{const{targetSnapshot:k,currentSnapshot:G,guards:{canActivateChecks:re,canDeactivateChecks:be}}=I;return 0===be.length&&0===re.length?(0,ae.of)({...I,guardsResult:!0}):function Ko(b,D,I,k){return(0,K.D)(b).pipe((0,at.z)(G=>function In(b,D,I,k,G){const re=D&&D.routeConfig?D.routeConfig.canDeactivate:null;if(!re||0===re.length)return(0,ae.of)(!0);const be=re.map(Ue=>{const Ft=gt(Ue,D,G);let Yt;if(function es(b){return b&&Qr(b.canDeactivate)}(Ft))Yt=Xn(Ft.canDeactivate(b,D,I,k));else{if(!Qr(Ft))throw new Error("Invalid CanDeactivate guard");Yt=Xn(Ft(b,D,I,k))}return Yt.pipe((0,lt.P)())});return(0,ae.of)(be).pipe(L())}(G.component,G.route,I,D,k)),(0,lt.P)(G=>!0!==G,!0))}(be,k,G,b).pipe((0,at.z)(Ue=>Ue&&function Uo(b){return"boolean"==typeof b}(Ue)?function Dt(b,D,I,k){return(0,K.D)(D).pipe((0,et.b)(G=>(0,he.z)(function Oe(b,D){return null!==b&&D&&D(new Jn(b)),(0,ae.of)(!0)}(G.route.parent,k),function ze(b,D){return null!==b&&D&&D(new Un(b)),(0,ae.of)(!0)}(G.route,k),function Pt(b,D,I){const k=D[D.length-1],re=D.slice(0,D.length-1).reverse().map(be=>function X(b){const D=b.routeConfig?b.routeConfig.canActivateChild:null;return D&&0!==D.length?{node:b,guards:D}:null}(be)).filter(be=>null!==be).map(be=>(0,ie.P)(()=>{const Ue=be.guards.map(Ft=>{const Yt=gt(Ft,be.node,I);let fr;if(function xi(b){return b&&Qr(b.canActivateChild)}(Yt))fr=Xn(Yt.canActivateChild(k,b));else{if(!Qr(Yt))throw new Error("Invalid CanActivateChild guard");fr=Xn(Yt(k,b))}return fr.pipe((0,lt.P)())});return(0,ae.of)(Ue).pipe(L())}));return(0,ae.of)(re).pipe(L())}(b,G.path,I),function pt(b,D,I){const k=D.routeConfig?D.routeConfig.canActivate:null;if(!k||0===k.length)return(0,ae.of)(!0);const G=k.map(re=>(0,ie.P)(()=>{const be=gt(re,D,I);let Ue;if(function ir(b){return b&&Qr(b.canActivate)}(be))Ue=Xn(be.canActivate(D,b));else{if(!Qr(be))throw new Error("Invalid CanActivate guard");Ue=Xn(be(D,b))}return Ue.pipe((0,lt.P)())}));return(0,ae.of)(G).pipe(L())}(b,G.route,I))),(0,lt.P)(G=>!0!==G,!0))}(k,re,b,D):(0,ae.of)(Ue)),(0,xe.U)(Ue=>({...I,guardsResult:Ue})))})}(this.ngModule.injector,Ue=>this.triggerEvent(Ue)),(0,Je.b)(Ue=>{if(yi(Ue.guardsResult)){const Yt=Ct(`Redirecting to "${this.serializeUrl(Ue.guardsResult)}"`);throw Yt.url=Ue.guardsResult,Yt}const Ft=new Kt(Ue.id,this.serializeUrl(Ue.extractedUrl),this.serializeUrl(Ue.urlAfterRedirects),Ue.targetSnapshot,!!Ue.guardsResult);this.triggerEvent(Ft)}),(0,Ye.h)(Ue=>!!Ue.guardsResult||(this.restoreHistory(Ue),this.cancelNavigationTransition(Ue,""),!1)),ii(Ue=>{if(Ue.guards.canActivateChecks.length)return(0,ae.of)(Ue).pipe((0,Je.b)(Ft=>{const Yt=new Ht(Ft.id,this.serializeUrl(Ft.extractedUrl),this.serializeUrl(Ft.urlAfterRedirects),Ft.targetSnapshot);this.triggerEvent(Yt)}),(0,Nt.w)(Ft=>{let Yt=!1;return(0,ae.of)(Ft).pipe(function Pa(b,D){return(0,at.z)(I=>{const{targetSnapshot:k,guards:{canActivateChecks:G}}=I;if(!G.length)return(0,ae.of)(I);let re=0;return(0,K.D)(G).pipe((0,et.b)(be=>function wo(b,D,I,k){const G=b.routeConfig,re=b._resolve;return void 0!==G?.title&&!Hs(G)&&(re[Yo]=G.title),function xo(b,D,I,k){const G=function Qo(b){return[...Object.keys(b),...Object.getOwnPropertySymbols(b)]}(b);if(0===G.length)return(0,ae.of)({});const re={};return(0,K.D)(G).pipe((0,at.z)(be=>function Bi(b,D,I,k){const G=gt(b,D,k);return Xn(G.resolve?G.resolve(D,I):G(D,I))}(b[be],D,I,k).pipe((0,lt.P)(),(0,Je.b)(Ue=>{re[be]=Ue}))),Qe(1),(0,pn.h)(re),(0,Ce.K)(be=>be instanceof ge.K?me.E:(0,fe._)(be)))}(re,b,D,k).pipe((0,xe.U)(be=>(b._resolvedData=be,b.data=Fi(b,I).resolve,G&&Hs(G)&&(b.data[Yo]=G.title),null)))}(be.route,k,b,D)),(0,Je.b)(()=>re++),Qe(1),(0,at.z)(be=>re===G.length?(0,ae.of)(I):me.E))})}(this.paramsInheritanceStrategy,this.ngModule.injector),(0,Je.b)({next:()=>Yt=!0,complete:()=>{Yt||(this.restoreHistory(Ft),this.cancelNavigationTransition(Ft,"At least one route resolver didn't emit any value."))}}))}),(0,Je.b)(Ft=>{const Yt=new Zt(Ft.id,this.serializeUrl(Ft.extractedUrl),this.serializeUrl(Ft.urlAfterRedirects),Ft.targetSnapshot);this.triggerEvent(Yt)}))}),ii(()=>this.afterPreactivation()),ii(Ue=>{const Ft=Yt=>{const fr=[];Yt.routeConfig?.loadComponent&&!Yt.routeConfig._loadedComponent&&fr.push(this.configLoader.loadComponent(Yt.routeConfig).pipe((0,Je.b)(An=>{Yt.component=An}),(0,xe.U)(()=>{})));for(const An of Yt.children)fr.push(...Ft(An));return fr};return(0,_e.a)(Ft(Ue.targetSnapshot.root)).pipe((0,kt.d)(),(0,Lt.q)(1))}),(0,xe.U)(Ue=>{const Ft=function _s(b,D,I){const k=xs(b,D._root,I?I._root:void 0);return new ps(k,D)}(this.routeReuseStrategy,Ue.targetSnapshot,Ue.currentRouterState);return{...Ue,targetRouterState:Ft}}),(0,Je.b)(Ue=>{this.currentUrlTree=Ue.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(Ue.urlAfterRedirects,Ue.rawUrl),this.routerState=Ue.targetRouterState,"deferred"===this.urlUpdateStrategy&&(Ue.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,Ue),this.browserUrlTree=Ue.urlAfterRedirects)}),((b,D,I)=>(0,xe.U)(k=>(new vo(D,k.targetRouterState,k.currentRouterState,I).activate(b),k)))(this.rootContexts,this.routeReuseStrategy,Ue=>this.triggerEvent(Ue)),(0,Je.b)({next(){re=!0},complete(){re=!0}}),(0,Tn.x)(()=>{re||be||this.cancelNavigationTransition(G,`Navigation ID ${G.id} is not equal to the current navigation id ${this.navigationId}`),this.currentNavigation?.id===G.id&&(this.currentNavigation=null)}),(0,Ce.K)(Ue=>{if(be=!0,function Be(b){return b&&b[Or]}(Ue)){const Ft=yi(Ue.url);Ft||(this.navigated=!0,this.restoreHistory(G,!0));const Yt=new It(G.id,this.serializeUrl(G.extractedUrl),Ue.message);if(k.next(Yt),Ft){const fr=this.urlHandlingStrategy.merge(Ue.url,this.rawUrlTree),An={skipLocationChange:G.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||ta(G.source)};this.scheduleNavigation(fr,"imperative",null,An,{resolve:G.resolve,reject:G.reject,promise:G.promise})}else G.resolve(!1)}else{this.restoreHistory(G,!0);const Ft=new Rn(G.id,this.serializeUrl(G.extractedUrl),Ue);k.next(Ft);try{G.resolve(this.errorHandler(Ue))}catch(Yt){G.reject(Yt)}}return me.E}))}))}resetRootComponentType(I){this.rootComponentType=I,this.routerState.root.component=this.rootComponentType}setTransition(I){this.transitions.next({...this.transitions.value,...I})}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(I=>{const k="popstate"===I.type?"popstate":"hashchange";"popstate"===k&&setTimeout(()=>{const G={replaceUrl:!0},re=I.state?.navigationId?I.state:null;if(re){const Ue={...re};delete Ue.navigationId,delete Ue.\u0275routerPageId,0!==Object.keys(Ue).length&&(G.state=Ue)}const be=this.parseUrl(I.url);this.scheduleNavigation(be,k,re,G)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(I){this.events.next(I)}resetConfig(I){this.config=I.map(lr),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(I,k={}){const{relativeTo:G,queryParams:re,fragment:be,queryParamsHandling:Ue,preserveFragment:Ft}=k,Yt=G||this.routerState.root,fr=Ft?this.currentUrlTree.fragment:be;let An=null;switch(Ue){case"merge":An={...this.currentUrlTree.queryParams,...re};break;case"preserve":An=this.currentUrlTree.queryParams;break;default:An=re||null}return null!==An&&(An=this.removeEmptyProps(An)),function Mo(b,D,I,k,G){if(0===I.length)return yo(D.root,D.root,D.root,k,G);const re=function Ui(b){if("string"==typeof b[0]&&1===b.length&&"/"===b[0])return new ji(!0,0,b);let D=0,I=!1;const k=b.reduce((G,re,be)=>{if("object"==typeof re&&null!=re){if(re.outlets){const Ue={};return mn(re.outlets,(Ft,Yt)=>{Ue[Yt]="string"==typeof Ft?Ft.split("/"):Ft}),[...G,{outlets:Ue}]}if(re.segmentPath)return[...G,re.segmentPath]}return"string"!=typeof re?[...G,re]:0===be?(re.split("/").forEach((Ue,Ft)=>{0==Ft&&"."===Ue||(0==Ft&&""===Ue?I=!0:".."===Ue?D++:""!=Ue&&G.push(Ue))}),G):[...G,re]},[]);return new ji(I,D,k)}(I);return re.toRoot()?yo(D.root,D.root,new fn([],{}),k,G):function be(Ft){const Yt=function Le(b,D,I,k){return b.isAbsolute?new qe(D.root,!0,0):-1===k?new qe(I,I===D.root,0):function ct(b,D,I){let k=b,G=D,re=I;for(;re>G;){if(re-=G,k=k.parent,!k)throw new Error("Invalid number of '../'");G=k.segments.length}return new qe(k,!1,G-re)}(I,k+(Os(b.commands[0])?0:1),b.numberOfDoubleDots)}(re,D,b.snapshot?._urlSegment,Ft),fr=Yt.processChildren?cn(Yt.segmentGroup,Yt.index,re.commands):tn(Yt.segmentGroup,Yt.index,re.commands);return yo(D.root,Yt.segmentGroup,fr,k,G)}(b.snapshot?._lastPathIndex)}(Yt,this.currentUrlTree,I,An,fr??null)}navigateByUrl(I,k={skipLocationChange:!1}){const G=yi(I)?I:this.parseUrl(I),re=this.urlHandlingStrategy.merge(G,this.rawUrlTree);return this.scheduleNavigation(re,"imperative",null,k)}navigate(I,k={skipLocationChange:!1}){return function ka(b){for(let D=0;D{const re=I[G];return null!=re&&(k[G]=re),k},{})}processNavigations(){this.navigations.subscribe(I=>{this.navigated=!0,this.lastSuccessfulId=I.id,this.currentPageId=I.targetPageId,this.events.next(new sn(I.id,this.serializeUrl(I.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.titleStrategy?.updateTitle(this.routerState.snapshot),I.resolve(!0)},I=>{this.console.warn(`Unhandled Navigation Error: ${I}`)})}scheduleNavigation(I,k,G,re,be){if(this.disposed)return Promise.resolve(!1);let Ue,Ft,Yt;be?(Ue=be.resolve,Ft=be.reject,Yt=be.promise):Yt=new Promise((Ar,si)=>{Ue=Ar,Ft=si});const fr=++this.navigationId;let An;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(G=this.location.getState()),An=G&&G.\u0275routerPageId?G.\u0275routerPageId:re.replaceUrl||re.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1):An=0,this.setTransition({id:fr,targetPageId:An,source:k,restoredState:G,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:I,extras:re,resolve:Ue,reject:Ft,promise:Yt,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),Yt.catch(Ar=>Promise.reject(Ar))}setBrowserUrl(I,k){const G=this.urlSerializer.serialize(I),re={...k.extras.state,...this.generateNgRouterState(k.id,k.targetPageId)};this.location.isCurrentPathEqualTo(G)||k.extras.replaceUrl?this.location.replaceState(G,"",re):this.location.go(G,"",re)}restoreHistory(I,k=!1){if("computed"===this.canceledNavigationResolution){const G=this.currentPageId-I.targetPageId;"popstate"!==I.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.currentNavigation?.finalUrl||0===G?this.currentUrlTree===this.currentNavigation?.finalUrl&&0===G&&(this.resetState(I),this.browserUrlTree=I.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(G)}else"replace"===this.canceledNavigationResolution&&(k&&this.resetState(I),this.resetUrlToCurrentUrlTree())}resetState(I){this.routerState=I.currentRouterState,this.currentUrlTree=I.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,I.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(I,k){const G=new It(I.id,this.serializeUrl(I.extractedUrl),k);this.triggerEvent(G),I.resolve(!1)}generateNgRouterState(I,k){return"computed"===this.canceledNavigationResolution?{navigationId:I,\u0275routerPageId:k}:{navigationId:I}}}return b.\u0275fac=function(I){g.$Z()},b.\u0275prov=g.Yz7({token:b,factory:b.\u0275fac}),b})();function ta(b){return"imperative"!==b}let Po=(()=>{class b{constructor(I,k,G,re,be){this.router=I,this.route=k,this.tabIndexAttribute=G,this.renderer=re,this.el=be,this.commands=null,this.onChanges=new Ke.x,this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(I){if(null!=this.tabIndexAttribute)return;const k=this.renderer,G=this.el.nativeElement;null!==I?k.setAttribute(G,"tabindex",I):k.removeAttribute(G,"tabindex")}ngOnChanges(I){this.onChanges.next(this)}set routerLink(I){null!=I?(this.commands=Array.isArray(I)?I:[I],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(){if(null===this.urlTree)return!0;const I={skipLocationChange:(0,g.D6c)(this.skipLocationChange),replaceUrl:(0,g.D6c)(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,I),!0}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:(0,g.D6c)(this.preserveFragment)})}}return b.\u0275fac=function(I){return new(I||b)(g.Y36(_i),g.Y36(ei),g.$8M("tabindex"),g.Y36(g.Qsj),g.Y36(g.SBq))},b.\u0275dir=g.lG2({type:b,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(I,k){1&I&&g.NdJ("click",function(){return k.onClick()})},inputs:{queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[g.TTD]}),b})(),Ds=(()=>{class b{constructor(I,k,G){this.router=I,this.route=k,this.locationStrategy=G,this.commands=null,this.href=null,this.onChanges=new Ke.x,this.subscription=I.events.subscribe(re=>{re instanceof sn&&this.updateTargetUrlAndHref()})}set routerLink(I){this.commands=null!=I?Array.isArray(I)?I:[I]:null}ngOnChanges(I){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(I,k,G,re,be){if(0!==I||k||G||re||be||"string"==typeof this.target&&"_self"!=this.target||null===this.urlTree)return!0;const Ue={skipLocationChange:(0,g.D6c)(this.skipLocationChange),replaceUrl:(0,g.D6c)(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,Ue),!1}updateTargetUrlAndHref(){this.href=null!==this.urlTree?this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:(0,g.D6c)(this.preserveFragment)})}}return b.\u0275fac=function(I){return new(I||b)(g.Y36(_i),g.Y36(ei),g.Y36(m.S$))},b.\u0275dir=g.lG2({type:b,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(I,k){1&I&&g.NdJ("click",function(re){return k.onClick(re.button,re.ctrlKey,re.shiftKey,re.altKey,re.metaKey)}),2&I&&g.uIk("target",k.target)("href",k.href,g.LSH)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[g.TTD]}),b})(),fa=(()=>{class b{constructor(I,k,G,re,be,Ue){this.router=I,this.element=k,this.renderer=G,this.cdr=re,this.link=be,this.linkWithHref=Ue,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new g.vpe,this.routerEventsSubscription=I.events.subscribe(Ft=>{Ft instanceof sn&&this.update()})}ngAfterContentInit(){(0,ae.of)(this.links.changes,this.linksWithHrefs.changes,(0,ae.of)(null)).pipe((0,Mt.J)()).subscribe(I=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const I=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(k=>!!k).map(k=>k.onChanges);this.linkInputChangesSubscription=(0,K.D)(I).pipe((0,Mt.J)()).subscribe(k=>{this.isActive!==this.isLinkActive(this.router)(k)&&this.update()})}set routerLinkActive(I){const k=Array.isArray(I)?I:I.split(" ");this.classes=k.filter(G=>!!G)}ngOnChanges(I){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.linksWithHrefs||!this.router.navigated||Promise.resolve().then(()=>{const I=this.hasActiveLinks();this.isActive!==I&&(this.isActive=I,this.cdr.markForCheck(),this.classes.forEach(k=>{I?this.renderer.addClass(this.element.nativeElement,k):this.renderer.removeClass(this.element.nativeElement,k)}),I&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(I))})}isLinkActive(I){const k=function Is(b){return!!b.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return G=>!!G.urlTree&&I.isActive(G.urlTree,k)}hasActiveLinks(){const I=this.isLinkActive(this.router);return this.link&&I(this.link)||this.linkWithHref&&I(this.linkWithHref)||this.links.some(I)||this.linksWithHrefs.some(I)}}return b.\u0275fac=function(I){return new(I||b)(g.Y36(_i),g.Y36(g.SBq),g.Y36(g.Qsj),g.Y36(g.sBO),g.Y36(Po,8),g.Y36(Ds,8))},b.\u0275dir=g.lG2({type:b,selectors:[["","routerLinkActive",""]],contentQueries:function(I,k,G){if(1&I&&(g.Suo(G,Po,5),g.Suo(G,Ds,5)),2&I){let re;g.iGM(re=g.CRH())&&(k.links=re),g.iGM(re=g.CRH())&&(k.linksWithHrefs=re)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[g.TTD]}),b})();class vu{buildTitle(D){let I,k=D.root;for(;void 0!==k;)I=this.getResolvedTitleForRoute(k)??I,k=k.children.find(G=>G.outlet===gn);return I}getResolvedTitleForRoute(D){return D.data[Yo]}}let Bu=(()=>{class b extends vu{constructor(I){super(),this.title=I}updateTitle(I){const k=this.buildTitle(I);void 0!==k&&this.title.setTitle(k)}}return b.\u0275fac=function(I){return new(I||b)(g.LFG(pe.Dx))},b.\u0275prov=g.Yz7({token:b,factory:b.\u0275fac,providedIn:"root"}),b})();class Mi{}class Fa{preload(D,I){return(0,ae.of)(null)}}let pa=(()=>{class b{constructor(I,k,G,re,be){this.router=I,this.injector=G,this.preloadingStrategy=re,this.loader=be}setUpPreloading(){this.subscription=this.router.events.pipe((0,Ye.h)(I=>I instanceof sn),(0,et.b)(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(I,k){const G=[];for(const re of k){re.providers&&!re._injector&&(re._injector=(0,g.MMx)(re.providers,I,`Route: ${re.path}`));const be=re._injector??I,Ue=re._loadedInjector??be;re.loadChildren&&!re._loadedRoutes||re.loadComponent&&!re._loadedComponent?G.push(this.preloadConfig(be,re)):(re.children||re._loadedRoutes)&&G.push(this.processRoutes(Ue,re.children??re._loadedRoutes))}return(0,K.D)(G).pipe((0,Mt.J)())}preloadConfig(I,k){return this.preloadingStrategy.preload(k,()=>{let G;G=k.loadChildren&&void 0===k.canLoad?this.loader.loadChildren(I,k):(0,ae.of)(null);const re=G.pipe((0,at.z)(be=>null===be?(0,ae.of)(void 0):(k._loadedRoutes=be.routes,k._loadedInjector=be.injector,this.processRoutes(be.injector??I,be.routes))));if(k.loadComponent&&!k._loadedComponent){const be=this.loader.loadComponent(k);return(0,K.D)([re,be]).pipe((0,Mt.J)())}return re})}}return b.\u0275fac=function(I){return new(I||b)(g.LFG(_i),g.LFG(g.Sil),g.LFG(g.lqb),g.LFG(Mi),g.LFG(Jo))},b.\u0275prov=g.Yz7({token:b,factory:b.\u0275fac}),b})(),Cs=(()=>{class b{constructor(I,k,G={}){this.router=I,this.viewportScroller=k,this.options=G,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},G.scrollPositionRestoration=G.scrollPositionRestoration||"disabled",G.anchorScrolling=G.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(I=>{I instanceof Et?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=I.navigationTrigger,this.restoredId=I.restoredState?I.restoredState.navigationId:0):I instanceof sn&&(this.lastId=I.id,this.scheduleScrollEvent(I,this.router.parseUrl(I.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(I=>{I instanceof yr&&(I.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(I.position):I.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(I.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(I,k){this.router.triggerEvent(new yr(I,"popstate"===this.lastSource?this.store[this.restoredId]:null,k))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return b.\u0275fac=function(I){g.$Z()},b.\u0275prov=g.Yz7({token:b,factory:b.\u0275fac}),b})();const us=new g.OlP("ROUTER_CONFIGURATION"),Da=new g.OlP("ROUTER_FORROOT_GUARD"),jo=[m.Ye,{provide:kr,useClass:jr},{provide:_i,useFactory:function ao(b,D,I,k,G,re,be={},Ue,Ft,Yt,fr){const An=new _i(null,b,D,I,k,G,nr(re));return Yt&&(An.urlHandlingStrategy=Yt),fr&&(An.routeReuseStrategy=fr),An.titleStrategy=Ft??Ue,function Xt(b,D){b.errorHandler&&(D.errorHandler=b.errorHandler),b.malformedUriErrorHandler&&(D.malformedUriErrorHandler=b.malformedUriErrorHandler),b.onSameUrlNavigation&&(D.onSameUrlNavigation=b.onSameUrlNavigation),b.paramsInheritanceStrategy&&(D.paramsInheritanceStrategy=b.paramsInheritanceStrategy),b.relativeLinkResolution&&(D.relativeLinkResolution=b.relativeLinkResolution),b.urlUpdateStrategy&&(D.urlUpdateStrategy=b.urlUpdateStrategy),b.canceledNavigationResolution&&(D.canceledNavigationResolution=b.canceledNavigationResolution)}(be,An),An},deps:[kr,vs,m.Ye,g.zs3,g.Sil,Do,us,Bu,[vu,new g.FiY],[class Xo{},new g.FiY],[class _u{},new g.FiY]]},vs,{provide:ei,useFactory:function Jr(b){return b.routerState.root},deps:[_i]},pa,Fa,class Eu{preload(D,I){return I().pipe((0,Ce.K)(()=>(0,ae.of)(null)))}},{provide:us,useValue:{enableTracing:!1}},Jo];function La(){return new g.PXZ("Router",_i)}let Io=(()=>{class b{constructor(I,k){}static forRoot(I,k){return{ngModule:b,providers:[jo,Va(I),{provide:Da,useFactory:Qs,deps:[[_i,new g.FiY,new g.tp0]]},{provide:us,useValue:k||{}},{provide:m.S$,useFactory:No,deps:[m.lw,[new g.tBr(m.mr),new g.FiY],us]},{provide:Cs,useFactory:hi,deps:[_i,m.EM,us]},{provide:Mi,useExisting:k&&k.preloadingStrategy?k.preloadingStrategy:Fa},{provide:g.PXZ,multi:!0,useFactory:La},[vi,{provide:g.ip1,multi:!0,useFactory:Co,deps:[vi]},{provide:zn,useFactory:_n,deps:[vi]},{provide:g.tb,multi:!0,useExisting:zn}]]}}static forChild(I){return{ngModule:b,providers:[Va(I)]}}}return b.\u0275fac=function(I){return new(I||b)(g.LFG(Da,8),g.LFG(_i,8))},b.\u0275mod=g.oAB({type:b}),b.\u0275inj=g.cJS({}),b})();function hi(b,D,I){return I.scrollOffset&&D.setOffset(I.scrollOffset),new Cs(b,D,I)}function No(b,D,I={}){return I.useHash?new m.Do(b,D):new m.b0(b,D)}function Qs(b){return"guarded"}function Va(b){return[{provide:g.deG,multi:!0,useValue:b},{provide:Do,multi:!0,useValue:b}]}let vi=(()=>{class b{constructor(I){this.injector=I,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new Ke.x}appInitializer(){return this.injector.get(m.V_,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let k=null;const G=new Promise(Ue=>k=Ue),re=this.injector.get(_i),be=this.injector.get(us);return"disabled"===be.initialNavigation?(re.setUpLocationChangeListener(),k(!0)):"enabledBlocking"===be.initialNavigation?(re.afterPreactivation=()=>this.initNavigation?(0,ae.of)(void 0):(this.initNavigation=!0,k(!0),this.resultOfPreactivationDone),re.initialNavigation()):k(!0),G})}bootstrapListener(I){const k=this.injector.get(us),G=this.injector.get(pa),re=this.injector.get(Cs),be=this.injector.get(_i),Ue=this.injector.get(g.z2F);I===Ue.components[0]&&(("enabledNonBlocking"===k.initialNavigation||void 0===k.initialNavigation)&&be.initialNavigation(),G.setUpPreloading(),re.init(),be.resetRootComponentType(Ue.componentTypes[0]),this.resultOfPreactivationDone.next(void 0),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return b.\u0275fac=function(I){return new(I||b)(g.LFG(g.zs3))},b.\u0275prov=g.Yz7({token:b,factory:b.\u0275fac}),b})();function Co(b){return b.appInitializer.bind(b)}function _n(b){return b.bootstrapListener.bind(b)}const zn=new g.OlP("Router Initializer")},3942:(Wt,je,S)=>{S.d(je,{Z:()=>Ye});var m=S(2090),g=S(4859),K=S(9681),ae=S(1877);class oe{constructor(Ze,Qe){this._delegate=Ze,this.firebase=Qe,(0,K._addComponent)(Ze,new g.wA("app-compat",()=>this,"PUBLIC")),this.container=Ze.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(Ze){this._delegate.automaticDataCollectionEnabled=Ze}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(Ze=>{this._delegate.checkDestroyed(),Ze()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),(0,K.deleteApp)(this._delegate)))}_getService(Ze,Qe=K._DEFAULT_ENTRY_NAME){var Ee;this._delegate.checkDestroyed();const kt=this._delegate.container.getProvider(Ze);return!kt.isInitialized()&&"EXPLICIT"===(null===(Ee=kt.getComponent())||void 0===Ee?void 0:Ee.instantiationMode)&&kt.initialize(),kt.getImmediate({identifier:Qe})}_removeServiceInstance(Ze,Qe=K._DEFAULT_ENTRY_NAME){this._delegate.container.getProvider(Ze).clearInstance(Qe)}_addComponent(Ze){(0,K._addComponent)(this._delegate,Ze)}_addOrOverwriteComponent(Ze){(0,K._addOrOverwriteComponent)(this._delegate,Ze)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}const fe=new m.LL("app-compat","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."}),ie=function he(){const ht=function ge(ht){const Ze={},Qe={__esModule:!0,initializeApp:function ot(Lt,Se={}){const Ie=K.initializeApp(Lt,Se);if((0,m.r3)(Ze,Ie.name))return Ze[Ie.name];const Ce=new ht(Ie,Qe);return Ze[Ie.name]=Ce,Ce},app:kt,registerVersion:K.registerVersion,setLogLevel:K.setLogLevel,onLog:K.onLog,apps:null,SDK_VERSION:K.SDK_VERSION,INTERNAL:{registerComponent:function xe(Lt){const Se=Lt.name,Ie=Se.replace("-compat","");if(K._registerComponent(Lt)&&"PUBLIC"===Lt.type){const Ce=(et=kt())=>{if("function"!=typeof et[Ie])throw fe.create("invalid-app-argument",{appName:Se});return et[Ie]()};void 0!==Lt.serviceProps&&(0,m.ZB)(Ce,Lt.serviceProps),Qe[Ie]=Ce,ht.prototype[Ie]=function(...et){return this._getService.bind(this,Se).apply(this,Lt.multipleInstances?et:[])}}return"PUBLIC"===Lt.type?Qe[Ie]:null},removeApp:function Ee(Lt){delete Ze[Lt]},useAsService:function Nt(Lt,Se){return"serverAuth"===Se?null:Se},modularAPIs:K}};function kt(Lt){if(!(0,m.r3)(Ze,Lt=Lt||K._DEFAULT_ENTRY_NAME))throw fe.create("no-app",{appName:Lt});return Ze[Lt]}return Qe.default=Qe,Object.defineProperty(Qe,"apps",{get:function Ne(){return Object.keys(Ze).map(Lt=>Ze[Lt])}}),kt.App=ht,Qe}(oe);return ht.INTERNAL=Object.assign(Object.assign({},ht.INTERNAL),{createFirebaseNamespace:he,extendNamespace:function Ze(Qe){(0,m.ZB)(ht,Qe)},createSubscribe:m.ne,ErrorFactory:m.LL,deepExtend:m.ZB}),ht}(),ce=new ae.Yd("@firebase/app-compat");if((0,m.jU)()&&void 0!==self.firebase){ce.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");const ht=self.firebase.SDK_VERSION;ht&&ht.indexOf("LITE")>=0&&ce.warn("\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n ")}const Ye=ie;!function Ke(ht){(0,K.registerVersion)("@firebase/app-compat","0.1.27",ht)}()},9681:(Wt,je,S)=>{S.r(je),S.d(je,{FirebaseError:()=>ae.ZR,SDK_VERSION:()=>er,_DEFAULT_ENTRY_NAME:()=>Mt,_addComponent:()=>sn,_addOrOverwriteComponent:()=>It,_apps:()=>ft,_clearComponents:()=>Kt,_components:()=>Et,_getProvider:()=>nt,_registerComponent:()=>Rn,_removeServiceInstance:()=>ut,deleteApp:()=>ln,getApp:()=>bt,getApps:()=>Un,initializeApp:()=>Jn,onLog:()=>gn,registerVersion:()=>Yn,setLogLevel:()=>Ti});var m=S(5861),g=S(4859),K=S(1877),ae=S(2090),oe=S(8766);class _e{constructor(J){this.container=J}getPlatformInfoString(){return this.container.getProviders().map(le=>{if(function fe(se){return"VERSION"===se.getComponent()?.type}(le)){const rt=le.getImmediate();return`${rt.library}/${rt.version}`}return null}).filter(le=>le).join(" ")}}const ge="@firebase/app",ie=new K.Yd("@firebase/app"),Mt="[DEFAULT]",pe={[ge]:"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"},ft=new Map,Et=new Map;function sn(se,J){try{se.container.addComponent(J)}catch(le){ie.debug(`Component ${J.name} failed to register with FirebaseApp ${se.name}`,le)}}function It(se,J){se.container.addOrOverwriteComponent(J)}function Rn(se){const J=se.name;if(Et.has(J))return ie.debug(`There were multiple attempts to register component ${J}.`),!1;Et.set(J,se);for(const le of ft.values())sn(le,se);return!0}function nt(se,J){const le=se.container.getProvider("heartbeat").getImmediate({optional:!0});return le&&le.triggerHeartbeat(),se.container.getProvider(J)}function ut(se,J,le=Mt){nt(se,J).clearInstance(le)}function Kt(){Et.clear()}const Zt=new ae.LL("app","Firebase",{"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.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","storage-delete":"Error thrown when deleting from storage. Original error: {$originalErrorMessage}."});class wn{constructor(J,le,rt){this._isDeleted=!1,this._options=Object.assign({},J),this._config=Object.assign({},le),this._name=le.name,this._automaticDataCollectionEnabled=le.automaticDataCollectionEnabled,this._container=rt,this.container.addComponent(new g.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(J){this.checkDestroyed(),this._automaticDataCollectionEnabled=J}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(J){this._isDeleted=J}checkDestroyed(){if(this.isDeleted)throw Zt.create("app-deleted",{appName:this._name})}}const er="9.8.3";function Jn(se,J={}){"object"!=typeof J&&(J={name:J});const le=Object.assign({name:Mt,automaticDataCollectionEnabled:!1},J),rt=le.name;if("string"!=typeof rt||!rt)throw Zt.create("bad-app-name",{appName:String(rt)});const Qt=ft.get(rt);if(Qt){if((0,ae.vZ)(se,Qt.options)&&(0,ae.vZ)(le,Qt.config))return Qt;throw Zt.create("duplicate-app",{appName:rt})}const hn=new g.H0(rt);for(const Pn of Et.values())hn.addComponent(Pn);const fn=new wn(se,le,hn);return ft.set(rt,fn),fn}function bt(se=Mt){const J=ft.get(se);if(!J)throw Zt.create("no-app",{appName:se});return J}function Un(){return Array.from(ft.values())}function ln(se){return yr.apply(this,arguments)}function yr(){return(yr=(0,m.Z)(function*(se){const J=se.name;ft.has(J)&&(ft.delete(J),yield Promise.all(se.container.getProviders().map(le=>le.delete())),se.isDeleted=!0)})).apply(this,arguments)}function Yn(se,J,le){var rt;let Qt=null!==(rt=pe[se])&&void 0!==rt?rt:se;le&&(Qt+=`-${le}`);const hn=Qt.match(/\s|\//),fn=J.match(/\s|\//);if(hn||fn){const Pn=[`Unable to register library "${Qt}" with version "${J}":`];return hn&&Pn.push(`library name "${Qt}" contains illegal characters (whitespace or "/")`),hn&&fn&&Pn.push("and"),fn&&Pn.push(`version name "${J}" contains illegal characters (whitespace or "/")`),void ie.warn(Pn.join(" "))}Rn(new g.wA(`${Qt}-version`,()=>({library:Qt,version:J}),"VERSION"))}function gn(se,J){if(null!==se&&"function"!=typeof se)throw Zt.create("invalid-log-argument");(0,K.Am)(se,J)}function Ti(se){(0,K.Ub)(se)}const Ct="firebase-heartbeat-store";let Be=null;function Ge(){return Be||(Be=(0,oe.X3)("firebase-heartbeat-database",1,{upgrade:(se,J)=>{0===J&&se.createObjectStore(Ct)}}).catch(se=>{throw Zt.create("storage-open",{originalErrorMessage:se.message})})),Be}function Xe(){return(Xe=(0,m.Z)(function*(se){var J;try{return(yield Ge()).transaction(Ct).objectStore(Ct).get(Kn(se))}catch(le){throw Zt.create("storage-get",{originalErrorMessage:null===(J=le)||void 0===J?void 0:J.message})}})).apply(this,arguments)}function qt(se,J){return nr.apply(this,arguments)}function nr(){return(nr=(0,m.Z)(function*(se,J){var le;try{const Qt=(yield Ge()).transaction(Ct,"readwrite");return yield Qt.objectStore(Ct).put(J,Kn(se)),Qt.done}catch(rt){throw Zt.create("storage-set",{originalErrorMessage:null===(le=rt)||void 0===le?void 0:le.message})}})).apply(this,arguments)}function Kn(se){return`${se.name}!${se.options.appId}`}class Xn{constructor(J){this.container=J,this._heartbeatsCache=null;const le=this.container.getProvider("app").getImmediate();this._storage=new we(le),this._heartbeatsCachePromise=this._storage.read().then(rt=>(this._heartbeatsCache=rt,rt))}triggerHeartbeat(){var J=this;return(0,m.Z)(function*(){const rt=J.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),Qt=Rr();if(null===J._heartbeatsCache&&(J._heartbeatsCache=yield J._heartbeatsCachePromise),J._heartbeatsCache.lastSentHeartbeatDate!==Qt&&!J._heartbeatsCache.heartbeats.some(hn=>hn.date===Qt))return J._heartbeatsCache.heartbeats.push({date:Qt,agent:rt}),J._heartbeatsCache.heartbeats=J._heartbeatsCache.heartbeats.filter(hn=>{const fn=new Date(hn.date).valueOf();return Date.now()-fn<=2592e6}),J._storage.overwrite(J._heartbeatsCache)})()}getHeartbeatsHeader(){var J=this;return(0,m.Z)(function*(){if(null===J._heartbeatsCache&&(yield J._heartbeatsCachePromise),null===J._heartbeatsCache||0===J._heartbeatsCache.heartbeats.length)return"";const le=Rr(),{heartbeatsToSend:rt,unsentEntries:Qt}=function Me(se,J=1024){const le=[];let rt=se.slice();for(const Qt of se){const hn=le.find(fn=>fn.agent===Qt.agent);if(hn){if(hn.dates.push(Qt.date),Ae(le)>J){hn.dates.pop();break}}else if(le.push({agent:Qt.agent,dates:[Qt.date]}),Ae(le)>J){le.pop();break}rt=rt.slice(1)}return{heartbeatsToSend:le,unsentEntries:rt}}(J._heartbeatsCache.heartbeats),hn=(0,ae.L)(JSON.stringify({version:2,heartbeats:rt}));return J._heartbeatsCache.lastSentHeartbeatDate=le,Qt.length>0?(J._heartbeatsCache.heartbeats=Qt,yield J._storage.overwrite(J._heartbeatsCache)):(J._heartbeatsCache.heartbeats=[],J._storage.overwrite(J._heartbeatsCache)),hn})()}}function Rr(){return(new Date).toISOString().substring(0,10)}class we{constructor(J){this.app=J,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return(0,m.Z)(function*(){return!!(0,ae.hl)()&&(0,ae.eu)().then(()=>!0).catch(()=>!1)})()}read(){var J=this;return(0,m.Z)(function*(){return(yield J._canUseIndexedDBPromise)&&(yield function xt(se){return Xe.apply(this,arguments)}(J.app))||{heartbeats:[]}})()}overwrite(J){var le=this;return(0,m.Z)(function*(){var rt;if(yield le._canUseIndexedDBPromise){const hn=yield le.read();return qt(le.app,{lastSentHeartbeatDate:null!==(rt=J.lastSentHeartbeatDate)&&void 0!==rt?rt:hn.lastSentHeartbeatDate,heartbeats:J.heartbeats})}})()}add(J){var le=this;return(0,m.Z)(function*(){var rt;if(yield le._canUseIndexedDBPromise){const hn=yield le.read();return qt(le.app,{lastSentHeartbeatDate:null!==(rt=J.lastSentHeartbeatDate)&&void 0!==rt?rt:hn.lastSentHeartbeatDate,heartbeats:[...hn.heartbeats,...J.heartbeats]})}})()}}function Ae(se){return(0,ae.L)(JSON.stringify({version:2,heartbeats:se})).length}!function Tt(se){Rn(new g.wA("platform-logger",J=>new _e(J),"PRIVATE")),Rn(new g.wA("heartbeat",J=>new Xn(J),"PRIVATE")),Yn(ge,"0.7.26",se),Yn(ge,"0.7.26","esm2017"),Yn("fire-js","")}("")},4859:(Wt,je,S)=>{S.d(je,{H0:()=>ge,wA:()=>K});var m=S(5861),g=S(2090);class K{constructor(ie,ce,me){this.name=ie,this.instanceFactory=ce,this.type=me,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(ie){return this.instantiationMode=ie,this}setMultipleInstances(ie){return this.multipleInstances=ie,this}setServiceProps(ie){return this.serviceProps=ie,this}setInstanceCreatedCallback(ie){return this.onInstanceCreated=ie,this}}const ae="[DEFAULT]";class oe{constructor(ie,ce){this.name=ie,this.container=ce,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(ie){const ce=this.normalizeInstanceIdentifier(ie);if(!this.instancesDeferred.has(ce)){const me=new g.BH;if(this.instancesDeferred.set(ce,me),this.isInitialized(ce)||this.shouldAutoInitialize())try{const it=this.getOrInitializeService({instanceIdentifier:ce});it&&me.resolve(it)}catch{}}return this.instancesDeferred.get(ce).promise}getImmediate(ie){var ce;const me=this.normalizeInstanceIdentifier(ie?.identifier),it=null!==(ce=ie?.optional)&&void 0!==ce&&ce;if(!this.isInitialized(me)&&!this.shouldAutoInitialize()){if(it)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:me})}catch(Ke){if(it)return null;throw Ke}}getComponent(){return this.component}setComponent(ie){if(ie.name!==this.name)throw Error(`Mismatching Component ${ie.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=ie,this.shouldAutoInitialize()){if(function fe(he){return"EAGER"===he.instantiationMode}(ie))try{this.getOrInitializeService({instanceIdentifier:ae})}catch{}for(const[ce,me]of this.instancesDeferred.entries()){const it=this.normalizeInstanceIdentifier(ce);try{const Ke=this.getOrInitializeService({instanceIdentifier:it});me.resolve(Ke)}catch{}}}}clearInstance(ie=ae){this.instancesDeferred.delete(ie),this.instancesOptions.delete(ie),this.instances.delete(ie)}delete(){var ie=this;return(0,m.Z)(function*(){const ce=Array.from(ie.instances.values());yield Promise.all([...ce.filter(me=>"INTERNAL"in me).map(me=>me.INTERNAL.delete()),...ce.filter(me=>"_delete"in me).map(me=>me._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(ie=ae){return this.instances.has(ie)}getOptions(ie=ae){return this.instancesOptions.get(ie)||{}}initialize(ie={}){const{options:ce={}}=ie,me=this.normalizeInstanceIdentifier(ie.instanceIdentifier);if(this.isInitialized(me))throw Error(`${this.name}(${me}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const it=this.getOrInitializeService({instanceIdentifier:me,options:ce});for(const[Ke,Ye]of this.instancesDeferred.entries())me===this.normalizeInstanceIdentifier(Ke)&&Ye.resolve(it);return it}onInit(ie,ce){var me;const it=this.normalizeInstanceIdentifier(ce),Ke=null!==(me=this.onInitCallbacks.get(it))&&void 0!==me?me:new Set;Ke.add(ie),this.onInitCallbacks.set(it,Ke);const Ye=this.instances.get(it);return Ye&&ie(Ye,it),()=>{Ke.delete(ie)}}invokeOnInitCallbacks(ie,ce){const me=this.onInitCallbacks.get(ce);if(me)for(const it of me)try{it(ie,ce)}catch{}}getOrInitializeService({instanceIdentifier:ie,options:ce={}}){let me=this.instances.get(ie);if(!me&&this.component&&(me=this.component.instanceFactory(this.container,{instanceIdentifier:(he=ie,he===ae?void 0:he),options:ce}),this.instances.set(ie,me),this.instancesOptions.set(ie,ce),this.invokeOnInitCallbacks(me,ie),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,ie,me)}catch{}var he;return me||null}normalizeInstanceIdentifier(ie=ae){return this.component?this.component.multipleInstances?ie:ae:ie}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class ge{constructor(ie){this.name=ie,this.providers=new Map}addComponent(ie){const ce=this.getProvider(ie.name);if(ce.isComponentSet())throw new Error(`Component ${ie.name} has already been registered with ${this.name}`);ce.setComponent(ie)}addOrOverwriteComponent(ie){this.getProvider(ie.name).isComponentSet()&&this.providers.delete(ie.name),this.addComponent(ie)}getProvider(ie){if(this.providers.has(ie))return this.providers.get(ie);const ce=new oe(ie,this);return this.providers.set(ie,ce),ce}getProviders(){return Array.from(this.providers.values())}}},1877:(Wt,je,S)=>{S.d(je,{Am:()=>he,Ub:()=>ge,Yd:()=>fe,in:()=>g});const m=[];var g=(()=>{return(ie=g||(g={}))[ie.DEBUG=0]="DEBUG",ie[ie.VERBOSE=1]="VERBOSE",ie[ie.INFO=2]="INFO",ie[ie.WARN=3]="WARN",ie[ie.ERROR=4]="ERROR",ie[ie.SILENT=5]="SILENT",g;var ie})();const K={debug:g.DEBUG,verbose:g.VERBOSE,info:g.INFO,warn:g.WARN,error:g.ERROR,silent:g.SILENT},ae=g.INFO,oe={[g.DEBUG]:"log",[g.VERBOSE]:"log",[g.INFO]:"info",[g.WARN]:"warn",[g.ERROR]:"error"},_e=(ie,ce,...me)=>{if(ce{ce.setLogLevel(ie)})}function he(ie,ce){for(const me of m){let it=null;ce&&ce.level&&(it=K[ce.level]),me.userLogHandler=null===ie?null:(Ke,Ye,...ht)=>{const Ze=ht.map(Qe=>{if(null==Qe)return null;if("string"==typeof Qe)return Qe;if("number"==typeof Qe||"boolean"==typeof Qe)return Qe.toString();if(Qe instanceof Error)return Qe.message;try{return JSON.stringify(Qe)}catch{return null}}).filter(Qe=>Qe).join(" ");Ye>=(it??Ke.logLevel)&&ie({level:g[Ye].toLowerCase(),message:Ze,args:ht,type:Ke.name})}}}},6188:(Wt,je,S)=>{S.d(je,{Zw:()=>Ke,aw:()=>Tn,X$:()=>pn,sK:()=>at});var m=S(4650),g=S(8306),K=S(576);function ae(St){return!!St&&(St instanceof g.y||(0,K.m)(St.lift)&&(0,K.m)(St.subscribe))}var oe=S(9646),_e=S(4128),fe=S(7272),ge=S(9770),he=S(5698),ie=S(3151),ce=S(4004),me=S(4351),it=S(3900);class Ke{}let Ye=(()=>{class St extends Ke{getTranslation(pe){return(0,oe.of)({})}}return St.\u0275fac=function(){let Mt;return function(ft){return(Mt||(Mt=m.n5z(St)))(ft||St)}}(),St.\u0275prov=m.Yz7({token:St,factory:St.\u0275fac}),St})();class ht{}let Ze=(()=>{class St{handle(pe){return pe.key}}return St.\u0275fac=function(pe){return new(pe||St)},St.\u0275prov=m.Yz7({token:St,factory:St.\u0275fac}),St})();function Qe(St,Mt){if(St===Mt)return!0;if(null===St||null===Mt)return!1;if(St!=St&&Mt!=Mt)return!0;let Et,sn,It,pe=typeof St;if(pe==typeof Mt&&"object"==pe){if(!Array.isArray(St)){if(Array.isArray(Mt))return!1;for(sn in It=Object.create(null),St){if(!Qe(St[sn],Mt[sn]))return!1;It[sn]=!0}for(sn in Mt)if(!(sn in It)&&typeof Mt[sn]<"u")return!1;return!0}if(!Array.isArray(Mt))return!1;if((Et=St.length)==Mt.length){for(sn=0;sn{kt(Mt[ft])?ft in St?pe[ft]=ot(St[ft],Mt[ft]):Object.assign(pe,{[ft]:Mt[ft]}):Object.assign(pe,{[ft]:Mt[ft]})}),pe}class Ne{}let xe=(()=>{class St extends Ne{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(pe,ft){let Et;return Et="string"==typeof pe?this.interpolateString(pe,ft):"function"==typeof pe?this.interpolateFunction(pe,ft):pe,Et}getValue(pe,ft){let Et="string"==typeof ft?ft.split("."):[ft];ft="";do{ft+=Et.shift(),!Ee(pe)||!Ee(pe[ft])||"object"!=typeof pe[ft]&&Et.length?Et.length?ft+=".":pe=void 0:(pe=pe[ft],ft="")}while(Et.length);return pe}interpolateFunction(pe,ft){return pe(ft)}interpolateString(pe,ft){return ft?pe.replace(this.templateMatcher,(Et,sn)=>{let It=this.getValue(ft,sn);return Ee(It)?It:Et}):pe}}return St.\u0275fac=function(){let Mt;return function(ft){return(Mt||(Mt=m.n5z(St)))(ft||St)}}(),St.\u0275prov=m.Yz7({token:St,factory:St.\u0275fac}),St})();class Nt{}let Lt=(()=>{class St extends Nt{compile(pe,ft){return pe}compileTranslations(pe,ft){return pe}}return St.\u0275fac=function(){let Mt;return function(ft){return(Mt||(Mt=m.n5z(St)))(ft||St)}}(),St.\u0275prov=m.Yz7({token:St,factory:St.\u0275fac}),St})();class Se{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new m.vpe,this.onLangChange=new m.vpe,this.onDefaultLangChange=new m.vpe}}const Ie=new m.OlP("USE_STORE"),Ce=new m.OlP("USE_DEFAULT_LANG"),et=new m.OlP("DEFAULT_LANGUAGE"),lt=new m.OlP("USE_EXTEND");let at=(()=>{class St{constructor(pe,ft,Et,sn,It,Rn=!0,nt=!1,ut=!1,Kt){this.store=pe,this.currentLoader=ft,this.compiler=Et,this.parser=sn,this.missingTranslationHandler=It,this.useDefaultLang=Rn,this.isolate=nt,this.extend=ut,this.pending=!1,this._onTranslationChange=new m.vpe,this._onLangChange=new m.vpe,this._onDefaultLangChange=new m.vpe,this._langs=[],this._translations={},this._translationRequests={},Kt&&this.setDefaultLang(Kt)}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(pe){this.isolate?this._defaultLang=pe:this.store.defaultLang=pe}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(pe){this.isolate?this._currentLang=pe:this.store.currentLang=pe}get langs(){return this.isolate?this._langs:this.store.langs}set langs(pe){this.isolate?this._langs=pe:this.store.langs=pe}get translations(){return this.isolate?this._translations:this.store.translations}set translations(pe){this.isolate?this._translations=pe:this.store.translations=pe}setDefaultLang(pe){if(pe===this.defaultLang)return;let ft=this.retrieveTranslations(pe);typeof ft<"u"?(null==this.defaultLang&&(this.defaultLang=pe),ft.pipe((0,he.q)(1)).subscribe(Et=>{this.changeDefaultLang(pe)})):this.changeDefaultLang(pe)}getDefaultLang(){return this.defaultLang}use(pe){if(pe===this.currentLang)return(0,oe.of)(this.translations[pe]);let ft=this.retrieveTranslations(pe);return typeof ft<"u"?(this.currentLang||(this.currentLang=pe),ft.pipe((0,he.q)(1)).subscribe(Et=>{this.changeLang(pe)}),ft):(this.changeLang(pe),(0,oe.of)(this.translations[pe]))}retrieveTranslations(pe){let ft;return(typeof this.translations[pe]>"u"||this.extend)&&(this._translationRequests[pe]=this._translationRequests[pe]||this.getTranslation(pe),ft=this._translationRequests[pe]),ft}getTranslation(pe){this.pending=!0;const ft=this.currentLoader.getTranslation(pe).pipe((0,ie.d)(1),(0,he.q)(1));return this.loadingTranslations=ft.pipe((0,ce.U)(Et=>this.compiler.compileTranslations(Et,pe)),(0,ie.d)(1),(0,he.q)(1)),this.loadingTranslations.subscribe({next:Et=>{this.translations[pe]=this.extend&&this.translations[pe]?{...Et,...this.translations[pe]}:Et,this.updateLangs(),this.pending=!1},error:Et=>{this.pending=!1}}),ft}setTranslation(pe,ft,Et=!1){ft=this.compiler.compileTranslations(ft,pe),this.translations[pe]=(Et||this.extend)&&this.translations[pe]?ot(this.translations[pe],ft):ft,this.updateLangs(),this.onTranslationChange.emit({lang:pe,translations:this.translations[pe]})}getLangs(){return this.langs}addLangs(pe){pe.forEach(ft=>{-1===this.langs.indexOf(ft)&&this.langs.push(ft)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(pe,ft,Et){let sn;if(ft instanceof Array){let It={},Rn=!1;for(let nt of ft)It[nt]=this.getParsedResult(pe,nt,Et),ae(It[nt])&&(Rn=!0);if(Rn){const nt=ft.map(ut=>ae(It[ut])?It[ut]:(0,oe.of)(It[ut]));return(0,_e.D)(nt).pipe((0,ce.U)(ut=>{let Kt={};return ut.forEach((Ht,Zt)=>{Kt[ft[Zt]]=Ht}),Kt}))}return It}if(pe&&(sn=this.parser.interpolate(this.parser.getValue(pe,ft),Et)),typeof sn>"u"&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(sn=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],ft),Et)),typeof sn>"u"){let It={key:ft,translateService:this};typeof Et<"u"&&(It.interpolateParams=Et),sn=this.missingTranslationHandler.handle(It)}return typeof sn<"u"?sn:ft}get(pe,ft){if(!Ee(pe)||!pe.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe((0,me.b)(Et=>ae(Et=this.getParsedResult(Et,pe,ft))?Et:(0,oe.of)(Et)));{let Et=this.getParsedResult(this.translations[this.currentLang],pe,ft);return ae(Et)?Et:(0,oe.of)(Et)}}getStreamOnTranslationChange(pe,ft){if(!Ee(pe)||!pe.length)throw new Error('Parameter "key" required');return(0,fe.z)((0,ge.P)(()=>this.get(pe,ft)),this.onTranslationChange.pipe((0,it.w)(Et=>{const sn=this.getParsedResult(Et.translations,pe,ft);return"function"==typeof sn.subscribe?sn:(0,oe.of)(sn)})))}stream(pe,ft){if(!Ee(pe)||!pe.length)throw new Error('Parameter "key" required');return(0,fe.z)((0,ge.P)(()=>this.get(pe,ft)),this.onLangChange.pipe((0,it.w)(Et=>{const sn=this.getParsedResult(Et.translations,pe,ft);return ae(sn)?sn:(0,oe.of)(sn)})))}instant(pe,ft){if(!Ee(pe)||!pe.length)throw new Error('Parameter "key" required');let Et=this.getParsedResult(this.translations[this.currentLang],pe,ft);if(ae(Et)){if(pe instanceof Array){let sn={};return pe.forEach((It,Rn)=>{sn[pe[Rn]]=pe[Rn]}),sn}return pe}return Et}set(pe,ft,Et=this.currentLang){this.translations[Et][pe]=this.compiler.compile(ft,Et),this.updateLangs(),this.onTranslationChange.emit({lang:Et,translations:this.translations[Et]})}changeLang(pe){this.currentLang=pe,this.onLangChange.emit({lang:pe,translations:this.translations[pe]}),null==this.defaultLang&&this.changeDefaultLang(pe)}changeDefaultLang(pe){this.defaultLang=pe,this.onDefaultLangChange.emit({lang:pe,translations:this.translations[pe]})}reloadLang(pe){return this.resetLang(pe),this.getTranslation(pe)}resetLang(pe){this._translationRequests[pe]=void 0,this.translations[pe]=void 0}getBrowserLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let pe=window.navigator.languages?window.navigator.languages[0]:null;return pe=pe||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,typeof pe>"u"?void 0:(-1!==pe.indexOf("-")&&(pe=pe.split("-")[0]),-1!==pe.indexOf("_")&&(pe=pe.split("_")[0]),pe)}getBrowserCultureLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let pe=window.navigator.languages?window.navigator.languages[0]:null;return pe=pe||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,pe}}return St.\u0275fac=function(pe){return new(pe||St)(m.LFG(Se),m.LFG(Ke),m.LFG(Nt),m.LFG(Ne),m.LFG(ht),m.LFG(Ce),m.LFG(Ie),m.LFG(lt),m.LFG(et))},St.\u0275prov=m.Yz7({token:St,factory:St.\u0275fac}),St})(),pn=(()=>{class St{constructor(pe,ft){this.translate=pe,this._ref=ft,this.value="",this.lastKey=null,this.lastParams=[]}updateValue(pe,ft,Et){let sn=It=>{this.value=void 0!==It?It:pe,this.lastKey=pe,this._ref.markForCheck()};if(Et){let It=this.translate.getParsedResult(Et,pe,ft);ae(It.subscribe)?It.subscribe(sn):sn(It)}this.translate.get(pe,ft).subscribe(sn)}transform(pe,...ft){if(!pe||!pe.length)return pe;if(Qe(pe,this.lastKey)&&Qe(ft,this.lastParams))return this.value;let Et;if(Ee(ft[0])&&ft.length)if("string"==typeof ft[0]&&ft[0].length){let sn=ft[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{Et=JSON.parse(sn)}catch{throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${ft[0]}`)}}else"object"==typeof ft[0]&&!Array.isArray(ft[0])&&(Et=ft[0]);return this.lastKey=pe,this.lastParams=ft,this.updateValue(pe,Et),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(sn=>{this.lastKey&&sn.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(pe,Et,sn.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(sn=>{this.lastKey&&(this.lastKey=null,this.updateValue(pe,Et,sn.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(pe,Et))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}}return St.\u0275fac=function(pe){return new(pe||St)(m.Y36(at,16),m.Y36(m.sBO,16))},St.\u0275pipe=m.Yjl({name:"translate",type:St,pure:!1}),St.\u0275prov=m.Yz7({token:St,factory:St.\u0275fac}),St})(),Tn=(()=>{class St{static forRoot(pe={}){return{ngModule:St,providers:[pe.loader||{provide:Ke,useClass:Ye},pe.compiler||{provide:Nt,useClass:Lt},pe.parser||{provide:Ne,useClass:xe},pe.missingTranslationHandler||{provide:ht,useClass:Ze},Se,{provide:Ie,useValue:pe.isolate},{provide:Ce,useValue:pe.useDefaultLang},{provide:lt,useValue:pe.extend},{provide:et,useValue:pe.defaultLanguage},at]}}static forChild(pe={}){return{ngModule:St,providers:[pe.loader||{provide:Ke,useClass:Ye},pe.compiler||{provide:Nt,useClass:Lt},pe.parser||{provide:Ne,useClass:xe},pe.missingTranslationHandler||{provide:ht,useClass:Ze},{provide:Ie,useValue:pe.isolate},{provide:Ce,useValue:pe.useDefaultLang},{provide:lt,useValue:pe.extend},{provide:et,useValue:pe.defaultLanguage},at]}}}return St.\u0275fac=function(pe){return new(pe||St)},St.\u0275mod=m.oAB({type:St}),St.\u0275inj=m.cJS({}),St})()},9832:(Wt,je,S)=>{S.d(je,{w:()=>m});class m{constructor(K,ae="/assets/i18n/",oe=".json"){this.http=K,this.prefix=ae,this.suffix=oe}getTranslation(K){return this.http.get(`${this.prefix}${K}${this.suffix}`)}}},8766:(Wt,je,S)=>{S.d(je,{Lj:()=>ot,X3:()=>kt});var m=S(5861);let K,ae;const fe=new WeakMap,ge=new WeakMap,he=new WeakMap,ie=new WeakMap,ce=new WeakMap;let Ke={get(Se,Ie,Ce){if(Se instanceof IDBTransaction){if("done"===Ie)return ge.get(Se);if("objectStoreNames"===Ie)return Se.objectStoreNames||he.get(Se);if("store"===Ie)return Ce.objectStoreNames[1]?void 0:Ce.objectStore(Ce.objectStoreNames[0])}return Qe(Se[Ie])},set:(Se,Ie,Ce)=>(Se[Ie]=Ce,!0),has:(Se,Ie)=>Se instanceof IDBTransaction&&("done"===Ie||"store"===Ie)||Ie in Se};function Ze(Se){return"function"==typeof Se?function ht(Se){return Se!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function _e(){return ae||(ae=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(Se)?function(...Ie){return Se.apply(Ee(this),Ie),Qe(fe.get(this))}:function(...Ie){return Qe(Se.apply(Ee(this),Ie))}:function(Ie,...Ce){const et=Se.call(Ee(this),Ie,...Ce);return he.set(et,Ie.sort?Ie.sort():[Ie]),Qe(et)}}(Se):(Se instanceof IDBTransaction&&function it(Se){if(ge.has(Se))return;const Ie=new Promise((Ce,et)=>{const lt=()=>{Se.removeEventListener("complete",at),Se.removeEventListener("error",Je),Se.removeEventListener("abort",Je)},at=()=>{Ce(),lt()},Je=()=>{et(Se.error||new DOMException("AbortError","AbortError")),lt()};Se.addEventListener("complete",at),Se.addEventListener("error",Je),Se.addEventListener("abort",Je)});ge.set(Se,Ie)}(Se),((Se,Ie)=>Ie.some(Ce=>Se instanceof Ce))(Se,function oe(){return K||(K=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(Se,Ke):Se)}function Qe(Se){if(Se instanceof IDBRequest)return function me(Se){const Ie=new Promise((Ce,et)=>{const lt=()=>{Se.removeEventListener("success",at),Se.removeEventListener("error",Je)},at=()=>{Ce(Qe(Se.result)),lt()},Je=()=>{et(Se.error),lt()};Se.addEventListener("success",at),Se.addEventListener("error",Je)});return Ie.then(Ce=>{Ce instanceof IDBCursor&&fe.set(Ce,Se)}).catch(()=>{}),ce.set(Ie,Se),Ie}(Se);if(ie.has(Se))return ie.get(Se);const Ie=Ze(Se);return Ie!==Se&&(ie.set(Se,Ie),ce.set(Ie,Se)),Ie}const Ee=Se=>ce.get(Se);function kt(Se,Ie,{blocked:Ce,upgrade:et,blocking:lt,terminated:at}={}){const Je=indexedDB.open(Se,Ie),pn=Qe(Je);return et&&Je.addEventListener("upgradeneeded",Tn=>{et(Qe(Je.result),Tn.oldVersion,Tn.newVersion,Qe(Je.transaction))}),Ce&&Je.addEventListener("blocked",()=>Ce()),pn.then(Tn=>{at&&Tn.addEventListener("close",()=>at()),lt&&Tn.addEventListener("versionchange",()=>lt())}).catch(()=>{}),pn}function ot(Se,{blocked:Ie}={}){const Ce=indexedDB.deleteDatabase(Se);return Ie&&Ce.addEventListener("blocked",()=>Ie()),Qe(Ce).then(()=>{})}const Ne=["get","getKey","getAll","getAllKeys","count"],xe=["put","add","delete","clear"],Nt=new Map;function Lt(Se,Ie){if(!(Se instanceof IDBDatabase)||Ie in Se||"string"!=typeof Ie)return;if(Nt.get(Ie))return Nt.get(Ie);const Ce=Ie.replace(/FromIndex$/,""),et=Ie!==Ce,lt=xe.includes(Ce);if(!(Ce in(et?IDBIndex:IDBObjectStore).prototype)||!lt&&!Ne.includes(Ce))return;const at=function(){var Je=(0,m.Z)(function*(pn,...Tn){const St=this.transaction(pn,lt?"readwrite":"readonly");let Mt=St.store;return et&&(Mt=Mt.index(Tn.shift())),(yield Promise.all([Mt[Ce](...Tn),lt&&St.done]))[0]});return function(Tn){return Je.apply(this,arguments)}}();return Nt.set(Ie,at),at}!function Ye(Se){Ke=Se(Ke)}(Se=>({...Se,get:(Ie,Ce,et)=>Lt(Ie,Ce)||Se.get(Ie,Ce,et),has:(Ie,Ce)=>!!Lt(Ie,Ce)||Se.has(Ie,Ce)}))},5861:(Wt,je,S)=>{function m(K,ae,oe,_e,fe,ge,he){try{var ie=K[ge](he),ce=ie.value}catch(me){return void oe(me)}ie.done?ae(ce):Promise.resolve(ce).then(_e,fe)}function g(K){return function(){var ae=this,oe=arguments;return new Promise(function(_e,fe){var ge=K.apply(ae,oe);function he(ce){m(ge,_e,fe,he,ie,"next",ce)}function ie(ce){m(ge,_e,fe,he,ie,"throw",ce)}he(void 0)})}}S.d(je,{Z:()=>g})}},Wt=>{Wt(Wt.s=208)}]); \ No newline at end of file diff --git a/dist/new-rdv-app/browser/manifest.webmanifest b/dist/new-rdv-app/browser/manifest.webmanifest new file mode 100644 index 0000000..88e8299 --- /dev/null +++ b/dist/new-rdv-app/browser/manifest.webmanifest @@ -0,0 +1,59 @@ +{ + "name": "new-rdv-app", + "short_name": "new-rdv-app", + "theme_color": "#1976d2", + "background_color": "#fafafa", + "display": "standalone", + "scope": "./", + "start_url": "./", + "icons": [ + { + "src": "assets/icons/icon-72x72.png", + "sizes": "72x72", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "assets/icons/icon-96x96.png", + "sizes": "96x96", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "assets/icons/icon-128x128.png", + "sizes": "128x128", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "assets/icons/icon-144x144.png", + "sizes": "144x144", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "assets/icons/icon-152x152.png", + "sizes": "152x152", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "assets/icons/icon-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "assets/icons/icon-384x384.png", + "sizes": "384x384", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "assets/icons/icon-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable any" + } + ] +} diff --git a/dist/new-rdv-app/browser/ngsw-worker.js b/dist/new-rdv-app/browser/ngsw-worker.js new file mode 100755 index 0000000..41bae44 --- /dev/null +++ b/dist/new-rdv-app/browser/ngsw-worker.js @@ -0,0 +1,1845 @@ +(() => { + var __defProp = Object.defineProperty; + var __defProps = Object.defineProperties; + var __getOwnPropDescs = Object.getOwnPropertyDescriptors; + var __getOwnPropSymbols = Object.getOwnPropertySymbols; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __propIsEnum = Object.prototype.propertyIsEnumerable; + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; + }; + var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/named-cache-storage.mjs + var NamedCacheStorage = class { + constructor(original, cacheNamePrefix) { + this.original = original; + this.cacheNamePrefix = cacheNamePrefix; + } + delete(cacheName) { + return this.original.delete(`${this.cacheNamePrefix}:${cacheName}`); + } + has(cacheName) { + return this.original.has(`${this.cacheNamePrefix}:${cacheName}`); + } + async keys() { + const prefix = `${this.cacheNamePrefix}:`; + const allCacheNames = await this.original.keys(); + const ownCacheNames = allCacheNames.filter((name) => name.startsWith(prefix)); + return ownCacheNames.map((name) => name.slice(prefix.length)); + } + match(request, options) { + return this.original.match(request, options); + } + async open(cacheName) { + const cache = await this.original.open(`${this.cacheNamePrefix}:${cacheName}`); + return Object.assign(cache, { name: cacheName }); + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/adapter.mjs + var Adapter = class { + constructor(scopeUrl, caches) { + this.scopeUrl = scopeUrl; + const parsedScopeUrl = this.parseUrl(this.scopeUrl); + this.origin = parsedScopeUrl.origin; + this.caches = new NamedCacheStorage(caches, `ngsw:${parsedScopeUrl.path}`); + } + newRequest(input, init) { + return new Request(input, init); + } + newResponse(body, init) { + return new Response(body, init); + } + newHeaders(headers) { + return new Headers(headers); + } + isClient(source) { + return source instanceof Client; + } + get time() { + return Date.now(); + } + normalizeUrl(url) { + const parsed = this.parseUrl(url, this.scopeUrl); + return parsed.origin === this.origin ? parsed.path : url; + } + parseUrl(url, relativeTo) { + const parsed = !relativeTo ? new URL(url) : new URL(url, relativeTo); + return { origin: parsed.origin, path: parsed.pathname, search: parsed.search }; + } + timeout(ms) { + return new Promise((resolve) => { + setTimeout(() => resolve(), ms); + }); + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/database.mjs + var NotFound = class { + constructor(table, key) { + this.table = table; + this.key = key; + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/db-cache.mjs + var CacheDatabase = class { + constructor(adapter2) { + this.adapter = adapter2; + this.cacheNamePrefix = "db"; + this.tables = /* @__PURE__ */ new Map(); + } + "delete"(name) { + if (this.tables.has(name)) { + this.tables.delete(name); + } + return this.adapter.caches.delete(`${this.cacheNamePrefix}:${name}`); + } + async list() { + const prefix = `${this.cacheNamePrefix}:`; + const allCacheNames = await this.adapter.caches.keys(); + const dbCacheNames = allCacheNames.filter((name) => name.startsWith(prefix)); + return dbCacheNames.map((name) => name.slice(prefix.length)); + } + async open(name, cacheQueryOptions) { + if (!this.tables.has(name)) { + const cache = await this.adapter.caches.open(`${this.cacheNamePrefix}:${name}`); + const table = new CacheTable(name, cache, this.adapter, cacheQueryOptions); + this.tables.set(name, table); + } + return this.tables.get(name); + } + }; + var CacheTable = class { + constructor(name, cache, adapter2, cacheQueryOptions) { + this.name = name; + this.cache = cache; + this.adapter = adapter2; + this.cacheQueryOptions = cacheQueryOptions; + this.cacheName = this.cache.name; + } + request(key) { + return this.adapter.newRequest("/" + key); + } + "delete"(key) { + return this.cache.delete(this.request(key), this.cacheQueryOptions); + } + keys() { + return this.cache.keys().then((requests) => requests.map((req) => req.url.slice(1))); + } + read(key) { + return this.cache.match(this.request(key), this.cacheQueryOptions).then((res) => { + if (res === void 0) { + return Promise.reject(new NotFound(this.name, key)); + } + return res.json(); + }); + } + write(key, value) { + return this.cache.put(this.request(key), this.adapter.newResponse(JSON.stringify(value))); + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/api.mjs + var UpdateCacheStatus; + (function(UpdateCacheStatus2) { + UpdateCacheStatus2[UpdateCacheStatus2["NOT_CACHED"] = 0] = "NOT_CACHED"; + UpdateCacheStatus2[UpdateCacheStatus2["CACHED_BUT_UNUSED"] = 1] = "CACHED_BUT_UNUSED"; + UpdateCacheStatus2[UpdateCacheStatus2["CACHED"] = 2] = "CACHED"; + })(UpdateCacheStatus || (UpdateCacheStatus = {})); + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/error.mjs + var SwCriticalError = class extends Error { + constructor() { + super(...arguments); + this.isCritical = true; + } + }; + function errorToString(error) { + if (error instanceof Error) { + return `${error.message} +${error.stack}`; + } else { + return `${error}`; + } + } + var SwUnrecoverableStateError = class extends SwCriticalError { + constructor() { + super(...arguments); + this.isUnrecoverableState = true; + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/sha1.mjs + function sha1(str) { + const utf8 = str; + const words32 = stringToWords32(utf8, Endian.Big); + return _sha1(words32, utf8.length * 8); + } + function sha1Binary(buffer) { + const words32 = arrayBufferToWords32(buffer, Endian.Big); + return _sha1(words32, buffer.byteLength * 8); + } + function _sha1(words32, len) { + const w = []; + let [a, b, c, d, e] = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; + words32[len >> 5] |= 128 << 24 - len % 32; + words32[(len + 64 >> 9 << 4) + 15] = len; + for (let i = 0; i < words32.length; i += 16) { + const [h0, h1, h2, h3, h4] = [a, b, c, d, e]; + for (let j = 0; j < 80; j++) { + if (j < 16) { + w[j] = words32[i + j]; + } else { + w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1); + } + const [f, k] = fk(j, b, c, d); + const temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32); + [e, d, c, b, a] = [d, c, rol32(b, 30), a, temp]; + } + [a, b, c, d, e] = [add32(a, h0), add32(b, h1), add32(c, h2), add32(d, h3), add32(e, h4)]; + } + return byteStringToHexString(words32ToByteString([a, b, c, d, e])); + } + function add32(a, b) { + return add32to64(a, b)[1]; + } + function add32to64(a, b) { + const low = (a & 65535) + (b & 65535); + const high = (a >>> 16) + (b >>> 16) + (low >>> 16); + return [high >>> 16, high << 16 | low & 65535]; + } + function rol32(a, count) { + return a << count | a >>> 32 - count; + } + var Endian; + (function(Endian2) { + Endian2[Endian2["Little"] = 0] = "Little"; + Endian2[Endian2["Big"] = 1] = "Big"; + })(Endian || (Endian = {})); + function fk(index, b, c, d) { + if (index < 20) { + return [b & c | ~b & d, 1518500249]; + } + if (index < 40) { + return [b ^ c ^ d, 1859775393]; + } + if (index < 60) { + return [b & c | b & d | c & d, 2400959708]; + } + return [b ^ c ^ d, 3395469782]; + } + function stringToWords32(str, endian) { + const size = str.length + 3 >>> 2; + const words32 = []; + for (let i = 0; i < size; i++) { + words32[i] = wordAt(str, i * 4, endian); + } + return words32; + } + function arrayBufferToWords32(buffer, endian) { + const size = buffer.byteLength + 3 >>> 2; + const words32 = []; + const view = new Uint8Array(buffer); + for (let i = 0; i < size; i++) { + words32[i] = wordAt(view, i * 4, endian); + } + return words32; + } + function byteAt(str, index) { + if (typeof str === "string") { + return index >= str.length ? 0 : str.charCodeAt(index) & 255; + } else { + return index >= str.byteLength ? 0 : str[index] & 255; + } + } + function wordAt(str, index, endian) { + let word = 0; + if (endian === Endian.Big) { + for (let i = 0; i < 4; i++) { + word += byteAt(str, index + i) << 24 - 8 * i; + } + } else { + for (let i = 0; i < 4; i++) { + word += byteAt(str, index + i) << 8 * i; + } + } + return word; + } + function words32ToByteString(words32) { + return words32.reduce((str, word) => str + word32ToByteString(word), ""); + } + function word32ToByteString(word) { + let str = ""; + for (let i = 0; i < 4; i++) { + str += String.fromCharCode(word >>> 8 * (3 - i) & 255); + } + return str; + } + function byteStringToHexString(str) { + let hex = ""; + for (let i = 0; i < str.length; i++) { + const b = byteAt(str, i); + hex += (b >>> 4).toString(16) + (b & 15).toString(16); + } + return hex.toLowerCase(); + } + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/assets.mjs + var AssetGroup = class { + constructor(scope2, adapter2, idle, config, hashes, db, cacheNamePrefix) { + this.scope = scope2; + this.adapter = adapter2; + this.idle = idle; + this.config = config; + this.hashes = hashes; + this.db = db; + this.inFlightRequests = /* @__PURE__ */ new Map(); + this.urls = []; + this.patterns = []; + this.name = config.name; + this.urls = config.urls.map((url) => adapter2.normalizeUrl(url)); + this.patterns = config.patterns.map((pattern) => new RegExp(pattern)); + this.cache = adapter2.caches.open(`${cacheNamePrefix}:${config.name}:cache`); + this.metadata = this.db.open(`${cacheNamePrefix}:${config.name}:meta`, config.cacheQueryOptions); + } + async cacheStatus(url) { + const cache = await this.cache; + const meta = await this.metadata; + const req = this.adapter.newRequest(url); + const res = await cache.match(req, this.config.cacheQueryOptions); + if (res === void 0) { + return UpdateCacheStatus.NOT_CACHED; + } + try { + const data = await meta.read(req.url); + if (!data.used) { + return UpdateCacheStatus.CACHED_BUT_UNUSED; + } + } catch (_) { + } + return UpdateCacheStatus.CACHED; + } + async getCacheNames() { + const [cache, metadata] = await Promise.all([ + this.cache, + this.metadata + ]); + return [cache.name, metadata.cacheName]; + } + async handleFetch(req, _event) { + const url = this.adapter.normalizeUrl(req.url); + if (this.urls.indexOf(url) !== -1 || this.patterns.some((pattern) => pattern.test(url))) { + const cache = await this.cache; + const cachedResponse = await cache.match(req, this.config.cacheQueryOptions); + if (cachedResponse !== void 0) { + if (this.hashes.has(url)) { + return cachedResponse; + } else { + if (await this.needToRevalidate(req, cachedResponse)) { + this.idle.schedule(`revalidate(${cache.name}): ${req.url}`, async () => { + await this.fetchAndCacheOnce(req); + }); + } + return cachedResponse; + } + } + const res = await this.fetchAndCacheOnce(this.adapter.newRequest(req.url)); + return res.clone(); + } else { + return null; + } + } + async needToRevalidate(req, res) { + if (res.headers.has("Cache-Control")) { + const cacheControl = res.headers.get("Cache-Control"); + const cacheDirectives = cacheControl.split(",").map((v) => v.trim()).map((v) => v.split("=")); + cacheDirectives.forEach((v) => v[0] = v[0].toLowerCase()); + const maxAgeDirective = cacheDirectives.find((v) => v[0] === "max-age"); + const cacheAge = maxAgeDirective ? maxAgeDirective[1] : void 0; + if (!cacheAge) { + return true; + } + try { + const maxAge = 1e3 * parseInt(cacheAge); + let ts; + try { + const metaTable = await this.metadata; + ts = (await metaTable.read(req.url)).ts; + } catch (e) { + const date = res.headers.get("Date"); + if (date === null) { + return true; + } + ts = Date.parse(date); + } + const age = this.adapter.time - ts; + return age < 0 || age > maxAge; + } catch (e) { + return true; + } + } else if (res.headers.has("Expires")) { + const expiresStr = res.headers.get("Expires"); + try { + return this.adapter.time > Date.parse(expiresStr); + } catch (e) { + return true; + } + } else { + return true; + } + } + async fetchFromCacheOnly(url) { + const cache = await this.cache; + const metaTable = await this.metadata; + const request = this.adapter.newRequest(url); + const response = await cache.match(request, this.config.cacheQueryOptions); + if (response === void 0) { + return null; + } + let metadata = void 0; + try { + metadata = await metaTable.read(request.url); + } catch (e) { + } + return { response, metadata }; + } + async unhashedResources() { + const cache = await this.cache; + return (await cache.keys()).map((request) => this.adapter.normalizeUrl(request.url)).filter((url) => !this.hashes.has(url)); + } + async fetchAndCacheOnce(req, used = true) { + if (this.inFlightRequests.has(req.url)) { + return this.inFlightRequests.get(req.url); + } + const fetchOp = this.fetchFromNetwork(req); + this.inFlightRequests.set(req.url, fetchOp); + try { + const res = await fetchOp; + if (!res.ok) { + throw new Error(`Response not Ok (fetchAndCacheOnce): request for ${req.url} returned response ${res.status} ${res.statusText}`); + } + try { + const cache = await this.cache; + await cache.put(req, res.clone()); + if (!this.hashes.has(this.adapter.normalizeUrl(req.url))) { + const meta = { ts: this.adapter.time, used }; + const metaTable = await this.metadata; + await metaTable.write(req.url, meta); + } + return res; + } catch (err) { + throw new SwCriticalError(`Failed to update the caches for request to '${req.url}' (fetchAndCacheOnce): ${errorToString(err)}`); + } + } finally { + this.inFlightRequests.delete(req.url); + } + } + async fetchFromNetwork(req, redirectLimit = 3) { + const res = await this.cacheBustedFetchFromNetwork(req); + if (res["redirected"] && !!res.url) { + if (redirectLimit === 0) { + throw new SwCriticalError(`Response hit redirect limit (fetchFromNetwork): request redirected too many times, next is ${res.url}`); + } + return this.fetchFromNetwork(this.adapter.newRequest(res.url), redirectLimit - 1); + } + return res; + } + async cacheBustedFetchFromNetwork(req) { + const url = this.adapter.normalizeUrl(req.url); + if (this.hashes.has(url)) { + const canonicalHash = this.hashes.get(url); + let response = await this.safeFetch(req); + let makeCacheBustedRequest = response.ok; + if (makeCacheBustedRequest) { + const fetchedHash = sha1Binary(await response.clone().arrayBuffer()); + makeCacheBustedRequest = fetchedHash !== canonicalHash; + } + if (makeCacheBustedRequest) { + const cacheBustReq = this.adapter.newRequest(this.cacheBust(req.url)); + response = await this.safeFetch(cacheBustReq); + if (response.ok) { + const cacheBustedHash = sha1Binary(await response.clone().arrayBuffer()); + if (canonicalHash !== cacheBustedHash) { + throw new SwCriticalError(`Hash mismatch (cacheBustedFetchFromNetwork): ${req.url}: expected ${canonicalHash}, got ${cacheBustedHash} (after cache busting)`); + } + } + } + if (!response.ok && response.status === 404) { + throw new SwUnrecoverableStateError(`Failed to retrieve hashed resource from the server. (AssetGroup: ${this.config.name} | URL: ${url})`); + } + return response; + } else { + return this.safeFetch(req); + } + } + async maybeUpdate(updateFrom, req, cache) { + const url = this.adapter.normalizeUrl(req.url); + if (this.hashes.has(url)) { + const hash = this.hashes.get(url); + const res = await updateFrom.lookupResourceWithHash(url, hash); + if (res !== null) { + await cache.put(req, res); + return true; + } + } + return false; + } + cacheBust(url) { + return url + (url.indexOf("?") === -1 ? "?" : "&") + "ngsw-cache-bust=" + Math.random(); + } + async safeFetch(req) { + try { + return await this.scope.fetch(req); + } catch (e) { + return this.adapter.newResponse("", { + status: 504, + statusText: "Gateway Timeout" + }); + } + } + }; + var PrefetchAssetGroup = class extends AssetGroup { + async initializeFully(updateFrom) { + const cache = await this.cache; + await this.urls.reduce(async (previous, url) => { + await previous; + const req = this.adapter.newRequest(url); + const alreadyCached = await cache.match(req, this.config.cacheQueryOptions) !== void 0; + if (alreadyCached) { + return; + } + if (updateFrom !== void 0 && await this.maybeUpdate(updateFrom, req, cache)) { + return; + } + await this.fetchAndCacheOnce(req, false); + }, Promise.resolve()); + if (updateFrom !== void 0) { + const metaTable = await this.metadata; + await (await updateFrom.previouslyCachedResources()).filter((url) => this.urls.indexOf(url) !== -1 || this.patterns.some((pattern) => pattern.test(url))).reduce(async (previous, url) => { + await previous; + const req = this.adapter.newRequest(url); + const alreadyCached = await cache.match(req, this.config.cacheQueryOptions) !== void 0; + if (alreadyCached) { + return; + } + const res = await updateFrom.lookupResourceWithoutHash(url); + if (res === null || res.metadata === void 0) { + return; + } + await cache.put(req, res.response); + await metaTable.write(req.url, __spreadProps(__spreadValues({}, res.metadata), { used: false })); + }, Promise.resolve()); + } + } + }; + var LazyAssetGroup = class extends AssetGroup { + async initializeFully(updateFrom) { + if (updateFrom === void 0) { + return; + } + const cache = await this.cache; + await this.urls.reduce(async (previous, url) => { + await previous; + const req = this.adapter.newRequest(url); + const alreadyCached = await cache.match(req, this.config.cacheQueryOptions) !== void 0; + if (alreadyCached) { + return; + } + const updated = await this.maybeUpdate(updateFrom, req, cache); + if (this.config.updateMode === "prefetch" && !updated) { + const cacheStatus = await updateFrom.recentCacheStatus(url); + if (cacheStatus !== UpdateCacheStatus.CACHED) { + return; + } + await this.fetchAndCacheOnce(req, false); + } + }, Promise.resolve()); + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/data.mjs + var LruList = class { + constructor(state) { + if (state === void 0) { + state = { + head: null, + tail: null, + map: {}, + count: 0 + }; + } + this.state = state; + } + get size() { + return this.state.count; + } + pop() { + if (this.state.tail === null) { + return null; + } + const url = this.state.tail; + this.remove(url); + return url; + } + remove(url) { + const node = this.state.map[url]; + if (node === void 0) { + return false; + } + if (this.state.head === url) { + if (node.next === null) { + this.state.head = null; + this.state.tail = null; + this.state.map = {}; + this.state.count = 0; + return true; + } + const next = this.state.map[node.next]; + next.previous = null; + this.state.head = next.url; + node.next = null; + delete this.state.map[url]; + this.state.count--; + return true; + } + const previous = this.state.map[node.previous]; + previous.next = node.next; + if (node.next !== null) { + this.state.map[node.next].previous = node.previous; + } else { + this.state.tail = node.previous; + } + node.next = null; + node.previous = null; + delete this.state.map[url]; + this.state.count--; + return true; + } + accessed(url) { + if (this.state.head === url) { + return; + } + const node = this.state.map[url] || { url, next: null, previous: null }; + if (this.state.map[url] !== void 0) { + this.remove(url); + } + if (this.state.head !== null) { + this.state.map[this.state.head].previous = url; + } + node.next = this.state.head; + this.state.head = url; + if (this.state.tail === null) { + this.state.tail = url; + } + this.state.map[url] = node; + this.state.count++; + } + }; + var DataGroup = class { + constructor(scope2, adapter2, config, db, debugHandler, cacheNamePrefix) { + this.scope = scope2; + this.adapter = adapter2; + this.config = config; + this.db = db; + this.debugHandler = debugHandler; + this._lru = null; + this.patterns = config.patterns.map((pattern) => new RegExp(pattern)); + this.cache = adapter2.caches.open(`${cacheNamePrefix}:${config.name}:cache`); + this.lruTable = this.db.open(`${cacheNamePrefix}:${config.name}:lru`, config.cacheQueryOptions); + this.ageTable = this.db.open(`${cacheNamePrefix}:${config.name}:age`, config.cacheQueryOptions); + } + async lru() { + if (this._lru === null) { + const table = await this.lruTable; + try { + this._lru = new LruList(await table.read("lru")); + } catch (e) { + this._lru = new LruList(); + } + } + return this._lru; + } + async syncLru() { + if (this._lru === null) { + return; + } + const table = await this.lruTable; + try { + return table.write("lru", this._lru.state); + } catch (err) { + this.debugHandler.log(err, `DataGroup(${this.config.name}@${this.config.version}).syncLru()`); + } + } + async handleFetch(req, event) { + if (!this.patterns.some((pattern) => pattern.test(req.url))) { + return null; + } + const lru = await this.lru(); + switch (req.method) { + case "OPTIONS": + return null; + case "GET": + case "HEAD": + switch (this.config.strategy) { + case "freshness": + return this.handleFetchWithFreshness(req, event, lru); + case "performance": + return this.handleFetchWithPerformance(req, event, lru); + default: + throw new Error(`Unknown strategy: ${this.config.strategy}`); + } + default: + const wasCached = lru.remove(req.url); + if (wasCached) { + await this.clearCacheForUrl(req.url); + } + await this.syncLru(); + return this.safeFetch(req); + } + } + async handleFetchWithPerformance(req, event, lru) { + var _a; + const okToCacheOpaque = (_a = this.config.cacheOpaqueResponses) != null ? _a : false; + let res = null; + const fromCache = await this.loadFromCache(req, lru); + if (fromCache !== null) { + res = fromCache.res; + if (this.config.refreshAheadMs !== void 0 && fromCache.age >= this.config.refreshAheadMs) { + event.waitUntil(this.safeCacheResponse(req, this.safeFetch(req), lru, okToCacheOpaque)); + } + } + if (res !== null) { + return res; + } + const [timeoutFetch, networkFetch] = this.networkFetchWithTimeout(req); + res = await timeoutFetch; + if (res === void 0) { + res = this.adapter.newResponse(null, { status: 504, statusText: "Gateway Timeout" }); + event.waitUntil(this.safeCacheResponse(req, networkFetch, lru, okToCacheOpaque)); + } else { + await this.safeCacheResponse(req, res, lru, okToCacheOpaque); + } + return res; + } + async handleFetchWithFreshness(req, event, lru) { + var _a; + const okToCacheOpaque = (_a = this.config.cacheOpaqueResponses) != null ? _a : true; + const [timeoutFetch, networkFetch] = this.networkFetchWithTimeout(req); + let res; + try { + res = await timeoutFetch; + } catch (e) { + res = void 0; + } + if (res === void 0) { + event.waitUntil(this.safeCacheResponse(req, networkFetch, lru, okToCacheOpaque)); + const fromCache = await this.loadFromCache(req, lru); + res = fromCache !== null ? fromCache.res : null; + } else { + await this.safeCacheResponse(req, res, lru, okToCacheOpaque); + } + if (res !== null) { + return res; + } + return networkFetch; + } + networkFetchWithTimeout(req) { + if (this.config.timeoutMs !== void 0) { + const networkFetch = this.scope.fetch(req); + const safeNetworkFetch = (async () => { + try { + return await networkFetch; + } catch (e) { + return this.adapter.newResponse(null, { + status: 504, + statusText: "Gateway Timeout" + }); + } + })(); + const networkFetchUndefinedError = (async () => { + try { + return await networkFetch; + } catch (e) { + return void 0; + } + })(); + const timeout = this.adapter.timeout(this.config.timeoutMs); + return [Promise.race([networkFetchUndefinedError, timeout]), safeNetworkFetch]; + } else { + const networkFetch = this.safeFetch(req); + return [networkFetch, networkFetch]; + } + } + async safeCacheResponse(req, resOrPromise, lru, okToCacheOpaque) { + try { + const res = await resOrPromise; + try { + await this.cacheResponse(req, res, lru, okToCacheOpaque); + } catch (err) { + this.debugHandler.log(err, `DataGroup(${this.config.name}@${this.config.version}).safeCacheResponse(${req.url}, status: ${res.status})`); + } + } catch (e) { + } + } + async loadFromCache(req, lru) { + const cache = await this.cache; + let res = await cache.match(req, this.config.cacheQueryOptions); + if (res !== void 0) { + try { + const ageTable = await this.ageTable; + const age = this.adapter.time - (await ageTable.read(req.url)).age; + if (age <= this.config.maxAge) { + lru.accessed(req.url); + return { res, age }; + } + } catch (e) { + } + lru.remove(req.url); + await this.clearCacheForUrl(req.url); + await this.syncLru(); + } + return null; + } + async cacheResponse(req, res, lru, okToCacheOpaque = false) { + if (!(res.ok || okToCacheOpaque && res.type === "opaque")) { + return; + } + if (lru.size >= this.config.maxSize) { + const evictedUrl = lru.pop(); + if (evictedUrl !== null) { + await this.clearCacheForUrl(evictedUrl); + } + } + lru.accessed(req.url); + await (await this.cache).put(req, res.clone()); + const ageTable = await this.ageTable; + await ageTable.write(req.url, { age: this.adapter.time }); + await this.syncLru(); + } + async cleanup() { + await Promise.all([ + this.cache.then((cache) => this.adapter.caches.delete(cache.name)), + this.ageTable.then((table) => this.db.delete(table.name)), + this.lruTable.then((table) => this.db.delete(table.name)) + ]); + } + async getCacheNames() { + const [cache, ageTable, lruTable] = await Promise.all([ + this.cache, + this.ageTable, + this.lruTable + ]); + return [cache.name, ageTable.cacheName, lruTable.cacheName]; + } + async clearCacheForUrl(url) { + const [cache, ageTable] = await Promise.all([this.cache, this.ageTable]); + await Promise.all([ + cache.delete(this.adapter.newRequest(url, { method: "GET" }), this.config.cacheQueryOptions), + cache.delete(this.adapter.newRequest(url, { method: "HEAD" }), this.config.cacheQueryOptions), + ageTable.delete(url) + ]); + } + async safeFetch(req) { + try { + return this.scope.fetch(req); + } catch (e) { + return this.adapter.newResponse(null, { + status: 504, + statusText: "Gateway Timeout" + }); + } + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/app-version.mjs + var BACKWARDS_COMPATIBILITY_NAVIGATION_URLS = [ + { positive: true, regex: "^/.*$" }, + { positive: false, regex: "^/.*\\.[^/]*$" }, + { positive: false, regex: "^/.*__" } + ]; + var AppVersion = class { + constructor(scope2, adapter2, database, idle, debugHandler, manifest, manifestHash) { + this.scope = scope2; + this.adapter = adapter2; + this.database = database; + this.debugHandler = debugHandler; + this.manifest = manifest; + this.manifestHash = manifestHash; + this.hashTable = /* @__PURE__ */ new Map(); + this.indexUrl = this.adapter.normalizeUrl(this.manifest.index); + this._okay = true; + Object.keys(manifest.hashTable).forEach((url) => { + this.hashTable.set(adapter2.normalizeUrl(url), manifest.hashTable[url]); + }); + const assetCacheNamePrefix = `${manifestHash}:assets`; + this.assetGroups = (manifest.assetGroups || []).map((config) => { + switch (config.installMode) { + case "prefetch": + return new PrefetchAssetGroup(scope2, adapter2, idle, config, this.hashTable, database, assetCacheNamePrefix); + case "lazy": + return new LazyAssetGroup(scope2, adapter2, idle, config, this.hashTable, database, assetCacheNamePrefix); + } + }); + this.dataGroups = (manifest.dataGroups || []).map((config) => new DataGroup(scope2, adapter2, config, database, debugHandler, `${config.version}:data`)); + manifest.navigationUrls = manifest.navigationUrls || BACKWARDS_COMPATIBILITY_NAVIGATION_URLS; + const includeUrls = manifest.navigationUrls.filter((spec) => spec.positive); + const excludeUrls = manifest.navigationUrls.filter((spec) => !spec.positive); + this.navigationUrls = { + include: includeUrls.map((spec) => new RegExp(spec.regex)), + exclude: excludeUrls.map((spec) => new RegExp(spec.regex)) + }; + } + get okay() { + return this._okay; + } + async initializeFully(updateFrom) { + try { + await this.assetGroups.reduce(async (previous, group) => { + await previous; + return group.initializeFully(updateFrom); + }, Promise.resolve()); + } catch (err) { + this._okay = false; + throw err; + } + } + async handleFetch(req, event) { + const asset = await this.assetGroups.reduce(async (potentialResponse, group) => { + const resp = await potentialResponse; + if (resp !== null) { + return resp; + } + return group.handleFetch(req, event); + }, Promise.resolve(null)); + if (asset !== null) { + return asset; + } + const data = await this.dataGroups.reduce(async (potentialResponse, group) => { + const resp = await potentialResponse; + if (resp !== null) { + return resp; + } + return group.handleFetch(req, event); + }, Promise.resolve(null)); + if (data !== null) { + return data; + } + if (this.adapter.normalizeUrl(req.url) !== this.indexUrl && this.isNavigationRequest(req)) { + if (this.manifest.navigationRequestStrategy === "freshness") { + try { + return await this.scope.fetch(req); + } catch (e) { + } + } + return this.handleFetch(this.adapter.newRequest(this.indexUrl), event); + } + return null; + } + isNavigationRequest(req) { + if (req.mode !== "navigate") { + return false; + } + if (!this.acceptsTextHtml(req)) { + return false; + } + const urlPrefix = this.scope.registration.scope.replace(/\/$/, ""); + const url = req.url.startsWith(urlPrefix) ? req.url.slice(urlPrefix.length) : req.url; + const urlWithoutQueryOrHash = url.replace(/[?#].*$/, ""); + return this.navigationUrls.include.some((regex) => regex.test(urlWithoutQueryOrHash)) && !this.navigationUrls.exclude.some((regex) => regex.test(urlWithoutQueryOrHash)); + } + async lookupResourceWithHash(url, hash) { + if (!this.hashTable.has(url)) { + return null; + } + if (this.hashTable.get(url) !== hash) { + return null; + } + const cacheState = await this.lookupResourceWithoutHash(url); + return cacheState && cacheState.response; + } + lookupResourceWithoutHash(url) { + return this.assetGroups.reduce(async (potentialResponse, group) => { + const resp = await potentialResponse; + if (resp !== null) { + return resp; + } + return group.fetchFromCacheOnly(url); + }, Promise.resolve(null)); + } + previouslyCachedResources() { + return this.assetGroups.reduce(async (resources, group) => (await resources).concat(await group.unhashedResources()), Promise.resolve([])); + } + async recentCacheStatus(url) { + return this.assetGroups.reduce(async (current, group) => { + const status = await current; + if (status === UpdateCacheStatus.CACHED) { + return status; + } + const groupStatus = await group.cacheStatus(url); + if (groupStatus === UpdateCacheStatus.NOT_CACHED) { + return status; + } + return groupStatus; + }, Promise.resolve(UpdateCacheStatus.NOT_CACHED)); + } + async getCacheNames() { + const allGroupCacheNames = await Promise.all([ + ...this.assetGroups.map((group) => group.getCacheNames()), + ...this.dataGroups.map((group) => group.getCacheNames()) + ]); + return [].concat(...allGroupCacheNames); + } + get appData() { + return this.manifest.appData || null; + } + acceptsTextHtml(req) { + const accept = req.headers.get("Accept"); + if (accept === null) { + return false; + } + const values = accept.split(","); + return values.some((value) => value.trim().toLowerCase() === "text/html"); + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/debug.mjs + var SW_VERSION = "14.0.2"; + var DEBUG_LOG_BUFFER_SIZE = 100; + var DebugHandler = class { + constructor(driver, adapter2) { + this.driver = driver; + this.adapter = adapter2; + this.debugLogA = []; + this.debugLogB = []; + } + async handleFetch(req) { + const [state, versions, idle] = await Promise.all([ + this.driver.debugState(), + this.driver.debugVersions(), + this.driver.debugIdleState() + ]); + const msgState = `NGSW Debug Info: + +Driver version: ${SW_VERSION} +Driver state: ${state.state} (${state.why}) +Latest manifest hash: ${state.latestHash || "none"} +Last update check: ${this.since(state.lastUpdateCheck)}`; + const msgVersions = versions.map((version) => `=== Version ${version.hash} === + +Clients: ${version.clients.join(", ")}`).join("\n\n"); + const msgIdle = `=== Idle Task Queue === +Last update tick: ${this.since(idle.lastTrigger)} +Last update run: ${this.since(idle.lastRun)} +Task queue: +${idle.queue.map((v) => " * " + v).join("\n")} + +Debug log: +${this.formatDebugLog(this.debugLogB)} +${this.formatDebugLog(this.debugLogA)} +`; + return this.adapter.newResponse(`${msgState} + +${msgVersions} + +${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }) }); + } + since(time) { + if (time === null) { + return "never"; + } + let age = this.adapter.time - time; + const days = Math.floor(age / 864e5); + age = age % 864e5; + const hours = Math.floor(age / 36e5); + age = age % 36e5; + const minutes = Math.floor(age / 6e4); + age = age % 6e4; + const seconds = Math.floor(age / 1e3); + const millis = age % 1e3; + return (days > 0 ? `${days}d` : "") + (hours > 0 ? `${hours}h` : "") + (minutes > 0 ? `${minutes}m` : "") + (seconds > 0 ? `${seconds}s` : "") + (millis > 0 ? `${millis}u` : ""); + } + log(value, context = "") { + if (this.debugLogA.length === DEBUG_LOG_BUFFER_SIZE) { + this.debugLogB = this.debugLogA; + this.debugLogA = []; + } + if (typeof value !== "string") { + value = this.errorToString(value); + } + this.debugLogA.push({ value, time: this.adapter.time, context }); + } + errorToString(err) { + return `${err.name}(${err.message}, ${err.stack})`; + } + formatDebugLog(log) { + return log.map((entry) => `[${this.since(entry.time)}] ${entry.value} ${entry.context}`).join("\n"); + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/idle.mjs + var IdleScheduler = class { + constructor(adapter2, delay, maxDelay, debug) { + this.adapter = adapter2; + this.delay = delay; + this.maxDelay = maxDelay; + this.debug = debug; + this.queue = []; + this.scheduled = null; + this.empty = Promise.resolve(); + this.emptyResolve = null; + this.lastTrigger = null; + this.lastRun = null; + this.oldestScheduledAt = null; + } + async trigger() { + var _a; + this.lastTrigger = this.adapter.time; + if (this.queue.length === 0) { + return; + } + if (this.scheduled !== null) { + this.scheduled.cancel = true; + } + const scheduled = { + cancel: false + }; + this.scheduled = scheduled; + const now = this.adapter.time; + const maxDelay = Math.max(0, ((_a = this.oldestScheduledAt) != null ? _a : now) + this.maxDelay - now); + const delay = Math.min(maxDelay, this.delay); + await this.adapter.timeout(delay); + if (scheduled.cancel) { + return; + } + this.scheduled = null; + await this.execute(); + } + async execute() { + this.lastRun = this.adapter.time; + while (this.queue.length > 0) { + const queue = this.queue; + this.queue = []; + await queue.reduce(async (previous, task) => { + await previous; + try { + await task.run(); + } catch (err) { + this.debug.log(err, `while running idle task ${task.desc}`); + } + }, Promise.resolve()); + } + if (this.emptyResolve !== null) { + this.emptyResolve(); + this.emptyResolve = null; + } + this.empty = Promise.resolve(); + this.oldestScheduledAt = null; + } + schedule(desc, run) { + this.queue.push({ desc, run }); + if (this.emptyResolve === null) { + this.empty = new Promise((resolve) => { + this.emptyResolve = resolve; + }); + } + if (this.oldestScheduledAt === null) { + this.oldestScheduledAt = this.adapter.time; + } + } + get size() { + return this.queue.length; + } + get taskDescriptions() { + return this.queue.map((task) => task.desc); + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/manifest.mjs + function hashManifest(manifest) { + return sha1(JSON.stringify(manifest)); + } + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/msg.mjs + function isMsgCheckForUpdates(msg) { + return msg.action === "CHECK_FOR_UPDATES"; + } + function isMsgActivateUpdate(msg) { + return msg.action === "ACTIVATE_UPDATE"; + } + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/driver.mjs + var IDLE_DELAY = 5e3; + var MAX_IDLE_DELAY = 3e4; + var SUPPORTED_CONFIG_VERSION = 1; + var NOTIFICATION_OPTION_NAMES = [ + "actions", + "badge", + "body", + "data", + "dir", + "icon", + "image", + "lang", + "renotify", + "requireInteraction", + "silent", + "tag", + "timestamp", + "title", + "vibrate" + ]; + var DriverReadyState; + (function(DriverReadyState2) { + DriverReadyState2[DriverReadyState2["NORMAL"] = 0] = "NORMAL"; + DriverReadyState2[DriverReadyState2["EXISTING_CLIENTS_ONLY"] = 1] = "EXISTING_CLIENTS_ONLY"; + DriverReadyState2[DriverReadyState2["SAFE_MODE"] = 2] = "SAFE_MODE"; + })(DriverReadyState || (DriverReadyState = {})); + var Driver = class { + constructor(scope2, adapter2, db) { + this.scope = scope2; + this.adapter = adapter2; + this.db = db; + this.state = DriverReadyState.NORMAL; + this.stateMessage = "(nominal)"; + this.initialized = null; + this.clientVersionMap = /* @__PURE__ */ new Map(); + this.versions = /* @__PURE__ */ new Map(); + this.latestHash = null; + this.lastUpdateCheck = null; + this.scheduledNavUpdateCheck = false; + this.loggedInvalidOnlyIfCachedRequest = false; + this.ngswStatePath = this.adapter.parseUrl("ngsw/state", this.scope.registration.scope).path; + this.controlTable = this.db.open("control"); + this.scope.addEventListener("install", (event) => { + event.waitUntil(this.scope.skipWaiting()); + }); + this.scope.addEventListener("activate", (event) => { + event.waitUntil((async () => { + await this.scope.clients.claim(); + this.idle.schedule("activate: cleanup-old-sw-caches", async () => { + try { + await this.cleanupOldSwCaches(); + } catch (err) { + this.debugger.log(err, "cleanupOldSwCaches @ activate: cleanup-old-sw-caches"); + } + }); + })()); + if (this.scope.registration.active !== null) { + this.scope.registration.active.postMessage({ action: "INITIALIZE" }); + } + }); + this.scope.addEventListener("fetch", (event) => this.onFetch(event)); + this.scope.addEventListener("message", (event) => this.onMessage(event)); + this.scope.addEventListener("push", (event) => this.onPush(event)); + this.scope.addEventListener("notificationclick", (event) => this.onClick(event)); + this.debugger = new DebugHandler(this, this.adapter); + this.idle = new IdleScheduler(this.adapter, IDLE_DELAY, MAX_IDLE_DELAY, this.debugger); + } + onFetch(event) { + const req = event.request; + const scopeUrl = this.scope.registration.scope; + const requestUrlObj = this.adapter.parseUrl(req.url, scopeUrl); + if (req.headers.has("ngsw-bypass") || /[?&]ngsw-bypass(?:[=&]|$)/i.test(requestUrlObj.search)) { + return; + } + if (requestUrlObj.path === this.ngswStatePath) { + event.respondWith(this.debugger.handleFetch(req)); + return; + } + if (this.state === DriverReadyState.SAFE_MODE) { + event.waitUntil(this.idle.trigger()); + return; + } + if (requestUrlObj.origin.startsWith("http:") && scopeUrl.startsWith("https:")) { + this.debugger.log(`Ignoring passive mixed content request: Driver.fetch(${req.url})`); + return; + } + if (req.cache === "only-if-cached" && req.mode !== "same-origin") { + if (!this.loggedInvalidOnlyIfCachedRequest) { + this.loggedInvalidOnlyIfCachedRequest = true; + this.debugger.log(`Ignoring invalid request: 'only-if-cached' can be set only with 'same-origin' mode`, `Driver.fetch(${req.url}, cache: ${req.cache}, mode: ${req.mode})`); + } + return; + } + event.respondWith(this.handleFetch(event)); + } + onMessage(event) { + if (this.state === DriverReadyState.SAFE_MODE) { + return; + } + const data = event.data; + if (!data || !data.action) { + return; + } + event.waitUntil((async () => { + if (data.action === "INITIALIZE") { + return this.ensureInitialized(event); + } + if (!this.adapter.isClient(event.source)) { + return; + } + await this.ensureInitialized(event); + await this.handleMessage(data, event.source); + })()); + } + onPush(msg) { + if (!msg.data) { + return; + } + msg.waitUntil(this.handlePush(msg.data.json())); + } + onClick(event) { + event.waitUntil(this.handleClick(event.notification, event.action)); + } + async ensureInitialized(event) { + if (this.initialized !== null) { + return this.initialized; + } + try { + this.initialized = this.initialize(); + await this.initialized; + } catch (error) { + this.state = DriverReadyState.SAFE_MODE; + this.stateMessage = `Initialization failed due to error: ${errorToString(error)}`; + throw error; + } finally { + event.waitUntil(this.idle.trigger()); + } + } + async handleMessage(msg, from) { + if (isMsgCheckForUpdates(msg)) { + const action = this.checkForUpdate(); + await this.completeOperation(from, action, msg.nonce); + } else if (isMsgActivateUpdate(msg)) { + const action = this.updateClient(from); + await this.completeOperation(from, action, msg.nonce); + } + } + async handlePush(data) { + await this.broadcast({ + type: "PUSH", + data + }); + if (!data.notification || !data.notification.title) { + return; + } + const desc = data.notification; + let options = {}; + NOTIFICATION_OPTION_NAMES.filter((name) => desc.hasOwnProperty(name)).forEach((name) => options[name] = desc[name]); + await this.scope.registration.showNotification(desc["title"], options); + } + async handleClick(notification, action) { + var _a, _b, _c; + notification.close(); + const options = {}; + NOTIFICATION_OPTION_NAMES.filter((name) => name in notification).forEach((name) => options[name] = notification[name]); + const notificationAction = action === "" || action === void 0 ? "default" : action; + const onActionClick = (_b = (_a = notification == null ? void 0 : notification.data) == null ? void 0 : _a.onActionClick) == null ? void 0 : _b[notificationAction]; + const urlToOpen = new URL((_c = onActionClick == null ? void 0 : onActionClick.url) != null ? _c : "", this.scope.registration.scope).href; + switch (onActionClick == null ? void 0 : onActionClick.operation) { + case "openWindow": + await this.scope.clients.openWindow(urlToOpen); + break; + case "focusLastFocusedOrOpen": { + let matchingClient = await this.getLastFocusedMatchingClient(this.scope); + if (matchingClient) { + await (matchingClient == null ? void 0 : matchingClient.focus()); + } else { + await this.scope.clients.openWindow(urlToOpen); + } + break; + } + case "navigateLastFocusedOrOpen": { + let matchingClient = await this.getLastFocusedMatchingClient(this.scope); + if (matchingClient) { + matchingClient = await matchingClient.navigate(urlToOpen); + await (matchingClient == null ? void 0 : matchingClient.focus()); + } else { + await this.scope.clients.openWindow(urlToOpen); + } + break; + } + default: + break; + } + await this.broadcast({ + type: "NOTIFICATION_CLICK", + data: { action, notification: options } + }); + } + async getLastFocusedMatchingClient(scope2) { + const windowClients = await scope2.clients.matchAll({ type: "window" }); + return windowClients[0]; + } + async completeOperation(client, promise, nonce) { + const response = { type: "OPERATION_COMPLETED", nonce }; + try { + client.postMessage(__spreadProps(__spreadValues({}, response), { + result: await promise + })); + } catch (e) { + client.postMessage(__spreadProps(__spreadValues({}, response), { + error: e.toString() + })); + } + } + async updateClient(client) { + const existing = this.clientVersionMap.get(client.id); + if (existing === this.latestHash) { + return false; + } + let previous = void 0; + if (existing !== void 0) { + const existingVersion = this.versions.get(existing); + previous = this.mergeHashWithAppData(existingVersion.manifest, existing); + } + this.clientVersionMap.set(client.id, this.latestHash); + await this.sync(); + const current = this.versions.get(this.latestHash); + const notice = { + type: "UPDATE_ACTIVATED", + previous, + current: this.mergeHashWithAppData(current.manifest, this.latestHash) + }; + client.postMessage(notice); + return true; + } + async handleFetch(event) { + try { + await this.ensureInitialized(event); + } catch (e) { + return this.safeFetch(event.request); + } + if (event.request.mode === "navigate" && !this.scheduledNavUpdateCheck) { + this.scheduledNavUpdateCheck = true; + this.idle.schedule("check-updates-on-navigation", async () => { + this.scheduledNavUpdateCheck = false; + await this.checkForUpdate(); + }); + } + const appVersion = await this.assignVersion(event); + let res = null; + try { + if (appVersion !== null) { + try { + res = await appVersion.handleFetch(event.request, event); + } catch (err) { + if (err.isUnrecoverableState) { + await this.notifyClientsAboutUnrecoverableState(appVersion, err.message); + } + if (err.isCritical) { + this.debugger.log(err, `Driver.handleFetch(version: ${appVersion.manifestHash})`); + await this.versionFailed(appVersion, err); + return this.safeFetch(event.request); + } + throw err; + } + } + if (res === null) { + return this.safeFetch(event.request); + } + return res; + } finally { + event.waitUntil(this.idle.trigger()); + } + } + async initialize() { + const table = await this.controlTable; + let manifests, assignments, latest; + try { + [manifests, assignments, latest] = await Promise.all([ + table.read("manifests"), + table.read("assignments"), + table.read("latest") + ]); + if (!this.versions.has(latest.latest) && !manifests.hasOwnProperty(latest.latest)) { + this.debugger.log(`Missing manifest for latest version hash ${latest.latest}`, "initialize: read from DB"); + throw new Error(`Missing manifest for latest hash ${latest.latest}`); + } + this.idle.schedule("init post-load (update)", async () => { + await this.checkForUpdate(); + }); + } catch (_) { + const manifest = await this.fetchLatestManifest(); + const hash = hashManifest(manifest); + manifests = { [hash]: manifest }; + assignments = {}; + latest = { latest: hash }; + await Promise.all([ + table.write("manifests", manifests), + table.write("assignments", assignments), + table.write("latest", latest) + ]); + } + this.idle.schedule("init post-load (cleanup)", async () => { + await this.cleanupCaches(); + }); + Object.keys(manifests).forEach((hash) => { + const manifest = manifests[hash]; + if (!this.versions.has(hash)) { + this.versions.set(hash, new AppVersion(this.scope, this.adapter, this.db, this.idle, this.debugger, manifest, hash)); + } + }); + Object.keys(assignments).forEach((clientId) => { + const hash = assignments[clientId]; + if (this.versions.has(hash)) { + this.clientVersionMap.set(clientId, hash); + } else { + this.clientVersionMap.set(clientId, latest.latest); + this.debugger.log(`Unknown version ${hash} mapped for client ${clientId}, using latest instead`, `initialize: map assignments`); + } + }); + this.latestHash = latest.latest; + if (!this.versions.has(latest.latest)) { + throw new Error(`Invariant violated (initialize): latest hash ${latest.latest} has no known manifest`); + } + await Promise.all(Object.keys(manifests).map(async (hash) => { + try { + await this.scheduleInitialization(this.versions.get(hash)); + } catch (err) { + this.debugger.log(err, `initialize: schedule init of ${hash}`); + return false; + } + })); + } + lookupVersionByHash(hash, debugName = "lookupVersionByHash") { + if (!this.versions.has(hash)) { + throw new Error(`Invariant violated (${debugName}): want AppVersion for ${hash} but not loaded`); + } + return this.versions.get(hash); + } + async assignVersion(event) { + const clientId = event.resultingClientId || event.clientId; + if (clientId) { + if (this.clientVersionMap.has(clientId)) { + const hash = this.clientVersionMap.get(clientId); + let appVersion = this.lookupVersionByHash(hash, "assignVersion"); + if (this.state === DriverReadyState.NORMAL && hash !== this.latestHash && appVersion.isNavigationRequest(event.request)) { + if (this.latestHash === null) { + throw new Error(`Invariant violated (assignVersion): latestHash was null`); + } + const client = await this.scope.clients.get(clientId); + if (client) { + await this.updateClient(client); + } + appVersion = this.lookupVersionByHash(this.latestHash, "assignVersion"); + } + return appVersion; + } else { + if (this.state !== DriverReadyState.NORMAL) { + return null; + } + if (this.latestHash === null) { + throw new Error(`Invariant violated (assignVersion): latestHash was null`); + } + this.clientVersionMap.set(clientId, this.latestHash); + await this.sync(); + return this.lookupVersionByHash(this.latestHash, "assignVersion"); + } + } else { + if (this.state !== DriverReadyState.NORMAL) { + return null; + } + if (this.latestHash === null) { + throw new Error(`Invariant violated (assignVersion): latestHash was null`); + } + return this.lookupVersionByHash(this.latestHash, "assignVersion"); + } + } + async fetchLatestManifest(ignoreOfflineError = false) { + const res = await this.safeFetch(this.adapter.newRequest("ngsw.json?ngsw-cache-bust=" + Math.random())); + if (!res.ok) { + if (res.status === 404) { + await this.deleteAllCaches(); + await this.scope.registration.unregister(); + } else if ((res.status === 503 || res.status === 504) && ignoreOfflineError) { + return null; + } + throw new Error(`Manifest fetch failed! (status: ${res.status})`); + } + this.lastUpdateCheck = this.adapter.time; + return res.json(); + } + async deleteAllCaches() { + const cacheNames = await this.adapter.caches.keys(); + await Promise.all(cacheNames.map((name) => this.adapter.caches.delete(name))); + } + async scheduleInitialization(appVersion) { + const initialize = async () => { + try { + await appVersion.initializeFully(); + } catch (err) { + this.debugger.log(err, `initializeFully for ${appVersion.manifestHash}`); + await this.versionFailed(appVersion, err); + } + }; + if (this.scope.registration.scope.indexOf("://localhost") > -1) { + return initialize(); + } + this.idle.schedule(`initialization(${appVersion.manifestHash})`, initialize); + } + async versionFailed(appVersion, err) { + const broken = Array.from(this.versions.entries()).find(([hash, version]) => version === appVersion); + if (broken === void 0) { + return; + } + const brokenHash = broken[0]; + if (this.latestHash === brokenHash) { + this.state = DriverReadyState.EXISTING_CLIENTS_ONLY; + this.stateMessage = `Degraded due to: ${errorToString(err)}`; + } + } + async setupUpdate(manifest, hash) { + try { + const newVersion = new AppVersion(this.scope, this.adapter, this.db, this.idle, this.debugger, manifest, hash); + if (manifest.configVersion !== SUPPORTED_CONFIG_VERSION) { + await this.deleteAllCaches(); + await this.scope.registration.unregister(); + throw new Error(`Invalid config version: expected ${SUPPORTED_CONFIG_VERSION}, got ${manifest.configVersion}.`); + } + await newVersion.initializeFully(this); + this.versions.set(hash, newVersion); + this.latestHash = hash; + if (this.state === DriverReadyState.EXISTING_CLIENTS_ONLY) { + this.state = DriverReadyState.NORMAL; + this.stateMessage = "(nominal)"; + } + await this.sync(); + await this.notifyClientsAboutVersionReady(manifest, hash); + } catch (e) { + await this.notifyClientsAboutVersionInstallationFailed(manifest, hash, e); + throw e; + } + } + async checkForUpdate() { + let hash = "(unknown)"; + try { + const manifest = await this.fetchLatestManifest(true); + if (manifest === null) { + this.debugger.log("Check for update aborted. (Client or server offline.)"); + return false; + } + hash = hashManifest(manifest); + if (this.versions.has(hash)) { + await this.notifyClientsAboutNoNewVersionDetected(manifest, hash); + return false; + } + await this.notifyClientsAboutVersionDetected(manifest, hash); + await this.setupUpdate(manifest, hash); + return true; + } catch (err) { + this.debugger.log(err, `Error occurred while updating to manifest ${hash}`); + this.state = DriverReadyState.EXISTING_CLIENTS_ONLY; + this.stateMessage = `Degraded due to failed initialization: ${errorToString(err)}`; + return false; + } + } + async sync() { + const table = await this.controlTable; + const manifests = {}; + this.versions.forEach((version, hash) => { + manifests[hash] = version.manifest; + }); + const assignments = {}; + this.clientVersionMap.forEach((hash, clientId) => { + assignments[clientId] = hash; + }); + const latest = { + latest: this.latestHash + }; + await Promise.all([ + table.write("manifests", manifests), + table.write("assignments", assignments), + table.write("latest", latest) + ]); + } + async cleanupCaches() { + try { + const activeClients = new Set((await this.scope.clients.matchAll()).map((client) => client.id)); + const knownClients = Array.from(this.clientVersionMap.keys()); + const obsoleteClients = knownClients.filter((id) => !activeClients.has(id)); + obsoleteClients.forEach((id) => this.clientVersionMap.delete(id)); + const usedVersions = new Set(this.clientVersionMap.values()); + const obsoleteVersions = Array.from(this.versions.keys()).filter((version) => !usedVersions.has(version) && version !== this.latestHash); + obsoleteVersions.forEach((version) => this.versions.delete(version)); + await this.sync(); + const allCaches = await this.adapter.caches.keys(); + const usedCaches = new Set(await this.getCacheNames()); + const cachesToDelete = allCaches.filter((name) => !usedCaches.has(name)); + await Promise.all(cachesToDelete.map((name) => this.adapter.caches.delete(name))); + } catch (err) { + this.debugger.log(err, "cleanupCaches"); + } + } + async cleanupOldSwCaches() { + const caches = this.adapter.caches.original; + const cacheNames = await caches.keys(); + const oldSwCacheNames = cacheNames.filter((name) => /^ngsw:(?!\/)/.test(name)); + await Promise.all(oldSwCacheNames.map((name) => caches.delete(name))); + } + lookupResourceWithHash(url, hash) { + return Array.from(this.versions.values()).reduce(async (prev, version) => { + if (await prev !== null) { + return prev; + } + return version.lookupResourceWithHash(url, hash); + }, Promise.resolve(null)); + } + async lookupResourceWithoutHash(url) { + await this.initialized; + const version = this.versions.get(this.latestHash); + return version ? version.lookupResourceWithoutHash(url) : null; + } + async previouslyCachedResources() { + await this.initialized; + const version = this.versions.get(this.latestHash); + return version ? version.previouslyCachedResources() : []; + } + async recentCacheStatus(url) { + const version = this.versions.get(this.latestHash); + return version ? version.recentCacheStatus(url) : UpdateCacheStatus.NOT_CACHED; + } + mergeHashWithAppData(manifest, hash) { + return { + hash, + appData: manifest.appData + }; + } + async notifyClientsAboutUnrecoverableState(appVersion, reason) { + const broken = Array.from(this.versions.entries()).find(([hash, version]) => version === appVersion); + if (broken === void 0) { + return; + } + const brokenHash = broken[0]; + const affectedClients = Array.from(this.clientVersionMap.entries()).filter(([clientId, hash]) => hash === brokenHash).map(([clientId]) => clientId); + await Promise.all(affectedClients.map(async (clientId) => { + const client = await this.scope.clients.get(clientId); + if (client) { + client.postMessage({ type: "UNRECOVERABLE_STATE", reason }); + } + })); + } + async notifyClientsAboutVersionInstallationFailed(manifest, hash, error) { + await this.initialized; + const clients = await this.scope.clients.matchAll(); + await Promise.all(clients.map(async (client) => { + client.postMessage({ + type: "VERSION_INSTALLATION_FAILED", + version: this.mergeHashWithAppData(manifest, hash), + error: errorToString(error) + }); + })); + } + async notifyClientsAboutNoNewVersionDetected(manifest, hash) { + await this.initialized; + const clients = await this.scope.clients.matchAll(); + await Promise.all(clients.map(async (client) => { + client.postMessage({ type: "NO_NEW_VERSION_DETECTED", version: this.mergeHashWithAppData(manifest, hash) }); + })); + } + async notifyClientsAboutVersionDetected(manifest, hash) { + await this.initialized; + const clients = await this.scope.clients.matchAll(); + await Promise.all(clients.map(async (client) => { + const version = this.clientVersionMap.get(client.id); + if (version === void 0) { + return; + } + client.postMessage({ type: "VERSION_DETECTED", version: this.mergeHashWithAppData(manifest, hash) }); + })); + } + async notifyClientsAboutVersionReady(manifest, hash) { + await this.initialized; + const clients = await this.scope.clients.matchAll(); + await Promise.all(clients.map(async (client) => { + const version = this.clientVersionMap.get(client.id); + if (version === void 0) { + return; + } + if (version === this.latestHash) { + return; + } + const current = this.versions.get(version); + const notice = { + type: "VERSION_READY", + currentVersion: this.mergeHashWithAppData(current.manifest, version), + latestVersion: this.mergeHashWithAppData(manifest, hash) + }; + client.postMessage(notice); + })); + } + async broadcast(msg) { + const clients = await this.scope.clients.matchAll(); + clients.forEach((client) => { + client.postMessage(msg); + }); + } + async debugState() { + return { + state: DriverReadyState[this.state], + why: this.stateMessage, + latestHash: this.latestHash, + lastUpdateCheck: this.lastUpdateCheck + }; + } + async debugVersions() { + return Array.from(this.versions.keys()).map((hash) => { + const version = this.versions.get(hash); + const clients = Array.from(this.clientVersionMap.entries()).filter(([clientId, version2]) => version2 === hash).map(([clientId, version2]) => clientId); + return { + hash, + manifest: version.manifest, + clients, + status: "" + }; + }); + } + async debugIdleState() { + return { + queue: this.idle.taskDescriptions, + lastTrigger: this.idle.lastTrigger, + lastRun: this.idle.lastRun + }; + } + async safeFetch(req) { + try { + return await this.scope.fetch(req); + } catch (err) { + this.debugger.log(err, `Driver.fetch(${req.url})`); + return this.adapter.newResponse(null, { + status: 504, + statusText: "Gateway Timeout" + }); + } + } + async getCacheNames() { + const controlTable = await this.controlTable; + const appVersions = Array.from(this.versions.values()); + const appVersionCacheNames = await Promise.all(appVersions.map((version) => version.getCacheNames())); + return [controlTable.cacheName].concat(...appVersionCacheNames); + } + }; + + // bazel-out/k8-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/main.mjs + var scope = self; + var adapter = new Adapter(scope.registration.scope, self.caches); + new Driver(scope, adapter, new CacheDatabase(adapter)); +})(); +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ diff --git a/dist/new-rdv-app/browser/ngsw.json b/dist/new-rdv-app/browser/ngsw.json new file mode 100644 index 0000000..0edbf2d --- /dev/null +++ b/dist/new-rdv-app/browser/ngsw.json @@ -0,0 +1,117 @@ +{ + "configVersion": 1, + "timestamp": 1655977800169, + "index": "/index.html", + "assetGroups": [ + { + "name": "app", + "installMode": "prefetch", + "updateMode": "prefetch", + "cacheQueryOptions": { + "ignoreVary": true + }, + "urls": [ + "/197.c0e4561aaa90c0ab.js", + "/284.06f189de501f0514.js", + "/36.0b2af48f611a2b9c.js", + "/469.9b8970333e7ad9a6.js", + "/552.9445d6a47ea2b9ac.js", + "/642.5bacad77981cd0f1.js", + "/698.a196ca2f3e10161b.js", + "/781.f3f51c530228233b.js", + "/865.0c5ee2805ad12526.js", + "/common.8526cc0c86c704ea.js", + "/favicon.ico", + "/index.html", + "/main.ee32473261f5b934.js", + "/manifest.webmanifest", + "/polyfills.4caae9b68dd9bdc3.js", + "/runtime.6378eda0406c4cc5.js", + "/scripts.db56eda1c5eb3dbb.js", + "/styles.c31d081eb3f2dfb8.css" + ], + "patterns": [] + }, + { + "name": "assets", + "installMode": "lazy", + "updateMode": "prefetch", + "cacheQueryOptions": { + "ignoreVary": true + }, + "urls": [ + "/assets/i18n/ar.json", + "/assets/i18n/en.json", + "/assets/i18n/fr.json", + "/assets/icons/icon-128x128.png", + "/assets/icons/icon-144x144.png", + "/assets/icons/icon-152x152.png", + "/assets/icons/icon-192x192.png", + "/assets/icons/icon-384x384.png", + "/assets/icons/icon-512x512.png", + "/assets/icons/icon-72x72.png", + "/assets/icons/icon-96x96.png", + "/assets/rendezvous-icon.svg", + "/assets/unknown-profile-picture.jpg", + "/flags.f73aa829a0084837.png", + "/flags@2x.2704c069d12ee746.png" + ], + "patterns": [] + } + ], + "dataGroups": [], + "hashTable": { + "/197.c0e4561aaa90c0ab.js": "0572e2307ae74c3c2b7da895ed5411cabcbab49e", + "/284.06f189de501f0514.js": "f3002cfcbf682fc6fdd73700860c3cf27a7a802b", + "/36.0b2af48f611a2b9c.js": "5ae5662e2dfb5f4d934b8095355d590bef85b575", + "/469.9b8970333e7ad9a6.js": "185c16a523aceb80210c61df935c29b35967a58b", + "/552.9445d6a47ea2b9ac.js": "14018d1438d43c313d20fe11aed91627f66da14e", + "/642.5bacad77981cd0f1.js": "8f693bc4b76c506203f316642a5add4f228b62e6", + "/698.a196ca2f3e10161b.js": "99c3a08290b8d42632f3b87494a513a40a289e51", + "/781.f3f51c530228233b.js": "829bdbbd699963ffbe23b1aba9aa964ccc28de32", + "/865.0c5ee2805ad12526.js": "6543487e821eef44ef2ffc9856d56d25c7b6e970", + "/assets/i18n/ar.json": "df36cc5c21ac88f53d7e27c2acfc82052d974f1e", + "/assets/i18n/en.json": "cd82c6fac079578bcc4f10f8030ef6c95c8de174", + "/assets/i18n/fr.json": "f73136fca8e2bba91ac547d159834cf4be358494", + "/assets/icons/icon-128x128.png": "dae3b6ed49bdaf4327b92531d4b5b4a5d30c7532", + "/assets/icons/icon-144x144.png": "b0bd89982e08f9bd2b642928f5391915b74799a7", + "/assets/icons/icon-152x152.png": "7479a9477815dfd9668d60f8b3b2fba709b91310", + "/assets/icons/icon-192x192.png": "1abd80d431a237a853ce38147d8c63752f10933b", + "/assets/icons/icon-384x384.png": "329749cd6393768d3131ed6304c136b1ca05f2fd", + "/assets/icons/icon-512x512.png": "559d9c4318b45a1f2b10596bbb4c960fe521dbcc", + "/assets/icons/icon-72x72.png": "c457e56089a36952cd67156f9996bc4ce54a5ed9", + "/assets/icons/icon-96x96.png": "3914125a4b445bf111c5627875fc190f560daa41", + "/assets/rendezvous-icon.svg": "98f99d18e06a0aa540b03c659ee65ca9e683f67b", + "/assets/unknown-profile-picture.jpg": "1c7abe3f7b2474275db66ba1e2ae70c504bcce37", + "/common.8526cc0c86c704ea.js": "e2f1c9b607567ac87876af41addef4dc5c17722d", + "/favicon.ico": "22f6a4a3bcaafafb0254e0f2fa4ceb89e505e8b2", + "/flags.f73aa829a0084837.png": "21572c9751e5a3dc20395befa0fcb349c32c4811", + "/flags@2x.2704c069d12ee746.png": "d6f843711c3cfe6d9a037e4c61d293f563e55802", + "/index.html": "f79ddb31f39c5edd77f7dc5aa5482af949fd6284", + "/main.ee32473261f5b934.js": "c28fbe8c69f333b0c78854d5156a8c0999c3cae9", + "/manifest.webmanifest": "6e92940ddd3929a35e9970d996b37d992b4f1050", + "/polyfills.4caae9b68dd9bdc3.js": "8897a161a924ba3c6e866699ac2ef3028d53bce1", + "/runtime.6378eda0406c4cc5.js": "5c098fbbb3eecded21ec3c0dad49d65ce5402aed", + "/scripts.db56eda1c5eb3dbb.js": "22589b1a08e79316c4d12c97775570a95bbae824", + "/styles.c31d081eb3f2dfb8.css": "a7ddf83db29aac81ad52673233432e3873aee565" + }, + "navigationUrls": [ + { + "positive": true, + "regex": "^\\/.*$" + }, + { + "positive": false, + "regex": "^\\/(?:.+\\/)?[^/]*\\.[^/]*$" + }, + { + "positive": false, + "regex": "^\\/(?:.+\\/)?[^/]*__[^/]*$" + }, + { + "positive": false, + "regex": "^\\/(?:.+\\/)?[^/]*__[^/]*\\/.*$" + } + ], + "navigationRequestStrategy": "performance" +} \ No newline at end of file diff --git a/dist/new-rdv-app/browser/polyfills.4caae9b68dd9bdc3.js b/dist/new-rdv-app/browser/polyfills.4caae9b68dd9bdc3.js new file mode 100644 index 0000000..5bc11fe --- /dev/null +++ b/dist/new-rdv-app/browser/polyfills.4caae9b68dd9bdc3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknew_rdv_app=self.webpackChunknew_rdv_app||[]).push([[429],{7435:(we,ue,he)=>{he(8583)},8583:()=>{!function(e){const n=e.performance;function i(I){n&&n.mark&&n.mark(I)}function r(I,p){n&&n.measure&&n.measure(I,p)}i("Zone");const c=e.__Zone_symbol_prefix||"__zone_symbol__";function u(I){return c+I}const f=!0===e[u("forceDuplicateZoneCheck")];if(e.Zone){if(f||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}let _=(()=>{class I{constructor(t,o){this._parent=t,this._name=o?o.name||"unnamed":"",this._properties=o&&o.properties||{},this._zoneDelegate=new T(this,this._parent&&this._parent._zoneDelegate,o)}static assertZonePatched(){if(e.Promise!==J.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=I.current;for(;t.parent;)t=t.parent;return t}static get current(){return G.zone}static get currentTask(){return te}static __load_patch(t,o,y=!1){if(J.hasOwnProperty(t)){if(!y&&f)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const P="Zone:"+t;i(P),J[t]=o(e,I,le),r(P,P)}}get parent(){return this._parent}get name(){return this._name}get(t){const o=this.getZoneWith(t);if(o)return o._properties[t]}getZoneWith(t){let o=this;for(;o;){if(o._properties.hasOwnProperty(t))return o;o=o._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,o){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const y=this._zoneDelegate.intercept(this,t,o),P=this;return function(){return P.runGuarded(y,this,arguments,o)}}run(t,o,y,P){G={parent:G,zone:this};try{return this._zoneDelegate.invoke(this,t,o,y,P)}finally{G=G.parent}}runGuarded(t,o=null,y,P){G={parent:G,zone:this};try{try{return this._zoneDelegate.invoke(this,t,o,y,P)}catch(K){if(this._zoneDelegate.handleError(this,K))throw K}}finally{G=G.parent}}runTask(t,o,y){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||z).name+"; Execution: "+this.name+")");if(t.state===j&&(t.type===R||t.type===M))return;const P=t.state!=X;P&&t._transitionTo(X,O),t.runCount++;const K=te;te=t,G={parent:G,zone:this};try{t.type==M&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,o,y)}catch(l){if(this._zoneDelegate.handleError(this,l))throw l}}finally{t.state!==j&&t.state!==Y&&(t.type==R||t.data&&t.data.isPeriodic?P&&t._transitionTo(O,X):(t.runCount=0,this._updateTaskCount(t,-1),P&&t._transitionTo(j,X,j))),G=G.parent,te=K}}scheduleTask(t){if(t.zone&&t.zone!==this){let y=this;for(;y;){if(y===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);y=y.parent}}t._transitionTo(q,j);const o=[];t._zoneDelegates=o,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(y){throw t._transitionTo(Y,q,j),this._zoneDelegate.handleError(this,y),y}return t._zoneDelegates===o&&this._updateTaskCount(t,1),t.state==q&&t._transitionTo(O,q),t}scheduleMicroTask(t,o,y,P){return this.scheduleTask(new m(v,t,o,y,P,void 0))}scheduleMacroTask(t,o,y,P,K){return this.scheduleTask(new m(M,t,o,y,P,K))}scheduleEventTask(t,o,y,P,K){return this.scheduleTask(new m(R,t,o,y,P,K))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||z).name+"; Execution: "+this.name+")");t._transitionTo(A,O,X);try{this._zoneDelegate.cancelTask(this,t)}catch(o){throw t._transitionTo(Y,A),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(t,-1),t._transitionTo(j,A),t.runCount=0,t}_updateTaskCount(t,o){const y=t._zoneDelegates;-1==o&&(t._zoneDelegates=null);for(let P=0;PI.hasTask(t,o),onScheduleTask:(I,p,t,o)=>I.scheduleTask(t,o),onInvokeTask:(I,p,t,o,y,P)=>I.invokeTask(t,o,y,P),onCancelTask:(I,p,t,o)=>I.cancelTask(t,o)};class T{constructor(p,t,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=p,this._parentDelegate=t,this._forkZS=o&&(o&&o.onFork?o:t._forkZS),this._forkDlgt=o&&(o.onFork?t:t._forkDlgt),this._forkCurrZone=o&&(o.onFork?this.zone:t._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:t._interceptZS),this._interceptDlgt=o&&(o.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:t._invokeZS),this._invokeDlgt=o&&(o.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:t._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:t._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:t._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:t._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const y=o&&o.onHasTask;(y||t&&t._hasTaskZS)&&(this._hasTaskZS=y?o:g,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=p,o.onScheduleTask||(this._scheduleTaskZS=g,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),o.onInvokeTask||(this._invokeTaskZS=g,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),o.onCancelTask||(this._cancelTaskZS=g,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(p,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,p,t):new _(p,t)}intercept(p,t,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,p,t,o):t}invoke(p,t,o,y,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,p,t,o,y,P):t.apply(o,y)}handleError(p,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,p,t)}scheduleTask(p,t){let o=t;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,p,t),o||(o=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=v)throw new Error("Task is missing scheduleFn.");d(t)}return o}invokeTask(p,t,o,y){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,p,t,o,y):t.callback.apply(o,y)}cancelTask(p,t){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,p,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");o=t.cancelFn(t)}return o}hasTask(p,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,p,t)}catch(o){this.handleError(p,o)}}_updateTaskCount(p,t){const o=this._taskCounts,y=o[p],P=o[p]=y+t;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=y&&0!=P||this.hasTask(this.zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:p})}}class m{constructor(p,t,o,y,P,K){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=p,this.source=t,this.data=y,this.scheduleFn=P,this.cancelFn=K,!o)throw new Error("callback is not defined");this.callback=o;const l=this;this.invoke=p===R&&y&&y.useG?m.invokeTask:function(){return m.invokeTask.call(e,l,this,arguments)}}static invokeTask(p,t,o){p||(p=this),re++;try{return p.runCount++,p.zone.runTask(p,t,o)}finally{1==re&&L(),re--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(j,q)}_transitionTo(p,t,o){if(this._state!==t&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${p}', expecting state '${t}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=p,p==j&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const S=u("setTimeout"),D=u("Promise"),Z=u("then");let E,B=[],V=!1;function d(I){if(0===re&&0===B.length)if(E||e[D]&&(E=e[D].resolve(0)),E){let p=E[Z];p||(p=E.then),p.call(E,L)}else e[S](L,0);I&&B.push(I)}function L(){if(!V){for(V=!0;B.length;){const I=B;B=[];for(let p=0;pG,onUnhandledError:F,microtaskDrainDone:F,scheduleMicroTask:d,showUncaughtError:()=>!_[u("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:F,patchMethod:()=>F,bindArguments:()=>[],patchThen:()=>F,patchMacroTask:()=>F,patchEventPrototype:()=>F,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>F,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>F,wrapWithCurrentZone:()=>F,filterProperties:()=>[],attachOriginToPatched:()=>F,_redefineProperty:()=>F,patchCallbacks:()=>F};let G={parent:null,zone:new _(null,null)},te=null,re=0;function F(){}r("Zone","Zone"),e.Zone=_}(typeof window<"u"&&window||typeof self<"u"&&self||global);const ue=Object.getOwnPropertyDescriptor,he=Object.defineProperty,de=Object.getPrototypeOf,Be=Object.create,ut=Array.prototype.slice,Se="addEventListener",Oe="removeEventListener",Ze=Zone.__symbol__(Se),Ie=Zone.__symbol__(Oe),se="true",ie="false",ke=Zone.__symbol__("");function Le(e,n){return Zone.current.wrap(e,n)}function Me(e,n,i,r,c){return Zone.current.scheduleMacroTask(e,n,i,r,c)}const x=Zone.__symbol__,Pe=typeof window<"u",pe=Pe?window:void 0,$=Pe&&pe||"object"==typeof self&&self||global,ht=[null];function Ae(e,n){for(let i=e.length-1;i>=0;i--)"function"==typeof e[i]&&(e[i]=Le(e[i],n+"_"+i));return e}function Fe(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const Ue=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Re=!("nw"in $)&&typeof $.process<"u"&&"[object process]"==={}.toString.call($.process),je=!Re&&!Ue&&!(!Pe||!pe.HTMLElement),We=typeof $.process<"u"&&"[object process]"==={}.toString.call($.process)&&!Ue&&!(!Pe||!pe.HTMLElement),Ce={},qe=function(e){if(!(e=e||$.event))return;let n=Ce[e.type];n||(n=Ce[e.type]=x("ON_PROPERTY"+e.type));const i=this||e.target||$,r=i[n];let c;if(je&&i===pe&&"error"===e.type){const u=e;c=r&&r.call(this,u.message,u.filename,u.lineno,u.colno,u.error),!0===c&&e.preventDefault()}else c=r&&r.apply(this,arguments),null!=c&&!c&&e.preventDefault();return c};function Xe(e,n,i){let r=ue(e,n);if(!r&&i&&ue(i,n)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;const c=x("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete r.writable,delete r.value;const u=r.get,f=r.set,_=n.substr(2);let g=Ce[_];g||(g=Ce[_]=x("ON_PROPERTY"+_)),r.set=function(T){let m=this;!m&&e===$&&(m=$),m&&(m[g]&&m.removeEventListener(_,qe),f&&f.apply(m,ht),"function"==typeof T?(m[g]=T,m.addEventListener(_,qe,!1)):m[g]=null)},r.get=function(){let T=this;if(!T&&e===$&&(T=$),!T)return null;const m=T[g];if(m)return m;if(u){let S=u&&u.call(this);if(S)return r.set.call(this,S),"function"==typeof T.removeAttribute&&T.removeAttribute(n),S}return null},he(e,n,r),e[c]=!0}function Ye(e,n,i){if(n)for(let r=0;rfunction(f,_){const g=i(f,_);return g.cbIdx>=0&&"function"==typeof _[g.cbIdx]?Me(g.name,_[g.cbIdx],g,c):u.apply(f,_)})}function ae(e,n){e[x("OriginalDelegate")]=n}let $e=!1,He=!1;function mt(){if($e)return He;$e=!0;try{const e=pe.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(He=!0)}catch{}return He}Zone.__load_patch("ZoneAwarePromise",(e,n,i)=>{const r=Object.getOwnPropertyDescriptor,c=Object.defineProperty,f=i.symbol,_=[],g=!0===e[f("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],T=f("Promise"),m=f("then");i.onUnhandledError=l=>{if(i.showUncaughtError()){const s=l&&l.rejection;s?console.error("Unhandled Promise rejection:",s instanceof Error?s.message:s,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",s,s instanceof Error?s.stack:void 0):console.error(l)}},i.microtaskDrainDone=()=>{for(;_.length;){const l=_.shift();try{l.zone.runGuarded(()=>{throw l.throwOriginal?l.rejection:l})}catch(s){Z(s)}}};const D=f("unhandledPromiseRejectionHandler");function Z(l){i.onUnhandledError(l);try{const s=n[D];"function"==typeof s&&s.call(this,l)}catch{}}function B(l){return l&&l.then}function V(l){return l}function E(l){return t.reject(l)}const d=f("state"),L=f("value"),z=f("finally"),j=f("parentPromiseValue"),q=f("parentPromiseState"),X=null,A=!0,Y=!1;function M(l,s){return a=>{try{G(l,s,a)}catch(h){G(l,!1,h)}}}const le=f("currentTaskTrace");function G(l,s,a){const h=function(){let l=!1;return function(a){return function(){l||(l=!0,a.apply(null,arguments))}}}();if(l===a)throw new TypeError("Promise resolved with itself");if(l[d]===X){let w=null;try{("object"==typeof a||"function"==typeof a)&&(w=a&&a.then)}catch(C){return h(()=>{G(l,!1,C)})(),l}if(s!==Y&&a instanceof t&&a.hasOwnProperty(d)&&a.hasOwnProperty(L)&&a[d]!==X)re(a),G(l,a[d],a[L]);else if(s!==Y&&"function"==typeof w)try{w.call(a,h(M(l,s)),h(M(l,!1)))}catch(C){h(()=>{G(l,!1,C)})()}else{l[d]=s;const C=l[L];if(l[L]=a,l[z]===z&&s===A&&(l[d]=l[q],l[L]=l[j]),s===Y&&a instanceof Error){const k=n.currentTask&&n.currentTask.data&&n.currentTask.data.__creationTrace__;k&&c(a,le,{configurable:!0,enumerable:!1,writable:!0,value:k})}for(let k=0;k{try{const b=l[L],N=!!a&&z===a[z];N&&(a[j]=b,a[q]=C);const H=s.run(k,void 0,N&&k!==E&&k!==V?[]:[b]);G(a,!0,H)}catch(b){G(a,!1,b)}},a)}const p=function(){};class t{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(s){return G(new this(null),A,s)}static reject(s){return G(new this(null),Y,s)}static race(s){let a,h,w=new this((b,N)=>{a=b,h=N});function C(b){a(b)}function k(b){h(b)}for(let b of s)B(b)||(b=this.resolve(b)),b.then(C,k);return w}static all(s){return t.allWithCallback(s)}static allSettled(s){return(this&&this.prototype instanceof t?this:t).allWithCallback(s,{thenCallback:h=>({status:"fulfilled",value:h}),errorCallback:h=>({status:"rejected",reason:h})})}static allWithCallback(s,a){let h,w,C=new this((H,U)=>{h=H,w=U}),k=2,b=0;const N=[];for(let H of s){B(H)||(H=this.resolve(H));const U=b;try{H.then(Q=>{N[U]=a?a.thenCallback(Q):Q,k--,0===k&&h(N)},Q=>{a?(N[U]=a.errorCallback(Q),k--,0===k&&h(N)):w(Q)})}catch(Q){w(Q)}k++,b++}return k-=2,0===k&&h(N),C}constructor(s){const a=this;if(!(a instanceof t))throw new Error("Must be an instanceof Promise.");a[d]=X,a[L]=[];try{s&&s(M(a,A),M(a,Y))}catch(h){G(a,!1,h)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return t}then(s,a){let h=this.constructor[Symbol.species];(!h||"function"!=typeof h)&&(h=this.constructor||t);const w=new h(p),C=n.current;return this[d]==X?this[L].push(C,w,s,a):F(this,C,w,s,a),w}catch(s){return this.then(null,s)}finally(s){let a=this.constructor[Symbol.species];(!a||"function"!=typeof a)&&(a=t);const h=new a(p);h[z]=z;const w=n.current;return this[d]==X?this[L].push(w,h,s,s):F(this,w,h,s,s),h}}t.resolve=t.resolve,t.reject=t.reject,t.race=t.race,t.all=t.all;const o=e[T]=e.Promise;e.Promise=t;const y=f("thenPatched");function P(l){const s=l.prototype,a=r(s,"then");if(a&&(!1===a.writable||!a.configurable))return;const h=s.then;s[m]=h,l.prototype.then=function(w,C){return new t((b,N)=>{h.call(this,b,N)}).then(w,C)},l[y]=!0}return i.patchThen=P,o&&(P(o),ce(e,"fetch",l=>function K(l){return function(s,a){let h=l.apply(s,a);if(h instanceof t)return h;let w=h.constructor;return w[y]||P(w),h}}(l))),Promise[n.__symbol__("uncaughtPromiseErrors")]=_,t}),Zone.__load_patch("toString",e=>{const n=Function.prototype.toString,i=x("OriginalDelegate"),r=x("Promise"),c=x("Error"),u=function(){if("function"==typeof this){const T=this[i];if(T)return"function"==typeof T?n.call(T):Object.prototype.toString.call(T);if(this===Promise){const m=e[r];if(m)return n.call(m)}if(this===Error){const m=e[c];if(m)return n.call(m)}}return n.call(this)};u[i]=n,Function.prototype.toString=u;const f=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":f.call(this)}});let me=!1;if(typeof window<"u")try{const e=Object.defineProperty({},"passive",{get:function(){me=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{me=!1}const Et={useG:!0},ee={},Ke={},Je=new RegExp("^"+ke+"(\\w+)(true|false)$"),xe=x("propagationStopped");function Qe(e,n){const i=(n?n(e):e)+ie,r=(n?n(e):e)+se,c=ke+i,u=ke+r;ee[e]={},ee[e][ie]=c,ee[e][se]=u}function Tt(e,n,i){const r=i&&i.add||Se,c=i&&i.rm||Oe,u=i&&i.listeners||"eventListeners",f=i&&i.rmAll||"removeAllListeners",_=x(r),g="."+r+":",S=function(E,d,L){if(E.isRemoved)return;const z=E.callback;"object"==typeof z&&z.handleEvent&&(E.callback=q=>z.handleEvent(q),E.originalDelegate=z),E.invoke(E,d,[L]);const j=E.options;j&&"object"==typeof j&&j.once&&d[c].call(d,L.type,E.originalDelegate?E.originalDelegate:E.callback,j)},D=function(E){if(!(E=E||e.event))return;const d=this||E.target||e,L=d[ee[E.type][ie]];if(L)if(1===L.length)S(L[0],d,E);else{const z=L.slice();for(let j=0;jfunction(c,u){c[xe]=!0,r&&r.apply(c,u)})}function gt(e,n,i,r,c){const u=Zone.__symbol__(r);if(n[u])return;const f=n[u]=n[r];n[r]=function(_,g,T){return g&&g.prototype&&c.forEach(function(m){const S=`${i}.${r}::`+m,D=g.prototype;if(D.hasOwnProperty(m)){const Z=e.ObjectGetOwnPropertyDescriptor(D,m);Z&&Z.value?(Z.value=e.wrapWithCurrentZone(Z.value,S),e._redefineProperty(g.prototype,m,Z)):D[m]&&(D[m]=e.wrapWithCurrentZone(D[m],S))}else D[m]&&(D[m]=e.wrapWithCurrentZone(D[m],S))}),f.call(n,_,g,T)},e.attachOriginToPatched(n[r],f)}const Ve=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],wt=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],tt=["load"],nt=["blur","error","focus","load","resize","scroll","messageerror"],Dt=["bounce","finish","start"],rt=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Ee=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],St=["close","error","open","message"],Ot=["error","message"],Te=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Ve,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function ot(e,n,i){if(!i||0===i.length)return n;const r=i.filter(u=>u.target===e);if(!r||0===r.length)return n;const c=r[0].ignoreProperties;return n.filter(u=>-1===c.indexOf(u))}function W(e,n,i,r){e&&Ye(e,ot(e,n,i),r)}Zone.__load_patch("util",(e,n,i)=>{i.patchOnProperties=Ye,i.patchMethod=ce,i.bindArguments=Ae,i.patchMacroTask=_t;const r=n.__symbol__("BLACK_LISTED_EVENTS"),c=n.__symbol__("UNPATCHED_EVENTS");e[c]&&(e[r]=e[c]),e[r]&&(n[r]=n[c]=e[r]),i.patchEventPrototype=yt,i.patchEventTarget=Tt,i.isIEOrEdge=mt,i.ObjectDefineProperty=he,i.ObjectGetOwnPropertyDescriptor=ue,i.ObjectCreate=Be,i.ArraySlice=ut,i.patchClass=ve,i.wrapWithCurrentZone=Le,i.filterProperties=ot,i.attachOriginToPatched=ae,i._redefineProperty=Object.defineProperty,i.patchCallbacks=gt,i.getGlobalObjects=()=>({globalSources:Ke,zoneSymbolEventNames:ee,eventNames:Te,isBrowser:je,isMix:We,isNode:Re,TRUE_STR:se,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:ke,ADD_EVENT_LISTENER_STR:Se,REMOVE_EVENT_LISTENER_STR:Oe})});const Ne=x("zoneTask");function ye(e,n,i,r){let c=null,u=null;i+=r;const f={};function _(T){const m=T.data;return m.args[0]=function(){return T.invoke.apply(this,arguments)},m.handleId=c.apply(e,m.args),T}function g(T){return u.call(e,T.data.handleId)}c=ce(e,n+=r,T=>function(m,S){if("function"==typeof S[0]){const D={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?S[1]||0:void 0,args:S},Z=S[0];S[0]=function(){try{return Z.apply(this,arguments)}finally{D.isPeriodic||("number"==typeof D.handleId?delete f[D.handleId]:D.handleId&&(D.handleId[Ne]=null))}};const B=Me(n,S[0],D,_,g);if(!B)return B;const V=B.data.handleId;return"number"==typeof V?f[V]=B:V&&(V[Ne]=B),V&&V.ref&&V.unref&&"function"==typeof V.ref&&"function"==typeof V.unref&&(B.ref=V.ref.bind(V),B.unref=V.unref.bind(V)),"number"==typeof V||V?V:B}return T.apply(e,S)}),u=ce(e,i,T=>function(m,S){const D=S[0];let Z;"number"==typeof D?Z=f[D]:(Z=D&&D[Ne],Z||(Z=D)),Z&&"string"==typeof Z.type?"notScheduled"!==Z.state&&(Z.cancelFn&&Z.data.isPeriodic||0===Z.runCount)&&("number"==typeof D?delete f[D]:D&&(D[Ne]=null),Z.zone.cancelTask(Z)):T.apply(e,S)})}Zone.__load_patch("legacy",e=>{const n=e[Zone.__symbol__("legacyPatch")];n&&n()}),Zone.__load_patch("queueMicrotask",(e,n,i)=>{i.patchMethod(e,"queueMicrotask",r=>function(c,u){n.current.scheduleMicroTask("queueMicrotask",u[0])})}),Zone.__load_patch("timers",e=>{const n="set",i="clear";ye(e,n,i,"Timeout"),ye(e,n,i,"Interval"),ye(e,n,i,"Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{ye(e,"request","cancel","AnimationFrame"),ye(e,"mozRequest","mozCancel","AnimationFrame"),ye(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,n)=>{const i=["alert","prompt","confirm"];for(let r=0;rfunction(g,T){return n.current.run(u,e,T,_)})}),Zone.__load_patch("EventTarget",(e,n,i)=>{(function Mt(e,n){n.patchEventPrototype(e,n)})(e,i),function Lt(e,n){if(Zone[n.symbol("patchEventTarget")])return;const{eventNames:i,zoneSymbolEventNames:r,TRUE_STR:c,FALSE_STR:u,ZONE_SYMBOL_PREFIX:f}=n.getGlobalObjects();for(let g=0;g{ve("MutationObserver"),ve("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(e,n,i)=>{ve("IntersectionObserver")}),Zone.__load_patch("FileReader",(e,n,i)=>{ve("FileReader")}),Zone.__load_patch("on_property",(e,n,i)=>{!function Zt(e,n){if(Re&&!We||Zone[e.symbol("patchEvents")])return;const i=typeof WebSocket<"u",r=n.__Zone_ignore_on_properties;if(je){const f=window,_=function pt(){try{const e=pe.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:f,ignoreProperties:["error"]}]:[];W(f,Te.concat(["messageerror"]),r&&r.concat(_),de(f)),W(Document.prototype,Te,r),typeof f.SVGElement<"u"&&W(f.SVGElement.prototype,Te,r),W(Element.prototype,Te,r),W(HTMLElement.prototype,Te,r),W(HTMLMediaElement.prototype,wt,r),W(HTMLFrameSetElement.prototype,Ve.concat(nt),r),W(HTMLBodyElement.prototype,Ve.concat(nt),r),W(HTMLFrameElement.prototype,tt,r),W(HTMLIFrameElement.prototype,tt,r);const g=f.HTMLMarqueeElement;g&&W(g.prototype,Dt,r);const T=f.Worker;T&&W(T.prototype,Ot,r)}const c=n.XMLHttpRequest;c&&W(c.prototype,rt,r);const u=n.XMLHttpRequestEventTarget;u&&W(u&&u.prototype,rt,r),typeof IDBIndex<"u"&&(W(IDBIndex.prototype,Ee,r),W(IDBRequest.prototype,Ee,r),W(IDBOpenDBRequest.prototype,Ee,r),W(IDBDatabase.prototype,Ee,r),W(IDBTransaction.prototype,Ee,r),W(IDBCursor.prototype,Ee,r)),i&&W(WebSocket.prototype,St,r)}(i,e)}),Zone.__load_patch("customElements",(e,n,i)=>{!function It(e,n){const{isBrowser:i,isMix:r}=n.getGlobalObjects();(i||r)&&e.customElements&&"customElements"in e&&n.patchCallbacks(n,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,i)}),Zone.__load_patch("XHR",(e,n)=>{!function g(T){const m=T.XMLHttpRequest;if(!m)return;const S=m.prototype;let Z=S[Ze],B=S[Ie];if(!Z){const v=T.XMLHttpRequestEventTarget;if(v){const M=v.prototype;Z=M[Ze],B=M[Ie]}}const V="readystatechange",E="scheduled";function d(v){const M=v.data,R=M.target;R[u]=!1,R[_]=!1;const J=R[c];Z||(Z=R[Ze],B=R[Ie]),J&&B.call(R,V,J);const le=R[c]=()=>{if(R.readyState===R.DONE)if(!M.aborted&&R[u]&&v.state===E){const te=R[n.__symbol__("loadfalse")];if(0!==R.status&&te&&te.length>0){const re=v.invoke;v.invoke=function(){const F=R[n.__symbol__("loadfalse")];for(let I=0;Ifunction(v,M){return v[r]=0==M[2],v[f]=M[1],j.apply(v,M)}),O=x("fetchTaskAborting"),X=x("fetchTaskScheduling"),A=ce(S,"send",()=>function(v,M){if(!0===n.current[X]||v[r])return A.apply(v,M);{const R={target:v,url:v[f],isPeriodic:!1,args:M,aborted:!1},J=Me("XMLHttpRequest.send",L,R,d,z);v&&!0===v[_]&&!R.aborted&&J.state===E&&J.invoke()}}),Y=ce(S,"abort",()=>function(v,M){const R=function D(v){return v[i]}(v);if(R&&"string"==typeof R.type){if(null==R.cancelFn||R.data&&R.data.aborted)return;R.zone.cancelTask(R)}else if(!0===n.current[O])return Y.apply(v,M)})}(e);const i=x("xhrTask"),r=x("xhrSync"),c=x("xhrListener"),u=x("xhrScheduled"),f=x("xhrURL"),_=x("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&function dt(e,n){const i=e.constructor.name;for(let r=0;r{const g=function(){return _.apply(this,Ae(arguments,i+"."+c))};return ae(g,_),g})(u)}}}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,n)=>{function i(r){return function(c){et(e,r).forEach(f=>{const _=e.PromiseRejectionEvent;if(_){const g=new _(r,{promise:c.promise,reason:c.rejection});f.invoke(g)}})}}e.PromiseRejectionEvent&&(n[x("unhandledPromiseRejectionHandler")]=i("unhandledrejection"),n[x("rejectionHandledHandler")]=i("rejectionhandled"))})}},we=>{we(we.s=7435)}]); \ No newline at end of file diff --git a/dist/new-rdv-app/browser/runtime.6378eda0406c4cc5.js b/dist/new-rdv-app/browser/runtime.6378eda0406c4cc5.js new file mode 100644 index 0000000..0641e34 --- /dev/null +++ b/dist/new-rdv-app/browser/runtime.6378eda0406c4cc5.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,v={},m={};function r(e){var n=m[e];if(void 0!==n)return n.exports;var t=m[e]={id:e,loaded:!1,exports:{}};return v[e](t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(n,t,i,o)=>{if(!t){var a=1/0;for(f=0;f=o)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(l=!1,o0&&e[f-1][2]>o;f--)e[f]=e[f-1];e[f]=[t,i,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(592===e?"common":e)+"."+{36:"0b2af48f611a2b9c",197:"c0e4561aaa90c0ab",284:"06f189de501f0514",469:"9b8970333e7ad9a6",552:"9445d6a47ea2b9ac",592:"8526cc0c86c704ea",642:"5bacad77981cd0f1",698:"a196ca2f3e10161b",781:"f3f51c530228233b",865:"0c5ee2805ad12526"}[e]+".js",r.miniCssF=e=>{},r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="new-rdv-app:";r.l=(t,i,o,f)=>{if(e[t])e[t].push(i);else{var a,l;if(void 0!==o)for(var d=document.getElementsByTagName("script"),s=0;s{a.onerror=a.onload=null,clearTimeout(p);var _=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),_&&_.forEach(h=>h(b)),g)return g(b)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(i,o)=>{var f=r.o(e,i)?e[i]:void 0;if(0!==f)if(f)o.push(f[2]);else if(666!=i){var a=new Promise((u,c)=>f=e[i]=[u,c]);o.push(f[2]=a);var l=r.p+r.u(i),d=new Error;r.l(l,u=>{if(r.o(e,i)&&(0!==(f=e[i])&&(e[i]=void 0),f)){var c=u&&("load"===u.type?"missing":u.type),p=u&&u.target&&u.target.src;d.message="Loading chunk "+i+" failed.\n("+c+": "+p+")",d.name="ChunkLoadError",d.type=c,d.request=p,f[1](d)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var n=(i,o)=>{var d,s,[f,a,l]=o,u=0;if(f.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(l)var c=l(r)}for(i&&i(o);u { + self.skipWaiting(); +}); + +self.addEventListener('activate', event => { + event.waitUntil(self.clients.claim()); + + event.waitUntil(self.registration.unregister().then(() => { + console.log('NGSW Safety Worker - unregistered old service worker'); + })); + + event.waitUntil(caches.keys().then(cacheNames => { + const ngswCacheNames = cacheNames.filter(name => /^ngsw:/.test(name)); + return Promise.all(ngswCacheNames.map(name => caches.delete(name))); + })); +}); diff --git a/dist/new-rdv-app/browser/scripts.db56eda1c5eb3dbb.js b/dist/new-rdv-app/browser/scripts.db56eda1c5eb3dbb.js new file mode 100644 index 0000000..f6ca9b4 --- /dev/null +++ b/dist/new-rdv-app/browser/scripts.db56eda1c5eb3dbb.js @@ -0,0 +1 @@ +!function(l,ae){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=l.document?ae(l,!0):function(se){if(!se.document)throw new Error("jQuery requires a window with a document");return ae(se)}:ae(l)}(typeof window<"u"?window:this,function(l,ae){"use strict";var se=[],b=Object.getPrototypeOf,Y=se.slice,M=se.flat?function(e){return se.flat.call(e)}:function(e){return se.concat.apply([],e)},B=se.push,z=se.indexOf,j={},v=j.toString,k=j.hasOwnProperty,D=k.toString,H=D.call(Object),P={},T=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},G=function(e){return null!=e&&e===e.window},X=l.document,L={type:!0,src:!0,nonce:!0,noModule:!0};function S(e,n,a){var o,p,w=(a=a||X).createElement("script");if(w.text=e,n)for(o in L)(p=n[o]||n.getAttribute&&n.getAttribute(o))&&w.setAttribute(o,p);a.head.appendChild(w).parentNode.removeChild(w)}function d(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?j[v.call(e)]||"object":typeof e}var u="3.6.0",r=function(e,n){return new r.fn.init(e,n)};function m(e){var n=!!e&&"length"in e&&e.length,a=d(e);return!T(e)&&!G(e)&&("array"===a||0===n||"number"==typeof n&&0+~]|"+at+")"+at+"*"),Pr=new RegExp(at+"|>"),jr=new RegExp(cn),zr=new RegExp("^"+It+"$"),hr={ID:new RegExp("^#("+It+")"),CLASS:new RegExp("^\\.("+It+")"),TAG:new RegExp("^("+It+"|[*])"),ATTR:new RegExp("^"+Xt),PSEUDO:new RegExp("^"+cn),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+at+"*(even|odd|(([+-]|)(\\d*)n|)"+at+"*(?:([+-]|)"+at+"*(\\d+)|))"+at+"*\\)|)","i"),bool:new RegExp("^(?:"+In+")$","i"),needsContext:new RegExp("^"+at+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+at+"*((?:-\\d)?\\d*)"+at+"*\\)|)(?=[^-]|$)","i")},Mr=/HTML$/i,Hr=/^(?:input|select|textarea|button)$/i,Ur=/^h\d$/i,ar=/^[^{]+\{\s*\[native \w/,Wr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Sr=/[+~]/,Dn=new RegExp("\\\\[\\da-fA-F]{1,6}"+at+"?|\\\\([^\\r\\n\\f])","g"),An=function(R,V){var te="0x"+R.slice(1)-65536;return V||(te<0?String.fromCharCode(te+65536):String.fromCharCode(te>>10|55296,1023&te|56320))},Ar=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,kr=function(R,V){return V?"\0"===R?"\ufffd":R.slice(0,-1)+"\\"+R.charCodeAt(R.length-1).toString(16)+" ":"\\"+R},Er=function(){re()},Zr=vr(function(R){return!0===R.disabled&&"fieldset"===R.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{jt.apply(ln=fn.call($e.childNodes),$e.childNodes)}catch{jt={apply:ln.length?function(V,te){gn.apply(V,fn.call(te))}:function(V,te){for(var ye=V.length,oe=0;V[ye++]=te[oe++];);V.length=ye-1}}}function Ft(R,V,te,ye){var oe,Ie,Fe,Re,Ue,rt,et,nt=V&&V.ownerDocument,yt=V?V.nodeType:9;if(te=te||[],"string"!=typeof R||!R||1!==yt&&9!==yt&&11!==yt)return te;if(!ye&&(re(V),V=V||le,ke)){if(11!==yt&&(Ue=Wr.exec(R)))if(oe=Ue[1]){if(9===yt){if(!(Fe=V.getElementById(oe)))return te;if(Fe.id===oe)return te.push(Fe),te}else if(nt&&(Fe=nt.getElementById(oe))&&Pt(V,Fe)&&Fe.id===oe)return te.push(Fe),te}else{if(Ue[2])return jt.apply(te,V.getElementsByTagName(R)),te;if((oe=Ue[3])&&a.getElementsByClassName&&V.getElementsByClassName)return jt.apply(te,V.getElementsByClassName(oe)),te}if(a.qsa&&!un[R+" "]&&(!He||!He.test(R))&&(1!==yt||"object"!==V.nodeName.toLowerCase())){if(et=R,nt=V,1===yt&&(Pr.test(R)||cr.test(R))){for((nt=Sr.test(R)&&Cr(V.parentNode)||V)===V&&a.scope||((Re=V.getAttribute("id"))?Re=Re.replace(Ar,kr):V.setAttribute("id",Re=ht)),Ie=(rt=C(R)).length;Ie--;)rt[Ie]=(Re?"#"+Re:":scope")+" "+mr(rt[Ie]);et=rt.join(",")}try{return jt.apply(te,nt.querySelectorAll(et)),te}catch{un(R,!0)}finally{Re===ht&&V.removeAttribute("id")}}}return N(R.replace(hn,"$1"),V,te,ye)}function pr(){var R=[];return function V(te,ye){return R.push(te+" ")>o.cacheLength&&delete V[R.shift()],V[te+" "]=ye}}function bn(R){return R[ht]=!0,R}function xn(R){var V=le.createElement("fieldset");try{return!!R(V)}catch{return!1}finally{V.parentNode&&V.parentNode.removeChild(V),V=null}}function Ir(R,V){for(var te=R.split("|"),ye=te.length;ye--;)o.attrHandle[te[ye]]=V}function Nr(R,V){var te=V&&R,ye=te&&1===R.nodeType&&1===V.nodeType&&R.sourceIndex-V.sourceIndex;if(ye)return ye;if(te)for(;te=te.nextSibling;)if(te===V)return-1;return R?1:-1}function Xr(R){return function(V){return"input"===V.nodeName.toLowerCase()&&V.type===R}}function Vr(R){return function(V){var te=V.nodeName.toLowerCase();return("input"===te||"button"===te)&&V.type===R}}function Rr(R){return function(V){return"form"in V?V.parentNode&&!1===V.disabled?"label"in V?"label"in V.parentNode?V.parentNode.disabled===R:V.disabled===R:V.isDisabled===R||V.isDisabled!==!R&&Zr(V)===R:V.disabled===R:"label"in V&&V.disabled===R}}function Hn(R){return bn(function(V){return V=+V,bn(function(te,ye){for(var oe,Ie=R([],te.length,V),Fe=Ie.length;Fe--;)te[oe=Ie[Fe]]&&(te[oe]=!(ye[oe]=te[oe]))})})}function Cr(R){return R&&typeof R.getElementsByTagName<"u"&&R}for(n in a=Ft.support={},w=Ft.isXML=function(R){var te=R&&(R.ownerDocument||R).documentElement;return!Mr.test(R&&R.namespaceURI||te&&te.nodeName||"HTML")},re=Ft.setDocument=function(R){var V,te,ye=R?R.ownerDocument||R:$e;return ye!=le&&9===ye.nodeType&&ye.documentElement&&(Te=(le=ye).documentElement,ke=!w(le),$e!=le&&(te=le.defaultView)&&te.top!==te&&(te.addEventListener?te.addEventListener("unload",Er,!1):te.attachEvent&&te.attachEvent("onunload",Er)),a.scope=xn(function(oe){return Te.appendChild(oe).appendChild(le.createElement("div")),typeof oe.querySelectorAll<"u"&&!oe.querySelectorAll(":scope fieldset div").length}),a.attributes=xn(function(oe){return oe.className="i",!oe.getAttribute("className")}),a.getElementsByTagName=xn(function(oe){return oe.appendChild(le.createComment("")),!oe.getElementsByTagName("*").length}),a.getElementsByClassName=ar.test(le.getElementsByClassName),a.getById=xn(function(oe){return Te.appendChild(oe).id=ht,!le.getElementsByName||!le.getElementsByName(ht).length}),a.getById?(o.filter.ID=function(oe){var Ie=oe.replace(Dn,An);return function(Fe){return Fe.getAttribute("id")===Ie}},o.find.ID=function(oe,Ie){if(typeof Ie.getElementById<"u"&&ke){var Fe=Ie.getElementById(oe);return Fe?[Fe]:[]}}):(o.filter.ID=function(oe){var Ie=oe.replace(Dn,An);return function(Fe){var Re=typeof Fe.getAttributeNode<"u"&&Fe.getAttributeNode("id");return Re&&Re.value===Ie}},o.find.ID=function(oe,Ie){if(typeof Ie.getElementById<"u"&&ke){var Fe,Re,Ue,rt=Ie.getElementById(oe);if(rt){if((Fe=rt.getAttributeNode("id"))&&Fe.value===oe)return[rt];for(Ue=Ie.getElementsByName(oe),Re=0;rt=Ue[Re++];)if((Fe=rt.getAttributeNode("id"))&&Fe.value===oe)return[rt]}return[]}}),o.find.TAG=a.getElementsByTagName?function(oe,Ie){return typeof Ie.getElementsByTagName<"u"?Ie.getElementsByTagName(oe):a.qsa?Ie.querySelectorAll(oe):void 0}:function(oe,Ie){var Fe,Re=[],Ue=0,rt=Ie.getElementsByTagName(oe);if("*"===oe){for(;Fe=rt[Ue++];)1===Fe.nodeType&&Re.push(Fe);return Re}return rt},o.find.CLASS=a.getElementsByClassName&&function(oe,Ie){if(typeof Ie.getElementsByClassName<"u"&&ke)return Ie.getElementsByClassName(oe)},gt=[],He=[],(a.qsa=ar.test(le.querySelectorAll))&&(xn(function(oe){var Ie;Te.appendChild(oe).innerHTML="",oe.querySelectorAll("[msallowcapture^='']").length&&He.push("[*^$]="+at+"*(?:''|\"\")"),oe.querySelectorAll("[selected]").length||He.push("\\["+at+"*(?:value|"+In+")"),oe.querySelectorAll("[id~="+ht+"-]").length||He.push("~="),(Ie=le.createElement("input")).setAttribute("name",""),oe.appendChild(Ie),oe.querySelectorAll("[name='']").length||He.push("\\["+at+"*name"+at+"*="+at+"*(?:''|\"\")"),oe.querySelectorAll(":checked").length||He.push(":checked"),oe.querySelectorAll("a#"+ht+"+*").length||He.push(".#.+[+~]"),oe.querySelectorAll("\\\f"),He.push("[\\r\\n\\f]")}),xn(function(oe){oe.innerHTML="";var Ie=le.createElement("input");Ie.setAttribute("type","hidden"),oe.appendChild(Ie).setAttribute("name","D"),oe.querySelectorAll("[name=d]").length&&He.push("name"+at+"*[*^$|!~]?="),2!==oe.querySelectorAll(":enabled").length&&He.push(":enabled",":disabled"),Te.appendChild(oe).disabled=!0,2!==oe.querySelectorAll(":disabled").length&&He.push(":enabled",":disabled"),oe.querySelectorAll("*,:x"),He.push(",.*:")})),(a.matchesSelector=ar.test(Rt=Te.matches||Te.webkitMatchesSelector||Te.mozMatchesSelector||Te.oMatchesSelector||Te.msMatchesSelector))&&xn(function(oe){a.disconnectedMatch=Rt.call(oe,"*"),Rt.call(oe,"[s!='']:x"),gt.push("!=",cn)}),He=He.length&&new RegExp(He.join("|")),gt=gt.length&&new RegExp(gt.join("|")),V=ar.test(Te.compareDocumentPosition),Pt=V||ar.test(Te.contains)?function(oe,Ie){var Fe=9===oe.nodeType?oe.documentElement:oe,Re=Ie&&Ie.parentNode;return oe===Re||!(!Re||1!==Re.nodeType||!(Fe.contains?Fe.contains(Re):oe.compareDocumentPosition&&16&oe.compareDocumentPosition(Re)))}:function(oe,Ie){if(Ie)for(;Ie=Ie.parentNode;)if(Ie===oe)return!0;return!1},Mn=V?function(oe,Ie){if(oe===Ie)return ve=!0,0;var Fe=!oe.compareDocumentPosition-!Ie.compareDocumentPosition;return Fe||(1&(Fe=(oe.ownerDocument||oe)==(Ie.ownerDocument||Ie)?oe.compareDocumentPosition(Ie):1)||!a.sortDetached&&Ie.compareDocumentPosition(oe)===Fe?oe==le||oe.ownerDocument==$e&&Pt($e,oe)?-1:Ie==le||Ie.ownerDocument==$e&&Pt($e,Ie)?1:ne?dn(ne,oe)-dn(ne,Ie):0:4&Fe?-1:1)}:function(oe,Ie){if(oe===Ie)return ve=!0,0;var Fe,Re=0,Ue=oe.parentNode,rt=Ie.parentNode,et=[oe],nt=[Ie];if(!Ue||!rt)return oe==le?-1:Ie==le?1:Ue?-1:rt?1:ne?dn(ne,oe)-dn(ne,Ie):0;if(Ue===rt)return Nr(oe,Ie);for(Fe=oe;Fe=Fe.parentNode;)et.unshift(Fe);for(Fe=Ie;Fe=Fe.parentNode;)nt.unshift(Fe);for(;et[Re]===nt[Re];)Re++;return Re?Nr(et[Re],nt[Re]):et[Re]==$e?-1:nt[Re]==$e?1:0}),le},Ft.matches=function(R,V){return Ft(R,null,null,V)},Ft.matchesSelector=function(R,V){if(re(R),a.matchesSelector&&ke&&!un[V+" "]&&(!gt||!gt.test(V))&&(!He||!He.test(V)))try{var te=Rt.call(R,V);if(te||a.disconnectedMatch||R.document&&11!==R.document.nodeType)return te}catch{un(V,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(R){return R[1]=R[1].replace(Dn,An),R[3]=(R[3]||R[4]||R[5]||"").replace(Dn,An),"~="===R[2]&&(R[3]=" "+R[3]+" "),R.slice(0,4)},CHILD:function(R){return R[1]=R[1].toLowerCase(),"nth"===R[1].slice(0,3)?(R[3]||Ft.error(R[0]),R[4]=+(R[4]?R[5]+(R[6]||1):2*("even"===R[3]||"odd"===R[3])),R[5]=+(R[7]+R[8]||"odd"===R[3])):R[3]&&Ft.error(R[0]),R},PSEUDO:function(R){var V,te=!R[6]&&R[2];return hr.CHILD.test(R[0])?null:(R[3]?R[2]=R[4]||R[5]||"":te&&jr.test(te)&&(V=C(te,!0))&&(V=te.indexOf(")",te.length-V)-te.length)&&(R[0]=R[0].slice(0,V),R[2]=te.slice(0,V)),R.slice(0,3))}},filter:{TAG:function(R){var V=R.replace(Dn,An).toLowerCase();return"*"===R?function(){return!0}:function(te){return te.nodeName&&te.nodeName.toLowerCase()===V}},CLASS:function(R){var V=vt[R+" "];return V||(V=new RegExp("(^|"+at+")"+R+"("+at+"|$)"))&&vt(R,function(te){return V.test("string"==typeof te.className&&te.className||typeof te.getAttribute<"u"&&te.getAttribute("class")||"")})},ATTR:function(R,V,te){return function(ye){var oe=Ft.attr(ye,R);return null==oe?"!="===V:!V||(oe+="","="===V?oe===te:"!="===V?oe!==te:"^="===V?te&&0===oe.indexOf(te):"*="===V?te&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function K(e,n,a){return T(n)?r.grep(e,function(o,p){return!!n.call(o,p,o)!==a}):n.nodeType?r.grep(e,function(o){return o===n!==a}):"string"!=typeof n?r.grep(e,function(o){return-1)[^>]*|#([\w-]+))$/;(r.fn.init=function(e,n,a){var o,p;if(!e)return this;if(a=a||ee,"string"==typeof e){if(!(o="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:pe.exec(e))||!o[1]&&n)return!n||n.jquery?(n||a).find(e):this.constructor(n).find(e);if(o[1]){if(r.merge(this,r.parseHTML(o[1],(n=n instanceof r?n[0]:n)&&n.nodeType?n.ownerDocument||n:X,!0)),J.test(o[1])&&r.isPlainObject(n))for(o in n)T(this[o])?this[o](n[o]):this.attr(o,n[o]);return this}return(p=X.getElementById(o[2]))&&(this[0]=p,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):T(e)?void 0!==a.ready?a.ready(e):e(r):r.makeArray(e,this)}).prototype=r.fn,ee=r(X);var de=/^(?:parents|prev(?:Until|All))/,ge={children:!0,contents:!0,next:!0,prev:!0};function ce(e,n){for(;(e=e[n])&&1!==e.nodeType;);return e}r.fn.extend({has:function(e){var n=r(e,this),a=n.length;return this.filter(function(){for(var o=0;o\x20\t\r\n\f]*)/i,pn=/^$|^module$|\/(?:java|ecma)script/i;Bt=X.createDocumentFragment().appendChild(X.createElement("div")),(qt=X.createElement("input")).setAttribute("type","radio"),qt.setAttribute("checked","checked"),qt.setAttribute("name","t"),Bt.appendChild(qt),P.checkClone=Bt.cloneNode(!0).cloneNode(!0).lastChild.checked,Bt.innerHTML="",P.noCloneChecked=!!Bt.cloneNode(!0).lastChild.defaultValue,Bt.innerHTML="",P.option=!!Bt.lastChild;var Ot={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function bt(e,n){var a;return a=typeof e.getElementsByTagName<"u"?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll<"u"?e.querySelectorAll(n||"*"):[],void 0===n||n&&W(e,n)?r.merge([e],a):a}function ft(e,n){for(var a=0,o=e.length;a",""]);var nn=/<|&#?\w+;/;function O(e,n,a,o,p){for(var w,C,U,N,Q,ne,ve=n.createDocumentFragment(),re=[],le=0,Te=e.length;le\s*$/g;function ue(e,n){return W(e,"table")&&W(11!==n.nodeType?n:n.firstChild,"tr")&&r(e).children("tbody")[0]||e}function fe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function A(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function q(e,n){var a,o,p,w,C,U;if(1===n.nodeType){if(be.hasData(e)&&(U=be.get(e).events))for(p in be.remove(n,"handle events"),U)for(a=0,o=U[p].length;a"u"?r.prop(e,n,a):(1===w&&r.isXMLDoc(e)||(p=r.attrHooks[n.toLowerCase()]||(r.expr.match.bool.test(n)?Nn:void 0)),void 0!==a?null===a?void r.removeAttr(e,n):p&&"set"in p&&void 0!==(o=p.set(e,a,n))?o:(e.setAttribute(n,a+""),a):p&&"get"in p&&null!==(o=p.get(e,n))?o:null==(o=r.find.attr(e,n))?void 0:o)},attrHooks:{type:{set:function(e,n){if(!P.radioValue&&"radio"===n&&W(e,"input")){var a=e.value;return e.setAttribute("type",n),a&&(e.value=a),n}}}},removeAttr:function(e,n){var a,o=0,p=n&&n.match(xe);if(p&&1===e.nodeType)for(;a=p[o++];)e.removeAttribute(a)}}),Nn={set:function(e,n,a){return!1===n?r.removeAttr(e,a):e.setAttribute(a,a),a}},r.each(r.expr.match.bool.source.match(/\w+/g),function(e,n){var a=mn[n]||r.find.attr;mn[n]=function(o,p,w){var C,U,N=p.toLowerCase();return w||(U=mn[N],mn[N]=C,C=null!=a(o,p,w)?N:null,mn[N]=U),C}});var Rn=/^(?:input|select|textarea|button)$/i,Sn=/^(?:a|area)$/i;function yn(e){return(e.match(xe)||[]).join(" ")}function vn(e){return e.getAttribute&&e.getAttribute("class")||""}function Jn(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(xe)||[]}r.fn.extend({prop:function(e,n){return Ve(this,r.prop,e,n,1").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",a=function(w){n.remove(),a=null,w&&p("error"===w.type?404:200,w.type)}),X.head.appendChild(n[0])},abort:function(){a&&a()}}});var s,f=[],h=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=f.pop()||r.expando+"_"+or.guid++;return this[e]=!0,e}}),r.ajaxPrefilter("json jsonp",function(e,n,a){var o,p,w,C=!1!==e.jsonp&&(h.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&h.test(e.data)&&"data");if(C||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=T(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,C?e[C]=e[C].replace(h,"$1"+o):!1!==e.jsonp&&(e.url+=(ct.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return w||r.error(o+" was not called"),w[0]},e.dataTypes[0]="json",p=l[o],l[o]=function(){w=arguments},a.always(function(){void 0===p?r(l).removeProp(o):l[o]=p,e[o]&&(e.jsonpCallback=n.jsonpCallback,f.push(o)),w&&T(p)&&p(w[0]),w=p=void 0}),"script"}),P.createHTMLDocument=((s=X.implementation.createHTMLDocument("").body).innerHTML="
",2===s.childNodes.length),r.parseHTML=function(e,n,a){return"string"!=typeof e?[]:("boolean"==typeof n&&(a=n,n=!1),n||(P.createHTMLDocument?((o=(n=X.implementation.createHTMLDocument("")).createElement("base")).href=X.location.href,n.head.appendChild(o)):n=X),w=!a&&[],(p=J.exec(e))?[n.createElement(p[1])]:(p=O([e],n,w),w&&w.length&&r(w).remove(),r.merge([],p.childNodes)));var o,p,w},r.fn.load=function(e,n,a){var o,p,w,C=this,U=e.indexOf(" ");return-1").append(r.parseHTML(N)).find(o):N)}).always(a&&function(N,Q){C.each(function(){a.apply(this,w||[N.responseText,Q,N])})}),this},r.expr.pseudos.animated=function(e){return r.grep(r.timers,function(n){return e===n.elem}).length},r.offset={setOffset:function(e,n,a){var o,p,w,C,U,N,Q=r.css(e,"position"),ne=r(e),ve={};"static"===Q&&(e.style.position="relative"),U=ne.offset(),w=r.css(e,"top"),N=r.css(e,"left"),("absolute"===Q||"fixed"===Q)&&-1<(w+N).indexOf("auto")?(C=(o=ne.position()).top,p=o.left):(C=parseFloat(w)||0,p=parseFloat(N)||0),T(n)&&(n=n.call(e,a,r.extend({},U))),null!=n.top&&(ve.top=n.top-U.top+C),null!=n.left&&(ve.left=n.left-U.left+p),"using"in n?n.using.call(e,ve):ne.css(ve)}},r.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(p){r.offset.setOffset(this,e,p)});var n,a,o=this[0];return o?o.getClientRects().length?{top:(n=o.getBoundingClientRect()).top+(a=o.ownerDocument.defaultView).pageYOffset,left:n.left+a.pageXOffset}:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,n,a,o=this[0],p={top:0,left:0};if("fixed"===r.css(o,"position"))n=o.getBoundingClientRect();else{for(n=this.offset(),a=o.ownerDocument,e=o.offsetParent||a.documentElement;e&&(e===a.body||e===a.documentElement)&&"static"===r.css(e,"position");)e=e.parentNode;e&&e!==o&&1===e.nodeType&&((p=r(e).offset()).top+=r.css(e,"borderTopWidth",!0),p.left+=r.css(e,"borderLeftWidth",!0))}return{top:n.top-p.top-r.css(o,"marginTop",!0),left:n.left-p.left-r.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===r.css(e,"position");)e=e.offsetParent;return e||st})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var a="pageYOffset"===n;r.fn[e]=function(o){return Ve(this,function(p,w,C){var U;if(G(p)?U=p:9===p.nodeType&&(U=p.defaultView),void 0===C)return U?U[n]:p[w];U?U.scrollTo(a?U.pageXOffset:C,a?C:U.pageYOffset):p[w]=C},e,o,arguments.length)}}),r.each(["top","left"],function(e,n){r.cssHooks[n]=dt(P.pixelPosition,function(a,o){if(o)return o=St(a,n),Be.test(o)?r(a).position()[n]+"px":o})}),r.each({Height:"height",Width:"width"},function(e,n){r.each({padding:"inner"+e,content:n,"":"outer"+e},function(a,o){r.fn[o]=function(p,w){var C=arguments.length&&(a||"boolean"!=typeof p),U=a||(!0===p||!0===w?"margin":"border");return Ve(this,function(N,Q,ne){var ve;return G(N)?0===o.indexOf("outer")?N["inner"+e]:N.document.documentElement["client"+e]:9===N.nodeType?(ve=N.documentElement,Math.max(N.body["scroll"+e],ve["scroll"+e],N.body["offset"+e],ve["offset"+e],ve["client"+e])):void 0===ne?r.css(N,Q,U):r.style(N,Q,ne,U)},n,C?p:void 0,C)}})}),r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,n){r.fn[n]=function(a){return this.on(n,a)}}),r.fn.extend({bind:function(e,n,a){return this.on(e,null,n,a)},unbind:function(e,n){return this.off(e,null,n)},delegate:function(e,n,a,o){return this.on(n,e,a,o)},undelegate:function(e,n,a){return 1===arguments.length?this.off(e,"**"):this.off(n,e||"**",a)},hover:function(e,n){return this.mouseenter(e).mouseleave(n||e)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){r.fn[n]=function(a,o){return 0"u"&&(l.jQuery=l.$=r),r}),($jscomp=$jscomp||{}).scope={},$jscomp.findInternal=function(l,ae,se){l instanceof String&&(l=String(l));for(var b=l.length,Y=0;Y").css({position:"fixed",top:0,left:-1*l(ae).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(l("
").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(l("
").css({width:"100%",height:10}))).appendTo("body"),f=s.children(),h=f.children();i.barWidth=f[0].offsetWidth-f[0].clientWidth,i.bScrollOversize=100===h[0].offsetWidth&&100!==f[0].clientWidth,i.bScrollbarLeft=1!==Math.round(h.offset().left),i.bBounding=!!s[0].getBoundingClientRect().width,s.remove()}l.extend(t.oBrowser,_e.__browser),t.oScroll.iBarWidth=_e.__browser.barWidth}function k(t,i,s,f,h,x){var g=!1;if(s!==b){var y=s;g=!0}for(;f!==h;)t.hasOwnProperty(f)&&(y=g?i(y,t[f],f,t):t[f],g=!0,f+=x);return y}function D(t,i){var s=_e.defaults.column,f=t.aoColumns.length;s=l.extend({},_e.models.oColumn,s,{nTh:i||se.createElement("th"),sTitle:s.sTitle?s.sTitle:i?i.innerHTML:"",aDataSort:s.aDataSort?s.aDataSort:[f],mData:s.mData?s.mData:f,idx:f}),t.aoColumns.push(s),(s=t.aoPreSearchCols)[f]=l.extend({},_e.models.oSearch,s[f]),H(t,f,l(i).data())}function H(t,i,s){var f=t.oClasses,h=l((i=t.aoColumns[i]).nTh);if(!i.sWidthOrig){i.sWidthOrig=h.attr("width")||null;var x=(h.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);x&&(i.sWidthOrig=x[1])}s!==b&&null!==s&&(j(s),M(_e.defaults.column,s,!0),s.mDataProp===b||s.mData||(s.mData=s.mDataProp),s.sType&&(i._sManualType=s.sType),s.className&&!s.sClass&&(s.sClass=s.className),s.sClass&&h.addClass(s.sClass),l.extend(i,s),fe(i,s,"sWidth","sWidthOrig"),s.iDataSort!==b&&(i.aDataSort=[s.iDataSort]),fe(i,s,"aDataSort"));var g=i.mData,y=Rn(g),e=i.mRender?Rn(i.mRender):null;s=function(n){return"string"==typeof n&&-1!==n.indexOf("@")},i._bAttrSrc=l.isPlainObject(g)&&(s(g.sort)||s(g.type)||s(g.filter)),i._setter=null,i.fnGetData=function(n,a,o){var p=y(n,a,b,o);return e&&a?e(p,a,n,o):p},i.fnSetData=function(n,a,o){return Sn(g)(n,a,o)},"number"!=typeof g&&(t._rowReadObject=!0),t.oFeatures.bSort||(i.bSortable=!1,h.addClass(f.sSortableNone)),t=-1!==l.inArray("asc",i.asSorting),s=-1!==l.inArray("desc",i.asSorting),i.bSortable&&(t||s)?t&&!s?(i.sSortingClass=f.sSortableAsc,i.sSortingClassJUI=f.sSortJUIAscAllowed):!t&&s?(i.sSortingClass=f.sSortableDesc,i.sSortingClassJUI=f.sSortJUIDescAllowed):(i.sSortingClass=f.sSortable,i.sSortingClassJUI=f.sSortJUI):(i.sSortingClass=f.sSortableNone,i.sSortingClassJUI="")}function P(t){if(!1!==t.oFeatures.bAutoWidth){var i=t.aoColumns;Yt(t);for(var s=0,f=i.length;sn[a])f(y.length+n[a],e);else if("string"==typeof n[a]){var o=0;for(g=y.length;oi&&t[h]--;-1!=f&&s===b&&t.splice(f,1)}function J(t,i,s,f){var x,h=t.aoData[i],g=function(e,n){for(;e.childNodes.length;)e.removeChild(e.firstChild);e.innerHTML=m(t,i,n,"display")};if("dom"!==s&&(s&&"auto"!==s||"dom"!==h.src)){var y=h.anCells;if(y)if(f!==b)g(y[f],f);else for(s=0,x=y.length;s").appendTo(f));var e=0;for(i=y.length;e=t.fnRecordsDisplay()?0:y,t.iInitDisplayStart=-1),y=t._iDisplayStart;var a=t.fnDisplayEnd();if(t.bDeferLoading)t.bDeferLoading=!1,t.iDraw++,Ct(t,!1);else if(e){if(!t.bDestroying&&!i)return void Ae(t)}else t.iDraw++;if(0!==n.length)for(i=e?t.aoData.length:a,g=e?0:y;g",{class:x?h[0]:""}).append(l("",{valign:"top",colSpan:X(t),class:t.oClasses.sRowEmpty}).html(f))[0];De(t,"aoHeaderCallback","header",[l(t.nTHead).children("tr")[0],E(t),y,a,n]),De(t,"aoFooterCallback","footer",[l(t.nTFoot).children("tr")[0],E(t),y,a,n]),(h=l(t.nTBody)).children().detach(),h.append(l(s)),De(t,"aoDrawCallback","draw",[t]),t.bSorted=!1,t.bFiltered=!1,t.bDrawing=!1}}function xe(t,i){var s=t.oFeatures,f=s.bFilter;s.bSort&&O(t),f?Pe(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==i&&(t._iDisplayStart=0),t._drawHold=i,ce(t),t._drawHold=!1}function Oe(t){var i=t.oClasses,s=l(t.nTable);s=l("
").insertBefore(s);var f=t.oFeatures,h=l("
",{id:t.sTableId+"_wrapper",class:i.sWrapper+(t.nTFoot?"":" "+i.sNoFooter)});t.nHolding=s[0],t.nTableWrapper=h[0],t.nTableReinsertBefore=t.nTable.nextSibling;for(var g,y,e,n,a,o,x=t.sDom.split(""),p=0;p")[0],"'"==(n=x[p+1])||'"'==n){for(a="",o=2;x[p+o]!=n;)a+=x[p+o],o++;"H"==a?a=i.sJUIHeader:"F"==a&&(a=i.sJUIFooter),-1!=a.indexOf(".")?(n=a.split("."),e.id=n[0].substr(1,n[0].length-1),e.className=n[1]):"#"==a.charAt(0)?e.id=a.substr(1,a.length-1):e.className=a,p+=o}h.append(e),h=l(e)}else if(">"==y)h=h.parent();else if("l"==y&&f.bPaginate&&f.bLengthChange)g=mt(t);else if("f"==y&&f.bFilter)g=Qe(t);else if("r"==y&&f.bProcessing)g=an(t);else if("t"==y)g=Bt(t);else if("i"==y&&f.bInfo)g=Tt(t);else if("p"==y&&f.bPaginate)g=tt(t);else if(0!==_e.ext.feature.length)for(o=0,n=(e=_e.ext.feature).length;o',y=f.sSearch;y=y.match(/_INPUT_/)?y.replace("_INPUT_",g):y+g,i=l("
",{id:x.f?null:s+"_filter",class:i.sFilter}).append(l("
").addClass(i.sLength);return t.aanFeatures.l||(e[0].id=s+"_length"),e.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",h[0].outerHTML)),l("select",e).val(t._iDisplayLength).on("change.DT",function(n){wt(t,l(this).val()),ce(t)}),l(t.nTable).on("length.dt.DT",function(n,a,o){t===a&&l("select",e).val(o)}),e[0]}function tt(t){var i=t.sPaginationType,s=_e.ext.pager[i],f="function"==typeof s,h=function(g){ce(g)};i=l("
").addClass(t.oClasses.sPaging+i)[0];var x=t.aanFeatures;return f||s.fnInit(t,i,h),x.p||(i.id=t.sTableId+"_paginate",t.aoDrawCallback.push({fn:function(g){if(f){var o,y=g._iDisplayStart,e=g._iDisplayLength,n=g.fnRecordsDisplay(),a=-1===e;for(y=a?0:Math.ceil(y/e),e=a?1:Math.ceil(n/e),n=s(y,e),a=0,o=x.p.length;ax&&(f=0):"first"==i?f=0:"previous"==i?0>(f=0<=h?f-h:0)&&(f=0):"next"==i?f+h",{id:t.aanFeatures.r?null:t.sTableId+"_processing",class:t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function Ct(t,i){t.oFeatures.bProcessing&&l(t.aanFeatures.r).css("display",i?"block":"none"),De(t,null,"processing",[t,i])}function Bt(t){var i=l(t.nTable),s=t.oScroll;if(""===s.sX&&""===s.sY)return t.nTable;var f=s.sX,h=s.sY,x=t.oClasses,g=i.children("caption"),y=g.length?g[0]._captionSide:null,e=l(i[0].cloneNode(!1)),n=l(i[0].cloneNode(!1)),a=i.children("tfoot");a.length||(a=null),e=l("
",{class:x.sScrollWrapper}).append(l("
",{class:x.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:f?f?ft(f):null:"100%"}).append(l("
",{class:x.sScrollHeadInner}).css({"box-sizing":"content-box",width:s.sXInner||"100%"}).append(e.removeAttr("id").css("margin-left",0).append("top"===y?g:null).append(i.children("thead"))))).append(l("
",{class:x.sScrollBody}).css({position:"relative",overflow:"auto",width:f?ft(f):null}).append(i)),a&&e.append(l("
",{class:x.sScrollFoot}).css({overflow:"hidden",border:0,width:f?f?ft(f):null:"100%"}).append(l("
",{class:x.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",0).append("bottom"===y?g:null).append(i.children("tfoot")))));var o=(i=e.children())[0];x=i[1];var p=a?i[2]:null;return f&&l(x).on("scroll.DT",function(w){o.scrollLeft=w=this.scrollLeft,a&&(p.scrollLeft=w)}),l(x).css("max-height",h),s.bCollapse||l(x).css("height",h),t.nScrollHead=o,t.nScrollBody=x,t.nScrollFoot=p,t.aoDrawCallback.push({fn:qt,sName:"scrolling"}),e[0]}function qt(t){var i=t.oScroll,s=i.sX,f=i.sXInner,h=i.sY;i=i.iBarWidth;var x=l(t.nScrollHead),g=x[0].style,y=x.children("div"),e=y[0].style,n=y.children("table"),a=l(y=t.nScrollBody),o=y.style,p=l(t.nScrollFoot).children("div"),w=p.children("table"),C=l(t.nTHead),U=l(t.nTable),N=U[0],Q=N.style,ne=t.nTFoot?l(t.nTFoot):null,ve=t.oBrowser,re=ve.bScrollOversize;en(t.aoColumns,"nTh");var gt,le=[],Te=[],ke=[],He=[],Rt=function(Xe){(Xe=Xe.style).paddingTop="0",Xe.paddingBottom="0",Xe.borderTopWidth="0",Xe.borderBottomWidth="0",Xe.height=0},Pt=y.scrollHeight>y.clientHeight;if(t.scrollBarVis!==Pt&&t.scrollBarVis!==b)t.scrollBarVis=Pt,P(t);else{if(t.scrollBarVis=Pt,U.children("thead, tfoot").remove(),ne){var ht=ne.clone().prependTo(U),$e=ne.find("tr");ht=ht.find("tr")}var Kt=C.clone().prependTo(U);C=C.find("tr"),Pt=Kt.find("tr"),Kt.find("th, td").removeAttr("tabindex"),s||(o.width="100%",x[0].style.width="100%"),l.each(Ze(t,Kt),function(Xe,vt){gt=T(t,Xe),vt.style.width=t.aoColumns[gt].sWidth}),ne&&Nt(function(Xe){Xe.style.width=""},ht),x=U.outerWidth(),""===s?(Q.width="100%",re&&(U.find("tbody").height()>y.offsetHeight||"scroll"==a.css("overflow-y"))&&(Q.width=ft(U.outerWidth()-i)),x=U.outerWidth()):""!==f&&(Q.width=ft(f),x=U.outerWidth()),Nt(Rt,Pt),Nt(function(Xe){var vt=ae.getComputedStyle?ae.getComputedStyle(Xe).width:ft(l(Xe).width());ke.push(Xe.innerHTML),le.push(vt)},Pt),Nt(function(Xe,vt){Xe.style.width=le[vt]},C),l(Pt).height(0),ne&&(Nt(Rt,ht),Nt(function(Xe){He.push(Xe.innerHTML),Te.push(ft(l(Xe).css("width")))},ht),Nt(function(Xe,vt){Xe.style.width=Te[vt]},$e),l(ht).height(0)),Nt(function(Xe,vt){Xe.innerHTML='
'+ke[vt]+"
",Xe.childNodes[0].style.height="0",Xe.childNodes[0].style.overflow="hidden",Xe.style.width=le[vt]},Pt),ne&&Nt(function(Xe,vt){Xe.innerHTML='
'+He[vt]+"
",Xe.childNodes[0].style.height="0",Xe.childNodes[0].style.overflow="hidden",Xe.style.width=Te[vt]},ht),U.outerWidth()y.offsetHeight||"scroll"==a.css("overflow-y")?x+i:x,re&&(y.scrollHeight>y.offsetHeight||"scroll"==a.css("overflow-y"))&&(Q.width=ft($e-i)),""!==s&&""===f||ue(t,1,"Possible column misalignment",6)):$e="100%",o.width=ft($e),g.width=ft($e),ne&&(t.nScrollFoot.style.width=ft($e)),!h&&re&&(o.height=ft(N.offsetHeight+i)),s=U.outerWidth(),n[0].style.width=ft(s),e.width=ft(s),f=U.height()>y.clientHeight||"scroll"==a.css("overflow-y"),e[h="padding"+(ve.bScrollbarLeft?"Left":"Right")]=f?i+"px":"0px",ne&&(w[0].style.width=ft(s),p[0].style.width=ft(s),p[0].style[h]=f?i+"px":"0px"),U.children("colgroup").insertBefore(U.children("thead")),a.trigger("scroll"),!t.bSorted&&!t.bFiltered||t._drawHold||(y.scrollTop=0)}}function Nt(t,i,s){for(var g,y,f=0,h=0,x=i.length;h").appendTo(y.find("tbody"));for(y.find("thead, tfoot").remove(),y.append(l(t.nTHead).clone()).append(l(t.nTFoot).clone()),y.find("tfoot th, tfoot td").css("width",""),n=Ze(t,y.find("thead")[0]),w=0;w").css({width:U.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(t.aoData.length)for(w=0;w").css(x||h?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(y).appendTo(o),x&&g?y.width(g):x?(y.css("width","auto"),y.removeAttr("width"),y.width()").css("width",ft(t)).appendTo(i||se.body))[0].offsetWidth,t.remove(),i):0}function Ot(t,i){var s=bt(t,i);if(0>s)return null;var f=t.aoData[s];return f.nTr?f.anCells[i]:l("").html(m(t,s,i,"display"))[0]}function bt(t,i){for(var s,f=-1,h=-1,x=0,g=t.aoData.length;xf&&(f=s.length,h=x);return h}function ft(t){return null===t?"0px":"number"==typeof t?0>t?"0px":t+"px":t.match(/\d$/)?t+"px":t}function nn(t){var i=[],s=t.aoColumns,f=t.aaSortingFixed,h=l.isPlainObject(f),x=[],g=function(a){a.length&&!Array.isArray(a[0])?x.push(a):l.merge(x,a)};for(Array.isArray(f)&&g(f),h&&f.pre&&g(f.pre),g(t.aaSorting),h&&f.post&&g(f.post),t=0;tne?1:0))return"asc"===N.dir?Q:-Q}return(Q=s[a])<(ne=s[o])?-1:Q>ne?1:0}:function(a,o){var p,w=y.length,C=h[a]._aSortData,U=h[o]._aSortData;for(p=0;pne?1:0})}t.bSorted=!0}function we(t){var i=t.aoColumns,s=nn(t);t=t.oLanguage.oAria;for(var f=0,h=i.length;f/g,""),e=x.nTh;e.removeAttribute("aria-sort"),x.bSortable&&(0h?h+1:3))}for(h=0,x=f.length;hh?h+1:3))}t.aLastSort=f}function he(t,i){var h,s=t.aoColumns[i],f=_e.ext.order[s.sSortDataType];f&&(h=f.call(t.oInstance,t,i,G(t,i)));for(var x,g=_e.ext.type.order[s.sType+"-pre"],y=0,e=t.aoData.length;y=h.length?[0,n[1]]:n)})),i.search!==b&&l.extend(t.oPreviousSearch,Et(i.search)),i.columns){for(g=0,f=i.columns.length;g=s&&(i=s-f),i-=i%f,(-1===f||0>i)&&(i=0),t._iDisplayStart=i}function ze(t,i){var s=_e.ext.renderer[i];return l.isPlainObject(t=t.renderer)&&t[i]?s[t[i]]||s._:"string"==typeof t&&s[t]||s._}function qe(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}function Qt(t,i){var s=rr.numbers_length,f=Math.floor(s/2);return i<=s?t=En(0,i):t<=f?((t=En(0,s-2)).push("ellipsis"),t.push(i-1)):(t>=i-1-f?t=En(i-(s-2),i):((t=En(t-f+2,t+f-1)).push("ellipsis"),t.push(i-1)),t.splice(0,0,"ellipsis"),t.splice(0,0,0)),t.DT_el="span",t}function St(t){l.each({num:function(i){return jn(i,t)},"num-fmt":function(i){return jn(i,t,Gt)},"html-num":function(i){return jn(i,t,Zt)},"html-num-fmt":function(i){return jn(i,t,Zt,Gt)}},function(i,s){ut.type.order[i+t+"-pre"]=s,i.match(/^html\-/)&&(ut.type.search[i+t]=ut.type.search.html)})}function dt(t){return function(){var i=[c(this[_e.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return _e.ext.internal[t].apply(this,i)}}var ut,We,xt,_e=function(t,i){if(this instanceof _e)return l(t).DataTable(i);i=t,this.$=function(g,y){return this.api(!0).$(g,y)},this._=function(g,y){return this.api(!0).rows(g,y).data()},this.api=function(g){return new ct(g?c(this[ut.iApiIndex]):this)},this.fnAddData=function(g,y){var e=this.api(!0);return g=Array.isArray(g)&&(Array.isArray(g[0])||l.isPlainObject(g[0]))?e.rows.add(g):e.row.add(g),(y===b||y)&&e.draw(),g.flatten().toArray()},this.fnAdjustColumnSizing=function(g){var y=this.api(!0).columns.adjust(),e=y.settings()[0],n=e.oScroll;g===b||g?y.draw(!1):(""!==n.sX||""!==n.sY)&&qt(e)},this.fnClearTable=function(g){var y=this.api(!0).clear();(g===b||g)&&y.draw()},this.fnClose=function(g){this.api(!0).row(g).child.hide()},this.fnDeleteRow=function(g,y,e){var n=this.api(!0),a=(g=n.rows(g)).settings()[0],o=a.aoData[g[0][0]];return g.remove(),y&&y.call(this,a,o),(e===b||e)&&n.draw(),o},this.fnDestroy=function(g){this.api(!0).destroy(g)},this.fnDraw=function(g){this.api(!0).draw(g)},this.fnFilter=function(g,y,e,n,a,o){a=this.api(!0),null===y||y===b?a.search(g,e,n,o):a.column(y).search(g,e,n,o),a.draw()},this.fnGetData=function(g,y){var e=this.api(!0);if(g!==b){var n=g.nodeName?g.nodeName.toLowerCase():"";return y!==b||"td"==n||"th"==n?e.cell(g,y).data():e.row(g).data()||null}return e.data().toArray()},this.fnGetNodes=function(g){var y=this.api(!0);return g!==b?y.row(g).node():y.rows().nodes().flatten().toArray()},this.fnGetPosition=function(g){var y=this.api(!0),e=g.nodeName.toUpperCase();return"TR"==e?y.row(g).index():"TD"==e||"TH"==e?[(g=y.cell(g).index()).row,g.columnVisible,g.column]:null},this.fnIsOpen=function(g){return this.api(!0).row(g).child.isShown()},this.fnOpen=function(g,y,e){return this.api(!0).row(g).child(y,e).show().child()[0]},this.fnPageChange=function(g,y){g=this.api(!0).page(g),(y===b||y)&&g.draw(!1)},this.fnSetColumnVis=function(g,y,e){g=this.api(!0).column(g).visible(y),(e===b||e)&&g.columns.adjust().draw()},this.fnSettings=function(){return c(this[ut.iApiIndex])},this.fnSort=function(g){this.api(!0).order(g).draw()},this.fnSortListener=function(g,y,e){this.api(!0).order.listener(g,y,e)},this.fnUpdate=function(g,y,e,n,a){var o=this.api(!0);return e===b||null===e?o.row(y).data(g):o.cell(y,e).data(g),(a===b||a)&&o.columns.adjust(),(n===b||n)&&o.draw(),0},this.fnVersionCheck=ut.fnVersionCheck;var s=this,f=i===b,h=this.length;for(var x in f&&(i={}),this.oApi=this.internal=ut.internal,_e.ext.internal)x&&(this[x]=dt(x));return this.each(function(){var n,g={},y=1").appendTo(p)),N.nTHead=ke[0];var He=p.children("tbody");if(0===He.length&&(He=l("").insertAfter(ke)),N.nTBody=He[0],0===(ke=p.children("tfoot")).length&&0").appendTo(p)),0===ke.length||0===ke.children().length?p.addClass(Q.sNoFooter):0/g,Mt=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,on=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,Gt=/['\u00A0,$\xa3\u20ac\xa5%\u2009\u202F\u20BD\u20a9\u20BArfk\u0243\u039e]/gi,$t=function(t){return!(t&&!0!==t&&"-"!==t)},sn=function(t){var i=parseInt(t,10);return!isNaN(i)&&isFinite(t)?i:null},Tn=function(t,i){return wn[i]||(wn[i]=new RegExp(yn(i),"g")),"string"==typeof t&&"."!==i?t.replace(/\./g,"").replace(wn[i],"."):t},kn=function(t,i,s){var f="string"==typeof t;return!!$t(t)||(i&&f&&(t=Tn(t,i)),s&&f&&(t=t.replace(Gt,"")),!isNaN(parseFloat(t))&&isFinite(t))},Fn=function(t,i,s){return!!($t(t)||($t(t)||"string"==typeof t)&&kn(t.replace(Zt,""),i,s))||null},en=function(t,i,s){var f=[],h=0,x=t.length;if(s!==b)for(;ht.length))for(var i=t.slice().sort(),s=i[0],f=1,h=i.length;f")[0],Jn=vn.textContent!==b,br=/<.*?>/g,Wn=_e.util.throttle,Qn=[],Lt=Array.prototype,ct=function(t,i){if(!(this instanceof ct))return new ct(t,i);var s=[],f=function(g){(g=function(t){var i,s=_e.settings,f=l.map(s,function(x,g){return x.nTable});if(!t)return[];if(t.nTable&&t.oApi)return[t];if(t.nodeName&&"table"===t.nodeName.toLowerCase()){var h=l.inArray(t,f);return-1!==h?[s[h]]:null}return t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?i=l(t):t instanceof l&&(i=t),i?i.map(function(x){return-1!==(h=l.inArray(this,f))?s[h]:null}).toArray():void 0)}(g))&&s.push.apply(s,g)};if(Array.isArray(t))for(var h=0,x=t.length;ht?new ct(i[t],this[t]):null},filter:function(t){var i=[];if(Lt.filter)i=Lt.filter.call(this,t,this);else for(var s=0,f=this.length;s").addClass(y),l("td",e).addClass(y).html(g)[0].colSpan=X(t),h.push(e[0]))};x(s,f),i._details&&i._details.detach(),i._details=l(h),i._detailsShow&&i._details.insertAfter(i.nTr)}(s[0],s[0].aoData[this[0]],t,i),this)}),We(["row().child.show()","row().child().show()"],function(t){return lr(this,!0),this}),We(["row().child.hide()","row().child().hide()"],function(){return lr(this,!1),this}),We(["row().child.remove()","row().child().remove()"],function(){return tr(this),this}),We("row().child.isShown()",function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]]._detailsShow||!1});var ur=/^([^:]+):(name|visIdx|visible)$/,Xn=function(t,i,s,f,h){s=[],f=0;for(var x=h.length;f(y=parseInt(n[1],10))){var a=l.map(f,function(o,p){return o.bVisible?p:null});return[a[a.length+y]]}return[T(t,y)];case"name":return l.map(h,function(o,p){return o===n[1]?p:null});default:return[]}return g.nodeName&&g._DT_CellIndex?[g._DT_CellIndex.column]:(y=l(x).filter(g).map(function(){return l.inArray(this,x)}).toArray()).length||!g.nodeName?y:(y=l(g).closest("*[data-dt-column]")).length?[y.data("dt-column")]:[]},t,s)}(f,t,i)},1);return s.selector.cols=t,s.selector.opts=i,s}),xt("columns().header()","column().header()",function(t,i){return this.iterator("column",function(s,f){return s.aoColumns[f].nTh},1)}),xt("columns().footer()","column().footer()",function(t,i){return this.iterator("column",function(s,f){return s.aoColumns[f].nTf},1)}),xt("columns().data()","column().data()",function(){return this.iterator("column-rows",Xn,1)}),xt("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(t,i){return t.aoColumns[i].mData},1)}),xt("columns().cache()","column().cache()",function(t){return this.iterator("column-rows",function(i,s,f,h,x){return On(i.aoData,x,"search"===t?"_aFilterData":"_aSortData",s)},1)}),xt("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(t,i,s,f,h){return On(t.aoData,h,"anCells",i)},1)}),xt("columns().visible()","column().visible()",function(t,i){var s=this,f=this.iterator("column",function(h,x){if(t===b)return h.aoColumns[x].bVisible;var n,g=h.aoColumns,y=g[x],e=h.aoData;if(t!==b&&y.bVisible!==t){if(t){var a=l.inArray(!0,en(g,"bVisible"),x+1);for(g=0,n=e.length;gf;return!0},_e.isDataTable=_e.fnIsDataTable=function(t){var i=l(t).get(0),s=!1;return t instanceof _e.Api||(l.each(_e.settings,function(f,h){f=h.nScrollHead?l("table",h.nScrollHead)[0]:null;var x=h.nScrollFoot?l("table",h.nScrollFoot)[0]:null;(h.nTable===i||f===i||x===i)&&(s=!0)}),s)},_e.tables=_e.fnTables=function(t){var i=!1;l.isPlainObject(t)&&(i=t.api,t=t.visible);var s=l.map(_e.settings,function(f){if(!t||t&&l(f.nTable).is(":visible"))return f.nTable});return i?new ct(s):s},_e.camelToHungarian=M,We("$()",function(t,i){return i=this.rows(i).nodes(),i=l(i),l([].concat(i.filter(t).toArray(),i.find(t).toArray()))}),l.each(["on","one","off"],function(t,i){We(i+"()",function(){var s=Array.prototype.slice.call(arguments);s[0]=l.map(s[0].split(/\s/),function(h){return h.match(/\.dt\b/)?h:h+".dt"}).join(" ");var f=l(this.tables().nodes());return f[i].apply(f,s),this})}),We("clear()",function(){return this.iterator("table",function(t){Z(t)})}),We("settings()",function(){return new ct(this.context,this.context)}),We("init()",function(){var t=this.context;return t.length?t[0].oInit:null}),We("data()",function(){return this.iterator("table",function(t){return en(t.aoData,"_aData")}).flatten()}),We("destroy()",function(t){return t=t||!1,this.iterator("table",function(i){var s=i.nTableWrapper.parentNode,f=i.oClasses,h=i.nTable,x=i.nTBody,g=i.nTHead,y=i.nTFoot,e=l(h);x=l(x);var o,n=l(i.nTableWrapper),a=l.map(i.aoData,function(p){return p.nTr});i.bDestroying=!0,De(i,"aoDestroyCallback","destroy",[i]),t||new ct(i).columns().visible(!0),n.off(".DT").find(":not(tbody *)").off(".DT"),l(ae).off(".DT-"+i.sInstance),h!=g.parentNode&&(e.children("thead").detach(),e.append(g)),y&&h!=y.parentNode&&(e.children("tfoot").detach(),e.append(y)),i.aaSorting=[],i.aaSortingFixed=[],$(i),l(a).removeClass(i.asStripeClasses.join(" ")),l("th, td",g).removeClass(f.sSortable+" "+f.sSortableAsc+" "+f.sSortableDesc+" "+f.sSortableNone),x.children().detach(),x.append(a),e[g=t?"remove":"detach"](),n[g](),!t&&s&&(s.insertBefore(h,i.nTableReinsertBefore),e.css("width",i.sDestroyWidth).removeClass(f.sTable),(o=i.asDestroyStripes.length)&&x.children().each(function(p){l(this).addClass(i.asDestroyStripes[p%o])})),-1!==(s=l.inArray(i,_e.settings))&&_e.settings.splice(s,1)})}),l.each(["column","row","cell"],function(t,i){We(i+"s().every()",function(s){var f=this.selector.opts,h=this;return this.iterator(i,function(x,g,y,e,n){s.call(h[i](g,"cell"===i?y:f,"cell"===i?f:b),g,y,e,n)})})}),We("i18n()",function(t,i,s){var f=this.context[0];return(t=Rn(t)(f.oLanguage))===b&&(t=i),s!==b&&l.isPlainObject(t)&&(t=t[s]!==b?t[s]:t._),t.replace("%d",s)}),_e.version="1.11.3",_e.settings=[],_e.models={},_e.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,return:!1},_e.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},_e.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},_e.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch{return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,i){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(i))}catch{}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:l.extend({},_e.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},Y(_e.defaults),_e.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},Y(_e.defaults.column),_e.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:b,oAjaxData:b,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==qe(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==qe(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,i=this._iDisplayStart,s=i+t,f=this.aiDisplay.length,h=this.oFeatures,x=h.bPaginate;return h.bServerSide?!1===x||-1===t?i+f:Math.min(i+t,this._iRecordsDisplay):!x||s>f||-1===t?f:s},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},_e.ext=ut={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:_e.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:_e.version},l.extend(ut,{afnFiltering:ut.search,aTypes:ut.type.detect,ofnSearch:ut.type.search,oSort:ut.type.order,afnSortData:ut.order,aoFeatures:ut.feature,oApi:ut.internal,oStdClasses:ut.classes,oPagination:ut.pager}),l.extend(_e.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var rr=_e.ext.pager;l.extend(rr,{simple:function(t,i){return["previous","next"]},full:function(t,i){return["first","previous","next","last"]},numbers:function(t,i){return[Qt(t,i)]},simple_numbers:function(t,i){return["previous",Qt(t,i),"next"]},full_numbers:function(t,i){return["first","previous",Qt(t,i),"next","last"]},first_last_numbers:function(t,i){return["first",Qt(t,i),"last"]},_numbers:Qt,numbers_length:7}),l.extend(!0,_e.ext.renderer,{pageButton:{_:function(t,i,s,f,h,x){var n,a,g=t.oClasses,y=t.oLanguage.oPaginate,e=t.oLanguage.oAria.paginate||{},o=0,p=function(C,U){var N,Q=g.sPageButtonDisabled,ne=function(Te){zt(t,Te.data.action,!0)},ve=0;for(N=U.length;ve").appendTo(C);p(le,re)}else{switch(n=null,a=re,le=t.iTabIndex,re){case"ellipsis":C.append('');break;case"first":n=y.sFirst,0===h&&(le=-1,a+=" "+Q);break;case"previous":n=y.sPrevious,0===h&&(le=-1,a+=" "+Q);break;case"next":n=y.sNext,(0===x||h===x-1)&&(le=-1,a+=" "+Q);break;case"last":n=y.sLast,(0===x||h===x-1)&&(le=-1,a+=" "+Q);break;default:n=t.fnFormatNumber(re+1),a=h===re?g.sPageButtonActive:""}null!==n&&(q(le=l("",{class:g.sPageButton+" "+a,"aria-controls":t.sTableId,"aria-label":e[re],"data-dt-idx":o,tabindex:le,id:0===s&&"string"==typeof re?t.sTableId+"_"+re:null}).html(n).appendTo(C),{action:re},ne),o++)}}};try{var w=l(i).find(se.activeElement).data("dt-idx")}catch{}p(l(i).empty(),f),w!==b&&l(i).find("[data-dt-idx="+w+"]").trigger("focus")}}}),l.extend(_e.ext.type.detect,[function(t,i){return kn(t,i=i.oLanguage.sDecimal)?"num"+i:null},function(t,i){return(!t||t instanceof Date||Mt.test(t))&&(null!==(i=Date.parse(t))&&!isNaN(i)||$t(t))?"date":null},function(t,i){return kn(t,i=i.oLanguage.sDecimal,!0)?"num-fmt"+i:null},function(t,i){return Fn(t,i=i.oLanguage.sDecimal)?"html-num"+i:null},function(t,i){return Fn(t,i=i.oLanguage.sDecimal,!0)?"html-num-fmt"+i:null},function(t,i){return $t(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),l.extend(_e.ext.type.search,{html:function(t){return $t(t)?t:"string"==typeof t?t.replace(At," ").replace(Zt,""):""},string:function(t){return $t(t)?t:"string"==typeof t?t.replace(At," "):t}});var jn=function(t,i,s,f){return 0===t||t&&"-"!==t?(i&&(t=Tn(t,i)),t.replace&&(s&&(t=t.replace(s,"")),f&&(t=t.replace(f,""))),1*t):-1/0};l.extend(ut.type.order,{"date-pre":function(t){return t=Date.parse(t),isNaN(t)?-1/0:t},"html-pre":function(t){return $t(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return $t(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,i){return ti?1:0},"string-desc":function(t,i){return ti?-1:0}}),St(""),l.extend(!0,_e.ext.renderer,{header:{_:function(t,i,s,f){l(t.nTable).on("order.dt.DT",function(h,x,g,y){t===x&&(h=s.idx,i.removeClass(f.sSortAsc+" "+f.sSortDesc).addClass("asc"==y[h]?f.sSortAsc:"desc"==y[h]?f.sSortDesc:s.sSortingClass))})},jqueryui:function(t,i,s,f){l("
").addClass(f.sSortJUIWrapper).append(i.contents()).append(l("").addClass(f.sSortIcon+" "+s.sSortingClassJUI)).appendTo(i),l(t.nTable).on("order.dt.DT",function(h,x,g,y){t===x&&(h=s.idx,i.removeClass(f.sSortAsc+" "+f.sSortDesc).addClass("asc"==y[h]?f.sSortAsc:"desc"==y[h]?f.sSortDesc:s.sSortingClass),i.find("span."+f.sSortIcon).removeClass(f.sSortJUIAsc+" "+f.sSortJUIDesc+" "+f.sSortJUI+" "+f.sSortJUIAscAllowed+" "+f.sSortJUIDescAllowed).addClass("asc"==y[h]?f.sSortJUIAsc:"desc"==y[h]?f.sSortJUIDesc:s.sSortingClassJUI))})}}});var zn=function(t){return Array.isArray(t)&&(t=t.join(",")),"string"==typeof t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):t};return _e.render={number:function(t,i,s,f,h){return{display:function(x){if("number"!=typeof x&&"string"!=typeof x)return x;var g=0>x?"-":"",y=parseFloat(x);return isNaN(y)?zn(x):(y=y.toFixed(s),x=Math.abs(y),y=parseInt(x,10),x=s?i+(x-y).toFixed(s).substring(2):"",0===y&&0===parseFloat(x)&&(g=""),g+(f||"")+y.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+x+(h||""))}}},text:function(){return{display:zn,filter:zn}}},l.extend(_e.ext.internal,{_fnExternApiFunc:dt,_fnBuildAjax:me,_fnAjaxUpdate:Ae,_fnAjaxParameters:Le,_fnAjaxUpdateDraw:Ve,_fnAjaxDataSrc:Me,_fnAddColumn:D,_fnColumnOptions:H,_fnAdjustColumnSizing:P,_fnVisibleToColumnIndex:T,_fnColumnIndexToVisible:G,_fnVisbleColumns:X,_fnGetColumns:L,_fnColumnTypes:S,_fnApplyColumnDefs:d,_fnHungarianMap:Y,_fnCamelToHungarian:M,_fnLanguageCompat:B,_fnBrowserDetect:v,_fnAddData:u,_fnAddTr:r,_fnNodeToDataIndex:function(t,i){return i._DT_RowIndex!==b?i._DT_RowIndex:null},_fnNodeToColumnIndex:function(t,i,s){return l.inArray(s,t.aoData[i].anCells)},_fnGetCellData:m,_fnSetCellData:_,_fnSplitObjNotation:F,_fnGetObjectDataFn:Rn,_fnSetObjectDataFn:Sn,_fnGetDataMaster:E,_fnClearTable:Z,_fnDeleteIndex:W,_fnInvalidate:J,_fnGetRowElements:K,_fnCreateTr:ee,_fnBuildHead:de,_fnDrawHead:ge,_fnDraw:ce,_fnReDraw:xe,_fnAddOptionsHtml:Oe,_fnDetectHeader:Ee,_fnGetUniqueThs:Ze,_fnFeatureHtmlFilter:Qe,_fnFilterComplete:Pe,_fnFilterCustom:Ge,_fnFilterColumn:it,_fnFilter:Ye,_fnFilterCreateSearch:be,_fnEscapeRegex:yn,_fnFilterData:Ne,_fnFeatureHtmlInfo:Tt,_fnUpdateInfo:lt,_fnInfoMacros:Ke,_fnInitialise:pt,_fnInitComplete:st,_fnLengthChange:wt,_fnFeatureHtmlLength:mt,_fnFeatureHtmlPaginate:tt,_fnPageChange:zt,_fnFeatureHtmlProcessing:an,_fnProcessingDisplay:Ct,_fnFeatureHtmlTable:Bt,_fnScrollDraw:qt,_fnApplyToChildren:Nt,_fnCalculateColumnWidths:Yt,_fnThrottle:Wn,_fnConvertToWidth:pn,_fnGetWidestNode:Ot,_fnGetMaxLenString:bt,_fnStringToCss:ft,_fnSortFlatten:nn,_fnSort:O,_fnSortAria:we,_fnSortListener:Ce,_fnSortAttachListener:je,_fnSortingClasses:$,_fnSortData:he,_fnSaveState:I,_fnLoadState:Se,_fnImplementState:Je,_fnSettingsFromNode:c,_fnLog:ue,_fnMap:fe,_fnBindAction:q,_fnCallbackReg:ie,_fnCallbackFire:De,_fnLengthOverflow:Be,_fnRenderer:ze,_fnDataSource:qe,_fnRowAttributes:pe,_fnExtend:A,_fnCalculateEnd:function(){}}),l.fn.dataTable=_e,_e.$=l,l.fn.dataTableSettings=_e.settings,l.fn.dataTableExt=_e.ext,l.fn.DataTable=function(t){return l(this).dataTable(t).api()},l.each(_e,function(t,i){l.fn.DataTable[t]=i}),_e}),($jscomp=$jscomp||{}).scope={},$jscomp.findInternal=function(l,ae,se){l instanceof String&&(l=String(l));for(var b=l.length,Y=0;Y<'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),l.extend(Y.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap5",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-select form-select-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),Y.ext.renderer.pageButton.bootstrap=function(M,B,z,j,v,k){var G,X,D=new Y.Api(M),H=M.oClasses,P=M.oLanguage.oPaginate,T=M.oLanguage.oAria.paginate||{},L=0,S=function(u,r){var m,_=function(W){W.preventDefault(),l(W.currentTarget).hasClass("disabled")||D.page()==W.data.action||D.page(W.data.action).draw("page")},F=0;for(m=r.length;F",{class:H.sPageButton+" "+X,id:0===z&&"string"==typeof E?M.sTableId+"_"+E:null}).append(l("",{href:"#","aria-controls":M.sTableId,"aria-label":T[E],"data-dt-idx":L,tabindex:M.iTabIndex,class:"page-link"}).html(G)).appendTo(u);M.oApi._fnBindAction(Z,{action:E},_),L++}}}};try{var d=l(B).find(se.activeElement).data("dt-idx")}catch{}S(l(B).empty().html('