From 2833dc3e895f39376bbbff364a96a1a9c72658ee Mon Sep 17 00:00:00 2001 From: Louis Hamelers Date: Tue, 1 Aug 2023 11:57:44 +0200 Subject: [PATCH] test --- .github/workflows/build-and-deploy.yml | 26 +- .github/workflows/build-and-upload.yml | 13 - docs/3rdpartylicenses.txt | 360 ----- docs/544.5d44ef17098c1bed.js | 1 - docs/651.7755222ad1202dfc.js | 1 - docs/assets/icons/icon-128x128.png | Bin 3599 -> 0 bytes docs/assets/icons/icon-144x144.png | Bin 6470 -> 0 bytes docs/assets/icons/icon-152x152.png | Bin 6993 -> 0 bytes docs/assets/icons/icon-192x192.png | Bin 10116 -> 0 bytes docs/assets/icons/icon-384x384.png | Bin 14364 -> 0 bytes docs/assets/icons/icon-48x48.png | Bin 1949 -> 0 bytes docs/assets/icons/icon-512x512.png | Bin 19775 -> 0 bytes docs/assets/icons/icon-72x72.png | Bin 2854 -> 0 bytes docs/assets/icons/icon-96x96.png | Bin 4367 -> 0 bytes docs/assets/style/contrasts.scss | 26 - docs/assets/style/index.scss | 2 - docs/assets/style/style.scss | 1 - docs/common.8ee7c8c18016ff28.js | 1 - docs/favicon.ico | Bin 948 -> 0 bytes docs/index.html | 18 - docs/main.e3281126c17c84c6.js | 1 - docs/manifest.webmanifest | 59 - docs/ngsw-worker.js | 1852 ------------------------ docs/ngsw.json | 95 -- docs/polyfills.a1e44b390d8b54b7.js | 1 - docs/runtime.58e6537a8b497331.js | 1 - docs/safety-worker.js | 1852 ------------------------ docs/styles.9c3710189f348294.css | 1 - docs/worker-basic.min.js | 1852 ------------------------ 29 files changed, 16 insertions(+), 6147 deletions(-) delete mode 100644 .github/workflows/build-and-upload.yml delete mode 100644 docs/3rdpartylicenses.txt delete mode 100644 docs/544.5d44ef17098c1bed.js delete mode 100644 docs/651.7755222ad1202dfc.js delete mode 100644 docs/assets/icons/icon-128x128.png delete mode 100644 docs/assets/icons/icon-144x144.png delete mode 100644 docs/assets/icons/icon-152x152.png delete mode 100644 docs/assets/icons/icon-192x192.png delete mode 100644 docs/assets/icons/icon-384x384.png delete mode 100644 docs/assets/icons/icon-48x48.png delete mode 100644 docs/assets/icons/icon-512x512.png delete mode 100644 docs/assets/icons/icon-72x72.png delete mode 100644 docs/assets/icons/icon-96x96.png delete mode 100644 docs/assets/style/contrasts.scss delete mode 100644 docs/assets/style/index.scss delete mode 100644 docs/assets/style/style.scss delete mode 100644 docs/common.8ee7c8c18016ff28.js delete mode 100644 docs/favicon.ico delete mode 100644 docs/index.html delete mode 100644 docs/main.e3281126c17c84c6.js delete mode 100644 docs/manifest.webmanifest delete mode 100755 docs/ngsw-worker.js delete mode 100644 docs/ngsw.json delete mode 100644 docs/polyfills.a1e44b390d8b54b7.js delete mode 100644 docs/runtime.58e6537a8b497331.js delete mode 100755 docs/safety-worker.js delete mode 100644 docs/styles.9c3710189f348294.css delete mode 100755 docs/worker-basic.min.js diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index fb4f592..b9661ab 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -3,17 +3,23 @@ on: push: branches: - master + - feature/ci jobs: + # Build job build: - runs-on: ubuntu-latest + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + # Specify runner + deployment step + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: All things angular - uses: AhsanAyaz/angular-deploy-gh-pages-actions@v1.3.2 ## replace by latest version without it you will see Expected format {org}/{repo}[/path]@ref. Actual 'AhsanAyaz/angular-deploy-gh-pages-actions',Input string was not in a correct format. - with: - github_access_token: ${{ secrets.GH_CREDENTIALS }} # see the Configuration section for how you can create secrets - build_configuration: production # The build environment for the app. please look configurations in your angular.json - base_href: /sudoku/ # make sure this corresponds to https://.github.io// - deploy_branch: gh-pages # The branch the action should deploy to. - angular_dist_build_folder: dist/sudoku-app # The folder where your project is supposed to be after running ng build by the action. + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action diff --git a/.github/workflows/build-and-upload.yml b/.github/workflows/build-and-upload.yml deleted file mode 100644 index a67a8c6..0000000 --- a/.github/workflows/build-and-upload.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Build and Deploy -on: - push: - branches: - - master -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@v1.0.9 diff --git a/docs/3rdpartylicenses.txt b/docs/3rdpartylicenses.txt deleted file mode 100644 index cce2440..0000000 --- a/docs/3rdpartylicenses.txt +++ /dev/null @@ -1,360 +0,0 @@ -@angular/common -MIT - -@angular/core -MIT - -@angular/fire -MIT - -@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/auth -Apache-2.0 - -@firebase/component -Apache-2.0 - -@firebase/firestore -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/util -Apache-2.0 - -@firebase/webchannel-wrapper -Apache-2.0 - -@ngrx/effects -MIT - -@ngrx/store -MIT - -@ngrx/store-devtools -MIT - -firebase/analytics - -firebase/app - -firebase/app-check - -firebase/auth - -firebase/firestore - -firebase/messaging - -firebase/remote-config - -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. - - -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. - - - -sudoku-gen -ISC - -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-2022 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/docs/544.5d44ef17098c1bed.js b/docs/544.5d44ef17098c1bed.js deleted file mode 100644 index a88aa45..0000000 --- a/docs/544.5d44ef17098c1bed.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksudoku_app=self.webpackChunksudoku_app||[]).push([[544],{9544:(Y,b,i)=>{i.r(b),i.d(b,{GameModule:()=>J});var l=i(6895),h=i(1869),x=i(1577),d=i(4004),v=i(1365),f=i(9300),g=i(7579),w=i(4986),C=i(2805),y=i(2722),p=i(6511),s=i(6767),_=i(2340),t=i(4650),m=i(2997);let O=(()=>{class e{transform(o){return null!=o?~~(o/3):-1}}return e.\u0275fac=function(o){return new(o||e)},e.\u0275pipe=t.Yjl({name:"blockIndex",type:e,pure:!0}),e})();function Z(e,r){if(1&e){const o=t.EpF();t.TgZ(0,"div",3),t.NdJ("click",function(){const c=t.CHM(o).index,u=t.oxw().index,Q=t.oxw(2);return t.KtG(Q.onFieldClick({row:u,col:c}))}),t.ALo(1,"blockIndex"),t.ALo(2,"blockIndex"),t.ALo(3,"blockIndex"),t.ALo(4,"blockIndex"),t.TgZ(5,"div",4),t._uU(6),t.qZA()()}if(2&e){const o=r.$implicit,n=r.index,a=t.oxw().index,c=t.oxw().ngIf;t.ekj("top",a%3==0)("bottom",a%3==2)("left",n%3==0)("right",n%3==2)("rounded-tl-md",0===n&&0===a)("rounded-tr-md",8===n&&0===a)("rounded-br-md",8===n&&8===a)("rounded-bl-md",0===n&&8===a)("highlight",t.lcZ(1,25,null==c.activeFieldCell?null:c.activeFieldCell.row)===t.lcZ(2,27,a)&&t.lcZ(3,29,null==c.activeFieldCell?null:c.activeFieldCell.col)===t.lcZ(4,31,n)||a===(null==c.activeFieldCell?null:c.activeFieldCell.row)||n===(null==c.activeFieldCell?null:c.activeFieldCell.col))("highlight-wrong",o.value!==o.answer&&void 0!==o.value)("highlight-same",(null==c.activeFieldCell?null:c.activeFieldCell.value)&&(null==c.activeFieldCell?null:c.activeFieldCell.value)===(null==o?null:o.value))("active",(null==c.activeFieldCell?null:c.activeFieldCell.col)===n&&(null==c.activeFieldCell?null:c.activeFieldCell.row)===a),t.xp6(6),t.Oqu(o.value)}}function I(e,r){if(1&e&&(t.ynx(0),t.YNc(1,Z,7,33,"div",2),t.BQk()),2&e){const o=r.$implicit;t.xp6(1),t.Q6J("ngForOf",o)}}function T(e,r){if(1&e&&(t.ynx(0),t.YNc(1,I,2,1,"ng-container",1),t.BQk()),2&e){const o=r.ngIf;t.xp6(1),t.Q6J("ngForOf",o.board)}}let M=(()=>{class e{constructor(o){this.store=o,this.destroy$=new g.x,this.gameState$=this.store.select(s.fS)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onFieldClick(o){this.store.dispatch((0,p.qN)({cell:o}))}}return e.\u0275fac=function(o){return new(o||e)(t.Y36(m.yh))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-board"]],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],["class","cell",3,"top","bottom","left","right","rounded-tl-md","rounded-tr-md","rounded-br-md","rounded-bl-md","highlight","highlight-wrong","highlight-same","active","click",4,"ngFor","ngForOf"],[1,"cell",3,"click"],[1,"value"]],template:function(o,n){1&o&&(t.YNc(0,T,2,1,"ng-container",0),t.ALo(1,"async")),2&o&&t.Q6J("ngIf",t.lcZ(1,1,n.gameState$))},dependencies:[l.sg,l.O5,l.Ov,O],styles:['[_nghost-%COMP%]{display:grid;grid-template-columns:repeat(9,1fr);--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.cell[_ngcontent-%COMP%]{position:relative;cursor:pointer;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}@media (prefers-color-scheme: dark){.cell[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-color:rgb(63 63 70 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity))}}.cell.top[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-top-color:rgb(156 163 175 / var(--tw-border-opacity))}@media (prefers-color-scheme: dark){.cell.top[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-top-color:rgb(82 82 91 / var(--tw-border-opacity))}}.cell.bottom[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-bottom-color:rgb(156 163 175 / var(--tw-border-opacity))}@media (prefers-color-scheme: dark){.cell.bottom[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-bottom-color:rgb(82 82 91 / var(--tw-border-opacity))}}.cell.left[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-left-color:rgb(156 163 175 / var(--tw-border-opacity))}@media (prefers-color-scheme: dark){.cell.left[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-left-color:rgb(82 82 91 / var(--tw-border-opacity))}}.cell.right[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-right-color:rgb(156 163 175 / var(--tw-border-opacity))}@media (prefers-color-scheme: dark){.cell.right[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-right-color:rgb(82 82 91 / var(--tw-border-opacity))}}.cell.highlight[_ngcontent-%COMP%]{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}@media (prefers-color-scheme: dark){.cell.highlight[_ngcontent-%COMP%]{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}}.cell.highlight-same[_ngcontent-%COMP%]{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}@media (prefers-color-scheme: dark){.cell.highlight-same[_ngcontent-%COMP%]{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}}.cell.highlight-wrong[_ngcontent-%COMP%]{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}@media (prefers-color-scheme: dark){.cell.highlight-wrong[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity))}.cell.active[_ngcontent-%COMP%]{border-width:2px}}.cell.active.active[_ngcontent-%COMP%]:not(.highlight-wrong){--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}@media (prefers-color-scheme: dark){.cell.active.active[_ngcontent-%COMP%]:not(.highlight-wrong){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity))}}.cell[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;font-size:20px;cursor:pointer;display:flex;justify-content:center;align-items:center}.cell[_ngcontent-%COMP%]:after{content:"";display:block;padding-top:100%;width:100%}']}),e})();function F(e,r){if(1&e){const o=t.EpF();t.TgZ(0,"button",5),t.NdJ("click",function(){const c=t.CHM(o).$implicit,u=t.oxw(2);return t.KtG(u.onInputClick(c))}),t.TgZ(1,"span"),t._uU(2),t.qZA()()}if(2&e){const o=r.$implicit,n=r.index,a=t.oxw().ngIf;t.Q6J("disabled",9===a[n]),t.xp6(2),t.Oqu(o)}}function A(e,r){if(1&e){const o=t.EpF();t.TgZ(0,"div",1),t.YNc(1,F,3,2,"button",2),t.TgZ(2,"button",3),t.NdJ("click",function(){t.CHM(o);const a=t.oxw();return t.KtG(a.onClearClick())}),t.TgZ(3,"span",4),t._uU(4," delete "),t.qZA()()()}if(2&e){const o=t.oxw();t.xp6(1),t.Q6J("ngForOf",o.inputValues)}}let P=(()=>{class e{constructor(o){this.store=o,this.destroy$=new g.x,this.usedNumbers$=this.store.select(s.XR).pipe((0,y.R)(this.destroy$)),this.inputValues=[1,2,3,4,5,6,7,8,9]}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onInputClick(o){this.store.dispatch((0,p.sO)({value:o}))}onClearClick(){this.store.dispatch((0,p.EU)())}}return e.\u0275fac=function(o){return new(o||e)(t.Y36(m.yh))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-input"]],decls:2,vars:3,consts:[["class","grid gap-4 select-none grid-cols-5 items-stretch",4,"ngIf"],[1,"grid","gap-4","select-none","grid-cols-5","items-stretch"],["class","h-12 rounded-md dark:text-zinc-400 contr-border",3,"disabled","click",4,"ngFor","ngForOf"],[1,"h-12","rounded-md","contr-red-border",3,"click"],[1,"material-icons","text-s","mt-1"],[1,"h-12","rounded-md","dark:text-zinc-400","contr-border",3,"disabled","click"]],template:function(o,n){1&o&&(t.YNc(0,A,5,1,"div",0),t.ALo(1,"async")),2&o&&t.Q6J("ngIf",t.lcZ(1,1,n.usedNumbers$))},dependencies:[l.sg,l.O5,l.Ov]}),e})();var $=i(9481);function U(e,r){if(1&e&&(t.ynx(0),t.TgZ(1,"span",10),t._uU(2),t.qZA(),t.BQk()),2&e){const o=r.ngIf;t.xp6(2),t.Oqu(o)}}function N(e,r){if(1&e&&(t.ynx(0),t.TgZ(1,"span",11),t._uU(2),t.ALo(3,"date"),t.qZA(),t.BQk()),2&e){const o=r.ngIf;t.xp6(2),t.Oqu(t.xi3(3,1,o,"yyyy-MM-dd"))}}function B(e,r){if(1&e&&(t.TgZ(0,"div",12)(1,"span",13),t._uU(2,"mistakes:"),t.qZA(),t.TgZ(3,"span",14),t._uU(4),t.qZA()()),2&e){const o=r.ngIf,n=t.oxw();t.xp6(3),t.ekj("warning",o.value>=n.maxMistakes),t.xp6(1),t.AsE(" ",o.value,"/",n.maxMistakes," ")}}function G(e,r){if(1&e&&(t.TgZ(0,"div",15)(1,"span"),t._uU(2),t.ALo(3,"gameTime"),t.qZA(),t.TgZ(4,"span",16),t._uU(5," timer "),t.qZA()()),2&e){const o=r.ngIf;t.xp6(2),t.Oqu(t.lcZ(3,1,o.value))}}const z=[{path:"",component:(()=>{class e{constructor(o){this.store=o,this.gameTitle$=(0,x.a)([this.store.select(s.AG),this.store.select(s.pK)]).pipe((0,d.U)(([n,a])=>a??n)),this.gameDate$=this.store.select(s.vj).pipe((0,v.M)(this.gameTitle$),(0,f.h)(([,n])=>"daily sudoku"===n?.toLowerCase()),(0,d.U)(([n])=>n)),this.mistakes$=this.store.select(s.i2).pipe((0,d.U)(n=>({value:n}))),this.time$=this.store.select(s.qR).pipe((0,d.U)(n=>({value:n}))),this.destroy$=new g.x,this.maxMistakes=_.N.maxErrors}ngOnInit(){(function k(e=0,r=w.z){return e<0&&(e=0),(0,C.H)(e,e,r)})(1e3).pipe((0,y.R)(this.destroy$)).subscribe(()=>this.store.dispatch((0,p.aT)()))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}}return e.\u0275fac=function(o){return new(o||e)(t.Y36(m.yh))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-game"]],decls:21,vars:12,consts:[[1,"h-screen","dark:bg-zinc-800","p-7","flex","flex-col","justify-between","align-stretch"],[1,"mb-4","flex","justify-between"],[1,"flex","flex-col"],[4,"ngIf"],["class","flex items-end",4,"ngIf"],[1,"mb-2"],["class","text-gray-600 dark:text-zinc-400 uppercase text-xs mb-7 flex flex-row-reverse",4,"ngIf"],["routerLink","../",1,"rounded-md","contr-border","dark:text-zinc-400","flex","items-center","justify-center","h-12"],[1,"material-icons","text-s","mr-2"],[1,"uppercase"],[1,"capitalize","text-gray-600","dark:text-zinc-400","text-2xl"],[1,"text-gray-400","dark:text-zinc-500","text-sm"],[1,"flex","items-end"],[1,"text-gray-600","dark:text-zinc-500","uppercase","text-xs"],[1,"text-red-500","text-xs","ease-in-out","duration-100","ml-2"],[1,"text-gray-600","dark:text-zinc-400","uppercase","text-xs","mb-7","flex","flex-row-reverse"],[1,"material-icons-outlined","text-xs","mr-1","text-gray-600","dark:text-zinc-400"]],template:function(o,n){1&o&&(t.TgZ(0,"div",0)(1,"div")(2,"div",1)(3,"div",2),t.YNc(4,U,3,1,"ng-container",3),t.ALo(5,"async"),t.YNc(6,N,4,4,"ng-container",3),t.ALo(7,"async"),t.qZA(),t.YNc(8,B,5,4,"div",4),t.ALo(9,"async"),t.qZA(),t.TgZ(10,"div",5),t._UZ(11,"app-board"),t.qZA(),t.YNc(12,G,6,3,"div",6),t.ALo(13,"async"),t.TgZ(14,"div"),t._UZ(15,"app-input"),t.qZA()(),t.TgZ(16,"button",7)(17,"span",8),t._uU(18," home "),t.qZA(),t.TgZ(19,"span",9),t._uU(20," home "),t.qZA()()()),2&o&&(t.xp6(4),t.Q6J("ngIf",t.lcZ(5,4,n.gameTitle$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(7,6,n.gameDate$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(9,8,n.mistakes$)),t.xp6(4),t.Q6J("ngIf",t.lcZ(13,10,n.time$)))},dependencies:[l.O5,h.rH,M,P,l.Ov,l.uU,$.o],styles:[".warning[_ngcontent-%COMP%]{margin-left:.25rem;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));padding-left:.25rem;padding-right:.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (prefers-color-scheme: dark){.warning[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity))}}"]}),e})()},{path:"winner",component:(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-win"]],decls:3,vars:0,consts:[[1,"flex","flex-col","justify-center","items-center","w-screen","h-screen","dark:bg-zinc-900"],[1,"dark:text-gray-50"]],template:function(o,n){1&o&&(t.TgZ(0,"div",0)(1,"span",1),t._uU(2,"YOU WIN!"),t.qZA()())}}),e})()}];var L=i(4466);let J=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[l.ez,h.Bz.forChild(z),L.m]}),e})()}}]); \ No newline at end of file diff --git a/docs/651.7755222ad1202dfc.js b/docs/651.7755222ad1202dfc.js deleted file mode 100644 index 263c85f..0000000 --- a/docs/651.7755222ad1202dfc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksudoku_app=self.webpackChunksudoku_app||[]).push([[651],{651:(H,s,o)=>{o.r(s),o.d(s,{HomeModule:()=>T});var c=o(6895),l=o(1869),d=o(9300),u=o(4004),m=o(6511),p=o(7753),g=o(2340),e=o(4650),x=o(2997),f=o(1899),y=o(3602),v=o(9481);function C(n,i){if(1&n&&(e.ynx(0),e._UZ(1,"hr",13),e.TgZ(2,"div",14)(3,"div",15)(4,"span",16),e._uU(5,"mistakes:"),e.qZA(),e.TgZ(6,"span",17),e._uU(7),e.qZA()(),e.TgZ(8,"div",18)(9,"span"),e._uU(10),e.ALo(11,"gameTime"),e.qZA(),e.TgZ(12,"span",19),e._uU(13," timer "),e.qZA()()(),e.BQk()),2&n){const t=e.oxw().ngIf,r=e.oxw();e.xp6(6),e.ekj("warning",t.errors>=r.maxMistakes),e.xp6(1),e.AsE(" ",t.errors,"/",r.maxMistakes," "),e.xp6(3),e.Oqu(e.lcZ(11,5,t.timeInSeconds))}}function Z(n,i){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"span",9),e._uU(2),e.qZA(),e.TgZ(3,"span",10),e._uU(4),e.ALo(5,"date"),e.qZA(),e.YNc(6,C,14,7,"ng-container",11),e.TgZ(7,"button",12),e.NdJ("click",function(){const A=e.CHM(t).ngIf,w=e.oxw();return e.KtG(w.playGame(A))}),e._uU(8),e.qZA(),e.BQk()}if(2&n){const t=i.ngIf;e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Oqu(e.xi3(5,4,t.date,"yyyy-MM-dd")),e.xp6(2),e.Q6J("ngIf",t.saved),e.xp6(2),e.Oqu(t.saved?"continue":"play")}}function h(n,i){1&n&&(e.TgZ(0,"div",20)(1,"div",21),e.O4$(),e.TgZ(2,"svg",22),e._UZ(3,"path",23)(4,"path",24),e.qZA()()())}const k=[{path:"",component:(()=>{class n{constructor(t,r,a){this.store=t,this.dailyService=r,this.gameService=a,this.maxMistakes=g.N.maxErrors}ngOnInit(){this.dailyGame$=this.dailyService.dailyGameData$.pipe((0,d.h)(p.BX),(0,u.U)(t=>{const r=t?.date?.getTime().toString(),a=this.gameService.loadGame(r);return a?{...a,saved:!0}:{...t,errors:0}}))}playGame(t){const r={...t,timeInSeconds:t.timeInSeconds??0,activeCell:null};this.store.dispatch((0,m.wc)({game:r}))}onNewGameClick(t){this.store.dispatch((0,m.Qx)({difficulty:t}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.yh),e.Y36(f.S),e.Y36(y.h))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-home"]],decls:20,vars:4,consts:[[1,"flex","flex-col","justify-center","items-center","w-screen","h-screen","dark:bg-zinc-800"],[1,"flex","mb-8","mt-12"],[1,"text-3xl","dark:text-zinc-400"],[1,"text-xs","dark:text-zinc-400"],[1,"mb-4","p-6","text-sm","flex","flex-col","contr-border","rounded-md","w-2/3"],[4,"ngIf","ngIfElse"],["loading",""],[1,"flex","flex-col"],[1,"h-12","w-32","m-2","contr-border","rounded-md","dark:text-zinc-400",3,"click"],[1,"text-gray-600","dark:text-zinc-400"],[1,"text-gray-400","mb-3","dark:text-zinc-400"],[4,"ngIf"],[1,"h-14","w-full","rounded-md","contr-blue-border",3,"click"],[1,"h-px","mb-3","bg-gray-300","border-0","dark:bg-zinc-700"],[1,"flex","justify-between","mb-2"],[1,"flex","items-center","text-xs"],[1,"text-gray-600","dark:text-zinc-400","uppercase"],[1,"text-red-500","ease-in-out","duration-100","ml-2"],[1,"text-gray-600","dark:text-zinc-400","uppercase","flex","items-center","flex-row-reverse","text-xs"],[1,"material-icons-outlined","text-xs","mr-1","text-gray-600","dark:text-zinc-400"],[1,"flex","items-center","justify-center"],["aria-label","Loading...","role","status"],["viewBox","3 3 18 18",1,"h-6","w-6","animate-spin"],["d","M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z",1,"fill-gray-50"],["d","M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z",1,"fill-blue-600"]],template:function(t,r){if(1&t&&(e.TgZ(0,"div",0)(1,"span",1)(2,"h1",2),e._uU(3,"Sudoku"),e.qZA(),e.TgZ(4,"small",3),e._uU(5,"TM"),e.qZA()(),e.TgZ(6,"div",4),e.YNc(7,Z,9,7,"ng-container",5),e.ALo(8,"async"),e.YNc(9,h,5,0,"ng-template",null,6,e.W1O),e.qZA(),e.TgZ(11,"div",7)(12,"button",8),e.NdJ("click",function(){return r.onNewGameClick("easy")}),e._uU(13,"easy"),e.qZA(),e.TgZ(14,"button",8),e.NdJ("click",function(){return r.onNewGameClick("medium")}),e._uU(15,"medium"),e.qZA(),e.TgZ(16,"button",8),e.NdJ("click",function(){return r.onNewGameClick("hard")}),e._uU(17,"hard"),e.qZA(),e.TgZ(18,"button",8),e.NdJ("click",function(){return r.onNewGameClick("expert")}),e._uU(19,"expert"),e.qZA()()()),2&t){const a=e.MAs(10);e.xp6(7),e.Q6J("ngIf",e.lcZ(8,2,r.dailyGame$))("ngIfElse",a)}},dependencies:[c.O5,c.Ov,c.uU,v.o],styles:[".warning[_ngcontent-%COMP%]{margin-left:.25rem;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));padding-left:.25rem;padding-right:.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (prefers-color-scheme: dark){.warning[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity))}}"]}),n})()}];var b=o(4466);let T=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[c.ez,l.Bz.forChild(k),b.m]}),n})()}}]); \ No newline at end of file diff --git a/docs/assets/icons/icon-128x128.png b/docs/assets/icons/icon-128x128.png deleted file mode 100644 index 3a8657a4933c428e5bab96479895ea8d5295da7f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3599 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 QZ+L*2@dcw=1Gj|#0_R(N00000 diff --git a/docs/assets/icons/icon-144x144.png b/docs/assets/icons/icon-144x144.png deleted file mode 100644 index c2f8c1fb678d91f5a64983a9c5df1afa0c1cff36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6470 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 Ah5!Hn diff --git a/docs/assets/icons/icon-152x152.png b/docs/assets/icons/icon-152x152.png deleted file mode 100644 index 3e81cda94abcb9e07faabeaf3da5566bb7a9bf3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6993 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 Ll_V;~K;Zua>MWR% diff --git a/docs/assets/icons/icon-192x192.png b/docs/assets/icons/icon-192x192.png deleted file mode 100644 index 36f43b60a9d77630059c88a41fd17077cf81859d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10116 zcmchdRa6{pkcNA3cb6c+9fAb+-~@N~;O-tEguz{c4X#0h2X}|y?(P;Kz|Md6a_@J} znfY$orn{@^t>>-pD#|kGC?qHV0HDjsN~uBDuK&JB2+&`(ReMC}0&-K6kpQYE$c_Mj z5|EP;*YGwvGep$TkRg19DI@tm!jSQ7wSvnGuS!$f~Ns!J!gp)DS`j za16X^(=PM~|*?t%Y-u_<8*^l?*Z9Ki>6*6xTG>jnB z6fp#30Cml$#hwm?4ESKN=)vFs1RXD~S2(~mnoa{84Z!02ythpY>=M`5Aj<+exA&v{ z3c%0@lWClIpyu!_4V(tVTX#WdDM2RFE9`{qAj-*LX$3KuE=ZFxn-Ppy4hWnYEDgJP zw$kMN@`S!lL%*}u_8{w%d%eYB0aR92#t$!(@c!bhsc#H#Y)p}+z;iQf?*~yb9`R57 z=!ooOGwh$UyK44&qk1PA7@f>s2%M_U&e*pZmz3v?ed!x&CJ&k{po9KFH(9g!sQ;d6? z^-8Kbt8vIk^HB>f7zB{t#$e zl4@Mr6vl=}5kxBdgf`eK6W7S=HI{^WVonILnU-ipyUFF%u3i`WHUWFNA9L@K#-fTg zJ-VN765?MTos}cVX$KS*{)-um%cXQ&dBjFn9H{ZwQNv@_(ouc;!fE{5mAoq3uo+;`tRtGQ)azRJ-&eLm1zI=WE_c{< z@bJHy4}K=Kpdcr!%QyF2SgE>CrtFo`9@!AQ+!{!Q9FuT@@}}Kz2=F4jV@ZKO7Z* zGnN_Dg`Y4@G=>5ct}VWr{XizUNg z&@05c-W!M2*C(Z+qubiA67;^@#KytN+0vbH+qyt%g{g{*`BUDS>;!DFa(ygV0)lV< zDLeS>9L-8m<>Rv(!5IoPiWfw9sMPil*3>^YF@2z=g~y~287P}Qs0la_IemN`d?Ouc zKoixBB(Te>Nic5QZV7{@@2Gcp(r);)jhf2 z)*db#3_{#;qeCozh)7M-f_--iuqij?Jvj~o6z-pjPT`7@{YzoyZ#@qi&k8A4I(G9B zwM?h@g?H1NwjEGDsX`(gPsQk|>7Drt8i)N5J{{P40C=LuPJbiriK8ue<{47(G7HCdn%rn8cD#8NpQiXg=mx3T0pbMGn>$-$IZUs4?Poh%To51DcI6c zcs+zgQ3d`jGo=PCLgm_3a596dz5!wi0MV-nIMzf9$Rpa^`1~&fJ4an?fRpEYwZiU7 z(gG)@UXyL8k+49%O+u&uIu$4{X%TH^s1k^0%Ku=^)@6Q+x7r+tdhwA_%sqvvMXmY% zBz9d`fNSBPK}eM6jvbU&@n_D-Iu)Sg?B8gQ=~v}k#A(X%aU%&moJxCyz#+8WOZgq7 z_B{I00BE(Ot#@C30hBK7{*NexZ>>?A@%?`v(+UjOmDi+@_H`C2{A8jjPUw;qux~{TpR*3aOY`TaCTAjuG`4=Wo-mCb0qYN16 z8Wd~x-$PK&7U`XNKeMtmvuDS`10gZVV@_z(4~l+whi-3gKeLL93>d~$Je{$i02JW3 z8EQ4(K5IESmdMwst@nSAE>#UWT@=^_B__z0IK5)o^?03Vpl9&W?2rM&2h+)^HSfgy z)&F=qi+w8UOcZ3;8bSXV_fkH@BjYKBDxo}A{i_E9C_ci5(eSD9HvLBy3ec*8tATHiCz(?0&Cs@~}V&)l(TuPNF7wk+9N1{(?6nTVz z>+VpjgMMm()D<_V7AU zLWX!~D5nK$4nzw~W@?n+;gZ!`F>Bi;FL3e&iq011ndhr#s;W;A28;J)H1uSz2opkdlhmE@e6#qeIgNmH8K#vMvy1H!tDc$Rpa33y5wtp-jm;}9Wok*VWIrb)h>6XaM&(e;wC1awx zA{H7{HqWGcm*97g`OJH4ShY7(RAIAs8rtO4xbgNyBwL`tEH8;R(Yq}PBWI()Jp1_VWd4K8qnFJ(%)T6NX z_b9mVO81wUaOeSR&j}wz6kz+_@7X>bcQ?k_8o=(WaQ-5X* z$Yc8ZA2b2NuWCR-j-+Oo{@# zI4TLB5D~Je=%H+8L?%rZ@co1`%YE80Y#|PD=b^2~zdnk^#%BQI&GpC8sWg|QI)z0u zwXiR?av#wiiNi7^Yl?@#!;u2!@hl@Mkx4UggbVs^IMvgC#&Le_vHT$rKtO|A{=Kqq z_^0ev=pr`ZxGkLyN(MY&Q-Ao?HR8>GOY-RmVHVLU_7vlEA#0sRKFZ90l`!NaE2M+N zWz~6VB|>Jpg12WfNF;H?R(t3AY5IXb#UqnKDCUt<7YAC)hh%xidQqR@G{6z7CQR+M zHsX}emIPF;_369hk=bpShiFC#E)7>Y`ubmg>z39G9w-u*T?n{;apDE?`i(n$Vb2Tv z(|^7lP(IxmH&X@&m``;|M^-Z|IIV_dJzM+`d`pwXo%3O^{0E5?>u^9X|2&37o{0|} za=bWS68=@p{+h-2ST-}4%x;-Uy2B6m74dGqY~^IZsb{UCPSnw%>OSiza z-&KbIKU%28?Pw)i?iU|3Fol7I6e#G6<0eV4vv{SRr@WteLe6$-<=pB621VfDWsrQbkGU@XJ(6Q{nBxo`4C1VkHw+KigW_8c zljtXFT8(ZEFL%FCFA(N<<;kMUEo4iCU-uSy5#C=7F-MP|sL#4Zsbj<$gj_tlGh-U( zgV8c@*ojXCYm`i!>6sn!1-$+gn6q@;|1)q363dc42jGI=%P4Qg)e|~jZR77pDQ3RM zrk*P`&sk;AEdR))$?(;7jw#88*~&9o)d z(|XPUaJxmC9_Y`WPBGx3- zb|;EM=O+GVngaOaoy941fb7~YuL~*_veN@P6n2^oF9#{meq1iiq3~R^7I8*CcpF}} z$i~`k)XZhrOdf%qHk{)&2dxBFEpCP?C^J6t=74>x={^0`VD5qQo~_Vx=Vx;e+0CxR zcN}TeA~l~s)rKi40V65Q^c8k__pM05+_`=a6eN0RZ$}$+Nj#Z+PBa=nsg!{DoR-FV zRKAyQoLYRVRTS-X-Ztdr=4s*|U9LZCmPmdt8(K`UMa_fLoGaIo+LPb&z);aP4|T8k zY0wcODf$v&9QZ<>d>K{QFCU5F|GV8MUG=AORr%j?7vW?URgFb(3LgQ;xv+#iQ0SI9 zPV?@-qGIVC;rM*-dt@LdOvG0?@CJ`towD=2fkEr$2}V^623)ykz4Mi=e_H_N`MMv{ zQ_)-+gY!4}eotq|@3lFS8l1Osz+oFRMdO=+6X2kbXRLzaODt^5;Reow@r@{4_-VZJ zkYueBI8(8(jn0b)-~Ty_E22dyQmUbd2OAl{Z(6lZcwd%D&Z>C=dk^F^R?ChAi?UsR%z@&ISr+58!iGT`AT?1*M7f?9ygSt}UK*^da z!S>^ra6o2oE$&N=7lmj+R@C-ukhc4{-Nhk0vuC3&Zwaqompk?Vi21OT16e{sDoL{x6A@)wchAJp1BdFrE>Yd!+* zC)?3JZvHKuXnkV+S8N9D(L407eXp>h{{;bF5%K9l32O0EtSKY9^mmrFcLl|pU2&pd zUJ(A<;atIcfscZ-%4O&4+~n%n!tI`6k`UeaI0wIL+KFNiT#PB7TEDxGv@+HAoo zDLUKi2_mBOad5#HGbMc8rM0t*9hoxjm~n>qu`{&b8y(%@!u0@QF?JX40sphW0c!YMS7QoM%*6#5njO`vcW! zNO+CU3r_tI13jo~<%~OLHY7&x7lPY9E6hu%?fa(`k>;SJ`OpRHNkb{SgWs!5@e$Ty zZ|9ephai1YQnpS8So~8W(P7N2U#GjgRB?-sH^pVHFWVSaCQvRW4EGP38<&34?Hz2X z25->Zp3U+r{pwe(O(!NAIYGd{SkgJ7WlAaJRTY9?QumfxE*{1ec2|ZQJK0E|qy=u{ zc^|iDL$Kur*IU%>!X~m3_H861KAX+icxyB}gDT?;BOyPIKePvO3zszMojpxRbo0Cz zwDv3vs?RmWv$@ST#lQvU;QZJn4_<6^Sv6wtG?7`Ak5AhxkrK0Am`)*H^VX=?Pg|_9 zN*DRPisL#wrGszYHHf?zJNl0vv!2{t<4 zu(JKou(@RKypEzWKG0o8%sxJDmlEyw_P)P%)B8oEbJ4TY?t=DW03-Gp`R(5c=k4jv z#95I^NYE*$=+zFh*?EiW3H{cBU*1Q`GTJ*fq+O&z_$}~49F0UEXGQwTOuB}RF4S_E z*Am*iyFHYyJAEj52mKE%=QI6oVtbJyMY!~n9Fr^GU_#DNC9EM(M0M`n%JoAe0As@V zrbC1=FYqRUVJd4pSq?^Qa_xPGPd36?ONUB2m5+L2(|(E6FSt6!c!v;~iUP^$LKoq8 zSre1UQ_2p{&TA$0)?QurRm=_Lo*p@2*rf8nA>%2ubmeIYTRXDD1&42eO0^$4V=X#g z?*$`b(plhuR!{CyW3XUOH5%l|Il1uNvY(J@q@3j|-}W#QkKXQ4_|^VOnPf z%_7Rl{Opc5TvLNJj7k2mhb?|3%GuJ-6R^!4Dh*n#=N|94A~k--2Smz5JTfb%^_(pZLF3*R z>BlzA6XtCnCgLNq$x&B40zE6vOT;6@9r-j8jDX+D3+HhvfJCo+nS|zbx*10KHq4Ur zixEms-nDsMtiwWq51z(Ww#>U;M3e1i(=T;O52)QU_;x;P91C9?&}>%+$Plh=t2RpC zC-VD54t1=oRf!J75Th_xygl(A31XW6N&}`Om)ktwy11HD=@8#lfxpA`&lXGLAu484 zzEjPiaQ)_dwxE<^Qxi7`HfjW^7hnC<)?hc?zr8wKPjLcvs}9^mp~rAREOl)&7Gr?c z?fr7J;cst$YK8S?Y1Lp>k3E)A_9$%Uu9;Jp!;jy}rP+$!cf5QSzz`G;GI0}hM7QmZY!m{fR;!u}uJh3-#UwQ^uL# zy&1%dvh)>*gVLcs39ch0lVd2?=*3X0o-hg!cD`L?JpU<5+pkAR8luNj;VQHI@)CDS za{J}WdnNSIRL1WP`dX#eoQfi{y)wRE4Y;HR?(goo!8RO;6>z|V&TCf4`LlZQc=vu) zTbSNVhbT2m@Eq9=_S`IW)eN*L^sYSRC+;hLj1^BEYqbkIWFl;_;n@#o!zM{ee0y~_ z0S_bg6tZc-h}o=&a;S1uUPkUkK6}QgR0pq9Ep;)&EJY#GnFxODJ!XIu3 zL0%boO%~&S3v?hegs{SQNwFD?-@O*LsAz$qk}HFA!ax>A%!Hm%hC$cAmpXL^dTA2h z!dt6!YSGLfz47#3Y$2*5HUB)0m<$YLwyMQ^aklBPxSi&)Kp*Jp{+vRj{8MiL3X}j|p81^Ly5Q8z!veQx6Ss_As7wf+f4bk5T2S&Y!l39I|;>I_#?bJ}? zvE8!gew1&y5W(+8&BO&|f*Dlb%_O}0I@KU2ygQNs3w07+wF6*$3)+3}qAXjBr8-fm z3&KM;)CWtVGH?el2J=9|ibfA_wTi45z;5y9VXMd8onCCRR8|gG@~DZ zT?)QMTLQ>kZo%x zem;=)2>#}yXoaYy4QZL8_~I$mAowLlvRlX{Yv`_}=2F9`BQS%7~s9za`U!EK^msS$TFV z%P`BK1(F&GN|5H7DVq2mapZ7-kyyOBKMpI!#B?!U3(uD&v5E_LPx#rySWL;B5=+sK ztGA;UJ3LYFTg+8nbfB)ZpBys2L9p?3R?YfBXom}i9xvYVBO4z*PiY2x9(P)U+Zt+A z_@m1>$9U}g%l=-fFW>;SXK=x{D1g9Ujlxj(7j$%@Qe}vc*A|X{34DDyTe94Qij))A zhzQ}~ML3Rcn4mmR+AMj54!Fw>b#_{U2P);;MJU?j`)+sTV0ax~FtT_9zJb%KndWzG zNWs62WhXbP>;&D9r}Ug0pdu(Sd+)NC5ZIkeOT&*n-(1D%kHY`tiRed#`ZEgB^_+~i z+U7^G;(6M8yg1%d6w@$H6%;75zcM>e#yEOgTs4$)s7C`x(b9I&!vuHt(runDfnhqX zbh-3&yO&2$lK+)ie1}v5hS|$==`WPR@WCoC#$10KmRd;(q23t&0$s)33EwaYbBBr{ zyBfAyZJYg49mIYqv9gY)MLTIrS&7RBP#O3@vBAH3NXZkPs%2cLeKD=%cL^{3q0ED? z7*?V`^+=^uHFSuG3vxFrbA2ZGkPf=gHN%l5{CuqOB;8csD9-zAPiY*8VnJ_mFnVB9 zbC;mcqucQL&1aox^lgDiw{Foi;zDPa5NYxAEXL()01DXsi8P2b0F;YiBh#s8wdv=m zD4uwK7%<{Db#FN&7Hdze*|Hp29TF_#RM>P8?Ib%Mj8@|{gisOvPd?RZ2ZgGYGx4+h zra9Cu9J={GKA{OO@E_S#iARi!!ecD0m4*MgRx(*ueV)R+5T3Qi9#7b4>;FhmHJYCr zOG!ngYA1RN($AM5E^bi;d!CDQ-Q6}$Sj4bbXsC=g$yK#fEX6^s9#=cHVuW|9DK}ji zN#6E)xk(kS#tRAFnU{*Cxr+1iEZI~oME>$?zE|oAD!MaQ<`JPxAIhb9P8!YiNF1cf zH;L5;Ar2>2w&+>sPn@Jc@JTPE1%qnGO* zOqvj92YqZ;UPwpS0G=t6aS=)Vp$y+k>S>WJM0K!wtf>s*Da5dRM7Kw0hQ1tjHK3?R-z}h&f63l!qF31lQEP}%cTe-CY2bmlK^1F zv-0Puy3b!?Cxy?X#6QFBO&ZrT{m8|Fx7dBhQEu;DJ;ni&T45gY^a-+k! zy>YSlRstOGSt25U4b+vu&YywqNgAhKGKmbInuK^%39vVOnbR10_yp5cgZN{i4KA1f z8Jf9J%<0EWTw185mPsB=tBFqdrNXkWWC0}b2xT-5@FgGOzhDzfL(G*di4ReDmjX|4ib z6Mr$iQ?ki9f(UKauo458>WZ+ik0(U}Qxf5V)xMXFvV$(a3$Yutqdg>uu*g**;j^S; zZcznB;mQ=})Ut4>re$%g9^bv3BtMsPcjK@PZ8 z!!4iK7XAV^N|uiag$3`0UsmJ+VDV~AMC)8bYDbdVX}%EDbMPDzHFuh$=1GF=0xeMFC z)N&c}@qAe<)a+S}7sKJ>Z@xQS2PM(RnmlsPK{sopEw2;>!-}P{WQfa|m0{%|?LC%A zsgQ@$hDtrry+a06<%lCDw}Cv3X!nPUm9`K5ba86JU+dt4XVz45jbX&ZiVH7t_e6=I zWDm)i**w7su)J2w(uWaKf%x3)cgHr{r0N+cL79en=EyU2p{!3GCp8r>rKqzQhUBGq zY9Rx2Qf2Bg(3t4^lrh7w4UY0)`2IA*8wM8~ip~L4zy(X>s|8NXP3J@H;P{@@%q3bt z1G``%TSo{u)Xt7tclf>nU*1A1;h@hatrJNBodl3tY`m5Q4p}8S1Zr%6#pOkl&EOoO zJx;7{Duo&$U)ItFthgaY$B|uCBJR8rm1A5V_-(n{8{sA!;6DZYV`Zo$H*vic+FD(0 zykRZJz`$QqaoN+ACbo*uYyeNPpWl8FAOlKesKY$IE3qAy*T`o5ASeu0PPSd^?luZD zd>@Ad*!(t^!R(if3sLDsyjyGYV$iInT0mB@`Zn*QAG4vtEi5ozIYvm!=`?}ouUoX; zNhiPTLx(l zH1~(9$oSFo`C+woD8y+xR17*$ku*ALjs!)vOWmkG_CpyT1PR6-BzHb}w6qtGn79CW zenEdAOM0S4L9cfo5!#fnexqns=pj!l98hUjlSNH-L#GPT?Rev4cN*Auad;}Uw`y$z za^f%1)_l?X!@=6kFY$AJcTp-T>+juY!LY%y;Y6({<0!FxBXe0{D5g_eG)gm5-2vj# zoXJz&lAVwX;B$T?cR8QfCT*OS;o-~kgHAnLEdFC2&vmK6lG3G)dR%POePTy3$jLaDFEx|UACNwBm1)KaP<1R06v3cX?N{!$-r}Lu%IT_hZ zdn|%dGbF-F_tOWRwY50dznRDrpu80_PnL43yBuBfB$yI)9gb)=dGb&Ns{hvo*SRq= zGG3x0;qu0-Y9}+;&A@q?I-r*sFE}hllzrGoF;uWYYjst%O?5O}&UaiRsae1&`-B*H zPz}qnwb0>b)}s6+y0x*w+|WKu*@;9Q<|`av-IPo+Kt1J-oubJwFM# zA!Gydn))x*uN3Gc^ptA<6quFR^B98_gbq*8i1Zq#{oFdpjobMbu8{Ydl(d2Jki9g4 zp#XK;TzZ##928SjVS?-3T8V~8=6{CQ#1lKakFol*B^xz`32F_=9vMMl7*&@Oj%>f( zISq)irdJ-_!ae96ZvzEgEGga8Ga^B&Bm6{c7u53&=lzP*WE!BK-4tH0ea3kH=2r_D>k>NJ?s12Zdk?W7hObzhBa@;6tcV`@dc zD4==7Q>-i`dZsvOJ#f2ui}J3BK{Y#cNV=ki-!ZL*N3X$2$^XA`o91cB>1I{(`h_R| z)<9$+oL&aH7um>=?@FGLlJxry|2vdtOtJy@PAru&ElDihs^{BdG_R(>Q*;x?g`7A` zMrijotX5u|uQ;>vi|s%wW`R4UuaAbspf0M#77AOChKJ2m?Y^*rF?^ufGMP~wC+B^q z_)9Af%k^f-$e=wi6*Oh@@9_Zs+{F<}ac2VtT^}1b;|J(W=3(rYS{0geG0ybOX1u+! z6YZwGceCX;DDi6C?oXwm{y3_|7Cu$$&cSdtnEdHjleyN{>h5F?i+BEev}w7J6)aHa z8r65J7XOWetzScNXRCLx=Q)Q_oo;tDP3A(7caB}zKednh6LbooC+cyn-3Re=u1GIf zn?2!LBwRPDUhpHO(>m09sUsRmV~*(wNA2of&%wW&Dk)653{?u7wg*h8uTy6gt)b&! zveu;3CFTZD-AAOo?%LoEohb`;|3&30Fz}zf;j+gnqwxQ*S;!kmzT(n<^jC{M0R6~G LD@#>Nn1uchONTME diff --git a/docs/assets/icons/icon-384x384.png b/docs/assets/icons/icon-384x384.png deleted file mode 100644 index 6272045d138d2e52934bb7cfa9a2fc5d762fb2dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14364 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 diff --git a/docs/assets/icons/icon-512x512.png b/docs/assets/icons/icon-512x512.png deleted file mode 100644 index aad3c028f75af41810cb39e7115250f5f1a29416..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19775 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 diff --git a/docs/assets/icons/icon-72x72.png b/docs/assets/icons/icon-72x72.png deleted file mode 100644 index 039e53a4b8795ee8c95861c8fd4b1f6288df4695..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2854 zcmV+>3)%FEP)Px<;7LS5RCr$PTzOp0SsVYRQr0Y4OOgFGwkDdgD@0i$mBeJp*a|f*q>}6zg&F(4 z3}p)q$ynP%_EKbPcoEsjOL{-gk9+R@b?@!o%T=b^^WQz^Im`3?o#oliRm;AaQh+j& zihx=fKt->PGJs_4o-%;S0Q$NE_M5Muf`S6Pe)ASuTIHdsq49OIErHhG1faaUJnW4; z44)bE#YF1UyE{Td0#Kz&WwAP^5t9)cpTf$|pNWQU%^DJ6nZM`{tXQ>~)y19M3qu2a zr9-H6fRd6^G0N2wuU@^Des!v;A;51c#*QAw<0v(Sl$j~9ySP~K_2GHx* zZ;+gFo|QLg(g+3(>X&|iGBUGZX(c>#)z!-(c$ODN3?Cxbc~t6G5D92vW{rmrb9jI> zY1|Mt)|SxMtB3y9mZ(^gjt^%f(k@7;TVo_!qf=FMBFAk?i}3k&D@p_7>jr#y;M zsRu|P>|lFWT)3Eq_wV0J1*&2NZCpP8H_De6f}}D45h{-!J;viFxmfo5M*Ma7m_(qA z8X4f!vE8b1&C5E8)6z3>A0gv%6G*RAVM*tTgI_j|OfCypMAWpy!!{zS_bO(ga+VDM<1zi@@soj-E~ zx;3lI`c4YhE6o-Qo*RZW>;GgEh&!3TcIYC|+>1@aAr+o)2?tBwa+cy6}ROBXQ;v$@bvV77xkDtJ} zV_)7Rb*ffDyLPQu*|m%;F+GWHvT8b28Bf0fBXRl4HC{iYLp5$}$f*yPE~n$&yZ`a( zw`>SQkM8E*H$XHyx~(R<`QhWok8(|RUa&7l3?Izny_RtUwsvFj>h&AB`WQ3H5wrX~ zz&VfEYkqw(Wsmz(TnvO^o&H)kboB6xW6hWlJle0w}AaWudb%z@}G`Ks|n( z3s0Y596up+%S!5(d{4(?!eP|NP~xx+j5^Ai4y)h3c{#dvF)ew3Xa>XV2V&6zKdF=d z(X=lf9)^IK{H;j=08$u9We}wyw*6o`(26S}P1@5tnAaa|+xV0Fpr==t*Y4EmB)P?E z)4C<9SJx3=L2~yXg|YA!ljf5SUA7KOm#;&9{wHNpQ&ST+(qmDsTshYBm9z}>6$t>) z`4YA`5WOtBijCggawxKH-eKkBh}*e+#n*~casbiDUeo7dr-)H%ZuTR>x36TAGVeAB z+1WzRz~l)o@bQ``Rp@4|y5jBIJXW7@DiRGo2LiqpDWzTW@~$Akgc~(8V==VKl`A3b z;&G61NLmb92Impq!V)?uxu|u z_YDp8aX9)o#!d8PvP~NQGkm=#6)Ee1sH2$VF4U*oCy$1g$9QGngAxO%XKx3lcWG;D zAvO6hmor3HHeKBUYT2SGVh(LDQdm+QM1ujP;*d6I+z|zz6Oic^OTY9f>!Sb#FfbCT z`c!s3Jr>$pT2eu>cbb62q;sr(B>??>8t2%YJMQ-jhHviQt7NDP1PxgC3 z$O`nMZMDj^bbenXQ};o{F892pYJCPHuvc> zMC{_9C8C|_>(_(1nF(rCucpu#0%mf>Y}yim_wPTj_Qvg7W2l`C)I~f2k~$X+Xv!L# zGH*#?6_C;nX;}mRTkFdJlJVt~29Uh&jt38OVBU2Q&-p&a#Swx2)41EG@Oe>GQbNl% zJ$MQ0-y(sbSOKCZ3gpVTbXgdCZ`GUudl=vvI3^J7j=;Ea`46+-G43{wJKOfDhE(r-aAly z>&44gY%9&3?Sqldk`v5T3ZNN2Zs=fc%`-X)7y?KdsSH5mzW9)zkC>yU7#0-s-WySL z{9k1NBAuqNB~EX{=#5xWq%r_W17XRc0M33=`7I^@z@kTI96J%m@E~I~B_T?x$4{kJ zP{W1|aPnvbEUbnhE9*7`sm%{9aWHbDME8Ws07Q!5&5Q&F3WbwJ-?CC}H04MaCWFSN zytC_8W`e|gMC$8@b`~rfmd?DpS;q}1yN}Lky#=7ibq?kJSe0riRe+v8~EN-@5B_a5u2P90seXfF93 znW6y5;#V3#vIhFM)|UY!C;$Ke07*qoM6N<$ Ef)q_-<^TWy diff --git a/docs/assets/icons/icon-96x96.png b/docs/assets/icons/icon-96x96.png deleted file mode 100644 index 2dcf4a2e8d081ec73b978afb3edb8b52bb15c191..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4367 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 JPDHLkV1iP{n.d(t,{o:()=>u});var _=n(4650);let u=(()=>{class a{transform(r){return`${String(~~(r/60))}:${String(r%60).padStart(2,"0")}`}}return a.\u0275fac=function(r){return new(r||a)},a.\u0275pipe=_.Yjl({name:"gameTime",type:a,pure:!0}),a})()},4466:(s,t,n)=>{n.d(t,{m:()=>a});var _=n(6895),u=n(4650);let a=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=u.oAB({type:e}),e.\u0275inj=u.cJS({imports:[_.ez]}),e})()}}]); \ No newline at end of file diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index 997406ad22c29aae95893fb3d666c30258a09537..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 948 zcmV;l155mgP)CBYU7IjCFmI-B}4sMJt3^s9NVg!P0 z6hDQy(L`XWMkB@zOLgN$4KYz;j0zZxq9KKdpZE#5@k0crP^5f9KO};h)ZDQ%ybhht z%t9#h|nu0K(bJ ztIkhEr!*UyrZWQ1k2+YkGqDi8Z<|mIN&$kzpKl{cNP=OQzXHz>vn+c)F)zO|Bou>E z2|-d_=qY#Y+yOu1a}XI?cU}%04)zz%anD(XZC{#~WreV!a$7k2Ug`?&CUEc0EtrkZ zL49MB)h!_K{H(*l_93D5tO0;BUnvYlo+;yss%n^&qjt6fZOa+}+FDO(~2>G z2dx@=JZ?DHP^;b7*Y1as5^uphBsh*s*z&MBd?e@I>-9kU>63PjP&^#5YTOb&x^6Cf z?674rmSHB5Fk!{Gv7rv!?qX#ei_L(XtwVqLX3L}$MI|kJ*w(rhx~tc&L&xP#?cQow zX_|gx$wMr3pRZIIr_;;O|8fAjd;1`nOeu5K(pCu7>^3E&D2OBBq?sYa(%S?GwG&_0-s%_v$L@R!5H_fc)lOb9ZoOO#p`Nn`KU z3LTTBtjwo`7(HA6 z7gmO$yTR!5L>Bsg!X8616{JUngg_@&85%>W=mChTR;x4`P=?PJ~oPuy5 zU-L`C@_!34D21{fD~Y8NVnR3t;aqZI3fIhmgmx}$oc-dKDC6Ap$Gy>a!`A*x2L1v0 WcZ@i?LyX}70000 - - SudokuApp - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/main.e3281126c17c84c6.js b/docs/main.e3281126c17c84c6.js deleted file mode 100644 index 8643569..0000000 --- a/docs/main.e3281126c17c84c6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksudoku_app=self.webpackChunksudoku_app||[]).push([[179],{3692:(le,k,E)=>{E.d(k,{Ot:()=>z,ZF:()=>we,hX:()=>ye,z6:()=>O});var m=E(5867),M=E(4650),F=E(6351);class z{constructor(Se){return Se}}class O{constructor(){return(0,m.C6)()}}const Q=new M.OlP("angularfire2._apps"),K={provide:z,useFactory:function ee(Pe){return Pe&&1===Pe.length?Pe[0]:new z((0,m.Mq)())},deps:[[new M.FiY,Q]]},G={provide:O,deps:[[new M.FiY,Q]]};function H(Pe){return(Se,Le)=>{const nt=Se.runOutsideAngular(()=>Pe(Le));return new z(nt)}}let te=(()=>{class Pe{constructor(Le){(0,m.KN)("angularfire",F.q4.full,"core"),(0,m.KN)("angularfire",F.q4.full,"app"),(0,m.KN)("angular",M.q4F.full,Le.toString())}}return Pe.\u0275fac=function(Le){return new(Le||Pe)(M.LFG(M.Lbi))},Pe.\u0275mod=M.oAB({type:Pe}),Pe.\u0275inj=M.cJS({providers:[K,G]}),Pe})();function ye(Pe,...Se){return{ngModule:te,providers:[{provide:Q,useFactory:H(Pe),multi:!0,deps:[M.R0b,M.zs3,F.HU,...Se]}]}}const we=(0,F.u3)(m.ZF,!0)},7332:(le,k,E)=>{E.d(k,{gg:()=>nI,JU:()=>MC,ST:()=>xC,ad:()=>RC,cf:()=>OC,Cm:()=>AC,pl:()=>PC});var m=E(6351),M=E(4650),F=E(3692),z=E(5867),O=E(5861),W=E(2090),ee=E(9681),Q=E(1877),K=E(655),G=E(4859);const We=function we(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}},ot=new W.LL("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),Se=new Q.Yd("@firebase/auth");function Le(n,...e){Se.logLevel<=Q.in.ERROR&&Se.error(`Auth (${ee.Jn}): ${n}`,...e)}function nt(n,...e){throw pe(n,...e)}function _t(n,...e){return pe(n,...e)}function Be(n,e,t){const i=Object.assign(Object.assign({},We()),{[e]:t});return new W.LL("auth","Firebase",i).create(e,{appName:n.name})}function pe(n,...e){if("string"!=typeof n){const t=e[0],i=[...e.slice(1)];return i[0]&&(i[0].appName=n.name),n._errorFactory.create(t,...i)}return ot.create(n,...e)}function ne(n,e,...t){if(!n)throw pe(e,...t)}function Ae(n){const e="INTERNAL ASSERTION FAILED: "+n;throw Le(e),new Error(e)}function _e(n,e){n||Ae(e)}const Ze=new Map;function Xe(n){_e(n instanceof Function,"Expected a class definition");let e=Ze.get(n);return e?(_e(e instanceof n,"Instance stored in cache mismatched with class"),e):(e=new n,Ze.set(n,e),e)}function dn(){var n;return typeof self<"u"&&(null===(n=self.location)||void 0===n?void 0:n.protocol)||null}class Qt{constructor(e,t){this.shortDelay=e,this.longDelay=t,_e(t>e,"Short delay should be less than long delay!"),this.isMobile=(0,W.uI)()||(0,W.b$)()}get(){return function Sn(){return!(typeof navigator<"u"&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(function at(){return"http:"===dn()||"https:"===dn()}()||(0,W.ru)()||"connection"in navigator))||navigator.onLine}()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}class sn{static initialize(e,t,i){this.fetchImpl=e,t&&(this.headersImpl=t),i&&(this.responseImpl=i)}static fetch(){return this.fetchImpl?this.fetchImpl:typeof self<"u"&&"fetch"in self?self.fetch:void Ae("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 Ae("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 Ae("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const Br={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"},yr=new Qt(3e4,6e4);function pn(n,e,t,i){return rr.apply(this,arguments)}function rr(){return(rr=(0,O.Z)(function*(n,e,t,i,a={}){return xr(n,a,(0,O.Z)(function*(){let c={},h={};i&&("GET"===e?h=i:c={body:JSON.stringify(i)});const g=(0,W.xO)(Object.assign({key:n.config.apiKey},h)).slice(1),T=yield n._getAdditionalHeaders();return T["Content-Type"]="application/json",n.languageCode&&(T["X-Firebase-Locale"]=n.languageCode),sn.fetch()(gn(n,n.config.apiHost,t,g),Object.assign({method:e,headers:T,referrerPolicy:"no-referrer"},c))}))})).apply(this,arguments)}function xr(n,e,t){return ir.apply(this,arguments)}function ir(){return(ir=(0,O.Z)(function*(n,e,t){n._canInitEmulator=!1;const i=Object.assign(Object.assign({},Br),e);try{const a=new rt(n),c=yield Promise.race([t(),a.promise]);a.clearNetworkTimeout();const h=yield c.json();if("needConfirmation"in h)throw Pn(n,"account-exists-with-different-credential",h);if(c.ok&&!("errorMessage"in h))return h;{const g=c.ok?h.errorMessage:h.error.message,[T,x]=g.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===T)throw Pn(n,"credential-already-in-use",h);if("EMAIL_EXISTS"===T)throw Pn(n,"email-already-in-use",h);if("USER_DISABLED"===T)throw Pn(n,"user-disabled",h);const j=i[T]||T.toLowerCase().replace(/[_\s]+/g,"-");if(x)throw Be(n,j,x);nt(n,j)}}catch(a){if(a instanceof W.ZR)throw a;nt(n,"network-request-failed")}})).apply(this,arguments)}function gn(n,e,t,i){const a=`${e}${t}?${i}`;return n.config.emulator?function Ct(n,e){_e(n.emulator,"Emulator should always be set here");const{url:t}=n.emulator;return e?`${t}${e.startsWith("/")?e.slice(1):e}`:t}(n.config,a):`${n.config.apiScheme}://${a}`}class rt{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((t,i)=>{this.timer=setTimeout(()=>i(_t(this.auth,"network-request-failed")),yr.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Pn(n,e,t){const i={appName:n.name};t.email&&(i.email=t.email),t.phoneNumber&&(i.phoneNumber=t.phoneNumber);const a=_t(n,e,i);return a.customData._tokenResponse=t,a}function qn(){return(qn=(0,O.Z)(function*(n,e){return pn(n,"POST","/v1/accounts:delete",e)})).apply(this,arguments)}function Un(n,e){return En.apply(this,arguments)}function En(){return(En=(0,O.Z)(function*(n,e){return pn(n,"POST","/v1/accounts:lookup",e)})).apply(this,arguments)}function wn(n){if(n)try{const e=new Date(Number(n));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}function tn(){return(tn=(0,O.Z)(function*(n,e=!1){const t=(0,W.m9)(n),i=yield t.getIdToken(e),a=mt(i);ne(a&&a.exp&&a.auth_time&&a.iat,t.auth,"internal-error");const c="object"==typeof a.firebase?a.firebase:void 0,h=c?.sign_in_provider;return{claims:a,token:i,authTime:wn(Jn(a.auth_time)),issuedAtTime:wn(Jn(a.iat)),expirationTime:wn(Jn(a.exp)),signInProvider:h||null,signInSecondFactor:c?.sign_in_second_factor||null}})).apply(this,arguments)}function Jn(n){return 1e3*Number(n)}function mt(n){var e;const[t,i,a]=n.split(".");if(void 0===t||void 0===i||void 0===a)return Le("JWT malformed, contained fewer than 3 sections"),null;try{const c=(0,W.tV)(i);return c?JSON.parse(c):(Le("Failed to decode base64 JWT payload"),null)}catch(c){return Le("Caught error parsing JWT payload as JSON",null===(e=c)||void 0===e?void 0:e.toString()),null}}function bt(n,e){return sr.apply(this,arguments)}function sr(){return(sr=(0,O.Z)(function*(n,e,t=!1){if(t)return e;try{return yield e}catch(i){throw i instanceof W.ZR&&In(i)&&n.auth.currentUser===n&&(yield n.auth.signOut()),i}})).apply(this,arguments)}function In({code:n}){return"auth/user-disabled"===n||"auth/user-token-expired"===n}class Rr{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){!this.isRunning||(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const i=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),i}{this.errorBackoff=3e4;const a=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,a)}}schedule(e=!1){var t=this;if(!this.isRunning)return;const i=this.getInterval(e);this.timerId=setTimeout((0,O.Z)(function*(){yield t.iteration()}),i)}iteration(){var e=this;return(0,O.Z)(function*(){var t;try{yield e.user.getIdToken(!0)}catch(i){return void("auth/network-request-failed"===(null===(t=i)||void 0===t?void 0:t.code)&&e.schedule(!0))}e.schedule()})()}}class Xt{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=wn(this.lastLoginAt),this.creationTime=wn(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}function bn(n){return Gn.apply(this,arguments)}function Gn(){return(Gn=(0,O.Z)(function*(n){var e;const t=n.auth,i=yield n.getIdToken(),a=yield bt(n,Un(t,{idToken:i}));ne(a?.users.length,t,"internal-error");const c=a.users[0];n._notifyReloadListener(c);const h=null!==(e=c.providerUserInfo)&&void 0!==e&&e.length?Nt(c.providerUserInfo):[],g=yt(n.providerData,h),j=!!n.isAnonymous&&!(n.email&&c.passwordHash||g?.length),re={uid:c.localId,displayName:c.displayName||null,photoURL:c.photoUrl||null,email:c.email||null,emailVerified:c.emailVerified||!1,phoneNumber:c.phoneNumber||null,tenantId:c.tenantId||null,providerData:g,metadata:new Xt(c.createdAt,c.lastLoginAt),isAnonymous:j};Object.assign(n,re)})).apply(this,arguments)}function He(){return(He=(0,O.Z)(function*(n){const e=(0,W.m9)(n);yield bn(e),yield e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)})).apply(this,arguments)}function yt(n,e){return[...n.filter(i=>!e.some(a=>a.providerId===i.providerId)),...e]}function Nt(n){return n.map(e=>{var{providerId:t}=e,i=(0,K._T)(e,["providerId"]);return{providerId:t,uid:i.rawId||"",displayName:i.displayName||null,email:i.email||null,phoneNumber:i.phoneNumber||null,photoURL:i.photoUrl||null}})}function Vt(){return(Vt=(0,O.Z)(function*(n,e){const t=yield xr(n,{},(0,O.Z)(function*(){const i=(0,W.xO)({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:a,apiKey:c}=n.config,h=gn(n,a,"/v1/token",`key=${c}`),g=yield n._getAdditionalHeaders();return g["Content-Type"]="application/x-www-form-urlencoded",sn.fetch()(h,{method:"POST",headers:g,body:i})}));return{accessToken:t.access_token,expiresIn:t.expires_in,refreshToken:t.refresh_token}})).apply(this,arguments)}class de{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){ne(e.idToken,"internal-error"),ne(typeof e.idToken<"u","internal-error"),ne(typeof e.refreshToken<"u","internal-error");const t="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):function er(n){const e=mt(n);return ne(e,"internal-error"),ne(typeof e.exp<"u","internal-error"),ne(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}getToken(e,t=!1){var i=this;return(0,O.Z)(function*(){return ne(!i.accessToken||i.refreshToken,e,"user-token-expired"),t||!i.accessToken||i.isExpired?i.refreshToken?(yield i.refresh(e,i.refreshToken),i.accessToken):null:i.accessToken})()}clearRefreshToken(){this.refreshToken=null}refresh(e,t){var i=this;return(0,O.Z)(function*(){const{accessToken:a,refreshToken:c,expiresIn:h}=yield function kt(n,e){return Vt.apply(this,arguments)}(e,t);i.updateTokensAndExpiration(a,c,Number(h))})()}updateTokensAndExpiration(e,t,i){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*i}static fromJSON(e,t){const{refreshToken:i,accessToken:a,expirationTime:c}=t,h=new de;return i&&(ne("string"==typeof i,"internal-error",{appName:e}),h.refreshToken=i),a&&(ne("string"==typeof a,"internal-error",{appName:e}),h.accessToken=a),c&&(ne("number"==typeof c,"internal-error",{appName:e}),h.expirationTime=c),h}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new de,this.toJSON())}_performRefresh(){return Ae("not implemented")}}function se(n,e){ne("string"==typeof n||typeof n>"u","internal-error",{appName:e})}class ge{constructor(e){var{uid:t,auth:i,stsTokenManager:a}=e,c=(0,K._T)(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Rr(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=i,this.stsTokenManager=a,this.accessToken=a.accessToken,this.displayName=c.displayName||null,this.email=c.email||null,this.emailVerified=c.emailVerified||!1,this.phoneNumber=c.phoneNumber||null,this.photoURL=c.photoURL||null,this.isAnonymous=c.isAnonymous||!1,this.tenantId=c.tenantId||null,this.providerData=c.providerData?[...c.providerData]:[],this.metadata=new Xt(c.createdAt||void 0,c.lastLoginAt||void 0)}getIdToken(e){var t=this;return(0,O.Z)(function*(){const i=yield bt(t,t.stsTokenManager.getToken(t.auth,e));return ne(i,t.auth,"internal-error"),t.accessToken!==i&&(t.accessToken=i,yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)),i})()}getIdTokenResult(e){return function St(n){return tn.apply(this,arguments)}(this,e)}reload(){return function lt(n){return He.apply(this,arguments)}(this)}_assign(e){this!==e&&(ne(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(t=>Object.assign({},t)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new ge(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){ne(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(e,t=!1){var i=this;return(0,O.Z)(function*(){let a=!1;e.idToken&&e.idToken!==i.stsTokenManager.accessToken&&(i.stsTokenManager.updateFromServerResponse(e),a=!0),t&&(yield bn(i)),yield i.auth._persistUserIfCurrent(i),a&&i.auth._notifyListenersIfCurrent(i)})()}delete(){var e=this;return(0,O.Z)(function*(){const t=yield e.getIdToken();return yield bt(e,function Ii(n,e){return qn.apply(this,arguments)}(e.auth,{idToken:t})),e.stsTokenManager.clearRefreshToken(),e.auth.signOut()})()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var i,a,c,h,g,T,x,j;const re=null!==(i=t.displayName)&&void 0!==i?i:void 0,Te=null!==(a=t.email)&&void 0!==a?a:void 0,Ve=null!==(c=t.phoneNumber)&&void 0!==c?c:void 0,qe=null!==(h=t.photoURL)&&void 0!==h?h:void 0,It=null!==(g=t.tenantId)&&void 0!==g?g:void 0,At=null!==(T=t._redirectEventId)&&void 0!==T?T:void 0,Wn=null!==(x=t.createdAt)&&void 0!==x?x:void 0,gr=null!==(j=t.lastLoginAt)&&void 0!==j?j:void 0,{uid:Xn,emailVerified:Ei,isAnonymous:lr,providerData:Kn,stsTokenManager:Fi}=t;ne(Xn&&Fi,e,"internal-error");const Ih=de.fromJSON(this.name,Fi);ne("string"==typeof Xn,e,"internal-error"),se(re,e.name),se(Te,e.name),ne("boolean"==typeof Ei,e,"internal-error"),ne("boolean"==typeof lr,e,"internal-error"),se(Ve,e.name),se(qe,e.name),se(It,e.name),se(At,e.name),se(Wn,e.name),se(gr,e.name);const cb=new ge({uid:Xn,auth:e,email:Te,emailVerified:Ei,displayName:re,isAnonymous:lr,photoURL:qe,phoneNumber:Ve,tenantId:It,stsTokenManager:Ih,createdAt:Wn,lastLoginAt:gr});return Kn&&Array.isArray(Kn)&&(cb.providerData=Kn.map(NC=>Object.assign({},NC))),At&&(cb._redirectEventId=At),cb}static _fromIdTokenResponse(e,t,i=!1){return(0,O.Z)(function*(){const a=new de;a.updateFromServerResponse(t);const c=new ge({uid:t.localId,auth:e,stsTokenManager:a,isAnonymous:i});return yield bn(c),c})()}}const De=(()=>{class n{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return(0,O.Z)(function*(){return!0})()}_set(t,i){var a=this;return(0,O.Z)(function*(){a.storage[t]=i})()}_get(t){var i=this;return(0,O.Z)(function*(){const a=i.storage[t];return void 0===a?null:a})()}_remove(t){var i=this;return(0,O.Z)(function*(){delete i.storage[t]})()}_addListener(t,i){}_removeListener(t,i){}}return n.type="NONE",n})();function st(n,e,t){return`firebase:${n}:${e}:${t}`}class Dt{constructor(e,t,i){this.persistence=e,this.auth=t,this.userKey=i;const{config:a,name:c}=this.auth;this.fullUserKey=st(this.userKey,a.apiKey,c),this.fullPersistenceKey=st("persistence",a.apiKey,c),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}getCurrentUser(){var e=this;return(0,O.Z)(function*(){const t=yield e.persistence._get(e.fullUserKey);return t?ge._fromJSON(e.auth,t):null})()}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(e){var t=this;return(0,O.Z)(function*(){if(t.persistence===e)return;const i=yield t.getCurrentUser();return yield t.removeCurrentUser(),t.persistence=e,i?t.setCurrentUser(i):void 0})()}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(e,t,i="authUser"){return(0,O.Z)(function*(){if(!t.length)return new Dt(Xe(De),e,i);const a=(yield Promise.all(t.map(function(){var x=(0,O.Z)(function*(j){if(yield j._isAvailable())return j});return function(j){return x.apply(this,arguments)}}()))).filter(x=>x);let c=a[0]||Xe(De);const h=st(i,e.config.apiKey,e.name);let g=null;for(const x of t)try{const j=yield x._get(h);if(j){const re=ge._fromJSON(e,j);x!==c&&(g=re),c=x;break}}catch{}const T=a.filter(x=>x._shouldAllowMigration);return c._shouldAllowMigration&&T.length?(c=T[0],g&&(yield c._set(h,g.toJSON())),yield Promise.all(t.map(function(){var x=(0,O.Z)(function*(j){if(j!==c)try{yield j._remove(h)}catch{}});return function(j){return x.apply(this,arguments)}}())),new Dt(c,e,i)):new Dt(c,e,i)})()}}function Jt(n){const e=n.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(function X(n=(0,W.z$)()){return/iemobile/i.test(n)}(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(function Tn(n=(0,W.z$)()){return/firefox\//i.test(n)}(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(function be(n=(0,W.z$)()){return/blackberry/i.test(n)}(e))return"Blackberry";if(function je(n=(0,W.z$)()){return/webos/i.test(n)}(e))return"Webos";if(function nn(n=(0,W.z$)()){const e=n.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}(e))return"Safari";if((e.includes("chrome/")||function ue(n=(0,W.z$)()){return/crios\//i.test(n)}(e))&&!e.includes("edge/"))return"Chrome";if(function Z(n=(0,W.z$)()){return/android/i.test(n)}(e))return"Android";{const i=n.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(2===i?.length)return i[1]}return"Other"}function Zr(n,e=[]){let t;switch(n){case"Browser":t=Jt((0,W.z$)());break;case"Worker":t=`${Jt((0,W.z$)())}-${n}`;break;default:t=n}const i=e.length?e.join(","):"FirebaseCore-web";return`${t}/JsCore/${ee.Jn}/${i}`}class Qr{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const i=c=>new Promise((h,g)=>{try{h(e(c))}catch(T){g(T)}});i.onAbort=t,this.queue.push(i);const a=this.queue.length-1;return()=>{this.queue[a]=()=>Promise.resolve()}}runMiddleware(e){var t=this;return(0,O.Z)(function*(){var i;if(t.auth.currentUser===e)return;const a=[];try{for(const c of t.queue)yield c(e),c.onAbort&&a.push(c.onAbort)}catch(c){a.reverse();for(const h of a)try{h()}catch{}throw t.auth._errorFactory.create("login-blocked",{originalMessage:null===(i=c)||void 0===i?void 0:i.message})}})()}}class ps{constructor(e,t,i){this.app=e,this.heartbeatServiceProvider=t,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Yn(this),this.idTokenSubscription=new Yn(this),this.beforeStateQueue=new Qr(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=ot,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(e,t){var i=this;return t&&(this._popupRedirectResolver=Xe(t)),this._initializationPromise=this.queue((0,O.Z)(function*(){var a,c;if(!i._deleted&&(i.persistenceManager=yield Dt.create(i,e),!i._deleted)){if(null!==(a=i._popupRedirectResolver)&&void 0!==a&&a._shouldInitProactively)try{yield i._popupRedirectResolver._initialize(i)}catch{}yield i.initializeCurrentUser(t),i.lastNotifiedUid=(null===(c=i.currentUser)||void 0===c?void 0:c.uid)||null,!i._deleted&&(i._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){var e=this;return(0,O.Z)(function*(){if(e._deleted)return;const t=yield e.assertedPersistence.getCurrentUser();if(e.currentUser||t){if(e.currentUser&&t&&e.currentUser.uid===t.uid)return e._currentUser._assign(t),void(yield e.currentUser.getIdToken());yield e._updateCurrentUser(t,!0)}})()}initializeCurrentUser(e){var t=this;return(0,O.Z)(function*(){var i;const a=yield t.assertedPersistence.getCurrentUser();let c=a,h=!1;if(e&&t.config.authDomain){yield t.getOrInitRedirectPersistenceManager();const g=null===(i=t.redirectUser)||void 0===i?void 0:i._redirectEventId,T=c?._redirectEventId,x=yield t.tryRedirectSignIn(e);(!g||g===T)&&x?.user&&(c=x.user,h=!0)}if(!c)return t.directlySetCurrentUser(null);if(!c._redirectEventId){if(h)try{yield t.beforeStateQueue.runMiddleware(c)}catch(g){c=a,t._popupRedirectResolver._overrideRedirectResult(t,()=>Promise.reject(g))}return c?t.reloadAndSetCurrentUserOrClear(c):t.directlySetCurrentUser(null)}return ne(t._popupRedirectResolver,t,"argument-error"),yield t.getOrInitRedirectPersistenceManager(),t.redirectUser&&t.redirectUser._redirectEventId===c._redirectEventId?t.directlySetCurrentUser(c):t.reloadAndSetCurrentUserOrClear(c)})()}tryRedirectSignIn(e){var t=this;return(0,O.Z)(function*(){let i=null;try{i=yield t._popupRedirectResolver._completeRedirectFn(t,e,!0)}catch{yield t._setRedirectUser(null)}return i})()}reloadAndSetCurrentUserOrClear(e){var t=this;return(0,O.Z)(function*(){var i;try{yield bn(e)}catch(a){if("auth/network-request-failed"!==(null===(i=a)||void 0===i?void 0:i.code))return t.directlySetCurrentUser(null)}return t.directlySetCurrentUser(e)})()}useDeviceLanguage(){this.languageCode=function qt(){if(typeof navigator>"u")return null;const n=navigator;return n.languages&&n.languages[0]||n.language||null}()}_delete(){var e=this;return(0,O.Z)(function*(){e._deleted=!0})()}updateCurrentUser(e){var t=this;return(0,O.Z)(function*(){const i=e?(0,W.m9)(e):null;return i&&ne(i.auth.config.apiKey===t.config.apiKey,t,"invalid-user-token"),t._updateCurrentUser(i&&i._clone(t))})()}_updateCurrentUser(e,t=!1){var i=this;return(0,O.Z)(function*(){if(!i._deleted)return e&&ne(i.tenantId===e.tenantId,i,"tenant-id-mismatch"),t||(yield i.beforeStateQueue.runMiddleware(e)),i.queue((0,O.Z)(function*(){yield i.directlySetCurrentUser(e),i.notifyAuthListeners()}))})()}signOut(){var e=this;return(0,O.Z)(function*(){return yield e.beforeStateQueue.runMiddleware(null),(e.redirectPersistenceManager||e._popupRedirectResolver)&&(yield e._setRedirectUser(null)),e._updateCurrentUser(null,!0)})()}setPersistence(e){var t=this;return this.queue((0,O.Z)(function*(){yield t.assertedPersistence.setPersistence(Xe(e))}))}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new W.LL("auth","Firebase",e())}onAuthStateChanged(e,t,i){return this.registerStateListener(this.authStateSubscription,e,t,i)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,i){return this.registerStateListener(this.idTokenSubscription,e,t,i)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}_setRedirectUser(e,t){var i=this;return(0,O.Z)(function*(){const a=yield i.getOrInitRedirectPersistenceManager(t);return null===e?a.removeCurrentUser():a.setCurrentUser(e)})()}getOrInitRedirectPersistenceManager(e){var t=this;return(0,O.Z)(function*(){if(!t.redirectPersistenceManager){const i=e&&Xe(e)||t._popupRedirectResolver;ne(i,t,"argument-error"),t.redirectPersistenceManager=yield Dt.create(t,[Xe(i._redirectPersistence)],"redirectUser"),t.redirectUser=yield t.redirectPersistenceManager.getCurrentUser()}return t.redirectPersistenceManager})()}_redirectUserForId(e){var t=this;return(0,O.Z)(function*(){var i,a;return t._isInitialized&&(yield t.queue((0,O.Z)(function*(){}))),(null===(i=t._currentUser)||void 0===i?void 0:i._redirectEventId)===e?t._currentUser:(null===(a=t.redirectUser)||void 0===a?void 0:a._redirectEventId)===e?t.redirectUser:null})()}_persistUserIfCurrent(e){var t=this;return(0,O.Z)(function*(){if(e===t.currentUser)return t.queue((0,O.Z)(function*(){return t.directlySetCurrentUser(e)}))})()}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const i=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==i&&(this.lastNotifiedUid=i,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,i,a){if(this._deleted)return()=>{};const c="function"==typeof t?t:t.next.bind(t),h=this._isInitialized?Promise.resolve():this._initializationPromise;return ne(h,this,"internal-error"),h.then(()=>c(this.currentUser)),"function"==typeof t?e.addObserver(t,i,a):e.addObserver(t)}directlySetCurrentUser(e){var t=this;return(0,O.Z)(function*(){t.currentUser&&t.currentUser!==e&&t._currentUser._stopProactiveRefresh(),e&&t.isProactiveRefreshEnabled&&e._startProactiveRefresh(),t.currentUser=e,e?yield t.assertedPersistence.setCurrentUser(e):yield t.assertedPersistence.removeCurrentUser()})()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return ne(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Zr(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){var e=this;return(0,O.Z)(function*(){var t;const i={"X-Client-Version":e.clientVersion};e.app.options.appId&&(i["X-Firebase-gmpid"]=e.app.options.appId);const a=yield null===(t=e.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===t?void 0:t.getHeartbeatsHeader();return a&&(i["X-Firebase-Client"]=a),i})()}}class Yn{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,W.ne)(t=>this.observer=t)}get next(){return ne(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}(function Ea(n){return`__${n}${Math.floor(1e6*Math.random())}`})("rcb"),new Qt(3e4,6e4),new Qt(2e3,1e4),new Qt(3e4,6e4),new Qt(5e3,15e3);var dI="@firebase/auth",hI="0.20.10";class gb{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}getToken(e){var t=this;return(0,O.Z)(function*(){return t.assertAuthConfigured(),yield t.auth._initializationPromise,t.auth.currentUser?{accessToken:yield t.auth.currentUser.getIdToken(e)}:null})()}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged(i=>{var a;e((null===(a=i)||void 0===a?void 0:a.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);!t||(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){ne(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}(0,W.Pz)("authIdTokenMaxAge"),function fI(n){(0,ee.Xd)(new G.wA("auth",(e,{options:t})=>{const i=e.getProvider("app").getImmediate(),a=e.getProvider("heartbeat"),{apiKey:c,authDomain:h}=i.options;return((g,T)=>{ne(c&&!c.includes(":"),"invalid-api-key",{appName:g.name}),ne(!h?.includes(":"),"argument-error",{appName:g.name});const x={apiKey:c,authDomain:h,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Zr(n)},j=new ps(g,T,x);return function rn(n,e){const t=e?.persistence||[],i=(Array.isArray(t)?t:[t]).map(Xe);e?.errorMap&&n._updateErrorMap(e.errorMap),n._initializeWithPersistence(i,e?.popupRedirectResolver)}(j,t),j})(i,a)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,i)=>{e.getProvider("auth-internal").initialize()})),(0,ee.Xd)(new G.wA("auth-internal",e=>{const t=function Nn(n){return(0,W.m9)(n)}(e.getProvider("auth").getImmediate());return new gb(t)},"PRIVATE").setInstantiationMode("EXPLICIT")),(0,ee.KN)(dI,hI,function b_(n){switch(n){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(n)),(0,ee.KN)(dI,hI,"esm2017")}("Browser");class og{constructor(){return(0,m.vb)("auth")}}const Ph=new Map,MI={activated:!1,tokenObservers:[]},F_={initialized:!1,enabled:!1};function Oi(n){return Ph.get(n)||MI}function qs(n,e){Ph.set(n,e)}function lg(){return F_}class $b{constructor(e,t,i,a,c){if(this.operation=e,this.retryPolicy=t,this.getWaitDuration=i,this.lowerBound=a,this.upperBound=c,this.pending=null,this.nextErrorWaitInterval=a,a>c)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(e){var t=this;return(0,O.Z)(function*(){t.stop();try{t.pending=new W.BH,yield function U_(n){return new Promise(e=>{setTimeout(e,n)})}(t.getNextRun(e)),t.pending.resolve(),yield t.pending.promise,t.pending=new W.BH,yield t.operation(),t.pending.resolve(),yield t.pending.promise,t.process(!0).catch(()=>{})}catch(i){t.retryPolicy(i)?t.process(!1).catch(()=>{}):t.stop()}})()}getNextRun(e){if(e)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{const t=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),t}}}const cs=new W.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 hg(n){if(!Oi(n).activated)throw cs.create("use-before-activation",{appName:n.name})}function fg(n,e){return pg.apply(this,arguments)}function pg(){return(pg=(0,O.Z)(function*({url:n,body:e},t){var i,a;const c={"Content-Type":"application/json"},h=t.getImmediate({optional:!0});if(h){const Ve=yield h.getHeartbeatsHeader();Ve&&(c["X-Firebase-Client"]=Ve)}const g={method:"POST",body:JSON.stringify(e),headers:c};let T,x;try{T=yield fetch(n,g)}catch(Ve){throw cs.create("fetch-network-error",{originalErrorMessage:null===(i=Ve)||void 0===i?void 0:i.message})}if(200!==T.status)throw cs.create("fetch-status-error",{httpStatus:T.status});try{x=yield T.json()}catch(Ve){throw cs.create("fetch-parse-error",{originalErrorMessage:null===(a=Ve)||void 0===a?void 0:a.message})}const j=x.ttl.match(/^([\d.]+)(s)$/);if(!j||!j[2]||isNaN(Number(j[1])))throw cs.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${x.ttl}`});const re=1e3*Number(j[1]),Te=Date.now();return{token:x.token,expireTimeMillis:Te+re,issuedAtTimeMillis:Te}})).apply(this,arguments)}function Hb(n,e){const{projectId:t,appId:i,apiKey:a}=n.options;return{url:`https://content-firebaseappcheck.googleapis.com/v1/projects/${t}/apps/${i}:exchangeDebugToken?key=${a}`,body:{debug_token:e}}}const Lh="firebase-app-check-store";let yg=null;function NI(){return yg||(yg=new Promise((n,e)=>{var t;try{const i=indexedDB.open("firebase-app-check-database",1);i.onsuccess=a=>{n(a.target.result)},i.onerror=a=>{var c;e(cs.create("storage-open",{originalErrorMessage:null===(c=a.target.error)||void 0===c?void 0:c.message}))},i.onupgradeneeded=a=>{0===a.oldVersion&&a.target.result.createObjectStore(Lh,{keyPath:"compositeKey"})}}catch(i){e(cs.create("storage-open",{originalErrorMessage:null===(t=i)||void 0===t?void 0:t.message}))}}),yg)}function Fh(){return(Fh=(0,O.Z)(function*(n,e){const i=(yield NI()).transaction(Lh,"readwrite"),c=i.objectStore(Lh).put({compositeKey:n,value:e});return new Promise((h,g)=>{c.onsuccess=T=>{h()},i.onerror=T=>{var x;g(cs.create("storage-set",{originalErrorMessage:null===(x=T.target.error)||void 0===x?void 0:x.message}))}})})).apply(this,arguments)}const Aa=new Q.Yd("@firebase/app-check");function Dg(n,e){return(0,W.hl)()?function B_(n,e){return function vg(n,e){return Fh.apply(this,arguments)}(function Bh(n){return`${n.options.appId}-${n.name}`}(n),e)}(n,e).catch(t=>{Aa.warn(`Failed to write token to IndexedDB. Error: ${t}`)}):Promise.resolve()}function $_(){return lg().enabled}function G_(){return bg.apply(this,arguments)}function bg(){return(bg=(0,O.Z)(function*(){const n=lg();if(n.enabled&&n.token)return n.token.promise;throw Error("\n Can't get debug token in production mode.\n ")})).apply(this,arguments)}const FI={error:"UNKNOWN_ERROR"};function UI(n){return W.US.encodeString(JSON.stringify(n),!1)}function Vh(n){return jh.apply(this,arguments)}function jh(){return(jh=(0,O.Z)(function*(n,e=!1){const t=n.app;hg(t);const i=Oi(t);let c,a=i.token;if(a&&!su(a)&&(qs(t,Object.assign(Object.assign({},i),{token:void 0})),a=void 0),!a){const T=yield i.cachedTokenPromise;T&&(su(T)?a=T:yield Dg(t,void 0))}if(!e&&a&&su(a))return{token:a.token};let g,h=!1;if($_()){i.exchangeTokenPromise||(i.exchangeTokenPromise=fg(Hb(t,yield G_()),n.heartbeatServiceProvider).finally(()=>{i.exchangeTokenPromise=void 0}),h=!0);const T=yield i.exchangeTokenPromise;return yield Dg(t,T),qs(t,Object.assign(Object.assign({},i),{token:T})),{token:T.token}}try{i.exchangeTokenPromise||(i.exchangeTokenPromise=i.provider.getToken().finally(()=>{i.exchangeTokenPromise=void 0}),h=!0),a=yield i.exchangeTokenPromise}catch(T){"appCheck/throttled"===T.code?Aa.warn(T.message):Aa.error(T),c=T}return a?c?g=su(a)?{token:a.token,internalError:c}:$i(c):(g={token:a.token},qs(t,Object.assign(Object.assign({},i),{token:a})),yield Dg(t,a)):g=$i(c),h&&Mg(t,g),g})).apply(this,arguments)}function Sg(n,e){const t=Oi(n),i=t.tokenObservers.filter(a=>a.next!==e);0===i.length&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),qs(n,Object.assign(Object.assign({},t),{tokenObservers:i}))}function Ji(n){const{app:e}=n,t=Oi(e);let i=t.tokenRefresher;i||(i=function Ag(n){const{app:e}=n;return new $b((0,O.Z)(function*(){let i;if(i=Oi(e).token?yield Vh(n,!0):yield Vh(n),i.error)throw i.error;if(i.internalError)throw i.internalError}),()=>!0,()=>{const t=Oi(e);if(t.token){let i=t.token.issuedAtTimeMillis+.5*(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)+3e5;return i=Math.min(i,t.token.expireTimeMillis-3e5),Math.max(0,i-Date.now())}return 0},3e4,96e4)}(n),qs(e,Object.assign(Object.assign({},t),{tokenRefresher:i}))),!i.isRunning()&&t.isTokenAutoRefreshEnabled&&i.start()}function Mg(n,e){const t=Oi(n).tokenObservers;for(const i of t)try{"EXTERNAL"===i.type&&null!=e.error?i.error(e.error):i.next(e)}catch{}}function su(n){return n.expireTimeMillis-Date.now()>0}function $i(n){return{token:UI(FI),error:n}}class Jl{constructor(e,t){this.app=e,this.heartbeatServiceProvider=t}_delete(){const{tokenObservers:e}=Oi(this.app);for(const t of e)Sg(this.app,t.next);return Promise.resolve()}}const Wc="app-check-internal";!function qI(){(0,ee.Xd)(new G.wA("app-check",n=>function H_(n,e){return new Jl(n,e)}(n.getProvider("app").getImmediate(),n.getProvider("heartbeat")),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((n,e,t)=>{n.getProvider(Wc).initialize()})),(0,ee.Xd)(new G.wA(Wc,n=>function BI(n){return{getToken:e=>Vh(n,e),addTokenListener:e=>function Cg(n,e,t,i){const{app:a}=n,c=Oi(a),h={next:t,error:i,type:e};if(qs(a,Object.assign(Object.assign({},c),{tokenObservers:[...c.tokenObservers,h]})),c.token&&su(c.token)){const g=c.token;Promise.resolve().then(()=>{t({token:g.token}),Ji(n)}).catch(()=>{})}c.cachedTokenPromise.then(()=>Ji(n))}(n,"INTERNAL",e),removeTokenListener:e=>Sg(n.app,e)}}(n.getProvider("app-check").getImmediate()),"PUBLIC").setInstantiationMode("EXPLICIT")),(0,ee.KN)("@firebase/app-check","0.5.15")}();class Gh{constructor(){return(0,m.vb)("app-check")}}typeof window<"u"&&window;var Ot,rv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},bo={},kg=kg||{},an=rv||self;function nd(){}function Qo(n){var e=typeof n;return"array"==(e="object"!=e?e:n?Array.isArray(n)?"array":e:"null")||"object"==e&&"number"==typeof n.length}function Kc(n){var e=typeof n;return"object"==e&&null!=n||"function"==e}var Lg="closure_uid_"+(1e9*Math.random()>>>0),Qb=0;function Hh(n,e,t){return n.call.apply(n.bind,arguments)}function eD(n,e,t){if(!n)throw Error();if(2e?1:0}function Yh(){var n=an.navigator;return n&&(n=n.userAgent)?n:""}function Jo(n){return-1!=Yh().indexOf(n)}function Zh(n){return Zh[" "](n),n}Zh[" "]=nd;var Ts,n,av=Jo("Opera"),sd=Jo("Trident")||Jo("MSIE"),Bg=Jo("Edge"),Vg=Bg||sd,jg=Jo("Gecko")&&!(-1!=Yh().toLowerCase().indexOf("webkit")&&!Jo("Edge"))&&!(Jo("Trident")||Jo("MSIE"))&&!Jo("Edge"),tD=-1!=Yh().toLowerCase().indexOf("webkit")&&!Jo("Edge");function uv(){var n=an.document;return n?n.documentMode:void 0}e:{var $g="",Qh=(n=Yh(),jg?/rv:([^\);]+)(\)|;)/.exec(n):Bg?/Edge\/([\d\.]+)/.exec(n):sd?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(n):tD?/WebKit\/(\S+)/.exec(n):av?/(?:Version)[ \/]?(\S+)/.exec(n):void 0);if(Qh&&($g=Qh?Qh[1]:""),sd){var Gg=uv();if(null!=Gg&&Gg>parseFloat($g)){Ts=String(Gg);break e}}Ts=$g}var nD={};var iD=an.document&&sd&&(uv()||parseInt(Ts,10))||void 0;function od(n,e){if(Hi.call(this,n?n.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,n){var t=this.type=n.type,i=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:null;if(this.target=n.target||n.srcElement,this.g=e,e=n.relatedTarget){if(jg){e:{try{Zh(e.nodeName);var a=!0;break e}catch{}a=!1}a||(e=null)}}else"mouseover"==t?e=n.fromElement:"mouseout"==t&&(e=n.toElement);this.relatedTarget=e,i?(this.clientX=void 0!==i.clientX?i.clientX:i.pageX,this.clientY=void 0!==i.clientY?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0):(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0),this.button=n.button,this.key=n.key||"",this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.pointerId=n.pointerId||0,this.pointerType="string"==typeof n.pointerType?n.pointerType:sD[n.pointerType]||"",this.state=n.state,this.i=n,n.defaultPrevented&&od.X.h.call(this)}}Pi(od,Hi);var sD={2:"touch",3:"pen",4:"mouse"};od.prototype.h=function(){od.X.h.call(this);var n=this.i;n.preventDefault?n.preventDefault():n.returnValue=!1};var en="closure_listenable_"+(1e6*Math.random()|0),cv=0;function lv(n,e,t,i,a){this.listener=n,this.proxy=null,this.src=e,this.type=t,this.capture=!!i,this.ha=a,this.key=++cv,this.ba=this.ea=!1}function ad(n){n.ba=!0,n.listener=null,n.proxy=null,n.src=null,n.ha=null}function Wg(n,e,t){for(const i in n)e.call(t,n[i],i,n)}function dv(n){const e={};for(const t in n)e[t]=n[t];return e}const Kg="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function hv(n,e){let t,i;for(let a=1;a>>0);function tf(n){return"function"==typeof n?n:(n[Xg]||(n[Xg]=function(e){return n.handleEvent(e)}),n[Xg])}function zi(){Xo.call(this),this.i=new ud(this),this.P=this,this.I=null}function Wi(n,e){var t,i=n.I;if(i)for(t=[];i;i=i.I)t.push(i);if(n=n.P,i=e.type||e,"string"==typeof e)e=new Hi(e,n);else if(e instanceof Hi)e.target=e.target||n;else{var a=e;hv(e=new Hi(i,n),a)}if(a=!0,t)for(var c=t.length-1;0<=c;c--){var h=e.g=t[c];a=xa(h,i,!0,e)&&a}if(a=xa(h=e.g=n,i,!0,e)&&a,a=xa(h,i,!1,e)&&a,t)for(c=0;cnew yv,n=>n.reset());class yv{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 uD(n){an.setTimeout(()=>{throw n},0)}function _v(n,e){em||function cD(){var n=an.Promise.resolve(void 0);em=function(){n.then(lD)}}(),tm||(em(),tm=!0),nm.add(n,e)}var tm=!1,nm=new class nf{constructor(){this.h=this.g=null}add(e,t){const i=mv.get();i.set(e,t),this.h?this.h.next=i:this.g=i,this.h=i}};function lD(){for(var n;n=gv();){try{n.h.call(n.g)}catch(t){uD(t)}var e=mv;e.j(n),100>e.h&&(e.h++,n.next=e.g,e.g=n)}tm=!1}function cd(n,e){zi.call(this),this.h=n||1,this.g=e||an,this.j=Gi(this.lb,this),this.l=Date.now()}function rf(n){n.ca=!1,n.R&&(n.g.clearTimeout(n.R),n.R=null)}function ld(n,e,t){if("function"==typeof n)t&&(n=Gi(n,t));else{if(!n||"function"!=typeof n.handleEvent)throw Error("Invalid listener argument");n=Gi(n.handleEvent,n)}return 2147483647{n.g=null,n.i&&(n.i=!1,dD(n))},n.j);const e=n.h;n.h=null,n.m.apply(null,e)}Pi(cd,zi),(Ot=cd.prototype).ca=!1,Ot.R=null,Ot.lb=function(){if(this.ca){var n=Date.now()-this.l;0i.length)){var a=i[1];if(Array.isArray(a)&&!(1>a.length)){var c=a[0];if("noop"!=c&&"stop"!=c&&"close"!=c)for(var h=1;he.length?ff:(e=e.substr(i,t),n.C=i+t,e))}function pf(n){n.V=Date.now()+n.O,vD(n,n.O)}function vD(n,e){if(null!=n.B)throw Error("WatchDog timer not null");n.B=uu(Gi(n.gb,n),e)}function lm(n){n.B&&(an.clearTimeout(n.B),n.B=null)}function gf(n){0==n.l.G||n.I||Dd(n.l,n)}function Yc(n){lm(n);var e=n.L;e&&"function"==typeof e.na&&e.na(),n.L=null,rf(n.T),im(n.S),n.g&&(e=n.g,n.g=null,e.abort(),e.na())}function Iv(n,e){try{var t=n.l;if(0!=t.G&&(t.g==n||Ef(t.h,n)))if(!n.J&&Ef(t.h,n)&&3==t.G){try{var i=t.Fa.g.parse(e)}catch{i=null}if(Array.isArray(i)&&3==i.length){var a=i;if(0==a[0]){e:if(!t.u){if(t.g){if(!(t.g.F+3e3a[2]&&t.L&&0==t.A&&!t.v&&(t.v=uu(Gi(t.cb,t),6e3));if(1>=wv(t.h)&&t.ja){try{t.ja()}catch{}t.ja=void 0}}else Mo(t,11)}else if((n.J||t.g==n)&&ao(t),!ou(e))for(a=t.Fa.g.parse(e),e=0;ej)&&(3!=j||Vg||this.g&&(this.h.h||this.g.fa()||Rv(this.g)))){this.I||4!=j||7==e||cf(8==e||0>=re?3:2),lm(this);var t=this.g.aa();this.Y=t;t:if(yD(this)){var i=Rv(this.g);n="";var a=i.length,c=4==ea(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){Yc(this),gf(this);var h="";break t}this.h.i=new an.TextDecoder}for(e=0;ee)throw Error("Bad port number "+e);n.m=e}else n.m=null}function pm(n,e,t){e instanceof du?(n.i=e,function _m(n,e){e&&!n.j&&(Ra(n),n.i=null,n.g.forEach(function(t,i){var a=i.toLowerCase();i!=a&&(ym(this,i),vf(this,a,t))},n)),n.j=e}(n.i,n.h)):(t||(e=vd(e,Xc)),n.i=new du(e,n.h))}function Cr(n,e,t){n.i.set(e,t)}function yf(n){return Cr(n,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),n}function Zc(n,e){return n?e?decodeURI(n.replace(/%25/g,"%2525")):decodeURIComponent(n):""}function vd(n,e,t){return"string"==typeof n?(n=encodeURI(n).replace(e,ED),t&&(n=n.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n):null}function ED(n){return"%"+((n=n.charCodeAt(0))>>4&15).toString(16)+(15&n).toString(16)}lu.prototype.toString=function(){var n=[],e=this.j;e&&n.push(vd(e,Ed,!0),":");var t=this.g;return(t||"file"==e)&&(n.push("//"),(e=this.s)&&n.push(vd(e,Ed,!0),"@"),n.push(encodeURIComponent(String(t)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.m)&&n.push(":",String(t))),(t=this.l)&&(this.g&&"/"!=t.charAt(0)&&n.push("/"),n.push(vd(t,"/"==t.charAt(0)?gm:Qc,!0))),(t=this.i.toString())&&n.push("?",t),(t=this.o)&&n.push("#",vd(t,mm)),n.join("")};var Ed=/[#\/\?@]/g,Qc=/[#\?:]/g,gm=/[#\?]/g,Xc=/[#\?@]/g,mm=/#/g;function du(n,e){this.h=this.g=null,this.i=n||null,this.j=!!e}function Ra(n){n.g||(n.g=new Map,n.h=0,n.i&&function fm(n,e){if(n){n=n.split("&");for(var t=0;t=n.j}function wv(n){return n.h?1:n.g?n.g.size:0}function Ef(n,e){return n.h?n.h==e:!!n.g&&n.g.has(e)}function If(n,e){n.g?n.g.add(e):n.h=e}function bv(n,e){n.h&&n.h==e?n.h=null:n.g&&n.g.has(e)&&n.g.delete(e)}function Ss(n){if(null!=n.h)return n.i.concat(n.h.D);if(null!=n.g&&0!==n.g.size){let e=n.i;for(const t of n.g.values())e=e.concat(t.D);return e}return Wh(n.i)}function Df(){}function bD(){this.g=new Df}function eT(n,e,t){const i=t||"";try{Dv(n,function(a,c){let h=a;Kc(a)&&(h=Jg(a)),e.push(i+c+"="+encodeURIComponent(h))})}catch(a){throw e.push(i+"type="+encodeURIComponent("_badmap")),a}}function Jc(n,e,t,i,a){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,a(i)}catch{}}function el(n){this.l=n.ac||null,this.j=n.jb||!1}function wf(n,e){zi.call(this),this.D=n,this.u=e,this.m=void 0,this.readyState=Em,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}DD.prototype.cancel=function(){if(this.i=Ss(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const n of this.g.values())n.cancel();this.g.clear()}},Df.prototype.stringify=function(n){return an.JSON.stringify(n,void 0)},Df.prototype.parse=function(n){return an.JSON.parse(n,void 0)},Pi(el,gd),el.prototype.g=function(){return new wf(this.l,this.j)},el.prototype.i=function(n){return function(){return n}}({}),Pi(wf,zi);var Em=0;function Tv(n){n.j.read().then(n.Ta.bind(n)).catch(n.ga.bind(n))}function tl(n){n.readyState=4,n.l=null,n.j=null,n.A=null,Id(n)}function Id(n){n.onreadystatechange&&n.onreadystatechange.call(n)}(Ot=wf.prototype).open=function(n,e){if(this.readyState!=Em)throw this.abort(),Error("Error reopening a connection");this.C=n,this.B=e,this.readyState=1,Id(this)},Ot.send=function(n){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};n&&(e.body=n),(this.D||an).fetch(new Request(this.B,e)).then(this.Wa.bind(this),this.ga.bind(this))},Ot.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,tl(this)),this.readyState=Em},Ot.Wa=function(n){if(this.g&&(this.l=n,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=n.headers,this.readyState=2,Id(this)),this.g&&(this.readyState=3,Id(this),this.g)))if("arraybuffer"===this.responseType)n.arrayBuffer().then(this.Ua.bind(this),this.ga.bind(this));else if(typeof an.ReadableStream<"u"&&"body"in n){if(this.j=n.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;Tv(this)}else n.text().then(this.Va.bind(this),this.ga.bind(this))},Ot.Ta=function(n){if(this.g){if(this.u&&n.value)this.response.push(n.value);else if(!this.u){var e=n.value?n.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!n.done}))&&(this.response=this.responseText+=e)}n.done?tl(this):Id(this),3==this.readyState&&Tv(this)}},Ot.Va=function(n){this.g&&(this.response=this.responseText=n,tl(this))},Ot.Ua=function(n){this.g&&(this.response=n,tl(this))},Ot.ga=function(){this.g&&tl(this)},Ot.setRequestHeader=function(n,e){this.v.append(n,e)},Ot.getResponseHeader=function(n){return this.h&&this.h.get(n.toLowerCase())||""},Ot.getAllResponseHeaders=function(){if(!this.h)return"";const n=[],e=this.h.entries();for(var t=e.next();!t.done;)n.push((t=t.value)[0]+": "+t[1]),t=e.next();return n.join("\r\n")},Object.defineProperty(wf.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(n){this.m=n?"include":"same-origin"}});var Cv=an.JSON.parse;function Hr(n){zi.call(this),this.headers=new Map,this.u=n||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=Sv,this.K=this.L=!1}Pi(Hr,zi);var Sv="",Av=/^https?$/i,Mv=["POST","PUT"];function Ao(n,e){n.h=!1,n.g&&(n.l=!0,n.g.abort(),n.l=!1),n.j=e,n.m=5,bf(n),Tf(n)}function bf(n){n.D||(n.D=!0,Wi(n,"complete"),Wi(n,"error"))}function xv(n){if(n.h&&typeof kg<"u"&&(!n.C[1]||4!=ea(n)||2!=n.aa()))if(n.v&&4==ea(n))ld(n.Ha,0,n);else if(Wi(n,"readystatechange"),4==ea(n)){n.h=!1;try{const g=n.aa();e:switch(g){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 i;if(i=0===g){var a=String(n.H).match(hm)[1]||null;if(!a&&an.self&&an.self.location){var c=an.self.location.protocol;a=c.substr(0,c.length-1)}i=!Av.test(a?a.toLowerCase():"")}t=i}if(t)Wi(n,"complete"),Wi(n,"success");else{n.m=6;try{var h=2x)c=Math.max(0,a[T].h-100),g=!1;else try{eT(j,h,"req"+x+"_")}catch{i&&i(j)}}if(g){i=h.join("&");break e}}}return n=n.i.splice(0,t),e.D=n,i}function bm(n){n.g||n.u||(n.Z=1,_v(n.Ia,n),n.A=0)}function Mf(n){return!(n.g||n.u||3<=n.A||(n.Z++,n.u=uu(Gi(n.Ia,n),wd(n,n.A)),n.A++,0))}function xf(n){null!=n.B&&(an.clearTimeout(n.B),n.B=null)}function Rf(n){n.g=new yd(n,n.j,"rpc",n.Z),null===n.o&&(n.g.H=n.s),n.g.N=0;var e=Co(n.sa);Cr(e,"RID","rpc"),Cr(e,"SID",n.I),Cr(e,"CI",n.L?"0":"1"),Cr(e,"AID",n.T),Cr(e,"TYPE","xmlhttp"),Af(n,e),n.o&&n.s&&Im(e,n.o,n.s),n.J&&n.g.setTimeout(n.J);var t=n.g;n=n.ka,t.K=1,t.v=yf(Co(e)),t.s=null,t.P=!0,mD(t,n)}function ao(n){null!=n.v&&(an.clearTimeout(n.v),n.v=null)}function Dd(n,e){var t=null;if(n.g==e){ao(n),xf(n),n.g=null;var i=2}else{if(!Ef(n.h,e))return;t=e.D,bv(n.h,e),i=1}if(0!=n.G)if(n.pa=e.Y,e.i)if(1==i){t=e.s?e.s.length:0,e=Date.now()-e.F;var a=n.C;Wi(i=fd(),new pd(i,t,e,a)),nc(n)}else bm(n);else if(3==(a=e.o)||0==a&&0=n.h.j-(n.m?1:0)||(n.m?(n.i=e.D.concat(n.i),0):1==n.G||2==n.G||n.C>=(n.Za?0:n.$a)||(n.m=uu(Gi(n.Ja,n,e),wd(n,n.C)),n.C++,0)))}(n,e)||2==i&&Mf(n)))switch(t&&0"content-type"==c.toLowerCase()),a=an.FormData&&n instanceof an.FormData,!(0<=id(Mv,e))||i||a||t.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[c,h]of t)this.g.setRequestHeader(c,h);this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{SD(this),0=this.P)){var n=2*this.P;this.j.info("BP detection timer enabled: "+n),this.B=uu(Gi(this.eb,this),n)}},Ot.eb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.L=!1,this.K=!0,Cs(10),tc(this),Rf(this))},Ot.cb=function(){null!=this.v&&(this.v=null,tc(this),Mf(this),Cs(19))},Ot.kb=function(n){n?(this.j.info("Successfully pinged google.com"),Cs(2)):(this.j.info("Failed to ping google.com"),Cs(1))},(Ot=kv.prototype).xa=function(){},Ot.wa=function(){},Ot.va=function(){},Ot.ua=function(){},Ot.Ra=function(){},Pf.prototype.g=function(n,e){return new Ki(n,e)},Pi(Ki,zi),Ki.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.H=!0);var n=this.g,e=this.l,t=this.h||void 0;Cs(0),n.V=e,n.ia=t||{},n.L=n.Y,n.F=Of(n,null,n.V),nc(n)},Ki.prototype.close=function(){Dm(this.g)},Ki.prototype.u=function(n){var e=this.g;if("string"==typeof n){var t={};t.__data__=n,n=t}else this.v&&((t={}).__data__=Jg(n),n=t);e.i.push(new class{constructor(n,e){this.h=n,this.g=e}}(e.ab++,n)),3==e.G&&nc(e)},Ki.prototype.M=function(){this.g.l=null,delete this.j,Dm(this.g),delete this.g,Ki.X.M.call(this)},Pi(Lv,am),Pi(AD,um),Pi(nl,kv),nl.prototype.xa=function(){Wi(this.g,"a")},nl.prototype.wa=function(n){Wi(this.g,new Lv(n))},nl.prototype.va=function(n){Wi(this.g,new AD(n))},nl.prototype.ua=function(){Wi(this.g,"b")},Pf.prototype.createWebChannel=Pf.prototype.g,Ki.prototype.send=Ki.prototype.u,Ki.prototype.open=Ki.prototype.m,Ki.prototype.close=Ki.prototype.close,qc.NO_ERROR=0,qc.TIMEOUT=8,qc.HTTP_ERROR=6,lf.COMPLETE="complete",vv.EventType=md,md.OPEN="a",md.CLOSE="b",md.ERROR="c",md.MESSAGE="d",zi.prototype.listen=zi.prototype.N,Hr.prototype.listenOnce=Hr.prototype.O,Hr.prototype.getLastError=Hr.prototype.Oa,Hr.prototype.getLastErrorCode=Hr.prototype.Ea,Hr.prototype.getStatus=Hr.prototype.aa,Hr.prototype.getResponseJson=Hr.prototype.Sa,Hr.prototype.getResponseText=Hr.prototype.fa,Hr.prototype.send=Hr.prototype.da,Hr.prototype.setWithCredentials=Hr.prototype.Ka;var nT=bo.createWebChannelTransport=function(){return new Pf},MD=bo.getStatEventTarget=function(){return fd()},Cm=bo.ErrorCode=qc,xD=bo.EventType=lf,Fv=bo.Event=ls,Sm=bo.Stat={sb:0,vb:1,wb:2,Pb:3,Ub:4,Rb:5,Sb:6,Qb:7,Ob:8,Tb:9,PROXY:10,NOPROXY:11,Mb:12,Ib:13,Jb:14,Hb:15,Kb:16,Lb:17,ob:18,nb:19,pb:20},RD=bo.FetchXmlHttpFactory=el,rl=bo.WebChannel=vv,OD=bo.XhrIo=Hr;const Uv="@firebase/firestore";class Ni{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}}Ni.UNAUTHENTICATED=new Ni(null),Ni.GOOGLE_CREDENTIALS=new Ni("google-credentials-uid"),Ni.FIRST_PARTY=new Ni("first-party-uid"),Ni.MOCK_USER=new Ni("mock-user");let il="9.12.1";const hu=new Q.Yd("@firebase/firestore");function Am(){return hu.logLevel}function tt(n,...e){if(hu.logLevel<=Q.in.DEBUG){const t=e.map(xm);hu.debug(`Firestore (${il}): ${n}`,...t)}}function ii(n,...e){if(hu.logLevel<=Q.in.ERROR){const t=e.map(xm);hu.error(`Firestore (${il}): ${n}`,...t)}}function ta(n,...e){if(hu.logLevel<=Q.in.WARN){const t=e.map(xm);hu.warn(`Firestore (${il}): ${n}`,...t)}}function xm(n){if("string"==typeof n)return n;try{return JSON.stringify(n)}catch{return n}}function Rt(n="Unexpected state"){const e=`FIRESTORE (${il}) INTERNAL ASSERTION FAILED: `+n;throw ii(e),new Error(e)}function $t(n,e){n||Rt()}function ut(n,e){return n}const ke={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 Ye extends W.ZR{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class Dr{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class bd{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class uo{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(Ni.UNAUTHENTICATED))}shutdown(){}}class Rm{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 sl{constructor(e){this.t=e,this.currentUser=Ni.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){var i=this;let a=this.i;const c=x=>this.i!==a?(a=this.i,t(x)):Promise.resolve();let h=new Dr;this.o=()=>{this.i++,this.currentUser=this.u(),h.resolve(),h=new Dr,e.enqueueRetryable(()=>c(this.currentUser))};const g=()=>{const x=h;e.enqueueRetryable((0,O.Z)(function*(){yield x.promise,yield c(i.currentUser)}))},T=x=>{tt("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=x,this.auth.addAuthTokenListener(this.o),g()};this.t.onInit(x=>T(x)),setTimeout(()=>{if(!this.auth){const x=this.t.getImmediate({optional:!0});x?T(x):(tt("FirebaseAuthCredentialsProvider","Auth not yet detected"),h.resolve(),h=new Dr)}},0),g()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(i=>this.i!==e?(tt("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):i?($t("string"==typeof i.accessToken),new bd(i.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 $t(null===e||"string"==typeof e),new Ni(e)}}class ol{constructor(e,t,i,a){this.h=e,this.l=t,this.m=i,this.g=a,this.type="FirstParty",this.user=Ni.FIRST_PARTY,this.p=new Map}I(){return this.g?this.g():($t(!("object"!=typeof this.h||null===this.h||!this.h.auth||!this.h.auth.getAuthHeaderValueForFirstParty)),this.h.auth.getAuthHeaderValueForFirstParty([]))}get headers(){this.p.set("X-Goog-AuthUser",this.l);const e=this.I();return e&&this.p.set("Authorization",e),this.m&&this.p.set("X-Goog-Iam-Authorization-Token",this.m),this.p}}class al{constructor(e,t,i,a){this.h=e,this.l=t,this.m=i,this.g=a}getToken(){return Promise.resolve(new ol(this.h,this.l,this.m,this.g))}start(e,t){e.enqueueRetryable(()=>t(Ni.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class rc{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 ul{constructor(e){this.T=e,this.forceRefresh=!1,this.appCheck=null,this.A=null}start(e,t){const i=c=>{null!=c.error&&tt("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${c.error.message}`);const h=c.token!==this.A;return this.A=c.token,tt("FirebaseAppCheckTokenProvider",`Received ${h?"new":"existing"} token.`),h?t(c.token):Promise.resolve()};this.o=c=>{e.enqueueRetryable(()=>i(c))};const a=c=>{tt("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=c,this.appCheck.addTokenListener(this.o)};this.T.onInit(c=>a(c)),setTimeout(()=>{if(!this.appCheck){const c=this.T.getImmediate({optional:!0});c?a(c):tt("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(t=>t?($t("string"==typeof t.token),this.A=t.token,new rc(t.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function cl(n){const e=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(n);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(t);else for(let i=0;ie?1:0}function sc(n,e,t){return n.length===e.length&&n.every((i,a)=>t(i,e[a]))}function Om(n){return n+"\0"}class Sr{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new Ye(ke.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new Ye(ke.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new Ye(ke.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new Ye(ke.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return Sr.fromMillis(Date.now())}static fromDate(e){return Sr.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),i=Math.floor(1e6*(e-1e3*t));return new Sr(t,i)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Wt(this.nanoseconds,e.nanoseconds):Wt(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 zt{constructor(e){this.timestamp=e}static fromTimestamp(e){return new zt(e)}static min(){return new zt(new Sr(0,0))}static max(){return new zt(new Sr(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 ll{constructor(e,t,i){void 0===t?t=0:t>e.length&&Rt(),void 0===i?i=e.length-t:i>e.length-t&&Rt(),this.segments=e,this.offset=t,this.len=i}get length(){return this.len}isEqual(e){return 0===ll.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof ll?e.forEach(i=>{t.push(i)}):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.lengthh)return 1}return e.lengtht.length?1:0}}class Fn extends ll{construct(e,t,i){return new Fn(e,t,i)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const t=[];for(const i of e){if(i.indexOf("//")>=0)throw new Ye(ke.INVALID_ARGUMENT,`Invalid segment (${i}). Paths must not contain // in them.`);t.push(...i.split("/").filter(a=>a.length>0))}return new Fn(t)}static emptyPath(){return new Fn([])}}const Bv=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class zr extends ll{construct(e,t,i){return new zr(e,t,i)}static isValidIdentifier(e){return Bv.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),zr.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new zr(["__name__"])}static fromServerFormat(e){const t=[];let i="",a=0;const c=()=>{if(0===i.length)throw new Ye(ke.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(i),i=""};let h=!1;for(;a=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===Fn.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return Fn.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new pt(new Fn(e.slice()))}}class Nf{constructor(e,t,i,a){this.indexId=e,this.collectionGroup=t,this.fields=i,this.indexState=a}}function Pm(n){return n.fields.find(e=>2===e.kind)}function fu(n){return n.fields.filter(e=>2!==e.kind)}Nf.UNKNOWN_ID=-1;class Cd{constructor(e,t){this.fieldPath=e,this.kind=t}}class oc{constructor(e,t){this.sequenceNumber=e,this.offset=t}static empty(){return new oc(0,es.min())}}function Sd(n){return new es(n.readTime,n.key,-1)}class es{constructor(e,t,i){this.readTime=e,this.documentKey=t,this.largestBatchId=i}static min(){return new es(zt.min(),pt.empty(),-1)}static max(){return new es(zt.max(),pt.empty(),-1)}}function Ad(n,e){let t=n.readTime.compareTo(e.readTime);return 0!==t?t:(t=pt.comparator(n.documentKey,e.documentKey),0!==t?t:Wt(n.largestBatchId,e.largestBatchId))}const jv="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Md{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}function xo(n){return kf.apply(this,arguments)}function kf(){return kf=(0,O.Z)(function*(n){if(n.code!==ke.FAILED_PRECONDITION||n.message!==jv)throw n;tt("LocalStore","Unexpectedly lost primary lease")}),kf.apply(this,arguments)}class xe{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&&Rt(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new xe((i,a)=>{this.nextCallback=c=>{this.wrapSuccess(e,c).next(i,a)},this.catchCallback=c=>{this.wrapFailure(t,c).next(i,a)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{const t=e();return t instanceof xe?t:xe.resolve(t)}catch(t){return xe.reject(t)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):xe.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):xe.reject(t)}static resolve(e){return new xe((t,i)=>{t(e)})}static reject(e){return new xe((t,i)=>{i(e)})}static waitFor(e){return new xe((t,i)=>{let a=0,c=0,h=!1;e.forEach(g=>{++a,g.next(()=>{++c,h&&c===a&&t()},T=>i(T))}),h=!0,c===a&&t()})}static or(e){let t=xe.resolve(!1);for(const i of e)t=t.next(a=>a?xe.resolve(a):i());return t}static forEach(e,t){const i=[];return e.forEach((a,c)=>{i.push(t.call(this,a,c))}),this.waitFor(i)}static mapArray(e,t){return new xe((i,a)=>{const c=e.length,h=new Array(c);let g=0;for(let T=0;T{h[x]=j,++g,g===c&&i(h)},j=>a(j))}})}static doWhile(e,t){return new xe((i,a)=>{const c=()=>{!0===e()?t().next(()=>{c()},a):i()};c()})}}class dl{constructor(e,t){this.action=e,this.transaction=t,this.aborted=!1,this.P=new Dr,this.transaction.oncomplete=()=>{this.P.resolve()},this.transaction.onabort=()=>{t.error?this.P.reject(new ac(e,t.error)):this.P.resolve()},this.transaction.onerror=i=>{const a=Lf(i.target.error);this.P.reject(new ac(e,a))}}static open(e,t,i,a){try{return new dl(t,e.transaction(a,i))}catch(c){throw new ac(t,c)}}get v(){return this.P.promise}abort(e){e&&this.P.reject(e),this.aborted||(tt("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}V(){const e=this.transaction;this.aborted||"function"!=typeof e.commit||e.commit()}store(e){const t=this.transaction.objectStore(e);return new ND(t)}}class co{constructor(e,t,i){this.name=e,this.version=t,this.S=i,12.2===co.D((0,W.z$)())&&ii("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 tt("SimpleDb","Removing database:",e),pu(window.indexedDB.deleteDatabase(e)).toPromise()}static C(){if(!(0,W.hl)())return!1;if(co.N())return!0;const e=(0,W.z$)(),t=co.D(e),i=00||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||i||c)}static N(){var e;return typeof process<"u"&&"YES"===(null===(e=process.env)||void 0===e?void 0:e.O)}static M(e,t){return e.store(t)}static D(e){const t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),i=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(i)}static k(e){const t=e.match(/Android ([\d.]+)/i),i=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(i)}F(e){var t=this;return(0,O.Z)(function*(){return t.db||(tt("SimpleDb","Opening database:",t.name),t.db=yield new Promise((i,a)=>{const c=indexedDB.open(t.name,t.version);c.onsuccess=h=>{i(h.target.result)},c.onblocked=()=>{a(new ac(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},c.onerror=h=>{const g=h.target.error;a("VersionError"===g.name?new Ye(ke.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"===g.name?new Ye(ke.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: "+g):new ac(e,g))},c.onupgradeneeded=h=>{tt("SimpleDb",'Database "'+t.name+'" requires upgrade from version:',h.oldVersion),t.S.$(h.target.result,c.transaction,h.oldVersion,t.version).next(()=>{tt("SimpleDb","Database upgrade to version "+t.version+" complete")})}})),t.B&&(t.db.onversionchange=i=>t.B(i)),t.db})()}L(e){this.B=e,this.db&&(this.db.onversionchange=t=>e(t))}runTransaction(e,t,i,a){var c=this;return(0,O.Z)(function*(){const h="readonly"===t;let g=0;for(;;){++g;try{c.db=yield c.F(e);const T=dl.open(c.db,e,h?"readonly":"readwrite",i),x=a(T).next(j=>(T.V(),j)).catch(j=>(T.abort(j),xe.reject(j))).toPromise();return x.catch(()=>{}),yield T.v,x}catch(T){const x=T,j="FirebaseError"!==x.name&&g<3;if(tt("SimpleDb","Transaction failed with error:",x.message,"Retrying:",j),c.close(),!j)return Promise.reject(x)}}})()}close(){this.db&&this.db.close(),this.db=void 0}}class $v{constructor(e){this.U=e,this.q=!1,this.K=null}get isDone(){return this.q}get G(){return this.K}set cursor(e){this.U=e}done(){this.q=!0}j(e){this.K=e}delete(){return pu(this.U.delete())}}class ac extends Ye{constructor(e,t){super(ke.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${t}`),this.name="IndexedDbTransactionError"}}function Oa(n){return"IndexedDbTransactionError"===n.name}class ND{constructor(e){this.store=e}put(e,t){let i;return void 0!==t?(tt("SimpleDb","PUT",this.store.name,e,t),i=this.store.put(t,e)):(tt("SimpleDb","PUT",this.store.name,"",e),i=this.store.put(e)),pu(i)}add(e){return tt("SimpleDb","ADD",this.store.name,e,e),pu(this.store.add(e))}get(e){return pu(this.store.get(e)).next(t=>(void 0===t&&(t=null),tt("SimpleDb","GET",this.store.name,e,t),t))}delete(e){return tt("SimpleDb","DELETE",this.store.name,e),pu(this.store.delete(e))}count(){return tt("SimpleDb","COUNT",this.store.name),pu(this.store.count())}W(e,t){const i=this.options(e,t);if(i.index||"function"!=typeof this.store.getAll){const a=this.cursor(i),c=[];return this.H(a,(h,g)=>{c.push(g)}).next(()=>c)}{const a=this.store.getAll(i.range);return new xe((c,h)=>{a.onerror=g=>{h(g.target.error)},a.onsuccess=g=>{c(g.target.result)}})}}J(e,t){const i=this.store.getAll(e,null===t?void 0:t);return new xe((a,c)=>{i.onerror=h=>{c(h.target.error)},i.onsuccess=h=>{a(h.target.result)}})}Y(e,t){tt("SimpleDb","DELETE ALL",this.store.name);const i=this.options(e,t);i.X=!1;const a=this.cursor(i);return this.H(a,(c,h,g)=>g.delete())}Z(e,t){let i;t?i=e:(i={},t=e);const a=this.cursor(i);return this.H(a,t)}tt(e){const t=this.cursor({});return new xe((i,a)=>{t.onerror=c=>{const h=Lf(c.target.error);a(h)},t.onsuccess=c=>{const h=c.target.result;h?e(h.primaryKey,h.value).next(g=>{g?h.continue():i()}):i()}})}H(e,t){const i=[];return new xe((a,c)=>{e.onerror=h=>{c(h.target.error)},e.onsuccess=h=>{const g=h.target.result;if(!g)return void a();const T=new $v(g),x=t(g.primaryKey,g.value,T);if(x instanceof xe){const j=x.catch(re=>(T.done(),xe.reject(re)));i.push(j)}T.isDone?a():null===T.G?g.continue():g.continue(T.G)}}).next(()=>xe.waitFor(i))}options(e,t){let i;return void 0!==e&&("string"==typeof e?i=e:t=e),{index:i,range:t}}cursor(e){let t="next";if(e.reverse&&(t="prev"),e.index){const i=this.store.index(e.index);return e.X?i.openKeyCursor(e.range,t):i.openCursor(e.range,t)}return this.store.openCursor(e.range,t)}}function pu(n){return new xe((e,t)=>{n.onsuccess=i=>{e(i.target.result)},n.onerror=i=>{const a=Lf(i.target.error);t(a)}})}let km=!1;function Lf(n){const e=co.D((0,W.z$)());if(e>=12.2&&e<13){const t="An internal error was encountered in the Indexed Database server";if(n.message.indexOf(t)>=0){const i=new Ye("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 km||(km=!0,setTimeout(()=>{throw i},0)),i}}return n}class Gv{constructor(e,t){this.asyncQueue=e,this.et=t,this.task=null}start(){this.nt(15e3)}stop(){this.task&&(this.task.cancel(),this.task=null)}get started(){return null!==this.task}nt(e){var t=this;tt("IndexBackiller",`Scheduled in ${e}ms`),this.task=this.asyncQueue.enqueueAfterDelay("index_backfill",e,(0,O.Z)(function*(){t.task=null;try{tt("IndexBackiller",`Documents written: ${yield t.et.st()}`)}catch(i){Oa(i)?tt("IndexBackiller","Ignoring IndexedDB error during index backfill: ",i):yield xo(i)}yield t.nt(6e4)}))}}class kD{constructor(e,t){this.localStore=e,this.persistence=t}st(e=50){var t=this;return(0,O.Z)(function*(){return t.persistence.runTransaction("Backfill Indexes","readwrite-primary",i=>t.it(i,e))})()}it(e,t){const i=new Set;let a=t,c=!0;return xe.doWhile(()=>!0===c&&a>0,()=>this.localStore.indexManager.getNextCollectionGroupToUpdate(e).next(h=>{if(null!==h&&!i.has(h))return tt("IndexBackiller",`Processing collection: ${h}`),this.rt(e,h,a).next(g=>{a-=g,i.add(h)});c=!1})).next(()=>t-a)}rt(e,t,i){return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e,t).next(a=>this.localStore.localDocuments.getNextDocuments(e,t,a,i).next(c=>{const h=c.changes;return this.localStore.indexManager.updateIndexEntries(e,h).next(()=>this.ot(a,c)).next(g=>(tt("IndexBackiller",`Updating offset: ${g}`),this.localStore.indexManager.updateCollectionGroup(e,t,g))).next(()=>h.size)}))}ot(e,t){let i=e;return t.changes.forEach((a,c)=>{const h=Sd(c);Ad(h,i)>0&&(i=h)}),new es(i.readTime,i.documentKey,Math.max(t.batchId,e.largestBatchId))}}class As{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=i=>this.ut(i),this.ct=i=>t.writeSequenceNumber(i))}ut(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ct&&this.ct(e),e}}function Hv(n){let e=0;for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e++;return e}function gu(n,e){for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e(t,n[t])}function Ff(n){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e))return!1;return!0}As.at=-1;class Lr{constructor(e,t){this.comparator=e,this.root=t||ki.EMPTY}insert(e,t){return new Lr(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,ki.BLACK,null,null))}remove(e){return new Lr(this.comparator,this.root.remove(e,this.comparator).copy(null,null,ki.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const i=this.comparator(e,t.key);if(0===i)return t.value;i<0?t=t.left:i>0&&(t=t.right)}return null}indexOf(e){let t=0,i=this.root;for(;!i.isEmpty();){const a=this.comparator(e,i.key);if(0===a)return t+i.left.size;a<0?i=i.left:(t+=i.left.size+1,i=i.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,i)=>(e(t,i),!1))}toString(){const e=[];return this.inorderTraversal((t,i)=>(e.push(`${t}:${i}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new xd(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new xd(this.root,e,this.comparator,!1)}getReverseIterator(){return new xd(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new xd(this.root,e,this.comparator,!0)}}class xd{constructor(e,t,i,a){this.isReverse=a,this.nodeStack=[];let c=1;for(;!e.isEmpty();)if(c=t?i(e.key,t):1,t&&a&&(c*=-1),c<0)e=this.isReverse?e.left:e.right;else{if(0===c){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 ki{constructor(e,t,i,a,c){this.key=e,this.value=t,this.color=i??ki.RED,this.left=a??ki.EMPTY,this.right=c??ki.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,i,a,c){return new ki(e??this.key,t??this.value,i??this.color,a??this.left,c??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,i){let a=this;const c=i(e,a.key);return a=c<0?a.copy(null,null,null,a.left.insert(e,t,i),null):0===c?a.copy(null,t,null,null,null):a.copy(null,null,null,null,a.right.insert(e,t,i)),a.fixUp()}removeMin(){if(this.left.isEmpty())return ki.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 i,a=this;if(t(e,a.key)<0)a.left.isEmpty()||a.left.isRed()||a.left.left.isRed()||(a=a.moveRedLeft()),a=a.copy(null,null,null,a.left.remove(e,t),null);else{if(a.left.isRed()&&(a=a.rotateRight()),a.right.isEmpty()||a.right.isRed()||a.right.left.isRed()||(a=a.moveRedRight()),0===t(e,a.key)){if(a.right.isEmpty())return ki.EMPTY;i=a.right.min(),a=a.copy(i.key,i.value,null,null,a.right.removeMin())}a=a.copy(null,null,null,null,a.right.remove(e,t))}return a.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,ki.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,ki.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 Rt();const e=this.left.check();if(e!==this.right.check())throw Rt();return e+(this.isRed()?0:1)}}ki.EMPTY=null,ki.RED=!0,ki.BLACK=!1,ki.EMPTY=new class{constructor(){this.size=0}get key(){throw Rt()}get value(){throw Rt()}get color(){throw Rt()}get left(){throw Rt()}get right(){throw Rt()}copy(n,e,t,i,a){return this}insert(n,e,t){return new ki(n,e)}remove(n,e){return this}isEmpty(){return!0}inorderTraversal(n){return!1}reverseTraversal(n){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class ur{constructor(e){this.comparator=e,this.data=new Lr(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,i)=>(e(t),!1))}forEachInRange(e,t){const i=this.data.getIteratorFrom(e[0]);for(;i.hasNext();){const a=i.getNext();if(this.comparator(a.key,e[1])>=0)return;t(a.key)}}forEachWhile(e,t){let i;for(i=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();i.hasNext();)if(!e(i.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new Lm(this.data.getIterator())}getIteratorFrom(e){return new Lm(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(i)}),t}isEqual(e){if(!(e instanceof ur)||this.size!==e.size)return!1;const t=this.data.getIterator(),i=e.data.getIterator();for(;t.hasNext();){const a=t.getNext().key,c=i.getNext().key;if(0!==this.comparator(a,c))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 ur(this.comparator);return t.data=e,t}}class Lm{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}function uc(n){return n.hasNext()?n.getNext():void 0}class Ms{constructor(e){this.fields=e,e.sort(zr.comparator)}static empty(){return new Ms([])}unionWith(e){let t=new ur(zr.comparator);for(const i of this.fields)t=t.add(i);for(const i of e)t=t.add(i);return new Ms(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return sc(this.fields,e.fields,(t,i)=>t.isEqual(i))}}class Li{constructor(e){this.binaryString=e}static fromBase64String(e){const t=atob(e);return new Li(t)}static fromUint8Array(e){const t=function(i){let a="";for(let c=0;ceRo(t,e))}function Pa(n,e){if(n===e)return 0;const t=lc(n),i=lc(e);if(t!==i)return Wt(t,i);switch(t){case 0:case 9007199254740991:return 0;case 1:return Wt(n.booleanValue,e.booleanValue);case 2:return function(a,c){const h=Fr(a.integerValue||a.doubleValue),g=Fr(c.integerValue||c.doubleValue);return hg?1:h===g?0:isNaN(h)?isNaN(g)?0:-1:1}(n,e);case 3:return BD(n.timestampValue,e.timestampValue);case 4:return BD(Rd(n),Rd(e));case 5:return Wt(n.stringValue,e.stringValue);case 6:return function(a,c){const h=cc(a),g=cc(c);return h.compareTo(g)}(n.bytesValue,e.bytesValue);case 7:return function(a,c){const h=a.split("/"),g=c.split("/");for(let T=0;Te.mapValue.fields[t]=fl(i)),e}if(n.arrayValue){const e={arrayValue:{values:[]}};for(let t=0;t<(n.arrayValue.values||[]).length;++t)e.arrayValue.values[t]=fl(n.arrayValue.values[t]);return e}return Object.assign({},n)}function Vm(n){return"__max__"===(((n.mapValue||{}).fields||{}).__type__||{}).stringValue}function VD(n){return"nullValue"in n?Uf:"booleanValue"in n?{booleanValue:!1}:"integerValue"in n||"doubleValue"in n?{doubleValue:NaN}:"timestampValue"in n?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"stringValue"in n?{stringValue:""}:"bytesValue"in n?{bytesValue:""}:"referenceValue"in n?ts(yu.empty(),pt.empty()):"geoPointValue"in n?{geoPointValue:{latitude:-90,longitude:-180}}:"arrayValue"in n?{arrayValue:{}}:"mapValue"in n?{mapValue:{}}:Rt()}function jD(n){return"nullValue"in n?{booleanValue:!1}:"booleanValue"in n?{doubleValue:NaN}:"integerValue"in n||"doubleValue"in n?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"timestampValue"in n?{stringValue:""}:"stringValue"in n?{bytesValue:""}:"bytesValue"in n?ts(yu.empty(),pt.empty()):"referenceValue"in n?{geoPointValue:{latitude:-90,longitude:-180}}:"geoPointValue"in n?{arrayValue:{}}:"arrayValue"in n?{mapValue:{}}:"mapValue"in n?Ys:Rt()}function zv(n,e){const t=Pa(n.value,e.value);return 0!==t?t:n.inclusive&&!e.inclusive?-1:!n.inclusive&&e.inclusive?1:0}function Wv(n,e){const t=Pa(n.value,e.value);return 0!==t?t:n.inclusive&&!e.inclusive?1:!n.inclusive&&e.inclusive?-1:0}class gi{constructor(e){this.value=e}static empty(){return new gi({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let i=0;i{if(!t.isImmediateParentOf(g)){const T=this.getFieldsMap(t);this.applyChanges(T,i,a),i={},a=[],t=g.popLast()}h?i[g.lastSegment()]=fl(h):a.push(g.lastSegment())});const c=this.getFieldsMap(t);this.applyChanges(c,i,a)}delete(e){const t=this.field(e.popLast());xs(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return Ro(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let i=0;ie[a]=c);for(const a of i)delete e[a]}clone(){return new gi(fl(this.value))}}function pl(n){const e=[];return gu(n.fields,(t,i)=>{const a=new zr([t]);if(xs(i)){const c=pl(i.mapValue).fields;if(0===c.length)e.push(a);else for(const h of c)e.push(a.child(h))}else e.push(a)}),new Ms(e)}class mr{constructor(e,t,i,a,c,h){this.key=e,this.documentType=t,this.version=i,this.readTime=a,this.data=c,this.documentState=h}static newInvalidDocument(e){return new mr(e,0,zt.min(),zt.min(),gi.empty(),0)}static newFoundDocument(e,t,i){return new mr(e,1,t,zt.min(),i,0)}static newNoDocument(e,t){return new mr(e,2,t,zt.min(),gi.empty(),0)}static newUnknownDocument(e,t){return new mr(e,3,t,zt.min(),gi.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=gi.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=gi.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=zt.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 mr&&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 mr(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 Kv{constructor(e,t=null,i=[],a=[],c=null,h=null,g=null){this.path=e,this.collectionGroup=t,this.orderBy=i,this.filters=a,this.limit=c,this.startAt=h,this.endAt=g,this.ht=null}}function qv(n,e=null,t=[],i=[],a=null,c=null,h=null){return new Kv(n,e,t,i,a,c,h)}function _u(n){const e=ut(n);if(null===e.ht){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:",t+=e.filters.map(i=>{return(a=i).field.canonicalString()+a.op.toString()+dc(a.value);var a}).join(","),t+="|ob:",t+=e.orderBy.map(i=>{return(a=i).field.canonicalString()+a.dir;var a}).join(","),Od(e.limit)||(t+="|l:",t+=e.limit),e.startAt&&(t+="|lb:",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map(i=>dc(i)).join(",")),e.endAt&&(t+="|ub:",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map(i=>dc(i)).join(",")),e.ht=t}return e.ht}function vu(n,e){if(n.limit!==e.limit||n.orderBy.length!==e.orderBy.length)return!1;for(let a=0;at instanceof mi&&t.field.isEqual(e))}function jm(n,e,t){let i=Uf,a=!0;for(const c of Ld(n,e)){let h=Uf,g=!0;switch(c.op){case"<":case"<=":h=VD(c.value);break;case"==":case"in":case">=":h=c.value;break;case">":h=c.value,g=!1;break;case"!=":case"not-in":h=Uf}zv({value:i,inclusive:a},{value:h,inclusive:g})<0&&(i=h,a=g)}if(null!==t)for(let c=0;c=":case">":h=jD(c.value),g=!1;break;case"==":case"in":case"<=":h=c.value;break;case"<":h=c.value,g=!1;break;case"!=":case"not-in":h=Ys}Wv({value:i,inclusive:a},{value:h,inclusive:g})>0&&(i=h,a=g)}if(null!==t)for(let c=0;c0&&(i=h,a=t.inclusive);break}return{value:i,inclusive:a}}class mi extends class{}{constructor(e,t,i){super(),this.field=e,this.op=t,this.value=i}static create(e,t,i){return e.isKeyField()?"in"===t||"not-in"===t?this.lt(e,t,i):new $m(e,t,i):"array-contains"===t?new Xv(e,i):"in"===t?new Jv(e,i):"not-in"===t?new eE(e,i):"array-contains-any"===t?new tE(e,i):new mi(e,t,i)}static lt(e,t,i){return"in"===t?new Zv(e,i):new Qv(e,i)}matches(e){const t=e.data.field(this.field);return"!="===this.op?null!==t&&this.ft(Pa(t,this.value)):null!==t&&lc(this.value)===lc(t)&&this.ft(Pa(t,this.value))}ft(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 Rt()}}dt(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}class $m extends mi{constructor(e,t,i){super(e,t,i),this.key=pt.fromName(i.referenceValue)}matches(e){const t=pt.comparator(e.key,this.key);return this.ft(t)}}class Zv extends mi{constructor(e,t){super(e,"in",t),this.keys=Gm(0,t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class Qv extends mi{constructor(e,t){super(e,"not-in",t),this.keys=Gm(0,t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function Gm(n,e){var t;return((null===(t=e.arrayValue)||void 0===t?void 0:t.values)||[]).map(i=>pt.fromName(i.referenceValue))}class Xv extends mi{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return kd(t)&&Pd(t.arrayValue,this.value)}}class Jv extends mi{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return null!==t&&Pd(this.value.arrayValue,t)}}class eE extends mi{constructor(e,t){super(e,"not-in",t)}matches(e){if(Pd(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return null!==t&&!Pd(this.value.arrayValue,t)}}class tE extends mi{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!kd(t)||!t.arrayValue.values)&&t.arrayValue.values.some(i=>Pd(this.value.arrayValue,i))}}class Eu{constructor(e,t){this.position=e,this.inclusive=t}}class gl{constructor(e,t="asc"){this.field=e,this.dir=t}}function $D(n,e){return n.dir===e.dir&&n.field.isEqual(e.field)}function nE(n,e,t){let i=0;for(let a=0;a0?n.explicitOrderBy[0].field:null}(e);if(null!==t&&null===i)t.isKeyField()||e._t.push(new gl(t)),e._t.push(new gl(zr.keyField(),"asc"));else{let a=!1;for(const c of e.explicitOrderBy)e._t.push(c),c.field.isKeyField()&&(a=!0);if(!a){const c=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e._t.push(new gl(zr.keyField(),c))}}}return e._t}function ds(n){const e=ut(n);if(!e.wt)if("F"===e.limitType)e.wt=qv(e.path,e.collectionGroup,yl(e),e.filters,e.limit,e.startAt,e.endAt);else{const t=[];for(const c of yl(e))t.push(new gl(c.field,"desc"===c.dir?"asc":"desc"));const i=e.endAt?new Eu(e.endAt.position,e.endAt.inclusive):null,a=e.startAt?new Eu(e.startAt.position,e.startAt.inclusive):null;e.wt=qv(e.path,e.collectionGroup,t,e.filters,e.limit,i,a)}return e.wt}function jf(n,e,t){return new Na(n.path,n.collectionGroup,n.explicitOrderBy.slice(),n.filters.slice(),e,t,n.startAt,n.endAt)}function Fd(n,e){return vu(ds(n),ds(e))&&n.limitType===e.limitType}function oE(n){return`${_u(ds(n))}|lt:${n.limitType}`}function Km(n){return`Query(target=${function Yv(n){let e=n.path.canonicalString();return null!==n.collectionGroup&&(e+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(e+=`, filters: [${n.filters.map(t=>{return`${(i=t).field.canonicalString()} ${i.op} ${dc(i.value)}`;var i}).join(", ")}]`),Od(n.limit)||(e+=", limit: "+n.limit),n.orderBy.length>0&&(e+=`, orderBy: [${n.orderBy.map(t=>{return`${(i=t).field.canonicalString()} (${i.dir})`;var i}).join(", ")}]`),n.startAt&&(e+=", startAt: ",e+=n.startAt.inclusive?"b:":"a:",e+=n.startAt.position.map(t=>dc(t)).join(",")),n.endAt&&(e+=", endAt: ",e+=n.endAt.inclusive?"a:":"b:",e+=n.endAt.position.map(t=>dc(t)).join(",")),`Target(${e})`}(ds(n))}; limitType=${n.limitType})`}function $f(n,e){return e.isFoundDocument()&&function(t,i){const a=i.key.path;return null!==t.collectionGroup?i.key.hasCollectionId(t.collectionGroup)&&t.path.isPrefixOf(a):pt.isDocumentKey(t.path)?t.path.isEqual(a):t.path.isImmediateParentOf(a)}(n,e)&&function(t,i){for(const a of t.explicitOrderBy)if(!a.field.isKeyField()&&null===i.data.field(a.field))return!1;return!0}(n,e)&&function(t,i){for(const a of t.filters)if(!a.matches(i))return!1;return!0}(n,e)&&(i=e,!((t=n).startAt&&!function(a,c,h){const g=nE(a,c,h);return a.inclusive?g<=0:g<0}(t.startAt,yl(t),i)||t.endAt&&!function(a,c,h){const g=nE(a,c,h);return a.inclusive?g>=0:g>0}(t.endAt,yl(t),i)));var t,i}function Ym(n){return(e,t)=>{let i=!1;for(const a of yl(n)){const c=aE(a,e,t);if(0!==c)return c;i=i||a.field.isKeyField()}return 0}}function aE(n,e,t){const i=n.field.isKeyField()?pt.comparator(e.key,t.key):function(a,c,h){const g=c.data.field(a),T=h.data.field(a);return null!==g&&null!==T?Pa(g,T):Rt()}(n.field,e,t);switch(n.dir){case"asc":return i;case"desc":return-1*i;default:return Rt()}}function Zm(n,e){if(n.gt){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:hl(e)?"-0":e}}function Qm(n){return{integerValue:""+n}}function Xm(n,e){return function Um(n){return"number"==typeof n&&Number.isInteger(n)&&!hl(n)&&n<=Number.MAX_SAFE_INTEGER&&n>=Number.MIN_SAFE_INTEGER}(e)?Qm(e):Zm(n,e)}class Ud{constructor(){this._=void 0}}function uE(n,e,t){return n instanceof ho?function(i,a){const c={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return a&&(c.fields.__previous_value__=a),{mapValue:c}}(t,e):n instanceof hc?lE(n,e):n instanceof fo?GD(n,e):function(i,a){const c=Jm(i,a),h=HD(c)+HD(i.yt);return Bm(c)&&Bm(i.yt)?Qm(h):Zm(i.It,h)}(n,e)}function cE(n,e,t){return n instanceof hc?lE(n,e):n instanceof fo?GD(n,e):t}function Jm(n,e){return n instanceof Iu?Bm(t=e)||(i=t)&&"doubleValue"in i?e:{integerValue:0}:null;var i,t}class ho extends Ud{}class hc extends Ud{constructor(e){super(),this.elements=e}}function lE(n,e){const t=ey(e);for(const i of n.elements)t.some(a=>Ro(a,i))||t.push(i);return{arrayValue:{values:t}}}class fo extends Ud{constructor(e){super(),this.elements=e}}function GD(n,e){let t=ey(e);for(const i of n.elements)t=t.filter(a=>!Ro(a,i));return{arrayValue:{values:t}}}class Iu extends Ud{constructor(e,t){super(),this.It=e,this.yt=t}}function HD(n){return Fr(n.integerValue||n.doubleValue)}function ey(n){return kd(n)&&n.arrayValue.values?n.arrayValue.values.slice():[]}class _l{constructor(e,t){this.field=e,this.transform=t}}class Gt{constructor(e,t){this.version=e,this.transformResults=t}}class Ar{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new Ar}static exists(e){return new Ar(void 0,e)}static updateTime(e){return new Ar(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 Gf(n,e){return void 0!==n.updateTime?e.isFoundDocument()&&e.version.isEqual(n.updateTime):void 0===n.exists||n.exists===e.isFoundDocument()}class Hf{}function fc(n,e){if(!n.hasLocalMutations||e&&0===e.fields.length)return null;if(null===e)return n.isNoDocument()?new pc(n.key,Ar.none()):new Bd(n.key,n.data,Ar.none());{const t=n.data,i=gi.empty();let a=new ur(zr.comparator);for(let c of e.fields)if(!a.has(c)){let h=t.field(c);null===h&&c.length>1&&(c=c.popLast(),h=t.field(c)),null===h?i.delete(c):i.set(c,h),a=a.add(c)}return new na(n.key,i,new Ms(a.toArray()),Ar.none())}}function zD(n,e,t){n instanceof Bd?function(i,a,c){const h=i.value.clone(),g=dE(i.fieldTransforms,a,c.transformResults);h.setAll(g),a.convertToFoundDocument(c.version,h).setHasCommittedMutations()}(n,e,t):n instanceof na?function(i,a,c){if(!Gf(i.precondition,a))return void a.convertToUnknownDocument(c.version);const h=dE(i.fieldTransforms,a,c.transformResults),g=a.data;g.setAll(ty(i)),g.setAll(h),a.convertToFoundDocument(c.version,g).setHasCommittedMutations()}(n,e,t):e.convertToNoDocument(t.version).setHasCommittedMutations()}function Du(n,e,t,i){return n instanceof Bd?function(a,c,h,g){if(!Gf(a.precondition,c))return h;const T=a.value.clone(),x=ny(a.fieldTransforms,g,c);return T.setAll(x),c.convertToFoundDocument(c.version,T).setHasLocalMutations(),null}(n,e,t,i):n instanceof na?function(a,c,h,g){if(!Gf(a.precondition,c))return h;const T=ny(a.fieldTransforms,g,c),x=c.data;return x.setAll(ty(a)),x.setAll(T),c.convertToFoundDocument(c.version,x).setHasLocalMutations(),null===h?null:h.unionWith(a.fieldMask.fields).unionWith(a.fieldTransforms.map(j=>j.field))}(n,e,t,i):(h=t,Gf(n.precondition,c=e)?(c.convertToNoDocument(c.version).setHasLocalMutations(),null):h);var c,h}function zf(n,e){let t=null;for(const i of n.fieldTransforms){const a=e.data.field(i.field),c=Jm(i.transform,a||null);null!=c&&(null===t&&(t=gi.empty()),t.set(i.field,c))}return t||null}function Ur(n,e){return n.type===e.type&&!!n.key.isEqual(e.key)&&!!n.precondition.isEqual(e.precondition)&&(i=e.fieldTransforms,!!(void 0===(t=n.fieldTransforms)&&void 0===i||t&&i&&sc(t,i,(a,c)=>function iT(n,e){return n.field.isEqual(e.field)&&(i=e.transform,(t=n.transform)instanceof hc&&i instanceof hc||t instanceof fo&&i instanceof fo?sc(t.elements,i.elements,Ro):t instanceof Iu&&i instanceof Iu?Ro(t.yt,i.yt):t instanceof ho&&i instanceof ho);var t,i}(a,c))))&&(0===n.type?n.value.isEqual(e.value):1!==n.type||n.data.isEqual(e.data)&&n.fieldMask.isEqual(e.fieldMask));var t,i}class Bd extends Hf{constructor(e,t,i,a=[]){super(),this.key=e,this.value=t,this.precondition=i,this.fieldTransforms=a,this.type=0}getFieldMask(){return null}}class na extends Hf{constructor(e,t,i,a,c=[]){super(),this.key=e,this.data=t,this.fieldMask=i,this.precondition=a,this.fieldTransforms=c,this.type=1}getFieldMask(){return this.fieldMask}}function ty(n){const e=new Map;return n.fieldMask.fields.forEach(t=>{if(!t.isEmpty()){const i=n.data.field(t);e.set(t,i)}}),e}function dE(n,e,t){const i=new Map;$t(n.length===t.length);for(let a=0;a{for(const[a,c]of i)e(a,c)})}isEmpty(){return Ff(this.inner)}size(){return this.innerSize}}const WD=new Lr(pt.comparator);function Rs(){return WD}const Vd=new Lr(pt.comparator);function El(...n){let e=Vd;for(const t of n)e=e.insert(t.key,t);return e}function ry(n){let e=Vd;return n.forEach((t,i)=>e=e.insert(t,i.overlayedDocument)),e}function Po(){return ka()}function pE(){return ka()}function ka(){return new wu(n=>n.toString(),(n,e)=>n.isEqual(e))}const jd=new Lr(pt.comparator),KD=new ur(pt.comparator);function mn(...n){let e=KD;for(const t of n)e=e.add(t);return e}const qD=new ur(Wt);function $d(){return qD}class Il{constructor(e,t,i,a,c){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=i,this.documentUpdates=a,this.resolvedLimboDocuments=c}static createSynthesizedRemoteEventForCurrentChange(e,t,i){const a=new Map;return a.set(e,Dl.createSynthesizedTargetChangeForCurrentChange(e,t,i)),new Il(zt.min(),a,$d(),Rs(),mn())}}class Dl{constructor(e,t,i,a,c){this.resumeToken=e,this.current=t,this.addedDocuments=i,this.modifiedDocuments=a,this.removedDocuments=c}static createSynthesizedTargetChangeForCurrentChange(e,t,i){return new Dl(i,t,mn(),mn(),mn())}}class Kf{constructor(e,t,i,a){this.Tt=e,this.removedTargetIds=t,this.key=i,this.Et=a}}class iy{constructor(e,t){this.targetId=e,this.At=t}}class gE{constructor(e,t,i=Li.EMPTY_BYTE_STRING,a=null){this.state=e,this.targetIds=t,this.resumeToken=i,this.cause=a}}class mE{constructor(){this.Rt=0,this.bt=ZD(),this.Pt=Li.EMPTY_BYTE_STRING,this.vt=!1,this.Vt=!0}get current(){return this.vt}get resumeToken(){return this.Pt}get St(){return 0!==this.Rt}get Dt(){return this.Vt}Ct(e){e.approximateByteSize()>0&&(this.Vt=!0,this.Pt=e)}xt(){let e=mn(),t=mn(),i=mn();return this.bt.forEach((a,c)=>{switch(c){case 0:e=e.add(a);break;case 2:t=t.add(a);break;case 1:i=i.add(a);break;default:Rt()}}),new Dl(this.Pt,this.vt,e,t,i)}Nt(){this.Vt=!1,this.bt=ZD()}kt(e,t){this.Vt=!0,this.bt=this.bt.insert(e,t)}Ot(e){this.Vt=!0,this.bt=this.bt.remove(e)}Mt(){this.Rt+=1}Ft(){this.Rt-=1}$t(){this.Vt=!0,this.vt=!0}}class sT{constructor(e){this.Bt=e,this.Lt=new Map,this.Ut=Rs(),this.qt=YD(),this.Kt=new ur(Wt)}Gt(e){for(const t of e.Tt)e.Et&&e.Et.isFoundDocument()?this.Qt(t,e.Et):this.jt(t,e.key,e.Et);for(const t of e.removedTargetIds)this.jt(t,e.key,e.Et)}Wt(e){this.forEachTarget(e,t=>{const i=this.zt(t);switch(e.state){case 0:this.Ht(t)&&i.Ct(e.resumeToken);break;case 1:i.Ft(),i.St||i.Nt(),i.Ct(e.resumeToken);break;case 2:i.Ft(),i.St||this.removeTarget(t);break;case 3:this.Ht(t)&&(i.$t(),i.Ct(e.resumeToken));break;case 4:this.Ht(t)&&(this.Jt(t),i.Ct(e.resumeToken));break;default:Rt()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Lt.forEach((i,a)=>{this.Ht(a)&&t(a)})}Yt(e){const t=e.targetId,i=e.At.count,a=this.Xt(t);if(a){const c=a.target;if(Bf(c))if(0===i){const h=new pt(c.path);this.jt(t,h,mr.newNoDocument(h,zt.min()))}else $t(1===i);else this.Zt(t)!==i&&(this.Jt(t),this.Kt=this.Kt.add(t))}}te(e){const t=new Map;this.Lt.forEach((c,h)=>{const g=this.Xt(h);if(g){if(c.current&&Bf(g.target)){const T=new pt(g.target.path);null!==this.Ut.get(T)||this.ee(h,T)||this.jt(h,T,mr.newNoDocument(T,e))}c.Dt&&(t.set(h,c.xt()),c.Nt())}});let i=mn();this.qt.forEach((c,h)=>{let g=!0;h.forEachWhile(T=>{const x=this.Xt(T);return!x||2===x.purpose||(g=!1,!1)}),g&&(i=i.add(c))}),this.Ut.forEach((c,h)=>h.setReadTime(e));const a=new Il(e,t,this.Kt,this.Ut,i);return this.Ut=Rs(),this.qt=YD(),this.Kt=new ur(Wt),a}Qt(e,t){if(!this.Ht(e))return;const i=this.ee(e,t.key)?2:0;this.zt(e).kt(t.key,i),this.Ut=this.Ut.insert(t.key,t),this.qt=this.qt.insert(t.key,this.ne(t.key).add(e))}jt(e,t,i){if(!this.Ht(e))return;const a=this.zt(e);this.ee(e,t)?a.kt(t,1):a.Ot(t),this.qt=this.qt.insert(t,this.ne(t).delete(e)),i&&(this.Ut=this.Ut.insert(t,i))}removeTarget(e){this.Lt.delete(e)}Zt(e){const t=this.zt(e).xt();return this.Bt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Mt(e){this.zt(e).Mt()}zt(e){let t=this.Lt.get(e);return t||(t=new mE,this.Lt.set(e,t)),t}ne(e){let t=this.qt.get(e);return t||(t=new ur(Wt),this.qt=this.qt.insert(e,t)),t}Ht(e){const t=null!==this.Xt(e);return t||tt("WatchChangeAggregator","Detected inactive target",e),t}Xt(e){const t=this.Lt.get(e);return t&&t.St?null:this.Bt.se(e)}Jt(e){this.Lt.set(e,new mE),this.Bt.getRemoteKeysForTarget(e).forEach(t=>{this.jt(e,t,null)})}ee(e,t){return this.Bt.getRemoteKeysForTarget(e).has(t)}}function YD(){return new Lr(pt.comparator)}function ZD(){return new Lr(pt.comparator)}const oT={asc:"ASCENDING",desc:"DESCENDING"},yE={"<":"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 qf{constructor(e,t){this.databaseId=e,this.gt=t}}function Gd(n,e){return n.gt?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function _E(n,e){return n.gt?e.toBase64():e.toUint8Array()}function vE(n,e){return Gd(n,e.toTimestamp())}function Wr(n){return $t(!!n),zt.fromTimestamp(function(e){const t=mu(e);return new Sr(t.seconds,t.nanos)}(n))}function sy(n,e){return(t=n,new Fn(["projects",t.projectId,"databases",t.database])).child("documents").child(e).canonicalString();var t}function EE(n){const e=Fn.fromString(n);return $t(ME(e)),e}function Hd(n,e){return sy(n.databaseId,e.path)}function ra(n,e){const t=EE(e);if(t.get(1)!==n.databaseId.projectId)throw new Ye(ke.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+t.get(1)+" vs "+n.databaseId.projectId);if(t.get(3)!==n.databaseId.database)throw new Ye(ke.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+t.get(3)+" vs "+n.databaseId.database);return new pt(IE(t))}function oy(n,e){return sy(n.databaseId,e)}function ay(n){const e=EE(n);return 4===e.length?Fn.emptyPath():IE(e)}function zd(n){return new Fn(["projects",n.databaseId.projectId,"databases",n.databaseId.database]).canonicalString()}function IE(n){return $t(n.length>4&&"documents"===n.get(4)),n.popFirst(5)}function wl(n,e,t){return{name:Hd(n,e),fields:t.value.mapValue.fields}}function bl(n,e){let t;if(e instanceof Bd)t={update:wl(n,e.key,e.value)};else if(e instanceof pc)t={delete:Hd(n,e.key)};else if(e instanceof na)t={update:wl(n,e.key,e.data),updateMask:tw(e.fieldMask)};else{if(!(e instanceof Wf))return Rt();t={verify:Hd(n,e.key)}}return e.fieldTransforms.length>0&&(t.updateTransforms=e.fieldTransforms.map(i=>function(a,c){const h=c.transform;if(h instanceof ho)return{fieldPath:c.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(h instanceof hc)return{fieldPath:c.field.canonicalString(),appendMissingElements:{values:h.elements}};if(h instanceof fo)return{fieldPath:c.field.canonicalString(),removeAllFromArray:{values:h.elements}};if(h instanceof Iu)return{fieldPath:c.field.canonicalString(),increment:h.yt};throw Rt()}(0,i))),e.precondition.isNone||(t.currentDocument=void 0!==(a=e.precondition).updateTime?{updateTime:vE(n,a.updateTime)}:void 0!==a.exists?{exists:a.exists}:Rt()),t;var a}function uy(n,e){const t=e.currentDocument?void 0!==(a=e.currentDocument).updateTime?Ar.updateTime(Wr(a.updateTime)):void 0!==a.exists?Ar.exists(a.exists):Ar.none():Ar.none(),i=e.updateTransforms?e.updateTransforms.map(a=>function(c,h){let g=null;"setToServerValue"in h?($t("REQUEST_TIME"===h.setToServerValue),g=new ho):"appendMissingElements"in h?g=new hc(h.appendMissingElements.values||[]):"removeAllFromArray"in h?g=new fo(h.removeAllFromArray.values||[]):"increment"in h?g=new Iu(c,h.increment):Rt();const T=zr.fromServerFormat(h.fieldPath);return new _l(T,g)}(n,a)):[];var a;if(e.update){const a=ra(n,e.update.name),c=new gi({mapValue:{fields:e.update.fields}});if(e.updateMask){const h=new Ms((e.updateMask.fieldPaths||[]).map(x=>zr.fromServerFormat(x)));return new na(a,c,h,t,i)}return new Bd(a,c,t,i)}if(e.delete){const a=ra(n,e.delete);return new pc(a,t)}if(e.verify){const a=ra(n,e.verify);return new Wf(a,t)}return Rt()}function TE(n,e){return{documents:[oy(n,e.path)]}}function Wd(n,e){const t={structuredQuery:{}},i=e.path;null!==e.collectionGroup?(t.parent=oy(n,i),t.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(t.parent=oy(n,i.popLast()),t.structuredQuery.from=[{collectionId:i.lastSegment()}]);const a=function(T){if(0===T.length)return;const x=T.map(j=>function(re){if("=="===re.op){if(lo(re.value))return{unaryFilter:{field:Tl(re.field),op:"IS_NAN"}};if(Oo(re.value))return{unaryFilter:{field:Tl(re.field),op:"IS_NULL"}}}else if("!="===re.op){if(lo(re.value))return{unaryFilter:{field:Tl(re.field),op:"IS_NOT_NAN"}};if(Oo(re.value))return{unaryFilter:{field:Tl(re.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Tl(re.field),op:JD(re.op),value:re.value}}}(j));return 1===x.length?x[0]:{compositeFilter:{op:"AND",filters:x}}}(e.filters);a&&(t.structuredQuery.where=a);const c=function(T){if(0!==T.length)return T.map(x=>{return{field:Tl((j=x).field),direction:XD(j.dir)};var j})}(e.orderBy);c&&(t.structuredQuery.orderBy=c);const h=(x=e.limit,n.gt||Od(x)?x:{value:x});var x,g,T;return null!==h&&(t.structuredQuery.limit=h),e.startAt&&(t.structuredQuery.startAt={before:(g=e.startAt).inclusive,values:g.position}),e.endAt&&(t.structuredQuery.endAt={before:!(T=e.endAt).inclusive,values:T.position}),t}function CE(n){let e=ay(n.parent);const t=n.structuredQuery,i=t.from?t.from.length:0;let a=null;if(i>0){$t(1===i);const j=t.from[0];j.allDescendants?a=j.collectionId:e=e.child(j.collectionId)}let c=[];t.where&&(c=cy(t.where));let h=[];t.orderBy&&(h=t.orderBy.map(j=>{return new gl(bu((re=j).field),function(Te){switch(Te){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(re.direction));var re}));let g=null;t.limit&&(g=function(j){let re;return re="object"==typeof j?j.value:j,Od(re)?null:re}(t.limit));let T=null;var j;t.startAt&&(T=new Eu((j=t.startAt).values||[],!!j.before));let x=null;return t.endAt&&(x=function(j){return new Eu(j.values||[],!j.before)}(t.endAt)),function iE(n,e,t,i,a,c,h,g){return new Na(n,e,t,i,a,c,h,g)}(e,a,h,c,g,"F",T,x)}function cy(n){return n?void 0!==n.unaryFilter?[AE(n)]:void 0!==n.fieldFilter?[ew(n)]:void 0!==n.compositeFilter?n.compositeFilter.filters.map(e=>cy(e)).reduce((e,t)=>e.concat(t)):Rt():[]}function XD(n){return oT[n]}function JD(n){return yE[n]}function Tl(n){return{fieldPath:n.canonicalString()}}function bu(n){return zr.fromServerFormat(n.fieldPath)}function ew(n){return mi.create(bu(n.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 Rt()}}(n.fieldFilter.op),n.fieldFilter.value)}function AE(n){switch(n.unaryFilter.op){case"IS_NAN":const e=bu(n.unaryFilter.field);return mi.create(e,"==",{doubleValue:NaN});case"IS_NULL":const t=bu(n.unaryFilter.field);return mi.create(t,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const i=bu(n.unaryFilter.field);return mi.create(i,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const a=bu(n.unaryFilter.field);return mi.create(a,"!=",{nullValue:"NULL_VALUE"});default:return Rt()}}function tw(n){const e=[];return n.fields.forEach(t=>e.push(t.canonicalString())),{fieldPaths:e}}function ME(n){return n.length>=4&&"projects"===n.get(0)&&"databases"===n.get(2)}function hs(n){let e="";for(let t=0;t0&&(e=xE(e)),e=nw(n.get(t),e);return xE(e)}function nw(n,e){let t=e;const i=n.length;for(let a=0;a=2),2===e)return $t("\x01"===n.charAt(0)&&"\x01"===n.charAt(1)),Fn.emptyPath();const t=e-2,i=[];let a="";for(let c=0;ct)&&Rt(),n.charAt(h+1)){case"\x01":const g=n.substring(c,h);let T;0===a.length?T=g:(a+=g,T=a,a=""),i.push(T);break;case"\x10":a+=n.substring(c,h),a+="\0";break;case"\x11":a+=n.substring(c,h+1);break;default:Rt()}c=h+2}return new Fn(i)}const RE=["userId","batchId"];function Yf(n,e){return[n,hs(e)]}function ly(n,e,t){return[n,hs(e),t]}const OE={},rw=["prefixPath","collectionGroup","readTime","documentId"],iw=["prefixPath","collectionGroup","documentId"],PE=["collectionGroup","readTime","prefixPath","documentId"],sw=["canonicalId","targetId"],ow=["targetId","path"],aw=["path","targetId"],dy=["collectionId","parent"],hy=["indexId","uid"],NE=["uid","sequenceNumber"],fy=["indexId","uid","arrayValue","directionalValue","orderedDocumentKey","documentKey"],uw=["indexId","uid","orderedDocumentKey"],cw=["userId","collectionPath","documentId"],py=["userId","collectionPath","largestBatchId"],lw=["userId","collectionGroup","largestBatchId"],kE=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],Cl=[...kE,"documentOverlays"],gy=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],LE=gy,aT=[...LE,"indexConfiguration","indexState","indexEntries"];class Zf extends Md{constructor(e,t){super(),this.ie=e,this.currentSequenceNumber=t}}function oi(n,e){const t=ut(n);return co.M(t.ie,e)}class my{constructor(e,t,i,a){this.batchId=e,this.localWriteTime=t,this.baseMutations=i,this.mutations=a}applyToRemoteDocument(e,t){const i=t.mutationResults;for(let a=0;a{const c=e.get(a.key),h=c.overlayedDocument;let g=this.applyToLocalView(h,c.mutatedFields);g=t.has(a.key)?null:g;const T=fc(h,g);null!==T&&i.set(a.key,T),h.isValidDocument()||h.convertToNoDocument(zt.min())}),i}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),mn())}isEqual(e){return this.batchId===e.batchId&&sc(this.mutations,e.mutations,(t,i)=>Ur(t,i))&&sc(this.baseMutations,e.baseMutations,(t,i)=>Ur(t,i))}}class Kd{constructor(e,t,i,a){this.batch=e,this.commitVersion=t,this.mutationResults=i,this.docVersions=a}static from(e,t,i){$t(e.mutations.length===i.length);let a=jd;const c=e.mutations;for(let h=0;huy(n.re,c));for(let c=0;cuy(n.re,c)),a=Sr.fromMillis(e.localWriteTimeMs);return new my(e.batchId,a,t,i)}function Yd(n){const e=gc(n.readTime),t=void 0!==n.lastLimboFreeSnapshotVersion?gc(n.lastLimboFreeSnapshotVersion):zt.min();let i;var a;return void 0!==n.query.documents?($t(1===(a=n.query).documents.length),i=ds(ml(ay(a.documents[0])))):i=ds(CE(n.query)),new La(i,n.targetId,0,n.lastListenSequenceNumber,e,t,Li.fromBase64String(n.resumeToken))}function UE(n,e){const t=Tu(e.snapshotVersion),i=Tu(e.lastLimboFreeSnapshotVersion);let a;a=Bf(e.target)?TE(n.re,e.target):Wd(n.re,e.target);const c=e.resumeToken.toBase64();return{targetId:e.targetId,canonicalId:_u(e.target),readTime:t,resumeToken:c,lastListenSequenceNumber:e.sequenceNumber,lastLimboFreeSnapshotVersion:i,query:a}}function Xf(n){const e=CE({parent:n.parent,structuredQuery:n.structuredQuery});return"LAST"===n.limitType?jf(e,e.limit,"L"):e}function BE(n,e){return new yy(e.largestBatchId,uy(n.re,e.overlayMutation))}function vy(n,e){const t=e.path.lastSegment();return[n,hs(e.path.popLast()),t]}function VE(n,e,t,i){return{indexId:n,uid:e.uid||"",sequenceNumber:t,readTime:Tu(i.readTime),documentKey:hs(i.documentKey.path),largestBatchId:i.largestBatchId}}class dw{getBundleMetadata(e,t){return hw(e).get(t).next(i=>{if(i)return{id:(a=i).bundleId,createTime:gc(a.createTime),version:a.version};var a})}saveBundleMetadata(e,t){return hw(e).put({bundleId:(i=t).id,createTime:Tu(Wr(i.createTime)),version:i.version});var i}getNamedQuery(e,t){return fw(e).get(t).next(i=>{if(i)return{name:(a=i).name,query:Xf(a.bundledQuery),readTime:gc(a.readTime)};var a})}saveNamedQuery(e,t){return fw(e).put({name:(i=t).name,readTime:Tu(Wr(i.readTime)),bundledQuery:i.bundledQuery});var i}}function hw(n){return oi(n,"bundles")}function fw(n){return oi(n,"namedQueries")}class Jf{constructor(e,t){this.It=e,this.userId=t}static oe(e,t){return new Jf(e,t.uid||"")}getOverlay(e,t){return Zd(e).get(vy(this.userId,t)).next(i=>i?BE(this.It,i):null)}getOverlays(e,t){const i=Po();return xe.forEach(t,a=>this.getOverlay(e,a).next(c=>{null!==c&&i.set(a,c)})).next(()=>i)}saveOverlays(e,t,i){const a=[];return i.forEach((c,h)=>{const g=new yy(t,h);a.push(this.ue(e,g))}),xe.waitFor(a)}removeOverlaysForBatchId(e,t,i){const a=new Set;t.forEach(h=>a.add(hs(h.getCollectionPath())));const c=[];return a.forEach(h=>{const g=IDBKeyRange.bound([this.userId,h,i],[this.userId,h,i+1],!1,!0);c.push(Zd(e).Y("collectionPathOverlayIndex",g))}),xe.waitFor(c)}getOverlaysForCollection(e,t,i){const a=Po(),c=hs(t),h=IDBKeyRange.bound([this.userId,c,i],[this.userId,c,Number.POSITIVE_INFINITY],!0);return Zd(e).W("collectionPathOverlayIndex",h).next(g=>{for(const T of g){const x=BE(this.It,T);a.set(x.getKey(),x)}return a})}getOverlaysForCollectionGroup(e,t,i,a){const c=Po();let h;const g=IDBKeyRange.bound([this.userId,t,i],[this.userId,t,Number.POSITIVE_INFINITY],!0);return Zd(e).Z({index:"collectionGroupOverlayIndex",range:g},(T,x,j)=>{const re=BE(this.It,x);c.size()c)}ue(e,t){return Zd(e).put(function(i,a,c){const[h,g,T]=vy(a,c.mutation.key);return{userId:a,collectionPath:g,documentId:T,collectionGroup:c.mutation.key.getCollectionGroup(),largestBatchId:c.largestBatchId,overlayMutation:bl(i.re,c.mutation)}}(this.It,this.userId,t))}}function Zd(n){return oi(n,"documentOverlays")}class yc{constructor(){}ce(e,t){this.ae(e,t),t.he()}ae(e,t){if("nullValue"in e)this.le(t,5);else if("booleanValue"in e)this.le(t,10),t.fe(e.booleanValue?1:0);else if("integerValue"in e)this.le(t,15),t.fe(Fr(e.integerValue));else if("doubleValue"in e){const i=Fr(e.doubleValue);isNaN(i)?this.le(t,13):(this.le(t,15),hl(i)?t.fe(0):t.fe(i))}else if("timestampValue"in e){const i=e.timestampValue;this.le(t,20),"string"==typeof i?t.de(i):(t.de(`${i.seconds||""}`),t.fe(i.nanos||0))}else if("stringValue"in e)this._e(e.stringValue,t),this.we(t);else if("bytesValue"in e)this.le(t,30),t.me(cc(e.bytesValue)),this.we(t);else if("referenceValue"in e)this.ge(e.referenceValue,t);else if("geoPointValue"in e){const i=e.geoPointValue;this.le(t,45),t.fe(i.latitude||0),t.fe(i.longitude||0)}else"mapValue"in e?Vm(e)?this.le(t,Number.MAX_SAFE_INTEGER):(this.ye(e.mapValue,t),this.we(t)):"arrayValue"in e?(this.pe(e.arrayValue,t),this.we(t)):Rt()}_e(e,t){this.le(t,25),this.Ie(e,t)}Ie(e,t){t.de(e)}ye(e,t){const i=e.fields||{};this.le(t,55);for(const a of Object.keys(i))this._e(a,t),this.ae(i[a],t)}pe(e,t){const i=e.values||[];this.le(t,50);for(const a of i)this.ae(a,t)}ge(e,t){this.le(t,37),pt.fromName(e).path.forEach(i=>{this.le(t,60),this.Ie(i,t)})}le(e,t){e.fe(t)}we(e){e.fe(2)}}function pw(n){if(0===n)return 8;let e=0;return n>>4==0&&(e+=4,n<<=4),n>>6==0&&(e+=2,n<<=2),n>>7==0&&(e+=1),e}function jE(n){const e=64-function(t){let i=0;for(let a=0;a<8;++a){const c=pw(255&t[a]);if(i+=c,8!==c)break}return i}(n);return Math.ceil(e/8)}yc.Te=new yc;class gw{constructor(){this.buffer=new Uint8Array(1024),this.position=0}Ee(e){const t=e[Symbol.iterator]();let i=t.next();for(;!i.done;)this.Ae(i.value),i=t.next();this.Re()}be(e){const t=e[Symbol.iterator]();let i=t.next();for(;!i.done;)this.Pe(i.value),i=t.next();this.ve()}Ve(e){for(const t of e){const i=t.charCodeAt(0);if(i<128)this.Ae(i);else if(i<2048)this.Ae(960|i>>>6),this.Ae(128|63&i);else if(t<"\ud800"||"\udbff">>12),this.Ae(128|63&i>>>6),this.Ae(128|63&i);else{const a=t.codePointAt(0);this.Ae(240|a>>>18),this.Ae(128|63&a>>>12),this.Ae(128|63&a>>>6),this.Ae(128|63&a)}}this.Re()}Se(e){for(const t of e){const i=t.charCodeAt(0);if(i<128)this.Pe(i);else if(i<2048)this.Pe(960|i>>>6),this.Pe(128|63&i);else if(t<"\ud800"||"\udbff">>12),this.Pe(128|63&i>>>6),this.Pe(128|63&i);else{const a=t.codePointAt(0);this.Pe(240|a>>>18),this.Pe(128|63&a>>>12),this.Pe(128|63&a>>>6),this.Pe(128|63&a)}}this.ve()}De(e){const t=this.Ce(e),i=jE(t);this.xe(1+i),this.buffer[this.position++]=255&i;for(let a=t.length-i;a=this.Ge.length||!this.Je(this.Ge[c++],h))return!1}return!0}ze(e){for(const t of this.Qe)if(this.He(t,e))return!0;return!1}He(e,t){return!(void 0===e||!e.field.isEqual(t.fieldPath))&&2===t.kind==("array-contains"===e.op||"array-contains-any"===e.op)}Je(e,t){return!!e.field.isEqual(t.fieldPath)&&(0===t.kind&&"asc"===e.dir||1===t.kind&&"desc"===e.dir)}}class GE{constructor(){this.Ye=new ep}addToCollectionParentIndex(e,t){return this.Ye.add(t),xe.resolve()}getCollectionParents(e,t){return xe.resolve(this.Ye.getEntries(t))}addFieldIndex(e,t){return xe.resolve()}deleteFieldIndex(e,t){return xe.resolve()}getDocumentsMatchingTarget(e,t){return xe.resolve(null)}getIndexType(e,t){return xe.resolve(0)}getFieldIndexes(e,t){return xe.resolve([])}getNextCollectionGroupToUpdate(e){return xe.resolve(null)}getMinOffset(e,t){return xe.resolve(es.min())}getMinOffsetFromCollectionGroup(e,t){return xe.resolve(es.min())}updateCollectionGroup(e,t,i){return xe.resolve()}updateIndexEntries(e,t){return xe.resolve()}}class ep{constructor(){this.index={}}add(e){const t=e.lastSegment(),i=e.popLast(),a=this.index[t]||new ur(Fn.comparator),c=!a.has(i);return this.index[t]=a.add(i),c}has(e){const t=e.lastSegment(),i=e.popLast(),a=this.index[t];return a&&a.has(i)}getEntries(e){return(this.index[e]||new ur(Fn.comparator)).toArray()}}const Jd=new Uint8Array(0);class HE{constructor(e,t){this.user=e,this.databaseId=t,this.Xe=new ep,this.Ze=new wu(i=>_u(i),(i,a)=>vu(i,a)),this.uid=e.uid||""}addToCollectionParentIndex(e,t){if(!this.Xe.has(t)){const i=t.lastSegment(),a=t.popLast();e.addOnCommittedListener(()=>{this.Xe.add(t)});const c={collectionId:i,parent:hs(a)};return Ey(e).put(c)}return xe.resolve()}getCollectionParents(e,t){const i=[],a=IDBKeyRange.bound([t,""],[Om(t),""],!1,!0);return Ey(e).W(a).next(c=>{for(const h of c){if(h.collectionId!==t)break;i.push(ia(h.parent))}return i})}addFieldIndex(e,t){const i=tp(e),a={indexId:(h=t).indexId,collectionGroup:h.collectionGroup,fields:h.fields.map(g=>[g.fieldPath.canonicalString(),g.kind])};var h;delete a.indexId;const c=i.add(a);if(t.indexState){const h=np(e);return c.next(g=>{h.put(VE(g,this.user,t.indexState.sequenceNumber,t.indexState.offset))})}return c.next()}deleteFieldIndex(e,t){const i=tp(e),a=np(e),c=Sl(e);return i.delete(t.indexId).next(()=>a.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0))).next(()=>c.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0)))}getDocumentsMatchingTarget(e,t){const i=Sl(e);let a=!0;const c=new Map;return xe.forEach(this.tn(t),h=>this.en(e,h).next(g=>{a&&(a=!!g),c.set(h,g)})).next(()=>{if(a){let h=mn();const g=[];return xe.forEach(c,(T,x)=>{var j;tt("IndexedDbIndexManager",`Using index ${j=T,`id=${j.indexId}|cg=${j.collectionGroup}|f=${j.fields.map(Xn=>`${Xn.fieldPath}:${Xn.kind}`).join(",")}`} to execute ${_u(t)}`);const re=function(Xn,Ei){const lr=Pm(Ei);if(void 0===lr)return null;for(const Kn of Ld(Xn,lr.fieldPath))switch(Kn.op){case"array-contains-any":return Kn.value.arrayValue.values||[];case"array-contains":return[Kn.value]}return null}(x,T),Te=function(Xn,Ei){const lr=new Map;for(const Kn of fu(Ei))for(const Fi of Ld(Xn,Kn.fieldPath))switch(Fi.op){case"==":case"in":lr.set(Kn.fieldPath.canonicalString(),Fi.value);break;case"not-in":case"!=":return lr.set(Kn.fieldPath.canonicalString(),Fi.value),Array.from(lr.values())}return null}(x,T),Ve=function(Xn,Ei){const lr=[];let Kn=!0;for(const Fi of fu(Ei)){const Ih=0===Fi.kind?jm(Xn,Fi.fieldPath,Xn.startAt):Vf(Xn,Fi.fieldPath,Xn.startAt);lr.push(Ih.value),Kn&&(Kn=Ih.inclusive)}return new Eu(lr,Kn)}(x,T),qe=function(Xn,Ei){const lr=[];let Kn=!0;for(const Fi of fu(Ei)){const Ih=0===Fi.kind?Vf(Xn,Fi.fieldPath,Xn.endAt):jm(Xn,Fi.fieldPath,Xn.endAt);lr.push(Ih.value),Kn&&(Kn=Ih.inclusive)}return new Eu(lr,Kn)}(x,T),It=this.nn(T,x,Ve),At=this.nn(T,x,qe),Wn=this.sn(T,x,Te),gr=this.rn(T.indexId,re,It,Ve.inclusive,At,qe.inclusive,Wn);return xe.forEach(gr,Xn=>i.J(Xn,t.limit).next(Ei=>{Ei.forEach(lr=>{const Kn=pt.fromSegments(lr.documentKey);h.has(Kn)||(h=h.add(Kn),g.push(Kn))})}))}).next(()=>g)}return xe.resolve(null)})}tn(e){let t=this.Ze.get(e);return t||(t=[e],this.Ze.set(e,t),t)}rn(e,t,i,a,c,h,g){const T=(null!=t?t.length:1)*Math.max(i.length,c.length),x=T/(null!=t?t.length:1),j=[];for(let re=0;rethis.un(e,Te,At,!0));j.push(...this.createRange(Ve,qe,It))}return j}un(e,t,i,a){const c=new _c(e,pt.empty(),t,i);return a?c:c.Ke()}cn(e,t,i,a){const c=new _c(e,pt.empty(),t,i);return a?c.Ke():c}en(e,t){const i=new Xd(t),a=null!=t.collectionGroup?t.collectionGroup:t.path.lastSegment();return this.getFieldIndexes(e,a).next(c=>{let h=null;for(const g of c)i.We(g)&&(!h||g.fields.length>h.fields.length)&&(h=g);return h})}getIndexType(e,t){let i=2;return xe.forEach(this.tn(t),a=>this.en(e,a).next(c=>{c?0!==i&&c.fields.lengthi)}an(e,t){const i=new Qd;for(const a of fu(e)){const c=t.data.field(a.fieldPath);if(null==c)return null;const h=i.qe(a.kind);yc.Te.ce(c,h)}return i.$e()}on(e){const t=new Qd;return yc.Te.ce(e,t.qe(0)),t.$e()}hn(e,t){const i=new Qd;return yc.Te.ce(ts(this.databaseId,t),i.qe(function(a){const c=fu(a);return 0===c.length?0:c[c.length-1].kind}(e))),i.$e()}sn(e,t,i){if(null===i)return[];let a=[];a.push(new Qd);let c=0;for(const h of fu(e)){const g=i[c++];for(const T of a)if(this.ln(t,h.fieldPath)&&kd(g))a=this.fn(a,h,g);else{const x=T.qe(h.kind);yc.Te.ce(g,x)}}return this.dn(a)}nn(e,t,i){return this.sn(e,t,i.position)}dn(e){const t=[];for(let i=0;ii instanceof mi&&i.field.isEqual(t)&&("in"===i.op||"not-in"===i.op))}getFieldIndexes(e,t){const i=tp(e),a=np(e);return(t?i.W("collectionGroupIndex",IDBKeyRange.bound(t,t)):i.W()).next(c=>{const h=[];return xe.forEach(c,g=>a.get([g.indexId,this.uid]).next(T=>{h.push(function(x,j){const re=j?new oc(j.sequenceNumber,new es(gc(j.readTime),new pt(ia(j.documentKey)),j.largestBatchId)):oc.empty(),Te=x.fields.map(([Ve,qe])=>new Cd(zr.fromServerFormat(Ve),qe));return new Nf(x.indexId,x.collectionGroup,Te,re)}(g,T))})).next(()=>h)})}getNextCollectionGroupToUpdate(e){return this.getFieldIndexes(e).next(t=>0===t.length?null:(t.sort((i,a)=>{const c=i.indexState.sequenceNumber-a.indexState.sequenceNumber;return 0!==c?c:Wt(i.collectionGroup,a.collectionGroup)}),t[0].collectionGroup))}updateCollectionGroup(e,t,i){const a=tp(e),c=np(e);return this._n(e).next(h=>a.W("collectionGroupIndex",IDBKeyRange.bound(t,t)).next(g=>xe.forEach(g,T=>c.put(VE(T.indexId,this.user,h,i)))))}updateIndexEntries(e,t){const i=new Map;return xe.forEach(t,(a,c)=>{const h=i.get(a.collectionGroup);return(h?xe.resolve(h):this.getFieldIndexes(e,a.collectionGroup)).next(g=>(i.set(a.collectionGroup,g),xe.forEach(g,T=>this.wn(e,a,T).next(x=>{const j=this.mn(c,T);return x.isEqual(j)?xe.resolve():this.gn(e,c,T,x,j)}))))})}yn(e,t,i,a){return Sl(e).put({indexId:a.indexId,uid:this.uid,arrayValue:a.arrayValue,directionalValue:a.directionalValue,orderedDocumentKey:this.hn(i,t.key),documentKey:t.key.path.toArray()})}pn(e,t,i,a){return Sl(e).delete([a.indexId,this.uid,a.arrayValue,a.directionalValue,this.hn(i,t.key),t.key.path.toArray()])}wn(e,t,i){const a=Sl(e);let c=new ur(vc);return a.Z({index:"documentKeyIndex",range:IDBKeyRange.only([i.indexId,this.uid,this.hn(i,t)])},(h,g)=>{c=c.add(new _c(i.indexId,t,g.arrayValue,g.directionalValue))}).next(()=>c)}mn(e,t){let i=new ur(vc);const a=this.an(t,e);if(null==a)return i;const c=Pm(t);if(null!=c){const h=e.data.field(c.fieldPath);if(kd(h))for(const g of h.arrayValue.values||[])i=i.add(new _c(t.indexId,e.key,this.on(g),a))}else i=i.add(new _c(t.indexId,e.key,Jd,a));return i}gn(e,t,i,a,c){tt("IndexedDbIndexManager","Updating index entries for document '%s'",t.key);const h=[];return function(g,T,x,j,re){const Te=g.getIterator(),Ve=T.getIterator();let qe=uc(Te),It=uc(Ve);for(;qe||It;){let At=!1,Wn=!1;if(qe&&It){const gr=x(qe,It);gr<0?Wn=!0:gr>0&&(At=!0)}else null!=qe?Wn=!0:At=!0;At?(j(It),It=uc(Ve)):Wn?(re(qe),qe=uc(Te)):(qe=uc(Te),It=uc(Ve))}}(a,c,vc,g=>{h.push(this.yn(e,t,i,g))},g=>{h.push(this.pn(e,t,i,g))}),xe.waitFor(h)}_n(e){let t=1;return np(e).Z({index:"sequenceNumberIndex",reverse:!0,range:IDBKeyRange.upperBound([this.uid,Number.MAX_SAFE_INTEGER])},(i,a,c)=>{c.done(),t=a.sequenceNumber+1}).next(()=>t)}createRange(e,t,i){i=i.sort((h,g)=>vc(h,g)).filter((h,g,T)=>!g||0!==vc(h,T[g-1]));const a=[];a.push(e);for(const h of i){const g=vc(h,e),T=vc(h,t);if(0===g)a[0]=e.Ke();else if(g>0&&T<0)a.push(h),a.push(h.Ke());else if(T>0)break}a.push(t);const c=[];for(let h=0;hthis.en(e,i).next(a=>a||Rt())).next(Iy)}}function Ey(n){return oi(n,"collectionParents")}function Sl(n){return oi(n,"indexEntries")}function tp(n){return oi(n,"indexConfiguration")}function np(n){return oi(n,"indexState")}function Iy(n){$t(0!==n.length);let e=n[0].indexState.offset,t=e.largestBatchId;for(let i=1;i(g++,Te.delete()));c.push(T.next(()=>{$t(1===g)}));const x=[];for(const j of t.mutations){const re=ly(e,j.key.path,t.batchId);c.push(a.delete(re)),x.push(j.key)}return xe.waitFor(c).next(()=>x)}function rp(n){if(!n)return 0;let e;if(n.document)e=n.document;else if(n.unknownDocument)e=n.unknownDocument;else{if(!n.noDocument)throw Rt();e=n.noDocument}return JSON.stringify(e).length}Os.DEFAULT_COLLECTION_PERCENTILE=10,Os.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Os.DEFAULT=new Os(41943040,Os.DEFAULT_COLLECTION_PERCENTILE,Os.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Os.DISABLED=new Os(-1,0,0);class Cu{constructor(e,t,i,a){this.userId=e,this.It=t,this.indexManager=i,this.referenceDelegate=a,this.In={}}static oe(e,t,i,a){$t(""!==e.uid);const c=e.isAuthenticated()?e.uid:"";return new Cu(c,t,i,a)}checkEmpty(e){let t=!0;const i=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return sa(e).Z({index:"userMutationsIndex",range:i},(a,c,h)=>{t=!1,h.done()}).next(()=>t)}addMutationBatch(e,t,i,a){const c=fs(e),h=sa(e);return h.add({}).next(g=>{$t("number"==typeof g);const T=new my(g,t,i,a),x=function(Te,Ve,qe){const It=qe.baseMutations.map(Wn=>bl(Te.re,Wn)),At=qe.mutations.map(Wn=>bl(Te.re,Wn));return{userId:Ve,batchId:qe.batchId,localWriteTimeMs:qe.localWriteTime.toMillis(),baseMutations:It,mutations:At}}(this.It,this.userId,T),j=[];let re=new ur((Te,Ve)=>Wt(Te.canonicalString(),Ve.canonicalString()));for(const Te of a){const Ve=ly(this.userId,Te.key.path,g);re=re.add(Te.key.path.popLast()),j.push(h.put(x)),j.push(c.put(Ve,OE))}return re.forEach(Te=>{j.push(this.indexManager.addToCollectionParentIndex(e,Te))}),e.addOnCommittedListener(()=>{this.In[g]=T.keys()}),xe.waitFor(j).next(()=>T)})}lookupMutationBatch(e,t){return sa(e).get(t).next(i=>i?($t(i.userId===this.userId),mc(this.It,i)):null)}Tn(e,t){return this.In[t]?xe.resolve(this.In[t]):this.lookupMutationBatch(e,t).next(i=>{if(i){const a=i.keys();return this.In[t]=a,a}return null})}getNextMutationBatchAfterBatchId(e,t){const i=t+1,a=IDBKeyRange.lowerBound([this.userId,i]);let c=null;return sa(e).Z({index:"userMutationsIndex",range:a},(h,g,T)=>{g.userId===this.userId&&($t(g.batchId>=i),c=mc(this.It,g)),T.done()}).next(()=>c)}getHighestUnacknowledgedBatchId(e){const t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]);let i=-1;return sa(e).Z({index:"userMutationsIndex",range:t,reverse:!0},(a,c,h)=>{i=c.batchId,h.done()}).next(()=>i)}getAllMutationBatches(e){const t=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return sa(e).W("userMutationsIndex",t).next(i=>i.map(a=>mc(this.It,a)))}getAllMutationBatchesAffectingDocumentKey(e,t){const i=Yf(this.userId,t.path),a=IDBKeyRange.lowerBound(i),c=[];return fs(e).Z({range:a},(h,g,T)=>{const[x,j,re]=h,Te=ia(j);if(x===this.userId&&t.path.isEqual(Te))return sa(e).get(re).next(Ve=>{if(!Ve)throw Rt();$t(Ve.userId===this.userId),c.push(mc(this.It,Ve))});T.done()}).next(()=>c)}getAllMutationBatchesAffectingDocumentKeys(e,t){let i=new ur(Wt);const a=[];return t.forEach(c=>{const h=Yf(this.userId,c.path),g=IDBKeyRange.lowerBound(h),T=fs(e).Z({range:g},(x,j,re)=>{const[Te,Ve,qe]=x,It=ia(Ve);Te===this.userId&&c.path.isEqual(It)?i=i.add(qe):re.done()});a.push(T)}),xe.waitFor(a).next(()=>this.En(e,i))}getAllMutationBatchesAffectingQuery(e,t){const i=t.path,a=i.length+1,c=Yf(this.userId,i),h=IDBKeyRange.lowerBound(c);let g=new ur(Wt);return fs(e).Z({range:h},(T,x,j)=>{const[re,Te,Ve]=T,qe=ia(Te);re===this.userId&&i.isPrefixOf(qe)?qe.length===a&&(g=g.add(Ve)):j.done()}).next(()=>this.En(e,g))}En(e,t){const i=[],a=[];return t.forEach(c=>{a.push(sa(e).get(c).next(h=>{if(null===h)throw Rt();$t(h.userId===this.userId),i.push(mc(this.It,h))}))}),xe.waitFor(a).next(()=>i)}removeMutationBatch(e,t){return zE(e.ie,this.userId,t).next(i=>(e.addOnCommittedListener(()=>{this.An(t.batchId)}),xe.forEach(i,a=>this.referenceDelegate.markPotentiallyOrphaned(e,a))))}An(e){delete this.In[e]}performConsistencyCheck(e){return this.checkEmpty(e).next(t=>{if(!t)return xe.resolve();const i=IDBKeyRange.lowerBound([this.userId]),a=[];return fs(e).Z({range:i},(c,h,g)=>{if(c[0]===this.userId){const T=ia(c[1]);a.push(T)}else g.done()}).next(()=>{$t(0===a.length)})})}containsKey(e,t){return WE(e,this.userId,t)}Rn(e){return KE(e).get(this.userId).next(t=>t||{userId:this.userId,lastAcknowledgedBatchId:-1,lastStreamToken:""})}}function WE(n,e,t){const i=Yf(e,t.path),a=i[1],c=IDBKeyRange.lowerBound(i);let h=!1;return fs(n).Z({range:c,X:!0},(g,T,x)=>{const[j,re,Te]=g;j===e&&re===a&&(h=!0),x.done()}).next(()=>h)}function sa(n){return oi(n,"mutations")}function fs(n){return oi(n,"documentMutations")}function KE(n){return oi(n,"mutationQueues")}class Fa{constructor(e){this.bn=e}next(){return this.bn+=2,this.bn}static Pn(){return new Fa(0)}static vn(){return new Fa(-1)}}class eh{constructor(e,t){this.referenceDelegate=e,this.It=t}allocateTargetId(e){return this.Vn(e).next(t=>{const i=new Fa(t.highestTargetId);return t.highestTargetId=i.next(),this.Sn(e,t).next(()=>t.highestTargetId)})}getLastRemoteSnapshotVersion(e){return this.Vn(e).next(t=>zt.fromTimestamp(new Sr(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds)))}getHighestSequenceNumber(e){return this.Vn(e).next(t=>t.highestListenSequenceNumber)}setTargetsMetadata(e,t,i){return this.Vn(e).next(a=>(a.highestListenSequenceNumber=t,i&&(a.lastRemoteSnapshotVersion=i.toTimestamp()),t>a.highestListenSequenceNumber&&(a.highestListenSequenceNumber=t),this.Sn(e,a)))}addTargetData(e,t){return this.Dn(e,t).next(()=>this.Vn(e).next(i=>(i.targetCount+=1,this.Cn(t,i),this.Sn(e,i))))}updateTargetData(e,t){return this.Dn(e,t)}removeTargetData(e,t){return this.removeMatchingKeysForTargetId(e,t.targetId).next(()=>Al(e).delete(t.targetId)).next(()=>this.Vn(e)).next(i=>($t(i.targetCount>0),i.targetCount-=1,this.Sn(e,i)))}removeTargets(e,t,i){let a=0;const c=[];return Al(e).Z((h,g)=>{const T=Yd(g);T.sequenceNumber<=t&&null===i.get(T.targetId)&&(a++,c.push(this.removeTargetData(e,T)))}).next(()=>xe.waitFor(c)).next(()=>a)}forEachTarget(e,t){return Al(e).Z((i,a)=>{const c=Yd(a);t(c)})}Vn(e){return qE(e).get("targetGlobalKey").next(t=>($t(null!==t),t))}Sn(e,t){return qE(e).put("targetGlobalKey",t)}Dn(e,t){return Al(e).put(UE(this.It,t))}Cn(e,t){let i=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,i=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,i=!0),i}getTargetCount(e){return this.Vn(e).next(t=>t.targetCount)}getTargetData(e,t){const i=_u(t),a=IDBKeyRange.bound([i,Number.NEGATIVE_INFINITY],[i,Number.POSITIVE_INFINITY]);let c=null;return Al(e).Z({range:a,index:"queryTargetsIndex"},(h,g,T)=>{const x=Yd(g);vu(t,x.target)&&(c=x,T.done())}).next(()=>c)}addMatchingKeys(e,t,i){const a=[],c=Su(e);return t.forEach(h=>{const g=hs(h.path);a.push(c.put({targetId:i,path:g})),a.push(this.referenceDelegate.addReference(e,i,h))}),xe.waitFor(a)}removeMatchingKeys(e,t,i){const a=Su(e);return xe.forEach(t,c=>{const h=hs(c.path);return xe.waitFor([a.delete([i,h]),this.referenceDelegate.removeReference(e,i,c)])})}removeMatchingKeysForTargetId(e,t){const i=Su(e),a=IDBKeyRange.bound([t],[t+1],!1,!0);return i.delete(a)}getMatchingKeysForTargetId(e,t){const i=IDBKeyRange.bound([t],[t+1],!1,!0),a=Su(e);let c=mn();return a.Z({range:i,X:!0},(h,g,T)=>{const x=ia(h[1]),j=new pt(x);c=c.add(j)}).next(()=>c)}containsKey(e,t){const i=hs(t.path),a=IDBKeyRange.bound([i],[Om(i)],!1,!0);let c=0;return Su(e).Z({index:"documentTargetsIndex",X:!0,range:a},([h,g],T,x)=>{0!==h&&(c++,x.done())}).next(()=>c>0)}se(e,t){return Al(e).get(t).next(i=>i?Yd(i):null)}}function Al(n){return oi(n,"targets")}function qE(n){return oi(n,"targetGlobal")}function Su(n){return oi(n,"targetDocuments")}function th([n,e],[t,i]){const a=Wt(n,t);return 0===a?Wt(e,i):a}class ip{constructor(e){this.xn=e,this.buffer=new ur(th),this.Nn=0}kn(){return++this.Nn}On(e){const t=[e,this.kn()];if(this.buffer.sizeMath.floor(t/100*i))}nthSequenceNumber(e,t){if(0===t)return xe.resolve(As.at);const i=new ip(t);return this.$n.forEachTarget(e,a=>i.On(a.sequenceNumber)).next(()=>this.$n.Ln(e,a=>i.On(a))).next(()=>i.maxValue)}removeTargets(e,t,i){return this.$n.removeTargets(e,t,i)}removeOrphanedDocuments(e,t){return this.$n.removeOrphanedDocuments(e,t)}collect(e,t){return-1===this.params.cacheSizeCollectionThreshold?(tt("LruGarbageCollector","Garbage collection skipped; disabled"),xe.resolve(Dy)):this.getCacheSize(e).next(i=>i(re>this.params.maximumSequenceNumbersToCollect?(tt("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${re}`),a=this.params.maximumSequenceNumbersToCollect):a=re,h=Date.now(),this.nthSequenceNumber(e,a))).next(re=>(i=re,g=Date.now(),this.removeTargets(e,i,t))).next(re=>(c=re,T=Date.now(),this.removeOrphanedDocuments(e,i))).next(re=>(x=Date.now(),Am()<=Q.in.DEBUG&&tt("LruGarbageCollector",`LRU Garbage Collection\n\tCounted targets in ${h-j}ms\n\tDetermined least recently used ${a} in `+(g-h)+`ms\n\tRemoved ${c} targets in `+(T-g)+`ms\n\tRemoved ${re} documents in `+(x-T)+`ms\nTotal Duration: ${x-j}ms`),xe.resolve({didRun:!0,sequenceNumbersCollected:a,targetsRemoved:c,documentsRemoved:re})))}}class YE{constructor(e,t){this.db=e,this.garbageCollector=new vw(this,t)}Bn(e){const t=this.qn(e);return this.db.getTargetCache().getTargetCount(e).next(i=>t.next(a=>i+a))}qn(e){let t=0;return this.Ln(e,i=>{t++}).next(()=>t)}forEachTarget(e,t){return this.db.getTargetCache().forEachTarget(e,t)}Ln(e,t){return this.Kn(e,(i,a)=>t(a))}addReference(e,t,i){return nh(e,i)}removeReference(e,t,i){return nh(e,i)}removeTargets(e,t,i){return this.db.getTargetCache().removeTargets(e,t,i)}markPotentiallyOrphaned(e,t){return nh(e,t)}Gn(e,t){return function(i,a){let c=!1;return KE(i).tt(h=>WE(i,h,a).next(g=>(g&&(c=!0),xe.resolve(!g)))).next(()=>c)}(e,t)}removeOrphanedDocuments(e,t){const i=this.db.getRemoteDocumentCache().newChangeBuffer(),a=[];let c=0;return this.Kn(e,(h,g)=>{if(g<=t){const T=this.Gn(e,h).next(x=>{if(!x)return c++,i.getEntry(e,h).next(()=>(i.removeEntry(h,zt.min()),Su(e).delete([0,hs(h.path)])))});a.push(T)}}).next(()=>xe.waitFor(a)).next(()=>i.apply(e)).next(()=>c)}removeTarget(e,t){const i=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,i)}updateLimboDocument(e,t){return nh(e,t)}Kn(e,t){const i=Su(e);let a,c=As.at;return i.Z({index:"documentTargetsIndex"},([h,g],{path:T,sequenceNumber:x})=>{0===h?(c!==As.at&&t(new pt(ia(a)),c),c=x,a=T):c=As.at}).next(()=>{c!==As.at&&t(new pt(ia(a)),c)})}getCacheSize(e){return this.db.getRemoteDocumentCache().getSize(e)}}function nh(n,e){return Su(n).put((i=n.currentSequenceNumber,{targetId:0,path:hs(e.path),sequenceNumber:i}));var i}class sp{constructor(){this.changes=new wu(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,mr.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const i=this.changes.get(t);return void 0!==i?xe.resolve(i):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 ZE{constructor(e){this.It=e}setIndexManager(e){this.indexManager=e}addEntry(e,t,i){return Ua(e).put(i)}removeEntry(e,t,i){return Ua(e).delete(function(a,c){const h=a.path.toArray();return[h.slice(0,h.length-2),h[h.length-2],qd(c),h[h.length-1]]}(t,i))}updateMetadata(e,t){return this.getMetadata(e).next(i=>(i.byteSize+=t,this.Qn(e,i)))}getEntry(e,t){let i=mr.newInvalidDocument(t);return Ua(e).Z({index:"documentKeyIndex",range:IDBKeyRange.only(Ec(t))},(a,c)=>{i=this.jn(t,c)}).next(()=>i)}Wn(e,t){let i={size:0,document:mr.newInvalidDocument(t)};return Ua(e).Z({index:"documentKeyIndex",range:IDBKeyRange.only(Ec(t))},(a,c)=>{i={document:this.jn(t,c),size:rp(c)}}).next(()=>i)}getEntries(e,t){let i=Rs();return this.zn(e,t,(a,c)=>{const h=this.jn(a,c);i=i.insert(a,h)}).next(()=>i)}Hn(e,t){let i=Rs(),a=new Lr(pt.comparator);return this.zn(e,t,(c,h)=>{const g=this.jn(c,h);i=i.insert(c,g),a=a.insert(c,rp(h))}).next(()=>({documents:i,Jn:a}))}zn(e,t,i){if(t.isEmpty())return xe.resolve();let a=new ur(op);t.forEach(T=>a=a.add(T));const c=IDBKeyRange.bound(Ec(a.first()),Ec(a.last())),h=a.getIterator();let g=h.getNext();return Ua(e).Z({index:"documentKeyIndex",range:c},(T,x,j)=>{const re=pt.fromSegments([...x.prefixPath,x.collectionGroup,x.documentId]);for(;g&&op(g,re)<0;)i(g,null),g=h.getNext();g&&g.isEqual(re)&&(i(g,x),g=h.hasNext()?h.getNext():null),g?j.j(Ec(g)):j.done()}).next(()=>{for(;g;)i(g,null),g=h.hasNext()?h.getNext():null})}getAllFromCollection(e,t,i){const a=[t.popLast().toArray(),t.lastSegment(),qd(i.readTime),i.documentKey.path.isEmpty()?"":i.documentKey.path.lastSegment()],c=[t.popLast().toArray(),t.lastSegment(),[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],""];return Ua(e).W(IDBKeyRange.bound(a,c,!0)).next(h=>{let g=Rs();for(const T of h){const x=this.jn(pt.fromSegments(T.prefixPath.concat(T.collectionGroup,T.documentId)),T);g=g.insert(x.key,x)}return g})}getAllFromCollectionGroup(e,t,i,a){let c=Rs();const h=wy(t,i),g=wy(t,es.max());return Ua(e).Z({index:"collectionGroupIndex",range:IDBKeyRange.bound(h,g,!0)},(T,x,j)=>{const re=this.jn(pt.fromSegments(x.prefixPath.concat(x.collectionGroup,x.documentId)),x);c=c.insert(re.key,re),c.size===a&&j.done()}).next(()=>c)}newChangeBuffer(e){return new Ew(this,!!e&&e.trackRemovals)}getSize(e){return this.getMetadata(e).next(t=>t.byteSize)}getMetadata(e){return Iw(e).get("remoteDocumentGlobalKey").next(t=>($t(!!t),t))}Qn(e,t){return Iw(e).put("remoteDocumentGlobalKey",t)}jn(e,t){if(t){const i=function FE(n,e){let t;if(e.document)t=function DE(n,e,t){const i=ra(n,e.name),a=Wr(e.updateTime),c=new gi({mapValue:{fields:e.fields}}),h=mr.newFoundDocument(i,a,c);return t&&h.setHasCommittedMutations(),t?h.setHasCommittedMutations():h}(n.re,e.document,!!e.hasCommittedMutations);else if(e.noDocument){const i=pt.fromSegments(e.noDocument.path),a=gc(e.noDocument.readTime);t=mr.newNoDocument(i,a),e.hasCommittedMutations&&t.setHasCommittedMutations()}else{if(!e.unknownDocument)return Rt();{const i=pt.fromSegments(e.unknownDocument.path),a=gc(e.unknownDocument.version);t=mr.newUnknownDocument(i,a)}}return e.readTime&&t.setReadTime(function(i){const a=new Sr(i[0],i[1]);return zt.fromTimestamp(a)}(e.readTime)),t}(this.It,t);if(!i.isNoDocument()||!i.version.isEqual(zt.min()))return i}return mr.newInvalidDocument(e)}}function QE(n){return new ZE(n)}class Ew extends sp{constructor(e,t){super(),this.Yn=e,this.trackRemovals=t,this.Xn=new wu(i=>i.toString(),(i,a)=>i.isEqual(a))}applyChanges(e){const t=[];let i=0,a=new ur((c,h)=>Wt(c.canonicalString(),h.canonicalString()));return this.changes.forEach((c,h)=>{const g=this.Xn.get(c);if(t.push(this.Yn.removeEntry(e,c,g.readTime)),h.isValidDocument()){const T=_y(this.Yn.It,h);a=a.add(c.path.popLast()),i+=rp(T)-g.size,t.push(this.Yn.addEntry(e,c,T))}else if(i-=g.size,this.trackRemovals){const T=_y(this.Yn.It,h.convertToNoDocument(zt.min()));t.push(this.Yn.addEntry(e,c,T))}}),a.forEach(c=>{t.push(this.Yn.indexManager.addToCollectionParentIndex(e,c))}),t.push(this.Yn.updateMetadata(e,i)),xe.waitFor(t)}getFromCache(e,t){return this.Yn.Wn(e,t).next(i=>(this.Xn.set(t,{size:i.size,readTime:i.document.readTime}),i.document))}getAllFromCache(e,t){return this.Yn.Hn(e,t).next(({documents:i,Jn:a})=>(a.forEach((c,h)=>{this.Xn.set(c,{size:h,readTime:i.get(c).readTime})}),i))}}function Iw(n){return oi(n,"remoteDocumentGlobal")}function Ua(n){return oi(n,"remoteDocumentsV14")}function Ec(n){const e=n.path.toArray();return[e.slice(0,e.length-2),e[e.length-2],e[e.length-1]]}function wy(n,e){const t=e.documentKey.path.toArray();return[n,qd(e.readTime),t.slice(0,t.length-2),t.length>0?t[t.length-1]:""]}function op(n,e){const t=n.path.toArray(),i=e.path.toArray();let a=0;for(let c=0;c(i=a,this.getBaseDocument(e,t,i))).next(a=>(null!==i&&Du(i.mutation,a,Ms.empty(),Sr.now()),a))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(i=>this.getLocalViewOfDocuments(e,i,mn()).next(()=>i))}getLocalViewOfDocuments(e,t,i=mn()){const a=Po();return this.populateOverlays(e,a,t).next(()=>this.computeViews(e,t,a,i).next(c=>{let h=El();return c.forEach((g,T)=>{h=h.insert(g,T.overlayedDocument)}),h}))}getOverlayedDocuments(e,t){const i=Po();return this.populateOverlays(e,i,t).next(()=>this.computeViews(e,t,i,mn()))}populateOverlays(e,t,i){const a=[];return i.forEach(c=>{t.has(c)||a.push(c)}),this.documentOverlayCache.getOverlays(e,a).next(c=>{c.forEach((h,g)=>{t.set(h,g)})})}computeViews(e,t,i,a){let c=Rs();const h=ka(),g=ka();return t.forEach((T,x)=>{const j=i.get(x.key);a.has(x.key)&&(void 0===j||j.mutation instanceof na)?c=c.insert(x.key,x):void 0!==j&&(h.set(x.key,j.mutation.getFieldMask()),Du(j.mutation,x,j.mutation.getFieldMask(),Sr.now()))}),this.recalculateAndSaveOverlays(e,c).next(T=>(T.forEach((x,j)=>h.set(x,j)),t.forEach((x,j)=>{var re;return g.set(x,new by(j,null!==(re=h.get(x))&&void 0!==re?re:null))}),g))}recalculateAndSaveOverlays(e,t){const i=ka();let a=new Lr((h,g)=>h-g),c=mn();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(h=>{for(const g of h)g.keys().forEach(T=>{const x=t.get(T);if(null===x)return;let j=i.get(T)||Ms.empty();j=g.applyToLocalView(x,j),i.set(T,j);const re=(a.get(g.batchId)||mn()).add(T);a=a.insert(g.batchId,re)})}).next(()=>{const h=[],g=a.getReverseIterator();for(;g.hasNext();){const T=g.getNext(),x=T.key,j=T.value,re=pE();j.forEach(Te=>{if(!c.has(Te)){const Ve=fc(t.get(Te),i.get(Te));null!==Ve&&re.set(Te,Ve),c=c.add(Te)}}),h.push(this.documentOverlayCache.saveOverlays(e,x,re))}return xe.waitFor(h)}).next(()=>i)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(i=>this.recalculateAndSaveOverlays(e,i))}getDocumentsMatchingQuery(e,t,i){return pt.isDocumentKey((a=t).path)&&null===a.collectionGroup&&0===a.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):function Wm(n){return null!==n.collectionGroup}(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,i):this.getDocumentsMatchingCollectionQuery(e,t,i);var a}getNextDocuments(e,t,i,a){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,i,a).next(c=>{const h=a-c.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,i.largestBatchId,a-c.size):xe.resolve(Po());let g=-1,T=c;return h.next(x=>xe.forEach(x,(j,re)=>(g{T=T.insert(j,Te)}))).next(()=>this.populateOverlays(e,x,c)).next(()=>this.computeViews(e,T,x,mn())).next(j=>({batchId:g,changes:ry(j)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new pt(t)).next(i=>{let a=El();return i.isFoundDocument()&&(a=a.insert(i.key,i)),a})}getDocumentsMatchingCollectionGroupQuery(e,t,i){const a=t.collectionGroup;let c=El();return this.indexManager.getCollectionParents(e,a).next(h=>xe.forEach(h,g=>{const T=(x=t,j=g.child(a),new Na(j,null,x.explicitOrderBy.slice(),x.filters.slice(),x.limit,x.limitType,x.startAt,x.endAt));var x,j;return this.getDocumentsMatchingCollectionQuery(e,T,i).next(x=>{x.forEach((j,re)=>{c=c.insert(j,re)})})}).next(()=>c))}getDocumentsMatchingCollectionQuery(e,t,i){let a;return this.remoteDocumentCache.getAllFromCollection(e,t.path,i).next(c=>(a=c,this.documentOverlayCache.getOverlaysForCollection(e,t.path,i.largestBatchId))).next(c=>{c.forEach((g,T)=>{const x=T.getKey();null===a.get(x)&&(a=a.insert(x,mr.newInvalidDocument(x)))});let h=El();return a.forEach((g,T)=>{const x=c.get(g);void 0!==x&&Du(x.mutation,T,Ms.empty(),Sr.now()),$f(t,T)&&(h=h.insert(g,T))}),h})}getBaseDocument(e,t,i){return null===i||1===i.mutation.type?this.remoteDocumentCache.getEntry(e,t):xe.resolve(mr.newInvalidDocument(t))}}class Dw{constructor(e){this.It=e,this.Zn=new Map,this.ts=new Map}getBundleMetadata(e,t){return xe.resolve(this.Zn.get(t))}saveBundleMetadata(e,t){var i;return this.Zn.set(t.id,{id:(i=t).id,version:i.version,createTime:Wr(i.createTime)}),xe.resolve()}getNamedQuery(e,t){return xe.resolve(this.ts.get(t))}saveNamedQuery(e,t){return this.ts.set(t.name,{name:(i=t).name,query:Xf(i.bundledQuery),readTime:Wr(i.readTime)}),xe.resolve();var i}}class ww{constructor(){this.overlays=new Lr(pt.comparator),this.es=new Map}getOverlay(e,t){return xe.resolve(this.overlays.get(t))}getOverlays(e,t){const i=Po();return xe.forEach(t,a=>this.getOverlay(e,a).next(c=>{null!==c&&i.set(a,c)})).next(()=>i)}saveOverlays(e,t,i){return i.forEach((a,c)=>{this.ue(e,t,c)}),xe.resolve()}removeOverlaysForBatchId(e,t,i){const a=this.es.get(i);return void 0!==a&&(a.forEach(c=>this.overlays=this.overlays.remove(c)),this.es.delete(i)),xe.resolve()}getOverlaysForCollection(e,t,i){const a=Po(),c=t.length+1,h=new pt(t.child("")),g=this.overlays.getIteratorFrom(h);for(;g.hasNext();){const T=g.getNext().value,x=T.getKey();if(!t.isPrefixOf(x.path))break;x.path.length===c&&T.largestBatchId>i&&a.set(T.getKey(),T)}return xe.resolve(a)}getOverlaysForCollectionGroup(e,t,i,a){let c=new Lr((x,j)=>x-j);const h=this.overlays.getIterator();for(;h.hasNext();){const x=h.getNext().value;if(x.getKey().getCollectionGroup()===t&&x.largestBatchId>i){let j=c.get(x.largestBatchId);null===j&&(j=Po(),c=c.insert(x.largestBatchId,j)),j.set(x.getKey(),x)}}const g=Po(),T=c.getIterator();for(;T.hasNext()&&(T.getNext().value.forEach((x,j)=>g.set(x,j)),!(g.size()>=a)););return xe.resolve(g)}ue(e,t,i){const a=this.overlays.get(i.key);if(null!==a){const h=this.es.get(a.largestBatchId).delete(i.key);this.es.set(a.largestBatchId,h)}this.overlays=this.overlays.insert(i.key,new yy(t,i));let c=this.es.get(t);void 0===c&&(c=mn(),this.es.set(t,c)),this.es.set(t,c.add(i.key))}}class Ty{constructor(){this.ns=new ur(yi.ss),this.rs=new ur(yi.os)}isEmpty(){return this.ns.isEmpty()}addReference(e,t){const i=new yi(e,t);this.ns=this.ns.add(i),this.rs=this.rs.add(i)}us(e,t){e.forEach(i=>this.addReference(i,t))}removeReference(e,t){this.cs(new yi(e,t))}hs(e,t){e.forEach(i=>this.removeReference(i,t))}ls(e){const t=new pt(new Fn([])),i=new yi(t,e),a=new yi(t,e+1),c=[];return this.rs.forEachInRange([i,a],h=>{this.cs(h),c.push(h.key)}),c}fs(){this.ns.forEach(e=>this.cs(e))}cs(e){this.ns=this.ns.delete(e),this.rs=this.rs.delete(e)}ds(e){const t=new pt(new Fn([])),i=new yi(t,e),a=new yi(t,e+1);let c=mn();return this.rs.forEachInRange([i,a],h=>{c=c.add(h.key)}),c}containsKey(e){const t=new yi(e,0),i=this.ns.firstAfterOrEqual(t);return null!==i&&e.isEqual(i.key)}}class yi{constructor(e,t){this.key=e,this._s=t}static ss(e,t){return pt.comparator(e.key,t.key)||Wt(e._s,t._s)}static os(e,t){return Wt(e._s,t._s)||pt.comparator(e.key,t.key)}}class Cy{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.ws=1,this.gs=new ur(yi.ss)}checkEmpty(e){return xe.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,i,a){const c=this.ws;this.ws++;const h=new my(c,t,i,a);this.mutationQueue.push(h);for(const g of a)this.gs=this.gs.add(new yi(g.key,c)),this.indexManager.addToCollectionParentIndex(e,g.key.path.popLast());return xe.resolve(h)}lookupMutationBatch(e,t){return xe.resolve(this.ys(t))}getNextMutationBatchAfterBatchId(e,t){const a=this.ps(t+1),c=a<0?0:a;return xe.resolve(this.mutationQueue.length>c?this.mutationQueue[c]:null)}getHighestUnacknowledgedBatchId(){return xe.resolve(0===this.mutationQueue.length?-1:this.ws-1)}getAllMutationBatches(e){return xe.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const i=new yi(t,0),a=new yi(t,Number.POSITIVE_INFINITY),c=[];return this.gs.forEachInRange([i,a],h=>{const g=this.ys(h._s);c.push(g)}),xe.resolve(c)}getAllMutationBatchesAffectingDocumentKeys(e,t){let i=new ur(Wt);return t.forEach(a=>{const c=new yi(a,0),h=new yi(a,Number.POSITIVE_INFINITY);this.gs.forEachInRange([c,h],g=>{i=i.add(g._s)})}),xe.resolve(this.Is(i))}getAllMutationBatchesAffectingQuery(e,t){const i=t.path,a=i.length+1;let c=i;pt.isDocumentKey(c)||(c=c.child(""));const h=new yi(new pt(c),0);let g=new ur(Wt);return this.gs.forEachWhile(T=>{const x=T.key.path;return!!i.isPrefixOf(x)&&(x.length===a&&(g=g.add(T._s)),!0)},h),xe.resolve(this.Is(g))}Is(e){const t=[];return e.forEach(i=>{const a=this.ys(i);null!==a&&t.push(a)}),t}removeMutationBatch(e,t){$t(0===this.Ts(t.batchId,"removed")),this.mutationQueue.shift();let i=this.gs;return xe.forEach(t.mutations,a=>{const c=new yi(a.key,t.batchId);return i=i.delete(c),this.referenceDelegate.markPotentiallyOrphaned(e,a.key)}).next(()=>{this.gs=i})}An(e){}containsKey(e,t){const i=new yi(t,0),a=this.gs.firstAfterOrEqual(i);return xe.resolve(t.isEqual(a&&a.key))}performConsistencyCheck(e){return xe.resolve()}Ts(e,t){return this.ps(e)}ps(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}ys(e){const t=this.ps(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class JE{constructor(e){this.Es=e,this.docs=new Lr(pt.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const i=t.key,a=this.docs.get(i),c=a?a.size:0,h=this.Es(t);return this.docs=this.docs.insert(i,{document:t.mutableCopy(),size:h}),this.size+=h-c,this.indexManager.addToCollectionParentIndex(e,i.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 i=this.docs.get(t);return xe.resolve(i?i.document.mutableCopy():mr.newInvalidDocument(t))}getEntries(e,t){let i=Rs();return t.forEach(a=>{const c=this.docs.get(a);i=i.insert(a,c?c.document.mutableCopy():mr.newInvalidDocument(a))}),xe.resolve(i)}getAllFromCollection(e,t,i){let a=Rs();const c=new pt(t.child("")),h=this.docs.getIteratorFrom(c);for(;h.hasNext();){const{key:g,value:{document:T}}=h.getNext();if(!t.isPrefixOf(g.path))break;g.path.length>t.length+1||Ad(Sd(T),i)<=0||(a=a.insert(T.key,T.mutableCopy()))}return xe.resolve(a)}getAllFromCollectionGroup(e,t,i,a){Rt()}As(e,t){return xe.forEach(this.docs,i=>t(i))}newChangeBuffer(e){return new bw(this)}getSize(e){return xe.resolve(this.size)}}class bw extends sp{constructor(e){super(),this.Yn=e}applyChanges(e){const t=[];return this.changes.forEach((i,a)=>{a.isValidDocument()?t.push(this.Yn.addEntry(e,a)):this.Yn.removeEntry(i)}),xe.waitFor(t)}getFromCache(e,t){return this.Yn.getEntry(e,t)}getAllFromCache(e,t){return this.Yn.getEntries(e,t)}}class e0{constructor(e){this.persistence=e,this.Rs=new wu(t=>_u(t),vu),this.lastRemoteSnapshotVersion=zt.min(),this.highestTargetId=0,this.bs=0,this.Ps=new Ty,this.targetCount=0,this.vs=Fa.Pn()}forEachTarget(e,t){return this.Rs.forEach((i,a)=>t(a)),xe.resolve()}getLastRemoteSnapshotVersion(e){return xe.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return xe.resolve(this.bs)}allocateTargetId(e){return this.highestTargetId=this.vs.next(),xe.resolve(this.highestTargetId)}setTargetsMetadata(e,t,i){return i&&(this.lastRemoteSnapshotVersion=i),t>this.bs&&(this.bs=t),xe.resolve()}Dn(e){this.Rs.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.vs=new Fa(t),this.highestTargetId=t),e.sequenceNumber>this.bs&&(this.bs=e.sequenceNumber)}addTargetData(e,t){return this.Dn(t),this.targetCount+=1,xe.resolve()}updateTargetData(e,t){return this.Dn(t),xe.resolve()}removeTargetData(e,t){return this.Rs.delete(t.target),this.Ps.ls(t.targetId),this.targetCount-=1,xe.resolve()}removeTargets(e,t,i){let a=0;const c=[];return this.Rs.forEach((h,g)=>{g.sequenceNumber<=t&&null===i.get(g.targetId)&&(this.Rs.delete(h),c.push(this.removeMatchingKeysForTargetId(e,g.targetId)),a++)}),xe.waitFor(c).next(()=>a)}getTargetCount(e){return xe.resolve(this.targetCount)}getTargetData(e,t){const i=this.Rs.get(t)||null;return xe.resolve(i)}addMatchingKeys(e,t,i){return this.Ps.us(t,i),xe.resolve()}removeMatchingKeys(e,t,i){this.Ps.hs(t,i);const a=this.persistence.referenceDelegate,c=[];return a&&t.forEach(h=>{c.push(a.markPotentiallyOrphaned(e,h))}),xe.waitFor(c)}removeMatchingKeysForTargetId(e,t){return this.Ps.ls(t),xe.resolve()}getMatchingKeysForTargetId(e,t){const i=this.Ps.ds(t);return xe.resolve(i)}containsKey(e,t){return xe.resolve(this.Ps.containsKey(t))}}class Sy{constructor(e,t){this.Vs={},this.overlays={},this.Ss=new As(0),this.Ds=!1,this.Ds=!0,this.referenceDelegate=e(this),this.Cs=new e0(this),this.indexManager=new GE,this.remoteDocumentCache=new JE(i=>this.referenceDelegate.xs(i)),this.It=new Qf(t),this.Ns=new Dw(this.It)}start(){return Promise.resolve()}shutdown(){return this.Ds=!1,Promise.resolve()}get started(){return this.Ds}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new ww,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let i=this.Vs[e.toKey()];return i||(i=new Cy(t,this.referenceDelegate),this.Vs[e.toKey()]=i),i}getTargetCache(){return this.Cs}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ns}runTransaction(e,t,i){tt("MemoryPersistence","Starting transaction:",e);const a=new Tw(this.Ss.next());return this.referenceDelegate.ks(),i(a).next(c=>this.referenceDelegate.Os(a).next(()=>c)).toPromise().then(c=>(a.raiseOnCommittedEvent(),c))}Ms(e,t){return xe.or(Object.values(this.Vs).map(i=>()=>i.containsKey(e,t)))}}class Tw extends Md{constructor(e){super(),this.currentSequenceNumber=e}}class rh{constructor(e){this.persistence=e,this.Fs=new Ty,this.$s=null}static Bs(e){return new rh(e)}get Ls(){if(this.$s)return this.$s;throw Rt()}addReference(e,t,i){return this.Fs.addReference(i,t),this.Ls.delete(i.toString()),xe.resolve()}removeReference(e,t,i){return this.Fs.removeReference(i,t),this.Ls.add(i.toString()),xe.resolve()}markPotentiallyOrphaned(e,t){return this.Ls.add(t.toString()),xe.resolve()}removeTarget(e,t){this.Fs.ls(t.targetId).forEach(a=>this.Ls.add(a.toString()));const i=this.persistence.getTargetCache();return i.getMatchingKeysForTargetId(e,t.targetId).next(a=>{a.forEach(c=>this.Ls.add(c.toString()))}).next(()=>i.removeTargetData(e,t))}ks(){this.$s=new Set}Os(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return xe.forEach(this.Ls,i=>{const a=pt.fromPath(i);return this.Us(e,a).next(c=>{c||t.removeEntry(a,zt.min())})}).next(()=>(this.$s=null,t.apply(e)))}updateLimboDocument(e,t){return this.Us(e,t).next(i=>{i?this.Ls.delete(t.toString()):this.Ls.add(t.toString())})}xs(e){return 0}Us(e,t){return xe.or([()=>xe.resolve(this.Fs.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ms(e,t)])}}class t0{constructor(e){this.It=e}$(e,t,i,a){const c=new dl("createOrUpgrade",t);var g;i<1&&a>=1&&(e.createObjectStore("owner"),(g=e).createObjectStore("mutationQueues",{keyPath:"userId"}),g.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",RE,{unique:!0}),g.createObjectStore("documentMutations"),n0(e),function(g){g.createObjectStore("remoteDocuments")}(e));let h=xe.resolve();return i<3&&a>=3&&(0!==i&&(function(g){g.deleteObjectStore("targetDocuments"),g.deleteObjectStore("targets"),g.deleteObjectStore("targetGlobal")}(e),n0(e)),h=h.next(()=>function(g){const T=g.store("targetGlobal"),x={highestTargetId:0,highestListenSequenceNumber:0,lastRemoteSnapshotVersion:zt.min().toTimestamp(),targetCount:0};return T.put("targetGlobalKey",x)}(c))),i<4&&a>=4&&(0!==i&&(h=h.next(()=>function(g,T){return T.store("mutations").W().next(x=>{g.deleteObjectStore("mutations"),g.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",RE,{unique:!0});const j=T.store("mutations"),re=x.map(Te=>j.put(Te));return xe.waitFor(re)})}(e,c))),h=h.next(()=>{!function(g){g.createObjectStore("clientMetadata",{keyPath:"clientId"})}(e)})),i<5&&a>=5&&(h=h.next(()=>this.qs(c))),i<6&&a>=6&&(h=h.next(()=>(function(g){g.createObjectStore("remoteDocumentGlobal")}(e),this.Ks(c)))),i<7&&a>=7&&(h=h.next(()=>this.Gs(c))),i<8&&a>=8&&(h=h.next(()=>this.Qs(e,c))),i<9&&a>=9&&(h=h.next(()=>{!function(g){g.objectStoreNames.contains("remoteDocumentChanges")&&g.deleteObjectStore("remoteDocumentChanges")}(e)})),i<10&&a>=10&&(h=h.next(()=>this.js(c))),i<11&&a>=11&&(h=h.next(()=>{(function(g){g.createObjectStore("bundles",{keyPath:"bundleId"})})(e),function(g){g.createObjectStore("namedQueries",{keyPath:"name"})}(e)})),i<12&&a>=12&&(h=h.next(()=>{!function(g){const T=g.createObjectStore("documentOverlays",{keyPath:cw});T.createIndex("collectionPathOverlayIndex",py,{unique:!1}),T.createIndex("collectionGroupOverlayIndex",lw,{unique:!1})}(e)})),i<13&&a>=13&&(h=h.next(()=>function(g){const T=g.createObjectStore("remoteDocumentsV14",{keyPath:rw});T.createIndex("documentKeyIndex",iw),T.createIndex("collectionGroupIndex",PE)}(e)).next(()=>this.Ws(e,c)).next(()=>e.deleteObjectStore("remoteDocuments"))),i<14&&a>=14&&(h=h.next(()=>this.zs(e,c))),i<15&&a>=15&&(h=h.next(()=>function(g){g.createObjectStore("indexConfiguration",{keyPath:"indexId",autoIncrement:!0}).createIndex("collectionGroupIndex","collectionGroup",{unique:!1}),g.createObjectStore("indexState",{keyPath:hy}).createIndex("sequenceNumberIndex",NE,{unique:!1}),g.createObjectStore("indexEntries",{keyPath:fy}).createIndex("documentKeyIndex",uw,{unique:!1})}(e))),h}Ks(e){let t=0;return e.store("remoteDocuments").Z((i,a)=>{t+=rp(a)}).next(()=>{const i={byteSize:t};return e.store("remoteDocumentGlobal").put("remoteDocumentGlobalKey",i)})}qs(e){const t=e.store("mutationQueues"),i=e.store("mutations");return t.W().next(a=>xe.forEach(a,c=>{const h=IDBKeyRange.bound([c.userId,-1],[c.userId,c.lastAcknowledgedBatchId]);return i.W("userMutationsIndex",h).next(g=>xe.forEach(g,T=>{$t(T.userId===c.userId);const x=mc(this.It,T);return zE(e,c.userId,x).next(()=>{})}))}))}Gs(e){const t=e.store("targetDocuments"),i=e.store("remoteDocuments");return e.store("targetGlobal").get("targetGlobalKey").next(a=>{const c=[];return i.Z((h,g)=>{const T=new Fn(h),x=[0,hs(T)];c.push(t.get(x).next(j=>j?xe.resolve():t.put({targetId:0,path:hs(T),sequenceNumber:a.highestListenSequenceNumber})))}).next(()=>xe.waitFor(c))})}Qs(e,t){e.createObjectStore("collectionParents",{keyPath:dy});const i=t.store("collectionParents"),a=new ep,c=h=>{if(a.add(h)){const g=h.lastSegment(),T=h.popLast();return i.put({collectionId:g,parent:hs(T)})}};return t.store("remoteDocuments").Z({X:!0},(h,g)=>{const T=new Fn(h);return c(T.popLast())}).next(()=>t.store("documentMutations").Z({X:!0},([h,g,T],x)=>{const j=ia(g);return c(j.popLast())}))}js(e){const t=e.store("targets");return t.Z((i,a)=>{const c=Yd(a),h=UE(this.It,c);return t.put(h)})}Ws(e,t){const i=t.store("remoteDocuments"),a=[];return i.Z((c,h)=>{const g=t.store("remoteDocumentsV14"),T=(x=h,x.document?new pt(Fn.fromString(x.document.name).popFirst(5)):x.noDocument?pt.fromSegments(x.noDocument.path):x.unknownDocument?pt.fromSegments(x.unknownDocument.path):Rt()).path.toArray();var x;const j={prefixPath:T.slice(0,T.length-2),collectionGroup:T[T.length-2],documentId:T[T.length-1],readTime:h.readTime||[0,0],unknownDocument:h.unknownDocument,noDocument:h.noDocument,document:h.document,hasCommittedMutations:!!h.hasCommittedMutations};a.push(g.put(j))}).next(()=>xe.waitFor(a))}zs(e,t){const i=t.store("mutations"),a=QE(this.It),c=new Sy(rh.Bs,this.It.re);return i.W().next(h=>{const g=new Map;return h.forEach(T=>{var x;let j=null!==(x=g.get(T.userId))&&void 0!==x?x:mn();mc(this.It,T).keys().forEach(re=>j=j.add(re)),g.set(T.userId,j)}),xe.forEach(g,(T,x)=>{const j=new Ni(x),re=Jf.oe(this.It,j),Te=c.getIndexManager(j),Ve=Cu.oe(j,this.It,Te,c.referenceDelegate);return new XE(a,Ve,re,Te).recalculateAndSaveOverlaysForDocumentKeys(new Zf(t,As.at),T).next()})})}}function n0(n){n.createObjectStore("targetDocuments",{keyPath:ow}).createIndex("documentTargetsIndex",aw,{unique:!0}),n.createObjectStore("targets",{keyPath:"targetId"}).createIndex("queryTargetsIndex",sw,{unique:!0}),n.createObjectStore("targetGlobal")}const ap="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 up{constructor(e,t,i,a,c,h,g,T,x,j,re=15){if(this.allowTabSynchronization=e,this.persistenceKey=t,this.clientId=i,this.Hs=c,this.window=h,this.document=g,this.Js=x,this.Ys=j,this.Xs=re,this.Ss=null,this.Ds=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Zs=null,this.inForeground=!1,this.ti=null,this.ei=null,this.ni=Number.NEGATIVE_INFINITY,this.si=Te=>Promise.resolve(),!up.C())throw new Ye(ke.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new YE(this,a),this.ii=t+"main",this.It=new Qf(T),this.ri=new co(this.ii,this.Xs,new t0(this.It)),this.Cs=new eh(this.referenceDelegate,this.It),this.remoteDocumentCache=QE(this.It),this.Ns=new dw,this.window&&this.window.localStorage?this.oi=this.window.localStorage:(this.oi=null,!1===j&&ii("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.ui().then(()=>{if(!this.isPrimary&&!this.allowTabSynchronization)throw new Ye(ke.FAILED_PRECONDITION,ap);return this.ci(),this.ai(),this.hi(),this.runTransaction("getHighestListenSequenceNumber","readonly",e=>this.Cs.getHighestSequenceNumber(e))}).then(e=>{this.Ss=new As(e,this.Js)}).then(()=>{this.Ds=!0}).catch(e=>(this.ri&&this.ri.close(),Promise.reject(e)))}li(e){var t=this;return this.si=function(){var i=(0,O.Z)(function*(a){if(t.started)return e(a)});return function(a){return i.apply(this,arguments)}}(),e(this.isPrimary)}setDatabaseDeletedListener(e){this.ri.L(function(){var t=(0,O.Z)(function*(i){null===i.newVersion&&(yield e())});return function(i){return t.apply(this,arguments)}}())}setNetworkEnabled(e){var t=this;this.networkEnabled!==e&&(this.networkEnabled=e,this.Hs.enqueueAndForget((0,O.Z)(function*(){t.started&&(yield t.ui())})))}ui(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",e=>Ba(e).put({clientId:this.clientId,updateTimeMs:Date.now(),networkEnabled:this.networkEnabled,inForeground:this.inForeground}).next(()=>{if(this.isPrimary)return this.fi(e).next(t=>{t||(this.isPrimary=!1,this.Hs.enqueueRetryable(()=>this.si(!1)))})}).next(()=>this.di(e)).next(t=>this.isPrimary&&!t?this._i(e).next(()=>!1):!!t&&this.wi(e).next(()=>!0))).catch(e=>{if(Oa(e))return tt("IndexedDbPersistence","Failed to extend owner lease: ",e),this.isPrimary;if(!this.allowTabSynchronization)throw e;return tt("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1}).then(e=>{this.isPrimary!==e&&this.Hs.enqueueRetryable(()=>this.si(e)),this.isPrimary=e})}fi(e){return _i(e).get("owner").next(t=>xe.resolve(this.mi(t)))}gi(e){return Ba(e).delete(this.clientId)}yi(){var e=this;return(0,O.Z)(function*(){if(e.isPrimary&&!e.pi(e.ni,18e5)){e.ni=Date.now();const t=yield e.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",i=>{const a=oi(i,"clientMetadata");return a.W().next(c=>{const h=e.Ii(c,18e5),g=c.filter(T=>-1===h.indexOf(T));return xe.forEach(g,T=>a.delete(T.clientId)).next(()=>g)})}).catch(()=>[]);if(e.oi)for(const i of t)e.oi.removeItem(e.Ti(i.clientId))}})()}hi(){this.ei=this.Hs.enqueueAfterDelay("client_metadata_refresh",4e3,()=>this.ui().then(()=>this.yi()).then(()=>this.hi()))}mi(e){return!!e&&e.ownerId===this.clientId}di(e){return this.Ys?xe.resolve(!0):_i(e).get("owner").next(t=>{if(null!==t&&this.pi(t.leaseTimestampMs,5e3)&&!this.Ei(t.ownerId)){if(this.mi(t)&&this.networkEnabled)return!0;if(!this.mi(t)){if(!t.allowTabSynchronization)throw new Ye(ke.FAILED_PRECONDITION,ap);return!1}}return!(!this.networkEnabled||!this.inForeground)||Ba(e).W().next(i=>void 0===this.Ii(i,5e3).find(a=>{if(this.clientId!==a.clientId){const h=!this.inForeground&&a.inForeground,g=this.networkEnabled===a.networkEnabled;if(!this.networkEnabled&&a.networkEnabled||h&&g)return!0}return!1}))}).next(t=>(this.isPrimary!==t&&tt("IndexedDbPersistence",`Client ${t?"is":"is not"} eligible for a primary lease.`),t))}shutdown(){var e=this;return(0,O.Z)(function*(){e.Ds=!1,e.Ai(),e.ei&&(e.ei.cancel(),e.ei=null),e.Ri(),e.bi(),yield e.ri.runTransaction("shutdown","readwrite",["owner","clientMetadata"],t=>{const i=new Zf(t,As.at);return e._i(i).next(()=>e.gi(i))}),e.ri.close(),e.Pi()})()}Ii(e,t){return e.filter(i=>this.pi(i.updateTimeMs,t)&&!this.Ei(i.clientId))}vi(){return this.runTransaction("getActiveClients","readonly",e=>Ba(e).W().next(t=>this.Ii(t,18e5).map(i=>i.clientId)))}get started(){return this.Ds}getMutationQueue(e,t){return Cu.oe(e,this.It,t,this.referenceDelegate)}getTargetCache(){return this.Cs}getRemoteDocumentCache(){return this.remoteDocumentCache}getIndexManager(e){return new HE(e,this.It.re.databaseId)}getDocumentOverlayCache(e){return Jf.oe(this.It,e)}getBundleCache(){return this.Ns}runTransaction(e,t,i){tt("IndexedDbPersistence","Starting transaction:",e);const a="readonly"===t?"readonly":"readwrite",c=15===(h=this.Xs)?aT:14===h?LE:13===h?gy:12===h?Cl:11===h?kE:void Rt();var h;let g;return this.ri.runTransaction(e,a,c,T=>(g=new Zf(T,this.Ss?this.Ss.next():As.at),"readwrite-primary"===t?this.fi(g).next(x=>!!x||this.di(g)).next(x=>{if(!x)throw ii(`Failed to obtain primary lease for action '${e}'.`),this.isPrimary=!1,this.Hs.enqueueRetryable(()=>this.si(!1)),new Ye(ke.FAILED_PRECONDITION,jv);return i(g)}).next(x=>this.wi(g).next(()=>x)):this.Vi(g).next(()=>i(g)))).then(T=>(g.raiseOnCommittedEvent(),T))}Vi(e){return _i(e).get("owner").next(t=>{if(null!==t&&this.pi(t.leaseTimestampMs,5e3)&&!this.Ei(t.ownerId)&&!this.mi(t)&&!(this.Ys||this.allowTabSynchronization&&t.allowTabSynchronization))throw new Ye(ke.FAILED_PRECONDITION,ap)})}wi(e){const t={ownerId:this.clientId,allowTabSynchronization:this.allowTabSynchronization,leaseTimestampMs:Date.now()};return _i(e).put("owner",t)}static C(){return co.C()}_i(e){const t=_i(e);return t.get("owner").next(i=>this.mi(i)?(tt("IndexedDbPersistence","Releasing primary lease."),t.delete("owner")):xe.resolve())}pi(e,t){const i=Date.now();return!(ei&&(ii(`Detected an update time that is in the future: ${e} > ${i}`),1))}ci(){null!==this.document&&"function"==typeof this.document.addEventListener&&(this.ti=()=>{this.Hs.enqueueAndForget(()=>(this.inForeground="visible"===this.document.visibilityState,this.ui()))},this.document.addEventListener("visibilitychange",this.ti),this.inForeground="visible"===this.document.visibilityState)}Ri(){this.ti&&(this.document.removeEventListener("visibilitychange",this.ti),this.ti=null)}ai(){var e;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.Zs=()=>{this.Ai(),(0,W.G6)()&&navigator.appVersion.match(/Version\/1[45]/)&&this.Hs.enterRestrictedMode(!0),this.Hs.enqueueAndForget(()=>this.shutdown())},this.window.addEventListener("pagehide",this.Zs))}bi(){this.Zs&&(this.window.removeEventListener("pagehide",this.Zs),this.Zs=null)}Ei(e){var t;try{const i=null!==(null===(t=this.oi)||void 0===t?void 0:t.getItem(this.Ti(e)));return tt("IndexedDbPersistence",`Client '${e}' ${i?"is":"is not"} zombied in LocalStorage`),i}catch(i){return ii("IndexedDbPersistence","Failed to get zombied client id.",i),!1}}Ai(){if(this.oi)try{this.oi.setItem(this.Ti(this.clientId),String(Date.now()))}catch(e){ii("Failed to set zombie client id.",e)}}Pi(){if(this.oi)try{this.oi.removeItem(this.Ti(this.clientId))}catch{}}Ti(e){return`firestore_zombie_${this.persistenceKey}_${e}`}}function _i(n){return oi(n,"owner")}function Ba(n){return oi(n,"clientMetadata")}class My{constructor(e,t,i,a){this.targetId=e,this.fromCache=t,this.Si=i,this.Di=a}static Ci(e,t){let i=mn(),a=mn();for(const c of t.docChanges)switch(c.type){case 0:i=i.add(c.doc.key);break;case 1:a=a.add(c.doc.key)}return new My(e,t.fromCache,i,a)}}class Cw{constructor(){this.xi=!1}initialize(e,t){this.Ni=e,this.indexManager=t,this.xi=!0}getDocumentsMatchingQuery(e,t,i,a){return this.ki(e,t).next(c=>c||this.Oi(e,t,a,i)).next(c=>c||this.Mi(e,t))}ki(e,t){if(sE(t))return xe.resolve(null);let i=ds(t);return this.indexManager.getIndexType(e,i).next(a=>0===a?null:(null!==t.limit&&1===a&&(t=jf(t,null,"F"),i=ds(t)),this.indexManager.getDocumentsMatchingTarget(e,i).next(c=>{const h=mn(...c);return this.Ni.getDocuments(e,h).next(g=>this.indexManager.getMinOffset(e,i).next(T=>{const x=this.Fi(t,g);return this.$i(t,x,h,T.readTime)?this.ki(e,jf(t,null,"F")):this.Bi(e,x,t,T)}))})))}Oi(e,t,i,a){return sE(t)||a.isEqual(zt.min())?this.Mi(e,t):this.Ni.getDocuments(e,i).next(c=>{const h=this.Fi(t,c);return this.$i(t,h,i,a)?this.Mi(e,t):(Am()<=Q.in.DEBUG&&tt("QueryEngine","Re-using previous result from %s to execute query: %s",a.toString(),Km(t)),this.Bi(e,h,t,function Vv(n,e){const t=n.toTimestamp().seconds,i=n.toTimestamp().nanoseconds+1,a=zt.fromTimestamp(1e9===i?new Sr(t+1,0):new Sr(t,i));return new es(a,pt.empty(),e)}(a,-1)))})}Fi(e,t){let i=new ur(Ym(e));return t.forEach((a,c)=>{$f(e,c)&&(i=i.add(c))}),i}$i(e,t,i,a){if(null===e.limit)return!1;if(i.size!==t.size)return!0;const c="F"===e.limitType?t.last():t.first();return!!c&&(c.hasPendingWrites||c.version.compareTo(a)>0)}Mi(e,t){return Am()<=Q.in.DEBUG&&tt("QueryEngine","Using full collection scan to execute query:",Km(t)),this.Ni.getDocumentsMatchingQuery(e,t,es.min())}Bi(e,t,i,a){return this.Ni.getDocumentsMatchingQuery(e,i,a).next(c=>(t.forEach(h=>{c=c.insert(h.key,h)}),c))}}class uT{constructor(e,t,i,a){this.persistence=e,this.Li=t,this.It=a,this.Ui=new Lr(Wt),this.qi=new wu(c=>_u(c),vu),this.Ki=new Map,this.Gi=e.getRemoteDocumentCache(),this.Cs=e.getTargetCache(),this.Ns=e.getBundleCache(),this.Qi(i)}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 XE(this.Gi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Gi.setIndexManager(this.indexManager),this.Li.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.Ui))}}function xy(n,e,t,i){return new uT(n,e,t,i)}function Ry(n,e){return Ic.apply(this,arguments)}function Ic(){return Ic=(0,O.Z)(function*(n,e){const t=ut(n);return yield t.persistence.runTransaction("Handle user change","readonly",i=>{let a;return t.mutationQueue.getAllMutationBatches(i).next(c=>(a=c,t.Qi(e),t.mutationQueue.getAllMutationBatches(i))).next(c=>{const h=[],g=[];let T=mn();for(const x of a){h.push(x.batchId);for(const j of x.mutations)T=T.add(j.key)}for(const x of c){g.push(x.batchId);for(const j of x.mutations)T=T.add(j.key)}return t.localDocuments.getDocuments(i,T).next(x=>({ji:x,removedBatchIds:h,addedBatchIds:g}))})})}),Ic.apply(this,arguments)}function Sw(n,e){const t=ut(n);return t.persistence.runTransaction("Acknowledge batch","readwrite-primary",i=>{const a=e.batch.keys(),c=t.Gi.newChangeBuffer({trackRemovals:!0});return function(h,g,T,x){const j=T.batch,re=j.keys();let Te=xe.resolve();return re.forEach(Ve=>{Te=Te.next(()=>x.getEntry(g,Ve)).next(qe=>{const It=T.docVersions.get(Ve);$t(null!==It),qe.version.compareTo(It)<0&&(j.applyToRemoteDocument(qe,T),qe.isValidDocument()&&(qe.setReadTime(T.commitVersion),x.addEntry(qe)))})}),Te.next(()=>h.mutationQueue.removeMutationBatch(g,j))}(t,i,e,c).next(()=>c.apply(i)).next(()=>t.mutationQueue.performConsistencyCheck(i)).next(()=>t.documentOverlayCache.removeOverlaysForBatchId(i,a,e.batch.batchId)).next(()=>t.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(i,function(h){let g=mn();for(let T=0;T0&&(g=g.add(h.batch.mutations[T].key));return g}(e))).next(()=>t.localDocuments.getDocuments(i,a))})}function cp(n){const e=ut(n);return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Cs.getLastRemoteSnapshotVersion(t))}function Aw(n,e){const t=ut(n),i=e.snapshotVersion;let a=t.Ui;return t.persistence.runTransaction("Apply remote event","readwrite-primary",c=>{const h=t.Gi.newChangeBuffer({trackRemovals:!0});a=t.Ui;const g=[];e.targetChanges.forEach((j,re)=>{const Te=a.get(re);if(!Te)return;g.push(t.Cs.removeMatchingKeys(c,j.removedDocuments,re).next(()=>t.Cs.addMatchingKeys(c,j.addedDocuments,re)));let Ve=Te.withSequenceNumber(c.currentSequenceNumber);var qe,It,At;e.targetMismatches.has(re)?Ve=Ve.withResumeToken(Li.EMPTY_BYTE_STRING,zt.min()).withLastLimboFreeSnapshotVersion(zt.min()):j.resumeToken.approximateByteSize()>0&&(Ve=Ve.withResumeToken(j.resumeToken,i)),a=a.insert(re,Ve),It=Ve,At=j,(0===(qe=Te).resumeToken.approximateByteSize()||It.snapshotVersion.toMicroseconds()-qe.snapshotVersion.toMicroseconds()>=3e8||At.addedDocuments.size+At.modifiedDocuments.size+At.removedDocuments.size>0)&&g.push(t.Cs.updateTargetData(c,Ve))});let T=Rs(),x=mn();if(e.documentUpdates.forEach(j=>{e.resolvedLimboDocuments.has(j)&&g.push(t.persistence.referenceDelegate.updateLimboDocument(c,j))}),g.push(function Oy(n,e,t){let i=mn(),a=mn();return t.forEach(c=>i=i.add(c)),e.getEntries(n,i).next(c=>{let h=Rs();return t.forEach((g,T)=>{const x=c.get(g);T.isFoundDocument()!==x.isFoundDocument()&&(a=a.add(g)),T.isNoDocument()&&T.version.isEqual(zt.min())?(e.removeEntry(g,T.readTime),h=h.insert(g,T)):!x.isValidDocument()||T.version.compareTo(x.version)>0||0===T.version.compareTo(x.version)&&x.hasPendingWrites?(e.addEntry(T),h=h.insert(g,T)):tt("LocalStore","Ignoring outdated watch update for ",g,". Current version:",x.version," Watch version:",T.version)}),{Wi:h,zi:a}})}(c,h,e.documentUpdates).next(j=>{T=j.Wi,x=j.zi})),!i.isEqual(zt.min())){const j=t.Cs.getLastRemoteSnapshotVersion(c).next(re=>t.Cs.setTargetsMetadata(c,c.currentSequenceNumber,i));g.push(j)}return xe.waitFor(g).next(()=>h.apply(c)).next(()=>t.localDocuments.getLocalViewOfDocuments(c,T,x)).next(()=>T)}).then(c=>(t.Ui=a,c))}function Mw(n,e){const t=ut(n);return t.persistence.runTransaction("Get next mutation batch","readonly",i=>(void 0===e&&(e=-1),t.mutationQueue.getNextMutationBatchAfterBatchId(i,e)))}function Ml(n,e){const t=ut(n);return t.persistence.runTransaction("Allocate target","readwrite",i=>{let a;return t.Cs.getTargetData(i,e).next(c=>c?(a=c,xe.resolve(a)):t.Cs.allocateTargetId(i).next(h=>(a=new La(e,h,0,i.currentSequenceNumber),t.Cs.addTargetData(i,a).next(()=>a))))}).then(i=>{const a=t.Ui.get(i.targetId);return(null===a||i.snapshotVersion.compareTo(a.snapshotVersion)>0)&&(t.Ui=t.Ui.insert(i.targetId,i),t.qi.set(e,i.targetId)),i})}function xl(n,e,t){return ih.apply(this,arguments)}function ih(){return ih=(0,O.Z)(function*(n,e,t){const i=ut(n),a=i.Ui.get(e),c=t?"readwrite":"readwrite-primary";try{t||(yield i.persistence.runTransaction("Release target",c,h=>i.persistence.referenceDelegate.removeTarget(h,a)))}catch(h){if(!Oa(h))throw h;tt("LocalStore",`Failed to update sequence numbers for target ${e}: ${h}`)}i.Ui=i.Ui.remove(e),i.qi.delete(a.target)}),ih.apply(this,arguments)}function sh(n,e,t){const i=ut(n);let a=zt.min(),c=mn();return i.persistence.runTransaction("Execute query","readonly",h=>function(g,T,x){const j=ut(g),re=j.qi.get(x);return void 0!==re?xe.resolve(j.Ui.get(re)):j.Cs.getTargetData(T,x)}(i,h,ds(e)).next(g=>{if(g)return a=g.lastLimboFreeSnapshotVersion,i.Cs.getMatchingKeysForTargetId(h,g.targetId).next(T=>{c=T})}).next(()=>i.Li.getDocumentsMatchingQuery(h,e,t?a:zt.min(),t?c:mn())).next(g=>(function lp(n,e,t){let i=n.Ki.get(e)||zt.min();t.forEach((a,c)=>{c.readTime.compareTo(i)>0&&(i=c.readTime)}),n.Ki.set(e,i)}(i,function qm(n){return n.collectionGroup||(n.path.length%2==1?n.path.lastSegment():n.path.get(n.path.length-2))}(e),g),{documents:g,Hi:c})))}class Ny{constructor(){this.activeTargetIds=$d()}er(e){this.activeTargetIds=this.activeTargetIds.add(e)}nr(e){this.activeTargetIds=this.activeTargetIds.delete(e)}tr(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class o0{constructor(){this.Lr=new Ny,this.Ur={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,i){}addLocalQueryTarget(e){return this.Lr.er(e),this.Ur[e]||"not-current"}updateQueryState(e,t,i){this.Ur[e]=t}removeLocalQueryTarget(e){this.Lr.nr(e)}isLocalQueryTarget(e){return this.Lr.activeTargetIds.has(e)}clearQueryState(e){delete this.Ur[e]}getAllActiveQueryTargets(){return this.Lr.activeTargetIds}isActiveQueryTarget(e){return this.Lr.activeTargetIds.has(e)}start(){return this.Lr=new Ny,Promise.resolve()}handleUserChange(e,t,i){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class a0{qr(e){}shutdown(){}}class Ly{constructor(){this.Kr=()=>this.Gr(),this.Qr=()=>this.jr(),this.Wr=[],this.zr()}qr(e){this.Wr.push(e)}shutdown(){window.removeEventListener("online",this.Kr),window.removeEventListener("offline",this.Qr)}zr(){window.addEventListener("online",this.Kr),window.addEventListener("offline",this.Qr)}Gr(){tt("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.Wr)e(0)}jr(){tt("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.Wr)e(1)}static C(){return typeof window<"u"&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}const Rw={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class u0{constructor(e){this.Hr=e.Hr,this.Jr=e.Jr}Yr(e){this.Xr=e}Zr(e){this.eo=e}onMessage(e){this.no=e}close(){this.Jr()}send(e){this.Hr(e)}so(){this.Xr()}io(e){this.eo(e)}ro(e){this.no(e)}}class c0 extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId,this.oo=(e.ssl?"https":"http")+"://"+e.host,this.uo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}get co(){return!1}ao(e,t,i,a,c){const h=this.ho(e,t);tt("RestConnection","Sending: ",h,i);const g={};return this.lo(g,a,c),this.fo(e,h,g,i).then(T=>(tt("RestConnection","Received: ",T),T),T=>{throw ta("RestConnection",`${e} failed with error: `,T,"url: ",h,"request:",i),T})}_o(e,t,i,a,c,h){return this.ao(e,t,i,a,c)}lo(e,t,i){e["X-Goog-Api-Client"]="gl-js/ fire/"+il,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((a,c)=>e[c]=a),i&&i.headers.forEach((a,c)=>e[c]=a)}ho(e,t){return`${this.oo}/v1/${t}:${Rw[e]}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams}fo(e,t,i,a){return new Promise((c,h)=>{const g=new OD;g.setWithCredentials(!0),g.listenOnce(xD.COMPLETE,()=>{try{switch(g.getLastErrorCode()){case Cm.NO_ERROR:const x=g.getResponseJson();tt("Connection","XHR received:",JSON.stringify(x)),c(x);break;case Cm.TIMEOUT:tt("Connection",'RPC "'+e+'" timed out'),h(new Ye(ke.DEADLINE_EXCEEDED,"Request time out"));break;case Cm.HTTP_ERROR:const j=g.getStatus();if(tt("Connection",'RPC "'+e+'" failed with status:',j,"response text:",g.getResponseText()),j>0){const re=g.getResponseJson().error;if(re&&re.status&&re.message){const Te=function(Ve){const qe=Ve.toLowerCase().replace(/_/g,"-");return Object.values(ke).indexOf(qe)>=0?qe:ke.UNKNOWN}(re.status);h(new Ye(Te,re.message))}else h(new Ye(ke.UNKNOWN,"Server responded with status "+g.getStatus()))}else h(new Ye(ke.UNAVAILABLE,"Connection failed."));break;default:Rt()}}finally{tt("Connection",'RPC "'+e+'" completed.')}});const T=JSON.stringify(a);g.send(t,"POST",T,i,15)})}wo(e,t,i){const a=[this.oo,"/","google.firestore.v1.Firestore","/",e,"/channel"],c=nT(),h=MD(),g={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&&(g.xmlHttpFactory=new RD({})),this.lo(g.initMessageHeaders,t,i),g.encodeInitMessageHeaders=!0;const T=a.join("");tt("Connection","Creating WebChannel: "+T,g);const x=c.createWebChannel(T,g);let j=!1,re=!1;const Te=new u0({Hr:qe=>{re?tt("Connection","Not sending because WebChannel is closed:",qe):(j||(tt("Connection","Opening WebChannel transport."),x.open(),j=!0),tt("Connection","WebChannel sending:",qe),x.send(qe))},Jr:()=>x.close()}),Ve=(qe,It,At)=>{qe.listen(It,Wn=>{try{At(Wn)}catch(gr){setTimeout(()=>{throw gr},0)}})};return Ve(x,rl.EventType.OPEN,()=>{re||tt("Connection","WebChannel transport opened.")}),Ve(x,rl.EventType.CLOSE,()=>{re||(re=!0,tt("Connection","WebChannel transport closed"),Te.io())}),Ve(x,rl.EventType.ERROR,qe=>{re||(re=!0,ta("Connection","WebChannel transport errored:",qe),Te.io(new Ye(ke.UNAVAILABLE,"The operation could not be completed")))}),Ve(x,rl.EventType.MESSAGE,qe=>{var It;if(!re){const At=qe.data[0];$t(!!At);const Wn=At,gr=Wn.error||(null===(It=Wn[0])||void 0===It?void 0:It.error);if(gr){tt("Connection","WebChannel received error:",gr);const Xn=gr.status;let Ei=function(Kn){const Fi=si[Kn];if(void 0!==Fi)return vl(Fi)}(Xn),lr=gr.message;void 0===Ei&&(Ei=ke.INTERNAL,lr="Unknown error status: "+Xn+" with message "+gr.message),re=!0,Te.io(new Ye(Ei,lr)),x.close()}else tt("Connection","WebChannel received:",At),Te.ro(At)}}),Ve(h,Fv.STAT_EVENT,qe=>{qe.stat===Sm.PROXY?tt("Connection","Detected buffering proxy"):qe.stat===Sm.NOPROXY&&tt("Connection","Detected no buffering proxy")}),setTimeout(()=>{Te.so()},0),Te}}function mp(){return typeof document<"u"?document:null}function Ol(n){return new qf(n,!0)}class Fy{constructor(e,t,i=1e3,a=1.5,c=6e4){this.Hs=e,this.timerId=t,this.mo=i,this.yo=a,this.po=c,this.Io=0,this.To=null,this.Eo=Date.now(),this.reset()}reset(){this.Io=0}Ao(){this.Io=this.po}Ro(e){this.cancel();const t=Math.floor(this.Io+this.bo()),i=Math.max(0,Date.now()-this.Eo),a=Math.max(0,t-i);a>0&&tt("ExponentialBackoff",`Backing off for ${a} ms (base delay: ${this.Io} ms, delay with jitter: ${t} ms, last attempt: ${i} ms ago)`),this.To=this.Hs.enqueueAfterDelay(this.timerId,a,()=>(this.Eo=Date.now(),e())),this.Io*=this.yo,this.Iothis.po&&(this.Io=this.po)}Po(){null!==this.To&&(this.To.skipDelay(),this.To=null)}cancel(){null!==this.To&&(this.To.cancel(),this.To=null)}bo(){return(Math.random()-.5)*this.Io}}class Uy{constructor(e,t,i,a,c,h,g,T){this.Hs=e,this.vo=i,this.Vo=a,this.So=c,this.authCredentialsProvider=h,this.appCheckCredentialsProvider=g,this.listener=T,this.state=0,this.Do=0,this.Co=null,this.xo=null,this.stream=null,this.No=new Fy(e,t)}ko(){return 1===this.state||5===this.state||this.Oo()}Oo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Mo()}stop(){var e=this;return(0,O.Z)(function*(){e.ko()&&(yield e.close(0))})()}Fo(){this.state=0,this.No.reset()}$o(){this.Oo()&&null===this.Co&&(this.Co=this.Hs.enqueueAfterDelay(this.vo,6e4,()=>this.Bo()))}Lo(e){this.Uo(),this.stream.send(e)}Bo(){var e=this;return(0,O.Z)(function*(){if(e.Oo())return e.close(0)})()}Uo(){this.Co&&(this.Co.cancel(),this.Co=null)}qo(){this.xo&&(this.xo.cancel(),this.xo=null)}close(e,t){var i=this;return(0,O.Z)(function*(){i.Uo(),i.qo(),i.No.cancel(),i.Do++,4!==e?i.No.reset():t&&t.code===ke.RESOURCE_EXHAUSTED?(ii(t.toString()),ii("Using maximum backoff delay to prevent overloading the backend."),i.No.Ao()):t&&t.code===ke.UNAUTHENTICATED&&3!==i.state&&(i.authCredentialsProvider.invalidateToken(),i.appCheckCredentialsProvider.invalidateToken()),null!==i.stream&&(i.Ko(),i.stream.close(),i.stream=null),i.state=e,yield i.listener.Zr(t)})()}Ko(){}auth(){this.state=1;const e=this.Go(this.Do),t=this.Do;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([i,a])=>{this.Do===t&&this.Qo(i,a)},i=>{e(()=>{const a=new Ye(ke.UNKNOWN,"Fetching auth token failed: "+i.message);return this.jo(a)})})}Qo(e,t){const i=this.Go(this.Do);this.stream=this.Wo(e,t),this.stream.Yr(()=>{i(()=>(this.state=2,this.xo=this.Hs.enqueueAfterDelay(this.Vo,1e4,()=>(this.Oo()&&(this.state=3),Promise.resolve())),this.listener.Yr()))}),this.stream.Zr(a=>{i(()=>this.jo(a))}),this.stream.onMessage(a=>{i(()=>this.onMessage(a))})}Mo(){var e=this;this.state=5,this.No.Ro((0,O.Z)(function*(){e.state=0,e.start()}))}jo(e){return tt("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Go(e){return t=>{this.Hs.enqueueAndForget(()=>this.Do===e?t():(tt("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class d0 extends Uy{constructor(e,t,i,a,c,h){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,i,a,h),this.It=c}Wo(e,t){return this.So.wo("Listen",e,t)}onMessage(e){this.No.reset();const t=function QD(n,e){let t;if("targetChange"in e){const i="NO_CHANGE"===(T=e.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===T?1:"REMOVE"===T?2:"CURRENT"===T?3:"RESET"===T?4:Rt(),a=e.targetChange.targetIds||[],c=function(T,x){return T.gt?($t(void 0===x||"string"==typeof x),Li.fromBase64String(x||"")):($t(void 0===x||x instanceof Uint8Array),Li.fromUint8Array(x||new Uint8Array))}(n,e.targetChange.resumeToken),h=e.targetChange.cause,g=h&&function(T){const x=void 0===T.code?ke.UNKNOWN:vl(T.code);return new Ye(x,T.message||"")}(h);t=new gE(i,a,c,g||null)}else if("documentChange"in e){const i=e.documentChange,a=ra(n,i.document.name),c=Wr(i.document.updateTime),h=new gi({mapValue:{fields:i.document.fields}}),g=mr.newFoundDocument(a,c,h);t=new Kf(i.targetIds||[],i.removedTargetIds||[],g.key,g)}else if("documentDelete"in e){const i=e.documentDelete,a=ra(n,i.document),c=i.readTime?Wr(i.readTime):zt.min(),h=mr.newNoDocument(a,c);t=new Kf([],i.removedTargetIds||[],h.key,h)}else if("documentRemove"in e){const i=e.documentRemove,a=ra(n,i.document);t=new Kf([],i.removedTargetIds||[],a,null)}else{if(!("filter"in e))return Rt();{const i=e.filter,c=new hE(i.count||0);t=new iy(i.targetId,c)}}var T;return t}(this.It,e),i=function(a){if(!("targetChange"in a))return zt.min();const c=a.targetChange;return c.targetIds&&c.targetIds.length?zt.min():c.readTime?Wr(c.readTime):zt.min()}(e);return this.listener.zo(t,i)}Ho(e){const t={};t.database=zd(this.It),t.addTarget=function(a,c){let h;const g=c.target;return h=Bf(g)?{documents:TE(a,g)}:{query:Wd(a,g)},h.targetId=c.targetId,c.resumeToken.approximateByteSize()>0?h.resumeToken=_E(a,c.resumeToken):c.snapshotVersion.compareTo(zt.min())>0&&(h.readTime=Gd(a,c.snapshotVersion.toTimestamp())),h}(this.It,e);const i=function SE(n,e){const t=function(i,a){switch(a){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return Rt()}}(0,e.purpose);return null==t?null:{"goog-listen-tags":t}}(0,e);i&&(t.labels=i),this.Lo(t)}Jo(e){const t={};t.database=zd(this.It),t.removeTarget=e,this.Lo(t)}}class h0 extends Uy{constructor(e,t,i,a,c,h){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,i,a,h),this.It=c,this.Yo=!1}get Xo(){return this.Yo}start(){this.Yo=!1,this.lastStreamToken=void 0,super.start()}Ko(){this.Yo&&this.Zo([])}Wo(e,t){return this.So.wo("Write",e,t)}onMessage(e){if($t(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Yo){this.No.reset();const t=function bE(n,e){return n&&n.length>0?($t(void 0!==e),n.map(t=>function(i,a){let c=Wr(i.updateTime?i.updateTime:a);return c.isEqual(zt.min())&&(c=Wr(a)),new Gt(c,i.transformResults||[])}(t,e))):[]}(e.writeResults,e.commitTime),i=Wr(e.commitTime);return this.listener.tu(i,t)}return $t(!e.writeResults||0===e.writeResults.length),this.Yo=!0,this.listener.eu()}nu(){const e={};e.database=zd(this.It),this.Lo(e)}Zo(e){const t={streamToken:this.lastStreamToken,writes:e.map(i=>bl(this.It,i))};this.Lo(t)}}class f0 extends class{}{constructor(e,t,i,a){super(),this.authCredentials=e,this.appCheckCredentials=t,this.So=i,this.It=a,this.su=!1}iu(){if(this.su)throw new Ye(ke.FAILED_PRECONDITION,"The client has already been terminated.")}ao(e,t,i){return this.iu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([a,c])=>this.So.ao(e,t,i,a,c)).catch(a=>{throw"FirebaseError"===a.name?(a.code===ke.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),a):new Ye(ke.UNKNOWN,a.toString())})}_o(e,t,i,a){return this.iu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([c,h])=>this.So._o(e,t,i,c,h,a)).catch(c=>{throw"FirebaseError"===c.name?(c.code===ke.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),c):new Ye(ke.UNKNOWN,c.toString())})}terminate(){this.su=!0}}class lT{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.ru=0,this.ou=null,this.uu=!0}cu(){0===this.ru&&(this.au("Unknown"),this.ou=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.ou=null,this.hu("Backend didn't respond within 10 seconds."),this.au("Offline"),Promise.resolve())))}lu(e){"Online"===this.state?this.au("Unknown"):(this.ru++,this.ru>=1&&(this.fu(),this.hu(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.au("Offline")))}set(e){this.fu(),this.ru=0,"Online"===e&&(this.uu=!1),this.au(e)}au(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}hu(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.uu?(ii(t),this.uu=!1):tt("OnlineStateTracker",t)}fu(){null!==this.ou&&(this.ou.cancel(),this.ou=null)}}class p0{constructor(e,t,i,a,c){var h=this;this.localStore=e,this.datastore=t,this.asyncQueue=i,this.remoteSyncer={},this.du=[],this._u=new Map,this.wu=new Set,this.mu=[],this.gu=c,this.gu.qr(g=>{i.enqueueAndForget((0,O.Z)(function*(){var T;oa(h)&&(tt("RemoteStore","Restarting streams for network reachability change."),yield(T=(0,O.Z)(function*(x){const j=ut(x);j.wu.add(4),yield ah(j),j.yu.set("Unknown"),j.wu.delete(4),yield yp(j)}),function(x){return T.apply(this,arguments)})(h))}))}),this.yu=new lT(i,a)}}function yp(n){return g0.apply(this,arguments)}function g0(){return g0=(0,O.Z)(function*(n){if(oa(n))for(const e of n.mu)yield e(!0)}),g0.apply(this,arguments)}function ah(n){return m0.apply(this,arguments)}function m0(){return m0=(0,O.Z)(function*(n){for(const e of n.mu)yield e(!1)}),m0.apply(this,arguments)}function Vy(n,e){const t=ut(n);t._u.has(e.targetId)||(t._u.set(e.targetId,e),_0(t)?Pl(t):kl(t).Oo()&&y0(t,e))}function _p(n,e){const t=ut(n),i=kl(t);t._u.delete(e),i.Oo()&&Pw(t,e),0===t._u.size&&(i.Oo()?i.$o():oa(t)&&t.yu.set("Unknown"))}function y0(n,e){n.pu.Mt(e.targetId),kl(n).Ho(e)}function Pw(n,e){n.pu.Mt(e),kl(n).Jo(e)}function Pl(n){n.pu=new sT({getRemoteKeysForTarget:e=>n.remoteSyncer.getRemoteKeysForTarget(e),se:e=>n._u.get(e)||null}),kl(n).start(),n.yu.cu()}function _0(n){return oa(n)&&!kl(n).ko()&&n._u.size>0}function oa(n){return 0===ut(n).wu.size}function uh(n){n.pu=void 0}function v0(n){return vp.apply(this,arguments)}function vp(){return vp=(0,O.Z)(function*(n){n._u.forEach((e,t)=>{y0(n,e)})}),vp.apply(this,arguments)}function dT(n,e){return ch.apply(this,arguments)}function ch(){return ch=(0,O.Z)(function*(n,e){uh(n),_0(n)?(n.yu.lu(e),Pl(n)):n.yu.set("Unknown")}),ch.apply(this,arguments)}function E0(n,e,t){return jy.apply(this,arguments)}function jy(){return jy=(0,O.Z)(function*(n,e,t){if(n.yu.set("Online"),e instanceof gE&&2===e.state&&e.cause)try{yield(i=(0,O.Z)(function*(a,c){const h=c.cause;for(const g of c.targetIds)a._u.has(g)&&(yield a.remoteSyncer.rejectListen(g,h),a._u.delete(g),a.pu.removeTarget(g))}),function(a,c){return i.apply(this,arguments)})(n,e)}catch(i){tt("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),i),yield lh(n,i)}else if(e instanceof Kf?n.pu.Gt(e):e instanceof iy?n.pu.Yt(e):n.pu.Wt(e),!t.isEqual(zt.min()))try{const i=yield cp(n.localStore);t.compareTo(i)>=0&&(yield function(a,c){const h=a.pu.te(c);return h.targetChanges.forEach((g,T)=>{if(g.resumeToken.approximateByteSize()>0){const x=a._u.get(T);x&&a._u.set(T,x.withResumeToken(g.resumeToken,c))}}),h.targetMismatches.forEach(g=>{const T=a._u.get(g);if(!T)return;a._u.set(g,T.withResumeToken(Li.EMPTY_BYTE_STRING,T.snapshotVersion)),Pw(a,g);const x=new La(T.target,g,1,T.sequenceNumber);y0(a,x)}),a.remoteSyncer.applyRemoteEvent(h)}(n,t))}catch(i){tt("RemoteStore","Failed to raise snapshot:",i),yield lh(n,i)}var i}),jy.apply(this,arguments)}function lh(n,e,t){return I0.apply(this,arguments)}function I0(){return I0=(0,O.Z)(function*(n,e,t){if(!Oa(e))throw e;n.wu.add(1),yield ah(n),n.yu.set("Offline"),t||(t=()=>cp(n.localStore)),n.asyncQueue.enqueueRetryable((0,O.Z)(function*(){tt("RemoteStore","Retrying IndexedDB access"),yield t(),n.wu.delete(1),yield yp(n)}))}),I0.apply(this,arguments)}function Nw(n,e){return e().catch(t=>lh(n,t,e))}function Nl(n){return $y.apply(this,arguments)}function $y(){return $y=(0,O.Z)(function*(n){const e=ut(n),t=vi(e);let i=e.du.length>0?e.du[e.du.length-1].batchId:-1;for(;Ep(e);)try{const a=yield Mw(e.localStore,i);if(null===a){0===e.du.length&&t.$o();break}i=a.batchId,kw(e,a)}catch(a){yield lh(e,a)}Lw(e)&&Fw(e)}),$y.apply(this,arguments)}function Ep(n){return oa(n)&&n.du.length<10}function kw(n,e){n.du.push(e);const t=vi(n);t.Oo()&&t.Xo&&t.Zo(e.mutations)}function Lw(n){return oa(n)&&!vi(n).ko()&&n.du.length>0}function Fw(n){vi(n).start()}function hT(n){return Gy.apply(this,arguments)}function Gy(){return Gy=(0,O.Z)(function*(n){vi(n).nu()}),Gy.apply(this,arguments)}function Uw(n){return Hy.apply(this,arguments)}function Hy(){return Hy=(0,O.Z)(function*(n){const e=vi(n);for(const t of n.du)e.Zo(t.mutations)}),Hy.apply(this,arguments)}function fT(n,e,t){return zy.apply(this,arguments)}function zy(){return zy=(0,O.Z)(function*(n,e,t){const i=n.du.shift(),a=Kd.from(i,e,t);yield Nw(n,()=>n.remoteSyncer.applySuccessfulWrite(a)),yield Nl(n)}),zy.apply(this,arguments)}function D0(n,e){return Ip.apply(this,arguments)}function Ip(){return Ip=(0,O.Z)(function*(n,e){var t;e&&vi(n).Xo&&(yield(t=(0,O.Z)(function*(i,a){if(fE(c=a.code)&&c!==ke.ABORTED){const h=i.du.shift();vi(i).Fo(),yield Nw(i,()=>i.remoteSyncer.rejectFailedWrite(h.batchId,a)),yield Nl(i)}var c}),function(i,a){return t.apply(this,arguments)})(n,e)),Lw(n)&&Fw(n)}),Ip.apply(this,arguments)}function Bw(n,e){return Zs.apply(this,arguments)}function Zs(){return Zs=(0,O.Z)(function*(n,e){const t=ut(n);t.asyncQueue.verifyOperationInProgress(),tt("RemoteStore","RemoteStore received new credentials");const i=oa(t);t.wu.add(3),yield ah(t),i&&t.yu.set("Unknown"),yield t.remoteSyncer.handleCredentialChange(e),t.wu.delete(3),yield yp(t)}),Zs.apply(this,arguments)}function dh(){return dh=(0,O.Z)(function*(n,e){const t=ut(n);e?(t.wu.delete(2),yield yp(t)):e||(t.wu.add(2),yield ah(t),t.yu.set("Unknown"))}),dh.apply(this,arguments)}function kl(n){return n.Iu||(n.Iu=function(e,t,i){const a=ut(e);return a.iu(),new d0(t,a.So,a.authCredentials,a.appCheckCredentials,a.It,i)}(n.datastore,n.asyncQueue,{Yr:v0.bind(null,n),Zr:dT.bind(null,n),zo:E0.bind(null,n)}),n.mu.push(function(){var e=(0,O.Z)(function*(t){t?(n.Iu.Fo(),_0(n)?Pl(n):n.yu.set("Unknown")):(yield n.Iu.stop(),uh(n))});return function(t){return e.apply(this,arguments)}}())),n.Iu}function vi(n){return n.Tu||(n.Tu=function(e,t,i){const a=ut(e);return a.iu(),new h0(t,a.So,a.authCredentials,a.appCheckCredentials,a.It,i)}(n.datastore,n.asyncQueue,{Yr:hT.bind(null,n),Zr:D0.bind(null,n),eu:Uw.bind(null,n),tu:fT.bind(null,n)}),n.mu.push(function(){var e=(0,O.Z)(function*(t){t?(n.Tu.Fo(),yield Nl(n)):(yield n.Tu.stop(),n.du.length>0&&(tt("RemoteStore",`Stopping write stream with ${n.du.length} pending writes`),n.du=[]))});return function(t){return e.apply(this,arguments)}}())),n.Tu}class Ky{constructor(e,t,i,a,c){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=i,this.op=a,this.removalCallback=c,this.deferred=new Dr,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(h=>{})}static createAndSchedule(e,t,i,a,c){const h=Date.now()+i,g=new Ky(e,t,h,a,c);return g.start(i),g}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Ye(ke.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 Au(n,e){if(ii("AsyncQueue",`${e}: ${n}`),Oa(n))return new Ye(ke.UNAVAILABLE,`${e}: ${n}`);throw n}class Ll{constructor(e){this.comparator=e?(t,i)=>e(t,i)||pt.comparator(t.key,i.key):(t,i)=>pt.comparator(t.key,i.key),this.keyedMap=El(),this.sortedSet=new Lr(this.comparator)}static emptySet(e){return new Ll(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,i)=>(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 Ll)||this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),i=e.sortedSet.getIterator();for(;t.hasNext();){const a=t.getNext().key,c=i.getNext().key;if(!a.isEqual(c))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 i=new Ll;return i.comparator=this.comparator,i.keyedMap=e,i.sortedSet=t,i}}class w0{constructor(){this.Eu=new Lr(pt.comparator)}track(e){const t=e.doc.key,i=this.Eu.get(t);i?0!==e.type&&3===i.type?this.Eu=this.Eu.insert(t,e):3===e.type&&1!==i.type?this.Eu=this.Eu.insert(t,{type:i.type,doc:e.doc}):2===e.type&&2===i.type?this.Eu=this.Eu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===i.type?this.Eu=this.Eu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===i.type?this.Eu=this.Eu.remove(t):1===e.type&&2===i.type?this.Eu=this.Eu.insert(t,{type:1,doc:i.doc}):0===e.type&&1===i.type?this.Eu=this.Eu.insert(t,{type:2,doc:e.doc}):Rt():this.Eu=this.Eu.insert(t,e)}Au(){const e=[];return this.Eu.inorderTraversal((t,i)=>{e.push(i)}),e}}class Mu{constructor(e,t,i,a,c,h,g,T,x){this.query=e,this.docs=t,this.oldDocs=i,this.docChanges=a,this.mutatedKeys=c,this.fromCache=h,this.syncStateChanged=g,this.excludesMetadataChanges=T,this.hasCachedResults=x}static fromInitialDocuments(e,t,i,a,c){const h=[];return t.forEach(g=>{h.push({type:0,doc:g})}),new Mu(e,t,Ll.emptySet(t),h,i,a,!0,!1,c)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Fd(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,i=e.docChanges;if(t.length!==i.length)return!1;for(let a=0;aoE(e),Fd),this.onlineState="Unknown",this.bu=new Set}}function Dp(){return Dp=(0,O.Z)(function*(n,e){const t=ut(n),i=e.query;let a=!1,c=t.queries.get(i);if(c||(a=!0,c=new b0),a)try{c.Ru=yield t.onListen(i)}catch(h){const g=Au(h,`Initialization of query '${Km(e.query)}' failed`);return void e.onError(g)}t.queries.set(i,c),c.listeners.push(e),e.Pu(t.onlineState),c.Ru&&e.vu(c.Ru)&&hh(t)}),Dp.apply(this,arguments)}function Yy(){return Yy=(0,O.Z)(function*(n,e){const t=ut(n),i=e.query;let a=!1;const c=t.queries.get(i);if(c){const h=c.listeners.indexOf(e);h>=0&&(c.listeners.splice(h,1),a=0===c.listeners.length)}if(a)return t.queries.delete(i),t.onUnlisten(i)}),Yy.apply(this,arguments)}function C0(n,e){const t=ut(n);let i=!1;for(const a of e){const h=t.queries.get(a.query);if(h){for(const g of h.listeners)g.vu(a)&&(i=!0);h.Ru=a}}i&&hh(t)}function Vw(n,e,t){const i=ut(n),a=i.queries.get(e);if(a)for(const c of a.listeners)c.onError(t);i.queries.delete(e)}function hh(n){n.bu.forEach(e=>{e.next()})}class aa{constructor(e,t,i){this.query=e,this.Vu=t,this.Su=!1,this.Du=null,this.onlineState="Unknown",this.options=i||{}}vu(e){if(!this.options.includeMetadataChanges){const i=[];for(const a of e.docChanges)3!==a.type&&i.push(a);e=new Mu(e.query,e.docs,e.oldDocs,i,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.Su?this.Cu(e)&&(this.Vu.next(e),t=!0):this.xu(e,this.onlineState)&&(this.Nu(e),t=!0),this.Du=e,t}onError(e){this.Vu.error(e)}Pu(e){this.onlineState=e;let t=!1;return this.Du&&!this.Su&&this.xu(this.Du,e)&&(this.Nu(this.Du),t=!0),t}xu(e,t){return!e.fromCache||(!this.options.ku||!("Offline"!==t))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}Cu(e){return e.docChanges.length>0||!!(e.syncStateChanged||this.Du&&this.Du.hasPendingWrites!==e.hasPendingWrites)&&!0===this.options.includeMetadataChanges}Nu(e){e=Mu.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Su=!0,this.Vu.next(e)}}class jw{constructor(e){this.key=e}}class M0{constructor(e){this.key=e}}class x0{constructor(e,t){this.query=e,this.Uu=t,this.qu=null,this.hasCachedResults=!1,this.current=!1,this.Ku=mn(),this.mutatedKeys=mn(),this.Gu=Ym(e),this.Qu=new Ll(this.Gu)}get ju(){return this.Uu}Wu(e,t){const i=t?t.zu:new w0,a=t?t.Qu:this.Qu;let c=t?t.mutatedKeys:this.mutatedKeys,h=a,g=!1;const T="F"===this.query.limitType&&a.size===this.query.limit?a.last():null,x="L"===this.query.limitType&&a.size===this.query.limit?a.first():null;if(e.inorderTraversal((j,re)=>{const Te=a.get(j),Ve=$f(this.query,re)?re:null,qe=!!Te&&this.mutatedKeys.has(Te.key),It=!!Ve&&(Ve.hasLocalMutations||this.mutatedKeys.has(Ve.key)&&Ve.hasCommittedMutations);let At=!1;Te&&Ve?Te.data.isEqual(Ve.data)?qe!==It&&(i.track({type:3,doc:Ve}),At=!0):this.Hu(Te,Ve)||(i.track({type:2,doc:Ve}),At=!0,(T&&this.Gu(Ve,T)>0||x&&this.Gu(Ve,x)<0)&&(g=!0)):!Te&&Ve?(i.track({type:0,doc:Ve}),At=!0):Te&&!Ve&&(i.track({type:1,doc:Te}),At=!0,(T||x)&&(g=!0)),At&&(Ve?(h=h.add(Ve),c=It?c.add(j):c.delete(j)):(h=h.delete(j),c=c.delete(j)))}),null!==this.query.limit)for(;h.size>this.query.limit;){const j="F"===this.query.limitType?h.last():h.first();h=h.delete(j.key),c=c.delete(j.key),i.track({type:1,doc:j})}return{Qu:h,zu:i,$i:g,mutatedKeys:c}}Hu(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,i){const a=this.Qu;this.Qu=e.Qu,this.mutatedKeys=e.mutatedKeys;const c=e.zu.Au();c.sort((x,j)=>function(re,Te){const Ve=qe=>{switch(qe){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Rt()}};return Ve(re)-Ve(Te)}(x.type,j.type)||this.Gu(x.doc,j.doc)),this.Ju(i);const h=t?this.Yu():[],g=0===this.Ku.size&&this.current?1:0,T=g!==this.qu;return this.qu=g,0!==c.length||T?{snapshot:new Mu(this.query,e.Qu,a,c,e.mutatedKeys,0===g,T,!1,!!i&&i.resumeToken.approximateByteSize()>0),Xu:h}:{Xu:h}}Pu(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Qu:this.Qu,zu:new w0,mutatedKeys:this.mutatedKeys,$i:!1},!1)):{Xu:[]}}Zu(e){return!this.Uu.has(e)&&!!this.Qu.has(e)&&!this.Qu.get(e).hasLocalMutations}Ju(e){e&&(e.addedDocuments.forEach(t=>this.Uu=this.Uu.add(t)),e.modifiedDocuments.forEach(t=>{}),e.removedDocuments.forEach(t=>this.Uu=this.Uu.delete(t)),this.current=e.current)}Yu(){if(!this.current)return[];const e=this.Ku;this.Ku=mn(),this.Qu.forEach(i=>{this.Zu(i.key)&&(this.Ku=this.Ku.add(i.key))});const t=[];return e.forEach(i=>{this.Ku.has(i)||t.push(new M0(i))}),this.Ku.forEach(i=>{e.has(i)||t.push(new jw(i))}),t}tc(e){this.Uu=e.Hi,this.Ku=mn();const t=this.Wu(e.documents);return this.applyChanges(t,!0)}ec(){return Mu.fromInitialDocuments(this.query,this.Qu,this.mutatedKeys,0===this.qu,this.hasCachedResults)}}class $w{constructor(e,t,i){this.query=e,this.targetId=t,this.view=i}}class Gw{constructor(e){this.key=e,this.nc=!1}}class R0{constructor(e,t,i,a,c,h){this.localStore=e,this.remoteStore=t,this.eventManager=i,this.sharedClientState=a,this.currentUser=c,this.maxConcurrentLimboResolutions=h,this.sc={},this.ic=new wu(g=>oE(g),Fd),this.rc=new Map,this.oc=new Set,this.uc=new Lr(pt.comparator),this.cc=new Map,this.ac=new Ty,this.hc={},this.lc=new Map,this.fc=Fa.vn(),this.onlineState="Unknown",this.dc=void 0}get isPrimaryClient(){return!0===this.dc}}function pT(n,e){return Tp.apply(this,arguments)}function Tp(){return Tp=(0,O.Z)(function*(n,e){const t=Lp(n);let i,a;const c=t.ic.get(e);if(c)i=c.targetId,t.sharedClientState.addLocalQueryTarget(i),a=c.view.ec();else{const h=yield Ml(t.localStore,ds(e));t.isPrimaryClient&&Vy(t.remoteStore,h);const g=t.sharedClientState.addLocalQueryTarget(h.targetId);i=h.targetId,a=yield Zy(t,e,i,"current"===g,h.resumeToken)}return a}),Tp.apply(this,arguments)}function Zy(n,e,t,i,a){return Cp.apply(this,arguments)}function Cp(){return Cp=(0,O.Z)(function*(n,e,t,i,a){n._c=(re,Te,Ve)=>{return(qe=(0,O.Z)(function*(It,At,Wn,gr){let Xn=At.view.Wu(Wn);Xn.$i&&(Xn=yield sh(It.localStore,At.query,!1).then(({documents:Kn})=>At.view.Wu(Kn,Xn)));const Ei=gr&&gr.targetChanges.get(At.targetId),lr=At.view.applyChanges(Xn,It.isPrimaryClient,Ei);return t_(It,At.targetId,lr.Xu),lr.snapshot}),function(It,At,Wn,gr){return qe.apply(this,arguments)})(n,re,Te,Ve);var qe};const c=yield sh(n.localStore,e,!0),h=new x0(e,c.Hi),g=h.Wu(c.documents),T=Dl.createSynthesizedTargetChangeForCurrentChange(t,i&&"Offline"!==n.onlineState,a),x=h.applyChanges(g,n.isPrimaryClient,T);t_(n,t,x.Xu);const j=new $w(e,t,h);return n.ic.set(e,j),n.rc.has(t)?n.rc.get(t).push(e):n.rc.set(t,[e]),x.snapshot}),Cp.apply(this,arguments)}function gT(n,e){return fh.apply(this,arguments)}function fh(){return fh=(0,O.Z)(function*(n,e){const t=ut(n),i=t.ic.get(e),a=t.rc.get(i.targetId);if(a.length>1)return t.rc.set(i.targetId,a.filter(c=>!Fd(c,e))),void t.ic.delete(e);t.isPrimaryClient?(t.sharedClientState.removeLocalQueryTarget(i.targetId),t.sharedClientState.isActiveQueryTarget(i.targetId)||(yield xl(t.localStore,i.targetId,!1).then(()=>{t.sharedClientState.clearQueryState(i.targetId),_p(t.remoteStore,i.targetId),wc(t,i.targetId)}).catch(xo))):(wc(t,i.targetId),yield xl(t.localStore,i.targetId,!0))}),fh.apply(this,arguments)}function Sp(){return Sp=(0,O.Z)(function*(n,e,t){const i=i_(n);try{const a=yield function(c,h){const g=ut(c),T=Sr.now(),x=h.reduce((Te,Ve)=>Te.add(Ve.key),mn());let j,re;return g.persistence.runTransaction("Locally write mutations","readwrite",Te=>{let Ve=Rs(),qe=mn();return g.Gi.getEntries(Te,x).next(It=>{Ve=It,Ve.forEach((At,Wn)=>{Wn.isValidDocument()||(qe=qe.add(At))})}).next(()=>g.localDocuments.getOverlayedDocuments(Te,Ve)).next(It=>{j=It;const At=[];for(const Wn of h){const gr=zf(Wn,j.get(Wn.key).overlayedDocument);null!=gr&&At.push(new na(Wn.key,gr,pl(gr.value.mapValue),Ar.exists(!0)))}return g.mutationQueue.addMutationBatch(Te,T,At,h)}).next(It=>{re=It;const At=It.applyToLocalDocumentSet(j,qe);return g.documentOverlayCache.saveOverlays(Te,It.batchId,At)})}).then(()=>({batchId:re.batchId,changes:ry(j)}))}(i.localStore,e);i.sharedClientState.addPendingMutation(a.batchId),function(c,h,g){let T=c.hc[c.currentUser.toKey()];T||(T=new Lr(Wt)),T=T.insert(h,g),c.hc[c.currentUser.toKey()]=T}(i,a.batchId,t),yield xu(i,a.changes),yield Nl(i.remoteStore)}catch(a){const c=Au(a,"Failed to persist write");t.reject(c)}}),Sp.apply(this,arguments)}function Qy(n,e){return Ap.apply(this,arguments)}function Ap(){return Ap=(0,O.Z)(function*(n,e){const t=ut(n);try{const i=yield Aw(t.localStore,e);e.targetChanges.forEach((a,c)=>{const h=t.cc.get(c);h&&($t(a.addedDocuments.size+a.modifiedDocuments.size+a.removedDocuments.size<=1),a.addedDocuments.size>0?h.nc=!0:a.modifiedDocuments.size>0?$t(h.nc):a.removedDocuments.size>0&&($t(h.nc),h.nc=!1))}),yield xu(t,i,e)}catch(i){yield xo(i)}}),Ap.apply(this,arguments)}function Xy(n,e,t){const i=ut(n);if(i.isPrimaryClient&&0===t||!i.isPrimaryClient&&1===t){const a=[];i.ic.forEach((c,h)=>{const g=h.view.Pu(e);g.snapshot&&a.push(g.snapshot)}),function(c,h){const g=ut(c);g.onlineState=h;let T=!1;g.queries.forEach((x,j)=>{for(const re of j.listeners)re.Pu(h)&&(T=!0)}),T&&hh(g)}(i.eventManager,e),a.length&&i.sc.zo(a),i.onlineState=e,i.isPrimaryClient&&i.sharedClientState.setOnlineState(e)}}function Mp(n,e,t){return Fl.apply(this,arguments)}function Fl(){return Fl=(0,O.Z)(function*(n,e,t){const i=ut(n);i.sharedClientState.updateQueryState(e,"rejected",t);const a=i.cc.get(e),c=a&&a.key;if(c){let h=new Lr(pt.comparator);h=h.insert(c,mr.newNoDocument(c,zt.min()));const g=mn().add(c),T=new Il(zt.min(),new Map,new ur(Wt),h,g);yield Qy(i,T),i.uc=i.uc.remove(c),i.cc.delete(e),U0(i)}else yield xl(i.localStore,e,!1).then(()=>wc(i,e,t)).catch(xo)}),Fl.apply(this,arguments)}function P0(n,e){return Jy.apply(this,arguments)}function Jy(){return Jy=(0,O.Z)(function*(n,e){const t=ut(n),i=e.batch.batchId;try{const a=yield Sw(t.localStore,e);L0(t,i,null),k0(t,i),t.sharedClientState.updateMutationState(i,"acknowledged"),yield xu(t,a)}catch(a){yield xo(a)}}),Jy.apply(this,arguments)}function N0(n,e,t){return xp.apply(this,arguments)}function xp(){return xp=(0,O.Z)(function*(n,e,t){const i=ut(n);try{const a=yield function(c,h){const g=ut(c);return g.persistence.runTransaction("Reject batch","readwrite-primary",T=>{let x;return g.mutationQueue.lookupMutationBatch(T,h).next(j=>($t(null!==j),x=j.keys(),g.mutationQueue.removeMutationBatch(T,j))).next(()=>g.mutationQueue.performConsistencyCheck(T)).next(()=>g.documentOverlayCache.removeOverlaysForBatchId(T,x,h)).next(()=>g.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(T,x)).next(()=>g.localDocuments.getDocuments(T,x))})}(i.localStore,e);L0(i,e,t),k0(i,e),i.sharedClientState.updateMutationState(e,"rejected",t),yield xu(i,a)}catch(a){yield xo(a)}}),xp.apply(this,arguments)}function k0(n,e){(n.lc.get(e)||[]).forEach(t=>{t.resolve()}),n.lc.delete(e)}function L0(n,e,t){const i=ut(n);let a=i.hc[i.currentUser.toKey()];if(a){const c=a.get(e);c&&(t?c.reject(t):c.resolve(),a=a.remove(e)),i.hc[i.currentUser.toKey()]=a}}function wc(n,e,t=null){n.sharedClientState.removeLocalQueryTarget(e);for(const i of n.rc.get(e))n.ic.delete(i),t&&n.sc.wc(i,t);n.rc.delete(e),n.isPrimaryClient&&n.ac.ls(e).forEach(i=>{n.ac.containsKey(i)||F0(n,i)})}function F0(n,e){n.oc.delete(e.path.canonicalString());const t=n.uc.get(e);null!==t&&(_p(n.remoteStore,t),n.uc=n.uc.remove(e),n.cc.delete(t),U0(n))}function t_(n,e,t){for(const i of t)i instanceof jw?(n.ac.addReference(i.key,e),zw(n,i)):i instanceof M0?(tt("SyncEngine","Document no longer in limbo: "+i.key),n.ac.removeReference(i.key,e),n.ac.containsKey(i.key)||F0(n,i.key)):Rt()}function zw(n,e){const t=e.key,i=t.path.canonicalString();n.uc.get(t)||n.oc.has(i)||(tt("SyncEngine","New document in limbo: "+t),n.oc.add(i),U0(n))}function U0(n){for(;n.oc.size>0&&n.uc.size{h.push(i._c(T,e,t).then(x=>{if((x||t)&&i.isPrimaryClient&&i.sharedClientState.updateQueryState(T.targetId,x?.fromCache?"not-current":"current"),x){a.push(x);const j=My.Ci(T.targetId,x);c.push(j)}}))}),yield Promise.all(h),i.sc.zo(a),yield(g=(0,O.Z)(function*(T,x){const j=ut(T);try{yield j.persistence.runTransaction("notifyLocalViewChanges","readwrite",re=>xe.forEach(x,Te=>xe.forEach(Te.Si,Ve=>j.persistence.referenceDelegate.addReference(re,Te.targetId,Ve)).next(()=>xe.forEach(Te.Di,Ve=>j.persistence.referenceDelegate.removeReference(re,Te.targetId,Ve)))))}catch(re){if(!Oa(re))throw re;tt("LocalStore","Failed to update sequence numbers: "+re)}for(const re of x){const Te=re.targetId;if(!re.fromCache){const Ve=j.Ui.get(Te),It=Ve.withLastLimboFreeSnapshotVersion(Ve.snapshotVersion);j.Ui=j.Ui.insert(Te,It)}}}),function(T,x){return g.apply(this,arguments)})(i.localStore,c))}),B0.apply(this,arguments)}function mT(n,e){return V0.apply(this,arguments)}function V0(){return V0=(0,O.Z)(function*(n,e){const t=ut(n);if(!t.currentUser.isEqual(e)){tt("SyncEngine","User change. New user:",e.toKey());const i=yield Ry(t.localStore,e);t.currentUser=e,(a=t).lc.forEach(h=>{h.forEach(g=>{g.reject(new Ye(ke.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),a.lc.clear(),t.sharedClientState.handleUserChange(e,i.removedBatchIds,i.addedBatchIds),yield xu(t,i.ji)}var a}),V0.apply(this,arguments)}function Ww(n,e){const t=ut(n),i=t.cc.get(e);if(i&&i.nc)return mn().add(i.key);{let a=mn();const c=t.rc.get(e);if(!c)return a;for(const h of c){const g=t.ic.get(h);a=a.unionWith(g.view.ju)}return a}}function Lp(n){const e=ut(n);return e.remoteStore.remoteSyncer.applyRemoteEvent=Qy.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=Ww.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=Mp.bind(null,e),e.sc.zo=C0.bind(null,e.eventManager),e.sc.wc=Vw.bind(null,e.eventManager),e}function i_(n){const e=ut(n);return e.remoteStore.remoteSyncer.applySuccessfulWrite=P0.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=N0.bind(null,e),e}class H0{constructor(){this.synchronizeTabs=!1}initialize(e){var t=this;return(0,O.Z)(function*(){t.It=Ol(e.databaseInfo.databaseId),t.sharedClientState=t.gc(e),t.persistence=t.yc(e),yield t.persistence.start(),t.localStore=t.Ic(e),t.gcScheduler=t.Tc(e,t.localStore),t.indexBackfillerScheduler=t.Ec(e,t.localStore)})()}Tc(e,t){return null}Ec(e,t){return null}Ic(e){return xy(this.persistence,new Cw,e.initialUser,this.It)}yc(e){return new Sy(rh.Bs,this.It)}gc(e){return new o0}terminate(){var e=this;return(0,O.Z)(function*(){e.gcScheduler&&e.gcScheduler.stop(),yield e.sharedClientState.shutdown(),yield e.persistence.shutdown()})()}}class Yw extends H0{constructor(e,t,i){super(),this.Ac=e,this.cacheSizeBytes=t,this.forceOwnership=i,this.synchronizeTabs=!1}initialize(e){var t=()=>super.initialize,i=this;return(0,O.Z)(function*(){yield t().call(i,e),yield i.Ac.initialize(i,e),yield i_(i.Ac.syncEngine),yield Nl(i.Ac.remoteStore),yield i.persistence.li(()=>(i.gcScheduler&&!i.gcScheduler.started&&i.gcScheduler.start(),i.indexBackfillerScheduler&&!i.indexBackfillerScheduler.started&&i.indexBackfillerScheduler.start(),Promise.resolve()))})()}Ic(e){return xy(this.persistence,new Cw,e.initialUser,this.It)}Tc(e,t){return new _w(this.persistence.referenceDelegate.garbageCollector,e.asyncQueue,t)}Ec(e,t){const i=new kD(t,this.persistence);return new Gv(e.asyncQueue,i)}yc(e){const t=function Ay(n,e){let t=n.projectId;return n.isDefaultDatabase||(t+="."+n.database),"firestore/"+e+"/"+t+"/"}(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),i=void 0!==this.cacheSizeBytes?Os.withCacheSize(this.cacheSizeBytes):Os.DEFAULT;return new up(this.synchronizeTabs,t,e.clientId,i,e.asyncQueue,function l0(){return typeof window<"u"?window:null}(),mp(),this.It,this.sharedClientState,!!this.forceOwnership)}gc(e){return new o0}}class Fp{initialize(e,t){var i=this;return(0,O.Z)(function*(){i.localStore||(i.localStore=e.localStore,i.sharedClientState=e.sharedClientState,i.datastore=i.createDatastore(t),i.remoteStore=i.createRemoteStore(t),i.eventManager=i.createEventManager(t),i.syncEngine=i.createSyncEngine(t,!e.synchronizeTabs),i.sharedClientState.onlineStateHandler=a=>Xy(i.syncEngine,a,1),i.remoteStore.remoteSyncer.handleCredentialChange=mT.bind(null,i.syncEngine),yield function Wy(n,e){return dh.apply(this,arguments)}(i.remoteStore,i.syncEngine.isPrimaryClient))})()}createEventManager(e){return new T0}createDatastore(e){const t=Ol(e.databaseInfo.databaseId),i=new c0(e.databaseInfo);return new f0(e.authCredentials,e.appCheckCredentials,i,t)}createRemoteStore(e){return t=this.localStore,i=this.datastore,a=e.asyncQueue,c=g=>Xy(this.syncEngine,g,0),h=Ly.C()?new Ly:new a0,new p0(t,i,a,c,h);var t,i,a,c,h}createSyncEngine(e,t){return function(i,a,c,h,g,T,x){const j=new R0(i,a,c,h,g,T);return x&&(j.dc=!0),j}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}terminate(){return(e=(0,O.Z)(function*(t){const i=ut(t);tt("RemoteStore","RemoteStore shutting down."),i.wu.add(5),yield ah(i),i.gu.shutdown(),i.yu.set("Unknown")}),function(t){return e.apply(this,arguments)})(this.remoteStore);var e}}function Up(n,e,t){if(!t)throw new Ye(ke.INVALID_ARGUMENT,`Function ${n}() cannot be called with an empty ${e}.`)}function W0(n){if(!pt.isDocumentKey(n))throw new Ye(ke.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${n} has ${n.length}.`)}function Ul(n){if(void 0===n)return"undefined";if(null===n)return"null";if("string"==typeof n)return n.length>20&&(n=`${n.substring(0,20)}...`),JSON.stringify(n);if("number"==typeof n||"boolean"==typeof n)return""+n;if("object"==typeof n){if(n instanceof Array)return"an array";{const e=(t=n).constructor?t.constructor.name:null;return e?`a custom ${e} object`:"an object"}}var t;return"function"==typeof n?"a function":Rt()}function jn(n,e){if("_delegate"in n&&(n=n._delegate),!(n instanceof e)){if(e.name===n.constructor.name)throw new Ye(ke.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const t=Ul(n);throw new Ye(ke.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${t}`)}}return n}const Bp=new Map;class K0{constructor(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new Ye(ke.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 Ye(ke.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,function Zw(n,e,t,i){if(!0===e&&!0===i)throw new Ye(ke.INVALID_ARGUMENT,`${n} and ${t} cannot be used together.`)}("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 mh{constructor(e,t,i,a){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=i,this._app=a,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new K0({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Ye(ke.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 Ye(ke.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 K0(e),void 0!==e.credentials&&(this._authCredentials=function(t){if(!t)return new uo;switch(t.type){case"gapi":return new al(t.client,t.sessionIndex||"0",t.iamToken||null,t.authTokenFactory||null);case"provider":return t.client;default:throw new Ye(ke.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=Bp.get(e);t&&(tt("ComponentProvider","Removing Datastore"),Bp.delete(e),t.terminate())}(this),Promise.resolve()}}class ai{constructor(e,t,i){this.converter=t,this._key=i,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 ua(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new ai(this.firestore,e,this._key)}}class ns{constructor(e,t,i){this.converter=t,this._query=i,this.type="query",this.firestore=e}withConverter(e){return new ns(this.firestore,e,this._query)}}class ua extends ns{constructor(e,t,i){super(e,t,ml(i)),this._path=i,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 ai(this.firestore,null,new pt(e))}withConverter(e){return new ua(this.firestore,e,this._path)}}function Qw(n,e,...t){if(n=(0,W.m9)(n),1===arguments.length&&(e=ic.R()),Up("doc","path",e),n instanceof mh){const i=Fn.fromString(e,...t);return W0(i),new ai(n,null,new pt(i))}{if(!(n instanceof ai||n instanceof ua))throw new Ye(ke.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const i=n._path.child(Fn.fromString(e,...t));return W0(i),new ai(n.firestore,n instanceof ua?n.converter:null,new pt(i))}}class Vp{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Rc(this.observer.next,e)}error(e){this.observer.error?this.Rc(this.observer.error,e):ii("Uncaught Error in snapshot listener:",e)}bc(){this.muted=!0}Rc(e,t){this.muted||setTimeout(()=>{this.muted||e(t)},0)}}class r{constructor(e,t,i,a){var c=this;this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=i,this.databaseInfo=a,this.user=Ni.UNAUTHENTICATED,this.clientId=ic.R(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(i,function(){var h=(0,O.Z)(function*(g){tt("FirestoreClient","Received user=",g.uid),yield c.authCredentialListener(g),c.user=g});return function(g){return h.apply(this,arguments)}}()),this.appCheckCredentials.start(i,h=>(tt("FirestoreClient","Received new app check token=",h),this.appCheckCredentialListener(h,this.user)))}getConfiguration(){var e=this;return(0,O.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 Ye(ke.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var e=this;this.asyncQueue.enterRestrictedMode();const t=new Dr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((0,O.Z)(function*(){try{e.onlineComponents&&(yield e.onlineComponents.terminate()),e.offlineComponents&&(yield e.offlineComponents.terminate()),e.authCredentials.shutdown(),e.appCheckCredentials.shutdown(),t.resolve()}catch(i){const a=Au(i,"Failed to shutdown persistence");t.reject(a)}})),t.promise}}function s(n,e){return o.apply(this,arguments)}function o(){return o=(0,O.Z)(function*(n,e){n.asyncQueue.verifyOperationInProgress(),tt("FirestoreClient","Initializing OfflineComponentProvider");const t=yield n.getConfiguration();yield e.initialize(t);let i=t.initialUser;n.setCredentialChangeListener(function(){var a=(0,O.Z)(function*(c){i.isEqual(c)||(yield Ry(e.localStore,c),i=c)});return function(c){return a.apply(this,arguments)}}()),e.persistence.setDatabaseDeletedListener(()=>n.terminate()),n.offlineComponents=e}),o.apply(this,arguments)}function u(n,e){return l.apply(this,arguments)}function l(){return l=(0,O.Z)(function*(n,e){n.asyncQueue.verifyOperationInProgress();const t=yield d(n);tt("FirestoreClient","Initializing OnlineComponentProvider");const i=yield n.getConfiguration();yield e.initialize(t,i),n.setCredentialChangeListener(a=>Bw(e.remoteStore,a)),n.setAppCheckTokenChangeListener((a,c)=>Bw(e.remoteStore,c)),n.onlineComponents=e}),l.apply(this,arguments)}function d(n){return f.apply(this,arguments)}function f(){return f=(0,O.Z)(function*(n){return n.offlineComponents||(tt("FirestoreClient","Using default OfflineComponentProvider"),yield s(n,new H0)),n.offlineComponents}),f.apply(this,arguments)}function v(n){return D.apply(this,arguments)}function D(){return D=(0,O.Z)(function*(n){return n.onlineComponents||(tt("FirestoreClient","Using default OnlineComponentProvider"),yield u(n,new Fp)),n.onlineComponents}),D.apply(this,arguments)}function Ge(n){return it.apply(this,arguments)}function it(){return it=(0,O.Z)(function*(n){const e=yield v(n),t=e.eventManager;return t.onListen=pT.bind(null,e.syncEngine),t.onUnlisten=gT.bind(null,e.syncEngine),t}),it.apply(this,arguments)}class u_{constructor(){this.Bc=Promise.resolve(),this.Lc=[],this.Uc=!1,this.qc=[],this.Kc=null,this.Gc=!1,this.Qc=!1,this.jc=[],this.No=new Fy(this,"async_queue_retry"),this.Wc=()=>{const t=mp();t&&tt("AsyncQueue","Visibility state changed to "+t.visibilityState),this.No.Po()};const e=mp();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Wc)}get isShuttingDown(){return this.Uc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.zc(),this.Hc(e)}enterRestrictedMode(e){if(!this.Uc){this.Uc=!0,this.Qc=e||!1;const t=mp();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Wc)}}enqueue(e){if(this.zc(),this.Uc)return new Promise(()=>{});const t=new Dr;return this.Hc(()=>this.Uc&&this.Qc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Lc.push(e),this.Jc()))}Jc(){var e=this;return(0,O.Z)(function*(){if(0!==e.Lc.length){try{yield e.Lc[0](),e.Lc.shift(),e.No.reset()}catch(t){if(!Oa(t))throw t;tt("AsyncQueue","Operation failed with retryable error: "+t)}e.Lc.length>0&&e.No.Ro(()=>e.Jc())}})()}Hc(e){const t=this.Bc.then(()=>(this.Gc=!0,e().catch(i=>{throw this.Kc=i,this.Gc=!1,ii("INTERNAL UNHANDLED ERROR: ",function(c){let h=c.message||"";return c.stack&&(h=c.stack.includes(c.message)?c.stack:c.message+"\n"+c.stack),h}(i)),i}).then(i=>(this.Gc=!1,i))));return this.Bc=t,t}enqueueAfterDelay(e,t,i){this.zc(),this.jc.indexOf(e)>-1&&(t=0);const a=Ky.createAndSchedule(this,e,t,i,c=>this.Yc(c));return this.qc.push(a),a}zc(){this.Kc&&Rt()}verifyOperationInProgress(){}Xc(){var e=this;return(0,O.Z)(function*(){let t;do{t=e.Bc,yield t}while(t!==e.Bc)})()}Zc(e){for(const t of this.qc)if(t.timerId===e)return!0;return!1}ta(e){return this.Xc().then(()=>{this.qc.sort((t,i)=>t.targetTimeMs-i.targetTimeMs);for(const t of this.qc)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.Xc()})}ea(e){this.jc.push(e)}Yc(e){const t=this.qc.indexOf(e);this.qc.splice(t,1)}}function yh(n){return function(e,t){if("object"!=typeof e||null===e)return!1;const i=e;for(const a of["next","error","complete"])if(a in i&&"function"==typeof i[a])return!0;return!1}(n)}class pr extends mh{constructor(e,t,i,a){super(e,t,i,a),this.type="firestore",this._queue=new u_,this._persistenceKey=a?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||CT(this),this._firestoreClient.terminate()}}function l_(n,e){const t="object"==typeof n?n:(0,ee.Mq)(),i="string"==typeof n?n:e||"(default)",a=(0,ee.qX)(t,"firestore").getImmediate({identifier:i});if(!a._initialized){const c=(0,W.P0)("firestore");c&&function vT(n,e,t,i={}){var a;const c=(n=jn(n,mh))._getSettings();if("firestore.googleapis.com"!==c.host&&c.host!==e&&ta("Host has been set in both settings() and useEmulator(), emulator host will be used"),n._setSettings(Object.assign(Object.assign({},c),{host:`${e}:${t}`,ssl:!1})),i.mockUserToken){let h,g;if("string"==typeof i.mockUserToken)h=i.mockUserToken,g=Ni.MOCK_USER;else{h=(0,W.Sg)(i.mockUserToken,null===(a=n._app)||void 0===a?void 0:a.options.projectId);const T=i.mockUserToken.sub||i.mockUserToken.user_id;if(!T)throw new Ye(ke.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");g=new Ni(T)}n._authCredentials=new Rm(new bd(h,g))}}(a,...c)}return a}function Kr(n){return n._firestoreClient||CT(n),n._firestoreClient.verifyNotTerminated(),n._firestoreClient}function CT(n){var e;const t=n._freezeSettings(),i=(c=(null===(e=n._app)||void 0===e?void 0:e.options.appId)||"",new UD(n._databaseId,c,n._persistenceKey,(g=t).host,g.ssl,g.experimentalForceLongPolling,g.experimentalAutoDetectLongPolling,g.useFetchStreams));var c,g;n._firestoreClient=new r(n._authCredentials,n._appCheckCredentials,n._queue,i)}function iC(n,e){!function AT(n){if(n._initialized||n._terminated)throw new Ye(ke.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.")}(n=jn(n,pr));const t=Kr(n),i=n._freezeSettings(),a=new Fp;return function ST(n,e,t){const i=new Dr;return n.asyncQueue.enqueue((0,O.Z)(function*(){try{yield s(n,t),yield u(n,e),i.resolve()}catch(a){const c=a;if(!("FirebaseError"===(h=c).name?h.code===ke.FAILED_PRECONDITION||h.code===ke.UNIMPLEMENTED:!(typeof DOMException<"u"&&h instanceof DOMException)||22===h.code||20===h.code||11===h.code))throw c;ta("Error enabling offline persistence. Falling back to persistence disabled: "+c),i.reject(c)}var h})).then(()=>i.promise)}(t,a,new Yw(a,i.cacheSizeBytes,e?.forceOwnership))}class _h{constructor(e){this._byteString=e}static fromBase64String(e){try{return new _h(Li.fromBase64String(e))}catch(t){throw new Ye(ke.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(e){return new _h(Li.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}class jp{constructor(...e){for(let t=0;t90)throw new Ye(ke.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new Ye(ke.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 Wt(this._lat,e._lat)||Wt(this._long,e._long)}}const sC=/^__.*__$/;class oC{constructor(e,t,i){this.data=e,this.fieldMask=t,this.fieldTransforms=i}toMutation(e,t){return null!==this.fieldMask?new na(e,this.data,this.fieldMask,t,this.fieldTransforms):new Bd(e,this.data,t,this.fieldTransforms)}}function RT(n){switch(n){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Rt()}}class Z0{constructor(e,t,i,a,c,h){this.settings=e,this.databaseId=t,this.It=i,this.ignoreUndefinedProperties=a,void 0===c&&this.na(),this.fieldTransforms=c||[],this.fieldMask=h||[]}get path(){return this.settings.path}get sa(){return this.settings.sa}ia(e){return new Z0(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.It,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}ra(e){var t;const i=null===(t=this.path)||void 0===t?void 0:t.child(e),a=this.ia({path:i,oa:!1});return a.ua(e),a}ca(e){var t;const i=null===(t=this.path)||void 0===t?void 0:t.child(e),a=this.ia({path:i,oa:!1});return a.na(),a}aa(e){return this.ia({path:void 0,oa:!0})}ha(e){return X0(e,this.settings.methodName,this.settings.la||!1,this.path,this.settings.fa)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}na(){if(this.path)for(let e=0;eT.covers(re.field))}else T=null,x=h.fieldTransforms;return new oC(new gi(g),T,x)}function vh(n,e){if(FT(n=(0,W.m9)(n)))return rb("Unsupported field value:",e,n),LT(n,e);if(n instanceof MT)return function(t,i){if(!RT(i.sa))throw i.ha(`${t._methodName}() can only be used with update() and set()`);if(!i.path)throw i.ha(`${t._methodName}() is not currently supported inside arrays`);const a=t._toFieldTransform(i);a&&i.fieldTransforms.push(a)}(n,e),null;if(void 0===n&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),n instanceof Array){if(e.settings.oa&&4!==e.sa)throw e.ha("Nested arrays are not supported");return function(t,i){const a=[];let c=0;for(const h of t){let g=vh(h,i.aa(c));null==g&&(g={nullValue:"NULL_VALUE"}),a.push(g),c++}return{arrayValue:{values:a}}}(n,e)}return function(t,i){if(null===(t=(0,W.m9)(t)))return{nullValue:"NULL_VALUE"};if("number"==typeof t)return Xm(i.It,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){const a=Sr.fromDate(t);return{timestampValue:Gd(i.It,a)}}if(t instanceof Sr){const a=new Sr(t.seconds,1e3*Math.floor(t.nanoseconds/1e3));return{timestampValue:Gd(i.It,a)}}if(t instanceof eb)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof _h)return{bytesValue:_E(i.It,t._byteString)};if(t instanceof ai){const a=i.databaseId,c=t.firestore._databaseId;if(!c.isEqual(a))throw i.ha(`Document reference is for database ${c.projectId}/${c.database} but should be for database ${a.projectId}/${a.database}`);return{referenceValue:sy(t.firestore._databaseId||i.databaseId,t._key.path)}}throw i.ha(`Unsupported field value: ${Ul(t)}`)}(n,e)}function LT(n,e){const t={};return Ff(n)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):gu(n,(i,a)=>{const c=vh(a,e.ra(i));null!=c&&(t[i]=c)}),{mapValue:{fields:t}}}function FT(n){return!("object"!=typeof n||null===n||n instanceof Array||n instanceof Date||n instanceof Sr||n instanceof eb||n instanceof _h||n instanceof ai||n instanceof MT)}function rb(n,e,t){if(!FT(t)||"object"!=typeof(i=t)||null===i||Object.getPrototypeOf(i)!==Object.prototype&&null!==Object.getPrototypeOf(i)){const i=Ul(t);throw e.ha("an object"===i?n+" a custom object":n+" "+i)}var i}function ib(n,e,t){if((e=(0,W.m9)(e))instanceof jp)return e._internalPath;if("string"==typeof e)return Q0(n,e);throw X0("Field path arguments must be of type string or ",n,!1,void 0,t)}const dC=new RegExp("[~\\*/\\[\\]]");function Q0(n,e,t){if(e.search(dC)>=0)throw X0(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,n,!1,void 0,t);try{return new jp(...e.split("."))._internalPath}catch{throw X0(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,n,!1,void 0,t)}}function X0(n,e,t,i,a){const c=i&&!i.isEmpty(),h=void 0!==a;let g=`Function ${e}() called with invalid data`;t&&(g+=" (via `toFirestore()`)"),g+=". ";let T="";return(c||h)&&(T+=" (found",c&&(T+=` in field ${i}`),h&&(T+=` in document ${a}`),T+=")"),new Ye(ke.INVALID_ARGUMENT,g+n+T)}function UT(n,e){return n.some(t=>t.isEqual(e))}class sb{constructor(e,t,i,a,c){this._firestore=e,this._userDataWriter=t,this._key=i,this._document=a,this._converter=c}get id(){return this._key.path.lastSegment()}get ref(){return new ai(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new hC(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(J0("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class hC extends sb{data(){return super.data()}}function J0(n,e){return"string"==typeof e?Q0(n,e):e instanceof jp?e._internalPath:e._delegate._internalPath}class Eh{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Gp extends sb{constructor(e,t,i,a,c,h){super(e,t,i,a,h),this._firestore=e,this._firestoreImpl=e,this.metadata=c}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new eI(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 i=this._document.data.field(J0("DocumentSnapshot.get",e));if(null!==i)return this._userDataWriter.convertValue(i,t.serverTimestamps)}}}class eI extends Gp{data(e={}){return super.data(e)}}class Hp{constructor(e,t,i,a){this._firestore=e,this._userDataWriter=t,this._snapshot=a,this.metadata=new Eh(a.hasPendingWrites,a.fromCache),this.query=i}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(i=>{e.call(t,new eI(this._firestore,this._userDataWriter,i.key,i,new Eh(this._snapshot.mutatedKeys.has(i.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new Ye(ke.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(i,a){if(i._snapshot.oldDocs.isEmpty()){let c=0;return i._snapshot.docChanges.map(h=>({type:"added",doc:new eI(i._firestore,i._userDataWriter,h.doc.key,h.doc,new Eh(i._snapshot.mutatedKeys.has(h.doc.key),i._snapshot.fromCache),i.query.converter),oldIndex:-1,newIndex:c++}))}{let c=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(h=>a||3!==h.type).map(h=>{const g=new eI(i._firestore,i._userDataWriter,h.doc.key,h.doc,new Eh(i._snapshot.mutatedKeys.has(h.doc.key),i._snapshot.fromCache),i.query.converter);let T=-1,x=-1;return 0!==h.type&&(T=c.indexOf(h.doc.key),c=c.delete(h.doc.key)),1!==h.type&&(c=c.add(h.doc),x=c.indexOf(h.doc.key)),{type:mC(h.type),doc:g,oldIndex:T,newIndex:x}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function mC(n){switch(n){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Rt()}}class Bl extends class gC{convertValue(e,t="none"){switch(lc(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Fr(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(cc(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 Rt()}}convertObject(e,t){const i={};return gu(e.fields,(a,c)=>{i[a]=this.convertValue(c,t)}),i}convertGeoPoint(e){return new eb(Fr(e.latitude),Fr(e.longitude))}convertArray(e,t){return(e.values||[]).map(i=>this.convertValue(i,t))}convertServerTimestamp(e,t){switch(t){case"previous":const i=Fm(e);return null==i?null:this.convertValue(i,t);case"estimate":return this.convertTimestamp(Rd(e));default:return null}}convertTimestamp(e){const t=mu(e);return new Sr(t.seconds,t.nanos)}convertDocumentKey(e,t){const i=Fn.fromString(e);$t(ME(i));const a=new yu(i.get(1),i.get(3)),c=new pt(i.popFirst(5));return a.isEqual(t)||ii(`Document ${c} contains a document reference within a different database (${a.projectId}/${a.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),c}}{constructor(e){super(),this.firestore=e}convertBytes(e){return new _h(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new ai(this.firestore,null,t)}}function yC(n,e,t){n=jn(n,ai);const i=jn(n.firestore,pr),a=function ob(n,e,t){let i;return i=n?t&&(t.merge||t.mergeFields)?n.toFirestore(e,t):n.toFirestore(e):e,i}(n.converter,e,t);return function h_(n,e){return function(t,i){const a=new Dr;return t.asyncQueue.enqueueAndForget((0,O.Z)(function*(){return function O0(n,e,t){return Sp.apply(this,arguments)}(yield function fe(n){return v(n).then(e=>e.syncEngine)}(t),i,a)})),a.promise}(Kr(n),e)}(i,[tb($p(i),"setDoc",n._key,a,null!==n.converter,t).toMutation(n._key,Ar.none())])}function _C(n,...e){var t,i,a;n=(0,W.m9)(n);let c={includeMetadataChanges:!1},h=0;"object"!=typeof e[h]||yh(e[h])||(c=e[h],h++);const g={includeMetadataChanges:c.includeMetadataChanges};if(yh(e[h])){const re=e[h];e[h]=null===(t=re.next)||void 0===t?void 0:t.bind(re),e[h+1]=null===(i=re.error)||void 0===i?void 0:i.bind(re),e[h+2]=null===(a=re.complete)||void 0===a?void 0:a.bind(re)}let T,x,j;if(n instanceof ai)x=jn(n.firestore,pr),j=ml(n._key.path),T={next:re=>{e[h]&&e[h](function ab(n,e,t){const i=t.docs.get(e._key),a=new Bl(n);return new Gp(n,a,e._key,i,new Eh(t.hasPendingWrites,t.fromCache),e.converter)}(x,n,re))},error:e[h+1],complete:e[h+2]};else{const re=jn(n,ns);x=jn(re.firestore,pr),j=re._query;const Te=new Bl(x);T={next:Ve=>{e[h]&&e[h](new Hp(x,Te,re,Ve))},error:e[h+1],complete:e[h+2]},function BT(n){if("L"===n.limitType&&0===n.explicitOrderBy.length)throw new Ye(ke.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(n._query)}return function(re,Te,Ve,qe){const It=new Vp(qe),At=new aa(Te,It,Ve);return re.asyncQueue.enqueueAndForget((0,O.Z)(function*(){return function qy(n,e){return Dp.apply(this,arguments)}(yield Ge(re),At)})),()=>{It.bc(),re.asyncQueue.enqueueAndForget((0,O.Z)(function*(){return function wp(n,e){return Yy.apply(this,arguments)}(yield Ge(re),At)}))}}(Kr(x),j,g,T)}!function(n,e=!0){il=ee.Jn,(0,ee.Xd)(new G.wA("firestore",(t,{instanceIdentifier:i,options:a})=>{const c=t.getProvider("app").getImmediate(),h=new pr(new sl(t.getProvider("auth-internal")),new ul(t.getProvider("app-check-internal")),function(g,T){if(!Object.prototype.hasOwnProperty.apply(g.options,["projectId"]))throw new Ye(ke.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new yu(g.options.projectId,T)}(c,i),c);return a=Object.assign({useFetchStreams:e},a),h._setSettings(a),h},"PUBLIC").setMultipleInstances(!0)),(0,ee.KN)(Uv,"3.7.1",n),(0,ee.KN)(Uv,"3.7.1","esm2017")}();class nI{constructor(e){return e}}const qT="firestore",ub=new M.OlP("angularfire2.firestore-instances");function bC(n){return(e,t)=>{const i=e.runOutsideAngular(()=>n(t));return new nI(i)}}const TC={provide:class DC{constructor(){return(0,m.vb)(qT)}},deps:[[new M.FiY,ub]]},CC={provide:nI,useFactory:function wC(n,e){const t=(0,m.JM)(qT,n,e);return t&&new nI(t)},deps:[[new M.FiY,ub],F.Ot]};let SC=(()=>{class n{constructor(){(0,z.KN)("angularfire",m.q4.full,"fst")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=M.oAB({type:n}),n.\u0275inj=M.cJS({providers:[CC,TC]}),n})();function AC(n,...e){return{ngModule:SC,providers:[{provide:ub,useFactory:bC(n),multi:!0,deps:[M.R0b,M.zs3,m.HU,F.z6,[new M.FiY,og],[new M.FiY,Gh],...e]}]}}const MC=(0,m.u3)(Qw,!0),xC=(0,m.u3)(iC,!0),RC=(0,m.u3)(l_,!0),OC=(0,m.u3)(_C,!0),PC=(0,m.u3)(yC,!0)},6351:(le,k,E)=>{E.d(k,{q4:()=>p,HU:()=>bs,vb:()=>oo,JM:()=>ji,u3:()=>ba});var m=E(4650),M=E(5867),F=E(5861),z=E(9681),O=E(2090),W=E(4859),ee=E(1877),Q=E(8766);const K="@firebase/installations",G="0.5.15",te=`w:${G}`,ye="FIS_v2",We=new O.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 ot(b){return b instanceof O.ZR&&b.code.includes("request-failed")}function Pe({projectId:b}){return`https://firebaseinstallations.googleapis.com/v1/projects/${b}/installations`}function Se(b){return{token:b.token,requestStatus:2,expiresIn:ne(b.expiresIn),creationTime:Date.now()}}function Le(b,A){return nt.apply(this,arguments)}function nt(){return(nt=(0,F.Z)(function*(b,A){const ie=(yield A.json()).error;return We.create("request-failed",{requestName:b,serverCode:ie.code,serverMessage:ie.message,serverStatus:ie.status})})).apply(this,arguments)}function _t({apiKey:b}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":b})}function Be(b,{refreshToken:A}){const L=_t(b);return L.append("Authorization",function Ae(b){return`${ye} ${b}`}(A)),L}function Ke(b){return pe.apply(this,arguments)}function pe(){return(pe=(0,F.Z)(function*(b){const A=yield b();return A.status>=500&&A.status<600?b():A})).apply(this,arguments)}function ne(b){return Number(b.replace("s","000"))}function _e(b,A){return Ze.apply(this,arguments)}function Ze(){return(Ze=(0,F.Z)(function*({appConfig:b,heartbeatServiceProvider:A},{fid:L}){const ie=Pe(b),Ie=_t(b),Oe=A.getImmediate({optional:!0});if(Oe){const ln=yield Oe.getHeartbeatsHeader();ln&&Ie.append("x-firebase-client",ln)}const ht={method:"POST",headers:Ie,body:JSON.stringify({fid:L,authVersion:ye,appId:b.appId,sdkVersion:te})},jt=yield Ke(()=>fetch(ie,ht));if(jt.ok){const ln=yield jt.json();return{fid:ln.fid||L,registrationStatus:2,refreshToken:ln.refreshToken,authToken:Se(ln.authToken)}}throw yield Le("Create Installation",jt)})).apply(this,arguments)}function Xe(b){return new Promise(A=>{setTimeout(A,b)})}const rn=/^[cdef][\w-]{21}$/;function at(){try{const b=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(b),b[0]=112+b[0]%16;const L=function dn(b){return function wt(b){return btoa(String.fromCharCode(...b)).replace(/\+/g,"-").replace(/\//g,"_")}(b).substr(0,22)}(b);return rn.test(L)?L:""}catch{return""}}function Sn(b){return`${b.appName}!${b.appId}`}const qt=new Map;function Qt(b,A){const L=Sn(b);Br(L,A),function yr(b,A){const L=function pn(){return!hn&&"BroadcastChannel"in self&&(hn=new BroadcastChannel("[Firebase] FID Change"),hn.onmessage=b=>{Br(b.data.key,b.data.fid)}),hn}();L&&L.postMessage({key:b,fid:A}),function rr(){0===qt.size&&hn&&(hn.close(),hn=null)}()}(L,A)}function Br(b,A){const L=qt.get(b);if(L)for(const ie of L)ie(A)}let hn=null;const xn="firebase-installations-store";let qr=null;function gn(){return qr||(qr=(0,Q.X3)("firebase-installations-database",1,{upgrade:(b,A)=>{0===A&&b.createObjectStore(xn)}})),qr}function rt(b,A){return Pn.apply(this,arguments)}function Pn(){return(Pn=(0,F.Z)(function*(b,A){const L=Sn(b),Ie=(yield gn()).transaction(xn,"readwrite"),Oe=Ie.objectStore(xn),Je=yield Oe.get(L);return yield Oe.put(A,L),yield Ie.done,(!Je||Je.fid!==A.fid)&&Qt(b,A.fid),A})).apply(this,arguments)}function Ii(b){return qn.apply(this,arguments)}function qn(){return(qn=(0,F.Z)(function*(b){const A=Sn(b),ie=(yield gn()).transaction(xn,"readwrite");yield ie.objectStore(xn).delete(A),yield ie.done})).apply(this,arguments)}function dr(b,A){return Yr.apply(this,arguments)}function Yr(){return(Yr=(0,F.Z)(function*(b,A){const L=Sn(b),Ie=(yield gn()).transaction(xn,"readwrite"),Oe=Ie.objectStore(xn),Je=yield Oe.get(L),ht=A(Je);return void 0===ht?yield Oe.delete(L):yield Oe.put(ht,L),yield Ie.done,ht&&(!Je||Je.fid!==ht.fid)&&Qt(b,ht.fid),ht})).apply(this,arguments)}function Un(b){return En.apply(this,arguments)}function En(){return(En=(0,F.Z)(function*(b){let A;const L=yield dr(b.appConfig,ie=>{const Ie=wn(ie),Oe=vt(b,Ie);return A=Oe.registrationPromise,Oe.installationEntry});return""===L.fid?{installationEntry:yield A}:{installationEntry:L,registrationPromise:A}})).apply(this,arguments)}function wn(b){return bt(b||{fid:at(),registrationStatus:0})}function vt(b,A){if(0===A.registrationStatus){if(!navigator.onLine)return{installationEntry:A,registrationPromise:Promise.reject(We.create("app-offline"))};const L={fid:A.fid,registrationStatus:1,registrationTime:Date.now()},ie=function St(b,A){return tn.apply(this,arguments)}(b,L);return{installationEntry:L,registrationPromise:ie}}return 1===A.registrationStatus?{installationEntry:A,registrationPromise:Jn(b)}:{installationEntry:A}}function tn(){return(tn=(0,F.Z)(function*(b,A){try{const L=yield _e(b,A);return rt(b.appConfig,L)}catch(L){throw ot(L)&&409===L.customData.serverCode?yield Ii(b.appConfig):yield rt(b.appConfig,{fid:A.fid,registrationStatus:0}),L}})).apply(this,arguments)}function Jn(b){return mt.apply(this,arguments)}function mt(){return(mt=(0,F.Z)(function*(b){let A=yield er(b.appConfig);for(;1===A.registrationStatus;)yield Xe(100),A=yield er(b.appConfig);if(0===A.registrationStatus){const{installationEntry:L,registrationPromise:ie}=yield Un(b);return ie||L}return A})).apply(this,arguments)}function er(b){return dr(b,A=>{if(!A)throw We.create("installation-not-found");return bt(A)})}function bt(b){return function sr(b){return 1===b.registrationStatus&&b.registrationTime+1e4fetch(ie,ht));if(jt.ok)return Se(yield jt.json());throw yield Le("Generate Auth Token",jt)})).apply(this,arguments)}function Xt(b,{fid:A}){return`${Pe(b)}/${A}/authTokens:generate`}function bn(b){return Gn.apply(this,arguments)}function Gn(){return(Gn=(0,F.Z)(function*(b,A=!1){let L;const ie=yield dr(b.appConfig,Oe=>{if(!Vt(Oe))throw We.create("not-registered");const Je=Oe.authToken;if(!A&&de(Je))return Oe;if(1===Je.requestStatus)return L=lt(b,A),Oe;{if(!navigator.onLine)throw We.create("app-offline");const ht=ge(Oe);return L=Nt(b,ht),ht}});return L?yield L:ie.authToken})).apply(this,arguments)}function lt(b,A){return He.apply(this,arguments)}function He(){return(He=(0,F.Z)(function*(b,A){let L=yield yt(b.appConfig);for(;1===L.authToken.requestStatus;)yield Xe(100),L=yield yt(b.appConfig);const ie=L.authToken;return 0===ie.requestStatus?bn(b,A):ie})).apply(this,arguments)}function yt(b){return dr(b,A=>{if(!Vt(A))throw We.create("not-registered");return function ze(b){return 1===b.requestStatus&&b.requestTime+1e4{const A=b.getProvider("app").getImmediate(),L=function Zt(b){if(!b||!b.options)throw or("App Configuration");if(!b.name)throw or("App Name");const A=["projectId","apiKey","appId"];for(const L of A)if(!b.options[L])throw or(L);return{appName:b.name,projectId:b.options.projectId,apiKey:b.options.apiKey,appId:b.options.appId}}(A);return{app:A,appConfig:L,heartbeatServiceProvider:(0,z.qX)(A,"heartbeat"),_delete:()=>Promise.resolve()}},Qr=b=>{const A=b.getProvider("app").getImmediate(),L=(0,z.qX)(A,ui).getImmediate();return{getId:()=>function De(b){return st.apply(this,arguments)}(L),getToken:Ie=>function Dt(b){return Jt.apply(this,arguments)}(L,Ie)}};(function ps(){(0,z.Xd)(new W.wA(ui,Zr,"PUBLIC")),(0,z.Xd)(new W.wA("installations-internal",Qr,"PRIVATE"))})(),(0,z.KN)(K,G),(0,z.KN)(K,G,"esm2017");const Nn="@firebase/remote-config",tr=new O.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 Ps{constructor(A,L,ie,Ie){this.client=A,this.storage=L,this.storageCache=ie,this.logger=Ie}isCachedDataFresh(A,L){if(!L)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;const ie=Date.now()-L,Ie=ie<=A;return this.logger.debug(`Config fetch cache check. Cache age millis: ${ie}. Cache max age millis (minimumFetchIntervalMillis setting): ${A}. Is cache hit: ${Ie}.`),Ie}fetch(A){var L=this;return(0,F.Z)(function*(){const[ie,Ie]=yield Promise.all([L.storage.getLastSuccessfulFetchTimestampMillis(),L.storage.getLastSuccessfulFetchResponse()]);if(Ie&&L.isCachedDataFresh(A.cacheMaxAgeMillis,ie))return Ie;A.eTag=Ie&&Ie.eTag;const Oe=yield L.client.fetch(A),Je=[L.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())];return 200===Oe.status&&Je.push(L.storage.setLastSuccessfulFetchResponse(Oe)),yield Promise.all(Je),Oe})()}}function oe(b=navigator){return b.languages&&b.languages[0]||b.language}class N{constructor(A,L,ie,Ie,Oe,Je){this.firebaseInstallations=A,this.sdkVersion=L,this.namespace=ie,this.projectId=Ie,this.apiKey=Oe,this.appId=Je}fetch(A){var L=this;return(0,F.Z)(function*(){var ie,Ie,Oe;const[Je,ht]=yield Promise.all([L.firebaseInstallations.getId(),L.firebaseInstallations.getToken()]),ln=`${window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com"}/v1/projects/${L.projectId}/namespaces/${L.namespace}:fetch?key=${L.apiKey}`,on={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":A.eTag||"*"},Lt={sdk_version:L.sdkVersion,app_instance_id:Je,app_instance_id_token:ht,app_id:L.appId,language_code:oe()},ri={method:"POST",headers:on,body:JSON.stringify(Lt)},Jr=fetch(ln,ri),Yl=new Promise((Ca,Ks)=>{A.signal.addEventListener(()=>{const Sa=new Error("The operation was aborted.");Sa.name="AbortError",Ks(Sa)})});let Yo;try{yield Promise.race([Jr,Yl]),Yo=yield Jr}catch(Ca){let Ks="fetch-client-network";throw"AbortError"===(null===(ie=Ca)||void 0===ie?void 0:ie.name)&&(Ks="fetch-timeout"),tr.create(Ks,{originalErrorMessage:null===(Ie=Ca)||void 0===Ie?void 0:Ie.message})}let Ws=Yo.status;const ru=Yo.headers.get("ETag")||void 0;let Yu,Ta;if(200===Yo.status){let Ca;try{Ca=yield Yo.json()}catch(Ks){throw tr.create("fetch-client-parse",{originalErrorMessage:null===(Oe=Ks)||void 0===Oe?void 0:Oe.message})}Yu=Ca.entries,Ta=Ca.state}if("INSTANCE_STATE_UNSPECIFIED"===Ta?Ws=500:"NO_CHANGE"===Ta?Ws=304:("NO_TEMPLATE"===Ta||"EMPTY_CONFIG"===Ta)&&(Yu={}),304!==Ws&&200!==Ws)throw tr.create("fetch-status",{httpStatus:Ws});return{status:Ws,eTag:ru,config:Yu}})()}}class he{constructor(A,L){this.client=A,this.storage=L}fetch(A){var L=this;return(0,F.Z)(function*(){const ie=(yield L.storage.getThrottleMetadata())||{backoffCount:0,throttleEndTimeMillis:Date.now()};return L.attemptFetch(A,ie)})()}attemptFetch(A,{throttleEndTimeMillis:L,backoffCount:ie}){var Ie=this;return(0,F.Z)(function*(){yield function $(b,A){return new Promise((L,ie)=>{const Ie=Math.max(A-Date.now(),0),Oe=setTimeout(L,Ie);b.addEventListener(()=>{clearTimeout(Oe),ie(tr.create("fetch-throttle",{throttleEndTimeMillis:A}))})})}(A.signal,L);try{const Oe=yield Ie.client.fetch(A);return yield Ie.storage.deleteThrottleMetadata(),Oe}catch(Oe){if(!function q(b){if(!(b instanceof O.ZR&&b.customData))return!1;const A=Number(b.customData.httpStatus);return 429===A||500===A||503===A||504===A}(Oe))throw Oe;const Je={throttleEndTimeMillis:Date.now()+(0,O.$s)(ie),backoffCount:ie+1};return yield Ie.storage.setThrottleMetadata(Je),Ie.attemptFetch(A,Je)}})()}}class gt{constructor(A,L,ie,Ie,Oe){this.app=A,this._client=L,this._storageCache=ie,this._storage=Ie,this._logger=Oe,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 Bt(b,A){var L;const ie=b.target.error||void 0;return tr.create(A,{originalErrorMessage:ie&&(null===(L=ie)||void 0===L?void 0:L.message)})}const Mt="app_namespace_store";class Ui{constructor(A,L,ie,Ie=function nr(){return new Promise((b,A)=>{var L;try{const ie=indexedDB.open("firebase_remote_config",1);ie.onerror=Ie=>{A(Bt(Ie,"storage-open"))},ie.onsuccess=Ie=>{b(Ie.target.result)},ie.onupgradeneeded=Ie=>{0===Ie.oldVersion&&Ie.target.result.createObjectStore(Mt,{keyPath:"compositeKey"})}}catch(ie){A(tr.create("storage-open",{originalErrorMessage:null===(L=ie)||void 0===L?void 0:L.message}))}})}()){this.appId=A,this.appName=L,this.namespace=ie,this.openDbPromise=Ie}getLastFetchStatus(){return this.get("last_fetch_status")}setLastFetchStatus(A){return this.set("last_fetch_status",A)}getLastSuccessfulFetchTimestampMillis(){return this.get("last_successful_fetch_timestamp_millis")}setLastSuccessfulFetchTimestampMillis(A){return this.set("last_successful_fetch_timestamp_millis",A)}getLastSuccessfulFetchResponse(){return this.get("last_successful_fetch_response")}setLastSuccessfulFetchResponse(A){return this.set("last_successful_fetch_response",A)}getActiveConfig(){return this.get("active_config")}setActiveConfig(A){return this.set("active_config",A)}getActiveConfigEtag(){return this.get("active_config_etag")}setActiveConfigEtag(A){return this.set("active_config_etag",A)}getThrottleMetadata(){return this.get("throttle_metadata")}setThrottleMetadata(A){return this.set("throttle_metadata",A)}deleteThrottleMetadata(){return this.delete("throttle_metadata")}get(A){var L=this;return(0,F.Z)(function*(){const ie=yield L.openDbPromise;return new Promise((Ie,Oe)=>{var Je;const jt=ie.transaction([Mt],"readonly").objectStore(Mt),ln=L.createCompositeKey(A);try{const on=jt.get(ln);on.onerror=Lt=>{Oe(Bt(Lt,"storage-get"))},on.onsuccess=Lt=>{const ri=Lt.target.result;Ie(ri?ri.value:void 0)}}catch(on){Oe(tr.create("storage-get",{originalErrorMessage:null===(Je=on)||void 0===Je?void 0:Je.message}))}})})()}set(A,L){var ie=this;return(0,F.Z)(function*(){const Ie=yield ie.openDbPromise;return new Promise((Oe,Je)=>{var ht;const ln=Ie.transaction([Mt],"readwrite").objectStore(Mt),on=ie.createCompositeKey(A);try{const Lt=ln.put({compositeKey:on,value:L});Lt.onerror=ri=>{Je(Bt(ri,"storage-set"))},Lt.onsuccess=()=>{Oe()}}catch(Lt){Je(tr.create("storage-set",{originalErrorMessage:null===(ht=Lt)||void 0===ht?void 0:ht.message}))}})})()}delete(A){var L=this;return(0,F.Z)(function*(){const ie=yield L.openDbPromise;return new Promise((Ie,Oe)=>{var Je;const jt=ie.transaction([Mt],"readwrite").objectStore(Mt),ln=L.createCompositeKey(A);try{const on=jt.delete(ln);on.onerror=Lt=>{Oe(Bt(Lt,"storage-delete"))},on.onsuccess=()=>{Ie()}}catch(on){Oe(tr.create("storage-delete",{originalErrorMessage:null===(Je=on)||void 0===Je?void 0:Je.message}))}})})()}createCompositeKey(A){return[this.appId,this.appName,this.namespace,A].join()}}class Rn{constructor(A){this.storage=A}getLastFetchStatus(){return this.lastFetchStatus}getLastSuccessfulFetchTimestampMillis(){return this.lastSuccessfulFetchTimestampMillis}getActiveConfig(){return this.activeConfig}loadFromStorage(){var A=this;return(0,F.Z)(function*(){const L=A.storage.getLastFetchStatus(),ie=A.storage.getLastSuccessfulFetchTimestampMillis(),Ie=A.storage.getActiveConfig(),Oe=yield L;Oe&&(A.lastFetchStatus=Oe);const Je=yield ie;Je&&(A.lastSuccessfulFetchTimestampMillis=Je);const ht=yield Ie;ht&&(A.activeConfig=ht)})()}setLastFetchStatus(A){return this.lastFetchStatus=A,this.storage.setLastFetchStatus(A)}setLastSuccessfulFetchTimestampMillis(A){return this.lastSuccessfulFetchTimestampMillis=A,this.storage.setLastSuccessfulFetchTimestampMillis(A)}setActiveConfig(A){return this.activeConfig=A,this.storage.setActiveConfig(A)}}function Ci(){return ko.apply(this,arguments)}function ko(){return(ko=(0,F.Z)(function*(){if(!(0,O.hl)())return!1;try{return yield(0,O.eu)()}catch{return!1}})).apply(this,arguments)}!function Pr(){(0,z.Xd)(new W.wA("remote-config",function b(A,{instanceIdentifier:L}){const ie=A.getProvider("app").getImmediate(),Ie=A.getProvider("installations-internal").getImmediate();if(typeof window>"u")throw tr.create("registration-window");if(!(0,O.hl)())throw tr.create("indexed-db-unavailable");const{projectId:Oe,apiKey:Je,appId:ht}=ie.options;if(!Oe)throw tr.create("registration-project-id");if(!Je)throw tr.create("registration-api-key");if(!ht)throw tr.create("registration-app-id");const jt=new Ui(ht,ie.name,L=L||"firebase"),ln=new Rn(jt),on=new ee.Yd(Nn);on.logLevel=ee.in.ERROR;const Lt=new N(Ie,z.Jn,L,Oe,Je,ht),ri=new he(Lt,jt),Jr=new Ps(ri,jt,ln,on),Yl=new gt(ie,Jr,ln,jt,on);return function $n(b){const A=(0,O.m9)(b);A._initializePromise||(A._initializePromise=A._storageCache.loadFromStorage().then(()=>{A._isInitializationComplete=!0}))}(Yl),Yl},"PUBLIC").setMultipleInstances(!0)),(0,z.KN)(Nn,"0.3.14"),(0,z.KN)(Nn,"0.3.14","esm2017")}();const is="/firebase-messaging-sw.js",Xs="/firebase-cloud-messaging-push-scope",po="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",ti="google.c.a.c_id",la="google.c.a.c_l",go="google.c.a.ts",ja="google.c.a.e";var ss=(()=>{return(b=ss||(ss={})).PUSH_RECEIVED="push-received",b.NOTIFICATION_CLICKED="notification-clicked",ss;var b})();function Qi(b){const A=new Uint8Array(b);return btoa(String.fromCharCode(...A)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Nr(b){const L=(b+"=".repeat((4-b.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),ie=atob(L),Ie=new Uint8Array(ie.length);for(let Oe=0;OeOe.name).includes(mo))return null;let A=null;return(yield(0,Q.X3)(mo,5,{upgrade:(ie=(0,F.Z)(function*(Ie,Oe,Je,ht){var jt;if(Oe<2||!Ie.objectStoreNames.contains(yo))return;const ln=ht.objectStore(yo),on=yield ln.index("fcmSenderId").get(b);if(yield ln.clear(),on)if(2===Oe){const Lt=on;if(!Lt.auth||!Lt.p256dh||!Lt.endpoint)return;A={token:Lt.fcmToken,createTime:null!==(jt=Lt.createTime)&&void 0!==jt?jt:Date.now(),subscriptionOptions:{auth:Lt.auth,p256dh:Lt.p256dh,endpoint:Lt.endpoint,swScope:Lt.swScope,vapidKey:"string"==typeof Lt.vapidKey?Lt.vapidKey:Qi(Lt.vapidKey)}}}else if(3===Oe){const Lt=on;A={token:Lt.fcmToken,createTime:Lt.createTime,subscriptionOptions:{auth:Qi(Lt.auth),p256dh:Qi(Lt.p256dh),endpoint:Lt.endpoint,swScope:Lt.swScope,vapidKey:Qi(Lt.vapidKey)}}}else if(4===Oe){const Lt=on;A={token:Lt.fcmToken,createTime:Lt.createTime,subscriptionOptions:{auth:Qi(Lt.auth),p256dh:Qi(Lt.p256dh),endpoint:Lt.endpoint,swScope:Lt.swScope,vapidKey:Qi(Lt.vapidKey)}}}}),function(Oe,Je,ht,jt){return ie.apply(this,arguments)})})).close(),yield(0,Q.Lj)(mo),yield(0,Q.Lj)("fcm_vapid_details_db"),yield(0,Q.Lj)("undefined"),On(A)?A:null;var ie}),ha.apply(this,arguments)}function On(b){if(!b||!b.subscriptionOptions)return!1;const{subscriptionOptions:A}=b;return"number"==typeof b.createTime&&b.createTime>0&&"string"==typeof b.token&&b.token.length>0&&"string"==typeof A.auth&&A.auth.length>0&&"string"==typeof A.p256dh&&A.p256dh.length>0&&"string"==typeof A.endpoint&&A.endpoint.length>0&&"string"==typeof A.swScope&&A.swScope.length>0&&"string"==typeof A.vapidKey&&A.vapidKey.length>0}const Si="firebase-messaging-store";let $r=null;function $a(){return $r||($r=(0,Q.X3)("firebase-messaging-database",1,{upgrade:(b,A)=>{0===A&&b.createObjectStore(Si)}})),$r}function Fo(b){return ms.apply(this,arguments)}function ms(){return(ms=(0,F.Z)(function*(b){const A=ar(b),ie=yield(yield $a()).transaction(Si).objectStore(Si).get(A);if(ie)return ie;{const Ie=yield da(b.appConfig.senderId);if(Ie)return yield Cn(b,Ie),Ie}})).apply(this,arguments)}function Cn(b,A){return Uo.apply(this,arguments)}function Uo(){return(Uo=(0,F.Z)(function*(b,A){const L=ar(b),Ie=(yield $a()).transaction(Si,"readwrite");return yield Ie.objectStore(Si).put(A,L),yield Ie.done,A})).apply(this,arguments)}function ys(b){return ks.apply(this,arguments)}function ks(){return(ks=(0,F.Z)(function*(b){const A=ar(b),ie=(yield $a()).transaction(Si,"readwrite");yield ie.objectStore(Si).delete(A),yield ie.done})).apply(this,arguments)}function ar({appConfig:b}){return b.appId}const Zn=new O.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 Ht(b,A){return _o.apply(this,arguments)}function _o(){return(_o=(0,F.Z)(function*(b,A){var L;const ie=yield os(b),Ie=Qe(A),Oe={method:"POST",headers:ie,body:JSON.stringify(Ie)};let Je;try{Je=yield(yield fetch(Ai(b.appConfig),Oe)).json()}catch(ht){throw Zn.create("token-subscribe-failed",{errorInfo:null===(L=ht)||void 0===L?void 0:L.toString()})}if(Je.error)throw Zn.create("token-subscribe-failed",{errorInfo:Je.error.message});if(!Je.token)throw Zn.create("token-subscribe-no-token");return Je.token})).apply(this,arguments)}function Ga(b,A){return _s.apply(this,arguments)}function _s(){return(_s=(0,F.Z)(function*(b,A){var L;const ie=yield os(b),Ie=Qe(A.subscriptionOptions),Oe={method:"PATCH",headers:ie,body:JSON.stringify(Ie)};let Je;try{Je=yield(yield fetch(`${Ai(b.appConfig)}/${A.token}`,Oe)).json()}catch(ht){throw Zn.create("token-update-failed",{errorInfo:null===(L=ht)||void 0===L?void 0:L.toString()})}if(Je.error)throw Zn.create("token-update-failed",{errorInfo:Je.error.message});if(!Je.token)throw Zn.create("token-update-no-token");return Je.token})).apply(this,arguments)}function Ha(b,A){return vo.apply(this,arguments)}function vo(){return(vo=(0,F.Z)(function*(b,A){var L;const Ie={method:"DELETE",headers:yield os(b)};try{const Je=yield(yield fetch(`${Ai(b.appConfig)}/${A}`,Ie)).json();if(Je.error)throw Zn.create("token-unsubscribe-failed",{errorInfo:Je.error.message})}catch(Oe){throw Zn.create("token-unsubscribe-failed",{errorInfo:null===(L=Oe)||void 0===L?void 0:L.toString()})}})).apply(this,arguments)}function Ai({projectId:b}){return`https://fcmregistrations.googleapis.com/v1/projects/${b}/registrations`}function os(b){return fa.apply(this,arguments)}function fa(){return(fa=(0,F.Z)(function*({appConfig:b,installations:A}){const L=yield A.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":b.apiKey,"x-goog-firebase-installations-auth":`FIS ${L}`})})).apply(this,arguments)}function Qe({p256dh:b,auth:A,endpoint:L,vapidKey:ie}){const Ie={web:{endpoint:L,auth:A,p256dh:b}};return ie!==po&&(Ie.web.applicationPubKey=ie),Ie}const fn=6048e5;function Ls(b){return Js.apply(this,arguments)}function Js(){return(Js=(0,F.Z)(function*(b){const A=yield Ac(b.swRegistration,b.vapidKey),L={vapidKey:b.vapidKey,swScope:b.swRegistration.scope,endpoint:A.endpoint,auth:Qi(A.getKey("auth")),p256dh:Qi(A.getKey("p256dh"))},ie=yield Fo(b.firebaseDependencies);if(ie){if(ga(ie.subscriptionOptions,L))return Date.now()>=ie.createTime+fn?pa(b,{token:ie.token,createTime:Date.now(),subscriptionOptions:L}):ie.token;try{yield Ha(b.firebaseDependencies,ie.token)}catch(Ie){console.warn(Ie)}return za(b.firebaseDependencies,L)}return za(b.firebaseDependencies,L)})).apply(this,arguments)}function hr(b){return Fs.apply(this,arguments)}function Fs(){return(Fs=(0,F.Z)(function*(b){const A=yield Fo(b.firebaseDependencies);A&&(yield Ha(b.firebaseDependencies,A.token),yield ys(b.firebaseDependencies));const L=yield b.swRegistration.pushManager.getSubscription();return!L||L.unsubscribe()})).apply(this,arguments)}function pa(b,A){return ni.apply(this,arguments)}function ni(){return(ni=(0,F.Z)(function*(b,A){try{const L=yield Ga(b.firebaseDependencies,A),ie=Object.assign(Object.assign({},A),{token:L,createTime:Date.now()});return yield Cn(b.firebaseDependencies,ie),L}catch(L){throw yield hr(b),L}})).apply(this,arguments)}function za(b,A){return Eo.apply(this,arguments)}function Eo(){return(Eo=(0,F.Z)(function*(b,A){const ie={token:yield Ht(b,A),createTime:Date.now(),subscriptionOptions:A};return yield Cn(b,ie),ie.token})).apply(this,arguments)}function Ac(b,A){return Us.apply(this,arguments)}function Us(){return(Us=(0,F.Z)(function*(b,A){return(yield b.pushManager.getSubscription())||b.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Nr(A)})})).apply(this,arguments)}function ga(b,A){return A.vapidKey===b.vapidKey&&A.endpoint===b.endpoint&&A.auth===b.auth&&A.p256dh===b.p256dh}function Mi(b){const A={from:b.from,collapseKey:b.collapse_key,messageId:b.fcmMessageId};return function br(b,A){if(!A.notification)return;b.notification={};const L=A.notification.title;L&&(b.notification.title=L);const ie=A.notification.body;ie&&(b.notification.body=ie);const Ie=A.notification.image;Ie&&(b.notification.image=Ie)}(A,b),function xi(b,A){!A.data||(b.data=A.data)}(A,b),function Wa(b,A){var L,ie,Ie,Oe,Je;if(!(A.fcmOptions||null!==(L=A.notification)&&void 0!==L&&L.click_action))return;b.fcmOptions={};const ht=null!==(Ie=null===(ie=A.fcmOptions)||void 0===ie?void 0:ie.link)&&void 0!==Ie?Ie:null===(Oe=A.notification)||void 0===Oe?void 0:Oe.click_action;ht&&(b.fcmOptions.link=ht);const jt=null===(Je=A.fcmOptions)||void 0===Je?void 0:Je.analytics_label;jt&&(b.fcmOptions.analyticsLabel=jt)}(A,b),A}function Bs(b){return"object"==typeof b&&!!b&&ti in b}function vs(b,A){const L=[];for(let ie=0;ie{})}catch(L){throw Zn.create("failed-service-worker-registration",{browserErrorMessage:null===(A=L)||void 0===A?void 0:A.message})}})).apply(this,arguments)}function ma(b,A){return js.apply(this,arguments)}function js(){return(js=(0,F.Z)(function*(b,A){if(!A&&!b.swRegistration&&(yield Mc(b)),A||!b.swRegistration){if(!(A instanceof ServiceWorkerRegistration))throw Zn.create("invalid-sw-registration");b.swRegistration=A}})).apply(this,arguments)}function ya(b,A){return $s.apply(this,arguments)}function $s(){return($s=(0,F.Z)(function*(b,A){A?b.vapidKey=A:b.vapidKey||(b.vapidKey=po)})).apply(this,arguments)}function eo(){return(eo=(0,F.Z)(function*(b,A){if(!navigator)throw Zn.create("only-available-in-window");if("default"===Notification.permission&&(yield Notification.requestPermission()),"granted"!==Notification.permission)throw Zn.create("permission-blocked");return yield ya(b,A?.vapidKey),yield ma(b,A?.serviceWorkerRegistration),Ls(b)})).apply(this,arguments)}function xc(b,A,L){return Do.apply(this,arguments)}function Do(){return(Do=(0,F.Z)(function*(b,A,L){const ie=Ru(A);(yield b.firebaseDependencies.analyticsProvider.get()).logEvent(ie,{message_id:L[ti],message_name:L[la],message_time:L[go],message_device_time:Math.floor(Date.now()/1e3)})})).apply(this,arguments)}function Ru(b){switch(b){case ss.NOTIFICATION_CLICKED:return"notification_open";case ss.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}function P(){return(P=(0,F.Z)(function*(b,A){const L=A.data;if(!L.isFirebaseMessaging)return;b.onMessageHandler&&L.messageType===ss.PUSH_RECEIVED&&("function"==typeof b.onMessageHandler?b.onMessageHandler(Mi(L)):b.onMessageHandler.next(Mi(L)));const ie=L.data;Bs(ie)&&"1"===ie[ja]&&(yield xc(b,L.messageType,ie))})).apply(this,arguments)}const C="@firebase/messaging",V="0.9.19",ce=b=>{const A=new jl(b.getProvider("app").getImmediate(),b.getProvider("installations-internal").getImmediate(),b.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",L=>function I(b,A){return P.apply(this,arguments)}(A,L)),A},Me=b=>{const A=b.getProvider("messaging").getImmediate();return{getToken:ie=>function Vo(b,A){return eo.apply(this,arguments)}(A,ie)}};function Et(){return vn.apply(this,arguments)}function vn(){return(vn=(0,F.Z)(function*(){try{yield(0,O.eu)()}catch{return!1}return typeof window<"u"&&(0,O.hl)()&&(0,O.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 Fe(){(0,z.Xd)(new W.wA("messaging",ce,"PUBLIC")),(0,z.Xd)(new W.wA("messaging-internal",Me,"PRIVATE")),(0,z.KN)(C,V),(0,z.KN)(C,V,"esm2017")}();const Vi="analytics",Gs="firebase_id",Ka="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",$l="https://www.googletagmanager.com/gtag/js",cr=new ee.Yd("@firebase/analytics");function as(b){return Promise.all(b.map(A=>A.catch(L=>L)))}function qa(b,A){const L=document.createElement("script");L.src=`${$l}?l=${b}&id=${A}`,L.async=!0,document.head.appendChild(L)}function Hl(b,A,L,ie,Ie,Oe){return Rc.apply(this,arguments)}function Rc(){return(Rc=(0,F.Z)(function*(b,A,L,ie,Ie,Oe){const Je=ie[Ie];try{if(Je)yield A[Je];else{const jt=(yield as(L)).find(ln=>ln.measurementId===Ie);jt&&(yield A[jt.appId])}}catch(ht){cr.error(ht)}b("config",Ie,Oe)})).apply(this,arguments)}function Ya(b,A,L,ie,Ie){return jo.apply(this,arguments)}function jo(){return(jo=(0,F.Z)(function*(b,A,L,ie,Ie){try{let Oe=[];if(Ie&&Ie.send_to){let Je=Ie.send_to;Array.isArray(Je)||(Je=[Je]);const ht=yield as(L);for(const jt of Je){const ln=ht.find(Lt=>Lt.measurementId===jt),on=ln&&A[ln.appId];if(!on){Oe=[];break}Oe.push(on)}}0===Oe.length&&(Oe=Object.values(A)),yield Promise.all(Oe),b("event",ie,Ie||{})}catch(Oe){cr.error(Oe)}})).apply(this,arguments)}function Pu(b){const A=window.document.getElementsByTagName("script");for(const L of Object.values(A))if(L.src&&L.src.includes($l)&&L.src.includes(b))return L;return null}const kr=new O.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.'}),_a=new class Wl{constructor(A={},L=1e3){this.throttleMetadata=A,this.intervalMillis=L}getThrottleMetadata(A){return this.throttleMetadata[A]}setThrottleMetadata(A,L){this.throttleMetadata[A]=L}deleteThrottleMetadata(A){delete this.throttleMetadata[A]}};function zp(b){return new Headers({Accept:"application/json","x-goog-api-key":b})}function Nu(b){return ku.apply(this,arguments)}function ku(){return(ku=(0,F.Z)(function*(b){var A;const{appId:L,apiKey:ie}=b,Ie={method:"GET",headers:zp(ie)},Oe=Ka.replace("{app-id}",L),Je=yield fetch(Oe,Ie);if(200!==Je.status&&304!==Je.status){let ht="";try{const jt=yield Je.json();null!==(A=jt.error)&&void 0!==A&&A.message&&(ht=jt.error.message)}catch{}throw kr.create("config-fetch-failed",{httpStatus:Je.status,responseMessage:ht})}return Je.json()})).apply(this,arguments)}function Lu(b){return hi.apply(this,arguments)}function hi(){return(hi=(0,F.Z)(function*(b,A=_a,L){const{appId:ie,apiKey:Ie,measurementId:Oe}=b.options;if(!ie)throw kr.create("no-app-id");if(!Ie){if(Oe)return{measurementId:Oe,appId:ie};throw kr.create("no-api-key")}const Je=A.getThrottleMetadata(ie)||{backoffCount:0,throttleEndTimeMillis:Date.now()},ht=new Go;return setTimeout((0,F.Z)(function*(){ht.abort()}),void 0!==L?L:6e4),Fu({appId:ie,apiKey:Ie,measurementId:Oe},Je,ht,A)})).apply(this,arguments)}function Fu(b,A,L){return Qn.apply(this,arguments)}function Qn(){return(Qn=(0,F.Z)(function*(b,{throttleEndTimeMillis:A,backoffCount:L},ie,Ie=_a){var Oe,Je;const{appId:ht,measurementId:jt}=b;try{yield Uu(ie,A)}catch(ln){if(jt)return cr.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${jt} provided in the "measurementId" field in the local Firebase config. [${null===(Oe=ln)||void 0===Oe?void 0:Oe.message}]`),{appId:ht,measurementId:jt};throw ln}try{const ln=yield Nu(b);return Ie.deleteThrottleMetadata(ht),ln}catch(ln){const on=ln;if(!Qa(on)){if(Ie.deleteThrottleMetadata(ht),jt)return cr.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${jt} provided in the "measurementId" field in the local Firebase config. [${on?.message}]`),{appId:ht,measurementId:jt};throw ln}const Lt=503===Number(null===(Je=on?.customData)||void 0===Je?void 0:Je.httpStatus)?(0,O.$s)(L,Ie.intervalMillis,30):(0,O.$s)(L,Ie.intervalMillis),ri={throttleEndTimeMillis:Date.now()+Lt,backoffCount:L+1};return Ie.setThrottleMetadata(ht,ri),cr.debug(`Calling attemptFetch again in ${Lt} millis`),Fu(b,ri,ie,Ie)}})).apply(this,arguments)}function Uu(b,A){return new Promise((L,ie)=>{const Ie=Math.max(A-Date.now(),0),Oe=setTimeout(L,Ie);b.addEventListener(()=>{clearTimeout(Oe),ie(kr.create("fetch-throttle",{throttleEndTimeMillis:A}))})})}function Qa(b){if(!(b instanceof O.ZR&&b.customData))return!1;const A=Number(b.customData.httpStatus);return 429===A||500===A||503===A||504===A}class Go{constructor(){this.listeners=[]}addEventListener(A){this.listeners.push(A)}abort(){this.listeners.forEach(A=>A())}}let no,ju;function Bu(){return(Bu=(0,F.Z)(function*(b,A,L,ie,Ie){if(Ie&&Ie.global)b("event",L,ie);else{const Oe=yield A;b("event",L,Object.assign(Object.assign({},ie),{send_to:Oe}))}})).apply(this,arguments)}function Hs(b){ju=b}function Pc(b){no=b}function $u(){return Gu.apply(this,arguments)}function Gu(){return(Gu=(0,F.Z)(function*(){var b;if(!(0,O.hl)())return cr.warn(kr.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{yield(0,O.eu)()}catch(A){return cr.warn(kr.create("indexeddb-unavailable",{errorInfo:null===(b=A)||void 0===b?void 0:b.toString()}).message),!1}return!0})).apply(this,arguments)}function va(){return(va=(0,F.Z)(function*(b,A,L,ie,Ie,Oe,Je){var ht;const jt=Lu(b);jt.then(Jr=>{L[Jr.measurementId]=Jr.appId,b.options.measurementId&&Jr.measurementId!==b.options.measurementId&&cr.warn(`The measurement ID in the local Firebase config (${b.options.measurementId}) does not match the measurement ID fetched from the server (${Jr.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(Jr=>cr.error(Jr)),A.push(jt);const ln=$u().then(Jr=>{if(Jr)return ie.getId()}),[on,Lt]=yield Promise.all([jt,ln]);Pu(Oe)||qa(Oe,on.measurementId),ju&&(Ie("consent","default",ju),Hs(void 0)),Ie("js",new Date);const ri=null!==(ht=Je?.config)&&void 0!==ht?ht:{};return ri.origin="firebase",ri.update=!0,null!=Lt&&(ri[Gs]=Lt),Ie("config",on.measurementId,ri),no&&(Ie("set",no),Pc(void 0)),on.measurementId})).apply(this,arguments)}class Hu{constructor(A){this.app=A}_delete(){return delete Xr[this.app.options.appId],Promise.resolve()}}let Xr={},Wo=[];const ro={};let Ko,ws,Ds="dataLayer",Ea=!1;function zu(b,A,L){!function bh(){const b=[];if((0,O.ru)()&&b.push("This is a browser extension environment."),(0,O.zI)()||b.push("Cookies are not available."),b.length>0){const A=b.map((ie,Ie)=>`(${Ie+1}) ${ie}`).join(" "),L=kr.create("invalid-analytics-context",{errorInfo:A});cr.warn(L.message)}}();const ie=b.options.appId;if(!ie)throw kr.create("no-app-id");if(!b.options.apiKey){if(!b.options.measurementId)throw kr.create("no-api-key");cr.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 ${b.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=Xr[ie])throw kr.create("already-exists",{id:ie});if(!Ea){!function Gl(b){let A=[];Array.isArray(window[b])?A=window[b]:window[b]=A}(Ds);const{wrappedGtag:Oe,gtagCore:Je}=function Ou(b,A,L,ie,Ie){let Oe=function(...Je){window[ie].push(arguments)};return window[Ie]&&"function"==typeof window[Ie]&&(Oe=window[Ie]),window[Ie]=function Za(b,A,L,ie){function Oe(){return(Oe=(0,F.Z)(function*(Je,ht,jt){try{"event"===Je?yield Ya(b,A,L,ht,jt):"config"===Je?yield Hl(b,A,L,ie,ht,jt):"consent"===Je?b("consent","update",jt):b("set",ht)}catch(ln){cr.error(ln)}})).apply(this,arguments)}return function Ie(Je,ht,jt){return Oe.apply(this,arguments)}}(Oe,b,A,L),{gtagCore:Oe,wrappedGtag:window[Ie]}}(Xr,Wo,ro,Ds,"gtag");ws=Oe,Ko=Je,Ea=!0}return Xr[ie]=function wh(b,A,L,ie,Ie,Oe,Je){return va.apply(this,arguments)}(b,Wo,ro,A,Ko,Ds,L),new Hu(b)}function Th(){return Wu.apply(this,arguments)}function Wu(){return(Wu=(0,F.Z)(function*(){if((0,O.ru)()||!(0,O.zI)()||!(0,O.hl)())return!1;try{return yield(0,O.eu)()}catch{return!1}})).apply(this,arguments)}const Sh="@firebase/analytics";!function fi(){(0,z.Xd)(new W.wA(Vi,(A,{options:L})=>zu(A.getProvider("app").getImmediate(),A.getProvider("installations-internal").getImmediate(),L),"PUBLIC")),(0,z.Xd)(new W.wA("analytics-internal",function b(A){try{const L=A.getProvider(Vi).getImmediate();return{logEvent:(ie,Ie,Oe)=>function eu(b,A,L,ie){b=(0,O.m9)(b),function Dh(b,A,L,ie,Ie){return Bu.apply(this,arguments)}(ws,Xr[b.app.options.appId],A,L,ie).catch(Ie=>cr.error(Ie))}(L,ie,Ie,Oe)}}catch(L){throw kr.create("interop-component-reg-failed",{reason:L})}},"PRIVATE")),(0,z.KN)(Sh,"0.8.3"),(0,z.KN)(Sh,"0.8.3","esm2017")}();var so=E(233),Ia=E(4986),nu=E(9751),qo=E(8505),y=E(9468),_=E(5363);const p=new m.GfV("7.4.1"),w="__angularfire_symbol__analyticsIsSupportedValue",S="__angularfire_symbol__analyticsIsSupported",U="__angularfire_symbol__remoteConfigIsSupportedValue",J="__angularfire_symbol__remoteConfigIsSupported",ae="__angularfire_symbol__messagingIsSupportedValue",Ne="__angularfire_symbol__messagingIsSupported";function ji(b,A,L){if(A){if(1===A.length)return A[0];const Oe=A.filter(Je=>Je.app===L);if(1===Oe.length)return Oe[0]}return L.container.getProvider(b).getImmediate({optional:!0})}globalThis[S]||(globalThis[S]=Th().then(b=>globalThis[w]=b).catch(()=>globalThis[w]=!1)),globalThis[Ne]||(globalThis[Ne]=Et().then(b=>globalThis[ae]=b).catch(()=>globalThis[ae]=!1)),globalThis[J]||(globalThis[J]=Ci().then(b=>globalThis[U]=b).catch(()=>globalThis[U]=!1));const oo=(b,A)=>{const L=A?[A]:(0,M.C6)(),ie=[];return L.forEach(Ie=>{Ie.container.getProvider(b).instances.forEach(Je=>{ie.includes(Je)||ie.push(Je)})}),ie};function us(){}class Ri{constructor(A,L=so.N){this.zone=A,this.delegate=L}now(){return this.delegate.now()}schedule(A,L,ie){const Ie=this.zone;return this.delegate.schedule(function(Je){Ie.runGuarded(()=>{A.apply(this,[Je])})},L,ie)}}class qu{constructor(A){this.zone=A,this.task=null}call(A,L){const ie=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",us,{},us,us)),L.pipe((0,qo.b)({next:ie,complete:ie,error:ie})).subscribe(A).add(ie)}unscheduleTask(){setTimeout(()=>{null!=this.task&&"scheduled"===this.task.state&&(this.task.invoke(),this.task=null)},10)}}let bs=(()=>{class b{constructor(L){this.ngZone=L,this.outsideAngular=L.runOutsideAngular(()=>new Ri(Zone.current)),this.insideAngular=L.run(()=>new Ri(Zone.current,Ia.z)),globalThis.\u0275AngularFireScheduler||(globalThis.\u0275AngularFireScheduler=this)}}return b.\u0275fac=function(L){return new(L||b)(m.LFG(m.R0b))},b.\u0275prov=m.Yz7({token:b,factory:b.\u0275fac,providedIn:"root"}),b})();function Da(){const b=globalThis.\u0275AngularFireScheduler;if(!b)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 b}function wa(b){return Da().ngZone.runOutsideAngular(()=>b())}function zs(b){return Da().ngZone.run(()=>b())}function qp(b){return Da(),function Yp(b){return function(L){return(L=L.lift(new qu(b.ngZone))).pipe((0,y.R)(b.outsideAngular),(0,_.Q)(b.insideAngular))}}(Da())(b)}const Fc=(b,A)=>function(){const ie=arguments;return A&&setTimeout(()=>{"scheduled"===A.state&&A.invoke()},10),zs(()=>b.apply(void 0,ie))},ba=(b,A)=>function(){let L;const ie=arguments;for(let Oe=0;OeZone.current.scheduleMacroTask("firebaseZoneBlock",us,{},us,us)))),ie[Oe]=Fc(ie[Oe],L));const Ie=wa(()=>b.apply(this,ie));if(!A){if(Ie instanceof nu.y){const Oe=Da();return Ie.pipe((0,y.R)(Oe.outsideAngular),(0,_.Q)(Oe.insideAngular))}return zs(()=>Ie)}return Ie instanceof nu.y?Ie.pipe(qp):Ie instanceof Promise?zs(()=>new Promise((Oe,Je)=>Ie.then(ht=>zs(()=>Oe(ht)),ht=>zs(()=>Je(ht))))):"function"==typeof Ie&&L?function(){return setTimeout(()=>{L&&"scheduled"===L.state&&L.invoke()},10),Ie.apply(this,arguments)}:zs(()=>Ie)}},2090:(le,k,E)=>{E.d(k,{$s:()=>yt,BH:()=>Ft,G6:()=>Le,L:()=>Q,LL:()=>qt,P0:()=>Xe,Pz:()=>rn,Sg:()=>at,US:()=>W,ZR:()=>Sn,aH:()=>wt,b$:()=>Ee,eu:()=>_t,hl:()=>nt,m9:()=>Vt,ne:()=>En,ru:()=>we,tV:()=>K,uI:()=>ve,vZ:()=>rt,xO:()=>qn,z$:()=>ye,zI:()=>Be});const z=function(de){const se=[];let ge=0;for(let ze=0;ze>6|192,se[ge++]=63&De|128):55296==(64512&De)&&ze+1>18|240,se[ge++]=De>>12&63|128,se[ge++]=De>>6&63|128,se[ge++]=63&De|128):(se[ge++]=De>>12|224,se[ge++]=De>>6&63|128,se[ge++]=63&De|128)}return se},W={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(de,se){if(!Array.isArray(de))throw Error("encodeByteArray takes an array as a parameter");this.init_();const ge=se?this.byteToCharMapWebSafe_:this.byteToCharMap_,ze=[];for(let De=0;De>6,be=63&nn;Tn||(be=64,Dt||(Z=64)),ze.push(ge[st>>2],ge[(3&st)<<4|Jt>>4],ge[Z],ge[be])}return ze.join("")},encodeString(de,se){return this.HAS_NATIVE_SUPPORT&&!se?btoa(de):this.encodeByteArray(z(de),se)},decodeString(de,se){return this.HAS_NATIVE_SUPPORT&&!se?atob(de):function(de){const se=[];let ge=0,ze=0;for(;ge191&&De<224){const st=de[ge++];se[ze++]=String.fromCharCode((31&De)<<6|63&st)}else if(De>239&&De<365){const Tn=((7&De)<<18|(63&de[ge++])<<12|(63&de[ge++])<<6|63&de[ge++])-65536;se[ze++]=String.fromCharCode(55296+(Tn>>10)),se[ze++]=String.fromCharCode(56320+(1023&Tn))}else{const st=de[ge++],Dt=de[ge++];se[ze++]=String.fromCharCode((15&De)<<12|(63&st)<<6|63&Dt)}}return se.join("")}(this.decodeStringToByteArray(de,se))},decodeStringToByteArray(de,se){this.init_();const ge=se?this.charToByteMapWebSafe_:this.charToByteMap_,ze=[];for(let De=0;De>4),64!==nn&&(ze.push(Jt<<4&240|nn>>2),64!==X&&ze.push(nn<<6&192|X))}return ze},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let de=0;de=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(de)]=de,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(de)]=de)}}},Q=function(de){return function(de){const se=z(de);return W.encodeByteArray(se,!0)}(de).replace(/\./g,"")},K=function(de){try{return W.decodeString(de,!0)}catch(se){console.error("base64Decode failed: ",se)}return null};function ye(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function ve(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ye())}function we(){const de="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof de&&void 0!==de.id}function Ee(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function Le(){return!function me(){try{return"[object process]"===Object.prototype.toString.call(global.process)}catch{return!1}}()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function nt(){return"object"==typeof indexedDB}function _t(){return new Promise((de,se)=>{try{let ge=!0;const ze="validate-browser-context-for-indexeddb-analytics-module",De=self.indexedDB.open(ze);De.onsuccess=()=>{De.result.close(),ge||self.indexedDB.deleteDatabase(ze),de(!0)},De.onupgradeneeded=()=>{ge=!1},De.onerror=()=>{var st;se((null===(st=De.error)||void 0===st?void 0:st.message)||"")}}catch(ge){se(ge)}})}function Be(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}const _e=()=>{try{return function Ke(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__||(()=>{if(typeof process>"u"||typeof process.env>"u")return;const de=process.env.__FIREBASE_DEFAULTS__;return de?JSON.parse(de):void 0})()||(()=>{if(typeof document>"u")return;let de;try{de=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const se=de&&K(de[1]);return se&&JSON.parse(se)})()}catch(de){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${de}`)}},Xe=de=>{const se=(de=>{var se,ge;return null===(ge=null===(se=_e())||void 0===se?void 0:se.emulatorHosts)||void 0===ge?void 0:ge[de]})(de);if(!se)return;const ge=se.lastIndexOf(":");if(ge<=0||ge+1===se.length)throw new Error(`Invalid host ${se} with no separate hostname and port!`);const ze=parseInt(se.substring(ge+1),10);return"["===se[0]?[se.substring(1,ge-1),ze]:[se.substring(0,ge),ze]},wt=()=>{var de;return null===(de=_e())||void 0===de?void 0:de.config},rn=de=>{var se;return null===(se=_e())||void 0===se?void 0:se[`_${de}`]};class Ft{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((se,ge)=>{this.resolve=se,this.reject=ge})}wrapCallback(se){return(ge,ze)=>{ge?this.reject(ge):this.resolve(ze),"function"==typeof se&&(this.promise.catch(()=>{}),1===se.length?se(ge):se(ge,ze))}}}function at(de,se){if(de.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const ze=se||"demo-project",De=de.iat||0,st=de.sub||de.user_id;if(!st)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const Dt=Object.assign({iss:`https://securetoken.google.com/${ze}`,aud:ze,iat:De,exp:De+3600,auth_time:De,sub:st,user_id:st,firebase:{sign_in_provider:"custom",identities:{}}},de);return[Q(JSON.stringify({alg:"none",type:"JWT"})),Q(JSON.stringify(Dt)),""].join(".")}class Sn extends Error{constructor(se,ge,ze){super(ge),this.code=se,this.customData=ze,this.name="FirebaseError",Object.setPrototypeOf(this,Sn.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,qt.prototype.create)}}class qt{constructor(se,ge,ze){this.service=se,this.serviceName=ge,this.errors=ze}create(se,...ge){const ze=ge[0]||{},De=`${this.service}/${se}`,st=this.errors[se],Dt=st?function Qt(de,se){return de.replace(Ct,(ge,ze)=>{const De=se[ze];return null!=De?String(De):`<${ze}?>`})}(st,ze):"Error";return new Sn(De,`${this.serviceName}: ${Dt} (${De}).`,ze)}}const Ct=/\{\$([^}]+)}/g;function rt(de,se){if(de===se)return!0;const ge=Object.keys(de),ze=Object.keys(se);for(const De of ge){if(!ze.includes(De))return!1;const st=de[De],Dt=se[De];if(Pn(st)&&Pn(Dt)){if(!rt(st,Dt))return!1}else if(st!==Dt)return!1}for(const De of ze)if(!ge.includes(De))return!1;return!0}function Pn(de){return null!==de&&"object"==typeof de}function qn(de){const se=[];for(const[ge,ze]of Object.entries(de))Array.isArray(ze)?ze.forEach(De=>{se.push(encodeURIComponent(ge)+"="+encodeURIComponent(De))}):se.push(encodeURIComponent(ge)+"="+encodeURIComponent(ze));return se.length?"&"+se.join("&"):""}function En(de,se){const ge=new wn(de,se);return ge.subscribe.bind(ge)}class wn{constructor(se,ge){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=ge,this.task.then(()=>{se(this)}).catch(ze=>{this.error(ze)})}next(se){this.forEachObserver(ge=>{ge.next(se)})}error(se){this.forEachObserver(ge=>{ge.error(se)}),this.close(se)}complete(){this.forEachObserver(se=>{se.complete()}),this.close()}subscribe(se,ge,ze){let De;if(void 0===se&&void 0===ge&&void 0===ze)throw new Error("Missing Observer.");De=function St(de,se){if("object"!=typeof de||null===de)return!1;for(const ge of se)if(ge in de&&"function"==typeof de[ge])return!0;return!1}(se,["next","error","complete"])?se:{next:se,error:ge,complete:ze},void 0===De.next&&(De.next=tn),void 0===De.error&&(De.error=tn),void 0===De.complete&&(De.complete=tn);const st=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?De.error(this.finalError):De.complete()}catch{}}),this.observers.push(De),st}unsubscribeOne(se){void 0===this.observers||void 0===this.observers[se]||(delete this.observers[se],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(se){if(!this.finalized)for(let ge=0;ge{if(void 0!==this.observers&&void 0!==this.observers[se])try{ge(this.observers[se])}catch(ze){typeof console<"u"&&console.error&&console.error(ze)}})}close(se){this.finalized||(this.finalized=!0,void 0!==se&&(this.finalError=se),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function tn(){}function yt(de,se=1e3,ge=2){const ze=se*Math.pow(ge,de),De=Math.round(.5*ze*(Math.random()-.5)*2);return Math.min(144e5,ze+De)}function Vt(de){return de&&de._delegate?de._delegate:de}},1899:(le,k,E)=>{E.d(k,{S:()=>ye});var m=E(7332),M=E(1365),F=E(9300),z=E(4004),O=E(8505),W=E(8675),ee=E(9751),G=E(4650),H=E(3602),te=E(8418);let ye=(()=>{class ve{constructor(Ue,we,Ee){this.store=Ue,this.gameService=we,this.networkService=Ee,this.dailyGameData$=this.selectTodaysDaily().pipe((0,M.M)(this.networkService.networkStatus$),(0,F.h)(([,We])=>!!We),(0,z.U)(([We])=>We),(0,O.b)(We=>{We||this.setDaily()}),(0,W.O)(null)),(0,m.ST)(Ue)}selectTodaysDaily(){return this.selectDaily((new Date).toLocaleDateString("sv"))}selectDaily(Ue){return new ee.y(we=>(0,m.cf)((0,m.JU)(this.store,"daily",Ue),Ee=>{const We=Ee.data();we.next(We?function Q(ve){const Ue=ve.board,we=ve.date,Ee=ve.title;return Ue?{difficulty:ve.difficulty,board:JSON.parse(Ue),date:new Date(we),title:Ee}:null}(We):null)},Ee=>we.error(Ee.message)))}setDaily(){const Ue=this.gameService.generateGameData(),we=(new Date).toLocaleDateString("sv");(0,m.pl)((0,m.JU)(this.store,"daily",we),function K(ve){return{difficulty:ve.difficulty,board:JSON.stringify(ve.board),date:ve.date?.getTime(),title:ve.title}}({...Ue,title:"Daily sudoku"}))}}return ve.\u0275fac=function(Ue){return new(Ue||ve)(G.LFG(m.gg),G.LFG(H.h),G.LFG(te.S))},ve.\u0275prov=G.Yz7({token:ve,factory:ve.\u0275fac,providedIn:"root"}),ve})()},3602:(le,k,E)=>{E.d(k,{h:()=>W});var m=E(5697),M=E(2340),F=E(4650),z=E(4759);let O=(()=>{class ee{saveGame(K){if(K===z.E||!K.date)return;const G=K.date.getTime().toString();localStorage.setItem(G,JSON.stringify(K)),localStorage.setItem("last-game",G)}loadGame(K){const G=localStorage.getItem(K);if(!G)return;const H=JSON.parse(G);return{...H,date:new Date(H.date)}}}return ee.\u0275fac=function(K){return new(K||ee)},ee.\u0275prov=F.Yz7({token:ee,factory:ee.\u0275fac,providedIn:"root"}),ee})(),W=(()=>{class ee{constructor(K){this.gameSaveRepository=K}setCellValue(K,G,H){return G&&H&&!H.readonly?G.map((te,ye)=>te.map((ve,me)=>ye===H.row&&me===H.col?{...ve,value:K}:ve)):G}clearCellValue(K,G){return K&&G&&!G.readonly?K.map((H,te)=>H.map((ye,ve)=>te===G.row&&ve===G.col?{...ye,value:void 0}:ye)):K}generateGameData(K){const G=[...Array(M.N.puzzleSize)].map(()=>Array(M.N.puzzleSize)),H=(0,m.V)(K),te=H.difficulty,ye=Array.from(H.puzzle),ve=Array.from(H.solution);return ye.forEach((me,Ue)=>{const we=~~(Ue/M.N.puzzleSize),Ee=Ue%M.N.puzzleSize,We="-"!==me?Number(me):void 0,ot="-"!==ve[Ue]?Number(ve[Ue]):void 0;G[we][Ee]={value:We,answer:ot,readonly:!!We}}),{difficulty:te,board:G,date:new Date}}isComplete(K){return!!K&&!K?.some(G=>G.some(H=>H.value!==H.answer))}saveGame(K){this.gameSaveRepository.saveGame(K)}loadGame(K){if(K)return this.gameSaveRepository.loadGame(K)}}return ee.\u0275fac=function(K){return new(K||ee)(F.LFG(O))},ee.\u0275prov=F.Yz7({token:ee,factory:ee.\u0275fac,providedIn:"root"}),ee})()},8418:(le,k,E)=>{E.d(k,{S:()=>W});var m=E(6451),M=E(9646),F=E(4968),z=E(4004),O=E(4650);let W=(()=>{class ee{constructor(){this.networkStatus$=(0,m.T)((0,M.of)(null),(0,F.R)(window,"online"),(0,F.R)(window,"offline")).pipe((0,z.U)(()=>navigator.onLine))}}return ee.\u0275fac=function(K){return new(K||ee)},ee.\u0275prov=O.Yz7({token:ee,factory:ee.\u0275fac,providedIn:"root"}),ee})()},6511:(le,k,E)=>{E.d(k,{EU:()=>G,G1:()=>W,O7:()=>F,Qx:()=>H,_N:()=>O,aT:()=>ee,iN:()=>te,qN:()=>Q,sO:()=>K,tU:()=>M,wc:()=>z});var m=E(2997);const M=(0,m.PH)("[GAME - app] set board",(0,m.Ky)()),F=(0,m.PH)("[GAME - app] game won"),z=(0,m.PH)("[GAME - app] load game",(0,m.Ky)()),O=(0,m.PH)("[GAME - app] load new game",(0,m.Ky)()),W=(0,m.PH)("[GAME - app] detected incorrect answer"),ee=(0,m.PH)("[GAME - app] add second to gameTime"),Q=(0,m.PH)("[GAME - user] set active cell",(0,m.Ky)()),K=(0,m.PH)("[GAME - user] set value",(0,m.Ky)()),G=(0,m.PH)("[GAME - user] Clear value"),H=(0,m.PH)("[GAME - user] start new game",(0,m.Ky)()),te=(0,m.PH)("[GAME - user] start daily game")},4759:(le,k,E)=>{E.d(k,{E:()=>F,F:()=>z});var m=E(2997),M=E(6511);const F={difficulty:null,board:null,date:null,activeCell:null,errors:0,timeInSeconds:0},z=(0,m.Lq)(F,(0,m.on)(M.wc,(O,{game:W})=>W),(0,m.on)(M._N,(O,{board:W,difficulty:ee,date:Q,title:K})=>({board:W,difficulty:ee,date:Q,title:K,activeCell:null,errors:0,timeInSeconds:0})),(0,m.on)(M.qN,(O,{cell:W})=>({...O,activeCell:W})),(0,m.on)(M.tU,(O,{board:W})=>({...O,board:W})),(0,m.on)(M.G1,(O,{})=>({...O,errors:O.errors+1})),(0,m.on)(M.aT,(O,{})=>({...O,timeInSeconds:O.timeInSeconds+1})))},6767:(le,k,E)=>{E.d(k,{AG:()=>O,Hf:()=>M,I3:()=>F,Jr:()=>G,XR:()=>te,fS:()=>H,i2:()=>Q,pK:()=>ee,qR:()=>K,vj:()=>W});var m=E(2997);const M=(0,m.ZF)("gameState"),F=(0,m.P1)(M,ye=>ye.board),z=(0,m.P1)(M,ye=>ye.activeCell),O=(0,m.P1)(M,ye=>ye.difficulty),W=(0,m.P1)(M,ye=>ye.date),ee=(0,m.P1)(M,ye=>ye.title),Q=(0,m.P1)(M,ye=>ye.errors),K=(0,m.P1)(M,ye=>ye.timeInSeconds),G=(0,m.P1)(F,z,(ye,ve)=>ye&&ve&&null!==ve.row&&null!==ve.col?{...ye[ve.row][ve.col],...ve}:null),H=(0,m.P1)(F,G,(ye,ve)=>({board:ye,activeFieldCell:ve})),te=(0,m.P1)(F,ye=>{const ve=Array(9).fill(0);return ye?.forEach(me=>me.forEach(Ue=>{void 0!==Ue.value&&Ue.value===Ue.answer&&(ve[Ue.value-1]+=1)})),ve})},7753:(le,k,E)=>{function M(z){return null!=z}E.d(k,{BX:()=>M})},2340:(le,k,E)=>{E.d(k,{N:()=>m});const m={production:!0,puzzleSize:9,maxErrors:3,firebase:{apiKey:"AIzaSyAgbFRxiUZqSXgGHBGpVDZFIpzoHrT9dME",authDomain:"sudoku-cef3b.firebaseapp.com",projectId:"sudoku-cef3b",storageBucket:"sudoku-cef3b.appspot.com",messagingSenderId:"784903023710",appId:"1:784903023710:web:d577d5b4011f864cbdd8cf",measurementId:"G-YL75TXC1Y9"}}},8811:(le,k,E)=>{var m=E(1481),M=E(4650),F=E(1869),z=E(6895),O=E(9770),W=E(2843),ee=E(4968),Q=E(9646),K=E(7272),G=E(7579),H=E(9751),te=E(5032);const ye=new H.y(te.Z);var me=E(6451),Ue=E(4004),we=E(9300),Ee=E(3900),We=E(4033),ot=E(576),Pe=E(8421),Se=E(4482);const nt={connector:()=>new G.x};function _t(oe,N=nt){const{connector:$}=N;return(0,Se.e)((q,he)=>{const Re=$();(0,Pe.Xf)(oe(function Le(oe){return new H.y(N=>oe.subscribe(N))}(Re))).subscribe(he),he.add(q.subscribe(Re))})}var pe=E(5698),ne=E(8505),Ae=E(4986),_e=E(5403);function Ze(){return(0,Se.e)((oe,N)=>{oe.subscribe((0,_e.x)(N,te.Z))})}var Xe=E(9718),wt=E(5577);function rn(oe,N){return N?$=>(0,K.z)(N.pipe((0,pe.q)(1),Ze()),$.pipe(rn(oe))):(0,wt.z)(($,q)=>oe($,q).pipe((0,pe.q)(1),(0,Xe.h)($)))}var Ft=E(2805);function at(oe,N=Ae.z){const $=(0,Ft.H)(oe,N);return rn(()=>$)}const dn="Service workers are disabled or not supported by this browser";class qt{constructor(N){if(this.serviceWorker=N,N){const q=(0,ee.R)(N,"controllerchange").pipe((0,Ue.U)(()=>N.controller)),he=(0,O.P)(()=>(0,Q.of)(N.controller)),Re=(0,K.z)(he,q);this.worker=Re.pipe((0,we.h)(yn=>!!yn)),this.registration=this.worker.pipe((0,Ee.w)(()=>N.getRegistration()));const Mt=(0,ee.R)(N,"message").pipe((0,Ue.U)(yn=>yn.data)).pipe((0,we.h)(yn=>yn&&yn.type)).pipe(function Ke(oe){return oe?N=>_t(oe)(N):N=>function Be(oe,N){const $=(0,ot.m)(oe)?oe:()=>oe;return(0,ot.m)(N)?_t(N,{connector:$}):q=>new We.c(q,$)}(new G.x)(N)}());Mt.connect(),this.events=Mt}else this.worker=this.events=this.registration=function Sn(oe){return(0,O.P)(()=>(0,W._)(new Error(oe)))}(dn)}postMessage(N,$){return this.worker.pipe((0,pe.q)(1),(0,ne.b)(q=>{q.postMessage({action:N,...$})})).toPromise().then(()=>{})}postMessageWithOperation(N,$,q){const he=this.waitForOperationCompleted(q),Re=this.postMessage(N,$);return Promise.all([Re,he]).then(([,$e])=>$e)}generateNonce(){return Math.round(1e7*Math.random())}eventsOfType(N){let $;return $="string"==typeof N?q=>q.type===N:q=>N.includes(q.type),this.events.pipe((0,we.h)($))}nextEventOfType(N){return this.eventsOfType(N).pipe((0,pe.q)(1))}waitForOperationCompleted(N){return this.eventsOfType("OPERATION_COMPLETED").pipe((0,we.h)($=>$.nonce===N),(0,pe.q)(1),(0,Ue.U)($=>{if(void 0!==$.result)return $.result;throw new Error($.error)})).toPromise()}get isEnabled(){return!!this.serviceWorker}}let Qt=(()=>{class oe{constructor($){if(this.sw=$,this.subscriptionChanges=new G.x,!$.isEnabled)return this.messages=ye,this.notificationClicks=ye,void(this.subscription=ye);this.messages=this.sw.eventsOfType("PUSH").pipe((0,Ue.U)(he=>he.data)),this.notificationClicks=this.sw.eventsOfType("NOTIFICATION_CLICK").pipe((0,Ue.U)(he=>he.data)),this.pushManager=this.sw.registration.pipe((0,Ue.U)(he=>he.pushManager));const q=this.pushManager.pipe((0,Ee.w)(he=>he.getSubscription()));this.subscription=(0,me.T)(q,this.subscriptionChanges)}get isEnabled(){return this.sw.isEnabled}requestSubscription($){if(!this.sw.isEnabled)return Promise.reject(new Error(dn));const q={userVisibleOnly:!0};let he=this.decodeBase64($.serverPublicKey.replace(/_/g,"/").replace(/-/g,"+")),Re=new Uint8Array(new ArrayBuffer(he.length));for(let $e=0;$e$e.subscribe(q)),(0,pe.q)(1)).toPromise().then($e=>(this.subscriptionChanges.next($e),$e))}unsubscribe(){return this.sw.isEnabled?this.subscription.pipe((0,pe.q)(1),(0,Ee.w)(q=>{if(null===q)throw new Error("Not subscribed to push notifications.");return q.unsubscribe().then(he=>{if(!he)throw new Error("Unsubscribe failed!");this.subscriptionChanges.next(null)})})).toPromise():Promise.reject(new Error(dn))}decodeBase64($){return atob($)}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(qt))},oe.\u0275prov=M.Yz7({token:oe,factory:oe.\u0275fac}),oe})(),Ct=(()=>{class oe{constructor($){if(this.sw=$,!$.isEnabled)return this.versionUpdates=ye,this.available=ye,this.activated=ye,void(this.unrecoverable=ye);this.versionUpdates=this.sw.eventsOfType(["VERSION_DETECTED","VERSION_INSTALLATION_FAILED","VERSION_READY","NO_NEW_VERSION_DETECTED"]),this.available=this.versionUpdates.pipe((0,we.h)(q=>"VERSION_READY"===q.type),(0,Ue.U)(q=>({type:"UPDATE_AVAILABLE",current:q.currentVersion,available:q.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(dn));const $=this.sw.generateNonce();return this.sw.postMessageWithOperation("CHECK_FOR_UPDATES",{nonce:$},$)}activateUpdate(){if(!this.sw.isEnabled)return Promise.reject(new Error(dn));const $=this.sw.generateNonce();return this.sw.postMessageWithOperation("ACTIVATE_UPDATE",{nonce:$},$)}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(qt))},oe.\u0275prov=M.Yz7({token:oe,factory:oe.\u0275fac}),oe})();class sn{}const Br=new M.OlP("NGSW_REGISTER_SCRIPT");function yr(oe,N,$,q){return()=>{if(!(0,z.NF)(q)||!("serviceWorker"in navigator)||!1===$.enabled)return;let he;if(navigator.serviceWorker.addEventListener("controllerchange",()=>{null!==navigator.serviceWorker.controller&&navigator.serviceWorker.controller.postMessage({action:"INITIALIZE"})}),"function"==typeof $.registrationStrategy)he=$.registrationStrategy();else{const[$e,...gt]=($.registrationStrategy||"registerWhenStable:30000").split(":");switch($e){case"registerImmediately":he=(0,Q.of)(null);break;case"registerWithDelay":he=hn(+gt[0]||0);break;case"registerWhenStable":he=gt[0]?(0,me.T)(pn(oe),hn(+gt[0])):pn(oe);break;default:throw new Error(`Unknown ServiceWorker registration strategy: ${$.registrationStrategy}`)}}oe.get(M.R0b).runOutsideAngular(()=>he.pipe((0,pe.q)(1)).subscribe(()=>navigator.serviceWorker.register(N,{scope:$.scope}).catch($e=>console.error("Service worker registration failed with:",$e))))}}function hn(oe){return(0,Q.of)(null).pipe(at(oe))}function pn(oe){return oe.get(M.z2F).isStable.pipe((0,we.h)($=>$))}function rr(oe,N){return new qt((0,z.NF)(N)&&!1!==oe.enabled?navigator.serviceWorker:void 0)}let xr=(()=>{class oe{static register($,q={}){return{ngModule:oe,providers:[{provide:Br,useValue:$},{provide:sn,useValue:q},{provide:qt,useFactory:rr,deps:[sn,M.Lbi]},{provide:M.ip1,useFactory:yr,deps:[M.zs3,Br,sn,M.Lbi],multi:!0}]}}}return oe.\u0275fac=function($){return new($||oe)},oe.\u0275mod=M.oAB({type:oe}),oe.\u0275inj=M.cJS({providers:[Qt,Ct]}),oe})(),ir=(()=>{class oe{constructor($){this.updates=$,console.log("updates..."),this.updates.versionUpdates.subscribe(q=>{console.log(q),"VERSION_READY"===q.type&&this.showAppUpdateAlert()})}showAppUpdateAlert(){confirm("There's an update ready, update now?")&&this.doAppUpdate()}doAppUpdate(){this.updates.activateUpdate().then($=>{console.log("update installed..."),document.location.reload()})}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(Ct))},oe.\u0275prov=M.Yz7({token:oe,factory:oe.\u0275fac,providedIn:"root"}),oe})();var xn=E(8418);let qr=(()=>{class oe{constructor($,q){this.title="sudoku-app"}}return oe.\u0275fac=function($){return new($||oe)(M.Y36(ir),M.Y36(xn.S))},oe.\u0275cmp=M.Xpm({type:oe,selectors:[["app-root"]],decls:1,vars:0,template:function($,q){1&$&&M._UZ(0,"router-outlet")},dependencies:[F.lC],encapsulation:2}),oe})();var gn=E(6767),rt=E(2997);const Ii=[{path:"",loadChildren:()=>Promise.all([E.e(592),E.e(651)]).then(E.bind(E,651)).then(oe=>oe.HomeModule)},{path:"game",canActivate:[(()=>{class oe{constructor($,q){this.store=$,this.router=q}canActivate($,q){return this.store.select(gn.fS).pipe((0,Ue.U)(he=>!!he.board),(0,ne.b)(he=>{he||this.router.navigate([""],{queryParams:{returnUrl:q.url}})}))}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(rt.yh),M.LFG(F.F0))},oe.\u0275prov=M.Yz7({token:oe,factory:oe.\u0275fac,providedIn:"root"}),oe})()],loadChildren:()=>Promise.all([E.e(592),E.e(544)]).then(E.bind(E,9544)).then(oe=>oe.GameModule)}];var qn=E(3692),dr=E(7332),Yr=E(825),Un=E(9635),En=E(515);class vt{constructor(N,$,q){this.kind=N,this.value=$,this.error=q,this.hasValue="N"===N}observe(N){return St(this,N)}do(N,$,q){const{kind:he,value:Re,error:$e}=this;return"N"===he?N?.(Re):"E"===he?$?.($e):q?.()}accept(N,$,q){var he;return(0,ot.m)(null===(he=N)||void 0===he?void 0:he.next)?this.observe(N):this.do(N,$,q)}toObservable(){const{kind:N,value:$,error:q}=this,he="N"===N?(0,Q.of)($):"E"===N?(0,W._)(()=>q):"C"===N?En.E:0;if(!he)throw new TypeError(`Unexpected notification kind ${N}`);return he}static createNext(N){return new vt("N",N)}static createError(N){return new vt("E",void 0,N)}static createComplete(){return vt.completeNotification}}function St(oe,N){var $,q,he;const{kind:Re,value:$e,error:gt}=oe;if("string"!=typeof Re)throw new TypeError('Invalid notification, missing "kind"');"N"===Re?null===($=N.next)||void 0===$||$.call(N,$e):"E"===Re?null===(q=N.error)||void 0===q||q.call(N,gt):null===(he=N.complete)||void 0===he||he.call(N)}vt.completeNotification=new vt("C");var Jn=E(262);function mt(oe,N,$,q){return(0,Se.e)((he,Re)=>{let $e;N&&"function"!=typeof N?({duration:$,element:$e,connector:q}=N):$e=N;const gt=new Map,Bt=Rn=>{gt.forEach(Rn),Rn(Re)},Mt=Rn=>Bt(Pr=>Pr.error(Rn));let yn=0,un=!1;const nr=new _e.Q(Re,Rn=>{try{const Pr=oe(Rn);let bi=gt.get(Pr);if(!bi){gt.set(Pr,bi=q?q():new G.x);const Ti=function Ui(Rn,Pr){const bi=new H.y(Ti=>{yn++;const Ci=Pr.subscribe(Ti);return()=>{Ci.unsubscribe(),0==--yn&&un&&nr.unsubscribe()}});return bi.key=Rn,bi}(Pr,bi);if(Re.next(Ti),$){const Ci=(0,_e.x)(bi,()=>{bi.complete(),Ci?.unsubscribe()},void 0,void 0,()=>gt.delete(Pr));nr.add((0,Pe.Xf)($(Ti)).subscribe(Ci))}}bi.next($e?$e(Rn):Rn)}catch(Pr){Mt(Pr)}},()=>Bt(Rn=>Rn.complete()),Mt,()=>gt.clear(),()=>(un=!0,0===yn));he.subscribe(nr)})}function er(oe,N){return N?$=>$.pipe(er((q,he)=>(0,Pe.Xf)(oe(q,he)).pipe((0,Ue.U)((Re,$e)=>N(q,Re,he,$e))))):(0,Se.e)(($,q)=>{let he=0,Re=null,$e=!1;$.subscribe((0,_e.x)(q,gt=>{Re||(Re=(0,_e.x)(q,void 0,()=>{Re=null,$e&&q.complete()}),(0,Pe.Xf)(oe(gt,he++)).subscribe(Re))},()=>{$e=!0,!Re&&q.complete()}))})}var sr=E(4351),In=E(1365);const Rr={dispatch:!0,useEffectsErrorHandler:!0},Xt="__@ngrx/effects_create__";function bn(oe,N){const $=oe(),q={...Rr,...N};return Object.defineProperty($,Xt,{value:q}),$}function Gn(oe){return Object.getOwnPropertyNames(oe).filter(q=>!(!oe[q]||!oe[q].hasOwnProperty(Xt))&&oe[q][Xt].hasOwnProperty("dispatch")).map(q=>({propertyName:q,...oe[q][Xt]}))}function lt(oe){return Object.getPrototypeOf(oe)}const He="__@ngrx/effects__";function Nt(oe){return(0,rt.qC)(de,lt)(oe)}function de(oe){return function kt(oe){return oe.constructor.hasOwnProperty(He)}(oe)?oe.constructor[He]:[]}function ze(oe,N,$){const q=lt(oe).constructor.name,he=function ge(oe){return[Nt,Gn].reduce(($,q)=>$.concat(q(oe)),[])}(oe).map(({propertyName:Re,dispatch:$e,useEffectsErrorHandler:gt})=>{const Bt="function"==typeof oe[Re]?oe[Re]():oe[Re],Mt=gt?$(Bt,N):Bt;return!1===$e?Mt.pipe(Ze()):Mt.pipe(function tn(){return(0,Se.e)((oe,N)=>{oe.subscribe((0,_e.x)(N,$=>{N.next(vt.createNext($))},()=>{N.next(vt.createComplete()),N.complete()},$=>{N.next(vt.createError($)),N.complete()}))})}()).pipe((0,Ue.U)(un=>({effect:oe[Re],notification:un,propertyName:Re,sourceName:q,sourceInstance:oe})))});return(0,me.T)(...he)}function st(oe,N,$=10){return oe.pipe((0,Jn.K)(q=>(N&&N.handleError(q),$<=1?oe:st(oe,N,$-1))))}let Dt=(()=>{class oe extends H.y{constructor($){super(),$&&(this.source=$)}lift($){const q=new oe;return q.source=this,q.operator=$,q}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(rt.Y$))},oe.\u0275prov=M.Yz7({token:oe,factory:oe.\u0275fac,providedIn:"root"}),oe})();function Jt(...oe){return(0,we.h)(N=>oe.some($=>"string"==typeof $?$===N.type:$.type===N.type))}const Tn=new M.OlP("@ngrx/effects Internal Root Guard"),nn=new M.OlP("@ngrx/effects User Provided Effects"),ue=new M.OlP("@ngrx/effects Internal Root Effects"),X=new M.OlP("@ngrx/effects Root Effects"),Z=new M.OlP("@ngrx/effects Internal Feature Effects"),be=new M.OlP("@ngrx/effects Feature Effects"),je=new M.OlP("@ngrx/effects Effects Error Handler",{providedIn:"root",factory:()=>st}),dt="@ngrx/effects/init";function wr(oe){return Vr(oe,"ngrxOnInitEffects")}function Vr(oe,N){return oe&&N in oe&&"function"==typeof oe[N]}(0,rt.PH)(dt);let Or=(()=>{class oe extends G.x{constructor($,q){super(),this.errorHandler=$,this.effectsErrorHandler=q}addEffects($){this.next($)}toActions(){return this.pipe(mt(lt),(0,wt.z)($=>$.pipe(mt(tr))),(0,wt.z)($=>{const q=$.pipe(er(Re=>function Qs(oe,N){return $=>{const q=ze($,oe,N);return function Nn(oe){return Vr(oe,"ngrxOnRunEffects")}($)?$.ngrxOnRunEffects(q):q}}(this.errorHandler,this.effectsErrorHandler)(Re)),(0,Ue.U)(Re=>(function Zt(oe,N){if("N"===oe.notification.kind){const $=oe.notification.value;!function or(oe){return"function"!=typeof oe&&oe&&oe.type&&"string"==typeof oe.type}($)&&N.handleError(new Error(`Effect ${function ui({propertyName:oe,sourceInstance:N,sourceName:$}){const q="function"==typeof N[oe];return`"${$}.${String(oe)}${q?"()":""}"`}(oe)} dispatched an invalid action: ${function Pt(oe){try{return JSON.stringify(oe)}catch{return oe}}($)}`))}}(Re,this.errorHandler),Re.notification)),(0,we.h)(Re=>"N"===Re.kind&&null!=Re.value),function bt(){return(0,Se.e)((oe,N)=>{oe.subscribe((0,_e.x)(N,$=>St($,N)))})}()),he=$.pipe((0,pe.q)(1),(0,we.h)(wr),(0,Ue.U)(Re=>Re.ngrxOnInitEffects()));return(0,me.T)(q,he)}))}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(M.qLn),M.LFG(je))},oe.\u0275prov=M.Yz7({token:oe,factory:oe.\u0275fac,providedIn:"root"}),oe})();function tr(oe){return function Qr(oe){return Vr(oe,"ngrxOnIdentifyEffects")}(oe)?oe.ngrxOnIdentifyEffects():""}let Dn=(()=>{class oe{constructor($,q){this.effectSources=$,this.store=q,this.effectsSubscription=null}get isStarted(){return!!this.effectsSubscription}start(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))}ngOnDestroy(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(Or),M.LFG(rt.yh))},oe.\u0275prov=M.Yz7({token:oe,factory:oe.\u0275fac,providedIn:"root"}),oe})(),ci=(()=>{class oe{constructor($,q,he,Re,$e,gt,Bt){this.sources=$,q.start(),Re.forEach(Mt=>$.addEffects(Mt)),he.dispatch({type:dt})}addEffects($){this.sources.addEffects($)}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(Or),M.LFG(Dn),M.LFG(rt.yh),M.LFG(X),M.LFG(rt.cr,8),M.LFG(rt.CK,8),M.LFG(Tn,8))},oe.\u0275mod=M.oAB({type:oe}),oe.\u0275inj=M.cJS({}),oe})(),rs=(()=>{class oe{constructor($,q,he,Re){q.forEach($e=>$e.forEach(gt=>$.addEffects(gt)))}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(ci),M.LFG(be),M.LFG(rt.cr,8),M.LFG(rt.CK,8))},oe.\u0275mod=M.oAB({type:oe}),oe.\u0275inj=M.cJS({}),oe})(),Di=(()=>{class oe{static forFeature($=[]){return{ngModule:rs,providers:[$,{provide:Z,multi:!0,useValue:$},{provide:nn,multi:!0,useValue:[]},{provide:be,multi:!0,useFactory:li,deps:[M.zs3,Z,nn]}]}}static forRoot($=[]){return{ngModule:ci,providers:[$,{provide:ue,useValue:[$]},{provide:Tn,useFactory:wi,deps:[[Dn,new M.FiY,new M.tp0],[ue,new M.PiD]]},{provide:nn,multi:!0,useValue:[]},{provide:X,useFactory:li,deps:[M.zs3,ue,nn]}]}}}return oe.\u0275fac=function($){return new($||oe)},oe.\u0275mod=M.oAB({type:oe}),oe.\u0275inj=M.cJS({}),oe})();function li(oe,N,$){const q=[];for(const he of N)q.push(...he);for(const he of $)q.push(...he);return function qi(oe,N){return N.map($=>oe.get($))}(oe,q)}function wi(oe,N){if((1!==N.length||0!==N[0].length)&&oe)throw new TypeError("EffectsModule.forRoot() called twice. Feature modules should use EffectsModule.forFeature() instead.");return"guarded"}function $n(oe){return(0,Un.z)((0,sr.b)(N=>{const $=oe(N),q=Array.isArray($)?$:[$];return(0,Q.of)(N).pipe((0,In.M)(...q))}))}var kn=E(2340),jr=E(4759),Yi=E(7753),vr=E(6511),Zi=E(3602),Er=E(1899);let gs=(()=>{class oe{constructor($,q,he,Re,$e){this.store=$,this.actions$=q,this.gameService=he,this.dailyService=Re,this.router=$e,this.setBoard$=bn(()=>this.store.select(gn.Hf).pipe((0,ne.b)(gt=>this.gameService.saveGame(gt))),{dispatch:!1}),this.setValue$=bn(()=>this.actions$.pipe(Jt(vr.sO),$n(()=>[this.store.select(gn.I3),this.store.select(gn.Jr),this.store.select(gn.i2)]),(0,Ee.w)(([{value:gt},Bt,Mt,yn])=>{const un=this.gameService.setCellValue(gt,Bt,Mt),nr=Mt&&Mt?.answer!==gt&&Mt?.value!==gt&&!Mt.readonly,Ui=this.gameService.isComplete(un);return(0,K.z)([(0,vr.tU)({board:un}),...nr?[(0,vr.G1)()]:[],...Ui?[(0,vr.O7)()]:[]])}))),this.clearValue$=bn(()=>this.actions$.pipe(Jt(vr.EU),$n(()=>[this.store.select(gn.I3),this.store.select(gn.Jr)]),(0,Ee.w)(([{},gt,Bt])=>(0,Q.of)((0,vr.tU)({board:this.gameService.clearCellValue(gt,Bt)}))))),this.startNewGame$=bn(()=>this.actions$.pipe(Jt(vr.Qx),(0,Ee.w)(({difficulty:gt})=>(0,Q.of)((0,vr._N)(this.gameService.generateGameData(gt)))))),this.startDailyGame$=bn(()=>this.actions$.pipe(Jt(vr.iN),(0,Ee.w)(()=>this.dailyService.dailyGameData$),(0,we.h)(Yi.BX),(0,Ue.U)(gt=>(0,vr._N)(gt)))),this.goToNewGame$=bn(()=>this.actions$.pipe(Jt(vr._N,vr.wc),(0,ne.b)(()=>this.router.navigate(["/","game"]))),{dispatch:!1}),this.winGame$=bn(()=>this.actions$.pipe(Jt(vr.O7),(0,ne.b)(()=>this.router.navigate(["/","game","winner"]))),{dispatch:!1})}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(rt.yh),M.LFG(Dt),M.LFG(Zi.h),M.LFG(Er.S),M.LFG(F.F0))},oe.\u0275prov=M.Yz7({token:oe,factory:oe.\u0275fac}),oe})(),No=(()=>{class oe{constructor($){if($)throw new Error("CoreModule is already loaded. Import it in the AppModule only.")}}return oe.\u0275fac=function($){return new($||oe)(M.LFG(oe,12))},oe.\u0275mod=M.oAB({type:oe}),oe.\u0275inj=M.cJS({providers:[ir],imports:[z.ez,m.b2,(0,qn.hX)(()=>(0,qn.ZF)(kn.N.firebase)),(0,dr.Cm)(()=>(0,dr.ad)()),rt.Aw.forRoot({gameState:jr.F}),Di.forRoot([gs]),Yr.FT.instrument({maxAge:25,logOnly:kn.N.production,autoPause:!0})]}),oe})(),Ps=(()=>{class oe{}return oe.\u0275fac=function($){return new($||oe)},oe.\u0275mod=M.oAB({type:oe,bootstrap:[qr]}),oe.\u0275inj=M.cJS({imports:[No,F.Bz.forRoot(Ii),xr.register("ngsw-worker.js",{enabled:kn.N.production,registrationStrategy:"registerWhenStable:30000"})]}),oe})();kn.N.production&&(0,M.G48)(),m.q6().bootstrapModule(Ps).catch(oe=>console.error(oe))},5867:(le,k,E)=>{E.d(k,{C6:()=>m.C6,KN:()=>m.KN,Mq:()=>m.Mq,ZF:()=>m.ZF});var m=E(9681);(0,m.KN)("firebase","9.12.1","app")},1135:(le,k,E)=>{E.d(k,{X:()=>M});var m=E(7579);class M extends m.x{constructor(z){super(),this._value=z}get value(){return this.getValue()}_subscribe(z){const O=super._subscribe(z);return!O.closed&&z.next(this._value),O}getValue(){const{hasError:z,thrownError:O,_value:W}=this;if(z)throw O;return this._throwIfClosed(),W}next(z){super.next(this._value=z)}}},9751:(le,k,E)=>{E.d(k,{y:()=>Q});var m=E(930),M=E(727),F=E(8822),z=E(9635),O=E(2416),W=E(576),ee=E(2806);let Q=(()=>{class te{constructor(ve){ve&&(this._subscribe=ve)}lift(ve){const me=new te;return me.source=this,me.operator=ve,me}subscribe(ve,me,Ue){const we=function H(te){return te&&te instanceof m.Lv||function G(te){return te&&(0,W.m)(te.next)&&(0,W.m)(te.error)&&(0,W.m)(te.complete)}(te)&&(0,M.Nn)(te)}(ve)?ve:new m.Hp(ve,me,Ue);return(0,ee.x)(()=>{const{operator:Ee,source:We}=this;we.add(Ee?Ee.call(we,We):We?this._subscribe(we):this._trySubscribe(we))}),we}_trySubscribe(ve){try{return this._subscribe(ve)}catch(me){ve.error(me)}}forEach(ve,me){return new(me=K(me))((Ue,we)=>{const Ee=new m.Hp({next:We=>{try{ve(We)}catch(ot){we(ot),Ee.unsubscribe()}},error:we,complete:Ue});this.subscribe(Ee)})}_subscribe(ve){var me;return null===(me=this.source)||void 0===me?void 0:me.subscribe(ve)}[F.L](){return this}pipe(...ve){return(0,z.U)(ve)(this)}toPromise(ve){return new(ve=K(ve))((me,Ue)=>{let we;this.subscribe(Ee=>we=Ee,Ee=>Ue(Ee),()=>me(we))})}}return te.create=ye=>new te(ye),te})();function K(te){var ye;return null!==(ye=te??O.v.Promise)&&void 0!==ye?ye:Promise}},4707:(le,k,E)=>{E.d(k,{t:()=>F});var m=E(7579),M=E(6063);class F extends m.x{constructor(O=1/0,W=1/0,ee=M.l){super(),this._bufferSize=O,this._windowTime=W,this._timestampProvider=ee,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=W===1/0,this._bufferSize=Math.max(1,O),this._windowTime=Math.max(1,W)}next(O){const{isStopped:W,_buffer:ee,_infiniteTimeWindow:Q,_timestampProvider:K,_windowTime:G}=this;W||(ee.push(O),!Q&&ee.push(K.now()+G)),this._trimBuffer(),super.next(O)}_subscribe(O){this._throwIfClosed(),this._trimBuffer();const W=this._innerSubscribe(O),{_infiniteTimeWindow:ee,_buffer:Q}=this,K=Q.slice();for(let G=0;G{E.d(k,{x:()=>ee});var m=E(9751),M=E(727);const z=(0,E(3888).d)(K=>function(){K(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var O=E(8737),W=E(2806);let ee=(()=>{class K extends m.y{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(H){const te=new Q(this,this);return te.operator=H,te}_throwIfClosed(){if(this.closed)throw new z}next(H){(0,W.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const te of this.currentObservers)te.next(H)}})}error(H){(0,W.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=H;const{observers:te}=this;for(;te.length;)te.shift().error(H)}})}complete(){(0,W.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:H}=this;for(;H.length;)H.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var H;return(null===(H=this.observers)||void 0===H?void 0:H.length)>0}_trySubscribe(H){return this._throwIfClosed(),super._trySubscribe(H)}_subscribe(H){return this._throwIfClosed(),this._checkFinalizedStatuses(H),this._innerSubscribe(H)}_innerSubscribe(H){const{hasError:te,isStopped:ye,observers:ve}=this;return te||ye?M.Lc:(this.currentObservers=null,ve.push(H),new M.w0(()=>{this.currentObservers=null,(0,O.P)(ve,H)}))}_checkFinalizedStatuses(H){const{hasError:te,thrownError:ye,isStopped:ve}=this;te?H.error(ye):ve&&H.complete()}asObservable(){const H=new m.y;return H.source=this,H}}return K.create=(G,H)=>new Q(G,H),K})();class Q extends ee{constructor(G,H){super(),this.destination=G,this.source=H}next(G){var H,te;null===(te=null===(H=this.destination)||void 0===H?void 0:H.next)||void 0===te||te.call(H,G)}error(G){var H,te;null===(te=null===(H=this.destination)||void 0===H?void 0:H.error)||void 0===te||te.call(H,G)}complete(){var G,H;null===(H=null===(G=this.destination)||void 0===G?void 0:G.complete)||void 0===H||H.call(G)}_subscribe(G){var H,te;return null!==(te=null===(H=this.source)||void 0===H?void 0:H.subscribe(G))&&void 0!==te?te:M.Lc}}},930:(le,k,E)=>{E.d(k,{Hp:()=>Ue,Lv:()=>te});var m=E(576),M=E(727),F=E(2416),z=E(7849),O=E(5032);const W=K("C",void 0,void 0);function K(Pe,Se,Le){return{kind:Pe,value:Se,error:Le}}var G=E(3410),H=E(2806);class te extends M.w0{constructor(Se){super(),this.isStopped=!1,Se?(this.destination=Se,(0,M.Nn)(Se)&&Se.add(this)):this.destination=ot}static create(Se,Le,nt){return new Ue(Se,Le,nt)}next(Se){this.isStopped?We(function Q(Pe){return K("N",Pe,void 0)}(Se),this):this._next(Se)}error(Se){this.isStopped?We(function ee(Pe){return K("E",void 0,Pe)}(Se),this):(this.isStopped=!0,this._error(Se))}complete(){this.isStopped?We(W,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(Se){this.destination.next(Se)}_error(Se){try{this.destination.error(Se)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const ye=Function.prototype.bind;function ve(Pe,Se){return ye.call(Pe,Se)}class me{constructor(Se){this.partialObserver=Se}next(Se){const{partialObserver:Le}=this;if(Le.next)try{Le.next(Se)}catch(nt){we(nt)}}error(Se){const{partialObserver:Le}=this;if(Le.error)try{Le.error(Se)}catch(nt){we(nt)}else we(Se)}complete(){const{partialObserver:Se}=this;if(Se.complete)try{Se.complete()}catch(Le){we(Le)}}}class Ue extends te{constructor(Se,Le,nt){let _t;if(super(),(0,m.m)(Se)||!Se)_t={next:Se??void 0,error:Le??void 0,complete:nt??void 0};else{let Be;this&&F.v.useDeprecatedNextContext?(Be=Object.create(Se),Be.unsubscribe=()=>this.unsubscribe(),_t={next:Se.next&&ve(Se.next,Be),error:Se.error&&ve(Se.error,Be),complete:Se.complete&&ve(Se.complete,Be)}):_t=Se}this.destination=new me(_t)}}function we(Pe){F.v.useDeprecatedSynchronousErrorHandling?(0,H.O)(Pe):(0,z.h)(Pe)}function We(Pe,Se){const{onStoppedNotification:Le}=F.v;Le&&G.z.setTimeout(()=>Le(Pe,Se))}const ot={closed:!0,next:O.Z,error:function Ee(Pe){throw Pe},complete:O.Z}},727:(le,k,E)=>{E.d(k,{Lc:()=>W,w0:()=>O,Nn:()=>ee});var m=E(576);const F=(0,E(3888).d)(K=>function(H){K(this),this.message=H?`${H.length} errors occurred during unsubscription:\n${H.map((te,ye)=>`${ye+1}) ${te.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=H});var z=E(8737);class O{constructor(G){this.initialTeardown=G,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let G;if(!this.closed){this.closed=!0;const{_parentage:H}=this;if(H)if(this._parentage=null,Array.isArray(H))for(const ve of H)ve.remove(this);else H.remove(this);const{initialTeardown:te}=this;if((0,m.m)(te))try{te()}catch(ve){G=ve instanceof F?ve.errors:[ve]}const{_finalizers:ye}=this;if(ye){this._finalizers=null;for(const ve of ye)try{Q(ve)}catch(me){G=G??[],me instanceof F?G=[...G,...me.errors]:G.push(me)}}if(G)throw new F(G)}}add(G){var H;if(G&&G!==this)if(this.closed)Q(G);else{if(G instanceof O){if(G.closed||G._hasParent(this))return;G._addParent(this)}(this._finalizers=null!==(H=this._finalizers)&&void 0!==H?H:[]).push(G)}}_hasParent(G){const{_parentage:H}=this;return H===G||Array.isArray(H)&&H.includes(G)}_addParent(G){const{_parentage:H}=this;this._parentage=Array.isArray(H)?(H.push(G),H):H?[H,G]:G}_removeParent(G){const{_parentage:H}=this;H===G?this._parentage=null:Array.isArray(H)&&(0,z.P)(H,G)}remove(G){const{_finalizers:H}=this;H&&(0,z.P)(H,G),G instanceof O&&G._removeParent(this)}}O.EMPTY=(()=>{const K=new O;return K.closed=!0,K})();const W=O.EMPTY;function ee(K){return K instanceof O||K&&"closed"in K&&(0,m.m)(K.remove)&&(0,m.m)(K.add)&&(0,m.m)(K.unsubscribe)}function Q(K){(0,m.m)(K)?K():K.unsubscribe()}},2416:(le,k,E)=>{E.d(k,{v:()=>m});const m={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},4033:(le,k,E)=>{E.d(k,{c:()=>W});var m=E(9751),M=E(727),F=E(8343),z=E(5403),O=E(4482);class W extends m.y{constructor(Q,K){super(),this.source=Q,this.subjectFactory=K,this._subject=null,this._refCount=0,this._connection=null,(0,O.A)(Q)&&(this.lift=Q.lift)}_subscribe(Q){return this.getSubject().subscribe(Q)}getSubject(){const Q=this._subject;return(!Q||Q.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:Q}=this;this._subject=this._connection=null,Q?.unsubscribe()}connect(){let Q=this._connection;if(!Q){Q=this._connection=new M.w0;const K=this.getSubject();Q.add(this.source.subscribe((0,z.x)(K,void 0,()=>{this._teardown(),K.complete()},G=>{this._teardown(),K.error(G)},()=>this._teardown()))),Q.closed&&(this._connection=null,Q=M.w0.EMPTY)}return Q}refCount(){return(0,F.x)()(this)}}},1577:(le,k,E)=>{E.d(k,{a:()=>me});var m=E(9751);const{isArray:M}=Array,{getPrototypeOf:F,prototype:z,keys:O}=Object;var Q=E(8996),K=E(4671),G=E(3268),H=E(3269),ye=E(5403),ve=E(9672);function me(...Ee){const We=(0,H.yG)(Ee),ot=(0,H.jO)(Ee),{args:Pe,keys:Se}=function W(Ee){if(1===Ee.length){const We=Ee[0];if(M(We))return{args:We,keys:null};if(function ee(Ee){return Ee&&"object"==typeof Ee&&F(Ee)===z}(We)){const ot=O(We);return{args:ot.map(Pe=>We[Pe]),keys:ot}}}return{args:Ee,keys:null}}(Ee);if(0===Pe.length)return(0,Q.D)([],We);const Le=new m.y(function Ue(Ee,We,ot=K.y){return Pe=>{we(We,()=>{const{length:Se}=Ee,Le=new Array(Se);let nt=Se,_t=Se;for(let Be=0;Be{const Ke=(0,Q.D)(Ee[Be],We);let pe=!1;Ke.subscribe((0,ye.x)(Pe,ne=>{Le[Be]=ne,pe||(pe=!0,_t--),_t||Pe.next(ot(Le.slice()))},()=>{--nt||Pe.complete()}))},Pe)},Pe)}}(Pe,We,Se?nt=>function te(Ee,We){return Ee.reduce((ot,Pe,Se)=>(ot[Pe]=We[Se],ot),{})}(Se,nt):K.y));return ot?Le.pipe((0,G.Z)(ot)):Le}function we(Ee,We,ot){Ee?(0,ve.f)(ot,Ee,We):We()}},7272:(le,k,E)=>{E.d(k,{z:()=>O});var m=E(8189),F=E(3269),z=E(8996);function O(...W){return function M(){return(0,m.J)(1)}()((0,z.D)(W,(0,F.yG)(W)))}},9770:(le,k,E)=>{E.d(k,{P:()=>F});var m=E(9751),M=E(8421);function F(z){return new m.y(O=>{(0,M.Xf)(z()).subscribe(O)})}},515:(le,k,E)=>{E.d(k,{E:()=>M});const M=new(E(9751).y)(O=>O.complete())},8996:(le,k,E)=>{E.d(k,{D:()=>Se});var m=E(8421),M=E(5363),F=E(9468),W=E(9751),Q=E(2202),K=E(576),G=E(9672);function te(Le,nt){if(!Le)throw new Error("Iterable cannot be null");return new W.y(_t=>{(0,G.f)(_t,nt,()=>{const Be=Le[Symbol.asyncIterator]();(0,G.f)(_t,nt,()=>{Be.next().then(Ke=>{Ke.done?_t.complete():_t.next(Ke.value)})},0,!0)})})}var ye=E(3670),ve=E(8239),me=E(1144),Ue=E(6495),we=E(2206),Ee=E(4532),We=E(3260);function Se(Le,nt){return nt?function Pe(Le,nt){if(null!=Le){if((0,ye.c)(Le))return function z(Le,nt){return(0,m.Xf)(Le).pipe((0,F.R)(nt),(0,M.Q)(nt))}(Le,nt);if((0,me.z)(Le))return function ee(Le,nt){return new W.y(_t=>{let Be=0;return nt.schedule(function(){Be===Le.length?_t.complete():(_t.next(Le[Be++]),_t.closed||this.schedule())})})}(Le,nt);if((0,ve.t)(Le))return function O(Le,nt){return(0,m.Xf)(Le).pipe((0,F.R)(nt),(0,M.Q)(nt))}(Le,nt);if((0,we.D)(Le))return te(Le,nt);if((0,Ue.T)(Le))return function H(Le,nt){return new W.y(_t=>{let Be;return(0,G.f)(_t,nt,()=>{Be=Le[Q.h](),(0,G.f)(_t,nt,()=>{let Ke,pe;try{({value:Ke,done:pe}=Be.next())}catch(ne){return void _t.error(ne)}pe?_t.complete():_t.next(Ke)},0,!0)}),()=>(0,K.m)(Be?.return)&&Be.return()})}(Le,nt);if((0,We.L)(Le))return function ot(Le,nt){return te((0,We.Q)(Le),nt)}(Le,nt)}throw(0,Ee.z)(Le)}(Le,nt):(0,m.Xf)(Le)}},4968:(le,k,E)=>{E.d(k,{R:()=>G});var m=E(8421),M=E(9751),F=E(5577),z=E(1144),O=E(576),W=E(3268);const ee=["addListener","removeListener"],Q=["addEventListener","removeEventListener"],K=["on","off"];function G(me,Ue,we,Ee){if((0,O.m)(we)&&(Ee=we,we=void 0),Ee)return G(me,Ue,we).pipe((0,W.Z)(Ee));const[We,ot]=function ve(me){return(0,O.m)(me.addEventListener)&&(0,O.m)(me.removeEventListener)}(me)?Q.map(Pe=>Se=>me[Pe](Ue,Se,we)):function te(me){return(0,O.m)(me.addListener)&&(0,O.m)(me.removeListener)}(me)?ee.map(H(me,Ue)):function ye(me){return(0,O.m)(me.on)&&(0,O.m)(me.off)}(me)?K.map(H(me,Ue)):[];if(!We&&(0,z.z)(me))return(0,F.z)(Pe=>G(Pe,Ue,we))((0,m.Xf)(me));if(!We)throw new TypeError("Invalid event target");return new M.y(Pe=>{const Se=(...Le)=>Pe.next(1ot(Se)})}function H(me,Ue){return we=>Ee=>me[we](Ue,Ee)}},8421:(le,k,E)=>{E.d(k,{Xf:()=>ye});var m=E(655),M=E(1144),F=E(8239),z=E(9751),O=E(3670),W=E(2206),ee=E(4532),Q=E(6495),K=E(3260),G=E(576),H=E(7849),te=E(8822);function ye(Pe){if(Pe instanceof z.y)return Pe;if(null!=Pe){if((0,O.c)(Pe))return function ve(Pe){return new z.y(Se=>{const Le=Pe[te.L]();if((0,G.m)(Le.subscribe))return Le.subscribe(Se);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(Pe);if((0,M.z)(Pe))return function me(Pe){return new z.y(Se=>{for(let Le=0;Le{Pe.then(Le=>{Se.closed||(Se.next(Le),Se.complete())},Le=>Se.error(Le)).then(null,H.h)})}(Pe);if((0,W.D)(Pe))return Ee(Pe);if((0,Q.T)(Pe))return function we(Pe){return new z.y(Se=>{for(const Le of Pe)if(Se.next(Le),Se.closed)return;Se.complete()})}(Pe);if((0,K.L)(Pe))return function We(Pe){return Ee((0,K.Q)(Pe))}(Pe)}throw(0,ee.z)(Pe)}function Ee(Pe){return new z.y(Se=>{(function ot(Pe,Se){var Le,nt,_t,Be;return(0,m.mG)(this,void 0,void 0,function*(){try{for(Le=(0,m.KL)(Pe);!(nt=yield Le.next()).done;)if(Se.next(nt.value),Se.closed)return}catch(Ke){_t={error:Ke}}finally{try{nt&&!nt.done&&(Be=Le.return)&&(yield Be.call(Le))}finally{if(_t)throw _t.error}}Se.complete()})})(Pe,Se).catch(Le=>Se.error(Le))})}},6451:(le,k,E)=>{E.d(k,{T:()=>W});var m=E(8189),M=E(8421),F=E(515),z=E(3269),O=E(8996);function W(...ee){const Q=(0,z.yG)(ee),K=(0,z._6)(ee,1/0),G=ee;return G.length?1===G.length?(0,M.Xf)(G[0]):(0,m.J)(K)((0,O.D)(G,Q)):F.E}},9646:(le,k,E)=>{E.d(k,{of:()=>F});var m=E(3269),M=E(8996);function F(...z){const O=(0,m.yG)(z);return(0,M.D)(z,O)}},2843:(le,k,E)=>{E.d(k,{_:()=>F});var m=E(9751),M=E(576);function F(z,O){const W=(0,M.m)(z)?z:()=>z,ee=Q=>Q.error(W());return new m.y(O?Q=>O.schedule(ee,0,Q):ee)}},2805:(le,k,E)=>{E.d(k,{H:()=>O});var m=E(9751),M=E(4986),F=E(3532),z=E(1165);function O(W=0,ee,Q=M.P){let K=-1;return null!=ee&&((0,F.K)(ee)?Q=ee:K=ee),new m.y(G=>{let H=(0,z.q)(W)?+W-Q.now():W;H<0&&(H=0);let te=0;return Q.schedule(function(){G.closed||(G.next(te++),0<=K?this.schedule(void 0,K):G.complete())},H)})}},5403:(le,k,E)=>{E.d(k,{Q:()=>F,x:()=>M});var m=E(930);function M(z,O,W,ee,Q){return new F(z,O,W,ee,Q)}class F extends m.Lv{constructor(O,W,ee,Q,K,G){super(O),this.onFinalize=K,this.shouldUnsubscribe=G,this._next=W?function(H){try{W(H)}catch(te){O.error(te)}}:super._next,this._error=Q?function(H){try{Q(H)}catch(te){O.error(te)}finally{this.unsubscribe()}}:super._error,this._complete=ee?function(){try{ee()}catch(H){O.error(H)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var O;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:W}=this;super.unsubscribe(),!W&&(null===(O=this.onFinalize)||void 0===O||O.call(this))}}}},262:(le,k,E)=>{E.d(k,{K:()=>z});var m=E(8421),M=E(5403),F=E(4482);function z(O){return(0,F.e)((W,ee)=>{let G,Q=null,K=!1;Q=W.subscribe((0,M.x)(ee,void 0,void 0,H=>{G=(0,m.Xf)(O(H,z(O)(W))),Q?(Q.unsubscribe(),Q=null,G.subscribe(ee)):K=!0})),K&&(Q.unsubscribe(),Q=null,G.subscribe(ee))})}},4351:(le,k,E)=>{E.d(k,{b:()=>F});var m=E(5577),M=E(576);function F(z,O){return(0,M.m)(O)?(0,m.z)(z,O,1):(0,m.z)(z,1)}},8372:(le,k,E)=>{E.d(k,{b:()=>z});var m=E(4986),M=E(4482),F=E(5403);function z(O,W=m.z){return(0,M.e)((ee,Q)=>{let K=null,G=null,H=null;const te=()=>{if(K){K.unsubscribe(),K=null;const ve=G;G=null,Q.next(ve)}};function ye(){const ve=H+O,me=W.now();if(me{G=ve,H=W.now(),K||(K=W.schedule(ye,O),Q.add(K))},()=>{te(),Q.complete()},void 0,()=>{G=K=null}))})}},9300:(le,k,E)=>{E.d(k,{h:()=>F});var m=E(4482),M=E(5403);function F(z,O){return(0,m.e)((W,ee)=>{let Q=0;W.subscribe((0,M.x)(ee,K=>z.call(O,K,Q++)&&ee.next(K)))})}},4004:(le,k,E)=>{E.d(k,{U:()=>F});var m=E(4482),M=E(5403);function F(z,O){return(0,m.e)((W,ee)=>{let Q=0;W.subscribe((0,M.x)(ee,K=>{ee.next(z.call(O,K,Q++))}))})}},9718:(le,k,E)=>{E.d(k,{h:()=>M});var m=E(4004);function M(F){return(0,m.U)(()=>F)}},8189:(le,k,E)=>{E.d(k,{J:()=>F});var m=E(5577),M=E(4671);function F(z=1/0){return(0,m.z)(M.y,z)}},5577:(le,k,E)=>{E.d(k,{z:()=>Q});var m=E(4004),M=E(8421),F=E(4482),z=E(9672),O=E(5403),ee=E(576);function Q(K,G,H=1/0){return(0,ee.m)(G)?Q((te,ye)=>(0,m.U)((ve,me)=>G(te,ve,ye,me))((0,M.Xf)(K(te,ye))),H):("number"==typeof G&&(H=G),(0,F.e)((te,ye)=>function W(K,G,H,te,ye,ve,me,Ue){const we=[];let Ee=0,We=0,ot=!1;const Pe=()=>{ot&&!we.length&&!Ee&&G.complete()},Se=nt=>Ee{ve&&G.next(nt),Ee++;let _t=!1;(0,M.Xf)(H(nt,We++)).subscribe((0,O.x)(G,Be=>{ye?.(Be),ve?Se(Be):G.next(Be)},()=>{_t=!0},void 0,()=>{if(_t)try{for(Ee--;we.length&&EeLe(Be)):Le(Be)}Pe()}catch(Be){G.error(Be)}}))};return K.subscribe((0,O.x)(G,Se,()=>{ot=!0,Pe()})),()=>{Ue?.()}}(te,ye,K,H)))}},5363:(le,k,E)=>{E.d(k,{Q:()=>z});var m=E(9672),M=E(4482),F=E(5403);function z(O,W=0){return(0,M.e)((ee,Q)=>{ee.subscribe((0,F.x)(Q,K=>(0,m.f)(Q,O,()=>Q.next(K),W),()=>(0,m.f)(Q,O,()=>Q.complete(),W),K=>(0,m.f)(Q,O,()=>Q.error(K),W)))})}},8343:(le,k,E)=>{E.d(k,{x:()=>F});var m=E(4482),M=E(5403);function F(){return(0,m.e)((z,O)=>{let W=null;z._refCount++;const ee=(0,M.x)(O,void 0,void 0,void 0,()=>{if(!z||z._refCount<=0||0<--z._refCount)return void(W=null);const Q=z._connection,K=W;W=null,Q&&(!K||Q===K)&&Q.unsubscribe(),O.unsubscribe()});z.subscribe(ee),ee.closed||(W=z.connect())})}},5026:(le,k,E)=>{E.d(k,{R:()=>z});var m=E(4482),M=E(5403);function F(O,W,ee,Q,K){return(G,H)=>{let te=ee,ye=W,ve=0;G.subscribe((0,M.x)(H,me=>{const Ue=ve++;ye=te?O(ye,me,Ue):(te=!0,me),Q&&H.next(ye)},K&&(()=>{te&&H.next(ye),H.complete()})))}}function z(O,W){return(0,m.e)(F(O,W,arguments.length>=2,!0))}},3099:(le,k,E)=>{E.d(k,{B:()=>O});var m=E(8421),M=E(7579),F=E(930),z=E(4482);function O(ee={}){const{connector:Q=(()=>new M.x),resetOnError:K=!0,resetOnComplete:G=!0,resetOnRefCountZero:H=!0}=ee;return te=>{let ye,ve,me,Ue=0,we=!1,Ee=!1;const We=()=>{ve?.unsubscribe(),ve=void 0},ot=()=>{We(),ye=me=void 0,we=Ee=!1},Pe=()=>{const Se=ye;ot(),Se?.unsubscribe()};return(0,z.e)((Se,Le)=>{Ue++,!Ee&&!we&&We();const nt=me=me??Q();Le.add(()=>{Ue--,0===Ue&&!Ee&&!we&&(ve=W(Pe,H))}),nt.subscribe(Le),!ye&&Ue>0&&(ye=new F.Hp({next:_t=>nt.next(_t),error:_t=>{Ee=!0,We(),ve=W(ot,K,_t),nt.error(_t)},complete:()=>{we=!0,We(),ve=W(ot,G),nt.complete()}}),(0,m.Xf)(Se).subscribe(ye))})(te)}}function W(ee,Q,...K){if(!0===Q)return void ee();if(!1===Q)return;const G=new F.Hp({next:()=>{G.unsubscribe(),ee()}});return Q(...K).subscribe(G)}},5684:(le,k,E)=>{E.d(k,{T:()=>M});var m=E(9300);function M(F){return(0,m.h)((z,O)=>F<=O)}},8675:(le,k,E)=>{E.d(k,{O:()=>z});var m=E(7272),M=E(3269),F=E(4482);function z(...O){const W=(0,M.yG)(O);return(0,F.e)((ee,Q)=>{(W?(0,m.z)(O,ee,W):(0,m.z)(O,ee)).subscribe(Q)})}},9468:(le,k,E)=>{E.d(k,{R:()=>M});var m=E(4482);function M(F,z=0){return(0,m.e)((O,W)=>{W.add(F.schedule(()=>O.subscribe(W),z))})}},3900:(le,k,E)=>{E.d(k,{w:()=>z});var m=E(8421),M=E(4482),F=E(5403);function z(O,W){return(0,M.e)((ee,Q)=>{let K=null,G=0,H=!1;const te=()=>H&&!K&&Q.complete();ee.subscribe((0,F.x)(Q,ye=>{K?.unsubscribe();let ve=0;const me=G++;(0,m.Xf)(O(ye,me)).subscribe(K=(0,F.x)(Q,Ue=>Q.next(W?W(ye,Ue,me,ve++):Ue),()=>{K=null,te()}))},()=>{H=!0,te()}))})}},5698:(le,k,E)=>{E.d(k,{q:()=>z});var m=E(515),M=E(4482),F=E(5403);function z(O){return O<=0?()=>m.E:(0,M.e)((W,ee)=>{let Q=0;W.subscribe((0,F.x)(ee,K=>{++Q<=O&&(ee.next(K),O<=Q&&ee.complete())}))})}},2722:(le,k,E)=>{E.d(k,{R:()=>O});var m=E(4482),M=E(5403),F=E(8421),z=E(5032);function O(W){return(0,m.e)((ee,Q)=>{(0,F.Xf)(W).subscribe((0,M.x)(Q,()=>Q.complete(),z.Z)),!Q.closed&&ee.subscribe(Q)})}},8505:(le,k,E)=>{E.d(k,{b:()=>O});var m=E(576),M=E(4482),F=E(5403),z=E(4671);function O(W,ee,Q){const K=(0,m.m)(W)||ee||Q?{next:W,error:ee,complete:Q}:W;return K?(0,M.e)((G,H)=>{var te;null===(te=K.subscribe)||void 0===te||te.call(K);let ye=!0;G.subscribe((0,F.x)(H,ve=>{var me;null===(me=K.next)||void 0===me||me.call(K,ve),H.next(ve)},()=>{var ve;ye=!1,null===(ve=K.complete)||void 0===ve||ve.call(K),H.complete()},ve=>{var me;ye=!1,null===(me=K.error)||void 0===me||me.call(K,ve),H.error(ve)},()=>{var ve,me;ye&&(null===(ve=K.unsubscribe)||void 0===ve||ve.call(K)),null===(me=K.finalize)||void 0===me||me.call(K)}))}):z.y}},7414:(le,k,E)=>{E.d(k,{V:()=>K});var m=E(4986),M=E(1165),F=E(4482),z=E(8421),O=E(3888),W=E(5403),ee=E(9672);const Q=(0,O.d)(H=>function(ye=null){H(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=ye});function K(H,te){const{first:ye,each:ve,with:me=G,scheduler:Ue=te??m.z,meta:we=null}=(0,M.q)(H)?{first:H}:"number"==typeof H?{each:H}:H;if(null==ye&&null==ve)throw new TypeError("No timeout provided.");return(0,F.e)((Ee,We)=>{let ot,Pe,Se=null,Le=0;const nt=_t=>{Pe=(0,ee.f)(We,Ue,()=>{try{ot.unsubscribe(),(0,z.Xf)(me({meta:we,lastValue:Se,seen:Le})).subscribe(We)}catch(Be){We.error(Be)}},_t)};ot=Ee.subscribe((0,W.x)(We,_t=>{Pe?.unsubscribe(),Le++,We.next(Se=_t),ve>0&&nt(ve)},void 0,void 0,()=>{Pe?.closed||Pe?.unsubscribe(),Se=null})),!Le&&nt(null!=ye?"number"==typeof ye?ye:+ye-Ue.now():ve)})}function G(H){throw new Q(H)}},1365:(le,k,E)=>{E.d(k,{M:()=>ee});var m=E(4482),M=E(5403),F=E(8421),z=E(4671),O=E(5032),W=E(3269);function ee(...Q){const K=(0,W.jO)(Q);return(0,m.e)((G,H)=>{const te=Q.length,ye=new Array(te);let ve=Q.map(()=>!1),me=!1;for(let Ue=0;Ue{ye[Ue]=we,!me&&!ve[Ue]&&(ve[Ue]=!0,(me=ve.every(z.y))&&(ve=null))},O.Z));G.subscribe((0,M.x)(H,Ue=>{if(me){const we=[Ue,...ye];H.next(K?K(...we):we)}}))})}},4408:(le,k,E)=>{E.d(k,{o:()=>O});var m=E(727);class M extends m.w0{constructor(ee,Q){super()}schedule(ee,Q=0){return this}}const F={setInterval(W,ee,...Q){const{delegate:K}=F;return K?.setInterval?K.setInterval(W,ee,...Q):setInterval(W,ee,...Q)},clearInterval(W){const{delegate:ee}=F;return(ee?.clearInterval||clearInterval)(W)},delegate:void 0};var z=E(8737);class O extends M{constructor(ee,Q){super(ee,Q),this.scheduler=ee,this.work=Q,this.pending=!1}schedule(ee,Q=0){var K;if(this.closed)return this;this.state=ee;const G=this.id,H=this.scheduler;return null!=G&&(this.id=this.recycleAsyncId(H,G,Q)),this.pending=!0,this.delay=Q,this.id=null!==(K=this.id)&&void 0!==K?K:this.requestAsyncId(H,this.id,Q),this}requestAsyncId(ee,Q,K=0){return F.setInterval(ee.flush.bind(ee,this),K)}recycleAsyncId(ee,Q,K=0){if(null!=K&&this.delay===K&&!1===this.pending)return Q;null!=Q&&F.clearInterval(Q)}execute(ee,Q){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const K=this._execute(ee,Q);if(K)return K;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(ee,Q){let G,K=!1;try{this.work(ee)}catch(H){K=!0,G=H||new Error("Scheduled action threw falsy error")}if(K)return this.unsubscribe(),G}unsubscribe(){if(!this.closed){const{id:ee,scheduler:Q}=this,{actions:K}=Q;this.work=this.state=this.scheduler=null,this.pending=!1,(0,z.P)(K,this),null!=ee&&(this.id=this.recycleAsyncId(Q,ee,null)),this.delay=null,super.unsubscribe()}}}},7565:(le,k,E)=>{E.d(k,{v:()=>F});var m=E(6063);class M{constructor(O,W=M.now){this.schedulerActionCtor=O,this.now=W}schedule(O,W=0,ee){return new this.schedulerActionCtor(this,O).schedule(ee,W)}}M.now=m.l.now;class F extends M{constructor(O,W=M.now){super(O,W),this.actions=[],this._active=!1}flush(O){const{actions:W}=this;if(this._active)return void W.push(O);let ee;this._active=!0;do{if(ee=O.execute(O.state,O.delay))break}while(O=W.shift());if(this._active=!1,ee){for(;O=W.shift();)O.unsubscribe();throw ee}}}},4986:(le,k,E)=>{E.d(k,{P:()=>z,z:()=>F});var m=E(4408);const F=new(E(7565).v)(m.o),z=F},6063:(le,k,E)=>{E.d(k,{l:()=>m});const m={now:()=>(m.delegate||Date).now(),delegate:void 0}},233:(le,k,E)=>{E.d(k,{N:()=>O});var m=E(4408),F=E(7565);const O=new class z extends F.v{}(class M extends m.o{constructor(Q,K){super(Q,K),this.scheduler=Q,this.work=K}schedule(Q,K=0){return K>0?super.schedule(Q,K):(this.delay=K,this.state=Q,this.scheduler.flush(this),this)}execute(Q,K){return K>0||this.closed?super.execute(Q,K):this._execute(Q,K)}requestAsyncId(Q,K,G=0){return null!=G&&G>0||null==G&&this.delay>0?super.requestAsyncId(Q,K,G):(Q.flush(this),0)}})},3410:(le,k,E)=>{E.d(k,{z:()=>m});const m={setTimeout(M,F,...z){const{delegate:O}=m;return O?.setTimeout?O.setTimeout(M,F,...z):setTimeout(M,F,...z)},clearTimeout(M){const{delegate:F}=m;return(F?.clearTimeout||clearTimeout)(M)},delegate:void 0}},2202:(le,k,E)=>{E.d(k,{h:()=>M});const M=function m(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},8822:(le,k,E)=>{E.d(k,{L:()=>m});const m="function"==typeof Symbol&&Symbol.observable||"@@observable"},3269:(le,k,E)=>{E.d(k,{_6:()=>W,jO:()=>z,yG:()=>O});var m=E(576),M=E(3532);function F(ee){return ee[ee.length-1]}function z(ee){return(0,m.m)(F(ee))?ee.pop():void 0}function O(ee){return(0,M.K)(F(ee))?ee.pop():void 0}function W(ee,Q){return"number"==typeof F(ee)?ee.pop():Q}},8737:(le,k,E)=>{function m(M,F){if(M){const z=M.indexOf(F);0<=z&&M.splice(z,1)}}E.d(k,{P:()=>m})},3888:(le,k,E)=>{function m(M){const z=M(O=>{Error.call(O),O.stack=(new Error).stack});return z.prototype=Object.create(Error.prototype),z.prototype.constructor=z,z}E.d(k,{d:()=>m})},2806:(le,k,E)=>{E.d(k,{O:()=>z,x:()=>F});var m=E(2416);let M=null;function F(O){if(m.v.useDeprecatedSynchronousErrorHandling){const W=!M;if(W&&(M={errorThrown:!1,error:null}),O(),W){const{errorThrown:ee,error:Q}=M;if(M=null,ee)throw Q}}else O()}function z(O){m.v.useDeprecatedSynchronousErrorHandling&&M&&(M.errorThrown=!0,M.error=O)}},9672:(le,k,E)=>{function m(M,F,z,O=0,W=!1){const ee=F.schedule(function(){z(),W?M.add(this.schedule(null,O)):this.unsubscribe()},O);if(M.add(ee),!W)return ee}E.d(k,{f:()=>m})},4671:(le,k,E)=>{function m(M){return M}E.d(k,{y:()=>m})},1144:(le,k,E)=>{E.d(k,{z:()=>m});const m=M=>M&&"number"==typeof M.length&&"function"!=typeof M},2206:(le,k,E)=>{E.d(k,{D:()=>M});var m=E(576);function M(F){return Symbol.asyncIterator&&(0,m.m)(F?.[Symbol.asyncIterator])}},1165:(le,k,E)=>{function m(M){return M instanceof Date&&!isNaN(M)}E.d(k,{q:()=>m})},576:(le,k,E)=>{function m(M){return"function"==typeof M}E.d(k,{m:()=>m})},3670:(le,k,E)=>{E.d(k,{c:()=>F});var m=E(8822),M=E(576);function F(z){return(0,M.m)(z[m.L])}},6495:(le,k,E)=>{E.d(k,{T:()=>F});var m=E(2202),M=E(576);function F(z){return(0,M.m)(z?.[m.h])}},8239:(le,k,E)=>{E.d(k,{t:()=>M});var m=E(576);function M(F){return(0,m.m)(F?.then)}},3260:(le,k,E)=>{E.d(k,{L:()=>z,Q:()=>F});var m=E(655),M=E(576);function F(O){return(0,m.FC)(this,arguments,function*(){const ee=O.getReader();try{for(;;){const{value:Q,done:K}=yield(0,m.qq)(ee.read());if(K)return yield(0,m.qq)(void 0);yield yield(0,m.qq)(Q)}}finally{ee.releaseLock()}})}function z(O){return(0,M.m)(O?.getReader)}},3532:(le,k,E)=>{E.d(k,{K:()=>M});var m=E(576);function M(F){return F&&(0,m.m)(F.schedule)}},4482:(le,k,E)=>{E.d(k,{A:()=>M,e:()=>F});var m=E(576);function M(z){return(0,m.m)(z?.lift)}function F(z){return O=>{if(M(O))return O.lift(function(W){try{return z(W,this)}catch(ee){this.error(ee)}});throw new TypeError("Unable to lift unknown Observable type")}}},3268:(le,k,E)=>{E.d(k,{Z:()=>z});var m=E(4004);const{isArray:M}=Array;function z(O){return(0,m.U)(W=>function F(O,W){return M(W)?O(...W):O(W)}(O,W))}},5032:(le,k,E)=>{function m(){}E.d(k,{Z:()=>m})},9635:(le,k,E)=>{E.d(k,{U:()=>F,z:()=>M});var m=E(4671);function M(...z){return F(z)}function F(z){return 0===z.length?m.y:1===z.length?z[0]:function(W){return z.reduce((ee,Q)=>Q(ee),W)}}},7849:(le,k,E)=>{E.d(k,{h:()=>F});var m=E(2416),M=E(3410);function F(z){M.z.setTimeout(()=>{const{onUnhandledError:O}=m.v;if(!O)throw z;O(z)})}},4532:(le,k,E)=>{function m(M){return new TypeError(`You provided ${null!==M&&"object"==typeof M?"an invalid object":`'${M}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}E.d(k,{z:()=>m})},6922:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.BASE_LAYOUT=void 0,k.BASE_LAYOUT=[[0,1,2,3,4,5,6,7,8],[9,10,11,12,13,14,15,16,17],[18,19,20,21,22,23,24,25,26],[27,28,29,30,31,32,33,34,35],[36,37,38,39,40,41,42,43,44],[45,46,47,48,49,50,51,52,53],[54,55,56,57,58,59,60,61,62],[63,64,65,66,67,68,69,70,71],[72,73,74,75,76,77,78,79,80]]},3738:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.DIFFICULTY_LEVELS=void 0,k.DIFFICULTY_LEVELS=Object.keys({easy:void 0,medium:void 0,hard:void 0,expert:void 0})},2458:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.SEEDS=void 0,k.SEEDS=[{puzzle:"g--d--caf---g----ii-f--hg-bb-iaedhgc--afcg--d-g-b-----f-d--abc---b------c--h-bfia",solution:"gbhdiecafacegbfdhiidfcahgebbfiaedhgcehafcgibddgcbhiafefidegabchhabifcedgceghdbfia",difficulty:"easy"},{puzzle:"bf-hiac-g-gi------a-hf-g---g-a-fi--ddef---i-b--b-a-g-ff---gbh--hac---------e-cfd-",solution:"bfdhiacegegicbdafhachfegdbighabfiecddefgchiabcibdaeghffdeagbhichacidfbgeibgehcfda",difficulty:"easy"},{puzzle:"hgad-e--b-cbf-ge---df-aih-----i-------d-ecai-g---fa----igadf----fe-i-----h-eg-fd-",solution:"hgadceifbicbfhgeadedfbaihcgcahibdgeffbdgecaihgeihfadbcbigadfchedfecihbgaahcegbfdi",difficulty:"easy"},{puzzle:"-fbe-c----e-----a---g-ihb--gb-fhdc-eid-g-eahbch-----f-----ef-ga-g----e-i--hi-----",solution:"afbegcidhheidfbgacdcgaihbefgbafhdcieidfgceahbchebaidfgbidcefhgafgchdaebieahibgfcd",difficulty:"easy"},{puzzle:"c--d-fgeb---g--i-hg-ih--da-a-g-b-cde-edc--a--b--------i-e-cd-ha-fb-h-e-ch--e-----",solution:"cahdifgebedfgabichgbihecdafahgfbicdefedcghabibicadehfgigebcdfhadfbihaegchcaefgbid",difficulty:"easy"},{puzzle:"bi---ec--eg--h-fbdf--------i-hba-dfe----ehbig--bf-d-h--f-e-a-c-----g-e--cde--f--a",solution:"bidgfecahegcahifbdfhadcbgeiichbagdfedafcehbiggebfidahchfgedaicbabihgcedfcdeibfhga",difficulty:"easy"},{puzzle:"-----ef-ha--bf--ecfe-gc---a----gbch--a--df-b--bi----f-h-af-gidbdf----g--i--c--ha-",solution:"bicdaefghahgbfidecfedgchbiaedfagbchicahidfebggbiehcafdhcafegidbdfbhiagceigecbdhaf",difficulty:"easy"},{puzzle:"--fg--hec-ebc-------h-dfgabb--h-a-fg-g-df-i--f-a---b--hf----ad---if----hc-ea---bi",solution:"dafgbihecgebcahdifichedfgabbidhcaefgegcdfbihafhaigebcdhfgbicadeabifedcghcdeahgfbi",difficulty:"easy"},{puzzle:"-----b-f-e-aih----bi----a----e---i---g-bf--a-----cihg-ic-fdhg-a--h---f-cgef-iad-b",solution:"dhcgabefiefaihcbdgbigdefachcaehgdibfhgibfecadfbdacihgeicbfdhgeaadhebgficgefciadhb",difficulty:"easy"},{puzzle:"e--f-b-------eid-f--h----b-ge-c-fadhab-ihgfe-hc--d----d-g---cf---eg--h-bf---i----",solution:"edcfgbihabgaheidcfifhdcaebggeicbfadhabdihgfechcfadebgidigbahcfecaegfdhibfhbeicgad",difficulty:"easy"},{puzzle:"g-hedcf---i-f--a--e--a-----c--i-deh-i-------g--g--e---a----f--c-cf-e-gi-b-------e",solution:"gahedcfbidicfbgaehefbaihcgdcbaigdehfihebfadcgfdghceiabaeighfbdchcfdebgiabgdcaihfe",difficulty:"medium"},{puzzle:"-di--ac---b-cid-h---h--b-d-----f----h-d----fca---c-i--d----i-e-bh---cd-g-g---fac-",solution:"fdighacbeebgcidfhacahfebgdigecifhbadhidabgefcafbdceighdcabgihefbhfeacdigigehdfacb",difficulty:"medium"},{puzzle:"--ac-i------ah-d---e----i---a-e-bc----g--f--ad---gae--ig-fa------hd-e-g-c-d-b----",solution:"hdaceigfbbifahgdcegecbfdiahfaiedbchgehgicfbdadcbhgaeifigefachbdabhdiefgccfdgbhaei",difficulty:"medium"},{puzzle:"fg----i---h--f-e--e-bd--afh-f--hg--ic------b----f-c-----c-------eiac-gdf-b-----e-",solution:"fgaebhicdihdcfaegbecbdgiafhdfebhgcaicahidefbgbigfacdhegdchefbiaheiacbgdfabfgidhec",difficulty:"medium"},{puzzle:"--d-g-fi---e-ci-d-a----eg-----i---f---bg--ec-e--d--haig----f----ha--------ch-g-e-",solution:"cbdaghfiehgefciadbaifbdeghcdahiecbfgifbghaecdecgdfbhaigeicafdbhbhaeidcgffdchbgiea",difficulty:"medium"},{puzzle:"----d-a---a-ie---di------h-d-e--cg-b-b-e--i----c-i--dh--h-gf--c------b-g--i-ce-a-",solution:"ehfcdgabicabiehfgdigdfbachediehacgfbhbgefdicaafcgibedhbehagfdicfcadhibeggdibcehaf",difficulty:"medium"},{puzzle:"---cfa-ibf---i-------g---f--i--h-cd-gdf--------cd--fb-------bc--gb---dhi---he--g-",solution:"dhecfagibfbgeidhaccaigbhefdbiafhecdggdfbaciehhecdgifbaafhidgbceegbacfdhiicdhebagf",difficulty:"medium"},{puzzle:"a------g-b--di-a-f--e--ahi----a------bae--------ichbaei---de------c-igd-d-h----ci",solution:"aidhefcgbbhgdicaeffcebgahidheiabgdfccbaefdihggdfichbaeiacgdefbhefbchigdadghfabeci",difficulty:"medium"},{puzzle:"----g-------ci--bg-i-de-af-------beh-----fgdi---eb-f----ah--ig---hg-d---cd--a----",solution:"hacfgbdieefdciahbggibdehafcagfidcbehbceahfgdidhiebgfcafbahceigdiehgfdcabcdgbaiehf",difficulty:"medium"},{puzzle:"gfbc---dh-a-------d--a--fi--daifc--ech------f-------c-f---e--b---d-----i--igh-d--",solution:"gfbcieadhiahbdfcegdceaghfibbdaifcghechgebdiafeifhagbcdfgcdeihbahbdfcaegiaeighbdfc",difficulty:"medium"},{puzzle:"-e-fh--a-g----ed---a--b-f---ih----dc--------a----g----b---i---dhc-gf-----g------e",solution:"debfhciagghfiaedcbcaidbgfehaihbefgdcfbgcdiehaedchgabifbfaeihcgdhcegfdabiigdacbhfe",difficulty:"hard"},{puzzle:"----i-b---fc--a-h-eb----i-fcieg--ad---hd-e----d--a----f---b-e-i-------b--h--e----",solution:"hageifbcdifcbdagheebdchgiafciegfbadhaghdcefibbdfiahcegfcahbdegideifgchbaghbaeidfc",difficulty:"hard"},{puzzle:"-------hg-----h-d-a-g---ei--ce--dg--dbf---------bfid--hg---f----d--h---c--a-eg---",solution:"bedfiachgficeghbdaahgdbceificehadgfbdbfgceiahgahbfidcehgbcdfaeiediahbfgccfaieghbd",difficulty:"hard"},{puzzle:"h---f------------i--e---a-h-dhe---a---fh-b----i--c---gf-ga-di--a-i---d-bce------a",solution:"hgcifabdedabgehfciifebdcaghbdheigcafgcfhabeideiadcfhbgfbgahdiecahicgedfbcedfbigha",difficulty:"hard"},{puzzle:"f----dha----b------a------dic---h------c--egb-----------a-----ed--f-ec-g-fg------",solution:"febigdhachdcbfageigaiehcbfdicegbhadfahfcdiegbbgdaefichcbadigfhedihfaecbgefghcbdia",difficulty:"hard"},{puzzle:"c-a---i---b--c--ede----g--c-e---dga--c---b--i--gf-----b-----ei------a-cg--ie----a",solution:"cfahdeigbgbhacifedeidbfgahchebcidgafacfgebhdiidgfahcbebacdgfeihfheibadcgdgiehcbfa",difficulty:"hard"},{puzzle:"--a-i---cc-g-------h--e--a--a---ib---d--f--h-----------i---d-f------g-c-dg---b--h",solution:"beagifhdccfghdaibeihdbecfaghafcgibedgdbafechiecidbhagfaihecdgfbfbeihgdcadgcfabeih",difficulty:"hard"},{puzzle:"i--f--ec------a-fbg-b-i---h-d---ihg-----b---fe---a------d-----i---ie-b-------g---",solution:"iahfdbecgdcehgaifbgfbeicdahbdacfihgechgdbeaifeifgahcbdhbdacfgeifgciedbhaaeibhgfdc",difficulty:"hard"},{puzzle:"--e---c------i--g-------d-hbaf--------cfhe--ie------f-h-d-c-----f-h----c---i-ga--",solution:"fdegbhciaacheidfgbibgcfadehbafdgihcedgcfhebaiehibacgfdhidacfebggfahebidccebidgahf",difficulty:"hard"},{puzzle:"--f-d-i---g--b-a-d--c-a-----c-i---e---eh--g---------ac---------b---i-e----gf--d--",solution:"abfcdhigehgiebfacddecgaibhfgcdifahebfaehcbgdiihbdegfacefabgdcihbdhaicefgcigfhedba",difficulty:"hard"},{puzzle:"-ica------------bh----g--f--g---a---i-e----c-a---f------d--bg------c---e-fg----id",solution:"ficabhdeggeaidfcbhdhbegcifabgfceahdiidebhgacfachdfiegbeadfibghchbigcdfaecfghaebid",difficulty:"expert"},{puzzle:"-h-i------i---------f--bh--b---a--ed-ca------i--f---h--------c----he--f-ab--df---",solution:"ehbicdgafdigafhcbecafegbhdibghcaifedfcadheigbiedfbgahchfebiadcggdihecbfaabcgdfeih",difficulty:"expert"},{puzzle:"-h--c-f-ice-------b--ia--------g-h------e---ff--h---i----b---eh----------ga--f--c",solution:"ahgdcefbiceigfbahdbfdiahcgediefgchabgbhaeidcffachbdeigicfbdagehedbchgifahgaeifbdc",difficulty:"expert"},{puzzle:"a----db---g-c----f--e-f--i---------i----h-f-d--g---ch---b--e-c-ca------h-d-------",solution:"afchidbegigdcebhafhbegfadicfehdgcabibcaehifgddigbafcheghbfdeicacafibgedhediachgfb",difficulty:"expert"},{puzzle:"------c--g-b--a---------g-h---e----gb--id-----i-f---eb----i---c-he-f-d--a------h-",solution:"edhbgicfagfbchaeidicadefgbhhafebcidgbegidhacfdicfaghebfgdhiebaccheafbdgiabigcdfhe",difficulty:"expert"},{puzzle:"---bf-i-------hc-aa----------g------h--c-e----i----bh----f---g--f-----e---hig-a--",solution:"chebfaidgfgdeihcbaabidcgefhbeghdifachafcbegiddicgafbheicafedhgbgfbahcdeiedhigbacf",difficulty:"expert"},{puzzle:"--c-----d---g-i--h-i----b--ace------d--bh----b--f---------e---------bea--d--a--c-",solution:"gecabhifdfbagdicehhidefcbgaaceigdhbfdgfbheaicbhifcagdeiagcefdhbcfhdibeagedbhagfci",difficulty:"expert"},{puzzle:"-----d-h--h-----a-gb------i-----a--g----eh-c--i--d-----ge---a--d----f-----ab--i--",solution:"iacefdghbehdgibcafgbfhacedicehfbadigfdgiehbcaaibcdgfehbgedhiafcdciagfhbehfabceigd",difficulty:"expert"},{puzzle:"-bi-------c----e---------af---eba-----a-i-g------c--i----h-e--d-e------gc-b--f---",solution:"fbiaegdhcachdfbegiedgchibafgicebafdhbhafidgcedfegchaibiafhgecbdhedbacifgcgbidfhea",difficulty:"expert"},{puzzle:"---i--h-bc----b----g----a----gd-----e--h-f------b---ac-c------ha-----id--i--gd---",solution:"deficahgbchagfbdeibgiedhacffagdicbheebchafgididhbegfacgcdabiefhafbcheidghiefgdcba",difficulty:"expert"}]},5697:(le,k,E)=>{k.V=void 0;var M=E(3040);Object.defineProperty(k,"V",{enumerable:!0,get:function(){return M.getSudoku}})},3040:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.getSudoku=void 0;const m=E(6922),M=E(3738),F=E(964),z=E(1962),O=E(5590),W=E(9229),ee=E(2458),Q=E(1178);k.getSudoku=G=>{if(G&&!Q.validateDifficulty(G))throw new Error(`Invalid difficulty, expected one of: ${M.DIFFICULTY_LEVELS.join(", ")}`);const H=z.getSeed(ee.SEEDS,G),te=F.getLayout(m.BASE_LAYOUT),ye=W.getTokenMap();return{puzzle:O.getSequence(te,H.puzzle,ye),solution:O.getSequence(te,H.solution,ye),difficulty:H.difficulty}}},9079:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.boardToSequence=void 0,k.boardToSequence=m=>m.map(M=>M.join("")).join("")},7848:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.getRandomItem=void 0,k.getRandomItem=m=>m[Math.floor(Math.random()*m.length)]},5590:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.getSequence=void 0;const m=E(9079),M=E(6175),F=E(6947);k.getSequence=(O,W,ee)=>m.boardToSequence(M.populateLayout(O,F.replaceTokens(W,ee)))},6947:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.replaceTokens=void 0,k.replaceTokens=(m,M)=>m.split("").map(F=>M[F]||F).join("")},637:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.sortRandom=void 0,k.sortRandom=()=>Math.random()<.5?1:-1},6989:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.getLayoutBands=void 0,k.getLayoutBands=m=>[[m[0],m[1],m[2]],[m[3],m[4],m[5]],[m[6],m[7],m[8]]]},964:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.getLayout=void 0;const m=E(5484),M=E(8294);k.getLayout=z=>M.shuffleLayout(m.rotateLayout(z))},6175:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.populateLayout=void 0,k.populateLayout=(m,M)=>m.map(F=>F.map(z=>M[z]))},8515:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.rotateLayout0=void 0,k.rotateLayout0=m=>m},8178:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.rotateLayout180=void 0,k.rotateLayout180=m=>m.map(M=>[...M].reverse()).reverse()},4140:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.rotateLayout270=void 0,k.rotateLayout270=m=>m[0].map((M,F)=>m.map(z=>[...z].reverse()[F]))},4786:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.rotateLayout90=void 0,k.rotateLayout90=m=>m[0].map((M,F)=>m.map(z=>z[F]).reverse())},5484:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.rotateLayout=void 0;const m=E(7848),M=E(8515),F=E(8178),z=E(4140),O=E(4786);k.rotateLayout=ee=>m.getRandomItem([M.rotateLayout0,O.rotateLayout90,F.rotateLayout180,z.rotateLayout270])(ee)},6326:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.shuffleLayoutBands=void 0;const m=E(6989),M=E(637);k.shuffleLayoutBands=z=>m.getLayoutBands(z).sort(M.sortRandom).flat()},2292:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.shuffleLayoutColumns=void 0;const m=E(4140),M=E(4786),F=E(7967);k.shuffleLayoutColumns=O=>m.rotateLayout270(F.shuffleLayoutRows(M.rotateLayout90(O)))},7967:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.shuffleLayoutRows=void 0;const m=E(6989),M=E(637);k.shuffleLayoutRows=z=>m.getLayoutBands(z).map(O=>O.sort(M.sortRandom)).flat()},8974:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.shuffleLayoutStacks=void 0;const m=E(4140),M=E(4786),F=E(6326);k.shuffleLayoutStacks=O=>m.rotateLayout270(F.shuffleLayoutBands(M.rotateLayout90(O)))},8294:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.shuffleLayout=void 0;const m=E(6326),M=E(2292),F=E(7967),z=E(8974);k.shuffleLayout=W=>M.shuffleLayoutColumns(F.shuffleLayoutRows(z.shuffleLayoutStacks(m.shuffleLayoutBands(W))))},1962:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.getSeed=void 0;const m=E(7848),M=E(1691);k.getSeed=(z,O)=>m.getRandomItem(M.getSeedsByDifficulty(z,O))},1691:(le,k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.getSeedsByDifficulty=void 0,k.getSeedsByDifficulty=(m,M)=>m.filter(F=>!M||F.difficulty===M)},9229:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.getTokenMap=void 0;const m=E(637);k.getTokenMap=()=>"abcdefghi".split("").sort(m.sortRandom).reduce((F,z,O)=>({...F,[z]:String(O+1)}),{})},1178:(le,k,E)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.validateDifficulty=void 0;const m=E(3738);k.validateDifficulty=F=>m.DIFFICULTY_LEVELS.includes(F)},655:(le,k,E)=>{function z(pe,ne){var Ae={};for(var _e in pe)Object.prototype.hasOwnProperty.call(pe,_e)&&ne.indexOf(_e)<0&&(Ae[_e]=pe[_e]);if(null!=pe&&"function"==typeof Object.getOwnPropertySymbols){var Ze=0;for(_e=Object.getOwnPropertySymbols(pe);Ze<_e.length;Ze++)ne.indexOf(_e[Ze])<0&&Object.prototype.propertyIsEnumerable.call(pe,_e[Ze])&&(Ae[_e[Ze]]=pe[_e[Ze]])}return Ae}function Q(pe,ne,Ae,_e){return new(Ae||(Ae=Promise))(function(Xe,wt){function rn(dn){try{at(_e.next(dn))}catch(Sn){wt(Sn)}}function Ft(dn){try{at(_e.throw(dn))}catch(Sn){wt(Sn)}}function at(dn){dn.done?Xe(dn.value):function Ze(Xe){return Xe instanceof Ae?Xe:new Ae(function(wt){wt(Xe)})}(dn.value).then(rn,Ft)}at((_e=_e.apply(pe,ne||[])).next())})}function we(pe){return this instanceof we?(this.v=pe,this):new we(pe)}function Ee(pe,ne,Ae){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Ze,_e=Ae.apply(pe,ne||[]),Xe=[];return Ze={},wt("next"),wt("throw"),wt("return"),Ze[Symbol.asyncIterator]=function(){return this},Ze;function wt(qt){_e[qt]&&(Ze[qt]=function(Qt){return new Promise(function(Ct,sn){Xe.push([qt,Qt,Ct,sn])>1||rn(qt,Qt)})})}function rn(qt,Qt){try{!function Ft(qt){qt.value instanceof we?Promise.resolve(qt.value.v).then(at,dn):Sn(Xe[0][2],qt)}(_e[qt](Qt))}catch(Ct){Sn(Xe[0][3],Ct)}}function at(qt){rn("next",qt)}function dn(qt){rn("throw",qt)}function Sn(qt,Qt){qt(Qt),Xe.shift(),Xe.length&&rn(Xe[0][0],Xe[0][1])}}function ot(pe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Ae,ne=pe[Symbol.asyncIterator];return ne?ne.call(pe):(pe=function te(pe){var ne="function"==typeof Symbol&&Symbol.iterator,Ae=ne&&pe[ne],_e=0;if(Ae)return Ae.call(pe);if(pe&&"number"==typeof pe.length)return{next:function(){return pe&&_e>=pe.length&&(pe=void 0),{value:pe&&pe[_e++],done:!pe}}};throw new TypeError(ne?"Object is not iterable.":"Symbol.iterator is not defined.")}(pe),Ae={},_e("next"),_e("throw"),_e("return"),Ae[Symbol.asyncIterator]=function(){return this},Ae);function _e(Xe){Ae[Xe]=pe[Xe]&&function(wt){return new Promise(function(rn,Ft){!function Ze(Xe,wt,rn,Ft){Promise.resolve(Ft).then(function(at){Xe({value:at,done:rn})},wt)}(rn,Ft,(wt=pe[Xe](wt)).done,wt.value)})}}}E.d(k,{FC:()=>Ee,KL:()=>ot,_T:()=>z,mG:()=>Q,qq:()=>we})},6895:(le,k,E)=>{E.d(k,{Do:()=>ot,EM:()=>Lo,HT:()=>O,JF:()=>Fo,K0:()=>ee,Mx:()=>Qs,NF:()=>Ns,O5:()=>$n,Ov:()=>gt,S$:()=>we,V_:()=>G,Ye:()=>Pe,b0:()=>We,bD:()=>ss,ez:()=>Cc,q:()=>F,sg:()=>qi,uU:()=>Ui,w_:()=>W});var m=E(4650);let M=null;function F(){return M}function O(I){M||(M=I)}class W{}const ee=new m.OlP("DocumentToken");let Q=(()=>{class I{historyGo(C){throw new Error("Not implemented")}}return I.\u0275fac=function(C){return new(C||I)},I.\u0275prov=m.Yz7({token:I,factory:function(){return function K(){return(0,m.LFG)(H)}()},providedIn:"platform"}),I})();const G=new m.OlP("Location Initialized");let H=(()=>{class I extends Q{constructor(C){super(),this._doc=C,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return F().getBaseHref(this._doc)}onPopState(C){const V=F().getGlobalEventTarget(this._doc,"window");return V.addEventListener("popstate",C,!1),()=>V.removeEventListener("popstate",C)}onHashChange(C){const V=F().getGlobalEventTarget(this._doc,"window");return V.addEventListener("hashchange",C,!1),()=>V.removeEventListener("hashchange",C)}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(C){this.location.pathname=C}pushState(C,V,ce){te()?this._history.pushState(C,V,ce):this.location.hash=ce}replaceState(C,V,ce){te()?this._history.replaceState(C,V,ce):this.location.hash=ce}forward(){this._history.forward()}back(){this._history.back()}historyGo(C=0){this._history.go(C)}getState(){return this._history.state}}return I.\u0275fac=function(C){return new(C||I)(m.LFG(ee))},I.\u0275prov=m.Yz7({token:I,factory:function(){return function ye(){return new H((0,m.LFG)(ee))}()},providedIn:"platform"}),I})();function te(){return!!window.history.pushState}function ve(I,P){if(0==I.length)return P;if(0==P.length)return I;let C=0;return I.endsWith("/")&&C++,P.startsWith("/")&&C++,2==C?I+P.substring(1):1==C?I+P:I+"/"+P}function me(I){const P=I.match(/#|\?|$/),C=P&&P.index||I.length;return I.slice(0,C-("/"===I[C-1]?1:0))+I.slice(C)}function Ue(I){return I&&"?"!==I[0]?"?"+I:I}let we=(()=>{class I{historyGo(C){throw new Error("Not implemented")}}return I.\u0275fac=function(C){return new(C||I)},I.\u0275prov=m.Yz7({token:I,factory:function(){return(0,m.f3M)(We)},providedIn:"root"}),I})();const Ee=new m.OlP("appBaseHref");let We=(()=>{class I extends we{constructor(C,V){super(),this._platformLocation=C,this._removeListenerFns=[],this._baseHref=V??this._platformLocation.getBaseHrefFromDOM()??(0,m.f3M)(ee).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(C){this._removeListenerFns.push(this._platformLocation.onPopState(C),this._platformLocation.onHashChange(C))}getBaseHref(){return this._baseHref}prepareExternalUrl(C){return ve(this._baseHref,C)}path(C=!1){const V=this._platformLocation.pathname+Ue(this._platformLocation.search),ce=this._platformLocation.hash;return ce&&C?`${V}${ce}`:V}pushState(C,V,ce,Me){const Fe=this.prepareExternalUrl(ce+Ue(Me));this._platformLocation.pushState(C,V,Fe)}replaceState(C,V,ce,Me){const Fe=this.prepareExternalUrl(ce+Ue(Me));this._platformLocation.replaceState(C,V,Fe)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(C=0){this._platformLocation.historyGo?.(C)}}return I.\u0275fac=function(C){return new(C||I)(m.LFG(Q),m.LFG(Ee,8))},I.\u0275prov=m.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"}),I})(),ot=(()=>{class I extends we{constructor(C,V){super(),this._platformLocation=C,this._baseHref="",this._removeListenerFns=[],null!=V&&(this._baseHref=V)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(C){this._removeListenerFns.push(this._platformLocation.onPopState(C),this._platformLocation.onHashChange(C))}getBaseHref(){return this._baseHref}path(C=!1){let V=this._platformLocation.hash;return null==V&&(V="#"),V.length>0?V.substring(1):V}prepareExternalUrl(C){const V=ve(this._baseHref,C);return V.length>0?"#"+V:V}pushState(C,V,ce,Me){let Fe=this.prepareExternalUrl(ce+Ue(Me));0==Fe.length&&(Fe=this._platformLocation.pathname),this._platformLocation.pushState(C,V,Fe)}replaceState(C,V,ce,Me){let Fe=this.prepareExternalUrl(ce+Ue(Me));0==Fe.length&&(Fe=this._platformLocation.pathname),this._platformLocation.replaceState(C,V,Fe)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(C=0){this._platformLocation.historyGo?.(C)}}return I.\u0275fac=function(C){return new(C||I)(m.LFG(Q),m.LFG(Ee,8))},I.\u0275prov=m.Yz7({token:I,factory:I.\u0275fac}),I})(),Pe=(()=>{class I{constructor(C){this._subject=new m.vpe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=C;const V=this._locationStrategy.getBaseHref();this._baseHref=me(nt(V)),this._locationStrategy.onPopState(ce=>{this._subject.emit({url:this.path(!0),pop:!0,state:ce.state,type:ce.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(C=!1){return this.normalize(this._locationStrategy.path(C))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(C,V=""){return this.path()==this.normalize(C+Ue(V))}normalize(C){return I.stripTrailingSlash(function Le(I,P){return I&&P.startsWith(I)?P.substring(I.length):P}(this._baseHref,nt(C)))}prepareExternalUrl(C){return C&&"/"!==C[0]&&(C="/"+C),this._locationStrategy.prepareExternalUrl(C)}go(C,V="",ce=null){this._locationStrategy.pushState(ce,"",C,V),this._notifyUrlChangeListeners(this.prepareExternalUrl(C+Ue(V)),ce)}replaceState(C,V="",ce=null){this._locationStrategy.replaceState(ce,"",C,V),this._notifyUrlChangeListeners(this.prepareExternalUrl(C+Ue(V)),ce)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(C=0){this._locationStrategy.historyGo?.(C)}onUrlChange(C){return this._urlChangeListeners.push(C),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(V=>{this._notifyUrlChangeListeners(V.url,V.state)})),()=>{const V=this._urlChangeListeners.indexOf(C);this._urlChangeListeners.splice(V,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(C="",V){this._urlChangeListeners.forEach(ce=>ce(C,V))}subscribe(C,V,ce){return this._subject.subscribe({next:C,error:V,complete:ce})}}return I.normalizeQueryParams=Ue,I.joinWithSlash=ve,I.stripTrailingSlash=me,I.\u0275fac=function(C){return new(C||I)(m.LFG(we))},I.\u0275prov=m.Yz7({token:I,factory:function(){return function Se(){return new Pe((0,m.LFG)(we))}()},providedIn:"root"}),I})();function nt(I){return I.replace(/\/index.html$/,"")}var pe=(()=>((pe=pe||{})[pe.Format=0]="Format",pe[pe.Standalone=1]="Standalone",pe))(),ne=(()=>((ne=ne||{})[ne.Narrow=0]="Narrow",ne[ne.Abbreviated=1]="Abbreviated",ne[ne.Wide=2]="Wide",ne[ne.Short=3]="Short",ne))(),Ae=(()=>((Ae=Ae||{})[Ae.Short=0]="Short",Ae[Ae.Medium=1]="Medium",Ae[Ae.Long=2]="Long",Ae[Ae.Full=3]="Full",Ae))(),_e=(()=>((_e=_e||{})[_e.Decimal=0]="Decimal",_e[_e.Group=1]="Group",_e[_e.List=2]="List",_e[_e.PercentSign=3]="PercentSign",_e[_e.PlusSign=4]="PlusSign",_e[_e.MinusSign=5]="MinusSign",_e[_e.Exponential=6]="Exponential",_e[_e.SuperscriptingExponent=7]="SuperscriptingExponent",_e[_e.PerMille=8]="PerMille",_e[_e.Infinity=9]="Infinity",_e[_e.NaN=10]="NaN",_e[_e.TimeSeparator=11]="TimeSeparator",_e[_e.CurrencyDecimal=12]="CurrencyDecimal",_e[_e.CurrencyGroup=13]="CurrencyGroup",_e))();function qt(I,P){return rt((0,m.cg1)(I)[m.wAp.DateFormat],P)}function Qt(I,P){return rt((0,m.cg1)(I)[m.wAp.TimeFormat],P)}function Ct(I,P){return rt((0,m.cg1)(I)[m.wAp.DateTimeFormat],P)}function sn(I,P){const C=(0,m.cg1)(I),V=C[m.wAp.NumberSymbols][P];if(typeof V>"u"){if(P===_e.CurrencyDecimal)return C[m.wAp.NumberSymbols][_e.Decimal];if(P===_e.CurrencyGroup)return C[m.wAp.NumberSymbols][_e.Group]}return V}function ir(I){if(!I[m.wAp.ExtraData])throw new Error(`Missing extra locale data for the locale "${I[m.wAp.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function rt(I,P){for(let C=P;C>-1;C--)if(typeof I[C]<"u")return I[C];throw new Error("Locale data API: locale data undefined")}function Pn(I){const[P,C]=I.split(":");return{hours:+P,minutes:+C}}const Yr=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Un={},En=/((?:[^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 wn=(()=>((wn=wn||{})[wn.Short=0]="Short",wn[wn.ShortGMT=1]="ShortGMT",wn[wn.Long=2]="Long",wn[wn.Extended=3]="Extended",wn))(),vt=(()=>((vt=vt||{})[vt.FullYear=0]="FullYear",vt[vt.Month=1]="Month",vt[vt.Date=2]="Date",vt[vt.Hours=3]="Hours",vt[vt.Minutes=4]="Minutes",vt[vt.Seconds=5]="Seconds",vt[vt.FractionalSeconds=6]="FractionalSeconds",vt[vt.Day=7]="Day",vt))(),St=(()=>((St=St||{})[St.DayPeriods=0]="DayPeriods",St[St.Days=1]="Days",St[St.Months=2]="Months",St[St.Eras=3]="Eras",St))();function tn(I,P,C,V){let ce=function st(I){if(Jt(I))return I;if("number"==typeof I&&!isNaN(I))return new Date(I);if("string"==typeof I){if(I=I.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(I)){const[ce,Me=1,Fe=1]=I.split("-").map(Et=>+Et);return Jn(ce,Me-1,Fe)}const C=parseFloat(I);if(!isNaN(I-C))return new Date(C);let V;if(V=I.match(Yr))return function Dt(I){const P=new Date(0);let C=0,V=0;const ce=I[8]?P.setUTCFullYear:P.setFullYear,Me=I[8]?P.setUTCHours:P.setHours;I[9]&&(C=Number(I[9]+I[10]),V=Number(I[9]+I[11])),ce.call(P,Number(I[1]),Number(I[2])-1,Number(I[3]));const Fe=Number(I[4]||0)-C,Et=Number(I[5]||0)-V,vn=Number(I[6]||0),Ln=Math.floor(1e3*parseFloat("0."+(I[7]||0)));return Me.call(P,Fe,Et,vn,Ln),P}(V)}const P=new Date(I);if(!Jt(P))throw new Error(`Unable to convert "${I}" into a date`);return P}(I);P=mt(C,P)||P;let Et,Fe=[];for(;P;){if(Et=En.exec(P),!Et){Fe.push(P);break}{Fe=Fe.concat(Et.slice(1));const An=Fe.pop();if(!An)break;P=An}}let vn=ce.getTimezoneOffset();V&&(vn=ge(V,vn),ce=function De(I,P,C){const V=C?-1:1,ce=I.getTimezoneOffset();return function ze(I,P){return(I=new Date(I.getTime())).setMinutes(I.getMinutes()+P),I}(I,V*(ge(P,ce)-ce))}(ce,V,!0));let Ln="";return Fe.forEach(An=>{const _n=function se(I){if(de[I])return de[I];let P;switch(I){case"G":case"GG":case"GGG":P=Xt(St.Eras,ne.Abbreviated);break;case"GGGG":P=Xt(St.Eras,ne.Wide);break;case"GGGGG":P=Xt(St.Eras,ne.Narrow);break;case"y":P=In(vt.FullYear,1,0,!1,!0);break;case"yy":P=In(vt.FullYear,2,0,!0,!0);break;case"yyy":P=In(vt.FullYear,3,0,!1,!0);break;case"yyyy":P=In(vt.FullYear,4,0,!1,!0);break;case"Y":P=Vt(1);break;case"YY":P=Vt(2,!0);break;case"YYY":P=Vt(3);break;case"YYYY":P=Vt(4);break;case"M":case"L":P=In(vt.Month,1,1);break;case"MM":case"LL":P=In(vt.Month,2,1);break;case"MMM":P=Xt(St.Months,ne.Abbreviated);break;case"MMMM":P=Xt(St.Months,ne.Wide);break;case"MMMMM":P=Xt(St.Months,ne.Narrow);break;case"LLL":P=Xt(St.Months,ne.Abbreviated,pe.Standalone);break;case"LLLL":P=Xt(St.Months,ne.Wide,pe.Standalone);break;case"LLLLL":P=Xt(St.Months,ne.Narrow,pe.Standalone);break;case"w":P=kt(1);break;case"ww":P=kt(2);break;case"W":P=kt(1,!0);break;case"d":P=In(vt.Date,1);break;case"dd":P=In(vt.Date,2);break;case"c":case"cc":P=In(vt.Day,1);break;case"ccc":P=Xt(St.Days,ne.Abbreviated,pe.Standalone);break;case"cccc":P=Xt(St.Days,ne.Wide,pe.Standalone);break;case"ccccc":P=Xt(St.Days,ne.Narrow,pe.Standalone);break;case"cccccc":P=Xt(St.Days,ne.Short,pe.Standalone);break;case"E":case"EE":case"EEE":P=Xt(St.Days,ne.Abbreviated);break;case"EEEE":P=Xt(St.Days,ne.Wide);break;case"EEEEE":P=Xt(St.Days,ne.Narrow);break;case"EEEEEE":P=Xt(St.Days,ne.Short);break;case"a":case"aa":case"aaa":P=Xt(St.DayPeriods,ne.Abbreviated);break;case"aaaa":P=Xt(St.DayPeriods,ne.Wide);break;case"aaaaa":P=Xt(St.DayPeriods,ne.Narrow);break;case"b":case"bb":case"bbb":P=Xt(St.DayPeriods,ne.Abbreviated,pe.Standalone,!0);break;case"bbbb":P=Xt(St.DayPeriods,ne.Wide,pe.Standalone,!0);break;case"bbbbb":P=Xt(St.DayPeriods,ne.Narrow,pe.Standalone,!0);break;case"B":case"BB":case"BBB":P=Xt(St.DayPeriods,ne.Abbreviated,pe.Format,!0);break;case"BBBB":P=Xt(St.DayPeriods,ne.Wide,pe.Format,!0);break;case"BBBBB":P=Xt(St.DayPeriods,ne.Narrow,pe.Format,!0);break;case"h":P=In(vt.Hours,1,-12);break;case"hh":P=In(vt.Hours,2,-12);break;case"H":P=In(vt.Hours,1);break;case"HH":P=In(vt.Hours,2);break;case"m":P=In(vt.Minutes,1);break;case"mm":P=In(vt.Minutes,2);break;case"s":P=In(vt.Seconds,1);break;case"ss":P=In(vt.Seconds,2);break;case"S":P=In(vt.FractionalSeconds,1);break;case"SS":P=In(vt.FractionalSeconds,2);break;case"SSS":P=In(vt.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":P=Gn(wn.Short);break;case"ZZZZZ":P=Gn(wn.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":P=Gn(wn.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":P=Gn(wn.Long);break;default:return null}return de[I]=P,P}(An);Ln+=_n?_n(ce,C,vn):"''"===An?"'":An.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),Ln}function Jn(I,P,C){const V=new Date(0);return V.setFullYear(I,P,C),V.setHours(0,0,0),V}function mt(I,P){const C=function Xe(I){return(0,m.cg1)(I)[m.wAp.LocaleId]}(I);if(Un[C]=Un[C]||{},Un[C][P])return Un[C][P];let V="";switch(P){case"shortDate":V=qt(I,Ae.Short);break;case"mediumDate":V=qt(I,Ae.Medium);break;case"longDate":V=qt(I,Ae.Long);break;case"fullDate":V=qt(I,Ae.Full);break;case"shortTime":V=Qt(I,Ae.Short);break;case"mediumTime":V=Qt(I,Ae.Medium);break;case"longTime":V=Qt(I,Ae.Long);break;case"fullTime":V=Qt(I,Ae.Full);break;case"short":const ce=mt(I,"shortTime"),Me=mt(I,"shortDate");V=er(Ct(I,Ae.Short),[ce,Me]);break;case"medium":const Fe=mt(I,"mediumTime"),Et=mt(I,"mediumDate");V=er(Ct(I,Ae.Medium),[Fe,Et]);break;case"long":const vn=mt(I,"longTime"),Ln=mt(I,"longDate");V=er(Ct(I,Ae.Long),[vn,Ln]);break;case"full":const An=mt(I,"fullTime"),_n=mt(I,"fullDate");V=er(Ct(I,Ae.Full),[An,_n])}return V&&(Un[C][P]=V),V}function er(I,P){return P&&(I=I.replace(/\{([^}]+)}/g,function(C,V){return null!=P&&V in P?P[V]:C})),I}function bt(I,P,C="-",V,ce){let Me="";(I<0||ce&&I<=0)&&(ce?I=1-I:(I=-I,Me=C));let Fe=String(I);for(;Fe.length0||Et>-C)&&(Et+=C),I===vt.Hours)0===Et&&-12===C&&(Et=12);else if(I===vt.FractionalSeconds)return function sr(I,P){return bt(I,3).substring(0,P)}(Et,P);const vn=sn(Fe,_e.MinusSign);return bt(Et,P,vn,V,ce)}}function Xt(I,P,C=pe.Format,V=!1){return function(ce,Me){return function bn(I,P,C,V,ce,Me){switch(C){case St.Months:return function Ft(I,P,C){const V=(0,m.cg1)(I),Me=rt([V[m.wAp.MonthsFormat],V[m.wAp.MonthsStandalone]],P);return rt(Me,C)}(P,ce,V)[I.getMonth()];case St.Days:return function rn(I,P,C){const V=(0,m.cg1)(I),Me=rt([V[m.wAp.DaysFormat],V[m.wAp.DaysStandalone]],P);return rt(Me,C)}(P,ce,V)[I.getDay()];case St.DayPeriods:const Fe=I.getHours(),Et=I.getMinutes();if(Me){const Ln=function xn(I){const P=(0,m.cg1)(I);return ir(P),(P[m.wAp.ExtraData][2]||[]).map(V=>"string"==typeof V?Pn(V):[Pn(V[0]),Pn(V[1])])}(P),An=function qr(I,P,C){const V=(0,m.cg1)(I);ir(V);const Me=rt([V[m.wAp.ExtraData][0],V[m.wAp.ExtraData][1]],P)||[];return rt(Me,C)||[]}(P,ce,V),_n=Ln.findIndex(Tr=>{if(Array.isArray(Tr)){const[Mn,fr]=Tr,Es=Fe>=Mn.hours&&Et>=Mn.minutes,Bi=Fe0?Math.floor(ce/60):Math.ceil(ce/60);switch(I){case wn.Short:return(ce>=0?"+":"")+bt(Fe,2,Me)+bt(Math.abs(ce%60),2,Me);case wn.ShortGMT:return"GMT"+(ce>=0?"+":"")+bt(Fe,1,Me);case wn.Long:return"GMT"+(ce>=0?"+":"")+bt(Fe,2,Me)+":"+bt(Math.abs(ce%60),2,Me);case wn.Extended:return 0===V?"Z":(ce>=0?"+":"")+bt(Fe,2,Me)+":"+bt(Math.abs(ce%60),2,Me);default:throw new Error(`Unknown zone width "${I}"`)}}}function Nt(I){return Jn(I.getFullYear(),I.getMonth(),I.getDate()+(4-I.getDay()))}function kt(I,P=!1){return function(C,V){let ce;if(P){const Me=new Date(C.getFullYear(),C.getMonth(),1).getDay()-1,Fe=C.getDate();ce=1+Math.floor((Fe+Me)/7)}else{const Me=Nt(C),Fe=function yt(I){const P=Jn(I,0,1).getDay();return Jn(I,0,1+(P<=4?4:11)-P)}(Me.getFullYear()),Et=Me.getTime()-Fe.getTime();ce=1+Math.round(Et/6048e5)}return bt(ce,I,sn(V,_e.MinusSign))}}function Vt(I,P=!1){return function(C,V){return bt(Nt(C).getFullYear(),I,sn(V,_e.MinusSign),P)}}const de={};function ge(I,P){I=I.replace(/:/g,"");const C=Date.parse("Jan 01, 1970 00:00:00 "+I)/6e4;return isNaN(C)?P:C}function Jt(I){return I instanceof Date&&!isNaN(I.valueOf())}function Qs(I,P){P=encodeURIComponent(P);for(const C of I.split(";")){const V=C.indexOf("="),[ce,Me]=-1==V?[C,""]:[C.slice(0,V),C.slice(V+1)];if(ce.trim()===P)return decodeURIComponent(Me)}return null}class li{constructor(P,C,V,ce){this.$implicit=P,this.ngForOf=C,this.index=V,this.count=ce}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 qi=(()=>{class I{constructor(C,V,ce){this._viewContainer=C,this._template=V,this._differs=ce,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(C){this._ngForOf=C,this._ngForOfDirty=!0}set ngForTrackBy(C){this._trackByFn=C}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(C){C&&(this._template=C)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const C=this._ngForOf;!this._differ&&C&&(this._differ=this._differs.find(C).create(this.ngForTrackBy))}if(this._differ){const C=this._differ.diff(this._ngForOf);C&&this._applyChanges(C)}}_applyChanges(C){const V=this._viewContainer;C.forEachOperation((ce,Me,Fe)=>{if(null==ce.previousIndex)V.createEmbeddedView(this._template,new li(ce.item,this._ngForOf,-1,-1),null===Fe?void 0:Fe);else if(null==Fe)V.remove(null===Me?void 0:Me);else if(null!==Me){const Et=V.get(Me);V.move(Et,Fe),wi(Et,ce)}});for(let ce=0,Me=V.length;ce{wi(V.get(ce.currentIndex),ce)})}static ngTemplateContextGuard(C,V){return!0}}return I.\u0275fac=function(C){return new(C||I)(m.Y36(m.s_b),m.Y36(m.Rgc),m.Y36(m.ZZ4))},I.\u0275dir=m.lG2({type:I,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),I})();function wi(I,P){I.context.$implicit=P.item}let $n=(()=>{class I{constructor(C,V){this._viewContainer=C,this._context=new di,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=V}set ngIf(C){this._context.$implicit=this._context.ngIf=C,this._updateView()}set ngIfThen(C){kn("ngIfThen",C),this._thenTemplateRef=C,this._thenViewRef=null,this._updateView()}set ngIfElse(C){kn("ngIfElse",C),this._elseTemplateRef=C,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(C,V){return!0}}return I.\u0275fac=function(C){return new(C||I)(m.Y36(m.s_b),m.Y36(m.Rgc))},I.\u0275dir=m.lG2({type:I,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),I})();class di{constructor(){this.$implicit=null,this.ngIf=null}}function kn(I,P){if(P&&!P.createEmbeddedView)throw new Error(`${I} must be a TemplateRef, but received '${(0,m.AaK)(P)}'.`)}function $(I,P){return new m.vHH(2100,!1)}class q{createSubscription(P,C){return P.subscribe({next:C,error:V=>{throw V}})}dispose(P){P.unsubscribe()}}class he{createSubscription(P,C){return P.then(C,V=>{throw V})}dispose(P){}}const Re=new he,$e=new q;let gt=(()=>{class I{constructor(C){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=C}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(C){return this._obj?C!==this._obj?(this._dispose(),this.transform(C)):this._latestValue:(C&&this._subscribe(C),this._latestValue)}_subscribe(C){this._obj=C,this._strategy=this._selectStrategy(C),this._subscription=this._strategy.createSubscription(C,V=>this._updateLatestValue(C,V))}_selectStrategy(C){if((0,m.QGY)(C))return Re;if((0,m.F4k)(C))return $e;throw $()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(C,V){C===this._obj&&(this._latestValue=V,this._ref.markForCheck())}}return I.\u0275fac=function(C){return new(C||I)(m.Y36(m.sBO,16))},I.\u0275pipe=m.Yjl({name:"async",type:I,pure:!1,standalone:!0}),I})();const nr=new m.OlP("DATE_PIPE_DEFAULT_TIMEZONE");let Ui=(()=>{class I{constructor(C,V){this.locale=C,this.defaultTimezone=V}transform(C,V="mediumDate",ce,Me){if(null==C||""===C||C!=C)return null;try{return tn(C,V,Me||this.locale,ce??this.defaultTimezone??void 0)}catch(Fe){throw $()}}}return I.\u0275fac=function(C){return new(C||I)(m.Y36(m.soG,16),m.Y36(nr,24))},I.\u0275pipe=m.Yjl({name:"date",type:I,pure:!0,standalone:!0}),I})(),Cc=(()=>{class I{}return I.\u0275fac=function(C){return new(C||I)},I.\u0275mod=m.oAB({type:I}),I.\u0275inj=m.cJS({}),I})();const ss="browser";function Ns(I){return I===ss}let Lo=(()=>{class I{}return I.\u0275prov=(0,m.Yz7)({token:I,providedIn:"root",factory:()=>new Sc((0,m.LFG)(ee),window)}),I})();class Sc{constructor(P,C){this.document=P,this.window=C,this.offset=()=>[0,0]}setOffset(P){this.offset=Array.isArray(P)?()=>P:P}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(P){this.supportsScrolling()&&this.window.scrollTo(P[0],P[1])}scrollToAnchor(P){if(!this.supportsScrolling())return;const C=function $r(I,P){const C=I.getElementById(P)||I.getElementsByName(P)[0];if(C)return C;if("function"==typeof I.createTreeWalker&&I.body&&(I.body.createShadowRoot||I.body.attachShadow)){const V=I.createTreeWalker(I.body,NodeFilter.SHOW_ELEMENT);let ce=V.currentNode;for(;ce;){const Me=ce.shadowRoot;if(Me){const Fe=Me.getElementById(P)||Me.querySelector(`[name="${P}"]`);if(Fe)return Fe}ce=V.nextNode()}}return null}(this.document,P);C&&(this.scrollToElement(C),C.focus())}setHistoryScrollRestoration(P){if(this.supportScrollRestoration()){const C=this.window.history;C&&C.scrollRestoration&&(C.scrollRestoration=P)}}scrollToElement(P){const C=P.getBoundingClientRect(),V=C.left+this.window.pageXOffset,ce=C.top+this.window.pageYOffset,Me=this.offset();this.window.scrollTo(V-Me[0],ce-Me[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const P=Si(this.window.history)||Si(Object.getPrototypeOf(this.window.history));return!(!P||!P.writable&&!P.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function Si(I){return Object.getOwnPropertyDescriptor(I,"scrollRestoration")}class Fo{}},4650:(le,k,E)=>{E.d(k,{$8M:()=>Hu,$Z:()=>im,AFp:()=>v0,ALo:()=>Sl,AaK:()=>Q,AsE:()=>$m,BQk:()=>xo,CHM:()=>Ls,CRH:()=>Sy,CZH:()=>uh,CqO:()=>$v,D6c:()=>ET,EJc:()=>kw,EpF:()=>xe,F4k:()=>co,FYo:()=>U_,FiY:()=>Lt,G48:()=>e_,GfV:()=>hg,JOm:()=>Zo,KtG:()=>Js,LFG:()=>L,LSH:()=>x_,Lbi:()=>jy,Lck:()=>LE,MAs:()=>Cd,MMx:()=>Kd,NdJ:()=>ac,O4$:()=>Et,OlP:()=>Hn,Oqu:()=>Vf,PXZ:()=>x0,PiD:()=>ri,Q6J:()=>Nm,QGY:()=>dl,QP$:()=>Jt,Qsj:()=>OI,R0b:()=>vi,RDi:()=>sI,Rgc:()=>eh,SBq:()=>Gc,Sil:()=>Uw,Suo:()=>e0,TTD:()=>po,TgZ:()=>Sd,W1O:()=>up,X6Q:()=>Hw,XFs:()=>rt,Xpm:()=>He,Xts:()=>R_,Y36:()=>Qu,YKP:()=>gy,YNc:()=>fu,Yjl:()=>ze,Yz7:()=>Qt,Z0I:()=>yr,ZZ4:()=>Ul,_UZ:()=>Ad,_Vd:()=>Xl,_c5:()=>ns,_uU:()=>jm,aQg:()=>Bp,c2e:()=>Nl,cJS:()=>sn,cg1:()=>Iu,dDg:()=>Yy,dqk:()=>tn,eFA:()=>Tp,ekj:()=>Nd,eoX:()=>C0,f3M:()=>Ie,g9A:()=>E0,h0i:()=>Cl,hGG:()=>ua,iGM:()=>JE,ifc:()=>St,ip1:()=>oa,jDz:()=>La,kL8:()=>ey,lG2:()=>ge,lcZ:()=>Iy,lqb:()=>jc,lri:()=>Dp,n5z:()=>$u,oAB:()=>Vt,oxw:()=>Gv,q4F:()=>kh,qLn:()=>Aa,qZA:()=>es,rWj:()=>wp,sBO:()=>F0,sIi:()=>ta,s_b:()=>ip,soG:()=>Ep,tBr:()=>on,tb:()=>lh,tp0:()=>Jr,uIk:()=>Rm,vHH:()=>me,vpe:()=>fs,wAp:()=>Gt,xi3:()=>Dy,xp6:()=>cv,ynx:()=>Md,z2F:()=>Mp,zSh:()=>N_,zs3:()=>au});var m=E(7579),M=E(727),F=E(9751),z=E(6451),O=E(3099);function W(r){for(let s in r)if(r[s]===W)return s;throw Error("Could not find renamed property on target object.")}function Q(r){if("string"==typeof r)return r;if(Array.isArray(r))return"["+r.map(Q).join(", ")+"]";if(null==r)return""+r;if(r.overriddenName)return`${r.overriddenName}`;if(r.name)return`${r.name}`;const s=r.toString();if(null==s)return""+s;const o=s.indexOf("\n");return-1===o?s:s.substring(0,o)}function K(r,s){return null==r||""===r?null===s?"":s:null==s||""===s?r:r+" "+s}const G=W({__forward_ref__:W});function H(r){return r.__forward_ref__=H,r.toString=function(){return Q(this())},r}function te(r){return ye(r)?r():r}function ye(r){return"function"==typeof r&&r.hasOwnProperty(G)&&r.__forward_ref__===H}class me extends Error{constructor(s,o){super(function Ue(r,s){return`NG0${Math.abs(r)}${s?": "+s.trim():""}`}(s,o)),this.code=s}}function we(r){return"string"==typeof r?r:null==r?"":String(r)}function Se(r,s){throw new me(-201,!1)}function Ft(r,s){null==r&&function at(r,s,o,u){throw new Error(`ASSERTION ERROR: ${r}`+(null==u?"":` [Expected=> ${o} ${u} ${s} <=Actual]`))}(s,r,null,"!=")}function Qt(r){return{token:r.token,providedIn:r.providedIn||null,factory:r.factory,value:void 0}}function sn(r){return{providers:r.providers||[],imports:r.imports||[]}}function Br(r){return hn(r,ir)||hn(r,qr)}function yr(r){return null!==Br(r)}function hn(r,s){return r.hasOwnProperty(s)?r[s]:null}function xr(r){return r&&(r.hasOwnProperty(xn)||r.hasOwnProperty(gn))?r[xn]:null}const ir=W({\u0275prov:W}),xn=W({\u0275inj:W}),qr=W({ngInjectableDef:W}),gn=W({ngInjectorDef:W});var rt=(()=>((rt=rt||{})[rt.Default=0]="Default",rt[rt.Host=1]="Host",rt[rt.Self=2]="Self",rt[rt.SkipSelf=4]="SkipSelf",rt[rt.Optional=8]="Optional",rt))();let Pn;function qn(r){const s=Pn;return Pn=r,s}function dr(r,s,o){const u=Br(r);return u&&"root"==u.providedIn?void 0===u.value?u.value=u.factory():u.value:o&rt.Optional?null:void 0!==s?s:void Se(Q(r))}function Un(r){return{toString:r}.toString()}var En=(()=>((En=En||{})[En.OnPush=0]="OnPush",En[En.Default=1]="Default",En))(),St=(()=>{return(r=St||(St={}))[r.Emulated=0]="Emulated",r[r.None=2]="None",r[r.ShadowDom=3]="ShadowDom",St;var r})();const tn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),er={},bt=[],sr=W({\u0275cmp:W}),In=W({\u0275dir:W}),Rr=W({\u0275pipe:W}),Xt=W({\u0275mod:W}),bn=W({\u0275fac:W}),Gn=W({__NG_ELEMENT_ID__:W});let lt=0;function He(r){return Un(()=>{const o=!0===r.standalone,u={},l={type:r.type,providersResolver:null,decls:r.decls,vars:r.vars,factory:null,template:r.template||null,consts:r.consts||null,ngContentSelectors:r.ngContentSelectors,hostBindings:r.hostBindings||null,hostVars:r.hostVars||0,hostAttrs:r.hostAttrs||null,contentQueries:r.contentQueries||null,declaredInputs:u,inputs:null,outputs:null,exportAs:r.exportAs||null,onPush:r.changeDetection===En.OnPush,directiveDefs:null,pipeDefs:null,standalone:o,dependencies:o&&r.dependencies||null,getStandaloneInjector:null,selectors:r.selectors||bt,viewQuery:r.viewQuery||null,features:r.features||null,data:r.data||{},encapsulation:r.encapsulation||St.Emulated,id:"c"+lt++,styles:r.styles||bt,_:null,setInput:null,schemas:r.schemas||null,tView:null},d=r.dependencies,f=r.features;return l.inputs=se(r.inputs,u),l.outputs=se(r.outputs),f&&f.forEach(v=>v(l)),l.directiveDefs=d?()=>("function"==typeof d?d():d).map(Nt).filter(kt):null,l.pipeDefs=d?()=>("function"==typeof d?d():d).map(Dt).filter(kt):null,l})}function Nt(r){return De(r)||st(r)}function kt(r){return null!==r}function Vt(r){return Un(()=>({type:r.type,bootstrap:r.bootstrap||bt,declarations:r.declarations||bt,imports:r.imports||bt,exports:r.exports||bt,transitiveCompileScopes:null,schemas:r.schemas||null,id:r.id||null}))}function se(r,s){if(null==r)return er;const o={};for(const u in r)if(r.hasOwnProperty(u)){let l=r[u],d=l;Array.isArray(l)&&(d=l[1],l=l[0]),o[l]=u,s&&(s[l]=d)}return o}const ge=He;function ze(r){return{type:r.type,name:r.name,factory:null,pure:!1!==r.pure,standalone:!0===r.standalone,onDestroy:r.type.prototype.ngOnDestroy||null}}function De(r){return r[sr]||null}function st(r){return r[In]||null}function Dt(r){return r[Rr]||null}function Jt(r){const s=De(r)||st(r)||Dt(r);return null!==s&&s.standalone}function Tn(r,s){const o=r[Xt]||null;if(!o&&!0===s)throw new Error(`Type ${Q(r)} does not have '\u0275mod' property.`);return o}function kn(r){return Array.isArray(r)&&"object"==typeof r[1]}function jr(r){return Array.isArray(r)&&!0===r[1]}function Yi(r){return 0!=(8&r.flags)}function vr(r){return 2==(2&r.flags)}function Zi(r){return 1==(1&r.flags)}function Er(r){return null!==r.template}function gs(r){return 0!=(256&r[2])}function is(r,s){return r.hasOwnProperty(bn)?r[bn]:null}class Xs{constructor(s,o,u){this.previousValue=s,this.currentValue=o,this.firstChange=u}isFirstChange(){return this.firstChange}}function po(){return ca}function ca(r){return r.type.prototype.ngOnChanges&&(r.setInput=la),ti}function ti(){const r=ja(this),s=r?.current;if(s){const o=r.previous;if(o===er)r.previous=s;else for(let u in s)o[u]=s[u];r.current=null,this.ngOnChanges(s)}}function la(r,s,o,u){const l=ja(r)||function Cc(r,s){return r[go]=s}(r,{previous:er,current:null}),d=l.current||(l.current={}),f=l.previous,v=this.declaredInputs[o],D=f[v];d[v]=new Xs(D&&D.currentValue,s,f===er),r[u]=s}po.ngInherit=!0;const go="__ngSimpleChanges__";function ja(r){return r[go]||null}function On(r){for(;Array.isArray(r);)r=r[0];return r}function Si(r,s){return On(s[r])}function $r(r,s){return On(s[r.index])}function Fo(r,s){return r.data[s]}function ms(r,s){return r[s]}function Cn(r,s){const o=s[r];return kn(o)?o:o[0]}function ys(r){return 64==(64&r[2])}function ar(r,s){return null==s?null:r[s]}function Bo(r){r[18]=0}function Zn(r,s){r[5]+=s;let o=r,u=r[3];for(;null!==u&&(1===s&&1===o[5]||-1===s&&0===o[5]);)u[5]+=s,o=u,u=u[3]}const Ht={lFrame:Do(null),bindingsEnabled:!0};function Ai(){return Ht.bindingsEnabled}function Qe(){return Ht.lFrame.lView}function fn(){return Ht.lFrame.tView}function Ls(r){return Ht.lFrame.contextLView=r,r[8]}function Js(r){return Ht.lFrame.contextLView=null,r}function hr(){let r=Fs();for(;null!==r&&64===r.type;)r=r.parent;return r}function Fs(){return Ht.lFrame.currentTNode}function ni(r,s){const o=Ht.lFrame;o.currentTNode=r,o.isParent=s}function za(){return Ht.lFrame.isParent}function Eo(){Ht.lFrame.isParent=!1}function br(){const r=Ht.lFrame;let s=r.bindingRootIndex;return-1===s&&(s=r.bindingRootIndex=r.tView.bindingStartIndex),s}function Bs(){return Ht.lFrame.bindingIndex++}function vs(r){const s=Ht.lFrame,o=s.bindingIndex;return s.bindingIndex=s.bindingIndex+r,o}function jl(r,s){const o=Ht.lFrame;o.bindingIndex=o.bindingRootIndex=r,Vs(s)}function Vs(r){Ht.lFrame.currentDirectiveIndex=r}function js(){return Ht.lFrame.currentQueryIndex}function ya(r){Ht.lFrame.currentQueryIndex=r}function $s(r){const s=r[1];return 2===s.type?s.declTNode:1===s.type?r[6]:null}function Vo(r,s,o){if(o&rt.SkipSelf){let l=s,d=r;for(;!(l=l.parent,null!==l||o&rt.Host||(l=$s(d),null===l||(d=d[15],10&l.type))););if(null===l)return!1;s=l,r=d}const u=Ht.lFrame=xc();return u.currentTNode=s,u.lView=r,!0}function eo(r){const s=xc(),o=r[1];Ht.lFrame=s,s.currentTNode=o.firstChild,s.lView=r,s.tView=o,s.contextLView=r,s.bindingIndex=o.bindingStartIndex,s.inI18n=!1}function xc(){const r=Ht.lFrame,s=null===r?null:r.child;return null===s?Do(r):s}function Do(r){const s={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:r,child:null,inI18n:!1};return null!==r&&(r.child=s),s}function Ru(){const r=Ht.lFrame;return Ht.lFrame=r.parent,r.currentTNode=null,r.lView=null,r}const I=Ru;function P(){const r=Ru();r.isParent=!0,r.tView=null,r.selectedIndex=-1,r.contextLView=null,r.elementDepthCount=0,r.currentDirectiveIndex=-1,r.currentNamespace=null,r.bindingRootIndex=-1,r.bindingIndex=-1,r.currentQueryIndex=0}function ce(){return Ht.lFrame.selectedIndex}function Me(r){Ht.lFrame.selectedIndex=r}function Fe(){const r=Ht.lFrame;return Fo(r.tView,r.selectedIndex)}function Et(){Ht.lFrame.currentNamespace="svg"}function Mn(r,s){for(let o=s.directiveStart,u=s.directiveEnd;o=u)break}else s[D]<0&&(r[18]+=65536),(v>11>16&&(3&r[2])===s){r[2]+=2048;try{d.call(v)}finally{}}}else try{d.call(v)}finally{}}class to{constructor(s,o,u){this.factory=s,this.resolving=!1,this.canSeeViewProviders=o,this.injectImpl=u}}function Ya(r,s,o){let u=0;for(;us){f=d-1;break}}}for(;d>16}(r),u=s;for(;o>0;)u=u[15],o--;return u}let Wl=!0;function _a(r){const s=Wl;return Wl=r,s}let Lu=0;const hi={};function Qn(r,s){const o=Qa(r,s);if(-1!==o)return o;const u=s[1];u.firstCreatePass&&(r.injectorIndex=s.length,Uu(u.data,r),Uu(s,null),Uu(u.blueprint,null));const l=Go(r,s),d=r.injectorIndex;if(Oc(l)){const f=kr(l),v=$o(l,s),D=v[1].data;for(let R=0;R<8;R++)s[d+R]=v[f+R]|D[f+R]}return s[d+8]=l,d}function Uu(r,s){r.push(0,0,0,0,0,0,0,0,s)}function Qa(r,s){return-1===r.injectorIndex||r.parent&&r.parent.injectorIndex===r.injectorIndex||null===s[r.injectorIndex+8]?-1:r.injectorIndex}function Go(r,s){if(r.parent&&-1!==r.parent.injectorIndex)return r.parent.injectorIndex;let o=0,u=null,l=s;for(;null!==l;){if(u=va(l),null===u)return-1;if(o++,l=l[15],-1!==u.injectorIndex)return u.injectorIndex|o<<16}return-1}function no(r,s,o){!function Fu(r,s,o){let u;"string"==typeof o?u=o.charCodeAt(0)||0:o.hasOwnProperty(Gn)&&(u=o[Gn]),null==u&&(u=o[Gn]=Lu++);const l=255&u;s.data[r+(l>>5)]|=1<=0?255&s:Pc:s}(o);if("function"==typeof d){if(!Vo(s,r,u))return u&rt.Host?Bu(l,0,u):Vu(s,o,u,l);try{const f=d(u);if(null!=f||u&rt.Optional)return f;Se()}finally{I()}}else if("number"==typeof d){let f=null,v=Qa(r,s),D=-1,R=u&rt.Host?s[16][6]:null;for((-1===v||u&rt.SkipSelf)&&(D=-1===v?Go(r,s):s[v+8],-1!==D&&ju(u,!1)?(f=s[1],v=kr(D),s=$o(D,s)):v=-1);-1!==v;){const B=s[1];if(zo(d,v,B.data)){const Y=Ir(v,s,o,f,u,R);if(Y!==hi)return Y}D=s[v+8],-1!==D&&ju(u,s[1].data[v+8]===R)&&zo(d,v,s)?(f=B,v=kr(D),s=$o(D,s)):v=-1}}return l}function Ir(r,s,o,u,l,d){const f=s[1],v=f.data[r+8],B=wo(v,f,o,null==u?vr(v)&&Wl:u!=f&&0!=(3&v.type),l&rt.Host&&d===v);return null!==B?Is(s,f,B,v):hi}function wo(r,s,o,u,l){const d=r.providerIndexes,f=s.data,v=1048575&d,D=r.directiveStart,B=d>>20,fe=l?v+B:r.directiveEnd;for(let Ce=u?v:v+B;Ce=D&&Ge.type===o)return Ce}if(l){const Ce=f[D];if(Ce&&Er(Ce)&&Ce.type===o)return D}return null}function Is(r,s,o,u){let l=r[o];const d=s.data;if(function Ka(r){return r instanceof to}(l)){const f=l;f.resolving&&function We(r,s){const o=s?`. Dependency path: ${s.join(" > ")} > ${r}`:"";throw new me(-200,`Circular dependency in DI detected for ${r}${o}`)}(function Ee(r){return"function"==typeof r?r.name||r.toString():"object"==typeof r&&null!=r&&"function"==typeof r.type?r.type.name||r.type.toString():we(r)}(d[o]));const v=_a(f.canSeeViewProviders);f.resolving=!0;const D=f.injectImpl?qn(f.injectImpl):null;Vo(r,u,rt.Default);try{l=r[o]=f.factory(void 0,d,r,u),s.firstCreatePass&&o>=u.directiveStart&&function Tr(r,s,o){const{ngOnChanges:u,ngOnInit:l,ngDoCheck:d}=s.type.prototype;if(u){const f=ca(s);(o.preOrderHooks||(o.preOrderHooks=[])).push(r,f),(o.preOrderCheckHooks||(o.preOrderCheckHooks=[])).push(r,f)}l&&(o.preOrderHooks||(o.preOrderHooks=[])).push(0-r,l),d&&((o.preOrderHooks||(o.preOrderHooks=[])).push(r,d),(o.preOrderCheckHooks||(o.preOrderCheckHooks=[])).push(r,d))}(o,d[o],s)}finally{null!==D&&qn(D),_a(v),f.resolving=!1,I()}}return l}function zo(r,s,o){return!!(o[s+(r>>5)]&1<{const s=r.prototype.constructor,o=s[bn]||Gu(s),u=Object.prototype;let l=Object.getPrototypeOf(r.prototype).constructor;for(;l&&l!==u;){const d=l[bn]||Gu(l);if(d&&d!==o)return d;l=Object.getPrototypeOf(l)}return d=>new d})}function Gu(r){return ye(r)?()=>{const s=Gu(te(r));return s&&s()}:is(r)}function va(r){const s=r[1],o=s.type;return 2===o?s.declTNode:1===o?r[6]:null}function Hu(r){return function Dh(r,s){if("class"===s)return r.classes;if("style"===s)return r.styles;const o=r.attrs;if(o){const u=o.length;let l=0;for(;l{const u=function io(r){return function(...o){if(r){const u=r(...o);for(const l in u)this[l]=u[l]}}}(s);function l(...d){if(this instanceof l)return u.apply(this,d),this;const f=new l(...d);return v.annotation=f,v;function v(D,R,B){const Y=D.hasOwnProperty(Wo)?D[Wo]:Object.defineProperty(D,Wo,{value:[]})[Wo];for(;Y.length<=B;)Y.push(null);return(Y[B]=Y[B]||[]).push(f),D}}return o&&(l.prototype=Object.create(o.prototype)),l.prototype.ngMetadataName=r,l.annotationCls=l,l})}class Hn{constructor(s,o){this._desc=s,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof o?this.__NG_ELEMENT_ID__=o:void 0!==o&&(this.\u0275prov=Qt({token:this,providedIn:o.providedIn||"root",factory:o.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function fi(r,s){void 0===s&&(s=r);for(let o=0;oArray.isArray(o)?so(o,s):s(o))}function Ia(r,s,o){s>=r.length?r.push(o):r.splice(s,0,o)}function nu(r,s){return s>=r.length-1?r.pop():r.splice(s,1)[0]}function J(r,s,o){let u=Ne(r,s);return u>=0?r[1|u]=o:(u=~u,function p(r,s,o,u){let l=r.length;if(l==s)r.push(o,u);else if(1===l)r.push(u,r[0]),r[0]=o;else{for(l--,r.push(r[l-1],r[l]);l>s;)r[l]=r[l-2],l--;r[s]=o,r[s+1]=u}}(r,u,s,o)),u}function ae(r,s){const o=Ne(r,s);if(o>=0)return r[1|o]}function Ne(r,s){return function cn(r,s,o){let u=0,l=r.length>>o;for(;l!==u;){const d=u+(l-u>>1),f=r[d<s?l=d:u=d+1}return~(l<({token:r})),-1),Lt=Je(Ko("Optional"),8),ri=Je(Ko("Self"),2),Jr=Je(Ko("SkipSelf"),4);let Jp;function sI(r){Jp=r}class D_{constructor(s){this.changingThisBreaksApplicationSecurity=s}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}function Zu(r){return r instanceof D_?r.changingThisBreaksApplicationSecurity:r}const T_=/^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;var pi=(()=>((pi=pi||{})[pi.NONE=0]="NONE",pi[pi.HTML=1]="HTML",pi[pi.STYLE=2]="STYLE",pi[pi.SCRIPT=3]="SCRIPT",pi[pi.URL=4]="URL",pi[pi.RESOURCE_URL=5]="RESOURCE_URL",pi))();function x_(r){const s=function Oh(){const r=Qe();return r&&r[12]}();return s?s.sanitize(pi.URL,r)||"":function Zl(r,s){const o=function pb(r){return r instanceof D_&&r.getTypeName()||null}(r);if(null!=o&&o!==s){if("ResourceURL"===o&&"URL"===s)return!0;throw new Error(`Required a safe ${s}, got a ${o} (see https://g.co/ng/security#xss)`)}return o===s}(r,"URL")?Zu(r):function sg(r){return(r=String(r)).match(T_)?r:"unsafe:"+r}(we(r))}const R_=new Hn("ENVIRONMENT_INITIALIZER"),EI=new Hn("INJECTOR",-1),II=new Hn("INJECTOR_DEF_TYPES");class DI{get(s,o=wa){if(o===wa){const u=new Error(`NullInjectorError: No provider for ${Q(s)}!`);throw u.name="NullInjectorError",u}return o}}function Ob(...r){return{\u0275providers:wI(0,r)}}function wI(r,...s){const o=[],u=new Set;let l;return so(s,d=>{const f=d;O_(f,o,[],u)&&(l||(l=[]),l.push(f))}),void 0!==l&&bI(l,o),o}function bI(r,s){for(let o=0;o{s.push(d)})}}function O_(r,s,o,u){if(!(r=te(r)))return!1;let l=null,d=xr(r);const f=!d&&De(r);if(d||f){if(f&&!f.standalone)return!1;l=r}else{const D=r.ngModule;if(d=xr(D),!d)return!1;l=D}const v=u.has(l);if(f){if(v)return!1;if(u.add(l),f.dependencies){const D="function"==typeof f.dependencies?f.dependencies():f.dependencies;for(const R of D)O_(R,s,o,u)}}else{if(!d)return!1;{if(null!=d.imports&&!v){let R;u.add(l);try{so(d.imports,B=>{O_(B,s,o,u)&&(R||(R=[]),R.push(B))})}finally{}void 0!==R&&bI(R,s)}if(!v){const R=is(l)||(()=>new l);s.push({provide:l,useFactory:R,deps:bt},{provide:II,useValue:l,multi:!0},{provide:R_,useValue:()=>L(l),multi:!0})}const D=d.providers;null==D||v||so(D,B=>{s.push(B)})}}return l!==r&&void 0!==r.providers}const Pb=W({provide:String,useValue:W});function P_(r){return null!==r&&"object"==typeof r&&Pb in r}function Vc(r){return"function"==typeof r}const N_=new Hn("Set Injector scope."),ug={},kb={};let k_;function cg(){return void 0===k_&&(k_=new DI),k_}class jc{}class SI extends jc{constructor(s,o,u,l){super(),this.parent=o,this.source=u,this.scopes=l,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Ph(s,f=>this.processProvider(f)),this.records.set(EI,Ql(void 0,this)),l.has("environment")&&this.records.set(jc,Ql(void 0,this));const d=this.records.get(N_);null!=d&&"string"==typeof d.value&&this.scopes.add(d.value),this.injectorDefTypes=new Set(this.get(II.multi,bt,rt.Self))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const s of this._ngOnDestroyHooks)s.ngOnDestroy();for(const s of this._onDestroyHooks)s()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(s){this._onDestroyHooks.push(s)}runInContext(s){this.assertNotDestroyed();const o=b(this),u=qn(void 0);try{return s()}finally{b(o),qn(u)}}get(s,o=wa,u=rt.Default){this.assertNotDestroyed();const l=b(this),d=qn(void 0);try{if(!(u&rt.SkipSelf)){let v=this.records.get(s);if(void 0===v){const D=function Vb(r){return"function"==typeof r||"object"==typeof r&&r instanceof Hn}(s)&&Br(s);v=D&&this.injectableDefInScope(D)?Ql(L_(s),ug):null,this.records.set(s,v)}if(null!=v)return this.hydrate(s,v)}return(u&rt.Self?cg():this.parent).get(s,o=u&rt.Optional&&o===wa?null:o)}catch(f){if("NullInjectorError"===f.name){if((f[ql]=f[ql]||[]).unshift(Q(s)),l)throw f;return function jt(r,s,o,u){const l=r[ql];throw s[Fc]&&l.unshift(s[Fc]),r.message=function ln(r,s,o,u=null){r=r&&"\n"===r.charAt(0)&&"\u0275"==r.charAt(1)?r.slice(2):r;let l=Q(s);if(Array.isArray(s))l=s.map(Q).join(" -> ");else if("object"==typeof s){let d=[];for(let f in s)if(s.hasOwnProperty(f)){let v=s[f];d.push(f+":"+("string"==typeof v?JSON.stringify(v):Q(v)))}l=`{${d.join(", ")}}`}return`${o}${u?"("+u+")":""}[${l}]: ${r.replace(qp,"\n ")}`}("\n"+r.message,l,o,u),r.ngTokenPath=l,r[ql]=null,r}(f,s,"R3InjectorError",this.source)}throw f}finally{qn(d),b(l)}}resolveInjectorInitializers(){const s=b(this),o=qn(void 0);try{const u=this.get(R_.multi,bt,rt.Self);for(const l of u)l()}finally{b(s),qn(o)}}toString(){const s=[],o=this.records;for(const u of o.keys())s.push(Q(u));return`R3Injector[${s.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new me(205,!1)}processProvider(s){let o=Vc(s=te(s))?s:te(s&&s.provide);const u=function Fb(r){return P_(r)?Ql(void 0,r.useValue):Ql(function AI(r,s,o){let u;if(Vc(r)){const l=te(r);return is(l)||L_(l)}if(P_(r))u=()=>te(r.useValue);else if(function CI(r){return!(!r||!r.useFactory)}(r))u=()=>r.useFactory(...Oe(r.deps||[]));else if(function TI(r){return!(!r||!r.useExisting)}(r))u=()=>L(te(r.useExisting));else{const l=te(r&&(r.useClass||r.provide));if(!function Ub(r){return!!r.deps}(r))return is(l)||L_(l);u=()=>new l(...Oe(r.deps))}return u}(r),ug)}(s);if(Vc(s)||!0!==s.multi)this.records.get(o);else{let l=this.records.get(o);l||(l=Ql(void 0,ug,!0),l.factory=()=>Oe(l.multi),this.records.set(o,l)),o=s,l.multi.push(s)}this.records.set(o,u)}hydrate(s,o){return o.value===ug&&(o.value=kb,o.value=o.factory()),"object"==typeof o.value&&o.value&&function Bb(r){return null!==r&&"object"==typeof r&&"function"==typeof r.ngOnDestroy}(o.value)&&this._ngOnDestroyHooks.add(o.value),o.value}injectableDefInScope(s){if(!s.providedIn)return!1;const o=te(s.providedIn);return"string"==typeof o?"any"===o||this.scopes.has(o):this.injectorDefTypes.has(o)}}function L_(r){const s=Br(r),o=null!==s?s.factory:is(r);if(null!==o)return o;if(r instanceof Hn)throw new me(204,!1);if(r instanceof Function)return function Lb(r){const s=r.length;if(s>0)throw function qo(r,s){const o=[];for(let u=0;uo.factory(r):()=>new r}(r);throw new me(204,!1)}function Ql(r,s,o=!1){return{factory:r,value:s,multi:o?[]:void 0}}function jb(r){return!!r.\u0275providers}function Ph(r,s){for(const o of r)Array.isArray(o)?Ph(o,s):jb(o)?Ph(o.\u0275providers,s):s(o)}class F_{}class dg{resolveComponentFactory(s){throw function Oi(r){const s=Error(`No component factory found for ${Q(r)}. Did you add it to @NgModule.entryComponents?`);return s.ngComponent=r,s}(s)}}let Xl=(()=>{class r{}return r.NULL=new dg,r})();function xI(){return $c(hr(),Qe())}function $c(r,s){return new Gc($r(r,s))}let Gc=(()=>{class r{constructor(o){this.nativeElement=o}}return r.__NG_ELEMENT_ID__=xI,r})();function RI(r){return r instanceof Gc?r.nativeElement:r}class U_{}let OI=(()=>{class r{}return r.__NG_ELEMENT_ID__=()=>function cs(){const r=Qe(),o=Cn(hr().index,r);return(kn(o)?o:r)[11]}(),r})(),Nh=(()=>{class r{}return r.\u0275prov=Qt({token:r,providedIn:"root",factory:()=>null}),r})();class hg{constructor(s){this.full=s,this.major=s.split(".")[0],this.minor=s.split(".")[1],this.patch=s.split(".").slice(2).join(".")}}const kh=new hg("14.2.6"),Hc={};function Bh(r){return r.ngOriginalError}class Aa{constructor(){this._console=console}handleError(s){const o=this._findOriginalError(s);this._console.error("ERROR",s),o&&this._console.error("ORIGINAL ERROR",o)}_findOriginalError(s){let o=s&&Bh(s);for(;o&&Bh(o);)o=Bh(o);return o||null}}const Tg=new Map;let FI=0;const su="__ngContext__";function $i(r,s){kn(s)?(r[su]=s[20],function Vh(r){Tg.set(r[20],r)}(s)):r[su]=s}function Ma(r){return r instanceof Function?r():r}var Zo=(()=>((Zo=Zo||{})[Zo.Important=1]="Important",Zo[Zo.DashCase=2]="DashCase",Zo))();function J_(r,s){return undefined(r,s)}function Wc(r){const s=r[3];return jr(s)?s[3]:s}function ed(r){return YI(r[13])}function Gh(r){return YI(r[4])}function YI(r){for(;null!==r&&!jr(r);)r=r[4];return r}function td(r,s,o,u,l){if(null!=u){let d,f=!1;jr(u)?d=u:kn(u)&&(f=!0,u=u[0]);const v=On(u);0===r&&null!==o?null==l?Kc(s,o,v):Qo(s,o,v,l||null,!0):1===r&&null!==o?Qo(s,o,v,l||null,!0):2===r?function Hi(r,s,o){const u=Hh(r,s);u&&function Lg(r,s,o,u){r.removeChild(s,o,u)}(r,u,s,o)}(s,v,f):3===r&&s.destroyNode(v),null!=d&&function Yh(r,s,o,u,l){const d=o[7];d!==On(o)&&td(s,r,u,d,l);for(let v=10;v0&&(r[o-1][4]=u[4]);const d=nu(r,10+s);!function Wb(r,s){ou(r,s,s[11],2,null,null),s[0]=null,s[6]=null}(u[1],u);const f=d[19];null!==f&&f.detachView(d[1]),u[3]=null,u[4]=null,u[2]&=-65}return u}function rv(r,s){if(!(128&s[2])){const o=s[11];o.destroyNode&&ou(r,s,o,3,null,null),function qb(r){let s=r[13];if(!s)return bo(r[1],r);for(;s;){let o=null;if(kn(s))o=s[13];else{const u=s[10];u&&(o=u)}if(!o){for(;s&&!s[4]&&s!==r;)kn(s)&&bo(s[1],s),s=s[3];null===s&&(s=r),kn(s)&&bo(s[1],s),o=s&&s[4]}s=o}}(s)}}function bo(r,s){if(!(128&s[2])){s[2]&=-65,s[2]|=128,function kg(r,s){let o;if(null!=r&&null!=(o=r.destroyHooks))for(let u=0;u=0?u[l=R]():u[l=-R].unsubscribe(),d+=2}else{const f=u[l=o[d+1]];o[d].call(f)}if(null!==u){for(let d=l+1;dd?"":l[Y+1].toLowerCase();const Ce=8&u?fe:null;if(Ce&&-1!==av(Ce,R,0)||2&u&&R!==fe){if(Ts(u))return!1;f=!0}}}}else{if(!f&&!Ts(u)&&!Ts(D))return!1;if(f&&Ts(D))continue;f=!1,u=D|1&u}}return Ts(u)||f}function Ts(r){return 0==(1&r)}function $g(r,s,o,u){if(null===s)return-1;let l=0;if(u||!o){let d=!1;for(;l-1)for(o++;o0?'="'+v+'"':"")+"]"}else 8&u?l+="."+f:4&u&&(l+=" "+f);else""!==l&&!Ts(f)&&(s+=zg(d,l),l=""),u=f,d=d||!Ts(u);o++}return""!==l&&(s+=zg(d,l)),s}const en={};function cv(r){lv(fn(),Qe(),ce()+r,!1)}function lv(r,s,o,u){if(!u)if(3==(3&s[2])){const d=r.preOrderCheckHooks;null!==d&&fr(s,d,o)}else{const d=r.preOrderHooks;null!==d&&Es(s,d,0,o)}Me(o)}function Xh(r,s=null,o=null,u){const l=Zg(r,s,o,u);return l.resolveInjectorInitializers(),l}function Zg(r,s=null,o=null,u,l=new Set){const d=[o||bt,Ob(r)];return u=u||("object"==typeof r?void 0:Q(r)),new SI(d,s||cg(),u||null,l)}let au=(()=>{class r{static create(o,u){if(Array.isArray(o))return Xh({name:""},u,o,"");{const l=o.name??"";return Xh({name:l},o.parent,o.providers,l)}}}return r.THROW_IF_NOT_FOUND=wa,r.NULL=new DI,r.\u0275prov=Qt({token:r,providedIn:"any",factory:()=>L(EI)}),r.__NG_ELEMENT_ID__=-1,r})();function Qu(r,s=rt.Default){const o=Qe();return null===o?L(r,s):Xa(hr(),o,te(r),s)}function im(){throw new Error("invalid")}function sf(r,s){return r<<17|s<<2}function To(r){return r>>17&32767}function sm(r){return 2|r}function ls(r){return(131068&r)>>2}function af(r,s){return-131069&r|s<<2}function uf(r){return 1|r}function Zc(r,s){const o=r.contentQueries;if(null!==o)for(let u=0;u22&&lv(r,s,22,!1),o(u,l)}finally{Me(d)}}function ym(r,s,o){if(Yi(s)){const l=s.directiveEnd;for(let d=s.directiveStart;d0;){const o=r[--s];if("number"==typeof o&&o<0)return o}return 0})(v)!=D&&v.push(D),v.push(u,l,f)}}function tl(r,s){null!==r.hostBindings&&r.hostBindings(1,s)}function Cv(r,s){s.flags|=2,(r.components||(r.components=[])).push(s.index)}function Sv(r,s,o){if(o){if(s.exportAs)for(let u=0;u0&&ec(o)}}function ec(r){for(let u=ed(r);null!==u;u=Gh(u))for(let l=10;l0&&ec(d)}const o=r[1].components;if(null!==o)for(let u=0;u0&&ec(l)}}function Pv(r,s){const o=Cn(s,r),u=o[1];(function Dm(r,s){for(let o=s.length;o-1&&(nv(s,u),nu(o,u))}this._attachedToViewContainer=!1}rv(this._lView[1],this._lView)}onDestroy(s){vm(this._lView[1],this._lView,null,s)}markForCheck(){Cf(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){nc(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new me(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function XI(r,s){ou(r,s,s[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(s){if(this._attachedToViewContainer)throw new me(902,!1);this._appRef=s}}class Nv extends Mo{constructor(s){super(s),this._view=s}detectChanges(){const s=this._view;nc(s[1],s,s[8],!1)}checkNoChanges(){}get context(){return null}}class Of extends Xl{constructor(s){super(),this.ngModule=s}resolveComponentFactory(s){const o=De(s);return new Ki(o,this.ngModule)}}function Tm(r){const s=[];for(let o in r)r.hasOwnProperty(o)&&s.push({propName:r[o],templateName:o});return s}class Pf{constructor(s,o){this.injector=s,this.parentInjector=o}get(s,o,u){const l=this.injector.get(s,Hc,u);return l!==Hc||o===Hc?l:this.parentInjector.get(s,o,u)}}class Ki extends F_{constructor(s,o){super(),this.componentDef=s,this.ngModule=o,this.componentType=s.type,this.selector=function od(r){return r.map(iD).join(",")}(s.selectors),this.ngContentSelectors=s.ngContentSelectors?s.ngContentSelectors:[],this.isBoundToModule=!!o}get inputs(){return Tm(this.componentDef.inputs)}get outputs(){return Tm(this.componentDef.outputs)}create(s,o,u,l){let d=(l=l||this.ngModule)instanceof jc?l:l?.injector;d&&null!==this.componentDef.getStandaloneInjector&&(d=this.componentDef.getStandaloneInjector(d)||d);const f=d?new Pf(s,d):s,v=f.get(U_,null);if(null===v)throw new me(407,!1);const D=f.get(Nh,null),R=v.createRenderer(null,this.componentDef),B=this.componentDef.selectors[0][0]||"div",Y=u?function wD(r,s,o){return r.selectRootElement(s,o===St.ShadowDom)}(R,u,this.componentDef.encapsulation):Ng(v.createRenderer(null,this.componentDef),B,function kv(r){const s=r.toLowerCase();return"svg"===s?"svg":"math"===s?"math":null}(B)),fe=this.componentDef.onPush?288:272,Ce=_m(0,null,null,1,0,null,null,null,null,null),Ge=Ed(null,Ce,null,fe,null,null,v,R,D,f,null);let it,ft;eo(Ge);try{const xt=function MD(r,s,o,u,l,d){const f=o[1];o[22]=r;const D=Qc(f,22,2,"#host",null),R=D.mergedAttrs=s.hostAttrs;null!==R&&(Dd(D,R,!0),null!==r&&(Ya(l,r,R),null!==D.classes&&Ug(l,r,D.classes),null!==D.styles&&Zh(l,r,D.styles)));const B=u.createRenderer(r,s),Y=Ed(o,Ju(s),null,s.onPush?32:16,o[22],D,u,B,d||null,null,null);return f.firstCreatePass&&(no(Qn(D,o),f,s.type),Cv(f,D),Av(D,o.length,1)),tc(o,Y),o[22]=Y}(Y,this.componentDef,Ge,v,R);if(Y)if(u)Ya(R,Y,["ng-version",kh.full]);else{const{attrs:Ut,classes:et}=function sD(r){const s=[],o=[];let u=1,l=2;for(;u0&&Ug(R,Y,et.join(" "))}if(ft=Fo(Ce,22),void 0!==o){const Ut=ft.projection=[];for(let et=0;etv(On(zn[u.index])):u.index;let Kt=null;if(!v&&D&&(Kt=function ND(r,s,o,u){const l=r.cleanup;if(null!=l)for(let d=0;dD?v[D]:null}"string"==typeof f&&(d+=2)}return null}(r,s,l,u.index)),null!==Kt)(Kt.__ngLastListenerFn__||Kt).__ngNextListenerFn__=d,Kt.__ngLastListenerFn__=d,Ce=!1;else{d=Lf(u,s,Y,d,!1);const zn=o.listen(xt,l,d);fe.push(d,zn),B&&B.push(l,et,Ut,Ut+1)}}else d=Lf(u,s,Y,d,!1);const Ge=u.outputs;let it;if(Ce&&null!==Ge&&(it=Ge[l])){const ft=it.length;if(ft)for(let xt=0;xt0;)s=s[15],r--;return s}(r,Ht.lFrame.contextLView))[8]}(r)}function Fr(r,s,o,u,l){const d=r[o+1],f=null===s;let v=u?To(d):ls(d),D=!1;for(;0!==v&&(!1===D||f);){const B=r[v+1];cc(r[v],s)&&(D=!0,r[v+1]=u?uf(B):sm(B)),v=u?To(B):ls(B)}D&&(r[o+1]=u?sm(d):uf(d))}function cc(r,s){return null===r||null==s||(Array.isArray(r)?r[1]:r)===s||!(!Array.isArray(r)||"string"!=typeof s)&&Ne(r,s)>=0}function Nd(r,s){return function lo(r,s,o,u){const l=Qe(),d=fn(),f=vs(2);d.firstUpdatePass&&function Vm(r,s,o,u){const l=r.data;if(null===l[o+1]){const d=l[ce()],f=function fl(r,s){return s>=r.expandoStartIndex}(r,o);(function Ld(r,s){return 0!=(r.flags&(s?16:32))})(d,u)&&null===s&&!f&&(s=!1),s=function VD(r,s,o,u){const l=function ma(r){const s=Ht.lFrame.currentDirectiveIndex;return-1===s?null:r[s]}(r);let d=u?s.residualClasses:s.residualStyles;if(null===l)0===(u?s.classBindings:s.styleBindings)&&(o=pl(o=gi(null,r,s,o,u),s.attrs,u),d=null);else{const f=s.directiveStylingLast;if(-1===f||r[f]!==l)if(o=gi(l,r,s,o,u),null===d){let D=function jD(r,s,o){const u=o?s.classBindings:s.styleBindings;if(0!==ls(u))return r[To(u)]}(r,s,u);void 0!==D&&Array.isArray(D)&&(D=gi(null,r,s,D[1],u),D=pl(D,s.attrs,u),function zv(r,s,o,u){r[To(o?s.classBindings:s.styleBindings)]=u}(r,s,u,D))}else d=function Wv(r,s,o){let u;const l=s.directiveEnd;for(let d=1+s.directiveStylingLast;d0)&&(R=!0)}else B=o;if(l)if(0!==D){const fe=To(r[v+1]);r[u+1]=sf(fe,v),0!==fe&&(r[fe+1]=af(r[fe+1],u)),r[v+1]=function fD(r,s){return 131071&r|s<<17}(r[v+1],u)}else r[u+1]=sf(v,0),0!==v&&(r[v+1]=af(r[v+1],u)),v=u;else r[u+1]=sf(D,0),0===v?v=u:r[D+1]=af(r[D+1],u),D=u;R&&(r[u+1]=sm(r[u+1])),Fr(r,B,u,!0),Fr(r,B,u,!1),function mu(r,s,o,u,l){const d=l?r.residualClasses:r.residualStyles;null!=d&&"string"==typeof s&&Ne(d,s)>=0&&(o[u+1]=uf(o[u+1]))}(s,B,r,u,d),f=sf(v,D),d?s.classBindings=f:s.styleBindings=f}(l,d,s,o,f,u)}}(d,r,f,u),s!==en&&Ye(l,f,s)&&function _u(r,s,o,u,l,d,f,v){if(!(3&s.type))return;const D=r.data,R=D[v+1];vu(function fd(r){return 1==(1&r)}(R)?Yv(D,s,o,l,ls(R),f):void 0)||(vu(d)||function Xu(r){return 2==(2&r)}(R)&&(d=Yv(D,null,o,l,v,f)),function Jo(r,s,o,u,l){if(s)l?r.addClass(o,u):r.removeClass(o,u);else{let d=-1===u.indexOf("-")?void 0:Zo.DashCase;null==l?r.removeStyle(o,u,d):("string"==typeof l&&l.endsWith("!important")&&(l=l.slice(0,-10),d|=Zo.Important),r.setStyle(o,u,l,d))}}(u,f,Si(ce(),o),l,d))}(d,d.data[ce()],l,l[11],r,l[f+1]=function Bf(r,s){return null==r||("string"==typeof s?r+=s:"object"==typeof r&&(r=Q(Zu(r)))),r}(s,o),u,f)}(r,s,null,!0),Nd}function gi(r,s,o,u,l){let d=null;const f=o.directiveEnd;let v=o.directiveStylingLast;for(-1===v?v=o.directiveStart:v++;v0;){const D=r[l],R=Array.isArray(D),B=R?D[1]:D,Y=null===B;let fe=o[l+1];fe===en&&(fe=Y?bt:void 0);let Ce=Y?ae(fe,u):B===u?fe:void 0;if(R&&!vu(Ce)&&(Ce=ae(D,u)),vu(Ce)&&(v=Ce,f))return v;const Ge=r[l+1];l=f?To(Ge):ls(Ge)}if(null!==s){let D=d?s.residualClasses:s.residualStyles;null!=D&&(v=ae(D,u))}return v}function vu(r){return void 0!==r}function jm(r,s=""){const o=Qe(),u=fn(),l=r+22,d=u.firstCreatePass?Qc(u,l,1,s,null):u.data[l],f=o[l]=function Pg(r,s){return r.createText(s)}(o[11],s);zh(u,o,f,d),ni(d,!1)}function Vf(r){return mi("",r,""),Vf}function mi(r,s,o){const u=Qe(),l=function ol(r,s,o,u){return Ye(r,Bs(),o)?s+we(o)+u:en}(u,r,s,o);return l!==en&&ao(u,ce(),l),mi}function $m(r,s,o,u,l){const d=Qe(),f=al(d,r,s,o,u,l);return f!==en&&ao(d,ce(),f),$m}const ho=void 0;var lE=["en",[["a","p"],["AM","PM"],ho],[["AM","PM"],ho,ho],[["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"]],ho,[["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"]],ho,[["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}",ho,"{1} 'at' {0}",ho],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function hc(r){const o=Math.floor(Math.abs(r)),u=r.toString().replace(/^[^.]*\.?/,"").length;return 1===o&&0===u?1:5}];let fo={};function Iu(r){const s=function Ar(r){return r.toLowerCase().replace(/_/g,"-")}(r);let o=_l(s);if(o)return o;const u=s.split("-")[0];if(o=_l(u),o)return o;if("en"===u)return lE;throw new me(701,!1)}function ey(r){return Iu(r)[Gt.PluralCase]}function _l(r){return r in fo||(fo[r]=tn.ng&&tn.ng.common&&tn.ng.common.locales&&tn.ng.common.locales[r]),fo[r]}var Gt=(()=>((Gt=Gt||{})[Gt.LocaleId=0]="LocaleId",Gt[Gt.DayPeriodsFormat=1]="DayPeriodsFormat",Gt[Gt.DayPeriodsStandalone=2]="DayPeriodsStandalone",Gt[Gt.DaysFormat=3]="DaysFormat",Gt[Gt.DaysStandalone=4]="DaysStandalone",Gt[Gt.MonthsFormat=5]="MonthsFormat",Gt[Gt.MonthsStandalone=6]="MonthsStandalone",Gt[Gt.Eras=7]="Eras",Gt[Gt.FirstDayOfWeek=8]="FirstDayOfWeek",Gt[Gt.WeekendRange=9]="WeekendRange",Gt[Gt.DateFormat=10]="DateFormat",Gt[Gt.TimeFormat=11]="TimeFormat",Gt[Gt.DateTimeFormat=12]="DateTimeFormat",Gt[Gt.NumberSymbols=13]="NumberSymbols",Gt[Gt.NumberFormats=14]="NumberFormats",Gt[Gt.CurrencyCode=15]="CurrencyCode",Gt[Gt.CurrencySymbol=16]="CurrencySymbol",Gt[Gt.CurrencyName=17]="CurrencyName",Gt[Gt.Currencies=18]="Currencies",Gt[Gt.Directionality=19]="Directionality",Gt[Gt.PluralCase=20]="PluralCase",Gt[Gt.ExtraData=21]="ExtraData",Gt))();const fc="en-US";let na=fc;class Cl{}class gy{}function LE(r,s){return new Zf(r,s??null)}class Zf extends Cl{constructor(s,o){super(),this._parent=o,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new Of(this);const u=Tn(s);this._bootstrapComponents=Ma(u.bootstrap),this._r3Injector=Zg(s,o,[{provide:Cl,useValue:this},{provide:Xl,useValue:this.componentFactoryResolver}],Q(s),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(s)}get injector(){return this._r3Injector}destroy(){const s=this._r3Injector;!s.destroyed&&s.destroy(),this.destroyCbs.forEach(o=>o()),this.destroyCbs=null}onDestroy(s){this.destroyCbs.push(s)}}class oi extends gy{constructor(s){super(),this.moduleType=s}create(s){return new Zf(this.moduleType,s)}}class my extends Cl{constructor(s,o,u){super(),this.componentFactoryResolver=new Of(this),this.instance=null;const l=new SI([...s,{provide:Cl,useValue:this},{provide:Xl,useValue:this.componentFactoryResolver}],o||cg(),u,new Set(["environment"]));this.injector=l,l.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(s){this.injector.onDestroy(s)}}function Kd(r,s,o=null){return new my(r,s,o).injector}let yy=(()=>{class r{constructor(o){this._injector=o,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(o){if(!o.standalone)return null;if(!this.cachedInjectors.has(o.id)){const u=wI(0,o.type),l=u.length>0?Kd([u],this._injector,`Standalone[${o.type.name}]`):null;this.cachedInjectors.set(o.id,l)}return this.cachedInjectors.get(o.id)}ngOnDestroy(){try{for(const o of this.cachedInjectors.values())null!==o&&o.destroy()}finally{this.cachedInjectors.clear()}}}return r.\u0275prov=Qt({token:r,providedIn:"environment",factory:()=>new r(L(jc))}),r})();function La(r){r.getStandaloneInjector=s=>s.get(yy).getOrCreateStandaloneInjector(r)}function Xd(r,s){const o=r[s];return o===en?void 0:o}function Sl(r,s){const o=fn();let u;const l=r+22;o.firstCreatePass?(u=function tp(r,s){if(s)for(let o=s.length-1;o>=0;o--){const u=s[o];if(r===u.name)return u}}(s,o.pipeRegistry),o.data[l]=u,u.onDestroy&&(o.destroyHooks||(o.destroyHooks=[])).push(l,u.onDestroy)):u=o.data[l];const d=u.factory||(u.factory=is(u.type)),f=qn(Qu);try{const v=_a(!1),D=d();return _a(v),function PD(r,s,o,u){o>=r.data.length&&(r.data[o]=null,r.blueprint[o]=null),s[o]=u}(o,Qe(),l,D),D}finally{qn(f)}}function Iy(r,s,o){const u=r+22,l=Qe(),d=ms(l,u);return Cu(l,u)?function GE(r,s,o,u,l,d){const f=s+o;return Ye(r,f,l)?ut(r,f+1,d?u.call(d,l):u(l)):Xd(r,f+1)}(l,br(),s,d.transform,o,d):d.transform(o)}function Dy(r,s,o,u){const l=r+22,d=Qe(),f=ms(d,l);return Cu(d,l)?function ep(r,s,o,u,l,d,f){const v=s+o;return Dr(r,v,l,d)?ut(r,v+2,f?u.call(f,l,d):u(l,d)):Xd(r,v+2)}(d,br(),s,f.transform,o,u,f):f.transform(o,u)}function Cu(r,s){return r[1].data[s].pure}function sa(r){return s=>{setTimeout(r,void 0,s)}}const fs=class WE extends m.x{constructor(s=!1){super(),this.__isAsync=s}emit(s){super.next(s)}subscribe(s,o,u){let l=s,d=o||(()=>null),f=u;if(s&&"object"==typeof s){const D=s;l=D.next?.bind(D),d=D.error?.bind(D),f=D.complete?.bind(D)}this.__isAsync&&(d=sa(d),l&&(l=sa(l)),f&&(f=sa(f)));const v=super.subscribe({next:l,error:d,complete:f});return s instanceof M.w0&&s.add(v),v}};function KE(){return this._results[tt()]()}class Fa{constructor(s=!1){this._emitDistinctChangesOnly=s,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const o=tt(),u=Fa.prototype;u[o]||(u[o]=KE)}get changes(){return this._changes||(this._changes=new fs)}get(s){return this._results[s]}map(s){return this._results.map(s)}filter(s){return this._results.filter(s)}find(s){return this._results.find(s)}reduce(s,o){return this._results.reduce(s,o)}forEach(s){this._results.forEach(s)}some(s){return this._results.some(s)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(s,o){const u=this;u.dirty=!1;const l=fi(s);(this._changesDetected=!function kc(r,s,o){if(r.length!==s.length)return!1;for(let u=0;u{class r{}return r.__NG_ELEMENT_ID__=Su,r})();const Al=eh,qE=class extends Al{constructor(s,o,u){super(),this._declarationLView=s,this._declarationTContainer=o,this.elementRef=u}createEmbeddedView(s,o){const u=this._declarationTContainer.tViews,l=Ed(this._declarationLView,u,s,16,null,u.declTNode,null,null,null,null,o||null);l[17]=this._declarationLView[this._declarationTContainer.index];const f=this._declarationLView[19];return null!==f&&(l[19]=f.createEmbeddedView(u)),mm(u,l,s),new Mo(l)}};function Su(){return th(hr(),Qe())}function th(r,s){return 4&r.type?new qE(s,r,$c(r,s)):null}let ip=(()=>{class r{}return r.__NG_ELEMENT_ID__=_w,r})();function _w(){return ZE(hr(),Qe())}const vw=ip,YE=class extends vw{constructor(s,o,u){super(),this._lContainer=s,this._hostTNode=o,this._hostLView=u}get element(){return $c(this._hostTNode,this._hostLView)}get injector(){return new Hs(this._hostTNode,this._hostLView)}get parentInjector(){const s=Go(this._hostTNode,this._hostLView);if(Oc(s)){const o=$o(s,this._hostLView),u=kr(s);return new Hs(o[1].data[u+8],o)}return new Hs(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(s){const o=nh(this._lContainer);return null!==o&&o[s]||null}get length(){return this._lContainer.length-10}createEmbeddedView(s,o,u){let l,d;"number"==typeof u?l=u:null!=u&&(l=u.index,d=u.injector);const f=s.createEmbeddedView(o||{},d);return this.insert(f,l),f}createComponent(s,o,u,l,d){const f=s&&!function tu(r){return"function"==typeof r}(s);let v;if(f)v=o;else{const Y=o||{};v=Y.index,u=Y.injector,l=Y.projectableNodes,d=Y.environmentInjector||Y.ngModuleRef}const D=f?s:new Ki(De(s)),R=u||this.parentInjector;if(!d&&null==D.ngModule){const fe=(f?R:this.parentInjector).get(jc,null);fe&&(d=fe)}const B=D.create(R,l,void 0,d);return this.insert(B.hostView,v),B}insert(s,o){const u=s._lView,l=u[1];if(function ks(r){return jr(r[3])}(u)){const B=this.indexOf(s);if(-1!==B)this.detach(B);else{const Y=u[3],fe=new YE(Y,Y[6],Y[3]);fe.detach(fe.indexOf(s))}}const d=this._adjustIndex(o),f=this._lContainer;!function Yb(r,s,o,u){const l=10+u,d=o.length;u>0&&(o[l-1][4]=s),u0)u.push(f[v/2]);else{const R=d[v+1],B=s[-D];for(let Y=10;Y{class r{constructor(o){this.appInits=o,this.resolve=Pl,this.reject=Pl,this.initialized=!1,this.done=!1,this.donePromise=new Promise((u,l)=>{this.resolve=u,this.reject=l})}runInitializers(){if(this.initialized)return;const o=[],u=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let l=0;l{d.subscribe({complete:v,error:D})});o.push(f)}}Promise.all(o).then(()=>{u()}).catch(l=>{this.reject(l)}),0===o.length&&u(),this.initialized=!0}}return r.\u0275fac=function(o){return new(o||r)(L(oa,8))},r.\u0275prov=Qt({token:r,factory:r.\u0275fac,providedIn:"root"}),r})();const v0=new Hn("AppId",{providedIn:"root",factory:function vp(){return`${ch()}${ch()}${ch()}`}});function ch(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const E0=new Hn("Platform Initializer"),jy=new Hn("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),lh=new Hn("appBootstrapListener");let Nl=(()=>{class r{log(o){console.log(o)}warn(o){console.warn(o)}}return r.\u0275fac=function(o){return new(o||r)},r.\u0275prov=Qt({token:r,factory:r.\u0275fac,providedIn:"platform"}),r})();const Ep=new Hn("LocaleId",{providedIn:"root",factory:()=>Ie(Ep,rt.Optional|rt.SkipSelf)||function $y(){return typeof $localize<"u"&&$localize.locale||fc}()}),kw=new Hn("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});class Gy{constructor(s,o){this.ngModuleFactory=s,this.componentFactories=o}}let Uw=(()=>{class r{compileModuleSync(o){return new oi(o)}compileModuleAsync(o){return Promise.resolve(this.compileModuleSync(o))}compileModuleAndAllComponentsSync(o){const u=this.compileModuleSync(o),d=Ma(Tn(o).declarations).reduce((f,v)=>{const D=De(v);return D&&f.push(new Ki(D)),f},[]);return new Gy(u,d)}compileModuleAndAllComponentsAsync(o){return Promise.resolve(this.compileModuleAndAllComponentsSync(o))}clearCache(){}clearCacheFor(o){}getModuleId(o){}}return r.\u0275fac=function(o){return new(o||r)},r.\u0275prov=Qt({token:r,factory:r.\u0275fac,providedIn:"root"}),r})();const Wy=(()=>Promise.resolve(0))();function dh(r){typeof Zone>"u"?Wy.then(()=>{r&&r.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",r)}class vi{constructor({enableLongStackTrace:s=!1,shouldCoalesceEventChangeDetection:o=!1,shouldCoalesceRunChangeDetection:u=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new fs(!1),this.onMicrotaskEmpty=new fs(!1),this.onStable=new fs(!1),this.onError=new fs(!1),typeof Zone>"u")throw new me(908,!1);Zone.assertZonePatched();const l=this;if(l._nesting=0,l._outer=l._inner=Zone.current,Zone.AsyncStackTaggingZoneSpec){const d=Zone.AsyncStackTaggingZoneSpec;l._inner=l._inner.fork(new d("Angular"))}Zone.TaskTrackingZoneSpec&&(l._inner=l._inner.fork(new Zone.TaskTrackingZoneSpec)),s&&Zone.longStackTraceZoneSpec&&(l._inner=l._inner.fork(Zone.longStackTraceZoneSpec)),l.shouldCoalesceEventChangeDetection=!u&&o,l.shouldCoalesceRunChangeDetection=u,l.lastRequestAnimationFrameId=-1,l.nativeRequestAnimationFrame=function kl(){let r=tn.requestAnimationFrame,s=tn.cancelAnimationFrame;if(typeof Zone<"u"&&r&&s){const o=r[Zone.__symbol__("OriginalDelegate")];o&&(r=o);const u=s[Zone.__symbol__("OriginalDelegate")];u&&(s=u)}return{nativeRequestAnimationFrame:r,nativeCancelAnimationFrame:s}}().nativeRequestAnimationFrame,function w0(r){const s=()=>{!function Ll(r){r.isCheckStableRunning||-1!==r.lastRequestAnimationFrameId||(r.lastRequestAnimationFrameId=r.nativeRequestAnimationFrame.call(tn,()=>{r.fakeTopEventTask||(r.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{r.lastRequestAnimationFrameId=-1,Mu(r),r.isCheckStableRunning=!0,Au(r),r.isCheckStableRunning=!1},void 0,()=>{},()=>{})),r.fakeTopEventTask.invoke()}),Mu(r))}(r)};r._inner=r._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(o,u,l,d,f,v)=>{try{return b0(r),o.invokeTask(l,d,f,v)}finally{(r.shouldCoalesceEventChangeDetection&&"eventTask"===d.type||r.shouldCoalesceRunChangeDetection)&&s(),T0(r)}},onInvoke:(o,u,l,d,f,v,D)=>{try{return b0(r),o.invoke(l,d,f,v,D)}finally{r.shouldCoalesceRunChangeDetection&&s(),T0(r)}},onHasTask:(o,u,l,d)=>{o.hasTask(l,d),u===l&&("microTask"==d.change?(r._hasPendingMicrotasks=d.microTask,Mu(r),Au(r)):"macroTask"==d.change&&(r.hasPendingMacrotasks=d.macroTask))},onHandleError:(o,u,l,d)=>(o.handleError(l,d),r.runOutsideAngular(()=>r.onError.emit(d)),!1)})}(l)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!vi.isInAngularZone())throw new me(909,!1)}static assertNotInAngularZone(){if(vi.isInAngularZone())throw new me(909,!1)}run(s,o,u){return this._inner.run(s,o,u)}runTask(s,o,u,l){const d=this._inner,f=d.scheduleEventTask("NgZoneEvent: "+l,s,Ky,Pl,Pl);try{return d.runTask(f,o,u)}finally{d.cancelTask(f)}}runGuarded(s,o,u){return this._inner.runGuarded(s,o,u)}runOutsideAngular(s){return this._outer.run(s)}}const Ky={};function Au(r){if(0==r._nesting&&!r.hasPendingMicrotasks&&!r.isStable)try{r._nesting++,r.onMicrotaskEmpty.emit(null)}finally{if(r._nesting--,!r.hasPendingMicrotasks)try{r.runOutsideAngular(()=>r.onStable.emit(null))}finally{r.isStable=!0}}}function Mu(r){r.hasPendingMicrotasks=!!(r._hasPendingMicrotasks||(r.shouldCoalesceEventChangeDetection||r.shouldCoalesceRunChangeDetection)&&-1!==r.lastRequestAnimationFrameId)}function b0(r){r._nesting++,r.isStable&&(r.isStable=!1,r.onUnstable.emit(null))}function T0(r){r._nesting--,Au(r)}class qy{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new fs,this.onMicrotaskEmpty=new fs,this.onStable=new fs,this.onError=new fs}run(s,o,u){return s.apply(o,u)}runGuarded(s,o,u){return s.apply(o,u)}runOutsideAngular(s){return s()}runTask(s,o,u,l){return s.apply(o,u)}}const Dp=new Hn(""),wp=new Hn("");let hh,Yy=(()=>{class r{constructor(o,u,l){this._ngZone=o,this.registry=u,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,hh||(function Vw(r){hh=r}(l),l.addToWindow(u)),this._watchAngularEvents(),o.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:()=>{vi.assertNotInAngularZone(),dh(()=>{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())dh(()=>{for(;0!==this._callbacks.length;){let o=this._callbacks.pop();clearTimeout(o.timeoutId),o.doneCb(this._didWork)}this._didWork=!1});else{let o=this.getPendingTasks();this._callbacks=this._callbacks.filter(u=>!u.updateCb||!u.updateCb(o)||(clearTimeout(u.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(o=>({source:o.source,creationLocation:o.creationLocation,data:o.data})):[]}addCallback(o,u,l){let d=-1;u&&u>0&&(d=setTimeout(()=>{this._callbacks=this._callbacks.filter(f=>f.timeoutId!==d),o(this._didWork,this.getPendingTasks())},u)),this._callbacks.push({doneCb:o,timeoutId:d,updateCb:l})}whenStable(o,u,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(o,u,l),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(o){this.registry.registerApplication(o,this)}unregisterApplication(o){this.registry.unregisterApplication(o)}findProviders(o,u,l){return[]}}return r.\u0275fac=function(o){return new(o||r)(L(vi),L(C0),L(wp))},r.\u0275prov=Qt({token:r,factory:r.\u0275fac}),r})(),C0=(()=>{class r{constructor(){this._applications=new Map}registerApplication(o,u){this._applications.set(o,u)}unregisterApplication(o){this._applications.delete(o)}unregisterAllApplications(){this._applications.clear()}getTestability(o){return this._applications.get(o)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(o,u=!0){return hh?.findTestabilityInTree(this,o,u)??null}}return r.\u0275fac=function(o){return new(o||r)},r.\u0275prov=Qt({token:r,factory:r.\u0275fac,providedIn:"platform"}),r})(),aa=null;const S0=new Hn("AllowMultipleToken"),bp=new Hn("PlatformDestroyListeners");class x0{constructor(s,o){this.name=s,this.token=o}}function Tp(r,s,o=[]){const u=`Platform: ${s}`,l=new Hn(u);return(d=[])=>{let f=fh();if(!f||f.injector.get(S0,!1)){const v=[...o,...d,{provide:l,useValue:!0}];r?r(v):function $w(r){if(aa&&!aa.get(S0,!1))throw new me(400,!1);aa=r;const s=r.get(O0);(function R0(r){const s=r.get(E0,null);s&&s.forEach(o=>o())})(r)}(function Cp(r=[],s){return au.create({name:s,providers:[{provide:N_,useValue:"platform"},{provide:bp,useValue:new Set([()=>aa=null])},...r]})}(v,u))}return function Zy(r){const s=fh();if(!s)throw new me(401,!1);return s}()}}function fh(){return aa?.get(O0)??null}let O0=(()=>{class r{constructor(o){this._injector=o,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(o,u){const l=function Qy(r,s){let o;return o="noop"===r?new qy:("zone.js"===r?void 0:r)||new vi(s),o}(u?.ngZone,function Sp(r){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!r||!r.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!r||!r.ngZoneRunCoalescing)||!1}}(u)),d=[{provide:vi,useValue:l}];return l.run(()=>{const f=au.create({providers:d,parent:this.injector,name:o.moduleType.name}),v=o.create(f),D=v.injector.get(Aa,null);if(!D)throw new me(402,!1);return l.runOutsideAngular(()=>{const R=l.onError.subscribe({next:B=>{D.handleError(B)}});v.onDestroy(()=>{Fl(this._modules,v),R.unsubscribe()})}),function Ap(r,s,o){try{const u=o();return dl(u)?u.catch(l=>{throw s.runOutsideAngular(()=>r.handleError(l)),l}):u}catch(u){throw s.runOutsideAngular(()=>r.handleError(u)),u}}(D,l,()=>{const R=v.injector.get(uh);return R.runInitializers(),R.donePromise.then(()=>(function ty(r){Ft(r,"Expected localeId to be defined"),"string"==typeof r&&(na=r.toLowerCase().replace(/_/g,"-"))}(v.injector.get(Ep,fc)||fc),this._moduleDoBootstrap(v),v))})})}bootstrapModule(o,u=[]){const l=Xy({},u);return function A0(r,s,o){const u=new oi(o);return Promise.resolve(u)}(0,0,o).then(d=>this.bootstrapModuleFactory(d,l))}_moduleDoBootstrap(o){const u=o.injector.get(Mp);if(o._bootstrapComponents.length>0)o._bootstrapComponents.forEach(l=>u.bootstrap(l));else{if(!o.instance.ngDoBootstrap)throw new me(403,!1);o.instance.ngDoBootstrap(u)}this._modules.push(o)}onDestroy(o){this._destroyListeners.push(o)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new me(404,!1);this._modules.slice().forEach(u=>u.destroy()),this._destroyListeners.forEach(u=>u());const o=this._injector.get(bp,null);o&&(o.forEach(u=>u()),o.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return r.\u0275fac=function(o){return new(o||r)(L(au))},r.\u0275prov=Qt({token:r,factory:r.\u0275fac,providedIn:"platform"}),r})();function Xy(r,s){return Array.isArray(s)?s.reduce(Xy,r):{...r,...s}}let Mp=(()=>{class r{constructor(o,u,l){this._zone=o,this._injector=u,this._exceptionHandler=l,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 d=new F.y(v=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{v.next(this._stable),v.complete()})}),f=new F.y(v=>{let D;this._zone.runOutsideAngular(()=>{D=this._zone.onStable.subscribe(()=>{vi.assertNotInAngularZone(),dh(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,v.next(!0))})})});const R=this._zone.onUnstable.subscribe(()=>{vi.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{v.next(!1)}))});return()=>{D.unsubscribe(),R.unsubscribe()}});this.isStable=(0,z.T)(d,f.pipe((0,O.B)()))}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(o,u){const l=o instanceof F_;if(!this._injector.get(uh).done)throw!l&&Jt(o),new me(405,false);let f;f=l?o:this._injector.get(Xl).resolveComponentFactory(o),this.componentTypes.push(f.componentType);const v=function M0(r){return r.isBoundToModule}(f)?void 0:this._injector.get(Cl),R=f.create(au.NULL,[],u||f.selector,v),B=R.location.nativeElement,Y=R.injector.get(Dp,null);return Y?.registerApplication(B),R.onDestroy(()=>{this.detachView(R.hostView),Fl(this.components,R),Y?.unregisterApplication(B)}),this._loadComponent(R),R}tick(){if(this._runningTick)throw new me(101,!1);try{this._runningTick=!0;for(let o of this._views)o.detectChanges()}catch(o){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(o))}finally{this._runningTick=!1}}attachView(o){const u=o;this._views.push(u),u.attachToAppRef(this)}detachView(o){const u=o;Fl(this._views,u),u.detachFromAppRef()}_loadComponent(o){this.attachView(o.hostView),this.tick(),this.components.push(o),this._injector.get(lh,[]).concat(this._bootstrapListeners).forEach(l=>l(o))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(o=>o()),this._views.slice().forEach(o=>o.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(o){return this._destroyListeners.push(o),()=>Fl(this._destroyListeners,o)}destroy(){if(this._destroyed)throw new me(406,!1);const o=this._injector;o.destroy&&!o.destroyed&&o.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return r.\u0275fac=function(o){return new(o||r)(L(vi),L(jc),L(Aa))},r.\u0275prov=Qt({token:r,factory:r.\u0275fac,providedIn:"root"}),r})();function Fl(r,s){const o=r.indexOf(s);o>-1&&r.splice(o,1)}let N0=!0,xp=!1;function Hw(){return xp=!0,N0}function e_(){if(xp)throw new Error("Cannot enable prod mode after platform setup.");N0=!1}let F0=(()=>{class r{}return r.__NG_ELEMENT_ID__=t_,r})();function t_(r){return function zw(r,s,o){if(vr(r)&&!o){const u=Cn(r.index,s);return new Mo(u,u)}return 47&r.type?new Mo(s[16],s):null}(hr(),Qe(),16==(16&r))}class Lp{constructor(){}supports(s){return ta(s)}create(s){return new qw(s)}}const i_=(r,s)=>s;class qw{constructor(s){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=s||i_}forEachItem(s){let o;for(o=this._itHead;null!==o;o=o._next)s(o)}forEachOperation(s){let o=this._itHead,u=this._removalsHead,l=0,d=null;for(;o||u;){const f=!u||o&&o.currentIndex{f=this._trackByFn(l,v),null!==o&&Object.is(o.trackById,f)?(u&&(o=this._verifyReinsertion(o,v,f,l)),Object.is(o.item,v)||this._addIdentityChange(o,v)):(o=this._mismatch(o,v,f,l),u=!0),o=o._next,l++}),this.length=l;return this._truncate(o),this.collection=s,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let s;for(s=this._previousItHead=this._itHead;null!==s;s=s._next)s._nextPrevious=s._next;for(s=this._additionsHead;null!==s;s=s._nextAdded)s.previousIndex=s.currentIndex;for(this._additionsHead=this._additionsTail=null,s=this._movesHead;null!==s;s=s._nextMoved)s.previousIndex=s.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(s,o,u,l){let d;return null===s?d=this._itTail:(d=s._prev,this._remove(s)),null!==(s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(u,null))?(Object.is(s.item,o)||this._addIdentityChange(s,o),this._reinsertAfter(s,d,l)):null!==(s=null===this._linkedRecords?null:this._linkedRecords.get(u,l))?(Object.is(s.item,o)||this._addIdentityChange(s,o),this._moveAfter(s,d,l)):s=this._addAfter(new H0(o,u),d,l),s}_verifyReinsertion(s,o,u,l){let d=null===this._unlinkedRecords?null:this._unlinkedRecords.get(u,null);return null!==d?s=this._reinsertAfter(d,s._prev,l):s.currentIndex!=l&&(s.currentIndex=l,this._addToMoves(s,l)),s}_truncate(s){for(;null!==s;){const o=s._next;this._addToRemovals(this._unlink(s)),s=o}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(s,o,u){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(s);const l=s._prevRemoved,d=s._nextRemoved;return null===l?this._removalsHead=d:l._nextRemoved=d,null===d?this._removalsTail=l:d._prevRemoved=l,this._insertAfter(s,o,u),this._addToMoves(s,u),s}_moveAfter(s,o,u){return this._unlink(s),this._insertAfter(s,o,u),this._addToMoves(s,u),s}_addAfter(s,o,u){return this._insertAfter(s,o,u),this._additionsTail=null===this._additionsTail?this._additionsHead=s:this._additionsTail._nextAdded=s,s}_insertAfter(s,o,u){const l=null===o?this._itHead:o._next;return s._next=l,s._prev=o,null===l?this._itTail=s:l._prev=s,null===o?this._itHead=s:o._next=s,null===this._linkedRecords&&(this._linkedRecords=new z0),this._linkedRecords.put(s),s.currentIndex=u,s}_remove(s){return this._addToRemovals(this._unlink(s))}_unlink(s){null!==this._linkedRecords&&this._linkedRecords.remove(s);const o=s._prev,u=s._next;return null===o?this._itHead=u:o._next=u,null===u?this._itTail=o:u._prev=o,s}_addToMoves(s,o){return s.previousIndex===o||(this._movesTail=null===this._movesTail?this._movesHead=s:this._movesTail._nextMoved=s),s}_addToRemovals(s){return null===this._unlinkedRecords&&(this._unlinkedRecords=new z0),this._unlinkedRecords.put(s),s.currentIndex=null,s._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=s,s._prevRemoved=null):(s._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=s),s}_addIdentityChange(s,o){return s.item=o,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=s:this._identityChangesTail._nextIdentityChange=s,s}}class H0{constructor(s,o){this.item=s,this.trackById=o,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 Yw{constructor(){this._head=null,this._tail=null}add(s){null===this._head?(this._head=this._tail=s,s._nextDup=null,s._prevDup=null):(this._tail._nextDup=s,s._prevDup=this._tail,s._nextDup=null,this._tail=s)}get(s,o){let u;for(u=this._head;null!==u;u=u._nextDup)if((null===o||o<=u.currentIndex)&&Object.is(u.trackById,s))return u;return null}remove(s){const o=s._prevDup,u=s._nextDup;return null===o?this._head=u:o._nextDup=u,null===u?this._tail=o:u._prevDup=o,null===this._head}}class z0{constructor(){this.map=new Map}put(s){const o=s.trackById;let u=this.map.get(o);u||(u=new Yw,this.map.set(o,u)),u.add(s)}get(s,o){const l=this.map.get(s);return l?l.get(s,o):null}remove(s){const o=s.trackById;return this.map.get(o).remove(s)&&this.map.delete(o),s}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Fp(r,s,o){const u=r.previousIndex;if(null===u)return u;let l=0;return o&&u{if(o&&o.key===l)this._maybeAddToChanges(o,u),this._appendAfter=o,o=o._next;else{const d=this._getOrCreateRecordForKey(l,u);o=this._insertBeforeOrAppend(o,d)}}),o){o._prev&&(o._prev._next=null),this._removalsHead=o;for(let u=o;null!==u;u=u._nextRemoved)u===this._mapHead&&(this._mapHead=null),this._records.delete(u.key),u._nextRemoved=u._next,u.previousValue=u.currentValue,u.currentValue=null,u._prev=null,u._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(s,o){if(s){const u=s._prev;return o._next=s,o._prev=u,s._prev=o,u&&(u._next=o),s===this._mapHead&&(this._mapHead=o),this._appendAfter=s,s}return this._appendAfter?(this._appendAfter._next=o,o._prev=this._appendAfter):this._mapHead=o,this._appendAfter=o,null}_getOrCreateRecordForKey(s,o){if(this._records.has(s)){const l=this._records.get(s);this._maybeAddToChanges(l,o);const d=l._prev,f=l._next;return d&&(d._next=f),f&&(f._prev=d),l._next=null,l._prev=null,l}const u=new W0(s);return this._records.set(s,u),u.currentValue=o,this._addToAdditions(u),u}_reset(){if(this.isDirty){let s;for(this._previousMapHead=this._mapHead,s=this._previousMapHead;null!==s;s=s._next)s._nextPrevious=s._next;for(s=this._changesHead;null!==s;s=s._nextChanged)s.previousValue=s.currentValue;for(s=this._additionsHead;null!=s;s=s._nextAdded)s.previousValue=s.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(s,o){Object.is(o,s.currentValue)||(s.previousValue=s.currentValue,s.currentValue=o,this._addToChanges(s))}_addToAdditions(s){null===this._additionsHead?this._additionsHead=this._additionsTail=s:(this._additionsTail._nextAdded=s,this._additionsTail=s)}_addToChanges(s){null===this._changesHead?this._changesHead=this._changesTail=s:(this._changesTail._nextChanged=s,this._changesTail=s)}_forEach(s,o){s instanceof Map?s.forEach(o):Object.keys(s).forEach(u=>o(s[u],u))}}class W0{constructor(s){this.key=s,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 s_(){return new Ul([new Lp])}let Ul=(()=>{class r{constructor(o){this.factories=o}static create(o,u){if(null!=u){const l=u.factories.slice();o=o.concat(l)}return new r(o)}static extend(o){return{provide:r,useFactory:u=>r.create(o,u||s_()),deps:[[r,new Jr,new Lt]]}}find(o){const u=this.factories.find(l=>l.supports(o));if(null!=u)return u;throw new me(901,!1)}}return r.\u0275prov=Qt({token:r,providedIn:"root",factory:s_}),r})();function o_(){return new Bp([new Up])}let Bp=(()=>{class r{constructor(o){this.factories=o}static create(o,u){if(u){const l=u.factories.slice();o=o.concat(l)}return new r(o)}static extend(o){return{provide:r,useFactory:u=>r.create(o,u||o_()),deps:[[r,new Jr,new Lt]]}}find(o){const u=this.factories.find(l=>l.supports(o));if(u)return u;throw new me(901,!1)}}return r.\u0275prov=Qt({token:r,providedIn:"root",factory:o_}),r})();const ns=Tp(null,"core",[]);let ua=(()=>{class r{constructor(o){}}return r.\u0275fac=function(o){return new(o||r)(L(Mp))},r.\u0275mod=Vt({type:r}),r.\u0275inj=sn({}),r})();function ET(r){return"boolean"==typeof r?r:null!=r&&"false"!==r}},1481:(le,k,E)=>{E.d(k,{Dx:()=>En,b2:()=>Ii,q6:()=>qr});var m=E(6895),M=E(4650);class F extends m.w_{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class z extends F{static makeCurrent(){(0,m.HT)(new z)}onAndCancel(X,Z,be){return X.addEventListener(Z,be,!1),()=>{X.removeEventListener(Z,be,!1)}}dispatchEvent(X,Z){X.dispatchEvent(Z)}remove(X){X.parentNode&&X.parentNode.removeChild(X)}createElement(X,Z){return(Z=Z||this.getDefaultDocument()).createElement(X)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(X){return X.nodeType===Node.ELEMENT_NODE}isShadowRoot(X){return X instanceof DocumentFragment}getGlobalEventTarget(X,Z){return"window"===Z?window:"document"===Z?X:"body"===Z?X.body:null}getBaseHref(X){const Z=function W(){return O=O||document.querySelector("base"),O?O.getAttribute("href"):null}();return null==Z?null:function Q(ue){ee=ee||document.createElement("a"),ee.setAttribute("href",ue);const X=ee.pathname;return"/"===X.charAt(0)?X:`/${X}`}(Z)}resetBaseElement(){O=null}getUserAgent(){return window.navigator.userAgent}getCookie(X){return(0,m.Mx)(document.cookie,X)}}let ee,O=null;const K=new M.OlP("TRANSITION_ID"),H=[{provide:M.ip1,useFactory:function G(ue,X,Z){return()=>{Z.get(M.CZH).donePromise.then(()=>{const be=(0,m.q)(),je=X.querySelectorAll(`style[ng-transition="${ue}"]`);for(let dt=0;dt{class ue{build(){return new XMLHttpRequest}}return ue.\u0275fac=function(Z){return new(Z||ue)},ue.\u0275prov=M.Yz7({token:ue,factory:ue.\u0275fac}),ue})();const ve=new M.OlP("EventManagerPlugins");let me=(()=>{class ue{constructor(Z,be){this._zone=be,this._eventNameToPlugin=new Map,Z.forEach(je=>je.manager=this),this._plugins=Z.slice().reverse()}addEventListener(Z,be,je){return this._findPluginFor(be).addEventListener(Z,be,je)}addGlobalEventListener(Z,be,je){return this._findPluginFor(be).addGlobalEventListener(Z,be,je)}getZone(){return this._zone}_findPluginFor(Z){const be=this._eventNameToPlugin.get(Z);if(be)return be;const je=this._plugins;for(let dt=0;dt{class ue{constructor(){this._stylesSet=new Set}addStyles(Z){const be=new Set;Z.forEach(je=>{this._stylesSet.has(je)||(this._stylesSet.add(je),be.add(je))}),this.onStylesAdded(be)}onStylesAdded(Z){}getAllStyles(){return Array.from(this._stylesSet)}}return ue.\u0275fac=function(Z){return new(Z||ue)},ue.\u0275prov=M.Yz7({token:ue,factory:ue.\u0275fac}),ue})(),Ee=(()=>{class ue extends we{constructor(Z){super(),this._doc=Z,this._hostNodes=new Map,this._hostNodes.set(Z.head,[])}_addStylesToHost(Z,be,je){Z.forEach(dt=>{const Yt=this._doc.createElement("style");Yt.textContent=dt,je.push(be.appendChild(Yt))})}addHost(Z){const be=[];this._addStylesToHost(this._stylesSet,Z,be),this._hostNodes.set(Z,be)}removeHost(Z){const be=this._hostNodes.get(Z);be&&be.forEach(We),this._hostNodes.delete(Z)}onStylesAdded(Z){this._hostNodes.forEach((be,je)=>{this._addStylesToHost(Z,je,be)})}ngOnDestroy(){this._hostNodes.forEach(Z=>Z.forEach(We))}}return ue.\u0275fac=function(Z){return new(Z||ue)(M.LFG(m.K0))},ue.\u0275prov=M.Yz7({token:ue,factory:ue.\u0275fac}),ue})();function We(ue){(0,m.q)().remove(ue)}const ot={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/"},Pe=/%COMP%/g;function pe(ue,X,Z){for(let be=0;be{if("__ngUnwrap__"===X)return ue;!1===ue(X)&&(X.preventDefault(),X.returnValue=!1)}}let _e=(()=>{class ue{constructor(Z,be,je){this.eventManager=Z,this.sharedStylesHost=be,this.appId=je,this.rendererByCompId=new Map,this.defaultRenderer=new Ze(Z)}createRenderer(Z,be){if(!Z||!be)return this.defaultRenderer;switch(be.encapsulation){case M.ifc.Emulated:{let je=this.rendererByCompId.get(be.id);return je||(je=new Ft(this.eventManager,this.sharedStylesHost,be,this.appId),this.rendererByCompId.set(be.id,je)),je.applyToHost(Z),je}case 1:case M.ifc.ShadowDom:return new at(this.eventManager,this.sharedStylesHost,Z,be);default:if(!this.rendererByCompId.has(be.id)){const je=pe(be.id,be.styles,[]);this.sharedStylesHost.addStyles(je),this.rendererByCompId.set(be.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return ue.\u0275fac=function(Z){return new(Z||ue)(M.LFG(me),M.LFG(Ee),M.LFG(M.AFp))},ue.\u0275prov=M.Yz7({token:ue,factory:ue.\u0275fac}),ue})();class Ze{constructor(X){this.eventManager=X,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(X,Z){return Z?document.createElementNS(ot[Z]||Z,X):document.createElement(X)}createComment(X){return document.createComment(X)}createText(X){return document.createTextNode(X)}appendChild(X,Z){(rn(X)?X.content:X).appendChild(Z)}insertBefore(X,Z,be){X&&(rn(X)?X.content:X).insertBefore(Z,be)}removeChild(X,Z){X&&X.removeChild(Z)}selectRootElement(X,Z){let be="string"==typeof X?document.querySelector(X):X;if(!be)throw new Error(`The selector "${X}" did not match any elements`);return Z||(be.textContent=""),be}parentNode(X){return X.parentNode}nextSibling(X){return X.nextSibling}setAttribute(X,Z,be,je){if(je){Z=je+":"+Z;const dt=ot[je];dt?X.setAttributeNS(dt,Z,be):X.setAttribute(Z,be)}else X.setAttribute(Z,be)}removeAttribute(X,Z,be){if(be){const je=ot[be];je?X.removeAttributeNS(je,Z):X.removeAttribute(`${be}:${Z}`)}else X.removeAttribute(Z)}addClass(X,Z){X.classList.add(Z)}removeClass(X,Z){X.classList.remove(Z)}setStyle(X,Z,be,je){je&(M.JOm.DashCase|M.JOm.Important)?X.style.setProperty(Z,be,je&M.JOm.Important?"important":""):X.style[Z]=be}removeStyle(X,Z,be){be&M.JOm.DashCase?X.style.removeProperty(Z):X.style[Z]=""}setProperty(X,Z,be){X[Z]=be}setValue(X,Z){X.nodeValue=Z}listen(X,Z,be){return"string"==typeof X?this.eventManager.addGlobalEventListener(X,Z,ne(be)):this.eventManager.addEventListener(X,Z,ne(be))}}function rn(ue){return"TEMPLATE"===ue.tagName&&void 0!==ue.content}class Ft extends Ze{constructor(X,Z,be,je){super(X),this.component=be;const dt=pe(je+"-"+be.id,be.styles,[]);Z.addStyles(dt),this.contentAttr=function Be(ue){return"_ngcontent-%COMP%".replace(Pe,ue)}(je+"-"+be.id),this.hostAttr=function Ke(ue){return"_nghost-%COMP%".replace(Pe,ue)}(je+"-"+be.id)}applyToHost(X){super.setAttribute(X,this.hostAttr,"")}createElement(X,Z){const be=super.createElement(X,Z);return super.setAttribute(be,this.contentAttr,""),be}}class at extends Ze{constructor(X,Z,be,je){super(X),this.sharedStylesHost=Z,this.hostEl=be,this.shadowRoot=be.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const dt=pe(je.id,je.styles,[]);for(let Yt=0;Yt{class ue extends Ue{constructor(Z){super(Z)}supports(Z){return!0}addEventListener(Z,be,je){return Z.addEventListener(be,je,!1),()=>this.removeEventListener(Z,be,je)}removeEventListener(Z,be,je){return Z.removeEventListener(be,je)}}return ue.\u0275fac=function(Z){return new(Z||ue)(M.LFG(m.K0))},ue.\u0275prov=M.Yz7({token:ue,factory:ue.\u0275fac}),ue})();const Sn=["alt","control","meta","shift"],qt={"\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"},Qt={alt:ue=>ue.altKey,control:ue=>ue.ctrlKey,meta:ue=>ue.metaKey,shift:ue=>ue.shiftKey};let Ct=(()=>{class ue extends Ue{constructor(Z){super(Z)}supports(Z){return null!=ue.parseEventName(Z)}addEventListener(Z,be,je){const dt=ue.parseEventName(be),Yt=ue.eventCallback(dt.fullKey,je,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>(0,m.q)().onAndCancel(Z,dt.domEventName,Yt))}static parseEventName(Z){const be=Z.toLowerCase().split("."),je=be.shift();if(0===be.length||"keydown"!==je&&"keyup"!==je)return null;const dt=ue._normalizeKey(be.pop());let Yt="",Zt=be.indexOf("code");if(Zt>-1&&(be.splice(Zt,1),Yt="code."),Sn.forEach(ui=>{const Pt=be.indexOf(ui);Pt>-1&&(be.splice(Pt,1),Yt+=ui+".")}),Yt+=dt,0!=be.length||0===dt.length)return null;const or={};return or.domEventName=je,or.fullKey=Yt,or}static matchEventFullKeyCode(Z,be){let je=qt[Z.key]||Z.key,dt="";return be.indexOf("code.")>-1&&(je=Z.code,dt="code."),!(null==je||!je)&&(je=je.toLowerCase()," "===je?je="space":"."===je&&(je="dot"),Sn.forEach(Yt=>{Yt!==je&&(0,Qt[Yt])(Z)&&(dt+=Yt+".")}),dt+=je,dt===be)}static eventCallback(Z,be,je){return dt=>{ue.matchEventFullKeyCode(dt,Z)&&je.runGuarded(()=>be(dt))}}static _normalizeKey(Z){return"esc"===Z?"escape":Z}}return ue.\u0275fac=function(Z){return new(Z||ue)(M.LFG(m.K0))},ue.\u0275prov=M.Yz7({token:ue,factory:ue.\u0275fac}),ue})();const qr=(0,M.eFA)(M._c5,"browser",[{provide:M.Lbi,useValue:m.bD},{provide:M.g9A,useValue:function rr(){z.makeCurrent()},multi:!0},{provide:m.K0,useFactory:function ir(){return(0,M.RDi)(document),document},deps:[]}]),gn=new M.OlP(""),rt=[{provide:M.rWj,useClass:class te{addToWindow(X){M.dqk.getAngularTestability=(be,je=!0)=>{const dt=X.findTestabilityInTree(be,je);if(null==dt)throw new Error("Could not find testability for element.");return dt},M.dqk.getAllAngularTestabilities=()=>X.getAllTestabilities(),M.dqk.getAllAngularRootElements=()=>X.getAllRootElements(),M.dqk.frameworkStabilizers||(M.dqk.frameworkStabilizers=[]),M.dqk.frameworkStabilizers.push(be=>{const je=M.dqk.getAllAngularTestabilities();let dt=je.length,Yt=!1;const Zt=function(or){Yt=Yt||or,dt--,0==dt&&be(Yt)};je.forEach(function(or){or.whenStable(Zt)})})}findTestabilityInTree(X,Z,be){return null==Z?null:X.getTestability(Z)??(be?(0,m.q)().isShadowRoot(Z)?this.findTestabilityInTree(X,Z.host,!0):this.findTestabilityInTree(X,Z.parentElement,!0):null)}},deps:[]},{provide:M.lri,useClass:M.dDg,deps:[M.R0b,M.eoX,M.rWj]},{provide:M.dDg,useClass:M.dDg,deps:[M.R0b,M.eoX,M.rWj]}],Pn=[{provide:M.zSh,useValue:"root"},{provide:M.qLn,useFactory:function xr(){return new M.qLn},deps:[]},{provide:ve,useClass:dn,multi:!0,deps:[m.K0,M.R0b,M.Lbi]},{provide:ve,useClass:Ct,multi:!0,deps:[m.K0]},{provide:_e,useClass:_e,deps:[me,Ee,M.AFp]},{provide:M.FYo,useExisting:_e},{provide:we,useExisting:Ee},{provide:Ee,useClass:Ee,deps:[m.K0]},{provide:me,useClass:me,deps:[ve,M.R0b]},{provide:m.JF,useClass:ye,deps:[]},[]];let Ii=(()=>{class ue{constructor(Z){}static withServerTransition(Z){return{ngModule:ue,providers:[{provide:M.AFp,useValue:Z.appId},{provide:K,useExisting:M.AFp},H]}}}return ue.\u0275fac=function(Z){return new(Z||ue)(M.LFG(gn,12))},ue.\u0275mod=M.oAB({type:ue}),ue.\u0275inj=M.cJS({providers:[...Pn,...rt],imports:[m.ez,M.hGG]}),ue})(),En=(()=>{class ue{constructor(Z){this._doc=Z}getTitle(){return this._doc.title}setTitle(Z){this._doc.title=Z||""}}return ue.\u0275fac=function(Z){return new(Z||ue)(M.LFG(m.K0))},ue.\u0275prov=M.Yz7({token:ue,factory:function(Z){let be=null;return be=Z?new Z:function Un(){return new En((0,M.LFG)(m.K0))}(),be},providedIn:"root"}),ue})();typeof window<"u"&&window},1869:(le,k,E)=>{E.d(k,{F0:()=>Ir,rH:()=>Ja,Bz:()=>eu,lC:()=>da});var m=E(4650),M=E(8996),F=E(9646),z=E(1135);const W=(0,E(3888).d)(y=>function(){y(this),this.name="EmptyError",this.message="no elements in sequence"});var ee=E(1577),Q=E(7272),K=E(9770),G=E(9635),H=E(2843),te=E(9751),ye=E(515),ve=E(4033),me=E(7579),Ue=E(6895),we=E(4004),Ee=E(3900),We=E(5698),ot=E(8675),Pe=E(9300),Se=E(5577),Le=E(4482),nt=E(5403);function _t(y){return(0,Le.e)((_,p)=>{let w=!1;_.subscribe((0,nt.x)(p,S=>{w=!0,p.next(S)},()=>{w||p.next(y),p.complete()}))})}function Be(y=Ke){return(0,Le.e)((_,p)=>{let w=!1;_.subscribe((0,nt.x)(p,S=>{w=!0,p.next(S)},()=>w?p.complete():p.error(y())))})}function Ke(){return new W}var pe=E(4671);function ne(y,_){const p=arguments.length>=2;return w=>w.pipe(y?(0,Pe.h)((S,U)=>y(S,U,w)):pe.y,(0,We.q)(1),p?_t(_):Be(()=>new W))}var Ae=E(4351),_e=E(8505),Ze=E(262),Xe=E(5026);function wt(y){return y<=0?()=>ye.E:(0,Le.e)((_,p)=>{let w=[];_.subscribe((0,nt.x)(p,S=>{w.push(S),y{for(const S of w)p.next(S);p.complete()},void 0,()=>{w=null}))})}function rn(y,_){const p=arguments.length>=2;return w=>w.pipe(y?(0,Pe.h)((S,U)=>y(S,U,w)):pe.y,wt(1),p?_t(_):Be(()=>new W))}var at=E(9718);function dn(y){return(0,Le.e)((_,p)=>{try{_.subscribe(p)}finally{p.add(y)}})}var Sn=E(8343),qt=E(8189),Qt=E(1481);const Ct="primary",sn=Symbol("RouteTitle");class Br{constructor(_){this.params=_||{}}has(_){return Object.prototype.hasOwnProperty.call(this.params,_)}get(_){if(this.has(_)){const p=this.params[_];return Array.isArray(p)?p[0]:p}return null}getAll(_){if(this.has(_)){const p=this.params[_];return Array.isArray(p)?p:[p]}return[]}get keys(){return Object.keys(this.params)}}function yr(y){return new Br(y)}function hn(y,_,p){const w=p.path.split("/");if(w.length>y.length||"full"===p.pathMatch&&(_.hasChildren()||w.lengthw[U]===S)}return y===_}function ir(y){return Array.prototype.concat.apply([],y)}function xn(y){return y.length>0?y[y.length-1]:null}function gn(y,_){for(const p in y)y.hasOwnProperty(p)&&_(y[p],p)}function rt(y){return(0,m.CqO)(y)?y:(0,m.QGY)(y)?(0,M.D)(Promise.resolve(y)):(0,F.of)(y)}const qn={exact:function En(y,_,p){if(!sr(y.segments,_.segments)||!tn(y.segments,_.segments,p)||y.numberOfChildren!==_.numberOfChildren)return!1;for(const w in _.children)if(!y.children[w]||!En(y.children[w],_.children[w],p))return!1;return!0},subset:vt},dr={exact:function Un(y,_){return rr(y,_)},subset:function wn(y,_){return Object.keys(_).length<=Object.keys(y).length&&Object.keys(_).every(p=>xr(y[p],_[p]))},ignored:()=>!0};function Yr(y,_,p){return qn[p.paths](y.root,_.root,p.matrixParams)&&dr[p.queryParams](y.queryParams,_.queryParams)&&!("exact"===p.fragment&&y.fragment!==_.fragment)}function vt(y,_,p){return St(y,_,_.segments,p)}function St(y,_,p,w){if(y.segments.length>p.length){const S=y.segments.slice(0,p.length);return!(!sr(S,p)||_.hasChildren()||!tn(S,p,w))}if(y.segments.length===p.length){if(!sr(y.segments,p)||!tn(y.segments,p,w))return!1;for(const S in _.children)if(!y.children[S]||!vt(y.children[S],_.children[S],w))return!1;return!0}{const S=p.slice(0,y.segments.length),U=p.slice(y.segments.length);return!!(sr(y.segments,S)&&tn(y.segments,S,w)&&y.children[Ct])&&St(y.children[Ct],_,U,w)}}function tn(y,_,p){return _.every((w,S)=>dr[p](y[S].parameters,w.parameters))}class Jn{constructor(_,p,w){this.root=_,this.queryParams=p,this.fragment=w}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=yr(this.queryParams)),this._queryParamMap}toString(){return bn.serialize(this)}}class mt{constructor(_,p){this.segments=_,this.children=p,this.parent=null,gn(p,(w,S)=>w.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Gn(this)}}class er{constructor(_,p){this.path=_,this.parameters=p}get parameterMap(){return this._parameterMap||(this._parameterMap=yr(this.parameters)),this._parameterMap}toString(){return se(this)}}function sr(y,_){return y.length===_.length&&y.every((p,w)=>p.path===_[w].path)}let Rr=(()=>{class y{}return y.\u0275fac=function(p){return new(p||y)},y.\u0275prov=m.Yz7({token:y,factory:function(){return new Xt},providedIn:"root"}),y})();class Xt{parse(_){const p=new ue(_);return new Jn(p.parseRootSegment(),p.parseQueryParams(),p.parseFragment())}serialize(_){const p=`/${lt(_.root,!0)}`,w=function ze(y){const _=Object.keys(y).map(p=>{const w=y[p];return Array.isArray(w)?w.map(S=>`${yt(p)}=${yt(S)}`).join("&"):`${yt(p)}=${yt(w)}`}).filter(p=>!!p);return _.length?`?${_.join("&")}`:""}(_.queryParams);return`${p}${w}${"string"==typeof _.fragment?`#${function Nt(y){return encodeURI(y)}(_.fragment)}`:""}`}}const bn=new Xt;function Gn(y){return y.segments.map(_=>se(_)).join("/")}function lt(y,_){if(!y.hasChildren())return Gn(y);if(_){const p=y.children[Ct]?lt(y.children[Ct],!1):"",w=[];return gn(y.children,(S,U)=>{U!==Ct&&w.push(`${U}:${lt(S,!1)}`)}),w.length>0?`${p}(${w.join("//")})`:p}{const p=function In(y,_){let p=[];return gn(y.children,(w,S)=>{S===Ct&&(p=p.concat(_(w,S)))}),gn(y.children,(w,S)=>{S!==Ct&&(p=p.concat(_(w,S)))}),p}(y,(w,S)=>S===Ct?[lt(y.children[Ct],!1)]:[`${S}:${lt(w,!1)}`]);return 1===Object.keys(y.children).length&&null!=y.children[Ct]?`${Gn(y)}/${p[0]}`:`${Gn(y)}/(${p.join("//")})`}}function He(y){return encodeURIComponent(y).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function yt(y){return He(y).replace(/%3B/gi,";")}function kt(y){return He(y).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Vt(y){return decodeURIComponent(y)}function de(y){return Vt(y.replace(/\+/g,"%20"))}function se(y){return`${kt(y.path)}${function ge(y){return Object.keys(y).map(_=>`;${kt(_)}=${kt(y[_])}`).join("")}(y.parameters)}`}const De=/^[^\/()?;=#]+/;function st(y){const _=y.match(De);return _?_[0]:""}const Dt=/^[^=?&#]+/,Tn=/^[^&#]+/;class ue{constructor(_){this.url=_,this.remaining=_}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new mt([],{}):new mt([],this.parseChildren())}parseQueryParams(){const _={};if(this.consumeOptional("?"))do{this.parseQueryParam(_)}while(this.consumeOptional("&"));return _}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const _=[];for(this.peekStartsWith("(")||_.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),_.push(this.parseSegment());let p={};this.peekStartsWith("/(")&&(this.capture("/"),p=this.parseParens(!0));let w={};return this.peekStartsWith("(")&&(w=this.parseParens(!1)),(_.length>0||Object.keys(p).length>0)&&(w[Ct]=new mt(_,p)),w}parseSegment(){const _=st(this.remaining);if(""===_&&this.peekStartsWith(";"))throw new m.vHH(4009,!1);return this.capture(_),new er(Vt(_),this.parseMatrixParams())}parseMatrixParams(){const _={};for(;this.consumeOptional(";");)this.parseParam(_);return _}parseParam(_){const p=st(this.remaining);if(!p)return;this.capture(p);let w="";if(this.consumeOptional("=")){const S=st(this.remaining);S&&(w=S,this.capture(w))}_[Vt(p)]=Vt(w)}parseQueryParam(_){const p=function Jt(y){const _=y.match(Dt);return _?_[0]:""}(this.remaining);if(!p)return;this.capture(p);let w="";if(this.consumeOptional("=")){const J=function nn(y){const _=y.match(Tn);return _?_[0]:""}(this.remaining);J&&(w=J,this.capture(w))}const S=de(p),U=de(w);if(_.hasOwnProperty(S)){let J=_[S];Array.isArray(J)||(J=[J],_[S]=J),J.push(U)}else _[S]=U}parseParens(_){const p={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const w=st(this.remaining),S=this.remaining[w.length];if("/"!==S&&")"!==S&&";"!==S)throw new m.vHH(4010,!1);let U;w.indexOf(":")>-1?(U=w.slice(0,w.indexOf(":")),this.capture(U),this.capture(":")):_&&(U=Ct);const J=this.parseChildren();p[U]=1===Object.keys(J).length?J[Ct]:new mt([],J),this.consumeOptional("//")}return p}peekStartsWith(_){return this.remaining.startsWith(_)}consumeOptional(_){return!!this.peekStartsWith(_)&&(this.remaining=this.remaining.substring(_.length),!0)}capture(_){if(!this.consumeOptional(_))throw new m.vHH(4011,!1)}}function X(y){return y.segments.length>0?new mt([],{[Ct]:y}):y}function Z(y){const _={};for(const w of Object.keys(y.children)){const U=Z(y.children[w]);(U.segments.length>0||U.hasChildren())&&(_[w]=U)}return function be(y){if(1===y.numberOfChildren&&y.children[Ct]){const _=y.children[Ct];return new mt(y.segments.concat(_.segments),_.children)}return y}(new mt(y.segments,_))}function je(y){return y instanceof Jn}function ui(y,_,p,w,S){if(0===p.length)return Qr(_.root,_.root,_.root,w,S);const U=function Yn(y){if("string"==typeof y[0]&&1===y.length&&"/"===y[0])return new Nn(!0,0,y);let _=0,p=!1;const w=y.reduce((S,U,J)=>{if("object"==typeof U&&null!=U){if(U.outlets){const ae={};return gn(U.outlets,(Ne,ct)=>{ae[ct]="string"==typeof Ne?Ne.split("/"):Ne}),[...S,{outlets:ae}]}if(U.segmentPath)return[...S,U.segmentPath]}return"string"!=typeof U?[...S,U]:0===J?(U.split("/").forEach((ae,Ne)=>{0==Ne&&"."===ae||(0==Ne&&""===ae?p=!0:".."===ae?_++:""!=ae&&S.push(ae))}),S):[...S,U]},[]);return new Nn(p,_,w)}(p);return U.toRoot()?Qr(_.root,_.root,new mt([],{}),w,S):function J(Ne){const ct=function Or(y,_,p,w){if(y.isAbsolute)return new wr(_.root,!0,0);if(-1===w)return new wr(p,p===_.root,0);return function tr(y,_,p){let w=y,S=_,U=p;for(;U>S;){if(U-=S,w=w.parent,!w)throw new m.vHH(4005,!1);S=w.segments.length}return new wr(w,!1,S-U)}(p,w+(Pt(y.commands[0])?0:1),y.numberOfDoubleDots)}(U,_,y.snapshot?._urlSegment,Ne),cn=ct.processChildren?ci(ct.segmentGroup,ct.index,U.commands):Dn(ct.segmentGroup,ct.index,U.commands);return Qr(_.root,ct.segmentGroup,cn,w,S)}(y.snapshot?._lastPathIndex)}function Pt(y){return"object"==typeof y&&null!=y&&!y.outlets&&!y.segmentPath}function Zr(y){return"object"==typeof y&&null!=y&&y.outlets}function Qr(y,_,p,w,S){let J,U={};w&&gn(w,(Ne,ct)=>{U[ct]=Array.isArray(Ne)?Ne.map(cn=>`${cn}`):`${Ne}`}),J=y===_?p:ps(y,_,p);const ae=X(Z(J));return new Jn(ae,U,S)}function ps(y,_,p){const w={};return gn(y.children,(S,U)=>{w[U]=S===_?p:ps(S,_,p)}),new mt(y.segments,w)}class Nn{constructor(_,p,w){if(this.isAbsolute=_,this.numberOfDoubleDots=p,this.commands=w,_&&w.length>0&&Pt(w[0]))throw new m.vHH(4003,!1);const S=w.find(Zr);if(S&&S!==xn(w))throw new m.vHH(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class wr{constructor(_,p,w){this.segmentGroup=_,this.processChildren=p,this.index=w}}function Dn(y,_,p){if(y||(y=new mt([],{})),0===y.segments.length&&y.hasChildren())return ci(y,_,p);const w=function rs(y,_,p){let w=0,S=_;const U={match:!1,pathIndex:0,commandIndex:0};for(;S=p.length)return U;const J=y.segments[S],ae=p[w];if(Zr(ae))break;const Ne=`${ae}`,ct=w0&&void 0===Ne)break;if(Ne&&ct&&"object"==typeof ct&&void 0===ct.outlets){if(!wi(Ne,ct,J))return U;w+=2}else{if(!wi(Ne,{},J))return U;w++}S++}return{match:!0,pathIndex:S,commandIndex:w}}(y,_,p),S=p.slice(w.commandIndex);if(w.match&&w.pathIndex{"string"==typeof U&&(U=[U]),null!==U&&(S[J]=Dn(y.children[J],_,U))}),gn(y.children,(U,J)=>{void 0===w[J]&&(S[J]=U)}),new mt(y.segments,S)}}function Di(y,_,p){const w=y.segments.slice(0,_);let S=0;for(;S{"string"==typeof p&&(p=[p]),null!==p&&(_[w]=Di(new mt([],{}),0,p))}),_}function qi(y){const _={};return gn(y,(p,w)=>_[w]=`${p}`),_}function wi(y,_,p){return y==p.path&&rr(_,p.parameters)}class _r{constructor(_,p){this.id=_,this.url=p}}class $n extends _r{constructor(_,p,w="imperative",S=null){super(_,p),this.type=0,this.navigationTrigger=w,this.restoredState=S}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class di extends _r{constructor(_,p,w){super(_,p),this.urlAfterRedirects=w,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class kn extends _r{constructor(_,p,w,S){super(_,p),this.reason=w,this.code=S,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class jr extends _r{constructor(_,p,w,S){super(_,p),this.error=w,this.target=S,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Yi extends _r{constructor(_,p,w,S){super(_,p),this.urlAfterRedirects=w,this.state=S,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class vr extends _r{constructor(_,p,w,S){super(_,p),this.urlAfterRedirects=w,this.state=S,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Zi extends _r{constructor(_,p,w,S,U){super(_,p),this.urlAfterRedirects=w,this.state=S,this.shouldActivate=U,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Er extends _r{constructor(_,p,w,S){super(_,p),this.urlAfterRedirects=w,this.state=S,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class gs extends _r{constructor(_,p,w,S){super(_,p),this.urlAfterRedirects=w,this.state=S,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class No{constructor(_){this.route=_,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Ps{constructor(_){this.route=_,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class oe{constructor(_){this.snapshot=_,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class N{constructor(_){this.snapshot=_,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ${constructor(_){this.snapshot=_,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class q{constructor(_){this.snapshot=_,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class he{constructor(_,p,w){this.routerEvent=_,this.position=p,this.anchor=w,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class $e{constructor(_){this._root=_}get root(){return this._root.value}parent(_){const p=this.pathFromRoot(_);return p.length>1?p[p.length-2]:null}children(_){const p=gt(_,this._root);return p?p.children.map(w=>w.value):[]}firstChild(_){const p=gt(_,this._root);return p&&p.children.length>0?p.children[0].value:null}siblings(_){const p=Bt(_,this._root);return p.length<2?[]:p[p.length-2].children.map(S=>S.value).filter(S=>S!==_)}pathFromRoot(_){return Bt(_,this._root).map(p=>p.value)}}function gt(y,_){if(y===_.value)return _;for(const p of _.children){const w=gt(y,p);if(w)return w}return null}function Bt(y,_){if(y===_.value)return[_];for(const p of _.children){const w=Bt(y,p);if(w.length)return w.unshift(_),w}return[]}class Mt{constructor(_,p){this.value=_,this.children=p}toString(){return`TreeNode(${this.value})`}}function yn(y){const _={};return y&&y.children.forEach(p=>_[p.value.outlet]=p),_}class un extends $e{constructor(_,p){super(_),this.snapshot=p,ko(this,_)}toString(){return this.snapshot.toString()}}function nr(y,_){const p=function Ui(y,_){const J=new Ti([],{},{},"",{},Ct,_,null,y.root,-1,{});return new Ci("",new Mt(J,[]))}(y,_),w=new z.X([new er("",{})]),S=new z.X({}),U=new z.X({}),J=new z.X({}),ae=new z.X(""),Ne=new Rn(w,S,J,ae,U,Ct,_,p.root);return Ne.snapshot=p.root,new un(new Mt(Ne,[]),p)}class Rn{constructor(_,p,w,S,U,J,ae,Ne){this.url=_,this.params=p,this.queryParams=w,this.fragment=S,this.data=U,this.outlet=J,this.component=ae,this.title=this.data?.pipe((0,we.U)(ct=>ct[sn]))??(0,F.of)(void 0),this._futureSnapshot=Ne}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,we.U)(_=>yr(_)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,we.U)(_=>yr(_)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Pr(y,_="emptyOnly"){const p=y.pathFromRoot;let w=0;if("always"!==_)for(w=p.length-1;w>=1;){const S=p[w],U=p[w-1];if(S.routeConfig&&""===S.routeConfig.path)w--;else{if(U.component)break;w--}}return function bi(y){return y.reduce((_,p)=>({params:{..._.params,...p.params},data:{..._.data,...p.data},resolve:{...p.data,..._.resolve,...p.routeConfig?.data,...p._resolvedData}}),{params:{},data:{},resolve:{}})}(p.slice(w))}class Ti{constructor(_,p,w,S,U,J,ae,Ne,ct,cn,Tt,Bn){this.url=_,this.params=p,this.queryParams=w,this.fragment=S,this.data=U,this.outlet=J,this.component=ae,this.title=this.data?.[sn],this.routeConfig=Ne,this._urlSegment=ct,this._lastPathIndex=cn,this._correctedLastPathIndex=Bn??cn,this._resolve=Tt}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=yr(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=yr(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(w=>w.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class Ci extends $e{constructor(_,p){super(p),this.url=_,ko(this,p)}toString(){return is(this._root)}}function ko(y,_){_.value._routerState=y,_.children.forEach(p=>ko(y,p))}function is(y){const _=y.children.length>0?` { ${y.children.map(is).join(", ")} } `:"";return`${y.value}${_}`}function Xs(y){if(y.snapshot){const _=y.snapshot,p=y._futureSnapshot;y.snapshot=p,rr(_.queryParams,p.queryParams)||y.queryParams.next(p.queryParams),_.fragment!==p.fragment&&y.fragment.next(p.fragment),rr(_.params,p.params)||y.params.next(p.params),function pn(y,_){if(y.length!==_.length)return!1;for(let p=0;prr(p.parameters,_[w].parameters))}(y.url,_.url);return p&&!(!y.parent!=!_.parent)&&(!y.parent||po(y.parent,_.parent))}function ti(y,_,p){if(p&&y.shouldReuseRoute(_.value,p.value.snapshot)){const w=p.value;w._futureSnapshot=_.value;const S=function la(y,_,p){return _.children.map(w=>{for(const S of p.children)if(y.shouldReuseRoute(w.value,S.value.snapshot))return ti(y,w,S);return ti(y,w)})}(y,_,p);return new Mt(w,S)}{if(y.shouldAttach(_.value)){const U=y.retrieve(_.value);if(null!==U){const J=U.route;return J.value._futureSnapshot=_.value,J.children=_.children.map(ae=>ti(y,ae)),J}}const w=function go(y){return new Rn(new z.X(y.url),new z.X(y.params),new z.X(y.queryParams),new z.X(y.fragment),new z.X(y.data),y.outlet,y.component,y)}(_.value),S=_.children.map(U=>ti(y,U));return new Mt(w,S)}}const ja="ngNavigationCancelingError";function Cc(y,_){const{redirectTo:p,navigationBehaviorOptions:w}=je(_)?{redirectTo:_,navigationBehaviorOptions:void 0}:_,S=ss(!1,0,_);return S.url=p,S.navigationBehaviorOptions=w,S}function ss(y,_,p){const w=new Error("NavigationCancelingError: "+(y||""));return w[ja]=!0,w.cancellationCode=_,p&&(w.url=p),w}function Qi(y){return Nr(y)&&je(y.url)}function Nr(y){return y&&y[ja]}class mo{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Ns,this.attachRef=null}}let Ns=(()=>{class y{constructor(){this.contexts=new Map}onChildOutletCreated(p,w){const S=this.getOrCreateContext(p);S.outlet=w,this.contexts.set(p,S)}onChildOutletDestroyed(p){const w=this.getContext(p);w&&(w.outlet=null,w.attachRef=null)}onOutletDeactivated(){const p=this.contexts;return this.contexts=new Map,p}onOutletReAttached(p){this.contexts=p}getOrCreateContext(p){let w=this.getContext(p);return w||(w=new mo,this.contexts.set(p,w)),w}getContext(p){return this.contexts.get(p)||null}}return y.\u0275fac=function(p){return new(p||y)},y.\u0275prov=m.Yz7({token:y,factory:y.\u0275fac,providedIn:"root"}),y})();const yo=!1;let da=(()=>{class y{constructor(p,w,S,U,J){this.parentContexts=p,this.location=w,this.changeDetector=U,this.environmentInjector=J,this.activated=null,this._activatedRoute=null,this.activateEvents=new m.vpe,this.deactivateEvents=new m.vpe,this.attachEvents=new m.vpe,this.detachEvents=new m.vpe,this.name=S||Ct,p.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.getContext(this.name)?.outlet===this&&this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const p=this.parentContexts.getContext(this.name);p&&p.route&&(p.attachRef?this.attach(p.attachRef,p.route):this.activateWith(p.route,p.injector))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new m.vHH(4012,yo);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new m.vHH(4012,yo);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new m.vHH(4012,yo);this.location.detach();const p=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(p.instance),p}attach(p,w){this.activated=p,this._activatedRoute=w,this.location.insert(p.hostView),this.attachEvents.emit(p.instance)}deactivate(){if(this.activated){const p=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(p)}}activateWith(p,w){if(this.isActivated)throw new m.vHH(4013,yo);this._activatedRoute=p;const S=this.location,J=p._futureSnapshot.component,ae=this.parentContexts.getOrCreateContext(this.name).children,Ne=new ha(p,ae,S.injector);if(w&&function On(y){return!!y.resolveComponentFactory}(w)){const ct=w.resolveComponentFactory(J);this.activated=S.createComponent(ct,S.length,Ne)}else this.activated=S.createComponent(J,{index:S.length,injector:Ne,environmentInjector:w??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return y.\u0275fac=function(p){return new(p||y)(m.Y36(Ns),m.Y36(m.s_b),m.$8M("name"),m.Y36(m.sBO),m.Y36(m.lqb))},y.\u0275dir=m.lG2({type:y,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0}),y})();class ha{constructor(_,p,w){this.route=_,this.childContexts=p,this.parent=w}get(_,p){return _===Rn?this.route:_===Ns?this.childContexts:this.parent.get(_,p)}}let Lo=(()=>{class y{}return y.\u0275fac=function(p){return new(p||y)},y.\u0275cmp=m.Xpm({type:y,selectors:[["ng-component"]],standalone:!0,features:[m.jDz],decls:1,vars:0,template:function(p,w){1&p&&m._UZ(0,"router-outlet")},dependencies:[da],encapsulation:2}),y})();function Sc(y,_){return y.providers&&!y._injector&&(y._injector=(0,m.MMx)(y.providers,_,`Route: ${y.path}`)),y._injector??_}function ks(y){const _=y.children&&y.children.map(ks),p=_?{...y,children:_}:{...y};return!p.component&&!p.loadComponent&&(_||p.loadChildren)&&p.outlet&&p.outlet!==Ct&&(p.component=Lo),p}function ar(y){return y.outlet||Ct}function Bo(y,_){const p=y.filter(w=>ar(w)===_);return p.push(...y.filter(w=>ar(w)!==_)),p}function Zn(y){if(!y)return null;if(y.routeConfig?._injector)return y.routeConfig._injector;for(let _=y.parent;_;_=_.parent){const p=_.routeConfig;if(p?._loadedInjector)return p._loadedInjector;if(p?._injector)return p._injector}return null}class _o{constructor(_,p,w,S){this.routeReuseStrategy=_,this.futureState=p,this.currState=w,this.forwardEvent=S}activate(_){const p=this.futureState._root,w=this.currState?this.currState._root:null;this.deactivateChildRoutes(p,w,_),Xs(this.futureState.root),this.activateChildRoutes(p,w,_)}deactivateChildRoutes(_,p,w){const S=yn(p);_.children.forEach(U=>{const J=U.value.outlet;this.deactivateRoutes(U,S[J],w),delete S[J]}),gn(S,(U,J)=>{this.deactivateRouteAndItsChildren(U,w)})}deactivateRoutes(_,p,w){const S=_.value,U=p?p.value:null;if(S===U)if(S.component){const J=w.getContext(S.outlet);J&&this.deactivateChildRoutes(_,p,J.children)}else this.deactivateChildRoutes(_,p,w);else U&&this.deactivateRouteAndItsChildren(p,w)}deactivateRouteAndItsChildren(_,p){_.value.component&&this.routeReuseStrategy.shouldDetach(_.value.snapshot)?this.detachAndStoreRouteSubtree(_,p):this.deactivateRouteAndOutlet(_,p)}detachAndStoreRouteSubtree(_,p){const w=p.getContext(_.value.outlet),S=w&&_.value.component?w.children:p,U=yn(_);for(const J of Object.keys(U))this.deactivateRouteAndItsChildren(U[J],S);if(w&&w.outlet){const J=w.outlet.detach(),ae=w.children.onOutletDeactivated();this.routeReuseStrategy.store(_.value.snapshot,{componentRef:J,route:_,contexts:ae})}}deactivateRouteAndOutlet(_,p){const w=p.getContext(_.value.outlet),S=w&&_.value.component?w.children:p,U=yn(_);for(const J of Object.keys(U))this.deactivateRouteAndItsChildren(U[J],S);w&&w.outlet&&(w.outlet.deactivate(),w.children.onOutletDeactivated(),w.attachRef=null,w.resolver=null,w.route=null)}activateChildRoutes(_,p,w){const S=yn(p);_.children.forEach(U=>{this.activateRoutes(U,S[U.value.outlet],w),this.forwardEvent(new q(U.value.snapshot))}),_.children.length&&this.forwardEvent(new N(_.value.snapshot))}activateRoutes(_,p,w){const S=_.value,U=p?p.value:null;if(Xs(S),S===U)if(S.component){const J=w.getOrCreateContext(S.outlet);this.activateChildRoutes(_,p,J.children)}else this.activateChildRoutes(_,p,w);else if(S.component){const J=w.getOrCreateContext(S.outlet);if(this.routeReuseStrategy.shouldAttach(S.snapshot)){const ae=this.routeReuseStrategy.retrieve(S.snapshot);this.routeReuseStrategy.store(S.snapshot,null),J.children.onOutletReAttached(ae.contexts),J.attachRef=ae.componentRef,J.route=ae.route.value,J.outlet&&J.outlet.attach(ae.componentRef,ae.route.value),Xs(ae.route.value),this.activateChildRoutes(_,null,J.children)}else{const ae=Zn(S.snapshot),Ne=ae?.get(m._Vd)??null;J.attachRef=null,J.route=S,J.resolver=Ne,J.injector=ae,J.outlet&&J.outlet.activateWith(S,J.injector),this.activateChildRoutes(_,null,J.children)}}else this.activateChildRoutes(_,null,w)}}class Ga{constructor(_){this.path=_,this.route=this.path[this.path.length-1]}}class _s{constructor(_,p){this.component=_,this.route=p}}function Ha(y,_,p){const w=y._root;return os(w,_?_._root:null,p,[w.value])}function Ai(y,_){const p=Symbol(),w=_.get(y,p);return w===p?"function"!=typeof y||(0,m.Z0I)(y)?_.get(y):y:w}function os(y,_,p,w,S={canDeactivateChecks:[],canActivateChecks:[]}){const U=yn(_);return y.children.forEach(J=>{(function fa(y,_,p,w,S={canDeactivateChecks:[],canActivateChecks:[]}){const U=y.value,J=_?_.value:null,ae=p?p.getContext(y.value.outlet):null;if(J&&U.routeConfig===J.routeConfig){const Ne=function Qe(y,_,p){if("function"==typeof p)return p(y,_);switch(p){case"pathParamsChange":return!sr(y.url,_.url);case"pathParamsOrQueryParamsChange":return!sr(y.url,_.url)||!rr(y.queryParams,_.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!po(y,_)||!rr(y.queryParams,_.queryParams);default:return!po(y,_)}}(J,U,U.routeConfig.runGuardsAndResolvers);Ne?S.canActivateChecks.push(new Ga(w)):(U.data=J.data,U._resolvedData=J._resolvedData),os(y,_,U.component?ae?ae.children:null:p,w,S),Ne&&ae&&ae.outlet&&ae.outlet.isActivated&&S.canDeactivateChecks.push(new _s(ae.outlet.component,J))}else J&&fn(_,ae,S),S.canActivateChecks.push(new Ga(w)),os(y,null,U.component?ae?ae.children:null:p,w,S)})(J,U[J.value.outlet],p,w.concat([J.value]),S),delete U[J.value.outlet]}),gn(U,(J,ae)=>fn(J,p.getContext(ae),S)),S}function fn(y,_,p){const w=yn(y),S=y.value;gn(w,(U,J)=>{fn(U,S.component?_?_.children.getContext(J):null:_,p)}),p.canDeactivateChecks.push(new _s(S.component&&_&&_.outlet&&_.outlet.isActivated?_.outlet.component:null,S))}function Ls(y){return"function"==typeof y}function Us(y){return y instanceof W||"EmptyError"===y?.name}const ga=Symbol("INITIAL_VALUE");function Mi(){return(0,Ee.w)(y=>(0,ee.a)(y.map(_=>_.pipe((0,We.q)(1),(0,ot.O)(ga)))).pipe((0,we.U)(_=>{for(const p of _)if(!0!==p){if(p===ga)return ga;if(!1===p||p instanceof Jn)return p}return!0}),(0,Pe.h)(_=>_!==ga),(0,We.q)(1)))}function Vs(y){return(0,G.z)((0,_e.b)(_=>{if(je(_))throw Cc(0,_)}),(0,we.U)(_=>!0===_))}const js={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ya(y,_,p,w,S){const U=$s(y,_,p);return U.matched?function ma(y,_,p,w){const S=_.canMatch;if(!S||0===S.length)return(0,F.of)(!0);const U=S.map(J=>{const ae=Ai(J,y);return rt(function za(y){return y&&Ls(y.canMatch)}(ae)?ae.canMatch(_,p):y.runInContext(()=>ae(_,p)))});return(0,F.of)(U).pipe(Mi(),Vs())}(w=Sc(_,w),_,p).pipe((0,we.U)(J=>!0===J?U:{...js})):(0,F.of)(U)}function $s(y,_,p){if(""===_.path)return"full"===_.pathMatch&&(y.hasChildren()||p.length>0)?{...js}:{matched:!0,consumedSegments:[],remainingSegments:p,parameters:{},positionalParamSegments:{}};const S=(_.matcher||hn)(p,y,_);if(!S)return{...js};const U={};gn(S.posParams,(ae,Ne)=>{U[Ne]=ae.path});const J=S.consumed.length>0?{...U,...S.consumed[S.consumed.length-1].parameters}:U;return{matched:!0,consumedSegments:S.consumed,remainingSegments:p.slice(S.consumed.length),parameters:J,positionalParamSegments:S.posParams??{}}}function Vo(y,_,p,w,S="corrected"){if(p.length>0&&function Do(y,_,p){return p.some(w=>I(y,_,w)&&ar(w)!==Ct)}(y,p,w)){const J=new mt(_,function xc(y,_,p,w){const S={};S[Ct]=w,w._sourceSegment=y,w._segmentIndexShift=_.length;for(const U of p)if(""===U.path&&ar(U)!==Ct){const J=new mt([],{});J._sourceSegment=y,J._segmentIndexShift=_.length,S[ar(U)]=J}return S}(y,_,w,new mt(p,y.children)));return J._sourceSegment=y,J._segmentIndexShift=_.length,{segmentGroup:J,slicedSegments:[]}}if(0===p.length&&function Ru(y,_,p){return p.some(w=>I(y,_,w))}(y,p,w)){const J=new mt(y.segments,function eo(y,_,p,w,S,U){const J={};for(const ae of w)if(I(y,p,ae)&&!S[ar(ae)]){const Ne=new mt([],{});Ne._sourceSegment=y,Ne._segmentIndexShift="legacy"===U?y.segments.length:_.length,J[ar(ae)]=Ne}return{...S,...J}}(y,_,p,w,y.children,S));return J._sourceSegment=y,J._segmentIndexShift=_.length,{segmentGroup:J,slicedSegments:p}}const U=new mt(y.segments,y.children);return U._sourceSegment=y,U._segmentIndexShift=_.length,{segmentGroup:U,slicedSegments:p}}function I(y,_,p){return(!(y.hasChildren()||_.length>0)||"full"!==p.pathMatch)&&""===p.path}function P(y,_,p,w){return!!(ar(y)===w||w!==Ct&&I(_,p,y))&&("**"===y.path||$s(_,y,p).matched)}function C(y,_,p){return 0===_.length&&!y.children[p]}const V=!1;class ce{constructor(_){this.segmentGroup=_||null}}class Me{constructor(_){this.urlTree=_}}function Fe(y){return(0,H._)(new ce(y))}function Et(y){return(0,H._)(new Me(y))}class _n{constructor(_,p,w,S,U){this.injector=_,this.configLoader=p,this.urlSerializer=w,this.urlTree=S,this.config=U,this.allowRedirects=!0}apply(){const _=Vo(this.urlTree.root,[],[],this.config).segmentGroup,p=new mt(_.segments,_.children);return this.expandSegmentGroup(this.injector,this.config,p,Ct).pipe((0,we.U)(U=>this.createUrlTree(Z(U),this.urlTree.queryParams,this.urlTree.fragment))).pipe((0,Ze.K)(U=>{if(U instanceof Me)return this.allowRedirects=!1,this.match(U.urlTree);throw U instanceof ce?this.noMatchError(U):U}))}match(_){return this.expandSegmentGroup(this.injector,this.config,_.root,Ct).pipe((0,we.U)(S=>this.createUrlTree(Z(S),_.queryParams,_.fragment))).pipe((0,Ze.K)(S=>{throw S instanceof ce?this.noMatchError(S):S}))}noMatchError(_){return new m.vHH(4002,V)}createUrlTree(_,p,w){const S=X(_);return new Jn(S,p,w)}expandSegmentGroup(_,p,w,S){return 0===w.segments.length&&w.hasChildren()?this.expandChildren(_,p,w).pipe((0,we.U)(U=>new mt([],U))):this.expandSegment(_,w,p,w.segments,S,!0)}expandChildren(_,p,w){const S=[];for(const U of Object.keys(w.children))"primary"===U?S.unshift(U):S.push(U);return(0,M.D)(S).pipe((0,Ae.b)(U=>{const J=w.children[U],ae=Bo(p,U);return this.expandSegmentGroup(_,ae,J,U).pipe((0,we.U)(Ne=>({segment:Ne,outlet:U})))}),(0,Xe.R)((U,J)=>(U[J.outlet]=J.segment,U),{}),rn())}expandSegment(_,p,w,S,U,J){return(0,M.D)(w).pipe((0,Ae.b)(ae=>this.expandSegmentAgainstRoute(_,p,w,ae,S,U,J).pipe((0,Ze.K)(ct=>{if(ct instanceof ce)return(0,F.of)(null);throw ct}))),ne(ae=>!!ae),(0,Ze.K)((ae,Ne)=>{if(Us(ae))return C(p,S,U)?(0,F.of)(new mt([],{})):Fe(p);throw ae}))}expandSegmentAgainstRoute(_,p,w,S,U,J,ae){return P(S,p,U,J)?void 0===S.redirectTo?this.matchSegmentAgainstRoute(_,p,S,U,J):ae&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(_,p,w,S,U,J):Fe(p):Fe(p)}expandSegmentAgainstRouteUsingRedirect(_,p,w,S,U,J){return"**"===S.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(_,w,S,J):this.expandRegularSegmentAgainstRouteUsingRedirect(_,p,w,S,U,J)}expandWildCardWithParamsAgainstRouteUsingRedirect(_,p,w,S){const U=this.applyRedirectCommands([],w.redirectTo,{});return w.redirectTo.startsWith("/")?Et(U):this.lineralizeSegments(w,U).pipe((0,Se.z)(J=>{const ae=new mt(J,{});return this.expandSegment(_,ae,p,J,S,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(_,p,w,S,U,J){const{matched:ae,consumedSegments:Ne,remainingSegments:ct,positionalParamSegments:cn}=$s(p,S,U);if(!ae)return Fe(p);const Tt=this.applyRedirectCommands(Ne,S.redirectTo,cn);return S.redirectTo.startsWith("/")?Et(Tt):this.lineralizeSegments(S,Tt).pipe((0,Se.z)(Bn=>this.expandSegment(_,p,w,Bn.concat(ct),J,!1)))}matchSegmentAgainstRoute(_,p,w,S,U){return"**"===w.path?(_=Sc(w,_),w.loadChildren?(w._loadedRoutes?(0,F.of)({routes:w._loadedRoutes,injector:w._loadedInjector}):this.configLoader.loadChildren(_,w)).pipe((0,we.U)(ae=>(w._loadedRoutes=ae.routes,w._loadedInjector=ae.injector,new mt(S,{})))):(0,F.of)(new mt(S,{}))):ya(p,w,S,_).pipe((0,Ee.w)(({matched:J,consumedSegments:ae,remainingSegments:Ne})=>J?this.getChildConfig(_=w._injector??_,w,S).pipe((0,Se.z)(cn=>{const Tt=cn.injector??_,Bn=cn.routes,{segmentGroup:ji,slicedSegments:oo}=Vo(p,ae,Ne,Bn),us=new mt(ji.segments,ji.children);if(0===oo.length&&us.hasChildren())return this.expandChildren(Tt,Bn,us).pipe((0,we.U)(Da=>new mt(ae,Da)));if(0===Bn.length&&0===oo.length)return(0,F.of)(new mt(ae,{}));const Ri=ar(w)===U;return this.expandSegment(Tt,us,Bn,oo,Ri?Ct:U,!0).pipe((0,we.U)(bs=>new mt(ae.concat(bs.segments),bs.children)))})):Fe(p)))}getChildConfig(_,p,w){return p.children?(0,F.of)({routes:p.children,injector:_}):p.loadChildren?void 0!==p._loadedRoutes?(0,F.of)({routes:p._loadedRoutes,injector:p._loadedInjector}):function Mc(y,_,p,w){const S=_.canLoad;if(void 0===S||0===S.length)return(0,F.of)(!0);const U=S.map(J=>{const ae=Ai(J,y);return rt(function hr(y){return y&&Ls(y.canLoad)}(ae)?ae.canLoad(_,p):y.runInContext(()=>ae(_,p)))});return(0,F.of)(U).pipe(Mi(),Vs())}(_,p,w).pipe((0,Se.z)(S=>S?this.configLoader.loadChildren(_,p).pipe((0,_e.b)(U=>{p._loadedRoutes=U.routes,p._loadedInjector=U.injector})):function Ln(y){return(0,H._)(ss(V,3))}())):(0,F.of)({routes:[],injector:_})}lineralizeSegments(_,p){let w=[],S=p.root;for(;;){if(w=w.concat(S.segments),0===S.numberOfChildren)return(0,F.of)(w);if(S.numberOfChildren>1||!S.children[Ct])return(0,H._)(new m.vHH(4e3,V));S=S.children[Ct]}}applyRedirectCommands(_,p,w){return this.applyRedirectCreateUrlTree(p,this.urlSerializer.parse(p),_,w)}applyRedirectCreateUrlTree(_,p,w,S){const U=this.createSegmentGroup(_,p.root,w,S);return new Jn(U,this.createQueryParams(p.queryParams,this.urlTree.queryParams),p.fragment)}createQueryParams(_,p){const w={};return gn(_,(S,U)=>{if("string"==typeof S&&S.startsWith(":")){const ae=S.substring(1);w[U]=p[ae]}else w[U]=S}),w}createSegmentGroup(_,p,w,S){const U=this.createSegments(_,p.segments,w,S);let J={};return gn(p.children,(ae,Ne)=>{J[Ne]=this.createSegmentGroup(_,ae,w,S)}),new mt(U,J)}createSegments(_,p,w,S){return p.map(U=>U.path.startsWith(":")?this.findPosParam(_,U,S):this.findOrReturn(U,w))}findPosParam(_,p,w){const S=w[p.path.substring(1)];if(!S)throw new m.vHH(4001,V);return S}findOrReturn(_,p){let w=0;for(const S of p){if(S.path===_.path)return p.splice(w),S;w++}return _}}class fr{}class Vi{constructor(_,p,w,S,U,J,ae,Ne){this.injector=_,this.rootComponentType=p,this.config=w,this.urlTree=S,this.url=U,this.paramsInheritanceStrategy=J,this.relativeLinkResolution=ae,this.urlSerializer=Ne}recognize(){const _=Vo(this.urlTree.root,[],[],this.config.filter(p=>void 0===p.redirectTo),this.relativeLinkResolution).segmentGroup;return this.processSegmentGroup(this.injector,this.config,_,Ct).pipe((0,we.U)(p=>{if(null===p)return null;const w=new Ti([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},Ct,this.rootComponentType,null,this.urlTree.root,-1,{}),S=new Mt(w,p),U=new Ci(this.url,S);return this.inheritParamsAndData(U._root),U}))}inheritParamsAndData(_){const p=_.value,w=Pr(p,this.paramsInheritanceStrategy);p.params=Object.freeze(w.params),p.data=Object.freeze(w.data),_.children.forEach(S=>this.inheritParamsAndData(S))}processSegmentGroup(_,p,w,S){return 0===w.segments.length&&w.hasChildren()?this.processChildren(_,p,w):this.processSegment(_,p,w,w.segments,S)}processChildren(_,p,w){return(0,M.D)(Object.keys(w.children)).pipe((0,Ae.b)(S=>{const U=w.children[S],J=Bo(p,S);return this.processSegmentGroup(_,J,U,S)}),(0,Xe.R)((S,U)=>S&&U?(S.push(...U),S):null),function Ft(y,_=!1){return(0,Le.e)((p,w)=>{let S=0;p.subscribe((0,nt.x)(w,U=>{const J=y(U,S++);(J||_)&&w.next(U),!J&&w.complete()}))})}(S=>null!==S),_t(null),rn(),(0,we.U)(S=>{if(null===S)return null;const U=Ka(S);return function Gs(y){y.sort((_,p)=>_.value.outlet===Ct?-1:p.value.outlet===Ct?1:_.value.outlet.localeCompare(p.value.outlet))}(U),U}))}processSegment(_,p,w,S,U){return(0,M.D)(p).pipe((0,Ae.b)(J=>this.processSegmentAgainstRoute(J._injector??_,J,w,S,U)),ne(J=>!!J),(0,Ze.K)(J=>{if(Us(J))return C(w,S,U)?(0,F.of)([]):(0,F.of)(null);throw J}))}processSegmentAgainstRoute(_,p,w,S,U){if(p.redirectTo||!P(p,w,S,U))return(0,F.of)(null);let J;if("**"===p.path){const ae=S.length>0?xn(S).parameters:{},Ne=as(w)+S.length,ct=new Ti(S,ae,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Gl(p),ar(p),p.component??p._loadedComponent??null,p,cr(w),Ne,Hl(p),Ne);J=(0,F.of)({snapshot:ct,consumedSegments:[],remainingSegments:[]})}else J=ya(w,p,S,_).pipe((0,we.U)(({matched:ae,consumedSegments:Ne,remainingSegments:ct,parameters:cn})=>{if(!ae)return null;const Tt=as(w)+Ne.length;return{snapshot:new Ti(Ne,cn,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Gl(p),ar(p),p.component??p._loadedComponent??null,p,cr(w),Tt,Hl(p),Tt),consumedSegments:Ne,remainingSegments:ct}}));return J.pipe((0,Ee.w)(ae=>{if(null===ae)return(0,F.of)(null);const{snapshot:Ne,consumedSegments:ct,remainingSegments:cn}=ae;_=p._injector??_;const Tt=p._loadedInjector??_,Bn=function Xi(y){return y.children?y.children:y.loadChildren?y._loadedRoutes:[]}(p),{segmentGroup:ji,slicedSegments:oo}=Vo(w,ct,cn,Bn.filter(Ri=>void 0===Ri.redirectTo),this.relativeLinkResolution);if(0===oo.length&&ji.hasChildren())return this.processChildren(Tt,Bn,ji).pipe((0,we.U)(Ri=>null===Ri?null:[new Mt(Ne,Ri)]));if(0===Bn.length&&0===oo.length)return(0,F.of)([new Mt(Ne,[])]);const us=ar(p)===U;return this.processSegment(Tt,Bn,ji,oo,us?Ct:U).pipe((0,we.U)(Ri=>null===Ri?null:[new Mt(Ne,Ri)]))}))}}function to(y){const _=y.value.routeConfig;return _&&""===_.path&&void 0===_.redirectTo}function Ka(y){const _=[],p=new Set;for(const w of y){if(!to(w)){_.push(w);continue}const S=_.find(U=>w.value.routeConfig===U.value.routeConfig);void 0!==S?(S.children.push(...w.children),p.add(S)):_.push(w)}for(const w of p){const S=Ka(w.children);_.push(new Mt(w.value,S))}return _.filter(w=>!p.has(w))}function cr(y){let _=y;for(;_._sourceSegment;)_=_._sourceSegment;return _}function as(y){let _=y,p=_._segmentIndexShift??0;for(;_._sourceSegment;)_=_._sourceSegment,p+=_._segmentIndexShift??0;return p-1}function Gl(y){return y.data||{}}function Hl(y){return y.resolve||{}}function Oc(y){return"string"==typeof y.title||null===y.title}function kr(y){return(0,Ee.w)(_=>{const p=y(_);return p?(0,M.D)(p).pipe((0,we.U)(()=>_)):(0,F.of)(_)})}let zl=(()=>{class y{buildTitle(p){let w,S=p.root;for(;void 0!==S;)w=this.getResolvedTitleForRoute(S)??w,S=S.children.find(U=>U.outlet===Ct);return w}getResolvedTitleForRoute(p){return p.data[sn]}}return y.\u0275fac=function(p){return new(p||y)},y.\u0275prov=m.Yz7({token:y,factory:function(){return(0,m.f3M)($o)},providedIn:"root"}),y})(),$o=(()=>{class y extends zl{constructor(p){super(),this.title=p}updateTitle(p){const w=this.buildTitle(p);void 0!==w&&this.title.setTitle(w)}}return y.\u0275fac=function(p){return new(p||y)(m.LFG(Qt.Dx))},y.\u0275prov=m.Yz7({token:y,factory:y.\u0275fac,providedIn:"root"}),y})();class _a{}class Nu extends class zp{shouldDetach(_){return!1}store(_,p){}shouldAttach(_){return!1}retrieve(_){return null}shouldReuseRoute(_,p){return _.routeConfig===p.routeConfig}}{}const Lu=new m.OlP("",{providedIn:"root",factory:()=>({})}),Fu=new m.OlP("ROUTES");let Qn=(()=>{class y{constructor(p,w){this.injector=p,this.compiler=w,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(p){if(this.componentLoaders.get(p))return this.componentLoaders.get(p);if(p._loadedComponent)return(0,F.of)(p._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(p);const w=rt(p.loadComponent()).pipe((0,_e.b)(U=>{this.onLoadEndListener&&this.onLoadEndListener(p),p._loadedComponent=U}),dn(()=>{this.componentLoaders.delete(p)})),S=new ve.c(w,()=>new me.x).pipe((0,Sn.x)());return this.componentLoaders.set(p,S),S}loadChildren(p,w){if(this.childrenLoaders.get(w))return this.childrenLoaders.get(w);if(w._loadedRoutes)return(0,F.of)({routes:w._loadedRoutes,injector:w._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(w);const U=this.loadModuleFactoryOrRoutes(w.loadChildren).pipe((0,we.U)(ae=>{this.onLoadEndListener&&this.onLoadEndListener(w);let Ne,ct,cn=!1;Array.isArray(ae)?ct=ae:(Ne=ae.create(p).injector,ct=ir(Ne.get(Fu,[],m.XFs.Self|m.XFs.Optional)));return{routes:ct.map(ks),injector:Ne}}),dn(()=>{this.childrenLoaders.delete(w)})),J=new ve.c(U,()=>new me.x).pipe((0,Sn.x)());return this.childrenLoaders.set(w,J),J}loadModuleFactoryOrRoutes(p){return rt(p()).pipe((0,Se.z)(w=>w instanceof m.YKP||Array.isArray(w)?(0,F.of)(w):(0,M.D)(this.compiler.compileModuleAsync(w))))}}return y.\u0275fac=function(p){return new(p||y)(m.LFG(m.zs3),m.LFG(m.Sil))},y.\u0275prov=m.Yz7({token:y,factory:y.\u0275fac,providedIn:"root"}),y})();class Uu{}class Qa{shouldProcessUrl(_){return!0}extract(_){return _}merge(_,p){return _}}function no(y){throw y}function Dh(y,_,p){return _.parse("/")}const Bu={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Vu={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function Ho(){const y=(0,m.f3M)(Rr),_=(0,m.f3M)(Ns),p=(0,m.f3M)(Ue.Ye),w=(0,m.f3M)(m.zs3),S=(0,m.f3M)(m.Sil),U=(0,m.f3M)(Fu,{optional:!0})??[],J=(0,m.f3M)(Lu,{optional:!0})??{},ae=(0,m.f3M)($o),Ne=(0,m.f3M)(zl,{optional:!0}),ct=(0,m.f3M)(Uu,{optional:!0}),cn=(0,m.f3M)(_a,{optional:!0}),Tt=new Ir(null,y,_,p,w,S,ir(U));return ct&&(Tt.urlHandlingStrategy=ct),cn&&(Tt.routeReuseStrategy=cn),Tt.titleStrategy=Ne??ae,function Xa(y,_){y.errorHandler&&(_.errorHandler=y.errorHandler),y.malformedUriErrorHandler&&(_.malformedUriErrorHandler=y.malformedUriErrorHandler),y.onSameUrlNavigation&&(_.onSameUrlNavigation=y.onSameUrlNavigation),y.paramsInheritanceStrategy&&(_.paramsInheritanceStrategy=y.paramsInheritanceStrategy),y.relativeLinkResolution&&(_.relativeLinkResolution=y.relativeLinkResolution),y.urlUpdateStrategy&&(_.urlUpdateStrategy=y.urlUpdateStrategy),y.canceledNavigationResolution&&(_.canceledNavigationResolution=y.canceledNavigationResolution)}(J,Tt),Tt}let Ir=(()=>{class y{constructor(p,w,S,U,J,ae,Ne){this.rootComponentType=p,this.urlSerializer=w,this.rootContexts=S,this.location=U,this.config=Ne,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new me.x,this.errorHandler=no,this.malformedUriErrorHandler=Dh,this.navigated=!1,this.lastSuccessfulId=-1,this.afterPreactivation=()=>(0,F.of)(void 0),this.urlHandlingStrategy=new Qa,this.routeReuseStrategy=new Nu,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.configLoader=J.get(Qn),this.configLoader.onLoadEndListener=Bn=>this.triggerEvent(new Ps(Bn)),this.configLoader.onLoadStartListener=Bn=>this.triggerEvent(new No(Bn)),this.ngModule=J.get(m.h0i),this.console=J.get(m.c2e);const Tt=J.get(m.R0b);this.isNgZoneEnabled=Tt instanceof m.R0b&&m.R0b.isInAngularZone(),this.resetConfig(Ne),this.currentUrlTree=function Ii(){return new Jn(new mt([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=nr(this.currentUrlTree,this.rootComponentType),this.transitions=new z.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(p){const w=this.events;return p.pipe((0,Pe.h)(S=>0!==S.id),(0,we.U)(S=>({...S,extractedUrl:this.urlHandlingStrategy.extract(S.rawUrl)})),(0,Ee.w)(S=>{let U=!1,J=!1;return(0,F.of)(S).pipe((0,_e.b)(ae=>{this.currentNavigation={id:ae.id,initialUrl:ae.rawUrl,extractedUrl:ae.extractedUrl,trigger:ae.source,extras:ae.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),(0,Ee.w)(ae=>{const Ne=this.browserUrlTree.toString(),ct=!this.navigated||ae.extractedUrl.toString()!==Ne||Ne!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||ct)&&this.urlHandlingStrategy.shouldProcessUrl(ae.rawUrl))return Is(ae.source)&&(this.browserUrlTree=ae.extractedUrl),(0,F.of)(ae).pipe((0,Ee.w)(Tt=>{const Bn=this.transitions.getValue();return w.next(new $n(Tt.id,this.serializeUrl(Tt.extractedUrl),Tt.source,Tt.restoredState)),Bn!==this.transitions.getValue()?ye.E:Promise.resolve(Tt)}),function Tr(y,_,p,w){return(0,Ee.w)(S=>function An(y,_,p,w,S){return new _n(y,_,p,w,S).apply()}(y,_,p,S.extractedUrl,w).pipe((0,we.U)(U=>({...S,urlAfterRedirects:U}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),(0,_e.b)(Tt=>{this.currentNavigation={...this.currentNavigation,finalUrl:Tt.urlAfterRedirects},S.urlAfterRedirects=Tt.urlAfterRedirects}),function Rc(y,_,p,w,S,U){return(0,Se.z)(J=>function Bi(y,_,p,w,S,U,J="emptyOnly",ae="legacy"){return new Vi(y,_,p,w,S,J,ae,U).recognize().pipe((0,Ee.w)(Ne=>null===Ne?function Es(y){return new te.y(_=>_.error(y))}(new fr):(0,F.of)(Ne)))}(y,_,p,J.urlAfterRedirects,w.serialize(J.urlAfterRedirects),w,S,U).pipe((0,we.U)(ae=>({...J,targetSnapshot:ae}))))}(this.ngModule.injector,this.rootComponentType,this.config,this.urlSerializer,this.paramsInheritanceStrategy,this.relativeLinkResolution),(0,_e.b)(Tt=>{if(S.targetSnapshot=Tt.targetSnapshot,"eager"===this.urlUpdateStrategy){if(!Tt.extras.skipLocationChange){const ji=this.urlHandlingStrategy.merge(Tt.urlAfterRedirects,Tt.rawUrl);this.setBrowserUrl(ji,Tt)}this.browserUrlTree=Tt.urlAfterRedirects}const Bn=new Yi(Tt.id,this.serializeUrl(Tt.extractedUrl),this.serializeUrl(Tt.urlAfterRedirects),Tt.targetSnapshot);w.next(Bn)}));if(ct&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:Bn,extractedUrl:ji,source:oo,restoredState:us,extras:Ri}=ae,qu=new $n(Bn,this.serializeUrl(ji),oo,us);w.next(qu);const bs=nr(ji,this.rootComponentType).snapshot;return S={...ae,targetSnapshot:bs,urlAfterRedirects:ji,extras:{...Ri,skipLocationChange:!1,replaceUrl:!1}},(0,F.of)(S)}return this.rawUrlTree=ae.rawUrl,ae.resolve(null),ye.E}),(0,_e.b)(ae=>{const Ne=new vr(ae.id,this.serializeUrl(ae.extractedUrl),this.serializeUrl(ae.urlAfterRedirects),ae.targetSnapshot);this.triggerEvent(Ne)}),(0,we.U)(ae=>S={...ae,guards:Ha(ae.targetSnapshot,ae.currentSnapshot,this.rootContexts)}),function br(y,_){return(0,Se.z)(p=>{const{targetSnapshot:w,currentSnapshot:S,guards:{canActivateChecks:U,canDeactivateChecks:J}}=p;return 0===J.length&&0===U.length?(0,F.of)({...p,guardsResult:!0}):function xi(y,_,p,w){return(0,M.D)(y).pipe((0,Se.z)(S=>function jl(y,_,p,w,S){const U=_&&_.routeConfig?_.routeConfig.canDeactivate:null;if(!U||0===U.length)return(0,F.of)(!0);const J=U.map(ae=>{const Ne=Zn(_)??S,ct=Ai(ae,Ne);return rt(function ni(y){return y&&Ls(y.canDeactivate)}(ct)?ct.canDeactivate(y,_,p,w):Ne.runInContext(()=>ct(y,_,p,w))).pipe(ne())});return(0,F.of)(J).pipe(Mi())}(S.component,S.route,p,_,w)),ne(S=>!0!==S,!0))}(J,w,S,y).pipe((0,Se.z)(ae=>ae&&function Js(y){return"boolean"==typeof y}(ae)?function Wa(y,_,p,w){return(0,M.D)(_).pipe((0,Ae.b)(S=>(0,Q.z)(function vs(y,_){return null!==y&&_&&_(new oe(y)),(0,F.of)(!0)}(S.route.parent,w),function Bs(y,_){return null!==y&&_&&_(new $(y)),(0,F.of)(!0)}(S.route,w),function Io(y,_,p){const w=_[_.length-1],U=_.slice(0,_.length-1).reverse().map(J=>function vo(y){const _=y.routeConfig?y.routeConfig.canActivateChild:null;return _&&0!==_.length?{node:y,guards:_}:null}(J)).filter(J=>null!==J).map(J=>(0,K.P)(()=>{const ae=J.guards.map(Ne=>{const ct=Zn(J.node)??p,cn=Ai(Ne,ct);return rt(function pa(y){return y&&Ls(y.canActivateChild)}(cn)?cn.canActivateChild(w,y):ct.runInContext(()=>cn(w,y))).pipe(ne())});return(0,F.of)(ae).pipe(Mi())}));return(0,F.of)(U).pipe(Mi())}(y,S.path,p),function Vl(y,_,p){const w=_.routeConfig?_.routeConfig.canActivate:null;if(!w||0===w.length)return(0,F.of)(!0);const S=w.map(U=>(0,K.P)(()=>{const J=Zn(_)??p,ae=Ai(U,J);return rt(function Fs(y){return y&&Ls(y.canActivate)}(ae)?ae.canActivate(_,y):J.runInContext(()=>ae(_,y))).pipe(ne())}));return(0,F.of)(S).pipe(Mi())}(y,S.route,p))),ne(S=>!0!==S,!0))}(w,U,y,_):(0,F.of)(ae)),(0,we.U)(ae=>({...p,guardsResult:ae})))})}(this.ngModule.injector,ae=>this.triggerEvent(ae)),(0,_e.b)(ae=>{if(S.guardsResult=ae.guardsResult,je(ae.guardsResult))throw Cc(0,ae.guardsResult);const Ne=new Zi(ae.id,this.serializeUrl(ae.extractedUrl),this.serializeUrl(ae.urlAfterRedirects),ae.targetSnapshot,!!ae.guardsResult);this.triggerEvent(Ne)}),(0,Pe.h)(ae=>!!ae.guardsResult||(this.restoreHistory(ae),this.cancelNavigationTransition(ae,"",3),!1)),kr(ae=>{if(ae.guards.canActivateChecks.length)return(0,F.of)(ae).pipe((0,_e.b)(Ne=>{const ct=new Er(Ne.id,this.serializeUrl(Ne.extractedUrl),this.serializeUrl(Ne.urlAfterRedirects),Ne.targetSnapshot);this.triggerEvent(ct)}),(0,Ee.w)(Ne=>{let ct=!1;return(0,F.of)(Ne).pipe(function Ya(y,_){return(0,Se.z)(p=>{const{targetSnapshot:w,guards:{canActivateChecks:S}}=p;if(!S.length)return(0,F.of)(p);let U=0;return(0,M.D)(S).pipe((0,Ae.b)(J=>function jo(y,_,p,w){const S=y.routeConfig,U=y._resolve;return void 0!==S?.title&&!Oc(S)&&(U[sn]=S.title),function Za(y,_,p,w){const S=function Ou(y){return[...Object.keys(y),...Object.getOwnPropertySymbols(y)]}(y);if(0===S.length)return(0,F.of)({});const U={};return(0,M.D)(S).pipe((0,Se.z)(J=>function Pu(y,_,p,w){const S=Zn(_)??w,U=Ai(y,S);return rt(U.resolve?U.resolve(_,p):S.runInContext(()=>U(_,p)))}(y[J],_,p,w).pipe(ne(),(0,_e.b)(ae=>{U[J]=ae}))),wt(1),(0,at.h)(U),(0,Ze.K)(J=>Us(J)?ye.E:(0,H._)(J)))}(U,y,_,w).pipe((0,we.U)(J=>(y._resolvedData=J,y.data=Pr(y,p).resolve,S&&Oc(S)&&(y.data[sn]=S.title),null)))}(J.route,w,y,_)),(0,_e.b)(()=>U++),wt(1),(0,Se.z)(J=>U===S.length?(0,F.of)(p):ye.E))})}(this.paramsInheritanceStrategy,this.ngModule.injector),(0,_e.b)({next:()=>ct=!0,complete:()=>{ct||(this.restoreHistory(Ne),this.cancelNavigationTransition(Ne,"",2))}}))}),(0,_e.b)(Ne=>{const ct=new gs(Ne.id,this.serializeUrl(Ne.extractedUrl),this.serializeUrl(Ne.urlAfterRedirects),Ne.targetSnapshot);this.triggerEvent(ct)}))}),kr(ae=>{const Ne=ct=>{const cn=[];ct.routeConfig?.loadComponent&&!ct.routeConfig._loadedComponent&&cn.push(this.configLoader.loadComponent(ct.routeConfig).pipe((0,_e.b)(Tt=>{ct.component=Tt}),(0,we.U)(()=>{})));for(const Tt of ct.children)cn.push(...Ne(Tt));return cn};return(0,ee.a)(Ne(ae.targetSnapshot.root)).pipe(_t(),(0,We.q)(1))}),kr(()=>this.afterPreactivation()),(0,we.U)(ae=>{const Ne=function ca(y,_,p){const w=ti(y,_._root,p?p._root:void 0);return new un(w,_)}(this.routeReuseStrategy,ae.targetSnapshot,ae.currentRouterState);return S={...ae,targetRouterState:Ne}}),(0,_e.b)(ae=>{this.currentUrlTree=ae.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(ae.urlAfterRedirects,ae.rawUrl),this.routerState=ae.targetRouterState,"deferred"===this.urlUpdateStrategy&&(ae.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,ae),this.browserUrlTree=ae.urlAfterRedirects)}),((y,_,p)=>(0,we.U)(w=>(new _o(_,w.targetRouterState,w.currentRouterState,p).activate(y),w)))(this.rootContexts,this.routeReuseStrategy,ae=>this.triggerEvent(ae)),(0,_e.b)({next(){U=!0},complete(){U=!0}}),dn(()=>{U||J||this.cancelNavigationTransition(S,"",1),this.currentNavigation?.id===S.id&&(this.currentNavigation=null)}),(0,Ze.K)(ae=>{if(J=!0,Nr(ae)){Qi(ae)||(this.navigated=!0,this.restoreHistory(S,!0));const Ne=new kn(S.id,this.serializeUrl(S.extractedUrl),ae.message,ae.cancellationCode);if(w.next(Ne),Qi(ae)){const ct=this.urlHandlingStrategy.merge(ae.url,this.rawUrlTree),cn={skipLocationChange:S.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||Is(S.source)};this.scheduleNavigation(ct,"imperative",null,cn,{resolve:S.resolve,reject:S.reject,promise:S.promise})}else S.resolve(!1)}else{this.restoreHistory(S,!0);const Ne=new jr(S.id,this.serializeUrl(S.extractedUrl),ae,S.targetSnapshot??void 0);w.next(Ne);try{S.resolve(this.errorHandler(ae))}catch(ct){S.reject(ct)}}return ye.E}))}))}resetRootComponentType(p){this.rootComponentType=p,this.routerState.root.component=this.rootComponentType}setTransition(p){this.transitions.next({...this.transitions.value,...p})}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(p=>{const w="popstate"===p.type?"popstate":"hashchange";"popstate"===w&&setTimeout(()=>{const S={replaceUrl:!0},U=p.state?.navigationId?p.state:null;if(U){const ae={...U};delete ae.navigationId,delete ae.\u0275routerPageId,0!==Object.keys(ae).length&&(S.state=ae)}const J=this.parseUrl(p.url);this.scheduleNavigation(J,w,U,S)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(p){this.events.next(p)}resetConfig(p){this.config=p.map(ks),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(p,w={}){const{relativeTo:S,queryParams:U,fragment:J,queryParamsHandling:ae,preserveFragment:Ne}=w,ct=S||this.routerState.root,cn=Ne?this.currentUrlTree.fragment:J;let Tt=null;switch(ae){case"merge":Tt={...this.currentUrlTree.queryParams,...U};break;case"preserve":Tt=this.currentUrlTree.queryParams;break;default:Tt=U||null}return null!==Tt&&(Tt=this.removeEmptyProps(Tt)),ui(ct,this.currentUrlTree,p,Tt,cn??null)}navigateByUrl(p,w={skipLocationChange:!1}){const S=je(p)?p:this.parseUrl(p),U=this.urlHandlingStrategy.merge(S,this.rawUrlTree);return this.scheduleNavigation(U,"imperative",null,w)}navigate(p,w={skipLocationChange:!1}){return function wo(y){for(let _=0;_{const U=p[S];return null!=U&&(w[S]=U),w},{})}processNavigations(){this.navigations.subscribe(p=>{this.navigated=!0,this.lastSuccessfulId=p.id,this.currentPageId=p.targetPageId,this.events.next(new di(p.id,this.serializeUrl(p.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.titleStrategy?.updateTitle(this.routerState.snapshot),p.resolve(!0)},p=>{this.console.warn(`Unhandled Navigation Error: ${p}`)})}scheduleNavigation(p,w,S,U,J){if(this.disposed)return Promise.resolve(!1);let ae,Ne,ct;J?(ae=J.resolve,Ne=J.reject,ct=J.promise):ct=new Promise((Bn,ji)=>{ae=Bn,Ne=ji});const cn=++this.navigationId;let Tt;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(S=this.location.getState()),Tt=S&&S.\u0275routerPageId?S.\u0275routerPageId:U.replaceUrl||U.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1):Tt=0,this.setTransition({id:cn,targetPageId:Tt,source:w,restoredState:S,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:p,extras:U,resolve:ae,reject:Ne,promise:ct,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),ct.catch(Bn=>Promise.reject(Bn))}setBrowserUrl(p,w){const S=this.urlSerializer.serialize(p),U={...w.extras.state,...this.generateNgRouterState(w.id,w.targetPageId)};this.location.isCurrentPathEqualTo(S)||w.extras.replaceUrl?this.location.replaceState(S,"",U):this.location.go(S,"",U)}restoreHistory(p,w=!1){if("computed"===this.canceledNavigationResolution){const S=this.currentPageId-p.targetPageId;"popstate"!==p.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.currentNavigation?.finalUrl||0===S?this.currentUrlTree===this.currentNavigation?.finalUrl&&0===S&&(this.resetState(p),this.browserUrlTree=p.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(S)}else"replace"===this.canceledNavigationResolution&&(w&&this.resetState(p),this.resetUrlToCurrentUrlTree())}resetState(p){this.routerState=p.currentRouterState,this.currentUrlTree=p.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,p.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(p,w,S){const U=new kn(p.id,this.serializeUrl(p.extractedUrl),w,S);this.triggerEvent(U),p.resolve(!1)}generateNgRouterState(p,w){return"computed"===this.canceledNavigationResolution?{navigationId:p,\u0275routerPageId:w}:{navigationId:p}}}return y.\u0275fac=function(p){m.$Z()},y.\u0275prov=m.Yz7({token:y,factory:function(){return Ho()},providedIn:"root"}),y})();function Is(y){return"imperative"!==y}let Ja=(()=>{class y{constructor(p,w,S,U,J){this.router=p,this.route=w,this.tabIndexAttribute=S,this.renderer=U,this.el=J,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.commands=null,this.onChanges=new me.x,this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(p){this._preserveFragment=(0,m.D6c)(p)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(p){this._skipLocationChange=(0,m.D6c)(p)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(p){this._replaceUrl=(0,m.D6c)(p)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(p){if(null!=this.tabIndexAttribute)return;const w=this.renderer,S=this.el.nativeElement;null!==p?w.setAttribute(S,"tabindex",p):w.removeAttribute(S,"tabindex")}ngOnChanges(p){this.onChanges.next(this)}set routerLink(p){null!=p?(this.commands=Array.isArray(p)?p:[p],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(){return null===this.urlTree||this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!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:this.preserveFragment})}}return y.\u0275fac=function(p){return new(p||y)(m.Y36(Ir),m.Y36(Rn),m.$8M("tabindex"),m.Y36(m.Qsj),m.Y36(m.SBq))},y.\u0275dir=m.lG2({type:y,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(p,w){1&p&&m.NdJ("click",function(){return w.onClick()})},inputs:{queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[m.TTD]}),y})();class Pc{}let wh=(()=>{class y{constructor(p,w,S,U,J){this.router=p,this.injector=S,this.preloadingStrategy=U,this.loader=J}setUpPreloading(){this.subscription=this.router.events.pipe((0,Pe.h)(p=>p instanceof di),(0,Ae.b)(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(p,w){const S=[];for(const U of w){U.providers&&!U._injector&&(U._injector=(0,m.MMx)(U.providers,p,`Route: ${U.path}`));const J=U._injector??p,ae=U._loadedInjector??J;U.loadChildren&&!U._loadedRoutes&&void 0===U.canLoad||U.loadComponent&&!U._loadedComponent?S.push(this.preloadConfig(J,U)):(U.children||U._loadedRoutes)&&S.push(this.processRoutes(ae,U.children??U._loadedRoutes))}return(0,M.D)(S).pipe((0,qt.J)())}preloadConfig(p,w){return this.preloadingStrategy.preload(w,()=>{let S;S=w.loadChildren&&void 0===w.canLoad?this.loader.loadChildren(p,w):(0,F.of)(null);const U=S.pipe((0,Se.z)(J=>null===J?(0,F.of)(void 0):(w._loadedRoutes=J.routes,w._loadedInjector=J.injector,this.processRoutes(J.injector??p,J.routes))));if(w.loadComponent&&!w._loadedComponent){const J=this.loader.loadComponent(w);return(0,M.D)([U,J]).pipe((0,qt.J)())}return U})}}return y.\u0275fac=function(p){return new(p||y)(m.LFG(Ir),m.LFG(m.Sil),m.LFG(m.lqb),m.LFG(Pc),m.LFG(Qn))},y.\u0275prov=m.Yz7({token:y,factory:y.\u0275fac,providedIn:"root"}),y})();const va=new m.OlP("");let Hu=(()=>{class y{constructor(p,w,S={}){this.router=p,this.viewportScroller=w,this.options=S,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},S.scrollPositionRestoration=S.scrollPositionRestoration||"disabled",S.anchorScrolling=S.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(p=>{p instanceof $n?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=p.navigationTrigger,this.restoredId=p.restoredState?p.restoredState.navigationId:0):p instanceof di&&(this.lastId=p.id,this.scheduleScrollEvent(p,this.router.parseUrl(p.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(p=>{p instanceof he&&(p.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(p.position):p.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(p.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(p,w){this.router.triggerEvent(new he(p,"popstate"===this.lastSource?this.store[this.restoredId]:null,w))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return y.\u0275fac=function(p){m.$Z()},y.\u0275prov=m.Yz7({token:y,factory:y.\u0275fac}),y})();function Ds(y,_){return{\u0275kind:y,\u0275providers:_}}function io(y){return[{provide:Fu,multi:!0,useValue:y}]}function ws(){const y=(0,m.f3M)(m.zs3);return _=>{const p=y.get(m.z2F);if(_!==p.components[0])return;const w=y.get(Ir),S=y.get(Ea);1===y.get(Hn)&&w.initialNavigation(),y.get(Kl,null,m.XFs.Optional)?.setUpPreloading(),y.get(va,null,m.XFs.Optional)?.init(),w.resetRootComponentType(p.componentTypes[0]),S.next(),S.complete()}}const Ea=new m.OlP("",{factory:()=>new me.x}),Hn=new m.OlP("",{providedIn:"root",factory:()=>1});const Kl=new m.OlP("");function Th(y){return Ds(0,[{provide:Kl,useExisting:wh},{provide:Pc,useExisting:y}])}const Ch=new m.OlP("ROUTER_FORROOT_GUARD"),Kp=[Ue.Ye,{provide:Rr,useClass:Xt},{provide:Ir,useFactory:Ho},Ns,{provide:Rn,useFactory:function ro(y){return y.routerState.root},deps:[Ir]},Qn];function Gr(){return new m.PXZ("Router",Ir)}let eu=(()=>{class y{constructor(p){}static forRoot(p,w){return{ngModule:y,providers:[Kp,[],io(p),{provide:Ch,useFactory:fi,deps:[[Ir,new m.FiY,new m.tp0]]},{provide:Lu,useValue:w||{}},w?.useHash?{provide:Ue.S$,useClass:Ue.Do}:{provide:Ue.S$,useClass:Ue.b0},{provide:va,useFactory:()=>{const y=(0,m.f3M)(Ir),_=(0,m.f3M)(Ue.EM),p=(0,m.f3M)(Lu);return p.scrollOffset&&_.setOffset(p.scrollOffset),new Hu(y,_,p)}},w?.preloadingStrategy?Th(w.preloadingStrategy).\u0275providers:[],{provide:m.PXZ,multi:!0,useFactory:Gr},w?.initialNavigation?so(w):[],[{provide:Ia,useFactory:ws},{provide:m.tb,multi:!0,useExisting:Ia}]]}}static forChild(p){return{ngModule:y,providers:[io(p)]}}}return y.\u0275fac=function(p){return new(p||y)(m.LFG(Ch,8))},y.\u0275mod=m.oAB({type:y}),y.\u0275inj=m.cJS({imports:[Lo]}),y})();function fi(y){return"guarded"}function so(y){return["disabled"===y.initialNavigation?Ds(3,[{provide:m.ip1,multi:!0,useFactory:()=>{const _=(0,m.f3M)(Ir);return()=>{_.setUpLocationChangeListener()}}},{provide:Hn,useValue:2}]).\u0275providers:[],"enabledBlocking"===y.initialNavigation?Ds(2,[{provide:Hn,useValue:0},{provide:m.ip1,multi:!0,deps:[m.zs3],useFactory:_=>{const p=_.get(Ue.V_,Promise.resolve());let w=!1;return()=>p.then(()=>new Promise(U=>{const J=_.get(Ir),ae=_.get(Ea);(function S(U){_.get(Ir).events.pipe((0,Pe.h)(ae=>ae instanceof di||ae instanceof kn||ae instanceof jr),(0,we.U)(ae=>ae instanceof di||ae instanceof kn&&(0===ae.code||1===ae.code)&&null),(0,Pe.h)(ae=>null!==ae),(0,We.q)(1)).subscribe(()=>{U()})})(()=>{U(!0),w=!0}),J.afterPreactivation=()=>(U(!0),w||ae.closed?(0,F.of)(void 0):ae),J.initialNavigation()}))}}]).\u0275providers:[]]}const Ia=new m.OlP("")},9681:(le,k,E)=>{E.d(k,{C6:()=>qr,Jn:()=>xr,KN:()=>Pn,Mq:()=>xn,Xd:()=>Ct,ZF:()=>ir,qX:()=>sn});var m=E(5861),M=E(4859),F=E(1877),z=E(2090),O=E(8766);class W{constructor(He){this.container=He}getPlatformInfoString(){return this.container.getProviders().map(yt=>{if(function ee(lt){return"VERSION"===lt.getComponent()?.type}(yt)){const Nt=yt.getImmediate();return`${Nt.library}/${Nt.version}`}return null}).filter(yt=>yt).join(" ")}}const Q="@firebase/app",K="0.8.2",G=new F.Yd("@firebase/app"),Ft="[DEFAULT]",at={[Q]:"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"},dn=new Map,Sn=new Map;function qt(lt,He){try{lt.container.addComponent(He)}catch(yt){G.debug(`Component ${He.name} failed to register with FirebaseApp ${lt.name}`,yt)}}function Ct(lt){const He=lt.name;if(Sn.has(He))return G.debug(`There were multiple attempts to register component ${He}.`),!1;Sn.set(He,lt);for(const yt of dn.values())qt(yt,lt);return!0}function sn(lt,He){const yt=lt.container.getProvider("heartbeat").getImmediate({optional:!0});return yt&&yt.triggerHeartbeat(),lt.container.getProvider(He)}const pn=new z.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","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});class rr{constructor(He,yt,Nt){this._isDeleted=!1,this._options=Object.assign({},He),this._config=Object.assign({},yt),this._name=yt.name,this._automaticDataCollectionEnabled=yt.automaticDataCollectionEnabled,this._container=Nt,this.container.addComponent(new M.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(He){this.checkDestroyed(),this._automaticDataCollectionEnabled=He}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(He){this._isDeleted=He}checkDestroyed(){if(this.isDeleted)throw pn.create("app-deleted",{appName:this._name})}}const xr="9.12.1";function ir(lt,He={}){let yt=lt;"object"!=typeof He&&(He={name:He});const Nt=Object.assign({name:Ft,automaticDataCollectionEnabled:!1},He),kt=Nt.name;if("string"!=typeof kt||!kt)throw pn.create("bad-app-name",{appName:String(kt)});if(yt||(yt=(0,z.aH)()),!yt)throw pn.create("no-options");const Vt=dn.get(kt);if(Vt){if((0,z.vZ)(yt,Vt.options)&&(0,z.vZ)(Nt,Vt.config))return Vt;throw pn.create("duplicate-app",{appName:kt})}const de=new M.H0(kt);for(const ge of Sn.values())de.addComponent(ge);const se=new rr(yt,Nt,de);return dn.set(kt,se),se}function xn(lt=Ft){const He=dn.get(lt);if(!He&<===Ft)return ir();if(!He)throw pn.create("no-app",{appName:lt});return He}function qr(){return Array.from(dn.values())}function Pn(lt,He,yt){var Nt;let kt=null!==(Nt=at[lt])&&void 0!==Nt?Nt:lt;yt&&(kt+=`-${yt}`);const Vt=kt.match(/\s|\//),de=He.match(/\s|\//);if(Vt||de){const se=[`Unable to register library "${kt}" with version "${He}":`];return Vt&&se.push(`library name "${kt}" contains illegal characters (whitespace or "/")`),Vt&&de&&se.push("and"),de&&se.push(`version name "${He}" contains illegal characters (whitespace or "/")`),void G.warn(se.join(" "))}Ct(new M.wA(`${kt}-version`,()=>({library:kt,version:He}),"VERSION"))}const Un="firebase-heartbeat-store";let En=null;function wn(){return En||(En=(0,O.X3)("firebase-heartbeat-database",1,{upgrade:(lt,He)=>{0===He&<.createObjectStore(Un)}}).catch(lt=>{throw pn.create("idb-open",{originalErrorMessage:lt.message})})),En}function St(){return(St=(0,m.Z)(function*(lt){var He;try{return(yield wn()).transaction(Un).objectStore(Un).get(mt(lt))}catch(yt){if(yt instanceof z.ZR)G.warn(yt.message);else{const Nt=pn.create("idb-get",{originalErrorMessage:null===(He=yt)||void 0===He?void 0:He.message});G.warn(Nt.message)}}})).apply(this,arguments)}function tn(lt,He){return Jn.apply(this,arguments)}function Jn(){return(Jn=(0,m.Z)(function*(lt,He){var yt;try{const kt=(yield wn()).transaction(Un,"readwrite");return yield kt.objectStore(Un).put(He,mt(lt)),kt.done}catch(Nt){if(Nt instanceof z.ZR)G.warn(Nt.message);else{const kt=pn.create("idb-set",{originalErrorMessage:null===(yt=Nt)||void 0===yt?void 0:yt.message});G.warn(kt.message)}}})).apply(this,arguments)}function mt(lt){return`${lt.name}!${lt.options.appId}`}class sr{constructor(He){this.container=He,this._heartbeatsCache=null;const yt=this.container.getProvider("app").getImmediate();this._storage=new Xt(yt),this._heartbeatsCachePromise=this._storage.read().then(Nt=>(this._heartbeatsCache=Nt,Nt))}triggerHeartbeat(){var He=this;return(0,m.Z)(function*(){const Nt=He.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),kt=In();if(null===He._heartbeatsCache&&(He._heartbeatsCache=yield He._heartbeatsCachePromise),He._heartbeatsCache.lastSentHeartbeatDate!==kt&&!He._heartbeatsCache.heartbeats.some(Vt=>Vt.date===kt))return He._heartbeatsCache.heartbeats.push({date:kt,agent:Nt}),He._heartbeatsCache.heartbeats=He._heartbeatsCache.heartbeats.filter(Vt=>{const de=new Date(Vt.date).valueOf();return Date.now()-de<=2592e6}),He._storage.overwrite(He._heartbeatsCache)})()}getHeartbeatsHeader(){var He=this;return(0,m.Z)(function*(){if(null===He._heartbeatsCache&&(yield He._heartbeatsCachePromise),null===He._heartbeatsCache||0===He._heartbeatsCache.heartbeats.length)return"";const yt=In(),{heartbeatsToSend:Nt,unsentEntries:kt}=function Rr(lt,He=1024){const yt=[];let Nt=lt.slice();for(const kt of lt){const Vt=yt.find(de=>de.agent===kt.agent);if(Vt){if(Vt.dates.push(kt.date),bn(yt)>He){Vt.dates.pop();break}}else if(yt.push({agent:kt.agent,dates:[kt.date]}),bn(yt)>He){yt.pop();break}Nt=Nt.slice(1)}return{heartbeatsToSend:yt,unsentEntries:Nt}}(He._heartbeatsCache.heartbeats),Vt=(0,z.L)(JSON.stringify({version:2,heartbeats:Nt}));return He._heartbeatsCache.lastSentHeartbeatDate=yt,kt.length>0?(He._heartbeatsCache.heartbeats=kt,yield He._storage.overwrite(He._heartbeatsCache)):(He._heartbeatsCache.heartbeats=[],He._storage.overwrite(He._heartbeatsCache)),Vt})()}}function In(){return(new Date).toISOString().substring(0,10)}class Xt{constructor(He){this.app=He,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return(0,m.Z)(function*(){return!!(0,z.hl)()&&(0,z.eu)().then(()=>!0).catch(()=>!1)})()}read(){var He=this;return(0,m.Z)(function*(){return(yield He._canUseIndexedDBPromise)&&(yield function vt(lt){return St.apply(this,arguments)}(He.app))||{heartbeats:[]}})()}overwrite(He){var yt=this;return(0,m.Z)(function*(){var Nt;if(yield yt._canUseIndexedDBPromise){const Vt=yield yt.read();return tn(yt.app,{lastSentHeartbeatDate:null!==(Nt=He.lastSentHeartbeatDate)&&void 0!==Nt?Nt:Vt.lastSentHeartbeatDate,heartbeats:He.heartbeats})}})()}add(He){var yt=this;return(0,m.Z)(function*(){var Nt;if(yield yt._canUseIndexedDBPromise){const Vt=yield yt.read();return tn(yt.app,{lastSentHeartbeatDate:null!==(Nt=He.lastSentHeartbeatDate)&&void 0!==Nt?Nt:Vt.lastSentHeartbeatDate,heartbeats:[...Vt.heartbeats,...He.heartbeats]})}})()}}function bn(lt){return(0,z.L)(JSON.stringify({version:2,heartbeats:lt})).length}!function Gn(lt){Ct(new M.wA("platform-logger",He=>new W(He),"PRIVATE")),Ct(new M.wA("heartbeat",He=>new sr(He),"PRIVATE")),Pn(Q,K,lt),Pn(Q,K,"esm2017"),Pn("fire-js","")}("")},4859:(le,k,E)=>{E.d(k,{H0:()=>Q,wA:()=>F});var m=E(5861),M=E(2090);class F{constructor(G,H,te){this.name=G,this.instanceFactory=H,this.type=te,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(G){return this.instantiationMode=G,this}setMultipleInstances(G){return this.multipleInstances=G,this}setServiceProps(G){return this.serviceProps=G,this}setInstanceCreatedCallback(G){return this.onInstanceCreated=G,this}}const z="[DEFAULT]";class O{constructor(G,H){this.name=G,this.container=H,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(G){const H=this.normalizeInstanceIdentifier(G);if(!this.instancesDeferred.has(H)){const te=new M.BH;if(this.instancesDeferred.set(H,te),this.isInitialized(H)||this.shouldAutoInitialize())try{const ye=this.getOrInitializeService({instanceIdentifier:H});ye&&te.resolve(ye)}catch{}}return this.instancesDeferred.get(H).promise}getImmediate(G){var H;const te=this.normalizeInstanceIdentifier(G?.identifier),ye=null!==(H=G?.optional)&&void 0!==H&&H;if(!this.isInitialized(te)&&!this.shouldAutoInitialize()){if(ye)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:te})}catch(ve){if(ye)return null;throw ve}}getComponent(){return this.component}setComponent(G){if(G.name!==this.name)throw Error(`Mismatching Component ${G.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=G,this.shouldAutoInitialize()){if(function ee(K){return"EAGER"===K.instantiationMode}(G))try{this.getOrInitializeService({instanceIdentifier:z})}catch{}for(const[H,te]of this.instancesDeferred.entries()){const ye=this.normalizeInstanceIdentifier(H);try{const ve=this.getOrInitializeService({instanceIdentifier:ye});te.resolve(ve)}catch{}}}}clearInstance(G=z){this.instancesDeferred.delete(G),this.instancesOptions.delete(G),this.instances.delete(G)}delete(){var G=this;return(0,m.Z)(function*(){const H=Array.from(G.instances.values());yield Promise.all([...H.filter(te=>"INTERNAL"in te).map(te=>te.INTERNAL.delete()),...H.filter(te=>"_delete"in te).map(te=>te._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(G=z){return this.instances.has(G)}getOptions(G=z){return this.instancesOptions.get(G)||{}}initialize(G={}){const{options:H={}}=G,te=this.normalizeInstanceIdentifier(G.instanceIdentifier);if(this.isInitialized(te))throw Error(`${this.name}(${te}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const ye=this.getOrInitializeService({instanceIdentifier:te,options:H});for(const[ve,me]of this.instancesDeferred.entries())te===this.normalizeInstanceIdentifier(ve)&&me.resolve(ye);return ye}onInit(G,H){var te;const ye=this.normalizeInstanceIdentifier(H),ve=null!==(te=this.onInitCallbacks.get(ye))&&void 0!==te?te:new Set;ve.add(G),this.onInitCallbacks.set(ye,ve);const me=this.instances.get(ye);return me&&G(me,ye),()=>{ve.delete(G)}}invokeOnInitCallbacks(G,H){const te=this.onInitCallbacks.get(H);if(te)for(const ye of te)try{ye(G,H)}catch{}}getOrInitializeService({instanceIdentifier:G,options:H={}}){let te=this.instances.get(G);if(!te&&this.component&&(te=this.component.instanceFactory(this.container,{instanceIdentifier:(K=G,K===z?void 0:K),options:H}),this.instances.set(G,te),this.instancesOptions.set(G,H),this.invokeOnInitCallbacks(te,G),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,G,te)}catch{}var K;return te||null}normalizeInstanceIdentifier(G=z){return this.component?this.component.multipleInstances?G:z:G}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class Q{constructor(G){this.name=G,this.providers=new Map}addComponent(G){const H=this.getProvider(G.name);if(H.isComponentSet())throw new Error(`Component ${G.name} has already been registered with ${this.name}`);H.setComponent(G)}addOrOverwriteComponent(G){this.getProvider(G.name).isComponentSet()&&this.providers.delete(G.name),this.addComponent(G)}getProvider(G){if(this.providers.has(G))return this.providers.get(G);const H=new O(G,this);return this.providers.set(G,H),H}getProviders(){return Array.from(this.providers.values())}}},1877:(le,k,E)=>{E.d(k,{Yd:()=>ee,in:()=>M});const m=[];var M=(()=>{return(G=M||(M={}))[G.DEBUG=0]="DEBUG",G[G.VERBOSE=1]="VERBOSE",G[G.INFO=2]="INFO",G[G.WARN=3]="WARN",G[G.ERROR=4]="ERROR",G[G.SILENT=5]="SILENT",M;var G})();const F={debug:M.DEBUG,verbose:M.VERBOSE,info:M.INFO,warn:M.WARN,error:M.ERROR,silent:M.SILENT},z=M.INFO,O={[M.DEBUG]:"log",[M.VERBOSE]:"log",[M.INFO]:"info",[M.WARN]:"warn",[M.ERROR]:"error"},W=(G,H,...te)=>{if(H{__webpack_require__.d(__webpack_exports__,{FT:()=>StoreDevtoolsModule});var _angular_core__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4650),_ngrx_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2997),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(515),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(9751),rxjs__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(9646),rxjs__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(6451),rxjs__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(233),rxjs__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(4707),rxjs_operators__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(3099),rxjs_operators__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(9300),rxjs_operators__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4004),rxjs_operators__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(4351),rxjs_operators__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(7414),rxjs_operators__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(8372),rxjs_operators__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(262),rxjs_operators__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(5698),rxjs_operators__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(2722),rxjs_operators__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(3900),rxjs_operators__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(5684),rxjs_operators__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(5363),rxjs_operators__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(1365),rxjs_operators__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(5026);const PERFORM_ACTION="PERFORM_ACTION",REFRESH="REFRESH",RESET="RESET",ROLLBACK="ROLLBACK",COMMIT="COMMIT",SWEEP="SWEEP",TOGGLE_ACTION="TOGGLE_ACTION",SET_ACTIONS_ACTIVE="SET_ACTIONS_ACTIVE",JUMP_TO_STATE="JUMP_TO_STATE",JUMP_TO_ACTION="JUMP_TO_ACTION",IMPORT_STATE="IMPORT_STATE",LOCK_CHANGES="LOCK_CHANGES",PAUSE_RECORDING="PAUSE_RECORDING";class PerformAction{constructor(k,E){if(this.action=k,this.timestamp=E,this.type=PERFORM_ACTION,typeof k.type>"u")throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?')}}class Refresh{constructor(){this.type=REFRESH}}class Reset{constructor(k){this.timestamp=k,this.type=RESET}}class Rollback{constructor(k){this.timestamp=k,this.type=ROLLBACK}}class Commit{constructor(k){this.timestamp=k,this.type=COMMIT}}class Sweep{constructor(){this.type=SWEEP}}class ToggleAction{constructor(k){this.id=k,this.type=TOGGLE_ACTION}}class SetActionsActive{constructor(k,E,m=!0){this.start=k,this.end=E,this.active=m,this.type=SET_ACTIONS_ACTIVE}}class JumpToState{constructor(k){this.index=k,this.type=JUMP_TO_STATE}}class JumpToAction{constructor(k){this.actionId=k,this.type=JUMP_TO_ACTION}}class ImportState{constructor(k){this.nextLiftedState=k,this.type=IMPORT_STATE}}class LockChanges{constructor(k){this.status=k,this.type=LOCK_CHANGES}}class PauseRecording{constructor(k){this.status=k,this.type=PAUSE_RECORDING}}class StoreDevtoolsConfig{constructor(){this.maxAge=!1}}const STORE_DEVTOOLS_CONFIG=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.OlP("@ngrx/store-devtools Options"),INITIAL_OPTIONS=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.OlP("@ngrx/store-devtools Initial Config");function noMonitor(){return null}const DEFAULT_NAME="NgRx Store DevTools";function createConfig(le){const k={maxAge:!1,monitor:noMonitor,actionSanitizer:void 0,stateSanitizer:void 0,name:DEFAULT_NAME,serialize:!1,logOnly:!1,autoPause:!1,features:{pause:!0,lock:!0,persist:!0,export:!0,import:"custom",jump:!0,skip:!0,reorder:!0,dispatch:!0,test:!0}},E="function"==typeof le?le():le,F=Object.assign({},k,{features:E.features||!!E.logOnly&&{pause:!0,export:!0,test:!0}||k.features},E);if(F.maxAge&&F.maxAge<2)throw new Error(`Devtools 'maxAge' cannot be less than 2, got ${F.maxAge}`);return F}function difference(le,k){return le.filter(E=>k.indexOf(E)<0)}function unliftState(le){const{computedStates:k,currentStateIndex:E}=le;if(E>=k.length){const{state:M}=k[k.length-1];return M}const{state:m}=k[E];return m}function unliftAction(le){return le.actionsById[le.nextActionId-1]}function liftAction(le){return new PerformAction(le,+Date.now())}function sanitizeActions(le,k){return Object.keys(k).reduce((E,m)=>{const M=Number(m);return E[M]=sanitizeAction(le,k[M],M),E},{})}function sanitizeAction(le,k,E){return{...k,action:le(k.action,E)}}function sanitizeStates(le,k){return k.map((E,m)=>({state:sanitizeState(le,E.state,m),error:E.error}))}function sanitizeState(le,k,E){return le(k,E)}function shouldFilterActions(le){return le.predicate||le.actionsSafelist||le.actionsBlocklist}function filterLiftedState(le,k,E,m){const M=[],F={},z=[];return le.stagedActionIds.forEach((O,W)=>{const ee=le.actionsById[O];!ee||W&&isActionFiltered(le.computedStates[W],ee,k,E,m)||(F[O]=ee,M.push(O),z.push(le.computedStates[W]))}),{...le,stagedActionIds:M,actionsById:F,computedStates:z}}function isActionFiltered(le,k,E,m,M){const F=E&&!E(le,k.action),z=m&&!k.action.type.match(m.map(W=>escapeRegExp(W)).join("|")),O=M&&k.action.type.match(M.map(W=>escapeRegExp(W)).join("|"));return F||z||O}function escapeRegExp(le){return le.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}let DevtoolsDispatcher=(()=>{class le extends _ngrx_store__WEBPACK_IMPORTED_MODULE_1__.UO{}return le.\u0275fac=function(){let k;return function(m){return(k||(k=_angular_core__WEBPACK_IMPORTED_MODULE_0__.n5z(le)))(m||le)}}(),le.\u0275prov=_angular_core__WEBPACK_IMPORTED_MODULE_0__.Yz7({token:le,factory:le.\u0275fac}),le})();const ExtensionActionTypes={START:"START",DISPATCH:"DISPATCH",STOP:"STOP",ACTION:"ACTION"},REDUX_DEVTOOLS_EXTENSION=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.OlP("@ngrx/store-devtools Redux Devtools Extension");let DevtoolsExtension=(()=>{class DevtoolsExtension{constructor(le,k,E){this.config=k,this.dispatcher=E,this.devtoolsExtension=le,this.createActionStreams()}notify(le,k){if(this.devtoolsExtension)if(le.type===PERFORM_ACTION){if(k.isLocked||k.isPaused)return;const E=unliftState(k);if(shouldFilterActions(this.config)&&isActionFiltered(E,le,this.config.predicate,this.config.actionsSafelist,this.config.actionsBlocklist))return;const m=this.config.stateSanitizer?sanitizeState(this.config.stateSanitizer,E,k.currentStateIndex):E,M=this.config.actionSanitizer?sanitizeAction(this.config.actionSanitizer,le,k.nextActionId):le;this.sendToReduxDevtools(()=>this.extensionConnection.send(M,m))}else{const E={...k,stagedActionIds:k.stagedActionIds,actionsById:this.config.actionSanitizer?sanitizeActions(this.config.actionSanitizer,k.actionsById):k.actionsById,computedStates:this.config.stateSanitizer?sanitizeStates(this.config.stateSanitizer,k.computedStates):k.computedStates};this.sendToReduxDevtools(()=>this.devtoolsExtension.send(null,E,this.getExtensionConfig(this.config)))}}createChangesObservable(){return this.devtoolsExtension?new rxjs__WEBPACK_IMPORTED_MODULE_3__.y(le=>{const k=this.devtoolsExtension.connect(this.getExtensionConfig(this.config));return this.extensionConnection=k,k.init(),k.subscribe(E=>le.next(E)),k.unsubscribe}):rxjs__WEBPACK_IMPORTED_MODULE_2__.E}createActionStreams(){const le=this.createChangesObservable().pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.B)()),k=le.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_5__.h)(O=>O.type===ExtensionActionTypes.START)),E=le.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_5__.h)(O=>O.type===ExtensionActionTypes.STOP)),m=le.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_5__.h)(O=>O.type===ExtensionActionTypes.DISPATCH),(0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.U)(O=>this.unwrapAction(O.payload)),(0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.b)(O=>O.type===IMPORT_STATE?this.dispatcher.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_5__.h)(W=>W.type===_ngrx_store__WEBPACK_IMPORTED_MODULE_1__.wb),(0,rxjs_operators__WEBPACK_IMPORTED_MODULE_8__.V)(1e3),(0,rxjs_operators__WEBPACK_IMPORTED_MODULE_9__.b)(1e3),(0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.U)(()=>O),(0,rxjs_operators__WEBPACK_IMPORTED_MODULE_10__.K)(()=>(0,rxjs__WEBPACK_IMPORTED_MODULE_11__.of)(O)),(0,rxjs_operators__WEBPACK_IMPORTED_MODULE_12__.q)(1)):(0,rxjs__WEBPACK_IMPORTED_MODULE_11__.of)(O))),F=le.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_5__.h)(O=>O.type===ExtensionActionTypes.ACTION),(0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.U)(O=>this.unwrapAction(O.payload))).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_13__.R)(E)),z=m.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_13__.R)(E));this.start$=k.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_13__.R)(E)),this.actions$=this.start$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_14__.w)(()=>F)),this.liftedActions$=this.start$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_14__.w)(()=>z))}unwrapAction(action){return"string"==typeof action?eval(`(${action})`):action}getExtensionConfig(le){const k={name:le.name,features:le.features,serialize:le.serialize,autoPause:le.autoPause??!1};return!1!==le.maxAge&&(k.maxAge=le.maxAge),k}sendToReduxDevtools(le){try{le()}catch(k){console.warn("@ngrx/store-devtools: something went wrong inside the redux devtools",k)}}}return DevtoolsExtension.\u0275fac=function le(k){return new(k||DevtoolsExtension)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(REDUX_DEVTOOLS_EXTENSION),_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(STORE_DEVTOOLS_CONFIG),_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(DevtoolsDispatcher))},DevtoolsExtension.\u0275prov=_angular_core__WEBPACK_IMPORTED_MODULE_0__.Yz7({token:DevtoolsExtension,factory:DevtoolsExtension.\u0275fac}),DevtoolsExtension})();const INIT_ACTION={type:_ngrx_store__WEBPACK_IMPORTED_MODULE_1__.qg},RECOMPUTE="@ngrx/store-devtools/recompute",RECOMPUTE_ACTION={type:RECOMPUTE};function computeNextEntry(le,k,E,m,M){if(m)return{state:E,error:"Interrupted by an error up the chain"};let z,F=E;try{F=le(E,k)}catch(O){z=O.toString(),M.handleError(O)}return{state:F,error:z}}function recomputeStates(le,k,E,m,M,F,z,O,W){if(k>=le.length&&le.length===F.length)return le;const ee=le.slice(0,k),Q=F.length-(W?1:0);for(let K=k;K-1?te:computeNextEntry(E,H,ye,ve,O);ee.push(Ue)}return W&&ee.push(le[le.length-1]),ee}function liftInitialState(le,k){return{monitorState:k(void 0,{}),nextActionId:1,actionsById:{0:liftAction(INIT_ACTION)},stagedActionIds:[0],skippedActionIds:[],committedState:le,currentStateIndex:0,computedStates:[],isLocked:!1,isPaused:!1}}function liftReducerWith(le,k,E,m,M={}){return F=>(z,O)=>{let{monitorState:W,actionsById:ee,nextActionId:Q,stagedActionIds:K,skippedActionIds:G,committedState:H,currentStateIndex:te,computedStates:ye,isLocked:ve,isPaused:me}=z||k;function Ue(We){let ot=We,Pe=K.slice(1,ot+1);for(let Se=0;Se-1===Pe.indexOf(Se)),K=[0,...K.slice(ot+1)],H=ye[ot].state,ye=ye.slice(ot),te=te>ot?te-ot:0}function we(){ee={0:liftAction(INIT_ACTION)},Q=1,K=[0],G=[],H=ye[te].state,te=0,ye=[]}z||(ee=Object.create(ee));let Ee=0;switch(O.type){case LOCK_CHANGES:ve=O.status,Ee=1/0;break;case PAUSE_RECORDING:me=O.status,me?(K=[...K,Q],ee[Q]=new PerformAction({type:"@ngrx/devtools/pause"},+Date.now()),Q++,Ee=K.length-1,ye=ye.concat(ye[ye.length-1]),te===K.length-2&&te++,Ee=1/0):we();break;case RESET:ee={0:liftAction(INIT_ACTION)},Q=1,K=[0],G=[],H=le,te=0,ye=[];break;case COMMIT:we();break;case ROLLBACK:ee={0:liftAction(INIT_ACTION)},Q=1,K=[0],G=[],te=0,ye=[];break;case TOGGLE_ACTION:{const{id:We}=O;G=-1===G.indexOf(We)?[We,...G]:G.filter(Pe=>Pe!==We),Ee=K.indexOf(We);break}case SET_ACTIONS_ACTIVE:{const{start:We,end:ot,active:Pe}=O,Se=[];for(let Le=We;LeM.maxAge&&(ye=recomputeStates(ye,Ee,F,H,ee,K,G,E,me),Ue(K.length-M.maxAge),Ee=1/0);break;case _ngrx_store__WEBPACK_IMPORTED_MODULE_1__.wb:if(ye.filter(ot=>ot.error).length>0)Ee=0,M.maxAge&&K.length>M.maxAge&&(ye=recomputeStates(ye,Ee,F,H,ee,K,G,E,me),Ue(K.length-M.maxAge),Ee=1/0);else{if(!me&&!ve){te===K.length-1&&te++;const ot=Q++;ee[ot]=new PerformAction(O,+Date.now()),K=[...K,ot],Ee=K.length-1,ye=recomputeStates(ye,Ee,F,H,ee,K,G,E,me)}ye=ye.map(ot=>({...ot,state:F(ot.state,RECOMPUTE_ACTION)})),te=K.length-1,M.maxAge&&K.length>M.maxAge&&Ue(K.length-M.maxAge),Ee=1/0}break;default:Ee=1/0}return ye=recomputeStates(ye,Ee,F,H,ee,K,G,E,me),W=m(W,O),{monitorState:W,actionsById:ee,nextActionId:Q,stagedActionIds:K,skippedActionIds:G,committedState:H,currentStateIndex:te,computedStates:ye,isLocked:ve,isPaused:me}}}let StoreDevtools=(()=>{class le{constructor(E,m,M,F,z,O,W,ee){const Q=liftInitialState(W,ee.monitor),K=liftReducerWith(W,Q,O,ee.monitor,ee),G=(0,rxjs__WEBPACK_IMPORTED_MODULE_15__.T)((0,rxjs__WEBPACK_IMPORTED_MODULE_15__.T)(m.asObservable().pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_16__.T)(1)),F.actions$).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.U)(liftAction)),E,F.liftedActions$).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_17__.Q)(rxjs__WEBPACK_IMPORTED_MODULE_18__.N)),H=M.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.U)(K)),te=new rxjs__WEBPACK_IMPORTED_MODULE_19__.t(1),ye=G.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_20__.M)(H),(0,rxjs_operators__WEBPACK_IMPORTED_MODULE_21__.R)(({state:we},[Ee,We])=>{let ot=We(we,Ee);return Ee.type!==PERFORM_ACTION&&shouldFilterActions(ee)&&(ot=filterLiftedState(ot,ee.predicate,ee.actionsSafelist,ee.actionsBlocklist)),F.notify(Ee,ot),{state:ot,action:Ee}},{state:Q,action:null})).subscribe(({state:we,action:Ee})=>{te.next(we),Ee.type===PERFORM_ACTION&&z.next(Ee.action)}),ve=F.start$.subscribe(()=>{this.refresh()}),me=te.asObservable(),Ue=me.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.U)(unliftState));this.extensionStartSubscription=ve,this.stateSubscription=ye,this.dispatcher=E,this.liftedState=me,this.state=Ue}dispatch(E){this.dispatcher.next(E)}next(E){this.dispatcher.next(E)}error(E){}complete(){}performAction(E){this.dispatch(new PerformAction(E,+Date.now()))}refresh(){this.dispatch(new Refresh)}reset(){this.dispatch(new Reset(+Date.now()))}rollback(){this.dispatch(new Rollback(+Date.now()))}commit(){this.dispatch(new Commit(+Date.now()))}sweep(){this.dispatch(new Sweep)}toggleAction(E){this.dispatch(new ToggleAction(E))}jumpToAction(E){this.dispatch(new JumpToAction(E))}jumpToState(E){this.dispatch(new JumpToState(E))}importState(E){this.dispatch(new ImportState(E))}lockChanges(E){this.dispatch(new LockChanges(E))}pauseRecording(E){this.dispatch(new PauseRecording(E))}}return le.\u0275fac=function(E){return new(E||le)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(DevtoolsDispatcher),_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(_ngrx_store__WEBPACK_IMPORTED_MODULE_1__.UO),_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(_ngrx_store__WEBPACK_IMPORTED_MODULE_1__.n$),_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(DevtoolsExtension),_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(_ngrx_store__WEBPACK_IMPORTED_MODULE_1__.Y$),_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(_angular_core__WEBPACK_IMPORTED_MODULE_0__.qLn),_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(_ngrx_store__WEBPACK_IMPORTED_MODULE_1__.Y6),_angular_core__WEBPACK_IMPORTED_MODULE_0__.LFG(STORE_DEVTOOLS_CONFIG))},le.\u0275prov=_angular_core__WEBPACK_IMPORTED_MODULE_0__.Yz7({token:le,factory:le.\u0275fac}),le})();const IS_EXTENSION_OR_MONITOR_PRESENT=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.OlP("@ngrx/store-devtools Is Devtools Extension or Monitor Present");function createIsExtensionOrMonitorPresent(le,k){return Boolean(le)||k.monitor!==noMonitor}function createReduxDevtoolsExtension(){const le="__REDUX_DEVTOOLS_EXTENSION__";return"object"==typeof window&&typeof window[le]<"u"?window[le]:null}function provideStoreDevtools(le={}){return{\u0275providers:[DevtoolsExtension,DevtoolsDispatcher,StoreDevtools,{provide:INITIAL_OPTIONS,useValue:le},{provide:IS_EXTENSION_OR_MONITOR_PRESENT,deps:[REDUX_DEVTOOLS_EXTENSION,STORE_DEVTOOLS_CONFIG],useFactory:createIsExtensionOrMonitorPresent},{provide:REDUX_DEVTOOLS_EXTENSION,useFactory:createReduxDevtoolsExtension},{provide:STORE_DEVTOOLS_CONFIG,deps:[INITIAL_OPTIONS],useFactory:createConfig},{provide:_ngrx_store__WEBPACK_IMPORTED_MODULE_1__.FR,deps:[StoreDevtools],useFactory:createStateObservable},{provide:_ngrx_store__WEBPACK_IMPORTED_MODULE_1__.mK,useExisting:DevtoolsDispatcher}]}}function createStateObservable(le){return le.state}let StoreDevtoolsModule=(()=>{class le{static instrument(E={}){return{ngModule:le,providers:[...provideStoreDevtools(E).\u0275providers]}}}return le.\u0275fac=function(E){return new(E||le)},le.\u0275mod=_angular_core__WEBPACK_IMPORTED_MODULE_0__.oAB({type:le}),le.\u0275inj=_angular_core__WEBPACK_IMPORTED_MODULE_0__.cJS({}),le})()},2997:(le,k,E)=>{E.d(k,{UO:()=>pe,qg:()=>Ke,Y6:()=>Ze,mK:()=>Yr,n$:()=>dr,Y$:()=>vt,FR:()=>tn,yh:()=>bt,CK:()=>gs,Aw:()=>No,cr:()=>Er,wb:()=>Un,qC:()=>Pn,PH:()=>Ee,ZF:()=>be,Lq:()=>oe,P1:()=>ue,on:()=>Ps,Ky:()=>We});var m=E(4650),M=E(1135),F=E(9751),z=E(7579),O=E(233),W=E(5363),ee=E(1365),Q=E(5026),K=E(4004),H=E(4671),te=E(4482),ye=E(5403);function me(N,$){return N===$}const Ue={};function Ee(N,$){if(Ue[N]=(Ue[N]||0)+1,"function"==typeof $)return Pe(N,(...he)=>({...$(...he),type:N}));switch($?$._as:"empty"){case"empty":return Pe(N,()=>({type:N}));case"props":return Pe(N,he=>({...he,type:N}));default:throw new Error("Unexpected config.")}}function We(){return{_as:"props",_p:void 0}}function Pe(N,$){return Object.defineProperty($,"type",{value:N,writable:!1})}const Ke="@ngrx/store/init";let pe=(()=>{class N extends M.X{constructor(){super({type:Ke})}next(q){if("function"==typeof q)throw new TypeError("\n Dispatch expected an object, instead it received a function.\n If you're using the createAction function, make sure to invoke the function\n before dispatching the action. For example, someAction should be someAction().");if(typeof q>"u")throw new TypeError("Actions must be objects");if(typeof q.type>"u")throw new TypeError("Actions must have a type property");super.next(q)}complete(){}ngOnDestroy(){super.complete()}}return N.\u0275fac=function(q){return new(q||N)},N.\u0275prov=m.Yz7({token:N,factory:N.\u0275fac}),N})();const ne=[pe],Ae=new m.OlP("@ngrx/store Internal Root Guard"),_e=new m.OlP("@ngrx/store Internal Initial State"),Ze=new m.OlP("@ngrx/store Initial State"),Xe=new m.OlP("@ngrx/store Reducer Factory"),wt=new m.OlP("@ngrx/store Internal Reducer Factory Provider"),rn=new m.OlP("@ngrx/store Initial Reducers"),Ft=new m.OlP("@ngrx/store Internal Initial Reducers"),at=new m.OlP("@ngrx/store Store Features"),dn=new m.OlP("@ngrx/store Internal Store Reducers"),Sn=new m.OlP("@ngrx/store Internal Feature Reducers"),qt=new m.OlP("@ngrx/store Internal Feature Configs"),Qt=new m.OlP("@ngrx/store Internal Store Features"),Ct=new m.OlP("@ngrx/store Internal Feature Reducers Token"),sn=new m.OlP("@ngrx/store Feature Reducers"),Br=new m.OlP("@ngrx/store User Provided Meta Reducers"),yr=new m.OlP("@ngrx/store Meta Reducers"),hn=new m.OlP("@ngrx/store Internal Resolved Meta Reducers"),pn=new m.OlP("@ngrx/store User Runtime Checks Config"),rr=new m.OlP("@ngrx/store Internal User Runtime Checks Config"),xr=new m.OlP("@ngrx/store Internal Runtime Checks"),ir=new m.OlP("@ngrx/store Check if Action types are unique");function gn(N,$={}){const q=Object.keys(N),he={};for(let $e=0;$e$e(Re),q($))}}function Ii(N,$){return Array.isArray($)&&$.length>0&&(N=Pn.apply(null,[...$,N])),(q,he)=>{const Re=N(q);return($e,gt)=>Re($e=void 0===$e?he:$e,gt)}}new m.OlP("@ngrx/store Root Store Provider"),new m.OlP("@ngrx/store Feature State Provider");class dr extends F.y{}class Yr extends pe{}const Un="@ngrx/store/update-reducers";let En=(()=>{class N extends M.X{constructor(q,he,Re,$e){super($e(Re,he)),this.dispatcher=q,this.initialState=he,this.reducers=Re,this.reducerFactory=$e}get currentReducers(){return this.reducers}addFeature(q){this.addFeatures([q])}addFeatures(q){const he=q.reduce((Re,{reducers:$e,reducerFactory:gt,metaReducers:Bt,initialState:Mt,key:yn})=>{const un="function"==typeof $e?function qn(N){const $=Array.isArray(N)&&N.length>0?Pn(...N):q=>q;return(q,he)=>(q=$(q),(Re,$e)=>q(Re=void 0===Re?he:Re,$e))}(Bt)($e,Mt):Ii(gt,Bt)($e,Mt);return Re[yn]=un,Re},{});this.addReducers(he)}removeFeature(q){this.removeFeatures([q])}removeFeatures(q){this.removeReducers(q.map(he=>he.key))}addReducer(q,he){this.addReducers({[q]:he})}addReducers(q){this.reducers={...this.reducers,...q},this.updateReducers(Object.keys(q))}removeReducer(q){this.removeReducers([q])}removeReducers(q){q.forEach(he=>{this.reducers=function rt(N,$){return Object.keys(N).filter(q=>q!==$).reduce((q,he)=>Object.assign(q,{[he]:N[he]}),{})}(this.reducers,he)}),this.updateReducers(q)}updateReducers(q){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:Un,features:q})}ngOnDestroy(){this.complete()}}return N.\u0275fac=function(q){return new(q||N)(m.LFG(Yr),m.LFG(Ze),m.LFG(rn),m.LFG(Xe))},N.\u0275prov=m.Yz7({token:N,factory:N.\u0275fac}),N})();const wn=[En,{provide:dr,useExisting:En},{provide:Yr,useExisting:pe}];let vt=(()=>{class N extends z.x{ngOnDestroy(){this.complete()}}return N.\u0275fac=function(){let $;return function(he){return($||($=m.n5z(N)))(he||N)}}(),N.\u0275prov=m.Yz7({token:N,factory:N.\u0275fac}),N})();const St=[vt];class tn extends F.y{}let Jn=(()=>{class N extends M.X{constructor(q,he,Re,$e){super($e);const yn=q.pipe((0,W.Q)(O.N)).pipe((0,ee.M)(he)).pipe((0,Q.R)(mt,{state:$e}));this.stateSubscription=yn.subscribe(({state:un,action:nr})=>{this.next(un),Re.next(nr)})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}}return N.INIT=Ke,N.\u0275fac=function(q){return new(q||N)(m.LFG(pe),m.LFG(dr),m.LFG(vt),m.LFG(Ze))},N.\u0275prov=m.Yz7({token:N,factory:N.\u0275fac}),N})();function mt(N={state:void 0},[$,q]){const{state:he}=N;return{state:q(he,$),action:$}}const er=[Jn,{provide:tn,useExisting:Jn}];let bt=(()=>{class N extends F.y{constructor(q,he,Re){super(),this.actionsObserver=he,this.reducerManager=Re,this.source=q}select(q,...he){return In.call(null,q,...he)(this)}lift(q){const he=new N(this,this.actionsObserver,this.reducerManager);return he.operator=q,he}dispatch(q){this.actionsObserver.next(q)}next(q){this.actionsObserver.next(q)}error(q){this.actionsObserver.error(q)}complete(){this.actionsObserver.complete()}addReducer(q,he){this.reducerManager.addReducer(q,he)}removeReducer(q){this.reducerManager.removeReducer(q)}}return N.\u0275fac=function(q){return new(q||N)(m.LFG(tn),m.LFG(pe),m.LFG(En))},N.\u0275prov=m.Yz7({token:N,factory:N.\u0275fac}),N})();const sr=[bt];function In(N,$,...q){return function(Re){let $e;if("string"==typeof N){const gt=[$,...q].filter(Boolean);$e=Re.pipe(function G(...N){const $=N.length;if(0===$)throw new Error("list of properties cannot be empty.");return(0,K.U)(q=>{let he=q;for(let Re=0;Re<$;Re++){const $e=he?.[N[Re]];if(!(typeof $e<"u"))return;he=$e}return he})}(N,...gt))}else{if("function"!=typeof N)throw new TypeError(`Unexpected type '${typeof N}' in select operator, expected 'string' or 'function'`);$e=Re.pipe((0,K.U)(gt=>N(gt,$)))}return $e.pipe(function ve(N,$=H.y){return N=N??me,(0,te.e)((q,he)=>{let Re,$e=!0;q.subscribe((0,ye.x)(he,gt=>{const Bt=$(gt);($e||!N(Re,Bt))&&($e=!1,Re=Bt,he.next(gt))}))})}())}}const Rr="https://ngrx.io/guide/store/configuration/runtime-checks";function Xt(N){return void 0===N}function bn(N){return null===N}function Gn(N){return Array.isArray(N)}function Nt(N){return"object"==typeof N&&null!==N}function de(N){return"function"==typeof N}function Dt(N,$){return N===$}function Jt(N,$,q){for(let he=0;heun.release&&"function"==typeof un.release),Bt=N(function(...un){return $e.apply(null,un)}),Mt=nn(function(un,nr){return $.stateFn.apply(null,[un,Re,nr,Bt])});return Object.assign(Mt.memoized,{release:function yn(){Mt.reset(),Bt.reset(),gt.forEach(un=>un.release())},projector:Bt.memoized,setResult:Mt.setResult,clearResult:Mt.clearResult})}}(nn)(...N)}function X(N,$,q,he){if(void 0===q){const $e=$.map(gt=>gt(N));return he.memoized.apply(null,$e)}const Re=$.map($e=>$e(N,q));return he.memoized.apply(null,[...Re,q])}function be(N){return ue($=>{const q=$[N];return(0,m.X6Q)()&&!(N in $)&&console.warn(`@ngrx/store: The feature name "${N}" does not exist in the state, therefore createFeatureSelector cannot access it. Be sure it is imported in a loaded module using StoreModule.forRoot('${N}', ...) or StoreModule.forFeature('${N}', ...). If the default state is intended to be undefined, as is the case with router state, this development-only warning message can be ignored.`),q},$=>$)}function Zt(N,$){return $ instanceof m.OlP?N.get($):$}function or(N,$,q){return q.map((he,Re)=>{if($[Re]instanceof m.OlP){const $e=N.get($[Re]);return{key:he.key,reducerFactory:$e.reducerFactory?$e.reducerFactory:gn,metaReducers:$e.metaReducers?$e.metaReducers:[],initialState:$e.initialState}}return he})}function ui(N,$){return $.map(he=>he instanceof m.OlP?N.get(he):he)}function Pt(N){return"function"==typeof N?N():N}function Zr(N,$){return N.concat($)}function Qr(N){if(N)throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function Nn(N){Object.freeze(N);const $=de(N);return Object.getOwnPropertyNames(N).forEach(q=>{if(!q.startsWith("\u0275")&&function ge(N,$){return Object.prototype.hasOwnProperty.call(N,$)}(N,q)&&(!$||"caller"!==q&&"callee"!==q&&"arguments"!==q)){const he=N[q];(Nt(he)||de(he))&&!Object.isFrozen(he)&&Nn(he)}}),N}function wr(N,$=[]){return(Xt(N)||bn(N))&&0===$.length?{path:["root"],value:N}:Object.keys(N).reduce((he,Re)=>{if(he)return he;const $e=N[Re];return function se(N){return de(N)&&N.hasOwnProperty("\u0275cmp")}($e)?he:!(Xt($e)||bn($e)||function yt(N){return"number"==typeof N}($e)||function He(N){return"boolean"==typeof N}($e)||function lt(N){return"string"==typeof N}($e)||Gn($e))&&(function Vt(N){if(!function kt(N){return Nt(N)&&!Gn(N)}(N))return!1;const $=Object.getPrototypeOf(N);return $===Object.prototype||null===$}($e)?wr($e,[...$,Re]):{path:[...$,Re],value:$e})},!1)}function Vr(N,$){if(!1===N)return;const q=N.path.join("."),he=new Error(`Detected unserializable ${$} at "${q}". ${Rr}#strict${$}serializability`);throw he.value=N.value,he.unserializablePath=q,he}function tr(N){return(0,m.X6Q)()?{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!0,strictActionImmutability:!0,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1,...N}:{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function Qs({strictActionSerializability:N,strictStateSerializability:$}){return q=>N||$?function Yn(N,$){return function(q,he){$.action(he)&&Vr(wr(he),"action");const Re=N(q,he);return $.state()&&Vr(wr(Re),"state"),Re}}(q,{action:he=>N&&!ci(he),state:()=>$}):q}function Dn({strictActionImmutability:N,strictStateImmutability:$}){return q=>N||$?function ps(N,$){return function(q,he){const Re=$.action(he)?Nn(he):he,$e=N(q,Re);return $.state()?Nn($e):$e}}(q,{action:he=>N&&!ci(he),state:()=>$}):q}function ci(N){return N.type.startsWith("@ngrx")}function rs({strictActionWithinNgZone:N}){return $=>N?function Or(N,$){return function(q,he){if($.action(he)&&!m.R0b.isInAngularZone())throw new Error(`Action '${he.type}' running outside NgZone. ${Rr}#strictactionwithinngzone`);return N(q,he)}}($,{action:q=>N&&!ci(q)}):$}function Di(N){return[{provide:rr,useValue:N},{provide:pn,useFactory:qi,deps:[rr]},{provide:xr,deps:[pn],useFactory:tr},{provide:yr,multi:!0,deps:[xr],useFactory:Dn},{provide:yr,multi:!0,deps:[xr],useFactory:Qs},{provide:yr,multi:!0,deps:[xr],useFactory:rs}]}function li(){return[{provide:ir,multi:!0,deps:[xr],useFactory:wi}]}function qi(N){return N}function wi(N){if(!N.strictActionTypeUniqueness)return;const $=Object.entries(Ue).filter(([,q])=>q>1).map(([q])=>q);if($.length)throw new Error(`Action types are registered more than once, ${$.map(q=>`"${q}"`).join(", ")}. ${Rr}#strictactiontypeuniqueness`)}function $n(N,$){return[{provide:Ae,useFactory:Qr,deps:[[bt,new m.FiY,new m.tp0]]},{provide:_e,useValue:$.initialState},{provide:Ze,useFactory:Pt,deps:[_e]},{provide:Ft,useValue:N},{provide:dn,useExisting:N instanceof m.OlP?N:Ft},{provide:rn,deps:[m.zs3,Ft,[new m.tBr(dn)]],useFactory:Zt},{provide:Br,useValue:$.metaReducers?$.metaReducers:[]},{provide:hn,deps:[yr,Br],useFactory:Zr},{provide:wt,useValue:$.reducerFactory?$.reducerFactory:gn},{provide:Xe,deps:[wt,hn],useFactory:Ii},ne,wn,St,er,sr,Di($.runtimeChecks),li()]}function Zi(N,$,q={}){return[{provide:qt,multi:!0,useValue:N instanceof Object?{}:q},{provide:at,multi:!0,useValue:{key:N instanceof Object?N.name:N,reducerFactory:q instanceof m.OlP||!q.reducerFactory?gn:q.reducerFactory,metaReducers:q instanceof m.OlP||!q.metaReducers?[]:q.metaReducers,initialState:q instanceof m.OlP||!q.initialState?void 0:q.initialState}},{provide:Qt,deps:[m.zs3,qt,at],useFactory:or},{provide:Sn,multi:!0,useValue:N instanceof Object?N.reducer:$},{provide:Ct,multi:!0,useExisting:$ instanceof m.OlP?$:Sn},{provide:sn,multi:!0,deps:[m.zs3,Sn,[new m.tBr(Ct)]],useFactory:ui},li()]}let Er=(()=>{class N{constructor(q,he,Re,$e,gt,Bt){}}return N.\u0275fac=function(q){return new(q||N)(m.LFG(pe),m.LFG(dr),m.LFG(vt),m.LFG(bt),m.LFG(Ae,8),m.LFG(ir,8))},N.\u0275mod=m.oAB({type:N}),N.\u0275inj=m.cJS({}),N})(),gs=(()=>{class N{constructor(q,he,Re,$e,gt){this.features=q,this.featureReducers=he,this.reducerManager=Re;const Bt=q.map((Mt,yn)=>{const nr=he.shift()[yn];return{...Mt,reducers:nr,initialState:Pt(Mt.initialState)}});Re.addFeatures(Bt)}ngOnDestroy(){this.reducerManager.removeFeatures(this.features)}}return N.\u0275fac=function(q){return new(q||N)(m.LFG(Qt),m.LFG(sn),m.LFG(En),m.LFG(Er),m.LFG(ir,8))},N.\u0275mod=m.oAB({type:N}),N.\u0275inj=m.cJS({}),N})(),No=(()=>{class N{static forRoot(q,he={}){return{ngModule:Er,providers:[...$n(q,he)]}}static forFeature(q,he,Re={}){return{ngModule:gs,providers:[...Zi(q,he,Re)]}}}return N.\u0275fac=function(q){return new(q||N)},N.\u0275mod=m.oAB({type:N}),N.\u0275inj=m.cJS({}),N})();function Ps(...N){return{reducer:N.pop(),types:N.map(he=>he.type)}}function oe(N,...$){const q=new Map;for(const he of $)for(const Re of he.types){const $e=q.get(Re);q.set(Re,$e?(Bt,Mt)=>he.reducer($e(Bt,Mt),Mt):he.reducer)}return function(he=N,Re){const $e=q.get(Re.type);return $e?$e(he,Re):he}}},8766:(le,k,E)=>{E.d(k,{Lj:()=>Pe,X3:()=>ot});var m=E(5861);let F,z;const ee=new WeakMap,Q=new WeakMap,K=new WeakMap,G=new WeakMap,H=new WeakMap;let ve={get(Be,Ke,pe){if(Be instanceof IDBTransaction){if("done"===Ke)return Q.get(Be);if("objectStoreNames"===Ke)return Be.objectStoreNames||K.get(Be);if("store"===Ke)return pe.objectStoreNames[1]?void 0:pe.objectStore(pe.objectStoreNames[0])}return Ee(Be[Ke])},set:(Be,Ke,pe)=>(Be[Ke]=pe,!0),has:(Be,Ke)=>Be instanceof IDBTransaction&&("done"===Ke||"store"===Ke)||Ke in Be};function we(Be){return"function"==typeof Be?function Ue(Be){return Be!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function W(){return z||(z=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(Be)?function(...Ke){return Be.apply(We(this),Ke),Ee(ee.get(this))}:function(...Ke){return Ee(Be.apply(We(this),Ke))}:function(Ke,...pe){const ne=Be.call(We(this),Ke,...pe);return K.set(ne,Ke.sort?Ke.sort():[Ke]),Ee(ne)}}(Be):(Be instanceof IDBTransaction&&function ye(Be){if(Q.has(Be))return;const Ke=new Promise((pe,ne)=>{const Ae=()=>{Be.removeEventListener("complete",_e),Be.removeEventListener("error",Ze),Be.removeEventListener("abort",Ze)},_e=()=>{pe(),Ae()},Ze=()=>{ne(Be.error||new DOMException("AbortError","AbortError")),Ae()};Be.addEventListener("complete",_e),Be.addEventListener("error",Ze),Be.addEventListener("abort",Ze)});Q.set(Be,Ke)}(Be),((Be,Ke)=>Ke.some(pe=>Be instanceof pe))(Be,function O(){return F||(F=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(Be,ve):Be)}function Ee(Be){if(Be instanceof IDBRequest)return function te(Be){const Ke=new Promise((pe,ne)=>{const Ae=()=>{Be.removeEventListener("success",_e),Be.removeEventListener("error",Ze)},_e=()=>{pe(Ee(Be.result)),Ae()},Ze=()=>{ne(Be.error),Ae()};Be.addEventListener("success",_e),Be.addEventListener("error",Ze)});return Ke.then(pe=>{pe instanceof IDBCursor&&ee.set(pe,Be)}).catch(()=>{}),H.set(Ke,Be),Ke}(Be);if(G.has(Be))return G.get(Be);const Ke=we(Be);return Ke!==Be&&(G.set(Be,Ke),H.set(Ke,Be)),Ke}const We=Be=>H.get(Be);function ot(Be,Ke,{blocked:pe,upgrade:ne,blocking:Ae,terminated:_e}={}){const Ze=indexedDB.open(Be,Ke),Xe=Ee(Ze);return ne&&Ze.addEventListener("upgradeneeded",wt=>{ne(Ee(Ze.result),wt.oldVersion,wt.newVersion,Ee(Ze.transaction))}),pe&&Ze.addEventListener("blocked",()=>pe()),Xe.then(wt=>{_e&&wt.addEventListener("close",()=>_e()),Ae&&wt.addEventListener("versionchange",()=>Ae())}).catch(()=>{}),Xe}function Pe(Be,{blocked:Ke}={}){const pe=indexedDB.deleteDatabase(Be);return Ke&&pe.addEventListener("blocked",()=>Ke()),Ee(pe).then(()=>{})}const Se=["get","getKey","getAll","getAllKeys","count"],Le=["put","add","delete","clear"],nt=new Map;function _t(Be,Ke){if(!(Be instanceof IDBDatabase)||Ke in Be||"string"!=typeof Ke)return;if(nt.get(Ke))return nt.get(Ke);const pe=Ke.replace(/FromIndex$/,""),ne=Ke!==pe,Ae=Le.includes(pe);if(!(pe in(ne?IDBIndex:IDBObjectStore).prototype)||!Ae&&!Se.includes(pe))return;const _e=function(){var Ze=(0,m.Z)(function*(Xe,...wt){const rn=this.transaction(Xe,Ae?"readwrite":"readonly");let Ft=rn.store;return ne&&(Ft=Ft.index(wt.shift())),(yield Promise.all([Ft[pe](...wt),Ae&&rn.done]))[0]});return function(wt){return Ze.apply(this,arguments)}}();return nt.set(Ke,_e),_e}!function me(Be){ve=Be(ve)}(Be=>({...Be,get:(Ke,pe,ne)=>_t(Ke,pe)||Be.get(Ke,pe,ne),has:(Ke,pe)=>!!_t(Ke,pe)||Be.has(Ke,pe)}))},5861:(le,k,E)=>{function m(F,z,O,W,ee,Q,K){try{var G=F[Q](K),H=G.value}catch(te){return void O(te)}G.done?z(H):Promise.resolve(H).then(W,ee)}function M(F){return function(){var z=this,O=arguments;return new Promise(function(W,ee){var Q=F.apply(z,O);function K(H){m(Q,W,ee,K,G,"next",H)}function G(H){m(Q,W,ee,K,G,"throw",H)}K(void 0)})}}E.d(k,{Z:()=>M})}},le=>{le(le.s=8811)}]); \ No newline at end of file diff --git a/docs/manifest.webmanifest b/docs/manifest.webmanifest deleted file mode 100644 index d1b311a..0000000 --- a/docs/manifest.webmanifest +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "Sudoku", - "short_name": "Sudoku", - "theme_color": "#ffffff", - "background_color": "#ffffff", - "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/docs/ngsw-worker.js b/docs/ngsw-worker.js deleted file mode 100755 index c508b88..0000000 --- a/docs/ngsw-worker.js +++ /dev/null @@ -1,1852 +0,0 @@ -(() => { - 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.newRequestWithMetadata(req.url, req)); - 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.newRequestWithMetadata(res.url, req), 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.newRequestWithMetadata(this.cacheBust(req.url), req); - 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; - } - newRequestWithMetadata(url, options) { - return this.adapter.newRequest(url, { headers: options.headers }); - } - 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.method !== "GET" || 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.2.6"; - 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; - } - case "sendRequest": { - await this.scope.fetch(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/docs/ngsw.json b/docs/ngsw.json deleted file mode 100644 index 2772a29..0000000 --- a/docs/ngsw.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "configVersion": 1, - "timestamp": 1688999508436, - "index": "/index.html", - "assetGroups": [ - { - "name": "app", - "installMode": "prefetch", - "updateMode": "prefetch", - "cacheQueryOptions": { - "ignoreVary": true - }, - "urls": [ - "/544.5d44ef17098c1bed.js", - "/651.7755222ad1202dfc.js", - "/common.8ee7c8c18016ff28.js", - "/favicon.ico", - "/index.html", - "/main.e3281126c17c84c6.js", - "/manifest.webmanifest", - "/polyfills.a1e44b390d8b54b7.js", - "/runtime.58e6537a8b497331.js", - "/styles.9c3710189f348294.css" - ], - "patterns": [] - }, - { - "name": "assets", - "installMode": "lazy", - "updateMode": "prefetch", - "cacheQueryOptions": { - "ignoreVary": true - }, - "urls": [ - "/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-48x48.png", - "/assets/icons/icon-512x512.png", - "/assets/icons/icon-72x72.png", - "/assets/icons/icon-96x96.png", - "/assets/style/contrasts.scss", - "/assets/style/index.scss", - "/assets/style/style.scss" - ], - "patterns": [] - } - ], - "dataGroups": [], - "hashTable": { - "/544.5d44ef17098c1bed.js": "af7e7abe3e75a7c49f6761516580268e53fb4689", - "/651.7755222ad1202dfc.js": "dbc484d23216d68ee37a5a198f29c1d00be90769", - "/assets/icons/icon-128x128.png": "f308eac9c070d8ae38b5d41bb3c87fd214ec1dca", - "/assets/icons/icon-144x144.png": "0950e2150f248f1aa409bd770a6a9a3a2b1a1a6a", - "/assets/icons/icon-152x152.png": "9aad1fdd253f671d3baad98898137f59040c2e29", - "/assets/icons/icon-192x192.png": "1915ccfe2399b0d5677371d3fbd5107cb69d123b", - "/assets/icons/icon-384x384.png": "f88b3695e418a7b45c50abeaf6f169a2165579f0", - "/assets/icons/icon-48x48.png": "806365e63a5f92b469c2a5380aebc8a2e5399606", - "/assets/icons/icon-512x512.png": "93c52c2fc8fc5e004357ecf0076440028341423b", - "/assets/icons/icon-72x72.png": "ad2b6c7361152b6ddaa242c538df6d613c1ce272", - "/assets/icons/icon-96x96.png": "a672c0db567234d78520e228990abbd61b208c85", - "/assets/style/contrasts.scss": "acdc2cacd4af795cae83db8a0cfbc389327cd20d", - "/assets/style/index.scss": "8a104b684abc807e32c009ea1627d47cbe12f584", - "/assets/style/style.scss": "21c263c7875a412c00cdb105d627d2a055980736", - "/common.8ee7c8c18016ff28.js": "97bd988d148eeb73f2c5ca78da28be7450310925", - "/favicon.ico": "22f6a4a3bcaafafb0254e0f2fa4ceb89e505e8b2", - "/index.html": "a9a74f680e20c3e1ca63d545ce4eafe741f0e681", - "/main.e3281126c17c84c6.js": "9115801d5805d070b923751b060cdcd32b90b2c3", - "/manifest.webmanifest": "431970c3643388ffe543c79b38df9bfbca81ab4d", - "/polyfills.a1e44b390d8b54b7.js": "3d2500554578594e2e2f5dc4581a13b7f2609a5f", - "/runtime.58e6537a8b497331.js": "708ee30fc3bf0f3cbd0e3f47a3589c4c74130adb", - "/styles.9c3710189f348294.css": "7902db8f13f5ab8549b328ff101c4dfebd94ab01" - }, - "navigationUrls": [ - { - "positive": true, - "regex": "^\\/.*$" - }, - { - "positive": false, - "regex": "^\\/(?:.+\\/)?[^/]*\\.[^/]*$" - }, - { - "positive": false, - "regex": "^\\/(?:.+\\/)?[^/]*__[^/]*$" - }, - { - "positive": false, - "regex": "^\\/(?:.+\\/)?[^/]*__[^/]*\\/.*$" - } - ], - "navigationRequestStrategy": "performance" -} \ No newline at end of file diff --git a/docs/polyfills.a1e44b390d8b54b7.js b/docs/polyfills.a1e44b390d8b54b7.js deleted file mode 100644 index 010ac1c..0000000 --- a/docs/polyfills.a1e44b390d8b54b7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksudoku_app=self.webpackChunksudoku_app||[]).push([[429],{7435:(ie,Ee,de)=>{de(8583)},8583:()=>{!function(e){const n=e.performance;function i(M){n&&n.mark&&n.mark(M)}function o(M,E){n&&n.measure&&n.measure(M,E)}i("Zone");const c=e.__Zone_symbol_prefix||"__zone_symbol__";function a(M){return c+M}const y=!0===e[a("forceDuplicateZoneCheck")];if(e.Zone){if(y||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}let d=(()=>{class M{constructor(t,r){this._parent=t,this._name=r?r.name||"unnamed":"",this._properties=r&&r.properties||{},this._zoneDelegate=new v(this,this._parent&&this._parent._zoneDelegate,r)}static assertZonePatched(){if(e.Promise!==oe.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=M.current;for(;t.parent;)t=t.parent;return t}static get current(){return U.zone}static get currentTask(){return re}static __load_patch(t,r,k=!1){if(oe.hasOwnProperty(t)){if(!k&&y)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const C="Zone:"+t;i(C),oe[t]=r(e,M,z),o(C,C)}}get parent(){return this._parent}get name(){return this._name}get(t){const r=this.getZoneWith(t);if(r)return r._properties[t]}getZoneWith(t){let r=this;for(;r;){if(r._properties.hasOwnProperty(t))return r;r=r._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,r){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const k=this._zoneDelegate.intercept(this,t,r),C=this;return function(){return C.runGuarded(k,this,arguments,r)}}run(t,r,k,C){U={parent:U,zone:this};try{return this._zoneDelegate.invoke(this,t,r,k,C)}finally{U=U.parent}}runGuarded(t,r=null,k,C){U={parent:U,zone:this};try{try{return this._zoneDelegate.invoke(this,t,r,k,C)}catch($){if(this._zoneDelegate.handleError(this,$))throw $}}finally{U=U.parent}}runTask(t,r,k){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||K).name+"; Execution: "+this.name+")");if(t.state===x&&(t.type===Q||t.type===w))return;const C=t.state!=p;C&&t._transitionTo(p,j),t.runCount++;const $=re;re=t,U={parent:U,zone:this};try{t.type==w&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,r,k)}catch(l){if(this._zoneDelegate.handleError(this,l))throw l}}finally{t.state!==x&&t.state!==h&&(t.type==Q||t.data&&t.data.isPeriodic?C&&t._transitionTo(j,p):(t.runCount=0,this._updateTaskCount(t,-1),C&&t._transitionTo(x,p,x))),U=U.parent,re=$}}scheduleTask(t){if(t.zone&&t.zone!==this){let k=this;for(;k;){if(k===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);k=k.parent}}t._transitionTo(X,x);const r=[];t._zoneDelegates=r,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(k){throw t._transitionTo(h,X,x),this._zoneDelegate.handleError(this,k),k}return t._zoneDelegates===r&&this._updateTaskCount(t,1),t.state==X&&t._transitionTo(j,X),t}scheduleMicroTask(t,r,k,C){return this.scheduleTask(new m(I,t,r,k,C,void 0))}scheduleMacroTask(t,r,k,C,$){return this.scheduleTask(new m(w,t,r,k,C,$))}scheduleEventTask(t,r,k,C,$){return this.scheduleTask(new m(Q,t,r,k,C,$))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||K).name+"; Execution: "+this.name+")");t._transitionTo(G,j,p);try{this._zoneDelegate.cancelTask(this,t)}catch(r){throw t._transitionTo(h,G),this._zoneDelegate.handleError(this,r),r}return this._updateTaskCount(t,-1),t._transitionTo(x,G),t.runCount=0,t}_updateTaskCount(t,r){const k=t._zoneDelegates;-1==r&&(t._zoneDelegates=null);for(let C=0;CM.hasTask(t,r),onScheduleTask:(M,E,t,r)=>M.scheduleTask(t,r),onInvokeTask:(M,E,t,r,k,C)=>M.invokeTask(t,r,k,C),onCancelTask:(M,E,t,r)=>M.cancelTask(t,r)};class v{constructor(E,t,r){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=E,this._parentDelegate=t,this._forkZS=r&&(r&&r.onFork?r:t._forkZS),this._forkDlgt=r&&(r.onFork?t:t._forkDlgt),this._forkCurrZone=r&&(r.onFork?this.zone:t._forkCurrZone),this._interceptZS=r&&(r.onIntercept?r:t._interceptZS),this._interceptDlgt=r&&(r.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=r&&(r.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=r&&(r.onInvoke?r:t._invokeZS),this._invokeDlgt=r&&(r.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=r&&(r.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=r&&(r.onHandleError?r:t._handleErrorZS),this._handleErrorDlgt=r&&(r.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=r&&(r.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=r&&(r.onScheduleTask?r:t._scheduleTaskZS),this._scheduleTaskDlgt=r&&(r.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=r&&(r.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=r&&(r.onInvokeTask?r:t._invokeTaskZS),this._invokeTaskDlgt=r&&(r.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=r&&(r.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=r&&(r.onCancelTask?r:t._cancelTaskZS),this._cancelTaskDlgt=r&&(r.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=r&&(r.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const k=r&&r.onHasTask;(k||t&&t._hasTaskZS)&&(this._hasTaskZS=k?r:P,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=E,r.onScheduleTask||(this._scheduleTaskZS=P,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),r.onInvokeTask||(this._invokeTaskZS=P,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),r.onCancelTask||(this._cancelTaskZS=P,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(E,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,E,t):new d(E,t)}intercept(E,t,r){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,E,t,r):t}invoke(E,t,r,k,C){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,E,t,r,k,C):t.apply(r,k)}handleError(E,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,E,t)}scheduleTask(E,t){let r=t;if(this._scheduleTaskZS)this._hasTaskZS&&r._zoneDelegates.push(this._hasTaskDlgtOwner),r=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,E,t),r||(r=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=I)throw new Error("Task is missing scheduleFn.");R(t)}return r}invokeTask(E,t,r,k){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,E,t,r,k):t.callback.apply(r,k)}cancelTask(E,t){let r;if(this._cancelTaskZS)r=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,E,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");r=t.cancelFn(t)}return r}hasTask(E,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,E,t)}catch(r){this.handleError(E,r)}}_updateTaskCount(E,t){const r=this._taskCounts,k=r[E],C=r[E]=k+t;if(C<0)throw new Error("More tasks executed then were scheduled.");0!=k&&0!=C||this.hasTask(this.zone,{microTask:r.microTask>0,macroTask:r.macroTask>0,eventTask:r.eventTask>0,change:E})}}class m{constructor(E,t,r,k,C,$){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=E,this.source=t,this.data=k,this.scheduleFn=C,this.cancelFn=$,!r)throw new Error("callback is not defined");this.callback=r;const l=this;this.invoke=E===Q&&k&&k.useG?m.invokeTask:function(){return m.invokeTask.call(e,l,this,arguments)}}static invokeTask(E,t,r){E||(E=this),ee++;try{return E.runCount++,E.zone.runTask(E,t,r)}finally{1==ee&&_(),ee--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(x,X)}_transitionTo(E,t,r){if(this._state!==t&&this._state!==r)throw new Error(`${this.type} '${this.source}': can not transition to '${E}', expecting state '${t}'${r?" or '"+r+"'":""}, was '${this._state}'.`);this._state=E,E==x&&(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 L=a("setTimeout"),Z=a("Promise"),N=a("then");let J,B=[],H=!1;function q(M){if(J||e[Z]&&(J=e[Z].resolve(0)),J){let E=J[N];E||(E=J.then),E.call(J,M)}else e[L](M,0)}function R(M){0===ee&&0===B.length&&q(_),M&&B.push(M)}function _(){if(!H){for(H=!0;B.length;){const M=B;B=[];for(let E=0;EU,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:R,showUncaughtError:()=>!d[a("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:q};let U={parent:null,zone:new d(null,null)},re=null,ee=0;function W(){}o("Zone","Zone"),e.Zone=d}(typeof window<"u"&&window||typeof self<"u"&&self||global);const ie=Object.getOwnPropertyDescriptor,Ee=Object.defineProperty,de=Object.getPrototypeOf,ge=Object.create,Ve=Array.prototype.slice,Oe="addEventListener",Se="removeEventListener",Ze=Zone.__symbol__(Oe),Ne=Zone.__symbol__(Se),ce="true",ae="false",ke=Zone.__symbol__("");function Ie(e,n){return Zone.current.wrap(e,n)}function Me(e,n,i,o,c){return Zone.current.scheduleMacroTask(e,n,i,o,c)}const A=Zone.__symbol__,Pe=typeof window<"u",Te=Pe?window:void 0,Y=Pe&&Te||"object"==typeof self&&self||global;function Le(e,n){for(let i=e.length-1;i>=0;i--)"function"==typeof e[i]&&(e[i]=Ie(e[i],n+"_"+i));return e}function Fe(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const Be=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,we=!("nw"in Y)&&typeof Y.process<"u"&&"[object process]"==={}.toString.call(Y.process),je=!we&&!Be&&!(!Pe||!Te.HTMLElement),Ue=typeof Y.process<"u"&&"[object process]"==={}.toString.call(Y.process)&&!Be&&!(!Pe||!Te.HTMLElement),Re={},We=function(e){if(!(e=e||Y.event))return;let n=Re[e.type];n||(n=Re[e.type]=A("ON_PROPERTY"+e.type));const i=this||e.target||Y,o=i[n];let c;if(je&&i===Te&&"error"===e.type){const a=e;c=o&&o.call(this,a.message,a.filename,a.lineno,a.colno,a.error),!0===c&&e.preventDefault()}else c=o&&o.apply(this,arguments),null!=c&&!c&&e.preventDefault();return c};function qe(e,n,i){let o=ie(e,n);if(!o&&i&&ie(i,n)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const c=A("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete o.writable,delete o.value;const a=o.get,y=o.set,d=n.slice(2);let P=Re[d];P||(P=Re[d]=A("ON_PROPERTY"+d)),o.set=function(v){let m=this;!m&&e===Y&&(m=Y),m&&("function"==typeof m[P]&&m.removeEventListener(d,We),y&&y.call(m,null),m[P]=v,"function"==typeof v&&m.addEventListener(d,We,!1))},o.get=function(){let v=this;if(!v&&e===Y&&(v=Y),!v)return null;const m=v[P];if(m)return m;if(a){let L=a.call(this);if(L)return o.set.call(this,L),"function"==typeof v.removeAttribute&&v.removeAttribute(n),L}return null},Ee(e,n,o),e[c]=!0}function Xe(e,n,i){if(n)for(let o=0;ofunction(y,d){const P=i(y,d);return P.cbIdx>=0&&"function"==typeof d[P.cbIdx]?Me(P.name,d[P.cbIdx],P,c):a.apply(y,d)})}function ue(e,n){e[A("OriginalDelegate")]=n}let ze=!1,Ae=!1;function ft(){if(ze)return Ae;ze=!0;try{const e=Te.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(Ae=!0)}catch{}return Ae}Zone.__load_patch("ZoneAwarePromise",(e,n,i)=>{const o=Object.getOwnPropertyDescriptor,c=Object.defineProperty,y=i.symbol,d=[],P=!0===e[y("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],v=y("Promise"),m=y("then");i.onUnhandledError=l=>{if(i.showUncaughtError()){const u=l&&l.rejection;u?console.error("Unhandled Promise rejection:",u instanceof Error?u.message:u,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",u,u instanceof Error?u.stack:void 0):console.error(l)}},i.microtaskDrainDone=()=>{for(;d.length;){const l=d.shift();try{l.zone.runGuarded(()=>{throw l.throwOriginal?l.rejection:l})}catch(u){N(u)}}};const Z=y("unhandledPromiseRejectionHandler");function N(l){i.onUnhandledError(l);try{const u=n[Z];"function"==typeof u&&u.call(this,l)}catch{}}function B(l){return l&&l.then}function H(l){return l}function J(l){return t.reject(l)}const q=y("state"),R=y("value"),_=y("finally"),K=y("parentPromiseValue"),x=y("parentPromiseState"),j=null,p=!0,G=!1;function I(l,u){return s=>{try{z(l,u,s)}catch(f){z(l,!1,f)}}}const w=function(){let l=!1;return function(s){return function(){l||(l=!0,s.apply(null,arguments))}}},oe=y("currentTaskTrace");function z(l,u,s){const f=w();if(l===s)throw new TypeError("Promise resolved with itself");if(l[q]===j){let g=null;try{("object"==typeof s||"function"==typeof s)&&(g=s&&s.then)}catch(b){return f(()=>{z(l,!1,b)})(),l}if(u!==G&&s instanceof t&&s.hasOwnProperty(q)&&s.hasOwnProperty(R)&&s[q]!==j)re(s),z(l,s[q],s[R]);else if(u!==G&&"function"==typeof g)try{g.call(s,f(I(l,u)),f(I(l,!1)))}catch(b){f(()=>{z(l,!1,b)})()}else{l[q]=u;const b=l[R];if(l[R]=s,l[_]===_&&u===p&&(l[q]=l[x],l[R]=l[K]),u===G&&s instanceof Error){const T=n.currentTask&&n.currentTask.data&&n.currentTask.data.__creationTrace__;T&&c(s,oe,{configurable:!0,enumerable:!1,writable:!0,value:T})}for(let T=0;T{try{const D=l[R],O=!!s&&_===s[_];O&&(s[K]=D,s[x]=b);const S=u.run(T,void 0,O&&T!==J&&T!==H?[]:[D]);z(s,!0,S)}catch(D){z(s,!1,D)}},s)}const M=function(){},E=e.AggregateError;class t{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(u){return z(new this(null),p,u)}static reject(u){return z(new this(null),G,u)}static any(u){if(!u||"function"!=typeof u[Symbol.iterator])return Promise.reject(new E([],"All promises were rejected"));const s=[];let f=0;try{for(let T of u)f++,s.push(t.resolve(T))}catch{return Promise.reject(new E([],"All promises were rejected"))}if(0===f)return Promise.reject(new E([],"All promises were rejected"));let g=!1;const b=[];return new t((T,D)=>{for(let O=0;O{g||(g=!0,T(S))},S=>{b.push(S),f--,0===f&&(g=!0,D(new E(b,"All promises were rejected")))})})}static race(u){let s,f,g=new this((D,O)=>{s=D,f=O});function b(D){s(D)}function T(D){f(D)}for(let D of u)B(D)||(D=this.resolve(D)),D.then(b,T);return g}static all(u){return t.allWithCallback(u)}static allSettled(u){return(this&&this.prototype instanceof t?this:t).allWithCallback(u,{thenCallback:f=>({status:"fulfilled",value:f}),errorCallback:f=>({status:"rejected",reason:f})})}static allWithCallback(u,s){let f,g,b=new this((S,V)=>{f=S,g=V}),T=2,D=0;const O=[];for(let S of u){B(S)||(S=this.resolve(S));const V=D;try{S.then(F=>{O[V]=s?s.thenCallback(F):F,T--,0===T&&f(O)},F=>{s?(O[V]=s.errorCallback(F),T--,0===T&&f(O)):g(F)})}catch(F){g(F)}T++,D++}return T-=2,0===T&&f(O),b}constructor(u){const s=this;if(!(s instanceof t))throw new Error("Must be an instanceof Promise.");s[q]=j,s[R]=[];try{const f=w();u&&u(f(I(s,p)),f(I(s,G)))}catch(f){z(s,!1,f)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return t}then(u,s){var f;let g=null===(f=this.constructor)||void 0===f?void 0:f[Symbol.species];(!g||"function"!=typeof g)&&(g=this.constructor||t);const b=new g(M),T=n.current;return this[q]==j?this[R].push(T,b,u,s):ee(this,T,b,u,s),b}catch(u){return this.then(null,u)}finally(u){var s;let f=null===(s=this.constructor)||void 0===s?void 0:s[Symbol.species];(!f||"function"!=typeof f)&&(f=t);const g=new f(M);g[_]=_;const b=n.current;return this[q]==j?this[R].push(b,g,u,u):ee(this,b,g,u,u),g}}t.resolve=t.resolve,t.reject=t.reject,t.race=t.race,t.all=t.all;const r=e[v]=e.Promise;e.Promise=t;const k=y("thenPatched");function C(l){const u=l.prototype,s=o(u,"then");if(s&&(!1===s.writable||!s.configurable))return;const f=u.then;u[m]=f,l.prototype.then=function(g,b){return new t((D,O)=>{f.call(this,D,O)}).then(g,b)},l[k]=!0}return i.patchThen=C,r&&(C(r),le(e,"fetch",l=>function $(l){return function(u,s){let f=l.apply(u,s);if(f instanceof t)return f;let g=f.constructor;return g[k]||C(g),f}}(l))),Promise[n.__symbol__("uncaughtPromiseErrors")]=d,t}),Zone.__load_patch("toString",e=>{const n=Function.prototype.toString,i=A("OriginalDelegate"),o=A("Promise"),c=A("Error"),a=function(){if("function"==typeof this){const v=this[i];if(v)return"function"==typeof v?n.call(v):Object.prototype.toString.call(v);if(this===Promise){const m=e[o];if(m)return n.call(m)}if(this===Error){const m=e[c];if(m)return n.call(m)}}return n.call(this)};a[i]=n,Function.prototype.toString=a;const y=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":y.call(this)}});let ye=!1;if(typeof window<"u")try{const e=Object.defineProperty({},"passive",{get:function(){ye=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{ye=!1}const ht={useG:!0},te={},Ye={},$e=new RegExp("^"+ke+"(\\w+)(true|false)$"),Ke=A("propagationStopped");function Je(e,n){const i=(n?n(e):e)+ae,o=(n?n(e):e)+ce,c=ke+i,a=ke+o;te[e]={},te[e][ae]=c,te[e][ce]=a}function dt(e,n,i,o){const c=o&&o.add||Oe,a=o&&o.rm||Se,y=o&&o.listeners||"eventListeners",d=o&&o.rmAll||"removeAllListeners",P=A(c),v="."+c+":",Z=function(R,_,K){if(R.isRemoved)return;const x=R.callback;let X;"object"==typeof x&&x.handleEvent&&(R.callback=p=>x.handleEvent(p),R.originalDelegate=x);try{R.invoke(R,_,[K])}catch(p){X=p}const j=R.options;return j&&"object"==typeof j&&j.once&&_[a].call(_,K.type,R.originalDelegate?R.originalDelegate:R.callback,j),X};function N(R,_,K){if(!(_=_||e.event))return;const x=R||_.target||e,X=x[te[_.type][K?ce:ae]];if(X){const j=[];if(1===X.length){const p=Z(X[0],x,_);p&&j.push(p)}else{const p=X.slice();for(let G=0;G{throw G})}}}const B=function(R){return N(this,R,!1)},H=function(R){return N(this,R,!0)};function J(R,_){if(!R)return!1;let K=!0;_&&void 0!==_.useG&&(K=_.useG);const x=_&&_.vh;let X=!0;_&&void 0!==_.chkDup&&(X=_.chkDup);let j=!1;_&&void 0!==_.rt&&(j=_.rt);let p=R;for(;p&&!p.hasOwnProperty(c);)p=de(p);if(!p&&R[c]&&(p=R),!p||p[P])return!1;const G=_&&_.eventNameToString,h={},I=p[P]=p[c],w=p[A(a)]=p[a],Q=p[A(y)]=p[y],oe=p[A(d)]=p[d];let z;function U(s,f){return!ye&&"object"==typeof s&&s?!!s.capture:ye&&f?"boolean"==typeof s?{capture:s,passive:!0}:s?"object"==typeof s&&!1!==s.passive?Object.assign(Object.assign({},s),{passive:!0}):s:{passive:!0}:s}_&&_.prepend&&(z=p[A(_.prepend)]=p[_.prepend]);const t=K?function(s){if(!h.isExisting)return I.call(h.target,h.eventName,h.capture?H:B,h.options)}:function(s){return I.call(h.target,h.eventName,s.invoke,h.options)},r=K?function(s){if(!s.isRemoved){const f=te[s.eventName];let g;f&&(g=f[s.capture?ce:ae]);const b=g&&s.target[g];if(b)for(let T=0;Tfunction(c,a){c[Ke]=!0,o&&o.apply(c,a)})}function Et(e,n,i,o,c){const a=Zone.__symbol__(o);if(n[a])return;const y=n[a]=n[o];n[o]=function(d,P,v){return P&&P.prototype&&c.forEach(function(m){const L=`${i}.${o}::`+m,Z=P.prototype;try{if(Z.hasOwnProperty(m)){const N=e.ObjectGetOwnPropertyDescriptor(Z,m);N&&N.value?(N.value=e.wrapWithCurrentZone(N.value,L),e._redefineProperty(P.prototype,m,N)):Z[m]&&(Z[m]=e.wrapWithCurrentZone(Z[m],L))}else Z[m]&&(Z[m]=e.wrapWithCurrentZone(Z[m],L))}catch{}}),y.call(n,d,P,v)},e.attachOriginToPatched(n[o],y)}function et(e,n,i){if(!i||0===i.length)return n;const o=i.filter(a=>a.target===e);if(!o||0===o.length)return n;const c=o[0].ignoreProperties;return n.filter(a=>-1===c.indexOf(a))}function tt(e,n,i,o){e&&Xe(e,et(e,n,i),o)}function He(e){return Object.getOwnPropertyNames(e).filter(n=>n.startsWith("on")&&n.length>2).map(n=>n.substring(2))}Zone.__load_patch("util",(e,n,i)=>{const o=He(e);i.patchOnProperties=Xe,i.patchMethod=le,i.bindArguments=Le,i.patchMacroTask=lt;const c=n.__symbol__("BLACK_LISTED_EVENTS"),a=n.__symbol__("UNPATCHED_EVENTS");e[a]&&(e[c]=e[a]),e[c]&&(n[c]=n[a]=e[c]),i.patchEventPrototype=_t,i.patchEventTarget=dt,i.isIEOrEdge=ft,i.ObjectDefineProperty=Ee,i.ObjectGetOwnPropertyDescriptor=ie,i.ObjectCreate=ge,i.ArraySlice=Ve,i.patchClass=ve,i.wrapWithCurrentZone=Ie,i.filterProperties=et,i.attachOriginToPatched=ue,i._redefineProperty=Object.defineProperty,i.patchCallbacks=Et,i.getGlobalObjects=()=>({globalSources:Ye,zoneSymbolEventNames:te,eventNames:o,isBrowser:je,isMix:Ue,isNode:we,TRUE_STR:ce,FALSE_STR:ae,ZONE_SYMBOL_PREFIX:ke,ADD_EVENT_LISTENER_STR:Oe,REMOVE_EVENT_LISTENER_STR:Se})});const Ce=A("zoneTask");function pe(e,n,i,o){let c=null,a=null;i+=o;const y={};function d(v){const m=v.data;return m.args[0]=function(){return v.invoke.apply(this,arguments)},m.handleId=c.apply(e,m.args),v}function P(v){return a.call(e,v.data.handleId)}c=le(e,n+=o,v=>function(m,L){if("function"==typeof L[0]){const Z={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?L[1]||0:void 0,args:L},N=L[0];L[0]=function(){try{return N.apply(this,arguments)}finally{Z.isPeriodic||("number"==typeof Z.handleId?delete y[Z.handleId]:Z.handleId&&(Z.handleId[Ce]=null))}};const B=Me(n,L[0],Z,d,P);if(!B)return B;const H=B.data.handleId;return"number"==typeof H?y[H]=B:H&&(H[Ce]=B),H&&H.ref&&H.unref&&"function"==typeof H.ref&&"function"==typeof H.unref&&(B.ref=H.ref.bind(H),B.unref=H.unref.bind(H)),"number"==typeof H||H?H:B}return v.apply(e,L)}),a=le(e,i,v=>function(m,L){const Z=L[0];let N;"number"==typeof Z?N=y[Z]:(N=Z&&Z[Ce],N||(N=Z)),N&&"string"==typeof N.type?"notScheduled"!==N.state&&(N.cancelFn&&N.data.isPeriodic||0===N.runCount)&&("number"==typeof Z?delete y[Z]:Z&&(Z[Ce]=null),N.zone.cancelTask(N)):v.apply(e,L)})}Zone.__load_patch("legacy",e=>{const n=e[Zone.__symbol__("legacyPatch")];n&&n()}),Zone.__load_patch("queueMicrotask",(e,n,i)=>{i.patchMethod(e,"queueMicrotask",o=>function(c,a){n.current.scheduleMicroTask("queueMicrotask",a[0])})}),Zone.__load_patch("timers",e=>{const n="set",i="clear";pe(e,n,i,"Timeout"),pe(e,n,i,"Interval"),pe(e,n,i,"Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{pe(e,"request","cancel","AnimationFrame"),pe(e,"mozRequest","mozCancel","AnimationFrame"),pe(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,n)=>{const i=["alert","prompt","confirm"];for(let o=0;ofunction(P,v){return n.current.run(a,e,v,d)})}),Zone.__load_patch("EventTarget",(e,n,i)=>{(function mt(e,n){n.patchEventPrototype(e,n)})(e,i),function pt(e,n){if(Zone[n.symbol("patchEventTarget")])return;const{eventNames:i,zoneSymbolEventNames:o,TRUE_STR:c,FALSE_STR:a,ZONE_SYMBOL_PREFIX:y}=n.getGlobalObjects();for(let P=0;P{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 Tt(e,n){if(we&&!Ue||Zone[e.symbol("patchEvents")])return;const i=n.__Zone_ignore_on_properties;let o=[];if(je){const c=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const a=function ut(){try{const e=Te.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:c,ignoreProperties:["error"]}]:[];tt(c,He(c),i&&i.concat(a),de(c))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let c=0;c{!function yt(e,n){const{isBrowser:i,isMix:o}=n.getGlobalObjects();(i||o)&&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 P(v){const m=v.XMLHttpRequest;if(!m)return;const L=m.prototype;let N=L[Ze],B=L[Ne];if(!N){const h=v.XMLHttpRequestEventTarget;if(h){const I=h.prototype;N=I[Ze],B=I[Ne]}}const H="readystatechange",J="scheduled";function q(h){const I=h.data,w=I.target;w[a]=!1,w[d]=!1;const Q=w[c];N||(N=w[Ze],B=w[Ne]),Q&&B.call(w,H,Q);const oe=w[c]=()=>{if(w.readyState===w.DONE)if(!I.aborted&&w[a]&&h.state===J){const U=w[n.__symbol__("loadfalse")];if(0!==w.status&&U&&U.length>0){const re=h.invoke;h.invoke=function(){const ee=w[n.__symbol__("loadfalse")];for(let W=0;Wfunction(h,I){return h[o]=0==I[2],h[y]=I[1],K.apply(h,I)}),X=A("fetchTaskAborting"),j=A("fetchTaskScheduling"),p=le(L,"send",()=>function(h,I){if(!0===n.current[j]||h[o])return p.apply(h,I);{const w={target:h,url:h[y],isPeriodic:!1,args:I,aborted:!1},Q=Me("XMLHttpRequest.send",R,w,q,_);h&&!0===h[d]&&!w.aborted&&Q.state===J&&Q.invoke()}}),G=le(L,"abort",()=>function(h,I){const w=function Z(h){return h[i]}(h);if(w&&"string"==typeof w.type){if(null==w.cancelFn||w.data&&w.data.aborted)return;w.zone.cancelTask(w)}else if(!0===n.current[X])return G.apply(h,I)})}(e);const i=A("xhrTask"),o=A("xhrSync"),c=A("xhrListener"),a=A("xhrScheduled"),y=A("xhrURL"),d=A("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&function at(e,n){const i=e.constructor.name;for(let o=0;o{const P=function(){return d.apply(this,Le(arguments,i+"."+c))};return ue(P,d),P})(a)}}}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,n)=>{function i(o){return function(c){Qe(e,o).forEach(y=>{const d=e.PromiseRejectionEvent;if(d){const P=new d(o,{promise:c.promise,reason:c.rejection});y.invoke(P)}})}}e.PromiseRejectionEvent&&(n[A("unhandledPromiseRejectionHandler")]=i("unhandledrejection"),n[A("rejectionHandledHandler")]=i("rejectionhandled"))})}},ie=>{ie(ie.s=7435)}]); \ No newline at end of file diff --git a/docs/runtime.58e6537a8b497331.js b/docs/runtime.58e6537a8b497331.js deleted file mode 100644 index 64d18d0..0000000 --- a/docs/runtime.58e6537a8b497331.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,v={},m={};function r(e){var n=m[e];if(void 0!==n)return n.exports;var t=m[e]={exports:{}};return v[e](t,t.exports,r),t.exports}r.m=v,e=[],r.O=(n,t,i,u)=>{if(!t){var a=1/0;for(o=0;o=u)&&Object.keys(r.O).every(b=>r.O[b](t[f]))?t.splice(f--,1):(s=!1,u0&&e[o-1][2]>u;o--)e[o]=e[o-1];e[o]=[t,i,u]},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)+"."+{544:"5d44ef17098c1bed",592:"8ee7c8c18016ff28",651:"7755222ad1202dfc"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="sudoku-app:";r.l=(t,i,u,o)=>{if(e[t])e[t].push(i);else{var a,s;if(void 0!==u)for(var f=document.getElementsByTagName("script"),l=0;l{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),s&&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,u)=>{var o=r.o(e,i)?e[i]:void 0;if(0!==o)if(o)u.push(o[2]);else if(666!=i){var a=new Promise((d,c)=>o=e[i]=[d,c]);u.push(o[2]=a);var s=r.p+r.u(i),f=new Error;r.l(s,d=>{if(r.o(e,i)&&(0!==(o=e[i])&&(e[i]=void 0),o)){var c=d&&("load"===d.type?"missing":d.type),p=d&&d.target&&d.target.src;f.message="Loading chunk "+i+" failed.\n("+c+": "+p+")",f.name="ChunkLoadError",f.type=c,f.request=p,o[1](f)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var n=(i,u)=>{var f,l,[o,a,s]=u,d=0;if(o.some(p=>0!==e[p])){for(f in a)r.o(a,f)&&(r.m[f]=a[f]);if(s)var c=s(r)}for(i&&i(u);d { - 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.newRequestWithMetadata(req.url, req)); - 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.newRequestWithMetadata(res.url, req), 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.newRequestWithMetadata(this.cacheBust(req.url), req); - 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; - } - newRequestWithMetadata(url, options) { - return this.adapter.newRequest(url, { headers: options.headers }); - } - 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.method !== "GET" || 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.2.6"; - 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; - } - case "sendRequest": { - await this.scope.fetch(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/docs/styles.9c3710189f348294.css b/docs/styles.9c3710189f348294.css deleted file mode 100644 index c07964c..0000000 --- a/docs/styles.9c3710189f348294.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.m-2{margin:.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-7{margin-bottom:1.75rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.flex{display:flex}.grid{display:grid}.h-12{height:3rem}.h-14{height:3.5rem}.h-6{height:1.5rem}.h-px{height:1px}.h-screen{height:100vh}.w-2\/3{width:66.666667%}.w-32{width:8rem}.w-6{width:1.5rem}.w-full{width:100%}.w-screen{width:100vw}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.select-none{-webkit-user-select:none;user-select:none}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-4{gap:1rem}.rounded-md{border-radius:.375rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br-md{border-bottom-right-radius:.375rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-tr-md{border-top-right-radius:.375rem}.border-0{border-width:0px}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.fill-blue-600{fill:#2563eb}.fill-gray-50{fill:#f9fafb}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.duration-100{transition-duration:.1s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.contr,.contr-border{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.contr:disabled,.contr-border:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}@media (prefers-color-scheme: dark){.contr,.contr-border{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.contr:disabled,.contr-border:disabled{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}}.contr-border{border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.contr-border:disabled{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}@media (prefers-color-scheme: dark){.contr-border{--tw-border-opacity: 1;border-color:rgb(63 63 70 / var(--tw-border-opacity))}.contr-border:disabled{--tw-border-opacity: 1;border-color:rgb(39 39 42 / var(--tw-border-opacity))}}.contr-blue,.contr-blue-border{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.contr-blue:disabled,.contr-blue-border:disabled{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity))}@media (prefers-color-scheme: dark){.contr-blue,.contr-blue-border{--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity))}}.contr-blue-border{border-width:1px;--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.contr-blue-border:disabled{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity))}@media (prefers-color-scheme: dark){.contr-blue-border{--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity))}}.contr-red,.contr-red-border{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.contr-red:disabled,.contr-red-border:disabled{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}@media (prefers-color-scheme: dark){.contr-red,.contr-red-border{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity))}}.contr-red-border{border-width:1px;--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.contr-red-border:disabled{--tw-border-opacity: 1;border-color:rgb(254 226 226 / var(--tw-border-opacity))}@media (prefers-color-scheme: dark){.contr-red-border{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity))}body{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}}*{touch-action:manipulation}@media (prefers-color-scheme: dark){.dark\:bg-zinc-700{--tw-bg-opacity: 1;background-color:rgb(63 63 70 / var(--tw-bg-opacity))}.dark\:bg-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity))}.dark\:bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.dark\:text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.dark\:text-zinc-400{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity))}.dark\:text-zinc-500{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity))}} diff --git a/docs/worker-basic.min.js b/docs/worker-basic.min.js deleted file mode 100755 index c508b88..0000000 --- a/docs/worker-basic.min.js +++ /dev/null @@ -1,1852 +0,0 @@ -(() => { - 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.newRequestWithMetadata(req.url, req)); - 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.newRequestWithMetadata(res.url, req), 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.newRequestWithMetadata(this.cacheBust(req.url), req); - 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; - } - newRequestWithMetadata(url, options) { - return this.adapter.newRequest(url, { headers: options.headers }); - } - 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.method !== "GET" || 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.2.6"; - 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; - } - case "sendRequest": { - await this.scope.fetch(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 - */