diff --git a/docs/3rdpartylicenses.txt b/docs/3rdpartylicenses.txt index 9e71017..0450d96 100644 --- a/docs/3rdpartylicenses.txt +++ b/docs/3rdpartylicenses.txt @@ -1,226 +1,11 @@ -@angular/animations -MIT -The MIT License - -Copyright (c) 2010-2024 Google LLC. https://angular.dev/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. - - -@angular/cdk -MIT -The MIT License - -Copyright (c) 2024 Google LLC. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +-------------------------------------------------------------------------------- +Package: file-saver +License: "MIT" -@angular/common -MIT The MIT License -Copyright (c) 2010-2024 Google LLC. https://angular.dev/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. - - -@angular/core -MIT -The MIT License - -Copyright (c) 2010-2024 Google LLC. https://angular.dev/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. - - -@angular/forms -MIT -The MIT License - -Copyright (c) 2010-2024 Google LLC. https://angular.dev/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. - - -@angular/material -MIT -The MIT License - -Copyright (c) 2024 Google LLC. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -@angular/platform-browser -MIT -The MIT License - -Copyright (c) 2010-2024 Google LLC. https://angular.dev/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. - - -@angular/router -MIT -The MIT License - -Copyright (c) 2010-2024 Google LLC. https://angular.dev/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. - - -@firebase/app -Apache-2.0 - -@firebase/component -Apache-2.0 - -@firebase/firestore -Apache-2.0 - -@firebase/logger -Apache-2.0 - -@firebase/util -Apache-2.0 - -@firebase/webchannel-wrapper -Apache-2.0 - -@kurkle/color -MIT -The MIT License (MIT) - -Copyright (c) 2018-2024 Jukka Kurkela +Copyright © 2016 [Eli Grey][1]. 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: @@ -228,9 +13,12 @@ The above copyright notice and this permission notice shall be included in all c 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. + [1]: http://eligrey.com + +-------------------------------------------------------------------------------- +Package: bad-words +License: "MIT" -bad-words -MIT The MIT License (MIT) Copyright (c) 2015 Michael Price @@ -252,9 +40,10 @@ 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. +-------------------------------------------------------------------------------- +Package: badwords-list +License: "MIT" -badwords-list -MIT The MIT License (MIT) Copyright (c) 2013 Maurice Butler @@ -276,51 +65,10 @@ 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. +-------------------------------------------------------------------------------- +Package: lodash +License: "MIT" -chart.js -MIT -The MIT License (MIT) - -Copyright (c) 2014-2024 Chart.js Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -file-saver -MIT -The MIT License - -Copyright © 2016 [Eli Grey][1]. - -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. - - [1]: http://eligrey.com - - -firebase/app - -firebase/firestore - -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. - - -lodash -MIT Copyright OpenJS Foundation and other contributors Based on Underscore.js, copyright Jeremy Ashkenas, @@ -369,12 +117,10 @@ maintained libraries used by this software which have their own licenses; we recommend you read them, as their terms may differ from the terms above. +-------------------------------------------------------------------------------- +Package: phaser +License: "MIT" -ngx-highlight-js -MIT - -phaser -MIT The MIT License (MIT) Copyright (c) 2024 Richard Davey, Phaser Studio Inc. @@ -396,9 +142,36 @@ 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. +-------------------------------------------------------------------------------- +Package: @angular/core +License: "MIT" + +The MIT License + +Copyright (c) 2010-2025 Google LLC. https://angular.dev/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. + +-------------------------------------------------------------------------------- +Package: rxjs +License: "Apache-2.0" -rxjs -Apache-2.0 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -602,9 +375,282 @@ Apache-2.0 limitations under the License. +-------------------------------------------------------------------------------- +Package: tslib +License: "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. +-------------------------------------------------------------------------------- +Package: @angular/common +License: "MIT" + +The MIT License + +Copyright (c) 2010-2025 Google LLC. https://angular.dev/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. + +-------------------------------------------------------------------------------- +Package: @angular/platform-browser +License: "MIT" + +The MIT License + +Copyright (c) 2010-2025 Google LLC. https://angular.dev/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. + +-------------------------------------------------------------------------------- +Package: @angular/router +License: "MIT" + +The MIT License + +Copyright (c) 2010-2025 Google LLC. https://angular.dev/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. + +-------------------------------------------------------------------------------- +Package: @angular/cdk +License: "MIT" + +The MIT License + +Copyright (c) 2025 Google LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------------------------------------------------------------------- +Package: @angular/material +License: "MIT" + +The MIT License + +Copyright (c) 2025 Google LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------------------------------------------------------------------- +Package: @angular/animations +License: "MIT" + +The MIT License + +Copyright (c) 2010-2025 Google LLC. https://angular.dev/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. + +-------------------------------------------------------------------------------- +Package: @angular/forms +License: "MIT" + +The MIT License + +Copyright (c) 2010-2025 Google LLC. https://angular.dev/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. + +-------------------------------------------------------------------------------- +Package: ngx-highlight-js +License: "MIT" + + +-------------------------------------------------------------------------------- +Package: @firebase/util +License: "Apache-2.0" + + +-------------------------------------------------------------------------------- +Package: @firebase/component +License: "Apache-2.0" + + +-------------------------------------------------------------------------------- +Package: @firebase/logger +License: "Apache-2.0" + + +-------------------------------------------------------------------------------- +Package: @firebase/app +License: "Apache-2.0" + + +-------------------------------------------------------------------------------- +Package: idb +License: "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. + +-------------------------------------------------------------------------------- +Package: @firebase/webchannel-wrapper +License: "Apache-2.0" + + +-------------------------------------------------------------------------------- +Package: @firebase/firestore +License: "Apache-2.0" + + +-------------------------------------------------------------------------------- +Package: @kurkle/color +License: "MIT" + +The MIT License (MIT) + +Copyright (c) 2018-2024 Jukka Kurkela + +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. + +-------------------------------------------------------------------------------- +Package: chart.js +License: "MIT" + +The MIT License (MIT) + +Copyright (c) 2014-2024 Chart.js Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- +Package: xlsx +License: "Apache-2.0" -xlsx -Apache-2.0 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -807,9 +853,15 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. +-------------------------------------------------------------------------------- +Package: firebase +License: "Apache-2.0" + + +-------------------------------------------------------------------------------- +Package: zone.js +License: "MIT" -zone.js -MIT The MIT License Copyright (c) 2010-2024 Google LLC. https://angular.io/license @@ -831,3 +883,5 @@ 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/404.html b/docs/browser/404.html similarity index 100% rename from docs/404.html rename to docs/browser/404.html diff --git a/docs/assets/cdstd/Backgrounds/City1/Bright/City1.png b/docs/browser/assets/cdstd/Backgrounds/City1/Bright/City1.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Bright/City1.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Bright/City1.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Bright/Sky.png b/docs/browser/assets/cdstd/Backgrounds/City1/Bright/Sky.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Bright/Sky.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Bright/Sky.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Bright/boxes&container.png b/docs/browser/assets/cdstd/Backgrounds/City1/Bright/boxes&container.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Bright/boxes&container.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Bright/boxes&container.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Bright/buildings.png b/docs/browser/assets/cdstd/Backgrounds/City1/Bright/buildings.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Bright/buildings.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Bright/buildings.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Bright/road&border.png b/docs/browser/assets/cdstd/Backgrounds/City1/Bright/road&border.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Bright/road&border.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Bright/road&border.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Bright/wall1.png b/docs/browser/assets/cdstd/Backgrounds/City1/Bright/wall1.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Bright/wall1.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Bright/wall1.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Bright/wall2.png b/docs/browser/assets/cdstd/Backgrounds/City1/Bright/wall2.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Bright/wall2.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Bright/wall2.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Bright/wheels&hydrant.png b/docs/browser/assets/cdstd/Backgrounds/City1/Bright/wheels&hydrant.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Bright/wheels&hydrant.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Bright/wheels&hydrant.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Pale/City1.png b/docs/browser/assets/cdstd/Backgrounds/City1/Pale/City1.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Pale/City1.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Pale/City1.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Pale/boxes&container.png b/docs/browser/assets/cdstd/Backgrounds/City1/Pale/boxes&container.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Pale/boxes&container.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Pale/boxes&container.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Pale/buildings.png b/docs/browser/assets/cdstd/Backgrounds/City1/Pale/buildings.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Pale/buildings.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Pale/buildings.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Pale/road&border.png b/docs/browser/assets/cdstd/Backgrounds/City1/Pale/road&border.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Pale/road&border.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Pale/road&border.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Pale/sky.png b/docs/browser/assets/cdstd/Backgrounds/City1/Pale/sky.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Pale/sky.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Pale/sky.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Pale/wall1.png b/docs/browser/assets/cdstd/Backgrounds/City1/Pale/wall1.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Pale/wall1.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Pale/wall1.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Pale/wall2.png b/docs/browser/assets/cdstd/Backgrounds/City1/Pale/wall2.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Pale/wall2.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Pale/wall2.png diff --git a/docs/assets/cdstd/Backgrounds/City1/Pale/wheels&hydrant.png b/docs/browser/assets/cdstd/Backgrounds/City1/Pale/wheels&hydrant.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City1/Pale/wheels&hydrant.png rename to docs/browser/assets/cdstd/Backgrounds/City1/Pale/wheels&hydrant.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Bright/City2.png b/docs/browser/assets/cdstd/Backgrounds/City2/Bright/City2.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Bright/City2.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Bright/City2.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Bright/Sky.png b/docs/browser/assets/cdstd/Backgrounds/City2/Bright/Sky.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Bright/Sky.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Bright/Sky.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Bright/back.png b/docs/browser/assets/cdstd/Backgrounds/City2/Bright/back.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Bright/back.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Bright/back.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Bright/houses1.png b/docs/browser/assets/cdstd/Backgrounds/City2/Bright/houses1.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Bright/houses1.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Bright/houses1.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Bright/houses3.png b/docs/browser/assets/cdstd/Backgrounds/City2/Bright/houses3.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Bright/houses3.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Bright/houses3.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Bright/minishop&callbox.png b/docs/browser/assets/cdstd/Backgrounds/City2/Bright/minishop&callbox.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Bright/minishop&callbox.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Bright/minishop&callbox.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Bright/road&lamps.png b/docs/browser/assets/cdstd/Backgrounds/City2/Bright/road&lamps.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Bright/road&lamps.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Bright/road&lamps.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Pale/Back_pale.png b/docs/browser/assets/cdstd/Backgrounds/City2/Pale/Back_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Pale/Back_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Pale/Back_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Pale/City2_pale.png b/docs/browser/assets/cdstd/Backgrounds/City2/Pale/City2_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Pale/City2_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Pale/City2_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Pale/Houses3_pale.png b/docs/browser/assets/cdstd/Backgrounds/City2/Pale/Houses3_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Pale/Houses3_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Pale/Houses3_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Pale/Sky_pale.png b/docs/browser/assets/cdstd/Backgrounds/City2/Pale/Sky_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Pale/Sky_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Pale/Sky_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Pale/houses1_pale.png b/docs/browser/assets/cdstd/Backgrounds/City2/Pale/houses1_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Pale/houses1_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Pale/houses1_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Pale/minishop&callbox_pale.png b/docs/browser/assets/cdstd/Backgrounds/City2/Pale/minishop&callbox_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Pale/minishop&callbox_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Pale/minishop&callbox_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City2/Pale/road&lamps_pale.png b/docs/browser/assets/cdstd/Backgrounds/City2/Pale/road&lamps_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City2/Pale/road&lamps_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City2/Pale/road&lamps_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Bright/City3.png b/docs/browser/assets/cdstd/Backgrounds/City3/Bright/City3.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Bright/City3.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Bright/City3.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Bright/crosswalk.png b/docs/browser/assets/cdstd/Backgrounds/City3/Bright/crosswalk.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Bright/crosswalk.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Bright/crosswalk.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Bright/houded2.png b/docs/browser/assets/cdstd/Backgrounds/City3/Bright/houded2.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Bright/houded2.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Bright/houded2.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Bright/houses1.png b/docs/browser/assets/cdstd/Backgrounds/City3/Bright/houses1.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Bright/houses1.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Bright/houses1.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Bright/houses3.png b/docs/browser/assets/cdstd/Backgrounds/City3/Bright/houses3.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Bright/houses3.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Bright/houses3.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Bright/road.png b/docs/browser/assets/cdstd/Backgrounds/City3/Bright/road.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Bright/road.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Bright/road.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Bright/sky.png b/docs/browser/assets/cdstd/Backgrounds/City3/Bright/sky.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Bright/sky.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Bright/sky.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Pale/City3_pale.png b/docs/browser/assets/cdstd/Backgrounds/City3/Pale/City3_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Pale/City3_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Pale/City3_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Pale/crosswalk_pale.png b/docs/browser/assets/cdstd/Backgrounds/City3/Pale/crosswalk_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Pale/crosswalk_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Pale/crosswalk_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Pale/houded2_pale.png b/docs/browser/assets/cdstd/Backgrounds/City3/Pale/houded2_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Pale/houded2_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Pale/houded2_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Pale/houses1_pale.png b/docs/browser/assets/cdstd/Backgrounds/City3/Pale/houses1_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Pale/houses1_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Pale/houses1_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Pale/houses3_pale.png b/docs/browser/assets/cdstd/Backgrounds/City3/Pale/houses3_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Pale/houses3_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Pale/houses3_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Pale/road_pale.png b/docs/browser/assets/cdstd/Backgrounds/City3/Pale/road_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Pale/road_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Pale/road_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City3/Pale/sky_pale.png b/docs/browser/assets/cdstd/Backgrounds/City3/Pale/sky_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City3/Pale/sky_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City3/Pale/sky_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Bright/City4.png b/docs/browser/assets/cdstd/Backgrounds/City4/Bright/City4.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Bright/City4.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Bright/City4.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Bright/Sky.png b/docs/browser/assets/cdstd/Backgrounds/City4/Bright/Sky.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Bright/Sky.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Bright/Sky.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Bright/fountain&bush.png b/docs/browser/assets/cdstd/Backgrounds/City4/Bright/fountain&bush.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Bright/fountain&bush.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Bright/fountain&bush.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Bright/houses.png b/docs/browser/assets/cdstd/Backgrounds/City4/Bright/houses.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Bright/houses.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Bright/houses.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Bright/houses1.png b/docs/browser/assets/cdstd/Backgrounds/City4/Bright/houses1.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Bright/houses1.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Bright/houses1.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Bright/houses2.png b/docs/browser/assets/cdstd/Backgrounds/City4/Bright/houses2.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Bright/houses2.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Bright/houses2.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Bright/road.png b/docs/browser/assets/cdstd/Backgrounds/City4/Bright/road.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Bright/road.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Bright/road.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Bright/umbrella&policebox.png b/docs/browser/assets/cdstd/Backgrounds/City4/Bright/umbrella&policebox.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Bright/umbrella&policebox.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Bright/umbrella&policebox.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Pale/City4_pale.png b/docs/browser/assets/cdstd/Backgrounds/City4/Pale/City4_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Pale/City4_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Pale/City4_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Pale/Sky_pale.png b/docs/browser/assets/cdstd/Backgrounds/City4/Pale/Sky_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Pale/Sky_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Pale/Sky_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Pale/fountain&bush_pale.png b/docs/browser/assets/cdstd/Backgrounds/City4/Pale/fountain&bush_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Pale/fountain&bush_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Pale/fountain&bush_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Pale/houses1_pale.png b/docs/browser/assets/cdstd/Backgrounds/City4/Pale/houses1_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Pale/houses1_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Pale/houses1_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Pale/houses2_pale.png b/docs/browser/assets/cdstd/Backgrounds/City4/Pale/houses2_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Pale/houses2_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Pale/houses2_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Pale/houses_pale.png b/docs/browser/assets/cdstd/Backgrounds/City4/Pale/houses_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Pale/houses_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Pale/houses_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Pale/road_pale.png b/docs/browser/assets/cdstd/Backgrounds/City4/Pale/road_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Pale/road_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Pale/road_pale.png diff --git a/docs/assets/cdstd/Backgrounds/City4/Pale/umbrella&policebox_pale.png b/docs/browser/assets/cdstd/Backgrounds/City4/Pale/umbrella&policebox_pale.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/City4/Pale/umbrella&policebox_pale.png rename to docs/browser/assets/cdstd/Backgrounds/City4/Pale/umbrella&policebox_pale.png diff --git a/docs/assets/cdstd/Backgrounds/hospital-floor-day.png b/docs/browser/assets/cdstd/Backgrounds/hospital-floor-day.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/hospital-floor-day.png rename to docs/browser/assets/cdstd/Backgrounds/hospital-floor-day.png diff --git a/docs/assets/cdstd/Backgrounds/hospital-floor-night.png b/docs/browser/assets/cdstd/Backgrounds/hospital-floor-night.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/hospital-floor-night.png rename to docs/browser/assets/cdstd/Backgrounds/hospital-floor-night.png diff --git a/docs/assets/cdstd/Backgrounds/hospital-floor.png b/docs/browser/assets/cdstd/Backgrounds/hospital-floor.png similarity index 100% rename from docs/assets/cdstd/Backgrounds/hospital-floor.png rename to docs/browser/assets/cdstd/Backgrounds/hospital-floor.png diff --git a/docs/assets/cdstd/Characters/City_men_1/Attack.png b/docs/browser/assets/cdstd/Characters/City_men_1/Attack.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_1/Attack.png rename to docs/browser/assets/cdstd/Characters/City_men_1/Attack.png diff --git a/docs/assets/cdstd/Characters/City_men_1/Dead.png b/docs/browser/assets/cdstd/Characters/City_men_1/Dead.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_1/Dead.png rename to docs/browser/assets/cdstd/Characters/City_men_1/Dead.png diff --git a/docs/assets/cdstd/Characters/City_men_1/Hurt.png b/docs/browser/assets/cdstd/Characters/City_men_1/Hurt.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_1/Hurt.png rename to docs/browser/assets/cdstd/Characters/City_men_1/Hurt.png diff --git a/docs/assets/cdstd/Characters/City_men_1/Idle.png b/docs/browser/assets/cdstd/Characters/City_men_1/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_1/Idle.png rename to docs/browser/assets/cdstd/Characters/City_men_1/Idle.png diff --git a/docs/assets/cdstd/Characters/City_men_1/Run.png b/docs/browser/assets/cdstd/Characters/City_men_1/Run.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_1/Run.png rename to docs/browser/assets/cdstd/Characters/City_men_1/Run.png diff --git a/docs/assets/cdstd/Characters/City_men_1/Walk.png b/docs/browser/assets/cdstd/Characters/City_men_1/Walk.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_1/Walk.png rename to docs/browser/assets/cdstd/Characters/City_men_1/Walk.png diff --git a/docs/assets/cdstd/Characters/City_men_2/Attack.png b/docs/browser/assets/cdstd/Characters/City_men_2/Attack.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_2/Attack.png rename to docs/browser/assets/cdstd/Characters/City_men_2/Attack.png diff --git a/docs/assets/cdstd/Characters/City_men_2/Dead.png b/docs/browser/assets/cdstd/Characters/City_men_2/Dead.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_2/Dead.png rename to docs/browser/assets/cdstd/Characters/City_men_2/Dead.png diff --git a/docs/assets/cdstd/Characters/City_men_2/Hurt.png b/docs/browser/assets/cdstd/Characters/City_men_2/Hurt.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_2/Hurt.png rename to docs/browser/assets/cdstd/Characters/City_men_2/Hurt.png diff --git a/docs/assets/cdstd/Characters/City_men_2/Idle.png b/docs/browser/assets/cdstd/Characters/City_men_2/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_2/Idle.png rename to docs/browser/assets/cdstd/Characters/City_men_2/Idle.png diff --git a/docs/assets/cdstd/Characters/City_men_2/Run.png b/docs/browser/assets/cdstd/Characters/City_men_2/Run.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_2/Run.png rename to docs/browser/assets/cdstd/Characters/City_men_2/Run.png diff --git a/docs/assets/cdstd/Characters/City_men_2/Walk.png b/docs/browser/assets/cdstd/Characters/City_men_2/Walk.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_2/Walk.png rename to docs/browser/assets/cdstd/Characters/City_men_2/Walk.png diff --git a/docs/assets/cdstd/Characters/City_men_3/Attack.png b/docs/browser/assets/cdstd/Characters/City_men_3/Attack.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_3/Attack.png rename to docs/browser/assets/cdstd/Characters/City_men_3/Attack.png diff --git a/docs/assets/cdstd/Characters/City_men_3/Dead.png b/docs/browser/assets/cdstd/Characters/City_men_3/Dead.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_3/Dead.png rename to docs/browser/assets/cdstd/Characters/City_men_3/Dead.png diff --git a/docs/assets/cdstd/Characters/City_men_3/Hurt.png b/docs/browser/assets/cdstd/Characters/City_men_3/Hurt.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_3/Hurt.png rename to docs/browser/assets/cdstd/Characters/City_men_3/Hurt.png diff --git a/docs/assets/cdstd/Characters/City_men_3/Idle.png b/docs/browser/assets/cdstd/Characters/City_men_3/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_3/Idle.png rename to docs/browser/assets/cdstd/Characters/City_men_3/Idle.png diff --git a/docs/assets/cdstd/Characters/City_men_3/Run.png b/docs/browser/assets/cdstd/Characters/City_men_3/Run.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_3/Run.png rename to docs/browser/assets/cdstd/Characters/City_men_3/Run.png diff --git a/docs/assets/cdstd/Characters/City_men_3/Walk.png b/docs/browser/assets/cdstd/Characters/City_men_3/Walk.png similarity index 100% rename from docs/assets/cdstd/Characters/City_men_3/Walk.png rename to docs/browser/assets/cdstd/Characters/City_men_3/Walk.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Attack_1.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Attack_1.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Attack_1.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Attack_1.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Dead.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Dead.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Dead.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Dead.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Hurt.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Hurt.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Hurt.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Hurt.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Idle.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Idle.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Idle.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Idle_2.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Idle_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Idle_2.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Idle_2.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Jump.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Jump.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Jump.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Jump.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Recharge.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Recharge.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Recharge.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Recharge.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Run.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Run.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Run.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Run.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Shot.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Shot.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Shot.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Shot.png diff --git a/docs/assets/cdstd/Characters/Gangsters_1/Walk.png b/docs/browser/assets/cdstd/Characters/Gangsters_1/Walk.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_1/Walk.png rename to docs/browser/assets/cdstd/Characters/Gangsters_1/Walk.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Attack_1.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Attack_1.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Attack_1.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Attack_1.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Attack_2.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Attack_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Attack_2.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Attack_2.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Attack_3.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Attack_3.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Attack_3.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Attack_3.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Dead.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Dead.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Dead.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Dead.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Hurt.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Hurt.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Hurt.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Hurt.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Idle.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Idle.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Idle.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Idle_2.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Idle_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Idle_2.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Idle_2.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Jump.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Jump.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Jump.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Jump.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Run.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Run.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Run.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Run.png diff --git a/docs/assets/cdstd/Characters/Gangsters_2/Walk.png b/docs/browser/assets/cdstd/Characters/Gangsters_2/Walk.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_2/Walk.png rename to docs/browser/assets/cdstd/Characters/Gangsters_2/Walk.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Attack.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Attack.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Attack.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Attack.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Dead.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Dead.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Dead.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Dead.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Hurt.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Hurt.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Hurt.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Hurt.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Idle.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Idle.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Idle.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Idle_2.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Idle_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Idle_2.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Idle_2.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Jump.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Jump.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Jump.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Jump.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Recharge.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Recharge.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Recharge.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Recharge.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Run.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Run.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Run.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Run.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Shot.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Shot.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Shot.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Shot.png diff --git a/docs/assets/cdstd/Characters/Gangsters_3/Walk.png b/docs/browser/assets/cdstd/Characters/Gangsters_3/Walk.png similarity index 100% rename from docs/assets/cdstd/Characters/Gangsters_3/Walk.png rename to docs/browser/assets/cdstd/Characters/Gangsters_3/Walk.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Attack.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Attack.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Attack.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Attack.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Dead.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Dead.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Dead.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Dead.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Explosion.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Explosion.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Explosion.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Explosion.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Grenade.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Grenade.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Grenade.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Grenade.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Hurt.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Hurt.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Hurt.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Hurt.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Idle.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Idle.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Idle.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Recharge.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Recharge.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Recharge.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Recharge.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Run.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Run.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Run.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Run.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Shot_1.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Shot_1.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Shot_1.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Shot_1.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Shot_2.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Shot_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Shot_2.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Shot_2.png diff --git a/docs/assets/cdstd/Characters/Soldier_1/Walk.png b/docs/browser/assets/cdstd/Characters/Soldier_1/Walk.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_1/Walk.png rename to docs/browser/assets/cdstd/Characters/Soldier_1/Walk.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Attack.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Attack.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Attack.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Attack.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Dead.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Dead.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Dead.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Dead.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Grenade.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Grenade.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Grenade.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Grenade.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Hurt.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Hurt.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Hurt.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Hurt.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Idle.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Idle.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Idle.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Recharge.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Recharge.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Recharge.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Recharge.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Run.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Run.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Run.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Run.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Shot_1.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Shot_1.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Shot_1.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Shot_1.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Shot_2.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Shot_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Shot_2.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Shot_2.png diff --git a/docs/assets/cdstd/Characters/Soldier_2/Walk.png b/docs/browser/assets/cdstd/Characters/Soldier_2/Walk.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_2/Walk.png rename to docs/browser/assets/cdstd/Characters/Soldier_2/Walk.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Attacck.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Attacck.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Attacck.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Attacck.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Dead.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Dead.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Dead.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Dead.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Grenade.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Grenade.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Grenade.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Grenade.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Hurt.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Hurt.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Hurt.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Hurt.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Idle.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Idle.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Idle.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Recharge.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Recharge.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Recharge.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Recharge.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Run.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Run.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Run.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Run.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Shot_1.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Shot_1.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Shot_1.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Shot_1.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Shot_2.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Shot_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Shot_2.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Shot_2.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Smoke.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Smoke.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Smoke.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Smoke.png diff --git a/docs/assets/cdstd/Characters/Soldier_3/Walk.png b/docs/browser/assets/cdstd/Characters/Soldier_3/Walk.png similarity index 100% rename from docs/assets/cdstd/Characters/Soldier_3/Walk.png rename to docs/browser/assets/cdstd/Characters/Soldier_3/Walk.png diff --git a/docs/assets/cdstd/Characters/Trader_1/Approval.png b/docs/browser/assets/cdstd/Characters/Trader_1/Approval.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_1/Approval.png rename to docs/browser/assets/cdstd/Characters/Trader_1/Approval.png diff --git a/docs/assets/cdstd/Characters/Trader_1/Dialogue.png b/docs/browser/assets/cdstd/Characters/Trader_1/Dialogue.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_1/Dialogue.png rename to docs/browser/assets/cdstd/Characters/Trader_1/Dialogue.png diff --git a/docs/assets/cdstd/Characters/Trader_1/Idle.png b/docs/browser/assets/cdstd/Characters/Trader_1/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_1/Idle.png rename to docs/browser/assets/cdstd/Characters/Trader_1/Idle.png diff --git a/docs/assets/cdstd/Characters/Trader_1/Idle_2.png b/docs/browser/assets/cdstd/Characters/Trader_1/Idle_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_1/Idle_2.png rename to docs/browser/assets/cdstd/Characters/Trader_1/Idle_2.png diff --git a/docs/assets/cdstd/Characters/Trader_1/Idle_3.png b/docs/browser/assets/cdstd/Characters/Trader_1/Idle_3.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_1/Idle_3.png rename to docs/browser/assets/cdstd/Characters/Trader_1/Idle_3.png diff --git a/docs/assets/cdstd/Characters/Trader_2/Approval.png b/docs/browser/assets/cdstd/Characters/Trader_2/Approval.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_2/Approval.png rename to docs/browser/assets/cdstd/Characters/Trader_2/Approval.png diff --git a/docs/assets/cdstd/Characters/Trader_2/Dialogue.png b/docs/browser/assets/cdstd/Characters/Trader_2/Dialogue.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_2/Dialogue.png rename to docs/browser/assets/cdstd/Characters/Trader_2/Dialogue.png diff --git a/docs/assets/cdstd/Characters/Trader_2/Idle.png b/docs/browser/assets/cdstd/Characters/Trader_2/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_2/Idle.png rename to docs/browser/assets/cdstd/Characters/Trader_2/Idle.png diff --git a/docs/assets/cdstd/Characters/Trader_2/Idle_2.png b/docs/browser/assets/cdstd/Characters/Trader_2/Idle_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_2/Idle_2.png rename to docs/browser/assets/cdstd/Characters/Trader_2/Idle_2.png diff --git a/docs/assets/cdstd/Characters/Trader_2/Idle_3.png b/docs/browser/assets/cdstd/Characters/Trader_2/Idle_3.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_2/Idle_3.png rename to docs/browser/assets/cdstd/Characters/Trader_2/Idle_3.png diff --git a/docs/assets/cdstd/Characters/Trader_3/Approval.png b/docs/browser/assets/cdstd/Characters/Trader_3/Approval.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_3/Approval.png rename to docs/browser/assets/cdstd/Characters/Trader_3/Approval.png diff --git a/docs/assets/cdstd/Characters/Trader_3/Dialogue.png b/docs/browser/assets/cdstd/Characters/Trader_3/Dialogue.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_3/Dialogue.png rename to docs/browser/assets/cdstd/Characters/Trader_3/Dialogue.png diff --git a/docs/assets/cdstd/Characters/Trader_3/Idle.png b/docs/browser/assets/cdstd/Characters/Trader_3/Idle.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_3/Idle.png rename to docs/browser/assets/cdstd/Characters/Trader_3/Idle.png diff --git a/docs/assets/cdstd/Characters/Trader_3/Idle_2.png b/docs/browser/assets/cdstd/Characters/Trader_3/Idle_2.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_3/Idle_2.png rename to docs/browser/assets/cdstd/Characters/Trader_3/Idle_2.png diff --git a/docs/assets/cdstd/Characters/Trader_3/Idle_3.png b/docs/browser/assets/cdstd/Characters/Trader_3/Idle_3.png similarity index 100% rename from docs/assets/cdstd/Characters/Trader_3/Idle_3.png rename to docs/browser/assets/cdstd/Characters/Trader_3/Idle_3.png diff --git a/docs/assets/cdstd/Data/dx_1.json b/docs/browser/assets/cdstd/Data/dx_1.json similarity index 100% rename from docs/assets/cdstd/Data/dx_1.json rename to docs/browser/assets/cdstd/Data/dx_1.json diff --git a/docs/assets/cdstd/Data/top_200_findings_disorders.json b/docs/browser/assets/cdstd/Data/top_200_findings_disorders.json similarity index 100% rename from docs/assets/cdstd/Data/top_200_findings_disorders.json rename to docs/browser/assets/cdstd/Data/top_200_findings_disorders.json diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Coin_01.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Coin_01.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Coin_01.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Coin_01.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Coin_02.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Coin_02.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Coin_02.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Coin_02.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Coin_03.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Coin_03.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Coin_03.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Coin_03.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Coin_04.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Coin_04.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Coin_04.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Coin_04.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_01.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_01.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_01.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_01.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_02.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_02.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_02.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_02.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_03.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_03.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_03.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_03.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_04.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_04.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_04.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Flight_Bonus_04.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/HP_Bonus_01.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/HP_Bonus_01.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/HP_Bonus_01.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/HP_Bonus_01.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/HP_Bonus_02.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/HP_Bonus_02.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/HP_Bonus_02.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/HP_Bonus_02.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/HP_Bonus_03.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/HP_Bonus_03.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/HP_Bonus_03.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/HP_Bonus_03.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/HP_Bonus_04.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/HP_Bonus_04.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/HP_Bonus_04.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/HP_Bonus_04.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_01.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_01.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_01.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_01.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_02.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_02.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_02.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_02.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_03.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_03.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_03.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_03.png diff --git a/docs/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_04.png b/docs/browser/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_04.png similarity index 100% rename from docs/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_04.png rename to docs/browser/assets/cdstd/Objects/Bonus_Items/Jump_Bonus_04.png diff --git a/docs/assets/cdstd/Objects/Buttons/button_pause.png b/docs/browser/assets/cdstd/Objects/Buttons/button_pause.png similarity index 100% rename from docs/assets/cdstd/Objects/Buttons/button_pause.png rename to docs/browser/assets/cdstd/Objects/Buttons/button_pause.png diff --git a/docs/assets/cdstd/Objects/Buttons/button_restart.png b/docs/browser/assets/cdstd/Objects/Buttons/button_restart.png similarity index 100% rename from docs/assets/cdstd/Objects/Buttons/button_restart.png rename to docs/browser/assets/cdstd/Objects/Buttons/button_restart.png diff --git a/docs/assets/cdstd/Objects/Buttons/button_unpause.png b/docs/browser/assets/cdstd/Objects/Buttons/button_unpause.png similarity index 100% rename from docs/assets/cdstd/Objects/Buttons/button_unpause.png rename to docs/browser/assets/cdstd/Objects/Buttons/button_unpause.png diff --git a/docs/assets/cdstd/Objects/Pads/Pad_01_1.png b/docs/browser/assets/cdstd/Objects/Pads/Pad_01_1.png similarity index 100% rename from docs/assets/cdstd/Objects/Pads/Pad_01_1.png rename to docs/browser/assets/cdstd/Objects/Pads/Pad_01_1.png diff --git a/docs/assets/cdstd/Objects/Pads/Pad_01_2.png b/docs/browser/assets/cdstd/Objects/Pads/Pad_01_2.png similarity index 100% rename from docs/assets/cdstd/Objects/Pads/Pad_01_2.png rename to docs/browser/assets/cdstd/Objects/Pads/Pad_01_2.png diff --git a/docs/assets/cdstd/Objects/Pads/Pad_02_1.png b/docs/browser/assets/cdstd/Objects/Pads/Pad_02_1.png similarity index 100% rename from docs/assets/cdstd/Objects/Pads/Pad_02_1.png rename to docs/browser/assets/cdstd/Objects/Pads/Pad_02_1.png diff --git a/docs/assets/cdstd/Objects/Pads/Pad_02_2.png b/docs/browser/assets/cdstd/Objects/Pads/Pad_02_2.png similarity index 100% rename from docs/assets/cdstd/Objects/Pads/Pad_02_2.png rename to docs/browser/assets/cdstd/Objects/Pads/Pad_02_2.png diff --git a/docs/assets/cdstd/Objects/Pads/Pad_03_1.png b/docs/browser/assets/cdstd/Objects/Pads/Pad_03_1.png similarity index 100% rename from docs/assets/cdstd/Objects/Pads/Pad_03_1.png rename to docs/browser/assets/cdstd/Objects/Pads/Pad_03_1.png diff --git a/docs/assets/cdstd/Objects/Pads/Pad_03_2.png b/docs/browser/assets/cdstd/Objects/Pads/Pad_03_2.png similarity index 100% rename from docs/assets/cdstd/Objects/Pads/Pad_03_2.png rename to docs/browser/assets/cdstd/Objects/Pads/Pad_03_2.png diff --git a/docs/assets/cdstd/Objects/Pads/Pad_04_1.png b/docs/browser/assets/cdstd/Objects/Pads/Pad_04_1.png similarity index 100% rename from docs/assets/cdstd/Objects/Pads/Pad_04_1.png rename to docs/browser/assets/cdstd/Objects/Pads/Pad_04_1.png diff --git a/docs/assets/cdstd/Objects/Pads/Pad_04_2.png b/docs/browser/assets/cdstd/Objects/Pads/Pad_04_2.png similarity index 100% rename from docs/assets/cdstd/Objects/Pads/Pad_04_2.png rename to docs/browser/assets/cdstd/Objects/Pads/Pad_04_2.png diff --git a/docs/assets/cdstd/Objects/Props/Prop_1.png b/docs/browser/assets/cdstd/Objects/Props/Prop_1.png similarity index 100% rename from docs/assets/cdstd/Objects/Props/Prop_1.png rename to docs/browser/assets/cdstd/Objects/Props/Prop_1.png diff --git a/docs/assets/cdstd/Objects/Props/Prop_2.png b/docs/browser/assets/cdstd/Objects/Props/Prop_2.png similarity index 100% rename from docs/assets/cdstd/Objects/Props/Prop_2.png rename to docs/browser/assets/cdstd/Objects/Props/Prop_2.png diff --git a/docs/assets/cdstd/Objects/Props/Prop_3.png b/docs/browser/assets/cdstd/Objects/Props/Prop_3.png similarity index 100% rename from docs/assets/cdstd/Objects/Props/Prop_3.png rename to docs/browser/assets/cdstd/Objects/Props/Prop_3.png diff --git a/docs/assets/cdstd/Objects/Props/Prop_4.png b/docs/browser/assets/cdstd/Objects/Props/Prop_4.png similarity index 100% rename from docs/assets/cdstd/Objects/Props/Prop_4.png rename to docs/browser/assets/cdstd/Objects/Props/Prop_4.png diff --git a/docs/assets/cdstd/Objects/Props/Prop_5.png b/docs/browser/assets/cdstd/Objects/Props/Prop_5.png similarity index 100% rename from docs/assets/cdstd/Objects/Props/Prop_5.png rename to docs/browser/assets/cdstd/Objects/Props/Prop_5.png diff --git a/docs/assets/cdstd/Objects/Props/Prop_6.png b/docs/browser/assets/cdstd/Objects/Props/Prop_6.png similarity index 100% rename from docs/assets/cdstd/Objects/Props/Prop_6.png rename to docs/browser/assets/cdstd/Objects/Props/Prop_6.png diff --git a/docs/assets/cdstd/Objects/Props/Prop_7.png b/docs/browser/assets/cdstd/Objects/Props/Prop_7.png similarity index 100% rename from docs/assets/cdstd/Objects/Props/Prop_7.png rename to docs/browser/assets/cdstd/Objects/Props/Prop_7.png diff --git a/docs/assets/cdstd/Objects/Props/Prop_8.png b/docs/browser/assets/cdstd/Objects/Props/Prop_8.png similarity index 100% rename from docs/assets/cdstd/Objects/Props/Prop_8.png rename to docs/browser/assets/cdstd/Objects/Props/Prop_8.png diff --git a/docs/assets/definitions/assignments.json b/docs/browser/assets/definitions/assignments.json similarity index 100% rename from docs/assets/definitions/assignments.json rename to docs/browser/assets/definitions/assignments.json diff --git a/docs/assets/img/SI_CT_Logo_Delivered_By.png b/docs/browser/assets/img/SI_CT_Logo_Delivered_By.png similarity index 100% rename from docs/assets/img/SI_CT_Logo_Delivered_By.png rename to docs/browser/assets/img/SI_CT_Logo_Delivered_By.png diff --git a/docs/assets/img/SI_CT_w_tagline.png b/docs/browser/assets/img/SI_CT_w_tagline.png similarity index 100% rename from docs/assets/img/SI_CT_w_tagline.png rename to docs/browser/assets/img/SI_CT_w_tagline.png diff --git a/docs/assets/img/SNOMED_logo_200pc.png b/docs/browser/assets/img/SNOMED_logo_200pc.png similarity index 100% rename from docs/assets/img/SNOMED_logo_200pc.png rename to docs/browser/assets/img/SNOMED_logo_200pc.png diff --git a/docs/assets/img/congratulations.png b/docs/browser/assets/img/congratulations.png similarity index 100% rename from docs/assets/img/congratulations.png rename to docs/browser/assets/img/congratulations.png diff --git a/docs/assets/img/correct.png b/docs/browser/assets/img/correct.png similarity index 100% rename from docs/assets/img/correct.png rename to docs/browser/assets/img/correct.png diff --git a/docs/assets/img/difficulty.png b/docs/browser/assets/img/difficulty.png similarity index 100% rename from docs/assets/img/difficulty.png rename to docs/browser/assets/img/difficulty.png diff --git a/docs/assets/img/favicon.png b/docs/browser/assets/img/favicon.png similarity index 100% rename from docs/assets/img/favicon.png rename to docs/browser/assets/img/favicon.png diff --git a/docs/assets/img/game-over.png b/docs/browser/assets/img/game-over.png similarity index 100% rename from docs/assets/img/game-over.png rename to docs/browser/assets/img/game-over.png diff --git a/docs/assets/img/icd-10.jpg b/docs/browser/assets/img/icd-10.jpg similarity index 100% rename from docs/assets/img/icd-10.jpg rename to docs/browser/assets/img/icd-10.jpg diff --git a/docs/assets/img/icd-11.jpg b/docs/browser/assets/img/icd-11.jpg similarity index 100% rename from docs/assets/img/icd-11.jpg rename to docs/browser/assets/img/icd-11.jpg diff --git a/docs/assets/img/instructions.png b/docs/browser/assets/img/instructions.png similarity index 100% rename from docs/assets/img/instructions.png rename to docs/browser/assets/img/instructions.png diff --git a/docs/assets/img/scoreboard.png b/docs/browser/assets/img/scoreboard.png similarity index 100% rename from docs/assets/img/scoreboard.png rename to docs/browser/assets/img/scoreboard.png diff --git a/docs/assets/img/small_logo.png b/docs/browser/assets/img/small_logo.png similarity index 100% rename from docs/assets/img/small_logo.png rename to docs/browser/assets/img/small_logo.png diff --git a/docs/assets/img/snoguess-logo.png b/docs/browser/assets/img/snoguess-logo.png similarity index 100% rename from docs/assets/img/snoguess-logo.png rename to docs/browser/assets/img/snoguess-logo.png diff --git a/docs/assets/img/user-female.svg b/docs/browser/assets/img/user-female.svg similarity index 100% rename from docs/assets/img/user-female.svg rename to docs/browser/assets/img/user-female.svg diff --git a/docs/assets/img/user-male.svg b/docs/browser/assets/img/user-male.svg similarity index 100% rename from docs/assets/img/user-male.svg rename to docs/browser/assets/img/user-male.svg diff --git a/docs/assets/img/user-no.svg b/docs/browser/assets/img/user-no.svg similarity index 100% rename from docs/assets/img/user-no.svg rename to docs/browser/assets/img/user-no.svg diff --git a/docs/assets/img/user.png b/docs/browser/assets/img/user.png similarity index 100% rename from docs/assets/img/user.png rename to docs/browser/assets/img/user.png diff --git a/docs/assets/maturity/maturityLevels.json b/docs/browser/assets/maturity/maturityLevels.json similarity index 100% rename from docs/assets/maturity/maturityLevels.json rename to docs/browser/assets/maturity/maturityLevels.json diff --git a/docs/assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json b/docs/browser/assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json similarity index 100% rename from docs/assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json rename to docs/browser/assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json diff --git a/docs/assets/questionnaires/root-questionnaire-example.json b/docs/browser/assets/questionnaires/root-questionnaire-example.json similarity index 100% rename from docs/assets/questionnaires/root-questionnaire-example.json rename to docs/browser/assets/questionnaires/root-questionnaire-example.json diff --git a/docs/assets/questionnaires/root-questionnaire-template.json b/docs/browser/assets/questionnaires/root-questionnaire-template.json similarity index 100% rename from docs/assets/questionnaires/root-questionnaire-template.json rename to docs/browser/assets/questionnaires/root-questionnaire-template.json diff --git a/docs/assets/reports/detect_inactivations_by_reason.html b/docs/browser/assets/reports/detect_inactivations_by_reason.html similarity index 100% rename from docs/assets/reports/detect_inactivations_by_reason.html rename to docs/browser/assets/reports/detect_inactivations_by_reason.html diff --git a/docs/assets/reports/fsn_changes_with_details.html b/docs/browser/assets/reports/fsn_changes_with_details.html similarity index 100% rename from docs/assets/reports/fsn_changes_with_details.html rename to docs/browser/assets/reports/fsn_changes_with_details.html diff --git a/docs/assets/reports/new_concepts_by_semantic_tag.html b/docs/browser/assets/reports/new_concepts_by_semantic_tag.html similarity index 100% rename from docs/assets/reports/new_concepts_by_semantic_tag.html rename to docs/browser/assets/reports/new_concepts_by_semantic_tag.html diff --git a/docs/assets/specs/ncpt/Example-spec-2.json b/docs/browser/assets/specs/ncpt/Example-spec-2.json similarity index 100% rename from docs/assets/specs/ncpt/Example-spec-2.json rename to docs/browser/assets/specs/ncpt/Example-spec-2.json diff --git a/docs/assets/specs/ncpt/Example-spec.json b/docs/browser/assets/specs/ncpt/Example-spec.json similarity index 100% rename from docs/assets/specs/ncpt/Example-spec.json rename to docs/browser/assets/specs/ncpt/Example-spec.json diff --git a/docs/assets/specs/ncpt/maturity.json b/docs/browser/assets/specs/ncpt/maturity.json similarity index 100% rename from docs/assets/specs/ncpt/maturity.json rename to docs/browser/assets/specs/ncpt/maturity.json diff --git a/docs/favicon.png b/docs/browser/favicon.png similarity index 100% rename from docs/favicon.png rename to docs/browser/favicon.png diff --git a/docs/browser/index.html b/docs/browser/index.html new file mode 100644 index 0000000..29016fb --- /dev/null +++ b/docs/browser/index.html @@ -0,0 +1,38 @@ + + + + + Implementation Demos + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/browser/main-5MBC6GOP.js b/docs/browser/main-5MBC6GOP.js new file mode 100644 index 0000000..7eea36d --- /dev/null +++ b/docs/browser/main-5MBC6GOP.js @@ -0,0 +1,256 @@ +var kq=Object.create;var eE=Object.defineProperty,Fq=Object.defineProperties,Oq=Object.getOwnPropertyDescriptor,Lq=Object.getOwnPropertyDescriptors,Nq=Object.getOwnPropertyNames,mx=Object.getOwnPropertySymbols,Bq=Object.getPrototypeOf,tE=Object.prototype.hasOwnProperty,C3=Object.prototype.propertyIsEnumerable;var w3=(t,i,e)=>i in t?eE(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,Me=(t,i)=>{for(var e in i||={})tE.call(i,e)&&w3(t,e,i[e]);if(mx)for(var e of mx(i))C3.call(i,e)&&w3(t,e,i[e]);return t},Mt=(t,i)=>Fq(t,Lq(i));var iE=(t,i)=>{var e={};for(var r in t)tE.call(t,r)&&i.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&mx)for(var r of mx(t))i.indexOf(r)<0&&C3.call(t,r)&&(e[r]=t[r]);return e};var Ye=(t,i)=>()=>(i||t((i={exports:{}}).exports,i),i.exports);var Vq=(t,i,e,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of Nq(i))!tE.call(t,n)&&n!==e&&eE(t,n,{get:()=>i[n],enumerable:!(r=Oq(i,n))||r.enumerable});return t};var Ka=(t,i,e)=>(e=t!=null?kq(Bq(t)):{},Vq(i||!t||!t.__esModule?eE(e,"default",{value:t,enumerable:!0}):e,t));var Ve=(t,i,e)=>new Promise((r,n)=>{var a=d=>{try{o(e.next(d))}catch(l){n(l)}},s=d=>{try{o(e.throw(d))}catch(l){n(l)}},o=d=>d.done?r(d.value):Promise.resolve(d.value).then(a,s);o((e=e.apply(t,i)).next())});var Qd=Ye((DI,MI)=>{"use strict";(function(t,i){typeof define=="function"&&define.amd?define([],i):typeof DI<"u"?i():(i(),t.FileSaver={})})(DI,function(){"use strict";function t(o,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}function i(o,d,l){var c=new XMLHttpRequest;c.open("GET",o),c.responseType="blob",c.onload=function(){s(c.response,d,l)},c.onerror=function(){console.error("could not download file")},c.send()}function e(o){var d=new XMLHttpRequest;d.open("HEAD",o,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function r(o){try{o.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),o.dispatchEvent(d)}}var n=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,a=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=n.saveAs||(typeof window!="object"||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(o,d,l){var c=n.URL||n.webkitURL,h=document.createElement("a");d=d||o.name||"download",h.download=d,h.rel="noopener",typeof o=="string"?(h.href=o,h.origin===location.origin?r(h):e(h.href)?i(o,d,l):r(h,h.target="_blank")):(h.href=c.createObjectURL(o),setTimeout(function(){c.revokeObjectURL(h.href)},4e4),setTimeout(function(){r(h)},0))}:"msSaveOrOpenBlob"in navigator?function(o,d,l){if(d=d||o.name||"download",typeof o!="string")navigator.msSaveOrOpenBlob(t(o,l),d);else if(e(o))i(o,d,l);else{var c=document.createElement("a");c.href=o,c.target="_blank",setTimeout(function(){r(c)})}}:function(o,d,l,c){if(c=c||open("","_blank"),c&&(c.document.title=c.document.body.innerText="downloading..."),typeof o=="string")return i(o,d,l);var h=o.type==="application/octet-stream",u=/constructor/i.test(n.HTMLElement)||n.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent);if((f||h&&u||a)&&typeof FileReader<"u"){var p=new FileReader;p.onloadend=function(){var v=p.result;v=f?v:v.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=v:location=v,c=null},p.readAsDataURL(o)}else{var m=n.URL||n.webkitURL,g=m.createObjectURL(o);c?c.location=g:location.href=g,c=null,setTimeout(function(){m.revokeObjectURL(g)},4e4)}});n.saveAs=s.saveAs=s,typeof MI<"u"&&(MI.exports=s)})});var xH=Ye((Dlt,fwe)=>{fwe.exports={words:["ahole","anus","ash0le","ash0les","asholes","ass","Ass Monkey","Assface","assh0le","assh0lez","asshole","assholes","assholz","asswipe","azzhole","bassterds","bastard","bastards","bastardz","basterds","basterdz","Biatch","bitch","bitches","Blow Job","boffing","butthole","buttwipe","c0ck","c0cks","c0k","Carpet Muncher","cawk","cawks","Clit","cnts","cntz","cock","cockhead","cock-head","cocks","CockSucker","cock-sucker","crap","cum","cunt","cunts","cuntz","dick","dild0","dild0s","dildo","dildos","dilld0","dilld0s","dominatricks","dominatrics","dominatrix","dyke","enema","f u c k","f u c k e r","fag","fag1t","faget","fagg1t","faggit","faggot","fagg0t","fagit","fags","fagz","faig","faigs","fart","flipping the bird","fuck","fucker","fuckin","fucking","fucks","Fudge Packer","fuk","Fukah","Fuken","fuker","Fukin","Fukk","Fukkah","Fukken","Fukker","Fukkin","g00k","God-damned","h00r","h0ar","h0re","hells","hoar","hoor","hoore","jackoff","jap","japs","jerk-off","jisim","jiss","jizm","jizz","knob","knobs","knobz","kunt","kunts","kuntz","Lezzian","Lipshits","Lipshitz","masochist","masokist","massterbait","masstrbait","masstrbate","masterbaiter","masterbate","masterbates","Motha Fucker","Motha Fuker","Motha Fukkah","Motha Fukker","Mother Fucker","Mother Fukah","Mother Fuker","Mother Fukkah","Mother Fukker","mother-fucker","Mutha Fucker","Mutha Fukah","Mutha Fuker","Mutha Fukkah","Mutha Fukker","n1gr","nastt","nigger;","nigur;","niiger;","niigr;","orafis","orgasim;","orgasm","orgasum","oriface","orifice","orifiss","packi","packie","packy","paki","pakie","paky","pecker","peeenus","peeenusss","peenus","peinus","pen1s","penas","penis","penis-breath","penus","penuus","Phuc","Phuck","Phuk","Phuker","Phukker","polac","polack","polak","Poonani","pr1c","pr1ck","pr1k","pusse","pussee","pussy","puuke","puuker","qweir","recktum","rectum","retard","sadist","scank","schlong","screwing","semen","sex","sexy","Sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shit","shits","shitter","Shitty","Shity","shitz","Shyt","Shyte","Shytty","Shyty","skanck","skank","skankee","skankey","skanks","Skanky","slag","slut","sluts","Slutty","slutz","son-of-a-bitch","tit","turd","va1jina","vag1na","vagiina","vagina","vaj1na","vajina","vullva","vulva","w0p","wh00r","wh0re","whore","xrated","xxx","b!+ch","bitch","blowjob","clit","arschloch","fuck","shit","ass","asshole","b!tch","b17ch","b1tch","bastard","bi+ch","boiolas","buceta","c0ck","cawk","chink","cipa","clits","cock","cum","cunt","dildo","dirsa","ejakulate","fatass","fcuk","fuk","fux0r","hoer","hore","jism","kawk","l3itch","l3i+ch","masturbate","masterbat*","masterbat3","motherfucker","s.o.b.","mofo","nazi","nigga","nigger","nutsack","phuck","pimpis","pusse","pussy","scrotum","sh!t","shemale","shi+","sh!+","slut","smut","teets","tits","boobs","b00bs","teez","testical","testicle","titt","w00se","jackoff","wank","whoar","whore","*damn","*dyke","*fuck*","*shit*","@$$","amcik","andskota","arse*","assrammer","ayir","bi7ch","bitch*","bollock*","breasts","butt-pirate","cabron","cazzo","chraa","chuj","Cock*","cunt*","d4mn","daygo","dego","dick*","dike*","dupa","dziwka","ejackulate","Ekrem*","Ekto","enculer","faen","fag*","fanculo","fanny","feces","feg","Felcher","ficken","fitt*","Flikker","foreskin","Fotze","Fu(*","fuk*","futkretzn","gook","guiena","h0r","h4x0r","hell","helvete","hoer*","honkey","Huevon","hui","injun","jizz","kanker*","kike","klootzak","kraut","knulle","kuk","kuksuger","Kurac","kurwa","kusi*","kyrpa*","lesbo","mamhoon","masturbat*","merd*","mibun","monkleigh","mouliewop","muie","mulkku","muschi","nazis","nepesaurio","nigger*","orospu","paska*","perse","picka","pierdol*","pillu*","pimmel","piss*","pizda","poontsee","poop","porn","p0rn","pr0n","preteen","pula","pule","puta","puto","qahbeh","queef*","rautenberg","schaffer","scheiss*","schlampe","schmuck","screw","sh!t*","sharmuta","sharmute","shipal","shiz","skribz","skurwysyn","sphencter","spic","spierdalaj","splooge","suka","b00b*","testicle*","titt*","twat","vittu","wank*","wetback*","wichser","wop*","yed","zabourah"]}});var _H=Ye((Mlt,bH)=>{"use strict";bH.exports={"4r5e":1,"5h1t":1,"5hit":1,a55:1,anal:1,anus:1,ar5e:1,arrse:1,arse:1,ass:1,"ass-fucker":1,asses:1,assfucker:1,assfukka:1,asshole:1,assholes:1,asswhole:1,a_s_s:1,"b!tch":1,b00bs:1,b17ch:1,b1tch:1,ballbag:1,balls:1,ballsack:1,bastard:1,beastial:1,beastiality:1,bellend:1,bestial:1,bestiality:1,"bi+ch":1,biatch:1,bitch:1,bitcher:1,bitchers:1,bitches:1,bitchin:1,bitching:1,bloody:1,"blow job":1,blowjob:1,blowjobs:1,boiolas:1,bollock:1,bollok:1,boner:1,boob:1,boobs:1,booobs:1,boooobs:1,booooobs:1,booooooobs:1,breasts:1,buceta:1,bugger:1,bum:1,"bunny fucker":1,butt:1,butthole:1,buttmuch:1,buttplug:1,c0ck:1,c0cksucker:1,"carpet muncher":1,cawk:1,chink:1,cipa:1,cl1t:1,clit:1,clitoris:1,clits:1,cnut:1,cock:1,"cock-sucker":1,cockface:1,cockhead:1,cockmunch:1,cockmuncher:1,cocks:1,cocksuck:1,cocksucked:1,cocksucker:1,cocksucking:1,cocksucks:1,cocksuka:1,cocksukka:1,cok:1,cokmuncher:1,coksucka:1,coon:1,cox:1,crap:1,cum:1,cummer:1,cumming:1,cums:1,cumshot:1,cunilingus:1,cunillingus:1,cunnilingus:1,cunt:1,cuntlick:1,cuntlicker:1,cuntlicking:1,cunts:1,cyalis:1,cyberfuc:1,cyberfuck:1,cyberfucked:1,cyberfucker:1,cyberfuckers:1,cyberfucking:1,d1ck:1,damn:1,dick:1,dickhead:1,dildo:1,dildos:1,dink:1,dinks:1,dirsa:1,dlck:1,"dog-fucker":1,doggin:1,dogging:1,donkeyribber:1,doosh:1,duche:1,dyke:1,ejaculate:1,ejaculated:1,ejaculates:1,ejaculating:1,ejaculatings:1,ejaculation:1,ejakulate:1,"f u c k":1,"f u c k e r":1,f4nny:1,fag:1,fagging:1,faggitt:1,faggot:1,faggs:1,fagot:1,fagots:1,fags:1,fanny:1,fannyflaps:1,fannyfucker:1,fanyy:1,fatass:1,fcuk:1,fcuker:1,fcuking:1,feck:1,fecker:1,felching:1,fellate:1,fellatio:1,fingerfuck:1,fingerfucked:1,fingerfucker:1,fingerfuckers:1,fingerfucking:1,fingerfucks:1,fistfuck:1,fistfucked:1,fistfucker:1,fistfuckers:1,fistfucking:1,fistfuckings:1,fistfucks:1,flange:1,fook:1,fooker:1,fuck:1,fucka:1,fucked:1,fucker:1,fuckers:1,fuckhead:1,fuckheads:1,fuckin:1,fucking:1,fuckings:1,fuckingshitmotherfucker:1,fuckme:1,fucks:1,fuckwhit:1,fuckwit:1,"fudge packer":1,fudgepacker:1,fuk:1,fuker:1,fukker:1,fukkin:1,fuks:1,fukwhit:1,fukwit:1,fux:1,fux0r:1,f_u_c_k:1,gangbang:1,gangbanged:1,gangbangs:1,gaylord:1,gaysex:1,goatse:1,God:1,"god-dam":1,"god-damned":1,goddamn:1,goddamned:1,hardcoresex:1,hell:1,heshe:1,hoar:1,hoare:1,hoer:1,homo:1,hore:1,horniest:1,horny:1,hotsex:1,"jack-off":1,jackoff:1,jap:1,"jerk-off":1,jism:1,jiz:1,jizm:1,jizz:1,kawk:1,knob:1,knobead:1,knobed:1,knobend:1,knobhead:1,knobjocky:1,knobjokey:1,kock:1,kondum:1,kondums:1,kum:1,kummer:1,kumming:1,kums:1,kunilingus:1,"l3i+ch":1,l3itch:1,labia:1,lust:1,lusting:1,m0f0:1,m0fo:1,m45terbate:1,ma5terb8:1,ma5terbate:1,masochist:1,"master-bate":1,masterb8:1,"masterbat*":1,masterbat3:1,masterbate:1,masterbation:1,masterbations:1,masturbate:1,"mo-fo":1,mof0:1,mofo:1,mothafuck:1,mothafucka:1,mothafuckas:1,mothafuckaz:1,mothafucked:1,mothafucker:1,mothafuckers:1,mothafuckin:1,mothafucking:1,mothafuckings:1,mothafucks:1,"mother fucker":1,motherfuck:1,motherfucked:1,motherfucker:1,motherfuckers:1,motherfuckin:1,motherfucking:1,motherfuckings:1,motherfuckka:1,motherfucks:1,muff:1,mutha:1,muthafecker:1,muthafuckker:1,muther:1,mutherfucker:1,n1gga:1,n1gger:1,nazi:1,nigg3r:1,nigg4h:1,nigga:1,niggah:1,niggas:1,niggaz:1,nigger:1,niggers:1,nob:1,"nob jokey":1,nobhead:1,nobjocky:1,nobjokey:1,numbnuts:1,nutsack:1,orgasim:1,orgasims:1,orgasm:1,orgasms:1,p0rn:1,pawn:1,pecker:1,penis:1,penisfucker:1,phonesex:1,phuck:1,phuk:1,phuked:1,phuking:1,phukked:1,phukking:1,phuks:1,phuq:1,pigfucker:1,pimpis:1,piss:1,pissed:1,pisser:1,pissers:1,pisses:1,pissflaps:1,pissin:1,pissing:1,pissoff:1,poop:1,porn:1,porno:1,pornography:1,pornos:1,prick:1,pricks:1,pron:1,pube:1,pusse:1,pussi:1,pussies:1,pussy:1,pussys:1,rectum:1,retard:1,rimjaw:1,rimming:1,"s hit":1,"s.o.b.":1,sadist:1,schlong:1,screwing:1,scroat:1,scrote:1,scrotum:1,semen:1,sex:1,"sh!+":1,"sh!t":1,sh1t:1,shag:1,shagger:1,shaggin:1,shagging:1,shemale:1,"shi+":1,shit:1,shitdick:1,shite:1,shited:1,shitey:1,shitfuck:1,shitfull:1,shithead:1,shiting:1,shitings:1,shits:1,shitted:1,shitter:1,shitters:1,shitting:1,shittings:1,shitty:1,skank:1,slut:1,sluts:1,smegma:1,smut:1,snatch:1,"son-of-a-bitch":1,spac:1,spunk:1,s_h_i_t:1,t1tt1e5:1,t1tties:1,teets:1,teez:1,testical:1,testicle:1,tit:1,titfuck:1,tits:1,titt:1,tittie5:1,tittiefucker:1,titties:1,tittyfuck:1,tittywank:1,titwank:1,tosser:1,turd:1,tw4t:1,twat:1,twathead:1,twatty:1,twunt:1,twunter:1,v14gra:1,v1gra:1,vagina:1,viagra:1,vulva:1,w00se:1,wang:1,wank:1,wanker:1,wanky:1,whoar:1,whore:1,willies:1,willy:1,xrated:1,xxx:1}});var CH=Ye((Alt,wH)=>{"use strict";wH.exports=["4r5e","5h1t","5hit","a55","anal","anus","ar5e","arrse","arse","ass","ass-fucker","asses","assfucker","assfukka","asshole","assholes","asswhole","a_s_s","b!tch","b00bs","b17ch","b1tch","ballbag","balls","ballsack","bastard","beastial","beastiality","bellend","bestial","bestiality","bi+ch","biatch","bitch","bitcher","bitchers","bitches","bitchin","bitching","bloody","blow job","blowjob","blowjobs","boiolas","bollock","bollok","boner","boob","boobs","booobs","boooobs","booooobs","booooooobs","breasts","buceta","bugger","bum","bunny fucker","butt","butthole","buttmuch","buttplug","c0ck","c0cksucker","carpet muncher","cawk","chink","cipa","cl1t","clit","clitoris","clits","cnut","cock","cock-sucker","cockface","cockhead","cockmunch","cockmuncher","cocks","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cok","cokmuncher","coksucka","coon","cox","crap","cum","cummer","cumming","cums","cumshot","cunilingus","cunillingus","cunnilingus","cunt","cuntlick","cuntlicker","cuntlicking","cunts","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","d1ck","damn","dick","dickhead","dildo","dildos","dink","dinks","dirsa","dlck","dog-fucker","doggin","dogging","donkeyribber","doosh","duche","dyke","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejakulate","f u c k","f u c k e r","f4nny","fag","fagging","faggitt","faggot","faggs","fagot","fagots","fags","fanny","fannyflaps","fannyfucker","fanyy","fatass","fcuk","fcuker","fcuking","feck","fecker","felching","fellate","fellatio","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","flange","fook","fooker","fuck","fucka","fucked","fucker","fuckers","fuckhead","fuckheads","fuckin","fucking","fuckings","fuckingshitmotherfucker","fuckme","fucks","fuckwhit","fuckwit","fudge packer","fudgepacker","fuk","fuker","fukker","fukkin","fuks","fukwhit","fukwit","fux","fux0r","f_u_c_k","gangbang","gangbanged","gangbangs","gaylord","gaysex","goatse","God","god-dam","god-damned","goddamn","goddamned","hardcoresex","hell","heshe","hoar","hoare","hoer","homo","hore","horniest","horny","hotsex","jack-off","jackoff","jap","jerk-off","jism","jiz","jizm","jizz","kawk","knob","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","kock","kondum","kondums","kum","kummer","kumming","kums","kunilingus","l3i+ch","l3itch","labia","lust","lusting","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","masochist","master-bate","masterb8","masterbat*","masterbat3","masterbate","masterbation","masterbations","masturbate","mo-fo","mof0","mofo","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","motherfuck","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","muff","mutha","muthafecker","muthafuckker","muther","mutherfucker","n1gga","n1gger","nazi","nigg3r","nigg4h","nigga","niggah","niggas","niggaz","nigger","niggers","nob","nob jokey","nobhead","nobjocky","nobjokey","numbnuts","nutsack","orgasim","orgasims","orgasm","orgasms","p0rn","pawn","pecker","penis","penisfucker","phonesex","phuck","phuk","phuked","phuking","phukked","phukking","phuks","phuq","pigfucker","pimpis","piss","pissed","pisser","pissers","pisses","pissflaps","pissin","pissing","pissoff","poop","porn","porno","pornography","pornos","prick","pricks","pron","pube","pusse","pussi","pussies","pussy","pussys","rectum","retard","rimjaw","rimming","s hit","s.o.b.","sadist","schlong","screwing","scroat","scrote","scrotum","semen","sex","sh!+","sh!t","sh1t","shag","shagger","shaggin","shagging","shemale","shi+","shit","shitdick","shite","shited","shitey","shitfuck","shitfull","shithead","shiting","shitings","shits","shitted","shitter","shitters","shitting","shittings","shitty","skank","slut","sluts","smegma","smut","snatch","son-of-a-bitch","spac","spunk","s_h_i_t","t1tt1e5","t1tties","teets","teez","testical","testicle","tit","titfuck","tits","titt","tittie5","tittiefucker","titties","tittyfuck","tittywank","titwank","tosser","turd","tw4t","twat","twathead","twatty","twunt","twunter","v14gra","v1gra","vagina","viagra","vulva","w00se","wang","wank","wanker","wanky","whoar","whore","willies","willy","xrated","xxx"]});var SH=Ye((Ilt,TH)=>{"use strict";TH.exports=/\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi});var DH=Ye((Rlt,EH)=>{"use strict";EH.exports={object:_H(),array:CH(),regex:SH()}});var AH=Ye((Plt,MH)=>{"use strict";var mwe=xH().words,pwe=DH().array,Pk=class{constructor(i={}){Object.assign(this,{list:i.emptyList&&[]||Array.prototype.concat.apply(mwe,[pwe,i.list||[]]),exclude:i.exclude||[],splitRegex:i.splitRegex||/\b/,placeHolder:i.placeHolder||"*",regex:i.regex||/[^a-zA-Z0-9|\$|\@]|\^/g,replaceRegex:i.replaceRegex||/\w/g})}isProfane(i){return this.list.filter(e=>{let r=new RegExp(`\\b${e.replace(/(\W)/g,"\\$1")}\\b`,"gi");return!this.exclude.includes(e.toLowerCase())&&r.test(i)}).length>0||!1}replaceWord(i){return i.replace(this.regex,"").replace(this.replaceRegex,this.placeHolder)}clean(i){return i.split(this.splitRegex).map(e=>this.isProfane(e)?this.replaceWord(e):e).join(this.splitRegex.exec(i)[0])}addWords(){let i=Array.from(arguments);this.list.push(...i),i.map(e=>e.toLowerCase()).forEach(e=>{this.exclude.includes(e)&&this.exclude.splice(this.exclude.indexOf(e),1)})}removeWords(){this.exclude.push(...Array.from(arguments).map(i=>i.toLowerCase()))}};MH.exports=Pk});var FH=Ye((Llt,kH)=>{"use strict";function Gwe(){this.__data__=[],this.size=0}kH.exports=Gwe});var kk=Ye((Nlt,OH)=>{"use strict";function Hwe(t,i){return t===i||t!==t&&i!==i}OH.exports=Hwe});var Qv=Ye((Blt,LH)=>{"use strict";var jwe=kk();function Wwe(t,i){for(var e=t.length;e--;)if(jwe(t[e][0],i))return e;return-1}LH.exports=Wwe});var BH=Ye((Vlt,NH)=>{"use strict";var Xwe=Qv(),Ywe=Array.prototype,$we=Ywe.splice;function Qwe(t){var i=this.__data__,e=Xwe(i,t);if(e<0)return!1;var r=i.length-1;return e==r?i.pop():$we.call(i,e,1),--this.size,!0}NH.exports=Qwe});var UH=Ye((Ult,VH)=>{"use strict";var Kwe=Qv();function Zwe(t){var i=this.__data__,e=Kwe(i,t);return e<0?void 0:i[e][1]}VH.exports=Zwe});var GH=Ye((zlt,zH)=>{"use strict";var Jwe=Qv();function qwe(t){return Jwe(this.__data__,t)>-1}zH.exports=qwe});var jH=Ye((Glt,HH)=>{"use strict";var eCe=Qv();function tCe(t,i){var e=this.__data__,r=eCe(e,t);return r<0?(++this.size,e.push([t,i])):e[r][1]=i,this}HH.exports=tCe});var Kv=Ye((Hlt,WH)=>{"use strict";var iCe=FH(),nCe=BH(),rCe=UH(),sCe=GH(),aCe=jH();function Dp(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i{"use strict";var oCe=Kv();function lCe(){this.__data__=new oCe,this.size=0}XH.exports=lCe});var QH=Ye((Wlt,$H)=>{"use strict";function cCe(t){var i=this.__data__,e=i.delete(t);return this.size=i.size,e}$H.exports=cCe});var ZH=Ye((Xlt,KH)=>{"use strict";function dCe(t){return this.__data__.get(t)}KH.exports=dCe});var qH=Ye((Ylt,JH)=>{"use strict";function uCe(t){return this.__data__.has(t)}JH.exports=uCe});var Fk=Ye(($lt,ej)=>{"use strict";var hCe=typeof global=="object"&&global&&global.Object===Object&&global;ej.exports=hCe});var gl=Ye((Qlt,tj)=>{"use strict";var fCe=Fk(),mCe=typeof self=="object"&&self&&self.Object===Object&&self,pCe=fCe||mCe||Function("return this")();tj.exports=pCe});var GC=Ye((Klt,ij)=>{"use strict";var gCe=gl(),vCe=gCe.Symbol;ij.exports=vCe});var aj=Ye((Zlt,sj)=>{"use strict";var nj=GC(),rj=Object.prototype,yCe=rj.hasOwnProperty,xCe=rj.toString,Zv=nj?nj.toStringTag:void 0;function bCe(t){var i=yCe.call(t,Zv),e=t[Zv];try{t[Zv]=void 0;var r=!0}catch{}var n=xCe.call(t);return r&&(i?t[Zv]=e:delete t[Zv]),n}sj.exports=bCe});var lj=Ye((Jlt,oj)=>{"use strict";var _Ce=Object.prototype,wCe=_Ce.toString;function CCe(t){return wCe.call(t)}oj.exports=CCe});var Jv=Ye((qlt,uj)=>{"use strict";var cj=GC(),TCe=aj(),SCe=lj(),ECe="[object Null]",DCe="[object Undefined]",dj=cj?cj.toStringTag:void 0;function MCe(t){return t==null?t===void 0?DCe:ECe:dj&&dj in Object(t)?TCe(t):SCe(t)}uj.exports=MCe});var Mp=Ye((ect,hj)=>{"use strict";function ACe(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}hj.exports=ACe});var Ok=Ye((tct,fj)=>{"use strict";var ICe=Jv(),RCe=Mp(),PCe="[object AsyncFunction]",kCe="[object Function]",FCe="[object GeneratorFunction]",OCe="[object Proxy]";function LCe(t){if(!RCe(t))return!1;var i=ICe(t);return i==kCe||i==FCe||i==PCe||i==OCe}fj.exports=LCe});var pj=Ye((ict,mj)=>{"use strict";var NCe=gl(),BCe=NCe["__core-js_shared__"];mj.exports=BCe});var yj=Ye((nct,vj)=>{"use strict";var Lk=pj(),gj=function(){var t=/[^.]+$/.exec(Lk&&Lk.keys&&Lk.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function VCe(t){return!!gj&&gj in t}vj.exports=VCe});var Nk=Ye((rct,xj)=>{"use strict";var UCe=Function.prototype,zCe=UCe.toString;function GCe(t){if(t!=null){try{return zCe.call(t)}catch{}try{return t+""}catch{}}return""}xj.exports=GCe});var _j=Ye((sct,bj)=>{"use strict";var HCe=Ok(),jCe=yj(),WCe=Mp(),XCe=Nk(),YCe=/[\\^$.*+?()[\]{}|]/g,$Ce=/^\[object .+?Constructor\]$/,QCe=Function.prototype,KCe=Object.prototype,ZCe=QCe.toString,JCe=KCe.hasOwnProperty,qCe=RegExp("^"+ZCe.call(JCe).replace(YCe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eTe(t){if(!WCe(t)||jCe(t))return!1;var i=HCe(t)?qCe:$Ce;return i.test(XCe(t))}bj.exports=eTe});var Cj=Ye((act,wj)=>{"use strict";function tTe(t,i){return t?.[i]}wj.exports=tTe});var du=Ye((oct,Tj)=>{"use strict";var iTe=_j(),nTe=Cj();function rTe(t,i){var e=nTe(t,i);return iTe(e)?e:void 0}Tj.exports=rTe});var HC=Ye((lct,Sj)=>{"use strict";var sTe=du(),aTe=gl(),oTe=sTe(aTe,"Map");Sj.exports=oTe});var qv=Ye((cct,Ej)=>{"use strict";var lTe=du(),cTe=lTe(Object,"create");Ej.exports=cTe});var Aj=Ye((dct,Mj)=>{"use strict";var Dj=qv();function dTe(){this.__data__=Dj?Dj(null):{},this.size=0}Mj.exports=dTe});var Rj=Ye((uct,Ij)=>{"use strict";function uTe(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}Ij.exports=uTe});var kj=Ye((hct,Pj)=>{"use strict";var hTe=qv(),fTe="__lodash_hash_undefined__",mTe=Object.prototype,pTe=mTe.hasOwnProperty;function gTe(t){var i=this.__data__;if(hTe){var e=i[t];return e===fTe?void 0:e}return pTe.call(i,t)?i[t]:void 0}Pj.exports=gTe});var Oj=Ye((fct,Fj)=>{"use strict";var vTe=qv(),yTe=Object.prototype,xTe=yTe.hasOwnProperty;function bTe(t){var i=this.__data__;return vTe?i[t]!==void 0:xTe.call(i,t)}Fj.exports=bTe});var Nj=Ye((mct,Lj)=>{"use strict";var _Te=qv(),wTe="__lodash_hash_undefined__";function CTe(t,i){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=_Te&&i===void 0?wTe:i,this}Lj.exports=CTe});var Vj=Ye((pct,Bj)=>{"use strict";var TTe=Aj(),STe=Rj(),ETe=kj(),DTe=Oj(),MTe=Nj();function Ap(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i{"use strict";var Uj=Vj(),ATe=Kv(),ITe=HC();function RTe(){this.size=0,this.__data__={hash:new Uj,map:new(ITe||ATe),string:new Uj}}zj.exports=RTe});var jj=Ye((vct,Hj)=>{"use strict";function PTe(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}Hj.exports=PTe});var ey=Ye((yct,Wj)=>{"use strict";var kTe=jj();function FTe(t,i){var e=t.__data__;return kTe(i)?e[typeof i=="string"?"string":"hash"]:e.map}Wj.exports=FTe});var Yj=Ye((xct,Xj)=>{"use strict";var OTe=ey();function LTe(t){var i=OTe(this,t).delete(t);return this.size-=i?1:0,i}Xj.exports=LTe});var Qj=Ye((bct,$j)=>{"use strict";var NTe=ey();function BTe(t){return NTe(this,t).get(t)}$j.exports=BTe});var Zj=Ye((_ct,Kj)=>{"use strict";var VTe=ey();function UTe(t){return VTe(this,t).has(t)}Kj.exports=UTe});var qj=Ye((wct,Jj)=>{"use strict";var zTe=ey();function GTe(t,i){var e=zTe(this,t),r=e.size;return e.set(t,i),this.size+=e.size==r?0:1,this}Jj.exports=GTe});var tW=Ye((Cct,eW)=>{"use strict";var HTe=Gj(),jTe=Yj(),WTe=Qj(),XTe=Zj(),YTe=qj();function Ip(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i{"use strict";var $Te=Kv(),QTe=HC(),KTe=tW(),ZTe=200;function JTe(t,i){var e=this.__data__;if(e instanceof $Te){var r=e.__data__;if(!QTe||r.length{"use strict";var qTe=Kv(),eSe=YH(),tSe=QH(),iSe=ZH(),nSe=qH(),rSe=nW();function Rp(t){var i=this.__data__=new qTe(t);this.size=i.size}Rp.prototype.clear=eSe;Rp.prototype.delete=tSe;Rp.prototype.get=iSe;Rp.prototype.has=nSe;Rp.prototype.set=rSe;rW.exports=Rp});var oW=Ye((Ect,aW)=>{"use strict";function sSe(t,i){for(var e=-1,r=t==null?0:t.length;++e{"use strict";var aSe=du(),oSe=function(){try{var t=aSe(Object,"defineProperty");return t({},"",{}),t}catch{}}();lW.exports=oSe});var Bk=Ye((Mct,uW)=>{"use strict";var dW=cW();function lSe(t,i,e){i=="__proto__"&&dW?dW(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}uW.exports=lSe});var Vk=Ye((Act,hW)=>{"use strict";var cSe=Bk(),dSe=kk(),uSe=Object.prototype,hSe=uSe.hasOwnProperty;function fSe(t,i,e){var r=t[i];(!(hSe.call(t,i)&&dSe(r,e))||e===void 0&&!(i in t))&&cSe(t,i,e)}hW.exports=fSe});var ty=Ye((Ict,fW)=>{"use strict";var mSe=Vk(),pSe=Bk();function gSe(t,i,e,r){var n=!e;e||(e={});for(var a=-1,s=i.length;++a{"use strict";function vSe(t,i){for(var e=-1,r=Array(t);++e{"use strict";function ySe(t){return t!=null&&typeof t=="object"}gW.exports=ySe});var yW=Ye((kct,vW)=>{"use strict";var xSe=Jv(),bSe=Pp(),_Se="[object Arguments]";function wSe(t){return bSe(t)&&xSe(t)==_Se}vW.exports=wSe});var wW=Ye((Fct,_W)=>{"use strict";var xW=yW(),CSe=Pp(),bW=Object.prototype,TSe=bW.hasOwnProperty,SSe=bW.propertyIsEnumerable,ESe=xW(function(){return arguments}())?xW:function(t){return CSe(t)&&TSe.call(t,"callee")&&!SSe.call(t,"callee")};_W.exports=ESe});var jC=Ye((Oct,CW)=>{"use strict";var DSe=Array.isArray;CW.exports=DSe});var SW=Ye((Lct,TW)=>{"use strict";function MSe(){return!1}TW.exports=MSe});var Uk=Ye((iy,kp)=>{"use strict";var ASe=gl(),ISe=SW(),MW=typeof iy=="object"&&iy&&!iy.nodeType&&iy,EW=MW&&typeof kp=="object"&&kp&&!kp.nodeType&&kp,RSe=EW&&EW.exports===MW,DW=RSe?ASe.Buffer:void 0,PSe=DW?DW.isBuffer:void 0,kSe=PSe||ISe;kp.exports=kSe});var IW=Ye((Nct,AW)=>{"use strict";var FSe=9007199254740991,OSe=/^(?:0|[1-9]\d*)$/;function LSe(t,i){var e=typeof t;return i=i??FSe,!!i&&(e=="number"||e!="symbol"&&OSe.test(t))&&t>-1&&t%1==0&&t{"use strict";var NSe=9007199254740991;function BSe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=NSe}RW.exports=BSe});var kW=Ye((Vct,PW)=>{"use strict";var VSe=Jv(),USe=zk(),zSe=Pp(),GSe="[object Arguments]",HSe="[object Array]",jSe="[object Boolean]",WSe="[object Date]",XSe="[object Error]",YSe="[object Function]",$Se="[object Map]",QSe="[object Number]",KSe="[object Object]",ZSe="[object RegExp]",JSe="[object Set]",qSe="[object String]",eEe="[object WeakMap]",tEe="[object ArrayBuffer]",iEe="[object DataView]",nEe="[object Float32Array]",rEe="[object Float64Array]",sEe="[object Int8Array]",aEe="[object Int16Array]",oEe="[object Int32Array]",lEe="[object Uint8Array]",cEe="[object Uint8ClampedArray]",dEe="[object Uint16Array]",uEe="[object Uint32Array]",$n={};$n[nEe]=$n[rEe]=$n[sEe]=$n[aEe]=$n[oEe]=$n[lEe]=$n[cEe]=$n[dEe]=$n[uEe]=!0;$n[GSe]=$n[HSe]=$n[tEe]=$n[jSe]=$n[iEe]=$n[WSe]=$n[XSe]=$n[YSe]=$n[$Se]=$n[QSe]=$n[KSe]=$n[ZSe]=$n[JSe]=$n[qSe]=$n[eEe]=!1;function hEe(t){return zSe(t)&&USe(t.length)&&!!$n[VSe(t)]}PW.exports=hEe});var WC=Ye((Uct,FW)=>{"use strict";function fEe(t){return function(i){return t(i)}}FW.exports=fEe});var XC=Ye((ny,Fp)=>{"use strict";var mEe=Fk(),OW=typeof ny=="object"&&ny&&!ny.nodeType&&ny,ry=OW&&typeof Fp=="object"&&Fp&&!Fp.nodeType&&Fp,pEe=ry&&ry.exports===OW,Gk=pEe&&mEe.process,gEe=function(){try{var t=ry&&ry.require&&ry.require("util").types;return t||Gk&&Gk.binding&&Gk.binding("util")}catch{}}();Fp.exports=gEe});var VW=Ye((zct,BW)=>{"use strict";var vEe=kW(),yEe=WC(),LW=XC(),NW=LW&&LW.isTypedArray,xEe=NW?yEe(NW):vEe;BW.exports=xEe});var Hk=Ye((Gct,UW)=>{"use strict";var bEe=pW(),_Ee=wW(),wEe=jC(),CEe=Uk(),TEe=IW(),SEe=VW(),EEe=Object.prototype,DEe=EEe.hasOwnProperty;function MEe(t,i){var e=wEe(t),r=!e&&_Ee(t),n=!e&&!r&&CEe(t),a=!e&&!r&&!n&&SEe(t),s=e||r||n||a,o=s?bEe(t.length,String):[],d=o.length;for(var l in t)(i||DEe.call(t,l))&&!(s&&(l=="length"||n&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||TEe(l,d)))&&o.push(l);return o}UW.exports=MEe});var YC=Ye((Hct,zW)=>{"use strict";var AEe=Object.prototype;function IEe(t){var i=t&&t.constructor,e=typeof i=="function"&&i.prototype||AEe;return t===e}zW.exports=IEe});var jk=Ye((jct,GW)=>{"use strict";function REe(t,i){return function(e){return t(i(e))}}GW.exports=REe});var jW=Ye((Wct,HW)=>{"use strict";var PEe=jk(),kEe=PEe(Object.keys,Object);HW.exports=kEe});var XW=Ye((Xct,WW)=>{"use strict";var FEe=YC(),OEe=jW(),LEe=Object.prototype,NEe=LEe.hasOwnProperty;function BEe(t){if(!FEe(t))return OEe(t);var i=[];for(var e in Object(t))NEe.call(t,e)&&e!="constructor"&&i.push(e);return i}WW.exports=BEe});var Wk=Ye((Yct,YW)=>{"use strict";var VEe=Ok(),UEe=zk();function zEe(t){return t!=null&&UEe(t.length)&&!VEe(t)}YW.exports=zEe});var $C=Ye(($ct,$W)=>{"use strict";var GEe=Hk(),HEe=XW(),jEe=Wk();function WEe(t){return jEe(t)?GEe(t):HEe(t)}$W.exports=WEe});var KW=Ye((Qct,QW)=>{"use strict";var XEe=ty(),YEe=$C();function $Ee(t,i){return t&&XEe(i,YEe(i),t)}QW.exports=$Ee});var JW=Ye((Kct,ZW)=>{"use strict";function QEe(t){var i=[];if(t!=null)for(var e in Object(t))i.push(e);return i}ZW.exports=QEe});var eX=Ye((Zct,qW)=>{"use strict";var KEe=Mp(),ZEe=YC(),JEe=JW(),qEe=Object.prototype,e2e=qEe.hasOwnProperty;function t2e(t){if(!KEe(t))return JEe(t);var i=ZEe(t),e=[];for(var r in t)r=="constructor"&&(i||!e2e.call(t,r))||e.push(r);return e}qW.exports=t2e});var QC=Ye((Jct,tX)=>{"use strict";var i2e=Hk(),n2e=eX(),r2e=Wk();function s2e(t){return r2e(t)?i2e(t,!0):n2e(t)}tX.exports=s2e});var nX=Ye((qct,iX)=>{"use strict";var a2e=ty(),o2e=QC();function l2e(t,i){return t&&a2e(i,o2e(i),t)}iX.exports=l2e});var lX=Ye((sy,Op)=>{"use strict";var c2e=gl(),oX=typeof sy=="object"&&sy&&!sy.nodeType&&sy,rX=oX&&typeof Op=="object"&&Op&&!Op.nodeType&&Op,d2e=rX&&rX.exports===oX,sX=d2e?c2e.Buffer:void 0,aX=sX?sX.allocUnsafe:void 0;function u2e(t,i){if(i)return t.slice();var e=t.length,r=aX?aX(e):new t.constructor(e);return t.copy(r),r}Op.exports=u2e});var dX=Ye((edt,cX)=>{"use strict";function h2e(t,i){var e=-1,r=t.length;for(i||(i=Array(r));++e{"use strict";function f2e(t,i){for(var e=-1,r=t==null?0:t.length,n=0,a=[];++e{"use strict";function m2e(){return[]}fX.exports=m2e});var KC=Ye((ndt,pX)=>{"use strict";var p2e=hX(),g2e=Xk(),v2e=Object.prototype,y2e=v2e.propertyIsEnumerable,mX=Object.getOwnPropertySymbols,x2e=mX?function(t){return t==null?[]:(t=Object(t),p2e(mX(t),function(i){return y2e.call(t,i)}))}:g2e;pX.exports=x2e});var vX=Ye((rdt,gX)=>{"use strict";var b2e=ty(),_2e=KC();function w2e(t,i){return b2e(t,_2e(t),i)}gX.exports=w2e});var Yk=Ye((sdt,yX)=>{"use strict";function C2e(t,i){for(var e=-1,r=i.length,n=t.length;++e{"use strict";var T2e=jk(),S2e=T2e(Object.getPrototypeOf,Object);xX.exports=S2e});var Qk=Ye((odt,bX)=>{"use strict";var E2e=Yk(),D2e=$k(),M2e=KC(),A2e=Xk(),I2e=Object.getOwnPropertySymbols,R2e=I2e?function(t){for(var i=[];t;)E2e(i,M2e(t)),t=D2e(t);return i}:A2e;bX.exports=R2e});var wX=Ye((ldt,_X)=>{"use strict";var P2e=ty(),k2e=Qk();function F2e(t,i){return P2e(t,k2e(t),i)}_X.exports=F2e});var Kk=Ye((cdt,CX)=>{"use strict";var O2e=Yk(),L2e=jC();function N2e(t,i,e){var r=i(t);return L2e(t)?r:O2e(r,e(t))}CX.exports=N2e});var SX=Ye((ddt,TX)=>{"use strict";var B2e=Kk(),V2e=KC(),U2e=$C();function z2e(t){return B2e(t,U2e,V2e)}TX.exports=z2e});var DX=Ye((udt,EX)=>{"use strict";var G2e=Kk(),H2e=Qk(),j2e=QC();function W2e(t){return G2e(t,j2e,H2e)}EX.exports=W2e});var AX=Ye((hdt,MX)=>{"use strict";var X2e=du(),Y2e=gl(),$2e=X2e(Y2e,"DataView");MX.exports=$2e});var RX=Ye((fdt,IX)=>{"use strict";var Q2e=du(),K2e=gl(),Z2e=Q2e(K2e,"Promise");IX.exports=Z2e});var kX=Ye((mdt,PX)=>{"use strict";var J2e=du(),q2e=gl(),eDe=J2e(q2e,"Set");PX.exports=eDe});var OX=Ye((pdt,FX)=>{"use strict";var tDe=du(),iDe=gl(),nDe=tDe(iDe,"WeakMap");FX.exports=nDe});var ZC=Ye((gdt,GX)=>{"use strict";var Zk=AX(),Jk=HC(),qk=RX(),eF=kX(),tF=OX(),zX=Jv(),Lp=Nk(),LX="[object Map]",rDe="[object Object]",NX="[object Promise]",BX="[object Set]",VX="[object WeakMap]",UX="[object DataView]",sDe=Lp(Zk),aDe=Lp(Jk),oDe=Lp(qk),lDe=Lp(eF),cDe=Lp(tF),Hh=zX;(Zk&&Hh(new Zk(new ArrayBuffer(1)))!=UX||Jk&&Hh(new Jk)!=LX||qk&&Hh(qk.resolve())!=NX||eF&&Hh(new eF)!=BX||tF&&Hh(new tF)!=VX)&&(Hh=function(t){var i=zX(t),e=i==rDe?t.constructor:void 0,r=e?Lp(e):"";if(r)switch(r){case sDe:return UX;case aDe:return LX;case oDe:return NX;case lDe:return BX;case cDe:return VX}return i});GX.exports=Hh});var jX=Ye((vdt,HX)=>{"use strict";var dDe=Object.prototype,uDe=dDe.hasOwnProperty;function hDe(t){var i=t.length,e=new t.constructor(i);return i&&typeof t[0]=="string"&&uDe.call(t,"index")&&(e.index=t.index,e.input=t.input),e}HX.exports=hDe});var XX=Ye((ydt,WX)=>{"use strict";var fDe=gl(),mDe=fDe.Uint8Array;WX.exports=mDe});var JC=Ye((xdt,$X)=>{"use strict";var YX=XX();function pDe(t){var i=new t.constructor(t.byteLength);return new YX(i).set(new YX(t)),i}$X.exports=pDe});var KX=Ye((bdt,QX)=>{"use strict";var gDe=JC();function vDe(t,i){var e=i?gDe(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}QX.exports=vDe});var JX=Ye((_dt,ZX)=>{"use strict";var yDe=/\w*$/;function xDe(t){var i=new t.constructor(t.source,yDe.exec(t));return i.lastIndex=t.lastIndex,i}ZX.exports=xDe});var nY=Ye((wdt,iY)=>{"use strict";var qX=GC(),eY=qX?qX.prototype:void 0,tY=eY?eY.valueOf:void 0;function bDe(t){return tY?Object(tY.call(t)):{}}iY.exports=bDe});var sY=Ye((Cdt,rY)=>{"use strict";var _De=JC();function wDe(t,i){var e=i?_De(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}rY.exports=wDe});var oY=Ye((Tdt,aY)=>{"use strict";var CDe=JC(),TDe=KX(),SDe=JX(),EDe=nY(),DDe=sY(),MDe="[object Boolean]",ADe="[object Date]",IDe="[object Map]",RDe="[object Number]",PDe="[object RegExp]",kDe="[object Set]",FDe="[object String]",ODe="[object Symbol]",LDe="[object ArrayBuffer]",NDe="[object DataView]",BDe="[object Float32Array]",VDe="[object Float64Array]",UDe="[object Int8Array]",zDe="[object Int16Array]",GDe="[object Int32Array]",HDe="[object Uint8Array]",jDe="[object Uint8ClampedArray]",WDe="[object Uint16Array]",XDe="[object Uint32Array]";function YDe(t,i,e){var r=t.constructor;switch(i){case LDe:return CDe(t);case MDe:case ADe:return new r(+t);case NDe:return TDe(t,e);case BDe:case VDe:case UDe:case zDe:case GDe:case HDe:case jDe:case WDe:case XDe:return DDe(t,e);case IDe:return new r;case RDe:case FDe:return new r(t);case PDe:return SDe(t);case kDe:return new r;case ODe:return EDe(t)}}aY.exports=YDe});var dY=Ye((Sdt,cY)=>{"use strict";var $De=Mp(),lY=Object.create,QDe=function(){function t(){}return function(i){if(!$De(i))return{};if(lY)return lY(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}();cY.exports=QDe});var hY=Ye((Edt,uY)=>{"use strict";var KDe=dY(),ZDe=$k(),JDe=YC();function qDe(t){return typeof t.constructor=="function"&&!JDe(t)?KDe(ZDe(t)):{}}uY.exports=qDe});var mY=Ye((Ddt,fY)=>{"use strict";var eMe=ZC(),tMe=Pp(),iMe="[object Map]";function nMe(t){return tMe(t)&&eMe(t)==iMe}fY.exports=nMe});var yY=Ye((Mdt,vY)=>{"use strict";var rMe=mY(),sMe=WC(),pY=XC(),gY=pY&&pY.isMap,aMe=gY?sMe(gY):rMe;vY.exports=aMe});var bY=Ye((Adt,xY)=>{"use strict";var oMe=ZC(),lMe=Pp(),cMe="[object Set]";function dMe(t){return lMe(t)&&oMe(t)==cMe}xY.exports=dMe});var TY=Ye((Idt,CY)=>{"use strict";var uMe=bY(),hMe=WC(),_Y=XC(),wY=_Y&&_Y.isSet,fMe=wY?hMe(wY):uMe;CY.exports=fMe});var AY=Ye((Rdt,MY)=>{"use strict";var mMe=sW(),pMe=oW(),gMe=Vk(),vMe=KW(),yMe=nX(),xMe=lX(),bMe=dX(),_Me=vX(),wMe=wX(),CMe=SX(),TMe=DX(),SMe=ZC(),EMe=jX(),DMe=oY(),MMe=hY(),AMe=jC(),IMe=Uk(),RMe=yY(),PMe=Mp(),kMe=TY(),FMe=$C(),OMe=QC(),LMe=1,NMe=2,BMe=4,SY="[object Arguments]",VMe="[object Array]",UMe="[object Boolean]",zMe="[object Date]",GMe="[object Error]",EY="[object Function]",HMe="[object GeneratorFunction]",jMe="[object Map]",WMe="[object Number]",DY="[object Object]",XMe="[object RegExp]",YMe="[object Set]",$Me="[object String]",QMe="[object Symbol]",KMe="[object WeakMap]",ZMe="[object ArrayBuffer]",JMe="[object DataView]",qMe="[object Float32Array]",eAe="[object Float64Array]",tAe="[object Int8Array]",iAe="[object Int16Array]",nAe="[object Int32Array]",rAe="[object Uint8Array]",sAe="[object Uint8ClampedArray]",aAe="[object Uint16Array]",oAe="[object Uint32Array]",Un={};Un[SY]=Un[VMe]=Un[ZMe]=Un[JMe]=Un[UMe]=Un[zMe]=Un[qMe]=Un[eAe]=Un[tAe]=Un[iAe]=Un[nAe]=Un[jMe]=Un[WMe]=Un[DY]=Un[XMe]=Un[YMe]=Un[$Me]=Un[QMe]=Un[rAe]=Un[sAe]=Un[aAe]=Un[oAe]=!0;Un[GMe]=Un[EY]=Un[KMe]=!1;function qC(t,i,e,r,n,a){var s,o=i&LMe,d=i&NMe,l=i&BMe;if(e&&(s=n?e(t,r,n,a):e(t)),s!==void 0)return s;if(!PMe(t))return t;var c=AMe(t);if(c){if(s=EMe(t),!o)return bMe(t,s)}else{var h=SMe(t),u=h==EY||h==HMe;if(IMe(t))return xMe(t,o);if(h==DY||h==SY||u&&!n){if(s=d||u?{}:MMe(t),!o)return d?wMe(t,yMe(s,t)):_Me(t,vMe(s,t))}else{if(!Un[h])return n?t:{};s=DMe(t,h,o)}}a||(a=new mMe);var f=a.get(t);if(f)return f;a.set(t,s),kMe(t)?t.forEach(function(g){s.add(qC(g,i,e,g,t,a))}):RMe(t)&&t.forEach(function(g,v){s.set(v,qC(g,i,e,v,t,a))});var p=l?d?TMe:CMe:d?OMe:FMe,m=c?void 0:p(t);return pMe(m||t,function(g,v){m&&(v=g,g=t[v]),gMe(s,v,qC(g,i,e,v,t,a))}),s}MY.exports=qC});var RY=Ye((Pdt,IY)=>{"use strict";var lAe=AY(),cAe=1,dAe=4;function uAe(t){return lAe(t,cAe|dAe)}IY.exports=uAe});var Dy=Ye((Ey,xO)=>{"use strict";(function(i,e){typeof Ey=="object"&&typeof xO=="object"?xO.exports=e():typeof define=="function"&&define.amd?define("Phaser",[],e):typeof Ey=="object"?Ey.Phaser=e():i.Phaser=e()})(Ey,()=>(()=>{var t={50792:n=>{"use strict";var a=Object.prototype.hasOwnProperty,s="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(s=!1));function d(u,f,p){this.fn=u,this.context=f,this.once=p||!1}function l(u,f,p,m,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new d(p,m||u,g),y=s?s+f:f;return u._events[y]?u._events[y].fn?u._events[y]=[u._events[y],v]:u._events[y].push(v):(u._events[y]=v,u._eventsCount++),u}function c(u,f){--u._eventsCount===0?u._events=new o:delete u._events[f]}function h(){this._events=new o,this._eventsCount=0}h.prototype.eventNames=function(){var f=[],p,m;if(this._eventsCount===0)return f;for(m in p=this._events)a.call(p,m)&&f.push(s?m.slice(1):m);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},h.prototype.listeners=function(f){var p=s?s+f:f,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,v=m.length,y=new Array(v);g{var o=s(38829),d=function(l,c,h,u){for(var f=l[0],p=1;p{var o=s(66979),d=function(l,c,h,u,f){return o(l,"angle",c,h,u,f)};n.exports=d},60757:n=>{var a=function(s,o,d){for(var l=0;l{var a=function(s,o,d){d===void 0&&(d=0);for(var l=d;l{var a=function(s,o,d){d===void 0&&(d=0);for(var l=s.length-1;l>=d;l--){var c=s[l],h=!0;for(var u in o)c[u]!==o[u]&&(h=!1);if(h)return c}return null};n.exports=a},94420:(n,a,s)=>{var o=s(11879),d=s(60461),l=s(95540),c=s(29747),h=s(41481),u=new h({sys:{queueDepthSort:c,events:{once:c}}},0,0,1,1).setOrigin(0,0),f=function(p,m){m===void 0&&(m={});var g=m.hasOwnProperty("width"),v=m.hasOwnProperty("height"),y=l(m,"width",-1),x=l(m,"height",-1),b=l(m,"cellWidth",1),_=l(m,"cellHeight",b),C=l(m,"position",d.TOP_LEFT),w=l(m,"x",0),T=l(m,"y",0),S=0,E=0,D=y*b,A=x*_;u.setPosition(w,T),u.setSize(b,_);for(var M=0;M{var o=s(66979),d=function(l,c,h,u,f){return o(l,"alpha",c,h,u,f)};n.exports=d},67285:(n,a,s)=>{var o=s(66979),d=function(l,c,h,u,f){return o(l,"x",c,h,u,f)};n.exports=d},9074:(n,a,s)=>{var o=s(66979),d=function(l,c,h,u,f,p,m){return h==null&&(h=c),o(l,"x",c,u,p,m),o(l,"y",h,f,p,m)};n.exports=d},75222:(n,a,s)=>{var o=s(66979),d=function(l,c,h,u,f){return o(l,"y",c,h,u,f)};n.exports=d},22983:n=>{var a=function(s,o,d,l){d===void 0&&(d=0),l===void 0&&(l=6.28);for(var c=d,h=(l-d)/s.length,u=o.x,f=o.y,p=o.radius,m=0;m{var a=function(s,o,d,l){d===void 0&&(d=0),l===void 0&&(l=6.28);for(var c=d,h=(l-d)/s.length,u=o.width/2,f=o.height/2,p=0;p{var o=s(15258),d=s(26708),l=function(c,h,u){var f;u?f=d(h,u,c.length):f=o(h,c.length);for(var p=0;p{var o=s(14649),d=s(86003),l=s(49498),c=function(h,u,f){f===void 0&&(f=0);var p=o(u,!1,h.length);f>0?d(p,f):f<0&&l(p,Math.abs(f));for(var m=0;m{var o=s(84993),d=function(l,c,h){var u=o({x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2},h),f=o({x1:c.x2,y1:c.y2,x2:c.x3,y2:c.y3},h),p=o({x1:c.x3,y1:c.y3,x2:c.x1,y2:c.y1},h);u.pop(),f.pop(),p.pop(),u=u.concat(f,p);for(var m=u.length/l.length,g=0,v=0;v{var a=function(s,o,d){for(var l=0;l{var a=function(s,o,d,l,c,h){l===void 0&&(l=0),c===void 0&&(c=0),h===void 0&&(h=1);var u,f=0,p=s.length;if(h===1)for(u=c;u=0;u--)s[u][o]+=d+f*l,f++;return s};n.exports=a},43967:n=>{var a=function(s,o,d,l,c,h){l===void 0&&(l=0),c===void 0&&(c=0),h===void 0&&(h=1);var u,f=0,p=s.length;if(h===1)for(u=c;u=0;u--)s[u][o]=d+f*l,f++;return s};n.exports=a},88926:(n,a,s)=>{var o=s(28176),d=function(l,c){for(var h=0;h{var o=s(24820),d=function(l,c){for(var h=0;h{var o=s(65822),d=function(l,c){for(var h=0;h{var o=s(26597),d=function(l,c){for(var h=0;h{var o=s(90260),d=function(l,c){for(var h=0;h{var o=s(66979),d=function(l,c,h,u,f){return o(l,"rotation",c,h,u,f)};n.exports=d},91051:(n,a,s)=>{var o=s(1163),d=s(20339),l=function(c,h,u){for(var f=h.x,p=h.y,m=0;m{var o=s(1163),d=function(l,c,h,u){var f=c.x,p=c.y;if(u===0)return l;for(var m=0;m{var o=s(66979),d=function(l,c,h,u,f){return o(l,"scaleX",c,h,u,f)};n.exports=d},94868:(n,a,s)=>{var o=s(66979),d=function(l,c,h,u,f,p,m){return h==null&&(h=c),o(l,"scaleX",c,u,p,m),o(l,"scaleY",h,f,p,m)};n.exports=d},95532:(n,a,s)=>{var o=s(66979),d=function(l,c,h,u,f){return o(l,"scaleY",c,h,u,f)};n.exports=d},8689:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f){return o(l,"alpha",c,h,u,f)};n.exports=d},2645:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u){return o(l,"blendMode",c,0,h,u)};n.exports=d},32372:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f){return o(l,"depth",c,h,u,f)};n.exports=d},85373:n=>{var a=function(s,o,d){for(var l=0;l{var o=s(43967),d=function(l,c,h,u,f,p,m){return h==null&&(h=c),o(l,"originX",c,u,p,m),o(l,"originY",h,f,p,m),l.forEach(function(g){g.updateDisplayOrigin()}),l};n.exports=d},79939:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f){return o(l,"rotation",c,h,u,f)};n.exports=d},2699:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f,p,m){return h==null&&(h=c),o(l,"scaleX",c,u,p,m),o(l,"scaleY",h,f,p,m)};n.exports=d},98739:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f){return o(l,"scaleX",c,h,u,f)};n.exports=d},98476:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f){return o(l,"scaleY",c,h,u,f)};n.exports=d},6207:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f,p,m){return h==null&&(h=c),o(l,"scrollFactorX",c,u,p,m),o(l,"scrollFactorY",h,f,p,m)};n.exports=d},6607:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f){return o(l,"scrollFactorX",c,h,u,f)};n.exports=d},72248:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f){return o(l,"scrollFactorY",c,h,u,f)};n.exports=d},14036:n=>{var a=function(s,o,d,l,c){for(var h=0;h{var o=s(43967),d=function(l,c,h,u){return o(l,"visible",c,0,h,u)};n.exports=d},77597:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f){return o(l,"x",c,h,u,f)};n.exports=d},83194:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f,p,m){return h==null&&(h=c),o(l,"x",c,u,p,m),o(l,"y",h,f,p,m)};n.exports=d},67678:(n,a,s)=>{var o=s(43967),d=function(l,c,h,u,f){return o(l,"y",c,h,u,f)};n.exports=d},35850:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u,f){u===void 0&&(u=0),f===void 0&&(f=new o);var p,m,g=l.length;if(g===1)p=l[0].x,m=l[0].y,l[0].x=c,l[0].y=h;else{var v=1,y=0;u===0&&(y=g-1,v=g-2),p=l[y].x,m=l[y].y,l[y].x=c,l[y].y=h;for(var x=0;x=g||v===-1)){var b=l[v],_=b.x,C=b.y;b.x=p,b.y=m,p=_,m=C,u===0?v--:v++}}return f.x=p,f.y=m,f};n.exports=d},8628:(n,a,s)=>{var o=s(33680),d=function(l){return o(l)};n.exports=d},21837:(n,a,s)=>{var o=s(7602),d=function(l,c,h,u,f){f===void 0&&(f=!1);var p=Math.abs(u-h)/l.length,m;if(f)for(m=0;m{var o=s(54261),d=function(l,c,h,u,f){f===void 0&&(f=!1);var p=Math.abs(u-h)/l.length,m;if(f)for(m=0;m{var a=function(s,o,d,l,c){if(c===void 0&&(c=!1),s.length===0)return s;if(s.length===1)return c?s[0][o]+=(l+d)/2:s[0][o]=(l+d)/2,s;var h=Math.abs(l-d)/(s.length-1),u;if(c)for(u=0;u{var a=function(s){for(var o=0;o{var o=s(15994),d=function(l,c,h){h===void 0&&(h=0);for(var u=0;u{n.exports={AlignTo:s(11517),Angle:s(80318),Call:s(60757),GetFirst:s(69927),GetLast:s(32265),GridAlign:s(94420),IncAlpha:s(41721),IncX:s(67285),IncXY:s(9074),IncY:s(75222),PlaceOnCircle:s(22983),PlaceOnEllipse:s(95253),PlaceOnLine:s(88505),PlaceOnRectangle:s(41346),PlaceOnTriangle:s(11575),PlayAnimation:s(29953),PropertyValueInc:s(66979),PropertyValueSet:s(43967),RandomCircle:s(88926),RandomEllipse:s(33286),RandomLine:s(96e3),RandomRectangle:s(28789),RandomTriangle:s(97154),Rotate:s(20510),RotateAround:s(91051),RotateAroundDistance:s(76332),ScaleX:s(61619),ScaleXY:s(94868),ScaleY:s(95532),SetAlpha:s(8689),SetBlendMode:s(2645),SetDepth:s(32372),SetHitArea:s(85373),SetOrigin:s(81583),SetRotation:s(79939),SetScale:s(2699),SetScaleX:s(98739),SetScaleY:s(98476),SetScrollFactor:s(6207),SetScrollFactorX:s(6607),SetScrollFactorY:s(72248),SetTint:s(14036),SetVisible:s(50159),SetX:s(77597),SetXY:s(83194),SetY:s(67678),ShiftPosition:s(35850),Shuffle:s(8628),SmootherStep:s(21910),SmoothStep:s(21837),Spread:s(62054),ToggleVisible:s(79815),WrapInRectangle:s(39665)}},42099:(n,a,s)=>{var o=s(45319),d=s(83419),l=s(74943),c=s(81957),h=s(41138),u=s(35154),f=s(90126),p=new d({initialize:function(g,v,y){this.manager=g,this.key=v,this.type="frame",this.frames=this.getFrames(g.textureManager,u(y,"frames",[]),u(y,"defaultTextureKey",null),u(y,"sortFrames",!0)),this.frameRate=u(y,"frameRate",null),this.duration=u(y,"duration",null),this.msPerFrame,this.skipMissedFrames=u(y,"skipMissedFrames",!0),this.delay=u(y,"delay",0),this.repeat=u(y,"repeat",0),this.repeatDelay=u(y,"repeatDelay",0),this.yoyo=u(y,"yoyo",!1),this.showBeforeDelay=u(y,"showBeforeDelay",!1),this.showOnStart=u(y,"showOnStart",!1),this.hideOnComplete=u(y,"hideOnComplete",!1),this.randomFrame=u(y,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(l.PAUSE_ALL,this.pause,this),this.manager.on(l.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(m,g,v,y){v===null&&y===null?(m.frameRate=24,m.duration=24/g*1e3):v&&y===null?(m.duration=v,m.frameRate=g/(v/1e3)):(m.frameRate=y,m.duration=g/y*1e3),m.msPerFrame=1e3/m.frameRate},addFrame:function(m){return this.addFrameAt(this.frames.length,m)},addFrameAt:function(m,g){var v=this.getFrames(this.manager.textureManager,g);if(v.length>0){if(m===0)this.frames=v.concat(this.frames);else if(m===this.frames.length)this.frames=this.frames.concat(v);else{var y=this.frames.slice(0,m),x=this.frames.slice(m);this.frames=y.concat(v,x)}this.updateFrameSequence()}return this},checkFrame:function(m){return m>=0&&m0){_.isLast=!0,_.nextFrame=x[0],x[0].prevFrame=_;var L=1/(x.length-1);for(w=0;w0?m.inReverse&&m.forward?m.forward=!1:this.repeatAnimation(m):m.complete():this.updateAndGetNextTick(m,g.nextFrame)},handleYoyoFrame:function(m,g){if(g||(g=!1),m.inReverse===!g&&m.repeatCounter>0){(m.repeatDelay===0||m.pendingRepeat)&&(m.forward=g),this.repeatAnimation(m);return}if(m.inReverse!==g&&m.repeatCounter===0){m.complete();return}m.forward=g;var v=g?m.currentFrame.nextFrame:m.currentFrame.prevFrame;this.updateAndGetNextTick(m,v)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(m){var g=m.currentFrame;g.isFirst?m.yoyo?this.handleYoyoFrame(m,!0):m.repeatCounter>0?m.inReverse&&!m.forward?this.repeatAnimation(m):(m.forward=!0,this.repeatAnimation(m)):m.complete():this.updateAndGetNextTick(m,g.prevFrame)},updateAndGetNextTick:function(m,g){m.setCurrentFrame(g),this.getNextTick(m)},removeFrame:function(m){var g=this.frames.indexOf(m);return g!==-1&&this.removeFrameAt(g),this},removeFrameAt:function(m){return this.frames.splice(m,1),this.updateFrameSequence(),this},repeatAnimation:function(m){if(m._pendingStop===2){if(m._pendingStopValue===0)return m.stop();m._pendingStopValue--}m.repeatDelay>0&&!m.pendingRepeat?(m.pendingRepeat=!0,m.accumulator-=m.nextTick,m.nextTick+=m.repeatDelay):(m.repeatCounter--,m.forward?m.setCurrentFrame(m.currentFrame.nextFrame):m.setCurrentFrame(m.currentFrame.prevFrame),m.isPlaying&&(this.getNextTick(m),m.handleRepeat()))},toJSON:function(){var m={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(g){m.frames.push(g.toJSON())}),m},updateFrameSequence:function(){for(var m=this.frames.length,g=1/(m-1),v,y=0;y1?(v.isLast=!0,v.prevFrame=this.frames[m-2],v.nextFrame=this.frames[0]):m>1&&(v.prevFrame=this.frames[y-1],v.nextFrame=this.frames[y+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(l.PAUSE_ALL,this.pause,this),this.manager.off(l.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var m=0;m{var o=s(83419),d=new o({initialize:function(c,h,u,f,p){p===void 0&&(p=!1),this.textureKey=c,this.textureFrame=h,this.index=u,this.frame=f,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=p},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});n.exports=d},60848:(n,a,s)=>{var o=s(42099),d=s(83419),l=s(90330),c=s(50792),h=s(74943),u=s(8443),f=s(95540),p=s(35154),m=s(36383),g=s(20283),v=s(41836),y=new d({Extends:c,initialize:function(b){c.call(this),this.game=b,this.textureManager=null,this.globalTimeScale=1,this.anims=new l,this.mixes=new l,this.paused=!1,this.name="AnimationManager",b.events.once(u.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(u.DESTROY,this.destroy,this)},addMix:function(x,b,_){var C=this.anims,w=this.mixes,T=typeof x=="string"?x:x.key,S=typeof b=="string"?b:b.key;if(C.has(T)&&C.has(S)){var E=w.get(T);E||(E={}),E[S]=_,w.set(T,E)}return this},removeMix:function(x,b){var _=this.mixes,C=typeof x=="string"?x:x.key,w=_.get(C);if(w)if(b){var T=typeof b=="string"?b:b.key;w.hasOwnProperty(T)&&delete w[T]}else b||_.delete(C);return this},getMix:function(x,b){var _=this.mixes,C=typeof x=="string"?x:x.key,w=typeof b=="string"?b:b.key,T=_.get(C);return T&&T.hasOwnProperty(w)?T[w]:0},add:function(x,b){return this.anims.has(x)?(console.warn("Animation key exists: "+x),this):(b.key=x,this.anims.set(x,b),this.emit(h.ADD_ANIMATION,x,b),this)},exists:function(x){return this.anims.has(x)},createFromAseprite:function(x,b,_){var C=[],w=this.game.cache.json.get(x);if(!w)return console.warn("No Aseprite data found for: "+x),C;var T=this,S=p(w,"meta",null),E=p(w,"frames",null);if(S&&E){var D=p(S,"frameTags",[]);D.forEach(function(A){var M=[],R=f(A,"name",null),L=f(A,"from",0),I=f(A,"to",0),O=f(A,"direction","forward");if(R&&(!b||b&&b.indexOf(R)>-1)){for(var N=0,H=L;H<=I;H++){var X=H.toString(),V=E[X];if(V){var z=f(V,"duration",m.MAX_SAFE_INTEGER);M.push({key:x,frame:X,duration:z}),N+=z}}O==="reverse"&&(M=M.reverse());var F={key:R,frames:M,duration:N,yoyo:O==="pingpong"},k;_?_.anims&&(k=_.anims.create(F)):k=T.create(F),k&&C.push(k)}})}return C},create:function(x){var b=x.key,_=!1;return b&&(_=this.get(b),_?console.warn("AnimationManager key already exists: "+b):(_=new o(this,b,x),this.anims.set(b,_),this.emit(h.ADD_ANIMATION,b,_))),_},fromJSON:function(x,b){b===void 0&&(b=!1),b&&this.anims.clear(),typeof x=="string"&&(x=JSON.parse(x));var _=[];if(x.hasOwnProperty("anims")&&Array.isArray(x.anims)){for(var C=0;C{var o=s(42099),d=s(30976),l=s(83419),c=s(90330),h=s(74943),u=s(95540),f=new l({initialize:function(m){this.parent=m,this.animationManager=m.scene.sys.anims,this.animationManager.on(h.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(p){var m=this.parent;if(p===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,m;Array.isArray(p)||(p=[p]);for(var g=0;gy&&(_=0),this.randomFrame&&(_=d(0,y-1));var C=v.frames[_];_===0&&!this.forward&&(C=v.getLastFrame()),this.currentFrame=C}return this.parent},pause:function(p){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),p!==void 0&&this.setCurrentFrame(p),this.parent},resume:function(p){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),p!==void 0&&this.setCurrentFrame(p),this.parent},playAfterDelay:function(p,m){if(!this.isPlaying)this.delayCounter=m,this.play(p,!0);else{var g=this.nextAnim,v=this.nextAnimsQueue;g&&v.unshift(g),this.nextAnim=p,this._pendingStop=1,this._pendingStopValue=m}return this.parent},playAfterRepeat:function(p,m){if(m===void 0&&(m=1),!this.isPlaying)this.play(p);else{var g=this.nextAnim,v=this.nextAnimsQueue;g&&v.unshift(g),this.repeatCounter!==-1&&m>this.repeatCounter&&(m=this.repeatCounter),this.nextAnim=p,this._pendingStop=2,this._pendingStopValue=m}return this.parent},play:function(p,m){m===void 0&&(m=!1);var g=this.currentAnim,v=this.parent,y=typeof p=="string"?p:p.key;if(m&&this.isPlaying&&g.key===y)return v;if(g&&this.isPlaying){var x=this.animationManager.getMix(g.key,p);if(x>0)return this.playAfterDelay(p,x)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(p)},playReverse:function(p,m){m===void 0&&(m=!1);var g=typeof p=="string"?p:p.key;return m&&this.isPlaying&&this.currentAnim.key===g?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(p))},startAnimation:function(p){this.load(p);var m=this.currentAnim,g=this.parent;return m&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,m.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),g},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(h.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(h.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(h.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(h.ANIMATION_COMPLETE,h.ANIMATION_COMPLETE_KEY)},emitEvents:function(p,m){var g=this.currentAnim;if(g){var v=this.currentFrame,y=this.parent,x=v.textureFrame;y.emit(p,g,v,y,x),m&&y.emit(m+g.key,g,v,y,x)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var p=this.currentFrame;if(!p)return 0;var m=p.progress;return this.inReverse&&(m*=-1),m},setProgress:function(p){return this.forward||(p=1-p),this.setCurrentFrame(this.currentAnim.getFrameByProgress(p)),this.parent},setRepeat:function(p){return this.repeatCounter=p===-1?Number.MAX_VALUE:p,this.parent},globalRemove:function(p,m){m===void 0&&(m=this.currentAnim),this.isPlaying&&m.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(p,m){p===void 0&&(p=!1),m===void 0&&(m=!1);var g=this.currentAnim,v=this.parent;return g?(m&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),g.getFirstTick(this),this.emitEvents(h.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!p,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(g.frames[0]),this.parent):v},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var p=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(p)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var p=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(p)}return this.parent},stopAfterDelay:function(p){return this._pendingStop=1,this._pendingStopValue=p,this.parent},stopAfterRepeat:function(p){return p===void 0&&(p=1),this.repeatCounter!==-1&&p>this.repeatCounter&&(p=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=p,this.parent},stopOnFrame:function(p){return this._pendingStop=3,this._pendingStopValue=p,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(p,m){var g=this.currentAnim;if(!(!this.isPlaying||!g||g.paused)){if(this.accumulator+=m*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=m,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?g.nextFrame(this):g.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var v=0;do this.forward?g.nextFrame(this):g.previousFrame(this),v++;while(this.isPlaying&&this.accumulator>this.nextTick&&v<60)}}},setCurrentFrame:function(p){var m=this.parent;return this.currentFrame=p,m.texture=p.frame.texture,m.frame=p.frame,m.isCropped&&m.frame.updateCropUVs(m._crop,m.flipX,m.flipY),p.setAlpha&&(m.alpha=p.alpha),m.setSizeToFrame(),m._originComponent&&(p.frame.customPivot?m.setOrigin(p.frame.pivotX,p.frame.pivotY):m.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(h.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===p&&this.stop()),m},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(p){return this.anims?this.anims.get(p):null},exists:function(p){return this.anims?this.anims.has(p):!1},create:function(p){var m=p.key,g=!1;return m&&(g=this.get(m),g?console.warn("Animation key already exists: "+m):(g=new o(this,m,p),this.anims||(this.anims=new c),this.anims.set(m,g))),g},createFromAseprite:function(p,m){return this.animationManager.createFromAseprite(p,m,this.parent)},generateFrameNames:function(p,m){return this.animationManager.generateFrameNames(p,m)},generateFrameNumbers:function(p,m){return this.animationManager.generateFrameNumbers(p,m)},remove:function(p){var m=this.get(p);return m&&(this.currentAnim===m&&this.stop(),this.anims.delete(p)),m},destroy:function(){this.animationManager.off(h.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});n.exports=f},57090:n=>{n.exports="add"},25312:n=>{n.exports="animationcomplete"},89580:n=>{n.exports="animationcomplete-"},52860:n=>{n.exports="animationrepeat"},63850:n=>{n.exports="animationrestart"},99085:n=>{n.exports="animationstart"},28087:n=>{n.exports="animationstop"},1794:n=>{n.exports="animationupdate"},52562:n=>{n.exports="pauseall"},57953:n=>{n.exports="remove"},68339:n=>{n.exports="resumeall"},74943:(n,a,s)=>{n.exports={ADD_ANIMATION:s(57090),ANIMATION_COMPLETE:s(25312),ANIMATION_COMPLETE_KEY:s(89580),ANIMATION_REPEAT:s(52860),ANIMATION_RESTART:s(63850),ANIMATION_START:s(99085),ANIMATION_STOP:s(28087),ANIMATION_UPDATE:s(1794),PAUSE_ALL:s(52562),REMOVE_ANIMATION:s(57953),RESUME_ALL:s(68339)}},60421:(n,a,s)=>{n.exports={Animation:s(42099),AnimationFrame:s(41138),AnimationManager:s(60848),AnimationState:s(9674),Events:s(74943)}},2161:(n,a,s)=>{var o=s(83419),d=s(90330),l=s(50792),c=s(24736),h=new o({initialize:function(){this.entries=new d,this.events=new l},add:function(u,f){return this.entries.set(u,f),this.events.emit(c.ADD,this,u,f),this},has:function(u){return this.entries.has(u)},exists:function(u){return this.entries.has(u)},get:function(u){return this.entries.get(u)},remove:function(u){var f=this.get(u);return f&&(this.entries.delete(u),this.events.emit(c.REMOVE,this,u,f.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});n.exports=h},24047:(n,a,s)=>{var o=s(2161),d=s(83419),l=s(8443),c=new d({initialize:function(u){this.game=u,this.binary=new o,this.bitmapFont=new o,this.json=new o,this.physics=new o,this.shader=new o,this.audio=new o,this.video=new o,this.text=new o,this.html=new o,this.obj=new o,this.tilemap=new o,this.xml=new o,this.custom={},this.game.events.once(l.DESTROY,this.destroy,this)},addCustom:function(h){return this.custom.hasOwnProperty(h)||(this.custom[h]=new o),this.custom[h]},destroy:function(){for(var h=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],u=0;u{n.exports="add"},59261:n=>{n.exports="remove"},24736:(n,a,s)=>{n.exports={ADD:s(51464),REMOVE:s(59261)}},83388:(n,a,s)=>{n.exports={BaseCache:s(2161),CacheManager:s(24047),Events:s(24736)}},71911:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(39506),c=s(50792),h=s(19715),u=s(87841),f=s(61340),p=s(80333),m=s(26099),g=new o({Extends:c,Mixins:[d.AlphaSingle,d.Visible],initialize:function(y,x,b,_){y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),_===void 0&&(_=0),c.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new u,this.dirty=!0,this._x=y,this._y=x,this._width=b,this._height=_,this._bounds=new u,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new f,this.transparent=!0,this.backgroundColor=p("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new m(b/2,_/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.renderRoundPixels=!0},addToRenderList:function(v){this.renderList.push(v)},setOrigin:function(v,y){return v===void 0&&(v=.5),y===void 0&&(y=v),this.originX=v,this.originY=y,this},getScroll:function(v,y,x){x===void 0&&(x=new m);var b=this.width*.5,_=this.height*.5;return x.x=v-b,x.y=y-_,this.useBounds&&(x.x=this.clampX(x.x),x.y=this.clampY(x.y)),x},centerOnX:function(v){var y=this.width*.5;return this.midPoint.x=v,this.scrollX=v-y,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(v){var y=this.height*.5;return this.midPoint.y=v,this.scrollY=v-y,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(v,y){return this.centerOnX(v),this.centerOnY(y),this},centerToBounds:function(){if(this.useBounds){var v=this._bounds,y=this.width*.5,x=this.height*.5;this.midPoint.set(v.centerX,v.centerY),this.scrollX=v.centerX-y,this.scrollY=v.centerY-x}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(v){if(this.disableCull)return v;var y=this.matrix.matrix,x=y[0],b=y[1],_=y[2],C=y[3],w=x*C-b*_;if(!w)return v;var T=y[4],S=y[5],E=this.scrollX,D=this.scrollY,A=this.width,M=this.height,R=this.y,L=R+M,I=this.x,O=I+A,N=this.culledObjects,H=v.length;w=1/w,N.length=0;for(var X=0;XI&&ZR&&J_&&(v=_),v},clampY:function(v){var y=this._bounds,x=this.displayHeight,b=y.y+(x-this.height)/2,_=Math.max(b,b+y.height-x);return v_&&(v=_),v},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(v){return v===void 0&&(v=0),this.rotation=l(v),this},setBackgroundColor:function(v){return v===void 0&&(v="rgba(0,0,0,0)"),this.backgroundColor=p(v),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(v,y,x,b,_){return _===void 0&&(_=!1),this._bounds.setTo(v,y,x,b),this.dirty=!0,this.useBounds=!0,_?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(v){v===void 0&&(v=new u);var y=this._bounds;return v.setTo(y.x,y.y,y.width,y.height),v},setName:function(v){return v===void 0&&(v=""),this.name=v,this},setPosition:function(v,y){return y===void 0&&(y=v),this.x=v,this.y=y,this},setRotation:function(v){return v===void 0&&(v=0),this.rotation=v,this},setRoundPixels:function(v){return this.roundPixels=v,this},setScene:function(v,y){y===void 0&&(y=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=v,this.isSceneCamera=y;var x=v.sys;return this.sceneManager=x.game.scene,this.scaleManager=x.scale,this.cameraManager=x.cameras,this.updateSystem(),this},setScroll:function(v,y){return y===void 0&&(y=v),this.scrollX=v,this.scrollY=y,this},setSize:function(v,y){return y===void 0&&(y=v),this.width=v,this.height=y,this},setViewport:function(v,y,x,b){return this.x=v,this.y=y,this.width=x,this.height=b,this},setZoom:function(v,y){return v===void 0&&(v=1),y===void 0&&(y=v),v===0&&(v=.001),y===0&&(y=.001),this.zoomX=v,this.zoomY=y,this},setMask:function(v,y){return y===void 0&&(y=!0),this.mask=v,this._maskCamera=y?this.cameraManager.default:this,this},clearMask:function(v){return v===void 0&&(v=!1),v&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var v={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(v.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),v},update:function(){},setIsSceneCamera:function(v){return this.isSceneCamera=v,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var v=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,y=this.sceneManager;v&&!this._customViewport?y.customViewports++:!v&&this._customViewport&&y.customViewports--,this.dirty=!0,this._customViewport=v}},destroy:function(){this.emit(h.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(v){this._x=v,this.updateSystem()}},y:{get:function(){return this._y},set:function(v){this._y=v,this.updateSystem()}},width:{get:function(){return this._width},set:function(v){this._width=v,this.updateSystem()}},height:{get:function(){return this._height},set:function(v){this._height=v,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(v){v!==this._scrollX&&(this._scrollX=v,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(v){v!==this._scrollY&&(this._scrollY=v,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(v){this._zoomX=v,this._zoomY=v,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(v){this._zoomX=v,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(v){this._zoomY=v,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(v){this._rotation=v,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});n.exports=g},38058:(n,a,s)=>{var o=s(71911),d=s(67502),l=s(45319),c=s(83419),h=s(31401),u=s(20052),f=s(19715),p=s(28915),m=s(87841),g=s(26099),v=new c({Extends:o,Mixins:[h.PostPipeline],initialize:function(x,b,_,C){o.call(this,x,b,_,C),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new u.Fade(this),this.flashEffect=new u.Flash(this),this.shakeEffect=new u.Shake(this),this.panEffect=new u.Pan(this),this.rotateToEffect=new u.RotateTo(this),this.zoomEffect=new u.Zoom(this),this.lerp=new g(1,1),this.followOffset=new g,this.deadzone=null,this._follow=null},setDeadzone:function(y,x){if(y===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=y,this.deadzone.height=x):this.deadzone=new m(0,0,y,x),this._follow){var b=this.width/2,_=this.height/2,C=this._follow.x-this.followOffset.x,w=this._follow.y-this.followOffset.y;this.midPoint.set(C,w),this.scrollX=C-b,this.scrollY=w-_}d(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(y,x,b,_,C,w){return this.fadeEffect.start(!1,y,x,b,_,!0,C,w)},fadeOut:function(y,x,b,_,C,w){return this.fadeEffect.start(!0,y,x,b,_,!0,C,w)},fadeFrom:function(y,x,b,_,C,w,T){return this.fadeEffect.start(!1,y,x,b,_,C,w,T)},fade:function(y,x,b,_,C,w,T){return this.fadeEffect.start(!0,y,x,b,_,C,w,T)},flash:function(y,x,b,_,C,w,T){return this.flashEffect.start(y,x,b,_,C,w,T)},shake:function(y,x,b,_,C){return this.shakeEffect.start(y,x,b,_,C)},pan:function(y,x,b,_,C,w,T){return this.panEffect.start(y,x,b,_,C,w,T)},rotateTo:function(y,x,b,_,C,w,T){return this.rotateToEffect.start(y,x,b,_,C,w,T)},zoomTo:function(y,x,b,_,C,w){return this.zoomEffect.start(y,x,b,_,C,w)},preRender:function(){this.renderList.length=0;var y=this.width,x=this.height,b=y*.5,_=x*.5,C=this.zoomX,w=this.zoomY,T=this.matrix;this.renderRoundPixels=this.roundPixels&&Number.isInteger(C)&&Number.isInteger(w);var S=y*this.originX,E=x*this.originY,D=this._follow,A=this.deadzone,M=this.scrollX,R=this.scrollY;A&&d(A,this.midPoint.x,this.midPoint.y);var L=!1;if(D&&!this.panEffect.isRunning){var I=this.lerp,O=D.x-this.followOffset.x,N=D.y-this.followOffset.y;A?(OA.right&&(M=p(M,M+(O-A.right),I.x)),NA.bottom&&(R=p(R,R+(N-A.bottom),I.y))):(M=p(M,O-S,I.x),R=p(R,N-E,I.y)),L=!0}this.roundPixels&&(M=Math.floor(M),R=Math.floor(R)),this.useBounds&&(M=this.clampX(M),R=this.clampY(R)),this.scrollX=M,this.scrollY=R;var H=M+b,X=R+_;this.midPoint.set(H,X);var V=Math.floor(y/C+.5),z=Math.floor(x/w+.5),F=Math.floor(H-V/2+.5),k=Math.floor(X-z/2+.5);this.worldView.setTo(F,k,V,z),T.applyITRS(Math.floor(this.x+S+.5),Math.floor(this.y+E+.5),this.rotation,C,w),T.translate(-S,-E),this.shakeEffect.preRender(),L&&this.emit(f.FOLLOW_UPDATE,this,D)},setLerp:function(y,x){return y===void 0&&(y=1),x===void 0&&(x=y),this.lerp.set(y,x),this},setFollowOffset:function(y,x){return y===void 0&&(y=0),x===void 0&&(x=0),this.followOffset.set(y,x),this},startFollow:function(y,x,b,_,C,w){x===void 0&&(x=!1),b===void 0&&(b=1),_===void 0&&(_=b),C===void 0&&(C=0),w===void 0&&(w=C),this._follow=y,this.roundPixels=x,b=l(b,0,1),_=l(_,0,1),this.lerp.set(b,_),this.followOffset.set(C,w);var T=this.width/2,S=this.height/2,E=y.x-C,D=y.y-w;return this.midPoint.set(E,D),this.scrollX=E-T,this.scrollY=D-S,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(y,x){this.visible&&(this.rotateToEffect.update(y,x),this.panEffect.update(y,x),this.zoomEffect.update(y,x),this.shakeEffect.update(y,x),this.flashEffect.update(y,x),this.fadeEffect.update(y,x))},destroy:function(){this.resetFX(),o.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});n.exports=v},32743:(n,a,s)=>{var o=s(38058),d=s(83419),l=s(95540),c=s(37277),h=s(37303),u=s(97480),f=s(44594),p=new d({initialize:function(g){this.scene=g,this.systems=g.sys,this.roundPixels=g.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,g.sys.events.once(f.BOOT,this.boot,this),g.sys.events.on(f.START,this.start,this)},boot:function(){var m=this.systems;m.settings.cameras?this.fromJSON(m.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new o(0,0,m.scale.width,m.scale.height).setScene(this.scene),m.game.scale.on(u.RESIZE,this.onResize,this),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){if(!this.main){var m=this.systems;m.settings.cameras?this.fromJSON(m.settings.cameras):this.add(),this.main=this.cameras[0]}var g=this.systems.events;g.on(f.UPDATE,this.update,this),g.once(f.SHUTDOWN,this.shutdown,this)},add:function(m,g,v,y,x,b){m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=this.scene.sys.scale.width),y===void 0&&(y=this.scene.sys.scale.height),x===void 0&&(x=!1),b===void 0&&(b="");var _=new o(m,g,v,y);return _.setName(b),_.setScene(this.scene),_.setRoundPixels(this.roundPixels),_.id=this.getNextID(),this.cameras.push(_),x&&(this.main=_),_},addExisting:function(m,g){g===void 0&&(g=!1);var v=this.cameras.indexOf(m);return v===-1?(m.id=this.getNextID(),m.setRoundPixels(this.roundPixels),this.cameras.push(m),g&&(this.main=m),m):null},getNextID:function(){for(var m=this.cameras,g=1,v=0;v<32;v++){for(var y=!1,x=0;x0){b.preRender();var _=this.getVisibleChildren(g.getChildren(),b);m.render(v,_,b)}}},getVisibleChildren:function(m,g){return m.filter(function(v){return v.willRender(g)})},resetAll:function(){for(var m=0;m{var o=s(45319),d=s(83419),l=s(19715),c=new d({initialize:function(u){this.camera=u,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(h,u,f,p,m,g,v,y){if(h===void 0&&(h=!0),u===void 0&&(u=1e3),f===void 0&&(f=0),p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=!1),v===void 0&&(v=null),y===void 0&&(y=this.camera.scene),!g&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=u,this.direction=h,this.progress=0,this.red=f,this.green=p,this.blue=m,this.alpha=h?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=v,this._onUpdateScope=y;var x=h?l.FADE_OUT_START:l.FADE_IN_START;return this.camera.emit(x,this.camera,this,u,f,p,m),this.camera},update:function(h,u){this.isRunning&&(this._elapsed+=u,this.progress=o(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var o=s(45319),d=s(83419),l=s(19715),c=new d({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(h,u,f,p,m,g,v){return h===void 0&&(h=250),u===void 0&&(u=255),f===void 0&&(f=255),p===void 0&&(p=255),m===void 0&&(m=!1),g===void 0&&(g=null),v===void 0&&(v=this.camera.scene),!m&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=h,this.progress=0,this.red=u,this.green=f,this.blue=p,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=g,this._onUpdateScope=v,this.camera.emit(l.FLASH_START,this.camera,this,h,u,f,p),this.camera)},update:function(h,u){this.isRunning&&(this._elapsed+=u,this.progress=o(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var o=s(45319),d=s(83419),l=s(62640),c=s(19715),h=s(26099),u=new d({initialize:function(p){this.camera=p,this.isRunning=!1,this.duration=0,this.source=new h,this.current=new h,this.destination=new h,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(f,p,m,g,v,y,x){m===void 0&&(m=1e3),g===void 0&&(g=l.Linear),v===void 0&&(v=!1),y===void 0&&(y=null),x===void 0&&(x=this.camera.scene);var b=this.camera;return!v&&this.isRunning||(this.isRunning=!0,this.duration=m,this.progress=0,this.source.set(b.scrollX,b.scrollY),this.destination.set(f,p),b.getScroll(f,p,this.current),typeof g=="string"&&l.hasOwnProperty(g)?this.ease=l[g]:typeof g=="function"&&(this.ease=g),this._elapsed=0,this._onUpdate=y,this._onUpdateScope=x,this.camera.emit(c.PAN_START,this.camera,this,m,f,p)),b},update:function(f,p){if(this.isRunning){this._elapsed+=p;var m=o(this._elapsed/this.duration,0,1);this.progress=m;var g=this.camera;if(this._elapsed{var o=s(45319),d=s(83419),l=s(19715),c=s(62640),h=new d({initialize:function(f){this.camera=f,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(u,f,p,m,g,v,y){p===void 0&&(p=1e3),m===void 0&&(m=c.Linear),g===void 0&&(g=!1),v===void 0&&(v=null),y===void 0&&(y=this.camera.scene),f===void 0&&(f=!1),this.shortestPath=f;var x=u;u<0?(x=-1*u,this.clockwise=!1):this.clockwise=!0;var b=360*Math.PI/180;x=x-Math.floor(x/b)*b;var _=this.camera;if(!g&&this.isRunning)return _;if(this.isRunning=!0,this.duration=p,this.progress=0,this.source=_.rotation,this.destination=x,typeof m=="string"&&c.hasOwnProperty(m)?this.ease=c[m]:typeof m=="function"&&(this.ease=m),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=y,this.shortestPath){var C=0,w=0;this.destination>this.source?C=Math.abs(this.destination-this.source):C=Math.abs(this.destination+b)-this.source,this.source>this.destination?w=Math.abs(this.source-this.destination):w=Math.abs(this.source+b)-this.destination,Cw&&(this.clockwise=!1)}return this.camera.emit(l.ROTATE_START,this.camera,this,p,x),_},update:function(u,f){if(this.isRunning){this._elapsed+=f;var p=o(this._elapsed/this.duration,0,1);this.progress=p;var m=this.camera;if(this._elapsed=b?v=Math.abs(x-b):v=Math.abs(x+y)-b;var _=0;this.clockwise?_=m.rotation+v*g:_=m.rotation-v*g,m.rotation=_,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,m,p,_)}else m.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,m,p,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(l.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});n.exports=h},30330:(n,a,s)=>{var o=s(45319),d=s(83419),l=s(19715),c=s(26099),h=new d({initialize:function(f){this.camera=f,this.isRunning=!1,this.duration=0,this.intensity=new c,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(u,f,p,m,g){return u===void 0&&(u=100),f===void 0&&(f=.05),p===void 0&&(p=!1),m===void 0&&(m=null),g===void 0&&(g=this.camera.scene),!p&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=u,this.progress=0,typeof f=="number"?this.intensity.set(f):this.intensity.set(f.x,f.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=m,this._onUpdateScope=g,this.camera.emit(l.SHAKE_START,this.camera,this,u,f),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(u,f){if(this.isRunning)if(this._elapsed+=f,this.progress=o(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var o=s(45319),d=s(83419),l=s(62640),c=s(19715),h=new d({initialize:function(f){this.camera=f,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(u,f,p,m,g,v){f===void 0&&(f=1e3),p===void 0&&(p=l.Linear),m===void 0&&(m=!1),g===void 0&&(g=null),v===void 0&&(v=this.camera.scene);var y=this.camera;return!m&&this.isRunning||(this.isRunning=!0,this.duration=f,this.progress=0,this.source=y.zoom,this.destination=u,typeof p=="string"&&l.hasOwnProperty(p)?this.ease=l[p]:typeof p=="function"&&(this.ease=p),this._elapsed=0,this._onUpdate=g,this._onUpdateScope=v,this.camera.emit(c.ZOOM_START,this.camera,this,f,u)),y},update:function(u,f){this.isRunning&&(this._elapsed+=f,this.progress=o(this._elapsed/this.duration,0,1),this._elapsed{n.exports={Fade:s(5020),Flash:s(10662),Pan:s(20359),Shake:s(30330),RotateTo:s(34208),Zoom:s(45641)}},16438:n=>{n.exports="cameradestroy"},32726:n=>{n.exports="camerafadeincomplete"},87807:n=>{n.exports="camerafadeinstart"},45917:n=>{n.exports="camerafadeoutcomplete"},95666:n=>{n.exports="camerafadeoutstart"},47056:n=>{n.exports="cameraflashcomplete"},91261:n=>{n.exports="cameraflashstart"},45047:n=>{n.exports="followupdate"},81927:n=>{n.exports="camerapancomplete"},74264:n=>{n.exports="camerapanstart"},54419:n=>{n.exports="postrender"},79330:n=>{n.exports="prerender"},93183:n=>{n.exports="camerarotatecomplete"},80112:n=>{n.exports="camerarotatestart"},62252:n=>{n.exports="camerashakecomplete"},86017:n=>{n.exports="camerashakestart"},539:n=>{n.exports="camerazoomcomplete"},51892:n=>{n.exports="camerazoomstart"},19715:(n,a,s)=>{n.exports={DESTROY:s(16438),FADE_IN_COMPLETE:s(32726),FADE_IN_START:s(87807),FADE_OUT_COMPLETE:s(45917),FADE_OUT_START:s(95666),FLASH_COMPLETE:s(47056),FLASH_START:s(91261),FOLLOW_UPDATE:s(45047),PAN_COMPLETE:s(81927),PAN_START:s(74264),POST_RENDER:s(54419),PRE_RENDER:s(79330),ROTATE_COMPLETE:s(93183),ROTATE_START:s(80112),SHAKE_COMPLETE:s(62252),SHAKE_START:s(86017),ZOOM_COMPLETE:s(539),ZOOM_START:s(51892)}},87969:(n,a,s)=>{n.exports={Camera:s(38058),BaseCamera:s(71911),CameraManager:s(32743),Effects:s(20052),Events:s(19715)}},63091:(n,a,s)=>{var o=s(83419),d=s(35154),l=new o({initialize:function(h){this.camera=d(h,"camera",null),this.left=d(h,"left",null),this.right=d(h,"right",null),this.up=d(h,"up",null),this.down=d(h,"down",null),this.zoomIn=d(h,"zoomIn",null),this.zoomOut=d(h,"zoomOut",null),this.zoomSpeed=d(h,"zoomSpeed",.01),this.minZoom=d(h,"minZoom",.001),this.maxZoom=d(h,"maxZoom",1e3),this.speedX=0,this.speedY=0;var u=d(h,"speed",null);typeof u=="number"?(this.speedX=u,this.speedY=u):(this.speedX=d(h,"speed.x",0),this.speedY=d(h,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(c){return this.camera=c,this},update:function(c){if(this.active){c===void 0&&(c=1);var h=this.camera;this.up&&this.up.isDown?h.scrollY-=this.speedY*c|0:this.down&&this.down.isDown&&(h.scrollY+=this.speedY*c|0),this.left&&this.left.isDown?h.scrollX-=this.speedX*c|0:this.right&&this.right.isDown&&(h.scrollX+=this.speedX*c|0),this.zoomIn&&this.zoomIn.isDown?(h.zoom-=this.zoomSpeed,h.zoomthis.maxZoom&&(h.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});n.exports=l},58818:(n,a,s)=>{var o=s(83419),d=s(35154),l=new o({initialize:function(h){this.camera=d(h,"camera",null),this.left=d(h,"left",null),this.right=d(h,"right",null),this.up=d(h,"up",null),this.down=d(h,"down",null),this.zoomIn=d(h,"zoomIn",null),this.zoomOut=d(h,"zoomOut",null),this.zoomSpeed=d(h,"zoomSpeed",.01),this.minZoom=d(h,"minZoom",.001),this.maxZoom=d(h,"maxZoom",1e3),this.accelX=0,this.accelY=0;var u=d(h,"acceleration",null);typeof u=="number"?(this.accelX=u,this.accelY=u):(this.accelX=d(h,"acceleration.x",0),this.accelY=d(h,"acceleration.y",0)),this.dragX=0,this.dragY=0;var f=d(h,"drag",null);typeof f=="number"?(this.dragX=f,this.dragY=f):(this.dragX=d(h,"drag.x",0),this.dragY=d(h,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var p=d(h,"maxSpeed",null);typeof p=="number"?(this.maxSpeedX=p,this.maxSpeedY=p):(this.maxSpeedX=d(h,"maxSpeed.x",0),this.maxSpeedY=d(h,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(c){return this.camera=c,this},update:function(c){if(this.active){c===void 0&&(c=1);var h=this.camera;this._speedX>0?(this._speedX-=this.dragX*c,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*c,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*c,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*c,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(h.scrollX-=this._speedX*c|0),this._speedY!==0&&(h.scrollY-=this._speedY*c|0),this._zoom!==0&&(h.zoom+=this._zoom,h.zoomthis.maxZoom&&(h.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});n.exports=l},38865:(n,a,s)=>{n.exports={FixedKeyControl:s(63091),SmoothedKeyControl:s(58818)}},26638:(n,a,s)=>{n.exports={Controls:s(38865),Scene2D:s(87969)}},8054:(n,a,s)=>{var o={VERSION:"3.87",LOG_VERSION:"v387",BlendModes:s(10312),ScaleModes:s(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};n.exports=o},69547:(n,a,s)=>{var o=s(83419),d=s(8054),l=s(42363),c=s(82264),h=s(95540),u=s(35154),f=s(41212),p=s(29747),m=s(75508),g=s(36060),v=s(80333),y=new o({initialize:function(b){b===void 0&&(b={});var _=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],C="#ffffff",w=u(b,"scale",null);this.width=u(w,"width",1024,b),this.height=u(w,"height",768,b),this.zoom=u(w,"zoom",1,b),this.parent=u(w,"parent",void 0,b),this.scaleMode=u(w,w?"mode":"scaleMode",0,b),this.expandParent=u(w,"expandParent",!0,b),this.autoRound=u(w,"autoRound",!1,b),this.autoCenter=u(w,"autoCenter",0,b),this.resizeInterval=u(w,"resizeInterval",500,b),this.fullscreenTarget=u(w,"fullscreenTarget",null,b),this.minWidth=u(w,"min.width",0,b),this.maxWidth=u(w,"max.width",0,b),this.minHeight=u(w,"min.height",0,b),this.maxHeight=u(w,"max.height",0,b),this.snapWidth=u(w,"snap.width",0,b),this.snapHeight=u(w,"snap.height",0,b),this.renderType=u(b,"type",d.AUTO),this.canvas=u(b,"canvas",null),this.context=u(b,"context",null),this.canvasStyle=u(b,"canvasStyle",null),this.customEnvironment=u(b,"customEnvironment",!1),this.sceneConfig=u(b,"scene",null),this.seed=u(b,"seed",[(Date.now()*Math.random()).toString()]),m.RND=new m.RandomDataGenerator(this.seed),this.gameTitle=u(b,"title",""),this.gameURL=u(b,"url","https://phaser.io/"+d.LOG_VERSION),this.gameVersion=u(b,"version",""),this.autoFocus=u(b,"autoFocus",!0),this.stableSort=u(b,"stableSort",-1),this.stableSort===-1&&(this.stableSort=c.browser.es2019?1:0),c.features.stableSort=this.stableSort,this.domCreateContainer=u(b,"dom.createContainer",!1),this.domPointerEvents=u(b,"dom.pointerEvents","none"),this.inputKeyboard=u(b,"input.keyboard",!0),this.inputKeyboardEventTarget=u(b,"input.keyboard.target",window),this.inputKeyboardCapture=u(b,"input.keyboard.capture",[]),this.inputMouse=u(b,"input.mouse",!0),this.inputMouseEventTarget=u(b,"input.mouse.target",null),this.inputMousePreventDefaultDown=u(b,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=u(b,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=u(b,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=u(b,"input.mouse.preventDefaultWheel",!0),this.inputTouch=u(b,"input.touch",c.input.touch),this.inputTouchEventTarget=u(b,"input.touch.target",null),this.inputTouchCapture=u(b,"input.touch.capture",!0),this.inputActivePointers=u(b,"input.activePointers",1),this.inputSmoothFactor=u(b,"input.smoothFactor",0),this.inputWindowEvents=u(b,"input.windowEvents",!0),this.inputGamepad=u(b,"input.gamepad",!1),this.inputGamepadEventTarget=u(b,"input.gamepad.target",window),this.disableContextMenu=u(b,"disableContextMenu",!1),this.audio=u(b,"audio",{}),this.hideBanner=u(b,"banner",null)===!1,this.hidePhaser=u(b,"banner.hidePhaser",!1),this.bannerTextColor=u(b,"banner.text",C),this.bannerBackgroundColor=u(b,"banner.background",_),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=u(b,"fps",null),this.disablePreFX=u(b,"disablePreFX",!1),this.disablePostFX=u(b,"disablePostFX",!1);var T=u(b,"render",null);this.pipeline=u(T,"pipeline",null,b),this.autoMobilePipeline=u(T,"autoMobilePipeline",!0,b),this.defaultPipeline=u(T,"defaultPipeline",g.MULTI_PIPELINE,b),this.antialias=u(T,"antialias",!0,b),this.antialiasGL=u(T,"antialiasGL",!0,b),this.mipmapFilter=u(T,"mipmapFilter","",b),this.desynchronized=u(T,"desynchronized",!1,b),this.roundPixels=u(T,"roundPixels",!1,b),this.pixelArt=u(T,"pixelArt",this.zoom!==1,b),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=u(T,"transparent",!1,b),this.clearBeforeRender=u(T,"clearBeforeRender",!0,b),this.preserveDrawingBuffer=u(T,"preserveDrawingBuffer",!1,b),this.premultipliedAlpha=u(T,"premultipliedAlpha",!0,b),this.failIfMajorPerformanceCaveat=u(T,"failIfMajorPerformanceCaveat",!1,b),this.powerPreference=u(T,"powerPreference","default",b),this.batchSize=u(T,"batchSize",4096,b),this.maxTextures=u(T,"maxTextures",-1,b),this.maxLights=u(T,"maxLights",10,b);var S=u(b,"backgroundColor",0);this.backgroundColor=v(S),this.transparent&&(this.backgroundColor=v(0),this.backgroundColor.alpha=0),this.preBoot=u(b,"callbacks.preBoot",p),this.postBoot=u(b,"callbacks.postBoot",p),this.physics=u(b,"physics",{}),this.defaultPhysicsSystem=u(this.physics,"default",!1),this.loaderBaseURL=u(b,"loader.baseURL",""),this.loaderPath=u(b,"loader.path",""),this.loaderMaxParallelDownloads=u(b,"loader.maxParallelDownloads",c.os.android?6:32),this.loaderCrossOrigin=u(b,"loader.crossOrigin",void 0),this.loaderResponseType=u(b,"loader.responseType",""),this.loaderAsync=u(b,"loader.async",!0),this.loaderUser=u(b,"loader.user",""),this.loaderPassword=u(b,"loader.password",""),this.loaderTimeout=u(b,"loader.timeout",0),this.loaderMaxRetries=u(b,"loader.maxRetries",2),this.loaderWithCredentials=u(b,"loader.withCredentials",!1),this.loaderImageLoadType=u(b,"loader.imageLoadType","XHR"),this.loaderLocalScheme=u(b,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=u(b,"fx.glow.quality",.1),this.glowFXDistance=u(b,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var E=u(b,"plugins",null),D=l.DefaultScene;E&&(Array.isArray(E)?this.defaultPlugins=E:f(E)&&(this.installGlobalPlugins=h(E,"global",[]),this.installScenePlugins=h(E,"scene",[]),Array.isArray(E.default)?D=E.default:Array.isArray(E.defaultMerge)&&(D=D.concat(E.defaultMerge)))),this.defaultPlugins=D;var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=u(b,"images.default",A+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=u(b,"images.missing",A+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=u(b,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=d.WEBGL:window.FORCE_CANVAS&&(this.renderType=d.CANVAS))}});n.exports=y},86054:(n,a,s)=>{var o=s(20623),d=s(27919),l=s(8054),c=s(89357),h=function(u){var f=u.config;if((f.customEnvironment||f.canvas)&&f.renderType===l.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!f.customEnvironment&&!f.canvas&&f.renderType!==l.HEADLESS)if(f.renderType===l.AUTO&&(f.renderType=c.webGL?l.WEBGL:l.CANVAS),f.renderType===l.WEBGL){if(!c.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(f.renderType===l.CANVAS){if(!c.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+f.renderType);f.antialias||d.disableSmoothing();var p=u.scale.baseSize,m=p.width,g=p.height;if(f.canvas?(u.canvas=f.canvas,u.canvas.width=m,u.canvas.height=g):u.canvas=d.create(u,m,g,f.renderType),f.canvasStyle&&(u.canvas.style=f.canvasStyle),f.antialias||o.setCrisp(u.canvas),f.renderType!==l.HEADLESS){var v,y;v=s(68627),y=s(74797),f.renderType===l.WEBGL?u.renderer=new y(u):(u.renderer=new v(u),u.context=u.renderer.gameContext)}};n.exports=h},96391:(n,a,s)=>{var o=s(8054),d=function(l){var c=l.config;if(!c.hideBanner){var h="WebGL";c.renderType===o.CANVAS?h="Canvas":c.renderType===o.HEADLESS&&(h="Headless");var u=c.audio,f=l.device.audio,p;if(f.webAudio&&!u.disableWebAudio?p="Web Audio":u.noAudio||!f.webAudio&&!f.audioData?p="No Audio":p="HTML5 Audio",l.device.browser.ie)window.console&&console.log("Phaser v"+o.VERSION+" / https://phaser.io");else{var m="",g=[m];if(Array.isArray(c.bannerBackgroundColor)){var v;c.bannerBackgroundColor.forEach(function(x){m=m.concat("%c "),g.push("background: "+x),v=x}),g[g.length-1]="color: "+c.bannerTextColor+"; background: "+v}else m=m.concat("%c "),g.push("color: "+c.bannerTextColor+"; background: "+c.bannerBackgroundColor);g.push("background: transparent"),c.gameTitle&&(m=m.concat(c.gameTitle),c.gameVersion&&(m=m.concat(" v"+c.gameVersion)),c.hidePhaser||(m=m.concat(" / ")));var y="";c.hidePhaser||(m=m.concat("Phaser v"+o.VERSION+y+" ("+h+" | "+p+")")),m=m.concat(" %c "+c.gameURL),g[0]=m,console.log.apply(console,g)}}};n.exports=d},50127:(n,a,s)=>{var o=s(40366),d=s(60848),l=s(24047),c=s(27919),h=s(83419),u=s(69547),f=s(83719),p=s(86054),m=s(45893),g=s(96391),v=s(82264),y=s(57264),x=s(50792),b=s(8443),_=s(7003),C=s(37277),w=s(77332),T=s(76531),S=s(60903),E=s(69442),D=s(17130),A=s(65898),M=s(51085),R=s(14747);if(0)var L;var I=new h({initialize:function(N){this.config=new u(N),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new x,this.anims=new d(this),this.textures=new D(this),this.cache=new l(this),this.registry=new m(this,new x),this.input=new _(this,this.config),this.scene=new S(this,this.config.sceneConfig),this.device=v,this.scale=new T(this,this.config),this.sound=null,this.sound=R.create(this),this.loop=new A(this,this.config.fps),this.plugins=new w(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,y(this.boot.bind(this))},boot:function(){if(!C.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),p(this),f(this),g(this),o(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(b.BOOT)},texturesReady:function(){this.events.emit(b.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),M(this);var O=this.events;O.on(b.HIDDEN,this.onHidden,this),O.on(b.VISIBLE,this.onVisible,this),O.on(b.BLUR,this.onBlur,this),O.on(b.FOCUS,this.onFocus,this)},step:function(O,N){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var H=this.events;H.emit(b.PRE_STEP,O,N),H.emit(b.STEP,O,N),this.scene.update(O,N),H.emit(b.POST_STEP,O,N);var X=this.renderer;X.preRender(),H.emit(b.PRE_RENDER,X,O,N),this.scene.render(X),X.postRender(),H.emit(b.POST_RENDER,X,O,N)}},headlessStep:function(O,N){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var H=this.events;H.emit(b.PRE_STEP,O,N),H.emit(b.STEP,O,N),this.scene.update(O,N),H.emit(b.POST_STEP,O,N),this.scene.isProcessing=!1,H.emit(b.PRE_RENDER,null,O,N),H.emit(b.POST_RENDER,null,O,N)}},onHidden:function(){this.loop.pause(),this.events.emit(b.PAUSE)},pause:function(){var O=this.isPaused;this.isPaused=!0,O||this.events.emit(b.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(b.RESUME,this.loop.pauseDuration)},resume:function(){var O=this.isPaused;this.isPaused=!1,O&&this.events.emit(b.RESUME,0)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(O,N){N===void 0&&(N=!1),this.pendingDestroy=!0,this.removeCanvas=O,this.noReturn=N},runDestroy:function(){this.scene.destroy(),this.events.emit(b.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(c.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});n.exports=I},65898:(n,a,s)=>{var o=s(83419),d=s(35154),l=s(29747),c=s(43092),h=new o({initialize:function(f,p){this.game=f,this.raf=new c,this.started=!1,this.running=!1,this.minFps=d(p,"min",5),this.targetFps=d(p,"target",60),this.fpsLimit=d(p,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=l,this.forceSetTimeOut=d(p,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this.pauseDuration=0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=d(p,"deltaHistory",10),this.panicMax=d(p,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=d(p,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.pauseDuration=this.time-this._pauseTime,this.startTime+=this.pauseDuration},resetDelta:function(){var u=window.performance.now();this.time=u,this.lastTime=u,this.nextFpsUpdate=u+1e3,this.framesThisSecond=0;for(var f=0;f0||!this.inFocus)&&(this._coolDown--,u=Math.min(u,this._target)),u>this._min&&(u=p[f],u=Math.min(u,this._min)),p[f]=u,this.deltaIndex++,this.deltaIndex>=m&&(this.deltaIndex=0);for(var g=0,v=0;v=this.nextFpsUpdate&&this.updateFPS(u),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(u,this.delta),this.delta=0),this.lastTime=u,this.frame++},step:function(u){this.now=u;var f=Math.max(0,u-this.lastTime);this.rawDelta=f,this.time+=this.rawDelta,this.smoothStep&&(f=this.smoothDelta(f)),this.delta=f,u>=this.nextFpsUpdate&&this.updateFPS(u),this.framesThisSecond++,this.callback(u,f),this.lastTime=u,this.frame++},tick:function(){var u=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(u):this.step(u)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(u){u===void 0&&(u=!1);var f=window.performance.now();if(!this.running){u&&(this.startTime+=-this.lastTime+(this.lastTime+f));var p=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(p,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=f+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});n.exports=h},51085:(n,a,s)=>{var o=s(8443),d=function(l){var c,h=l.events;if(document.hidden!==void 0)c="visibilitychange";else{var u=["webkit","moz","ms"];u.forEach(function(p){document[p+"Hidden"]!==void 0&&(document.hidden=function(){return document[p+"Hidden"]},c=p+"visibilitychange")})}var f=function(p){document.hidden||p.type==="pause"?h.emit(o.HIDDEN):h.emit(o.VISIBLE)};c&&document.addEventListener(c,f,!1),window.onblur=function(){h.emit(o.BLUR)},window.onfocus=function(){h.emit(o.FOCUS)},window.focus&&l.config.autoFocus&&window.focus()};n.exports=d},97217:n=>{n.exports="blur"},47548:n=>{n.exports="boot"},19814:n=>{n.exports="contextlost"},68446:n=>{n.exports="destroy"},41700:n=>{n.exports="focus"},25432:n=>{n.exports="hidden"},65942:n=>{n.exports="pause"},59211:n=>{n.exports="postrender"},47789:n=>{n.exports="poststep"},39066:n=>{n.exports="prerender"},460:n=>{n.exports="prestep"},16175:n=>{n.exports="ready"},42331:n=>{n.exports="resume"},11966:n=>{n.exports="step"},32969:n=>{n.exports="systemready"},94830:n=>{n.exports="visible"},8443:(n,a,s)=>{n.exports={BLUR:s(97217),BOOT:s(47548),CONTEXT_LOST:s(19814),DESTROY:s(68446),FOCUS:s(41700),HIDDEN:s(25432),PAUSE:s(65942),POST_RENDER:s(59211),POST_STEP:s(47789),PRE_RENDER:s(39066),PRE_STEP:s(460),READY:s(16175),RESUME:s(42331),STEP:s(11966),SYSTEM_READY:s(32969),VISIBLE:s(94830)}},42857:(n,a,s)=>{n.exports={Config:s(69547),CreateRenderer:s(86054),DebugHeader:s(96391),Events:s(8443),TimeStep:s(65898),VisibilityHandler:s(51085)}},99584:(n,a,s)=>{var o=s(5290),d=s(27919),l=s(35154),c=function(h){var u=l(h,"data",[]),f=l(h,"canvas",null),p=l(h,"palette",o),m=l(h,"pixelWidth",1),g=l(h,"pixelHeight",m),v=l(h,"resizeCanvas",!0),y=l(h,"clearCanvas",!0),x=l(h,"preRender",null),b=l(h,"postRender",null),_=Math.floor(Math.abs(u[0].length*m)),C=Math.floor(Math.abs(u.length*g));f||(f=d.create2D(this,_,C),v=!1,y=!1),v&&(f.width=_,f.height=C);var w=f.getContext("2d",{willReadFrequently:!0});y&&w.clearRect(0,0,_,C),x&&x(f,w);for(var T=0;T{n.exports={GenerateTexture:s(99584),Palettes:s(57763)}},5290:n=>{n.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:n=>{n.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},9866:n=>{n.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},77552:n=>{n.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},92259:n=>{n.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},57763:(n,a,s)=>{n.exports={ARNE16:s(5290),C64:s(23816),CGA:s(9866),JMP:s(77552),MSX:s(92259)}},46728:(n,a,s)=>{var o=s(83419),d=s(36316),l=s(80021),c=s(26099),h=new o({Extends:l,initialize:function(f,p,m,g){l.call(this,"CubicBezierCurve"),Array.isArray(f)&&(g=new c(f[6],f[7]),m=new c(f[4],f[5]),p=new c(f[2],f[3]),f=new c(f[0],f[1])),this.p0=f,this.p1=p,this.p2=m,this.p3=g},getStartPoint:function(u){return u===void 0&&(u=new c),u.copy(this.p0)},getResolution:function(u){return u},getPoint:function(u,f){f===void 0&&(f=new c);var p=this.p0,m=this.p1,g=this.p2,v=this.p3;return f.set(d(u,p.x,m.x,g.x,v.x),d(u,p.y,m.y,g.y,v.y))},draw:function(u,f){f===void 0&&(f=32);var p=this.getPoints(f);u.beginPath(),u.moveTo(this.p0.x,this.p0.y);for(var m=1;m{var o=s(83419),d=s(19217),l=s(87841),c=s(26099),h=new o({initialize:function(f){this.type=f,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new c,this._tmpVec2B=new c},draw:function(u,f){return f===void 0&&(f=32),u.strokePoints(this.getPoints(f))},getBounds:function(u,f){u||(u=new l),f===void 0&&(f=16);var p=this.getLength();f>p&&(f=p/2);var m=Math.max(1,Math.round(p/f));return d(this.getSpacedPoints(m),u)},getDistancePoints:function(u){var f=this.getLength(),p=Math.max(1,f/u);return this.getSpacedPoints(p)},getEndPoint:function(u){return u===void 0&&(u=new c),this.getPointAt(1,u)},getLength:function(){var u=this.getLengths();return u[u.length-1]},getLengths:function(u){if(u===void 0&&(u=this.arcLengthDivisions),this.cacheArcLengths.length===u+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var f=[],p,m=this.getPoint(0,this._tmpVec2A),g=0;f.push(0);for(var v=1;v<=u;v++)p=this.getPoint(v/u,this._tmpVec2B),g+=p.distance(m),f.push(g),m.copy(p);return this.cacheArcLengths=f,f},getPointAt:function(u,f){var p=this.getUtoTmapping(u);return this.getPoint(p,f)},getPoints:function(u,f,p){p===void 0&&(p=[]),u||(f?u=this.getLength()/f:u=this.defaultDivisions);for(var m=0;m<=u;m++)p.push(this.getPoint(m/u));return p},getRandomPoint:function(u){return u===void 0&&(u=new c),this.getPoint(Math.random(),u)},getSpacedPoints:function(u,f,p){p===void 0&&(p=[]),u||(f?u=this.getLength()/f:u=this.defaultDivisions);for(var m=0;m<=u;m++){var g=this.getUtoTmapping(m/u,null,u);p.push(this.getPoint(g))}return p},getStartPoint:function(u){return u===void 0&&(u=new c),this.getPointAt(0,u)},getTangent:function(u,f){f===void 0&&(f=new c);var p=1e-4,m=u-p,g=u+p;return m<0&&(m=0),g>1&&(g=1),this.getPoint(m,this._tmpVec2A),this.getPoint(g,f),f.subtract(this._tmpVec2A).normalize()},getTangentAt:function(u,f){var p=this.getUtoTmapping(u);return this.getTangent(p,f)},getTFromDistance:function(u,f){return u<=0?0:this.getUtoTmapping(0,u,f)},getUtoTmapping:function(u,f,p){var m=this.getLengths(p),g=0,v=m.length,y;f?y=Math.min(f,m[v-1]):y=u*m[v-1];for(var x=0,b=v-1,_;x<=b;)if(g=Math.floor(x+(b-x)/2),_=m[g]-y,_<0)x=g+1;else if(_>0)b=g-1;else{b=g;break}if(g=b,m[g]===y)return g/(v-1);var C=m[g],w=m[g+1],T=w-C,S=(y-C)/T;return(g+S)/(v-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});n.exports=h},73825:(n,a,s)=>{var o=s(83419),d=s(80021),l=s(39506),c=s(35154),h=s(43396),u=s(26099),f=new o({Extends:d,initialize:function(m,g,v,y,x,b,_,C){if(typeof m=="object"){var w=m;m=c(w,"x",0),g=c(w,"y",0),v=c(w,"xRadius",0),y=c(w,"yRadius",v),x=c(w,"startAngle",0),b=c(w,"endAngle",360),_=c(w,"clockwise",!1),C=c(w,"rotation",0)}else y===void 0&&(y=v),x===void 0&&(x=0),b===void 0&&(b=360),_===void 0&&(_=!1),C===void 0&&(C=0);d.call(this,"EllipseCurve"),this.p0=new u(m,g),this._xRadius=v,this._yRadius=y,this._startAngle=l(x),this._endAngle=l(b),this._clockwise=_,this._rotation=l(C)},getStartPoint:function(p){return p===void 0&&(p=new u),this.getPoint(0,p)},getResolution:function(p){return p*2},getPoint:function(p,m){m===void 0&&(m=new u);for(var g=Math.PI*2,v=this._endAngle-this._startAngle,y=Math.abs(v)g;)v-=g;v{var o=s(83419),d=s(80021),l=s(19217),c=s(87841),h=s(26099),u=new o({Extends:d,initialize:function(p,m){d.call(this,"LineCurve"),Array.isArray(p)&&(m=new h(p[2],p[3]),p=new h(p[0],p[1])),this.p0=p,this.p1=m,this.arcLengthDivisions=1},getBounds:function(f){return f===void 0&&(f=new c),l([this.p0,this.p1],f)},getStartPoint:function(f){return f===void 0&&(f=new h),f.copy(this.p0)},getResolution:function(f){return f===void 0&&(f=1),f},getPoint:function(f,p){return p===void 0&&(p=new h),f===1?p.copy(this.p1):(p.copy(this.p1).subtract(this.p0).scale(f).add(this.p0),p)},getPointAt:function(f,p){return this.getPoint(f,p)},getTangent:function(f,p){return p===void 0&&(p=new h),p.copy(this.p1).subtract(this.p0).normalize(),p},getUtoTmapping:function(f,p,m){var g;if(p){var v=this.getLengths(m),y=v[v.length-1],x=Math.min(p,y);g=x/y}else g=f;return g},draw:function(f){return f.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),f},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});u.fromJSON=function(f){var p=f.points,m=new h(p[0],p[1]),g=new h(p[2],p[3]);return new u(m,g)},n.exports=u},14744:(n,a,s)=>{var o=s(83419),d=s(80021),l=s(32112),c=s(26099),h=new o({Extends:d,initialize:function(f,p,m){d.call(this,"QuadraticBezierCurve"),Array.isArray(f)&&(m=new c(f[4],f[5]),p=new c(f[2],f[3]),f=new c(f[0],f[1])),this.p0=f,this.p1=p,this.p2=m},getStartPoint:function(u){return u===void 0&&(u=new c),u.copy(this.p0)},getResolution:function(u){return u},getPoint:function(u,f){f===void 0&&(f=new c);var p=this.p0,m=this.p1,g=this.p2;return f.set(l(u,p.x,m.x,g.x),l(u,p.y,m.y,g.y))},draw:function(u,f){f===void 0&&(f=32);var p=this.getPoints(f);u.beginPath(),u.moveTo(this.p0.x,this.p0.y);for(var m=1;m{var o=s(87842),d=s(83419),l=s(80021),c=s(26099),h=new d({Extends:l,initialize:function(f){f===void 0&&(f=[]),l.call(this,"SplineCurve"),this.points=[],this.addPoints(f)},addPoints:function(u){for(var f=0;fp.length-2?p.length-1:g+1],_=p[g>p.length-3?p.length-1:g+2];return f.set(o(v,y.x,x.x,b.x,_.x),o(v,y.y,x.y,b.y,_.y))},toJSON:function(){for(var u=[],f=0;f{n.exports={Path:s(46669),MoveTo:s(68618),CubicBezier:s(46728),Curve:s(80021),Ellipse:s(73825),Line:s(33951),QuadraticBezier:s(14744),Spline:s(42534)}},68618:(n,a,s)=>{var o=s(83419),d=s(26099),l=new o({initialize:function(h,u){this.active=!1,this.p0=new d(h,u)},getPoint:function(c,h){return h===void 0&&(h=new d),h.copy(this.p0)},getPointAt:function(c,h){return this.getPoint(c,h)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});n.exports=l},46669:(n,a,s)=>{var o=s(83419),d=s(46728),l=s(73825),c=s(39429),h=s(33951),u=s(68618),f=s(14744),p=s(87841),m=s(42534),g=s(26099),v=s(36383),y=new o({initialize:function(b,_){b===void 0&&(b=0),_===void 0&&(_=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new g,this._tmpVec2A=new g,this._tmpVec2B=new g,typeof b=="object"?this.fromJSON(b):this.startPoint.set(b,_)},add:function(x){return this.curves.push(x),this},circleTo:function(x,b,_){return b===void 0&&(b=!1),this.ellipseTo(x,x,0,360,b,_)},closePath:function(){var x=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);return x.equals(b)||this.curves.push(new h(b,x)),this},cubicBezierTo:function(x,b,_,C,w,T){var S=this.getEndPoint(),E,D,A;return x instanceof g?(E=x,D=b,A=_):(E=new g(_,C),D=new g(w,T),A=new g(x,b)),this.add(new d(S,E,D,A))},quadraticBezierTo:function(x,b,_,C){var w=this.getEndPoint(),T,S;return x instanceof g?(T=x,S=b):(T=new g(_,C),S=new g(x,b)),this.add(new f(w,T,S))},draw:function(x,b){for(var _=0;_=b)return this.curves[C];C++}return null},getEndPoint:function(x){return x===void 0&&(x=new g),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,x):x.copy(this.startPoint),x},getLength:function(){var x=this.getCurveLengths();return x[x.length-1]},getPoint:function(x,b){b===void 0&&(b=new g);for(var _=x*this.getLength(),C=this.getCurveLengths(),w=0;w=_){var T=C[w]-_,S=this.curves[w],E=S.getLength(),D=E===0?0:1-T/E;return S.getPointAt(D,b)}w++}return null},getPoints:function(x,b){!x&&!b&&(x=this.defaultDivisions);for(var _=[],C,w=0;w1&&!_[_.length-1].equals(_[0])&&_.push(_[0]),_},getRandomPoint:function(x){return x===void 0&&(x=new g),this.getPoint(Math.random(),x)},getSpacedPoints:function(x){x===void 0&&(x=40);for(var b=[],_=0;_<=x;_++)b.push(this.getPoint(_/x));return this.autoClose&&b.push(b[0]),b},getStartPoint:function(x){return x===void 0&&(x=new g),x.copy(this.startPoint)},getTangent:function(x,b){b===void 0&&(b=new g);for(var _=x*this.getLength(),C=this.getCurveLengths(),w=0;w=_){var T=C[w]-_,S=this.curves[w],E=S.getLength(),D=E===0?0:1-T/E;return S.getTangentAt(D,b)}w++}return null},lineTo:function(x,b){x instanceof g?this._tmpVec2B.copy(x):typeof x=="object"?this._tmpVec2B.setFromObject(x):this._tmpVec2B.set(x,b);var _=this.getEndPoint(this._tmpVec2A);return this.add(new h([_.x,_.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(x){return x.unshift(this.getEndPoint()),this.add(new m(x))},moveTo:function(x,b){return x instanceof g?this.add(new u(x.x,x.y)):this.add(new u(x,b))},toJSON:function(){for(var x=[],b=0;b{var o=s(83419),d=s(24882),l=new o({initialize:function(h,u){this.parent=h,this.events=u,u||(this.events=h.events?h.events:h),this.list={},this.values={},this._frozen=!1,!h.hasOwnProperty("sys")&&this.events&&this.events.once(d.DESTROY,this.destroy,this)},get:function(c){var h=this.list;if(Array.isArray(c)){for(var u=[],f=0;f{var o=s(83419),d=s(45893),l=s(37277),c=s(44594),h=new o({Extends:d,initialize:function(f){d.call(this,f,f.sys.events),this.scene=f,this.systems=f.sys,f.sys.events.once(c.BOOT,this.boot,this),f.sys.events.on(c.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(c.DESTROY,this.destroy,this)},start:function(){this.events.once(c.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(c.SHUTDOWN,this.shutdown,this)},destroy:function(){d.prototype.destroy.call(this),this.events.off(c.START,this.start,this),this.scene=null,this.systems=null}});l.register("DataManagerPlugin",h,"data"),n.exports=h},10700:n=>{n.exports="changedata"},93608:n=>{n.exports="changedata-"},60883:n=>{n.exports="destroy"},69780:n=>{n.exports="removedata"},22166:n=>{n.exports="setdata"},24882:(n,a,s)=>{n.exports={CHANGE_DATA:s(10700),CHANGE_DATA_KEY:s(93608),DESTROY:s(60883),REMOVE_DATA:s(69780),SET_DATA:s(22166)}},44965:(n,a,s)=>{n.exports={DataManager:s(45893),DataManagerPlugin:s(63646),Events:s(24882)}},7098:(n,a,s)=>{var o=s(84148),d={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function l(){if(typeof importScripts=="function")return d;d.audioData=!!window.Audio,d.webAudio=!!(window.AudioContext||window.webkitAudioContext);var c=document.createElement("audio"),h=!!c.canPlayType;try{if(h){var u=function(m,g){var v=c.canPlayType("audio/"+m).replace(/^no$/,"");return g?!!(v||c.canPlayType("audio/"+g).replace(/^no$/,"")):!!v};if(d.ogg=u('ogg; codecs="vorbis"'),d.opus=u('ogg; codecs="opus"',"opus"),d.mp3=u("mpeg"),d.wav=u("wav"),d.m4a=u("x-m4a"),d.aac=u("aac"),d.flac=u("flac","x-flac"),d.webm=u('webm; codecs="vorbis"'),c.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(o.edge)d.dolby=!0;else if(o.safari&&o.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var f=parseInt(RegExp.$1,10),p=parseInt(RegExp.$2,10);(f===10&&p>=11||f>10)&&(d.dolby=!0)}}}}catch{}return d}n.exports=l()},84148:(n,a,s)=>{var o=s(25892),d={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};function l(){var c=navigator.userAgent;return/Edg\/\d+/.test(c)?(d.edge=!0,d.es2019=!0):/OPR/.test(c)?(d.opera=!0,d.es2019=!0):/Chrome\/(\d+)/.test(c)&&!o.windowsPhone?(d.chrome=!0,d.chromeVersion=parseInt(RegExp.$1,10),d.es2019=d.chromeVersion>69):/Firefox\D+(\d+)/.test(c)?(d.firefox=!0,d.firefoxVersion=parseInt(RegExp.$1,10),d.es2019=d.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(c)&&o.iOS?(d.mobileSafari=!0,d.es2019=!0):/MSIE (\d+\.\d+);/.test(c)?(d.ie=!0,d.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(c)&&!o.windowsPhone?(d.safari=!0,d.safariVersion=parseInt(RegExp.$1,10),d.es2019=d.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(c)&&(d.ie=!0,d.trident=!0,d.tridentVersion=parseInt(RegExp.$1,10),d.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(c)&&(d.silk=!0),d}n.exports=l()},89289:(n,a,s)=>{var o=s(27919),d={supportInverseAlpha:!1,supportNewBlendModes:!1};function l(){var u="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",f="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",p=new Image;return p.onload=function(){var m=new Image;m.onload=function(){var g=o.create2D(m,6),v=g.getContext("2d",{willReadFrequently:!0});if(v.globalCompositeOperation="multiply",v.drawImage(p,0,0),v.drawImage(m,2,0),!v.getImageData(2,0,1,1))return!1;var y=v.getImageData(2,0,1,1).data;o.remove(m),d.supportNewBlendModes=y[0]===255&&y[1]===0&&y[2]===0},m.src=u+"/wCKxvRF"+f},p.src=u+"AP804Oa6"+f,!1}function c(){var u=o.create2D(this,2),f=u.getContext("2d",{willReadFrequently:!0});f.fillStyle="rgba(10, 20, 30, 0.5)",f.fillRect(0,0,1,1);var p=f.getImageData(0,0,1,1);if(p===null)return!1;f.putImageData(p,1,0);var m=f.getImageData(1,0,1,1),g=m.data[0]===p.data[0]&&m.data[1]===p.data[1]&&m.data[2]===p.data[2]&&m.data[3]===p.data[3];return o.remove(this),g}function h(){return typeof importScripts!="function"&&document!==void 0&&(d.supportNewBlendModes=l(),d.supportInverseAlpha=c()),d}n.exports=h()},89357:(n,a,s)=>{var o=s(25892),d=s(84148),l=s(27919),c={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function h(){var f=new ArrayBuffer(4),p=new Uint8Array(f),m=new Uint32Array(f);return p[0]=161,p[1]=178,p[2]=195,p[3]=212,m[0]===3569595041?!0:m[0]===2712847316?!1:null}function u(){if(typeof importScripts=="function")return c;c.canvas=!!window.CanvasRenderingContext2D;try{c.localStorage=!!localStorage.getItem}catch{c.localStorage=!1}c.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,c.fileSystem=!!window.requestFileSystem;var f=!1,p=function(){if(window.WebGLRenderingContext)try{var m=l.createWebGL(this),g=m.getContext("webgl")||m.getContext("experimental-webgl"),v=l.create2D(this),y=v.getContext("2d",{willReadFrequently:!0}),x=y.createImageData(1,1);return f=x.data instanceof Uint8ClampedArray,l.remove(m),l.remove(v),!!g}catch{return!1}return!1};return c.webGL=p(),c.worker=!!window.Worker,c.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,c.getUserMedia=c.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,d.firefox&&d.firefoxVersion<21&&(c.getUserMedia=!1),!o.iOS&&(d.ie||d.firefox||d.chrome)&&(c.canvasBitBltShift=!0),(d.safari||d.mobileSafari)&&(c.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(c.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(c.littleEndian=h()),c.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&c.littleEndian!==null&&f,c}n.exports=u()},91639:n=>{var a={available:!1,cancel:"",keyboard:!1,request:""};function s(){if(typeof importScripts=="function")return a;var o,d="Fullscreen",l="FullScreen",c=["request"+d,"request"+l,"webkitRequest"+d,"webkitRequest"+l,"msRequest"+d,"msRequest"+l,"mozRequest"+l,"mozRequest"+d];for(o=0;o{var o=s(84148),d={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function l(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(d.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(d.mspointer=!0),navigator.getGamepads&&(d.gamepads=!0),"onwheel"in window||o.ie&&"WheelEvent"in window?d.wheelEvent="wheel":"onmousewheel"in window?d.wheelEvent="mousewheel":o.firefox&&"MouseScrollEvent"in window&&(d.wheelEvent="DOMMouseScroll")),d}n.exports=l()},25892:n=>{var a={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function s(){if(typeof importScripts=="function")return a;var o=navigator.userAgent;/Windows/.test(o)?a.windows=!0:/Mac OS/.test(o)&&!/like Mac OS/.test(o)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(a.iOS=!0,a.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),a.iOSVersion=parseInt(RegExp.$1,10)):a.macOS=!0:/Android/.test(o)?a.android=!0:/Linux/.test(o)?a.linux=!0:/iP[ao]d|iPhone/i.test(o)?(a.iOS=!0,navigator.appVersion.match(/OS (\d+)/),a.iOSVersion=parseInt(RegExp.$1,10),a.iPhone=o.toLowerCase().indexOf("iphone")!==-1,a.iPad=o.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(o)||/\bKF[A-Z][A-Z]+/.test(o)||/Silk.*Mobile Safari/.test(o)?a.kindle=!0:/CrOS/.test(o)&&(a.chromeOS=!0),(/Windows Phone/i.test(o)||/IEMobile/i.test(o))&&(a.android=!1,a.iOS=!1,a.macOS=!1,a.windows=!0,a.windowsPhone=!0);var d=/Silk/.test(o);return(a.windows||a.macOS||a.linux&&!d||a.chromeOS)&&(a.desktop=!0),(a.windowsPhone||/Windows NT/i.test(o)&&/Touch/i.test(o))&&(a.desktop=!1),navigator.standalone&&(a.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(a.cordova=!0),window.ejecta!==void 0&&(a.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(a.node=!0),a.node&&typeof process.versions=="object"&&(a.nodeWebkit=!!process.versions["node-webkit"],a.electron=!!process.versions.electron),/Crosswalk/.test(o)&&(a.crosswalk=!0),a.pixelRatio=window.devicePixelRatio||1,a}n.exports=s()},43267:(n,a,s)=>{var o=s(95540),d={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function l(){if(typeof importScripts=="function")return d;var c=document.createElement("video"),h=!!c.canPlayType,u=/^no$/;try{h&&(c.canPlayType('video/ogg; codecs="theora"').replace(u,"")&&(d.ogg=!0),c.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(u,"")&&(d.h264=!0,d.mp4=!0),c.canPlayType("video/x-m4v").replace(u,"")&&(d.m4v=!0),c.canPlayType('video/webm; codecs="vp8, vorbis"').replace(u,"")&&(d.webm=!0),c.canPlayType('video/webm; codecs="vp9"').replace(u,"")&&(d.vp9=!0),c.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(u,"")&&(d.hls=!0))}catch{}return c.parentNode&&c.parentNode.removeChild(c),d.getVideoURL=function(f){Array.isArray(f)||(f=[f]);for(var p=0;p{n.exports={os:s(25892),browser:s(84148),features:s(89357),input:s(31784),audio:s(7098),video:s(43267),fullscreen:s(91639),canvasFeatures:s(89289)}},89422:(n,a,s)=>{var o=s(83419),d=new Float32Array(20),l=new o({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(c){return this._matrix.set(c),this._dirty=!0,this},reset:function(){var c=this._matrix;return c.fill(0),c[0]=1,c[6]=1,c[12]=1,c[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var c=this._data;return this._dirty&&(c.set(this._matrix),c[4]/=255,c[9]/=255,c[14]/=255,c[19]/=255,this._dirty=!1),c},brightness:function(c,h){c===void 0&&(c=0),h===void 0&&(h=!1);var u=c;return this.multiply([u,0,0,0,0,0,u,0,0,0,0,0,u,0,0,0,0,0,1,0],h)},saturate:function(c,h){c===void 0&&(c=0),h===void 0&&(h=!1);var u=c*2/3+1,f=(u-1)*-.5;return this.multiply([u,f,f,0,0,f,u,f,0,0,f,f,u,0,0,0,0,0,1,0],h)},desaturate:function(c){return c===void 0&&(c=!1),this.saturate(-1,c)},hue:function(c,h){c===void 0&&(c=0),h===void 0&&(h=!1),c=c/180*Math.PI;var u=Math.cos(c),f=Math.sin(c),p=.213,m=.715,g=.072;return this.multiply([p+u*(1-p)+f*-p,m+u*-m+f*-m,g+u*-g+f*(1-g),0,0,p+u*-p+f*.143,m+u*(1-m)+f*.14,g+u*-g+f*-.283,0,0,p+u*-p+f*-(1-p),m+u*-m+f*m,g+u*(1-g)+f*g,0,0,0,0,0,1,0],h)},grayscale:function(c,h){return c===void 0&&(c=1),h===void 0&&(h=!1),this.saturate(-c,h)},blackWhite:function(c){return c===void 0&&(c=!1),this.multiply(l.BLACK_WHITE,c)},contrast:function(c,h){c===void 0&&(c=0),h===void 0&&(h=!1);var u=c+1,f=-.5*(u-1);return this.multiply([u,0,0,0,f,0,u,0,0,f,0,0,u,0,f,0,0,0,1,0],h)},negative:function(c){return c===void 0&&(c=!1),this.multiply(l.NEGATIVE,c)},desaturateLuminance:function(c){return c===void 0&&(c=!1),this.multiply(l.DESATURATE_LUMINANCE,c)},sepia:function(c){return c===void 0&&(c=!1),this.multiply(l.SEPIA,c)},night:function(c,h){return c===void 0&&(c=.1),h===void 0&&(h=!1),this.multiply([c*-2,-c,0,0,0,-c,0,c,0,0,0,c,c*2,0,0,0,0,0,1,0],h)},lsd:function(c){return c===void 0&&(c=!1),this.multiply(l.LSD,c)},brown:function(c){return c===void 0&&(c=!1),this.multiply(l.BROWN,c)},vintagePinhole:function(c){return c===void 0&&(c=!1),this.multiply(l.VINTAGE,c)},kodachrome:function(c){return c===void 0&&(c=!1),this.multiply(l.KODACHROME,c)},technicolor:function(c){return c===void 0&&(c=!1),this.multiply(l.TECHNICOLOR,c)},polaroid:function(c){return c===void 0&&(c=!1),this.multiply(l.POLAROID,c)},shiftToBGR:function(c){return c===void 0&&(c=!1),this.multiply(l.SHIFT_BGR,c)},multiply:function(c,h){h===void 0&&(h=!1),h||this.reset();var u=this._matrix,f=d;return f.set(u),u.set([f[0]*c[0]+f[1]*c[5]+f[2]*c[10]+f[3]*c[15],f[0]*c[1]+f[1]*c[6]+f[2]*c[11]+f[3]*c[16],f[0]*c[2]+f[1]*c[7]+f[2]*c[12]+f[3]*c[17],f[0]*c[3]+f[1]*c[8]+f[2]*c[13]+f[3]*c[18],f[0]*c[4]+f[1]*c[9]+f[2]*c[14]+f[3]*c[19]+f[4],f[5]*c[0]+f[6]*c[5]+f[7]*c[10]+f[8]*c[15],f[5]*c[1]+f[6]*c[6]+f[7]*c[11]+f[8]*c[16],f[5]*c[2]+f[6]*c[7]+f[7]*c[12]+f[8]*c[17],f[5]*c[3]+f[6]*c[8]+f[7]*c[13]+f[8]*c[18],f[5]*c[4]+f[6]*c[9]+f[7]*c[14]+f[8]*c[19]+f[9],f[10]*c[0]+f[11]*c[5]+f[12]*c[10]+f[13]*c[15],f[10]*c[1]+f[11]*c[6]+f[12]*c[11]+f[13]*c[16],f[10]*c[2]+f[11]*c[7]+f[12]*c[12]+f[13]*c[17],f[10]*c[3]+f[11]*c[8]+f[12]*c[13]+f[13]*c[18],f[10]*c[4]+f[11]*c[9]+f[12]*c[14]+f[13]*c[19]+f[14],f[15]*c[0]+f[16]*c[5]+f[17]*c[10]+f[18]*c[15],f[15]*c[1]+f[16]*c[6]+f[17]*c[11]+f[18]*c[16],f[15]*c[2]+f[16]*c[7]+f[17]*c[12]+f[18]*c[17],f[15]*c[3]+f[16]*c[8]+f[17]*c[13]+f[18]*c[18],f[15]*c[4]+f[16]*c[9]+f[17]*c[14]+f[18]*c[19]+f[19]]),this._dirty=!0,this}});l.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],l.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],l.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],l.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],l.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],l.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],l.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],l.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],l.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],l.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],l.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],n.exports=l},51767:(n,a,s)=>{var o=s(83419),d=s(29747),l=new o({initialize:function(h,u,f){this._rgb=[0,0,0],this.onChangeCallback=d,this.dirty=!1,this.set(h,u,f)},set:function(c,h,u){return c===void 0&&(c=0),h===void 0&&(h=0),u===void 0&&(u=0),this._rgb=[c,h,u],this.onChange(),this},equals:function(c,h,u){var f=this._rgb;return f[0]===c&&f[1]===h&&f[2]===u},onChange:function(){this.dirty=!0;var c=this._rgb;this.onChangeCallback.call(this,c[0],c[1],c[2])},r:{get:function(){return this._rgb[0]},set:function(c){this._rgb[0]=c,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(c){this._rgb[1]=c,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(c){this._rgb[2]=c,this.onChange()}},destroy:function(){this.onChangeCallback=null}});n.exports=l},60461:n=>{var a={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};n.exports=a},54312:(n,a,s)=>{var o=s(62235),d=s(35893),l=s(86327),c=s(88417),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,d(f)+p),l(u,o(f)+m),u};n.exports=h},46768:(n,a,s)=>{var o=s(62235),d=s(26541),l=s(86327),c=s(385),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,d(f)-p),l(u,o(f)+m),u};n.exports=h},35827:(n,a,s)=>{var o=s(62235),d=s(54380),l=s(86327),c=s(40136),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,d(f)+p),l(u,o(f)+m),u};n.exports=h},46871:(n,a,s)=>{var o=s(66786),d=s(35893),l=s(7702),c=function(h,u,f,p){return f===void 0&&(f=0),p===void 0&&(p=0),o(h,d(u)+f,l(u)+p),h};n.exports=c},5198:(n,a,s)=>{var o=s(7702),d=s(26541),l=s(20786),c=s(385),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,d(f)-p),l(u,o(f)+m),u};n.exports=h},11879:(n,a,s)=>{var o=s(60461),d=[];d[o.BOTTOM_CENTER]=s(54312),d[o.BOTTOM_LEFT]=s(46768),d[o.BOTTOM_RIGHT]=s(35827),d[o.CENTER]=s(46871),d[o.LEFT_CENTER]=s(5198),d[o.RIGHT_CENTER]=s(80503),d[o.TOP_CENTER]=s(89698),d[o.TOP_LEFT]=s(922),d[o.TOP_RIGHT]=s(21373),d[o.LEFT_BOTTOM]=d[o.BOTTOM_LEFT],d[o.LEFT_TOP]=d[o.TOP_LEFT],d[o.RIGHT_BOTTOM]=d[o.BOTTOM_RIGHT],d[o.RIGHT_TOP]=d[o.TOP_RIGHT];var l=function(c,h,u,f,p){return d[u](c,h,f,p)};n.exports=l},80503:(n,a,s)=>{var o=s(7702),d=s(54380),l=s(20786),c=s(40136),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,d(f)+p),l(u,o(f)+m),u};n.exports=h},89698:(n,a,s)=>{var o=s(35893),d=s(17717),l=s(88417),c=s(66737),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),l(u,o(f)+p),c(u,d(f)-m),u};n.exports=h},922:(n,a,s)=>{var o=s(26541),d=s(17717),l=s(385),c=s(66737),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),l(u,o(f)-p),c(u,d(f)-m),u};n.exports=h},21373:(n,a,s)=>{var o=s(54380),d=s(17717),l=s(40136),c=s(66737),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),l(u,o(f)+p),c(u,d(f)-m),u};n.exports=h},91660:(n,a,s)=>{n.exports={BottomCenter:s(54312),BottomLeft:s(46768),BottomRight:s(35827),Center:s(46871),LeftCenter:s(5198),QuickSet:s(11879),RightCenter:s(80503),TopCenter:s(89698),TopLeft:s(922),TopRight:s(21373)}},71926:(n,a,s)=>{var o=s(60461),d=s(79291),l={In:s(91660),To:s(16694)};l=d(!1,l,o),n.exports=l},21578:(n,a,s)=>{var o=s(62235),d=s(35893),l=s(88417),c=s(66737),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),l(u,d(f)+p),c(u,o(f)+m),u};n.exports=h},10210:(n,a,s)=>{var o=s(62235),d=s(26541),l=s(385),c=s(66737),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),l(u,d(f)-p),c(u,o(f)+m),u};n.exports=h},82341:(n,a,s)=>{var o=s(62235),d=s(54380),l=s(40136),c=s(66737),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),l(u,d(f)+p),c(u,o(f)+m),u};n.exports=h},87958:(n,a,s)=>{var o=s(62235),d=s(26541),l=s(86327),c=s(40136),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,d(f)-p),l(u,o(f)+m),u};n.exports=h},40080:(n,a,s)=>{var o=s(7702),d=s(26541),l=s(20786),c=s(40136),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,d(f)-p),l(u,o(f)+m),u};n.exports=h},88466:(n,a,s)=>{var o=s(26541),d=s(17717),l=s(40136),c=s(66737),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),l(u,o(f)-p),c(u,d(f)-m),u};n.exports=h},38829:(n,a,s)=>{var o=s(60461),d=[];d[o.BOTTOM_CENTER]=s(21578),d[o.BOTTOM_LEFT]=s(10210),d[o.BOTTOM_RIGHT]=s(82341),d[o.LEFT_BOTTOM]=s(87958),d[o.LEFT_CENTER]=s(40080),d[o.LEFT_TOP]=s(88466),d[o.RIGHT_BOTTOM]=s(19211),d[o.RIGHT_CENTER]=s(34609),d[o.RIGHT_TOP]=s(48741),d[o.TOP_CENTER]=s(49440),d[o.TOP_LEFT]=s(81288),d[o.TOP_RIGHT]=s(61323);var l=function(c,h,u,f,p){return d[u](c,h,f,p)};n.exports=l},19211:(n,a,s)=>{var o=s(62235),d=s(54380),l=s(86327),c=s(385),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,d(f)+p),l(u,o(f)+m),u};n.exports=h},34609:(n,a,s)=>{var o=s(7702),d=s(54380),l=s(20786),c=s(385),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,d(f)+p),l(u,o(f)+m),u};n.exports=h},48741:(n,a,s)=>{var o=s(54380),d=s(17717),l=s(385),c=s(66737),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),l(u,o(f)+p),c(u,d(f)-m),u};n.exports=h},49440:(n,a,s)=>{var o=s(35893),d=s(17717),l=s(86327),c=s(88417),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,o(f)+p),l(u,d(f)-m),u};n.exports=h},81288:(n,a,s)=>{var o=s(26541),d=s(17717),l=s(86327),c=s(385),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,o(f)-p),l(u,d(f)-m),u};n.exports=h},61323:(n,a,s)=>{var o=s(54380),d=s(17717),l=s(86327),c=s(40136),h=function(u,f,p,m){return p===void 0&&(p=0),m===void 0&&(m=0),c(u,o(f)+p),l(u,d(f)-m),u};n.exports=h},16694:(n,a,s)=>{n.exports={BottomCenter:s(21578),BottomLeft:s(10210),BottomRight:s(82341),LeftBottom:s(87958),LeftCenter:s(40080),LeftTop:s(88466),QuickSet:s(38829),RightBottom:s(19211),RightCenter:s(34609),RightTop:s(48741),TopCenter:s(49440),TopLeft:s(81288),TopRight:s(61323)}},66786:(n,a,s)=>{var o=s(88417),d=s(20786),l=function(c,h,u){return o(c,h),d(c,u)};n.exports=l},62235:n=>{var a=function(s){return s.y+s.height-s.height*s.originY};n.exports=a},72873:(n,a,s)=>{var o=s(62235),d=s(26541),l=s(54380),c=s(17717),h=s(87841),u=function(f,p){p===void 0&&(p=new h);var m=d(f),g=c(f);return p.x=m,p.y=g,p.width=l(f)-m,p.height=o(f)-g,p};n.exports=u},35893:n=>{var a=function(s){return s.x-s.width*s.originX+s.width*.5};n.exports=a},7702:n=>{var a=function(s){return s.y-s.height*s.originY+s.height*.5};n.exports=a},26541:n=>{var a=function(s){return s.x-s.width*s.originX};n.exports=a},87431:n=>{var a=function(s){return s.width*s.originX};n.exports=a},46928:n=>{var a=function(s){return s.height*s.originY};n.exports=a},54380:n=>{var a=function(s){return s.x+s.width-s.width*s.originX};n.exports=a},17717:n=>{var a=function(s){return s.y-s.height*s.originY};n.exports=a},86327:n=>{var a=function(s,o){return s.y=o-s.height+s.height*s.originY,s};n.exports=a},88417:n=>{var a=function(s,o){var d=s.width*s.originX;return s.x=o+d-s.width*.5,s};n.exports=a},20786:n=>{var a=function(s,o){var d=s.height*s.originY;return s.y=o+d-s.height*.5,s};n.exports=a},385:n=>{var a=function(s,o){return s.x=o+s.width*s.originX,s};n.exports=a},40136:n=>{var a=function(s,o){return s.x=o-s.width+s.width*s.originX,s};n.exports=a},66737:n=>{var a=function(s,o){return s.y=o+s.height*s.originY,s};n.exports=a},58724:(n,a,s)=>{n.exports={CenterOn:s(66786),GetBottom:s(62235),GetBounds:s(72873),GetCenterX:s(35893),GetCenterY:s(7702),GetLeft:s(26541),GetOffsetX:s(87431),GetOffsetY:s(46928),GetRight:s(54380),GetTop:s(17717),SetBottom:s(86327),SetCenterX:s(88417),SetCenterY:s(20786),SetLeft:s(385),SetRight:s(40136),SetTop:s(66737)}},20623:n=>{var a={setCrisp:function(s){var o=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return o.forEach(function(d){s.style["image-rendering"]=d}),s.style.msInterpolationMode="nearest-neighbor",s},setBicubic:function(s){return s.style["image-rendering"]="auto",s.style.msInterpolationMode="bicubic",s}};n.exports=a},27919:(n,a,s)=>{var o=s(8054),d=s(68703),l=[],c=!1,h=function(){var u=function(_,C,w,T,S){C===void 0&&(C=1),w===void 0&&(w=1),T===void 0&&(T=o.CANVAS),S===void 0&&(S=!1);var E,D=m(T);return D===null?(D={parent:_,canvas:document.createElement("canvas"),type:T},T===o.CANVAS&&l.push(D),E=D.canvas):(D.parent=_,E=D.canvas),S&&(D.parent=E),E.width=C,E.height=w,c&&T===o.CANVAS&&d.disable(E.getContext("2d",{willReadFrequently:!1})),E},f=function(_,C,w){return u(_,C,w,o.CANVAS)},p=function(_,C,w){return u(_,C,w,o.WEBGL)},m=function(_){if(_===void 0&&(_=o.CANVAS),_===o.WEBGL)return null;for(var C=0;C{var a="",s=function(){var o=function(h){for(var u=["i","webkitI","msI","mozI","oI"],f=0;f{var a=function(s,o){return o===void 0&&(o="none"),s.style.msTouchAction=o,s.style["ms-touch-action"]=o,s.style["touch-action"]=o,s};n.exports=a},91610:n=>{var a=function(s,o){o===void 0&&(o="none");var d=["-webkit-","-khtml-","-moz-","-ms-",""];return d.forEach(function(l){s.style[l+"user-select"]=o}),s.style["-webkit-touch-callout"]=o,s.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",s};n.exports=a},26253:(n,a,s)=>{n.exports={CanvasInterpolation:s(20623),CanvasPool:s(27919),Smoothing:s(68703),TouchAction:s(65208),UserSelect:s(91610)}},40987:(n,a,s)=>{var o=s(83419),d=s(37589),l=s(1e3),c=s(7537),h=s(87837),u=new o({initialize:function(p,m,g,v){p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(p,m,g,v)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(f,p,m,g,v){return g===void 0&&(g=255),v===void 0&&(v=!0),this._locked=!0,this.red=f,this.green=p,this.blue=m,this.alpha=g,this._locked=!1,this.update(v)},setGLTo:function(f,p,m,g){return g===void 0&&(g=1),this._locked=!0,this.redGL=f,this.greenGL=p,this.blueGL=m,this.alphaGL=g,this._locked=!1,this.update(!0)},setFromRGB:function(f){return this._locked=!0,this.red=f.r,this.green=f.g,this.blue=f.b,f.hasOwnProperty("a")&&(this.alpha=f.a),this._locked=!1,this.update(!0)},setFromHSV:function(f,p,m){return c(f,p,m,this)},update:function(f){if(f===void 0&&(f=!1),this._locked)return this;var p=this.r,m=this.g,g=this.b,v=this.a;return this._color=d(p,m,g),this._color32=l(p,m,g,v),this._rgba="rgba("+p+","+m+","+g+","+v/255+")",f&&h(p,m,g,this),this},updateHSV:function(){var f=this.r,p=this.g,m=this.b;return h(f,p,m,this),this},clone:function(){return new u(this.r,this.g,this.b,this.a)},gray:function(f){return this.setTo(f,f,f)},random:function(f,p){f===void 0&&(f=0),p===void 0&&(p=255);var m=Math.floor(f+Math.random()*(p-f)),g=Math.floor(f+Math.random()*(p-f)),v=Math.floor(f+Math.random()*(p-f));return this.setTo(m,g,v)},randomGray:function(f,p){f===void 0&&(f=0),p===void 0&&(p=255);var m=Math.floor(f+Math.random()*(p-f));return this.setTo(m,m,m)},saturate:function(f){return this.s+=f/100,this},desaturate:function(f){return this.s-=f/100,this},lighten:function(f){return this.v+=f/100,this},darken:function(f){return this.v-=f/100,this},brighten:function(f){var p=this.r,m=this.g,g=this.b;return p=Math.max(0,Math.min(255,p-Math.round(255*-(f/100)))),m=Math.max(0,Math.min(255,m-Math.round(255*-(f/100)))),g=Math.max(0,Math.min(255,g-Math.round(255*-(f/100)))),this.setTo(p,m,g)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(f){this.gl[0]=Math.min(Math.abs(f),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(f){this.gl[1]=Math.min(Math.abs(f),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(f){this.gl[2]=Math.min(Math.abs(f),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(f){this.gl[3]=Math.min(Math.abs(f),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(f){f=Math.floor(Math.abs(f)),this.r=Math.min(f,255),this.gl[0]=f/255,this.update(!0)}},green:{get:function(){return this.g},set:function(f){f=Math.floor(Math.abs(f)),this.g=Math.min(f,255),this.gl[1]=f/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(f){f=Math.floor(Math.abs(f)),this.b=Math.min(f,255),this.gl[2]=f/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(f){f=Math.floor(Math.abs(f)),this.a=Math.min(f,255),this.gl[3]=f/255,this.update()}},h:{get:function(){return this._h},set:function(f){this._h=f,c(f,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(f){this._s=f,c(this._h,f,this._v,this)}},v:{get:function(){return this._v},set:function(f){this._v=f,c(this._h,this._s,f,this)}}});n.exports=u},92728:(n,a,s)=>{var o=s(37589),d=function(l){l===void 0&&(l=1024);var c=[],h=255,u,f=255,p=0,m=0;for(u=0;u<=h;u++)c.push({r:f,g:u,b:m,color:o(f,u,m)});for(p=255,u=h;u>=0;u--)c.push({r:u,g:p,b:m,color:o(u,p,m)});for(f=0,u=0;u<=h;u++,p--)c.push({r:f,g:p,b:u,color:o(f,p,u)});for(p=0,m=255,u=0;u<=h;u++,m--,f++)c.push({r:f,g:p,b:m,color:o(f,p,m)});if(l===1024)return c;var g=[],v=0,y=1024/l;for(u=0;u{var a=function(s){var o={r:s>>16&255,g:s>>8&255,b:s&255,a:255};return s>16777215&&(o.a=s>>>24),o};n.exports=a},62957:n=>{var a=function(s){var o=s.toString(16);return o.length===1?"0"+o:o};n.exports=a},37589:n=>{var a=function(s,o,d){return s<<16|o<<8|d};n.exports=a},1e3:n=>{var a=function(s,o,d,l){return l<<24|s<<16|o<<8|d};n.exports=a},62183:(n,a,s)=>{var o=s(40987),d=s(89528),l=function(c,h,u){var f=u,p=u,m=u;if(h!==0){var g=u<.5?u*(1+h):u+h-u*h,v=2*u-g;f=d(v,g,c+1/3),p=d(v,g,c),m=d(v,g,c-1/3)}var y=new o;return y.setGLTo(f,p,m,1)};n.exports=l},27939:(n,a,s)=>{var o=s(7537),d=function(l,c){l===void 0&&(l=1),c===void 0&&(c=1);for(var h=[],u=0;u<=359;u++)h.push(o(u/359,l,c));return h};n.exports=d},7537:(n,a,s)=>{var o=s(37589);function d(c,h,u,f){var p=(c+h*6)%6,m=Math.min(p,4-p,1);return Math.round(255*(f-f*u*Math.max(0,m)))}var l=function(c,h,u,f){h===void 0&&(h=1),u===void 0&&(u=1);var p=d(5,c,h,u),m=d(3,c,h,u),g=d(1,c,h,u);return f?f.setTo?f.setTo(p,m,g,f.alpha,!0):(f.r=p,f.g=m,f.b=g,f.color=o(p,m,g),f):{r:p,g:m,b:g,color:o(p,m,g)}};n.exports=l},70238:(n,a,s)=>{var o=s(40987),d=function(l){var c=new o;l=l.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(m,g,v,y){return g+g+v+v+y+y});var h=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(l);if(h){var u=parseInt(h[1],16),f=parseInt(h[2],16),p=parseInt(h[3],16);c.setTo(u,f,p)}return c};n.exports=d},89528:n=>{var a=function(s,o,d){return d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?s+(o-s)*6*d:d<.5?o:d<.6666666666666666?s+(o-s)*(.6666666666666666-d)*6:s};n.exports=a},30100:(n,a,s)=>{var o=s(40987),d=s(90664),l=function(c){var h=d(c);return new o(h.r,h.g,h.b,h.a)};n.exports=l},90664:n=>{var a=function(s){return s>16777215?{a:s>>>24,r:s>>16&255,g:s>>8&255,b:s&255}:{a:255,r:s>>16&255,g:s>>8&255,b:s&255}};n.exports=a},13699:(n,a,s)=>{var o=s(28915),d=function(h,u,f,p,m,g,v,y){v===void 0&&(v=100),y===void 0&&(y=0);var x=y/v;return{r:o(h,p,x),g:o(u,m,x),b:o(f,g,x)}},l=function(h,u,f,p){return f===void 0&&(f=100),p===void 0&&(p=0),d(h.r,h.g,h.b,u.r,u.g,u.b,f,p)},c=function(h,u,f,p,m,g){return m===void 0&&(m=100),g===void 0&&(g=0),d(h.r,h.g,h.b,u,f,p,m,g)};n.exports={RGBWithRGB:d,ColorWithRGB:c,ColorWithColor:l}},68957:(n,a,s)=>{var o=s(40987),d=function(l){return new o(l.r,l.g,l.b,l.a)};n.exports=d},87388:(n,a,s)=>{var o=s(40987),d=function(l){var c=new o,h=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(l.toLowerCase());if(h){var u=parseInt(h[1],10),f=parseInt(h[2],10),p=parseInt(h[3],10),m=h[4]!==void 0?parseFloat(h[4]):1;c.setTo(u,f,p,m*255)}return c};n.exports=d},87837:n=>{var a=function(s,o,d,l){l===void 0&&(l={h:0,s:0,v:0}),s/=255,o/=255,d/=255;var c=Math.min(s,o,d),h=Math.max(s,o,d),u=h-c,f=0,p=h===0?0:u/h,m=h;return h!==c&&(h===s?f=(o-d)/u+(o{var o=s(62957),d=function(l,c,h,u,f){return u===void 0&&(u=255),f===void 0&&(f="#"),f==="#"?"#"+((1<<24)+(l<<16)+(c<<8)+h).toString(16).slice(1,7):"0x"+o(u)+o(l)+o(c)+o(h)};n.exports=d},85386:(n,a,s)=>{var o=s(30976),d=s(40987),l=function(c,h){return c===void 0&&(c=0),h===void 0&&(h=255),new d(o(c,h),o(c,h),o(c,h))};n.exports=l},80333:(n,a,s)=>{var o=s(70238),d=s(30100),l=s(68957),c=s(87388),h=function(u){var f=typeof u;switch(f){case"string":return u.substr(0,3).toLowerCase()==="rgb"?c(u):o(u);case"number":return d(u);case"object":return l(u)}};n.exports=h},3956:(n,a,s)=>{var o=s(40987);o.ColorSpectrum=s(92728),o.ColorToRGBA=s(91588),o.ComponentToHex=s(62957),o.GetColor=s(37589),o.GetColor32=s(1e3),o.HexStringToColor=s(70238),o.HSLToColor=s(62183),o.HSVColorWheel=s(27939),o.HSVToRGB=s(7537),o.HueToComponent=s(89528),o.IntegerToColor=s(30100),o.IntegerToRGB=s(90664),o.Interpolate=s(13699),o.ObjectToColor=s(68957),o.RandomRGB=s(85386),o.RGBStringToColor=s(87388),o.RGBToHSV=s(87837),o.RGBToString=s(75723),o.ValueToColor=s(80333),n.exports=o},27460:(n,a,s)=>{n.exports={Align:s(71926),BaseShader:s(73894),Bounds:s(58724),Canvas:s(26253),Color:s(3956),ColorMatrix:s(89422),Masks:s(69781),RGB:s(51767)}},6858:(n,a,s)=>{var o=s(83419),d=s(39429),l=new o({initialize:function(h,u,f,p,m,g){u||(u=h.sys.make.image({x:f,y:p,key:m,frame:g,add:!1})),this.bitmapMask=u,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(c){this.bitmapMask=c},preRenderWebGL:function(c,h,u){c.pipelines.BITMAPMASK_PIPELINE.beginMask(this,h,u)},postRenderWebGL:function(c,h,u){c.pipelines.BITMAPMASK_PIPELINE.endMask(this,h,u)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});d.register("bitmapMask",function(c,h,u,f,p){return new l(this.scene,c,h,u,f,p)}),n.exports=l},80661:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h){this.geometryMask=h,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(l){return this.geometryMask=l,this},setInvertAlpha:function(l){return l===void 0&&(l=!0),this.invertAlpha=l,this},preRenderWebGL:function(l,c,h){var u=l.gl;l.flush(),l.maskStack.length===0&&(u.enable(u.STENCIL_TEST),u.clear(u.STENCIL_BUFFER_BIT),l.maskCount=0),l.currentCameraMask.mask!==this&&(l.currentMask.mask=this),l.maskStack.push({mask:this,camera:h}),this.applyStencil(l,h,!0),l.maskCount++},applyStencil:function(l,c,h){var u=l.gl,f=this.geometryMask,p=l.maskCount,m=255;u.colorMask(!1,!1,!1,!1),h?(u.stencilFunc(u.EQUAL,p,m),u.stencilOp(u.KEEP,u.KEEP,u.INCR),p++):(u.stencilFunc(u.EQUAL,p+1,m),u.stencilOp(u.KEEP,u.KEEP,u.DECR)),this.level=p,f.renderWebGL(l,f,c),l.flush(),u.colorMask(!0,!0,!0,!0),u.stencilOp(u.KEEP,u.KEEP,u.KEEP),this.invertAlpha?u.stencilFunc(u.NOTEQUAL,p,m):u.stencilFunc(u.EQUAL,p,m)},postRenderWebGL:function(l){var c=l.gl;l.maskStack.pop(),l.maskCount--,l.flush();var h=l.currentMask;if(l.maskStack.length===0)h.mask=null,c.disable(c.STENCIL_TEST);else{var u=l.maskStack[l.maskStack.length-1];u.mask.applyStencil(l,u.camera,!1),l.currentCameraMask.mask!==u.mask?(h.mask=u.mask,h.camera=u.camera):h.mask=null}},preRenderCanvas:function(l,c,h){var u=this.geometryMask;l.currentContext.save(),u.renderCanvas(l,u,h,null,null,!0),l.currentContext.clip()},postRenderCanvas:function(l){l.currentContext.restore()},destroy:function(){this.geometryMask=null}});n.exports=d},69781:(n,a,s)=>{n.exports={BitmapMask:s(6858),GeometryMask:s(80661)}},73894:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h,u,f){(!h||h==="")&&(h=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(` +`)),(!u||u==="")&&(u=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(` +`)),f===void 0&&(f=null),this.key=c,this.fragmentSrc=h,this.vertexSrc=u,this.uniforms=f}});n.exports=d},40366:n=>{var a=function(s,o){var d;if(o)typeof o=="string"?d=document.getElementById(o):typeof o=="object"&&o.nodeType===1&&(d=o);else if(s.parentElement||o===null)return s;return d||(d=document.body),d.appendChild(s),s};n.exports=a},83719:(n,a,s)=>{var o=s(40366),d=function(l){var c=l.config;if(!(!c.parent||!c.domCreateContainer)){var h=document.createElement("div");h.style.cssText=["display: block;","width: "+l.scale.width+"px;","height: "+l.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+c.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),l.domContainer=h,o(h,c.parent)}};n.exports=d},57264:(n,a,s)=>{var o=s(25892),d=function(l){if(document.readyState==="complete"||document.readyState==="interactive"){l();return}var c=function(){document.removeEventListener("deviceready",c,!0),document.removeEventListener("DOMContentLoaded",c,!0),window.removeEventListener("load",c,!0),l()};document.body?o.cordova?document.addEventListener("deviceready",c,!1):(document.addEventListener("DOMContentLoaded",c,!0),window.addEventListener("load",c,!0)):window.setTimeout(c,20)};n.exports=d},57811:n=>{var a=function(s){if(!s)return window.innerHeight;var o=Math.abs(window.orientation),d={w:0,h:0},l=document.createElement("div");return l.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(l),d.w=o===90?l.offsetHeight:window.innerWidth,d.h=o===90?window.innerWidth:l.offsetHeight,document.documentElement.removeChild(l),l=null,Math.abs(window.orientation)!==90?d.h:d.w};n.exports=a},45818:(n,a,s)=>{var o=s(13560),d=function(l,c){var h=window.screen,u=h?h.orientation||h.mozOrientation||h.msOrientation:!1;if(u&&typeof u.type=="string")return u.type;if(typeof u=="string")return u;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?o.ORIENTATION.PORTRAIT:o.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return o.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return o.ORIENTATION.LANDSCAPE}else return c>l?o.ORIENTATION.PORTRAIT:o.ORIENTATION.LANDSCAPE};n.exports=d},74403:n=>{var a=function(s){var o;return s!==""&&(typeof s=="string"?o=document.getElementById(s):s&&s.nodeType===1&&(o=s)),o||(o=document.body),o};n.exports=a},56836:n=>{var a=function(s){var o="";try{if(window.DOMParser){var d=new DOMParser;o=d.parseFromString(s,"text/xml")}else o=new ActiveXObject("Microsoft.XMLDOM"),o.loadXML(s)}catch{o=null}return!o||!o.documentElement||o.getElementsByTagName("parsererror").length?null:o};n.exports=a},35846:n=>{var a=function(s){s.parentNode&&s.parentNode.removeChild(s)};n.exports=a},43092:(n,a,s)=>{var o=s(83419),d=s(29747),l=new o({initialize:function(){this.isRunning=!1,this.callback=d,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var h=this;this.step=function u(f){h.callback(f),h.isRunning&&(h.timeOutID=window.requestAnimationFrame(u))},this.stepTimeout=function u(){h.isRunning&&(h.timeOutID=window.setTimeout(u,h.delay)),h.callback(window.performance.now())}},start:function(c,h,u){this.isRunning||(this.callback=c,this.isSetTimeOut=h,this.delay=u,this.isRunning=!0,this.timeOutID=h?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=d}});n.exports=l},84902:(n,a,s)=>{var o={AddToDOM:s(40366),DOMContentLoaded:s(57264),GetInnerHeight:s(57811),GetScreenOrientation:s(45818),GetTarget:s(74403),ParseXML:s(56836),RemoveFromDOM:s(35846),RequestAnimationFrame:s(43092)};n.exports=o},47565:(n,a,s)=>{var o=s(83419),d=s(50792),l=s(37277),c=new o({Extends:d,initialize:function(){d.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});l.register("EventEmitter",c,"events"),n.exports=c},93055:(n,a,s)=>{n.exports={EventEmitter:s(47565)}},20122:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f){f===void 0&&(f=1),d.call(this,l.BARREL,u),this.amount=f}});n.exports=c},32251:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g,v,y){p===void 0&&(p=1),m===void 0&&(m=1),g===void 0&&(g=1),v===void 0&&(v=1),y===void 0&&(y=4),d.call(this,l.BLOOM,u),this.steps=y,this.offsetX=p,this.offsetY=m,this.blurStrength=g,this.strength=v,this.glcolor=[1,1,1],f!=null&&(this.color=f)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var u=this.glcolor;u[0]=(h>>16&255)/255,u[1]=(h>>8&255)/255,u[2]=(h&255)/255}}});n.exports=c},9047:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g,v,y){f===void 0&&(f=0),p===void 0&&(p=2),m===void 0&&(m=2),g===void 0&&(g=1),y===void 0&&(y=4),d.call(this,l.BLUR,u),this.quality=f,this.x=p,this.y=m,this.steps=y,this.strength=g,this.glcolor=[1,1,1],v!=null&&(this.color=v)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var u=this.glcolor;u[0]=(h>>16&255)/255,u[1]=(h>>8&255)/255,u[2]=(h&255)/255}}});n.exports=c},27885:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g,v,y,x){f===void 0&&(f=.5),p===void 0&&(p=1),m===void 0&&(m=.2),g===void 0&&(g=!1),v===void 0&&(v=1),y===void 0&&(y=1),x===void 0&&(x=1),d.call(this,l.BOKEH,u),this.radius=f,this.amount=p,this.contrast=m,this.isTiltShift=g,this.strength=x,this.blurX=v,this.blurY=y}});n.exports=c},12578:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g,v){f===void 0&&(f=8),g===void 0&&(g=1),v===void 0&&(v=.005),d.call(this,l.CIRCLE,u),this.scale=g,this.feather=v,this.thickness=f,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],p!=null&&(this.color=p),m!=null&&(this.backgroundColor=m)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var u=this.glcolor;u[0]=(h>>16&255)/255,u[1]=(h>>8&255)/255,u[2]=(h&255)/255}},backgroundColor:{get:function(){var h=this.glcolor2;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var u=this.glcolor2;u[0]=(h>>16&255)/255,u[1]=(h>>8&255)/255,u[2]=(h&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(h){this.glcolor2[3]=h}}});n.exports=c},15802:(n,a,s)=>{var o=s(83419),d=s(89422),l=s(14811),c=new o({Extends:d,initialize:function(u){d.call(this),this.type=l.COLOR_MATRIX,this.gameObject=u,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});n.exports=c},72898:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h){this.type=c,this.gameObject=h,this.active=!0},setActive:function(l){return this.active=l,this},destroy:function(){this.gameObject=null,this.active=!1}});n.exports=d},44553:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m){f===void 0&&(f="__WHITE"),p===void 0&&(p=.005),m===void 0&&(m=.005),d.call(this,l.DISPLACEMENT,u),this.x=p,this.y=m,this.glTexture,this.setTexture(f)},setTexture:function(h){var u=this.gameObject.scene.sys.textures.getFrame(h);return u&&(this.glTexture=u.glTexture),this}});n.exports=c},68531:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g){p===void 0&&(p=4),m===void 0&&(m=0),g===void 0&&(g=!1),d.call(this,l.GLOW,u),this.outerStrength=p,this.innerStrength=m,this.knockout=g,this.glcolor=[1,1,1,1],f!==void 0&&(this.color=f)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var u=this.glcolor;u[0]=(h>>16&255)/255,u[1]=(h>>8&255)/255,u[2]=(h&255)/255}}});n.exports=c},37102:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g,v,y,x,b){m===void 0&&(m=.2),g===void 0&&(g=0),v===void 0&&(v=0),y===void 0&&(y=0),x===void 0&&(x=1),b===void 0&&(b=0),d.call(this,l.GRADIENT,u),this.alpha=m,this.size=b,this.fromX=g,this.fromY=v,this.toX=y,this.toY=x,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],f!=null&&(this.color1=f),p!=null&&(this.color2=p)},color1:{get:function(){var h=this.glcolor1;return(h[0]<<16)+(h[1]<<8)+(h[2]|0)},set:function(h){var u=this.glcolor1;u[0]=h>>16&255,u[1]=h>>8&255,u[2]=h&255}},color2:{get:function(){var h=this.glcolor2;return(h[0]<<16)+(h[1]<<8)+(h[2]|0)},set:function(h){var u=this.glcolor2;u[0]=h>>16&255,u[1]=h>>8&255,u[2]=h&255}}});n.exports=c},86886:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f){f===void 0&&(f=1),d.call(this,l.PIXELATE,u),this.amount=f}});n.exports=c},92322:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g,v,y,x){f===void 0&&(f=0),p===void 0&&(p=0),m===void 0&&(m=.1),g===void 0&&(g=1),y===void 0&&(y=6),x===void 0&&(x=1),d.call(this,l.SHADOW,u),this.x=f,this.y=p,this.decay=m,this.power=g,this.glcolor=[0,0,0,1],this.samples=y,this.intensity=x,v!==void 0&&(this.color=v)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var u=this.glcolor;u[0]=(h>>16&255)/255,u[1]=(h>>8&255)/255,u[2]=(h&255)/255}}});n.exports=c},39563:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g){f===void 0&&(f=.5),p===void 0&&(p=.5),m===void 0&&(m=3),g===void 0&&(g=!1),d.call(this,l.SHINE,u),this.speed=f,this.lineWidth=p,this.gradient=m,this.reveal=g}});n.exports=c},56448:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g){f===void 0&&(f=.5),p===void 0&&(p=.5),m===void 0&&(m=.5),g===void 0&&(g=.5),d.call(this,l.VIGNETTE,u),this.x=f,this.y=p,this.radius=m,this.strength=g}});n.exports=c},38433:(n,a,s)=>{var o=s(83419),d=s(72898),l=s(14811),c=new o({Extends:d,initialize:function(u,f,p,m,g){f===void 0&&(f=.1),p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=!1),d.call(this,l.WIPE,u),this.progress=0,this.wipeWidth=f,this.direction=p,this.axis=m,this.reveal=g}});n.exports=c},14811:n=>{var a={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};n.exports=a},66064:(n,a,s)=>{var o=s(79291),d=s(14811),l={Barrel:s(20122),Controller:s(72898),Bloom:s(32251),Blur:s(9047),Bokeh:s(27885),Circle:s(12578),ColorMatrix:s(15802),Displacement:s(44553),Glow:s(68531),Gradient:s(37102),Pixelate:s(86886),Shadow:s(92322),Shine:s(39563),Vignette:s(56448),Wipe:s(38433)};l=o(!1,l,d),n.exports=l},25305:(n,a,s)=>{var o=s(10312),d=s(23568),l=function(c,h,u){h.x=d(u,"x",0),h.y=d(u,"y",0),h.depth=d(u,"depth",0),h.flipX=d(u,"flipX",!1),h.flipY=d(u,"flipY",!1);var f=d(u,"scale",null);typeof f=="number"?h.setScale(f):f!==null&&(h.scaleX=d(f,"x",1),h.scaleY=d(f,"y",1));var p=d(u,"scrollFactor",null);typeof p=="number"?h.setScrollFactor(p):p!==null&&(h.scrollFactorX=d(p,"x",1),h.scrollFactorY=d(p,"y",1)),h.rotation=d(u,"rotation",0);var m=d(u,"angle",null);m!==null&&(h.angle=m),h.alpha=d(u,"alpha",1);var g=d(u,"origin",null);if(typeof g=="number")h.setOrigin(g);else if(g!==null){var v=d(g,"x",.5),y=d(g,"y",.5);h.setOrigin(v,y)}h.blendMode=d(u,"blendMode",o.NORMAL),h.visible=d(u,"visible",!0);var x=d(u,"add",!0);return x&&c.sys.displayList.add(h),h.preUpdate&&c.sys.updateList.add(h),h};n.exports=l},13059:(n,a,s)=>{var o=s(23568),d=function(l,c){var h=o(c,"anims",null);if(h===null)return l;if(typeof h=="string")l.anims.play(h);else if(typeof h=="object"){var u=l.anims,f=o(h,"key",void 0);if(f){var p=o(h,"startFrame",void 0),m=o(h,"delay",0),g=o(h,"repeat",0),v=o(h,"repeatDelay",0),y=o(h,"yoyo",!1),x=o(h,"play",!1),b=o(h,"delayedPlay",0),_={key:f,delay:m,repeat:g,repeatDelay:v,yoyo:y,startFrame:p};x?u.play(_):b>0?u.playAfterDelay(_,b):u.load(_)}}return l};n.exports=d},8050:(n,a,s)=>{var o=s(83419),d=s(73162),l=s(37277),c=s(51708),h=s(44594),u=s(19186),f=new o({Extends:d,initialize:function(m){d.call(this,m),this.sortChildrenFlag=!1,this.scene=m,this.systems=m.sys,this.events=m.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},addChildCallback:function(p){p.displayList&&p.displayList!==this&&p.removeFromDisplayList(),p.parentContainer&&p.parentContainer.remove(p),p.displayList||(this.queueDepthSort(),p.displayList=this,p.emit(c.ADDED_TO_SCENE,p,this.scene),this.events.emit(h.ADDED_TO_SCENE,p,this.scene))},removeChildCallback:function(p){this.queueDepthSort(),p.displayList=null,p.emit(c.REMOVED_FROM_SCENE,p,this.scene),this.events.emit(h.REMOVED_FROM_SCENE,p,this.scene)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(u(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(p,m){return p._depth-m._depth},getChildren:function(){return this.list},shutdown:function(){for(var p=this.list;p.length;)p[0].destroy(!0);this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});l.register("DisplayList",f,"displayList"),n.exports=f},95643:(n,a,s)=>{var o=s(83419),d=s(53774),l=s(45893),c=s(50792),h=s(51708),u=s(44594),f=new o({Extends:c,initialize:function(m,g){c.call(this),this.scene=m,this.displayList=null,this.type=g,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this),m.sys.queueDepthSort()},setActive:function(p){return this.active=p,this},setName:function(p){return this.name=p,this},setState:function(p){return this.state=p,this},setDataEnabled:function(){return this.data||(this.data=new l(this)),this},setData:function(p,m){return this.data||(this.data=new l(this)),this.data.set(p,m),this},incData:function(p,m){return this.data||(this.data=new l(this)),this.data.inc(p,m),this},toggleData:function(p){return this.data||(this.data=new l(this)),this.data.toggle(p),this},getData:function(p){return this.data||(this.data=new l(this)),this.data.get(p)},setInteractive:function(p,m,g){return this.scene.sys.input.enable(this,p,m,g),this},disableInteractive:function(p){return p===void 0&&(p=!1),this.scene.sys.input.disable(this,p),this},removeInteractive:function(p){return p===void 0&&(p=!1),this.scene.sys.input.clear(this),p&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return d(this)},willRender:function(p){var m=this.displayList&&this.displayList.active?this.displayList.willRender(p):!0;return!(!m||f.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&p.id)},getIndexList:function(){for(var p=this,m=this.parentContainer,g=[];m&&(g.unshift(m.getIndex(p)),p=m,m.parentContainer);)m=m.parentContainer;return this.displayList?g.unshift(this.displayList.getIndex(p)):g.unshift(this.scene.sys.displayList.getIndex(p)),g},addToDisplayList:function(p){return p===void 0&&(p=this.scene.sys.displayList),this.displayList&&this.displayList!==p&&this.removeFromDisplayList(),p.exists(this)||(this.displayList=p,p.add(this,!0),p.queueDepthSort(),this.emit(h.ADDED_TO_SCENE,this,this.scene),p.events.emit(u.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var p=this.displayList||this.scene.sys.displayList;return p&&p.exists(this)&&(p.remove(this,!0),p.queueDepthSort(),this.displayList=null,this.emit(h.REMOVED_FROM_SCENE,this,this.scene),p.events.emit(u.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var p=null;return this.parentContainer?p=this.parentContainer.list:this.displayList&&(p=this.displayList.list),p},destroy:function(p){!this.scene||this.ignoreDestroy||(p===void 0&&(p=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(h.DESTROY,this,p),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});f.RENDER_MASK=15,n.exports=f},44603:(n,a,s)=>{var o=s(83419),d=s(37277),l=s(44594),c=new o({initialize:function(u){this.scene=u,this.systems=u.sys,this.events=u.sys.events,this.displayList,this.updateList,this.events.once(l.BOOT,this.boot,this),this.events.on(l.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(l.DESTROY,this.destroy,this)},start:function(){this.events.once(l.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(l.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});c.register=function(h,u){c.prototype.hasOwnProperty(h)||(c.prototype[h]=u)},c.remove=function(h){c.prototype.hasOwnProperty(h)&&delete c.prototype[h]},d.register("GameObjectCreator",c,"make"),n.exports=c},39429:(n,a,s)=>{var o=s(83419),d=s(37277),l=s(44594),c=new o({initialize:function(u){this.scene=u,this.systems=u.sys,this.events=u.sys.events,this.displayList,this.updateList,this.events.once(l.BOOT,this.boot,this),this.events.on(l.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(l.DESTROY,this.destroy,this)},start:function(){this.events.once(l.SHUTDOWN,this.shutdown,this)},existing:function(h){return(h.renderCanvas||h.renderWebGL)&&this.displayList.add(h),h.preUpdate&&this.updateList.add(h),h},shutdown:function(){this.events.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(l.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});c.register=function(h,u){c.prototype.hasOwnProperty(h)||(c.prototype[h]=u)},c.remove=function(h){c.prototype.hasOwnProperty(h)&&delete c.prototype[h]},d.register("GameObjectFactory",c,"add"),n.exports=c},91296:(n,a,s)=>{var o=s(61340),d=new o,l=new o,c=new o,h={camera:d,sprite:l,calc:c},u=function(f,p,m){var g=d,v=l,y=c;return v.applyITRS(f.x,f.y,f.rotation,f.scaleX,f.scaleY),g.copyFrom(p.matrix),m?(g.multiplyWithOffset(m,-p.scrollX*f.scrollFactorX,-p.scrollY*f.scrollFactorY),v.e=f.x,v.f=f.y):(v.e-=p.scrollX*f.scrollFactorX,v.f-=p.scrollY*f.scrollFactorY),g.multiply(v,y),h};n.exports=u},45027:(n,a,s)=>{var o=s(83419),d=s(25774),l=s(37277),c=s(44594),h=new o({Extends:d,initialize:function(f){d.call(this),this.checkQueue=!0,this.scene=f,this.systems=f.sys,f.sys.events.once(c.BOOT,this.boot,this),f.sys.events.on(c.START,this.start,this)},boot:function(){this.systems.events.once(c.DESTROY,this.destroy,this)},start:function(){var u=this.systems.events;u.on(c.PRE_UPDATE,this.update,this),u.on(c.UPDATE,this.sceneUpdate,this),u.once(c.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(u,f){for(var p=this._active,m=p.length,g=0;g{var a=function(s,o,d,l,c,h,u,f,p,m,g,v,y,x,b){var _=d.x-o.displayOriginX+c,C=d.y-o.displayOriginY+h,w=_+d.w,T=C+d.h,S=u.a,E=u.b,D=u.c,A=u.d,M=u.e,R=u.f,L=_*S+C*D+M,I=_*E+C*A+R,O=_*S+T*D+M,N=_*E+T*A+R,H=w*S+T*D+M,X=w*E+T*A+R,V=w*S+C*D+M,z=w*E+C*A+R;f&&(L=Math.round(L),I=Math.round(I),O=Math.round(O),N=Math.round(N),H=Math.round(H),X=Math.round(X),V=Math.round(V),z=Math.round(z)),s.batchQuad(o,L,I,O,N,H,X,V,z,l.u0,l.v0,l.u1,l.v1,p,m,g,v,y,x,b)};n.exports=a},53048:n=>{var a=function(s,o,d,l){if(d===void 0&&(d=!1),l===void 0)return l={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},l;var c=s.text,h=c.length,u=s.maxWidth,f=s.wordWrapCharCode,p=Number.MAX_VALUE,m=Number.MAX_VALUE,g=0,v=0,y=s.fontData.chars,x=s.fontData.lineHeight,b=s.letterSpacing,_=s.lineSpacing,C=0,w=0,T=0,S=null,E=s._align,D=0,A=0,M=s.fontSize/s.fontData.size,R=M*s.scaleX,L=M*s.scaleY,I=null,O=0,N=[],H=Number.MAX_VALUE,X=0,V=0,z=0,F,k,G,Z=[],J=[],W=null,q=function(Bt,Zi){for(var Si=0,ji=0;ji0){G=c.split(` +`);var ie=[];for(F=0;FX&&(X=z),zD&&(p=D),m>A&&(m=A);var Ge=D+S.xAdvance,ke=A+x;gX&&(X=z),z0)for(var ot=0;ot{var o=s(21859),d=function(l,c,h,u,f,p,m){var g=l.sys.textures.get(h),v=g.get(u),y=l.sys.cache.xml.get(f);if(v&&y){var x=o(y,v,p,m,g);return l.sys.cache.bitmapFont.add(c,{data:x,texture:h,frame:u,fromAtlas:!0}),!0}else return!1};n.exports=d},6925:(n,a,s)=>{var o=s(35154),d=function(l,c){var h=c.width,u=c.height,f=Math.floor(h/2),p=Math.floor(u/2),m=o(c,"chars","");if(m!==""){var g=o(c,"image",""),v=l.sys.textures.getFrame(g),y=v.cutX,x=v.cutY,b=v.source.width,_=v.source.height,C=o(c,"offset.x",0),w=o(c,"offset.y",0),T=o(c,"spacing.x",0),S=o(c,"spacing.y",0),E=o(c,"lineSpacing",0),D=o(c,"charsPerRow",null);D===null&&(D=b/h,D>m.length&&(D=m.length));for(var A=C,M=w,R={retroFont:!0,font:g,size:h,lineHeight:u+E,chars:{}},L=0,I=0;I{function a(o,d){return parseInt(o.getAttribute(d),10)}var s=function(o,d,l,c,h){l===void 0&&(l=0),c===void 0&&(c=0);var u=d.cutX,f=d.cutY,p=d.source.width,m=d.source.height,g=d.sourceIndex,v={},y=o.getElementsByTagName("info")[0],x=o.getElementsByTagName("common")[0];v.font=y.getAttribute("face"),v.size=a(y,"size"),v.lineHeight=a(x,"lineHeight")+c,v.chars={};var b=o.getElementsByTagName("char"),_=d!==void 0&&d.trimmed;if(_)var C=d.height,w=d.width;for(var T=0;T{var o=s(87662),d=s(79291),l={Parse:s(6925)};l=d(!1,l,o),n.exports=l},87662:n=>{var a={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};n.exports=a},2638:(n,a,s)=>{var o=s(22186),d=s(83419),l=s(12310),c=new d({Extends:o,Mixins:[l],initialize:function(u,f,p,m,g,v,y){o.call(this,u,f,p,m,g,v,y),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(h,u){return this.cropWidth=h,this.cropHeight=u,this},setDisplayCallback:function(h){return this.displayCallback=h,this},setScrollX:function(h){return this.scrollX=h,this},setScrollY:function(h){return this.scrollY=h,this}});n.exports=c},86741:(n,a,s)=>{var o=s(20926),d=function(l,c,h,u){var f=c._text,p=f.length,m=l.currentContext;if(!(p===0||!o(l,m,c,h,u))){h.addToRenderList(c);var g=c.fromAtlas?c.frame:c.texture.frames.__BASE,v=c.displayCallback,y=c.callbackData,x=c.fontData.chars,b=c.fontData.lineHeight,_=c._letterSpacing,C=0,w=0,T=0,S=null,E=0,D=0,A=0,M=0,R=0,L=0,I=null,O=0,N=c.frame.source.image,H=g.cutX,X=g.cutY,V=0,z=0,F=c._fontSize/c.fontData.size,k=c._align,G=0,Z=0;c.getTextBounds(!1);var J=c._bounds.lines;k===1?Z=(J.longest-J.lengths[0])/2:k===2&&(Z=J.longest-J.lengths[0]),m.translate(-c.displayOriginX,-c.displayOriginY);var W=h.roundPixels;c.cropWidth>0&&c.cropHeight>0&&(m.beginPath(),m.rect(0,0,c.cropWidth,c.cropHeight),m.clip());for(var q=0;q{var o=s(2638),d=s(25305),l=s(44603),c=s(23568);l.register("dynamicBitmapText",function(h,u){h===void 0&&(h={});var f=c(h,"font",""),p=c(h,"text",""),m=c(h,"size",!1),g=new o(this.scene,0,0,f,p,m);return u!==void 0&&(h.add=u),d(this.scene,g,h),g})},72566:(n,a,s)=>{var o=s(2638),d=s(39429);d.register("dynamicBitmapText",function(l,c,h,u,f){return this.displayList.add(new o(this.scene,l,c,h,u,f))})},12310:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(73482),l=s(86741),n.exports={renderWebGL:d,renderCanvas:l}},73482:(n,a,s)=>{var o=s(91296),d=s(61340),l=s(70554),c=new d,h=function(u,f,p,m){var g=f.text,v=g.length;if(v!==0){p.addToRenderList(f);var y=u.pipelines.set(f.pipeline,f),x=o(f,p,m);u.pipelines.preBatch(f);var b=x.sprite,_=x.calc,C=c,w=f.cropWidth>0||f.cropHeight>0;w&&(y.flush(),u.pushScissor(_.tx,_.ty,f.cropWidth*_.scaleX,f.cropHeight*_.scaleY));var T=f.frame,S=T.glTexture,E=f.tintFill,D=l.getTintAppendFloatAlpha(f.tintTopLeft,p.alpha*f._alphaTL),A=l.getTintAppendFloatAlpha(f.tintTopRight,p.alpha*f._alphaTR),M=l.getTintAppendFloatAlpha(f.tintBottomLeft,p.alpha*f._alphaBL),R=l.getTintAppendFloatAlpha(f.tintBottomRight,p.alpha*f._alphaBR),L=y.setGameObject(f),I=0,O=0,N=0,H=0,X=f.letterSpacing,V,z=0,F=0,k,G=f.scrollX,Z=f.scrollY,J=f.fontData,W=J.chars,q=J.lineHeight,ie=f.fontSize/J.size,re=0,oe=f._align,ve=0,_e=0,ye=f.getTextBounds(!1);f.maxWidth>0&&(g=ye.wrappedText,v=g.length);var xe=f._bounds.lines;oe===1?_e=(xe.longest-xe.lengths[0])/2:oe===2&&(_e=xe.longest-xe.lengths[0]);for(var st=p.roundPixels,at=f.displayCallback,Ge=f.callbackData,ke=0;ke{var o=s(83419),d=s(45319),l=s(31401),c=s(95643),h=s(53048),u=s(61327),f=s(21859),p=s(87841),m=s(18658),g=new o({Extends:c,Mixins:[l.Alpha,l.BlendMode,l.Depth,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.ScrollFactor,l.Texture,l.Tint,l.Transform,l.Visible,m],initialize:function(y,x,b,_,C,w,T){C===void 0&&(C=""),T===void 0&&(T=0),c.call(this,y,"BitmapText"),this.font=_;var S=this.scene.sys.cache.bitmapFont.get(_);if(!S)throw new Error("Invalid BitmapText key: "+_);this.fontData=S.data,this._text="",this._fontSize=w||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=T,this._bounds=h(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=S.fromAtlas,this.setTexture(S.texture,S.frame),this.setPosition(x,b),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(C)},setLeftAlign:function(){return this._align=g.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=g.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=g.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(v){return this._fontSize=v,this._dirty=!0,this},setLetterSpacing:function(v){return v===void 0&&(v=0),this._letterSpacing=v,this._dirty=!0,this},setLineSpacing:function(v){return v===void 0&&(v=0),this.lineSpacing=v,this},setText:function(v){return!v&&v!==0&&(v=""),Array.isArray(v)&&(v=v.join(` +`)),v!==this.text&&(this._text=v.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(v,y,x,b){return v===void 0&&(v=0),y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=.5),this.dropShadowX=v,this.dropShadowY=y,this.dropShadowColor=x,this.dropShadowAlpha=b,this},setCharacterTint:function(v,y,x,b,_,C,w){v===void 0&&(v=0),y===void 0&&(y=1),x===void 0&&(x=!1),b===void 0&&(b=-1),_===void 0&&(_=b,C=b,w=b);var T=this.text.length;y===-1&&(y=T),v<0&&(v=T+v),v=d(v,0,T-1);for(var S=d(v+y,v,T),E=this.charColors,D=v;D{var o=s(20926),d=function(l,c,h,u){var f=c._text,p=f.length,m=l.currentContext;if(!(p===0||!o(l,m,c,h,u))){h.addToRenderList(c);var g=c.fromAtlas?c.frame:c.texture.frames.__BASE,v=c.fontData.chars,y=c.fontData.lineHeight,x=c._letterSpacing,b=c._lineSpacing,_=0,C=0,w=0,T=null,S=0,E=0,D=0,A=0,M=0,R=0,L=null,I=0,O=g.source.image,N=g.cutX,H=g.cutY,X=c._fontSize/c.fontData.size,V=c._align,z=0,F=0,k=c.getTextBounds(!1);c.maxWidth>0&&(f=k.wrappedText,p=f.length);var G=c._bounds.lines;V===1?F=(G.longest-G.lengths[0])/2:V===2&&(F=G.longest-G.lengths[0]),m.translate(-c.displayOriginX,-c.displayOriginY);for(var Z=h.roundPixels,J=0;J{var o=s(22186),d=s(25305),l=s(44603),c=s(23568),h=s(35154);l.register("bitmapText",function(u,f){u===void 0&&(u={});var p=h(u,"font",""),m=c(u,"text",""),g=c(u,"size",!1),v=h(u,"align",0),y=new o(this.scene,0,0,p,m,g,v);return f!==void 0&&(u.add=f),d(this.scene,y,u),y})},34914:(n,a,s)=>{var o=s(22186),d=s(39429);d.register("bitmapText",function(l,c,h,u,f,p){return this.displayList.add(new o(this.scene,l,c,h,u,f,p))})},18658:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(33590),l=s(37289),n.exports={renderWebGL:d,renderCanvas:l}},33590:(n,a,s)=>{var o=s(3217),d=s(91296),l=s(70554),c=function(h,u,f,p){var m=u._text,g=m.length;if(g!==0){f.addToRenderList(u);var v=h.pipelines.set(u.pipeline,u),y=d(u,f,p).calc;h.pipelines.preBatch(u);var x=f.roundPixels,b=f.alpha,_=u.charColors,C=u.tintFill,w=l.getTintAppendFloatAlpha,T=w(u.tintTopLeft,b*u._alphaTL),S=w(u.tintTopRight,b*u._alphaTR),E=w(u.tintBottomLeft,b*u._alphaBL),D=w(u.tintBottomRight,b*u._alphaBR),A=u.frame.glTexture,M=v.setGameObject(u),R=u.getTextBounds(!1),L,I,O,N=R.characters,H=u.dropShadowX,X=u.dropShadowY,V=H!==0||X!==0;if(V){var z=u.dropShadowColor,F=u.dropShadowAlpha,k=w(z,b*F*u._alphaTL),G=w(z,b*F*u._alphaTR),Z=w(z,b*F*u._alphaBL),J=w(z,b*F*u._alphaBR);for(L=0;L{var o=s(48011),d=s(46590),l=s(83419),c=s(31401),h=s(4327),u=s(95643),f=s(73162),p=new l({Extends:u,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.Texture,c.Transform,c.Visible,o],initialize:function(g,v,y,x,b){u.call(this,g,"Blitter"),this.setTexture(x,b),this.setPosition(v,y),this.initPipeline(),this.initPostPipeline(),this.children=new f,this.renderList=[],this.dirty=!1},create:function(m,g,v,y,x){y===void 0&&(y=!0),x===void 0&&(x=this.children.length),v===void 0?v=this.frame:v instanceof h||(v=this.texture.get(v));var b=new d(this,m,g,v,y);return this.children.addAt(b,x,!1),this.dirty=!0,b},createFromCallback:function(m,g,v,y){for(var x=this.createMultiple(g,v,y),b=0;b0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});n.exports=p},72396:n=>{var a=function(s,o,d,l){var c=o.getRenderList();if(c.length!==0){var h=s.currentContext,u=d.alpha*o.alpha;if(u!==0){d.addToRenderList(o),h.globalCompositeOperation=s.blendModes[o.blendMode],h.imageSmoothingEnabled=!o.frame.source.scaleMode;var f=o.x-d.scrollX*o.scrollFactorX,p=o.y-d.scrollY*o.scrollFactorY;h.save(),l&&l.copyToContext(h);for(var m=d.roundPixels,g=0;g0&&b.height>0&&(h.save(),h.translate(v.x+f,v.y+p),h.scale(w,T),h.drawImage(x.source.image,b.x,b.y,b.width,b.height,_,C,b.width,b.height),h.restore())):(m&&(_=Math.round(_),C=Math.round(C)),b.width>0&&b.height>0&&h.drawImage(x.source.image,b.x,b.y,b.width,b.height,_+v.x+f,C+v.y+p,b.width,b.height)))}h.restore()}}};n.exports=a},9403:(n,a,s)=>{var o=s(6107),d=s(25305),l=s(44603),c=s(23568);l.register("blitter",function(h,u){h===void 0&&(h={});var f=c(h,"key",null),p=c(h,"frame",null),m=new o(this.scene,0,0,f,p);return u!==void 0&&(h.add=u),d(this.scene,m,h),m})},12709:(n,a,s)=>{var o=s(6107),d=s(39429);d.register("blitter",function(l,c,h,u){return this.displayList.add(new o(this.scene,l,c,h,u))})},48011:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(99485),l=s(72396),n.exports={renderWebGL:d,renderCanvas:l}},99485:(n,a,s)=>{var o=s(61340),d=s(70554),l=new o,c=function(h,u,f,p){var m=u.getRenderList(),g=f.alpha*u.alpha;if(!(m.length===0||g===0)){f.addToRenderList(u);var v=h.pipelines.set(this.pipeline,u),y=f.scrollX*u.scrollFactorX,x=f.scrollY*u.scrollFactorY,b=l.copyFrom(f.matrix);p&&(b.multiplyWithOffset(p,-y,-x),y=0,x=0);var _=u.x-y,C=u.y-x,w=-1,T=!1,S=f.roundPixels;h.pipelines.preBatch(u);for(var E=0;E{var o=s(83419),d=s(4327),l=new o({initialize:function(h,u,f,p,m){this.parent=h,this.x=u,this.y=f,this.frame=p,this.data={},this.tint=16777215,this._visible=m,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(c){return c===void 0?this.frame=this.parent.frame:c instanceof d&&c.texture===this.parent.texture?this.frame=c:this.frame=this.parent.texture.get(c),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(c,h,u){return this.x=c,this.y=h,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,u&&this.setFrame(u),this},setPosition:function(c,h){return this.x=c,this.y=h,this},setFlipX:function(c){return this.flipX=c,this},setFlipY:function(c){return this.flipY=c,this},setFlip:function(c,h){return this.flipX=c,this.flipY=h,this},setVisible:function(c){return this.visible=c,this},setAlpha:function(c){return this.alpha=c,this},setTint:function(c){return this.tint=c,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(c){this.parent.dirty|=this._visible!==c,this._visible=c}},alpha:{get:function(){return this._alpha},set:function(c){this.parent.dirty|=this._alpha>0!=c>0,this._alpha=c}}});n.exports=l},16005:(n,a,s)=>{var o=s(45319),d=2,l={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(c,h,u,f){return c===void 0&&(c=1),h===void 0?this.alpha=c:(this._alphaTL=o(c,0,1),this._alphaTR=o(h,0,1),this._alphaBL=o(u,0,1),this._alphaBR=o(f,0,1)),this},alpha:{get:function(){return this._alpha},set:function(c){var h=o(c,0,1);this._alpha=h,this._alphaTL=h,this._alphaTR=h,this._alphaBL=h,this._alphaBR=h,h===0?this.renderFlags&=~d:this.renderFlags|=d}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(c){var h=o(c,0,1);this._alphaTL=h,h!==0&&(this.renderFlags|=d)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(c){var h=o(c,0,1);this._alphaTR=h,h!==0&&(this.renderFlags|=d)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(c){var h=o(c,0,1);this._alphaBL=h,h!==0&&(this.renderFlags|=d)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(c){var h=o(c,0,1);this._alphaBR=h,h!==0&&(this.renderFlags|=d)}}};n.exports=l},88509:(n,a,s)=>{var o=s(45319),d=2,l={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(c){return c===void 0&&(c=1),this.alpha=c,this},alpha:{get:function(){return this._alpha},set:function(c){var h=o(c,0,1);this._alpha=h,h===0?this.renderFlags&=~d:this.renderFlags|=d}}};n.exports=l},90065:(n,a,s)=>{var o=s(10312),d={_blendMode:o.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(l){typeof l=="string"&&(l=o[l]),l|=0,l>=-1&&(this._blendMode=l)}},setBlendMode:function(l){return this.blendMode=l,this}};n.exports=d},94215:n=>{var a={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(s){this.scaleX=s/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(s){this.scaleY=s/this.height}},setSize:function(s,o){return this.width=s,this.height=o,this},setDisplaySize:function(s,o){return this.displayWidth=s,this.displayHeight=o,this}};n.exports=a},61683:n=>{var a={texture:null,frame:null,isCropped:!1,setCrop:function(s,o,d,l){if(s===void 0)this.isCropped=!1;else if(this.frame){if(typeof s=="number")this.frame.setCropUVs(this._crop,s,o,d,l,this.flipX,this.flipY);else{var c=s;this.frame.setCropUVs(this._crop,c.x,c.y,c.width,c.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};n.exports=a},89272:(n,a,s)=>{var o=s(37105),d={_depth:0,depth:{get:function(){return this._depth},set:function(l){this.displayList&&this.displayList.queueDepthSort(),this._depth=l}},setDepth:function(l){return l===void 0&&(l=0),this.depth=l,this},setToTop:function(){var l=this.getDisplayList();return l&&o.BringToTop(l,this),this},setToBack:function(){var l=this.getDisplayList();return l&&o.SendToBack(l,this),this},setAbove:function(l){var c=this.getDisplayList();return c&&l&&o.MoveAbove(c,this,l),this},setBelow:function(l){var c=this.getDisplayList();return c&&l&&o.MoveBelow(c,this,l),this}};n.exports=d},47059:(n,a,s)=>{var o=s(83419),d=s(66064),l=s(19133),c=new o({initialize:function(u,f){this.gameObject=u,this.isPost=f,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(h){return h===void 0&&(h=0),this.padding=h,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(h){if(!this.isPost){var u=this.gameObject.scene.sys.renderer;u&&u.pipelines?(this.gameObject.pipeline=u.pipelines.FX_PIPELINE,h!==void 0&&(this.padding=h),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var h=this.list,u=0;u{var a={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(s){return this.flipX=s,this},setFlipY:function(s){return this.flipY=s,this},setFlip:function(s,o){return this.flipX=s,this.flipY=o,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};n.exports=a},8004:(n,a,s)=>{var o=s(87841),d=s(11520),l=s(26099),c={prepareBoundsOutput:function(h,u){if(u===void 0&&(u=!1),this.rotation!==0&&d(h,this.x,this.y,this.rotation),u&&this.parentContainer){var f=this.parentContainer.getBoundsTransformMatrix();f.transformPoint(h.x,h.y,h)}return h},getCenter:function(h,u){return h===void 0&&(h=new l),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,u)},getTopLeft:function(h,u){return h||(h=new l),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,u)},getTopCenter:function(h,u){return h||(h=new l),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,u)},getTopRight:function(h,u){return h||(h=new l),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,u)},getLeftCenter:function(h,u){return h||(h=new l),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,u)},getRightCenter:function(h,u){return h||(h=new l),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,u)},getBottomLeft:function(h,u){return h||(h=new l),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,u)},getBottomCenter:function(h,u){return h||(h=new l),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,u)},getBottomRight:function(h,u){return h||(h=new l),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,u)},getBounds:function(h){h===void 0&&(h=new o);var u,f,p,m,g,v,y,x;if(this.parentContainer){var b=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(h),b.transformPoint(h.x,h.y,h),u=h.x,f=h.y,this.getTopRight(h),b.transformPoint(h.x,h.y,h),p=h.x,m=h.y,this.getBottomLeft(h),b.transformPoint(h.x,h.y,h),g=h.x,v=h.y,this.getBottomRight(h),b.transformPoint(h.x,h.y,h),y=h.x,x=h.y}else this.getTopLeft(h),u=h.x,f=h.y,this.getTopRight(h),p=h.x,m=h.y,this.getBottomLeft(h),g=h.x,v=h.y,this.getBottomRight(h),y=h.x,x=h.y;return h.x=Math.min(u,p,g,y),h.y=Math.min(f,m,v,x),h.width=Math.max(u,p,g,y)-h.x,h.height=Math.max(f,m,v,x)-h.y,h}};n.exports=c},8573:(n,a,s)=>{var o=s(6858),d=s(80661),l={mask:null,setMask:function(c){return this.mask=c,this},clearMask:function(c){return c===void 0&&(c=!1),c&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(c,h,u,f,p){return c===void 0&&(this.texture||this.shader||this.geom)&&(c=this),new o(this.scene,c,h,u,f,p)},createGeometryMask:function(c){return c===void 0&&(this.type==="Graphics"||this.geom)&&(c=this),new d(this.scene,c)}};n.exports=l},27387:n=>{var a={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(s){this._displayOriginX=s,this.originX=s/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(s){this._displayOriginY=s,this.originY=s/this.height}},setOrigin:function(s,o){return s===void 0&&(s=.5),o===void 0&&(o=s),this.originX=s,this.originY=o,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(s,o){return s===void 0&&(s=0),o===void 0&&(o=s),this.displayOriginX=s,this.displayOriginY=o,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};n.exports=a},37640:(n,a,s)=>{var o=s(39506),d=s(57355),l=s(35154),c=s(86353),h=s(26099),u={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:c.PLAYING_FORWARD,setPath:function(f,p){p===void 0&&(p=this.pathConfig);var m=this.pathTween;return m&&m.isPlaying()&&m.stop(),this.path=f,p&&this.startFollow(p),this},setRotateToPath:function(f,p){return p===void 0&&(p=0),this.rotateToPath=f,this.pathRotationOffset=p,this},isFollowing:function(){var f=this.pathTween;return f&&f.isPlaying()},startFollow:function(f,p){f===void 0&&(f={}),p===void 0&&(p=0);var m=this.pathTween;m&&m.isPlaying()&&m.stop(),typeof f=="number"&&(f={duration:f}),f.from=l(f,"from",0),f.to=l(f,"to",1);var g=d(f,"positionOnPath",!1);this.rotateToPath=d(f,"rotateToPath",!1),this.pathRotationOffset=l(f,"rotationOffset",0);var v=l(f,"startAt",p);if(v&&(f.onStart=function(x){var b=x.data[0];b.progress=v,b.elapsed=b.duration*v;var _=b.ease(b.progress);b.current=b.start+(b.end-b.start)*_,b.setTargetValue()}),this.pathOffset||(this.pathOffset=new h(this.x,this.y)),this.pathVector||(this.pathVector=new h),this.pathDelta||(this.pathDelta=new h),this.pathDelta.reset(),f.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(f),this.path.getStartPoint(this.pathOffset),g&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=c.PLAYING_FORWARD,this.rotateToPath){var y=this.path.getPoint(.1);this.rotation=Math.atan2(y.y-this.y,y.x-this.x)+o(this.pathRotationOffset)}return this.pathConfig=f,this},pauseFollow:function(){var f=this.pathTween;return f&&f.isPlaying()&&f.pause(),this},resumeFollow:function(){var f=this.pathTween;return f&&f.isPaused()&&f.resume(),this},stopFollow:function(){var f=this.pathTween;return f&&f.isPlaying()&&f.stop(),this},pathUpdate:function(){var f=this.pathTween;if(f&&f.data){var p=f.data[0],m=this.pathDelta,g=this.pathVector;if(m.copy(g).negate(),p.state===c.COMPLETE){this.path.getPoint(p.end,g),m.add(g),g.add(this.pathOffset),this.setPosition(g.x,g.y);return}else if(p.state!==c.PLAYING_FORWARD&&p.state!==c.PLAYING_BACKWARD)return;this.path.getPoint(f.getValue(),g),m.add(g),g.add(this.pathOffset);var v=this.x,y=this.y;this.setPosition(g.x,g.y);var x=this.x-v,b=this.y-y;if(x===0&&b===0)return;if(p.state!==this._prevDirection){this._prevDirection=p.state;return}this.rotateToPath&&(this.rotation=Math.atan2(b,x)+o(this.pathRotationOffset))}}};n.exports=u},72699:(n,a,s)=>{var o=s(62644),d={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(l){this.pipelineData={};var c=this.scene.sys.renderer;if(!c)return!1;var h=c.pipelines;if(h){l===void 0&&(l=h.default);var u=h.get(l);if(u)return this.defaultPipeline=u,this.pipeline=u,!0}return!1},setPipeline:function(l,c,h){var u=this.scene.sys.renderer;if(!u)return this;var f=u.pipelines;if(f){var p=f.get(l);p&&(this.pipeline=p),c&&(this.pipelineData=h?o(c):c)}return this},setPipelineData:function(l,c){var h=this.pipelineData;return c===void 0?delete h[l]:h[l]=c,this},resetPipeline:function(l){return l===void 0&&(l=!1),this.pipeline=this.defaultPipeline,l&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline===null?null:this.pipeline.name}};n.exports=d},17581:(n,a,s)=>{var o=s(62644),d=s(47059),l=s(19133),c={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(h){this.postPipelines=[],this.postPipelineData={},this.postFX=new d(this,!0),h&&(this.preFX=new d(this,!1))},setPostPipeline:function(h,u,f){var p=this.scene.sys.renderer;if(!p)return this;var m=p.pipelines;if(m){Array.isArray(h)||(h=[h]);for(var g=0;g0,this},setPostPipelineData:function(h,u){var f=this.postPipelineData;return u===void 0?delete f[h]:f[h]=u,this},getPostPipeline:function(h){for(var u=typeof h=="string",f=this.postPipelines,p=[],m=0;m=0;p--){var m=f[p];(u&&m.name===h||!u&&m===h)&&(m.destroy(),l(f,p))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};n.exports=c},80227:n=>{var a={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(s,o){return o===void 0&&(o=s),this.scrollFactorX=s,this.scrollFactorY=o,this}};n.exports=a},16736:n=>{var a={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(s){this.scaleX=s/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(s){this.scaleY=s/this.frame.realHeight}},setSizeToFrame:function(s){s||(s=this.frame),this.width=s.realWidth,this.height=s.realHeight;var o=this.input;return o&&!o.customHitArea&&(o.hitArea.width=this.width,o.hitArea.height=this.height),this},setSize:function(s,o){return this.width=s,this.height=o,this},setDisplaySize:function(s,o){return this.displayWidth=s,this.displayHeight=o,this}};n.exports=a},37726:(n,a,s)=>{var o=s(4327),d=8,l={texture:null,frame:null,isCropped:!1,setTexture:function(c,h,u,f){return this.texture=this.scene.sys.textures.get(c),this.setFrame(h,u,f)},setFrame:function(c,h,u){return h===void 0&&(h=!0),u===void 0&&(u=!0),c instanceof o?(this.texture=this.scene.sys.textures.get(c.texture.key),this.frame=c):this.frame=this.texture.get(c),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~d:this.renderFlags|=d,this._sizeComponent&&h&&this.setSizeToFrame(),this._originComponent&&u&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};n.exports=l},79812:(n,a,s)=>{var o=s(4327),d=8,l={texture:null,frame:null,isCropped:!1,setCrop:function(c,h,u,f){if(c===void 0)this.isCropped=!1;else if(this.frame){if(typeof c=="number")this.frame.setCropUVs(this._crop,c,h,u,f,this.flipX,this.flipY);else{var p=c;this.frame.setCropUVs(this._crop,p.x,p.y,p.width,p.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(c,h){return this.texture=this.scene.sys.textures.get(c),this.setFrame(h)},setFrame:function(c,h,u){return h===void 0&&(h=!0),u===void 0&&(u=!0),c instanceof o?(this.texture=this.scene.sys.textures.get(c.texture.key),this.frame=c):this.frame=this.texture.get(c),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~d:this.renderFlags|=d,this._sizeComponent&&h&&this.setSizeToFrame(),this._originComponent&&u&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};n.exports=l},27472:n=>{var a={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(s,o,d,l){return s===void 0&&(s=16777215),o===void 0&&(o=s,d=s,l=s),this.tintTopLeft=s,this.tintTopRight=o,this.tintBottomLeft=d,this.tintBottomRight=l,this.tintFill=!1,this},setTintFill:function(s,o,d,l){return this.setTint(s,o,d,l),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(s){this.setTint(s,s,s,s)}},isTinted:{get:function(){var s=16777215;return this.tintFill||this.tintTopLeft!==s||this.tintTopRight!==s||this.tintBottomLeft!==s||this.tintBottomRight!==s}}};n.exports=a},53774:n=>{var a=function(s){var o={name:s.name,type:s.type,x:s.x,y:s.y,depth:s.depth,scale:{x:s.scaleX,y:s.scaleY},origin:{x:s.originX,y:s.originY},flipX:s.flipX,flipY:s.flipY,rotation:s.rotation,alpha:s.alpha,visible:s.visible,blendMode:s.blendMode,textureKey:"",frameKey:"",data:{}};return s.texture&&(o.textureKey=s.texture.key,o.frameKey=s.frame.name),o};n.exports=a},16901:(n,a,s)=>{var o=s(36383),d=s(61340),l=s(85955),c=s(86554),h=s(30954),u=s(26099),f=4,p={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(m){this._scaleX=m,this._scaleY=m,m===0?this.renderFlags&=~f:this.renderFlags|=f}},scaleX:{get:function(){return this._scaleX},set:function(m){this._scaleX=m,m===0?this.renderFlags&=~f:this._scaleY!==0&&(this.renderFlags|=f)}},scaleY:{get:function(){return this._scaleY},set:function(m){this._scaleY=m,m===0?this.renderFlags&=~f:this._scaleX!==0&&(this.renderFlags|=f)}},angle:{get:function(){return h(this._rotation*o.RAD_TO_DEG)},set:function(m){this.rotation=h(m)*o.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(m){this._rotation=c(m)}},setPosition:function(m,g,v,y){return m===void 0&&(m=0),g===void 0&&(g=m),v===void 0&&(v=0),y===void 0&&(y=0),this.x=m,this.y=g,this.z=v,this.w=y,this},copyPosition:function(m){return m.x!==void 0&&(this.x=m.x),m.y!==void 0&&(this.y=m.y),m.z!==void 0&&(this.z=m.z),m.w!==void 0&&(this.w=m.w),this},setRandomPosition:function(m,g,v,y){return m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=this.scene.sys.scale.width),y===void 0&&(y=this.scene.sys.scale.height),this.x=m+Math.random()*v,this.y=g+Math.random()*y,this},setRotation:function(m){return m===void 0&&(m=0),this.rotation=m,this},setAngle:function(m){return m===void 0&&(m=0),this.angle=m,this},setScale:function(m,g){return m===void 0&&(m=1),g===void 0&&(g=m),this.scaleX=m,this.scaleY=g,this},setX:function(m){return m===void 0&&(m=0),this.x=m,this},setY:function(m){return m===void 0&&(m=0),this.y=m,this},setZ:function(m){return m===void 0&&(m=0),this.z=m,this},setW:function(m){return m===void 0&&(m=0),this.w=m,this},getLocalTransformMatrix:function(m){return m===void 0&&(m=new d),m.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(m,g){m===void 0&&(m=new d);var v=this.parentContainer;if(!v)return this.getLocalTransformMatrix(m);for(g||(g=new d),m.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);v;)g.applyITRS(v.x,v.y,v._rotation,v._scaleX,v._scaleY),g.multiply(m,m),v=v.parentContainer;return m},getLocalPoint:function(m,g,v,y){v||(v=new u),y||(y=this.scene.sys.cameras.main);var x=y.scrollX,b=y.scrollY,_=m+x*this.scrollFactorX-x,C=g+b*this.scrollFactorY-b;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(_,C,v):l(_,C,this.x,this.y,this.rotation,this.scaleX,this.scaleY,v),this._originComponent&&(v.x+=this._displayOriginX,v.y+=this._displayOriginY),v},getParentRotation:function(){for(var m=0,g=this.parentContainer;g;)m+=g.rotation,g=g.parentContainer;return m}};n.exports=p},61340:(n,a,s)=>{var o=s(83419),d=s(36383),l=s(26099),c=new o({initialize:function(u,f,p,m,g,v){u===void 0&&(u=1),f===void 0&&(f=0),p===void 0&&(p=0),m===void 0&&(m=1),g===void 0&&(g=0),v===void 0&&(v=0),this.matrix=new Float32Array([u,f,p,m,g,v,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(h){this.matrix[0]=h}},b:{get:function(){return this.matrix[1]},set:function(h){this.matrix[1]=h}},c:{get:function(){return this.matrix[2]},set:function(h){this.matrix[2]=h}},d:{get:function(){return this.matrix[3]},set:function(h){this.matrix[3]=h}},e:{get:function(){return this.matrix[4]},set:function(h){this.matrix[4]=h}},f:{get:function(){return this.matrix[5]},set:function(h){this.matrix[5]=h}},tx:{get:function(){return this.matrix[4]},set:function(h){this.matrix[4]=h}},ty:{get:function(){return this.matrix[5]},set:function(h){this.matrix[5]=h}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var h=this.matrix,u=h[0],f=h[1],p=h[2],m=h[3];return u||f?f>0?Math.acos(u/this.scaleX):-Math.acos(u/this.scaleX):p||m?d.TAU-(m>0?Math.acos(-p/this.scaleY):-Math.acos(p/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var h=this.matrix;return h[0]=1,h[1]=0,h[2]=0,h[3]=1,h[4]=0,h[5]=0,this},translate:function(h,u){var f=this.matrix;return f[4]=f[0]*h+f[2]*u+f[4],f[5]=f[1]*h+f[3]*u+f[5],this},scale:function(h,u){var f=this.matrix;return f[0]*=h,f[1]*=h,f[2]*=u,f[3]*=u,this},rotate:function(h){var u=Math.sin(h),f=Math.cos(h),p=this.matrix,m=p[0],g=p[1],v=p[2],y=p[3];return p[0]=m*f+v*u,p[1]=g*f+y*u,p[2]=m*-u+v*f,p[3]=g*-u+y*f,this},multiply:function(h,u){var f=this.matrix,p=h.matrix,m=f[0],g=f[1],v=f[2],y=f[3],x=f[4],b=f[5],_=p[0],C=p[1],w=p[2],T=p[3],S=p[4],E=p[5],D=u===void 0?f:u.matrix;return D[0]=_*m+C*v,D[1]=_*g+C*y,D[2]=w*m+T*v,D[3]=w*g+T*y,D[4]=S*m+E*v+x,D[5]=S*g+E*y+b,D},multiplyWithOffset:function(h,u,f){var p=this.matrix,m=h.matrix,g=p[0],v=p[1],y=p[2],x=p[3],b=p[4],_=p[5],C=u*g+f*y+b,w=u*v+f*x+_,T=m[0],S=m[1],E=m[2],D=m[3],A=m[4],M=m[5];return p[0]=T*g+S*y,p[1]=T*v+S*x,p[2]=E*g+D*y,p[3]=E*v+D*x,p[4]=A*g+M*y+C,p[5]=A*v+M*x+w,this},transform:function(h,u,f,p,m,g){var v=this.matrix,y=v[0],x=v[1],b=v[2],_=v[3],C=v[4],w=v[5];return v[0]=h*y+u*b,v[1]=h*x+u*_,v[2]=f*y+p*b,v[3]=f*x+p*_,v[4]=m*y+g*b+C,v[5]=m*x+g*_+w,this},transformPoint:function(h,u,f){f===void 0&&(f={x:0,y:0});var p=this.matrix,m=p[0],g=p[1],v=p[2],y=p[3],x=p[4],b=p[5];return f.x=h*m+u*v+x,f.y=h*g+u*y+b,f},invert:function(){var h=this.matrix,u=h[0],f=h[1],p=h[2],m=h[3],g=h[4],v=h[5],y=u*m-f*p;return h[0]=m/y,h[1]=-f/y,h[2]=-p/y,h[3]=u/y,h[4]=(p*v-m*g)/y,h[5]=-(u*v-f*g)/y,this},copyFrom:function(h){var u=this.matrix;return u[0]=h.a,u[1]=h.b,u[2]=h.c,u[3]=h.d,u[4]=h.e,u[5]=h.f,this},copyFromArray:function(h){var u=this.matrix;return u[0]=h[0],u[1]=h[1],u[2]=h[2],u[3]=h[3],u[4]=h[4],u[5]=h[5],this},copyToContext:function(h){var u=this.matrix;return h.transform(u[0],u[1],u[2],u[3],u[4],u[5]),h},setToContext:function(h){return h.setTransform(this),h},copyToArray:function(h){var u=this.matrix;return h===void 0?h=[u[0],u[1],u[2],u[3],u[4],u[5]]:(h[0]=u[0],h[1]=u[1],h[2]=u[2],h[3]=u[3],h[4]=u[4],h[5]=u[5]),h},setTransform:function(h,u,f,p,m,g){var v=this.matrix;return v[0]=h,v[1]=u,v[2]=f,v[3]=p,v[4]=m,v[5]=g,this},decomposeMatrix:function(){var h=this.decomposedMatrix,u=this.matrix,f=u[0],p=u[1],m=u[2],g=u[3],v=f*g-p*m;if(h.translateX=u[4],h.translateY=u[5],f||p){var y=Math.sqrt(f*f+p*p);h.rotation=p>0?Math.acos(f/y):-Math.acos(f/y),h.scaleX=y,h.scaleY=v/y}else if(m||g){var x=Math.sqrt(m*m+g*g);h.rotation=Math.PI*.5-(g>0?Math.acos(-m/x):-Math.acos(m/x)),h.scaleX=v/x,h.scaleY=x}else h.rotation=0,h.scaleX=0,h.scaleY=0;return h},applyITRS:function(h,u,f,p,m){var g=this.matrix,v=Math.sin(f),y=Math.cos(f);return g[4]=h,g[5]=u,g[0]=y*p,g[1]=v*p,g[2]=-v*m,g[3]=y*m,this},applyInverse:function(h,u,f){f===void 0&&(f=new l);var p=this.matrix,m=p[0],g=p[1],v=p[2],y=p[3],x=p[4],b=p[5],_=1/(m*y+v*-g);return f.x=y*_*h+-v*_*u+(b*v-x*y)*_,f.y=m*_*u+-g*_*h+(-b*m+x*g)*_,f},setQuad:function(h,u,f,p,m,g){m===void 0&&(m=!1),g===void 0&&(g=this.quad);var v=this.matrix,y=v[0],x=v[1],b=v[2],_=v[3],C=v[4],w=v[5],T=h*y+u*b+C,S=h*x+u*_+w,E=h*y+p*b+C,D=h*x+p*_+w,A=f*y+p*b+C,M=f*x+p*_+w,R=f*y+u*b+C,L=f*x+u*_+w;if(m){var I=Math.floor(T+.5),O=Math.floor(S+.5),N=I-T,H=O-S;g[0]=I,g[1]=O,g[2]=E+N,g[3]=D+H,g[4]=A+N,g[5]=M+H,g[6]=R+N,g[7]=L+H}else g[0]=T,g[1]=S,g[2]=E,g[3]=D,g[4]=A,g[5]=M,g[6]=R,g[7]=L;return g},getX:function(h,u){return h*this.a+u*this.c+this.e},getY:function(h,u){return h*this.b+u*this.d+this.f},getXRound:function(h,u,f){var p=this.getX(h,u);return f&&(p=Math.floor(p+.5)),p},getYRound:function(h,u,f){var p=this.getY(h,u);return f&&(p=Math.floor(p+.5)),p},getCSSMatrix:function(){var h=this.matrix;return"matrix("+h[0]+","+h[1]+","+h[2]+","+h[3]+","+h[4]+","+h[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});n.exports=c},59715:n=>{var a=1,s={_visible:!0,visible:{get:function(){return this._visible},set:function(o){o?(this._visible=!0,this.renderFlags|=a):(this._visible=!1,this.renderFlags&=~a)}},setVisible:function(o){return this.visible=o,this}};n.exports=s},31401:(n,a,s)=>{n.exports={Alpha:s(16005),AlphaSingle:s(88509),BlendMode:s(90065),ComputedSize:s(94215),Crop:s(61683),Depth:s(89272),Flip:s(54434),FX:s(47059),GetBounds:s(8004),Mask:s(8573),Origin:s(27387),PathFollower:s(37640),Pipeline:s(72699),PostPipeline:s(17581),ScrollFactor:s(80227),Size:s(16736),Texture:s(37726),TextureCrop:s(79812),Tint:s(27472),ToJSON:s(53774),Transform:s(16901),TransformMatrix:s(61340),Visible:s(59715)}},31559:(n,a,s)=>{var o=s(37105),d=s(10312),l=s(83419),c=s(31401),h=s(51708),u=s(95643),f=s(87841),p=s(29959),m=s(36899),g=s(26099),v=new c.TransformMatrix,y=new l({Extends:u,Mixins:[c.AlphaSingle,c.BlendMode,c.ComputedSize,c.Depth,c.Mask,c.PostPipeline,c.Transform,c.Visible,p],initialize:function(b,_,C,w){u.call(this,b,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new c.TransformMatrix,this._sortKey="",this._sysEvents=b.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(_,C),this.setBlendMode(d.SKIP_CHECK),w&&this.add(w)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(x){return x===void 0&&(x=!0),this.exclusive=x,this},getBounds:function(x){if(x===void 0&&(x=new f),x.setTo(this.x,this.y,0,0),this.parentContainer){var b=this.parentContainer.getBoundsTransformMatrix(),_=b.transformPoint(this.x,this.y);x.setTo(_.x,_.y,0,0)}if(this.list.length>0){var C=this.list,w=new f,T=!1;x.setEmpty();for(var S=0;S-1},setAll:function(x,b,_,C){return o.SetAll(this.list,x,b,_,C),this},each:function(x,b){var _=[null],C,w=this.list.slice(),T=w.length;for(C=2;C0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.list=[]},onChildDestroyed:function(x){o.Remove(this.list,x),this.exclusive&&(x.parentContainer=null,x.removedFromScene())}});n.exports=y},53584:n=>{var a=function(s,o,d,l){d.addToRenderList(o);var c=o.list;if(c.length!==0){var h=o.localTransform;l?(h.loadIdentity(),h.multiply(l),h.translate(o.x,o.y),h.rotate(o.rotation),h.scale(o.scaleX,o.scaleY)):h.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY);var u=o.blendMode!==-1;u||s.setBlendMode(0);var f=o._alpha,p=o.scrollFactorX,m=o.scrollFactorY;o.mask&&o.mask.preRenderCanvas(s,null,d);for(var g=0;g{var o=s(25305),d=s(31559),l=s(44603),c=s(23568),h=s(95540);l.register("container",function(u,f){u===void 0&&(u={});var p=c(u,"x",0),m=c(u,"y",0),g=h(u,"children",null),v=new d(this.scene,p,m,g);return f!==void 0&&(u.add=f),o(this.scene,v,u),v})},24961:(n,a,s)=>{var o=s(31559),d=s(39429);d.register("container",function(l,c,h){return this.displayList.add(new o(this.scene,l,c,h))})},29959:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(72249),l=s(53584),n.exports={renderWebGL:d,renderCanvas:l}},72249:n=>{var a=function(s,o,d,l){d.addToRenderList(o);var c=o.list,h=c.length;if(h!==0){var u=o.localTransform;l?(u.loadIdentity(),u.multiply(l),u.translate(o.x,o.y),u.rotate(o.rotation),u.scale(o.scaleX,o.scaleY)):u.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY),s.pipelines.preBatch(o);var f=o.blendMode!==-1;f||s.setBlendMode(0);for(var p=o.alpha,m=o.scrollFactorX,g=o.scrollFactorY,v=0;v{n.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(441),c=s(95643),h=s(41212),u=s(35846),f=s(44594),p=s(61369),m=new o({Extends:c,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Origin,d.ScrollFactor,d.Transform,d.Visible,l],initialize:function(v,y,x,b,_,C){c.call(this,v,"DOMElement"),this.parent=v.sys.game.domContainer,this.cache=v.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new p,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(y,x),typeof b=="string"?b[0]==="#"?this.setElement(b.substr(1),_,C):this.createElement(b,_,C):b&&this.setElement(b,_,C),v.sys.events.on(f.SLEEP,this.handleSceneEvent,this),v.sys.events.on(f.WAKE,this.handleSceneEvent,this),v.sys.events.on(f.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(g){var v=this.node,y=v.style;v&&(y.display=g.settings.visible?"block":"none")},setSkew:function(g,v){return g===void 0&&(g=0),v===void 0&&(v=g),this.skewX=g,this.skewY=v,this},setPerspective:function(g){return this.parent.style.perspective=g+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(g){this.parent.style.perspective=g+"px"}},addListener:function(g){if(this.node){g=g.split(" ");for(var v=0;v{var o=s(47407),d=s(95643),l=s(61340),c=new l,h=new l,u=new l,f=function(p,m,g,v){if(m.node){var y=m.node.style,x=m.scene.sys.settings;if(!y||!x.visible||d.RENDER_MASK!==m.renderFlags||m.cameraFilter!==0&&m.cameraFilter&g.id||m.parentContainer&&!m.parentContainer.willRender()){y.display="none";return}var b=m.parentContainer,_=g.alpha*m.alpha;b&&(_*=b.alpha);var C=c,w=h,T=u,S=0,E=0,D="0%",A="0%";v?(S=m.width*m.scaleX*m.originX,E=m.height*m.scaleY*m.originY,w.applyITRS(m.x-S,m.y-E,m.rotation,m.scaleX,m.scaleY),C.copyFrom(g.matrix),C.multiplyWithOffset(v,-g.scrollX*m.scrollFactorX,-g.scrollY*m.scrollFactorY),w.e=m.x-S,w.f=m.y-E,C.multiply(w,T)):(S=m.width*m.originX,E=m.height*m.originY,w.applyITRS(m.x,m.y,m.rotation,m.scaleX,m.scaleY),C.copyFrom(g.matrix),D=100*m.originX+"%",A=100*m.originY+"%",w.e-=g.scrollX*m.scrollFactorX,w.f-=g.scrollY*m.scrollFactorY,C.multiply(w,T),T.e-=S,T.f-=E),m.transformOnly||(y.display="block",y.opacity=_,y.zIndex=m._depth,y.pointerEvents=m.pointerEvents,y.mixBlendMode=o[m._blendMode]),y.transform=T.getCSSMatrix()+" skew("+m.skewX+"rad, "+m.skewY+"rad) rotate3d("+m.rotate3d.x+","+m.rotate3d.y+","+m.rotate3d.z+","+m.rotate3d.w+m.rotate3dAngle+")",y.transformOrigin=D+" "+A}};n.exports=f},2611:(n,a,s)=>{var o=s(3069),d=s(39429);d.register("dom",function(l,c,h,u,f){var p=new o(this.scene,l,c,h,u,f);return this.displayList.add(p),p})},441:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(49381),l=s(49381),n.exports={renderWebGL:d,renderCanvas:l}},62980:n=>{n.exports="addedtoscene"},41337:n=>{n.exports="destroy"},44947:n=>{n.exports="removedfromscene"},49358:n=>{n.exports="complete"},35163:n=>{n.exports="created"},97249:n=>{n.exports="error"},19483:n=>{n.exports="locked"},56059:n=>{n.exports="loop"},26772:n=>{n.exports="metadata"},64437:n=>{n.exports="playing"},83411:n=>{n.exports="play"},75780:n=>{n.exports="seeked"},67799:n=>{n.exports="seeking"},63500:n=>{n.exports="stalled"},55541:n=>{n.exports="stop"},53208:n=>{n.exports="textureready"},4992:n=>{n.exports="unlocked"},12:n=>{n.exports="unsupported"},51708:(n,a,s)=>{n.exports={ADDED_TO_SCENE:s(62980),DESTROY:s(41337),REMOVED_FROM_SCENE:s(44947),VIDEO_COMPLETE:s(49358),VIDEO_CREATED:s(35163),VIDEO_ERROR:s(97249),VIDEO_LOCKED:s(19483),VIDEO_LOOP:s(56059),VIDEO_METADATA:s(26772),VIDEO_PLAY:s(83411),VIDEO_PLAYING:s(64437),VIDEO_SEEKED:s(75780),VIDEO_SEEKING:s(67799),VIDEO_STALLED:s(63500),VIDEO_STOP:s(55541),VIDEO_TEXTURE:s(53208),VIDEO_UNLOCKED:s(4992),VIDEO_UNSUPPORTED:s(12)}},42421:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(95643),c=s(64993),h=new o({Extends:l,Mixins:[d.Alpha,d.BlendMode,d.Depth,d.Flip,d.Origin,d.ScrollFactor,d.Size,d.Texture,d.Tint,d.Transform,d.Visible,c],initialize:function(f){l.call(this,f,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});n.exports=h},70217:()=>{},56315:(n,a,s)=>{var o=s(42421),d=s(39429);d.register("extern",function(){var l=new o(this.scene);return this.displayList.add(l),l})},64993:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(80287),l=s(70217),n.exports={renderWebGL:d,renderCanvas:l}},80287:(n,a,s)=>{var o=s(91296),d=function(l,c,h,u){l.pipelines.clear();var f=o(c,h,u).calc;c.render.call(c,l,h,f),l.pipelines.rebind()};n.exports=d},85592:n=>{n.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},43831:(n,a,s)=>{var o=s(71911),d=s(83419),l=s(85592),c=s(31401),h=s(8497),u=s(95643),f=s(95540),p=s(35154),m=s(36383),g=s(84503),v=new d({Extends:u,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.Transform,c.Visible,c.ScrollFactor,g],initialize:function(x,b){var _=p(b,"x",0),C=p(b,"y",0);u.call(this,x,"Graphics"),this.setPosition(_,C),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(b)},setDefaultStyles:function(y){return p(y,"lineStyle",null)&&(this.defaultStrokeWidth=p(y,"lineStyle.width",1),this.defaultStrokeColor=p(y,"lineStyle.color",16777215),this.defaultStrokeAlpha=p(y,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),p(y,"fillStyle",null)&&(this.defaultFillColor=p(y,"fillStyle.color",16777215),this.defaultFillAlpha=p(y,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(y,x,b){return b===void 0&&(b=1),this.commandBuffer.push(l.LINE_STYLE,y,x,b),this._lineWidth=y,this},fillStyle:function(y,x){return x===void 0&&(x=1),this.commandBuffer.push(l.FILL_STYLE,y,x),this},fillGradientStyle:function(y,x,b,_,C,w,T,S){return C===void 0&&(C=1),w===void 0&&(w=C),T===void 0&&(T=C),S===void 0&&(S=C),this.commandBuffer.push(l.GRADIENT_FILL_STYLE,C,w,T,S,y,x,b,_),this},lineGradientStyle:function(y,x,b,_,C,w){return w===void 0&&(w=1),this.commandBuffer.push(l.GRADIENT_LINE_STYLE,y,w,x,b,_,C),this},beginPath:function(){return this.commandBuffer.push(l.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(l.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(l.FILL_PATH),this},fill:function(){return this.commandBuffer.push(l.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(l.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(l.STROKE_PATH),this},fillCircleShape:function(y){return this.fillCircle(y.x,y.y,y.radius)},strokeCircleShape:function(y){return this.strokeCircle(y.x,y.y,y.radius)},fillCircle:function(y,x,b){return this.beginPath(),this.arc(y,x,b,0,m.PI2),this.fillPath(),this},strokeCircle:function(y,x,b){return this.beginPath(),this.arc(y,x,b,0,m.PI2),this.strokePath(),this},fillRectShape:function(y){return this.fillRect(y.x,y.y,y.width,y.height)},strokeRectShape:function(y){return this.strokeRect(y.x,y.y,y.width,y.height)},fillRect:function(y,x,b,_){return this.commandBuffer.push(l.FILL_RECT,y,x,b,_),this},strokeRect:function(y,x,b,_){var C=this._lineWidth/2,w=y-C,T=y+C;return this.beginPath(),this.moveTo(y,x),this.lineTo(y,x+_),this.strokePath(),this.beginPath(),this.moveTo(y+b,x),this.lineTo(y+b,x+_),this.strokePath(),this.beginPath(),this.moveTo(w,x),this.lineTo(T+b,x),this.strokePath(),this.beginPath(),this.moveTo(w,x+_),this.lineTo(T+b,x+_),this.strokePath(),this},fillRoundedRect:function(y,x,b,_,C){C===void 0&&(C=20);var w=C,T=C,S=C,E=C;typeof C!="number"&&(w=f(C,"tl",20),T=f(C,"tr",20),S=f(C,"bl",20),E=f(C,"br",20));var D=w>=0,A=T>=0,M=S>=0,R=E>=0;return w=Math.abs(w),T=Math.abs(T),S=Math.abs(S),E=Math.abs(E),this.beginPath(),this.moveTo(y+w,x),this.lineTo(y+b-T,x),A?this.arc(y+b-T,x+T,T,-m.TAU,0):this.arc(y+b,x,T,Math.PI,m.TAU,!0),this.lineTo(y+b,x+_-E),R?this.arc(y+b-E,x+_-E,E,0,m.TAU):this.arc(y+b,x+_,E,-m.TAU,Math.PI,!0),this.lineTo(y+S,x+_),M?this.arc(y+S,x+_-S,S,m.TAU,Math.PI):this.arc(y,x+_,S,0,-m.TAU,!0),this.lineTo(y,x+w),D?this.arc(y+w,x+w,w,-Math.PI,-m.TAU):this.arc(y,x,w,m.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(y,x,b,_,C){C===void 0&&(C=20);var w=C,T=C,S=C,E=C,D=Math.min(b,_)/2;typeof C!="number"&&(w=f(C,"tl",20),T=f(C,"tr",20),S=f(C,"bl",20),E=f(C,"br",20));var A=w>=0,M=T>=0,R=S>=0,L=E>=0;return w=Math.min(Math.abs(w),D),T=Math.min(Math.abs(T),D),S=Math.min(Math.abs(S),D),E=Math.min(Math.abs(E),D),this.beginPath(),this.moveTo(y+w,x),this.lineTo(y+b-T,x),this.moveTo(y+b-T,x),M?this.arc(y+b-T,x+T,T,-m.TAU,0):this.arc(y+b,x,T,Math.PI,m.TAU,!0),this.lineTo(y+b,x+_-E),this.moveTo(y+b,x+_-E),L?this.arc(y+b-E,x+_-E,E,0,m.TAU):this.arc(y+b,x+_,E,-m.TAU,Math.PI,!0),this.lineTo(y+S,x+_),this.moveTo(y+S,x+_),R?this.arc(y+S,x+_-S,S,m.TAU,Math.PI):this.arc(y,x+_,S,0,-m.TAU,!0),this.lineTo(y,x+w),this.moveTo(y,x+w),A?this.arc(y+w,x+w,w,-Math.PI,-m.TAU):this.arc(y,x,w,m.TAU,0,!0),this.strokePath(),this},fillPointShape:function(y,x){return this.fillPoint(y.x,y.y,x)},fillPoint:function(y,x,b){return!b||b<1?b=1:(y-=b/2,x-=b/2),this.commandBuffer.push(l.FILL_RECT,y,x,b,b),this},fillTriangleShape:function(y){return this.fillTriangle(y.x1,y.y1,y.x2,y.y2,y.x3,y.y3)},strokeTriangleShape:function(y){return this.strokeTriangle(y.x1,y.y1,y.x2,y.y2,y.x3,y.y3)},fillTriangle:function(y,x,b,_,C,w){return this.commandBuffer.push(l.FILL_TRIANGLE,y,x,b,_,C,w),this},strokeTriangle:function(y,x,b,_,C,w){return this.commandBuffer.push(l.STROKE_TRIANGLE,y,x,b,_,C,w),this},strokeLineShape:function(y){return this.lineBetween(y.x1,y.y1,y.x2,y.y2)},lineBetween:function(y,x,b,_){return this.beginPath(),this.moveTo(y,x),this.lineTo(b,_),this.strokePath(),this},lineTo:function(y,x){return this.commandBuffer.push(l.LINE_TO,y,x),this},moveTo:function(y,x){return this.commandBuffer.push(l.MOVE_TO,y,x),this},strokePoints:function(y,x,b,_){x===void 0&&(x=!1),b===void 0&&(b=!1),_===void 0&&(_=y.length),this.beginPath(),this.moveTo(y[0].x,y[0].y);for(var C=1;C<_;C++)this.lineTo(y[C].x,y[C].y);return x&&this.lineTo(y[0].x,y[0].y),b&&this.closePath(),this.strokePath(),this},fillPoints:function(y,x,b,_){x===void 0&&(x=!1),b===void 0&&(b=!1),_===void 0&&(_=y.length),this.beginPath(),this.moveTo(y[0].x,y[0].y);for(var C=1;C<_;C++)this.lineTo(y[C].x,y[C].y);return x&&this.lineTo(y[0].x,y[0].y),b&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(y,x){x===void 0&&(x=32);var b=y.getPoints(x);return this.strokePoints(b,!0)},strokeEllipse:function(y,x,b,_,C){C===void 0&&(C=32);var w=new h(y,x,b,_),T=w.getPoints(C);return this.strokePoints(T,!0)},fillEllipseShape:function(y,x){x===void 0&&(x=32);var b=y.getPoints(x);return this.fillPoints(b,!0)},fillEllipse:function(y,x,b,_,C){C===void 0&&(C=32);var w=new h(y,x,b,_),T=w.getPoints(C);return this.fillPoints(T,!0)},arc:function(y,x,b,_,C,w,T){return w===void 0&&(w=!1),T===void 0&&(T=0),this.commandBuffer.push(l.ARC,y,x,b,_,C,w,T),this},slice:function(y,x,b,_,C,w,T){return w===void 0&&(w=!1),T===void 0&&(T=0),this.commandBuffer.push(l.BEGIN_PATH),this.commandBuffer.push(l.MOVE_TO,y,x),this.commandBuffer.push(l.ARC,y,x,b,_,C,w,T),this.commandBuffer.push(l.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(l.SAVE),this},restore:function(){return this.commandBuffer.push(l.RESTORE),this},translateCanvas:function(y,x){return this.commandBuffer.push(l.TRANSLATE,y,x),this},scaleCanvas:function(y,x){return this.commandBuffer.push(l.SCALE,y,x),this},rotateCanvas:function(y){return this.commandBuffer.push(l.ROTATE,y),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(y,x,b){var _=this.scene.sys,C=_.game.renderer;x===void 0&&(x=_.scale.width),b===void 0&&(b=_.scale.height),v.TargetCamera.setScene(this.scene),v.TargetCamera.setViewport(0,0,x,b),v.TargetCamera.scrollX=this.x,v.TargetCamera.scrollY=this.y;var w,T,S={willReadFrequently:!0};if(typeof y=="string")if(_.textures.exists(y)){w=_.textures.get(y);var E=w.getSourceImage();E instanceof HTMLCanvasElement&&(T=E.getContext("2d",S))}else w=_.textures.createCanvas(y,x,b),T=w.getSourceImage().getContext("2d",S);else y instanceof HTMLCanvasElement&&(T=y.getContext("2d",S));return T&&(this.renderCanvas(C,this,v.TargetCamera,null,T,!1),w&&w.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});v.TargetCamera=new o,n.exports=v},32768:(n,a,s)=>{var o=s(85592),d=s(20926),l=function(c,h,u,f,p,m){var g=h.commandBuffer,v=g.length,y=p||c.currentContext;if(!(v===0||!d(c,y,h,u,f))){u.addToRenderList(h);var x=1,b=1,_=0,C=0,w=1,T=0,S=0,E=0;y.beginPath();for(var D=0;D>>16,S=(_&65280)>>>8,E=_&255,y.strokeStyle="rgba("+T+","+S+","+E+","+x+")",y.lineWidth=w,D+=3;break;case o.FILL_STYLE:C=g[D+1],b=g[D+2],T=(C&16711680)>>>16,S=(C&65280)>>>8,E=C&255,y.fillStyle="rgba("+T+","+S+","+E+","+b+")",D+=2;break;case o.BEGIN_PATH:y.beginPath();break;case o.CLOSE_PATH:y.closePath();break;case o.FILL_PATH:m||y.fill();break;case o.STROKE_PATH:m||y.stroke();break;case o.FILL_RECT:m?y.rect(g[D+1],g[D+2],g[D+3],g[D+4]):y.fillRect(g[D+1],g[D+2],g[D+3],g[D+4]),D+=4;break;case o.FILL_TRIANGLE:y.beginPath(),y.moveTo(g[D+1],g[D+2]),y.lineTo(g[D+3],g[D+4]),y.lineTo(g[D+5],g[D+6]),y.closePath(),m||y.fill(),D+=6;break;case o.STROKE_TRIANGLE:y.beginPath(),y.moveTo(g[D+1],g[D+2]),y.lineTo(g[D+3],g[D+4]),y.lineTo(g[D+5],g[D+6]),y.closePath(),m||y.stroke(),D+=6;break;case o.LINE_TO:y.lineTo(g[D+1],g[D+2]),D+=2;break;case o.MOVE_TO:y.moveTo(g[D+1],g[D+2]),D+=2;break;case o.LINE_FX_TO:y.lineTo(g[D+1],g[D+2]),D+=5;break;case o.MOVE_FX_TO:y.moveTo(g[D+1],g[D+2]),D+=5;break;case o.SAVE:y.save();break;case o.RESTORE:y.restore();break;case o.TRANSLATE:y.translate(g[D+1],g[D+2]),D+=2;break;case o.SCALE:y.scale(g[D+1],g[D+2]),D+=2;break;case o.ROTATE:y.rotate(g[D+1]),D+=1;break;case o.GRADIENT_FILL_STYLE:D+=5;break;case o.GRADIENT_LINE_STYLE:D+=6;break}}y.restore()}};n.exports=l},87079:(n,a,s)=>{var o=s(44603),d=s(43831);o.register("graphics",function(l,c){l===void 0&&(l={}),c!==void 0&&(l.add=c);var h=new d(this.scene,l);return l.add&&this.scene.sys.displayList.add(h),h})},1201:(n,a,s)=>{var o=s(43831),d=s(39429);d.register("graphics",function(l){return this.displayList.add(new o(this.scene,l))})},84503:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(77545),l=s(32768),l=s(32768),n.exports={renderWebGL:d,renderCanvas:l}},77545:(n,a,s)=>{var o=s(85592),d=s(91296),l=s(61340),c=s(70554),h=function(g,v,y){this.x=g,this.y=v,this.width=y},u=function(g,v,y){this.points=[],this.pointsLength=1,this.points[0]=new h(g,v,y)},f=[],p=new l,m=function(g,v,y,x){if(v.commandBuffer.length!==0){y.addToRenderList(v);var b=g.pipelines.set(v.pipeline,v);g.pipelines.preBatch(v);for(var _=d(v,y,x).calc,C=p.loadIdentity(),w=v.commandBuffer,T=y.alpha*v.alpha,S=1,E=b.fillTint,D=b.strokeTint,A=0,M=0,R=0,L=.01,I=Math.PI*2,O,N=[],H=0,X=!0,V=null,z=c.getTintAppendFloatAlpha,F=0;F0&&(ke=-I+ke%I):ke>I?ke=I:ke<0&&(ke=I+ke%I),V===null&&(V=new u(xe+Math.cos(Ge)*at,st+Math.sin(Ge)*at,S),N.push(V),ye+=L);ye<1+ot;)R=ke*ye+Ge,A=xe+Math.cos(R)*at,M=st+Math.sin(R)*at,V.points.push(new h(A,M,S)),ye+=L;R=ke+Ge,A=xe+Math.cos(R)*at,M=st+Math.sin(R)*at,V.points.push(new h(A,M,S));break}case o.FILL_RECT:{b.batchFillRect(w[++F],w[++F],w[++F],w[++F],C,_);break}case o.FILL_TRIANGLE:{b.batchFillTriangle(w[++F],w[++F],w[++F],w[++F],w[++F],w[++F],C,_);break}case o.STROKE_TRIANGLE:{b.batchStrokeTriangle(w[++F],w[++F],w[++F],w[++F],w[++F],w[++F],S,C,_);break}case o.LINE_TO:{V!==null?V.points.push(new h(w[++F],w[++F],S)):(V=new u(w[++F],w[++F],S),N.push(V));break}case o.MOVE_TO:{V=new u(w[++F],w[++F],S),N.push(V);break}case o.SAVE:{f.push(C.copyToArray());break}case o.RESTORE:{C.copyFromArray(f.pop());break}case o.TRANSLATE:{xe=w[++F],st=w[++F],C.translate(xe,st);break}case o.SCALE:{xe=w[++F],st=w[++F],C.scale(xe,st);break}case o.ROTATE:{C.rotate(w[++F]);break}}g.pipelines.postBatch(v)}};n.exports=m},26479:(n,a,s)=>{var o=s(61061),d=s(83419),l=s(51708),c=s(50792),h=s(46710),u=s(95540),f=s(35154),p=s(97022),m=s(41212),g=s(88492),v=s(35072),y=s(68287),x=new d({Extends:c,initialize:function(_,C,w){c.call(this),w?C&&!Array.isArray(C)&&(C=[C]):Array.isArray(C)?m(C[0])&&(w=C,C=null):m(C)&&(w=C,C=null),this.scene=_,this.children=new v,this.isParent=!0,this.type="Group",this.classType=u(w,"classType",y),this.name=u(w,"name",""),this.active=u(w,"active",!0),this.maxSize=u(w,"maxSize",-1),this.defaultKey=u(w,"defaultKey",null),this.defaultFrame=u(w,"defaultFrame",null),this.runChildUpdate=u(w,"runChildUpdate",!1),this.createCallback=u(w,"createCallback",null),this.removeCallback=u(w,"removeCallback",null),this.createMultipleCallback=u(w,"createMultipleCallback",null),this.internalCreateCallback=u(w,"internalCreateCallback",null),this.internalRemoveCallback=u(w,"internalRemoveCallback",null),C&&this.addMultiple(C),w&&this.createMultiple(w),this.on(l.ADDED_TO_SCENE,this.addedToScene,this),this.on(l.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(b,_,C,w,T,S){if(b===void 0&&(b=0),_===void 0&&(_=0),C===void 0&&(C=this.defaultKey),w===void 0&&(w=this.defaultFrame),T===void 0&&(T=!0),S===void 0&&(S=!0),this.isFull())return null;var E=new this.classType(this.scene,b,_,C,w);return E.addToDisplayList(this.scene.sys.displayList),E.addToUpdateList(),E.visible=T,E.setActive(S),this.add(E),E},createMultiple:function(b){if(this.isFull())return[];Array.isArray(b)||(b=[b]);var _=[];if(b[0].key)for(var C=0;C=0;R--)if(M=I[R],M.active===C){if(L++,L===_)break}else M=null;return M?(typeof T=="number"&&(M.x=T),typeof S=="number"&&(M.y=S),M):w?this.create(T,S,E,D,A):null},get:function(b,_,C,w,T){return this.getFirst(!1,!0,b,_,C,w,T)},getFirstAlive:function(b,_,C,w,T,S){return this.getFirst(!0,b,_,C,w,T,S)},getFirstDead:function(b,_,C,w,T,S){return this.getFirst(!1,b,_,C,w,T,S)},playAnimation:function(b,_){return o.PlayAnimation(this.children.entries,b,_),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(b){b===void 0&&(b=!0);for(var _=0,C=0;C{var o=s(44603),d=s(26479);o.register("group",function(l){return new d(this.scene,null,l)})},3385:(n,a,s)=>{var o=s(26479),d=s(39429);d.register("group",function(l,c){return this.updateList.add(new o(this.scene,l,c))})},88571:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(95643),c=s(59819),h=new o({Extends:l,Mixins:[d.Alpha,d.BlendMode,d.Depth,d.Flip,d.GetBounds,d.Mask,d.Origin,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Size,d.TextureCrop,d.Tint,d.Transform,d.Visible,c],initialize:function(f,p,m,g,v){l.call(this,f,"Image"),this._crop=this.resetCropObject(),this.setTexture(g,v),this.setPosition(p,m),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});n.exports=h},40652:n=>{var a=function(s,o,d,l){d.addToRenderList(o),s.batchSprite(o,o.frame,d,l)};n.exports=a},82459:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(88571);d.register("image",function(h,u){h===void 0&&(h={});var f=l(h,"key",null),p=l(h,"frame",null),m=new c(this.scene,0,0,f,p);return u!==void 0&&(h.add=u),o(this.scene,m,h),m})},2117:(n,a,s)=>{var o=s(88571),d=s(39429);d.register("image",function(l,c,h,u){return this.displayList.add(new o(this.scene,l,c,h,u))})},59819:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(99517),l=s(40652),n.exports={renderWebGL:d,renderCanvas:l}},99517:n=>{var a=function(s,o,d,l){d.addToRenderList(o),this.pipeline.batchSprite(o,d,l)};n.exports=a},77856:(n,a,s)=>{var o={Events:s(51708),DisplayList:s(8050),GameObjectCreator:s(44603),GameObjectFactory:s(39429),UpdateList:s(45027),Components:s(31401),GetCalcMatrix:s(91296),BuildGameObject:s(25305),BuildGameObjectAnimation:s(13059),GameObject:s(95643),BitmapText:s(22186),Blitter:s(6107),Bob:s(46590),Container:s(31559),DOMElement:s(3069),DynamicBitmapText:s(2638),Extern:s(42421),Graphics:s(43831),Group:s(26479),Image:s(88571),Layer:s(93595),Particles:s(18404),PathFollower:s(1159),RenderTexture:s(591),RetroFont:s(196),Rope:s(77757),Sprite:s(68287),Text:s(50171),GetTextSize:s(14220),MeasureText:s(79557),TextStyle:s(35762),TileSprite:s(20839),Zone:s(41481),Video:s(18471),Shape:s(17803),Arc:s(23629),Curve:s(89),Ellipse:s(19921),Grid:s(30479),IsoBox:s(61475),IsoTriangle:s(16933),Line:s(57847),Polygon:s(24949),Rectangle:s(74561),Star:s(55911),Triangle:s(36931),Factories:{Blitter:s(12709),Container:s(24961),DOMElement:s(2611),DynamicBitmapText:s(72566),Extern:s(56315),Graphics:s(1201),Group:s(3385),Image:s(2117),Layer:s(20005),Particles:s(676),PathFollower:s(90145),RenderTexture:s(60505),Rope:s(96819),Sprite:s(46409),StaticBitmapText:s(34914),Text:s(68005),TileSprite:s(91681),Zone:s(84175),Video:s(89025),Arc:s(42563),Curve:s(40511),Ellipse:s(1543),Grid:s(34137),IsoBox:s(3933),IsoTriangle:s(49803),Line:s(2481),Polygon:s(64827),Rectangle:s(87959),Star:s(93697),Triangle:s(45245)},Creators:{Blitter:s(9403),Container:s(77143),DynamicBitmapText:s(11164),Graphics:s(87079),Group:s(94975),Image:s(82459),Layer:s(25179),Particles:s(92730),RenderTexture:s(34495),Rope:s(26209),Sprite:s(15567),StaticBitmapText:s(57336),Text:s(71259),TileSprite:s(14167),Zone:s(95261),Video:s(11511)}};o.Shader=s(20071),o.Mesh=s(4703),o.NineSlice=s(28103),o.PointLight=s(80321),o.Plane=s(33663),o.Factories.Shader=s(74177),o.Factories.Mesh=s(9225),o.Factories.NineSlice=s(47521),o.Factories.PointLight=s(71255),o.Factories.Plane=s(30985),o.Creators.Shader=s(54935),o.Creators.Mesh=s(20527),o.Creators.NineSlice=s(28279),o.Creators.PointLight=s(39829),o.Creators.Plane=s(56015),o.Light=s(41432),o.LightsManager=s(61356),o.LightsPlugin=s(88992),n.exports=o},93595:(n,a,s)=>{var o=s(10312),d=s(83419),l=s(31401),c=s(53774),h=s(45893),u=s(50792),f=s(51708),p=s(73162),m=s(33963),g=s(44594),v=s(19186),y=new d({Extends:p,Mixins:[l.AlphaSingle,l.BlendMode,l.Depth,l.Mask,l.PostPipeline,l.Visible,u,m],initialize:function(b,_){p.call(this,b),u.call(this),this.scene=b,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=b.sys,this.events=b.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(o.SKIP_CHECK),_&&this.add(_),b.sys.queueDepthSort()},setActive:function(x){return this.active=x,this},setName:function(x){return this.name=x,this},setState:function(x){return this.state=x,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(x,b){return this.data||(this.data=new h(this)),this.data.set(x,b),this},incData:function(x,b){return this.data||(this.data=new h(this)),this.data.inc(x,b),this},toggleData:function(x){return this.data||(this.data=new h(this)),this.data.toggle(x),this},getData:function(x){return this.data||(this.data=new h(this)),this.data.get(x)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return c(this)},willRender:function(x){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&x.id)},getIndexList:function(){for(var x=this,b=this.parentContainer,_=[];b&&(_.unshift(b.getIndex(x)),x=b,b.parentContainer);)b=b.parentContainer;return _.unshift(this.displayList.getIndex(x)),_},addChildCallback:function(x){var b=x.displayList;b&&b!==this&&x.removeFromDisplayList(),x.displayList||(this.queueDepthSort(),x.displayList=this,x.emit(f.ADDED_TO_SCENE,x,this.scene),this.events.emit(g.ADDED_TO_SCENE,x,this.scene))},removeChildCallback:function(x){this.queueDepthSort(),x.displayList=null,x.emit(f.REMOVED_FROM_SCENE,x,this.scene),this.events.emit(g.REMOVED_FROM_SCENE,x,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(v(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(x,b){return x._depth-b._depth},getChildren:function(){return this.list},addToDisplayList:function(x){return x===void 0&&(x=this.scene.sys.displayList),this.displayList&&this.displayList!==x&&this.removeFromDisplayList(),x.exists(this)||(this.displayList=x,x.add(this,!0),x.queueDepthSort(),this.emit(f.ADDED_TO_SCENE,this,this.scene),x.events.emit(g.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var x=this.displayList||this.scene.sys.displayList;return x.exists(this)&&(x.remove(this,!0),x.queueDepthSort(),this.displayList=null,this.emit(f.REMOVED_FROM_SCENE,this,this.scene),x.events.emit(g.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(x){if(!(!this.scene||this.ignoreDestroy)){this.emit(f.DESTROY,this);for(var b=this.list;b.length;)b[0].destroy(x);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});n.exports=y},2956:n=>{var a=function(s,o,d){var l=o.list;if(l.length!==0){o.depthSort();var c=o.blendMode!==-1;c||s.setBlendMode(0);var h=o._alpha;o.mask&&o.mask.preRenderCanvas(s,null,d);for(var u=0;u{var o=s(25305),d=s(93595),l=s(44603),c=s(23568);l.register("layer",function(h,u){h===void 0&&(h={});var f=c(h,"children",null),p=new d(this.scene,f);return u!==void 0&&(h.add=u),o(this.scene,p,h),p})},20005:(n,a,s)=>{var o=s(93595),d=s(39429);d.register("layer",function(l){return this.displayList.add(new o(this.scene,l))})},33963:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(15869),l=s(2956),n.exports={renderWebGL:d,renderCanvas:l}},15869:n=>{var a=function(s,o,d){var l=o.list,c=l.length;if(c!==0){o.depthSort(),s.pipelines.preBatch(o);var h=o.blendMode!==-1;h||s.setBlendMode(0);for(var u=o.alpha,f=0;f{var o=s(96503),d=s(83419),l=s(31401),c=s(51767),h=s(70554),u=new d({Extends:o,Mixins:[l.Origin,l.ScrollFactor,l.Visible],initialize:function(p,m,g,v,y,x,b){o.call(this,p,m,g),this.color=new c(v,y,x),this.intensity=b,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(g)},displayWidth:{get:function(){return this.diameter},set:function(f){this.diameter=f}},displayHeight:{get:function(){return this.diameter},set:function(f){this.diameter=f}},width:{get:function(){return this.diameter},set:function(f){this.diameter=f}},height:{get:function(){return this.diameter},set:function(f){this.diameter=f}},willRender:function(f){return!(u.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&f.id)},setColor:function(f){var p=h.getFloatsFromUintRGB(f);return this.color.set(p[0],p[1],p[2]),this},setIntensity:function(f){return this.intensity=f,this},setRadius:function(f){return this.radius=f,this}});u.RENDER_MASK=15,n.exports=u},61356:(n,a,s)=>{var o=s(81491),d=s(83419),l=s(20339),c=s(41432),h=s(80321),u=s(51767),f=s(19133),p=s(19186),m=s(70554),g=new d({initialize:function(){this.lights=[],this.ambientColor=new u(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(v,y,x,b,_,C){return this.systems.displayList.add(new h(this.scene,v,y,x,b,_,C))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(v){for(var y=this.lights,x=v.worldView,b=[],_=0;_this.maxLights&&(p(b,this.sortByDistance),b=b.slice(0,this.maxLights)),this.visibleLights=b.length,b},sortByDistance:function(v,y){return v.distance>=y.distance},setAmbientColor:function(v){var y=m.getFloatsFromUintRGB(v);return this.ambientColor.set(y[0],y[1],y[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(v,y,x,b,_){v===void 0&&(v=0),y===void 0&&(y=0),x===void 0&&(x=128),b===void 0&&(b=16777215),_===void 0&&(_=1);var C=m.getFloatsFromUintRGB(b),w=new c(v,y,x,C[0],C[1],C[2],_);return this.lights.push(w),w},removeLight:function(v){var y=this.lights.indexOf(v);return y>=0&&f(this.lights,y),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});n.exports=g},88992:(n,a,s)=>{var o=s(83419),d=s(61356),l=s(37277),c=s(44594),h=new o({Extends:d,initialize:function(f){this.scene=f,this.systems=f.sys,f.sys.settings.isBooted||f.sys.events.once(c.BOOT,this.boot,this),d.call(this)},boot:function(){var u=this.systems.events;u.on(c.SHUTDOWN,this.shutdown,this),u.on(c.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});l.register("LightsPlugin",h,"lights"),n.exports=h},4703:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(39506),c=s(83997),h=s(95643),u=s(34684),f=s(92515),p=s(91296),m=s(37867),g=s(29807),v=s(43396),y=s(19186),x=s(25836),b=s(39318),_=new o({Extends:h,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Size,d.Texture,d.Transform,d.Visible,g],initialize:function(w,T,S,E,D,A,M,R,L,I,O,N){T===void 0&&(T=0),S===void 0&&(S=0),E===void 0&&(E="__WHITE"),h.call(this,w,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new x,this.modelScale=new x(1,1,1),this.modelRotation=new x,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new m,this.viewPosition=new x,this.viewMatrix=new m,this.projectionMatrix=new m,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var H=w.sys.renderer;this.setPosition(T,S),this.setTexture(E,D),this.setSize(H.width,H.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(H.width,H.height),A&&this.addVertices(A,M,R,L,I,O,N)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(C){return this.viewPosition.addScale(x.LEFT,C),this.dirtyCache[10]=1,this},panY:function(C){return this.viewPosition.y+=x.DOWN.y*C,this.dirtyCache[10]=1,this},panZ:function(C){return this.viewPosition.z+=C,this.dirtyCache[10]=1,this},setPerspective:function(C,w,T,S,E){return T===void 0&&(T=45),S===void 0&&(S=.01),E===void 0&&(E=1e3),this.fov=T,this.projectionMatrix.perspective(l(T),C/w,S,E),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(C,w,T,S){return C===void 0&&(C=this.scene.sys.renderer.getAspectRatio()),w===void 0&&(w=1),T===void 0&&(T=-1e3),S===void 0&&(S=1e3),this.fov=0,this.projectionMatrix.ortho(-C,C,-w,w,T,S),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(C){C.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(C,w,T,S,E,D,A,M,R){var L=this.scene.sys.cache.obj.get(C),I;return L&&(I=u(L,this,w,T,S,E,D,A,M,R)),(!I||I.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",C),this},sortByDepth:function(C,w){return C.depth-w.depth},depthSort:function(){return y(this.faces,this.sortByDepth),this},addVertex:function(C,w,T,S,E,D,A){var M=new b(C,w,T,S,E,D,A);return this.vertices.push(M),M},addFace:function(C,w,T){var S=new c(C,w,T);return this.faces.push(S),this.dirtyCache[9]=-1,S},addVertices:function(C,w,T,S,E,D,A){var M=f(C,w,T,S,E,D,A);return M?(this.faces=this.faces.concat(M.faces),this.vertices=this.vertices.concat(M.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(C){return this.faces[C]},hasFaceAt:function(C,w,T){T===void 0&&(T=this.scene.sys.cameras.main);for(var S=p(this,T).calc,E=this.faces,D=0;D{var a=function(){};n.exports=a},20527:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(35154),h=s(4703);d.register("mesh",function(u,f){u===void 0&&(u={});var p=l(u,"key",null),m=l(u,"frame",null),g=c(u,"vertices",[]),v=c(u,"uvs",[]),y=c(u,"indicies",[]),x=c(u,"containsZ",!1),b=c(u,"normals",[]),_=c(u,"colors",16777215),C=c(u,"alphas",1),w=new h(this.scene,0,0,p,m,g,v,y,x,b,_,C);return f!==void 0&&(u.add=f),o(this.scene,w,u),w})},9225:(n,a,s)=>{var o=s(4703),d=s(39429);d.register("mesh",function(l,c,h,u,f,p,m,g,v,y,x){return this.displayList.add(new o(this.scene,l,c,h,u,f,p,m,g,v,y,x))})},29807:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(48833),l=s(36488),n.exports={renderWebGL:d,renderCanvas:l}},48833:(n,a,s)=>{var o=s(91296),d=function(l,c,h,u){var f=c.faces,p=f.length;if(p!==0){h.addToRenderList(c);var m=l.pipelines.set(c.pipeline,c),g=o(c,h,u).calc;l.pipelines.preBatch(c);for(var v=m.setGameObject(c),y=m.vertexViewF32,x=m.vertexViewU32,b=m.vertexCount*m.currentShader.vertexComponentCount-1,_=c.tintFill,C=[],w=c.debugCallback,T=g.a,S=g.b,E=g.c,D=g.d,A=g.e,M=g.f,R=c.viewPosition.z,L=c.hideCCW,I=h.roundPixels,O=h.alpha*c.alpha,N=0,H=0;H{var o=s(83419),d=s(31401),l=s(95643),c=s(78023),h=s(39318),u=new o({Extends:l,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.GetBounds,d.Mask,d.Origin,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Texture,d.Transform,d.Visible,c],initialize:function(p,m,g,v,y,x,b,_,C,w,T){l.call(this,p,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var S=p.textures.getFrame(v,y);this.is3Slice=!w&&!T,S&&S.scale9&&(this.is3Slice=S.is3Slice);for(var E=this.is3Slice?18:54,D=0;D{var o=s(25305),d=s(44603),l=s(23568),c=s(35154),h=s(28103);d.register("nineslice",function(u,f){u===void 0&&(u={});var p=l(u,"key",null),m=l(u,"frame",null),g=c(u,"width",256),v=c(u,"height",256),y=c(u,"leftWidth",10),x=c(u,"rightWidth",10),b=c(u,"topHeight",0),_=c(u,"bottomHeight",0),C=new h(this.scene,0,0,p,m,g,v,y,x,b,_);return f!==void 0&&(u.add=f),o(this.scene,C,u),C})},47521:(n,a,s)=>{var o=s(28103),d=s(39429);d.register("nineslice",function(l,c,h,u,f,p,m,g,v,y){return this.displayList.add(new o(this.scene,l,c,h,u,f,p,m,g,v,y))})},78023:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(52230),n.exports={renderWebGL:d,renderCanvas:l}},52230:(n,a,s)=>{var o=s(91296),d=s(70554),l=function(c,h,u,f){var p=h.vertices,m=p.length;if(m!==0){u.addToRenderList(h);var g=c.pipelines.set(h.pipeline,h),v=o(h,u,f,!1).calc;c.pipelines.preBatch(h);var y=g.setGameObject(h),x=g.vertexViewF32,b=g.vertexViewU32,_=g.vertexCount*g.currentShader.vertexComponentCount-1,C=u.roundPixels,w=h.tintFill,T=u.alpha*h.alpha,S=d.getTintAppendFloatAlpha(h.tint,T),E=g.vertexAvailable(),D=-1;E{var o=s(83419),d=s(44777),l=s(37589),c=s(6113),h=s(91389),u=s(90664),f=new o({Extends:d,initialize:function(m){d.call(this,m,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var p=this.propertyValue,m=p,g=this.defaultEmit,v=this.defaultUpdate;if(this.method===9){this.start=p[0],this.ease=c("Linear"),this.interpolation=h("linear"),g=this.easedValueEmit,v=this.easeValueUpdate,m=p[0],this.active=!0;for(var y=0;y{var o=s(30976),d=s(45319),l=s(83419),c=s(99472),h=s(6113),u=s(95540),f=s(91389),p=s(77720),m=s(15994),g=new l({initialize:function(y,x,b){b===void 0&&(b=!1),this.propertyKey=y,this.propertyValue=x,this.defaultValue=x,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=b,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(v,y){v===void 0&&(v={}),y&&(this.propertyKey=y),this.propertyValue=u(v,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(v){var y;switch(this.method){case 1:case 3:case 8:y=v;break;case 2:this.propertyValue.indexOf(v)>=0&&(y=v);break;case 4:var x=(this.end-this.start)/this.steps;y=p(v,x),this.counter=y;break;case 5:case 6:case 7:y=d(v,this.start,this.end);break;case 9:y=this.start[0];break}return this.current=y,this},getMethod:function(){var v=this.propertyValue;if(v===null)return 0;var y=typeof v;if(y==="number")return 1;if(Array.isArray(v))return 2;if(y==="function")return 3;if(y==="object"){if(this.hasBoth(v,"start","end"))return this.has(v,"steps")?4:5;if(this.hasBoth(v,"min","max"))return 6;if(this.has(v,"random"))return 7;if(this.hasEither(v,"onEmit","onUpdate"))return 8;if(this.hasEither(v,"values","interpolation"))return 9}return 0},setMethods:function(){var v=this.propertyValue,y=v,x=this.defaultEmit,b=this.defaultUpdate;switch(this.method){case 1:x=this.staticValueEmit;break;case 2:x=this.randomStaticValueEmit,y=v[0];break;case 3:this._onEmit=v,x=this.proxyEmit;break;case 4:this.start=v.start,this.end=v.end,this.steps=v.steps,this.counter=this.start,this.yoyo=this.has(v,"yoyo")?v.yoyo:!1,this.direction=0,x=this.steppedEmit,y=this.start;break;case 5:this.start=v.start,this.end=v.end;var _=this.has(v,"ease")?v.ease:"Linear";this.ease=h(_,v.easeParams),x=this.has(v,"random")&&v.random?this.randomRangedValueEmit:this.easedValueEmit,b=this.easeValueUpdate,y=this.start;break;case 6:this.start=v.min,this.end=v.max,x=this.has(v,"int")&&v.int?this.randomRangedIntEmit:this.randomRangedValueEmit,y=this.start;break;case 7:var C=v.random;Array.isArray(C)&&(this.start=C[0],this.end=C[1]),x=this.randomRangedIntEmit,y=this.start;break;case 8:this._onEmit=this.has(v,"onEmit")?v.onEmit:this.defaultEmit,this._onUpdate=this.has(v,"onUpdate")?v.onUpdate:this.defaultUpdate,x=this.proxyEmit,b=this.proxyUpdate;break;case 9:this.start=v.values;var w=this.has(v,"ease")?v.ease:"Linear";this.ease=h(w,v.easeParams),this.interpolation=f(v.interpolation),x=this.easedValueEmit,b=this.easeValueUpdate,y=this.start[0];break}return this.onEmit=x,this.onUpdate=b,this.current=y,this},has:function(v,y){return v.hasOwnProperty(y)},hasBoth:function(v,y,x){return v.hasOwnProperty(y)&&v.hasOwnProperty(x)},hasEither:function(v,y,x){return v.hasOwnProperty(y)||v.hasOwnProperty(x)},defaultEmit:function(v,y,x){return x},defaultUpdate:function(v,y,x,b){return b},proxyEmit:function(v,y,x){var b=this._onEmit(v,y,x);return this.current=b,b},proxyUpdate:function(v,y,x,b){var _=this._onUpdate(v,y,x,b);return this.current=_,_},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var v=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[v],this.current},randomRangedValueEmit:function(v,y){var x=c(this.start,this.end);return v&&v.data[y]&&(v.data[y].min=x,v.data[y].max=this.end),this.current=x,x},randomRangedIntEmit:function(v,y){var x=o(this.start,this.end);return v&&v.data[y]&&(v.data[y].min=x,v.data[y].max=this.end),this.current=x,x},steppedEmit:function(){var v=this.counter,y=v,x=(this.end-this.start)/this.steps;if(this.yoyo){var b;this.direction===0?(y+=x,y>=this.end&&(b=y-this.end,y=this.end-b,this.direction=1)):(y-=x,y<=this.start&&(b=this.start-y,y=this.start+b,this.direction=0)),this.counter=y}else this.counter=m(y+x,this.start,this.end);return this.current=v,v},easedValueEmit:function(v,y){if(v&&v.data[y]){var x=v.data[y];x.min=this.start,x.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(v,y,x){var b=v.data[y],_,C=this.ease(x);return this.interpolation?_=this.interpolation(this.start,C):_=(b.max-b.min)*C+b.min,this.current=_,_},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});n.exports=g},24502:(n,a,s)=>{var o=s(83419),d=s(95540),l=s(20286),c=new o({Extends:l,initialize:function(u,f,p,m,g){if(typeof u=="object"){var v=u;u=d(v,"x",0),f=d(v,"y",0),p=d(v,"power",0),m=d(v,"epsilon",100),g=d(v,"gravity",50)}else u===void 0&&(u=0),f===void 0&&(f=0),p===void 0&&(p=0),m===void 0&&(m=100),g===void 0&&(g=50);l.call(this,u,f,!0),this._gravity=g,this._power=p*g,this._epsilon=m*m},update:function(h,u){var f=this.x-h.x,p=this.y-h.y,m=f*f+p*p;if(m!==0){var g=Math.sqrt(m);m{var o=s(9674),d=s(45319),l=s(83419),c=s(39506),h=s(87841),u=s(11520),f=s(26099),p=new l({initialize:function(g){this.emitter=g,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new f,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=g.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new o(this)),this.bounds=new h},emit:function(m,g,v,y,x,b){return this.emitter.emit(m,g,v,y,x,b)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(m,g){m===void 0&&(m=0),g===void 0&&(g=0),this.x=m,this.y=g},fire:function(m,g){var v=this.emitter,y=v.ops,x=v.getAnim();if(x?this.anims.play(x):(this.frame=v.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(v.getEmitZone(this),m===void 0?this.x+=y.x.onEmit(this,"x"):y.x.steps>0?this.x+=m+y.x.onEmit(this,"x"):this.x+=m,g===void 0?this.y+=y.y.onEmit(this,"y"):y.y.steps>0?this.y+=g+y.y.onEmit(this,"y"):this.y+=g,this.life=y.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=y.delay.onEmit(this,"delay"),this.holdCurrent=y.hold.onEmit(this,"hold"),this.scaleX=y.scaleX.onEmit(this,"scaleX"),this.scaleY=y.scaleY.active?y.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=y.rotate.onEmit(this,"rotate"),this.rotation=c(this.angle),v.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&v.getDeathZone(this))return this.lifeCurrent=0,!1;var b=y.speedX.onEmit(this,"speedX"),_=y.speedY.active?y.speedY.onEmit(this,"speedY"):b;if(v.radial){var C=c(y.angle.onEmit(this,"angle"));this.velocityX=Math.cos(C)*Math.abs(b),this.velocityY=Math.sin(C)*Math.abs(_)}else if(v.moveTo){var w=y.moveToX.onEmit(this,"moveToX"),T=y.moveToY.onEmit(this,"moveToY"),S=this.life/1e3;this.velocityX=(w-this.x)/S,this.velocityY=(T-this.y)/S}else this.velocityX=b,this.velocityY=_;return v.acceleration&&(this.accelerationX=y.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=y.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=y.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=y.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=y.bounce.onEmit(this,"bounce"),this.alpha=y.alpha.onEmit(this,"alpha"),y.color.active?this.tint=y.color.onEmit(this,"tint"):this.tint=y.tint.onEmit(this,"tint"),!0},update:function(m,g,v){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=m,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=m,!1;this.anims&&this.anims.update(0,m);var y=this.emitter,x=y.ops,b=1-this.lifeCurrent/this.life;if(this.lifeT=b,this.x=x.x.onUpdate(this,"x",b,this.x),this.y=x.y.onUpdate(this,"y",b,this.y),y.moveTo){var _=x.moveToX.onUpdate(this,"moveToX",b,y.moveToX),C=x.moveToY.onUpdate(this,"moveToY",b,y.moveToY),w=this.lifeCurrent/1e3;this.velocityX=(_-this.x)/w,this.velocityY=(C-this.y)/w}return this.computeVelocity(y,m,g,v,b),this.scaleX=x.scaleX.onUpdate(this,"scaleX",b,this.scaleX),x.scaleY.active?this.scaleY=x.scaleY.onUpdate(this,"scaleY",b,this.scaleY):this.scaleY=this.scaleX,this.angle=x.rotate.onUpdate(this,"rotate",b,this.angle),this.rotation=c(this.angle),y.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=d(x.alpha.onUpdate(this,"alpha",b,this.alpha),0,1),x.color.active?this.tint=x.color.onUpdate(this,"color",b,this.tint):this.tint=x.tint.onUpdate(this,"tint",b,this.tint),this.lifeCurrent-=m,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(m,g,v,y,x){var b=m.ops,_=this.velocityX,C=this.velocityY,w=b.accelerationX.onUpdate(this,"accelerationX",x,this.accelerationX),T=b.accelerationY.onUpdate(this,"accelerationY",x,this.accelerationY),S=b.maxVelocityX.onUpdate(this,"maxVelocityX",x,this.maxVelocityX),E=b.maxVelocityY.onUpdate(this,"maxVelocityY",x,this.maxVelocityY);this.bounce=b.bounce.onUpdate(this,"bounce",x,this.bounce),_+=m.gravityX*v+w*v,C+=m.gravityY*v+T*v,_=d(_,-S,S),C=d(C,-E,E),this.velocityX=_,this.velocityY=C,this.x+=_*v,this.y+=C*v,m.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var D=0;D{var o=s(83419),d=s(20286),l=s(87841),c=new o({Extends:d,initialize:function(u,f,p,m,g,v,y,x){g===void 0&&(g=!0),v===void 0&&(v=!0),y===void 0&&(y=!0),x===void 0&&(x=!0),d.call(this,u,f,!0),this.bounds=new l(u,f,p,m),this.collideLeft=g,this.collideRight=v,this.collideTop=y,this.collideBottom=x},update:function(h){var u=this.bounds,f=-h.bounce,p=h.worldPosition;p.xu.right&&this.collideRight&&(h.x-=p.x-u.right,h.velocityX*=f),p.yu.bottom&&this.collideBottom&&(h.y-=p.y-u.bottom,h.velocityY*=f)}});n.exports=c},31600:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(53774),c=s(43459),h=s(26388),u=s(19909),f=s(76472),p=s(44777),m=s(20696),g=s(95643),v=s(95540),y=s(26546),x=s(24502),b=s(1985),_=s(97022),C=s(86091),w=s(73162),T=s(20074),S=s(269),E=s(56480),D=s(69601),A=s(68875),M=s(87841),R=s(59996),L=s(72905),I=s(90668),O=s(19186),N=s(61340),H=s(26099),X=s(15994),V=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],z=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],F=new o({Extends:g,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Texture,d.Transform,d.Visible,I],initialize:function(G,Z,J,W,q){g.call(this,G,"ParticleEmitter"),this.particleClass=E,this.config=null,this.ops={accelerationX:new p("accelerationX",0),accelerationY:new p("accelerationY",0),alpha:new p("alpha",1),angle:new p("angle",{min:0,max:360},!0),bounce:new p("bounce",0),color:new f("color"),delay:new p("delay",0,!0),hold:new p("hold",0,!0),lifespan:new p("lifespan",1e3,!0),maxVelocityX:new p("maxVelocityX",1e4),maxVelocityY:new p("maxVelocityY",1e4),moveToX:new p("moveToX",0),moveToY:new p("moveToY",0),quantity:new p("quantity",1,!0),rotate:new p("rotate",0),scaleX:new p("scaleX",1),scaleY:new p("scaleY",1),speedX:new p("speedX",0,!0),speedY:new p("speedY",0,!0),tint:new p("tint",16777215),x:new p("x",0),y:new p("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new H,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new N,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new w(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(Z,J),this.setTexture(W),q&&this.setConfig(q)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(k){if(!k)return this;this.config=k;var G=0,Z="",J=this.ops;for(G=0;G=this.animQuantity&&(this.animCounter=0,this.currentAnim=X(this.currentAnim+1,0,G)),Z},setAnim:function(k,G,Z){G===void 0&&(G=!0),Z===void 0&&(Z=1),this.randomAnim=G,this.animQuantity=Z,this.currentAnim=0;var J=typeof k;if(this.anims.length=0,Array.isArray(k))this.anims=this.anims.concat(k);else if(J==="string")this.anims.push(k);else if(J==="object"){var W=k;k=v(W,"anims",null),k&&(this.anims=this.anims.concat(k));var q=v(W,"cycle",!1);this.randomAnim=!q,this.animQuantity=v(W,"quantity",Z)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(k){return k===void 0&&(k=!0),this.radial=k,this},addParticleBounds:function(k,G,Z,J,W,q,ie,re){if(typeof k=="object"){var oe=k;k=oe.x,G=oe.y,Z=_(oe,"w")?oe.w:oe.width,J=_(oe,"h")?oe.h:oe.height}return this.addParticleProcessor(new D(k,G,Z,J,W,q,ie,re))},setParticleSpeed:function(k,G){return G===void 0&&(G=k),this.ops.speedX.onChange(k),k===G?this.ops.speedY.active=!1:this.ops.speedY.onChange(G),this.radial=!0,this},setParticleScale:function(k,G){return k===void 0&&(k=1),G===void 0&&(G=k),this.ops.scaleX.onChange(k),this.ops.scaleY.onChange(G),this},setParticleGravity:function(k,G){return this.gravityX=k,this.gravityY=G,this},setParticleAlpha:function(k){return this.ops.alpha.onChange(k),this},setParticleTint:function(k){return this.ops.tint.onChange(k),this},setEmitterAngle:function(k){return this.ops.angle.onChange(k),this},setParticleLifespan:function(k){return this.ops.lifespan.onChange(k),this},setQuantity:function(k){return this.quantity=k,this},setFrequency:function(k,G){return this.frequency=k,this.flowCounter=k>0?k:0,G&&(this.quantity=G),this},addDeathZone:function(k){Array.isArray(k)||(k=[k]);for(var G,Z=[],J=0;J-1&&(this.zoneTotal++,this.zoneTotal===J.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===Z&&(this.zoneIndex=0)))}},getDeathZone:function(k){for(var G=this.deathZones,Z=0;Z=0&&(this.zoneIndex=G),this},addParticleProcessor:function(k){return this.processors.exists(k)||(k.emitter&&k.emitter.removeParticleProcessor(k),this.processors.add(k),k.emitter=this),k},removeParticleProcessor:function(k){return this.processors.exists(k)&&(this.processors.remove(k,!0),k.emitter=null),k},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(k){return this.addParticleProcessor(new x(k))},reserve:function(k){var G=this.dead;if(this.maxParticles>0){var Z=this.getParticleCount();Z+k>this.maxParticles&&(k=this.maxParticles-(Z+k))}for(var J=0;J0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(k,G){return k===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof k=="function"&&(this.emitCallback=k,G&&(this.emitCallbackScope=G)),this},onParticleDeath:function(k,G){return k===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof k=="function"&&(this.deathCallback=k,G&&(this.deathCallbackScope=G)),this},killAll:function(){for(var k=this.dead,G=this.alive;G.length>0;)k.push(G.pop());return this},forEachAlive:function(k,G){for(var Z=this.alive,J=Z.length,W=0;W0&&this.fastForward(k),this.emitting=!0,this.resetCounters(this.frequency,!0),G!==void 0&&(this.duration=Math.abs(G)),this.emit(m.START,this)),this},stop:function(k){return k===void 0&&(k=!1),this.emitting&&(this.emitting=!1,k&&this.killAll(),this.emit(m.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(k,G){return k===void 0&&(k=""),G===void 0&&(G=this.true),this.sortProperty=k,this.sortOrderAsc=G,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(k){return this.sortProperty!==""?k=this.depthSortCallback:k=null,this.sortCallback=k,this},depthSort:function(){return O(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(k,G){var Z=this.sortProperty;return this.sortOrderAsc?k[Z]-G[Z]:G[Z]-k[Z]},flow:function(k,G,Z){return G===void 0&&(G=1),this.emitting=!1,this.frequency=k,this.quantity=G,Z!==void 0&&(this.stopAfter=Z),this.start()},explode:function(k,G,Z){this.frequency=-1,this.resetCounters(-1,!0);var J=this.emitParticle(k,G,Z);return this.emit(m.EXPLODE,this,J),J},emitParticleAt:function(k,G,Z){return this.emitParticle(Z,k,G)},emitParticle:function(k,G,Z){if(!this.atLimit()){k===void 0&&(k=this.ops.quantity.onEmit());for(var J=this.dead,W=this.stopAfter,q=this.follow?this.follow.x+this.followOffset.x:G,ie=this.follow?this.follow.y+this.followOffset.y:Z,re=0;re0&&(this.stopCounter++,this.stopCounter>=W)||this.atLimit())break}return oe}},fastForward:function(k,G){G===void 0&&(G=1e3/60);var Z=0;for(this.skipping=!0;Z0){var _e=this.deathCallback,ye=this.deathCallbackScope;for(ie=oe-1;ie>=0;ie--){var xe=re[ie];W.splice(xe.index,1),q.push(xe.particle),_e&&_e.call(ye,xe.particle),xe.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&W.length===0&&(this.completeFlag=0,this.emit(m.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=G;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=G,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(k){for(var G=this.getWorldTransformMatrix(),Z=this.alive,J=Z.length,W=[],q=0;q0){var ve=0;for(this.skipping=!0;ve0&&C(J,k,k),J},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(k){this.ops.x.onChange(k)}},particleY:{get:function(){return this.ops.y.current},set:function(k){this.ops.y.onChange(k)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(k){this.ops.accelerationX.onChange(k)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(k){this.ops.accelerationY.onChange(k)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(k){this.ops.maxVelocityX.onChange(k)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(k){this.ops.maxVelocityY.onChange(k)}},speed:{get:function(){return this.ops.speedX.current},set:function(k){this.ops.speedX.onChange(k),this.ops.speedY.onChange(k)}},speedX:{get:function(){return this.ops.speedX.current},set:function(k){this.ops.speedX.onChange(k)}},speedY:{get:function(){return this.ops.speedY.current},set:function(k){this.ops.speedY.onChange(k)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(k){this.ops.moveToX.onChange(k)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(k){this.ops.moveToY.onChange(k)}},bounce:{get:function(){return this.ops.bounce.current},set:function(k){this.ops.bounce.onChange(k)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(k){this.ops.scaleX.onChange(k)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(k){this.ops.scaleY.onChange(k)}},particleColor:{get:function(){return this.ops.color.current},set:function(k){this.ops.color.onChange(k)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(k){this.ops.color.setEase(k)}},particleTint:{get:function(){return this.ops.tint.current},set:function(k){this.ops.tint.onChange(k)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(k){this.ops.alpha.onChange(k)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(k){this.ops.lifespan.onChange(k)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(k){this.ops.angle.onChange(k)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(k){this.ops.rotate.onChange(k)}},quantity:{get:function(){return this.ops.quantity.current},set:function(k){this.ops.quantity.onChange(k)}},delay:{get:function(){return this.ops.delay.current},set:function(k){this.ops.delay.onChange(k)}},hold:{get:function(){return this.ops.hold.current},set:function(k){this.ops.hold.onChange(k)}},flowCounter:{get:function(){return this.counters[0]},set:function(k){this.counters[0]=k}},frameCounter:{get:function(){return this.counters[1]},set:function(k){this.counters[1]=k}},animCounter:{get:function(){return this.counters[2]},set:function(k){this.counters[2]=k}},elapsed:{get:function(){return this.counters[3]},set:function(k){this.counters[3]=k}},stopCounter:{get:function(){return this.counters[4]},set:function(k){this.counters[4]=k}},completeFlag:{get:function(){return this.counters[5]},set:function(k){this.counters[5]=k}},zoneIndex:{get:function(){return this.counters[6]},set:function(k){this.counters[6]=k}},zoneTotal:{get:function(){return this.counters[7]},set:function(k){this.counters[7]=k}},currentFrame:{get:function(){return this.counters[8]},set:function(k){this.counters[8]=k}},currentAnim:{get:function(){return this.counters[9]},set:function(k){this.counters[9]=k}},preDestroy:function(){this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var k,G=this.ops;for(k=0;k{var o=s(59996),d=s(61340),l=new d,c=new d,h=new d,u=new d,f=function(p,m,g,v){var y=l,x=c,b=h,_=u;v?(_.loadIdentity(),_.multiply(v),_.translate(m.x,m.y),_.rotate(m.rotation),_.scale(m.scaleX,m.scaleY)):_.applyITRS(m.x,m.y,m.rotation,m.scaleX,m.scaleY);var C=p.currentContext,w=g.roundPixels,T=g.alpha,S=m.alpha,E=m.alive,D=E.length,A=m.viewBounds;if(!(!m.visible||D===0||A&&!o(A,g.worldView))){m.sortCallback&&m.depthSort(),g.addToRenderList(m);var M=m.scrollFactorX,R=m.scrollFactorY;C.save(),C.globalCompositeOperation=p.blendModes[m.blendMode];for(var L=0;L0&&H.height>0){var X=-N.halfWidth,V=-N.halfHeight;C.globalAlpha=O,C.save(),x.setToContext(C),w&&(X=Math.round(X),V=Math.round(V)),C.imageSmoothingEnabled=!N.source.scaleMode,C.drawImage(N.source.image,H.x,H.y,H.width,H.height,X,V,H.width,H.height),C.restore()}}}C.restore()}};n.exports=f},92730:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(95540),h=s(31600);d.register("particles",function(u,f){u===void 0&&(u={});var p=l(u,"key",null),m=c(u,"config",null),g=new h(this.scene,0,0,p);return f!==void 0&&(u.add=f),o(this.scene,g,u),m&&g.setConfig(m),g})},676:(n,a,s)=>{var o=s(39429),d=s(31600);o.register("particles",function(l,c,h,u){return l!==void 0&&typeof l=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new d(this.scene,l,c,h,u))})},90668:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(21188),l=s(9871),n.exports={renderWebGL:d,renderCanvas:l}},21188:(n,a,s)=>{var o=s(59996),d=s(61340),l=s(70554),c=new d,h=new d,u=new d,f=new d,p=function(m,g,v,y){var x=m.pipelines.set(g.pipeline),b=c,_=h,C=u,w=f;y?(w.loadIdentity(),w.multiply(y),w.translate(g.x,g.y),w.rotate(g.rotation),w.scale(g.scaleX,g.scaleY)):w.applyITRS(g.x,g.y,g.rotation,g.scaleX,g.scaleY);var T=l.getTintAppendFloatAlpha,S=v.alpha,E=g.alpha;m.pipelines.preBatch(g);var D=g.alive,A=D.length,M=g.viewBounds;if(!(A===0||M&&!o(M,v.worldView))){g.sortCallback&&g.depthSort(),v.addToRenderList(g),b.copyFrom(v.matrix),b.multiplyWithOffset(w,-v.scrollX*g.scrollFactorX,-v.scrollY*g.scrollFactorY),m.setBlendMode(g.blendMode),g.mask&&(g.mask.preRenderWebGL(m,g,v),m.pipelines.set(g.pipeline));for(var R=g.tintFill,L,I,O=0;O{var o=s(83419),d=new o({initialize:function(c,h,u){c===void 0&&(c=0),h===void 0&&(h=0),u===void 0&&(u=!0),this.emitter,this.x=c,this.y=h,this.active=u},update:function(){},destroy:function(){this.emitter=null}});n.exports=d},9774:n=>{n.exports="complete"},812:n=>{n.exports="deathzone"},30522:n=>{n.exports="explode"},96695:n=>{n.exports="start"},18677:n=>{n.exports="stop"},20696:(n,a,s)=>{n.exports={COMPLETE:s(9774),DEATH_ZONE:s(812),EXPLODE:s(30522),START:s(96695),STOP:s(18677)}},18404:(n,a,s)=>{n.exports={EmitterColorOp:s(76472),EmitterOp:s(44777),Events:s(20696),GravityWell:s(24502),Particle:s(56480),ParticleBounds:s(69601),ParticleEmitter:s(31600),ParticleProcessor:s(20286),Zones:s(21024)}},26388:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h){this.source=c,this.killOnEnter=h},willKill:function(l){var c=this.source.contains(l.x,l.y);return c&&this.killOnEnter||!c&&!this.killOnEnter}});n.exports=d},19909:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h,u,f,p,m){f===void 0&&(f=!1),p===void 0&&(p=!0),m===void 0&&(m=-1),this.source=c,this.points=[],this.quantity=h,this.stepRate=u,this.yoyo=f,this.counter=-1,this.seamless=p,this._length=0,this._direction=0,this.total=m,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var l=this.points[0],c=this.points[this.points.length-1];l.x===c.x&&l.y===c.y&&this.points.pop()}var h=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(l){return this.source=l,this.updateSource()},getPoint:function(l){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var c=this.points[this.counter];c&&(l.x=c.x,l.y=c.y)}});n.exports=d},68875:(n,a,s)=>{var o=s(83419),d=s(26099),l=new o({initialize:function(h){this.source=h,this._tempVec=new d,this.total=-1},getPoint:function(c){var h=this._tempVec;this.source.getRandomPoint(h),c.x=h.x,c.y=h.y}});n.exports=l},21024:(n,a,s)=>{n.exports={DeathZone:s(26388),EdgeZone:s(19909),RandomZone:s(68875)}},1159:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(68287),c=new o({Extends:l,Mixins:[d.PathFollower],initialize:function(u,f,p,m,g,v){l.call(this,u,p,m,g,v),this.path=f},preUpdate:function(h,u){this.anims.update(h,u),this.pathUpdate(h)}});n.exports=c},90145:(n,a,s)=>{var o=s(39429),d=s(1159);o.register("follower",function(l,c,h,u,f){var p=new d(this.scene,l,c,h,u,f);return this.displayList.add(p),this.updateList.add(p),p})},33663:(n,a,s)=>{var o=s(9674),d=s(83419),l=s(48803),c=s(90664),h=s(4703),u=s(45650),f=new d({Extends:h,initialize:function(m,g,v,y,x,b,_,C){y||(y="__DEFAULT"),h.call(this,m,g,v,y,x),this.type="Plane",this.anims=new o(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(b,_,C),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(p,m,g){p===void 0&&(p=8),m===void 0&&(m=8),g===void 0&&(g=!1);var v=!1;return g&&(v=!0),this.gridWidth=p,this.gridHeight=m,this.isTiled=g,this.clear(),l({mesh:this,widthSegments:p,heightSegments:m,isOrtho:!1,tile:g,flipY:v}),this},setSizeToFrame:function(p){p===void 0&&(p=!0);var m=this.frame;if(this.setPerspective(this.width/m.width,this.height/m.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!p)return this;var g=this.gridWidth,v=this.gridHeight,y=this.vertices,x=m.u0,b=m.u1,_=m.v0,C=m.v1,w,T,S=0;if(this.isTiled)for(_=m.v1,C=m.v0,T=0;T7&&w>7?_.push(x.r,x.g,x.b,g):_.push(b.r,b.g,b.b,v);var T=this.scene.sys.textures.addUint8Array(u(),new Uint8Array(_),16,16);return this.removeCheckerboard(),this.setTexture(T),this.setSizeToFrame(),this.setViewHeight(y),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(p,m){return this.anims.play(p,m)},playReverse:function(p,m){return this.anims.playReverse(p,m)},playAfterDelay:function(p,m){return this.anims.playAfterDelay(p,m)},playAfterRepeat:function(p,m){return this.anims.playAfterRepeat(p,m)},stop:function(){return this.anims.stop()},stopAfterDelay:function(p){return this.anims.stopAfterDelay(p)},stopAfterRepeat:function(p){return this.anims.stopAfterRepeat(p)},stopOnFrame:function(p){return this.anims.stopOnFrame(p)},preUpdate:function(p,m){h.prototype.preUpdate.call(this,p,m),this.anims.update(p,m)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});n.exports=f},56015:(n,a,s)=>{var o=s(25305),d=s(13059),l=s(44603),c=s(23568),h=s(35154),u=s(33663);l.register("plane",function(f,p){f===void 0&&(f={});var m=c(f,"key",null),g=c(f,"frame",null),v=h(f,"width",8),y=h(f,"height",8),x=h(f,"tile",!1),b=new u(this.scene,0,0,m,g,v,y,x);p!==void 0&&(f.add=p);var _=h(f,"checkerboard",null);if(_){var C=h(_,"color1",16777215),w=h(_,"color2",255),T=h(_,"alpha1",255),S=h(_,"alpha2",255),E=h(_,"height",128);b.createCheckerboard(C,w,T,S,E)}return o(this.scene,b,f),d(b,f),b})},30985:(n,a,s)=>{var o=s(33663),d=s(39429);d.register("plane",function(l,c,h,u,f,p,m){return this.displayList.add(new o(this.scene,l,c,h,u,f,p,m))})},80321:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(95643),c=s(30100),h=s(36060),u=s(67277),f=new o({Extends:l,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Transform,d.Visible,u],initialize:function(m,g,v,y,x,b,_){y===void 0&&(y=16777215),x===void 0&&(x=128),b===void 0&&(b=1),_===void 0&&(_=.1),l.call(this,m,"PointLight"),this.initPipeline(h.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(g,v),this.color=c(y),this.intensity=b,this.attenuation=_,this.width=x*2,this.height=x*2,this._radius=x},radius:{get:function(){return this._radius},set:function(p){this._radius=p,this.width=p*2,this.height=p*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});n.exports=f},39829:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(80321);d.register("pointlight",function(h,u){h===void 0&&(h={});var f=l(h,"color",16777215),p=l(h,"radius",128),m=l(h,"intensity",1),g=l(h,"attenuation",.1),v=new c(this.scene,0,0,f,p,m,g);return u!==void 0&&(h.add=u),o(this.scene,v,h),v})},71255:(n,a,s)=>{var o=s(39429),d=s(80321);o.register("pointlight",function(l,c,h,u,f,p){return this.displayList.add(new d(this.scene,l,c,h,u,f,p))})},67277:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(57787),n.exports={renderWebGL:d,renderCanvas:l}},57787:(n,a,s)=>{var o=s(91296),d=function(l,c,h,u){h.addToRenderList(c);var f=l.pipelines.set(c.pipeline),p=o(c,h,u).calc,m=c.width,g=c.height,v=-c._radius,y=-c._radius,x=v+m,b=y+g,_=p.getX(0,0),C=p.getY(0,0),w=p.getX(v,y),T=p.getY(v,y),S=p.getX(v,b),E=p.getY(v,b),D=p.getX(x,b),A=p.getY(x,b),M=p.getX(x,y),R=p.getY(x,y);l.pipelines.preBatch(c),f.batchPointLight(c,h,w,T,S,E,D,A,M,R,_,C),l.pipelines.postBatch(c)};n.exports=d},591:(n,a,s)=>{var o=s(83419),d=s(81320),l=s(88571),c=new o({Extends:l,initialize:function(u,f,p,m,g){f===void 0&&(f=0),p===void 0&&(p=0),m===void 0&&(m=32),g===void 0&&(g=32);var v=new d(u.sys.textures,"",m,g);l.call(this,u,f,p,v),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(h,u){this.width=h,this.height=u,this.texture.setSize(h,u),this.updateDisplayOrigin();var f=this.input;return f&&!f.customHitArea&&(f.hitArea.width=h,f.hitArea.height=u),this},resize:function(h,u){return this.setSize(h,u),this},saveTexture:function(h){var u=this.texture;return u.key=h,u.manager.addDynamicTexture(u)&&(this._saved=!0),u},fill:function(h,u,f,p,m,g){return this.texture.fill(h,u,f,p,m,g),this},clear:function(){return this.texture.clear(),this},stamp:function(h,u,f,p,m){return this.texture.stamp(h,u,f,p,m),this},erase:function(h,u,f){return this.texture.erase(h,u,f),this},draw:function(h,u,f,p,m){return this.texture.draw(h,u,f,p,m),this},drawFrame:function(h,u,f,p,m,g){return this.texture.drawFrame(h,u,f,p,m,g),this},repeat:function(h,u,f,p,m,g,v,y,x){return this.texture.repeat(h,u,f,p,m,g,v,y,x),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(h,u,f,p,m){return this.texture.batchDraw(h,u,f,p,m),this},batchDrawFrame:function(h,u,f,p,m,g){return this.texture.batchDrawFrame(h,u,f,p,m,g),this},endDraw:function(h){return this.texture.endDraw(h),this},snapshotArea:function(h,u,f,p,m,g,v){return this.texture.snapshotArea(h,u,f,p,m,g,v),this},snapshot:function(h,u,f){return this.snapshotArea(0,0,this.width,this.height,h,u,f)},snapshotPixel:function(h,u,f){return this.snapshotArea(h,u,1,1,f,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});n.exports=c},34495:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(591);d.register("renderTexture",function(h,u){h===void 0&&(h={});var f=l(h,"x",0),p=l(h,"y",0),m=l(h,"width",32),g=l(h,"height",32),v=new c(this.scene,f,p,m,g);return u!==void 0&&(h.add=u),o(this.scene,v,h),v})},60505:(n,a,s)=>{var o=s(39429),d=s(591);o.register("renderTexture",function(l,c,h,u){return this.displayList.add(new d(this.scene,l,c,h,u))})},77757:(n,a,s)=>{var o=s(9674),d=s(83419),l=s(31401),c=s(95643),h=s(36060),u=s(38745),f=s(26099),p=new d({Extends:c,Mixins:[l.AlphaSingle,l.BlendMode,l.Depth,l.Flip,l.Mask,l.Pipeline,l.PostPipeline,l.Size,l.Texture,l.Transform,l.Visible,l.ScrollFactor,u],initialize:function(g,v,y,x,b,_,C,w,T){x===void 0&&(x="__DEFAULT"),_===void 0&&(_=2),C===void 0&&(C=!0),c.call(this,g,"Rope"),this.anims=new o(this),this.points=_,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=x==="__DEFAULT",this.dirty=!1,this.horizontal=C,this._flipX=!1,this._flipY=!1,this._perp=new f,this.debugCallback=null,this.debugGraphic=null,this.setTexture(x,b),this.setPosition(v,y),this.setSizeToFrame(),this.initPipeline(h.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(_)&&this.resizeArrays(_.length),this.setPoints(_,w,T),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(m,g){var v=this.anims.currentFrame;this.anims.update(m,g),this.anims.currentFrame!==v&&(this.updateUVs(),this.updateVertices())},play:function(m,g,v){return this.anims.play(m,g,v),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(m,g,v){return m===void 0&&(m=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(m,g,v))},setVertical:function(m,g,v){return m===void 0&&(m=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(m,g,v)):this},setTintFill:function(m){return m===void 0&&(m=!1),this.tintFill=m,this},setAlphas:function(m,g){var v=this.points.length;if(v<1)return this;var y=this.alphas;m===void 0?m=[1]:!Array.isArray(m)&&g===void 0&&(m=[m]);var x,b=0;if(g!==void 0)for(x=0;xb&&(_=m[b]),y[b]=_,m.length>b+1&&(_=m[b+1]),y[b+1]=_}return this},setColors:function(m){var g=this.points.length;if(g<1)return this;var v=this.colors;m===void 0?m=[16777215]:Array.isArray(m)||(m=[m]);var y,x=0;if(m.length===g)for(y=0;yx&&(b=m[x]),v[x]=b,m.length>x+1&&(b=m[x+1]),v[x+1]=b}return this},setPoints:function(m,g,v){if(m===void 0&&(m=2),typeof m=="number"){var y=m;y<2&&(y=2),m=[];var x,b,_;if(this.horizontal)for(_=-this.frame.halfWidth,b=this.frame.width/(y-1),x=0;x{var a=function(){};n.exports=a},26209:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(35154),h=s(77757);d.register("rope",function(u,f){u===void 0&&(u={});var p=l(u,"key",null),m=l(u,"frame",null),g=l(u,"horizontal",!0),v=c(u,"points",void 0),y=c(u,"colors",void 0),x=c(u,"alphas",void 0),b=new h(this.scene,0,0,p,m,v,g,y,x);return f!==void 0&&(u.add=f),o(this.scene,b,u),b})},96819:(n,a,s)=>{var o=s(77757),d=s(39429);d.register("rope",function(l,c,h,u,f,p,m,g){return this.displayList.add(new o(this.scene,l,c,h,u,f,p,m,g))})},38745:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(20439),l=s(95262),n.exports={renderWebGL:d,renderCanvas:l}},20439:(n,a,s)=>{var o=s(91296),d=s(70554),l=function(c,h,u,f){u.addToRenderList(h);var p=c.pipelines.set(h.pipeline,h),m=o(h,u,f).calc,g=h.vertices,v=h.uv,y=h.colors,x=h.alphas,b=h.alpha,_=d.getTintAppendFloatAlpha,C=u.roundPixels,w=g.length,T=Math.floor(w*.5);p.flush(),c.pipelines.preBatch(h);var S=p.setGameObject(h),E=p.vertexViewF32,D=p.vertexViewU32,A=p.vertexCount*p.currentShader.vertexComponentCount-1,M=0,R=h.tintFill;h.dirty&&h.updateVertices();for(var L=h.debugCallback,I=[],O=0;O{var o=s(83419),d=s(31401),l=s(95643),c=s(95540),h=s(79291),u=s(61622),f=s(25479),p=s(61340),m=s(95428),g=s(92503),v=new o({Extends:l,Mixins:[d.ComputedSize,d.Depth,d.GetBounds,d.Mask,d.Origin,d.ScrollFactor,d.Transform,d.Visible,f],initialize:function(x,b,_,C,w,T,S,E){_===void 0&&(_=0),C===void 0&&(C=0),w===void 0&&(w=128),T===void 0&&(T=128),l.call(this,x,"Shader"),this.blendMode=-1,this.shader;var D=x.sys.renderer;this.renderer=D,this.gl=D.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=D.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=D.width,this._rendererHeight=D.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(_,C),this.setSize(w,T),this.setOrigin(.5,.5),this.setShader(b,S,E),this.renderer.on(g.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(y){return this.renderToTexture?!0:!(l.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&y.id)},setRenderToTexture:function(y,x){if(x===void 0&&(x=!1),!this.renderToTexture){var b=this.width,_=this.height,C=this.renderer;this.glTexture=C.createTextureFromSource(null,b,_,0),this.framebuffer=C.createFramebuffer(b,_,this.glTexture,!1),this._rendererWidth=b,this._rendererHeight=_,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),y&&(this.texture=this.scene.sys.textures.addGLTexture(y,this.glTexture))}return this.shader&&(C.pipelines.clear(),this.load(),this.flush(),C.pipelines.rebind()),this},setShader:function(y,x,b){if(this.renderer.contextLost)return this._deferSetShader={key:y,textures:x,textureData:b},this;if(x===void 0&&(x=[]),typeof y=="string"){var _=this.scene.sys.cache.shader;if(!_.has(y))return console.warn("Shader missing: "+y),this;this.shader=_.get(y)}else this.shader=y;var C=this.gl,w=this.renderer;this.program&&w.deleteProgram(this.program);var T=w.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);C.uniformMatrix4fv(C.getUniformLocation(T.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),C.uniformMatrix4fv(C.getUniformLocation(T.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),C.uniform2f(C.getUniformLocation(T.webGLProgram,"uResolution"),this.width,this.height),this.program=T;var S=new Date,E={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[S.getFullYear(),S.getMonth(),S.getDate(),S.getHours()*60*60+S.getMinutes()*60+S.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=h(!0,{},this.shader.uniforms,E):this.uniforms=E;for(var D=0;D<4;D++)x[D]&&this.setSampler2D("iChannel"+D,x[D],D,b);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(y){return this.pointer=y,this},projOrtho:function(y,x,b,_){if(this.renderer.contextLost){this._deferProjOrtho={left:y,right:x,bottom:b,top:_};return}var C=-1e3,w=1e3,T=1/(y-x),S=1/(b-_),E=1/(C-w),D=this.projectionMatrix;D[0]=-2*T,D[5]=-2*S,D[10]=2*E,D[12]=(y+x)*T,D[13]=(_+b)*S,D[14]=(w+C)*E;var A=this.program,M=this.gl,R=this.renderer;R.setProgram(A),M.uniformMatrix4fv(M.getUniformLocation(A.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=x,this._rendererHeight=b},initUniforms:function(){var y=this.renderer.glFuncMap,x=this.program;this._textureCount=0;for(var b in this.uniforms){var _=this.uniforms[b],C=_.type,w=y[C];_.uniformLocation=this.renderer.createUniformLocation(x,b),C!=="sampler2D"&&(_.glMatrix=w.matrix,_.glValueLength=w.length,_.glFunc=w.func)}},setSampler2DBuffer:function(y,x,b,_,C,w){C===void 0&&(C=0),w===void 0&&(w={});var T=this.uniforms[y];return T.value=x,w.width=b,w.height=_,T.textureData=w,this._textureCount=C,this.initSampler2D(T),this},setSampler2D:function(y,x,b,_){b===void 0&&(b=0);var C=this.scene.sys.textures;if(C.exists(x)){var w=C.getFrame(x);if(w.glTexture&&w.glTexture.isRenderTexture)return this.setSampler2DBuffer(y,w.glTexture,w.width,w.height,b,_);var T=this.uniforms[y],S=w.source;T.textureKey=x,T.source=S.image,T.value=w.glTexture,S.isGLTexture&&(_||(_={}),_.width=S.width,_.height=S.height),_&&(T.textureData=_),this._textureCount=b,this.initSampler2D(T)}return this},setUniform:function(y,x){return u(this.uniforms,y,x),this},getUniform:function(y){return c(this.uniforms,y,null)},setChannel0:function(y,x){return this.setSampler2D("iChannel0",y,0,x)},setChannel1:function(y,x){return this.setSampler2D("iChannel1",y,1,x)},setChannel2:function(y,x){return this.setSampler2D("iChannel2",y,2,x)},setChannel3:function(y,x){return this.setSampler2D("iChannel3",y,3,x)},initSampler2D:function(y){if(y.value){var x=y.textureData;if(x&&!y.value.isRenderTexture){var b=this.gl,_=y.value,C=b[c(x,"magFilter","linear").toUpperCase()],w=b[c(x,"minFilter","linear").toUpperCase()],T=b[c(x,"wrapS","repeat").toUpperCase()],S=b[c(x,"wrapT","repeat").toUpperCase()],E=b[c(x,"format","rgba").toUpperCase()],D=c(x,"flipY",!1),A=c(x,"width",_.width),M=c(x,"height",_.height),R=c(x,"source",_.pixels);x.repeat&&(T=b.REPEAT,S=b.REPEAT),x.width&&(R=null),_.update(R,A,M,D,T,S,w,C,E)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var y=this.gl,x=this.uniforms,b,_,C,w,T,S=0;for(var E in x)b=x[E],C=b.glFunc,_=b.glValueLength,w=b.uniformLocation,T=b.value,T!==null&&(_===1?b.glMatrix?C.call(y,w.webGLUniformLocation,b.transpose,T):C.call(y,w.webGLUniformLocation,T):_===2?C.call(y,w.webGLUniformLocation,T.x,T.y):_===3?C.call(y,w.webGLUniformLocation,T.x,T.y,T.z):_===4?C.call(y,w.webGLUniformLocation,T.x,T.y,T.z,T.w):b.type==="sampler2D"&&(y.activeTexture(y.TEXTURE0+S),y.bindTexture(y.TEXTURE_2D,T.webGLTexture),y.uniform1i(w.webGLUniformLocation,S),S++))},load:function(y){var x=this.gl,b=this.width,_=this.height,C=this.renderer,w=this.program,T=this.viewMatrix;if(!this.renderToTexture){var S=-this._displayOriginX,E=-this._displayOriginY;T[0]=y[0],T[1]=y[1],T[4]=y[2],T[5]=y[3],T[8]=y[4],T[9]=y[5],T[12]=T[0]*S+T[4]*E,T[13]=T[1]*S+T[5]*E}x.useProgram(w.webGLProgram),x.uniformMatrix4fv(x.getUniformLocation(w.webGLProgram,"uViewMatrix"),!1,T),x.uniformMatrix4fv(x.getUniformLocation(w.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),x.uniform2f(x.getUniformLocation(w.webGLProgram,"uResolution"),this.width,this.height);var D=this.uniforms,A=D.resolution;A.value.x=b,A.value.y=_,D.time.value=C.game.loop.getDuration();var M=this.pointer;if(M){var R=D.mouse,L=M.x/b,I=1-M.y/_;R.value.x=L.toFixed(2),R.value.y=I.toFixed(2)}this.syncUniforms()},flush:function(){var y=this.width,x=this.height,b=this.program,_=this.gl,C=this.vertexBuffer,w=this.renderer,T=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(w.setFramebuffer(this.framebuffer),_.clearColor(0,0,0,0),_.clear(_.COLOR_BUFFER_BIT)),_.bindBuffer(_.ARRAY_BUFFER,C.webGLBuffer);var S=_.getAttribLocation(b.webGLProgram,"inPosition");S!==-1&&(_.enableVertexAttribArray(S),_.vertexAttribPointer(S,2,_.FLOAT,!1,T,0));var E=this.vertexViewF32;E[3]=x,E[4]=y,E[5]=x,E[8]=y,E[9]=x,E[10]=y;var D=6;_.bufferSubData(_.ARRAY_BUFFER,0,this.bytes.subarray(0,D*T)),_.drawArrays(_.TRIANGLES,0,D),this.renderToTexture&&w.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var y=this._deferSetShader.key,x=this._deferSetShader.textures,b=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(y,x,b)}if(this._deferProjOrtho!==null){var _=this._deferProjOrtho.left,C=this._deferProjOrtho.right,w=this._deferProjOrtho.bottom,T=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(_,C,w,T)}},preDestroy:function(){var y=this.renderer;y.off(g.RESTORE_WEBGL,this.onContextRestored,this),y.deleteProgram(this.program),y.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(y.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),m(this.uniforms,function(x){y.deleteUniformLocation(x.uniformLocation),x.uniformLocation=null})}});n.exports=v},80464:n=>{var a=function(){};n.exports=a},54935:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(20071);d.register("shader",function(h,u){h===void 0&&(h={});var f=l(h,"key",null),p=l(h,"x",0),m=l(h,"y",0),g=l(h,"width",128),v=l(h,"height",128),y=new c(this.scene,f,p,m,g,v);return u!==void 0&&(h.add=u),o(this.scene,y,h),y})},74177:(n,a,s)=>{var o=s(20071),d=s(39429);d.register("shader",function(l,c,h,u,f,p,m){return this.displayList.add(new o(this.scene,l,c,h,u,f,p,m))})},25479:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(19257),l=s(80464),n.exports={renderWebGL:d,renderCanvas:l}},19257:(n,a,s)=>{var o=s(91296),d=function(l,c,h,u){if(c.shader){if(h.addToRenderList(c),l.pipelines.clear(),c.renderToTexture)c.load(),c.flush();else{var f=o(c,h,u).calc;(l.width!==c._rendererWidth||l.height!==c._rendererHeight)&&c.projOrtho(0,l.width,l.height,0),c.load(f.matrix),c.flush()}l.pipelines.rebind()}};n.exports=d},10441:(n,a,s)=>{var o=s(70554),d=function(l,c,h,u,f,p){for(var m=o.getTintAppendFloatAlpha(h.fillColor,h.fillAlpha*u),g=h.pathData,v=h.pathIndexes,y=0;y{var a=function(s,o,d,l){var c=d||o.fillColor,h=l||o.fillAlpha,u=(c&16711680)>>>16,f=(c&65280)>>>8,p=c&255;s.fillStyle="rgba("+u+","+f+","+p+","+h+")"};n.exports=a},75177:n=>{var a=function(s,o,d,l){var c=d||o.strokeColor,h=l||o.strokeAlpha,u=(c&16711680)>>>16,f=(c&65280)>>>8,p=c&255;s.strokeStyle="rgba("+u+","+f+","+p+","+h+")",s.lineWidth=o.lineWidth};n.exports=a},17803:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(95643),c=s(23031),h=new o({Extends:l,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.GetBounds,d.Mask,d.Origin,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Transform,d.Visible],initialize:function(f,p,m){p===void 0&&(p="Shape"),l.call(this,f,p),this.geom=m,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new c,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(u,f){return f===void 0&&(f=1),u===void 0?this.isFilled=!1:(this.fillColor=u,this.fillAlpha=f,this.isFilled=!0),this},setStrokeStyle:function(u,f,p){return p===void 0&&(p=1),u===void 0?this.isStroked=!1:(this.lineWidth=u,this.strokeColor=f,this.strokeAlpha=p,this.isStroked=!0),this},setClosePath:function(u){return this.closePath=u,this},setSize:function(u,f){return this.width=u,this.height=f,this},setDisplaySize:function(u,f){return this.displayWidth=u,this.displayHeight=f,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(u){this.scaleX=u/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(u){this.scaleY=u/this.height}}});n.exports=h},34682:(n,a,s)=>{var o=s(70554),d=function(l,c,h,u,f){var p=l.strokeTint,m=o.getTintAppendFloatAlpha(c.strokeColor,c.strokeAlpha*h);p.TL=m,p.TR=m,p.BL=m,p.BR=m;var g=c.pathData,v=g.length-1,y=c.lineWidth,x=y/2,b=g[0]-u,_=g[1]-f;c.closePath||(v-=2);for(var C=2;C{var o=s(13609),d=s(83419),l=s(39506),c=s(94811),h=s(96503),u=s(36383),f=s(17803),p=new d({Extends:f,Mixins:[o],initialize:function(g,v,y,x,b,_,C,w,T){v===void 0&&(v=0),y===void 0&&(y=0),x===void 0&&(x=128),b===void 0&&(b=0),_===void 0&&(_=360),C===void 0&&(C=!1),f.call(this,g,"Arc",new h(0,0,x)),this._startAngle=b,this._endAngle=_,this._anticlockwise=C,this._iterations=.01,this.setPosition(v,y);var S=this.geom.radius*2;this.setSize(S,S),w!==void 0&&this.setFillStyle(w,T),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(m){this._iterations=m,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(m){this.geom.radius=m;var g=m*2;this.setSize(g,g),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(m){this._startAngle=m,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(m){this._endAngle=m,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(m){this._anticlockwise=m,this.updateData()}},setRadius:function(m){return this.radius=m,this},setIterations:function(m){return m===void 0&&(m=.01),this.iterations=m,this},setStartAngle:function(m,g){return this._startAngle=m,g!==void 0&&(this._anticlockwise=g),this.updateData()},setEndAngle:function(m,g){return this._endAngle=m,g!==void 0&&(this._anticlockwise=g),this.updateData()},updateData:function(){var m=this._iterations,g=m,v=this.geom.radius,y=l(this._startAngle),x=l(this._endAngle),b=this._anticlockwise,_=v,C=v;x-=y,b?x<-u.PI2?x=-u.PI2:x>0&&(x=-u.PI2+x%u.PI2):x>u.PI2?x=u.PI2:x<0&&(x=u.PI2+x%u.PI2);for(var w=[_+Math.cos(y)*v,C+Math.sin(y)*v],T;g<1;)T=x*g+y,w.push(_+Math.cos(T)*v,C+Math.sin(T)*v),g+=m;return T=x+y,w.push(_+Math.cos(T)*v,C+Math.sin(T)*v),w.push(_+Math.cos(y)*v,C+Math.sin(y)*v),this.pathIndexes=c(w),this.pathData=w,this}});n.exports=p},42542:(n,a,s)=>{var o=s(39506),d=s(65960),l=s(75177),c=s(20926),h=function(u,f,p,m){p.addToRenderList(f);var g=u.currentContext;if(c(u,g,f,p,m)){var v=f.radius;g.beginPath(),g.arc(v-f.originX*(v*2),v-f.originY*(v*2),v,o(f._startAngle),o(f._endAngle),f.anticlockwise),f.closePath&&g.closePath(),f.isFilled&&(d(g,f),g.fill()),f.isStroked&&(l(g,f),g.stroke()),g.restore()}};n.exports=h},42563:(n,a,s)=>{var o=s(23629),d=s(39429);d.register("arc",function(l,c,h,u,f,p,m,g){return this.displayList.add(new o(this.scene,l,c,h,u,f,p,m,g))}),d.register("circle",function(l,c,h,u,f){return this.displayList.add(new o(this.scene,l,c,h,0,360,!1,u,f))})},13609:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(41447),l=s(42542),n.exports={renderWebGL:d,renderCanvas:l}},41447:(n,a,s)=>{var o=s(91296),d=s(10441),l=s(34682),c=function(h,u,f,p){f.addToRenderList(u);var m=h.pipelines.set(u.pipeline),g=o(u,f,p),v=m.calcMatrix.copyFrom(g.calc),y=u._displayOriginX,x=u._displayOriginY,b=f.alpha*u.alpha;h.pipelines.preBatch(u),u.isFilled&&d(m,v,u,b,y,x),u.isStroked&&l(m,u,b,y,x),h.pipelines.postBatch(u)};n.exports=c},89:(n,a,s)=>{var o=s(83419),d=s(33141),l=s(94811),c=s(87841),h=s(17803),u=new o({Extends:h,Mixins:[d],initialize:function(p,m,g,v,y,x){m===void 0&&(m=0),g===void 0&&(g=0),h.call(this,p,"Curve",v),this._smoothness=32,this._curveBounds=new c,this.closePath=!1,this.setPosition(m,g),y!==void 0&&this.setFillStyle(y,x),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(f){this._smoothness=f,this.updateData()}},setSmoothness:function(f){return this._smoothness=f,this.updateData()},updateData:function(){var f=this._curveBounds,p=this._smoothness;this.geom.getBounds(f,p),this.setSize(f.width,f.height),this.updateDisplayOrigin();for(var m=[],g=this.geom.getPoints(p),v=0;v{var o=s(65960),d=s(75177),l=s(20926),c=function(h,u,f,p){f.addToRenderList(u);var m=h.currentContext;if(l(h,m,u,f,p)){var g=u._displayOriginX+u._curveBounds.x,v=u._displayOriginY+u._curveBounds.y,y=u.pathData,x=y.length-1,b=y[0]-g,_=y[1]-v;m.beginPath(),m.moveTo(b,_),u.closePath||(x-=2);for(var C=2;C{var o=s(39429),d=s(89);o.register("curve",function(l,c,h,u,f){return this.displayList.add(new d(this.scene,l,c,h,u,f))})},33141:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(53987),l=s(3170),n.exports={renderWebGL:d,renderCanvas:l}},53987:(n,a,s)=>{var o=s(10441),d=s(91296),l=s(34682),c=function(h,u,f,p){f.addToRenderList(u);var m=h.pipelines.set(u.pipeline),g=d(u,f,p),v=m.calcMatrix.copyFrom(g.calc),y=u._displayOriginX+u._curveBounds.x,x=u._displayOriginY+u._curveBounds.y,b=f.alpha*u.alpha;h.pipelines.preBatch(u),u.isFilled&&o(m,v,u,b,y,x),u.isStroked&&l(m,u,b,y,x),h.pipelines.postBatch(u)};n.exports=c},19921:(n,a,s)=>{var o=s(83419),d=s(94811),l=s(54205),c=s(8497),h=s(17803),u=new o({Extends:h,Mixins:[l],initialize:function(p,m,g,v,y,x,b){m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=128),y===void 0&&(y=128),h.call(this,p,"Ellipse",new c(v/2,y/2,v,y)),this._smoothness=64,this.setPosition(m,g),this.width=v,this.height=y,x!==void 0&&this.setFillStyle(x,b),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(f){this._smoothness=f,this.updateData()}},setSize:function(f,p){return this.width=f,this.height=p,this.geom.setPosition(f/2,p/2),this.geom.setSize(f,p),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(f){return this._smoothness=f,this.updateData()},updateData:function(){for(var f=[],p=this.geom.getPoints(this._smoothness),m=0;m{var o=s(65960),d=s(75177),l=s(20926),c=function(h,u,f,p){f.addToRenderList(u);var m=h.currentContext;if(l(h,m,u,f,p)){var g=u._displayOriginX,v=u._displayOriginY,y=u.pathData,x=y.length-1,b=y[0]-g,_=y[1]-v;m.beginPath(),m.moveTo(b,_),u.closePath||(x-=2);for(var C=2;C{var o=s(19921),d=s(39429);d.register("ellipse",function(l,c,h,u,f,p){return this.displayList.add(new o(this.scene,l,c,h,u,f,p))})},54205:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(19467),l=s(7930),n.exports={renderWebGL:d,renderCanvas:l}},19467:(n,a,s)=>{var o=s(10441),d=s(91296),l=s(34682),c=function(h,u,f,p){f.addToRenderList(u);var m=h.pipelines.set(u.pipeline),g=d(u,f,p),v=m.calcMatrix.copyFrom(g.calc),y=u._displayOriginX,x=u._displayOriginY,b=f.alpha*u.alpha;h.pipelines.preBatch(u),u.isFilled&&o(m,v,u,b,y,x),u.isStroked&&l(m,u,b,y,x),h.pipelines.postBatch(u)};n.exports=c},30479:(n,a,s)=>{var o=s(83419),d=s(17803),l=s(26015),c=new o({Extends:d,Mixins:[l],initialize:function(u,f,p,m,g,v,y,x,b,_,C){f===void 0&&(f=0),p===void 0&&(p=0),m===void 0&&(m=128),g===void 0&&(g=128),v===void 0&&(v=32),y===void 0&&(y=32),d.call(this,u,"Grid",null),this.cellWidth=v,this.cellHeight=y,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(f,p),this.setSize(m,g),this.setFillStyle(x,b),_!==void 0&&this.setOutlineStyle(_,C),this.updateDisplayOrigin()},setFillStyle:function(h,u){return u===void 0&&(u=1),h===void 0?this.showCells=!1:(this.fillColor=h,this.fillAlpha=u,this.showCells=!0),this},setAltFillStyle:function(h,u){return u===void 0&&(u=1),h===void 0?this.showAltCells=!1:(this.altFillColor=h,this.altFillAlpha=u,this.showAltCells=!0),this},setOutlineStyle:function(h,u){return u===void 0&&(u=1),h===void 0?this.showOutline=!1:(this.outlineFillColor=h,this.outlineFillAlpha=u,this.showOutline=!0),this}});n.exports=c},49912:(n,a,s)=>{var o=s(65960),d=s(75177),l=s(20926),c=function(h,u,f,p){f.addToRenderList(u);var m=h.currentContext;if(l(h,m,u,f,p)){var g=-u._displayOriginX,v=-u._displayOriginY,y=f.alpha*u.alpha,x=u.width,b=u.height,_=u.cellWidth,C=u.cellHeight,w=Math.ceil(x/_),T=Math.ceil(b/C),S=_,E=C,D=_-(w*_-x),A=C-(T*C-b),M=u.showCells,R=u.showAltCells,L=u.showOutline,I=0,O=0,N=0,H=0,X=0;if(L&&(S--,E--,D===_&&D--,A===C&&A--),M&&u.fillAlpha>0)for(o(m,u),O=0;O0)for(o(m,u,u.altFillColor,u.altFillAlpha*y),O=0;O0){for(d(m,u,u.outlineFillColor,u.outlineFillAlpha*y),I=1;I{var o=s(39429),d=s(30479);o.register("grid",function(l,c,h,u,f,p,m,g,v,y){return this.displayList.add(new d(this.scene,l,c,h,u,f,p,m,g,v,y))})},26015:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(46161),l=s(49912),n.exports={renderWebGL:d,renderCanvas:l}},46161:(n,a,s)=>{var o=s(91296),d=s(70554),l=function(c,h,u,f){u.addToRenderList(h);var p=c.pipelines.set(h.pipeline),m=o(h,u,f),g=p.calcMatrix.copyFrom(m.calc);g.translate(-h._displayOriginX,-h._displayOriginY);var v=u.alpha*h.alpha,y=h.width,x=h.height,b=h.cellWidth,_=h.cellHeight,C=Math.ceil(y/b),w=Math.ceil(x/_),T=b,S=_,E=b-(C*b-y),D=_-(w*_-x),A,M,R=h.showCells,L=h.showAltCells,I=h.showOutline,O=0,N=0,H=0,X=0,V=0;if(I&&(T--,S--,E===b&&E--,D===_&&D--),c.pipelines.preBatch(h),R&&h.fillAlpha>0)for(A=p.fillTint,M=d.getTintAppendFloatAlpha(h.fillColor,h.fillAlpha*v),A.TL=M,A.TR=M,A.BL=M,A.BR=M,N=0;N0)for(A=p.fillTint,M=d.getTintAppendFloatAlpha(h.altFillColor,h.altFillAlpha*v),A.TL=M,A.TR=M,A.BL=M,A.BR=M,N=0;N0){var z=p.strokeTint,F=d.getTintAppendFloatAlpha(h.outlineFillColor,h.outlineFillAlpha*v);for(z.TL=F,z.TR=F,z.BL=F,z.BR=F,O=1;O{var o=s(99651),d=s(83419),l=s(17803),c=new d({Extends:l,Mixins:[o],initialize:function(u,f,p,m,g,v,y,x){f===void 0&&(f=0),p===void 0&&(p=0),m===void 0&&(m=48),g===void 0&&(g=32),v===void 0&&(v=15658734),y===void 0&&(y=10066329),x===void 0&&(x=13421772),l.call(this,u,"IsoBox",null),this.projection=4,this.fillTop=v,this.fillLeft=y,this.fillRight=x,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(f,p),this.setSize(m,g),this.updateDisplayOrigin()},setProjection:function(h){return this.projection=h,this},setFaces:function(h,u,f){return h===void 0&&(h=!0),u===void 0&&(u=!0),f===void 0&&(f=!0),this.showTop=h,this.showLeft=u,this.showRight=f,this},setFillStyle:function(h,u,f){return this.fillTop=h,this.fillLeft=u,this.fillRight=f,this.isFilled=!0,this}});n.exports=c},11508:(n,a,s)=>{var o=s(65960),d=s(20926),l=function(c,h,u,f){u.addToRenderList(h);var p=c.currentContext;if(d(c,p,h,u,f)&&h.isFilled){var m=h.width,g=h.height,v=m/2,y=m/h.projection;h.showTop&&(o(p,h,h.fillTop),p.beginPath(),p.moveTo(-v,-g),p.lineTo(0,-y-g),p.lineTo(v,-g),p.lineTo(v,-1),p.lineTo(0,y-1),p.lineTo(-v,-1),p.lineTo(-v,-g),p.fill()),h.showLeft&&(o(p,h,h.fillLeft),p.beginPath(),p.moveTo(-v,0),p.lineTo(0,y),p.lineTo(0,y-g),p.lineTo(-v,-g),p.lineTo(-v,0),p.fill()),h.showRight&&(o(p,h,h.fillRight),p.beginPath(),p.moveTo(v,0),p.lineTo(0,y),p.lineTo(0,y-g),p.lineTo(v,-g),p.lineTo(v,0),p.fill()),p.restore()}};n.exports=l},3933:(n,a,s)=>{var o=s(39429),d=s(61475);o.register("isobox",function(l,c,h,u,f,p,m){return this.displayList.add(new d(this.scene,l,c,h,u,f,p,m))})},99651:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(68149),l=s(11508),n.exports={renderWebGL:d,renderCanvas:l}},68149:(n,a,s)=>{var o=s(91296),d=s(70554),l=function(c,h,u,f){u.addToRenderList(h);var p=c.pipelines.set(h.pipeline),m=o(h,u,f),g=p.calcMatrix.copyFrom(m.calc),v=h.width,y=h.height,x=v/2,b=v/h.projection,_=u.alpha*h.alpha;if(h.isFilled){var C,w,T,S,E,D,A,M,R;c.pipelines.preBatch(h),h.showTop&&(C=d.getTintAppendFloatAlpha(h.fillTop,_),w=g.getX(-x,-y),T=g.getY(-x,-y),S=g.getX(0,-b-y),E=g.getY(0,-b-y),D=g.getX(x,-y),A=g.getY(x,-y),M=g.getX(0,b-y),R=g.getY(0,b-y),p.batchQuad(h,w,T,S,E,D,A,M,R,0,0,1,1,C,C,C,C,2)),h.showLeft&&(C=d.getTintAppendFloatAlpha(h.fillLeft,_),w=g.getX(-x,0),T=g.getY(-x,0),S=g.getX(0,b),E=g.getY(0,b),D=g.getX(0,b-y),A=g.getY(0,b-y),M=g.getX(-x,-y),R=g.getY(-x,-y),p.batchQuad(h,w,T,S,E,D,A,M,R,0,0,1,1,C,C,C,C,2)),h.showRight&&(C=d.getTintAppendFloatAlpha(h.fillRight,_),w=g.getX(x,0),T=g.getY(x,0),S=g.getX(0,b),E=g.getY(0,b),D=g.getX(0,b-y),A=g.getY(0,b-y),M=g.getX(x,-y),R=g.getY(x,-y),p.batchQuad(h,w,T,S,E,D,A,M,R,0,0,1,1,C,C,C,C,2)),c.pipelines.postBatch(h)}};n.exports=l},16933:(n,a,s)=>{var o=s(83419),d=s(60561),l=s(17803),c=new o({Extends:l,Mixins:[d],initialize:function(u,f,p,m,g,v,y,x,b){f===void 0&&(f=0),p===void 0&&(p=0),m===void 0&&(m=48),g===void 0&&(g=32),v===void 0&&(v=!1),y===void 0&&(y=15658734),x===void 0&&(x=10066329),b===void 0&&(b=13421772),l.call(this,u,"IsoTriangle",null),this.projection=4,this.fillTop=y,this.fillLeft=x,this.fillRight=b,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=v,this.isFilled=!0,this.setPosition(f,p),this.setSize(m,g),this.updateDisplayOrigin()},setProjection:function(h){return this.projection=h,this},setReversed:function(h){return this.isReversed=h,this},setFaces:function(h,u,f){return h===void 0&&(h=!0),u===void 0&&(u=!0),f===void 0&&(f=!0),this.showTop=h,this.showLeft=u,this.showRight=f,this},setFillStyle:function(h,u,f){return this.fillTop=h,this.fillLeft=u,this.fillRight=f,this.isFilled=!0,this}});n.exports=c},79590:(n,a,s)=>{var o=s(65960),d=s(20926),l=function(c,h,u,f){u.addToRenderList(h);var p=c.currentContext;if(d(c,p,h,u,f)&&h.isFilled){var m=h.width,g=h.height,v=m/2,y=m/h.projection,x=h.isReversed;h.showTop&&x&&(o(p,h,h.fillTop),p.beginPath(),p.moveTo(-v,-g),p.lineTo(0,-y-g),p.lineTo(v,-g),p.lineTo(0,y-g),p.fill()),h.showLeft&&(o(p,h,h.fillLeft),p.beginPath(),x?(p.moveTo(-v,-g),p.lineTo(0,y),p.lineTo(0,y-g)):(p.moveTo(-v,0),p.lineTo(0,y),p.lineTo(0,y-g)),p.fill()),h.showRight&&(o(p,h,h.fillRight),p.beginPath(),x?(p.moveTo(v,-g),p.lineTo(0,y),p.lineTo(0,y-g)):(p.moveTo(v,0),p.lineTo(0,y),p.lineTo(0,y-g)),p.fill()),p.restore()}};n.exports=l},49803:(n,a,s)=>{var o=s(39429),d=s(16933);o.register("isotriangle",function(l,c,h,u,f,p,m,g){return this.displayList.add(new d(this.scene,l,c,h,u,f,p,m,g))})},60561:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(51503),l=s(79590),n.exports={renderWebGL:d,renderCanvas:l}},51503:(n,a,s)=>{var o=s(91296),d=s(70554),l=function(c,h,u,f){u.addToRenderList(h);var p=c.pipelines.set(h.pipeline),m=o(h,u,f),g=p.calcMatrix.copyFrom(m.calc),v=h.width,y=h.height,x=v/2,b=v/h.projection,_=h.isReversed,C=u.alpha*h.alpha;if(h.isFilled){c.pipelines.preBatch(h);var w,T,S,E,D,A,M;if(h.showTop&&_){w=d.getTintAppendFloatAlpha(h.fillTop,C),T=g.getX(-x,-y),S=g.getY(-x,-y),E=g.getX(0,-b-y),D=g.getY(0,-b-y),A=g.getX(x,-y),M=g.getY(x,-y);var R=g.getX(0,b-y),L=g.getY(0,b-y);p.batchQuad(h,T,S,E,D,A,M,R,L,0,0,1,1,w,w,w,w,2)}h.showLeft&&(w=d.getTintAppendFloatAlpha(h.fillLeft,C),_?(T=g.getX(-x,-y),S=g.getY(-x,-y),E=g.getX(0,b),D=g.getY(0,b),A=g.getX(0,b-y),M=g.getY(0,b-y)):(T=g.getX(-x,0),S=g.getY(-x,0),E=g.getX(0,b),D=g.getY(0,b),A=g.getX(0,b-y),M=g.getY(0,b-y)),p.batchTri(h,T,S,E,D,A,M,0,0,1,1,w,w,w,2)),h.showRight&&(w=d.getTintAppendFloatAlpha(h.fillRight,C),_?(T=g.getX(x,-y),S=g.getY(x,-y),E=g.getX(0,b),D=g.getY(0,b),A=g.getX(0,b-y),M=g.getY(0,b-y)):(T=g.getX(x,0),S=g.getY(x,0),E=g.getX(0,b),D=g.getY(0,b),A=g.getX(0,b-y),M=g.getY(0,b-y)),p.batchTri(h,T,S,E,D,A,M,0,0,1,1,w,w,w,2)),c.pipelines.postBatch(h)}};n.exports=l},57847:(n,a,s)=>{var o=s(83419),d=s(17803),l=s(23031),c=s(36823),h=new o({Extends:d,Mixins:[c],initialize:function(f,p,m,g,v,y,x,b,_){p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=0),y===void 0&&(y=128),x===void 0&&(x=0),d.call(this,f,"Line",new l(g,v,y,x));var C=Math.max(1,this.geom.right-this.geom.left),w=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(p,m),this.setSize(C,w),b!==void 0&&this.setStrokeStyle(1,b,_),this.updateDisplayOrigin()},setLineWidth:function(u,f){return f===void 0&&(f=u),this._startWidth=u,this._endWidth=f,this.lineWidth=u,this},setTo:function(u,f,p,m){return this.geom.setTo(u,f,p,m),this}});n.exports=h},17440:(n,a,s)=>{var o=s(75177),d=s(20926),l=function(c,h,u,f){u.addToRenderList(h);var p=c.currentContext;if(d(c,p,h,u,f)){var m=h._displayOriginX,g=h._displayOriginY;h.isStroked&&(o(p,h),p.beginPath(),p.moveTo(h.geom.x1-m,h.geom.y1-g),p.lineTo(h.geom.x2-m,h.geom.y2-g),p.stroke()),p.restore()}};n.exports=l},2481:(n,a,s)=>{var o=s(39429),d=s(57847);o.register("line",function(l,c,h,u,f,p,m,g){return this.displayList.add(new d(this.scene,l,c,h,u,f,p,m,g))})},36823:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(77385),l=s(17440),n.exports={renderWebGL:d,renderCanvas:l}},77385:(n,a,s)=>{var o=s(91296),d=s(70554),l=function(c,h,u,f){u.addToRenderList(h);var p=c.pipelines.set(h.pipeline),m=o(h,u,f);p.calcMatrix.copyFrom(m.calc);var g=h._displayOriginX,v=h._displayOriginY,y=u.alpha*h.alpha;if(c.pipelines.preBatch(h),h.isStroked){var x=p.strokeTint,b=d.getTintAppendFloatAlpha(h.strokeColor,h.strokeAlpha*y);x.TL=b,x.TR=b,x.BL=b,x.BR=b,p.batchLine(h.geom.x1-g,h.geom.y1-v,h.geom.x2-g,h.geom.y2-v,h._startWidth/2,h._endWidth/2,1,0,!1,m.sprite,m.camera)}c.pipelines.postBatch(h)};n.exports=l},24949:(n,a,s)=>{var o=s(90273),d=s(83419),l=s(94811),c=s(13829),h=s(25717),u=s(17803),f=s(5469),p=new d({Extends:u,Mixins:[o],initialize:function(g,v,y,x,b,_){v===void 0&&(v=0),y===void 0&&(y=0),u.call(this,g,"Polygon",new h(x));var C=c(this.geom);this.setPosition(v,y),this.setSize(C.width,C.height),b!==void 0&&this.setFillStyle(b,_),this.updateDisplayOrigin(),this.updateData()},smooth:function(m){m===void 0&&(m=1);for(var g=0;g{var o=s(65960),d=s(75177),l=s(20926),c=function(h,u,f,p){f.addToRenderList(u);var m=h.currentContext;if(l(h,m,u,f,p)){var g=u._displayOriginX,v=u._displayOriginY,y=u.pathData,x=y.length-1,b=y[0]-g,_=y[1]-v;m.beginPath(),m.moveTo(b,_),u.closePath||(x-=2);for(var C=2;C{var o=s(39429),d=s(24949);o.register("polygon",function(l,c,h,u,f){return this.displayList.add(new d(this.scene,l,c,h,u,f))})},90273:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(73695),l=s(38710),n.exports={renderWebGL:d,renderCanvas:l}},73695:(n,a,s)=>{var o=s(10441),d=s(91296),l=s(34682),c=function(h,u,f,p){f.addToRenderList(u);var m=h.pipelines.set(u.pipeline),g=d(u,f,p),v=m.calcMatrix.copyFrom(g.calc),y=u._displayOriginX,x=u._displayOriginY,b=f.alpha*u.alpha;h.pipelines.preBatch(u),u.isFilled&&o(m,v,u,b,y,x),u.isStroked&&l(m,u,b,y,x),h.pipelines.postBatch(u)};n.exports=c},74561:(n,a,s)=>{var o=s(83419),d=s(87841),l=s(17803),c=s(95597),h=new o({Extends:l,Mixins:[c],initialize:function(f,p,m,g,v,y,x){p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=128),v===void 0&&(v=128),l.call(this,f,"Rectangle",new d(0,0,g,v)),this.setPosition(p,m),this.setSize(g,v),y!==void 0&&this.setFillStyle(y,x),this.updateDisplayOrigin(),this.updateData()},setSize:function(u,f){this.width=u,this.height=f,this.geom.setSize(u,f),this.updateData(),this.updateDisplayOrigin();var p=this.input;return p&&!p.customHitArea&&(p.hitArea.width=u,p.hitArea.height=f),this},updateData:function(){var u=[],f=this.geom,p=this._tempLine;return f.getLineA(p),u.push(p.x1,p.y1,p.x2,p.y2),f.getLineB(p),u.push(p.x2,p.y2),f.getLineC(p),u.push(p.x2,p.y2),f.getLineD(p),u.push(p.x2,p.y2),this.pathData=u,this}});n.exports=h},48682:(n,a,s)=>{var o=s(65960),d=s(75177),l=s(20926),c=function(h,u,f,p){f.addToRenderList(u);var m=h.currentContext;if(l(h,m,u,f,p)){var g=u._displayOriginX,v=u._displayOriginY;u.isFilled&&(o(m,u),m.fillRect(-g,-v,u.width,u.height)),u.isStroked&&(d(m,u),m.beginPath(),m.rect(-g,-v,u.width,u.height),m.stroke()),m.restore()}};n.exports=c},87959:(n,a,s)=>{var o=s(39429),d=s(74561);o.register("rectangle",function(l,c,h,u,f,p){return this.displayList.add(new d(this.scene,l,c,h,u,f,p))})},95597:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(52059),l=s(48682),n.exports={renderWebGL:d,renderCanvas:l}},52059:(n,a,s)=>{var o=s(91296),d=s(34682),l=s(70554),c=function(h,u,f,p){f.addToRenderList(u);var m=h.pipelines.set(u.pipeline),g=o(u,f,p);m.calcMatrix.copyFrom(g.calc);var v=u._displayOriginX,y=u._displayOriginY,x=f.alpha*u.alpha;if(h.pipelines.preBatch(u),u.isFilled){var b=m.fillTint,_=l.getTintAppendFloatAlpha(u.fillColor,u.fillAlpha*x);b.TL=_,b.TR=_,b.BL=_,b.BR=_,m.batchFillRect(-v,-y,u.width,u.height)}u.isStroked&&d(m,u,x,v,y),h.pipelines.postBatch(u)};n.exports=c},55911:(n,a,s)=>{var o=s(81991),d=s(83419),l=s(94811),c=s(17803),h=new d({Extends:c,Mixins:[o],initialize:function(f,p,m,g,v,y,x,b){p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=5),v===void 0&&(v=32),y===void 0&&(y=64),c.call(this,f,"Star",null),this._points=g,this._innerRadius=v,this._outerRadius=y,this.setPosition(p,m),this.setSize(y*2,y*2),x!==void 0&&this.setFillStyle(x,b),this.updateDisplayOrigin(),this.updateData()},setPoints:function(u){return this._points=u,this.updateData()},setInnerRadius:function(u){return this._innerRadius=u,this.updateData()},setOuterRadius:function(u){return this._outerRadius=u,this.updateData()},points:{get:function(){return this._points},set:function(u){this._points=u,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(u){this._innerRadius=u,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(u){this._outerRadius=u,this.updateData()}},updateData:function(){var u=[],f=this._points,p=this._innerRadius,m=this._outerRadius,g=Math.PI/2*3,v=Math.PI/f,y=m,x=m;u.push(y,x+-m);for(var b=0;b{var o=s(65960),d=s(75177),l=s(20926),c=function(h,u,f,p){f.addToRenderList(u);var m=h.currentContext;if(l(h,m,u,f,p)){var g=u._displayOriginX,v=u._displayOriginY,y=u.pathData,x=y.length-1,b=y[0]-g,_=y[1]-v;m.beginPath(),m.moveTo(b,_),u.closePath||(x-=2);for(var C=2;C{var o=s(55911),d=s(39429);d.register("star",function(l,c,h,u,f,p,m){return this.displayList.add(new o(this.scene,l,c,h,u,f,p,m))})},81991:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(57017),l=s(64272),n.exports={renderWebGL:d,renderCanvas:l}},57017:(n,a,s)=>{var o=s(10441),d=s(91296),l=s(34682),c=function(h,u,f,p){f.addToRenderList(u);var m=h.pipelines.set(u.pipeline),g=d(u,f,p),v=m.calcMatrix.copyFrom(g.calc),y=u._displayOriginX,x=u._displayOriginY,b=f.alpha*u.alpha;h.pipelines.preBatch(u),u.isFilled&&o(m,v,u,b,y,x),u.isStroked&&l(m,u,b,y,x),h.pipelines.postBatch(u)};n.exports=c},36931:(n,a,s)=>{var o=s(83419),d=s(17803),l=s(16483),c=s(96195),h=new o({Extends:d,Mixins:[c],initialize:function(f,p,m,g,v,y,x,b,_,C,w){p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=128),y===void 0&&(y=64),x===void 0&&(x=0),b===void 0&&(b=128),_===void 0&&(_=128),d.call(this,f,"Triangle",new l(g,v,y,x,b,_));var T=this.geom.right-this.geom.left,S=this.geom.bottom-this.geom.top;this.setPosition(p,m),this.setSize(T,S),C!==void 0&&this.setFillStyle(C,w),this.updateDisplayOrigin(),this.updateData()},setTo:function(u,f,p,m,g,v){return this.geom.setTo(u,f,p,m,g,v),this.updateData()},updateData:function(){var u=[],f=this.geom,p=this._tempLine;return f.getLineA(p),u.push(p.x1,p.y1,p.x2,p.y2),f.getLineB(p),u.push(p.x2,p.y2),f.getLineC(p),u.push(p.x2,p.y2),this.pathData=u,this}});n.exports=h},85172:(n,a,s)=>{var o=s(65960),d=s(75177),l=s(20926),c=function(h,u,f,p){f.addToRenderList(u);var m=h.currentContext;if(l(h,m,u,f,p)){var g=u._displayOriginX,v=u._displayOriginY,y=u.geom.x1-g,x=u.geom.y1-v,b=u.geom.x2-g,_=u.geom.y2-v,C=u.geom.x3-g,w=u.geom.y3-v;m.beginPath(),m.moveTo(y,x),m.lineTo(b,_),m.lineTo(C,w),m.closePath(),u.isFilled&&(o(m,u),m.fill()),u.isStroked&&(d(m,u),m.stroke()),m.restore()}};n.exports=c},45245:(n,a,s)=>{var o=s(39429),d=s(36931);o.register("triangle",function(l,c,h,u,f,p,m,g,v,y){return this.displayList.add(new d(this.scene,l,c,h,u,f,p,m,g,v,y))})},96195:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(83253),l=s(85172),n.exports={renderWebGL:d,renderCanvas:l}},83253:(n,a,s)=>{var o=s(91296),d=s(34682),l=s(70554),c=function(h,u,f,p){f.addToRenderList(u);var m=h.pipelines.set(u.pipeline),g=o(u,f,p);m.calcMatrix.copyFrom(g.calc);var v=u._displayOriginX,y=u._displayOriginY,x=f.alpha*u.alpha;if(h.pipelines.preBatch(u),u.isFilled){var b=m.fillTint,_=l.getTintAppendFloatAlpha(u.fillColor,u.fillAlpha*x);b.TL=_,b.TR=_,b.BL=_,b.BR=_;var C=u.geom.x1-v,w=u.geom.y1-y,T=u.geom.x2-v,S=u.geom.y2-y,E=u.geom.x3-v,D=u.geom.y3-y;m.batchFillTriangle(C,w,T,S,E,D,g.sprite,g.camera)}u.isStroked&&d(m,u,x,v,y),h.pipelines.postBatch(u)};n.exports=c},68287:(n,a,s)=>{var o=s(9674),d=s(83419),l=s(31401),c=s(95643),h=s(92751),u=new d({Extends:c,Mixins:[l.Alpha,l.BlendMode,l.Depth,l.Flip,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.ScrollFactor,l.Size,l.TextureCrop,l.Tint,l.Transform,l.Visible,h],initialize:function(p,m,g,v,y){c.call(this,p,"Sprite"),this._crop=this.resetCropObject(),this.anims=new o(this),this.setTexture(v,y),this.setPosition(m,g),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(f,p){this.anims.update(f,p)},play:function(f,p){return this.anims.play(f,p)},playReverse:function(f,p){return this.anims.playReverse(f,p)},playAfterDelay:function(f,p){return this.anims.playAfterDelay(f,p)},playAfterRepeat:function(f,p){return this.anims.playAfterRepeat(f,p)},chain:function(f){return this.anims.chain(f)},stop:function(){return this.anims.stop()},stopAfterDelay:function(f){return this.anims.stopAfterDelay(f)},stopAfterRepeat:function(f){return this.anims.stopAfterRepeat(f)},stopOnFrame:function(f){return this.anims.stopOnFrame(f)},toJSON:function(){return l.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});n.exports=u},76552:n=>{var a=function(s,o,d,l){d.addToRenderList(o),s.batchSprite(o,o.frame,d,l)};n.exports=a},15567:(n,a,s)=>{var o=s(25305),d=s(13059),l=s(44603),c=s(23568),h=s(68287);l.register("sprite",function(u,f){u===void 0&&(u={});var p=c(u,"key",null),m=c(u,"frame",null),g=new h(this.scene,0,0,p,m);return f!==void 0&&(u.add=f),o(this.scene,g,u),d(g,u),g})},46409:(n,a,s)=>{var o=s(39429),d=s(68287);o.register("sprite",function(l,c,h,u){return this.displayList.add(new d(this.scene,l,c,h,u))})},92751:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(9409),l=s(76552),n.exports={renderWebGL:d,renderCanvas:l}},9409:n=>{var a=function(s,o,d,l){d.addToRenderList(o),o.pipeline.batchSprite(o,d,l)};n.exports=a},14220:n=>{var a=function(s,o,d){var l=s.canvas,c=s.context,h=s.style,u=[],f=0,p=d.length;h.maxLines>0&&h.maxLines1&&(v+=m*(y.length-1))}h.wordWrap&&(v-=c.measureText(" ").width),u[g]=Math.ceil(v),f=Math.max(f,u[g])}var b=o.fontSize+h.strokeThickness,_=b*p,C=s.lineSpacing;return p>1&&(_+=C*(p-1)),{width:f,height:_,lines:p,lineWidths:u,lineSpacing:C,lineHeight:b}};n.exports=a},79557:(n,a,s)=>{var o=s(27919),d=function(l){var c=o.create(this),h=c.getContext("2d",{willReadFrequently:!0});l.syncFont(c,h);var u=h.measureText(l.testString);if("actualBoundingBoxAscent"in u){var f=u.actualBoundingBoxAscent,p=u.actualBoundingBoxDescent;return o.remove(c),{ascent:f,descent:p,fontSize:f+p}}var m=Math.ceil(u.width*l.baselineX),g=m,v=2*g;g=g*l.baselineY|0,c.width=m,c.height=v,h.fillStyle="#f00",h.fillRect(0,0,m,v),h.font=l._font,h.textBaseline="alphabetic",h.fillStyle="#000",h.fillText(l.testString,0,g);var y={ascent:0,descent:0,fontSize:0},x=h.getImageData(0,0,m,v);if(!x)return y.ascent=g,y.descent=g+6,y.fontSize=y.ascent+y.descent,o.remove(c),y;var b=x.data,_=b.length,C=m*4,w,T,S=0,E=!1;for(w=0;wg;w--){for(T=0;T{var o=s(40366),d=s(27919),l=s(83419),c=s(31401),h=s(95643),u=s(14220),f=s(35154),p=s(35846),m=s(61771),g=s(35762),v=s(45650),y=new l({Extends:h,Mixins:[c.Alpha,c.BlendMode,c.ComputedSize,c.Crop,c.Depth,c.Flip,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Tint,c.Transform,c.Visible,m],initialize:function(b,_,C,w,T){_===void 0&&(_=0),C===void 0&&(C=0),h.call(this,b,"Text"),this.renderer=b.sys.renderer,this.setPosition(_,C),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=d.create(this),this.context,this.style=new g(this,T),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=v(),this.texture=b.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(w),T&&T.padding&&this.setPadding(T.padding),T&&T.lineSpacing&&this.setLineSpacing(T.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",o(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(x){var b=this.style;if(b.wordWrapCallback){var _=b.wordWrapCallback.call(b.wordWrapCallbackScope,x,this);return Array.isArray(_)&&(_=_.join(` +`)),_}else return b.wordWrapWidth?b.wordWrapUseAdvanced?this.advancedWordWrap(x,this.context,this.style.wordWrapWidth):this.basicWordWrap(x,this.context,this.style.wordWrapWidth):x},advancedWordWrap:function(x,b,_){for(var C="",w=x.replace(/ +/gi," ").split(this.splitRegExp),T=w.length,S=0;SM){if(L===0){for(var H=O;H.length&&(H=H.slice(0,-1),N=b.measureText(H).width,!(N<=M)););if(!H.length)throw new Error("wordWrapWidth < a single character");var X=I.substr(H.length);R[L]=X,D+=H}var V=R[L].length?L:L+1,z=R.slice(V).join(" ").replace(/[ \n]*$/gi,"");w.splice(S+1,0,z),T=w.length;break}else D+=O,M-=N}C+=D.replace(/[ \n]*$/gi,"")+` +`}return C=C.replace(/[\s|\n]*$/gi,""),C},basicWordWrap:function(x,b,_){for(var C="",w=x.split(this.splitRegExp),T=w.length-1,S=b.measureText(" ").width,E=0;E<=T;E++){for(var D=_,A=w[E].split(" "),M=A.length-1,R=0;R<=M;R++){var L=A[R],I=b.measureText(L).width,O=I;RD&&R>0&&(C+=` +`,D=_),C+=L,R0&&(I+=E.lineSpacing*O),_.rtl)L=M-L-D.left-D.right;else if(_.align==="right")L+=A-E.lineWidths[O];else if(_.align==="center")L+=(A-E.lineWidths[O])/2;else if(_.align==="justify"){var N=.85;if(E.lineWidths[O]/E.width>=N){var H=E.width-E.lineWidths[O],X=b.measureText(" ").width,V=S[O].trim(),z=V.split(" ");H+=(S[O].length-V.length)*X;for(var F=Math.floor(H/X),k=0;F>0;)z[k]+=" ",k=(k+1)%(z.length-1||1),--F;S[O]=z.join(" ")}}this.autoRound&&(L=Math.round(L),I=Math.round(I));var G=this.letterSpacing;if(_.strokeThickness&&G===0&&(_.syncShadow(b,_.shadowStroke),b.strokeText(S[O],L,I)),_.color)if(_.syncShadow(b,_.shadowFill),G!==0)for(var Z=0,J=S[O].split(""),W=0;W{var a=function(s,o,d,l){o.width===0||o.height===0||(d.addToRenderList(o),s.batchSprite(o,o.frame,d,l))};n.exports=a},71259:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(50171);d.register("text",function(h,u){h===void 0&&(h={});var f=l(h,"text",""),p=l(h,"style",null),m=l(h,"padding",null);m!==null&&(p.padding=m);var g=new c(this.scene,0,0,f,p);return u!==void 0&&(h.add=u),o(this.scene,g,h),g.autoRound=l(h,"autoRound",!0),g.resolution=l(h,"resolution",1),g})},68005:(n,a,s)=>{var o=s(50171),d=s(39429);d.register("text",function(l,c,h,u){return this.displayList.add(new o(this.scene,l,c,h,u))})},61771:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(34397),l=s(79724),n.exports={renderWebGL:d,renderCanvas:l}},35762:(n,a,s)=>{var o=s(83419),d=s(23568),l=s(35154),c=s(79557),h={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|M\xC3\u2030qgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},u=new o({initialize:function(p,m){this.parent=p,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(m,!1,!0)},setStyle:function(f,p,m){p===void 0&&(p=!0),m===void 0&&(m=!1);for(var g in h){var v=m?h[g][1]:this[g];g==="wordWrapCallback"||g==="wordWrapCallbackScope"?this[g]=l(f,h[g][0],v):f&&g==="fontSize"&&typeof f.fontSize=="number"?this[g]=f.fontSize.toString()+"px":this[g]=d(f,h[g][0],v)}var y=l(f,"font",null);y!==null&&this.setFont(y,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var x=l(f,"fill",null);x!==null&&(this.color=x);var b=l(f,"metrics",!1);return b?this.metrics={ascent:l(b,"ascent",0),descent:l(b,"descent",0),fontSize:l(b,"fontSize",0)}:(p||!this.metrics)&&(this.metrics=c(this)),p?this.parent.updateText():this.parent},syncFont:function(f,p){p.font=this._font},syncStyle:function(f,p){p.textBaseline="alphabetic",p.fillStyle=this.color,p.strokeStyle=this.stroke,p.lineWidth=this.strokeThickness,p.lineCap="round",p.lineJoin="round"},syncShadow:function(f,p){p?(f.shadowOffsetX=this.shadowOffsetX,f.shadowOffsetY=this.shadowOffsetY,f.shadowColor=this.shadowColor,f.shadowBlur=this.shadowBlur):(f.shadowOffsetX=0,f.shadowOffsetY=0,f.shadowColor=0,f.shadowBlur=0)},update:function(f){return f&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=c(this)),this.parent.updateText()},setFont:function(f,p){p===void 0&&(p=!0);var m=f,g="",v="";if(typeof f!="string")m=l(f,"fontFamily","Courier"),g=l(f,"fontSize","16px"),v=l(f,"fontStyle","");else{var y=f.split(" "),x=0;v=y.length>2?y[x++]:"",g=y[x++]||"16px",m=y[x++]||"Courier"}return(m!==this.fontFamily||g!==this.fontSize||v!==this.fontStyle)&&(this.fontFamily=m,this.fontSize=g,this.fontStyle=v,p&&this.update(!0)),this.parent},setFontFamily:function(f){return this.fontFamily!==f&&(this.fontFamily=f,this.update(!0)),this.parent},setFontStyle:function(f){return this.fontStyle!==f&&(this.fontStyle=f,this.update(!0)),this.parent},setFontSize:function(f){return typeof f=="number"&&(f=f.toString()+"px"),this.fontSize!==f&&(this.fontSize=f,this.update(!0)),this.parent},setTestString:function(f){return this.testString=f,this.update(!0)},setFixedSize:function(f,p){return this.fixedWidth=f,this.fixedHeight=p,f&&(this.parent.width=f),p&&(this.parent.height=p),this.update(!1)},setBackgroundColor:function(f){return this.backgroundColor=f,this.update(!1)},setFill:function(f){return this.color=f,this.update(!1)},setColor:function(f){return this.color=f,this.update(!1)},setResolution:function(f){return this.resolution=f,this.update(!1)},setStroke:function(f,p){return p===void 0&&(p=this.strokeThickness),f===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==f||this.strokeThickness!==p)&&(this.stroke=f,this.strokeThickness=p,this.update(!0)),this.parent},setShadow:function(f,p,m,g,v,y){return f===void 0&&(f=0),p===void 0&&(p=0),m===void 0&&(m="#000"),g===void 0&&(g=0),v===void 0&&(v=!1),y===void 0&&(y=!0),this.shadowOffsetX=f,this.shadowOffsetY=p,this.shadowColor=m,this.shadowBlur=g,this.shadowStroke=v,this.shadowFill=y,this.update(!1)},setShadowOffset:function(f,p){return f===void 0&&(f=0),p===void 0&&(p=f),this.shadowOffsetX=f,this.shadowOffsetY=p,this.update(!1)},setShadowColor:function(f){return f===void 0&&(f="#000"),this.shadowColor=f,this.update(!1)},setShadowBlur:function(f){return f===void 0&&(f=0),this.shadowBlur=f,this.update(!1)},setShadowStroke:function(f){return this.shadowStroke=f,this.update(!1)},setShadowFill:function(f){return this.shadowFill=f,this.update(!1)},setWordWrapWidth:function(f,p){return p===void 0&&(p=!1),this.wordWrapWidth=f,this.wordWrapUseAdvanced=p,this.update(!1)},setWordWrapCallback:function(f,p){return p===void 0&&(p=null),this.wordWrapCallback=f,this.wordWrapCallbackScope=p,this.update(!1)},setAlign:function(f){return f===void 0&&(f="left"),this.align=f,this.update(!1)},setMaxLines:function(f){return f===void 0&&(f=0),this.maxLines=f,this.update(!1)},getTextMetrics:function(){var f=this.metrics;return{ascent:f.ascent,descent:f.descent,fontSize:f.fontSize}},toJSON:function(){var f={};for(var p in h)f[p]=this[p];return f.metrics=this.getTextMetrics(),f},destroy:function(){this.parent=void 0}});n.exports=u},34397:(n,a,s)=>{var o=s(70554),d=function(l,c,h,u){if(!(c.width===0||c.height===0)){h.addToRenderList(c);var f=c.frame,p=f.width,m=f.height,g=o.getTintAppendFloatAlpha,v=l.pipelines.set(c.pipeline,c),y=v.setTexture2D(f.glTexture,c);v.batchTexture(c,f.glTexture,p,m,c.x,c.y,p/c.style.resolution,m/c.style.resolution,c.scaleX,c.scaleY,c.rotation,c.flipX,c.flipY,c.scrollFactorX,c.scrollFactorY,c.displayOriginX,c.displayOriginY,0,0,p,m,g(c.tintTopLeft,h.alpha*c._alphaTL),g(c.tintTopRight,h.alpha*c._alphaTR),g(c.tintBottomLeft,h.alpha*c._alphaBL),g(c.tintBottomRight,h.alpha*c._alphaBR),c.tintFill,0,0,h,u,!1,y)}};n.exports=d},20839:(n,a,s)=>{var o=s(27919),d=s(83419),l=s(31401),c=s(95643),h=s(98439),u=s(68703),f=s(56295),p=s(45650),m=s(26099),g=8,v=new d({Extends:c,Mixins:[l.Alpha,l.BlendMode,l.ComputedSize,l.Crop,l.Depth,l.Flip,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.ScrollFactor,l.Tint,l.Transform,l.Visible,f],initialize:function(x,b,_,C,w,T,S){var E=x.sys.renderer;c.call(this,x,"TileSprite");var D=x.sys.textures.get(T),A=D.get(S);A.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),D=x.sys.textures.get("__MISSING"),A=D.get()),D.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),D=x.sys.textures.get("__MISSING"),A=D.get()),!C||!w?(C=C||A.width,w=w||A.height):(C=Math.floor(C),w=Math.floor(w)),this._tilePosition=new m,this._tileScale=new m(1,1),this.dirty=!1,this.renderer=E,this.canvas=o.create(this,C,w),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=D,this.displayFrame=A,this._crop=this.resetCropObject(),this._textureKey=p(),this.texture=x.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=h(A.width),this.potHeight=h(A.height),this.fillCanvas=o.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(b,_),this.setSize(C,w),this.setFrame(S),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(y,x){return this.displayTexture=this.scene.sys.textures.get(y),this.setFrame(x)},setFrame:function(y){var x=this.displayTexture.get(y);return this.potWidth=h(x.width),this.potHeight=h(x.height),this.canvas.width=0,!x.cutWidth||!x.cutHeight?this.renderFlags&=~g:this.renderFlags|=g,this.displayFrame=x,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(y,x){return y!==void 0&&(this.tilePositionX=y),x!==void 0&&(this.tilePositionY=x),this},setTileScale:function(y,x){return y===void 0&&(y=this.tileScaleX),x===void 0&&(x=y),this.tileScaleX=y,this.tileScaleY=x,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var y=this.displayFrame;if(y.source.isRenderTexture||y.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var x=this.fillContext,b=this.fillCanvas,_=this.potWidth,C=this.potHeight;(!this.renderer||!this.renderer.gl)&&(_=y.cutWidth,C=y.cutHeight),x.clearRect(0,0,_,C),b.width=_,b.height=C,x.drawImage(y.source.image,y.cutX,y.cutY,y.cutWidth,y.cutHeight,0,0,_,C),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(b,this.fillPattern):this.fillPattern=x.createPattern(b,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var y=this.canvas;if((y.width!==this.width||y.height!==this.height)&&(y.width=this.width,y.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var x=this.context;this.scene.sys.game.config.antialias||u.disable(x);var b=this._tileScale.x,_=this._tileScale.y,C=this._tilePosition.x,w=this._tilePosition.y;x.clearRect(0,0,this.width,this.height),x.save(),x.scale(b,_),x.translate(-C,-w),x.fillStyle=this.fillPattern,x.fillRect(C,w,this.width/b,this.height/_),x.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),o.remove(this.canvas),o.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var y=this.texture;y&&y.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(y){this._tilePosition.x=y,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(y){this._tilePosition.y=y,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(y){this._tileScale.x=y,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(y){this._tileScale.y=y,this.dirty=!0}}});n.exports=v},46992:n=>{var a=function(s,o,d,l){o.updateCanvas(),d.addToRenderList(o),s.batchSprite(o,o.frame,d,l)};n.exports=a},14167:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(20839);d.register("tileSprite",function(h,u){h===void 0&&(h={});var f=l(h,"x",0),p=l(h,"y",0),m=l(h,"width",512),g=l(h,"height",512),v=l(h,"key",""),y=l(h,"frame",""),x=new c(this.scene,f,p,m,g,v,y);return u!==void 0&&(h.add=u),o(this.scene,x,h),x})},91681:(n,a,s)=>{var o=s(20839),d=s(39429);d.register("tileSprite",function(l,c,h,u,f,p){return this.displayList.add(new o(this.scene,l,c,h,u,f,p))})},56295:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(18553),l=s(46992),n.exports={renderWebGL:d,renderCanvas:l}},18553:(n,a,s)=>{var o=s(70554),d=function(l,c,h,u){c.updateCanvas();var f=c.width,p=c.height;if(!(f===0||p===0)){h.addToRenderList(c);var m=o.getTintAppendFloatAlpha,g=l.pipelines.set(c.pipeline,c),v=g.setTexture2D(c.fillPattern,c);g.batchTexture(c,c.fillPattern,c.displayFrame.width*c.tileScaleX,c.displayFrame.height*c.tileScaleY,c.x,c.y,f,p,c.scaleX,c.scaleY,c.rotation,c.flipX,c.flipY,c.scrollFactorX,c.scrollFactorY,c.originX*f,c.originY*p,0,0,f,p,m(c.tintTopLeft,h.alpha*c._alphaTL),m(c.tintTopRight,h.alpha*c._alphaTR),m(c.tintBottomLeft,h.alpha*c._alphaBL),m(c.tintBottomRight,h.alpha*c._alphaBR),c.tintFill,c.tilePositionX%c.displayFrame.width/c.displayFrame.width,c.tilePositionY%c.displayFrame.height/c.displayFrame.height,h,u,!1,v)}};n.exports=d},18471:(n,a,s)=>{var o=s(45319),d=s(83419),l=s(31401),c=s(51708),h=s(8443),u=s(95643),f=s(36383),p=s(14463),m=s(45650),g=s(10247),v=new d({Extends:u,Mixins:[l.Alpha,l.BlendMode,l.ComputedSize,l.Depth,l.Flip,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.ScrollFactor,l.TextureCrop,l.Tint,l.Transform,l.Visible,g],initialize:function(x,b,_,C){u.call(this,x,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=m(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._getFrame=!1,this._rfvCallbackId=0;var w=x.sys.game;this._device=w.device.video,this.setPosition(b,_),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),w.events.on(h.PAUSE,this.globalPause,this),w.events.on(h.RESUME,this.globalResume,this);var T=x.sys.sound;T&&T.on(p.GLOBAL_MUTE,this.globalMute,this),C&&this.load(C)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(y){var x=this.scene.sys.cache.video.get(y);return x?(this.cacheKey=y,this.loadHandler(x.url,x.noAudio,x.crossOrigin)):console.warn("No video in cache for key: "+y),this},changeSource:function(y,x,b,_,C){x===void 0&&(x=!0),b===void 0&&(b=!1),this.cacheKey!==y&&(this.load(y),x&&this.play(b,_,C))},getVideoKey:function(){return this.cacheKey},loadURL:function(y,x,b){x===void 0&&(x=!1);var _=this._device.getVideoURL(y);return _?(this.cacheKey="",this.loadHandler(_.url,x,b)):console.warn("No supported video format found for "+y),this},loadMediaStream:function(y,x,b){return this.loadHandler(null,x,b,y)},loadHandler:function(y,x,b,_){x||(x=!1);var C=this.video;if(C?(this.removeLoadEventHandlers(),this.stop()):(C=document.createElement("video"),C.controls=!1,C.setAttribute("playsinline","playsinline"),C.setAttribute("preload","auto"),C.setAttribute("disablePictureInPicture","true")),x?(C.muted=!0,C.defaultMuted=!0,C.setAttribute("autoplay","autoplay")):(C.muted=!1,C.defaultMuted=!1,C.removeAttribute("autoplay")),b?C.setAttribute("crossorigin",b):C.removeAttribute("crossorigin"),_)if("srcObject"in C)try{C.srcObject=_}catch(T){if(T.name!=="TypeError")throw T;C.src=URL.createObjectURL(_)}else C.src=URL.createObjectURL(_);else C.src=y;this.retry=0,this.video=C,this._playCalled=!1,C.load(),this.addLoadEventHandlers();var w=this.scene.sys.textures.get(this._key);return this.setTexture(w),this},requestVideoFrame:function(y,x){var b=this.video;if(b){var _=x.width,C=x.height,w=this.videoTexture,T=this.videoTextureSource,S=!w||T.source!==b;S?(this._codePaused=b.paused,this._codeMuted=b.muted,w?(T.source=b,T.width=_,T.height=C,w.get().setSize(_,C)):(w=this.scene.sys.textures.create(this._key,b,_,C),w.add("__BASE",0,0,0,_,C),this.setTexture(w),this.videoTexture=w,this.videoTextureSource=w.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(c.VIDEO_TEXTURE,this,w)),this.setSizeToFrame(),this.updateDisplayOrigin()):T.update(),this.isStalled=!1,this.metadata=x;var E=x.mediaTime;S&&(this._lastUpdate=E,this.emit(c.VIDEO_CREATED,this,_,C),this.frameReady||(this.frameReady=!0,this.emit(c.VIDEO_PLAY,this))),this._playingMarker?E>=this._markerOut&&(b.loop?(b.currentTime=this._markerIn,this.emit(c.VIDEO_LOOP,this)):(this.stop(!1),this.emit(c.VIDEO_COMPLETE,this))):E-1&&b>x&&b=0&&!isNaN(b)&&b>x&&(this.markers[y]=[x,b]),this},playMarker:function(y,x){var b=this.markers[y];return b&&this.play(x,b[0],b[1]),this},removeMarker:function(y){return delete this.markers[y],this},snapshot:function(y,x){return y===void 0&&(y=this.width),x===void 0&&(x=this.height),this.snapshotArea(0,0,this.width,this.height,y,x)},snapshotArea:function(y,x,b,_,C,w){y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=this.width),_===void 0&&(_=this.height),C===void 0&&(C=b),w===void 0&&(w=_);var T=this.video,S=this.snapshotTexture;return S?(S.setSize(C,w),T&&S.context.drawImage(T,y,x,b,_,0,0,C,w)):(S=this.scene.sys.textures.createCanvas(m(),C,w),this.snapshotTexture=S,T&&S.context.drawImage(T,y,x,b,_,0,0,C,w)),S.update()},saveSnapshotTexture:function(y){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,y):this.snapshotTexture=this.scene.sys.textures.createCanvas(y,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(c.VIDEO_UNLOCKED,this));var y=this.scene.sys.sound;y&&y.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(y){var x=y.name;x==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(c.VIDEO_LOCKED,this)):x==="NotSupportedError"?(this.stop(!1),this.emit(c.VIDEO_UNSUPPORTED,this,y)):(this.stop(!1),this.emit(c.VIDEO_ERROR,this,y))},legacyPlayHandler:function(){var y=this.video;y&&(this.playSuccess(),y.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(c.VIDEO_PLAYING,this)},loadErrorHandler:function(y){this.stop(!1),this.emit(c.VIDEO_ERROR,this,y)},metadataHandler:function(y){this.emit(c.VIDEO_METADATA,this,y)},setSizeToFrame:function(y){y||(y=this.frame),this.width=y.realWidth,this.height=y.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var x=this.input;return x&&!x.customHitArea&&(x.hitArea.width=this.width,x.hitArea.height=this.height),this},stalledHandler:function(y){this.isStalled=!0,this.emit(c.VIDEO_STALLED,this,y)},completeHandler:function(){this._playCalled=!1,this.emit(c.VIDEO_COMPLETE,this)},preUpdate:function(y,x){var b=this.video;!b||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=x,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(y){var x=this.video;if(x){var b=x.duration;if(b!==1/0&&!isNaN(b)){var _=b*y;this.setCurrentTime(_)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(y){var x=this.video;if(x){if(typeof y=="string"){var b=y[0],_=parseFloat(y.substr(1));b==="+"?y=x.currentTime+_:b==="-"&&(y=x.currentTime-_)}x.currentTime=y}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(c.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(c.VIDEO_SEEKED,this)},getProgress:function(){var y=this.video;if(y){var x=y.duration;if(x!==1/0&&!isNaN(x))return y.currentTime/x}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(y){y===void 0&&(y=!0),this._codeMuted=y;var x=this.video;return x&&(x.muted=this._systemMuted?!0:y),this},isMuted:function(){return this._codeMuted},globalMute:function(y,x){this._systemMuted=x;var b=this.video;b&&(b.muted=this._codeMuted?!0:x)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(y){y===void 0&&(y=!0);var x=this.video;return this._codePaused=y,x&&!x.ended&&(y?x.paused||(this.removeEventHandlers(),x.pause()):y||(this._playCalled?x.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(y){return y===void 0&&(y=1),this.video&&(this.video.volume=o(y,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(y){return this.video&&(this.video.playbackRate=y),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(y){return y===void 0&&(y=!0),this.video&&(this.video.loop=y),this},isPlaying:function(){return this.video?!(this.video.paused||this.video.ended):!1},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(y,x){return x===void 0&&(x=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,y),this.videoTextureSource.setFlipY(x)),this._key=y,this.flipY=x,!!this.videoTexture},stop:function(y){y===void 0&&(y=!0);var x=this.video;return x&&(this.removeEventHandlers(),x.cancelVideoFrameCallback(this._rfvCallbackId),x.pause()),this.retry=0,this._playCalled=!1,y&&this.emit(c.VIDEO_STOP,this),this},removeVideoElement:function(){var y=this.video;if(y){for(y.parentNode&&y.parentNode.removeChild(y);y.hasChildNodes();)y.removeChild(y.firstChild);y.removeAttribute("autoplay"),y.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var y=this.scene.sys.game.events;y.off(h.PAUSE,this.globalPause,this),y.off(h.RESUME,this.globalResume,this);var x=this.scene.sys.sound;x&&x.off(p.GLOBAL_MUTE,this.globalMute,this)}});n.exports=v},58352:n=>{var a=function(s,o,d,l){o.videoTexture&&(d.addToRenderList(o),s.batchSprite(o,o.frame,d,l))};n.exports=a},11511:(n,a,s)=>{var o=s(25305),d=s(44603),l=s(23568),c=s(18471);d.register("video",function(h,u){h===void 0&&(h={});var f=l(h,"key",null),p=new c(this.scene,0,0,f);return u!==void 0&&(h.add=u),o(this.scene,p,h),p})},89025:(n,a,s)=>{var o=s(18471),d=s(39429);d.register("video",function(l,c,h){return this.displayList.add(new o(this.scene,l,c,h))})},10247:(n,a,s)=>{var o=s(29747),d=o,l=o;d=s(29849),l=s(58352),n.exports={renderWebGL:d,renderCanvas:l}},29849:n=>{var a=function(s,o,d,l){o.videoTexture&&(d.addToRenderList(o),o.pipeline.batchSprite(o,d,l))};n.exports=a},41481:(n,a,s)=>{var o=s(10312),d=s(96503),l=s(87902),c=s(83419),h=s(31401),u=s(95643),f=s(87841),p=s(37303),m=new c({Extends:u,Mixins:[h.Depth,h.GetBounds,h.Origin,h.Transform,h.ScrollFactor,h.Visible],initialize:function(v,y,x,b,_){b===void 0&&(b=1),_===void 0&&(_=b),u.call(this,v,"Zone"),this.setPosition(y,x),this.width=b,this.height=_,this.blendMode=o.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(g){this.scaleX=g/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(g){this.scaleY=g/this.height}},setSize:function(g,v,y){y===void 0&&(y=!0),this.width=g,this.height=v,this.updateDisplayOrigin();var x=this.input;return y&&x&&!x.customHitArea&&(x.hitArea.width=g,x.hitArea.height=v),this},setDisplaySize:function(g,v){return this.displayWidth=g,this.displayHeight=v,this},setCircleDropZone:function(g){return this.setDropZone(new d(0,0,g),l)},setRectangleDropZone:function(g,v){return this.setDropZone(new f(0,0,g,v),p)},setDropZone:function(g,v){return this.input||this.setInteractive(g,v,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(g,v,y){y.addToRenderList(v)},renderWebGL:function(g,v,y){y.addToRenderList(v)}});n.exports=m},95261:(n,a,s)=>{var o=s(44603),d=s(23568),l=s(41481);o.register("zone",function(c){var h=d(c,"x",0),u=d(c,"y",0),f=d(c,"width",1),p=d(c,"height",f);return new l(this.scene,h,u,f,p)})},84175:(n,a,s)=>{var o=s(41481),d=s(39429);d.register("zone",function(l,c,h,u){return this.displayList.add(new o(this.scene,l,c,h,u))})},95166:n=>{var a=function(s){return s.radius>0?Math.PI*s.radius*s.radius:0};n.exports=a},96503:(n,a,s)=>{var o=s(83419),d=s(87902),l=s(26241),c=s(79124),h=s(23777),u=s(28176),f=new o({initialize:function(m,g,v){m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=0),this.type=h.CIRCLE,this.x=m,this.y=g,this._radius=v,this._diameter=v*2},contains:function(p,m){return d(this,p,m)},getPoint:function(p,m){return l(this,p,m)},getPoints:function(p,m,g){return c(this,p,m,g)},getRandomPoint:function(p){return u(this,p)},setTo:function(p,m,g){return this.x=p,this.y=m,this._radius=g,this._diameter=g*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(p,m){return m===void 0&&(m=p),this.x=p,this.y=m,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(p){this._radius=p,this._diameter=p*2}},diameter:{get:function(){return this._diameter},set:function(p){this._diameter=p,this._radius=p*.5}},left:{get:function(){return this.x-this._radius},set:function(p){this.x=p+this._radius}},right:{get:function(){return this.x+this._radius},set:function(p){this.x=p-this._radius}},top:{get:function(){return this.y-this._radius},set:function(p){this.y=p+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(p){this.y=p-this._radius}}});n.exports=f},71562:n=>{var a=function(s){return 2*(Math.PI*s.radius)};n.exports=a},92110:(n,a,s)=>{var o=s(2141),d=function(l,c,h){return h===void 0&&(h=new o),h.x=l.x+l.radius*Math.cos(c),h.y=l.y+l.radius*Math.sin(c),h};n.exports=d},42250:(n,a,s)=>{var o=s(96503),d=function(l){return new o(l.x,l.y,l.radius)};n.exports=d},87902:n=>{var a=function(s,o,d){if(s.radius>0&&o>=s.left&&o<=s.right&&d>=s.top&&d<=s.bottom){var l=(s.x-o)*(s.x-o),c=(s.y-d)*(s.y-d);return l+c<=s.radius*s.radius}else return!1};n.exports=a},5698:(n,a,s)=>{var o=s(87902),d=function(l,c){return o(l,c.x,c.y)};n.exports=d},70588:(n,a,s)=>{var o=s(87902),d=function(l,c){return o(l,c.x,c.y)&&o(l,c.right,c.y)&&o(l,c.x,c.bottom)&&o(l,c.right,c.bottom)};n.exports=d},26394:n=>{var a=function(s,o){return o.setTo(s.x,s.y,s.radius)};n.exports=a},76278:n=>{var a=function(s,o){return s.x===o.x&&s.y===o.y&&s.radius===o.radius};n.exports=a},2074:(n,a,s)=>{var o=s(87841),d=function(l,c){return c===void 0&&(c=new o),c.x=l.left,c.y=l.top,c.width=l.diameter,c.height=l.diameter,c};n.exports=d},26241:(n,a,s)=>{var o=s(92110),d=s(62945),l=s(36383),c=s(2141),h=function(u,f,p){p===void 0&&(p=new c);var m=d(f,0,l.PI2);return o(u,m,p)};n.exports=h},79124:(n,a,s)=>{var o=s(71562),d=s(92110),l=s(62945),c=s(36383),h=function(u,f,p,m){m===void 0&&(m=[]),!f&&p>0&&(f=o(u)/p);for(var g=0;g{var a=function(s,o,d){return s.x+=o,s.y+=d,s};n.exports=a},39212:n=>{var a=function(s,o){return s.x+=o.x,s.y+=o.y,s};n.exports=a},28176:(n,a,s)=>{var o=s(2141),d=function(l,c){c===void 0&&(c=new o);var h=2*Math.PI*Math.random(),u=Math.random()+Math.random(),f=u>1?2-u:u,p=f*Math.cos(h),m=f*Math.sin(h);return c.x=l.x+p*l.radius,c.y=l.y+m*l.radius,c};n.exports=d},88911:(n,a,s)=>{var o=s(96503);o.Area=s(95166),o.Circumference=s(71562),o.CircumferencePoint=s(92110),o.Clone=s(42250),o.Contains=s(87902),o.ContainsPoint=s(5698),o.ContainsRect=s(70588),o.CopyFrom=s(26394),o.Equals=s(76278),o.GetBounds=s(2074),o.GetPoint=s(26241),o.GetPoints=s(79124),o.Offset=s(50884),o.OffsetPoint=s(39212),o.Random=s(28176),n.exports=o},23777:n=>{var a={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};n.exports=a},78874:n=>{var a=function(s){return s.isEmpty()?0:s.getMajorRadius()*s.getMinorRadius()*Math.PI};n.exports=a},92990:n=>{var a=function(s){var o=s.width/2,d=s.height/2,l=Math.pow(o-d,2)/Math.pow(o+d,2);return Math.PI*(o+d)*(1+3*l/(10+Math.sqrt(4-3*l)))};n.exports=a},79522:(n,a,s)=>{var o=s(2141),d=function(l,c,h){h===void 0&&(h=new o);var u=l.width/2,f=l.height/2;return h.x=l.x+u*Math.cos(c),h.y=l.y+f*Math.sin(c),h};n.exports=d},58102:(n,a,s)=>{var o=s(8497),d=function(l){return new o(l.x,l.y,l.width,l.height)};n.exports=d},81154:n=>{var a=function(s,o,d){if(s.width<=0||s.height<=0)return!1;var l=(o-s.x)/s.width,c=(d-s.y)/s.height;return l*=l,c*=c,l+c<.25};n.exports=a},46662:(n,a,s)=>{var o=s(81154),d=function(l,c){return o(l,c.x,c.y)};n.exports=d},1632:(n,a,s)=>{var o=s(81154),d=function(l,c){return o(l,c.x,c.y)&&o(l,c.right,c.y)&&o(l,c.x,c.bottom)&&o(l,c.right,c.bottom)};n.exports=d},65534:n=>{var a=function(s,o){return o.setTo(s.x,s.y,s.width,s.height)};n.exports=a},8497:(n,a,s)=>{var o=s(83419),d=s(81154),l=s(90549),c=s(48320),h=s(23777),u=s(24820),f=new o({initialize:function(m,g,v,y){m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=0),y===void 0&&(y=0),this.type=h.ELLIPSE,this.x=m,this.y=g,this.width=v,this.height=y},contains:function(p,m){return d(this,p,m)},getPoint:function(p,m){return l(this,p,m)},getPoints:function(p,m,g){return c(this,p,m,g)},getRandomPoint:function(p){return u(this,p)},setTo:function(p,m,g,v){return this.x=p,this.y=m,this.width=g,this.height=v,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(p,m){return m===void 0&&(m=p),this.x=p,this.y=m,this},setSize:function(p,m){return m===void 0&&(m=p),this.width=p,this.height=m,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(p){this.x=p+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(p){this.x=p-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(p){this.y=p+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(p){this.y=p-this.height/2}}});n.exports=f},36146:n=>{var a=function(s,o){return s.x===o.x&&s.y===o.y&&s.width===o.width&&s.height===o.height};n.exports=a},23694:(n,a,s)=>{var o=s(87841),d=function(l,c){return c===void 0&&(c=new o),c.x=l.left,c.y=l.top,c.width=l.width,c.height=l.height,c};n.exports=d},90549:(n,a,s)=>{var o=s(79522),d=s(62945),l=s(36383),c=s(2141),h=function(u,f,p){p===void 0&&(p=new c);var m=d(f,0,l.PI2);return o(u,m,p)};n.exports=h},48320:(n,a,s)=>{var o=s(92990),d=s(79522),l=s(62945),c=s(36383),h=function(u,f,p,m){m===void 0&&(m=[]),!f&&p>0&&(f=o(u)/p);for(var g=0;g{var a=function(s,o,d){return s.x+=o,s.y+=d,s};n.exports=a},44808:n=>{var a=function(s,o){return s.x+=o.x,s.y+=o.y,s};n.exports=a},24820:(n,a,s)=>{var o=s(2141),d=function(l,c){c===void 0&&(c=new o);var h=Math.random()*Math.PI*2,u=Math.sqrt(Math.random());return c.x=l.x+u*Math.cos(h)*l.width/2,c.y=l.y+u*Math.sin(h)*l.height/2,c};n.exports=d},49203:(n,a,s)=>{var o=s(8497);o.Area=s(78874),o.Circumference=s(92990),o.CircumferencePoint=s(79522),o.Clone=s(58102),o.Contains=s(81154),o.ContainsPoint=s(46662),o.ContainsRect=s(1632),o.CopyFrom=s(65534),o.Equals=s(36146),o.GetBounds=s(23694),o.GetPoint=s(90549),o.GetPoints=s(48320),o.Offset=s(73424),o.OffsetPoint=s(44808),o.Random=s(24820),n.exports=o},55738:(n,a,s)=>{var o=s(23777),d=s(79291),l={Circle:s(88911),Ellipse:s(49203),Intersects:s(91865),Line:s(2529),Mesh:s(73090),Point:s(43711),Polygon:s(58423),Rectangle:s(93232),Triangle:s(84435)};l=d(!1,l,o),n.exports=l},2044:(n,a,s)=>{var o=s(20339),d=function(l,c){return o(l.x,l.y,c.x,c.y)<=l.radius+c.radius};n.exports=d},81491:n=>{var a=function(s,o){var d=o.width/2,l=o.height/2,c=Math.abs(s.x-o.x-d),h=Math.abs(s.y-o.y-l),u=d+s.radius,f=l+s.radius;if(c>u||h>f)return!1;if(c<=d||h<=l)return!0;var p=c-d,m=h-l,g=p*p,v=m*m,y=s.radius*s.radius;return g+v<=y};n.exports=a},63376:(n,a,s)=>{var o=s(2141),d=s(2044),l=function(c,h,u){if(u===void 0&&(u=[]),d(c,h)){var f=c.x,p=c.y,m=c.radius,g=h.x,v=h.y,y=h.radius,x,b,_,C,w;if(p===v)w=(y*y-m*m-g*g+f*f)/(2*(f-g)),x=1,b=-2*v,_=g*g+w*w-2*g*w+v*v-y*y,C=b*b-4*x*_,C===0?u.push(new o(w,-b/(2*x))):C>0&&(u.push(new o(w,(-b+Math.sqrt(C))/(2*x))),u.push(new o(w,(-b-Math.sqrt(C))/(2*x))));else{var T=(f-g)/(p-v),S=(y*y-m*m-g*g+f*f-v*v+p*p)/(2*(p-v));x=T*T+1,b=2*p*T-2*S*T-2*f,_=f*f+p*p+S*S-m*m-2*p*S,C=b*b-4*x*_,C===0?(w=-b/(2*x),u.push(new o(w,S-w*T))):C>0&&(w=(-b+Math.sqrt(C))/(2*x),u.push(new o(w,S-w*T)),w=(-b-Math.sqrt(C))/(2*x),u.push(new o(w,S-w*T)))}}return u};n.exports=l},97439:(n,a,s)=>{var o=s(4042),d=s(81491),l=function(c,h,u){if(u===void 0&&(u=[]),d(c,h)){var f=h.getLineA(),p=h.getLineB(),m=h.getLineC(),g=h.getLineD();o(f,c,u),o(p,c,u),o(m,c,u),o(g,c,u)}return u};n.exports=l},4042:(n,a,s)=>{var o=s(2141),d=s(80462),l=function(c,h,u){if(u===void 0&&(u=[]),d(c,h)){var f=c.x1,p=c.y1,m=c.x2,g=c.y2,v=h.x,y=h.y,x=h.radius,b=m-f,_=g-p,C=f-v,w=p-y,T=b*b+_*_,S=2*(b*C+_*w),E=C*C+w*w-x*x,D=S*S-4*T*E,A,M;if(D===0){var R=-S/(2*T);A=f+R*b,M=p+R*_,R>=0&&R<=1&&u.push(new o(A,M))}else if(D>0){var L=(-S-Math.sqrt(D))/(2*T);A=f+L*b,M=p+L*_,L>=0&&L<=1&&u.push(new o(A,M));var I=(-S+Math.sqrt(D))/(2*T);A=f+I*b,M=p+I*_,I>=0&&I<=1&&u.push(new o(A,M))}}return u};n.exports=l},36100:(n,a,s)=>{var o=s(25836),d=function(l,c,h,u){h===void 0&&(h=!1);var f=l.x1,p=l.y1,m=l.x2,g=l.y2,v=c.x1,y=c.y1,x=c.x2,b=c.y2,_=m-f,C=g-p,w=x-v,T=b-y,S=_*T-C*w;if(S===0)return null;var E,D,A;if(h){if(E=(_*(y-p)+C*(f-v))/(w*C-T*_),_!==0)D=(v+w*E-f)/_;else if(C!==0)D=(y+T*E-p)/C;else return null;if(D<0||E<0||E>1)return null;A=D}else{if(E=((v-f)*T-(y-p)*w)/S,D=((p-y)*_-(f-v)*C)/S,E<0||E>1||D<0||D>1)return null;A=E}return u===void 0&&(u=new o),u.set(f+_*A,p+C*A,A)};n.exports=d},3073:(n,a,s)=>{var o=s(36100),d=s(23031),l=s(25836),c=new d,h=new l,u=function(f,p,m,g){m===void 0&&(m=!1),g===void 0&&(g=new l);var v=!1;g.set(),h.set();for(var y=p[p.length-1],x=0;x{var o=s(25836),d=s(61369),l=s(3073),c=new o,h=function(u,f,p,m){m===void 0&&(m=new d),Array.isArray(f)||(f=[f]);var g=!1;m.set(),c.set();for(var v=0;v{var o=s(2141),d=s(76112),l=s(92773),c=function(h,u,f){if(f===void 0&&(f=[]),l(h,u))for(var p=u.getLineA(),m=u.getLineB(),g=u.getLineC(),v=u.getLineD(),y=[new o,new o,new o,new o],x=[d(p,h,y[0]),d(m,h,y[1]),d(g,h,y[2]),d(v,h,y[3])],b=0;b<4;b++)x[b]&&f.push(y[b]);return f};n.exports=c},71147:(n,a,s)=>{var o=s(61369),d=s(56362),l=s(23031),c=new l;function h(p,m,g,v,y){var x=Math.cos(p),b=Math.sin(p);c.setTo(m,g,m+x,g+b);var _=d(c,v,!0);_&&y.push(new o(_.x,_.y,p,_.w))}function u(p,m){return p.z-m.z}var f=function(p,m,g){Array.isArray(g)||(g=[g]);for(var v=[],y=[],x=0;x{var o=s(87841),d=s(59996),l=function(c,h,u){return u===void 0&&(u=new o),d(c,h)&&(u.x=Math.max(c.x,h.x),u.y=Math.max(c.y,h.y),u.width=Math.min(c.right,h.right)-u.x,u.height=Math.min(c.bottom,h.bottom)-u.y),u};n.exports=l},52784:(n,a,s)=>{var o=s(60646),d=s(59996),l=function(c,h,u){if(u===void 0&&(u=[]),d(c,h)){var f=c.getLineA(),p=c.getLineB(),m=c.getLineC(),g=c.getLineD();o(f,h,u),o(p,h,u),o(m,h,u),o(g,h,u)}return u};n.exports=l},26341:(n,a,s)=>{var o=s(89265),d=s(60646),l=function(c,h,u){if(u===void 0&&(u=[]),o(c,h)){var f=h.getLineA(),p=h.getLineB(),m=h.getLineC();d(f,c,u),d(p,c,u),d(m,c,u)}return u};n.exports=l},38720:(n,a,s)=>{var o=s(4042),d=s(67636),l=function(c,h,u){if(u===void 0&&(u=[]),d(c,h)){var f=c.getLineA(),p=c.getLineB(),m=c.getLineC();o(f,h,u),o(p,h,u),o(m,h,u)}return u};n.exports=l},13882:(n,a,s)=>{var o=s(2141),d=s(2822),l=s(76112),c=function(h,u,f){if(f===void 0&&(f=[]),d(h,u))for(var p=h.getLineA(),m=h.getLineB(),g=h.getLineC(),v=[new o,new o,new o],y=[l(p,u,v[0]),l(m,u,v[1]),l(g,u,v[2])],x=0;x<3;x++)y[x]&&f.push(v[x]);return f};n.exports=c},75636:(n,a,s)=>{var o=s(82944),d=s(13882),l=function(c,h,u){if(u===void 0&&(u=[]),o(c,h)){var f=h.getLineA(),p=h.getLineB(),m=h.getLineC();d(c,f,u),d(c,p,u),d(c,m,u)}return u};n.exports=l},80462:(n,a,s)=>{var o=s(87902),d=s(2141),l=new d,c=function(h,u,f){if(f===void 0&&(f=l),o(u,h.x1,h.y1))return f.x=h.x1,f.y=h.y1,!0;if(o(u,h.x2,h.y2))return f.x=h.x2,f.y=h.y2,!0;var p=h.x2-h.x1,m=h.y2-h.y1,g=u.x-h.x1,v=u.y-h.y1,y=p*p+m*m,x=p,b=m;if(y>0){var _=(g*p+v*m)/y;x*=_,b*=_}f.x=h.x1+x,f.y=h.y1+b;var C=x*x+b*b;return C<=y&&x*p+b*m>=0&&o(u,f.x,f.y)};n.exports=c},76112:n=>{var a=function(s,o,d){var l=s.x1,c=s.y1,h=s.x2,u=s.y2,f=o.x1,p=o.y1,m=o.x2,g=o.y2;if(l===h&&c===u||f===m&&p===g)return!1;var v=(g-p)*(h-l)-(m-f)*(u-c);if(v===0)return!1;var y=((m-f)*(c-p)-(g-p)*(l-f))/v,x=((h-l)*(c-p)-(u-c)*(l-f))/v;return y<0||y>1||x<0||x>1?!1:(d&&(d.x=l+y*(h-l),d.y=c+y*(u-c)),!0)};n.exports=a},92773:n=>{var a=function(s,o){var d=s.x1,l=s.y1,c=s.x2,h=s.y2,u=o.x,f=o.y,p=o.right,m=o.bottom,g=0;if(d>=u&&d<=p&&l>=f&&l<=m||c>=u&&c<=p&&h>=f&&h<=m)return!0;if(d=u){if(g=l+(h-l)*(u-d)/(c-d),g>f&&g<=m)return!0}else if(d>p&&c<=p&&(g=l+(h-l)*(p-d)/(c-d),g>=f&&g<=m))return!0;if(l=f){if(g=d+(c-d)*(f-l)/(h-l),g>=u&&g<=p)return!0}else if(l>m&&h<=m&&(g=d+(c-d)*(m-l)/(h-l),g>=u&&g<=p))return!0;return!1};n.exports=a},16204:n=>{var a=function(s,o,d){d===void 0&&(d=1);var l=o.x1,c=o.y1,h=o.x2,u=o.y2,f=s.x,p=s.y,m=(h-l)*(h-l)+(u-c)*(u-c);if(m===0)return!1;var g=((f-l)*(h-l)+(p-c)*(u-c))/m;if(g<0)return Math.sqrt((l-f)*(l-f)+(c-p)*(c-p))<=d;if(g>=0&&g<=1){var v=((c-p)*(h-l)-(l-f)*(u-c))/m;return Math.abs(v)*Math.sqrt(m)<=d}else return Math.sqrt((h-f)*(h-f)+(u-p)*(u-p))<=d};n.exports=a},14199:(n,a,s)=>{var o=s(16204),d=function(l,c){if(!o(l,c))return!1;var h=Math.min(c.x1,c.x2),u=Math.max(c.x1,c.x2),f=Math.min(c.y1,c.y2),p=Math.max(c.y1,c.y2);return l.x>=h&&l.x<=u&&l.y>=f&&l.y<=p};n.exports=d},59996:n=>{var a=function(s,o){return s.width<=0||s.height<=0||o.width<=0||o.height<=0?!1:!(s.righto.right||s.y>o.bottom)};n.exports=a},89265:(n,a,s)=>{var o=s(76112),d=s(37303),l=s(48653),c=s(77493),h=function(u,f){if(f.left>u.right||f.rightu.bottom||f.bottom0};n.exports=h},84411:n=>{var a=function(s,o,d,l,c,h){return h===void 0&&(h=0),!(o>s.right+h||ds.bottom+h||c{var o=s(80462),d=s(10690),l=function(c,h){return c.left>h.right||c.righth.bottom||c.bottom{var o=s(76112),d=function(l,c){return!!(l.contains(c.x1,c.y1)||l.contains(c.x2,c.y2)||o(l.getLineA(),c)||o(l.getLineB(),c)||o(l.getLineC(),c))};n.exports=d},82944:(n,a,s)=>{var o=s(48653),d=s(71694),l=s(76112),c=function(h,u){if(h.left>u.right||h.rightu.bottom||h.bottom0||(x=d(u),b=o(h,x,!0),b.length>0)};n.exports=c},91865:(n,a,s)=>{n.exports={CircleToCircle:s(2044),CircleToRectangle:s(81491),GetCircleToCircle:s(63376),GetCircleToRectangle:s(97439),GetLineToCircle:s(4042),GetLineToLine:s(36100),GetLineToPoints:s(3073),GetLineToPolygon:s(56362),GetLineToRectangle:s(60646),GetRaysFromPointToPolygon:s(71147),GetRectangleIntersection:s(68389),GetRectangleToRectangle:s(52784),GetRectangleToTriangle:s(26341),GetTriangleToCircle:s(38720),GetTriangleToLine:s(13882),GetTriangleToTriangle:s(75636),LineToCircle:s(80462),LineToLine:s(76112),LineToRectangle:s(92773),PointToLine:s(16204),PointToLineSegment:s(14199),RectangleToRectangle:s(59996),RectangleToTriangle:s(89265),RectangleToValues:s(84411),TriangleToCircle:s(67636),TriangleToLine:s(2822),TriangleToTriangle:s(82944)}},91938:n=>{var a=function(s){return Math.atan2(s.y2-s.y1,s.x2-s.x1)};n.exports=a},84993:n=>{var a=function(s,o,d){o===void 0&&(o=1),d===void 0&&(d=[]);var l=Math.round(s.x1),c=Math.round(s.y1),h=Math.round(s.x2),u=Math.round(s.y2),f=Math.abs(h-l),p=Math.abs(u-c),m=l-p&&(v-=p,l+=m),x{var a=function(s,o,d){var l=o-(s.x1+s.x2)/2,c=d-(s.y1+s.y2)/2;return s.x1+=l,s.y1+=c,s.x2+=l,s.y2+=c,s};n.exports=a},31116:(n,a,s)=>{var o=s(23031),d=function(l){return new o(l.x1,l.y1,l.x2,l.y2)};n.exports=d},59944:n=>{var a=function(s,o){return o.setTo(s.x1,s.y1,s.x2,s.y2)};n.exports=a},59220:n=>{var a=function(s,o){return s.x1===o.x1&&s.y1===o.y1&&s.x2===o.x2&&s.y2===o.y2};n.exports=a},78177:(n,a,s)=>{var o=s(35001),d=function(l,c,h){h===void 0&&(h=c);var u=o(l),f=l.x2-l.x1,p=l.y2-l.y1;return c&&(l.x1=l.x1-f/u*c,l.y1=l.y1-p/u*c),h&&(l.x2=l.x2+f/u*h,l.y2=l.y2+p/u*h),l};n.exports=d},26708:(n,a,s)=>{var o=s(52816),d=s(6113),l=s(2141),c=function(h,u,f,p,m){p===void 0&&(p=0),m===void 0&&(m=[]);var g=[],v=h.x1,y=h.y1,x=h.x2-v,b=h.y2-y,_=d(u,m),C,w,T=f-1;for(C=0;C0){var S=g[0],E=[S];for(C=1;C=p&&(E.push(D),S=D)}var A=g[g.length-1];return o(S,A){var o=s(2141),d=function(l,c){return c===void 0&&(c=new o),c.x=(l.x1+l.x2)/2,c.y=(l.y1+l.y2)/2,c};n.exports=d},99569:(n,a,s)=>{var o=s(2141),d=function(l,c,h){h===void 0&&(h=new o);var u=l.x1,f=l.y1,p=l.x2,m=l.y2,g=(p-u)*(p-u)+(m-f)*(m-f);if(g===0)return h;var v=((c.x-u)*(p-u)+(c.y-f)*(m-f))/g;return h.x=u+v*(p-u),h.y=f+v*(m-f),h};n.exports=d},34638:(n,a,s)=>{var o=s(36383),d=s(91938),l=s(2141),c=function(h,u){u===void 0&&(u=new l);var f=d(h)-o.TAU;return u.x=Math.cos(f),u.y=Math.sin(f),u};n.exports=c},13151:(n,a,s)=>{var o=s(2141),d=function(l,c,h){return h===void 0&&(h=new o),h.x=l.x1+(l.x2-l.x1)*c,h.y=l.y1+(l.y2-l.y1)*c,h};n.exports=d},15258:(n,a,s)=>{var o=s(35001),d=s(2141),l=function(c,h,u,f){f===void 0&&(f=[]),!h&&u>0&&(h=o(c)/u);for(var p=c.x1,m=c.y1,g=c.x2,v=c.y2,y=0;y{var a=function(s,o){var d=s.x1,l=s.y1,c=s.x2,h=s.y2,u=(c-d)*(c-d)+(h-l)*(h-l);if(u===0)return!1;var f=((l-o.y)*(c-d)-(d-o.x)*(h-l))/u;return Math.abs(f)*Math.sqrt(u)};n.exports=a},98770:n=>{var a=function(s){return Math.abs(s.y1-s.y2)};n.exports=a},35001:n=>{var a=function(s){return Math.sqrt((s.x2-s.x1)*(s.x2-s.x1)+(s.y2-s.y1)*(s.y2-s.y1))};n.exports=a},23031:(n,a,s)=>{var o=s(83419),d=s(13151),l=s(15258),c=s(23777),h=s(65822),u=s(26099),f=new o({initialize:function(m,g,v,y){m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=0),y===void 0&&(y=0),this.type=c.LINE,this.x1=m,this.y1=g,this.x2=v,this.y2=y},getPoint:function(p,m){return d(this,p,m)},getPoints:function(p,m,g){return l(this,p,m,g)},getRandomPoint:function(p){return h(this,p)},setTo:function(p,m,g,v){return p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=0),this.x1=p,this.y1=m,this.x2=g,this.y2=v,this},setFromObjects:function(p,m){return this.x1=p.x,this.y1=p.y,this.x2=m.x,this.y2=m.y,this},getPointA:function(p){return p===void 0&&(p=new u),p.set(this.x1,this.y1),p},getPointB:function(p){return p===void 0&&(p=new u),p.set(this.x2,this.y2),p},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(p){this.x1<=this.x2?this.x1=p:this.x2=p}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(p){this.x1>this.x2?this.x1=p:this.x2=p}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(p){this.y1<=this.y2?this.y1=p:this.y2=p}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(p){this.y1>this.y2?this.y1=p:this.y2=p}}});n.exports=f},64795:(n,a,s)=>{var o=s(36383),d=s(15994),l=s(91938),c=function(h){var u=l(h)-o.TAU;return d(u,-Math.PI,Math.PI)};n.exports=c},52616:(n,a,s)=>{var o=s(36383),d=s(91938),l=function(c){return Math.cos(d(c)-o.TAU)};n.exports=l},87231:(n,a,s)=>{var o=s(36383),d=s(91938),l=function(c){return Math.sin(d(c)-o.TAU)};n.exports=l},89662:n=>{var a=function(s,o,d){return s.x1+=o,s.y1+=d,s.x2+=o,s.y2+=d,s};n.exports=a},71165:n=>{var a=function(s){return-((s.x2-s.x1)/(s.y2-s.y1))};n.exports=a},65822:(n,a,s)=>{var o=s(2141),d=function(l,c){c===void 0&&(c=new o);var h=Math.random();return c.x=l.x1+h*(l.x2-l.x1),c.y=l.y1+h*(l.y2-l.y1),c};n.exports=d},69777:(n,a,s)=>{var o=s(91938),d=s(64795),l=function(c,h){return 2*d(h)-Math.PI-o(c)};n.exports=l},39706:(n,a,s)=>{var o=s(64400),d=function(l,c){var h=(l.x1+l.x2)/2,u=(l.y1+l.y2)/2;return o(l,h,u,c)};n.exports=d},82585:(n,a,s)=>{var o=s(64400),d=function(l,c,h){return o(l,c.x,c.y,h)};n.exports=d},64400:n=>{var a=function(s,o,d,l){var c=Math.cos(l),h=Math.sin(l),u=s.x1-o,f=s.y1-d;return s.x1=u*c-f*h+o,s.y1=u*h+f*c+d,u=s.x2-o,f=s.y2-d,s.x2=u*c-f*h+o,s.y2=u*h+f*c+d,s};n.exports=a},62377:n=>{var a=function(s,o,d,l,c){return s.x1=o,s.y1=d,s.x2=o+Math.cos(l)*c,s.y2=d+Math.sin(l)*c,s};n.exports=a},71366:n=>{var a=function(s){return(s.y2-s.y1)/(s.x2-s.x1)};n.exports=a},10809:n=>{var a=function(s){return Math.abs(s.x1-s.x2)};n.exports=a},2529:(n,a,s)=>{var o=s(23031);o.Angle=s(91938),o.BresenhamPoints=s(84993),o.CenterOn=s(36469),o.Clone=s(31116),o.CopyFrom=s(59944),o.Equals=s(59220),o.Extend=s(78177),o.GetEasedPoints=s(26708),o.GetMidPoint=s(32125),o.GetNearestPoint=s(99569),o.GetNormal=s(34638),o.GetPoint=s(13151),o.GetPoints=s(15258),o.GetShortestDistance=s(26408),o.Height=s(98770),o.Length=s(35001),o.NormalAngle=s(64795),o.NormalX=s(52616),o.NormalY=s(87231),o.Offset=s(89662),o.PerpSlope=s(71165),o.Random=s(65822),o.ReflectAngle=s(69777),o.Rotate=s(39706),o.RotateAroundPoint=s(82585),o.RotateAroundXY=s(64400),o.SetToAngle=s(62377),o.Slope=s(71366),o.Width=s(10809),n.exports=o},83997:(n,a,s)=>{var o=s(83419),d=s(87841),l=s(26099);function c(u,f,p,m){var g=u-p,v=f-m,y=g*g+v*v;return Math.sqrt(y)}var h=new o({initialize:function(f,p,m){this.vertex1=f,this.vertex2=p,this.vertex3=m,this.bounds=new d,this._inCenter=new l},getInCenter:function(u){u===void 0&&(u=!0);var f=this.vertex1,p=this.vertex2,m=this.vertex3,g,v,y,x,b,_;u?(g=f.x,v=f.y,y=p.x,x=p.y,b=m.x,_=m.y):(g=f.vx,v=f.vy,y=p.vx,x=p.vy,b=m.vx,_=m.vy);var C=c(b,_,y,x),w=c(g,v,b,_),T=c(y,x,g,v),S=C+w+T;return this._inCenter.set((g*C+y*w+b*T)/S,(v*C+x*w+_*T)/S)},contains:function(u,f,p){var m=this.vertex1,g=this.vertex2,v=this.vertex3,y=m.vx,x=m.vy,b=g.vx,_=g.vy,C=v.vx,w=v.vy;if(p){var T=p.a,S=p.b,E=p.c,D=p.d,A=p.e,M=p.f;y=m.vx*T+m.vy*E+A,x=m.vx*S+m.vy*D+M,b=g.vx*T+g.vy*E+A,_=g.vx*S+g.vy*D+M,C=v.vx*T+v.vy*E+A,w=v.vx*S+v.vy*D+M}var R=C-y,L=w-x,I=b-y,O=_-x,N=u-y,H=f-x,X=R*R+L*L,V=R*I+L*O,z=R*N+L*H,F=I*I+O*O,k=I*N+O*H,G=X*F-V*V,Z=G===0?0:1/G,J=(F*z-V*k)*Z,W=(X*k-V*z)*Z;return J>=0&&W>=0&&J+W<1},isCounterClockwise:function(u){var f=this.vertex1,p=this.vertex2,m=this.vertex3,g=(p.vx-f.vx)*(m.vy-f.vy)-(p.vy-f.vy)*(m.vx-f.vx);return u<=0?g>=0:g<0},load:function(u,f,p,m,g){return p=this.vertex1.load(u,f,p,m,g),p=this.vertex2.load(u,f,p,m,g),p=this.vertex3.load(u,f,p,m,g),p},transformCoordinatesLocal:function(u,f,p,m){return this.vertex1.transformCoordinatesLocal(u,f,p,m),this.vertex2.transformCoordinatesLocal(u,f,p,m),this.vertex3.transformCoordinatesLocal(u,f,p,m),this},updateBounds:function(){var u=this.vertex1,f=this.vertex2,p=this.vertex3,m=this.bounds;return m.x=Math.min(u.vx,f.vx,p.vx),m.y=Math.min(u.vy,f.vy,p.vy),m.width=Math.max(u.vx,f.vx,p.vx)-m.x,m.height=Math.max(u.vy,f.vy,p.vy)-m.y,this},isInView:function(u,f,p,m,g,v,y,x,b,_,C){this.update(m,g,v,y,x,b,_,C);var w=this.vertex1,T=this.vertex2,S=this.vertex3;if(w.ta<=0&&T.ta<=0&&S.ta<=0||f&&!this.isCounterClockwise(p))return!1;var E=this.bounds;E.x=Math.min(w.tx,T.tx,S.tx),E.y=Math.min(w.ty,T.ty,S.ty),E.width=Math.max(w.tx,T.tx,S.tx)-E.x,E.height=Math.max(w.ty,T.ty,S.ty)-E.y;var D=u.x+u.width,A=u.y+u.height;return E.width<=0||E.height<=0||u.width<=0||u.height<=0?!1:!(E.rightD||E.y>A)},scrollUV:function(u,f){return this.vertex1.scrollUV(u,f),this.vertex2.scrollUV(u,f),this.vertex3.scrollUV(u,f),this},scaleUV:function(u,f){return this.vertex1.scaleUV(u,f),this.vertex2.scaleUV(u,f),this.vertex3.scaleUV(u,f),this},setColor:function(u){return this.vertex1.color=u,this.vertex2.color=u,this.vertex3.color=u,this},update:function(u,f,p,m,g,v,y,x){return this.vertex1.update(f,p,m,g,v,y,x,u),this.vertex2.update(f,p,m,g,v,y,x,u),this.vertex3.update(f,p,m,g,v,y,x,u),this},translate:function(u,f){f===void 0&&(f=0);var p=this.vertex1,m=this.vertex2,g=this.vertex3;return p.x+=u,p.y+=f,m.x+=u,m.y+=f,g.x+=u,g.y+=f,this},x:{get:function(){return this.getInCenter().x},set:function(u){var f=this.getInCenter();this.translate(u-f.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(u){var f=this.getInCenter();this.translate(0,u-f.y)}},alpha:{get:function(){var u=this.vertex1,f=this.vertex2,p=this.vertex3;return(u.alpha+f.alpha+p.alpha)/3},set:function(u){this.vertex1.alpha=u,this.vertex2.alpha=u,this.vertex3.alpha=u}},depth:{get:function(){var u=this.vertex1,f=this.vertex2,p=this.vertex3;return(u.vz+f.vz+p.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});n.exports=h},48803:(n,a,s)=>{var o=s(83997),d=s(95540),l=s(37867),c=s(25836),h=s(39318),u=new c,f=new c,p=new l,m=function(g){var v=d(g,"mesh"),y=d(g,"texture",null),x=d(g,"frame"),b=d(g,"width",1),_=d(g,"height",b),C=d(g,"widthSegments",1),w=d(g,"heightSegments",C),T=d(g,"x",0),S=d(g,"y",0),E=d(g,"z",0),D=d(g,"rotateX",0),A=d(g,"rotateY",0),M=d(g,"rotateZ",0),R=d(g,"zIsUp",!0),L=d(g,"isOrtho",v?v.dirtyCache[11]:!1),I=d(g,"colors",[16777215]),O=d(g,"alphas",[1]),N=d(g,"tile",!1),H=d(g,"flipY",!1),X=d(g,"width",null),V={faces:[],verts:[]};u.set(T,S,E),f.set(D,A,M),p.fromRotationXYTranslation(f,u,R);var z;if(!y&&v)y=v.texture,x||(z=v.frame);else if(v&&typeof y=="string")y=v.scene.sys.textures.get(y);else if(!y)return V;z||(z=y.get(x)),!X&&L&&y&&v&&(b=z.width/v.height,_=z.height/v.height);var F=b/2,k=_/2,G=Math.floor(C),Z=Math.floor(w),J=G+1,W=Z+1,q=b/G,ie=_/Z,re=[],oe=[],ve,_e,ye=0,xe=1,st=0,at=1;z&&(ye=z.u0,xe=z.u1,H?(st=z.v1,at=z.v0):(st=z.v0,at=z.v1));var Ge=xe-ye,ke=at-st;for(_e=0;_e{var o=s(83997),d=s(37867),l=s(25836),c=s(39318),h=new l,u=new l,f=new d,p=function(m,g,v,y,x,b,_,C,w,T){v===void 0&&(v=1),y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),_===void 0&&(_=0),C===void 0&&(C=0),w===void 0&&(w=0),T===void 0&&(T=!0);var S={faces:[],verts:[]},E=m.materials;h.set(y,x,b),u.set(_,C,w),f.fromRotationXYTranslation(u,h,T);for(var D=0;D{var o=s(83997),d=s(39318),l=function(c,h,u,f,p,m,g,v){if(f===void 0&&(f=!1),m===void 0&&(m=16777215),g===void 0&&(g=1),v===void 0&&(v=!1),c.length!==h.length&&!f){console.warn("GenerateVerts: vertices and uvs count not equal");return}var y={faces:[],vertices:[]},x,b,_,C,w,T,S,E,D,A,M,R=f?3:2,L=Array.isArray(m),I=Array.isArray(g);if(Array.isArray(u)&&u.length>0)for(x=0;x{var a=!0,s="untitled",o="",d="";function l(b){var _=b.indexOf("#");return _>-1?b.substring(0,_):b}function c(b){return b.models.length===0&&b.models.push({faces:[],name:s,textureCoords:[],vertexNormals:[],vertices:[]}),o="",b.models[b.models.length-1]}function h(b,_){var C=b.length>=2?b[1]:s;_.models.push({faces:[],name:C,textureCoords:[],vertexNormals:[],vertices:[]}),o=""}function u(b){b.length===2&&(o=b[1])}function f(b,_){var C=b.length,w=C>=2?parseFloat(b[1]):0,T=C>=3?parseFloat(b[2]):0,S=C>=4?parseFloat(b[3]):0;c(_).vertices.push({x:w,y:T,z:S})}function p(b,_){var C=b.length,w=C>=2?parseFloat(b[1]):0,T=C>=3?parseFloat(b[2]):0,S=C>=4?parseFloat(b[3]):0;isNaN(w)&&(w=0),isNaN(T)&&(T=0),isNaN(S)&&(S=0),a&&(T=1-T),c(_).textureCoords.push({u:w,v:T,w:S})}function m(b,_){var C=b.length,w=C>=2?parseFloat(b[1]):0,T=C>=3?parseFloat(b[2]):0,S=C>=4?parseFloat(b[3]):0;c(_).vertexNormals.push({x:w,y:T,z:S})}function g(b,_){var C=b.length-1;if(!(C<3)){for(var w={group:o,material:d,vertices:[]},T=0;T3)){var A=0,M=0,R=0;A=parseInt(E[0],10),D>1&&E[1]!==""&&(M=parseInt(E[1],10)),D>2&&(R=parseInt(E[2],10)),A!==0&&(A<0&&(A=c(_).vertices.length+1+A),M-=1,A-=1,R-=1,w.vertices.push({textureCoordsIndex:M,vertexIndex:A,vertexNormalIndex:R}))}}c(_).faces.push(w)}}function v(b,_){b.length>=2&&_.materialLibraries.push(b[1])}function y(b){b.length>=2&&(d=b[1])}var x=function(b,_){_===void 0&&(_=!0),a=_;var C={materials:{},materialLibraries:[],models:[]};o="",d="";for(var w=b.split(` +`),T=0;T{var o=s(37589),d=function(l){for(var c={},h=l.split(` +`),u="",f=0;f=2?Math.floor(m[2]*255):g,y=m.length>=3?Math.floor(m[3]*255):g;c[u]=o(g,v,y);break}}}}return c};n.exports=d},92570:n=>{var a=function(s,o,d,l){var c,h;if(d===void 0&&l===void 0){var u=s.getInCenter();c=u.x,h=u.y}var f=Math.cos(o),p=Math.sin(o),m=s.vertex1,g=s.vertex2,v=s.vertex3,y=m.x-c,x=m.y-h;m.set(y*f-x*p+c,y*p+x*f+h),y=g.x-c,x=g.y-h,g.set(y*f-x*p+c,y*p+x*f+h),y=v.x-c,x=v.y-h,v.set(y*f-x*p+c,y*p+x*f+h)};n.exports=a},39318:(n,a,s)=>{var o=s(83419),d=s(70554),l=s(25836),c=new o({Extends:l,initialize:function(u,f,p,m,g,v,y,x,b,_){v===void 0&&(v=16777215),y===void 0&&(y=1),x===void 0&&(x=0),b===void 0&&(b=0),_===void 0&&(_=0),l.call(this,u,f,p),this.vx=0,this.vy=0,this.vz=0,this.nx=x,this.ny=b,this.nz=_,this.u=m,this.v=g,this.color=v,this.alpha=y,this.tx=0,this.ty=0,this.ta=0,this.tu=m,this.tv=g},setUVs:function(h,u){return this.u=h,this.v=u,this.tu=h,this.tv=u,this},scrollUV:function(h,u){return this.tu+=h,this.tv+=u,this},scaleUV:function(h,u){return this.tu=this.u*h,this.tv=this.v*u,this},transformCoordinatesLocal:function(h,u,f,p){var m=this.x,g=this.y,v=this.z,y=h.val,x=m*y[0]+g*y[4]+v*y[8]+y[12],b=m*y[1]+g*y[5]+v*y[9]+y[13],_=m*y[2]+g*y[6]+v*y[10]+y[14],C=m*y[3]+g*y[7]+v*y[11]+y[15];this.vx=x/C*u,this.vy=-(b/C)*f,p<=0?this.vz=_/C:this.vz=-(_/C)},resize:function(h,u,f,p,m,g){return this.x=h,this.y=u,this.vx=this.x*f,this.vy=-this.y*p,this.vz=0,m<.5?this.vx+=f*(.5-m):m>.5&&(this.vx-=f*(m-.5)),g<.5?this.vy+=p*(.5-g):g>.5&&(this.vy-=p*(g-.5)),this},update:function(h,u,f,p,m,g,v,y){var x=this.vx*h+this.vy*f+m,b=this.vx*u+this.vy*p+g;return v&&(x=Math.round(x),b=Math.round(b)),this.tx=x,this.ty=b,this.ta=this.alpha*y,this},load:function(h,u,f,p,m){return h[++f]=this.tx,h[++f]=this.ty,h[++f]=this.tu,h[++f]=this.tv,h[++f]=p,h[++f]=m,u[++f]=d.getTintAppendFloatAlpha(this.color,this.ta),f}});n.exports=c},73090:(n,a,s)=>{var o={Face:s(83997),GenerateGridVerts:s(48803),GenerateObjVerts:s(34684),GenerateVerts:s(92515),ParseObj:s(85048),ParseObjMaterial:s(61485),RotateFace:s(92570),Vertex:s(39318)};n.exports=o},96550:n=>{var a=function(s){return s.setTo(Math.ceil(s.x),Math.ceil(s.y))};n.exports=a},99706:(n,a,s)=>{var o=s(2141),d=function(l){return new o(l.x,l.y)};n.exports=d},68010:n=>{var a=function(s,o){return o.setTo(s.x,s.y)};n.exports=a},27814:n=>{var a=function(s,o){return s.x===o.x&&s.y===o.y};n.exports=a},73565:n=>{var a=function(s){return s.setTo(Math.floor(s.x),Math.floor(s.y))};n.exports=a},87555:(n,a,s)=>{var o=s(2141),d=function(l,c){if(c===void 0&&(c=new o),!Array.isArray(l))throw new Error("GetCentroid points argument must be an array");var h=l.length;if(h<1)throw new Error("GetCentroid points array must not be empty");if(h===1)c.x=l[0].x,c.y=l[0].y;else{for(var u=0;u{var a=function(s){return Math.sqrt(s.x*s.x+s.y*s.y)};n.exports=a},44405:n=>{var a=function(s){return s.x*s.x+s.y*s.y};n.exports=a},20873:(n,a,s)=>{var o=s(87841),d=function(l,c){c===void 0&&(c=new o);for(var h=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,m=0;mh&&(h=g.x),g.xf&&(f=g.y),g.y{var o=s(2141),d=function(l,c,h,u){return h===void 0&&(h=0),u===void 0&&(u=new o),u.x=l.x+(c.x-l.x)*h,u.y=l.y+(c.y-l.y)*h,u};n.exports=d},55767:n=>{var a=function(s){return s.setTo(s.y,s.x)};n.exports=a},79432:(n,a,s)=>{var o=s(2141),d=function(l,c){return c===void 0&&(c=new o),c.setTo(-l.x,-l.y)};n.exports=d},2141:(n,a,s)=>{var o=s(83419),d=s(23777),l=new o({initialize:function(h,u){h===void 0&&(h=0),u===void 0&&(u=h),this.type=d.POINT,this.x=h,this.y=u},setTo:function(c,h){return c===void 0&&(c=0),h===void 0&&(h=c),this.x=c,this.y=h,this}});n.exports=l},72930:(n,a,s)=>{var o=s(2141),d=s(44405),l=function(c,h,u){u===void 0&&(u=new o);var f=c.x*h.x+c.y*h.y,p=f/d(h);return p!==0&&(u.x=p*h.x,u.y=p*h.y),u};n.exports=l},62880:(n,a,s)=>{var o=s(2141),d=function(l,c,h){h===void 0&&(h=new o);var u=l.x*c.x+l.y*c.y;return u!==0&&(h.x=u*c.x,h.y=u*c.y),h};n.exports=d},15093:(n,a,s)=>{var o=s(28793),d=function(l,c){if(l.x!==0||l.y!==0){var h=o(l);l.x/=h,l.y/=h}return l.x*=c,l.y*=c,l};n.exports=d},43711:(n,a,s)=>{var o=s(2141);o.Ceil=s(96550),o.Clone=s(99706),o.CopyFrom=s(68010),o.Equals=s(27814),o.Floor=s(73565),o.GetCentroid=s(87555),o.GetMagnitude=s(28793),o.GetMagnitudeSq=s(44405),o.GetRectangleFromPoints=s(20873),o.Interpolate=s(26152),o.Invert=s(55767),o.Negative=s(79432),o.Project=s(72930),o.ProjectUnit=s(62880),o.SetMagnitude=s(15093),n.exports=o},12306:(n,a,s)=>{var o=s(25717),d=function(l){return new o(l.points)};n.exports=d},63814:n=>{var a=function(s,o,d){for(var l=!1,c=-1,h=s.points.length-1;++c{var o=s(63814),d=function(l,c){return o(l,c.x,c.y)};n.exports=d},94811:n=>{"use strict";function a(V,z,F){F=F||2;var k=z&&z.length,G=k?z[0]*F:V.length,Z=s(V,0,G,F,!0),J=[];if(!Z||Z.next===Z.prev)return J;var W,q,ie,re,oe,ve,_e;if(k&&(Z=f(V,z,Z,F)),V.length>80*F){W=ie=V[0],q=re=V[1];for(var ye=F;yeie&&(ie=oe),ve>re&&(re=ve);_e=Math.max(ie-W,re-q),_e=_e!==0?32767/_e:0}return d(Z,J,F,W,q,_e,0),J}function s(V,z,F,k,G){var Z,J;if(G===X(V,z,F,k)>0)for(Z=z;Z=z;Z-=k)J=O(Z,V[Z],V[Z+1],J);return J&&S(J,J.next)&&(N(J),J=J.next),J}function o(V,z){if(!V)return V;z||(z=V);var F=V,k;do if(k=!1,!F.steiner&&(S(F,F.next)||T(F.prev,F,F.next)===0)){if(N(F),F=z=F.prev,F===F.next)break;k=!0}else F=F.next;while(k||F!==z);return z}function d(V,z,F,k,G,Z,J){if(V){!J&&Z&&y(V,k,G,Z);for(var W=V,q,ie;V.prev!==V.next;){if(q=V.prev,ie=V.next,Z?c(V,k,G,Z):l(V)){z.push(q.i/F|0),z.push(V.i/F|0),z.push(ie.i/F|0),N(V),V=ie.next,W=ie.next;continue}if(V=ie,V===W){J?J===1?(V=h(o(V),z,F),d(V,z,F,k,G,Z,2)):J===2&&u(V,z,F,k,G,Z):d(o(V),z,F,k,G,Z,1);break}}}}function l(V){var z=V.prev,F=V,k=V.next;if(T(z,F,k)>=0)return!1;for(var G=z.x,Z=F.x,J=k.x,W=z.y,q=F.y,ie=k.y,re=GZ?G>J?G:J:Z>J?Z:J,_e=W>q?W>ie?W:ie:q>ie?q:ie,ye=k.next;ye!==z;){if(ye.x>=re&&ye.x<=ve&&ye.y>=oe&&ye.y<=_e&&C(G,W,Z,q,J,ie,ye.x,ye.y)&&T(ye.prev,ye,ye.next)>=0)return!1;ye=ye.next}return!0}function c(V,z,F,k){var G=V.prev,Z=V,J=V.next;if(T(G,Z,J)>=0)return!1;for(var W=G.x,q=Z.x,ie=J.x,re=G.y,oe=Z.y,ve=J.y,_e=Wq?W>ie?W:ie:q>ie?q:ie,st=re>oe?re>ve?re:ve:oe>ve?oe:ve,at=b(_e,ye,z,F,k),Ge=b(xe,st,z,F,k),ke=V.prevZ,qe=V.nextZ;ke&&ke.z>=at&&qe&&qe.z<=Ge;){if(ke.x>=_e&&ke.x<=xe&&ke.y>=ye&&ke.y<=st&&ke!==G&&ke!==J&&C(W,re,q,oe,ie,ve,ke.x,ke.y)&&T(ke.prev,ke,ke.next)>=0||(ke=ke.prevZ,qe.x>=_e&&qe.x<=xe&&qe.y>=ye&&qe.y<=st&&qe!==G&&qe!==J&&C(W,re,q,oe,ie,ve,qe.x,qe.y)&&T(qe.prev,qe,qe.next)>=0))return!1;qe=qe.nextZ}for(;ke&&ke.z>=at;){if(ke.x>=_e&&ke.x<=xe&&ke.y>=ye&&ke.y<=st&&ke!==G&&ke!==J&&C(W,re,q,oe,ie,ve,ke.x,ke.y)&&T(ke.prev,ke,ke.next)>=0)return!1;ke=ke.prevZ}for(;qe&&qe.z<=Ge;){if(qe.x>=_e&&qe.x<=xe&&qe.y>=ye&&qe.y<=st&&qe!==G&&qe!==J&&C(W,re,q,oe,ie,ve,qe.x,qe.y)&&T(qe.prev,qe,qe.next)>=0)return!1;qe=qe.nextZ}return!0}function h(V,z,F){var k=V;do{var G=k.prev,Z=k.next.next;!S(G,Z)&&E(G,k,k.next,Z)&&R(G,Z)&&R(Z,G)&&(z.push(G.i/F|0),z.push(k.i/F|0),z.push(Z.i/F|0),N(k),N(k.next),k=V=Z),k=k.next}while(k!==V);return o(k)}function u(V,z,F,k,G,Z){var J=V;do{for(var W=J.next.next;W!==J.prev;){if(J.i!==W.i&&w(J,W)){var q=I(J,W);J=o(J,J.next),q=o(q,q.next),d(J,z,F,k,G,Z,0),d(q,z,F,k,G,Z,0);return}W=W.next}J=J.next}while(J!==V)}function f(V,z,F,k){var G=[],Z,J,W,q,ie;for(Z=0,J=z.length;Z=F.next.y&&F.next.y!==F.y){var W=F.x+(G-F.y)*(F.next.x-F.x)/(F.next.y-F.y);if(W<=k&&W>Z&&(Z=W,J=F.x=F.x&&F.x>=ie&&k!==F.x&&C(GJ.x||F.x===J.x&&v(J,F)))&&(J=F,oe=ve)),F=F.next;while(F!==q);return J}function v(V,z){return T(V.prev,V,z.prev)<0&&T(z.next,V,V.next)<0}function y(V,z,F,k){var G=V;do G.z===0&&(G.z=b(G.x,G.y,z,F,k)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next;while(G!==V);G.prevZ.nextZ=null,G.prevZ=null,x(G)}function x(V){var z,F,k,G,Z,J,W,q,ie=1;do{for(F=V,V=null,Z=null,J=0;F;){for(J++,k=F,W=0,z=0;z0||q>0&&k;)W!==0&&(q===0||!k||F.z<=k.z)?(G=F,F=F.nextZ,W--):(G=k,k=k.nextZ,q--),Z?Z.nextZ=G:V=G,G.prevZ=Z,Z=G;F=k}Z.nextZ=null,ie*=2}while(J>1);return V}function b(V,z,F,k,G){return V=(V-F)*G|0,z=(z-k)*G|0,V=(V|V<<8)&16711935,V=(V|V<<4)&252645135,V=(V|V<<2)&858993459,V=(V|V<<1)&1431655765,z=(z|z<<8)&16711935,z=(z|z<<4)&252645135,z=(z|z<<2)&858993459,z=(z|z<<1)&1431655765,V|z<<1}function _(V){var z=V,F=V;do(z.x=(V-J)*(Z-W)&&(V-J)*(k-W)>=(F-J)*(z-W)&&(F-J)*(Z-W)>=(G-J)*(k-W)}function w(V,z){return V.next.i!==z.i&&V.prev.i!==z.i&&!M(V,z)&&(R(V,z)&&R(z,V)&&L(V,z)&&(T(V.prev,V,z.prev)||T(V,z.prev,z))||S(V,z)&&T(V.prev,V,V.next)>0&&T(z.prev,z,z.next)>0)}function T(V,z,F){return(z.y-V.y)*(F.x-z.x)-(z.x-V.x)*(F.y-z.y)}function S(V,z){return V.x===z.x&&V.y===z.y}function E(V,z,F,k){var G=A(T(V,z,F)),Z=A(T(V,z,k)),J=A(T(F,k,V)),W=A(T(F,k,z));return!!(G!==Z&&J!==W||G===0&&D(V,F,z)||Z===0&&D(V,k,z)||J===0&&D(F,V,k)||W===0&&D(F,z,k))}function D(V,z,F){return z.x<=Math.max(V.x,F.x)&&z.x>=Math.min(V.x,F.x)&&z.y<=Math.max(V.y,F.y)&&z.y>=Math.min(V.y,F.y)}function A(V){return V>0?1:V<0?-1:0}function M(V,z){var F=V;do{if(F.i!==V.i&&F.next.i!==V.i&&F.i!==z.i&&F.next.i!==z.i&&E(F,F.next,V,z))return!0;F=F.next}while(F!==V);return!1}function R(V,z){return T(V.prev,V,V.next)<0?T(V,z,V.next)>=0&&T(V,V.prev,z)>=0:T(V,z,V.prev)<0||T(V,V.next,z)<0}function L(V,z){var F=V,k=!1,G=(V.x+z.x)/2,Z=(V.y+z.y)/2;do F.y>Z!=F.next.y>Z&&F.next.y!==F.y&&G<(F.next.x-F.x)*(Z-F.y)/(F.next.y-F.y)+F.x&&(k=!k),F=F.next;while(F!==V);return k}function I(V,z){var F=new H(V.i,V.x,V.y),k=new H(z.i,z.x,z.y),G=V.next,Z=z.prev;return V.next=z,z.prev=V,F.next=G,G.prev=F,k.next=F,F.prev=k,Z.next=k,k.prev=Z,k}function O(V,z,F,k){var G=new H(V,z,F);return k?(G.next=k.next,G.prev=k,k.next.prev=G,k.next=G):(G.prev=G,G.next=G),G}function N(V){V.next.prev=V.prev,V.prev.next=V.next,V.prevZ&&(V.prevZ.nextZ=V.nextZ),V.nextZ&&(V.nextZ.prevZ=V.prevZ)}function H(V,z,F){this.i=V,this.x=z,this.y=F,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}a.deviation=function(V,z,F,k){var G=z&&z.length,Z=G?z[0]*F:V.length,J=Math.abs(X(V,0,Z,F));if(G)for(var W=0,q=z.length;W0&&(k+=V[G-1].length,F.holes.push(k))}return F},n.exports=a},13829:(n,a,s)=>{var o=s(87841),d=function(l,c){c===void 0&&(c=new o);for(var h=1/0,u=1/0,f=-h,p=-u,m,g=0;g{var a=function(s,o){o===void 0&&(o=[]);for(var d=0;d{var o=s(35001),d=s(23031),l=s(30052),c=function(h,u,f,p){p===void 0&&(p=[]);var m=h.points,g=l(h);!u&&f>0&&(u=g/f);for(var v=0;vx+T){x+=T;continue}var S=w.getPoint((y-x)/T);p.push(S);break}return p};n.exports=c},30052:(n,a,s)=>{var o=s(35001),d=s(23031),l=function(c){for(var h=c.points,u=0,f=0;f{var o=s(83419),d=s(63814),l=s(9564),c=s(23777),h=new o({initialize:function(f){this.type=c.POLYGON,this.area=0,this.points=[],f&&this.setTo(f)},contains:function(u,f){return d(this,u,f)},setTo:function(u){if(this.area=0,this.points=[],typeof u=="string"&&(u=u.split(" ")),!Array.isArray(u))return this;for(var f,p=0;p{var a=function(s){return s.points.reverse(),s};n.exports=a},29524:n=>{function a(h,u){var f=h.x-u.x,p=h.y-u.y;return f*f+p*p}function s(h,u,f){var p=u.x,m=u.y,g=f.x-p,v=f.y-m;if(g!==0||v!==0){var y=((h.x-p)*g+(h.y-m)*v)/(g*g+v*v);y>1?(p=f.x,m=f.y):y>0&&(p+=g*y,m+=v*y)}return g=h.x-p,v=h.y-m,g*g+v*v}function o(h,u){for(var f=h[0],p=[f],m,g=1,v=h.length;gu&&(p.push(m),f=m);return f!==m&&p.push(m),p}function d(h,u,f,p,m){for(var g=p,v,y=u+1;yg&&(v=y,g=x)}g>p&&(v-u>1&&d(h,u,v,p,m),m.push(h[v]),f-v>1&&d(h,v,f,p,m))}function l(h,u){var f=h.length-1,p=[h[0]];return d(h,0,f,u,p),p.push(h[f]),p}var c=function(h,u,f){u===void 0&&(u=1),f===void 0&&(f=!1);var p=h.points;if(p.length>2){var m=u*u;f||(p=o(p,m)),h.setTo(l(p,m))}return h};n.exports=c},5469:n=>{var a=function(o,d){return o[0]=d[0],o[1]=d[1],o},s=function(o){var d,l=[],c=o.points;for(d=0;d0&&h.push(a([0,0],l[0])),d=0;d1&&h.push(a([0,0],l[l.length-1])),o.setTo(h)};n.exports=s},24709:n=>{var a=function(s,o,d){for(var l=s.points,c=0;c{var o=s(25717);o.Clone=s(12306),o.Contains=s(63814),o.ContainsPoint=s(99338),o.Earcut=s(94811),o.GetAABB=s(13829),o.GetNumberArray=s(26173),o.GetPoints=s(9564),o.Perimeter=s(30052),o.Reverse=s(8133),o.Simplify=s(29524),o.Smooth=s(5469),o.Translate=s(24709),n.exports=o},62224:n=>{var a=function(s){return s.width*s.height};n.exports=a},98615:n=>{var a=function(s){return s.x=Math.ceil(s.x),s.y=Math.ceil(s.y),s};n.exports=a},31688:n=>{var a=function(s){return s.x=Math.ceil(s.x),s.y=Math.ceil(s.y),s.width=Math.ceil(s.width),s.height=Math.ceil(s.height),s};n.exports=a},67502:n=>{var a=function(s,o,d){return s.x=o-s.width/2,s.y=d-s.height/2,s};n.exports=a},65085:(n,a,s)=>{var o=s(87841),d=function(l){return new o(l.x,l.y,l.width,l.height)};n.exports=d},37303:n=>{var a=function(s,o,d){return s.width<=0||s.height<=0?!1:s.x<=o&&s.x+s.width>=o&&s.y<=d&&s.y+s.height>=d};n.exports=a},96553:(n,a,s)=>{var o=s(37303),d=function(l,c){return o(l,c.x,c.y)};n.exports=d},70273:n=>{var a=function(s,o){return o.width*o.height>s.width*s.height?!1:o.x>s.x&&o.xs.x&&o.rights.y&&o.ys.y&&o.bottom{var a=function(s,o){return o.setTo(s.x,s.y,s.width,s.height)};n.exports=a},77493:n=>{var a=function(s,o){return o===void 0&&(o=[]),o.push({x:s.x,y:s.y}),o.push({x:s.right,y:s.y}),o.push({x:s.right,y:s.bottom}),o.push({x:s.x,y:s.bottom}),o};n.exports=a},9219:n=>{var a=function(s,o){return s.x===o.x&&s.y===o.y&&s.width===o.width&&s.height===o.height};n.exports=a},53751:(n,a,s)=>{var o=s(8249),d=function(l,c){var h=o(l);return h{var o=s(8249),d=function(l,c){var h=o(l);return h>o(c)?l.setSize(c.height*h,c.height):l.setSize(c.width,c.width/h),l.setPosition(c.centerX-l.width/2,c.centerY-l.height/2)};n.exports=d},80774:n=>{var a=function(s){return s.x=Math.floor(s.x),s.y=Math.floor(s.y),s};n.exports=a},83859:n=>{var a=function(s){return s.x=Math.floor(s.x),s.y=Math.floor(s.y),s.width=Math.floor(s.width),s.height=Math.floor(s.height),s};n.exports=a},19217:(n,a,s)=>{var o=s(87841),d=s(36383),l=function(c,h){if(h===void 0&&(h=new o),c.length===0)return h;for(var u=Number.MAX_VALUE,f=Number.MAX_VALUE,p=d.MIN_SAFE_INTEGER,m=d.MIN_SAFE_INTEGER,g,v,y,x=0;x{var o=s(87841),d=function(l,c,h,u,f){return f===void 0&&(f=new o),f.setTo(Math.min(l,h),Math.min(c,u),Math.abs(l-h),Math.abs(c-u))};n.exports=d},8249:n=>{var a=function(s){return s.height===0?NaN:s.width/s.height};n.exports=a},27165:(n,a,s)=>{var o=s(2141),d=function(l,c){return c===void 0&&(c=new o),c.x=l.centerX,c.y=l.centerY,c};n.exports=d},20812:(n,a,s)=>{var o=s(13019),d=s(2141),l=function(c,h,u){if(u===void 0&&(u=new d),h<=0||h>=1)return u.x=c.x,u.y=c.y,u;var f=o(c)*h;return h>.5?(f-=c.width+c.height,f<=c.width?(u.x=c.right-f,u.y=c.bottom):(u.x=c.x,u.y=c.bottom-(f-c.width))):f<=c.width?(u.x=c.x+f,u.y=c.y):(u.x=c.right,u.y=c.y+(f-c.width)),u};n.exports=l},34819:(n,a,s)=>{var o=s(20812),d=s(13019),l=function(c,h,u,f){f===void 0&&(f=[]),!h&&u>0&&(h=d(c)/u);for(var p=0;p{var o=s(2141),d=function(l,c){return c===void 0&&(c=new o),c.x=l.width,c.y=l.height,c};n.exports=d},86091:(n,a,s)=>{var o=s(67502),d=function(l,c,h){var u=l.centerX,f=l.centerY;return l.setSize(l.width+c*2,l.height+h*2),o(l,u,f)};n.exports=d},53951:(n,a,s)=>{var o=s(87841),d=s(59996),l=function(c,h,u){return u===void 0&&(u=new o),d(c,h)?(u.x=Math.max(c.x,h.x),u.y=Math.max(c.y,h.y),u.width=Math.min(c.right,h.right)-u.x,u.height=Math.min(c.bottom,h.bottom)-u.y):u.setEmpty(),u};n.exports=l},14649:(n,a,s)=>{var o=s(13019),d=s(2141),l=function(c,h,u,f){if(f===void 0&&(f=[]),!h&&!u)return f;h?u=Math.round(o(c)/h):h=o(c)/u;for(var p=c.x,m=c.y,g=0,v=0;v=c.right&&(g=1,m+=p-c.right,p=c.right);break;case 1:m+=h,m>=c.bottom&&(g=2,p-=m-c.bottom,m=c.bottom);break;case 2:p-=h,p<=c.left&&(g=3,m-=c.left-p,p=c.left);break;case 3:m-=h,m<=c.top&&(g=0,m=c.top);break}return f};n.exports=l},33595:n=>{var a=function(s,o){for(var d=s.x,l=s.right,c=s.y,h=s.bottom,u=0;u{var a=function(s,o){var d=Math.min(s.x,o.x),l=Math.max(s.right,o.right);s.x=d,s.width=l-d;var c=Math.min(s.y,o.y),h=Math.max(s.bottom,o.bottom);return s.y=c,s.height=h-c,s};n.exports=a},92171:n=>{var a=function(s,o,d){var l=Math.min(s.x,o),c=Math.max(s.right,o);s.x=l,s.width=c-l;var h=Math.min(s.y,d),u=Math.max(s.bottom,d);return s.y=h,s.height=u-h,s};n.exports=a},42981:n=>{var a=function(s,o,d){return s.x+=o,s.y+=d,s};n.exports=a},46907:n=>{var a=function(s,o){return s.x+=o.x,s.y+=o.y,s};n.exports=a},60170:n=>{var a=function(s,o){return s.xo.x&&s.yo.y};n.exports=a},13019:n=>{var a=function(s){return 2*(s.width+s.height)};n.exports=a},85133:(n,a,s)=>{var o=s(2141),d=s(39506),l=function(c,h,u){u===void 0&&(u=new o),h=d(h);var f=Math.sin(h),p=Math.cos(h),m=p>0?c.width/2:c.width/-2,g=f>0?c.height/2:c.height/-2;return Math.abs(m*f){var o=s(2141),d=function(l,c){return c===void 0&&(c=new o),c.x=l.x+Math.random()*l.width,c.y=l.y+Math.random()*l.height,c};n.exports=d},86470:(n,a,s)=>{var o=s(30976),d=s(70273),l=s(2141),c=function(h,u,f){if(f===void 0&&(f=new l),d(h,u))switch(o(0,3)){case 0:f.x=h.x+Math.random()*(u.right-h.x),f.y=h.y+Math.random()*(u.top-h.y);break;case 1:f.x=u.x+Math.random()*(h.right-u.x),f.y=u.bottom+Math.random()*(h.bottom-u.bottom);break;case 2:f.x=h.x+Math.random()*(u.x-h.x),f.y=u.y+Math.random()*(h.bottom-u.y);break;case 3:f.x=u.right+Math.random()*(h.right-u.right),f.y=h.y+Math.random()*(u.bottom-h.y);break}return f};n.exports=c},87841:(n,a,s)=>{var o=s(83419),d=s(37303),l=s(20812),c=s(34819),h=s(23777),u=s(23031),f=s(26597),p=new o({initialize:function(g,v,y,x){g===void 0&&(g=0),v===void 0&&(v=0),y===void 0&&(y=0),x===void 0&&(x=0),this.type=h.RECTANGLE,this.x=g,this.y=v,this.width=y,this.height=x},contains:function(m,g){return d(this,m,g)},getPoint:function(m,g){return l(this,m,g)},getPoints:function(m,g,v){return c(this,m,g,v)},getRandomPoint:function(m){return f(this,m)},setTo:function(m,g,v,y){return this.x=m,this.y=g,this.width=v,this.height=y,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(m,g){return g===void 0&&(g=m),this.x=m,this.y=g,this},setSize:function(m,g){return g===void 0&&(g=m),this.width=m,this.height=g,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(m){return m===void 0&&(m=new u),m.setTo(this.x,this.y,this.right,this.y),m},getLineB:function(m){return m===void 0&&(m=new u),m.setTo(this.right,this.y,this.right,this.bottom),m},getLineC:function(m){return m===void 0&&(m=new u),m.setTo(this.right,this.bottom,this.x,this.bottom),m},getLineD:function(m){return m===void 0&&(m=new u),m.setTo(this.x,this.bottom,this.x,this.y),m},left:{get:function(){return this.x},set:function(m){m>=this.right?this.width=0:this.width=this.right-m,this.x=m}},right:{get:function(){return this.x+this.width},set:function(m){m<=this.x?this.width=0:this.width=m-this.x}},top:{get:function(){return this.y},set:function(m){m>=this.bottom?this.height=0:this.height=this.bottom-m,this.y=m}},bottom:{get:function(){return this.y+this.height},set:function(m){m<=this.y?this.height=0:this.height=m-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(m){this.x=m-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(m){this.y=m-this.height/2}}});n.exports=p},94845:n=>{var a=function(s,o){return s.width===o.width&&s.height===o.height};n.exports=a},31730:n=>{var a=function(s,o,d){return d===void 0&&(d=o),s.width*=o,s.height*=d,s};n.exports=a},36899:(n,a,s)=>{var o=s(87841),d=function(l,c,h){h===void 0&&(h=new o);var u=Math.min(l.x,c.x),f=Math.min(l.y,c.y),p=Math.max(l.right,c.right)-u,m=Math.max(l.bottom,c.bottom)-f;return h.setTo(u,f,p,m)};n.exports=d},93232:(n,a,s)=>{var o=s(87841);o.Area=s(62224),o.Ceil=s(98615),o.CeilAll=s(31688),o.CenterOn=s(67502),o.Clone=s(65085),o.Contains=s(37303),o.ContainsPoint=s(96553),o.ContainsRect=s(70273),o.CopyFrom=s(43459),o.Decompose=s(77493),o.Equals=s(9219),o.FitInside=s(53751),o.FitOutside=s(16088),o.Floor=s(80774),o.FloorAll=s(83859),o.FromPoints=s(19217),o.FromXY=s(9477),o.GetAspectRatio=s(8249),o.GetCenter=s(27165),o.GetPoint=s(20812),o.GetPoints=s(34819),o.GetSize=s(51313),o.Inflate=s(86091),o.Intersection=s(53951),o.MarchingAnts=s(14649),o.MergePoints=s(33595),o.MergeRect=s(20074),o.MergeXY=s(92171),o.Offset=s(42981),o.OffsetPoint=s(46907),o.Overlaps=s(60170),o.Perimeter=s(13019),o.PerimeterPoint=s(85133),o.Random=s(26597),o.RandomOutside=s(86470),o.SameDimensions=s(94845),o.Scale=s(31730),o.Union=s(36899),n.exports=o},41658:n=>{var a=function(s){var o=s.x1,d=s.y1,l=s.x2,c=s.y2,h=s.x3,u=s.y3;return Math.abs(((h-o)*(c-d)-(l-o)*(u-d))/2)};n.exports=a},39208:(n,a,s)=>{var o=s(16483),d=function(l,c,h){var u=h*(Math.sqrt(3)/2),f=l,p=c,m=l+h/2,g=c+u,v=l-h/2,y=c+u;return new o(f,p,m,g,v,y)};n.exports=d},39545:(n,a,s)=>{var o=s(94811),d=s(16483),l=function(c,h,u,f,p){h===void 0&&(h=null),u===void 0&&(u=1),f===void 0&&(f=1),p===void 0&&(p=[]);for(var m=o(c,h),g,v,y,x,b,_,C,w,T,S=0;S{var o=s(16483),d=function(l,c,h,u){u===void 0&&(u=h);var f=l,p=c,m=l,g=c-u,v=l+h,y=c;return new o(f,p,m,g,v,y)};n.exports=d},23707:(n,a,s)=>{var o=s(97523),d=s(13584),l=function(c,h,u,f){f===void 0&&(f=o);var p=f(c),m=h-p.x,g=u-p.y;return d(c,m,g)};n.exports=l},97523:(n,a,s)=>{var o=s(2141),d=function(l,c){return c===void 0&&(c=new o),c.x=(l.x1+l.x2+l.x3)/3,c.y=(l.y1+l.y2+l.y3)/3,c};n.exports=d},24951:(n,a,s)=>{var o=s(26099);function d(c,h,u,f){return c*f-h*u}var l=function(c,h){h===void 0&&(h=new o);var u=c.x3,f=c.y3,p=c.x1-u,m=c.y1-f,g=c.x2-u,v=c.y2-f,y=2*d(p,m,g,v),x=d(m,p*p+m*m,v,g*g+v*v),b=d(p,p*p+m*m,g,g*g+v*v);return h.x=u-x/y,h.y=f+b/y,h};n.exports=l},85614:(n,a,s)=>{var o=s(96503),d=function(l,c){c===void 0&&(c=new o);var h=l.x1,u=l.y1,f=l.x2,p=l.y2,m=l.x3,g=l.y3,v=f-h,y=p-u,x=m-h,b=g-u,_=v*(h+f)+y*(u+p),C=x*(h+m)+b*(u+g),w=2*(v*(g-p)-y*(m-f)),T,S;if(Math.abs(w)<1e-6){var E=Math.min(h,f,m),D=Math.min(u,p,g);T=(Math.max(h,f,m)-E)*.5,S=(Math.max(u,p,g)-D)*.5,c.x=E+T,c.y=D+S,c.radius=Math.sqrt(T*T+S*S)}else c.x=(b*_-y*C)/w,c.y=(v*C-x*_)/w,T=c.x-h,S=c.y-u,c.radius=Math.sqrt(T*T+S*S);return c};n.exports=d},74422:(n,a,s)=>{var o=s(16483),d=function(l){return new o(l.x1,l.y1,l.x2,l.y2,l.x3,l.y3)};n.exports=d},10690:n=>{var a=function(s,o,d){var l=s.x3-s.x1,c=s.y3-s.y1,h=s.x2-s.x1,u=s.y2-s.y1,f=o-s.x1,p=d-s.y1,m=l*l+c*c,g=l*h+c*u,v=l*f+c*p,y=h*h+u*u,x=h*f+u*p,b=m*y-g*g,_=b===0?0:1/b,C=(y*v-g*x)*_,w=(m*x-g*v)*_;return C>=0&&w>=0&&C+w<1};n.exports=a},48653:n=>{var a=function(s,o,d,l){d===void 0&&(d=!1),l===void 0&&(l=[]);for(var c=s.x3-s.x1,h=s.y3-s.y1,u=s.x2-s.x1,f=s.y2-s.y1,p=c*c+h*h,m=c*u+h*f,g=u*u+f*f,v=p*g-m*m,y=v===0?0:1/v,x,b,_,C,w,T,S=s.x1,E=s.y1,D=0;D=0&&b>=0&&x+b<1&&(l.push({x:o[D].x,y:o[D].y}),d)));D++);return l};n.exports=a},96006:(n,a,s)=>{var o=s(10690),d=function(l,c){return o(l,c.x,c.y)};n.exports=d},71326:n=>{var a=function(s,o){return o.setTo(s.x1,s.y1,s.x2,s.y2,s.x3,s.y3)};n.exports=a},71694:n=>{var a=function(s,o){return o===void 0&&(o=[]),o.push({x:s.x1,y:s.y1}),o.push({x:s.x2,y:s.y2}),o.push({x:s.x3,y:s.y3}),o};n.exports=a},33522:n=>{var a=function(s,o){return s.x1===o.x1&&s.y1===o.y1&&s.x2===o.x2&&s.y2===o.y2&&s.x3===o.x3&&s.y3===o.y3};n.exports=a},20437:(n,a,s)=>{var o=s(2141),d=s(35001),l=function(c,h,u){u===void 0&&(u=new o);var f=c.getLineA(),p=c.getLineB(),m=c.getLineC();if(h<=0||h>=1)return u.x=f.x1,u.y=f.y1,u;var g=d(f),v=d(p),y=d(m),x=g+v+y,b=x*h,_=0;return bg+v?(b-=g+v,_=b/y,u.x=m.x1+(m.x2-m.x1)*_,u.y=m.y1+(m.y2-m.y1)*_):(b-=g,_=b/v,u.x=p.x1+(p.x2-p.x1)*_,u.y=p.y1+(p.y2-p.y1)*_),u};n.exports=l},80672:(n,a,s)=>{var o=s(35001),d=s(2141),l=function(c,h,u,f){f===void 0&&(f=[]);var p=c.getLineA(),m=c.getLineB(),g=c.getLineC(),v=o(p),y=o(m),x=o(g),b=v+y+x;!h&&u>0&&(h=b/u);for(var _=0;_v+y?(C-=v+y,w=C/x,T.x=g.x1+(g.x2-g.x1)*w,T.y=g.y1+(g.y2-g.y1)*w):(C-=v,w=C/y,T.x=m.x1+(m.x2-m.x1)*w,T.y=m.y1+(m.y2-m.y1)*w),f.push(T)}return f};n.exports=l},39757:(n,a,s)=>{var o=s(2141);function d(c,h,u,f){var p=c-u,m=h-f,g=p*p+m*m;return Math.sqrt(g)}var l=function(c,h){h===void 0&&(h=new o);var u=c.x1,f=c.y1,p=c.x2,m=c.y2,g=c.x3,v=c.y3,y=d(g,v,p,m),x=d(u,f,g,v),b=d(p,m,u,f),_=y+x+b;return h.x=(u*y+p*x+g*b)/_,h.y=(f*y+m*x+v*b)/_,h};n.exports=l},13584:n=>{var a=function(s,o,d){return s.x1+=o,s.y1+=d,s.x2+=o,s.y2+=d,s.x3+=o,s.y3+=d,s};n.exports=a},1376:(n,a,s)=>{var o=s(35001),d=function(l){var c=l.getLineA(),h=l.getLineB(),u=l.getLineC();return o(c)+o(h)+o(u)};n.exports=d},90260:(n,a,s)=>{var o=s(2141),d=function(l,c){c===void 0&&(c=new o);var h=l.x2-l.x1,u=l.y2-l.y1,f=l.x3-l.x1,p=l.y3-l.y1,m=Math.random(),g=Math.random();return m+g>=1&&(m=1-m,g=1-g),c.x=l.x1+(h*m+f*g),c.y=l.y1+(u*m+p*g),c};n.exports=d},52172:(n,a,s)=>{var o=s(99614),d=s(39757),l=function(c,h){var u=d(c);return o(c,u.x,u.y,h)};n.exports=l},49907:(n,a,s)=>{var o=s(99614),d=function(l,c,h){return o(l,c.x,c.y,h)};n.exports=d},99614:n=>{var a=function(s,o,d,l){var c=Math.cos(l),h=Math.sin(l),u=s.x1-o,f=s.y1-d;return s.x1=u*c-f*h+o,s.y1=u*h+f*c+d,u=s.x2-o,f=s.y2-d,s.x2=u*c-f*h+o,s.y2=u*h+f*c+d,u=s.x3-o,f=s.y3-d,s.x3=u*c-f*h+o,s.y3=u*h+f*c+d,s};n.exports=a},16483:(n,a,s)=>{var o=s(83419),d=s(10690),l=s(20437),c=s(80672),h=s(23777),u=s(23031),f=s(90260),p=new o({initialize:function(g,v,y,x,b,_){g===void 0&&(g=0),v===void 0&&(v=0),y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),_===void 0&&(_=0),this.type=h.TRIANGLE,this.x1=g,this.y1=v,this.x2=y,this.y2=x,this.x3=b,this.y3=_},contains:function(m,g){return d(this,m,g)},getPoint:function(m,g){return l(this,m,g)},getPoints:function(m,g,v){return c(this,m,g,v)},getRandomPoint:function(m){return f(this,m)},setTo:function(m,g,v,y,x,b){return m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=0),y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x1=m,this.y1=g,this.x2=v,this.y2=y,this.x3=x,this.y3=b,this},getLineA:function(m){return m===void 0&&(m=new u),m.setTo(this.x1,this.y1,this.x2,this.y2),m},getLineB:function(m){return m===void 0&&(m=new u),m.setTo(this.x2,this.y2,this.x3,this.y3),m},getLineC:function(m){return m===void 0&&(m=new u),m.setTo(this.x3,this.y3,this.x1,this.y1),m},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(m){var g=0;this.x1<=this.x2&&this.x1<=this.x3?g=this.x1-m:this.x2<=this.x1&&this.x2<=this.x3?g=this.x2-m:g=this.x3-m,this.x1-=g,this.x2-=g,this.x3-=g}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(m){var g=0;this.x1>=this.x2&&this.x1>=this.x3?g=this.x1-m:this.x2>=this.x1&&this.x2>=this.x3?g=this.x2-m:g=this.x3-m,this.x1-=g,this.x2-=g,this.x3-=g}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(m){var g=0;this.y1<=this.y2&&this.y1<=this.y3?g=this.y1-m:this.y2<=this.y1&&this.y2<=this.y3?g=this.y2-m:g=this.y3-m,this.y1-=g,this.y2-=g,this.y3-=g}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(m){var g=0;this.y1>=this.y2&&this.y1>=this.y3?g=this.y1-m:this.y2>=this.y1&&this.y2>=this.y3?g=this.y2-m:g=this.y3-m,this.y1-=g,this.y2-=g,this.y3-=g}}});n.exports=p},84435:(n,a,s)=>{var o=s(16483);o.Area=s(41658),o.BuildEquilateral=s(39208),o.BuildFromPolygon=s(39545),o.BuildRight=s(90301),o.CenterOn=s(23707),o.Centroid=s(97523),o.CircumCenter=s(24951),o.CircumCircle=s(85614),o.Clone=s(74422),o.Contains=s(10690),o.ContainsArray=s(48653),o.ContainsPoint=s(96006),o.CopyFrom=s(71326),o.Decompose=s(71694),o.Equals=s(33522),o.GetPoint=s(20437),o.GetPoints=s(80672),o.InCenter=s(39757),o.Perimeter=s(1376),o.Offset=s(13584),o.Random=s(90260),o.Rotate=s(52172),o.RotateAroundPoint=s(49907),o.RotateAroundXY=s(99614),n.exports=o},74457:n=>{var a=function(s,o,d){return{gameObject:s,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:o,hitAreaCallback:d,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}};n.exports=a},84409:n=>{var a=function(s,o){return function(d,l,c,h){var u=s.getPixelAlpha(l,c,h.texture.key,h.frame.name);return u&&u>=o}};n.exports=a},7003:(n,a,s)=>{var o=s(83419),d=s(93301),l=s(50792),c=s(8214),h=s(8443),u=s(78970),f=s(85098),p=s(42515),m=s(36210),g=s(61340),v=s(85955),y=new o({initialize:function(b,_){this.game=b,this.scaleManager,this.canvas,this.config=_,this.enabled=!0,this.events=new l,this.isOver=!0,this.defaultCursor="",this.keyboard=_.inputKeyboard?new u(this):null,this.mouse=_.inputMouse?new f(this):null,this.touch=_.inputTouch?new m(this):null,this.pointers=[],this.pointersTotal=_.inputActivePointers;for(var C=0;C<=this.pointersTotal;C++){var w=new p(this,C);w.smoothFactor=_.inputSmoothFactor,this.pointers.push(w)}this.mousePointer=_.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new g,this._tempMatrix2=new g,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],b.events.once(h.BOOT,this.boot,this)},boot:function(){var x=this.game,b=x.events;this.canvas=x.canvas,this.scaleManager=x.scale,this.events.emit(c.MANAGER_BOOT),b.on(h.PRE_RENDER,this.preRender,this),b.once(h.DESTROY,this.destroy,this)},setCanvasOver:function(x){this.isOver=!0,this.events.emit(c.GAME_OVER,x)},setCanvasOut:function(x){this.isOver=!1,this.events.emit(c.GAME_OUT,x)},preRender:function(){var x=this.game.loop.now,b=this.game.loop.delta,_=this.game.scene.getScenes(!0,!0);this.time=x,this.events.emit(c.MANAGER_UPDATE);for(var C=0;C<_.length;C++){var w=_[C];if(w.sys.input&&w.sys.input.updatePoll(x,b)&&this.globalTopOnly)return}},setDefaultCursor:function(x){this.defaultCursor=x,this.canvas.style.cursor!==x&&(this.canvas.style.cursor=x)},setCursor:function(x){x.cursor&&(this.canvas.style.cursor=x.cursor)},resetCursor:function(x,b){(b||x&&x.cursor)&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(x){x===void 0&&(x=1);var b=[];this.pointersTotal+x>10&&(x=10-this.pointersTotal);for(var _=0;_{var o=s(96503),d=s(87902),l=s(83419),c=s(93301),h=s(74457),u=s(84409),f=s(20339),p=s(8497),m=s(81154),g=s(8214),v=s(50792),y=s(95540),x=s(23777),b=s(89639),_=s(41212),C=s(37277),w=s(87841),T=s(37303),S=s(44594),E=s(16483),D=s(10690),A=new l({Extends:v,initialize:function(R){v.call(this),this.scene=R,this.systems=R.sys,this.settings=R.sys.settings,this.manager=R.sys.game.input,this.pluginEvents=new v,this.enabled=!0,this.displayList,this.cameras,b.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var L={cancelled:!1};this._eventContainer={stopPropagation:function(){L.cancelled=!0}},this._eventData=L,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,R.sys.events.once(S.BOOT,this.boot,this),R.sys.events.on(S.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(S.DESTROY,this.destroy,this),this.pluginEvents.emit(g.BOOT)},start:function(){var M=this.systems.events;M.on(S.TRANSITION_START,this.transitionIn,this),M.on(S.TRANSITION_OUT,this.transitionOut,this),M.on(S.TRANSITION_COMPLETE,this.transitionComplete,this),M.on(S.PRE_UPDATE,this.preUpdate,this),M.once(S.SHUTDOWN,this.shutdown,this),this.manager.events.on(g.GAME_OUT,this.onGameOut,this),this.manager.events.on(g.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(g.START)},onGameOver:function(M){this.isActive()&&this.emit(g.GAME_OVER,M.timeStamp,M)},onGameOut:function(M){this.isActive()&&this.emit(g.GAME_OUT,M.timeStamp,M)},preUpdate:function(){this.pluginEvents.emit(g.PRE_UPDATE);var M=this._pendingRemoval,R=this._pendingInsertion,L=M.length,I=R.length;if(!(L===0&&I===0)){for(var O=this._list,N=0;N-1&&(O.splice(X,1),this.clear(H,!0))}this._pendingRemoval.length=0,this._list=O.concat(R.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(M){this.manager&&this.manager.setCursor(M)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(M,R){if(!this.isActive())return!1;if(this.pluginEvents.emit(g.UPDATE,M,R),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var L,I=this.manager,O=I.pointers;for(L=0;L0)if(this._pollTimer-=R,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var H=!1;for(L=0;L0&&(H=!0)}return H},update:function(M,R){if(!this.isActive())return!1;for(var L=!1,I=0;I0&&(L=!0)}return this._updatedThisFrame=!0,L},clear:function(M,R){R===void 0&&(R=!1),this.disable(M);var L=M.input;L&&(this.removeDebug(M),this.manager.resetCursor(L),L.gameObject=void 0,L.target=void 0,L.hitArea=void 0,L.hitAreaCallback=void 0,L.callbackContext=void 0,M.input=null),R||this.queueForRemoval(M);var I=this._draggable.indexOf(M);return I>-1&&this._draggable.splice(I,1),M},disable:function(M,R){R===void 0&&(R=!1);var L=M.input;L&&(L.enabled=!1,L.dragState=0);for(var I=this._drag,O=this._over,N=this.manager,H=0,X;H-1&&I[H].splice(X,1),X=O[H].indexOf(M),X>-1&&O[H].splice(X,1);return R&&this.resetCursor(),this},enable:function(M,R,L,I){return I===void 0&&(I=!1),M.input?M.input.enabled=!0:this.setHitArea(M,R,L),M.input&&I&&!M.input.dropZone&&(M.input.dropZone=I),this},hitTestPointer:function(M){for(var R=this.cameras.getCamerasBelowPointer(M),L=0;L0)return M.camera=I,O}return M.camera=R[0],[]},processDownEvents:function(M){var R=0,L=this._temp,I=this._eventData,O=this._eventContainer;I.cancelled=!1;for(var N=0;N0&&f(M.x,M.y,M.downX,M.downY)>=O||I>0&&R>=M.downTime+I)&&(L=!0),L)return this.setDragState(M,3),this.processDragStartList(M)},processDragStartList:function(M){if(this.getDragState(M)!==3)return 0;var R=this._drag[M.id];R.length>1&&(R=R.slice(0));for(var L=0;L1&&(this.sortGameObjects(L,M),this.topOnly&&L.splice(1)),this._drag[M.id]=L,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(M,3),this.processDragStartList(M)):(this.setDragState(M,2),0))},processDragMoveEvent:function(M){if(this.getDragState(M)===2&&this.processDragThresholdEvent(M,this.manager.game.loop.now),this.getDragState(M)!==4)return 0;var R=this._tempZones,L=this._drag[M.id];L.length>1&&(L=L.slice(0));for(var I=0;I0?(O.emit(g.GAMEOBJECT_DRAG_LEAVE,M,H),this.emit(g.DRAG_LEAVE,M,O,H),N.target=R[0],H=N.target,O.emit(g.GAMEOBJECT_DRAG_ENTER,M,H),this.emit(g.DRAG_ENTER,M,O,H)):(O.emit(g.GAMEOBJECT_DRAG_LEAVE,M,H),this.emit(g.DRAG_LEAVE,M,O,H),R[0]?(N.target=R[0],H=N.target,O.emit(g.GAMEOBJECT_DRAG_ENTER,M,H),this.emit(g.DRAG_ENTER,M,O,H)):N.target=null)}else!H&&R[0]&&(N.target=R[0],H=N.target,O.emit(g.GAMEOBJECT_DRAG_ENTER,M,H),this.emit(g.DRAG_ENTER,M,O,H));var V,z,F=M.positionToCamera(N.dragStartCamera);if(!O.parentContainer)V=F.x-N.dragX,z=F.y-N.dragY;else{var k=F.x-N.dragStartXGlobal,G=F.y-N.dragStartYGlobal,Z=O.getParentRotation(),J=k*Math.cos(Z)+G*Math.sin(Z),W=G*Math.cos(Z)-k*Math.sin(Z);J*=1/O.parentContainer.scaleX,W*=1/O.parentContainer.scaleY,V=J+N.dragStartX,z=W+N.dragStartY}O.emit(g.GAMEOBJECT_DRAG,M,V,z),this.emit(g.DRAG,M,O,V,z)}return L.length},processDragUpEvent:function(M){var R=this._drag[M.id];R.length>1&&(R=R.slice(0));for(var L=0;L0){var N=this.manager,H=this._eventData,X=this._eventContainer;H.cancelled=!1;for(var V=0;V0){var O=this.manager,N=this._eventData,H=this._eventContainer;N.cancelled=!1,this.sortGameObjects(R,M);for(var X=0;X0){for(this.sortGameObjects(O,M),L=0;L0){for(this.sortGameObjects(N,M),L=0;L-1&&this._draggable.splice(O,1)}return this},makePixelPerfect:function(M){M===void 0&&(M=1);var R=this.systems.textures;return u(R,M)},setHitArea:function(M,R,L){if(R===void 0)return this.setHitAreaFromTexture(M);Array.isArray(M)||(M=[M]);var I=!1,O=!1,N=!1,H=!1,X=!1,V=!0;if(_(R)&&Object.keys(R).length){var z=R,F=M.some(function(W){return W.hasOwnProperty("faces")});if(!F){R=y(z,"hitArea",null),L=y(z,"hitAreaCallback",null),X=y(z,"pixelPerfect",!1);var k=y(z,"alphaTolerance",1);X&&(R={},L=this.makePixelPerfect(k))}I=y(z,"draggable",!1),O=y(z,"dropZone",!1),N=y(z,"cursor",!1),H=y(z,"useHandCursor",!1),(!R||!L)&&(this.setHitAreaFromTexture(M),V=!1)}else typeof R=="function"&&!L&&(L=R,R={});for(var G=0;G{var o=s(35154),d={},l={};l.register=function(c,h,u,f,p){d[c]={plugin:h,mapping:u,settingsKey:f,configKey:p}},l.getPlugin=function(c){return d[c]},l.install=function(c){var h=c.scene.sys,u=h.settings.input,f=h.game.config;for(var p in d){var m=d[p].plugin,g=d[p].mapping,v=d[p].settingsKey,y=d[p].configKey;o(u,v,f[y])&&(c[g]=new m(c))}},l.remove=function(c){d.hasOwnProperty(c)&&delete d[c]},n.exports=l},42515:(n,a,s)=>{var o=s(31040),d=s(83419),l=s(20339),c=s(43855),h=s(47235),u=s(26099),f=s(25892),p=new d({initialize:function(g,v){this.manager=g,this.id=v,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new u,this.prevPosition=new u,this.midPoint=new u(-1,-1),this.velocity=new u,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=v===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(m){var g=m.getWorldPoint(this.x,this.y);return this.worldX=g.x,this.worldY=g.y,this},positionToCamera:function(m,g){return m.getWorldPoint(this.x,this.y,g)},updateMotion:function(){var m=this.position.x,g=this.position.y,v=this.midPoint.x,y=this.midPoint.y;if(!(m===v&&g===y)){var x=h(this.motionFactor,v,m),b=h(this.motionFactor,y,g);c(x,m,.1)&&(x=m),c(b,g,.1)&&(b=g),this.midPoint.set(x,b);var _=m-x,C=g-b;this.velocity.set(_,C),this.angle=o(x,b,m,g),this.distance=Math.sqrt(_*_+C*C)}},up:function(m){"buttons"in m&&(this.buttons=m.buttons),this.event=m,this.button=m.button,this.upElement=m.target,this.manager.transformPointer(this,m.pageX,m.pageY,!1),m.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=m.timeStamp,this.wasTouch=!1)},down:function(m){"buttons"in m&&(this.buttons=m.buttons),this.event=m,this.button=m.button,this.downElement=m.target,this.manager.transformPointer(this,m.pageX,m.pageY,!1),m.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),f.macOS&&m.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=m.timeStamp),this.wasTouch=!1},move:function(m){"buttons"in m&&(this.buttons=m.buttons),this.event=m,this.manager.transformPointer(this,m.pageX,m.pageY,!0),this.locked&&(this.movementX=m.movementX||m.mozMovementX||m.webkitMovementX||0,this.movementY=m.movementY||m.mozMovementY||m.webkitMovementY||0),this.moveTime=m.timeStamp,this.wasTouch=!1},wheel:function(m){"buttons"in m&&(this.buttons=m.buttons),this.event=m,this.manager.transformPointer(this,m.pageX,m.pageY,!1),this.deltaX=m.deltaX,this.deltaY=m.deltaY,this.deltaZ=m.deltaZ,this.wasTouch=!1},touchstart:function(m,g){m.pointerId&&(this.pointerId=m.pointerId),this.identifier=m.identifier,this.target=m.target,this.active=!0,this.buttons=1,this.event=g,this.downElement=m.target,this.manager.transformPointer(this,m.pageX,m.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=g.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(m,g){this.event=g,this.manager.transformPointer(this,m.pageX,m.pageY,!0),this.moveTime=g.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(m,g){this.buttons=0,this.event=g,this.upElement=m.target,this.manager.transformPointer(this,m.pageX,m.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=g.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(m,g){this.buttons=0,this.event=g,this.upElement=m.target,this.manager.transformPointer(this,m.pageX,m.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=g.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.buttons===0?this.button===0&&!this.isDown:this.button===0},rightButtonReleased:function(){return this.buttons===0?this.button===2&&!this.isDown:this.button===2},middleButtonReleased:function(){return this.buttons===0?this.button===1&&!this.isDown:this.button===1},backButtonReleased:function(){return this.buttons===0?this.button===3&&!this.isDown:this.button===3},forwardButtonReleased:function(){return this.buttons===0?this.button===4&&!this.isDown:this.button===4},getDistance:function(){return this.isDown?l(this.downX,this.downY,this.x,this.y):l(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?o(this.downX,this.downY,this.x,this.y):o(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(m,g){m===void 0&&(m=10),g===void 0&&(g=[]);for(var v=this.prevPosition.x,y=this.prevPosition.y,x=this.position.x,b=this.position.y,_=0;_{var a={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};n.exports=a},7179:n=>{n.exports="boot"},85375:n=>{n.exports="destroy"},39843:n=>{n.exports="dragend"},23388:n=>{n.exports="dragenter"},16133:n=>{n.exports="drag"},27829:n=>{n.exports="dragleave"},53904:n=>{n.exports="dragover"},56058:n=>{n.exports="dragstart"},2642:n=>{n.exports="drop"},88171:n=>{n.exports="gameobjectdown"},36147:n=>{n.exports="dragend"},71692:n=>{n.exports="dragenter"},96149:n=>{n.exports="drag"},81285:n=>{n.exports="dragleave"},74048:n=>{n.exports="dragover"},21322:n=>{n.exports="dragstart"},49378:n=>{n.exports="drop"},86754:n=>{n.exports="gameobjectmove"},86433:n=>{n.exports="gameobjectout"},60709:n=>{n.exports="gameobjectover"},24081:n=>{n.exports="pointerdown"},11172:n=>{n.exports="pointermove"},18907:n=>{n.exports="pointerout"},95579:n=>{n.exports="pointerover"},35368:n=>{n.exports="pointerup"},26972:n=>{n.exports="wheel"},47078:n=>{n.exports="gameobjectup"},73802:n=>{n.exports="gameobjectwheel"},56718:n=>{n.exports="gameout"},25936:n=>{n.exports="gameover"},27503:n=>{n.exports="boot"},50852:n=>{n.exports="process"},96438:n=>{n.exports="update"},59152:n=>{n.exports="pointerlockchange"},47777:n=>{n.exports="pointerdown"},27957:n=>{n.exports="pointerdownoutside"},19444:n=>{n.exports="pointermove"},54251:n=>{n.exports="pointerout"},18667:n=>{n.exports="pointerover"},27192:n=>{n.exports="pointerup"},24652:n=>{n.exports="pointerupoutside"},45132:n=>{n.exports="wheel"},44512:n=>{n.exports="preupdate"},15757:n=>{n.exports="shutdown"},41637:n=>{n.exports="start"},93802:n=>{n.exports="update"},8214:(n,a,s)=>{n.exports={BOOT:s(7179),DESTROY:s(85375),DRAG_END:s(39843),DRAG_ENTER:s(23388),DRAG:s(16133),DRAG_LEAVE:s(27829),DRAG_OVER:s(53904),DRAG_START:s(56058),DROP:s(2642),GAME_OUT:s(56718),GAME_OVER:s(25936),GAMEOBJECT_DOWN:s(88171),GAMEOBJECT_DRAG_END:s(36147),GAMEOBJECT_DRAG_ENTER:s(71692),GAMEOBJECT_DRAG:s(96149),GAMEOBJECT_DRAG_LEAVE:s(81285),GAMEOBJECT_DRAG_OVER:s(74048),GAMEOBJECT_DRAG_START:s(21322),GAMEOBJECT_DROP:s(49378),GAMEOBJECT_MOVE:s(86754),GAMEOBJECT_OUT:s(86433),GAMEOBJECT_OVER:s(60709),GAMEOBJECT_POINTER_DOWN:s(24081),GAMEOBJECT_POINTER_MOVE:s(11172),GAMEOBJECT_POINTER_OUT:s(18907),GAMEOBJECT_POINTER_OVER:s(95579),GAMEOBJECT_POINTER_UP:s(35368),GAMEOBJECT_POINTER_WHEEL:s(26972),GAMEOBJECT_UP:s(47078),GAMEOBJECT_WHEEL:s(73802),MANAGER_BOOT:s(27503),MANAGER_PROCESS:s(50852),MANAGER_UPDATE:s(96438),POINTER_DOWN:s(47777),POINTER_DOWN_OUTSIDE:s(27957),POINTER_MOVE:s(19444),POINTER_OUT:s(54251),POINTER_OVER:s(18667),POINTER_UP:s(27192),POINTER_UP_OUTSIDE:s(24652),POINTER_WHEEL:s(45132),POINTERLOCK_CHANGE:s(59152),PRE_UPDATE:s(44512),SHUTDOWN:s(15757),START:s(41637),UPDATE:s(93802)}},97421:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h){this.pad=c,this.events=c.events,this.index=h,this.value=0,this.threshold=.1},update:function(l){this.value=l},getValue:function(){return Math.abs(this.value){var o=s(83419),d=s(92734),l=new o({initialize:function(h,u){this.pad=h,this.events=h.manager,this.index=u,this.value=0,this.threshold=1,this.pressed=!1},update:function(c){this.value=c;var h=this.pad,u=this.index;c>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(d.BUTTON_DOWN,h,this,c),this.pad.emit(d.GAMEPAD_BUTTON_DOWN,u,c,this)):this.pressed&&(this.pressed=!1,this.events.emit(d.BUTTON_UP,h,this,c),this.pad.emit(d.GAMEPAD_BUTTON_UP,u,c,this))},destroy:function(){this.pad=null,this.events=null}});n.exports=l},99125:(n,a,s)=>{var o=s(97421),d=s(28884),l=s(83419),c=s(50792),h=s(26099),u=new l({Extends:c,initialize:function(p,m){c.call(this),this.manager=p,this.pad=m,this.id=m.id,this.index=m.index;for(var g=[],v=0;v=2&&(this.leftStick.set(y[0].getValue(),y[1].getValue()),v>=4&&this.rightStick.set(y[2].getValue(),y[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var f;for(f=0;f{var o=s(83419),d=s(50792),l=s(92734),c=s(99125),h=s(35154),u=s(89639),f=s(8214),p=new o({Extends:d,initialize:function(g){d.call(this),this.scene=g.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=g,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,g.pluginEvents.once(f.BOOT,this.boot,this),g.pluginEvents.on(f.START,this.start,this)},boot:function(){var m=this.scene.sys.game,g=this.settings.input,v=m.config;this.enabled=h(g,"gamepad",v.inputGamepad)&&m.device.input.gamepads,this.target=h(g,"gamepad.target",v.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(f.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(f.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var m=this,g=this.target,v=function(y){y.defaultPrevented||!m.isActive()||(m.refreshPads(),m.queue.push(y))};this.onGamepadHandler=v,g.addEventListener("gamepadconnected",v,!1),g.addEventListener("gamepaddisconnected",v,!1),this.sceneInputPlugin.pluginEvents.on(f.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(f.UPDATE,this.update);for(var m=0;m{n.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:n=>{n.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:n=>{n.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(n,a,s)=>{n.exports={DUALSHOCK_4:s(65294),SNES_USB:s(89651),XBOX_360:s(90089)}},46008:n=>{n.exports="down"},7629:n=>{n.exports="up"},42206:n=>{n.exports="connected"},86544:n=>{n.exports="disconnected"},94784:n=>{n.exports="down"},14325:n=>{n.exports="up"},92734:(n,a,s)=>{n.exports={BUTTON_DOWN:s(46008),BUTTON_UP:s(7629),CONNECTED:s(42206),DISCONNECTED:s(86544),GAMEPAD_BUTTON_DOWN:s(94784),GAMEPAD_BUTTON_UP:s(14325)}},48646:(n,a,s)=>{n.exports={Axis:s(97421),Button:s(28884),Events:s(92734),Gamepad:s(99125),GamepadPlugin:s(56654),Configs:s(64894)}},14350:(n,a,s)=>{var o=s(93301),d=s(79291),l={CreatePixelPerfectHandler:s(84409),CreateInteractiveObject:s(74457),Events:s(8214),Gamepad:s(48646),InputManager:s(7003),InputPlugin:s(48205),InputPluginCache:s(89639),Keyboard:s(51442),Mouse:s(87078),Pointer:s(42515),Touch:s(95618)};l=d(!1,l,o),n.exports=l},78970:(n,a,s)=>{var o=s(72905),d=s(83419),l=s(8443),c=s(8214),h=s(46032),u=s(29747),f=new d({initialize:function(m){this.manager=m,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=u,this.onKeyUp=u,m.events.once(c.MANAGER_BOOT,this.boot,this)},boot:function(){var p=this.manager.config;this.enabled=p.inputKeyboard,this.target=p.inputKeyboardEventTarget,this.addCapture(p.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(l.POST_STEP,this.postUpdate,this)},startListeners:function(){var p=this;this.onKeyDown=function(g){if(!(g.defaultPrevented||!p.enabled||!p.manager)){p.queue.push(g),p.manager.events.emit(c.MANAGER_PROCESS);var v=g.altKey||g.ctrlKey||g.shiftKey||g.metaKey;p.preventDefault&&!v&&p.captures.indexOf(g.keyCode)>-1&&g.preventDefault()}},this.onKeyUp=function(g){if(!(g.defaultPrevented||!p.enabled||!p.manager)){p.queue.push(g),p.manager.events.emit(c.MANAGER_PROCESS);var v=g.altKey||g.ctrlKey||g.shiftKey||g.metaKey;p.preventDefault&&!v&&p.captures.indexOf(g.keyCode)>-1&&g.preventDefault()}};var m=this.target;m&&(m.addEventListener("keydown",this.onKeyDown,!1),m.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var p=this.target;p.removeEventListener("keydown",this.onKeyDown,!1),p.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(p){typeof p=="string"&&(p=p.split(",")),Array.isArray(p)||(p=[p]);for(var m=this.captures,g=0;g0},removeCapture:function(p){typeof p=="string"&&(p=p.split(",")),Array.isArray(p)||(p=[p]);for(var m=this.captures,g=0;g0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(l.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});n.exports=f},28846:(n,a,s)=>{var o=s(83419),d=s(50792),l=s(95922),c=s(8443),h=s(35154),u=s(8214),f=s(89639),p=s(30472),m=s(46032),g=s(87960),v=s(74600),y=s(44594),x=s(56583),b=new o({Extends:d,initialize:function(C){d.call(this),this.game=C.systems.game,this.scene=C.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=C,this.manager=C.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,C.pluginEvents.once(u.BOOT,this.boot,this),C.pluginEvents.on(u.START,this.start,this)},boot:function(){var _=this.settings.input;this.enabled=h(_,"keyboard",!0);var C=h(_,"keyboard.capture",null);C&&this.addCaptures(C),this.sceneInputPlugin.pluginEvents.once(u.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(u.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(u.SHUTDOWN,this.shutdown,this),this.game.events.on(c.BLUR,this.resetKeys,this),this.scene.sys.events.on(y.PAUSE,this.resetKeys,this),this.scene.sys.events.on(y.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(_){return this.manager.addCapture(_),this},removeCapture:function(_){return this.manager.removeCapture(_),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:m.UP,down:m.DOWN,left:m.LEFT,right:m.RIGHT,space:m.SPACE,shift:m.SHIFT})},addKeys:function(_,C,w){C===void 0&&(C=!0),w===void 0&&(w=!1);var T={};if(typeof _=="string"){_=_.split(",");for(var S=0;S<_.length;S++){var E=_[S].trim();E&&(T[E]=this.addKey(E,C,w))}}else for(var D in _)T[D]=this.addKey(_[D],C,w);return T},addKey:function(_,C,w){C===void 0&&(C=!0),w===void 0&&(w=!1);var T=this.keys;if(_ instanceof p){var S=T.indexOf(_);return S>-1?T[S]=_:T[_.keyCode]=_,C&&this.addCapture(_.keyCode),_.setEmitOnRepeat(w),_}return typeof _=="string"&&(_=m[_.toUpperCase()]),T[_]||(T[_]=new p(this,_),C&&this.addCapture(_),T[_].setEmitOnRepeat(w)),T[_]},removeKey:function(_,C,w){C===void 0&&(C=!1),w===void 0&&(w=!1);var T=this.keys,S;if(_ instanceof p){var E=T.indexOf(_);E>-1&&(S=this.keys[E],this.keys[E]=void 0)}else typeof _=="string"&&(_=m[_.toUpperCase()]);return T[_]&&(S=T[_],T[_]=void 0),S&&(S.plugin=null,w&&this.removeCapture(S.keyCode),C&&S.destroy()),this},removeAllKeys:function(_,C){_===void 0&&(_=!1),C===void 0&&(C=!1);for(var w=this.keys,T=0;T_._tick)return _._tick=w,!0}return!1},update:function(){var _=this.manager.queue,C=_.length;if(!(!this.isActive()||C===0))for(var w=this.keys,T=0;T{var a=function(s,o){return o.timeLastMatched=s.timeStamp,o.index++,o.index===o.size?!0:(o.current=o.keyCodes[o.index],!1)};n.exports=a},87960:(n,a,s)=>{var o=s(83419),d=s(95922),l=s(95540),c=s(68769),h=s(92803),u=new o({initialize:function(p,m,g){if(g===void 0&&(g={}),m.length<2)return!1;this.manager=p,this.enabled=!0,this.keyCodes=[];for(var v=0;v{var o=s(66970),d=function(l,c){if(c.matched)return!0;var h=!1,u=!1;if(l.keyCode===c.current)if(c.index>0&&c.maxKeyDelay>0){var f=c.timeLastMatched+c.maxKeyDelay;l.timeStamp<=f&&(u=!0,h=o(l,c))}else u=!0,h=o(l,c);return!u&&c.resetOnWrongKey&&(c.index=0,c.current=c.keyCodes[0]),h&&(c.timeLastMatched=l.timeStamp,c.matched=!0,c.timeMatched=l.timeStamp),h};n.exports=d},92803:n=>{var a=function(s){return s.current=s.keyCodes[0],s.index=0,s.timeLastMatched=0,s.matched=!1,s.timeMatched=0,s};n.exports=a},92612:n=>{n.exports="keydown"},23345:n=>{n.exports="keyup"},21957:n=>{n.exports="keycombomatch"},44743:n=>{n.exports="down"},3771:n=>{n.exports="keydown-"},46358:n=>{n.exports="keyup-"},75674:n=>{n.exports="up"},95922:(n,a,s)=>{n.exports={ANY_KEY_DOWN:s(92612),ANY_KEY_UP:s(23345),COMBO_MATCH:s(21957),DOWN:s(44743),KEY_DOWN:s(3771),KEY_UP:s(46358),UP:s(75674)}},51442:(n,a,s)=>{n.exports={Events:s(95922),KeyboardManager:s(78970),KeyboardPlugin:s(28846),Key:s(30472),KeyCodes:s(46032),KeyCombo:s(87960),AdvanceKeyCombo:s(66970),ProcessKeyCombo:s(68769),ResetKeyCombo:s(92803),JustDown:s(90229),JustUp:s(38796),DownDuration:s(37015),UpDuration:s(41170)}},37015:n=>{var a=function(s,o){o===void 0&&(o=50);var d=s.plugin.game.loop.time-s.timeDown;return s.isDown&&d{var a=function(s){return s._justDown?(s._justDown=!1,!0):!1};n.exports=a},38796:n=>{var a=function(s){return s._justUp?(s._justUp=!1,!0):!1};n.exports=a},30472:(n,a,s)=>{var o=s(83419),d=s(50792),l=s(95922),c=new o({Extends:d,initialize:function(u,f){d.call(this),this.plugin=u,this.keyCode=f,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(h){return this.emitOnRepeat=h,this},onDown:function(h){this.originalEvent=h,this.enabled&&(this.altKey=h.altKey,this.ctrlKey=h.ctrlKey,this.shiftKey=h.shiftKey,this.metaKey=h.metaKey,this.location=h.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(l.DOWN,this,h):(this.isDown=!0,this.isUp=!1,this.timeDown=h.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(l.DOWN,this,h)))},onUp:function(h){this.originalEvent=h,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=h.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(l.UP,this,h))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});n.exports=c},46032:n=>{var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};n.exports=a},74600:(n,a,s)=>{var o=s(46032),d={};for(var l in o)d[o[l]]=l;n.exports=d},41170:n=>{var a=function(s,o){o===void 0&&(o=50);var d=s.plugin.game.loop.time-s.timeUp;return s.isUp&&d{var o=s(83419),d=s(89357),l=s(8214),c=s(29747),h=new o({initialize:function(f){this.manager=f,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=c,this.onMouseDown=c,this.onMouseUp=c,this.onMouseDownWindow=c,this.onMouseUpWindow=c,this.onMouseOver=c,this.onMouseOut=c,this.onMouseWheel=c,this.pointerLockChange=c,this.isTop=!0,f.events.once(l.MANAGER_BOOT,this.boot,this)},boot:function(){var u=this.manager.config;this.enabled=u.inputMouse,this.target=u.inputMouseEventTarget,this.passive=u.inputMousePassive,this.preventDefaultDown=u.inputMousePreventDefaultDown,this.preventDefaultUp=u.inputMousePreventDefaultUp,this.preventDefaultMove=u.inputMousePreventDefaultMove,this.preventDefaultWheel=u.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,u.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(u){return u.preventDefault(),!1}),this},requestPointerLock:function(){if(d.pointerLock){var u=this.target;u.requestPointerLock=u.requestPointerLock||u.mozRequestPointerLock||u.webkitRequestPointerLock,u.requestPointerLock()}},releasePointerLock:function(){d.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var u=this.target;if(u){var f=this,p=this.manager,m=p.canvas,g=window&&window.focus&&p.game.config.autoFocus;this.onMouseMove=function(y){!y.defaultPrevented&&f.enabled&&p&&p.enabled&&(p.onMouseMove(y),f.preventDefaultMove&&y.preventDefault())},this.onMouseDown=function(y){g&&window.focus(),!y.defaultPrevented&&f.enabled&&p&&p.enabled&&(p.onMouseDown(y),f.preventDefaultDown&&y.target===m&&y.preventDefault())},this.onMouseDownWindow=function(y){y.sourceCapabilities&&y.sourceCapabilities.firesTouchEvents||!y.defaultPrevented&&f.enabled&&p&&p.enabled&&y.target!==m&&p.onMouseDown(y)},this.onMouseUp=function(y){!y.defaultPrevented&&f.enabled&&p&&p.enabled&&(p.onMouseUp(y),f.preventDefaultUp&&y.target===m&&y.preventDefault())},this.onMouseUpWindow=function(y){y.sourceCapabilities&&y.sourceCapabilities.firesTouchEvents||!y.defaultPrevented&&f.enabled&&p&&p.enabled&&y.target!==m&&p.onMouseUp(y)},this.onMouseOver=function(y){!y.defaultPrevented&&f.enabled&&p&&p.enabled&&p.setCanvasOver(y)},this.onMouseOut=function(y){!y.defaultPrevented&&f.enabled&&p&&p.enabled&&p.setCanvasOut(y)},this.onMouseWheel=function(y){!y.defaultPrevented&&f.enabled&&p&&p.enabled&&p.onMouseWheel(y),f.preventDefaultWheel&&y.target===m&&y.preventDefault()};var v={passive:!0};if(u.addEventListener("mousemove",this.onMouseMove),u.addEventListener("mousedown",this.onMouseDown),u.addEventListener("mouseup",this.onMouseUp),u.addEventListener("mouseover",this.onMouseOver,v),u.addEventListener("mouseout",this.onMouseOut,v),this.preventDefaultWheel?u.addEventListener("wheel",this.onMouseWheel,{passive:!1}):u.addEventListener("wheel",this.onMouseWheel,v),window&&p.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,v),window.top.addEventListener("mouseup",this.onMouseUpWindow,v)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,v),window.addEventListener("mouseup",this.onMouseUpWindow,v),this.isTop=!1}d.pointerLock&&(this.pointerLockChange=function(y){var x=f.target;f.locked=document.pointerLockElement===x||document.mozPointerLockElement===x||document.webkitPointerLockElement===x,p.onPointerLockChange(y)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var u=this.target;u.removeEventListener("mousemove",this.onMouseMove),u.removeEventListener("mousedown",this.onMouseDown),u.removeEventListener("mouseup",this.onMouseUp),u.removeEventListener("mouseover",this.onMouseOver),u.removeEventListener("mouseout",this.onMouseOut),window&&(u=this.isTop?window.top:window,u.removeEventListener("mousedown",this.onMouseDownWindow),u.removeEventListener("mouseup",this.onMouseUpWindow)),d.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});n.exports=h},87078:(n,a,s)=>{n.exports={MouseManager:s(85098)}},36210:(n,a,s)=>{var o=s(83419),d=s(8214),l=s(29747),c=new o({initialize:function(u){this.manager=u,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=l,this.onTouchStartWindow=l,this.onTouchMove=l,this.onTouchEnd=l,this.onTouchEndWindow=l,this.onTouchCancel=l,this.onTouchCancelWindow=l,this.isTop=!0,u.events.once(d.MANAGER_BOOT,this.boot,this)},boot:function(){var h=this.manager.config;this.enabled=h.inputTouch,this.target=h.inputTouchEventTarget,this.capture=h.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,h.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(h){return h.preventDefault(),!1}),this},startListeners:function(){var h=this.target;if(h){var u=this,f=this.manager,p=f.canvas,m=window&&window.focus&&f.game.config.autoFocus;this.onTouchMove=function(x){!x.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onTouchMove(x),u.capture&&x.cancelable&&x.preventDefault())},this.onTouchStart=function(x){m&&window.focus(),!x.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onTouchStart(x),u.capture&&x.cancelable&&x.target===p&&x.preventDefault())},this.onTouchStartWindow=function(x){!x.defaultPrevented&&u.enabled&&f&&f.enabled&&x.target!==p&&f.onTouchStart(x)},this.onTouchEnd=function(x){!x.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onTouchEnd(x),u.capture&&x.cancelable&&x.target===p&&x.preventDefault())},this.onTouchEndWindow=function(x){!x.defaultPrevented&&u.enabled&&f&&f.enabled&&x.target!==p&&f.onTouchEnd(x)},this.onTouchCancel=function(x){!x.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onTouchCancel(x),u.capture&&x.preventDefault())},this.onTouchCancelWindow=function(x){!x.defaultPrevented&&u.enabled&&f&&f.enabled&&f.onTouchCancel(x)};var g=this.capture,v={passive:!0},y={passive:!1};if(h.addEventListener("touchstart",this.onTouchStart,g?y:v),h.addEventListener("touchmove",this.onTouchMove,g?y:v),h.addEventListener("touchend",this.onTouchEnd,g?y:v),h.addEventListener("touchcancel",this.onTouchCancel,g?y:v),window&&f.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,y),window.top.addEventListener("touchend",this.onTouchEndWindow,y),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,y)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,y),window.addEventListener("touchend",this.onTouchEndWindow,y),window.addEventListener("touchcancel",this.onTouchCancelWindow,y),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var h=this.target;h.removeEventListener("touchstart",this.onTouchStart),h.removeEventListener("touchmove",this.onTouchMove),h.removeEventListener("touchend",this.onTouchEnd),h.removeEventListener("touchcancel",this.onTouchCancel),window&&(h=this.isTop?window.top:window,h.removeEventListener("touchstart",this.onTouchStartWindow),h.removeEventListener("touchend",this.onTouchEndWindow),h.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});n.exports=c},95618:(n,a,s)=>{n.exports={TouchManager:s(36210)}},41299:(n,a,s)=>{var o=s(83419),d=s(23906),l=s(54899),c=s(95540),h=s(98356),u=s(3374),f=s(84376),p=s(92638),m=new o({initialize:function(v,y){if(this.loader=v,this.cache=c(y,"cache",!1),this.type=c(y,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=c(y,"key",!1);var x=this.key;if(v.prefix&&v.prefix!==""&&(this.key=v.prefix+x),!this.key)throw new Error("Invalid File key: "+this.key);var b=c(y,"url");b===void 0?b=v.path+x+"."+c(y,"extension",""):typeof b=="string"&&!b.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(b=v.path+b),this.url=b,this.src="",this.xhrSettings=p(c(y,"responseType",void 0)),c(y,"xhrSettings",!1)&&(this.xhrSettings=u(this.xhrSettings,c(y,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?d.FILE_POPULATED:d.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=c(y,"config",{}),this.multiFile,this.linkFile,this.base64=typeof b=="string"&&b.indexOf("data:")===0,this.retryAttempts=c(y,"maxRetries",v.maxRetries)},setLink:function(g){this.linkFile=g,g.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===d.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=d.FILE_LOADING,this.src=h(this,this.loader.baseURL),!this.src)throw new Error("URL Error in File: "+this.key+" from: "+this.url);this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=f(this,this.loader.xhr)}},onLoad:function(g,v){var y=g.responseURL&&this.loader.localSchemes.some(function(_){return g.responseURL.indexOf(_)===0}),x=y&&v.target.status===0,b=!(v.target&&v.target.status!==200)||x;g.readyState===4&&g.status>=400&&g.status<=599&&(b=!1),this.state=d.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,b)},onBase64Load:function(g){this.xhrLoader=g,this.state=d.FILE_LOADED,this.percentComplete=1,this.loader.emit(l.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.retryAttempts>0?(this.retryAttempts--,this.load()):this.loader.nextFile(this,!1)},onProgress:function(g){g.lengthComputable&&(this.bytesLoaded=g.loaded,this.bytesTotal=g.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(l.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=d.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=d.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=d.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(g){if(this.state!==d.FILE_PENDING_DESTROY){g===void 0&&(g=this.data);var v=this.key,y=this.type;this.loader.emit(l.FILE_COMPLETE,v,y,g),this.loader.emit(l.FILE_KEY_COMPLETE+y+"-"+v,v,y,g),this.loader.flagForRemoval(this),this.state=d.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});m.createObjectURL=function(g,v,y){if(typeof URL=="function")g.src=URL.createObjectURL(v);else{var x=new FileReader;x.onload=function(){g.removeAttribute("crossOrigin"),g.src="data:"+(v.type||y)+";base64,"+x.result.split(",")[1]},x.onerror=g.onerror,x.readAsDataURL(v)}},m.revokeObjectURL=function(g){typeof URL=="function"&&URL.revokeObjectURL(g.src)},n.exports=m},74099:n=>{var a={},s={install:function(o){for(var d in a)o[d]=a[d]},register:function(o,d){a[o]=d},destroy:function(){a={}}};n.exports=s},98356:n=>{var a=function(s,o){return s.url?s.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?s.url:o+s.url:!1};n.exports=a},74261:(n,a,s)=>{var o=s(83419),d=s(23906),l=s(35072),c=s(50792),h=s(54899),u=s(74099),f=s(95540),p=s(35154),m=s(41212),g=s(37277),v=s(44594),y=s(92638),x=new o({Extends:c,initialize:function(_){c.call(this);var C=_.sys.game.config,w=_.sys.settings.loader;this.scene=_,this.systems=_.sys,this.cacheManager=_.sys.cache,this.textureManager=_.sys.textures,this.sceneManager=_.sys.game.scene,u.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(f(w,"baseURL",C.loaderBaseURL)),this.setPath(f(w,"path",C.loaderPath)),this.setPrefix(f(w,"prefix",C.loaderPrefix)),this.maxParallelDownloads=f(w,"maxParallelDownloads",C.loaderMaxParallelDownloads),this.xhr=y(f(w,"responseType",C.loaderResponseType),f(w,"async",C.loaderAsync),f(w,"user",C.loaderUser),f(w,"password",C.loaderPassword),f(w,"timeout",C.loaderTimeout),f(w,"withCredentials",C.loaderWithCredentials)),this.crossOrigin=f(w,"crossOrigin",C.loaderCrossOrigin),this.imageLoadType=f(w,"imageLoadType",C.loaderImageLoadType),this.localSchemes=f(w,"localScheme",C.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new l,this.inflight=new l,this.queue=new l,this._deleteQueue=new l,this.totalFailed=0,this.totalComplete=0,this.state=d.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=f(w,"maxRetries",C.loaderMaxRetries),_.sys.events.once(v.BOOT,this.boot,this),_.sys.events.on(v.START,this.pluginStart,this)},boot:function(){this.systems.events.once(v.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(v.SHUTDOWN,this.shutdown,this)},setBaseURL:function(b){return b===void 0&&(b=""),b!==""&&b.substr(-1)!=="/"&&(b=b.concat("/")),this.baseURL=b,this},setPath:function(b){return b===void 0&&(b=""),b!==""&&b.substr(-1)!=="/"&&(b=b.concat("/")),this.path=b,this},setPrefix:function(b){return b===void 0&&(b=""),this.prefix=b,this},setCORS:function(b){return this.crossOrigin=b,this},addFile:function(b){Array.isArray(b)||(b=[b]);for(var _=0;_0},removePack:function(b,_){var C=this.systems.anims,w=this.cacheManager,T=this.textureManager,S={animation:"json",aseprite:"json",audio:"audio",audioSprite:"audio",binary:"binary",bitmapFont:"bitmapFont",css:null,glsl:"shader",html:"html",json:"json",obj:"obj",plugin:null,scenePlugin:null,script:null,spine:"json",text:"text",tilemapCSV:"tilemap",tilemapImpact:"tilemap",tilemapTiledJSON:"tilemap",video:"video",xml:"xml"},E;if(m(b))E=b;else if(E=w.json.get(b),!E){console.warn("Asset Pack not found in JSON cache:",b);return}_&&(E={_:E[_]});for(var D in E){var A=E[D],M=f(A,"prefix",""),R=f(A,"files"),L=f(A,"defaultType");if(Array.isArray(R))for(var I=0;I0&&this.inflight.size{var o=s(79291),d=s(92638),l=function(c,h){var u=c===void 0?d():o({},c);if(h)for(var f in h)h[f]!==void 0&&(u[f]=h[f]);return u};n.exports=l},26430:(n,a,s)=>{var o=s(83419),d=s(23906),l=s(54899),c=new o({initialize:function(u,f,p,m){var g=[];m.forEach(function(x){x&&g.push(x)}),this.loader=u,this.type=f,this.key=p;var v=this.key;u.prefix&&u.prefix!==""&&(this.key=u.prefix+v),this.multiKeyIndex=u.multiKeyIndex++,this.files=g,this.state=d.FILE_PENDING,this.complete=!1,this.pending=g.length,this.failed=0,this.config={},this.baseURL=u.baseURL,this.path=u.path,this.prefix=u.prefix;for(var y=0;y{var o=s(3374),d=function(l,c){var h=o(c,l.xhrSettings);if(l.base64){var u=l.url.split(";base64,").pop()||l.url.split(",").pop(),f={responseText:atob(u)};l.onBase64Load(f);return}var p=new XMLHttpRequest;if(p.open("GET",l.src,h.async,h.user,h.password),p.responseType=l.xhrSettings.responseType,p.timeout=h.timeout,h.headers)for(var m in h.headers)p.setRequestHeader(m,h.headers[m]);return h.header&&h.headerValue&&p.setRequestHeader(h.header,h.headerValue),h.requestedWith&&p.setRequestHeader("X-Requested-With",h.requestedWith),h.overrideMimeType&&p.overrideMimeType(h.overrideMimeType),h.withCredentials&&(p.withCredentials=!0),p.onload=l.onLoad.bind(l,p),p.onerror=l.onError.bind(l,p),p.onprogress=l.onProgress.bind(l),p.ontimeout=l.onError.bind(l,p),p.send(),p};n.exports=d},92638:n=>{var a=function(s,o,d,l,c,h){return s===void 0&&(s=""),o===void 0&&(o=!0),d===void 0&&(d=""),l===void 0&&(l=""),c===void 0&&(c=0),h===void 0&&(h=!1),{responseType:s,async:o,user:d,password:l,timeout:c,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:h}};n.exports=a},23906:n=>{var a={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};n.exports=a},42155:n=>{n.exports="addfile"},38991:n=>{n.exports="complete"},27540:n=>{n.exports="filecomplete"},87464:n=>{n.exports="filecomplete-"},94486:n=>{n.exports="loaderror"},13035:n=>{n.exports="load"},38144:n=>{n.exports="fileprogress"},97520:n=>{n.exports="postprocess"},85595:n=>{n.exports="progress"},55680:n=>{n.exports="start"},54899:(n,a,s)=>{n.exports={ADD:s(42155),COMPLETE:s(38991),FILE_COMPLETE:s(27540),FILE_KEY_COMPLETE:s(87464),FILE_LOAD_ERROR:s(94486),FILE_LOAD:s(13035),FILE_PROGRESS:s(38144),POST_PROCESS:s(97520),PROGRESS:s(85595),START:s(55680)}},14135:(n,a,s)=>{var o=s(83419),d=s(74099),l=s(518),c=s(54899),h=new o({Extends:l,initialize:function(f,p,m,g,v){l.call(this,f,p,m,g,v),this.type="animationJSON"},onProcess:function(){this.loader.once(c.POST_PROCESS,this.onLoadComplete,this),l.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});d.register("animation",function(u,f,p,m){if(Array.isArray(u))for(var g=0;g{var o=s(83419),d=s(74099),l=s(95540),c=s(19550),h=s(41212),u=s(518),f=s(26430),p=new o({Extends:f,initialize:function(g,v,y,x,b,_){var C,w;if(h(v)){var T=v;v=l(T,"key"),C=new c(g,{key:v,url:l(T,"textureURL"),extension:l(T,"textureExtension","png"),normalMap:l(T,"normalMap"),xhrSettings:l(T,"textureXhrSettings")}),w=new u(g,{key:v,url:l(T,"atlasURL"),extension:l(T,"atlasExtension","json"),xhrSettings:l(T,"atlasXhrSettings")})}else C=new c(g,v,y,b),w=new u(g,v,x,_);C.linkFile?f.call(this,g,"atlasjson",v,[C,w,C.linkFile]):f.call(this,g,"atlasjson",v,[C,w])},addToCache:function(){if(this.isReadyToProcess()){var m=this.files[0],g=this.files[1],v=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(m.key,m.data,g.data,v),g.addToCache(),this.complete=!0}}});d.register("aseprite",function(m,g,v,y,x){var b;if(Array.isArray(m))for(var _=0;_{var o=s(83419),d=s(74099),l=s(95540),c=s(19550),h=s(41212),u=s(518),f=s(26430),p=new o({Extends:f,initialize:function(g,v,y,x,b,_){var C,w;if(h(v)){var T=v;v=l(T,"key"),C=new c(g,{key:v,url:l(T,"textureURL"),extension:l(T,"textureExtension","png"),normalMap:l(T,"normalMap"),xhrSettings:l(T,"textureXhrSettings")}),w=new u(g,{key:v,url:l(T,"atlasURL"),extension:l(T,"atlasExtension","json"),xhrSettings:l(T,"atlasXhrSettings")})}else C=new c(g,v,y,b),w=new u(g,v,x,_);C.linkFile?f.call(this,g,"atlasjson",v,[C,w,C.linkFile]):f.call(this,g,"atlasjson",v,[C,w])},addToCache:function(){if(this.isReadyToProcess()){var m=this.files[0],g=this.files[1],v=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(m.key,m.data,g.data,v),this.complete=!0}}});d.register("atlas",function(m,g,v,y,x){var b;if(Array.isArray(m))for(var _=0;_{var o=s(83419),d=s(74099),l=s(95540),c=s(19550),h=s(41212),u=s(26430),f=s(57318),p=new o({Extends:u,initialize:function(g,v,y,x,b,_){var C,w;if(h(v)){var T=v;v=l(T,"key"),C=new c(g,{key:v,url:l(T,"textureURL"),extension:l(T,"textureExtension","png"),normalMap:l(T,"normalMap"),xhrSettings:l(T,"textureXhrSettings")}),w=new f(g,{key:v,url:l(T,"atlasURL"),extension:l(T,"atlasExtension","xml"),xhrSettings:l(T,"atlasXhrSettings")})}else C=new c(g,v,y,b),w=new f(g,v,x,_);C.linkFile?u.call(this,g,"atlasxml",v,[C,w,C.linkFile]):u.call(this,g,"atlasxml",v,[C,w])},addToCache:function(){if(this.isReadyToProcess()){var m=this.files[0],g=this.files[1],v=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(m.key,m.data,g.data,v),this.complete=!0}}});d.register("atlasXML",function(m,g,v,y,x){var b;if(Array.isArray(m))for(var _=0;_{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(89749),f=s(41212),p=new o({Extends:l,initialize:function(g,v,y,x,b){if(f(v)){var _=v;v=h(_,"key"),x=h(_,"xhrSettings"),b=h(_,"context",b)}var C={type:"audio",cache:g.cacheManager.audio,extension:y.type,responseType:"arraybuffer",key:v,url:y.url,xhrSettings:x,config:{context:b}};l.call(this,g,C)},onProcess:function(){this.state=d.FILE_PROCESSING;var m=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(g){m.data=g,m.onProcessComplete()},function(g){console.error("Error decoding audio: "+m.key+" - ",g?g.message:null),m.onProcessError()}),this.config.context=null}});p.create=function(m,g,v,y,x){var b=m.systems.game,_=b.config.audio,C=b.device.audio;f(g)&&(v=h(g,"url",[]),y=h(g,"config",{}));var w=p.getAudioURL(b,v);return w?C.webAudio&&!_.disableWebAudio?new p(m,g,w,x,b.sound.context):new u(m,g,w,y):(console.warn('No audio URLs for "%s" can play on this device',g),null)},p.getAudioURL=function(m,g){Array.isArray(g)||(g=[g]);for(var v=0;v{var o=s(21097),d=s(83419),l=s(74099),c=s(95540),h=s(41212),u=s(518),f=s(26430),p=new d({Extends:f,initialize:function(g,v,y,x,b,_,C){if(h(v)){var w=v;v=c(w,"key"),y=c(w,"jsonURL"),x=c(w,"audioURL"),b=c(w,"audioConfig"),_=c(w,"audioXhrSettings"),C=c(w,"jsonXhrSettings")}var T;if(!x)T=new u(g,v,y,C),f.call(this,g,"audiosprite",v,[T]),this.config.resourceLoad=!0,this.config.audioConfig=b,this.config.audioXhrSettings=_;else{var S=o.create(g,v,x,b,_);S&&(T=new u(g,v,y,C),f.call(this,g,"audiosprite",v,[S,T]),this.config.resourceLoad=!1)}},onFileComplete:function(m){var g=this.files.indexOf(m);if(g!==-1&&(this.pending--,this.config.resourceLoad&&m.type==="json"&&m.data.hasOwnProperty("resources"))){var v=m.data.resources,y=c(this.config,"audioConfig"),x=c(this.config,"audioXhrSettings"),b=o.create(this.loader,m.key,v,y,x);b&&(this.addToMultiFile(b),this.loader.addFile(b))}},addToCache:function(){if(this.isReadyToProcess()){var m=this.files[0],g=this.files[1];m.addToCache(),g.addToCache(),this.complete=!0}}});l.register("audioSprite",function(m,g,v,y,x,b){var _=this.systems.game,C=_.config.audio,w=_.device.audio;if(C&&C.noAudio||!w.webAudio&&!w.audioData)return this;var T;if(Array.isArray(m))for(var S=0;S{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y,x){var b="bin";if(u(g)){var _=g;g=h(_,"key"),v=h(_,"url"),y=h(_,"xhrSettings"),b=h(_,"extension",b),x=h(_,"dataType",x)}var C={type:"binary",cache:m.cacheManager.binary,extension:b,responseType:"arraybuffer",key:g,url:v,xhrSettings:y,config:{dataType:x}};l.call(this,m,C)},onProcess:function(){this.state=d.FILE_PROCESSING;var p=this.config.dataType;this.data=p?new p(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});c.register("binary",function(p,m,g,v){if(Array.isArray(p))for(var y=0;y{var o=s(83419),d=s(74099),l=s(95540),c=s(19550),h=s(41212),u=s(26430),f=s(21859),p=s(57318),m=new o({Extends:u,initialize:function(v,y,x,b,_,C){var w,T;if(h(y)){var S=y;y=l(S,"key"),w=new c(v,{key:y,url:l(S,"textureURL"),extension:l(S,"textureExtension","png"),normalMap:l(S,"normalMap"),xhrSettings:l(S,"textureXhrSettings")}),T=new p(v,{key:y,url:l(S,"fontDataURL"),extension:l(S,"fontDataExtension","xml"),xhrSettings:l(S,"fontDataXhrSettings")})}else w=new c(v,y,x,_),T=new p(v,y,b,C);w.linkFile?u.call(this,v,"bitmapfont",y,[w,T,w.linkFile]):u.call(this,v,"bitmapfont",y,[w,T])},addToCache:function(){if(this.isReadyToProcess()){var g=this.files[0],v=this.files[1];g.addToCache();var y=g.cache.get(g.key),x=f(v.data,g.cache.getFrame(g.key),0,0,y);this.loader.cacheManager.bitmapFont.add(g.key,{data:x,texture:g.key,frame:null}),this.complete=!0}}});d.register("bitmapFont",function(g,v,y,x,b){var _;if(Array.isArray(g))for(var C=0;C{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y){var x="css";if(u(g)){var b=g;g=h(b,"key"),v=h(b,"url"),y=h(b,"xhrSettings"),x=h(b,"extension",x)}var _={type:"script",cache:!1,extension:x,responseType:"text",key:g,url:v,xhrSettings:y};l.call(this,m,_)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});c.register("css",function(p,m,g){if(Array.isArray(p))for(var v=0;v{var o=s(38734),d=s(85722),l=s(83419),c=s(74099),h=s(95540),u=s(19550),f=s(41212),p=s(518),m=s(31403),g=s(46975),v=s(59327),y=s(26430),x=s(82038),b=s(55222),_=new l({Extends:y,initialize:function(w,T,S,E){if(S.multiAtlasURL){var D=new p(w,{key:T,url:S.multiAtlasURL,xhrSettings:E,config:S});y.call(this,w,"texture",T,[D])}else{var A=S.textureURL.substr(S.textureURL.length-3);S.type||(S.type=A.toLowerCase()==="ktx"?"KTX":"PVR");var M=new d(w,{key:T,url:S.textureURL,extension:A,xhrSettings:E,config:S});if(S.atlasURL){var R=new p(w,{key:T,url:S.atlasURL,xhrSettings:E,config:S});y.call(this,w,"texture",T,[M,R])}else y.call(this,w,"texture",T,[M])}this.config=S},onFileComplete:function(C){var w=this.files.indexOf(C);if(w!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(C.type==="json"&&C.data.hasOwnProperty("textures")){var T=C.data.textures,S=this.config,E=this.loader,D=E.baseURL,A=E.path,M=E.prefix,R=h(S,"multiBaseURL",this.baseURL),L=h(S,"multiPath",this.path),I=h(S,"prefix",this.prefix),O=h(S,"textureXhrSettings");R&&E.setBaseURL(R),L&&E.setPath(L),I&&E.setPrefix(I);for(var N=0;N{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(98356),f=s(41212),p=new o({Extends:l,initialize:function(g,v,y,x,b,_){var C="ttf";if(f(v)){var w=v;v=h(w,"key"),y=h(w,"url"),x=h(w,"format","truetype"),b=h(w,"descriptors",null),_=h(w,"xhrSettings"),C=h(w,"extension",C)}else x===void 0&&(x="truetype");var T={type:"font",cache:!1,extension:C,responseType:"text",key:v,url:y,xhrSettings:_};l.call(this,g,T),this.data={format:x,descriptors:b},this.state=d.FILE_POPULATED},onProcess:function(){this.state=d.FILE_PROCESSING,this.src=u(this,this.loader.baseURL);var m,g=this.key,v="url("+this.src+') format("'+this.data.format+'")';this.data.descriptors?m=new FontFace(g,v,this.data.descriptors):m=new FontFace(g,v);var y=this;m.load().then(function(){document.fonts.add(m),document.body.classList.add("fonts-loaded"),y.onProcessComplete()}).catch(function(){console.warn("Font failed to load",v),y.onProcessComplete()})}});c.register("font",function(m,g,v,y,x){if(Array.isArray(m))for(var b=0;b{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=s(73894),p=new o({Extends:l,initialize:function(g,v,y,x,b){var _="glsl";if(u(v)){var C=v;v=h(C,"key"),y=h(C,"url"),x=h(C,"shaderType","fragment"),b=h(C,"xhrSettings"),_=h(C,"extension",_)}else x===void 0&&(x="fragment");var w={type:"glsl",cache:g.cacheManager.shader,extension:_,responseType:"text",key:v,url:y,config:{shaderType:x},xhrSettings:b};l.call(this,g,w)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var m=this.data.split(` +`),g=this.extractBlock(m,0);if(g)for(;g;){var v=this.getShaderName(g.header),y=this.getShaderType(g.header),x=this.getShaderUniforms(g.header),b=g.shader;if(this.cache.has(v)){var _=this.cache.get(v);y==="fragment"?_.fragmentSrc=b:_.vertexSrc=b,_.uniforms||(_.uniforms=x)}else y==="fragment"?this.cache.add(v,new f(v,b,"",x)):this.cache.add(v,new f(v,"",b,x));g=this.extractBlock(m,g.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new f(this.key,this.data)):this.cache.add(this.key,new f(this.key,"",this.data))},getShaderName:function(m){for(var g=0;g{var o=s(83419),d=s(54899),l=s(41299),c=s(95540),h=s(98356),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y){if(u(g)){var x=g;g=c(x,"key"),y=c(x,"config",y)}var b={type:"audio",cache:m.cacheManager.audio,extension:v.type,key:g,url:v.url,config:y};l.call(this,m,b),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var p=0;p{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y){var x="html";if(u(g)){var b=g;g=h(b,"key"),v=h(b,"url"),y=h(b,"xhrSettings"),x=h(b,"extension",x)}var _={type:"text",cache:m.cacheManager.html,extension:x,responseType:"text",key:g,url:v,xhrSettings:y};l.call(this,m,_)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});c.register("html",function(p,m,g){if(Array.isArray(p))for(var v=0;v{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y,x,b){y===void 0&&(y=512),x===void 0&&(x=512);var _="html";if(u(g)){var C=g;g=h(C,"key"),v=h(C,"url"),b=h(C,"xhrSettings"),_=h(C,"extension",_),y=h(C,"width",y),x=h(C,"height",x)}var w={type:"html",cache:m.textureManager,extension:_,responseType:"text",key:g,url:v,xhrSettings:b,config:{width:y,height:x}};l.call(this,m,w)},onProcess:function(){this.state=d.FILE_PROCESSING;var p=this.config.width,m=this.config.height,g=[];g.push(''),g.push(''),g.push(''),g.push(this.xhrLoader.responseText),g.push(""),g.push(""),g.push("");var v=[g.join(` +`)],y=this;try{var x=new window.Blob(v,{type:"image/svg+xml;charset=utf-8"})}catch{y.state=d.FILE_ERRORED,y.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){l.revokeObjectURL(y.data),y.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(y.data),y.onProcessError()},l.createObjectURL(this.data,x,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});c.register("htmlTexture",function(p,m,g,v,y){if(Array.isArray(p))for(var x=0;x{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=s(98356),p=new o({Extends:l,initialize:function m(g,v,y,x,b){var _="png",C;if(u(v)){var w=v;v=h(w,"key"),y=h(w,"url"),C=h(w,"normalMap"),x=h(w,"xhrSettings"),_=h(w,"extension",_),b=h(w,"frameConfig")}Array.isArray(y)&&(C=y[1],y=y[0]);var T={type:"image",cache:g.textureManager,extension:_,responseType:"blob",key:v,url:y,xhrSettings:x,config:b};if(l.call(this,g,T),C){var S=new m(g,this.key,C,x,b);S.type="normalMap",this.setLink(S),g.addFile(S)}this.useImageElementLoad=g.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var m=this;this.data.onload=function(){l.revokeObjectURL(m.data),m.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(m.data),m.onProcessError()},l.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var m=this.state;this.state=d.FILE_PROCESSING,m===d.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=d.FILE_LOADING,this.src=f(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var m=this;this.data.onload=function(){m.state=d.FILE_LOADED,m.loader.nextFile(m,!0)},this.data.onerror=function(){m.loader.nextFile(m,!1)},this.data.src=this.src},addToCache:function(){var m=this.linkFile;m?m.state>=d.FILE_COMPLETE&&(m.type==="spritesheet"?m.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,m.data,this.data):this.cache.addImage(this.key,this.data,m.data)):this.cache.addImage(this.key,this.data)}});c.register("image",function(m,g,v){if(Array.isArray(m))for(var y=0;y{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(35154),f=s(41212),p=new o({Extends:l,initialize:function(g,v,y,x,b){var _="json";if(f(v)){var C=v;v=h(C,"key"),y=h(C,"url"),x=h(C,"xhrSettings"),_=h(C,"extension",_),b=h(C,"dataKey",b)}var w={type:"json",cache:g.cacheManager.json,extension:_,responseType:"text",key:v,url:y,xhrSettings:x,config:b};l.call(this,g,w),f(y)&&(b?this.data=u(y,b):this.data=y,this.state=d.FILE_POPULATED)},onProcess:function(){if(this.state!==d.FILE_POPULATED){this.state=d.FILE_PROCESSING;try{var m=JSON.parse(this.xhrLoader.responseText)}catch(v){throw this.onProcessError(),v}var g=this.config;typeof g=="string"?this.data=u(m,g,m):this.data=m}this.onProcessComplete()}});c.register("json",function(m,g,v,y){if(Array.isArray(m))for(var x=0;x{var o=s(83419),d=s(74099),l=s(95540),c=s(19550),h=s(41212),u=s(518),f=s(26430),p=new o({Extends:f,initialize:function(g,v,y,x,b,_,C){if(h(v)){var w=v;v=l(w,"key"),l(w,"url",!1)?y=l(w,"url"):y=l(w,"atlasURL"),_=l(w,"xhrSettings"),x=l(w,"path"),b=l(w,"baseURL"),C=l(w,"textureXhrSettings")}var T=new u(g,v,y,_);f.call(this,g,"multiatlas",v,[T]),this.config.path=x,this.config.baseURL=b,this.config.textureXhrSettings=C},onFileComplete:function(m){var g=this.files.indexOf(m);if(g!==-1&&(this.pending--,m.type==="json"&&m.data.hasOwnProperty("textures"))){var v=m.data.textures,y=this.config,x=this.loader,b=x.baseURL,_=x.path,C=x.prefix,w=l(y,"baseURL",this.baseURL),T=l(y,"path",this.path),S=l(y,"prefix",this.prefix),E=l(y,"textureXhrSettings");x.setBaseURL(w),x.setPath(T),x.setPrefix(S);for(var D=0;D{var o=s(83419),d=s(74099),l=s(95540),c=s(41212),h=s(26430),u=s(34328),f=new o({Extends:h,initialize:function(m,g,v,y){var x="js",b=[];if(c(g)){var _=g;g=l(_,"key"),v=l(_,"url"),y=l(_,"xhrSettings"),x=l(_,"extension",x)}Array.isArray(v)||(v=[v]);for(var C=0;C{var o=s(83419),d=s(74099),l=s(95540),c=s(41212),h=s(26430),u=s(85048),f=s(61485),p=s(78776),m=new o({Extends:h,initialize:function(v,y,x,b,_,C){var w,T,S=v.cacheManager.obj;if(c(y)){var E=y;y=l(E,"key"),w=new p(v,{key:y,type:"obj",cache:S,url:l(E,"url"),extension:l(E,"extension","obj"),xhrSettings:l(E,"xhrSettings"),config:{flipUV:l(E,"flipUV",_)}}),b=l(E,"matURL"),b&&(T=new p(v,{key:y,type:"mat",cache:S,url:b,extension:l(E,"matExtension","mat"),xhrSettings:l(E,"xhrSettings")}))}else w=new p(v,{key:y,url:x,type:"obj",cache:S,extension:"obj",xhrSettings:C,config:{flipUV:_}}),b&&(T=new p(v,{key:y,url:b,type:"mat",cache:S,extension:"mat",xhrSettings:C}));h.call(this,v,"obj",y,[w,T])},addToCache:function(){if(this.isReadyToProcess()){var g=this.files[0],v=this.files[1],y=u(g.data,g.config.flipUV);v&&(y.materials=f(v.data)),g.cache.add(g.key,y),this.complete=!0}}});d.register("obj",function(g,v,y,x,b){var _;if(Array.isArray(g))for(var C=0;C{var o=s(83419),d=s(23906),l=s(74099),c=s(518),h=new o({Extends:c,initialize:function(f,p,m,g,v){c.call(this,f,p,m,g,v),this.type="packfile"},onProcess:function(){if(this.state!==d.FILE_POPULATED&&(this.state=d.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var u={};u[this.config]=this.data,this.data=u}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});l.register("pack",function(u,f,p,m){if(Array.isArray(u))for(var g=0;g{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y,x,b){var _="js";if(u(g)){var C=g;g=h(C,"key"),v=h(C,"url"),b=h(C,"xhrSettings"),_=h(C,"extension",_),y=h(C,"start"),x=h(C,"mapping")}var w={type:"plugin",cache:!1,extension:_,responseType:"text",key:g,url:v,xhrSettings:b,config:{start:y,mapping:x}};l.call(this,m,w),typeof v=="function"&&(this.data=v,this.state=d.FILE_POPULATED)},onProcess:function(){var p=this.loader.systems.plugins,m=this.config,g=h(m,"start",!1),v=h(m,"mapping",null);if(this.state===d.FILE_POPULATED)p.install(this.key,this.data,g,v);else{this.state=d.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var y=p.install(this.key,window[this.key],g,v);(g||v)&&(this.loader.systems[v]=y,this.loader.scene[v]=y)}this.onProcessComplete()}});c.register("plugin",function(p,m,g,v,y){if(Array.isArray(p))for(var x=0;x{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y,x){var b="svg";if(u(g)){var _=g;g=h(_,"key"),v=h(_,"url"),y=h(_,"svgConfig",{}),x=h(_,"xhrSettings"),b=h(_,"extension",b)}var C={type:"svg",cache:m.textureManager,extension:b,responseType:"text",key:g,url:v,xhrSettings:x,config:{width:h(y,"width"),height:h(y,"height"),scale:h(y,"scale")}};l.call(this,m,C)},onProcess:function(){this.state=d.FILE_PROCESSING;var p=this.xhrLoader.responseText,m=[p],g=this.config.width,v=this.config.height,y=this.config.scale;e:if(g&&v||y){var x=null,b=new DOMParser;x=b.parseFromString(p,"text/xml");var _=x.getElementsByTagName("svg")[0],C=_.hasAttribute("viewBox"),w=parseFloat(_.getAttribute("width")),T=parseFloat(_.getAttribute("height"));if(!C&&w&&T)_.setAttribute("viewBox","0 0 "+w+" "+T);else if(C&&!w&&!T){var S=_.getAttribute("viewBox").split(/\s+|,/);w=S[2],T=S[3]}if(y)if(w&&T)g=w*y,v=T*y;else break e;_.setAttribute("width",g.toString()+"px"),_.setAttribute("height",v.toString()+"px"),m=[new XMLSerializer().serializeToString(_)]}try{var E=new window.Blob(m,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var D=this,A=!1;this.data.onload=function(){A||l.revokeObjectURL(D.data),D.onProcessComplete()},this.data.onerror=function(){A?D.onProcessError():(A=!0,l.revokeObjectURL(D.data),D.data.src="data:image/svg+xml,"+encodeURIComponent(m.join("")))},l.createObjectURL(this.data,E,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});c.register("svg",function(p,m,g,v){if(Array.isArray(p))for(var y=0;y{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y){var x="js";if(u(g)){var b=g;g=h(b,"key"),v=h(b,"url"),y=h(b,"xhrSettings"),x=h(b,"extension",x)}var _={type:"text",extension:x,responseType:"text",key:g,url:v,xhrSettings:y};l.call(this,m,_)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var p=this.data.concat(`(function(){ +return new `+this.key+`(); +}).call(this);`),m=eval;this.loader.sceneManager.add(this.key,m(p)),this.complete=!0}});c.register("sceneFile",function(p,m,g){if(Array.isArray(p))for(var v=0;v{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y,x,b){var _="js";if(u(g)){var C=g;g=h(C,"key"),v=h(C,"url"),b=h(C,"xhrSettings"),_=h(C,"extension",_),y=h(C,"systemKey"),x=h(C,"sceneKey")}var w={type:"scenePlugin",cache:!1,extension:_,responseType:"text",key:g,url:v,xhrSettings:b,config:{systemKey:y,sceneKey:x}};l.call(this,m,w),typeof v=="function"&&(this.data=v,this.state=d.FILE_POPULATED)},onProcess:function(){var p=this.loader.systems.plugins,m=this.config,g=this.key,v=h(m,"systemKey",g),y=h(m,"sceneKey",g);this.state===d.FILE_POPULATED?p.installScenePlugin(v,this.data,y,this.loader.scene,!0):(this.state=d.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),p.installScenePlugin(v,window[this.key],y,this.loader.scene,!0)),this.onProcessComplete()}});c.register("scenePlugin",function(p,m,g,v,y){if(Array.isArray(p))for(var x=0;x{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y,x){var b="js";if(u(g)){var _=g;g=h(_,"key"),v=h(_,"url"),y=h(_,"type","script"),x=h(_,"xhrSettings"),b=h(_,"extension",b)}else y===void 0&&(y="script");var C={type:y,cache:!1,extension:b,responseType:"text",key:g,url:v,xhrSettings:x};l.call(this,m,C)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});c.register("script",function(p,m,g,v){if(Array.isArray(p))for(var y=0;y{var o=s(83419),d=s(23906),l=s(74099),c=s(19550),h=new o({Extends:c,initialize:function(f,p,m,g,v){c.call(this,f,p,m,v,g),this.type="spritesheet"},addToCache:function(){var u=this.linkFile;u?u.state>=d.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,u.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,u.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});l.register("spritesheet",function(u,f,p,m){if(Array.isArray(u))for(var g=0;g{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=new o({Extends:l,initialize:function(m,g,v,y){var x="text",b="txt",_=m.cacheManager.text;if(u(g)){var C=g;g=h(C,"key"),v=h(C,"url"),y=h(C,"xhrSettings"),b=h(C,"extension",b),x=h(C,"type",x),_=h(C,"cache",_)}var w={type:x,cache:_,extension:b,responseType:"text",key:g,url:v,xhrSettings:y};l.call(this,m,w)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});c.register("text",function(p,m,g){if(Array.isArray(p))for(var v=0;v{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=s(80341),p=new o({Extends:l,initialize:function(g,v,y,x){var b="csv";if(u(v)){var _=v;v=h(_,"key"),y=h(_,"url"),x=h(_,"xhrSettings"),b=h(_,"extension",b)}var C={type:"tilemapCSV",cache:g.cacheManager.tilemap,extension:b,responseType:"text",key:v,url:y,xhrSettings:x};l.call(this,g,C),this.tilemapFormat=f.CSV},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var m={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,m)}});c.register("tilemapCSV",function(m,g,v){if(Array.isArray(m))for(var y=0;y{var o=s(83419),d=s(74099),l=s(518),c=s(80341),h=new o({Extends:l,initialize:function(f,p,m,g){l.call(this,f,p,m,g),this.type="tilemapJSON",this.cache=f.cacheManager.tilemap},addToCache:function(){var u={format:c.WELTMEISTER,data:this.data};this.cache.add(this.key,u)}});d.register("tilemapImpact",function(u,f,p){if(Array.isArray(u))for(var m=0;m{var o=s(83419),d=s(74099),l=s(518),c=s(80341),h=new o({Extends:l,initialize:function(f,p,m,g){l.call(this,f,p,m,g),this.type="tilemapJSON",this.cache=f.cacheManager.tilemap},addToCache:function(){var u={format:c.TILED_JSON,data:this.data};this.cache.add(this.key,u)}});d.register("tilemapTiledJSON",function(u,f,p){if(Array.isArray(u))for(var m=0;m{var o=s(83419),d=s(74099),l=s(95540),c=s(19550),h=s(41212),u=s(26430),f=s(78776),p=new o({Extends:u,initialize:function(g,v,y,x,b,_){var C,w;if(h(v)){var T=v;v=l(T,"key"),C=new c(g,{key:v,url:l(T,"textureURL"),extension:l(T,"textureExtension","png"),normalMap:l(T,"normalMap"),xhrSettings:l(T,"textureXhrSettings")}),w=new f(g,{key:v,url:l(T,"atlasURL"),extension:l(T,"atlasExtension","txt"),xhrSettings:l(T,"atlasXhrSettings")})}else C=new c(g,v,y,b),w=new f(g,v,x,_);C.linkFile?u.call(this,g,"unityatlas",v,[C,w,C.linkFile]):u.call(this,g,"unityatlas",v,[C,w])},addToCache:function(){if(this.isReadyToProcess()){var m=this.files[0],g=this.files[1],v=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(m.key,m.data,g.data,v),this.complete=!0}}});d.register("unityAtlas",function(m,g,v,y,x){var b;if(Array.isArray(m))for(var _=0;_{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(98356),u=s(95540),f=s(41212),p=new o({Extends:l,initialize:function(g,v,y,x){if(x===void 0&&(x=!1),f(v)){var b=v;v=u(b,"key"),y=u(b,"url",[]),x=u(b,"noAudio",!1)}var _=g.systems.game.device.video.getVideoURL(y);_||console.warn("VideoFile: No supported format for "+v);var C={type:"video",cache:g.cacheManager.video,extension:_.type,key:v,url:_.url,config:{noAudio:x}};l.call(this,g,C)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=h(this,this.loader.baseURL),this.state=d.FILE_LOADED,this.loader.nextFile(this,!0)}});c.register("video",function(m,g,v){if(Array.isArray(m))for(var y=0;y{var o=s(83419),d=s(23906),l=s(41299),c=s(74099),h=s(95540),u=s(41212),f=s(56836),p=new o({Extends:l,initialize:function(g,v,y,x){var b="xml";if(u(v)){var _=v;v=h(_,"key"),y=h(_,"url"),x=h(_,"xhrSettings"),b=h(_,"extension",b)}var C={type:"xml",cache:g.cacheManager.xml,extension:b,responseType:"text",key:v,url:y,xhrSettings:x};l.call(this,g,C)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=f(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});c.register("xml",function(m,g,v){if(Array.isArray(m))for(var y=0;y{n.exports={AnimationJSONFile:s(14135),AsepriteFile:s(76272),AtlasJSONFile:s(38734),AtlasXMLFile:s(74599),AudioFile:s(21097),AudioSpriteFile:s(89524),BinaryFile:s(85722),BitmapFontFile:s(97025),CompressedTextureFile:s(69559),CSSFile:s(16024),FontFile:s(87674),GLSLFile:s(47931),HTML5AudioFile:s(89749),HTMLFile:s(88470),HTMLTextureFile:s(14643),ImageFile:s(19550),JSONFile:s(518),MultiAtlasFile:s(59327),MultiScriptFile:s(99297),OBJFile:s(41846),PackFile:s(58610),PluginFile:s(48988),SceneFile:s(88423),ScenePluginFile:s(56812),ScriptFile:s(34328),SpriteSheetFile:s(85035),SVGFile:s(67397),TextFile:s(78776),TilemapCSVFile:s(49477),TilemapImpactFile:s(40807),TilemapJSONFile:s(56775),UnityAtlasFile:s(25771),VideoFile:s(33720),XMLFile:s(57318)}},57777:(n,a,s)=>{var o=s(23906),d=s(79291),l={Events:s(54899),FileTypes:s(64589),File:s(41299),FileTypesManager:s(74099),GetURL:s(98356),LoaderPlugin:s(74261),MergeXHRSettings:s(3374),MultiFile:s(26430),XHRLoader:s(84376),XHRSettings:s(92638)};l=d(!1,l,o),n.exports=l},53307:n=>{var a=function(s){for(var o=0,d=0;d{var o=s(6411),d=function(l,c){return o(l)/o(c)/o(l-c)};n.exports=d},30976:n=>{var a=function(s,o){return Math.floor(Math.random()*(o-s+1)+s)};n.exports=a},87842:n=>{var a=function(s,o,d,l,c){var h=(l-o)*.5,u=(c-d)*.5,f=s*s,p=s*f;return(2*d-2*l+h+u)*p+(-3*d+3*l-2*h-u)*f+h*s+d};n.exports=a},26302:n=>{var a=function(s,o,d){o===void 0&&(o=0),d===void 0&&(d=10);var l=Math.pow(d,-o);return Math.ceil(s*l)/l};n.exports=a},45319:n=>{var a=function(s,o,d){return Math.max(o,Math.min(d,s))};n.exports=a},39506:(n,a,s)=>{var o=s(36383),d=function(l){return l*o.DEG_TO_RAD};n.exports=d},61241:n=>{var a=function(s,o){return Math.abs(s-o)};n.exports=a},38857:(n,a,s)=>{var o=s(45319),d=s(83419),l=s(37867),c=s(29747),h=new l,u=new d({initialize:function f(p,m,g,v){p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v=f.DefaultOrder),this._x=p,this._y=m,this._z=g,this._order=v,this.onChangeCallback=c},x:{get:function(){return this._x},set:function(f){this._x=f,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(f){this._y=f,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(f){this._z=f,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(f){this._order=f,this.onChangeCallback(this)}},set:function(f,p,m,g){return g===void 0&&(g=this._order),this._x=f,this._y=p,this._z=m,this._order=g,this.onChangeCallback(this),this},copy:function(f){return this.set(f.x,f.y,f.z,f.order)},setFromQuaternion:function(f,p,m){return p===void 0&&(p=this._order),m===void 0&&(m=!1),h.fromQuat(f),this.setFromRotationMatrix(h,p,m)},setFromRotationMatrix:function(f,p,m){p===void 0&&(p=this._order),m===void 0&&(m=!1);var g=f.val,v=g[0],y=g[4],x=g[8],b=g[1],_=g[5],C=g[9],w=g[2],T=g[6],S=g[10],E=0,D=0,A=0,M=.99999;switch(p){case"XYZ":{D=Math.asin(o(x,-1,1)),Math.abs(x){var a=function(s){if(s===0)return 1;for(var o=s;--s;)o*=s;return o};n.exports=a},99472:n=>{var a=function(s,o){return Math.random()*(o-s)+s};n.exports=a},77623:n=>{var a=function(s,o,d){o===void 0&&(o=0),d===void 0&&(d=10);var l=Math.pow(d,-o);return Math.floor(s*l)/l};n.exports=a},62945:(n,a,s)=>{var o=s(45319),d=function(l,c,h){return l=o(l,0,1),(h-c)*l+c};n.exports=d},38265:n=>{var a=function(s,o){return s/o/1e3};n.exports=a},78702:n=>{var a=function(s){return s==parseFloat(s)?!(s%2):void 0};n.exports=a},94883:n=>{var a=function(s){return s===parseFloat(s)?!(s%2):void 0};n.exports=a},28915:n=>{var a=function(s,o,d){return(o-s)*d+s};n.exports=a},94908:n=>{var a=function(s,o,d){return d===void 0&&(d=0),s.clone().lerp(o,d)};n.exports=a},94434:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c){this.val=new Float32Array(9),c?this.copy(c):this.identity()},clone:function(){return new d(this)},set:function(l){return this.copy(l)},copy:function(l){var c=this.val,h=l.val;return c[0]=h[0],c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],c[6]=h[6],c[7]=h[7],c[8]=h[8],this},fromMat4:function(l){var c=l.val,h=this.val;return h[0]=c[0],h[1]=c[1],h[2]=c[2],h[3]=c[4],h[4]=c[5],h[5]=c[6],h[6]=c[8],h[7]=c[9],h[8]=c[10],this},fromArray:function(l){var c=this.val;return c[0]=l[0],c[1]=l[1],c[2]=l[2],c[3]=l[3],c[4]=l[4],c[5]=l[5],c[6]=l[6],c[7]=l[7],c[8]=l[8],this},identity:function(){var l=this.val;return l[0]=1,l[1]=0,l[2]=0,l[3]=0,l[4]=1,l[5]=0,l[6]=0,l[7]=0,l[8]=1,this},transpose:function(){var l=this.val,c=l[1],h=l[2],u=l[5];return l[1]=l[3],l[2]=l[6],l[3]=c,l[5]=l[7],l[6]=h,l[7]=u,this},invert:function(){var l=this.val,c=l[0],h=l[1],u=l[2],f=l[3],p=l[4],m=l[5],g=l[6],v=l[7],y=l[8],x=y*p-m*v,b=-y*f+m*g,_=v*f-p*g,C=c*x+h*b+u*_;return C?(C=1/C,l[0]=x*C,l[1]=(-y*h+u*v)*C,l[2]=(m*h-u*p)*C,l[3]=b*C,l[4]=(y*c-u*g)*C,l[5]=(-m*c+u*f)*C,l[6]=_*C,l[7]=(-v*c+h*g)*C,l[8]=(p*c-h*f)*C,this):null},adjoint:function(){var l=this.val,c=l[0],h=l[1],u=l[2],f=l[3],p=l[4],m=l[5],g=l[6],v=l[7],y=l[8];return l[0]=p*y-m*v,l[1]=u*v-h*y,l[2]=h*m-u*p,l[3]=m*g-f*y,l[4]=c*y-u*g,l[5]=u*f-c*m,l[6]=f*v-p*g,l[7]=h*g-c*v,l[8]=c*p-h*f,this},determinant:function(){var l=this.val,c=l[0],h=l[1],u=l[2],f=l[3],p=l[4],m=l[5],g=l[6],v=l[7],y=l[8];return c*(y*p-m*v)+h*(-y*f+m*g)+u*(v*f-p*g)},multiply:function(l){var c=this.val,h=c[0],u=c[1],f=c[2],p=c[3],m=c[4],g=c[5],v=c[6],y=c[7],x=c[8],b=l.val,_=b[0],C=b[1],w=b[2],T=b[3],S=b[4],E=b[5],D=b[6],A=b[7],M=b[8];return c[0]=_*h+C*p+w*v,c[1]=_*u+C*m+w*y,c[2]=_*f+C*g+w*x,c[3]=T*h+S*p+E*v,c[4]=T*u+S*m+E*y,c[5]=T*f+S*g+E*x,c[6]=D*h+A*p+M*v,c[7]=D*u+A*m+M*y,c[8]=D*f+A*g+M*x,this},translate:function(l){var c=this.val,h=l.x,u=l.y;return c[6]=h*c[0]+u*c[3]+c[6],c[7]=h*c[1]+u*c[4]+c[7],c[8]=h*c[2]+u*c[5]+c[8],this},rotate:function(l){var c=this.val,h=c[0],u=c[1],f=c[2],p=c[3],m=c[4],g=c[5],v=Math.sin(l),y=Math.cos(l);return c[0]=y*h+v*p,c[1]=y*u+v*m,c[2]=y*f+v*g,c[3]=y*p-v*h,c[4]=y*m-v*u,c[5]=y*g-v*f,this},scale:function(l){var c=this.val,h=l.x,u=l.y;return c[0]=h*c[0],c[1]=h*c[1],c[2]=h*c[2],c[3]=u*c[3],c[4]=u*c[4],c[5]=u*c[5],this},fromQuat:function(l){var c=l.x,h=l.y,u=l.z,f=l.w,p=c+c,m=h+h,g=u+u,v=c*p,y=c*m,x=c*g,b=h*m,_=h*g,C=u*g,w=f*p,T=f*m,S=f*g,E=this.val;return E[0]=1-(b+C),E[3]=y+S,E[6]=x-T,E[1]=y-S,E[4]=1-(v+C),E[7]=_+w,E[2]=x+T,E[5]=_-w,E[8]=1-(v+b),this},normalFromMat4:function(l){var c=l.val,h=this.val,u=c[0],f=c[1],p=c[2],m=c[3],g=c[4],v=c[5],y=c[6],x=c[7],b=c[8],_=c[9],C=c[10],w=c[11],T=c[12],S=c[13],E=c[14],D=c[15],A=u*v-f*g,M=u*y-p*g,R=u*x-m*g,L=f*y-p*v,I=f*x-m*v,O=p*x-m*y,N=b*S-_*T,H=b*E-C*T,X=b*D-w*T,V=_*E-C*S,z=_*D-w*S,F=C*D-w*E,k=A*F-M*z+R*V+L*X-I*H+O*N;return k?(k=1/k,h[0]=(v*F-y*z+x*V)*k,h[1]=(y*X-g*F-x*H)*k,h[2]=(g*z-v*X+x*N)*k,h[3]=(p*z-f*F-m*V)*k,h[4]=(u*F-p*X+m*H)*k,h[5]=(f*X-u*z-m*N)*k,h[6]=(S*O-E*I+D*L)*k,h[7]=(E*R-T*O-D*M)*k,h[8]=(T*I-S*R+D*A)*k,this):null}});n.exports=d},37867:(n,a,s)=>{var o=s(83419),d=s(25836),l=1e-6,c=new o({initialize:function(v){this.val=new Float32Array(16),v?this.copy(v):this.identity()},clone:function(){return new c(this)},set:function(g){return this.copy(g)},setValues:function(g,v,y,x,b,_,C,w,T,S,E,D,A,M,R,L){var I=this.val;return I[0]=g,I[1]=v,I[2]=y,I[3]=x,I[4]=b,I[5]=_,I[6]=C,I[7]=w,I[8]=T,I[9]=S,I[10]=E,I[11]=D,I[12]=A,I[13]=M,I[14]=R,I[15]=L,this},copy:function(g){var v=g.val;return this.setValues(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15])},fromArray:function(g){return this.setValues(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(g,v,y){var x=h.fromQuat(y),b=x.val,_=v.x,C=v.y,w=v.z;return this.setValues(b[0]*_,b[1]*_,b[2]*_,0,b[4]*C,b[5]*C,b[6]*C,0,b[8]*w,b[9]*w,b[10]*w,0,g.x,g.y,g.z,1)},xyz:function(g,v,y){this.identity();var x=this.val;return x[12]=g,x[13]=v,x[14]=y,this},scaling:function(g,v,y){this.zero();var x=this.val;return x[0]=g,x[5]=v,x[10]=y,x[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var g=this.val,v=g[1],y=g[2],x=g[3],b=g[6],_=g[7],C=g[11];return g[1]=g[4],g[2]=g[8],g[3]=g[12],g[4]=v,g[6]=g[9],g[7]=g[13],g[8]=y,g[9]=b,g[11]=g[14],g[12]=x,g[13]=_,g[14]=C,this},getInverse:function(g){return this.copy(g),this.invert()},invert:function(){var g=this.val,v=g[0],y=g[1],x=g[2],b=g[3],_=g[4],C=g[5],w=g[6],T=g[7],S=g[8],E=g[9],D=g[10],A=g[11],M=g[12],R=g[13],L=g[14],I=g[15],O=v*C-y*_,N=v*w-x*_,H=v*T-b*_,X=y*w-x*C,V=y*T-b*C,z=x*T-b*w,F=S*R-E*M,k=S*L-D*M,G=S*I-A*M,Z=E*L-D*R,J=E*I-A*R,W=D*I-A*L,q=O*W-N*J+H*Z+X*G-V*k+z*F;return q?(q=1/q,this.setValues((C*W-w*J+T*Z)*q,(x*J-y*W-b*Z)*q,(R*z-L*V+I*X)*q,(D*V-E*z-A*X)*q,(w*G-_*W-T*k)*q,(v*W-x*G+b*k)*q,(L*H-M*z-I*N)*q,(S*z-D*H+A*N)*q,(_*J-C*G+T*F)*q,(y*G-v*J-b*F)*q,(M*V-R*H+I*O)*q,(E*H-S*V-A*O)*q,(C*k-_*Z-w*F)*q,(v*Z-y*k+x*F)*q,(R*N-M*X-L*O)*q,(S*X-E*N+D*O)*q)):this},adjoint:function(){var g=this.val,v=g[0],y=g[1],x=g[2],b=g[3],_=g[4],C=g[5],w=g[6],T=g[7],S=g[8],E=g[9],D=g[10],A=g[11],M=g[12],R=g[13],L=g[14],I=g[15];return this.setValues(C*(D*I-A*L)-E*(w*I-T*L)+R*(w*A-T*D),-(y*(D*I-A*L)-E*(x*I-b*L)+R*(x*A-b*D)),y*(w*I-T*L)-C*(x*I-b*L)+R*(x*T-b*w),-(y*(w*A-T*D)-C*(x*A-b*D)+E*(x*T-b*w)),-(_*(D*I-A*L)-S*(w*I-T*L)+M*(w*A-T*D)),v*(D*I-A*L)-S*(x*I-b*L)+M*(x*A-b*D),-(v*(w*I-T*L)-_*(x*I-b*L)+M*(x*T-b*w)),v*(w*A-T*D)-_*(x*A-b*D)+S*(x*T-b*w),_*(E*I-A*R)-S*(C*I-T*R)+M*(C*A-T*E),-(v*(E*I-A*R)-S*(y*I-b*R)+M*(y*A-b*E)),v*(C*I-T*R)-_*(y*I-b*R)+M*(y*T-b*C),-(v*(C*A-T*E)-_*(y*A-b*E)+S*(y*T-b*C)),-(_*(E*L-D*R)-S*(C*L-w*R)+M*(C*D-w*E)),v*(E*L-D*R)-S*(y*L-x*R)+M*(y*D-x*E),-(v*(C*L-w*R)-_*(y*L-x*R)+M*(y*w-x*C)),v*(C*D-w*E)-_*(y*D-x*E)+S*(y*w-x*C))},determinant:function(){var g=this.val,v=g[0],y=g[1],x=g[2],b=g[3],_=g[4],C=g[5],w=g[6],T=g[7],S=g[8],E=g[9],D=g[10],A=g[11],M=g[12],R=g[13],L=g[14],I=g[15],O=v*C-y*_,N=v*w-x*_,H=v*T-b*_,X=y*w-x*C,V=y*T-b*C,z=x*T-b*w,F=S*R-E*M,k=S*L-D*M,G=S*I-A*M,Z=E*L-D*R,J=E*I-A*R,W=D*I-A*L;return O*W-N*J+H*Z+X*G-V*k+z*F},multiply:function(g){var v=this.val,y=v[0],x=v[1],b=v[2],_=v[3],C=v[4],w=v[5],T=v[6],S=v[7],E=v[8],D=v[9],A=v[10],M=v[11],R=v[12],L=v[13],I=v[14],O=v[15],N=g.val,H=N[0],X=N[1],V=N[2],z=N[3];return v[0]=H*y+X*C+V*E+z*R,v[1]=H*x+X*w+V*D+z*L,v[2]=H*b+X*T+V*A+z*I,v[3]=H*_+X*S+V*M+z*O,H=N[4],X=N[5],V=N[6],z=N[7],v[4]=H*y+X*C+V*E+z*R,v[5]=H*x+X*w+V*D+z*L,v[6]=H*b+X*T+V*A+z*I,v[7]=H*_+X*S+V*M+z*O,H=N[8],X=N[9],V=N[10],z=N[11],v[8]=H*y+X*C+V*E+z*R,v[9]=H*x+X*w+V*D+z*L,v[10]=H*b+X*T+V*A+z*I,v[11]=H*_+X*S+V*M+z*O,H=N[12],X=N[13],V=N[14],z=N[15],v[12]=H*y+X*C+V*E+z*R,v[13]=H*x+X*w+V*D+z*L,v[14]=H*b+X*T+V*A+z*I,v[15]=H*_+X*S+V*M+z*O,this},multiplyLocal:function(g){var v=this.val,y=g.val;return this.setValues(v[0]*y[0]+v[1]*y[4]+v[2]*y[8]+v[3]*y[12],v[0]*y[1]+v[1]*y[5]+v[2]*y[9]+v[3]*y[13],v[0]*y[2]+v[1]*y[6]+v[2]*y[10]+v[3]*y[14],v[0]*y[3]+v[1]*y[7]+v[2]*y[11]+v[3]*y[15],v[4]*y[0]+v[5]*y[4]+v[6]*y[8]+v[7]*y[12],v[4]*y[1]+v[5]*y[5]+v[6]*y[9]+v[7]*y[13],v[4]*y[2]+v[5]*y[6]+v[6]*y[10]+v[7]*y[14],v[4]*y[3]+v[5]*y[7]+v[6]*y[11]+v[7]*y[15],v[8]*y[0]+v[9]*y[4]+v[10]*y[8]+v[11]*y[12],v[8]*y[1]+v[9]*y[5]+v[10]*y[9]+v[11]*y[13],v[8]*y[2]+v[9]*y[6]+v[10]*y[10]+v[11]*y[14],v[8]*y[3]+v[9]*y[7]+v[10]*y[11]+v[11]*y[15],v[12]*y[0]+v[13]*y[4]+v[14]*y[8]+v[15]*y[12],v[12]*y[1]+v[13]*y[5]+v[14]*y[9]+v[15]*y[13],v[12]*y[2]+v[13]*y[6]+v[14]*y[10]+v[15]*y[14],v[12]*y[3]+v[13]*y[7]+v[14]*y[11]+v[15]*y[15])},premultiply:function(g){return this.multiplyMatrices(g,this)},multiplyMatrices:function(g,v){var y=g.val,x=v.val,b=y[0],_=y[4],C=y[8],w=y[12],T=y[1],S=y[5],E=y[9],D=y[13],A=y[2],M=y[6],R=y[10],L=y[14],I=y[3],O=y[7],N=y[11],H=y[15],X=x[0],V=x[4],z=x[8],F=x[12],k=x[1],G=x[5],Z=x[9],J=x[13],W=x[2],q=x[6],ie=x[10],re=x[14],oe=x[3],ve=x[7],_e=x[11],ye=x[15];return this.setValues(b*X+_*k+C*W+w*oe,T*X+S*k+E*W+D*oe,A*X+M*k+R*W+L*oe,I*X+O*k+N*W+H*oe,b*V+_*G+C*q+w*ve,T*V+S*G+E*q+D*ve,A*V+M*G+R*q+L*ve,I*V+O*G+N*q+H*ve,b*z+_*Z+C*ie+w*_e,T*z+S*Z+E*ie+D*_e,A*z+M*Z+R*ie+L*_e,I*z+O*Z+N*ie+H*_e,b*F+_*J+C*re+w*ye,T*F+S*J+E*re+D*ye,A*F+M*J+R*re+L*ye,I*F+O*J+N*re+H*ye)},translate:function(g){return this.translateXYZ(g.x,g.y,g.z)},translateXYZ:function(g,v,y){var x=this.val;return x[12]=x[0]*g+x[4]*v+x[8]*y+x[12],x[13]=x[1]*g+x[5]*v+x[9]*y+x[13],x[14]=x[2]*g+x[6]*v+x[10]*y+x[14],x[15]=x[3]*g+x[7]*v+x[11]*y+x[15],this},scale:function(g){return this.scaleXYZ(g.x,g.y,g.z)},scaleXYZ:function(g,v,y){var x=this.val;return x[0]=x[0]*g,x[1]=x[1]*g,x[2]=x[2]*g,x[3]=x[3]*g,x[4]=x[4]*v,x[5]=x[5]*v,x[6]=x[6]*v,x[7]=x[7]*v,x[8]=x[8]*y,x[9]=x[9]*y,x[10]=x[10]*y,x[11]=x[11]*y,this},makeRotationAxis:function(g,v){var y=Math.cos(v),x=Math.sin(v),b=1-y,_=g.x,C=g.y,w=g.z,T=b*_,S=b*C;return this.setValues(T*_+y,T*C-x*w,T*w+x*C,0,T*C+x*w,S*C+y,S*w-x*_,0,T*w-x*C,S*w+x*_,b*w*w+y,0,0,0,0,1)},rotate:function(g,v){var y=this.val,x=v.x,b=v.y,_=v.z,C=Math.sqrt(x*x+b*b+_*_);if(Math.abs(C){var a=function(s,o,d){return Math.min(s+o,d)};n.exports=a},50040:n=>{var a=function(s){var o=s.length;if(o===0)return 0;s.sort(function(l,c){return l-c});var d=Math.floor(o/2);return o%2===0?(s[d]+s[d-1])/2:s[d]};n.exports=a},37204:n=>{var a=function(s,o,d){return Math.max(s-o,d)};n.exports=a},65201:n=>{var a=function(s,o,d,l){d===void 0&&(d=o+1);var c=(s-o)/(d-o);return c>1?l!==void 0?(c=(l-s)/(l-d),c<0&&(c=0)):c=1:c<0&&(c=0),c};n.exports=a},15746:(n,a,s)=>{var o=s(83419),d=s(94434),l=s(29747),c=s(25836),h=1e-6,u=new Int8Array([1,2,0]),f=new Float32Array([0,0,0]),p=new c(1,0,0),m=new c(0,1,0),g=new c,v=new d,y=new o({initialize:function(b,_,C,w){this.onChangeCallback=l,this.set(b,_,C,w)},x:{get:function(){return this._x},set:function(x){this._x=x,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(x){this._y=x,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(x){this._z=x,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(x){this._w=x,this.onChangeCallback(this)}},copy:function(x){return this.set(x)},set:function(x,b,_,C,w){return w===void 0&&(w=!0),typeof x=="object"?(this._x=x.x||0,this._y=x.y||0,this._z=x.z||0,this._w=x.w||0):(this._x=x||0,this._y=b||0,this._z=_||0,this._w=C||0),w&&this.onChangeCallback(this),this},add:function(x){return this._x+=x.x,this._y+=x.y,this._z+=x.z,this._w+=x.w,this.onChangeCallback(this),this},subtract:function(x){return this._x-=x.x,this._y-=x.y,this._z-=x.z,this._w-=x.w,this.onChangeCallback(this),this},scale:function(x){return this._x*=x,this._y*=x,this._z*=x,this._w*=x,this.onChangeCallback(this),this},length:function(){var x=this.x,b=this.y,_=this.z,C=this.w;return Math.sqrt(x*x+b*b+_*_+C*C)},lengthSq:function(){var x=this.x,b=this.y,_=this.z,C=this.w;return x*x+b*b+_*_+C*C},normalize:function(){var x=this.x,b=this.y,_=this.z,C=this.w,w=x*x+b*b+_*_+C*C;return w>0&&(w=1/Math.sqrt(w),this._x=x*w,this._y=b*w,this._z=_*w,this._w=C*w),this.onChangeCallback(this),this},dot:function(x){return this.x*x.x+this.y*x.y+this.z*x.z+this.w*x.w},lerp:function(x,b){b===void 0&&(b=0);var _=this.x,C=this.y,w=this.z,T=this.w;return this.set(_+b*(x.x-_),C+b*(x.y-C),w+b*(x.z-w),T+b*(x.w-T))},rotationTo:function(x,b){var _=x.x*b.x+x.y*b.y+x.z*b.z;return _<-.999999?(g.copy(p).cross(x).length().999999?this.set(0,0,0,1):(g.copy(x).cross(b),this._x=g.x,this._y=g.y,this._z=g.z,this._w=1+_,this.normalize())},setAxes:function(x,b,_){var C=v.val;return C[0]=b.x,C[3]=b.y,C[6]=b.z,C[1]=_.x,C[4]=_.y,C[7]=_.z,C[2]=-x.x,C[5]=-x.y,C[8]=-x.z,this.fromMat3(v).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(x,b){b=b*.5;var _=Math.sin(b);return this.set(_*x.x,_*x.y,_*x.z,Math.cos(b))},multiply:function(x){var b=this.x,_=this.y,C=this.z,w=this.w,T=x.x,S=x.y,E=x.z,D=x.w;return this.set(b*D+w*T+_*E-C*S,_*D+w*S+C*T-b*E,C*D+w*E+b*S-_*T,w*D-b*T-_*S-C*E)},slerp:function(x,b){var _=this.x,C=this.y,w=this.z,T=this.w,S=x.x,E=x.y,D=x.z,A=x.w,M=_*S+C*E+w*D+T*A;M<0&&(M=-M,S=-S,E=-E,D=-D,A=-A);var R=1-b,L=b;if(1-M>h){var I=Math.acos(M),O=Math.sin(I);R=Math.sin((1-b)*I)/O,L=Math.sin(b*I)/O}return this.set(R*_+L*S,R*C+L*E,R*w+L*D,R*T+L*A)},invert:function(){var x=this.x,b=this.y,_=this.z,C=this.w,w=x*x+b*b+_*_+C*C,T=w?1/w:0;return this.set(-x*T,-b*T,-_*T,C*T)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(x){x*=.5;var b=this.x,_=this.y,C=this.z,w=this.w,T=Math.sin(x),S=Math.cos(x);return this.set(b*S+w*T,_*S+C*T,C*S-_*T,w*S-b*T)},rotateY:function(x){x*=.5;var b=this.x,_=this.y,C=this.z,w=this.w,T=Math.sin(x),S=Math.cos(x);return this.set(b*S-C*T,_*S+w*T,C*S+b*T,w*S-_*T)},rotateZ:function(x){x*=.5;var b=this.x,_=this.y,C=this.z,w=this.w,T=Math.sin(x),S=Math.cos(x);return this.set(b*S+_*T,_*S-b*T,C*S+w*T,w*S-C*T)},calculateW:function(){var x=this.x,b=this.y,_=this.z;return this.w=-Math.sqrt(1-x*x-b*b-_*_),this},setFromEuler:function(x,b){var _=x.x/2,C=x.y/2,w=x.z/2,T=Math.cos(_),S=Math.cos(C),E=Math.cos(w),D=Math.sin(_),A=Math.sin(C),M=Math.sin(w);switch(x.order){case"XYZ":{this.set(D*S*E+T*A*M,T*A*E-D*S*M,T*S*M+D*A*E,T*S*E-D*A*M,b);break}case"YXZ":{this.set(D*S*E+T*A*M,T*A*E-D*S*M,T*S*M-D*A*E,T*S*E+D*A*M,b);break}case"ZXY":{this.set(D*S*E-T*A*M,T*A*E+D*S*M,T*S*M+D*A*E,T*S*E-D*A*M,b);break}case"ZYX":{this.set(D*S*E-T*A*M,T*A*E+D*S*M,T*S*M-D*A*E,T*S*E+D*A*M,b);break}case"YZX":{this.set(D*S*E+T*A*M,T*A*E+D*S*M,T*S*M-D*A*E,T*S*E-D*A*M,b);break}case"XZY":{this.set(D*S*E-T*A*M,T*A*E-D*S*M,T*S*M+D*A*E,T*S*E+D*A*M,b);break}}return this},setFromRotationMatrix:function(x){var b=x.val,_=b[0],C=b[4],w=b[8],T=b[1],S=b[5],E=b[9],D=b[2],A=b[6],M=b[10],R=_+S+M,L;return R>0?(L=.5/Math.sqrt(R+1),this.set((A-E)*L,(w-D)*L,(T-C)*L,.25/L)):_>S&&_>M?(L=2*Math.sqrt(1+_-S-M),this.set(.25*L,(C+T)/L,(w+D)/L,(A-E)/L)):S>M?(L=2*Math.sqrt(1+S-_-M),this.set((C+T)/L,.25*L,(E+A)/L,(w-D)/L)):(L=2*Math.sqrt(1+M-_-S),this.set((w+D)/L,(E+A)/L,.25*L,(T-C)/L)),this},fromMat3:function(x){var b=x.val,_=b[0]+b[4]+b[8],C;if(_>0)C=Math.sqrt(_+1),this.w=.5*C,C=.5/C,this._x=(b[7]-b[5])*C,this._y=(b[2]-b[6])*C,this._z=(b[3]-b[1])*C;else{var w=0;b[4]>b[0]&&(w=1),b[8]>b[w*3+w]&&(w=2);var T=u[w],S=u[T];C=Math.sqrt(b[w*3+w]-b[T*3+T]-b[S*3+S]+1),f[w]=.5*C,C=.5/C,f[T]=(b[T*3+w]+b[w*3+T])*C,f[S]=(b[S*3+w]+b[w*3+S])*C,this._x=f[0],this._y=f[1],this._z=f[2],this._w=(b[S*3+T]-b[T*3+S])*C}return this.onChangeCallback(this),this}});n.exports=y},43396:(n,a,s)=>{var o=s(36383),d=function(l){return l*o.RAD_TO_DEG};n.exports=d},74362:n=>{var a=function(s,o){o===void 0&&(o=1);var d=Math.random()*2*Math.PI;return s.x=Math.cos(d)*o,s.y=Math.sin(d)*o,s};n.exports=a},60706:n=>{var a=function(s,o){o===void 0&&(o=1);var d=Math.random()*2*Math.PI,l=Math.random()*2-1,c=Math.sqrt(1-l*l)*o;return s.x=Math.cos(d)*c,s.y=Math.sin(d)*c,s.z=l*o,s};n.exports=a},67421:n=>{var a=function(s,o){return o===void 0&&(o=1),s.x=(Math.random()*2-1)*o,s.y=(Math.random()*2-1)*o,s.z=(Math.random()*2-1)*o,s.w=(Math.random()*2-1)*o,s};n.exports=a},36305:n=>{var a=function(s,o){var d=s.x,l=s.y;return s.x=d*Math.cos(o)-l*Math.sin(o),s.y=d*Math.sin(o)+l*Math.cos(o),s};n.exports=a},11520:n=>{var a=function(s,o,d,l){var c=Math.cos(l),h=Math.sin(l),u=s.x-o,f=s.y-d;return s.x=u*c-f*h+o,s.y=u*h+f*c+d,s};n.exports=a},1163:n=>{var a=function(s,o,d,l,c){var h=l+Math.atan2(s.y-d,s.x-o);return s.x=o+c*Math.cos(h),s.y=d+c*Math.sin(h),s};n.exports=a},70336:n=>{var a=function(s,o,d,l,c){return s.x=o+c*Math.cos(l),s.y=d+c*Math.sin(l),s};n.exports=a},72678:(n,a,s)=>{var o=s(25836),d=s(37867),l=s(15746),c=new d,h=new l,u=new o,f=function(p,m,g){return h.setAxisAngle(m,g),c.fromRotationTranslation(h,u.set(0,0,0)),p.transformMat4(c)};n.exports=f},2284:n=>{var a=function(s){return s>0?Math.ceil(s):Math.floor(s)};n.exports=a},41013:n=>{var a=function(s,o,d){o===void 0&&(o=0),d===void 0&&(d=10);var l=Math.pow(d,-o);return Math.round(s*l)/l};n.exports=a},16922:n=>{var a=function(s,o,d,l){o===void 0&&(o=1),d===void 0&&(d=1),l===void 0&&(l=1),l*=Math.PI/s;for(var c=[],h=[],u=0;u{var a=function(s,o,d){return s<=o?0:s>=d?1:(s=(s-o)/(d-o),s*s*(3-2*s))};n.exports=a},54261:n=>{var a=function(s,o,d){return s=Math.max(0,Math.min(1,(s-o)/(d-o))),s*s*s*(s*(s*6-15)+10)};n.exports=a},44408:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u){u===void 0&&(u=new o);var f=0,p=0,m=c*h;return l>0&&l<=m&&(l>c-1?(p=Math.floor(l/c),f=l-p*c):f=l),u.set(f,p)};n.exports=d},85955:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u,f,p,m,g){g===void 0&&(g=new o);var v=Math.sin(f),y=Math.cos(f),x=y*p,b=v*p,_=-v*m,C=y*m,w=1/(x*C+_*-b);return g.x=C*w*l+-_*w*c+(u*_-h*C)*w,g.y=x*w*c+-b*w*l+(-u*x+h*b)*w,g};n.exports=d},26099:(n,a,s)=>{var o=s(83419),d=s(43855),l=new o({initialize:function(h,u){this.x=0,this.y=0,typeof h=="object"?(this.x=h.x||0,this.y=h.y||0):(u===void 0&&(u=h),this.x=h||0,this.y=u||0)},clone:function(){return new l(this.x,this.y)},copy:function(c){return this.x=c.x||0,this.y=c.y||0,this},setFromObject:function(c){return this.x=c.x||0,this.y=c.y||0,this},set:function(c,h){return h===void 0&&(h=c),this.x=c,this.y=h,this},setTo:function(c,h){return this.set(c,h)},setToPolar:function(c,h){return h==null&&(h=1),this.x=Math.cos(c)*h,this.y=Math.sin(c)*h,this},equals:function(c){return this.x===c.x&&this.y===c.y},fuzzyEquals:function(c,h){return d(this.x,c.x,h)&&d(this.y,c.y,h)},angle:function(){var c=Math.atan2(this.y,this.x);return c<0&&(c+=2*Math.PI),c},setAngle:function(c){return this.setToPolar(c,this.length())},add:function(c){return this.x+=c.x,this.y+=c.y,this},subtract:function(c){return this.x-=c.x,this.y-=c.y,this},multiply:function(c){return this.x*=c.x,this.y*=c.y,this},scale:function(c){return isFinite(c)?(this.x*=c,this.y*=c):(this.x=0,this.y=0),this},divide:function(c){return this.x/=c.x,this.y/=c.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(c){var h=c.x-this.x,u=c.y-this.y;return Math.sqrt(h*h+u*u)},distanceSq:function(c){var h=c.x-this.x,u=c.y-this.y;return h*h+u*u},length:function(){var c=this.x,h=this.y;return Math.sqrt(c*c+h*h)},setLength:function(c){return this.normalize().scale(c)},lengthSq:function(){var c=this.x,h=this.y;return c*c+h*h},normalize:function(){var c=this.x,h=this.y,u=c*c+h*h;return u>0&&(u=1/Math.sqrt(u),this.x=c*u,this.y=h*u),this},normalizeRightHand:function(){var c=this.x;return this.x=this.y*-1,this.y=c,this},normalizeLeftHand:function(){var c=this.x;return this.x=this.y,this.y=c*-1,this},dot:function(c){return this.x*c.x+this.y*c.y},cross:function(c){return this.x*c.y-this.y*c.x},lerp:function(c,h){h===void 0&&(h=0);var u=this.x,f=this.y;return this.x=u+h*(c.x-u),this.y=f+h*(c.y-f),this},transformMat3:function(c){var h=this.x,u=this.y,f=c.val;return this.x=f[0]*h+f[3]*u+f[6],this.y=f[1]*h+f[4]*u+f[7],this},transformMat4:function(c){var h=this.x,u=this.y,f=c.val;return this.x=f[0]*h+f[4]*u+f[12],this.y=f[1]*h+f[5]*u+f[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(c){var h=this.length();return h&&h>c&&this.scale(c/h),this},reflect:function(c){return c=c.clone().normalize(),this.subtract(c.scale(2*this.dot(c)))},mirror:function(c){return this.reflect(c).negate()},rotate:function(c){var h=Math.cos(c),u=Math.sin(c);return this.set(h*this.x-u*this.y,u*this.x+h*this.y)},project:function(c){var h=this.dot(c)/c.dot(c);return this.copy(c).scale(h)}});l.ZERO=new l,l.RIGHT=new l(1,0),l.LEFT=new l(-1,0),l.UP=new l(0,-1),l.DOWN=new l(0,1),l.ONE=new l(1,1),n.exports=l},25836:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h,u){this.x=0,this.y=0,this.z=0,typeof c=="object"?(this.x=c.x||0,this.y=c.y||0,this.z=c.z||0):(this.x=c||0,this.y=h||0,this.z=u||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(l){return this.x=Math.min(this.x,l.x),this.y=Math.min(this.y,l.y),this.z=Math.min(this.z,l.z),this},max:function(l){return this.x=Math.max(this.x,l.x),this.y=Math.max(this.y,l.y),this.z=Math.max(this.z,l.z),this},clone:function(){return new d(this.x,this.y,this.z)},addVectors:function(l,c){return this.x=l.x+c.x,this.y=l.y+c.y,this.z=l.z+c.z,this},subVectors:function(l,c){return this.x=l.x-c.x,this.y=l.y-c.y,this.z=l.z-c.z,this},crossVectors:function(l,c){var h=l.x,u=l.y,f=l.z,p=c.x,m=c.y,g=c.z;return this.x=u*g-f*m,this.y=f*p-h*g,this.z=h*m-u*p,this},equals:function(l){return this.x===l.x&&this.y===l.y&&this.z===l.z},copy:function(l){return this.x=l.x,this.y=l.y,this.z=l.z||0,this},set:function(l,c,h){return typeof l=="object"?(this.x=l.x||0,this.y=l.y||0,this.z=l.z||0):(this.x=l||0,this.y=c||0,this.z=h||0),this},setFromMatrixPosition:function(l){return this.fromArray(l.val,12)},setFromMatrixColumn:function(l,c){return this.fromArray(l.val,c*4)},fromArray:function(l,c){return c===void 0&&(c=0),this.x=l[c],this.y=l[c+1],this.z=l[c+2],this},add:function(l){return this.x+=l.x,this.y+=l.y,this.z+=l.z||0,this},addScalar:function(l){return this.x+=l,this.y+=l,this.z+=l,this},addScale:function(l,c){return this.x+=l.x*c,this.y+=l.y*c,this.z+=l.z*c||0,this},subtract:function(l){return this.x-=l.x,this.y-=l.y,this.z-=l.z||0,this},multiply:function(l){return this.x*=l.x,this.y*=l.y,this.z*=l.z||1,this},scale:function(l){return isFinite(l)?(this.x*=l,this.y*=l,this.z*=l):(this.x=0,this.y=0,this.z=0),this},divide:function(l){return this.x/=l.x,this.y/=l.y,this.z/=l.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(l){var c=l.x-this.x,h=l.y-this.y,u=l.z-this.z||0;return Math.sqrt(c*c+h*h+u*u)},distanceSq:function(l){var c=l.x-this.x,h=l.y-this.y,u=l.z-this.z||0;return c*c+h*h+u*u},length:function(){var l=this.x,c=this.y,h=this.z;return Math.sqrt(l*l+c*c+h*h)},lengthSq:function(){var l=this.x,c=this.y,h=this.z;return l*l+c*c+h*h},normalize:function(){var l=this.x,c=this.y,h=this.z,u=l*l+c*c+h*h;return u>0&&(u=1/Math.sqrt(u),this.x=l*u,this.y=c*u,this.z=h*u),this},dot:function(l){return this.x*l.x+this.y*l.y+this.z*l.z},cross:function(l){var c=this.x,h=this.y,u=this.z,f=l.x,p=l.y,m=l.z;return this.x=h*m-u*p,this.y=u*f-c*m,this.z=c*p-h*f,this},lerp:function(l,c){c===void 0&&(c=0);var h=this.x,u=this.y,f=this.z;return this.x=h+c*(l.x-h),this.y=u+c*(l.y-u),this.z=f+c*(l.z-f),this},applyMatrix3:function(l){var c=this.x,h=this.y,u=this.z,f=l.val;return this.x=f[0]*c+f[3]*h+f[6]*u,this.y=f[1]*c+f[4]*h+f[7]*u,this.z=f[2]*c+f[5]*h+f[8]*u,this},applyMatrix4:function(l){var c=this.x,h=this.y,u=this.z,f=l.val,p=1/(f[3]*c+f[7]*h+f[11]*u+f[15]);return this.x=(f[0]*c+f[4]*h+f[8]*u+f[12])*p,this.y=(f[1]*c+f[5]*h+f[9]*u+f[13])*p,this.z=(f[2]*c+f[6]*h+f[10]*u+f[14])*p,this},transformMat3:function(l){var c=this.x,h=this.y,u=this.z,f=l.val;return this.x=c*f[0]+h*f[3]+u*f[6],this.y=c*f[1]+h*f[4]+u*f[7],this.z=c*f[2]+h*f[5]+u*f[8],this},transformMat4:function(l){var c=this.x,h=this.y,u=this.z,f=l.val;return this.x=f[0]*c+f[4]*h+f[8]*u+f[12],this.y=f[1]*c+f[5]*h+f[9]*u+f[13],this.z=f[2]*c+f[6]*h+f[10]*u+f[14],this},transformCoordinates:function(l){var c=this.x,h=this.y,u=this.z,f=l.val,p=c*f[0]+h*f[4]+u*f[8]+f[12],m=c*f[1]+h*f[5]+u*f[9]+f[13],g=c*f[2]+h*f[6]+u*f[10]+f[14],v=c*f[3]+h*f[7]+u*f[11]+f[15];return this.x=p/v,this.y=m/v,this.z=g/v,this},transformQuat:function(l){var c=this.x,h=this.y,u=this.z,f=l.x,p=l.y,m=l.z,g=l.w,v=g*c+p*u-m*h,y=g*h+m*c-f*u,x=g*u+f*h-p*c,b=-f*c-p*h-m*u;return this.x=v*g+b*-f+y*-m-x*-p,this.y=y*g+b*-p+x*-f-v*-m,this.z=x*g+b*-m+v*-p-y*-f,this},project:function(l){var c=this.x,h=this.y,u=this.z,f=l.val,p=f[0],m=f[1],g=f[2],v=f[3],y=f[4],x=f[5],b=f[6],_=f[7],C=f[8],w=f[9],T=f[10],S=f[11],E=f[12],D=f[13],A=f[14],M=f[15],R=1/(c*v+h*_+u*S+M);return this.x=(c*p+h*y+u*C+E)*R,this.y=(c*m+h*x+u*w+D)*R,this.z=(c*g+h*b+u*T+A)*R,this},projectViewMatrix:function(l,c){return this.applyMatrix4(l).applyMatrix4(c)},unprojectViewMatrix:function(l,c){return this.applyMatrix4(l).applyMatrix4(c)},unproject:function(l,c){var h=l.x,u=l.y,f=l.z,p=l.w,m=this.x-h,g=p-this.y-1-u,v=this.z;return this.x=2*m/f-1,this.y=2*g/p-1,this.z=2*v-1,this.project(c)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});d.ZERO=new d,d.RIGHT=new d(1,0,0),d.LEFT=new d(-1,0,0),d.UP=new d(0,-1,0),d.DOWN=new d(0,1,0),d.FORWARD=new d(0,0,1),d.BACK=new d(0,0,-1),d.ONE=new d(1,1,1),n.exports=d},61369:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h,u,f){this.x=0,this.y=0,this.z=0,this.w=0,typeof c=="object"?(this.x=c.x||0,this.y=c.y||0,this.z=c.z||0,this.w=c.w||0):(this.x=c||0,this.y=h||0,this.z=u||0,this.w=f||0)},clone:function(){return new d(this.x,this.y,this.z,this.w)},copy:function(l){return this.x=l.x,this.y=l.y,this.z=l.z||0,this.w=l.w||0,this},equals:function(l){return this.x===l.x&&this.y===l.y&&this.z===l.z&&this.w===l.w},set:function(l,c,h,u){return typeof l=="object"?(this.x=l.x||0,this.y=l.y||0,this.z=l.z||0,this.w=l.w||0):(this.x=l||0,this.y=c||0,this.z=h||0,this.w=u||0),this},add:function(l){return this.x+=l.x,this.y+=l.y,this.z+=l.z||0,this.w+=l.w||0,this},subtract:function(l){return this.x-=l.x,this.y-=l.y,this.z-=l.z||0,this.w-=l.w||0,this},scale:function(l){return this.x*=l,this.y*=l,this.z*=l,this.w*=l,this},length:function(){var l=this.x,c=this.y,h=this.z,u=this.w;return Math.sqrt(l*l+c*c+h*h+u*u)},lengthSq:function(){var l=this.x,c=this.y,h=this.z,u=this.w;return l*l+c*c+h*h+u*u},normalize:function(){var l=this.x,c=this.y,h=this.z,u=this.w,f=l*l+c*c+h*h+u*u;return f>0&&(f=1/Math.sqrt(f),this.x=l*f,this.y=c*f,this.z=h*f,this.w=u*f),this},dot:function(l){return this.x*l.x+this.y*l.y+this.z*l.z+this.w*l.w},lerp:function(l,c){c===void 0&&(c=0);var h=this.x,u=this.y,f=this.z,p=this.w;return this.x=h+c*(l.x-h),this.y=u+c*(l.y-u),this.z=f+c*(l.z-f),this.w=p+c*(l.w-p),this},multiply:function(l){return this.x*=l.x,this.y*=l.y,this.z*=l.z||1,this.w*=l.w||1,this},divide:function(l){return this.x/=l.x,this.y/=l.y,this.z/=l.z||1,this.w/=l.w||1,this},distance:function(l){var c=l.x-this.x,h=l.y-this.y,u=l.z-this.z||0,f=l.w-this.w||0;return Math.sqrt(c*c+h*h+u*u+f*f)},distanceSq:function(l){var c=l.x-this.x,h=l.y-this.y,u=l.z-this.z||0,f=l.w-this.w||0;return c*c+h*h+u*u+f*f},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(l){var c=this.x,h=this.y,u=this.z,f=this.w,p=l.val;return this.x=p[0]*c+p[4]*h+p[8]*u+p[12]*f,this.y=p[1]*c+p[5]*h+p[9]*u+p[13]*f,this.z=p[2]*c+p[6]*h+p[10]*u+p[14]*f,this.w=p[3]*c+p[7]*h+p[11]*u+p[15]*f,this},transformQuat:function(l){var c=this.x,h=this.y,u=this.z,f=l.x,p=l.y,m=l.z,g=l.w,v=g*c+p*u-m*h,y=g*h+m*c-f*u,x=g*u+f*h-p*c,b=-f*c-p*h-m*u;return this.x=v*g+b*-f+y*-m-x*-p,this.y=y*g+b*-p+x*-f-v*-m,this.z=x*g+b*-m+v*-p-y*-f,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});d.prototype.sub=d.prototype.subtract,d.prototype.mul=d.prototype.multiply,d.prototype.div=d.prototype.divide,d.prototype.dist=d.prototype.distance,d.prototype.distSq=d.prototype.distanceSq,d.prototype.len=d.prototype.length,d.prototype.lenSq=d.prototype.lengthSq,n.exports=d},60417:n=>{var a=function(s,o,d){return Math.abs(s-o)<=d};n.exports=a},15994:n=>{var a=function(s,o,d){var l=d-o;return o+((s-o)%l+l)%l};n.exports=a},31040:n=>{var a=function(s,o,d,l){return Math.atan2(l-o,d-s)};n.exports=a},55495:n=>{var a=function(s,o){return Math.atan2(o.y-s.y,o.x-s.x)};n.exports=a},128:n=>{var a=function(s,o){return Math.atan2(o.x-s.x,o.y-s.y)};n.exports=a},41273:n=>{var a=function(s,o,d,l){return Math.atan2(d-s,l-o)};n.exports=a},1432:(n,a,s)=>{var o=s(36383),d=function(l){return l>Math.PI&&(l-=o.PI2),Math.abs(((l+o.TAU)%o.PI2-o.PI2)%o.PI2)};n.exports=d},12407:n=>{var a=function(s){return s=s%(2*Math.PI),s>=0?s:s+2*Math.PI};n.exports=a},53993:(n,a,s)=>{var o=s(99472),d=function(){return o(-Math.PI,Math.PI)};n.exports=d},86564:(n,a,s)=>{var o=s(99472),d=function(){return o(-180,180)};n.exports=d},90154:(n,a,s)=>{var o=s(12407),d=function(l){return o(l+Math.PI)};n.exports=d},48736:(n,a,s)=>{var o=s(36383),d=function(l,c,h){return h===void 0&&(h=.05),l===c||(Math.abs(c-l)<=h||Math.abs(c-l)>=o.PI2-h?l=c:(Math.abs(c-l)>Math.PI&&(cl?l+=h:c{var a=function(s,o){var d=o-s;if(d===0)return 0;var l=Math.floor((d- -180)/360);return d-l*360};n.exports=a},86554:(n,a,s)=>{var o=s(15994),d=function(l){return o(l,-Math.PI,Math.PI)};n.exports=d},30954:(n,a,s)=>{var o=s(15994),d=function(l){return o(l,-180,180)};n.exports=d},25588:(n,a,s)=>{n.exports={Between:s(31040),BetweenPoints:s(55495),BetweenPointsY:s(128),BetweenY:s(41273),CounterClockwise:s(1432),Normalize:s(12407),Random:s(53993),RandomDegrees:s(86564),Reverse:s(90154),RotateTo:s(48736),ShortestBetween:s(61430),Wrap:s(86554),WrapDegrees:s(30954)}},36383:n=>{var a={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};n.exports=a},20339:n=>{var a=function(s,o,d,l){var c=s-d,h=o-l;return Math.sqrt(c*c+h*h)};n.exports=a},52816:n=>{var a=function(s,o){var d=s.x-o.x,l=s.y-o.y;return Math.sqrt(d*d+l*l)};n.exports=a},64559:n=>{var a=function(s,o){var d=s.x-o.x,l=s.y-o.y;return d*d+l*l};n.exports=a},82340:n=>{var a=function(s,o,d,l){return Math.max(Math.abs(s-d),Math.abs(o-l))};n.exports=a},14390:n=>{var a=function(s,o,d,l,c){return c===void 0&&(c=2),Math.sqrt(Math.pow(d-s,c)+Math.pow(l-o,c))};n.exports=a},2243:n=>{var a=function(s,o,d,l){return Math.abs(s-d)+Math.abs(o-l)};n.exports=a},89774:n=>{var a=function(s,o,d,l){var c=s-d,h=o-l;return c*c+h*h};n.exports=a},50994:(n,a,s)=>{n.exports={Between:s(20339),BetweenPoints:s(52816),BetweenPointsSquared:s(64559),Chebyshev:s(82340),Power:s(14390),Snake:s(2243),Squared:s(89774)}},62640:(n,a,s)=>{var o=s(54178),d=s(41521),l=s(79980),c=s(85433),h=s(99140),u=s(48857),f=s(81596),p=s(59133),m=s(98516),g=s(35248),v=s(82500),y=s(49752);n.exports={Power0:f,Power1:p.Out,Power2:c.Out,Power3:m.Out,Power4:g.Out,Linear:f,Quad:p.Out,Cubic:c.Out,Quart:m.Out,Quint:g.Out,Sine:v.Out,Expo:u.Out,Circ:l.Out,Elastic:h.Out,Back:o.Out,Bounce:d.Out,Stepped:y,"Quad.easeIn":p.In,"Cubic.easeIn":c.In,"Quart.easeIn":m.In,"Quint.easeIn":g.In,"Sine.easeIn":v.In,"Expo.easeIn":u.In,"Circ.easeIn":l.In,"Elastic.easeIn":h.In,"Back.easeIn":o.In,"Bounce.easeIn":d.In,"Quad.easeOut":p.Out,"Cubic.easeOut":c.Out,"Quart.easeOut":m.Out,"Quint.easeOut":g.Out,"Sine.easeOut":v.Out,"Expo.easeOut":u.Out,"Circ.easeOut":l.Out,"Elastic.easeOut":h.Out,"Back.easeOut":o.Out,"Bounce.easeOut":d.Out,"Quad.easeInOut":p.InOut,"Cubic.easeInOut":c.InOut,"Quart.easeInOut":m.InOut,"Quint.easeInOut":g.InOut,"Sine.easeInOut":v.InOut,"Expo.easeInOut":u.InOut,"Circ.easeInOut":l.InOut,"Elastic.easeInOut":h.InOut,"Back.easeInOut":o.InOut,"Bounce.easeInOut":d.InOut}},1639:n=>{var a=function(s,o){return o===void 0&&(o=1.70158),s*s*((o+1)*s-o)};n.exports=a},50099:n=>{var a=function(s,o){o===void 0&&(o=1.70158);var d=o*1.525;return(s*=2)<1?.5*(s*s*((d+1)*s-d)):.5*((s-=2)*s*((d+1)*s+d)+2)};n.exports=a},41286:n=>{var a=function(s,o){return o===void 0&&(o=1.70158),--s*s*((o+1)*s+o)+1};n.exports=a},54178:(n,a,s)=>{n.exports={In:s(1639),Out:s(41286),InOut:s(50099)}},59590:n=>{var a=function(s){return s=1-s,s<.36363636363636365?1-7.5625*s*s:s<.7272727272727273?1-(7.5625*(s-=.5454545454545454)*s+.75):s<.9090909090909091?1-(7.5625*(s-=.8181818181818182)*s+.9375):1-(7.5625*(s-=.9545454545454546)*s+.984375)};n.exports=a},41788:n=>{var a=function(s){var o=!1;return s<.5?(s=1-s*2,o=!0):s=s*2-1,s<.36363636363636365?s=7.5625*s*s:s<.7272727272727273?s=7.5625*(s-=.5454545454545454)*s+.75:s<.9090909090909091?s=7.5625*(s-=.8181818181818182)*s+.9375:s=7.5625*(s-=.9545454545454546)*s+.984375,o?(1-s)*.5:s*.5+.5};n.exports=a},69905:n=>{var a=function(s){return s<.36363636363636365?7.5625*s*s:s<.7272727272727273?7.5625*(s-=.5454545454545454)*s+.75:s<.9090909090909091?7.5625*(s-=.8181818181818182)*s+.9375:7.5625*(s-=.9545454545454546)*s+.984375};n.exports=a},41521:(n,a,s)=>{n.exports={In:s(59590),Out:s(69905),InOut:s(41788)}},91861:n=>{var a=function(s){return 1-Math.sqrt(1-s*s)};n.exports=a},4177:n=>{var a=function(s){return(s*=2)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1)};n.exports=a},57512:n=>{var a=function(s){return Math.sqrt(1- --s*s)};n.exports=a},79980:(n,a,s)=>{n.exports={In:s(91861),Out:s(57512),InOut:s(4177)}},51150:n=>{var a=function(s){return s*s*s};n.exports=a},82820:n=>{var a=function(s){return(s*=2)<1?.5*s*s*s:.5*((s-=2)*s*s+2)};n.exports=a},35033:n=>{var a=function(s){return--s*s*s+1};n.exports=a},85433:(n,a,s)=>{n.exports={In:s(51150),Out:s(35033),InOut:s(82820)}},69965:n=>{var a=function(s,o,d){if(o===void 0&&(o=.1),d===void 0&&(d=.1),s===0)return 0;if(s===1)return 1;var l=d/4;return o<1?o=1:l=d*Math.asin(1/o)/(2*Math.PI),-(o*Math.pow(2,10*(s-=1))*Math.sin((s-l)*(2*Math.PI)/d))};n.exports=a},50665:n=>{var a=function(s,o,d){if(o===void 0&&(o=.1),d===void 0&&(d=.1),s===0)return 0;if(s===1)return 1;var l=d/4;return o<1?o=1:l=d*Math.asin(1/o)/(2*Math.PI),(s*=2)<1?-.5*(o*Math.pow(2,10*(s-=1))*Math.sin((s-l)*(2*Math.PI)/d)):o*Math.pow(2,-10*(s-=1))*Math.sin((s-l)*(2*Math.PI)/d)*.5+1};n.exports=a},7744:n=>{var a=function(s,o,d){if(o===void 0&&(o=.1),d===void 0&&(d=.1),s===0)return 0;if(s===1)return 1;var l=d/4;return o<1?o=1:l=d*Math.asin(1/o)/(2*Math.PI),o*Math.pow(2,-10*s)*Math.sin((s-l)*(2*Math.PI)/d)+1};n.exports=a},99140:(n,a,s)=>{n.exports={In:s(69965),Out:s(7744),InOut:s(50665)}},24590:n=>{var a=function(s){return Math.pow(2,10*(s-1))-.001};n.exports=a},87844:n=>{var a=function(s){return(s*=2)<1?.5*Math.pow(2,10*(s-1)):.5*(2-Math.pow(2,-10*(s-1)))};n.exports=a},89433:n=>{var a=function(s){return 1-Math.pow(2,-10*s)};n.exports=a},48857:(n,a,s)=>{n.exports={In:s(24590),Out:s(89433),InOut:s(87844)}},48820:(n,a,s)=>{n.exports={Back:s(54178),Bounce:s(41521),Circular:s(79980),Cubic:s(85433),Elastic:s(99140),Expo:s(48857),Linear:s(81596),Quadratic:s(59133),Quartic:s(98516),Quintic:s(35248),Sine:s(82500),Stepped:s(49752)}},7147:n=>{var a=function(s){return s};n.exports=a},81596:(n,a,s)=>{n.exports=s(7147)},34826:n=>{var a=function(s){return s*s};n.exports=a},20544:n=>{var a=function(s){return(s*=2)<1?.5*s*s:-.5*(--s*(s-2)-1)};n.exports=a},92029:n=>{var a=function(s){return s*(2-s)};n.exports=a},59133:(n,a,s)=>{n.exports={In:s(34826),Out:s(92029),InOut:s(20544)}},64413:n=>{var a=function(s){return s*s*s*s};n.exports=a},78137:n=>{var a=function(s){return(s*=2)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2)};n.exports=a},45840:n=>{var a=function(s){return 1- --s*s*s*s};n.exports=a},98516:(n,a,s)=>{n.exports={In:s(64413),Out:s(45840),InOut:s(78137)}},87745:n=>{var a=function(s){return s*s*s*s*s};n.exports=a},16509:n=>{var a=function(s){return(s*=2)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2)};n.exports=a},17868:n=>{var a=function(s){return--s*s*s*s*s+1};n.exports=a},35248:(n,a,s)=>{n.exports={In:s(87745),Out:s(17868),InOut:s(16509)}},80461:n=>{var a=function(s){return s===0?0:s===1?1:1-Math.cos(s*Math.PI/2)};n.exports=a},34025:n=>{var a=function(s){return s===0?0:s===1?1:.5*(1-Math.cos(Math.PI*s))};n.exports=a},52768:n=>{var a=function(s){return s===0?0:s===1?1:Math.sin(s*Math.PI/2)};n.exports=a},82500:(n,a,s)=>{n.exports={In:s(80461),Out:s(52768),InOut:s(34025)}},72251:n=>{var a=function(s,o){return o===void 0&&(o=1),s<=0?0:s>=1?1:((o*s|0)+1)*(1/o)};n.exports=a},49752:(n,a,s)=>{n.exports=s(72251)},75698:n=>{var a=function(s,o){return o===void 0&&(o=1e-4),Math.ceil(s-o)};n.exports=a},43855:n=>{var a=function(s,o,d){return d===void 0&&(d=1e-4),Math.abs(s-o){var a=function(s,o){return o===void 0&&(o=1e-4),Math.floor(s+o)};n.exports=a},5470:n=>{var a=function(s,o,d){return d===void 0&&(d=1e-4),s>o-d};n.exports=a},94977:n=>{var a=function(s,o,d){return d===void 0&&(d=1e-4),s{n.exports={Ceil:s(75698),Equal:s(43855),Floor:s(25777),GreaterThan:s(5470),LessThan:s(94977)}},75508:(n,a,s)=>{var o=s(36383),d=s(79291),l={Angle:s(25588),Distance:s(50994),Easing:s(48820),Fuzzy:s(48379),Interpolation:s(38289),Pow2:s(49001),Snap:s(73697),RandomDataGenerator:s(28453),Average:s(53307),Bernstein:s(85710),Between:s(30976),CatmullRom:s(87842),CeilTo:s(26302),Clamp:s(45319),DegToRad:s(39506),Difference:s(61241),Euler:s(38857),Factorial:s(6411),FloatBetween:s(99472),FloorTo:s(77623),FromPercent:s(62945),GetSpeed:s(38265),IsEven:s(78702),IsEvenStrict:s(94883),Linear:s(28915),LinearXY:s(94908),MaxAdd:s(86883),Median:s(50040),MinSub:s(37204),Percent:s(65201),RadToDeg:s(43396),RandomXY:s(74362),RandomXYZ:s(60706),RandomXYZW:s(67421),Rotate:s(36305),RotateAround:s(11520),RotateAroundDistance:s(1163),RotateTo:s(70336),RoundAwayFromZero:s(2284),RoundTo:s(41013),SinCosTableGenerator:s(16922),SmootherStep:s(54261),SmoothStep:s(7602),ToXY:s(44408),TransformXY:s(85955),Within:s(60417),Wrap:s(15994),Vector2:s(26099),Vector3:s(25836),Vector4:s(61369),Matrix3:s(94434),Matrix4:s(37867),Quaternion:s(15746),RotateVec3:s(72678)};l=d(!1,l,o),n.exports=l},89318:(n,a,s)=>{var o=s(85710),d=function(l,c){for(var h=0,u=l.length-1,f=0;f<=u;f++)h+=Math.pow(1-c,u-f)*Math.pow(c,f)*l[f]*o(u,f);return h};n.exports=d},77259:(n,a,s)=>{var o=s(87842),d=function(l,c){var h=l.length-1,u=h*c,f=Math.floor(u);return l[0]===l[h]?(c<0&&(f=Math.floor(u=h*(1+c))),o(u-f,l[(f-1+h)%h],l[f],l[(f+1)%h],l[(f+2)%h])):c<0?l[0]-(o(-u,l[0],l[0],l[1],l[1])-l[0]):c>1?l[h]-(o(u-h,l[h],l[h],l[h-1],l[h-1])-l[h]):o(u-f,l[f?f-1:0],l[f],l[h{function a(c,h){var u=1-c;return u*u*u*h}function s(c,h){var u=1-c;return 3*u*u*c*h}function o(c,h){return 3*(1-c)*c*c*h}function d(c,h){return c*c*c*h}var l=function(c,h,u,f,p){return a(c,h)+s(c,u)+o(c,f)+d(c,p)};n.exports=l},28392:(n,a,s)=>{var o=s(28915),d=function(l,c){var h=l.length-1,u=h*c,f=Math.floor(u);return c<0?o(l[0],l[1],u):c>1?o(l[h],l[h-1],h-u):o(l[f],l[f+1>h?h:f+1],u-f)};n.exports=d},32112:n=>{function a(l,c){var h=1-l;return h*h*c}function s(l,c){return 2*(1-l)*l*c}function o(l,c){return l*l*c}var d=function(l,c,h,u){return a(l,c)+s(l,h)+o(l,u)};n.exports=d},47235:(n,a,s)=>{var o=s(7602),d=function(l,c,h){return c+(h-c)*o(l,0,1)};n.exports=d},50178:(n,a,s)=>{var o=s(54261),d=function(l,c,h){return c+(h-c)*o(l,0,1)};n.exports=d},38289:(n,a,s)=>{n.exports={Bezier:s(89318),CatmullRom:s(77259),CubicBezier:s(36316),Linear:s(28392),QuadraticBezier:s(32112),SmoothStep:s(47235),SmootherStep:s(50178)}},98439:n=>{var a=function(s){var o=Math.log(s)/.6931471805599453;return 1<{var a=function(s,o){return s>0&&(s&s-1)===0&&o>0&&(o&o-1)===0};n.exports=a},81230:n=>{var a=function(s){return s>0&&(s&s-1)===0};n.exports=a},49001:(n,a,s)=>{n.exports={GetNext:s(98439),IsSize:s(50030),IsValue:s(81230)}},28453:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c){c===void 0&&(c=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],c&&this.init(c)},rnd:function(){var l=2091639*this.s0+this.c*23283064365386963e-26;return this.c=l|0,this.s0=this.s1,this.s1=this.s2,this.s2=l-this.c,this.s2},hash:function(l){var c,h=this.n;l=l.toString();for(var u=0;u>>0,c-=h,c*=h,h=c>>>0,c-=h,h+=c*4294967296;return this.n=h,(h>>>0)*23283064365386963e-26},init:function(l){typeof l=="string"?this.state(l):this.sow(l)},sow:function(l){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!l)for(var c=0;c0;h--){var u=Math.floor(this.frac()*(h+1)),f=l[u];l[u]=l[h],l[h]=f}return l}});n.exports=d},63448:n=>{var a=function(s,o,d,l){return d===void 0&&(d=0),o===0?s:(s-=d,s=o*Math.ceil(s/o),l?(d+s)/o:d+s)};n.exports=a},56583:n=>{var a=function(s,o,d,l){return d===void 0&&(d=0),o===0?s:(s-=d,s=o*Math.floor(s/o),l?(d+s)/o:d+s)};n.exports=a},77720:n=>{var a=function(s,o,d,l){return d===void 0&&(d=0),o===0?s:(s-=d,s=o*Math.round(s/o),l?(d+s)/o:d+s)};n.exports=a},73697:(n,a,s)=>{n.exports={Ceil:s(63448),Floor:s(56583),To:s(77720)}},85454:(n,a,s)=>{s(63595);var o=s(8054),d=s(79291),l={Actions:s(61061),Animations:s(60421),BlendModes:s(10312),Cache:s(83388),Cameras:s(26638),Core:s(42857),Class:s(83419),Create:s(15822),Curves:s(25410),Data:s(44965),Display:s(27460),DOM:s(84902),Events:s(93055),FX:s(66064),Game:s(50127),GameObjects:s(77856),Geom:s(55738),Input:s(14350),Loader:s(57777),Math:s(75508),Physics:s(44563),Plugins:s(18922),Renderer:s(36909),Scale:s(93364),ScaleModes:s(29795),Scene:s(97482),Scenes:s(62194),Structs:s(41392),Textures:s(27458),Tilemaps:s(62501),Time:s(90291),Tweens:s(43066),Utils:s(91799)};l.Sound=s(23717),l=d(!1,l,o),n.exports=l,s.g.Phaser=l},71289:(n,a,s)=>{var o=s(83419),d=s(92209),l=s(88571),c=new o({Extends:l,Mixins:[d.Acceleration,d.Angular,d.Bounce,d.Collision,d.Debug,d.Drag,d.Enable,d.Friction,d.Gravity,d.Immovable,d.Mass,d.Pushable,d.Size,d.Velocity],initialize:function(u,f,p,m,g){l.call(this,u,f,p,m,g),this.body=null}});n.exports=c},86689:(n,a,s)=>{var o=s(83419),d=s(39506),l=s(20339),c=s(89774),h=s(66022),u=s(95540),f=s(46975),p=s(72441),m=s(47956),g=s(37277),v=s(44594),y=s(26099),x=s(82248),b=new o({initialize:function(C){this.scene=C,this.systems=C.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,C.sys.events.once(v.BOOT,this.boot,this),C.sys.events.on(v.START,this.start,this)},boot:function(){this.world=new x(this.scene,this.config),this.add=new h(this.world),this.systems.events.once(v.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new x(this.scene,this.config),this.add=new h(this.world));var _=this.systems.events;u(this.config,"customUpdate",!1)||_.on(v.UPDATE,this.world.update,this.world),_.on(v.POST_UPDATE,this.world.postUpdate,this.world),_.once(v.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(v.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(v.UPDATE,this.world.update,this.world)},getConfig:function(){var _=this.systems.game.config.physics,C=this.systems.settings.physics,w=f(u(C,"arcade",{}),u(_,"arcade",{}));return w},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(_,C,w,T,S){return w===void 0&&(w=null),T===void 0&&(T=null),S===void 0&&(S=w),this.world.collideObjects(_,C,w,T,S,!0)},collide:function(_,C,w,T,S){return w===void 0&&(w=null),T===void 0&&(T=null),S===void 0&&(S=w),this.world.collideObjects(_,C,w,T,S,!1)},collideTiles:function(_,C,w,T,S){return this.world.collideTiles(_,C,w,T,S)},overlapTiles:function(_,C,w,T,S){return this.world.overlapTiles(_,C,w,T,S)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(_,C,w,T,S,E){T===void 0&&(T=60);var D=Math.atan2(w-_.y,C-_.x);return _.body.acceleration.setToPolar(D,T),S!==void 0&&E!==void 0&&_.body.maxVelocity.set(S,E),D},accelerateToObject:function(_,C,w,T,S){return this.accelerateTo(_,C.x,C.y,w,T,S)},closest:function(_,C){C||(C=this.world.bodies.entries);for(var w=Number.MAX_VALUE,T=null,S=_.x,E=_.y,D=C.length,A=0;Aw&&(T=M,w=L)}}return T},moveTo:function(_,C,w,T,S){T===void 0&&(T=60),S===void 0&&(S=0);var E=Math.atan2(w-_.y,C-_.x);return S>0&&(T=l(_.x,_.y,C,w)/(S/1e3)),_.body.velocity.setToPolar(E,T),E},moveToObject:function(_,C,w,T){return this.moveTo(_,C.x,C.y,w,T)},velocityFromAngle:function(_,C,w){return C===void 0&&(C=60),w===void 0&&(w=new y),w.setToPolar(d(_),C)},velocityFromRotation:function(_,C,w){return C===void 0&&(C=60),w===void 0&&(w=new y),w.setToPolar(_,C)},overlapRect:function(_,C,w,T,S,E){return m(this.world,_,C,w,T,S,E)},overlapCirc:function(_,C,w,T,S){return p(this.world,_,C,w,T,S)},shutdown:function(){if(this.world){var _=this.systems.events;_.off(v.UPDATE,this.world.update,this.world),_.off(v.POST_UPDATE,this.world.postUpdate,this.world),_.off(v.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(v.START,this.start,this),this.scene=null,this.systems=null}});g.register("ArcadePhysics",b,"arcadePhysics"),n.exports=b},13759:(n,a,s)=>{var o=s(83419),d=s(92209),l=s(68287),c=new o({Extends:l,Mixins:[d.Acceleration,d.Angular,d.Bounce,d.Collision,d.Debug,d.Drag,d.Enable,d.Friction,d.Gravity,d.Immovable,d.Mass,d.Pushable,d.Size,d.Velocity],initialize:function(u,f,p,m,g){l.call(this,u,f,p,m,g),this.body=null}});n.exports=c},37742:(n,a,s)=>{var o=s(83419),d=s(78389),l=s(37747),c=s(63012),h=s(43396),u=s(87841),f=s(37303),p=s(95829),m=s(26099),g=new o({Mixins:[d],initialize:function(y,x){var b=64,_=64,C={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},w=x!==void 0;w&&x.displayWidth&&(b=x.displayWidth,_=x.displayHeight),w||(x=C),this.world=y,this.gameObject=w?x:void 0,this.isBody=!0,this.transform={x:x.x,y:x.y,rotation:x.angle,scaleX:x.scaleX,scaleY:x.scaleY,displayOriginX:x.displayOriginX,displayOriginY:x.displayOriginY},this.debugShowBody=y.defaults.debugShowBody,this.debugShowVelocity=y.defaults.debugShowVelocity,this.debugBodyColor=y.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new m,this.position=new m(x.x-x.scaleX*x.displayOriginX,x.y-x.scaleY*x.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=x.angle,this.preRotation=x.angle,this.width=b,this.height=_,this.sourceWidth=b,this.sourceHeight=_,x.frame&&(this.sourceWidth=x.frame.realWidth,this.sourceHeight=x.frame.realHeight),this.halfWidth=Math.abs(b/2),this.halfHeight=Math.abs(_/2),this.center=new m(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new m,this.newVelocity=new m,this.deltaMax=new m,this.acceleration=new m,this.allowDrag=!0,this.drag=new m,this.allowGravity=!0,this.gravity=new m,this.bounce=new m,this.worldBounce=null,this.customBoundsRectangle=y.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new m(1e4,1e4),this.maxSpeed=-1,this.friction=new m(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=l.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new m(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=p(!1),this.touching=p(!0),this.wasTouching=p(!0),this.blocked=p(!0),this.syncBounds=!1,this.physicsType=l.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=x.scaleX,this._sy=x.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new u,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var v=this.gameObject,y=this.transform;if(v.parentContainer){var x=v.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);y.x=x.tx,y.y=x.ty,y.rotation=h(x.rotation),y.scaleX=x.scaleX,y.scaleY=x.scaleY,y.displayOriginX=v.displayOriginX,y.displayOriginY=v.displayOriginY}else y.x=v.x,y.y=v.y,y.rotation=v.angle,y.scaleX=v.scaleX,y.scaleY=v.scaleY,y.displayOriginX=v.displayOriginX,y.displayOriginY=v.displayOriginY;var b=!1;if(this.syncBounds){var _=v.getBounds(this._bounds);this.width=_.width,this.height=_.height,b=!0}else{var C=Math.abs(y.scaleX),w=Math.abs(y.scaleY);(this._sx!==C||this._sy!==w)&&(this.width=this.sourceWidth*C,this.height=this.sourceHeight*w,this._sx=C,this._sy=w,b=!0)}b&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var v=this.transform;this.position.x=v.x+v.scaleX*(this.offset.x-v.displayOriginX),this.position.y=v.y+v.scaleY*(this.offset.y-v.displayOriginY),this.updateCenter()},resetFlags:function(v){v===void 0&&(v=!1);var y=this.wasTouching,x=this.touching,b=this.blocked;v?p(!0,y):(y.none=x.none,y.up=x.up,y.down=x.down,y.left=x.left,y.right=x.right),p(!0,x),p(!0,b),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(v,y){if(v&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var x=this.position;this.prev.x=x.x,this.prev.y=x.y,this.prevFrame.x=x.x,this.prevFrame.y=x.y}v&&this.update(y)},update:function(v){var y=this.prev,x=this.position,b=this.velocity;if(y.set(x.x,x.y),!this.moves){this._dx=x.x-y.x,this._dy=x.y-y.y;return}if(this.directControl){var _=this.autoFrame;b.set((x.x-_.x)/v,(x.y-_.y)/v),this.world.updateMotion(this,v),this._dx=x.x-_.x,this._dy=x.y-_.y}else this.world.updateMotion(this,v),this.newVelocity.set(b.x*v,b.y*v),x.add(this.newVelocity),this._dx=x.x-y.x,this._dy=x.y-y.y;var C=b.x,w=b.y;if(this.updateCenter(),this.angle=Math.atan2(w,C),this.speed=Math.sqrt(C*C+w*w),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var T=this.blocked;this.world.emit(c.WORLD_BOUNDS,this,T.up,T.down,T.left,T.right)}},postUpdate:function(){var v=this.position,y=v.x-this.prevFrame.x,x=v.y-this.prevFrame.y,b=this.gameObject;if(this.moves){var _=this.deltaMax.x,C=this.deltaMax.y;_!==0&&y!==0&&(y<0&&y<-_?y=-_:y>0&&y>_&&(y=_)),C!==0&&x!==0&&(x<0&&x<-C?x=-C:x>0&&x>C&&(x=C)),b&&(b.x+=y,b.y+=x)}y<0?this.facing=l.FACING_LEFT:y>0&&(this.facing=l.FACING_RIGHT),x<0?this.facing=l.FACING_UP:x>0&&(this.facing=l.FACING_DOWN),this.allowRotation&&b&&(b.angle+=this.deltaZ()),this._tx=y,this._ty=x,this.autoFrame.set(v.x,v.y)},setBoundsRectangle:function(v){return this.customBoundsRectangle=v||this.world.bounds,this},checkWorldBounds:function(){var v=this.position,y=this.velocity,x=this.blocked,b=this.customBoundsRectangle,_=this.world.checkCollision,C=this.worldBounce?-this.worldBounce.x:-this.bounce.x,w=this.worldBounce?-this.worldBounce.y:-this.bounce.y,T=!1;return v.xb.right&&_.right&&(v.x=b.right-this.width,y.x*=C,x.right=!0,T=!0),v.yb.bottom&&_.down&&(v.y=b.bottom-this.height,y.y*=w,x.down=!0,T=!0),T&&(this.blocked.none=!1,this.updateCenter()),T},setOffset:function(v,y){return y===void 0&&(y=v),this.offset.set(v,y),this},setGameObject:function(v,y){return y===void 0&&(y=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=v,v.body&&(v.body=this),this.setSize(),this.world.add(this),this.enable=y,this},setSize:function(v,y,x){x===void 0&&(x=!0);var b=this.gameObject;if(b&&(!v&&b.frame&&(v=b.frame.realWidth),!y&&b.frame&&(y=b.frame.realHeight)),this.sourceWidth=v,this.sourceHeight=y,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),x&&b&&b.getCenter){var _=(b.width-v)/2,C=(b.height-y)/2;this.offset.set(_,C)}return this.isCircle=!1,this.radius=0,this},setCircle:function(v,y,x){return y===void 0&&(y=this.offset.x),x===void 0&&(x=this.offset.y),v>0?(this.isCircle=!0,this.radius=v,this.sourceWidth=v*2,this.sourceHeight=v*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(y,x),this.updateCenter()):this.isCircle=!1,this},reset:function(v,y){this.stop();var x=this.gameObject;x&&(x.setPosition(v,y),this.rotation=x.angle,this.preRotation=x.angle);var b=this.position;x&&x.getTopLeft?x.getTopLeft(b):b.set(v,y),this.prev.copy(b),this.prevFrame.copy(b),this.autoFrame.copy(b),x&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(v){return v.x=this.x,v.y=this.y,v.right=this.right,v.bottom=this.bottom,v},hitTest:function(v,y){if(!this.isCircle)return f(this,v,y);if(this.radius>0&&v>=this.left&&v<=this.right&&y>=this.top&&y<=this.bottom){var x=(this.center.x-v)*(this.center.x-v),b=(this.center.y-y)*(this.center.y-y);return x+b<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(v){var y=this.position,x=y.x+this.halfWidth,b=y.y+this.halfHeight;this.debugShowBody&&(v.lineStyle(v.defaultStrokeWidth,this.debugBodyColor),this.isCircle?v.strokeCircle(x,b,this.width/2):(this.checkCollision.up&&v.lineBetween(y.x,y.y,y.x+this.width,y.y),this.checkCollision.right&&v.lineBetween(y.x+this.width,y.y,y.x+this.width,y.y+this.height),this.checkCollision.down&&v.lineBetween(y.x,y.y+this.height,y.x+this.width,y.y+this.height),this.checkCollision.left&&v.lineBetween(y.x,y.y,y.x,y.y+this.height))),this.debugShowVelocity&&(v.lineStyle(v.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),v.lineBetween(x,b,x+this.velocity.x/2,b+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(v){return v===void 0&&(v=!0),this.directControl=v,this},setCollideWorldBounds:function(v,y,x,b){v===void 0&&(v=!0),this.collideWorldBounds=v;var _=y!==void 0,C=x!==void 0;return(_||C)&&(this.worldBounce||(this.worldBounce=new m),_&&(this.worldBounce.x=y),C&&(this.worldBounce.y=x)),b!==void 0&&(this.onWorldBounds=b),this},setVelocity:function(v,y){return this.velocity.set(v,y),v=this.velocity.x,y=this.velocity.y,this.speed=Math.sqrt(v*v+y*y),this},setVelocityX:function(v){return this.setVelocity(v,this.velocity.y)},setVelocityY:function(v){return this.setVelocity(this.velocity.x,v)},setMaxVelocity:function(v,y){return this.maxVelocity.set(v,y),this},setMaxVelocityX:function(v){return this.maxVelocity.x=v,this},setMaxVelocityY:function(v){return this.maxVelocity.y=v,this},setMaxSpeed:function(v){return this.maxSpeed=v,this},setSlideFactor:function(v,y){return this.slideFactor.set(v,y),this},setBounce:function(v,y){return this.bounce.set(v,y),this},setBounceX:function(v){return this.bounce.x=v,this},setBounceY:function(v){return this.bounce.y=v,this},setAcceleration:function(v,y){return this.acceleration.set(v,y),this},setAccelerationX:function(v){return this.acceleration.x=v,this},setAccelerationY:function(v){return this.acceleration.y=v,this},setAllowDrag:function(v){return v===void 0&&(v=!0),this.allowDrag=v,this},setAllowGravity:function(v){return v===void 0&&(v=!0),this.allowGravity=v,this},setAllowRotation:function(v){return v===void 0&&(v=!0),this.allowRotation=v,this},setDrag:function(v,y){return this.drag.set(v,y),this},setDamping:function(v){return this.useDamping=v,this},setDragX:function(v){return this.drag.x=v,this},setDragY:function(v){return this.drag.y=v,this},setGravity:function(v,y){return this.gravity.set(v,y),this},setGravityX:function(v){return this.gravity.x=v,this},setGravityY:function(v){return this.gravity.y=v,this},setFriction:function(v,y){return this.friction.set(v,y),this},setFrictionX:function(v){return this.friction.x=v,this},setFrictionY:function(v){return this.friction.y=v,this},setAngularVelocity:function(v){return this.angularVelocity=v,this},setAngularAcceleration:function(v){return this.angularAcceleration=v,this},setAngularDrag:function(v){return this.angularDrag=v,this},setMass:function(v){return this.mass=v,this},setImmovable:function(v){return v===void 0&&(v=!0),this.immovable=v,this},setEnable:function(v){return v===void 0&&(v=!0),this.enable=v,this},processX:function(v,y,x,b){this.x+=v,this.updateCenter(),y!==null&&(this.velocity.x=y*this.slideFactor.x);var _=this.blocked;x&&(_.left=!0,_.none=!1),b&&(_.right=!0,_.none=!1)},processY:function(v,y,x,b){this.y+=v,this.updateCenter(),y!==null&&(this.velocity.y=y*this.slideFactor.y);var _=this.blocked;x&&(_.up=!0,_.none=!1),b&&(_.down=!0,_.none=!1)},x:{get:function(){return this.position.x},set:function(v){this.position.x=v}},y:{get:function(){return this.position.y},set:function(v){this.position.y=v}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});n.exports=g},79342:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h,u,f,p,m,g){this.world=c,this.name="",this.active=!0,this.overlapOnly=h,this.object1=u,this.object2=f,this.collideCallback=p,this.processCallback=m,this.callbackContext=g},setName:function(l){return this.name=l,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});n.exports=d},66022:(n,a,s)=>{var o=s(71289),d=s(13759),l=s(37742),c=s(83419),h=s(37747),u=s(60758),f=s(72624),p=s(71464),m=new c({initialize:function(v){this.world=v,this.scene=v.scene,this.sys=v.scene.sys},collider:function(g,v,y,x,b){return this.world.addCollider(g,v,y,x,b)},overlap:function(g,v,y,x,b){return this.world.addOverlap(g,v,y,x,b)},existing:function(g,v){var y=v?h.STATIC_BODY:h.DYNAMIC_BODY;return this.world.enableBody(g,y),g},staticImage:function(g,v,y,x){var b=new o(this.scene,g,v,y,x);return this.sys.displayList.add(b),this.world.enableBody(b,h.STATIC_BODY),b},image:function(g,v,y,x){var b=new o(this.scene,g,v,y,x);return this.sys.displayList.add(b),this.world.enableBody(b,h.DYNAMIC_BODY),b},staticSprite:function(g,v,y,x){var b=new d(this.scene,g,v,y,x);return this.sys.displayList.add(b),this.sys.updateList.add(b),this.world.enableBody(b,h.STATIC_BODY),b},sprite:function(g,v,y,x){var b=new d(this.scene,g,v,y,x);return this.sys.displayList.add(b),this.sys.updateList.add(b),this.world.enableBody(b,h.DYNAMIC_BODY),b},staticGroup:function(g,v){return this.sys.updateList.add(new p(this.world,this.world.scene,g,v))},group:function(g,v){return this.sys.updateList.add(new u(this.world,this.world.scene,g,v))},body:function(g,v,y,x){var b=new l(this.world);return b.position.set(g,v),y&&x&&b.setSize(y,x),this.world.add(b,h.DYNAMIC_BODY),b},staticBody:function(g,v,y,x){var b=new f(this.world);return b.position.set(g,v),y&&x&&b.setSize(y,x),this.world.add(b,h.STATIC_BODY),b},destroy:function(){this.world=null,this.scene=null,this.sys=null}});n.exports=m},79599:n=>{var a=function(s){var o=0;if(!Array.isArray(s))o=s;else for(var d=0;d{var o=s(37747),d=function(l,c,h,u){var f=0,p=l.deltaAbsX()+c.deltaAbsX()+u;return l._dx===0&&c._dx===0?(l.embedded=!0,c.embedded=!0):l._dx>c._dx?(f=l.right-c.x,f>p&&!h||l.checkCollision.right===!1||c.checkCollision.left===!1?f=0:(l.touching.none=!1,l.touching.right=!0,c.touching.none=!1,c.touching.left=!0,c.physicsType===o.STATIC_BODY&&!h&&(l.blocked.none=!1,l.blocked.right=!0),l.physicsType===o.STATIC_BODY&&!h&&(c.blocked.none=!1,c.blocked.left=!0))):l._dxp&&!h||l.checkCollision.left===!1||c.checkCollision.right===!1?f=0:(l.touching.none=!1,l.touching.left=!0,c.touching.none=!1,c.touching.right=!0,c.physicsType===o.STATIC_BODY&&!h&&(l.blocked.none=!1,l.blocked.left=!0),l.physicsType===o.STATIC_BODY&&!h&&(c.blocked.none=!1,c.blocked.right=!0))),l.overlapX=f,c.overlapX=f,f};n.exports=d},45170:(n,a,s)=>{var o=s(37747),d=function(l,c,h,u){var f=0,p=l.deltaAbsY()+c.deltaAbsY()+u;return l._dy===0&&c._dy===0?(l.embedded=!0,c.embedded=!0):l._dy>c._dy?(f=l.bottom-c.y,f>p&&!h||l.checkCollision.down===!1||c.checkCollision.up===!1?f=0:(l.touching.none=!1,l.touching.down=!0,c.touching.none=!1,c.touching.up=!0,c.physicsType===o.STATIC_BODY&&!h&&(l.blocked.none=!1,l.blocked.down=!0),l.physicsType===o.STATIC_BODY&&!h&&(c.blocked.none=!1,c.blocked.up=!0))):l._dyp&&!h||l.checkCollision.up===!1||c.checkCollision.down===!1?f=0:(l.touching.none=!1,l.touching.up=!0,c.touching.none=!1,c.touching.down=!0,c.physicsType===o.STATIC_BODY&&!h&&(l.blocked.none=!1,l.blocked.up=!0),l.physicsType===o.STATIC_BODY&&!h&&(c.blocked.none=!1,c.blocked.down=!0))),l.overlapY=f,c.overlapY=f,f};n.exports=d},60758:(n,a,s)=>{var o=s(13759),d=s(83419),l=s(78389),c=s(37747),h=s(95540),u=s(26479),f=s(41212),p=new d({Extends:u,Mixins:[l],initialize:function(g,v,y,x){if(!y&&!x)x={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(f(y))x=y,y=null,x.internalCreateCallback=this.createCallbackHandler,x.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(y)&&f(y[0])){var b=this;y.forEach(function(_){_.internalCreateCallback=b.createCallbackHandler,_.internalRemoveCallback=b.removeCallbackHandler,_.classType=h(_,"classType",o)}),x=null}else x={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=g,x&&(x.classType=h(x,"classType",o)),this.physicsType=c.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:h(x,"collideWorldBounds",!1),setBoundsRectangle:h(x,"customBoundsRectangle",null),setAccelerationX:h(x,"accelerationX",0),setAccelerationY:h(x,"accelerationY",0),setAllowDrag:h(x,"allowDrag",!0),setAllowGravity:h(x,"allowGravity",!0),setAllowRotation:h(x,"allowRotation",!0),setDamping:h(x,"useDamping",!1),setBounceX:h(x,"bounceX",0),setBounceY:h(x,"bounceY",0),setDragX:h(x,"dragX",0),setDragY:h(x,"dragY",0),setEnable:h(x,"enable",!0),setGravityX:h(x,"gravityX",0),setGravityY:h(x,"gravityY",0),setFrictionX:h(x,"frictionX",0),setFrictionY:h(x,"frictionY",0),setMaxSpeed:h(x,"maxSpeed",-1),setMaxVelocityX:h(x,"maxVelocityX",1e4),setMaxVelocityY:h(x,"maxVelocityY",1e4),setVelocityX:h(x,"velocityX",0),setVelocityY:h(x,"velocityY",0),setAngularVelocity:h(x,"angularVelocity",0),setAngularAcceleration:h(x,"angularAcceleration",0),setAngularDrag:h(x,"angularDrag",0),setMass:h(x,"mass",1),setImmovable:h(x,"immovable",!1)},u.call(this,v,y,x),this.type="PhysicsGroup"},createCallbackHandler:function(m){m.body||this.world.enableBody(m,c.DYNAMIC_BODY);var g=m.body;for(var v in this.defaults)g[v](this.defaults[v])},removeCallbackHandler:function(m){m.body&&this.world.disableBody(m)},setVelocity:function(m,g,v){v===void 0&&(v=0);for(var y=this.getChildren(),x=0;x{var a,s,o,d,l,c,h,u,f,p,m,g,v,y,x,b,_,C=function(A,M,R){a=A,s=M;var L=a.velocity.x,I=s.velocity.x;return o=a.pushable,f=a._dx<0,p=a._dx>0,m=a._dx===0,x=Math.abs(a.right-s.x)<=Math.abs(s.right-a.x),h=I-L*a.bounce.x,d=s.pushable,g=s._dx<0,v=s._dx>0,y=s._dx===0,b=!x,u=L-I*s.bounce.x,_=Math.abs(R),w()},w=function(){return p&&x&&s.blocked.right?(a.processX(-_,h,!1,!0),1):f&&b&&s.blocked.left?(a.processX(_,h,!0),1):v&&b&&a.blocked.right?(s.processX(-_,u,!1,!0),2):g&&x&&a.blocked.left?(s.processX(_,u,!0),2):0},T=function(){var A=a.velocity.x,M=s.velocity.x,R=Math.sqrt(M*M*s.mass/a.mass)*(M>0?1:-1),L=Math.sqrt(A*A*a.mass/s.mass)*(A>0?1:-1),I=(R+L)*.5;return R-=I,L-=I,l=I+R*a.bounce.x,c=I+L*s.bounce.x,f&&b?S(0):g&&x?S(1):p&&x?S(2):v&&b?S(3):!1},S=function(A){if(o&&d)_*=.5,A===0||A===3?(a.processX(_,l),s.processX(-_,c)):(a.processX(-_,l),s.processX(_,c));else if(o&&!d)A===0||A===3?a.processX(_,h,!0):a.processX(-_,h,!1,!0);else if(!o&&d)A===0||A===3?s.processX(-_,u,!1,!0):s.processX(_,u,!0);else{var M=_*.5;A===0?y?(a.processX(_,0,!0),s.processX(0,null,!1,!0)):v?(a.processX(M,0,!0),s.processX(-M,0,!1,!0)):(a.processX(M,s.velocity.x,!0),s.processX(-M,null,!1,!0)):A===1?m?(a.processX(0,null,!1,!0),s.processX(_,0,!0)):p?(a.processX(-M,0,!1,!0),s.processX(M,0,!0)):(a.processX(-M,null,!1,!0),s.processX(M,a.velocity.x,!0)):A===2?y?(a.processX(-_,0,!1,!0),s.processX(0,null,!0)):g?(a.processX(-M,0,!1,!0),s.processX(M,0,!0)):(a.processX(-M,s.velocity.x,!1,!0),s.processX(M,null,!0)):A===3&&(m?(a.processX(0,null,!0),s.processX(-_,0,!1,!0)):f?(a.processX(M,0,!0),s.processX(-M,0,!1,!0)):(a.processX(M,s.velocity.y,!0),s.processX(-M,null,!1,!0)))}return!0},E=function(A){if(A===1?s.velocity.x=0:x?s.processX(_,u,!0):s.processX(-_,u,!1,!0),a.moves){var M=a.directControl?a.y-a.autoFrame.y:a.y-a.prev.y;s.y+=M*a.friction.y,s._dy=s.y-s.prev.y}},D=function(A){if(A===2?a.velocity.x=0:b?a.processX(_,h,!0):a.processX(-_,h,!1,!0),s.moves){var M=s.directControl?s.y-s.autoFrame.y:s.y-s.prev.y;a.y+=M*s.friction.y,a._dy=a.y-a.prev.y}};n.exports={BlockCheck:w,Check:T,Set:C,Run:S,RunImmovableBody1:E,RunImmovableBody2:D}},47962:n=>{var a,s,o,d,l,c,h,u,f,p,m,g,v,y,x,b,_,C=function(A,M,R){a=A,s=M;var L=a.velocity.y,I=s.velocity.y;return o=a.pushable,f=a._dy<0,p=a._dy>0,m=a._dy===0,x=Math.abs(a.bottom-s.y)<=Math.abs(s.bottom-a.y),h=I-L*a.bounce.y,d=s.pushable,g=s._dy<0,v=s._dy>0,y=s._dy===0,b=!x,u=L-I*s.bounce.y,_=Math.abs(R),w()},w=function(){return p&&x&&s.blocked.down?(a.processY(-_,h,!1,!0),1):f&&b&&s.blocked.up?(a.processY(_,h,!0),1):v&&b&&a.blocked.down?(s.processY(-_,u,!1,!0),2):g&&x&&a.blocked.up?(s.processY(_,u,!0),2):0},T=function(){var A=a.velocity.y,M=s.velocity.y,R=Math.sqrt(M*M*s.mass/a.mass)*(M>0?1:-1),L=Math.sqrt(A*A*a.mass/s.mass)*(A>0?1:-1),I=(R+L)*.5;return R-=I,L-=I,l=I+R*a.bounce.y,c=I+L*s.bounce.y,f&&b?S(0):g&&x?S(1):p&&x?S(2):v&&b?S(3):!1},S=function(A){if(o&&d)_*=.5,A===0||A===3?(a.processY(_,l),s.processY(-_,c)):(a.processY(-_,l),s.processY(_,c));else if(o&&!d)A===0||A===3?a.processY(_,h,!0):a.processY(-_,h,!1,!0);else if(!o&&d)A===0||A===3?s.processY(-_,u,!1,!0):s.processY(_,u,!0);else{var M=_*.5;A===0?y?(a.processY(_,0,!0),s.processY(0,null,!1,!0)):v?(a.processY(M,0,!0),s.processY(-M,0,!1,!0)):(a.processY(M,s.velocity.y,!0),s.processY(-M,null,!1,!0)):A===1?m?(a.processY(0,null,!1,!0),s.processY(_,0,!0)):p?(a.processY(-M,0,!1,!0),s.processY(M,0,!0)):(a.processY(-M,null,!1,!0),s.processY(M,a.velocity.y,!0)):A===2?y?(a.processY(-_,0,!1,!0),s.processY(0,null,!0)):g?(a.processY(-M,0,!1,!0),s.processY(M,0,!0)):(a.processY(-M,s.velocity.y,!1,!0),s.processY(M,null,!0)):A===3&&(m?(a.processY(0,null,!0),s.processY(-_,0,!1,!0)):f?(a.processY(M,0,!0),s.processY(-M,0,!1,!0)):(a.processY(M,s.velocity.y,!0),s.processY(-M,null,!1,!0)))}return!0},E=function(A){if(A===1?s.velocity.y=0:x?s.processY(_,u,!0):s.processY(-_,u,!1,!0),a.moves){var M=a.directControl?a.x-a.autoFrame.x:a.x-a.prev.x;s.x+=M*a.friction.x,s._dx=s.x-s.prev.x}},D=function(A){if(A===2?a.velocity.y=0:b?a.processY(_,h,!0):a.processY(-_,h,!1,!0),s.moves){var M=s.directControl?s.x-s.autoFrame.x:s.x-s.prev.x;a.x+=M*s.friction.x,a._dx=a.x-a.prev.x}};n.exports={BlockCheck:w,Check:T,Set:C,Run:S,RunImmovableBody1:E,RunImmovableBody2:D}},14087:(n,a,s)=>{var o=s(64897),d=s(3017),l=function(c,h,u,f,p){p===void 0&&(p=o(c,h,u,f));var m=c.immovable,g=h.immovable;if(u||p===0||m&&g||c.customSeparateX||h.customSeparateX)return p!==0||c.embedded&&h.embedded;var v=d.Set(c,h,p);return!m&&!g?v>0?!0:d.Check():(m?d.RunImmovableBody1(v):g&&d.RunImmovableBody2(v),!0)};n.exports=l},89936:(n,a,s)=>{var o=s(45170),d=s(47962),l=function(c,h,u,f,p){p===void 0&&(p=o(c,h,u,f));var m=c.immovable,g=h.immovable;if(u||p===0||m&&g||c.customSeparateY||h.customSeparateY)return p!==0||c.embedded&&h.embedded;var v=d.Set(c,h,p);return!m&&!g?v>0?!0:d.Check():(m?d.RunImmovableBody1(v):g&&d.RunImmovableBody2(v),!0)};n.exports=l},95829:n=>{var a=function(s,o){return o===void 0&&(o={}),o.none=s,o.up=!1,o.down=!1,o.left=!1,o.right=!1,s||(o.up=!0,o.down=!0,o.left=!0,o.right=!0),o};n.exports=a},72624:(n,a,s)=>{var o=s(87902),d=s(83419),l=s(78389),c=s(37747),h=s(37303),u=s(95829),f=s(26099),p=new d({Mixins:[l],initialize:function(g,v){var y=64,x=64,b={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},_=v!==void 0;_&&v.displayWidth&&(y=v.displayWidth,x=v.displayHeight),_||(v=b),this.world=g,this.gameObject=_?v:void 0,this.isBody=!0,this.debugShowBody=g.defaults.debugShowStaticBody,this.debugBodyColor=g.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new f,this.position=new f(v.x-y*v.originX,v.y-x*v.originY),this.width=y,this.height=x,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new f(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=f.ZERO,this.allowGravity=!1,this.gravity=f.ZERO,this.bounce=f.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=u(!1),this.touching=u(!0),this.wasTouching=u(!0),this.blocked=u(!0),this.physicsType=c.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(m,g){return m&&m!==this.gameObject&&(this.gameObject.body=null,m.body=this,this.gameObject=m),g&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var m=this.gameObject;return m.getTopLeft(this.position),this.width=m.displayWidth,this.height=m.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(m,g){return g===void 0&&(g=m),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(m,g),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(m,g,v){v===void 0&&(v=!0);var y=this.gameObject;if(y&&y.frame&&(m||(m=y.frame.realWidth),g||(g=y.frame.realHeight)),this.world.staticTree.remove(this),this.width=m,this.height=g,this.halfWidth=Math.floor(m/2),this.halfHeight=Math.floor(g/2),v&&y&&y.getCenter){var x=y.displayWidth/2,b=y.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(x-this.halfWidth,b-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(m,g,v){return g===void 0&&(g=this.offset.x),v===void 0&&(v=this.offset.y),m>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=m,this.width=m*2,this.height=m*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(g,v),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(m,g){var v=this.gameObject;m===void 0&&(m=v.x),g===void 0&&(g=v.y),this.world.staticTree.remove(this),v.setPosition(m,g),v.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(m){return m.x=this.x,m.y=this.y,m.right=this.right,m.bottom=this.bottom,m},hitTest:function(m,g){return this.isCircle?o(this,m,g):h(this,m,g)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(m){var g=this.position,v=g.x+this.halfWidth,y=g.y+this.halfHeight;this.debugShowBody&&(m.lineStyle(m.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?m.strokeCircle(v,y,this.width/2):m.strokeRect(g.x,g.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(m){return m<=0&&(m=.1),this.mass=m,this},x:{get:function(){return this.position.x},set:function(m){this.world.staticTree.remove(this),this.position.x=m,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(m){this.world.staticTree.remove(this),this.position.y=m,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});n.exports=p},71464:(n,a,s)=>{var o=s(13759),d=s(83419),l=s(78389),c=s(37747),h=s(95540),u=s(26479),f=s(41212),p=new d({Extends:u,Mixins:[l],initialize:function(g,v,y,x){!y&&!x?x={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:o}:f(y)?(x=y,y=null,x.internalCreateCallback=this.createCallbackHandler,x.internalRemoveCallback=this.removeCallbackHandler,x.createMultipleCallback=this.createMultipleCallbackHandler,x.classType=h(x,"classType",o)):Array.isArray(y)&&f(y[0])?(x=y,y=null,x.forEach(function(b){b.internalCreateCallback=this.createCallbackHandler,b.internalRemoveCallback=this.removeCallbackHandler,b.createMultipleCallback=this.createMultipleCallbackHandler,b.classType=h(b,"classType",o)})):x={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=g,this.physicsType=c.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,u.call(this,v,y,x),this.type="StaticPhysicsGroup"},createCallbackHandler:function(m){m.body||this.world.enableBody(m,c.STATIC_BODY)},removeCallbackHandler:function(m){m.body&&this.world.disableBody(m)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var m=this.children.entries,g=0;g{var o=s(55495),d=s(37742),l=s(45319),c=s(83419),h=s(79342),u=s(37747),f=s(20339),p=s(52816),m=s(50792),g=s(63012),v=s(43855),y=s(5470),x=s(94977),b=s(64897),_=s(45170),C=s(96523),w=s(35154),T=s(36383),S=s(25774),E=s(96602),D=s(87841),A=s(59542),M=s(40012),R=s(14087),L=s(89936),I=s(35072),O=s(72624),N=s(2483),H=s(61340),X=s(26099),V=s(15994),z=new c({Extends:m,initialize:function(k,G){m.call(this),this.scene=k,this.bodies=new I,this.staticBodies=new I,this.pendingDestroy=new I,this.colliders=new S,this.gravity=new X(w(G,"gravity.x",0),w(G,"gravity.y",0)),this.bounds=new D(w(G,"x",0),w(G,"y",0),w(G,"width",k.sys.scale.width),w(G,"height",k.sys.scale.height)),this.checkCollision={up:w(G,"checkCollision.up",!0),down:w(G,"checkCollision.down",!0),left:w(G,"checkCollision.left",!0),right:w(G,"checkCollision.right",!0)},this.fps=w(G,"fps",60),this.fixedStep=w(G,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=w(G,"timeScale",1),this.OVERLAP_BIAS=w(G,"overlapBias",4),this.TILE_BIAS=w(G,"tileBias",16),this.forceX=w(G,"forceX",!1),this.isPaused=w(G,"isPaused",!1),this._total=0,this.drawDebug=w(G,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:w(G,"debugShowBody",!0),debugShowStaticBody:w(G,"debugShowStaticBody",!0),debugShowVelocity:w(G,"debugShowVelocity",!0),bodyDebugColor:w(G,"debugBodyColor",16711935),staticBodyDebugColor:w(G,"debugStaticBodyColor",255),velocityDebugColor:w(G,"debugVelocityColor",65280)},this.maxEntries=w(G,"maxEntries",16),this.useTree=w(G,"useTree",!0),this.tree=new A(this.maxEntries),this.staticTree=new A(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new H,this._tempMatrix2=new H,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(F,k){k===void 0&&(k=u.DYNAMIC_BODY),Array.isArray(F)||(F=[F]);for(var G=0;G=J;for(this.fixedStep||(Z=k*.001,ie=!0,this._elapsed=0),G=0;G=J;)this._elapsed-=J,this.step(Z)}},step:function(F){var k,G,Z=this.bodies.entries,J=Z.length;for(k=0;k0){var re=this.tree,oe=this.staticTree;for(G=ie.entries,Z=G.length,F=0;F-1&&F.velocity.length()>_e&&(F.velocity.normalize().scale(_e),ve=_e),F.speed=ve},separate:function(F,k,G,Z,J){var W,q,ie=!1,re=!0;if(!F.enable||!k.enable||F.checkCollision.none||k.checkCollision.none||!this.intersects(F,k)||G&&G.call(Z,F.gameObject||F,k.gameObject||k)===!1)return ie;if(F.isCircle||k.isCircle){var oe=this.separateCircle(F,k,J);oe.result?(ie=!0,re=!1):(W=oe.x,q=oe.y,re=!0)}if(re){var ve=!1,_e=!1,ye=this.OVERLAP_BIAS;J?(ve=R(F,k,J,ye,W),_e=L(F,k,J,ye,q)):this.forceX||Math.abs(this.gravity.y+F.gravity.y)qe&&(_e=f(xe,st,qe,ke)-at):st>ot&&(xeqe&&(_e=f(xe,st,qe,ot)-at)),_e*=-1}else _e=F.halfWidth+k.halfWidth-p(W,q);F.overlapR=_e,k.overlapR=_e;var Nt=o(W,q),He=(_e+T.EPSILON)*Math.cos(Nt),Je=(_e+T.EPSILON)*Math.sin(Nt),Jt={overlap:_e,result:!1,x:He,y:Je};if(G&&(!ye||ye&&_e!==0))return Jt.result=!0,Jt;if(!ye&&_e===0||ie&&re||F.customSeparateX||k.customSeparateX)return Jt.x=void 0,Jt.y=void 0,Jt;var Et=!F.pushable&&!k.pushable;if(ye){var Bt=W.x-q.x,Zi=W.y-q.y,Si=Math.sqrt(Math.pow(Bt,2)+Math.pow(Zi,2)),ji=(q.x-W.x)/Si||0,jt=(q.y-W.y)/Si||0,Ei=2*(oe.x*ji+oe.y*jt-ve.x*ji-ve.y*jt)/(F.mass+k.mass);(ie||re||!F.pushable||!k.pushable)&&(Ei*=2),!ie&&F.pushable&&(oe.x=oe.x-Ei/F.mass*ji,oe.y=oe.y-Ei/F.mass*jt,oe.multiply(F.bounce)),!re&&k.pushable&&(ve.x=ve.x+Ei/k.mass*ji,ve.y=ve.y+Ei/k.mass*jt,ve.multiply(k.bounce)),!ie&&!re&&(He*=.5,Je*=.5),!ie||F.pushable||Et?(F.x-=He,F.y-=Je,F.updateCenter()):(!re||k.pushable||Et)&&(k.x+=He,k.y+=Je,k.updateCenter()),Jt.result=!0}else!ie||F.pushable||Et?(F.x-=He,F.y-=Je,F.updateCenter()):(!re||k.pushable||Et)&&(k.x+=He,k.y+=Je,k.updateCenter()),Jt.x=void 0,Jt.y=void 0;return Jt},intersects:function(F,k){return F===k?!1:!F.isCircle&&!k.isCircle?!(F.right<=k.left||F.bottom<=k.top||F.left>=k.right||F.top>=k.bottom):F.isCircle?k.isCircle?p(F.center,k.center)<=F.halfWidth+k.halfWidth:this.circleBodyIntersects(F,k):this.circleBodyIntersects(k,F)},circleBodyIntersects:function(F,k){var G=l(F.center.x,k.left,k.right),Z=l(F.center.y,k.top,k.bottom),J=(F.center.x-G)*(F.center.x-G),W=(F.center.y-Z)*(F.center.y-Z);return J+W<=F.halfWidth*F.halfWidth},overlap:function(F,k,G,Z,J){return G===void 0&&(G=null),Z===void 0&&(Z=null),J===void 0&&(J=G),this.collideObjects(F,k,G,Z,J,!0)},collide:function(F,k,G,Z,J){return G===void 0&&(G=null),Z===void 0&&(Z=null),J===void 0&&(J=G),this.collideObjects(F,k,G,Z,J,!1)},collideObjects:function(F,k,G,Z,J,W){var q,ie;F.isParent&&(F.physicsType===void 0||k===void 0||F===k)&&(F=F.children.entries),k&&k.isParent&&k.physicsType===void 0&&(k=k.children.entries);var re=Array.isArray(F),oe=Array.isArray(k);if(this._total=0,!re&&!oe)this.collideHandler(F,k,G,Z,J,W);else if(!re&&oe)for(q=0;q0},collideHandler:function(F,k,G,Z,J,W){if(k===void 0&&F.isParent)return this.collideGroupVsGroup(F,F,G,Z,J,W);if(!F||!k)return!1;if(F.body||F.isBody){if(k.body||k.isBody)return this.collideSpriteVsSprite(F,k,G,Z,J,W);if(k.isParent)return this.collideSpriteVsGroup(F,k,G,Z,J,W);if(k.isTilemap)return this.collideSpriteVsTilemapLayer(F,k,G,Z,J,W)}else if(F.isParent){if(k.body||k.isBody)return this.collideSpriteVsGroup(k,F,G,Z,J,W);if(k.isParent)return this.collideGroupVsGroup(F,k,G,Z,J,W);if(k.isTilemap)return this.collideGroupVsTilemapLayer(F,k,G,Z,J,W)}else if(F.isTilemap){if(k.body||k.isBody)return this.collideSpriteVsTilemapLayer(k,F,G,Z,J,W);if(k.isParent)return this.collideGroupVsTilemapLayer(k,F,G,Z,J,W)}},canCollide:function(F,k){return F&&k&&(F.collisionMask&k.collisionCategory)!==0&&(k.collisionMask&F.collisionCategory)!==0},collideSpriteVsSprite:function(F,k,G,Z,J,W){var q=F.isBody?F:F.body,ie=k.isBody?k:k.body;return this.canCollide(q,ie)?(this.separate(q,ie,Z,J,W)&&(G&&G.call(J,F,k),this._total++),!0):!1},collideSpriteVsGroup:function(F,k,G,Z,J,W){var q=F.isBody?F:F.body;if(!(k.getLength()===0||!q||!q.enable||q.checkCollision.none||!this.canCollide(q,k))){var ie,re,oe;if(this.useTree||k.physicsType===u.STATIC_BODY){var ve=this.treeMinMax;ve.minX=q.left,ve.minY=q.top,ve.maxX=q.right,ve.maxY=q.bottom;var _e=k.physicsType===u.DYNAMIC_BODY?this.tree.search(ve):this.staticTree.search(ve);for(re=_e.length,ie=0;ie{var a={setAcceleration:function(s,o){return this.body.acceleration.set(s,o),this},setAccelerationX:function(s){return this.body.acceleration.x=s,this},setAccelerationY:function(s){return this.body.acceleration.y=s,this}};n.exports=a},59023:n=>{var a={setAngularVelocity:function(s){return this.body.angularVelocity=s,this},setAngularAcceleration:function(s){return this.body.angularAcceleration=s,this},setAngularDrag:function(s){return this.body.angularDrag=s,this}};n.exports=a},62069:n=>{var a={setBounce:function(s,o){return this.body.bounce.set(s,o),this},setBounceX:function(s){return this.body.bounce.x=s,this},setBounceY:function(s){return this.body.bounce.y=s,this},setCollideWorldBounds:function(s,o,d,l){return this.body.setCollideWorldBounds(s,o,d,l),this}};n.exports=a},78389:(n,a,s)=>{var o=s(79599),d={setCollisionCategory:function(l){var c=this.body?this.body:this;return c.collisionCategory=l,this},willCollideWith:function(l){var c=this.body?this.body:this;return(c.collisionMask&l)!==0},addCollidesWith:function(l){var c=this.body?this.body:this;return c.collisionMask=c.collisionMask|l,this},removeCollidesWith:function(l){var c=this.body?this.body:this;return c.collisionMask=c.collisionMask&~l,this},setCollidesWith:function(l){var c=this.body?this.body:this;return c.collisionMask=o(l),this},resetCollisionCategory:function(){var l=this.body?this.body:this;return l.collisionCategory=1,l.collisionMask=2147483647,this}};n.exports=d},87118:n=>{var a={setDebug:function(s,o,d){return this.debugShowBody=s,this.debugShowVelocity=o,this.debugBodyColor=d,this},setDebugBodyColor:function(s){return this.body.debugBodyColor=s,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(s){this.body.debugShowBody=s}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(s){this.body.debugShowVelocity=s}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(s){this.body.debugBodyColor=s}}};n.exports=a},52819:n=>{var a={setDrag:function(s,o){return this.body.drag.set(s,o),this},setDragX:function(s){return this.body.drag.x=s,this},setDragY:function(s){return this.body.drag.y=s,this},setDamping:function(s){return this.body.useDamping=s,this}};n.exports=a},4074:n=>{var a={setDirectControl:function(s){return this.body.setDirectControl(s),this},enableBody:function(s,o,d,l,c){return s&&this.body.reset(o,d),l&&(this.body.gameObject.active=!0),c&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(s,o){return s===void 0&&(s=!1),o===void 0&&(o=!1),this.body.stop(),this.body.enable=!1,s&&(this.body.gameObject.active=!1),o&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};n.exports=a},40831:n=>{var a={setFriction:function(s,o){return this.body.friction.set(s,o),this},setFrictionX:function(s){return this.body.friction.x=s,this},setFrictionY:function(s){return this.body.friction.y=s,this}};n.exports=a},26775:n=>{var a={setGravity:function(s,o){return this.body.gravity.set(s,o),this},setGravityX:function(s){return this.body.gravity.x=s,this},setGravityY:function(s){return this.body.gravity.y=s,this}};n.exports=a},9437:n=>{var a={setImmovable:function(s){return s===void 0&&(s=!0),this.body.immovable=s,this}};n.exports=a},30621:n=>{var a={setMass:function(s){return this.body.mass=s,this}};n.exports=a},72441:(n,a,s)=>{var o=s(47956),d=s(96503),l=s(2044),c=s(81491),h=function(u,f,p,m,g,v){var y=o(u,f-m,p-m,2*m,2*m,g,v);if(y.length===0)return y;for(var x=new d(f,p,m),b=new d,_=[],C=0;C{var a=function(s,o,d,l,c,h,u){h===void 0&&(h=!0),u===void 0&&(u=!1);var f=[],p=[],m=s.treeMinMax;if(m.minX=o,m.minY=d,m.maxX=o+l,m.maxY=d+c,u&&(p=s.staticTree.search(m)),h&&s.useTree)f=s.tree.search(m);else if(h){var g=s.bodies,v={position:{x:o,y:d},left:o,top:d,right:o+l,bottom:d+c,isCircle:!1},y=s.intersects;g.iterate(function(x){y(x,v)&&f.push(x)})}return p.concat(f)};n.exports=a},62121:n=>{var a={setPushable:function(s){return s===void 0&&(s=!0),this.body.pushable=s,this}};n.exports=a},29384:n=>{var a={setOffset:function(s,o){return this.body.setOffset(s,o),this},setSize:function(s,o,d){return this.body.setSize(s,o,d),this},setBodySize:function(s,o,d){return this.body.setSize(s,o,d),this},setCircle:function(s,o,d){return this.body.setCircle(s,o,d),this}};n.exports=a},15098:n=>{var a={setVelocity:function(s,o){return this.body.setVelocity(s,o),this},setVelocityX:function(s){return this.body.setVelocityX(s),this},setVelocityY:function(s){return this.body.setVelocityY(s),this},setMaxVelocity:function(s,o){return this.body.maxVelocity.set(s,o),this}};n.exports=a},92209:(n,a,s)=>{n.exports={Acceleration:s(1093),Angular:s(59023),Bounce:s(62069),Collision:s(78389),Debug:s(87118),Drag:s(52819),Enable:s(4074),Friction:s(40831),Gravity:s(26775),Immovable:s(9437),Mass:s(30621),OverlapCirc:s(72441),OverlapRect:s(47956),Pushable:s(62121),Size:s(29384),Velocity:s(15098)}},37747:n=>{var a={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};n.exports=a},20009:n=>{n.exports="collide"},36768:n=>{n.exports="overlap"},60473:n=>{n.exports="pause"},89954:n=>{n.exports="resume"},61804:n=>{n.exports="tilecollide"},7161:n=>{n.exports="tileoverlap"},34689:n=>{n.exports="worldbounds"},16006:n=>{n.exports="worldstep"},63012:(n,a,s)=>{n.exports={COLLIDE:s(20009),OVERLAP:s(36768),PAUSE:s(60473),RESUME:s(89954),TILE_COLLIDE:s(61804),TILE_OVERLAP:s(7161),WORLD_BOUNDS:s(34689),WORLD_STEP:s(16006)}},27064:(n,a,s)=>{var o=s(37747),d=s(79291),l={ArcadePhysics:s(86689),Body:s(37742),Collider:s(79342),Components:s(92209),Events:s(63012),Factory:s(66022),GetCollidesWith:s(79599),GetOverlapX:s(64897),GetOverlapY:s(45170),SeparateX:s(14087),SeparateY:s(89936),Group:s(60758),Image:s(71289),Sprite:s(13759),StaticBody:s(72624),StaticGroup:s(71464),Tilemap:s(55173),World:s(82248)};l=d(!1,l,o),n.exports=l},96602:n=>{var a=function(s,o){return s.collisionCallback?!s.collisionCallback.call(s.collisionCallbackContext,o,s):s.layer.callbacks[s.index]?!s.layer.callbacks[s.index].callback.call(s.layer.callbacks[s.index].callbackContext,o,s):!0};n.exports=a},36294:n=>{var a=function(s,o){o<0?(s.blocked.none=!1,s.blocked.left=!0):o>0&&(s.blocked.none=!1,s.blocked.right=!0),s.position.x-=o,s.updateCenter(),s.bounce.x===0?s.velocity.x=0:s.velocity.x=-s.velocity.x*s.bounce.x};n.exports=a},67013:n=>{var a=function(s,o){o<0?(s.blocked.none=!1,s.blocked.up=!0):o>0&&(s.blocked.none=!1,s.blocked.down=!0),s.position.y-=o,s.updateCenter(),s.bounce.y===0?s.velocity.y=0:s.velocity.y=-s.velocity.y*s.bounce.y};n.exports=a},40012:(n,a,s)=>{var o=s(21329),d=s(53442),l=s(2483),c=function(h,u,f,p,m,g,v){var y=p.left,x=p.top,b=p.right,_=p.bottom,C=f.faceLeft||f.faceRight,w=f.faceTop||f.faceBottom;if(v||(C=!0,w=!0),!C&&!w)return!1;var T=0,S=0,E=0,D=1;if(u.deltaAbsX()>u.deltaAbsY()?E=-1:u.deltaAbsX(){var o=s(36294),d=function(l,c,h,u,f,p){var m=0,g=c.faceLeft,v=c.faceRight,y=c.collideLeft,x=c.collideRight;return p||(g=!0,v=!0,y=!0,x=!0),l.deltaX()<0&&x&&l.checkCollision.left?v&&l.x0&&y&&l.checkCollision.right&&g&&l.right>h&&(m=l.right-h,m>f&&(m=0)),m!==0&&(l.customSeparateX?l.overlapX=m:o(l,m)),m};n.exports=d},53442:(n,a,s)=>{var o=s(67013),d=function(l,c,h,u,f,p){var m=0,g=c.faceTop,v=c.faceBottom,y=c.collideUp,x=c.collideDown;return p||(g=!0,v=!0,y=!0,x=!0),l.deltaY()<0&&x&&l.checkCollision.up?v&&l.y0&&y&&l.checkCollision.down&&g&&l.bottom>h&&(m=l.bottom-h,m>f&&(m=0)),m!==0&&(l.customSeparateY?l.overlapY=m:o(l,m)),m};n.exports=d},2483:n=>{var a=function(s,o){return!(o.right<=s.left||o.bottom<=s.top||o.position.x>=s.right||o.position.y>=s.bottom)};n.exports=a},55173:(n,a,s)=>{var o={ProcessTileCallbacks:s(96602),ProcessTileSeparationX:s(36294),ProcessTileSeparationY:s(67013),SeparateTile:s(40012),TileCheckX:s(21329),TileCheckY:s(53442),TileIntersectsBody:s(2483)};n.exports=o},44563:(n,a,s)=>{n.exports={Arcade:s(27064),Matter:s(3875)}},68174:(n,a,s)=>{var o=s(83419),d=s(26099),l=new o({initialize:function(){this.boundsCenter=new d,this.centerDiff=new d},parseBody:function(c){if(c=c.hasOwnProperty("body")?c.body:c,!c.hasOwnProperty("bounds")||!c.hasOwnProperty("centerOfMass"))return!1;var h=this.boundsCenter,u=this.centerDiff,f=c.bounds.max.x-c.bounds.min.x,p=c.bounds.max.y-c.bounds.min.y,m=f*c.centerOfMass.x,g=p*c.centerOfMass.y;return h.set(f/2,p/2),u.set(m-h.x,g-h.y),!0},getTopLeft:function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),this.parseBody(c)){var f=this.boundsCenter,p=this.centerDiff;return new d(h+f.x+p.x,u+f.y+p.y)}return!1},getTopCenter:function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),this.parseBody(c)){var f=this.boundsCenter,p=this.centerDiff;return new d(h+p.x,u+f.y+p.y)}return!1},getTopRight:function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),this.parseBody(c)){var f=this.boundsCenter,p=this.centerDiff;return new d(h-(f.x-p.x),u+f.y+p.y)}return!1},getLeftCenter:function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),this.parseBody(c)){var f=this.boundsCenter,p=this.centerDiff;return new d(h+f.x+p.x,u+p.y)}return!1},getCenter:function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),this.parseBody(c)){var f=this.centerDiff;return new d(h+f.x,u+f.y)}return!1},getRightCenter:function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),this.parseBody(c)){var f=this.boundsCenter,p=this.centerDiff;return new d(h-(f.x-p.x),u+p.y)}return!1},getBottomLeft:function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),this.parseBody(c)){var f=this.boundsCenter,p=this.centerDiff;return new d(h+f.x+p.x,u-(f.y-p.y))}return!1},getBottomCenter:function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),this.parseBody(c)){var f=this.boundsCenter,p=this.centerDiff;return new d(h+p.x,u-(f.y-p.y))}return!1},getBottomRight:function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),this.parseBody(c)){var f=this.boundsCenter,p=this.centerDiff;return new d(h-(f.x-p.x),u-(f.y-p.y))}return!1}});n.exports=l},19933:(n,a,s)=>{var o=s(6790);o.Body=s(22562),o.Composite=s(69351),o.World=s(4372),o.Collision=s(52284),o.Detector=s(81388),o.Pairs=s(99561),o.Pair=s(4506),o.Query=s(73296),o.Resolver=s(66272),o.Constraint=s(48140),o.Common=s(53402),o.Engine=s(48413),o.Events=s(35810),o.Sleeping=s(53614),o.Plugin=s(73832),o.Bodies=s(66280),o.Composites=s(74116),o.Axes=s(66615),o.Bounds=s(15647),o.Svg=s(74058),o.Vector=s(31725),o.Vertices=s(41598),o.World.add=o.Composite.add,o.World.remove=o.Composite.remove,o.World.addComposite=o.Composite.addComposite,o.World.addBody=o.Composite.addBody,o.World.addConstraint=o.Composite.addConstraint,o.World.clear=o.Composite.clear,n.exports=o},28137:(n,a,s)=>{var o=s(66280),d=s(83419),l=s(74116),c=s(48140),h=s(74058),u=s(75803),f=s(23181),p=s(34803),m=s(73834),g=s(19496),v=s(85791),y=s(98713),x=s(41598),b=new d({initialize:function(C){this.world=C,this.scene=C.scene,this.sys=C.scene.sys},rectangle:function(_,C,w,T,S){var E=o.rectangle(_,C,w,T,S);return this.world.add(E),E},trapezoid:function(_,C,w,T,S,E){var D=o.trapezoid(_,C,w,T,S,E);return this.world.add(D),D},circle:function(_,C,w,T,S){var E=o.circle(_,C,w,T,S);return this.world.add(E),E},polygon:function(_,C,w,T,S){var E=o.polygon(_,C,w,T,S);return this.world.add(E),E},fromVertices:function(_,C,w,T,S,E,D){typeof w=="string"&&(w=x.fromPath(w));var A=o.fromVertices(_,C,w,T,S,E,D);return this.world.add(A),A},fromPhysicsEditor:function(_,C,w,T,S){S===void 0&&(S=!0);var E=g.parseBody(_,C,w,T);return S&&!this.world.has(E)&&this.world.add(E),E},fromSVG:function(_,C,w,T,S,E){T===void 0&&(T=1),S===void 0&&(S={}),E===void 0&&(E=!0);for(var D=w.getElementsByTagName("path"),A=[],M=0;M{var o=s(31884),d=s(95540),l=s(26099);function c(u){return!!u.get&&typeof u.get=="function"||!!u.set&&typeof u.set=="function"}var h=function(u,f,p,m){p===void 0&&(p={}),m===void 0&&(m=!0);var g=f.x,v=f.y;f.body={temp:!0,position:{x:g,y:v}};var y=[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity];if(y.forEach(function(b){for(var _ in b)c(b[_])?Object.defineProperty(f,_,{get:b[_].get,set:b[_].set}):Object.defineProperty(f,_,{value:b[_]})}),f.world=u,f._tempVec2=new l(g,v),p.hasOwnProperty("type")&&p.type==="body")f.setExistingBody(p,m);else{var x=d(p,"shape",null);x||(x="rectangle"),p.addToWorld=m,f.setBody(x,p)}return f};n.exports=h},23181:(n,a,s)=>{var o=s(83419),d=s(31884),l=s(95643),c=s(95540),h=s(88571),u=s(72699),f=s(26099),p=new o({Extends:h,Mixins:[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity,u],initialize:function(g,v,y,x,b,_){l.call(this,g.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(x,b),this.setSizeToFrame(),this.setOrigin(),this.world=g,this._tempVec2=new f(v,y);var C=c(_,"shape",null);C?this.setBody(C,_):this.setRectangle(this.width,this.height,_),this.setPosition(v,y),this.initPipeline(),this.initPostPipeline(!0)}});n.exports=p},42045:(n,a,s)=>{var o=s(60461),d=s(66615),l=s(66280),c=s(22562),h=s(68174),u=s(15647),f=s(83419),p=s(52284),m=s(53402),g=s(69351),v=s(74116),y=s(48140),x=s(81388),b=s(20339),_=s(28137),C=s(95540),w=s(35154),T=s(46975),S=s(4506),E=s(99561),D=s(37277),A=s(73296),M=s(66272),R=s(44594),L=s(74058),I=s(31725),O=s(41598),N=s(68243);m.setDecomp(s(55973));var H=new f({initialize:function(V){this.scene=V,this.systems=V.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=c,this.composite=g,this.collision=p,this.detector=x,this.pair=S,this.pairs=E,this.query=A,this.resolver=M,this.constraint=y,this.bodies=l,this.composites=v,this.axes=d,this.bounds=u,this.svg=L,this.vector=I,this.vertices=O,this.verts=O,this._tempVec2=I.create(),M._restingThresh=w(this.config,"restingThresh",4),M._restingThreshTangent=w(this.config,"restingThreshTangent",6),M._positionDampen=w(this.config,"positionDampen",.9),M._positionWarming=w(this.config,"positionWarming",.8),M._frictionNormalMultiplier=w(this.config,"frictionNormalMultiplier",5),V.sys.events.once(R.BOOT,this.boot,this),V.sys.events.on(R.START,this.start,this)},boot:function(){this.world=new N(this.scene,this.config),this.add=new _(this.world),this.bodyBounds=new h,this.systems.events.once(R.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new N(this.scene,this.config),this.add=new _(this.world));var X=this.systems.events;X.on(R.UPDATE,this.world.update,this.world),X.on(R.POST_UPDATE,this.world.postUpdate,this.world),X.once(R.SHUTDOWN,this.shutdown,this)},getConfig:function(){var X=this.systems.game.config.physics,V=this.systems.settings.physics,z=T(C(V,"matter",{}),C(X,"matter",{}));return z},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(X,V){this.world.step(X,V)},containsPoint:function(X,V,z){X=this.getMatterBodies(X);var F=I.create(V,z),k=A.point(X,F);return k.length>0},intersectPoint:function(X,V,z){z=this.getMatterBodies(z);var F=I.create(X,V),k=[],G=A.point(z,F);return G.forEach(function(Z){k.indexOf(Z)===-1&&k.push(Z)}),k},intersectRect:function(X,V,z,F,k,G){k===void 0&&(k=!1),G=this.getMatterBodies(G);var Z={min:{x:X,y:V},max:{x:X+z,y:V+F}},J=[],W=A.region(G,Z,k);return W.forEach(function(q){J.indexOf(q)===-1&&J.push(q)}),J},intersectRay:function(X,V,z,F,k,G){k===void 0&&(k=1),G=this.getMatterBodies(G);for(var Z=[],J=A.ray(G,I.create(X,V),I.create(z,F),k),W=0;W{var o=s(9674),d=s(83419),l=s(31884),c=s(95643),h=s(95540),u=s(72699),f=s(68287),p=s(26099),m=new d({Extends:f,Mixins:[l.Bounce,l.Collision,l.Force,l.Friction,l.Gravity,l.Mass,l.Sensor,l.SetBody,l.Sleep,l.Static,l.Transform,l.Velocity,u],initialize:function(v,y,x,b,_,C){c.call(this,v.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new o(this),this.setTexture(b,_),this.setSizeToFrame(),this.setOrigin(),this.world=v,this._tempVec2=new p(y,x);var w=h(C,"shape",null);w?this.setBody(w,C):this.setRectangle(this.width,this.height,C),this.setPosition(y,x),this.initPipeline(),this.initPostPipeline(!0)}});n.exports=m},73834:(n,a,s)=>{var o=s(66280),d=s(22562),l=s(83419),c=s(31884),h=s(62644),u=s(50792),f=s(95540),p=s(97022),m=s(41598),g=new l({Extends:u,Mixins:[c.Bounce,c.Collision,c.Friction,c.Gravity,c.Mass,c.Sensor,c.Sleep,c.Static],initialize:function(y,x,b){u.call(this),this.tile=x,this.world=y,x.physics.matterBody&&x.physics.matterBody.destroy(),x.physics.matterBody=this;var _=f(b,"body",null),C=f(b,"addToWorld",!0);if(_)this.setBody(_,C);else{var w=x.getCollisionGroup(),T=f(w,"objects",[]);T.length>0?this.setFromTileCollision(b):this.setFromTileRectangle(b)}if(x.flipX||x.flipY){var S={x:x.getCenterX(),y:x.getCenterY()},E=x.flipX?-1:1,D=x.flipY?-1:1;d.scale(_,E,D,S)}},setFromTileRectangle:function(v){v===void 0&&(v={}),p(v,"isStatic")||(v.isStatic=!0),p(v,"addToWorld")||(v.addToWorld=!0);var y=this.tile.getBounds(),x=y.x+y.width/2,b=y.y+y.height/2,_=o.rectangle(x,b,y.width,y.height,v);return this.setBody(_,v.addToWorld),this},setFromTileCollision:function(v){v===void 0&&(v={}),p(v,"isStatic")||(v.isStatic=!0),p(v,"addToWorld")||(v.addToWorld=!0);for(var y=this.tile.tilemapLayer.scaleX,x=this.tile.tilemapLayer.scaleY,b=this.tile.getLeft(),_=this.tile.getTop(),C=this.tile.getCollisionGroup(),w=f(C,"objects",[]),T=[],S=0;S1){var X=h(v);X.parts=T,this.setBody(d.create(X),X.addToWorld)}return this},setBody:function(v,y){return y===void 0&&(y=!0),this.body&&this.removeBody(),this.body=v,this.body.gameObject=this,y&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});n.exports=g},19496:(n,a,s)=>{var o=s(66280),d=s(22562),l=s(53402),c=s(95540),h=s(41598),u={parseBody:function(f,p,m,g){g===void 0&&(g={});for(var v=c(m,"fixtures",[]),y=[],x=0;x{var o=s(66280),d=s(22562),l={parseBody:function(c,h,u,f){f===void 0&&(f={});var p,m=u.vertices;if(m.length===1)f.vertices=m[0],p=d.create(f),o.flagCoincidentParts(p.parts);else{for(var g=[],v=0;v{var o=s(15647),d=s(83419),l=s(69351),c=s(48140),h=s(81388),u=s(1121),f=s(8214),p=s(46975),m=s(53614),g=s(26099),v=s(41598),y=new d({initialize:function(b,_,C){C===void 0&&(C={});var w={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=b,this.world=_,this.camera=null,this.pointer=null,this.active=!0,this.position=new g,this.body=null,this.part=null,this.constraint=c.create(p(C,w)),this.world.on(u.BEFORE_UPDATE,this.update,this),b.sys.input.on(f.POINTER_DOWN,this.onDown,this),b.sys.input.on(f.POINTER_UP,this.onUp,this)},onDown:function(x){this.pointer||(this.pointer=x,this.camera=x.camera)},onUp:function(x){x===this.pointer&&(this.pointer=null)},getBody:function(x){var b=this.position,_=this.constraint;this.camera.getWorldPoint(x.x,x.y,b);for(var C=l.allBodies(this.world.localWorld),w=0;w1?1:0,T=w;T{var o=s(66280),d=s(22562),l=s(83419),c=s(53402),h=s(69351),u=s(48413),f=s(50792),p=s(1121),m=s(95540),g=s(35154),v=s(22562),y=s(35810),x=s(73834),b=s(4372),_=s(13037),C=s(31725),w=new l({Extends:f,initialize:function(S,E){f.call(this),this.scene=S,this.engine=u.create(E),this.localWorld=this.engine.world;var D=g(E,"gravity",null);D?this.setGravity(D.x,D.y,D.scale):D===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=g(E,"enabled",!0),this.getDelta=g(E,"getDelta",this.update60Hz);var A=m(E,"runner",{}),M=m(A,"fps",!1),R=m(A,"fps",60),L=m(A,"delta",1e3/R),I=m(A,"deltaMin",1e3/R),O=m(A,"deltaMax",1e3/(R*.5));M||(R=1e3/L),this.runner={fps:R,deltaSampleSize:m(A,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,timeBuffer:0,isFixed:m(A,"isFixed",!1),delta:L,deltaMin:I,deltaMax:O},this.autoUpdate=g(E,"autoUpdate",!0);var N=g(E,"debug",!1);if(this.drawDebug=typeof N=="object"?!0:N,this.debugGraphic,this.debugConfig={showAxes:m(N,"showAxes",!1),showAngleIndicator:m(N,"showAngleIndicator",!1),angleColor:m(N,"angleColor",15208787),showBroadphase:m(N,"showBroadphase",!1),broadphaseColor:m(N,"broadphaseColor",16757760),showBounds:m(N,"showBounds",!1),boundsColor:m(N,"boundsColor",16777215),showVelocity:m(N,"showVelocity",!1),velocityColor:m(N,"velocityColor",44783),showCollisions:m(N,"showCollisions",!1),collisionColor:m(N,"collisionColor",16094476),showSeparations:m(N,"showSeparations",!1),separationColor:m(N,"separationColor",16753920),showBody:m(N,"showBody",!0),showStaticBody:m(N,"showStaticBody",!0),showInternalEdges:m(N,"showInternalEdges",!1),renderFill:m(N,"renderFill",!1),renderLine:m(N,"renderLine",!0),fillColor:m(N,"fillColor",1075465),fillOpacity:m(N,"fillOpacity",1),lineColor:m(N,"lineColor",2678297),lineOpacity:m(N,"lineOpacity",1),lineThickness:m(N,"lineThickness",1),staticFillColor:m(N,"staticFillColor",857979),staticLineColor:m(N,"staticLineColor",1255396),showSleeping:m(N,"showSleeping",!1),staticBodySleepOpacity:m(N,"staticBodySleepOpacity",.7),sleepFillColor:m(N,"sleepFillColor",4605510),sleepLineColor:m(N,"sleepLineColor",10066585),showSensors:m(N,"showSensors",!0),sensorFillColor:m(N,"sensorFillColor",857979),sensorLineColor:m(N,"sensorLineColor",1255396),showPositions:m(N,"showPositions",!0),positionSize:m(N,"positionSize",4),positionColor:m(N,"positionColor",14697178),showJoint:m(N,"showJoint",!0),jointColor:m(N,"jointColor",14737474),jointLineOpacity:m(N,"jointLineOpacity",1),jointLineThickness:m(N,"jointLineThickness",2),pinSize:m(N,"pinSize",4),pinColor:m(N,"pinColor",4382944),springColor:m(N,"springColor",14697184),anchorColor:m(N,"anchorColor",15724527),anchorSize:m(N,"anchorSize",4),showConvexHulls:m(N,"showConvexHulls",!1),hullColor:m(N,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),m(E,"setBounds",!1)){var H=E.setBounds;if(typeof H=="boolean")this.setBounds();else{var X=m(H,"x",0),V=m(H,"y",0),z=m(H,"width",S.sys.scale.width),F=m(H,"height",S.sys.scale.height),k=m(H,"thickness",64),G=m(H,"left",!0),Z=m(H,"right",!0),J=m(H,"top",!0),W=m(H,"bottom",!0);this.setBounds(X,V,z,F,k,G,Z,J,W)}}},setCompositeRenderStyle:function(T){var S=T.bodies,E=T.constraints,D=T.composites,A,M,R;for(A=0;A0&&A.map(function(L){M=L.bodyA,R=L.bodyB,M.gameObject&&M.gameObject.emit("collide",M,R,L),R.gameObject&&R.gameObject.emit("collide",R,M,L),y.trigger(M,"onCollide",{pair:L}),y.trigger(R,"onCollide",{pair:L}),M.onCollideCallback&&M.onCollideCallback(L),R.onCollideCallback&&R.onCollideCallback(L),M.onCollideWith[R.id]&&M.onCollideWith[R.id](R,L),R.onCollideWith[M.id]&&R.onCollideWith[M.id](M,L)}),T.emit(p.COLLISION_START,D,M,R)}),y.on(S,"collisionActive",function(D){var A=D.pairs,M,R;A.length>0&&A.map(function(L){M=L.bodyA,R=L.bodyB,M.gameObject&&M.gameObject.emit("collideActive",M,R,L),R.gameObject&&R.gameObject.emit("collideActive",R,M,L),y.trigger(M,"onCollideActive",{pair:L}),y.trigger(R,"onCollideActive",{pair:L}),M.onCollideActiveCallback&&M.onCollideActiveCallback(L),R.onCollideActiveCallback&&R.onCollideActiveCallback(L)}),T.emit(p.COLLISION_ACTIVE,D,M,R)}),y.on(S,"collisionEnd",function(D){var A=D.pairs,M,R;A.length>0&&A.map(function(L){M=L.bodyA,R=L.bodyB,M.gameObject&&M.gameObject.emit("collideEnd",M,R,L),R.gameObject&&R.gameObject.emit("collideEnd",R,M,L),y.trigger(M,"onCollideEnd",{pair:L}),y.trigger(R,"onCollideEnd",{pair:L}),M.onCollideEndCallback&&M.onCollideEndCallback(L),R.onCollideEndCallback&&R.onCollideEndCallback(L)}),T.emit(p.COLLISION_END,D,M,R)})},setBounds:function(T,S,E,D,A,M,R,L,I){return T===void 0&&(T=0),S===void 0&&(S=0),E===void 0&&(E=this.scene.sys.scale.width),D===void 0&&(D=this.scene.sys.scale.height),A===void 0&&(A=64),M===void 0&&(M=!0),R===void 0&&(R=!0),L===void 0&&(L=!0),I===void 0&&(I=!0),this.updateWall(M,"left",T-A,S-A,A,D+A*2),this.updateWall(R,"right",T+E,S-A,A,D+A*2),this.updateWall(L,"top",T,S-A,E,A),this.updateWall(I,"bottom",T,S+D,E,A),this},updateWall:function(T,S,E,D,A,M){var R=this.walls[S];T?(R&&b.remove(this.localWorld,R),E+=A/2,D+=M/2,this.walls[S]=this.create(E,D,A,M,{isStatic:!0,friction:0,frictionStatic:0})):(R&&b.remove(this.localWorld,R),this.walls[S]=null)},createDebugGraphic:function(){var T=this.scene.sys.add.graphics({x:0,y:0});return T.setDepth(Number.MAX_VALUE),this.debugGraphic=T,this.drawDebug=!0,T},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(T,S,E){return T===void 0&&(T=0),S===void 0&&(S=1),E===void 0&&(E=.001),this.localWorld.gravity.x=T,this.localWorld.gravity.y=S,this.localWorld.gravity.scale=E,this},create:function(T,S,E,D,A){var M=o.rectangle(T,S,E,D,A);return b.add(this.localWorld,M),M},add:function(T){return b.add(this.localWorld,T),this},remove:function(T,S){Array.isArray(T)||(T=[T]);for(var E=0;EMath.max(_._maxFrameDelta,E.maxFrameTime))&&(R=E.frameDelta||_._frameDeltaFallback),E.frameDeltaSmoothing){E.frameDeltaHistory.push(R),E.frameDeltaHistory=E.frameDeltaHistory.slice(-E.frameDeltaHistorySize);var L=E.frameDeltaHistory.slice(0).sort(),I=E.frameDeltaHistory.slice(L.length*_._smoothingLowerBound,L.length*_._smoothingUpperBound),O=_._mean(I);R=O||R}E.frameDeltaSnapping&&(R=1e3/Math.round(1e3/R)),E.frameDelta=R,E.timeLastTick=T,E.timeBuffer+=E.frameDelta,E.timeBuffer=c.clamp(E.timeBuffer,0,E.frameDelta+A*_._timeBufferMargin),E.lastUpdatesDeferred=0;for(var N=E.maxUpdates||Math.ceil(E.maxFrameTime/A),H=c.now();A>0&&E.timeBuffer>=A*_._timeBufferMargin;){u.update(S,A),E.timeBuffer-=A,M+=1;var X=c.now()-D,V=c.now()-H,z=X+_._elapsedNextEstimate*V/M;if(M>=N||z>E.maxFrameTime){E.lastUpdatesDeferred=Math.round(Math.max(0,E.timeBuffer/A-_._timeBufferMargin));break}}}},step:function(T){u.update(this.engine,T)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(T){var S=T.hasOwnProperty("body")?T.body:T;return h.get(this.localWorld,S.id,S.type)!==null},getAllBodies:function(){return h.allBodies(this.localWorld)},getAllConstraints:function(){return h.allConstraints(this.localWorld)},getAllComposites:function(){return h.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var T=this.debugConfig,S=this.engine,E=this.debugGraphic,D=h.allBodies(this.localWorld);this.debugGraphic.clear(),T.showBroadphase&&S.broadphase.controller&&this.renderGrid(S.broadphase,E,T.broadphaseColor,.5),T.showBounds&&this.renderBodyBounds(D,E,T.boundsColor,.5),(T.showBody||T.showStaticBody)&&this.renderBodies(D),T.showJoint&&this.renderJoints(),(T.showAxes||T.showAngleIndicator)&&this.renderBodyAxes(D,E,T.showAxes,T.angleColor,.5),T.showVelocity&&this.renderBodyVelocity(D,E,T.velocityColor,1,2),T.showSeparations&&this.renderSeparations(S.pairs.list,E,T.separationColor),T.showCollisions&&this.renderCollisions(S.pairs.list,E,T.collisionColor)}},renderGrid:function(T,S,E,D){S.lineStyle(1,E,D);for(var A=c.keys(T.buckets),M=0;M0){var N=O[0].vertex.x,H=O[0].vertex.y;A.contactCount===2&&(N=(O[0].vertex.x+O[1].vertex.x)/2,H=(O[0].vertex.y+O[1].vertex.y)/2),I.bodyB===I.supports[0].body||I.bodyA.isStatic?S.lineBetween(N-I.normal.x*8,H-I.normal.y*8,N,H):S.lineBetween(N+I.normal.x*8,H+I.normal.y*8,N,H)}}return this},renderBodyBounds:function(T,S,E,D){S.lineStyle(1,E,D);for(var A=0;A1?1:0;I1?1:0;O1?1:0;O1&&this.renderConvexHull(F,S,V,Z)}}},renderBody:function(T,S,E,D,A,M,R,L){D===void 0&&(D=null),A===void 0&&(A=null),M===void 0&&(M=1),R===void 0&&(R=null),L===void 0&&(L=null);for(var I=this.debugConfig,O=I.sensorFillColor,N=I.sensorLineColor,H=T.parts,X=H.length,V=X>1?1:0;V1){var R=T.vertices;S.lineStyle(D,E),S.beginPath(),S.moveTo(R[0].x,R[0].y);for(var L=1;L0&&(S.fillStyle(R),S.fillCircle(H.x,H.y,L),S.fillCircle(X.x,X.y,L)),this},resetCollisionIDs:function(){return d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,this},shutdown:function(){y.off(this.engine),this.removeAllListeners(),b.clear(this.localWorld,!1),u.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});n.exports=w},70410:n=>{var a={setBounce:function(s){return this.body.restitution=s,this}};n.exports=a},66968:n=>{var a={setCollisionCategory:function(s){return this.body.collisionFilter.category=s,this},setCollisionGroup:function(s){return this.body.collisionFilter.group=s,this},setCollidesWith:function(s){var o=0;if(!Array.isArray(s))o=s;else for(var d=0;d{var o=s(22562),d={applyForce:function(l){return this._tempVec2.set(this.body.position.x,this.body.position.y),o.applyForce(this.body,this._tempVec2,l),this},applyForceFrom:function(l,c){return o.applyForce(this.body,l,c),this},thrust:function(l){var c=this.body.angle;return this._tempVec2.set(l*Math.cos(c),l*Math.sin(c)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(l){var c=this.body.angle-Math.PI/2;return this._tempVec2.set(l*Math.cos(c),l*Math.sin(c)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(l){var c=this.body.angle+Math.PI/2;return this._tempVec2.set(l*Math.cos(c),l*Math.sin(c)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(l){var c=this.body.angle-Math.PI;return this._tempVec2.set(l*Math.cos(c),l*Math.sin(c)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};n.exports=d},5436:n=>{var a={setFriction:function(s,o,d){return this.body.friction=s,o!==void 0&&(this.body.frictionAir=o),d!==void 0&&(this.body.frictionStatic=d),this},setFrictionAir:function(s){return this.body.frictionAir=s,this},setFrictionStatic:function(s){return this.body.frictionStatic=s,this}};n.exports=a},39858:n=>{var a={setIgnoreGravity:function(s){return this.body.ignoreGravity=s,this}};n.exports=a},37302:(n,a,s)=>{var o=s(22562),d=s(26099),l={setMass:function(c){return o.setMass(this.body,c),this},setDensity:function(c){return o.setDensity(this.body,c),this},centerOfMass:{get:function(){return new d(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};n.exports=l},39132:n=>{var a={setSensor:function(s){return this.body.isSensor=s,this},isSensor:function(){return this.body.isSensor}};n.exports=a},57772:(n,a,s)=>{var o=s(66280),d=s(22562),l=s(43855),c=s(95540),h=s(19496),u=s(85791),f=s(41598),p={setRectangle:function(m,g,v){return this.setBody({type:"rectangle",width:m,height:g},v)},setCircle:function(m,g){return this.setBody({type:"circle",radius:m},g)},setPolygon:function(m,g,v){return this.setBody({type:"polygon",sides:g,radius:m},v)},setTrapezoid:function(m,g,v,y){return this.setBody({type:"trapezoid",width:m,height:g,slope:v},y)},setExistingBody:function(m,g){g===void 0&&(g=!0),this.body&&this.world.remove(this.body,!0),this.body=m;for(var v=0;v{var o=s(1121),d=s(53614),l=s(35810),c={setToSleep:function(){return d.set(this.body,!0),this},setAwake:function(){return d.set(this.body,!1),this},setSleepThreshold:function(h){return h===void 0&&(h=60),this.body.sleepThreshold=h,this},setSleepEvents:function(h,u){return this.setSleepStartEvent(h),this.setSleepEndEvent(u),this},setSleepStartEvent:function(h){if(h){var u=this.world;l.on(this.body,"sleepStart",function(f){u.emit(o.SLEEP_START,f,this)})}else l.off(this.body,"sleepStart");return this},setSleepEndEvent:function(h){if(h){var u=this.world;l.on(this.body,"sleepEnd",function(f){u.emit(o.SLEEP_END,f,this)})}else l.off(this.body,"sleepEnd");return this}};n.exports=c},90556:(n,a,s)=>{var o=s(22562),d={setStatic:function(l){return o.setStatic(this.body,l),this},isStatic:function(){return this.body.isStatic}};n.exports=d},85436:(n,a,s)=>{var o=s(22562),d=s(36383),l=s(86554),c=s(30954),h=4,u={x:{get:function(){return this.body.position.x},set:function(f){this._tempVec2.set(f,this.y),o.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(f){this._tempVec2.set(this.x,f),o.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(f){var p=1/this._scaleX,m=1/this._scaleY;this._scaleX=f,this._scaleX===0?this.renderFlags&=~h:this.renderFlags|=h,o.scale(this.body,p,m),o.scale(this.body,f,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(f){var p=1/this._scaleX,m=1/this._scaleY;this._scaleY=f,this._scaleY===0?this.renderFlags&=~h:this.renderFlags|=h,o.scale(this.body,p,m),o.scale(this.body,this._scaleX,f)}},angle:{get:function(){return c(this.body.angle*d.RAD_TO_DEG)},set:function(f){this.rotation=c(f)*d.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(f){this._rotation=l(f),o.setAngle(this.body,this._rotation)}},setPosition:function(f,p){return f===void 0&&(f=0),p===void 0&&(p=f),this._tempVec2.set(f,p),o.setPosition(this.body,this._tempVec2),this},setRotation:function(f){return f===void 0&&(f=0),this._rotation=l(f),o.setAngle(this.body,f),this},setFixedRotation:function(){return o.setInertia(this.body,1/0),this},setAngle:function(f){return f===void 0&&(f=0),this.angle=f,o.setAngle(this.body,this.rotation),this},setScale:function(f,p,m){f===void 0&&(f=1),p===void 0&&(p=f);var g=1/this._scaleX,v=1/this._scaleY;return this._scaleX=f,this._scaleY=p,o.scale(this.body,g,v,m),o.scale(this.body,f,p,m),this}};n.exports=u},42081:(n,a,s)=>{var o=s(22562),d={setVelocityX:function(l){return this._tempVec2.set(l,this.body.velocity.y),o.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(l){return this._tempVec2.set(this.body.velocity.x,l),o.setVelocity(this.body,this._tempVec2),this},setVelocity:function(l,c){return this._tempVec2.set(l,c),o.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return o.getVelocity(this.body)},setAngularVelocity:function(l){return o.setAngularVelocity(this.body,l),this},getAngularVelocity:function(){return o.getAngularVelocity(this.body)},setAngularSpeed:function(l){return o.setAngularSpeed(this.body,l),this},getAngularSpeed:function(){return o.getAngularSpeed(this.body)}};n.exports=d},31884:(n,a,s)=>{n.exports={Bounce:s(70410),Collision:s(66968),Force:s(51607),Friction:s(5436),Gravity:s(39858),Mass:s(37302),Sensor:s(39132),SetBody:s(57772),Sleep:s(38083),Static:s(90556),Transform:s(85436),Velocity:s(42081)}},85608:n=>{n.exports="afteradd"},1213:n=>{n.exports="afterremove"},25968:n=>{n.exports="afterupdate"},67205:n=>{n.exports="beforeadd"},39438:n=>{n.exports="beforeremove"},44823:n=>{n.exports="beforeupdate"},92593:n=>{n.exports="collisionactive"},60128:n=>{n.exports="collisionend"},76861:n=>{n.exports="collisionstart"},92362:n=>{n.exports="dragend"},76408:n=>{n.exports="drag"},93971:n=>{n.exports="dragstart"},5656:n=>{n.exports="pause"},47861:n=>{n.exports="resume"},79099:n=>{n.exports="sleepend"},35906:n=>{n.exports="sleepstart"},1121:(n,a,s)=>{n.exports={AFTER_ADD:s(85608),AFTER_REMOVE:s(1213),AFTER_UPDATE:s(25968),BEFORE_ADD:s(67205),BEFORE_REMOVE:s(39438),BEFORE_UPDATE:s(44823),COLLISION_ACTIVE:s(92593),COLLISION_END:s(60128),COLLISION_START:s(76861),DRAG_END:s(92362),DRAG:s(76408),DRAG_START:s(93971),PAUSE:s(5656),RESUME:s(47861),SLEEP_END:s(79099),SLEEP_START:s(35906)}},3875:(n,a,s)=>{n.exports={BodyBounds:s(68174),Components:s(31884),Events:s(1121),Factory:s(28137),MatterGameObject:s(75803),Image:s(23181),Matter:s(19933),MatterPhysics:s(42045),PolyDecomp:s(55973),Sprite:s(34803),TileBody:s(73834),PhysicsEditorParser:s(19496),PhysicsJSONParser:s(85791),PointerConstraint:s(98713),World:s(68243)}},22562:(n,a,s)=>{var o={};n.exports=o;var d=s(41598),l=s(31725),c=s(53614),h=s(53402),u=s(15647),f=s(66615);(function(){o._timeCorrection=!0,o._inertiaScale=4,o._nextCollidingGroupId=1,o._nextNonCollidingGroupId=-1,o._nextCategory=1,o._baseDelta=16.666666666666668,o.create=function(m){var g={id:h.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:m.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!m.hasOwnProperty("position")&&m.hasOwnProperty("vertices")?m.position=d.centre(m.vertices):m.hasOwnProperty("vertices")||(g.vertices=d.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var v=h.extend(g,m);return p(v,m),v.setOnCollideWith=function(y,x){return x?this.onCollideWith[y.id]=x:delete this.onCollideWith[y.id],this},v},o.nextGroup=function(m){return m?o._nextNonCollidingGroupId--:o._nextCollidingGroupId++},o.nextCategory=function(){return o._nextCategory=o._nextCategory<<1,o._nextCategory};var p=function(m,g){if(g=g||{},o.set(m,{bounds:m.bounds||u.create(m.vertices),positionPrev:m.positionPrev||l.clone(m.position),anglePrev:m.anglePrev||m.angle,vertices:m.vertices,parts:m.parts||[m],isStatic:m.isStatic,isSleeping:m.isSleeping,parent:m.parent||m}),d.rotate(m.vertices,m.angle,m.position),f.rotate(m.axes,m.angle),u.update(m.bounds,m.vertices,m.velocity),o.set(m,{axes:g.axes||m.axes,area:g.area||m.area,mass:g.mass||m.mass,inertia:g.inertia||m.inertia}),m.parts.length===1){var v=m.bounds,y=m.centerOfMass,x=m.centerOffset,b=v.max.x-v.min.x,_=v.max.y-v.min.y;y.x=-(v.min.x-m.position.x)/b,y.y=-(v.min.y-m.position.y)/_,x.x=b*y.x,x.y=_*y.y}};o.set=function(m,g,v){var y;typeof g=="string"&&(y=g,g={},g[y]=v);for(y in g)if(Object.prototype.hasOwnProperty.call(g,y))switch(v=g[y],y){case"isStatic":o.setStatic(m,v);break;case"isSleeping":c.set(m,v);break;case"mass":o.setMass(m,v);break;case"density":o.setDensity(m,v);break;case"inertia":o.setInertia(m,v);break;case"vertices":o.setVertices(m,v);break;case"position":o.setPosition(m,v);break;case"angle":o.setAngle(m,v);break;case"velocity":o.setVelocity(m,v);break;case"angularVelocity":o.setAngularVelocity(m,v);break;case"speed":o.setSpeed(m,v);break;case"angularSpeed":o.setAngularSpeed(m,v);break;case"parts":o.setParts(m,v);break;case"centre":o.setCentre(m,v);break;default:m[y]=v}},o.setStatic=function(m,g){for(var v=0;v0&&l.rotateAbout(b.position,y,m.position,b.position)}},o.setVelocity=function(m,g){var v=m.deltaTime/o._baseDelta;m.positionPrev.x=m.position.x-g.x*v,m.positionPrev.y=m.position.y-g.y*v,m.velocity.x=(m.position.x-m.positionPrev.x)/v,m.velocity.y=(m.position.y-m.positionPrev.y)/v,m.speed=l.magnitude(m.velocity)},o.getVelocity=function(m){var g=o._baseDelta/m.deltaTime;return{x:(m.position.x-m.positionPrev.x)*g,y:(m.position.y-m.positionPrev.y)*g}},o.getSpeed=function(m){return l.magnitude(o.getVelocity(m))},o.setSpeed=function(m,g){o.setVelocity(m,l.mult(l.normalise(o.getVelocity(m)),g))},o.setAngularVelocity=function(m,g){var v=m.deltaTime/o._baseDelta;m.anglePrev=m.angle-g*v,m.angularVelocity=(m.angle-m.anglePrev)/v,m.angularSpeed=Math.abs(m.angularVelocity)},o.getAngularVelocity=function(m){return(m.angle-m.anglePrev)*o._baseDelta/m.deltaTime},o.getAngularSpeed=function(m){return Math.abs(o.getAngularVelocity(m))},o.setAngularSpeed=function(m,g){o.setAngularVelocity(m,h.sign(o.getAngularVelocity(m))*g)},o.translate=function(m,g,v){o.setPosition(m,l.add(m.position,g),v)},o.rotate=function(m,g,v,y){if(!v)o.setAngle(m,m.angle+g,y);else{var x=Math.cos(g),b=Math.sin(g),_=m.position.x-v.x,C=m.position.y-v.y;o.setPosition(m,{x:v.x+(_*x-C*b),y:v.y+(_*b+C*x)},y),o.setAngle(m,m.angle+g,y)}},o.scale=function(m,g,v,y){var x=0,b=0;y=y||m.position;for(var _=m.inertia===1/0,C=0;C0&&(x+=w.area,b+=w.inertia),w.position.x=y.x+(w.position.x-y.x)*g,w.position.y=y.y+(w.position.y-y.y)*v,u.update(w.bounds,w.vertices,m.velocity)}m.parts.length>1&&(m.area=x,m.isStatic||(o.setMass(m,m.density*x),o.setInertia(m,b))),m.circleRadius&&(g===v?m.circleRadius*=g:m.circleRadius=null),_&&o.setInertia(m,1/0)},o.update=function(m,g){g=(typeof g<"u"?g:16.666666666666668)*m.timeScale;var v=g*g,y=o._timeCorrection?g/(m.deltaTime||g):1,x=1-m.frictionAir*(g/h._baseDelta),b=(m.position.x-m.positionPrev.x)*y,_=(m.position.y-m.positionPrev.y)*y;m.velocity.x=b*x+m.force.x/m.mass*v,m.velocity.y=_*x+m.force.y/m.mass*v,m.positionPrev.x=m.position.x,m.positionPrev.y=m.position.y,m.position.x+=m.velocity.x,m.position.y+=m.velocity.y,m.deltaTime=g,m.angularVelocity=(m.angle-m.anglePrev)*x*y+m.torque/m.inertia*v,m.anglePrev=m.angle,m.angle+=m.angularVelocity,m.speed=l.magnitude(m.velocity),m.angularSpeed=Math.abs(m.angularVelocity);for(var C=0;C0&&(w.position.x+=m.velocity.x,w.position.y+=m.velocity.y),m.angularVelocity!==0&&(d.rotate(w.vertices,m.angularVelocity,m.position),f.rotate(w.axes,m.angularVelocity),C>0&&l.rotateAbout(w.position,m.angularVelocity,m.position,w.position)),u.update(w.bounds,w.vertices,m.velocity)}},o.updateVelocities=function(m){var g=o._baseDelta/m.deltaTime,v=m.velocity;v.x=(m.position.x-m.positionPrev.x)*g,v.y=(m.position.y-m.positionPrev.y)*g,m.speed=Math.sqrt(v.x*v.x+v.y*v.y),m.angularVelocity=(m.angle-m.anglePrev)*g,m.angularSpeed=Math.abs(m.angularVelocity)},o.applyForce=function(m,g,v){var y={x:g.x-m.position.x,y:g.y-m.position.y};m.force.x+=v.x,m.force.y+=v.y,m.torque+=y.x*v.y-y.y*v.x},o._totalProperties=function(m){for(var g={mass:0,area:0,inertia:0,centre:{x:0,y:0}},v=m.parts.length===1?0:1;v{var o={};n.exports=o;var d=s(35810),l=s(53402),c=s(15647),h=s(22562);(function(){o.create=function(u){return l.extend({id:l.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},u)},o.setModified=function(u,f,p,m){if(d.trigger(u,"compositeModified",u),u.isModified=f,f&&u.cache&&(u.cache.allBodies=null,u.cache.allConstraints=null,u.cache.allComposites=null),p&&u.parent&&o.setModified(u.parent,f,p,m),m)for(var g=0;g{var o={};n.exports=o;var d=s(69351);(function(){o.create=d.create,o.add=d.add,o.remove=d.remove,o.clear=d.clear,o.addComposite=d.addComposite,o.addBody=d.addBody,o.addConstraint=d.addConstraint})()},52284:(n,a,s)=>{var o={};n.exports=o;var d=s(41598),l=s(4506);(function(){var c=[],h={overlap:0,axis:null},u={overlap:0,axis:null};o.create=function(f,p){return{pair:null,collided:!1,bodyA:f,bodyB:p,parentA:f.parent,parentB:p.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},o.collides=function(f,p,m){if(o._overlapAxes(h,f.vertices,p.vertices,f.axes),h.overlap<=0||(o._overlapAxes(u,p.vertices,f.vertices,p.axes),u.overlap<=0))return null;var g=m&&m.table[l.id(f,p)],v;g?v=g.collision:(v=o.create(f,p),v.collided=!0,v.bodyA=f.id=0&&(S=-S,E=-E),x.x=S,x.y=E,b.x=-E,b.y=S,_.x=S*w,_.y=E*w,v.depth=w;var M=o._findSupports(f,p,x,1),R=0;if(d.contains(f.vertices,M[0])&&(C[R++]=M[0]),d.contains(f.vertices,M[1])&&(C[R++]=M[1]),R<2){var L=o._findSupports(p,f,x,-1);d.contains(p.vertices,L[0])&&(C[R++]=L[0]),R<2&&d.contains(p.vertices,L[1])&&(C[R++]=L[1])}return R===0&&(C[R++]=M[0]),v.supportCount=R,v},o._overlapAxes=function(f,p,m,g){var v=p.length,y=m.length,x=p[0].x,b=p[0].y,_=m[0].x,C=m[0].y,w=g.length,T=Number.MAX_VALUE,S=0,E,D,A,M,R,L;for(R=0;RV?V=M:Mz?z=M:M{var a={};n.exports=a,function(){a.create=function(s){return{vertex:s,normalImpulse:0,tangentImpulse:0}}}()},81388:(n,a,s)=>{var o={};n.exports=o;var d=s(53402),l=s(52284);(function(){o.create=function(c){var h={bodies:[],collisions:[],pairs:null};return d.extend(h,c)},o.setBodies=function(c,h){c.bodies=h.slice(0)},o.clear=function(c){c.bodies=[],c.collisions=[]},o.collisions=function(c){var h=c.pairs,u=c.bodies,f=u.length,p=o.canCollide,m=l.collides,g=c.collisions,v=0,y,x;for(u.sort(o._compareBoundsX),y=0;yC)break;if(!(wM.max.y)&&!(S&&(A.isStatic||A.isSleeping))&&p(b.collisionFilter,A.collisionFilter)){var R=A.parts.length;if(D&&R===1){var L=m(b,A,h);L&&(g[v++]=L)}else for(var I=E>1?1:0,O=R>1?1:0,N=I;NM.max.x||_.max.xM.max.y)){var L=m(H,V,h);L&&(g[v++]=L)}}}}}return g.length!==v&&(g.length=v),g},o.canCollide=function(c,h){return c.group===h.group&&c.group!==0?c.group>0:(c.mask&h.category)!==0&&(h.mask&c.category)!==0},o._compareBoundsX=function(c,h){return c.bounds.min.x-h.bounds.min.x}})()},4506:(n,a,s)=>{var o={};n.exports=o;var d=s(43424);(function(){o.create=function(l,c){var h=l.bodyA,u=l.bodyB,f={id:o.id(h,u),bodyA:h,bodyB:u,collision:l,contacts:[d.create(),d.create()],contactCount:0,separation:0,isActive:!0,isSensor:h.isSensor||u.isSensor,timeCreated:c,timeUpdated:c,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return o.update(f,l,c),f},o.update=function(l,c,h){var u=c.supports,f=c.supportCount,p=l.contacts,m=c.parentA,g=c.parentB;l.isActive=!0,l.timeUpdated=h,l.collision=c,l.separation=c.depth,l.inverseMass=m.inverseMass+g.inverseMass,l.friction=m.frictiong.frictionStatic?m.frictionStatic:g.frictionStatic,l.restitution=m.restitution>g.restitution?m.restitution:g.restitution,l.slop=m.slop>g.slop?m.slop:g.slop,l.contactCount=f,c.pair=l;var v=u[0],y=p[0],x=u[1],b=p[1];(b.vertex===v||y.vertex===x)&&(p[1]=y,p[0]=y=b,b=p[1]),y.vertex=v,b.vertex=x},o.setActive=function(l,c,h){c?(l.isActive=!0,l.timeUpdated=h):(l.isActive=!1,l.contactCount=0)},o.id=function(l,c){return l.id{var o={};n.exports=o;var d=s(4506),l=s(53402);(function(){o.create=function(c){return l.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},c)},o.update=function(c,h,u){var f=d.update,p=d.create,m=d.setActive,g=c.table,v=c.list,y=v.length,x=y,b=c.collisionStart,_=c.collisionEnd,C=c.collisionActive,w=h.length,T=0,S=0,E=0,D,A,M;for(M=0;M=u?v[x++]=A:(m(A,!1,u),A.collision.bodyA.sleepCounter>0&&A.collision.bodyB.sleepCounter>0?v[x++]=A:(_[S++]=A,delete g[A.id]));v.length!==x&&(v.length=x),b.length!==T&&(b.length=T),_.length!==S&&(_.length=S),C.length!==E&&(C.length=E)},o.clear=function(c){return c.table={},c.list.length=0,c.collisionStart.length=0,c.collisionActive.length=0,c.collisionEnd.length=0,c}})()},73296:(n,a,s)=>{var o={};n.exports=o;var d=s(31725),l=s(52284),c=s(15647),h=s(66280),u=s(41598);(function(){o.collides=function(f,p){for(var m=[],g=p.length,v=f.bounds,y=l.collides,x=c.overlaps,b=0;b{var o={};n.exports=o;var d=s(41598),l=s(53402),c=s(15647);(function(){o._restingThresh=2,o._restingThreshTangent=Math.sqrt(6),o._positionDampen=.9,o._positionWarming=.8,o._frictionNormalMultiplier=5,o._frictionMaxStatic=Number.MAX_VALUE,o.preSolvePosition=function(h){var u,f,p,m=h.length;for(u=0;uHe?(C=qe>0?qe:-qe,_=S.friction*(qe>0?1:-1)*m,_<-C?_=-C:_>C&&(_=C)):(_=qe,C=x);var Je=ie*R-re*M,Jt=oe*R-ve*M,Et=V/(O+D.inverseInertia*Je*Je+A.inverseInertia*Jt*Jt),Bt=(1+S.restitution)*ke*Et;if(_*=Et,ke0&&(W.normalImpulse=0),Bt=W.normalImpulse-Zi}if(qe<-v||qe>v)W.tangentImpulse=0;else{var Si=W.tangentImpulse;W.tangentImpulse+=_,W.tangentImpulse<-C&&(W.tangentImpulse=-C),W.tangentImpulse>C&&(W.tangentImpulse=C),_=W.tangentImpulse-Si}var ji=M*Bt+L*_,jt=R*Bt+I*_;D.isStatic||D.isSleeping||(D.positionPrev.x+=ji*D.inverseMass,D.positionPrev.y+=jt*D.inverseMass,D.anglePrev+=(ie*jt-re*ji)*D.inverseInertia),A.isStatic||A.isSleeping||(A.positionPrev.x-=ji*A.inverseMass,A.positionPrev.y-=jt*A.inverseMass,A.anglePrev-=(oe*jt-ve*ji)*A.inverseInertia)}}}}})()},48140:(n,a,s)=>{var o={};n.exports=o;var d=s(41598),l=s(31725),c=s(53614),h=s(15647),u=s(66615),f=s(53402);(function(){o._warming=.4,o._torqueDampen=1,o._minLength=1e-6,o.create=function(p){var m=p;m.bodyA&&!m.pointA&&(m.pointA={x:0,y:0}),m.bodyB&&!m.pointB&&(m.pointB={x:0,y:0});var g=m.bodyA?l.add(m.bodyA.position,m.pointA):m.pointA,v=m.bodyB?l.add(m.bodyB.position,m.pointB):m.pointB,y=l.magnitude(l.sub(g,v));m.length=typeof m.length<"u"?m.length:y,m.id=m.id||f.nextId(),m.label=m.label||"Constraint",m.type="constraint",m.stiffness=m.stiffness||(m.length>0?1:.7),m.damping=m.damping||0,m.angularStiffness=m.angularStiffness||0,m.angleA=m.bodyA?m.bodyA.angle:m.angleA,m.angleB=m.bodyB?m.bodyB.angle:m.angleB,m.plugin={};var x={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return m.length===0&&m.stiffness>.1?(x.type="pin",x.anchors=!1):m.stiffness<.9&&(x.type="spring"),m.render=f.extend(x,m.render),m},o.preSolveAll=function(p){for(var m=0;m=1||p.length===0,E=S?p.stiffness*m:p.stiffness*m*m,D=p.damping*m,A=l.mult(C,T*E),M=(g?g.inverseMass:0)+(v?v.inverseMass:0),R=(g?g.inverseInertia:0)+(v?v.inverseInertia:0),L=M+R,I,O,N,H,X;if(D>0){var V=l.create();N=l.div(C,w),X=l.sub(v&&l.sub(v.position,v.positionPrev)||V,g&&l.sub(g.position,g.positionPrev)||V),H=l.dot(N,X)}g&&!g.isStatic&&(O=g.inverseMass/M,g.constraintImpulse.x-=A.x*O,g.constraintImpulse.y-=A.y*O,g.position.x-=A.x*O,g.position.y-=A.y*O,D>0&&(g.positionPrev.x-=D*N.x*H*O,g.positionPrev.y-=D*N.y*H*O),I=l.cross(y,A)/L*o._torqueDampen*g.inverseInertia*(1-p.angularStiffness),g.constraintImpulse.angle-=I,g.angle-=I),v&&!v.isStatic&&(O=v.inverseMass/M,v.constraintImpulse.x+=A.x*O,v.constraintImpulse.y+=A.y*O,v.position.x+=A.x*O,v.position.y+=A.y*O,D>0&&(v.positionPrev.x+=D*N.x*H*O,v.positionPrev.y+=D*N.y*H*O),I=l.cross(x,A)/L*o._torqueDampen*v.inverseInertia*(1-p.angularStiffness),v.constraintImpulse.angle+=I,v.angle+=I)}}},o.postSolveAll=function(p){for(var m=0;m0&&(x.position.x+=v.x,x.position.y+=v.y),v.angle!==0&&(d.rotate(x.vertices,v.angle,g.position),u.rotate(x.axes,v.angle),y>0&&l.rotateAbout(x.position,v.angle,g.position,x.position)),h.update(x.bounds,x.vertices,g.velocity)}v.angle*=o._warming,v.x*=o._warming,v.y*=o._warming}}},o.pointAWorld=function(p){return{x:(p.bodyA?p.bodyA.position.x:0)+(p.pointA?p.pointA.x:0),y:(p.bodyA?p.bodyA.position.y:0)+(p.pointA?p.pointA.y:0)}},o.pointBWorld=function(p){return{x:(p.bodyB?p.bodyB.position.x:0)+(p.pointB?p.pointB.x:0),y:(p.bodyB?p.bodyB.position.y:0)+(p.pointB?p.pointB.y:0)}},o.currentLength=function(p){var m=(p.bodyA?p.bodyA.position.x:0)+(p.pointA?p.pointA.x:0),g=(p.bodyA?p.bodyA.position.y:0)+(p.pointA?p.pointA.y:0),v=(p.bodyB?p.bodyB.position.x:0)+(p.pointB?p.pointB.x:0),y=(p.bodyB?p.bodyB.position.y:0)+(p.pointB?p.pointB.y:0),x=m-v,b=g-y;return Math.sqrt(x*x+b*b)}})()},53402:(n,a,s)=>{var o={};n.exports=o,function(){o._baseDelta=16.666666666666668,o._nextId=0,o._seed=0,o._nowStartTime=+new Date,o._warnedOnce={},o._decomp=null,o.extend=function(l,c){var h,u,f;typeof c=="boolean"?(h=2,f=c):(h=1,f=!0);for(var p=h;p0;c--){var h=Math.floor(o.random()*(c+1)),u=l[c];l[c]=l[h],l[h]=u}return l},o.choose=function(l){return l[Math.floor(o.random()*l.length)]},o.isElement=function(l){return typeof HTMLElement<"u"?l instanceof HTMLElement:!!(l&&l.nodeType&&l.nodeName)},o.isArray=function(l){return Object.prototype.toString.call(l)==="[object Array]"},o.isFunction=function(l){return typeof l=="function"},o.isPlainObject=function(l){return typeof l=="object"&&l.constructor===Object},o.isString=function(l){return toString.call(l)==="[object String]"},o.clamp=function(l,c,h){return lh?h:l},o.sign=function(l){return l<0?-1:1},o.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-o._nowStartTime},o.random=function(l,c){return l=typeof l<"u"?l:0,c=typeof c<"u"?c:1,l+d()*(c-l)};var d=function(){return o._seed=(o._seed*9301+49297)%233280,o._seed/233280};o.colorToNumber=function(l){return l=l.replace("#",""),l.length==3&&(l=l.charAt(0)+l.charAt(0)+l.charAt(1)+l.charAt(1)+l.charAt(2)+l.charAt(2)),parseInt(l,16)},o.logLevel=1,o.log=function(){console&&o.logLevel>0&&o.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.info=function(){console&&o.logLevel>0&&o.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.warn=function(){console&&o.logLevel>0&&o.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.warnOnce=function(){var l=Array.prototype.slice.call(arguments).join(" ");o._warnedOnce[l]||(o.warn(l),o._warnedOnce[l]=!0)},o.deprecated=function(l,c,h){l[c]=o.chain(function(){o.warnOnce("\u{1F505} deprecated \u{1F505}",h)},l[c])},o.nextId=function(){return o._nextId++},o.indexOf=function(l,c){if(l.indexOf)return l.indexOf(c);for(var h=0;h{var o={};n.exports=o;var d=s(53614),l=s(66272),c=s(81388),h=s(99561),u=s(35810),f=s(69351),p=s(48140),m=s(53402),g=s(22562);(function(){o._deltaMax=16.666666666666668,o.create=function(v){v=v||{};var y={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},x=m.extend(y,v);return x.world=v.world||f.create({label:"World"}),x.pairs=v.pairs||h.create(),x.detector=v.detector||c.create(),x.detector.pairs=x.pairs,x.grid={buckets:[]},x.world.gravity=x.gravity,x.broadphase=x.grid,x.metrics={},x},o.update=function(v,y){var x=m.now(),b=v.world,_=v.detector,C=v.pairs,w=v.timing,T=w.timestamp,S;y>o._deltaMax&&m.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",o._deltaMax.toFixed(3),"ms."),y=typeof y<"u"?y:m._baseDelta,y*=w.timeScale,w.timestamp+=y,w.lastDelta=y;var E={timestamp:w.timestamp,delta:y};u.trigger(v,"beforeUpdate",E);var D=f.allBodies(b),A=f.allConstraints(b),M=f.allComposites(b);for(b.isModified&&(c.setBodies(_,D),f.setModified(b,!1,!1,!0)),v.enableSleeping&&d.update(D,y),o._bodiesApplyGravity(D,v.gravity),o.wrap(D,M),o.attractors(D),y>0&&o._bodiesUpdate(D,y),u.trigger(v,"beforeSolve",E),p.preSolveAll(D),S=0;S0&&u.trigger(v,"collisionStart",{pairs:C.collisionStart,timestamp:w.timestamp,delta:y});var L=m.clamp(20/v.positionIterations,0,1);for(l.preSolvePosition(C.list),S=0;S0&&u.trigger(v,"collisionActive",{pairs:C.collisionActive,timestamp:w.timestamp,delta:y}),C.collisionEnd.length>0&&u.trigger(v,"collisionEnd",{pairs:C.collisionEnd,timestamp:w.timestamp,delta:y}),o._bodiesClearForces(D),u.trigger(v,"afterUpdate",E),v.timing.lastElapsed=m.now()-x,v},o.merge=function(v,y){if(m.extend(v,y),y.world){v.world=y.world,o.clear(v);for(var x=f.allBodies(v.world),b=0;b0)for(var _=0;_{var o={};n.exports=o;var d=s(53402);(function(){o.on=function(l,c,h){for(var u=c.split(" "),f,p=0;p0){h||(h={}),u=c.split(" ");for(var v=0;v{var o={};n.exports=o;var d=s(73832),l=s(53402);(function(){o.name="matter-js",o.version="0.20.0",o.uses=[],o.used=[],o.use=function(){d.use(o,Array.prototype.slice.call(arguments))},o.before=function(c,h){return c=c.replace(/^Matter./,""),l.chainPathBefore(o,c,h)},o.after=function(c,h){return c=c.replace(/^Matter./,""),l.chainPathAfter(o,c,h)}})()},73832:(n,a,s)=>{var o={};n.exports=o;var d=s(53402);(function(){o._registry={},o.register=function(l){if(o.isPlugin(l)||d.warn("Plugin.register:",o.toString(l),"does not implement all required fields."),l.name in o._registry){var c=o._registry[l.name],h=o.versionParse(l.version).number,u=o.versionParse(c.version).number;h>u?(d.warn("Plugin.register:",o.toString(c),"was upgraded to",o.toString(l)),o._registry[l.name]=l):h-1},o.isFor=function(l,c){var h=l.for&&o.dependencyParse(l.for);return!l.for||c.name===h.name&&o.versionSatisfies(c.version,h.range)},o.use=function(l,c){if(l.uses=(l.uses||[]).concat(c||[]),l.uses.length===0){d.warn("Plugin.use:",o.toString(l),"does not specify any dependencies to install.");return}for(var h=o.dependencies(l),u=d.topologicalSort(h),f=[],p=0;p0&&!m.silent&&d.info(f.join(" "))},o.dependencies=function(l,c){var h=o.dependencyParse(l),u=h.name;if(c=c||{},!(u in c)){l=o.resolve(l)||l,c[u]=d.map(l.uses||[],function(p){o.isPlugin(p)&&o.register(p);var m=o.dependencyParse(p),g=o.resolve(p);return g&&!o.versionSatisfies(g.version,m.range)?(d.warn("Plugin.dependencies:",o.toString(g),"does not satisfy",o.toString(m),"used by",o.toString(h)+"."),g._warned=!0,l._warned=!0):g||(d.warn("Plugin.dependencies:",o.toString(p),"used by",o.toString(h),"could not be resolved."),l._warned=!0),m.name});for(var f=0;f=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;c.test(l)||d.warn("Plugin.versionParse:",l,"is not a valid version or range.");var h=c.exec(l),u=Number(h[4]),f=Number(h[5]),p=Number(h[6]);return{isRange:!!(h[1]||h[2]),version:h[3],range:l,operator:h[1]||h[2]||"",major:u,minor:f,patch:p,parts:[u,f,p],prerelease:h[7],number:u*1e8+f*1e4+p}},o.versionSatisfies=function(l,c){c=c||"*";var h=o.versionParse(c),u=o.versionParse(l);if(h.isRange){if(h.operator==="*"||l==="*")return!0;if(h.operator===">")return u.number>h.number;if(h.operator===">=")return u.number>=h.number;if(h.operator==="~")return u.major===h.major&&u.minor===h.minor&&u.patch>=h.patch;if(h.operator==="^")return h.major>0?u.major===h.major&&u.number>=h.number:h.minor>0?u.minor===h.minor&&u.patch>=h.patch:u.patch===h.patch}return l===c||l==="*"}})()},13037:(n,a,s)=>{var o={};n.exports=o;var d=s(35810),l=s(48413),c=s(53402);(function(){o._maxFrameDelta=66.66666666666667,o._frameDeltaFallback=16.666666666666668,o._timeBufferMargin=1.5,o._elapsedNextEstimate=1,o._smoothingLowerBound=.1,o._smoothingUpperBound=.9,o.create=function(u){var f={delta:16.666666666666668,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:33.333333333333336,lastUpdatesDeferred:0,enabled:!0},p=c.extend(f,u);return p.fps=0,p},o.run=function(u,f){return u.timeBuffer=o._frameDeltaFallback,function p(m){u.frameRequestId=o._onNextFrame(u,p),m&&u.enabled&&o.tick(u,f,m)}(),u},o.tick=function(u,f,p){var m=c.now(),g=u.delta,v=0,y=p-u.timeLastTick;if((!y||!u.timeLastTick||y>Math.max(o._maxFrameDelta,u.maxFrameTime))&&(y=u.frameDelta||o._frameDeltaFallback),u.frameDeltaSmoothing){u.frameDeltaHistory.push(y),u.frameDeltaHistory=u.frameDeltaHistory.slice(-u.frameDeltaHistorySize);var x=u.frameDeltaHistory.slice(0).sort(),b=u.frameDeltaHistory.slice(x.length*o._smoothingLowerBound,x.length*o._smoothingUpperBound),_=h(b);y=_||y}u.frameDeltaSnapping&&(y=1e3/Math.round(1e3/y)),u.frameDelta=y,u.timeLastTick=p,u.timeBuffer+=u.frameDelta,u.timeBuffer=c.clamp(u.timeBuffer,0,u.frameDelta+g*o._timeBufferMargin),u.lastUpdatesDeferred=0;var C=u.maxUpdates||Math.ceil(u.maxFrameTime/g),w={timestamp:f.timing.timestamp};d.trigger(u,"beforeTick",w),d.trigger(u,"tick",w);for(var T=c.now();g>0&&u.timeBuffer>=g*o._timeBufferMargin;){d.trigger(u,"beforeUpdate",w),l.update(f,g),d.trigger(u,"afterUpdate",w),u.timeBuffer-=g,v+=1;var S=c.now()-m,E=c.now()-T,D=S+o._elapsedNextEstimate*E/v;if(v>=C||D>u.maxFrameTime){u.lastUpdatesDeferred=Math.round(Math.max(0,u.timeBuffer/g-o._timeBufferMargin));break}}f.timing.lastUpdatesPerFrame=v,d.trigger(u,"afterTick",w),u.frameDeltaHistory.length>=100&&(u.lastUpdatesDeferred&&Math.round(u.frameDelta/g)>C?c.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):u.lastUpdatesDeferred&&c.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof u.isFixed<"u"&&c.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(u.deltaMin||u.deltaMax)&&c.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),u.fps!==0&&c.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},o.stop=function(u){o._cancelNextFrame(u)},o._onNextFrame=function(u,f){if(typeof window<"u"&&window.requestAnimationFrame)u.frameRequestId=window.requestAnimationFrame(f);else throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return u.frameRequestId},o._cancelNextFrame=function(u){if(typeof window<"u"&&window.cancelAnimationFrame)window.cancelAnimationFrame(u.frameRequestId);else throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.")};var h=function(u){for(var f=0,p=u.length,m=0;m{var o={};n.exports=o;var d=s(22562),l=s(35810),c=s(53402);(function(){o._motionWakeThreshold=.18,o._motionSleepThreshold=.08,o._minBias=.9,o.update=function(h,u){for(var f=u/c._baseDelta,p=o._motionSleepThreshold,m=0;m0&&g.motion=g.sleepThreshold/f&&o.set(g,!0)):g.sleepCounter>0&&(g.sleepCounter-=1)}},o.afterCollisions=function(h){for(var u=o._motionSleepThreshold,f=0;fu&&o.set(y,!1)}}}},o.set=function(h,u){var f=h.isSleeping;u?(h.isSleeping=!0,h.sleepCounter=h.sleepThreshold,h.positionImpulse.x=0,h.positionImpulse.y=0,h.positionPrev.x=h.position.x,h.positionPrev.y=h.position.y,h.anglePrev=h.angle,h.speed=0,h.angularSpeed=0,h.motion=0,f||l.trigger(h,"sleepStart")):(h.isSleeping=!1,h.sleepCounter=0,f&&l.trigger(h,"sleepEnd"))}})()},66280:(n,a,s)=>{var o={};n.exports=o;var d=s(41598),l=s(53402),c=s(22562),h=s(15647),u=s(31725);(function(){o.rectangle=function(f,p,m,g,v){v=v||{};var y={label:"Rectangle Body",position:{x:f,y:p},vertices:d.fromPath("L 0 0 L "+m+" 0 L "+m+" "+g+" L 0 "+g)};if(v.chamfer){var x=v.chamfer;y.vertices=d.chamfer(y.vertices,x.radius,x.quality,x.qualityMin,x.qualityMax),delete v.chamfer}return c.create(l.extend({},y,v))},o.trapezoid=function(f,p,m,g,v,y){y=y||{},v>=1&&l.warn("Bodies.trapezoid: slope parameter must be < 1."),v*=.5;var x=(1-v*2)*m,b=m*v,_=b+x,C=_+b,w;v<.5?w="L 0 0 L "+b+" "+-g+" L "+_+" "+-g+" L "+C+" 0":w="L 0 0 L "+_+" "+-g+" L "+C+" 0";var T={label:"Trapezoid Body",position:{x:f,y:p},vertices:d.fromPath(w)};if(y.chamfer){var S=y.chamfer;T.vertices=d.chamfer(T.vertices,S.radius,S.quality,S.qualityMin,S.qualityMax),delete y.chamfer}return c.create(l.extend({},T,y))},o.circle=function(f,p,m,g,v){g=g||{};var y={label:"Circle Body",circleRadius:m};v=v||25;var x=Math.ceil(Math.max(10,Math.min(v,m)));return x%2===1&&(x+=1),o.polygon(f,p,x,m,l.extend({},y,g))},o.polygon=function(f,p,m,g,v){if(v=v||{},m<3)return o.circle(f,p,g,v);for(var y=2*Math.PI/m,x="",b=y*.5,_=0;_0&&d.area(X)1?(w=c.create(l.extend({parts:T.slice(0)},g)),c.setPosition(w,{x:f,y:p}),w):T[0]},o.flagCoincidentParts=function(f,p){p===void 0&&(p=5);for(var m=0;m{var o={};n.exports=o;var d=s(69351),l=s(48140),c=s(53402),h=s(22562),u=s(66280);(function(){o.stack=function(f,p,m,g,v,y,x){for(var b=d.create({label:"Stack"}),_=f,C=p,w,T=0,S=0;SE&&(E=M),h.translate(A,{x:R*.5,y:M*.5}),_=A.bounds.max.x+v,d.addBody(b,A),w=A,T+=1}else _+=v}C+=E+y,_=f}return b},o.chain=function(f,p,m,g,v,y){for(var x=f.bodies,b=1;b0)for(b=0;b0&&(w=y[b-1+(x-1)*p],d.addConstraint(f,l.create(c.extend({bodyA:w,bodyB:C},v)))),g&&bE)){w=E-w;var A=w,M=m-1-w;if(!(CM)){S===1&&h.translate(T,{x:(C+(m%2===1?1:-1))*D,y:0});var R=T?C*D:0;return x(f+R+C*v,_,C,w,T,S)}}})},o.newtonsCradle=function(f,p,m,g,v){for(var y=d.create({label:"Newtons Cradle"}),x=0;x{var o={};n.exports=o;var d=s(31725),l=s(53402);(function(){o.fromVertices=function(c){for(var h={},u=0;u{var a={};n.exports=a,function(){a.create=function(s){var o={min:{x:0,y:0},max:{x:0,y:0}};return s&&a.update(o,s),o},a.update=function(s,o,d){s.min.x=1/0,s.max.x=-1/0,s.min.y=1/0,s.max.y=-1/0;for(var l=0;ls.max.x&&(s.max.x=c.x),c.xs.max.y&&(s.max.y=c.y),c.y0?s.max.x+=d.x:s.min.x+=d.x,d.y>0?s.max.y+=d.y:s.min.y+=d.y)},a.contains=function(s,o){return o.x>=s.min.x&&o.x<=s.max.x&&o.y>=s.min.y&&o.y<=s.max.y},a.overlaps=function(s,o){return s.min.x<=o.max.x&&s.max.x>=o.min.x&&s.max.y>=o.min.y&&s.min.y<=o.max.y},a.translate=function(s,o){s.min.x+=o.x,s.max.x+=o.x,s.min.y+=o.y,s.max.y+=o.y},a.shift=function(s,o){var d=s.max.x-s.min.x,l=s.max.y-s.min.y;s.min.x=o.x,s.max.x=o.x+d,s.min.y=o.y,s.max.y=o.y+l},a.wrap=function(s,o,d){var l=null,c=null;if(typeof o.min.x<"u"&&typeof o.max.x<"u"&&(s.min.x>o.max.x?l=o.min.x-s.max.x:s.max.xo.max.y?c=o.min.y-s.max.y:s.max.y{var o={};n.exports=o;var d=s(15647),l=s(53402);(function(){o.pathToVertices=function(c,h){typeof window<"u"&&!("SVGPathSeg"in window)&&l.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var u,f,p,m,g,v,y,x,b,_,C=[],w,T,S=0,E=0,D=0;h=h||15;var A=function(R,L,I){var O=I%2===1&&I>1;if(!b||R!=b.x||L!=b.y){b&&O?(w=b.x,T=b.y):(w=0,T=0);var N={x:w+R,y:T+L};(O||!b)&&(b=N),C.push(N),E=w+R,D=T+L}},M=function(R){var L=R.pathSegTypeAsLetter.toUpperCase();if(L!=="Z"){switch(L){case"M":case"L":case"T":case"C":case"S":case"Q":E=R.x,D=R.y;break;case"H":E=R.x;break;case"V":D=R.y;break}A(E,D,R.pathSegType)}};for(o._svgPathToAbsolute(c),p=c.getTotalLength(),v=[],u=0;u{var a={};n.exports=a,function(){a.create=function(s,o){return{x:s||0,y:o||0}},a.clone=function(s){return{x:s.x,y:s.y}},a.magnitude=function(s){return Math.sqrt(s.x*s.x+s.y*s.y)},a.magnitudeSquared=function(s){return s.x*s.x+s.y*s.y},a.rotate=function(s,o,d){var l=Math.cos(o),c=Math.sin(o);d||(d={});var h=s.x*l-s.y*c;return d.y=s.x*c+s.y*l,d.x=h,d},a.rotateAbout=function(s,o,d,l){var c=Math.cos(o),h=Math.sin(o);l||(l={});var u=d.x+((s.x-d.x)*c-(s.y-d.y)*h);return l.y=d.y+((s.x-d.x)*h+(s.y-d.y)*c),l.x=u,l},a.normalise=function(s){var o=a.magnitude(s);return o===0?{x:0,y:0}:{x:s.x/o,y:s.y/o}},a.dot=function(s,o){return s.x*o.x+s.y*o.y},a.cross=function(s,o){return s.x*o.y-s.y*o.x},a.cross3=function(s,o,d){return(o.x-s.x)*(d.y-s.y)-(o.y-s.y)*(d.x-s.x)},a.add=function(s,o,d){return d||(d={}),d.x=s.x+o.x,d.y=s.y+o.y,d},a.sub=function(s,o,d){return d||(d={}),d.x=s.x-o.x,d.y=s.y-o.y,d},a.mult=function(s,o){return{x:s.x*o,y:s.y*o}},a.div=function(s,o){return{x:s.x/o,y:s.y/o}},a.perp=function(s,o){return o=o===!0?-1:1,{x:o*-s.y,y:o*s.x}},a.neg=function(s){return{x:-s.x,y:-s.y}},a.angle=function(s,o){return Math.atan2(o.y-s.y,o.x-s.x)},a._temp=[a.create(),a.create(),a.create(),a.create(),a.create(),a.create()]}()},41598:(n,a,s)=>{var o={};n.exports=o;var d=s(31725),l=s(53402);(function(){o.create=function(c,h){for(var u=[],f=0;f0)return!1;m=g}return!0},o.scale=function(c,h,u,f){if(h===1&&u===1)return c;f=f||o.centre(c);for(var p,m,g=0;g=0?g-1:c.length-1],y=c[g],x=c[(g+1)%c.length],b=h[g0&&(h|=2),h===3)return!1;return h!==0?!0:null},o.hull=function(c){var h=[],u=[],f,p;for(c=c.slice(0),c.sort(function(m,g){var v=m.x-g.x;return v!==0?v:m.y-g.y}),p=0;p=2&&d.cross3(u[u.length-2],u[u.length-1],f)<=0;)u.pop();u.push(f)}for(p=c.length-1;p>=0;p-=1){for(f=c[p];h.length>=2&&d.cross3(h[h.length-2],h[h.length-1],f)<=0;)h.pop();h.push(f)}return h.pop(),u.pop(),h.concat(u)}})()},55973:n=>{n.exports={decomp:A,quickDecomp:I,isSimple:R,removeCollinearPoints:O,removeDuplicatePoints:N,makeCCW:x};function a(V,z,F){F=F||0;var k=[0,0],G,Z,J,W,q,ie,re;return G=V[1][1]-V[0][1],Z=V[0][0]-V[1][0],J=G*V[0][0]+Z*V[0][1],W=z[1][1]-z[0][1],q=z[0][0]-z[1][0],ie=W*z[0][0]+q*z[0][1],re=G*q-W*Z,H(re,0,F)||(k[0]=(q*J-Z*ie)/re,k[1]=(G*ie-W*J)/re),k}function s(V,z,F,k){var G=z[0]-V[0],Z=z[1]-V[1],J=k[0]-F[0],W=k[1]-F[1];if(J*Z-W*G===0)return!1;var q=(G*(F[1]-V[1])+Z*(V[0]-F[0]))/(J*Z-W*G),ie=(J*(V[1]-F[1])+W*(F[0]-V[0]))/(W*G-J*Z);return q>=0&&q<=1&&ie>=0&&ie<=1}function o(V,z,F){return(z[0]-V[0])*(F[1]-V[1])-(F[0]-V[0])*(z[1]-V[1])}function d(V,z,F){return o(V,z,F)>0}function l(V,z,F){return o(V,z,F)>=0}function c(V,z,F){return o(V,z,F)<0}function h(V,z,F){return o(V,z,F)<=0}var u=[],f=[];function p(V,z,F,k){if(k){var G=u,Z=f;G[0]=z[0]-V[0],G[1]=z[1]-V[1],Z[0]=F[0]-z[0],Z[1]=F[1]-z[1];var J=G[0]*Z[0]+G[1]*Z[1],W=Math.sqrt(G[0]*G[0]+G[1]*G[1]),q=Math.sqrt(Z[0]*Z[0]+Z[1]*Z[1]),ie=Math.acos(J/(W*q));return ieF[z][0])&&(z=k);return d(g(V,z-1),g(V,z),g(V,z+1))?!1:(b(V),!0)}function b(V){for(var z=[],F=V.length,k=0;k!==F;k++)z.push(V.pop());for(var k=0;k!==F;k++)V[k]=z[k]}function _(V,z){return c(g(V,z-1),g(V,z),g(V,z+1))}var C=[],w=[];function T(V,z,F){var k,G,Z=C,J=w;if(l(g(V,z+1),g(V,z),g(V,F))&&h(g(V,z-1),g(V,z),g(V,F)))return!1;G=m(g(V,z),g(V,F));for(var W=0;W!==V.length;++W)if(!((W+1)%V.length===z||W===z)&&l(g(V,z),g(V,F),g(V,W+1))&&h(g(V,z),g(V,F),g(V,W))&&(Z[0]=g(V,z),Z[1]=g(V,F),J[0]=g(V,W),J[1]=g(V,W+1),k=a(Z,J),m(g(V,z),k)0?M(V,z):[V]}function M(V,z){if(z.length===0)return[V];if(z instanceof Array&&z.length&&z[0]instanceof Array&&z[0].length===2&&z[0][0]instanceof Array){for(var F=[V],k=0;kZ)return console.warn("quickDecomp: max level ("+Z+") reached."),z;for(var ot=0;otye&&(ye+=V.length),_e=Number.MAX_VALUE,ye3&&k>=0;--k)p(g(V,k-1),g(V,k),g(V,k+1),z)&&(V.splice(k%V.length,1),F++);return F}function N(V,z){for(var F=V.length-1;F>=1;--F)for(var k=V[F],G=F-1;G>=0;--G)if(X(k,V[G],z)){V.splice(F,1);continue}}function H(V,z,F){return F=F||0,Math.abs(V-z)<=F}function X(V,z,F){return H(V[0],z[0],F)&&H(V[1],z[1],F)}},52018:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c){this.pluginManager=c,this.game=c.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});n.exports=d},42363:n=>{var a={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};n.exports=a},37277:n=>{var a={},s={},o={};o.register=function(d,l,c,h){h===void 0&&(h=!1),a[d]={plugin:l,mapping:c,custom:h}},o.registerCustom=function(d,l,c,h){s[d]={plugin:l,mapping:c,data:h}},o.hasCore=function(d){return a.hasOwnProperty(d)},o.hasCustom=function(d){return s.hasOwnProperty(d)},o.getCore=function(d){return a[d]},o.getCustom=function(d){return s[d]},o.getCustomClass=function(d){return s.hasOwnProperty(d)?s[d].plugin:null},o.remove=function(d){a.hasOwnProperty(d)&&delete a[d]},o.removeCustom=function(d){s.hasOwnProperty(d)&&delete s[d]},o.destroyCorePlugins=function(){for(var d in a)a.hasOwnProperty(d)&&delete a[d]},o.destroyCustomPlugins=function(){for(var d in s)s.hasOwnProperty(d)&&delete s[d]},n.exports=o},77332:(n,a,s)=>{var o=s(83419),d=s(8443),l=s(50792),c=s(74099),h=s(44603),u=s(39429),f=s(95540),p=s(37277),m=s(72905),g=new o({Extends:l,initialize:function(y){l.call(this),this.game=y,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],y.isBooted?this.boot():y.events.once(d.BOOT,this.boot,this)},boot:function(){var v,y,x,b,_,C,w,T=this.game.config,S=T.installGlobalPlugins;for(S=S.concat(this._pendingGlobal),v=0;v{var o=s(52018),d=s(83419),l=s(44594),c=new d({Extends:o,initialize:function(u,f,p){o.call(this,f),this.scene=u,this.systems=u.sys,this.pluginKey=p,u.sys.events.once(l.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});n.exports=c},18922:(n,a,s)=>{n.exports={BasePlugin:s(52018),DefaultPlugins:s(42363),PluginCache:s(37277),PluginManager:s(77332),ScenePlugin:s(45145)}},63595:()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(n){let a=performance.now(),s=this.getVideoPlaybackQuality(),o=this.mozPresentedFrames||this.mozPaintedFrames||s.totalVideoFrames-s.droppedVideoFrames,d=(l,c)=>{let h=this.getVideoPlaybackQuality(),u=this.mozPresentedFrames||this.mozPaintedFrames||h.totalVideoFrames-h.droppedVideoFrames;if(u>o){let f=this.mozFrameDelay||h.totalFrameDelay-s.totalFrameDelay||0,p=c-l;n(c,{presentationTime:c+f*1e3,expectedDisplayTime:c+p,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+p/1e3,presentedFrames:u,processingDuration:f}),delete this._rvfcpolyfillmap[a]}else this._rvfcpolyfillmap[a]=requestAnimationFrame(f=>d(c,f))};return this._rvfcpolyfillmap[a]=requestAnimationFrame(l=>d(a,l)),a},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(n){cancelAnimationFrame(this._rvfcpolyfillmap[n]),delete this._rvfcpolyfillmap[n]})},10312:n=>{n.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},29795:n=>{var a={DEFAULT:0,LINEAR:0,NEAREST:1};n.exports=a},68627:(n,a,s)=>{var o=s(19715),d=s(32880),l=s(83419),c=s(8054),h=s(50792),u=s(92503),f=s(56373),p=s(97480),m=s(69442),g=s(61340),v=new l({Extends:h,initialize:function(x){h.call(this);var b=x.config;this.config={clearBeforeRender:b.clearBeforeRender,backgroundColor:b.backgroundColor,antialias:b.antialias,roundPixels:b.roundPixels},this.game=x,this.type=c.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=x.canvas;var _={alpha:x.config.transparent,desynchronized:x.config.desynchronized,willReadFrequently:!1};this.gameContext=b.context?b.context:this.gameCanvas.getContext("2d",_),this.currentContext=this.gameContext,this.antialias=x.config.antialias,this.blendModes=f(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new g,this._tempMatrix2=new g,this._tempMatrix3=new g,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(m.READY,this.boot,this)},boot:function(){var y=this.game,x=y.scale.baseSize;this.width=x.width,this.height=x.height,this.isBooted=!0,y.scale.on(p.RESIZE,this.onResize,this),this.resize(x.width,x.height)},onResize:function(y,x){(x.width!==this.width||x.height!==this.height)&&this.resize(x.width,x.height)},resize:function(y,x){this.width=y,this.height=x,this.emit(u.RESIZE,y,x)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(y){return this.currentContext.globalCompositeOperation=y,this},setContext:function(y){return this.currentContext=y||this.gameContext,this},setAlpha:function(y){return this.currentContext.globalAlpha=y,this},preRender:function(){var y=this.gameContext,x=this.config,b=this.width,_=this.height;y.globalAlpha=1,y.globalCompositeOperation="source-over",y.setTransform(1,0,0,1,0,0),this.emit(u.PRE_RENDER_CLEAR),x.clearBeforeRender&&(y.clearRect(0,0,b,_),x.transparent||(y.fillStyle=x.backgroundColor.rgba,y.fillRect(0,0,b,_))),y.save(),this.drawCount=0,this.emit(u.PRE_RENDER)},render:function(y,x,b){var _=x.length;this.emit(u.RENDER,y,b);var C=b.x,w=b.y,T=b.width,S=b.height,E=b.renderToTexture?b.context:y.sys.context;E.save(),this.game.scene.customViewports&&(E.beginPath(),E.rect(C,w,T,S),E.clip()),b.emit(o.PRE_RENDER,b),this.currentContext=E;var D=b.mask;D&&D.preRenderCanvas(this,null,b._maskCamera),b.transparent||(E.fillStyle=b.backgroundColor.rgba,E.fillRect(C,w,T,S)),E.globalAlpha=b.alpha,E.globalCompositeOperation="source-over",this.drawCount+=_,b.renderToTexture&&b.emit(o.PRE_RENDER,b),b.matrix.copyToContext(E);for(var A=0;A<_;A++){var M=x[A];M.mask&&M.mask.preRenderCanvas(this,M,b),M.renderCanvas(this,M,b),M.mask&&M.mask.postRenderCanvas(this,M,b)}E.setTransform(1,0,0,1,0,0),E.globalCompositeOperation="source-over",E.globalAlpha=1,b.flashEffect.postRenderCanvas(E),b.fadeEffect.postRenderCanvas(E),b.dirty=!1,D&&D.postRenderCanvas(this),E.restore(),b.renderToTexture&&(b.emit(o.POST_RENDER,b),b.renderToGame&&y.sys.context.drawImage(b.canvas,C,w)),b.emit(o.POST_RENDER,b)},postRender:function(){var y=this.gameContext;y.restore(),this.emit(u.POST_RENDER);var x=this.snapshotState;x.callback&&(d(this.gameCanvas,x),x.callback=null)},snapshotCanvas:function(y,x,b,_,C,w,T,S,E){b===void 0&&(b=!1),this.snapshotArea(_,C,w,T,x,S,E);var D=this.snapshotState;return D.getPixel=b,d(y,D),D.callback=null,this},snapshot:function(y,x,b){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,y,x,b)},snapshotArea:function(y,x,b,_,C,w,T){var S=this.snapshotState;return S.callback=C,S.type=w,S.encoder=T,S.getPixel=!1,S.x=y,S.y=x,S.width=Math.min(b,this.gameCanvas.width),S.height=Math.min(_,this.gameCanvas.height),this},snapshotPixel:function(y,x,b){return this.snapshotArea(y,x,1,1,b),this.snapshotState.getPixel=!0,this},batchSprite:function(y,x,b,_){var C=b.alpha*y.alpha;if(C!==0){var w=this.currentContext,T=this._tempMatrix1,S=this._tempMatrix2,E=x.canvasData,D=E.x,A=E.y,M=x.cutWidth,R=x.cutHeight,L=x.customPivot,I=x.source.resolution,O=y.displayOriginX,N=y.displayOriginY,H=-O+x.x,X=-N+x.y;if(y.isCropped){var V=y._crop;(V.flipX!==y.flipX||V.flipY!==y.flipY)&&x.updateCropUVs(V,y.flipX,y.flipY),M=V.cw,R=V.ch,D=V.cx,A=V.cy,H=-O+V.x,X=-N+V.y,y.flipX&&(H>=0?H=-(H+M):H<0&&(H=Math.abs(H)-M)),y.flipY&&(X>=0?X=-(X+R):X<0&&(X=Math.abs(X)-R))}var z=1,F=1;y.flipX&&(L||(H+=-x.realWidth+O*2),z=-1),y.flipY&&(L||(X+=-x.realHeight+N*2),F=-1);var k=y.x,G=y.y;if(b.roundPixels&&(k=Math.floor(k),G=Math.floor(G)),S.applyITRS(k,G,y.rotation,y.scaleX*z,y.scaleY*F),T.copyFrom(b.matrix),_?(T.multiplyWithOffset(_,-b.scrollX*y.scrollFactorX,-b.scrollY*y.scrollFactorY),S.e=k,S.f=G):(S.e-=b.scrollX*y.scrollFactorX,S.f-=b.scrollY*y.scrollFactorY),T.multiply(S),b.renderRoundPixels&&(T.e=Math.floor(T.e+.5),T.f=Math.floor(T.f+.5)),w.save(),T.setToContext(w),w.globalCompositeOperation=this.blendModes[y.blendMode],w.globalAlpha=C,w.imageSmoothingEnabled=!x.source.scaleMode,y.mask&&y.mask.preRenderCanvas(this,y,b),M>0&&R>0){var Z=M/I,J=R/I;b.roundPixels&&(H=Math.floor(H+.5),X=Math.floor(X+.5),Z+=.5,J+=.5),w.drawImage(x.source.image,D,A,M,R,H,X,Z,J)}y.mask&&y.mask.postRenderCanvas(this,y,b),w.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});n.exports=v},55830:(n,a,s)=>{n.exports={CanvasRenderer:s(68627),GetBlendModes:s(56373),SetTransform:s(20926)}},56373:(n,a,s)=>{var o=s(10312),d=s(89289),l=function(){var c=[],h=d.supportNewBlendModes,u="source-over";return c[o.NORMAL]=u,c[o.ADD]="lighter",c[o.MULTIPLY]=h?"multiply":u,c[o.SCREEN]=h?"screen":u,c[o.OVERLAY]=h?"overlay":u,c[o.DARKEN]=h?"darken":u,c[o.LIGHTEN]=h?"lighten":u,c[o.COLOR_DODGE]=h?"color-dodge":u,c[o.COLOR_BURN]=h?"color-burn":u,c[o.HARD_LIGHT]=h?"hard-light":u,c[o.SOFT_LIGHT]=h?"soft-light":u,c[o.DIFFERENCE]=h?"difference":u,c[o.EXCLUSION]=h?"exclusion":u,c[o.HUE]=h?"hue":u,c[o.SATURATION]=h?"saturation":u,c[o.COLOR]=h?"color":u,c[o.LUMINOSITY]=h?"luminosity":u,c[o.ERASE]="destination-out",c[o.SOURCE_IN]="source-in",c[o.SOURCE_OUT]="source-out",c[o.SOURCE_ATOP]="source-atop",c[o.DESTINATION_OVER]="destination-over",c[o.DESTINATION_IN]="destination-in",c[o.DESTINATION_OUT]="destination-out",c[o.DESTINATION_ATOP]="destination-atop",c[o.LIGHTER]="lighter",c[o.COPY]="copy",c[o.XOR]="xor",c};n.exports=l},20926:(n,a,s)=>{var o=s(91296),d=function(l,c,h,u,f){var p=u.alpha*h.alpha;if(p<=0)return!1;var m=o(h,u,f).calc;return c.globalCompositeOperation=l.blendModes[h.blendMode],c.globalAlpha=p,c.save(),m.setToContext(c),c.imageSmoothingEnabled=h.frame?!h.frame.source.scaleMode:l.antialias,!0};n.exports=d},63899:n=>{n.exports="losewebgl"},6119:n=>{n.exports="postrender"},48070:n=>{n.exports="prerender"},15640:n=>{n.exports="render"},8912:n=>{n.exports="resize"},87124:n=>{n.exports="restorewebgl"},92503:(n,a,s)=>{n.exports={LOSE_WEBGL:s(63899),POST_RENDER:s(6119),PRE_RENDER:s(48070),RENDER:s(15640),RESIZE:s(8912),RESTORE_WEBGL:s(87124)}},36909:(n,a,s)=>{n.exports={Events:s(92503),Snapshot:s(89966)},n.exports.Canvas=s(55830),n.exports.WebGL=s(4159)},32880:(n,a,s)=>{var o=s(27919),d=s(40987),l=s(95540),c=function(h,u){var f=l(u,"callback"),p=l(u,"type","image/png"),m=l(u,"encoder",.92),g=Math.abs(Math.round(l(u,"x",0))),v=Math.abs(Math.round(l(u,"y",0))),y=Math.floor(l(u,"width",h.width)),x=Math.floor(l(u,"height",h.height)),b=l(u,"getPixel",!1);if(b){var _=h.getContext("2d",{willReadFrequently:!1}),C=_.getImageData(g,v,1,1),w=C.data;f.call(null,new d(w[0],w[1],w[2],w[3]))}else if(g!==0||v!==0||y!==h.width||x!==h.height){var T=o.createWebGL(this,y,x),S=T.getContext("2d",{willReadFrequently:!0});y>0&&x>0&&S.drawImage(h,g,v,y,x,0,0,y,x);var E=new Image;E.onerror=function(){f.call(null),o.remove(T)},E.onload=function(){f.call(null,E),o.remove(T)},E.src=T.toDataURL(p,m)}else{var D=new Image;D.onerror=function(){f.call(null)},D.onload=function(){f.call(null,D)},D.src=h.toDataURL(p,m)}};n.exports=c},88815:(n,a,s)=>{var o=s(27919),d=s(40987),l=s(95540),c=function(h,u){var f=h,p=l(u,"callback"),m=l(u,"type","image/png"),g=l(u,"encoder",.92),v=Math.abs(Math.round(l(u,"x",0))),y=Math.abs(Math.round(l(u,"y",0))),x=l(u,"getPixel",!1),b=l(u,"isFramebuffer",!1),_=b?l(u,"bufferWidth",1):f.drawingBufferWidth,C=b?l(u,"bufferHeight",1):f.drawingBufferHeight;if(x){var w=new Uint8Array(4),T=b?y:C-y;f.readPixels(v,T,1,1,f.RGBA,f.UNSIGNED_BYTE,w),p.call(null,new d(w[0],w[1],w[2],w[3]))}else{var S=Math.floor(l(u,"width",_)),E=Math.floor(l(u,"height",C)),D=S*E*4,A=new Uint8Array(D);f.readPixels(v,C-y-E,S,E,f.RGBA,f.UNSIGNED_BYTE,A);for(var M=o.createWebGL(this,S,E),R=M.getContext("2d",{willReadFrequently:!0}),L=R.getImageData(0,0,S,E),I=L.data,O=0;O{n.exports={Canvas:s(32880),WebGL:s(88815)}},7530:(n,a,s)=>{var o=s(83419),d=s(36060),l=s(90330),c=s(82264),h=s(95540),u=s(32302),f=s(63448),p=s(31302),m=s(58918),g=s(14811),v=s(92651),y=s(96569),x=s(56527),b=s(57516),_=s(43439),C=s(81041),w=s(12385),T=s(7589),S=s(95428),E=s(72905),D=new o({initialize:function(M){this.game=M.game,this.renderer=M,this.classes=new l([[d.UTILITY_PIPELINE,T],[d.MULTI_PIPELINE,b],[d.BITMAPMASK_PIPELINE,p],[d.SINGLE_PIPELINE,w],[d.ROPE_PIPELINE,C],[d.LIGHT_PIPELINE,y],[d.POINTLIGHT_PIPELINE,_],[d.MOBILE_PIPELINE,x]]),this.postPipelineClasses=new l,this.pipelines=new l,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(A,M,R){var L=this.renderer,I=this.renderTargets;this.frameInc=Math.floor(h(A,"frameInc",32));var O=L.width,N=L.height,H=this.game.config.disablePreFX,X=this.game.config.disablePostFX;if(X||this.postPipelineClasses.setAll([[String(g.BARREL),m.Barrel],[String(g.BLOOM),m.Bloom],[String(g.BLUR),m.Blur],[String(g.BOKEH),m.Bokeh],[String(g.CIRCLE),m.Circle],[String(g.COLOR_MATRIX),m.ColorMatrix],[String(g.DISPLACEMENT),m.Displacement],[String(g.GLOW),m.Glow],[String(g.GRADIENT),m.Gradient],[String(g.PIXELATE),m.Pixelate],[String(g.SHADOW),m.Shadow],[String(g.SHINE),m.Shine],[String(g.VIGNETTE),m.Vignette],[String(g.WIPE),m.Wipe]]),!H){this.classes.set(d.FX_PIPELINE,v);for(var V=Math.min(O,N),z=Math.ceil(V/this.frameInc),F=1;F=0;R--){var L=M[R];L.active&&L.preBatch(A)}}},postBatch:function(A){if(A.hasPostPipeline){this.flush();for(var M=A.postPipelines,R=0;R=0;R--){var L=M[R];L.active&&L.preBatch(A)}}},postBatchCamera:function(A){if(A.hasPostPipeline){this.flush();for(var M=A.postPipelines,R=0;Rthis.maxDimension)return this.targetIndex=M.length-R,M[this.targetIndex];var L=(f(A,this.frameInc,0,!0)-1)*R;return this.targetIndex=L,M[L]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});n.exports=D},32302:(n,a,s)=>{var o=s(83419),d=s(92503),l=new o({initialize:function(h,u,f,p,m,g,v,y,x){p===void 0&&(p=1),m===void 0&&(m=0),g===void 0&&(g=!0),v===void 0&&(v=!1),y===void 0&&(y=!0),x===void 0&&(x=!0),this.renderer=h,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=p,this.minFilter=m,this.autoClear=g,this.autoResize=!0,this.hasDepthBuffer=y,this.forceClamp=x,this.init(u,f),v?this.renderer.on(d.RESIZE,this.resize,this):this.autoResize=!1},init:function(c,h){var u=this.renderer;this.texture=u.createTextureFromSource(null,c,h,this.minFilter,this.forceClamp),this.framebuffer=u.createFramebuffer(c,h,this.texture,this.hasDepthBuffer),this.width=c,this.height=h},setAutoResize:function(c){return c&&!this.autoResize?(this.renderer.on(d.RESIZE,this.resize,this),this.autoResize=!0):!c&&this.autoResize&&(this.renderer.off(d.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(c,h){if(this.autoResize&&this.willResize(c,h)){var u=this.renderer;u.deleteFramebuffer(this.framebuffer),u.deleteTexture(this.texture),this.texture=u.createTextureFromSource(null,c,h,this.minFilter,this.forceClamp),this.framebuffer=u.createFramebuffer(c,h,this.texture,this.hasDepthBuffer),this.width=c,this.height=h}return this},willResize:function(c,h){return typeof c!="number"||typeof h!="number"?!1:(c=Math.round(c*this.scale),h=Math.round(h*this.scale),c=Math.max(c,1),h=Math.max(h,1),c!==this.width||h!==this.height)},bind:function(c,h,u){c===void 0&&(c=!1);var f=this.renderer;if(c&&f.flush(),h&&u&&this.resize(h,u),f.pushFramebuffer(this.framebuffer,!1,!1),c&&this.adjustViewport(),this.autoClear){var p=this.renderer.gl;p.clearColor(0,0,0,0),p.clear(p.COLOR_BUFFER_BIT)}f.clearStencilMask()},adjustViewport:function(){var c=this.renderer.gl;c.viewport(0,0,this.width,this.height),c.disable(c.SCISSOR_TEST)},clear:function(c,h,u,f){var p=this.renderer,m=p.gl;p.pushFramebuffer(this.framebuffer),c!==void 0&&h!==void 0&&u!==void 0&&f!==void 0?(m.enable(m.SCISSOR_TEST),m.scissor(c,h,u,f)):m.disable(m.SCISSOR_TEST),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT),p.popFramebuffer(),p.resetScissor()},unbind:function(c){c===void 0&&(c=!1);var h=this.renderer;return c&&h.flush(),h.popFramebuffer()},destroy:function(){var c=this.renderer;c.off(d.RESIZE,this.resize,this),c.deleteFramebuffer(this.framebuffer),c.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});n.exports=l},70554:n=>{n.exports={getTintFromFloats:function(a,s,o,d){var l=(a*255|0)&255,c=(s*255|0)&255,h=(o*255|0)&255,u=(d*255|0)&255;return(u<<24|l<<16|c<<8|h)>>>0},getTintAppendFloatAlpha:function(a,s){var o=(s*255|0)&255;return(o<<24|a)>>>0},getTintAppendFloatAlphaAndSwap:function(a,s){var o=(a>>16|0)&255,d=(a>>8|0)&255,l=(a|0)&255,c=(s*255|0)&255;return(c<<24|l<<16|d<<8|o)>>>0},getFloatsFromUintRGB:function(a){var s=(a>>16|0)&255,o=(a>>8|0)&255,d=(a|0)&255;return[s/255,o/255,d/255]},checkShaderMax:function(a,s){var o=Math.min(16,a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS));return!s||s===-1?o:Math.min(o,s)},parseFragmentShaderMaxTextures:function(a,s){if(!a)return"";for(var o="",d=0;d0&&(o+=` + else `),d{var o=s(83419),d=s(62644),l=s(50792),c=s(77085),h=s(95540),u=s(37867),f=s(92503),p=s(32302),m=s(70554),g=s(38683),v=new o({Extends:l,initialize:function(x){l.call(this);var b=x.game,_=b.renderer,C=_.gl;this.name=h(x,"name","WebGLPipeline"),this.game=b,this.renderer=_,this.manager,this.gl=C,this.view=b.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=h(x,"topology",C.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=h(x,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=x,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=h(x,"resizeUniform","")},boot:function(){var y,x=this.gl,b=this.config,_=this.renderer;this.isPostFX||(this.projectionMatrix=new u().identity());var C=this.renderTargets,w=h(b,"renderTarget",!1);typeof w=="boolean"&&w&&(w=1);var T=_.width,S=_.height;if(typeof w=="number")for(y=0;yO&&(O=I[y].vertexSize);var N=h(b,"batchSize",_.config.batchSize);this.vertexCapacity=N*6;var H=new ArrayBuffer(this.vertexCapacity*O);this.vertexData=H,this.bytes=new Uint8Array(H),this.vertexViewF32=new Float32Array(H),this.vertexViewU32=new Uint32Array(H);var X=h(b,"vertices",null);for(X?(this.vertexViewF32.set(X),this.vertexBuffer=_.createVertexBuffer(H,x.STATIC_DRAW)):this.vertexBuffer=_.createVertexBuffer(H.byteLength,x.DYNAMIC_DRAW),this.setVertexBuffer(),y=I.length-1;y>=0;y--)I[y].rebind();this.hasBooted=!0,_.on(f.RESIZE,this.resize,this),_.on(f.PRE_RENDER,this.onPreRender,this),_.on(f.RENDER,this.onRender,this),_.on(f.POST_RENDER,this.onPostRender,this),this.emit(c.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(y,x,b){var _=this.renderer;if(y!==this.currentShader||_.currentProgram!==this.currentShader.program){this.flush();var C=this.setVertexBuffer(b);C&&!x&&(x=!0),y.bind(x,!1),this.currentShader=y}return this},getShaderByName:function(y){for(var x=this.shaders,b=0;b-1&&(I=V.substring(20))}O&&N&&R.push(new g(this,I,O,N,d(H)))}this.shaders=R}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(y){return this.currentBatch={start:this.vertexCount,count:0,texture:[y],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=y,this.batch.push(this.currentBatch),0},addTextureToBatch:function(y){var x=this.currentBatch;x&&(x.texture.push(y),x.unit++,x.maxUnit++)},pushBatch:function(y){if(!this.currentBatch||this.forceZero&&y!==this.currentTexture)return this.createBatch(y);if(y===this.currentTexture)return this.currentUnit;var x=this.currentBatch,b=x.texture.indexOf(y);return b===-1?x.texture.length===this.renderer.maxTextures?this.createBatch(y):(x.unit++,x.maxUnit++,x.texture.push(y),this.currentUnit=x.unit,this.currentTexture=y,x.unit):(this.currentUnit=b,this.currentTexture=y,b)},setGameObject:function(y,x){return x===void 0&&(x=y.frame),this.pushBatch(x.source.glTexture)},shouldFlush:function(y){return y===void 0&&(y=0),this.vertexCount+y>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(y,x){(y!==this.width||x!==this.height)&&this.flush(),this.width=y,this.height=x;for(var b=this.renderTargets,_=0;_=0;b--){var _=x[b].rebind();(!y||_===y)&&(this.currentShader=_)}return this.activeTextures.length=0,this.emit(c.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var y=this.shaders,x=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,x&&this.setVertexBuffer();for(var b=0;b0){this.emit(c.BEFORE_FLUSH,this,y),this.onBeforeFlush(y);var x=this.gl,b=this.vertexCount,_=this.currentShader.vertexSize,C=this.topology;if(this.active){this.setVertexBuffer(),b===this.vertexCapacity?x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.DYNAMIC_DRAW):x.bufferSubData(x.ARRAY_BUFFER,0,this.bytes.subarray(0,b*_));var w,T,S,E=this.batch,D=this.activeTextures;if(this.forceZero)for(D[0]||x.activeTexture(x.TEXTURE0),w=0;w{var o=s(95428),d=s(72905),l=s(19715),c=s(83419),h=s(8054),u=s(50792),f=s(92503),p=s(50030),m=s(37867),g=s(29747),v=s(7530),y=s(32302),x=s(97480),b=s(69442),_=s(70554),C=s(88815),w=s(26128),T=s(1482),S=s(82751),E=s(84387),D=s(93567),A=s(57183),M=!1;if(0)var R;var L=new c({Extends:u,initialize:function(O){u.call(this);var N=O.config,H={alpha:N.transparent,desynchronized:N.desynchronized,depth:!0,antialias:N.antialiasGL,premultipliedAlpha:N.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:N.failIfMajorPerformanceCaveat,powerPreference:N.powerPreference,preserveDrawingBuffer:N.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:N.clearBeforeRender,antialias:N.antialias,backgroundColor:N.backgroundColor,contextCreation:H,roundPixels:N.roundPixels,maxTextures:N.maxTextures,maxTextureSize:N.maxTextureSize,batchSize:N.batchSize,maxLights:N.maxLights,mipmapFilter:N.mipmapFilter},this.game=O,this.type=h.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=O.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=g,this.contextRestoredHandler=g,this.previousContextLostHandler=g,this.previousContextRestoredHandler=g,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(I){var O,N=this.game,H=this.canvas,X=I.backgroundColor;if(M&&(this.spector=new R.Spector,this.spector.onCapture.add(this.onCapture.bind(this))),N.config.context?O=N.config.context:O=H.getContext("webgl",I.contextCreation)||H.getContext("experimental-webgl",I.contextCreation),!O||O.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=O,this.setExtensions(),this.setContextHandlers(),N.context=O;for(var V=0;V<=27;V++)this.blendModes.push({func:[O.ONE,O.ONE_MINUS_SRC_ALPHA],equation:O.FUNC_ADD});this.blendModes[1].func=[O.ONE,O.DST_ALPHA],this.blendModes[2].func=[O.DST_COLOR,O.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[O.ONE,O.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[O.ZERO,O.ONE_MINUS_SRC_ALPHA],equation:O.FUNC_REVERSE_SUBTRACT},this.glFormats=[O.BYTE,O.SHORT,O.UNSIGNED_BYTE,O.UNSIGNED_SHORT,O.FLOAT],this.glFuncMap={mat2:{func:O.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:O.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:O.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:O.uniform1f,length:1},"1fv":{func:O.uniform1fv,length:1},"1i":{func:O.uniform1i,length:1},"1iv":{func:O.uniform1iv,length:1},"2f":{func:O.uniform2f,length:2},"2fv":{func:O.uniform2fv,length:1},"2i":{func:O.uniform2i,length:2},"2iv":{func:O.uniform2iv,length:1},"3f":{func:O.uniform3f,length:3},"3fv":{func:O.uniform3fv,length:1},"3i":{func:O.uniform3i,length:3},"3iv":{func:O.uniform3iv,length:1},"4f":{func:O.uniform4f,length:4},"4fv":{func:O.uniform4fv,length:1},"4i":{func:O.uniform4i,length:4},"4iv":{func:O.uniform4iv,length:1}},(!I.maxTextures||I.maxTextures===-1)&&(I.maxTextures=O.getParameter(O.MAX_TEXTURE_IMAGE_UNITS)),I.maxTextureSize||(I.maxTextureSize=O.getParameter(O.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),O.disable(O.DEPTH_TEST),O.disable(O.CULL_FACE),O.enable(O.BLEND),O.clearColor(X.redGL,X.greenGL,X.blueGL,X.alphaGL);var z=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return z.indexOf(I.mipmapFilter)!==-1&&(this.mipmapFilter=O[I.mipmapFilter]),this.maxTextures=_.checkShaderMax(O,I.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new v(this),this.setBlendMode(h.BlendModes.NORMAL),this.projectionMatrix=new m().identity(),N.textures.once(b.READY,this.boot,this),this},boot:function(){var I=this.game,O=this.pipelines,N=I.scale.baseSize,H=N.width,X=N.height;this.width=H,this.height=X,this.isBooted=!0,this.renderTarget=new y(this,H,X,1,0,!0,!0),this.maskTarget=new y(this,H,X,1,0,!0,!0),this.maskSource=new y(this,H,X,1,0,!0,!0);var V=I.config;O.boot(V.pipeline,V.defaultPipeline,V.autoMobilePipeline),this.blankTexture=I.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=I.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=I.textures.getFrame("__WHITE").glTexture;var z=this.gl;z.bindFramebuffer(z.FRAMEBUFFER,null),z.enable(z.SCISSOR_TEST),I.scale.on(x.RESIZE,this.onResize,this),this.resize(H,X)},setExtensions:function(){var I=this.gl,O=I.getSupportedExtensions();this.supportedExtensions=O;var N="ANGLE_instanced_arrays";this.instancedArraysExtension=O.indexOf(N)>-1?I.getExtension(N):null;var H="OES_vertex_array_object";this.vaoExtension=O.indexOf(H)>-1?I.getExtension(H):null},setContextHandlers:function(I,O){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),typeof I=="function"?this.contextLostHandler=I.bind(this):this.contextLostHandler=this.dispatchContextLost.bind(this),typeof O=="function"?this.contextRestoredHandler=O.bind(this):this.contextRestoredHandler=this.dispatchContextRestored.bind(this),this.canvas.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),this.previousContextLostHandler=this.contextLostHandler,this.previousContextRestoredHandler=this.contextRestoredHandler},dispatchContextLost:function(I){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(f.LOSE_WEBGL,this),I.preventDefault()},dispatchContextRestored:function(I){var O=this.gl;if(O.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}this.currentProgram=null,this.currentFramebuffer=null,this.setBlendMode(h.BlendModes.NORMAL),O.disable(O.BLEND),O.disable(O.DEPTH_TEST),O.enable(O.CULL_FACE),this.compression=this.getCompressedTextures();var N=function(H){H.createResource()};o(this.glTextureWrappers,N),o(this.glBufferWrappers,N),o(this.glFramebufferWrappers,N),o(this.glProgramWrappers,N),o(this.glAttribLocationWrappers,N),o(this.glUniformLocationWrappers,N),this.createTemporaryTextures(),this.pipelines.restoreContext(),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.setExtensions(),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(f.RESTORE_WEBGL,this),I.preventDefault()},createTemporaryTextures:function(){for(var I=this.gl,O=0;O0&&H>0;if(z&&F){var k=z[0],G=z[1],Z=z[2],J=z[3];F=k!==I||G!==O||Z!==N||J!==H}F&&(this.flush(),V.scissor(I,X-O-H,N,H))},resetScissor:function(){var I=this.gl;I.enable(I.SCISSOR_TEST);var O=this.currentScissor;if(O){var N=O[0],H=O[1],X=O[2],V=O[3];X>0&&V>0&&I.scissor(N,this.drawingBufferHeight-H-V,X,V)}},popScissor:function(){var I=this.scissorStack;I.pop();var O=I[I.length-1];O&&this.setScissor(O[0],O[1],O[2],O[3]),this.currentScissor=O},hasActiveStencilMask:function(){var I=this.currentMask.mask,O=this.currentCameraMask.mask;return I&&I.isStencil||O&&O.isStencil},resetViewport:function(){var I=this.gl;I.viewport(0,0,this.width,this.height),this.drawingBufferHeight=I.drawingBufferHeight},setBlendMode:function(I,O){O===void 0&&(O=!1);var N=this.gl,H=this.blendModes[I];return O||I!==h.BlendModes.SKIP_CHECK&&this.currentBlendMode!==I?(this.flush(),N.enable(N.BLEND),N.blendEquation(H.equation),H.func.length>2?N.blendFuncSeparate(H.func[0],H.func[1],H.func[2],H.func[3]):N.blendFunc(H.func[0],H.func[1]),this.currentBlendMode=I,!0):!1},addBlendMode:function(I,O){var N=this.blendModes.push({func:I,equation:O});return N-1},updateBlendMode:function(I,O,N){return this.blendModes[I]&&(this.blendModes[I].func=O,N&&(this.blendModes[I].equation=N)),this},removeBlendMode:function(I){return I>17&&this.blendModes[I]&&this.blendModes.splice(I,1),this},pushFramebuffer:function(I,O,N,H,X){return I===this.currentFramebuffer?this:(this.fboStack.push(I),this.setFramebuffer(I,O,N,H,X))},setFramebuffer:function(I,O,N,H,X){if(O===void 0&&(O=!1),N===void 0&&(N=!0),H===void 0&&(H=null),X===void 0&&(X=!1),I===this.currentFramebuffer)return this;var V=this.gl,z=this.width,F=this.height;return I&&I.renderTexture&&N?(z=I.renderTexture.width,F=I.renderTexture.height):this.flush(),I?V.bindFramebuffer(V.FRAMEBUFFER,I.webGLFramebuffer):V.bindFramebuffer(V.FRAMEBUFFER,null),N&&V.viewport(0,0,z,F),H&&V.framebufferTexture2D(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,V.TEXTURE_2D,H.webGLTexture,0),X&&(V.clearColor(0,0,0,0),V.clear(V.COLOR_BUFFER_BIT)),O&&(I?(this.drawingBufferHeight=F,this.pushScissor(0,0,z,F)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=I,this},popFramebuffer:function(I,O){I===void 0&&(I=!1),O===void 0&&(O=!0);var N=this.fboStack;N.pop();var H=N[N.length-1];return H||(H=null),this.setFramebuffer(H,I,O),H},restoreFramebuffer:function(I,O){I===void 0&&(I=!1),O===void 0&&(O=!0);var N=this.fboStack,H=N[N.length-1];H||(H=null),this.currentFramebuffer=null,this.setFramebuffer(H,I,O)},setProgram:function(I){return I!==this.currentProgram?(this.flush(),this.gl.useProgram(I.webGLProgram),this.currentProgram=I,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(I,O,N,H,X){X===void 0&&(X=!1);var V=this.gl,z=V.NEAREST,F=V.NEAREST,k=V.CLAMP_TO_EDGE,G=null;O=I?I.width:O,N=I?I.height:N;var Z=p(O,N);if(Z&&!X&&(k=V.REPEAT),H===h.ScaleModes.LINEAR&&this.config.antialias){var J=I&&I.compressed,W=!J&&Z||J&&I.mipmaps.length>1;z=this.mipmapFilter&&W?this.mipmapFilter:V.LINEAR,F=V.LINEAR}return!I&&typeof O=="number"&&typeof N=="number"?G=this.createTexture2D(0,z,F,k,k,V.RGBA,null,O,N):G=this.createTexture2D(0,z,F,k,k,V.RGBA,I),G},createTexture2D:function(I,O,N,H,X,V,z,F,k,G,Z,J){typeof F!="number"&&(F=z?z.width:1),typeof k!="number"&&(k=z?z.height:1);var W=new S(this.gl,I,O,N,H,X,V,z,F,k,G,Z,J);return this.glTextureWrappers.push(W),W},createFramebuffer:function(I,O,N,H){this.currentFramebuffer=null;var X=new E(this.gl,I,O,N,H);return this.glFramebufferWrappers.push(X),X},beginBitmapMask:function(I,O){var N=this.gl;N&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==I&&(this.currentMask.mask=I,this.currentMask.camera=O))},drawBitmapMask:function(I,O,N){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),I.renderWebGL(this,I,O),this.maskSource.unbind(!0),this.maskTarget.unbind();var H=this.gl,X=this.getCurrentStencilMask();X?(H.enable(H.STENCIL_TEST),X.mask.applyStencil(this,X.camera,!0)):this.currentMask.mask=null,this.pipelines.set(N),H.activeTexture(H.TEXTURE0),H.bindTexture(H.TEXTURE_2D,this.maskTarget.texture.webGLTexture),H.activeTexture(H.TEXTURE1),H.bindTexture(H.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(I,O){var N=new T(this.gl,I,O);return this.glProgramWrappers.push(N),N},createVertexBuffer:function(I,O){var N=this.gl,H=new w(N,I,N.ARRAY_BUFFER,O);return this.glBufferWrappers.push(H),H},createAttribLocation:function(I,O){var N=new D(this.gl,I,O);return this.glAttribLocationWrappers.push(N),N},createUniformLocation:function(I,O){var N=new A(this.gl,I,O);return this.glUniformLocationWrappers.push(N),N},createIndexBuffer:function(I,O){var N=this.gl,H=new w(N,I,N.ELEMENT_ARRAY_BUFFER,O);return this.glBufferWrappers.push(H),H},deleteTexture:function(I){if(I)return d(this.glTextureWrappers,I),I.destroy(),this},deleteFramebuffer:function(I){return I?(d(this.fboStack,I),d(this.glFramebufferWrappers,I),I.destroy(),this):this},deleteProgram:function(I){return I&&(d(this.glProgramWrappers,I),I.destroy()),this},deleteAttribLocation:function(I){return I&&(d(this.glAttribLocationWrappers,I),I.destroy()),this},deleteUniformLocation:function(I){return I&&(d(this.glUniformLocationWrappers,I),I.destroy()),this},deleteBuffer:function(I){return I?(d(this.glBufferWrappers,I),I.destroy(),this):this},preRenderCamera:function(I){var O=I.x,N=I.y,H=I.width,X=I.height,V=I.backgroundColor;if(I.emit(l.PRE_RENDER,I),this.pipelines.preBatchCamera(I),this.pushScissor(O,N,H,X),I.mask&&(this.currentCameraMask.mask=I.mask,this.currentCameraMask.camera=I._maskCamera,I.mask.preRenderWebGL(this,I,I._maskCamera)),V.alphaGL>0){var z=this.pipelines.setMulti();z.drawFillRect(O,N,H,X,_.getTintFromFloats(V.blueGL,V.greenGL,V.redGL,1),V.alphaGL)}},getCurrentStencilMask:function(){var I=null,O=this.maskStack,N=this.currentCameraMask;return O.length>0?I=O[O.length-1]:N.mask&&N.mask.isStencil&&(I=N),I},postRenderCamera:function(I){var O=I.flashEffect,N=I.fadeEffect;if(O.isRunning||N.isRunning||N.isComplete){var H=this.pipelines.setMulti();O.postRenderWebGL(H,_.getTintFromFloats),N.postRenderWebGL(H,_.getTintFromFloats)}I.dirty=!1,this.popScissor(),I.mask&&(this.currentCameraMask.mask=null,I.mask.postRenderWebGL(this,I._maskCamera)),this.pipelines.postBatchCamera(I),I.emit(l.POST_RENDER,I)},preRender:function(){if(!this.contextLost){var I=this.gl;if(I.bindFramebuffer(I.FRAMEBUFFER,null),this.emit(f.PRE_RENDER_CLEAR),this.config.clearBeforeRender){var O=this.config.backgroundColor;I.clearColor(O.redGL,O.greenGL,O.blueGL,O.alphaGL),I.clear(I.COLOR_BUFFER_BIT|I.DEPTH_BUFFER_BIT|I.STENCIL_BUFFER_BIT)}I.enable(I.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&I.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(f.PRE_RENDER)}},render:function(I,O,N){if(!this.contextLost){var H=O.length;if(this.emit(f.RENDER,I,N),this.preRenderCamera(N),H===0){this.setBlendMode(h.BlendModes.NORMAL),this.postRenderCamera(N);return}this.currentType="";for(var X=this.currentMask,V=0;V{var o=s(83419),d=s(95428),l=s(95540),c=s(14500),h=new o({initialize:function(f,p,m,g,v){this.pipeline=f,this.name=p,this.renderer=f.renderer,this.gl=this.renderer.gl,this.fragSrc=g,this.vertSrc=m,this.program=this.renderer.createProgram(m,g),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(v),this.createUniforms()},createAttributes:function(u){var f=0,p=0,m=[];this.vertexComponentCount=0;for(var g=0;g=0?(f.enableVertexAttribArray(E.webGLAttribLocation),f.vertexAttribPointer(E.webGLAttribLocation,b,_,S,m,C),x.enabled=!0,x.location=E):E.webGLAttribLocation!==-1&&f.disableVertexAttribArray(E.webGLAttribLocation)}else w?f.vertexAttribPointer(T.webGLAttribLocation,b,_,S,m,C):!w&&T!==-1&&T.webGLAttribLocation>-1&&(f.disableVertexAttribArray(T.webGLAttribLocation),x.location=-1)}return this},createUniforms:function(){var u=this.gl,f=this.program,p=this.uniforms,m,g,v,y=u.getProgramParameter(f.webGLProgram,u.ACTIVE_UNIFORMS);for(m=0;m0&&(g=g.substr(0,b),p.hasOwnProperty(g)||(v=this.renderer.createUniformLocation(f,g),v!==null&&(p[g]={name:g,location:v,setter:null,value1:null,value2:null,value3:null,value4:null})))}}return this},syncUniforms:function(){var u=this.gl;this.renderer.setProgram(this.program);for(var f in this.uniforms){var p=this.uniforms[f];p.setter&&p.setter.call(u,p.location.webGLUniformLocation,p.value1,p.value2,p.value3,p.value4)}},hasUniform:function(u){return this.uniforms.hasOwnProperty(u)},resetUniform:function(u){var f=this.uniforms[u];return f&&(f.value1=null,f.value2=null,f.value3=null,f.value4=null),this},setUniform1:function(u,f,p,m){var g=this.uniforms[f];return g?((m||g.value1!==p)&&(g.setter||(g.setter=u),g.value1=p,this.renderer.setProgram(this.program),u.call(this.gl,g.location.webGLUniformLocation,p),this.pipeline.currentShader=this),this):this},setUniform2:function(u,f,p,m,g){var v=this.uniforms[f];return v?((g||v.value1!==p||v.value2!==m)&&(v.setter||(v.setter=u),v.value1=p,v.value2=m,this.renderer.setProgram(this.program),u.call(this.gl,v.location.webGLUniformLocation,p,m),this.pipeline.currentShader=this),this):this},setUniform3:function(u,f,p,m,g,v){var y=this.uniforms[f];return y?((v||y.value1!==p||y.value2!==m||y.value3!==g)&&(y.setter||(y.setter=u),y.value1=p,y.value2=m,y.value3=g,this.renderer.setProgram(this.program),u.call(this.gl,y.location.webGLUniformLocation,p,m,g),this.pipeline.currentShader=this),this):this},setUniform4:function(u,f,p,m,g,v,y){var x=this.uniforms[f];return x?((y||x.value1!==p||x.value2!==m||x.value3!==g||x.value4!==v)&&(x.setter||(x.setter=u),x.value1=p,x.value2=m,x.value3=g,x.value4=v,this.renderer.setProgram(this.program),u.call(this.gl,x.location.webGLUniformLocation,p,m,g,v),this.pipeline.currentShader=this),this):this},setBoolean:function(u,f){return this.setUniform1(this.gl.uniform1i,u,Number(f))},set1f:function(u,f){return this.setUniform1(this.gl.uniform1f,u,f)},set2f:function(u,f,p){return this.setUniform2(this.gl.uniform2f,u,f,p)},set3f:function(u,f,p,m){return this.setUniform3(this.gl.uniform3f,u,f,p,m)},set4f:function(u,f,p,m,g){return this.setUniform4(this.gl.uniform4f,u,f,p,m,g)},set1fv:function(u,f){return this.setUniform1(this.gl.uniform1fv,u,f,!0)},set2fv:function(u,f){return this.setUniform1(this.gl.uniform2fv,u,f,!0)},set3fv:function(u,f){return this.setUniform1(this.gl.uniform3fv,u,f,!0)},set4fv:function(u,f){return this.setUniform1(this.gl.uniform4fv,u,f,!0)},set1iv:function(u,f){return this.setUniform1(this.gl.uniform1iv,u,f,!0)},set2iv:function(u,f){return this.setUniform1(this.gl.uniform2iv,u,f,!0)},set3iv:function(u,f){return this.setUniform1(this.gl.uniform3iv,u,f,!0)},set4iv:function(u,f){return this.setUniform1(this.gl.uniform4iv,u,f,!0)},set1i:function(u,f){return this.setUniform1(this.gl.uniform1i,u,f)},set2i:function(u,f,p){return this.setUniform2(this.gl.uniform2i,u,f,p)},set3i:function(u,f,p,m){return this.setUniform3(this.gl.uniform3i,u,f,p,m)},set4i:function(u,f,p,m,g){return this.setUniform4(this.gl.uniform4i,u,f,p,m,g)},setMatrix2fv:function(u,f,p){return this.setUniform2(this.gl.uniformMatrix2fv,u,f,p,!0)},setMatrix3fv:function(u,f,p){return this.setUniform2(this.gl.uniformMatrix3fv,u,f,p,!0)},setMatrix4fv:function(u,f,p){return this.setUniform2(this.gl.uniformMatrix4fv,u,f,p,!0)},createProgram:function(u,f){return u===void 0&&(u=this.vertSrc),f===void 0&&(f=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=u,this.fragSrc=f,this.program=this.renderer.createProgram(u,f),this.createUniforms(),this.rebind()},destroy:function(){var u=this.renderer;d(this.uniforms,function(f){u.deleteUniformLocation(f.location)}),this.uniforms=null,d(this.attributes,function(f){u.deleteAttribLocation(f.location)}),this.attributes=null,u.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});n.exports=h},14500:n=>{var a={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}};n.exports=a},4159:(n,a,s)=>{var o=s(14500),d=s(79291),l={PipelineManager:s(7530),Pipelines:s(96615),RenderTarget:s(32302),Utils:s(70554),WebGLPipeline:s(29100),WebGLRenderer:s(74797),WebGLShader:s(38683),Wrappers:s(9503)};l=d(!1,l,o),n.exports=l},31302:(n,a,s)=>{var o=s(83419),d=s(95540),l=s(78908),c=s(85191),h=s(14500),u=s(29100),f=new o({Extends:u,initialize:function(m){m.fragShader=d(m,"fragShader",l),m.vertShader=d(m,"vertShader",c),m.batchSize=d(m,"batchSize",1),m.vertices=d(m,"vertices",[-1,1,-1,-7,7,1]),m.attributes=d(m,"attributes",[{name:"inPosition",size:2,type:h.FLOAT}]),u.call(this,m)},boot:function(){u.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(p,m){u.prototype.resize.call(this,p,m),this.set2f("uResolution",p,m)},beginMask:function(p,m,g){this.renderer.beginBitmapMask(p,g)},endMask:function(p,m,g){var v=this.gl,y=this.renderer,x=p.bitmapMask;x&&v&&(y.drawBitmapMask(x,m,this),g&&this.set2f("uResolution",g.width,g.height),this.set1i("uInvertMaskAlpha",p.invertAlpha),v.drawArrays(this.topology,0,3),g&&this.set2f("uResolution",this.width,this.height),v.bindTexture(v.TEXTURE_2D,null))}});n.exports=f},92651:(n,a,s)=>{var o=s(83419),d=s(58918),l=s(14811),c=s(95540),h=s(43558),u=s(89350),f=s(70554),p=new o({Extends:h,initialize:function(g){g.shaders=[f.setGlowQuality(u.FXGlowFrag,g.game),u.FXShadowFrag,u.FXPixelateFrag,u.FXVignetteFrag,u.FXShineFrag,u.FXBlurLowFrag,u.FXBlurMedFrag,u.FXBlurHighFrag,u.FXGradientFrag,u.FXBloomFrag,u.ColorMatrixFrag,u.FXCircleFrag,u.FXBarrelFrag,u.FXDisplacementFrag,u.FXWipeFrag,u.FXBokehFrag],h.call(this,g);var v=this.game;this.glow=new d.Glow(v),this.shadow=new d.Shadow(v),this.pixelate=new d.Pixelate(v),this.vignette=new d.Vignette(v),this.shine=new d.Shine(v),this.gradient=new d.Gradient(v),this.circle=new d.Circle(v),this.barrel=new d.Barrel(v),this.wipe=new d.Wipe(v),this.bokeh=new d.Bokeh(v);var y=[];y[l.GLOW]=this.onGlow,y[l.SHADOW]=this.onShadow,y[l.PIXELATE]=this.onPixelate,y[l.VIGNETTE]=this.onVignette,y[l.SHINE]=this.onShine,y[l.BLUR]=this.onBlur,y[l.GRADIENT]=this.onGradient,y[l.BLOOM]=this.onBloom,y[l.COLOR_MATRIX]=this.onColorMatrix,y[l.CIRCLE]=this.onCircle,y[l.BARREL]=this.onBarrel,y[l.DISPLACEMENT]=this.onDisplacement,y[l.WIPE]=this.onWipe,y[l.BOKEH]=this.onBokeh,this.fxHandlers=y,this.source,this.target,this.swap},onDraw:function(m,g,v){this.source=m,this.target=g,this.swap=v;var y=m.width,x=m.height,b=this.tempSprite,_=this.fxHandlers;if(b&&b.preFX)for(var C=b.preFX.list,w=0;w{var o=s(83419),d=s(95540),l=s(31063),c=s(57516),h=s(61340),u=s(26099),f=s(29100),p=new o({Extends:c,initialize:function(g){var v=d(g,"fragShader",l);g.fragShader=v.replace("%LIGHT_COUNT%",g.game.renderer.config.maxLights),c.call(this,g),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new u,this._tempMatrix=new h,this._tempMatrix2=new h},boot:function(){f.prototype.boot.call(this)},onRender:function(m,g){var v=m.sys.lights;if(this.lightsActive=!1,!(!v||!v.active)){var y=v.getLights(g),x=y.length;this.lightsActive=!0;var b,_=this.renderer,C=_.height,w=g.matrix,T=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",g.x,g.y,g.rotation,g.zoom),this.set3f("uAmbientLightColor",v.ambientColor.r,v.ambientColor.g,v.ambientColor.b),this.set1i("uLightCount",x),b=0;b0&&this.flush();var g=this.inverseRotationMatrix;if(m){var v=-m,y=Math.cos(v),x=Math.sin(v);g[1]=x,g[3]=-x,g[0]=g[4]=y}else g[0]=g[4]=1,g[1]=g[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,g),this.currentNormalMapRotation=m}},setTexture2D:function(m,g){var v=this.renderer;m===void 0&&(m=v.whiteTexture);var y=this.getNormalMap(g);this.isNewNormalMap(m,y)&&(this.flush(),this.createBatch(m),this.addTextureToBatch(y),this.currentNormalMap=y);var x=0;if(g&&g.parentContainer){var b=g.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);x=b.rotationNormalized}else g&&(x=g.rotation);return this.currentBatch===null&&(this.createBatch(m),this.addTextureToBatch(y)),this.setNormalMapRotation(x),0},setGameObject:function(m,g){g===void 0&&(g=m.frame);var v=g.glTexture,y=this.getNormalMap(m);if(this.isNewNormalMap(v,y)&&(this.flush(),this.createBatch(v),this.addTextureToBatch(y),this.currentNormalMap=y),m.parentContainer){var x=m.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(x.rotationNormalized)}else this.setNormalMapRotation(m.rotation);return this.currentBatch===null&&(this.createBatch(v),this.addTextureToBatch(y)),0},isNewNormalMap:function(m,g){return this.currentTexture!==m||this.currentNormalMap!==g},getNormalMap:function(m){var g;if(m)m.displayTexture?g=m.displayTexture.dataSource[m.displayFrame.sourceIndex]:m.texture?g=m.texture.dataSource[m.frame.sourceIndex]:m.tileset&&(Array.isArray(m.tileset)?g=m.tileset[0].image.dataSource[0]:g=m.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return g?g.glTexture:this.renderer.normalTexture},batchSprite:function(m,g,v){this.lightsActive&&c.prototype.batchSprite.call(this,m,g,v)},batchTexture:function(m,g,v,y,x,b,_,C,w,T,S,E,D,A,M,R,L,I,O,N,H,X,V,z,F,k,G,Z,J,W,q,ie){this.lightsActive&&c.prototype.batchTexture.call(this,m,g,v,y,x,b,_,C,w,T,S,E,D,A,M,R,L,I,O,N,H,X,V,z,F,k,G,Z,J,W,q,ie)},batchTextureFrame:function(m,g,v,y,x,b,_){this.lightsActive&&c.prototype.batchTextureFrame.call(this,m,g,v,y,x,b,_)}});n.exports=p},56527:(n,a,s)=>{var o=s(83419),d=s(95540),l=s(57516),c=s(45561),h=s(60722),u=s(14500),f=s(29100),p=new o({Extends:l,initialize:function(g){g.fragShader=d(g,"fragShader",c),g.vertShader=d(g,"vertShader",h),g.attributes=d(g,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),g.forceZero=!0,g.resizeUniform="uResolution",l.call(this,g)},boot:function(){f.prototype.boot.call(this);var m=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",m.width,m.height)}});n.exports=p},57516:(n,a,s)=>{var o=s(83419),d=s(94811),l=s(95540),c=s(98840),h=s(44667),u=s(61340),f=s(70554),p=s(14500),m=s(29100),g=new o({Extends:m,initialize:function(y){var x=y.game.renderer,b=l(y,"fragShader",c);y.fragShader=f.parseFragmentShaderMaxTextures(b,x.maxTextures),y.vertShader=l(y,"vertShader",h),y.attributes=l(y,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:p.UNSIGNED_BYTE,normalized:!0}]),y.resizeUniform="uResolution",m.call(this,y),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.calcMatrix=new u,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){m.prototype.boot.call(this);var v=this.renderer;this.set1iv("uMainSampler",v.textureIndexes),this.set2f("uResolution",v.width,v.height)},batchSprite:function(v,y,x){this.manager.set(this,v);var b=this._tempMatrix1,_=this._tempMatrix2,C=this._tempMatrix3,w=v.frame,T=w.glTexture,S=w.u0,E=w.v0,D=w.u1,A=w.v1,M=w.x,R=w.y,L=w.cutWidth,I=w.cutHeight,O=w.customPivot,N=v.displayOriginX,H=v.displayOriginY,X=-N+M,V=-H+R;if(v.isCropped){var z=v._crop;(z.flipX!==v.flipX||z.flipY!==v.flipY)&&w.updateCropUVs(z,v.flipX,v.flipY),S=z.u0,E=z.v0,D=z.u1,A=z.v1,L=z.width,I=z.height,M=z.x,R=z.y,X=-N+M,V=-H+R}var F=1,k=1;v.flipX&&(O||(X+=-w.realWidth+N*2),F=-1),v.flipY&&(O||(V+=-w.realHeight+H*2),k=-1);var G=v.x,Z=v.y;y.roundPixels&&(G=Math.floor(G),Z=Math.floor(Z)),_.applyITRS(G,Z,v.rotation,v.scaleX*F,v.scaleY*k),b.copyFrom(y.matrix),x?(b.multiplyWithOffset(x,-y.scrollX*v.scrollFactorX,-y.scrollY*v.scrollFactorY),_.e=G,_.f=Z):(_.e-=y.scrollX*v.scrollFactorX,_.f-=y.scrollY*v.scrollFactorY),b.multiply(_,C);var J=C.setQuad(X,V,X+L,V+I,y.renderRoundPixels),W=f.getTintAppendFloatAlpha,q=y.alpha,ie=W(v.tintTopLeft,q*v._alphaTL),re=W(v.tintTopRight,q*v._alphaTR),oe=W(v.tintBottomLeft,q*v._alphaBL),ve=W(v.tintBottomRight,q*v._alphaBR);this.shouldFlush(6)&&this.flush();var _e=this.setGameObject(v,w);this.manager.preBatch(v),this.batchQuad(v,J[0],J[1],J[2],J[3],J[4],J[5],J[6],J[7],S,E,D,A,ie,re,oe,ve,v.tintFill,T,_e),this.manager.postBatch(v)},batchTexture:function(v,y,x,b,_,C,w,T,S,E,D,A,M,R,L,I,O,N,H,X,V,z,F,k,G,Z,J,W,q,ie,re,oe,ve){ve===void 0&&(ve=!1),this.manager.set(this,v);var _e=this._tempMatrix1,ye=this._tempMatrix2,xe=this._tempMatrix3,st=N/x+J,at=H/b+W,Ge=(N+X)/x+J,ke=(H+V)/b+W,qe=w,ot=T,Nt=-I,He=-O;if(v.isCropped){var Je=v._crop,Jt=Je.width,Et=Je.height;qe=Jt,ot=Et,w=Jt,T=Et,N=Je.x,H=Je.y;var Bt=N,Zi=H;A&&(Bt=X-Je.x-Jt),M&&(Zi=V-Je.y-Et),st=Bt/x+J,at=Zi/b+W,Ge=(Bt+Jt)/x+J,ke=(Zi+Et)/b+W,Nt=-I+N,He=-O+H}M=M^(!re&&y.isRenderTexture?1:0),A&&(qe*=-1,Nt+=w),M&&(ot*=-1,He+=T),q.roundPixels&&(_=Math.floor(_),C=Math.floor(C)),ye.applyITRS(_,C,D,S,E),_e.copyFrom(q.matrix),ie?(_e.multiplyWithOffset(ie,-q.scrollX*R,-q.scrollY*L),ye.e=_,ye.f=C):(ye.e-=q.scrollX*R,ye.f-=q.scrollY*L),_e.multiply(ye,xe);var Si=xe.setQuad(Nt,He,Nt+qe,He+ot,q.renderRoundPixels);oe==null&&(oe=this.setTexture2D(y)),v&&!ve&&this.manager.preBatch(v),this.batchQuad(v,Si[0],Si[1],Si[2],Si[3],Si[4],Si[5],Si[6],Si[7],st,at,Ge,ke,z,F,k,G,Z,y,oe),v&&!ve&&this.manager.postBatch(v)},batchTextureFrame:function(v,y,x,b,_,C,w){this.manager.set(this);var T=this._tempMatrix1.copyFrom(C),S=this._tempMatrix2;w?T.multiply(w,S):S=T;var E=S.setQuad(y,x,y+v.width,x+v.height),D=this.setTexture2D(v.source.glTexture);b=f.getTintAppendFloatAlpha(b,_),this.batchQuad(null,E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],v.u0,v.v0,v.u1,v.v1,b,b,b,b,0,v.glTexture,D)},batchFillRect:function(v,y,x,b,_,C){this.renderer.pipelines.set(this);var w=this.calcMatrix;C&&C.multiply(_,w);var T=w.setQuad(v,y,v+x,y+b),S=this.fillTint;this.batchQuad(null,T[0],T[1],T[2],T[3],T[4],T[5],T[6],T[7],0,0,1,1,S.TL,S.TR,S.BL,S.BR,2)},batchFillTriangle:function(v,y,x,b,_,C,w,T){this.renderer.pipelines.set(this);var S=this.calcMatrix;T&&T.multiply(w,S);var E=S.getX(v,y),D=S.getY(v,y),A=S.getX(x,b),M=S.getY(x,b),R=S.getX(_,C),L=S.getY(_,C),I=this.fillTint;this.batchTri(null,E,D,A,M,R,L,0,0,1,1,I.TL,I.TR,I.BL,2)},batchStrokeTriangle:function(v,y,x,b,_,C,w,T,S){var E=this.tempTriangle;E[0].x=v,E[0].y=y,E[0].width=w,E[1].x=x,E[1].y=b,E[1].width=w,E[2].x=_,E[2].y=C,E[2].width=w,E[3].x=v,E[3].y=y,E[3].width=w,this.batchStrokePath(E,w,!1,T,S)},batchFillPath:function(v,y,x){this.renderer.pipelines.set(this);var b=this.calcMatrix;x&&x.multiply(y,b);for(var _=v.length,C=this.polygonCache,w,T,S=this.fillTint.TL,E=this.fillTint.TR,D=this.fillTint.BL,A=0;A<_;++A)T=v[A],C.push(T.x,T.y);w=d(C),_=w.length;for(var M=0;M<_;M+=3){var R=w[M+0]*2,L=w[M+1]*2,I=w[M+2]*2,O=C[R+0],N=C[R+1],H=C[L+0],X=C[L+1],V=C[I+0],z=C[I+1],F=b.getX(O,N),k=b.getY(O,N),G=b.getX(H,X),Z=b.getY(H,X),J=b.getX(V,z),W=b.getY(V,z);this.batchTri(null,F,k,G,Z,J,W,0,0,1,1,S,E,D,2)}C.length=0},batchStrokePath:function(v,y,x,b,_){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var C=v.length-1,w=0;w0&&qe[4]?this.batchQuad(null,_e,ye,ie,re,qe[0],qe[1],qe[2],qe[3],0,0,1,1,st,at,Ge,ke,2):(ot[0]=_e,ot[1]=ye,ot[2]=ie,ot[3]=re,ot[4]=1),S&&ot[4]?this.batchQuad(null,W,q,oe,ve,ot[0],ot[1],ot[2],ot[3],0,0,1,1,st,at,Ge,ke,2):(qe[0]=W,qe[1]=q,qe[2]=oe,qe[3]=ve,qe[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,m.prototype.destroy.call(this),this}});n.exports=g},43439:(n,a,s)=>{var o=s(83419),d=s(95540),l=s(4127),c=s(89924),h=s(29100),u=new o({Extends:h,initialize:function(p){p.vertShader=d(p,"vertShader",c),p.fragShader=d(p,"fragShader",l),p.attributes=d(p,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),h.call(this,p)},onRender:function(f,p){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",p.zoom)},batchPointLight:function(f,p,m,g,v,y,x,b,_,C,w,T){var S=f.color,E=f.intensity,D=f.radius,A=f.attenuation,M=S.r*E,R=S.g*E,L=S.b*E,I=p.alpha*f.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(m,g,w,T,D,A,M,R,L,I),this.batchLightVert(v,y,w,T,D,A,M,R,L,I),this.batchLightVert(x,b,w,T,D,A,M,R,L,I),this.batchLightVert(m,g,w,T,D,A,M,R,L,I),this.batchLightVert(x,b,w,T,D,A,M,R,L,I),this.batchLightVert(_,C,w,T,D,A,M,R,L,I),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(f,p,m,g,v,y,x,b,_,C){var w=this.vertexViewF32,T=this.vertexCount*this.currentShader.vertexComponentCount-1;w[++T]=f,w[++T]=p,w[++T]=m,w[++T]=g,w[++T]=v,w[++T]=y,w[++T]=x,w[++T]=b,w[++T]=_,w[++T]=C,this.vertexCount++}});n.exports=u},84057:(n,a,s)=>{var o=s(83419),d=s(89422),l=s(95540),c=s(27681),h=s(49627),u=s(29100),f=new o({Extends:u,initialize:function(m){m.renderTarget=l(m,"renderTarget",1),m.fragShader=l(m,"fragShader",c),m.vertShader=l(m,"vertShader",h),m.attributes=l(m,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),m.batchSize=1,m.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],u.call(this,m),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new d,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){u.prototype.boot.call(this);var p=this.manager.UTILITY_PIPELINE;this.fullFrame1=p.fullFrame1,this.fullFrame2=p.fullFrame2,this.halfFrame1=p.halfFrame1,this.halfFrame2=p.halfFrame2;var m=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",m.width,m.height);for(var g=this.renderTargets,v=0;v{var o=s(10312),d=s(67502),l=s(83419),c=s(96293),h=s(95540),u=s(57516),f=s(27681),p=s(87841),m=s(32302),g=s(45561),v=s(60722),y=s(29100),x=new l({Extends:u,initialize:function(_){var C=h(_,"fragShader",f),w=h(_,"vertShader",v),T=h(_,"drawShader",f),S=[{name:"DrawSprite",fragShader:g,vertShader:v},{name:"CopySprite",fragShader:C,vertShader:w},{name:"DrawGame",fragShader:T,vertShader:v},{name:"ColorMatrix",fragShader:c}],E=h(_,"shaders",[]);_.shaders=S.concat(E),_.vertShader||(_.vertShader=w),_.batchSize=1,u.call(this,_),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new p,this.targetBounds=new p,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){y.prototype.boot.call(this);var b=this.shaders,_=this.renderer;this.drawSpriteShader=b[0],this.copyShader=b[1],this.gameShader=b[2],this.colorMatrixShader=b[3],this.fsTarget=new m(_,_.width,_.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var C=new ArrayBuffer(168);this.quadVertexData=C,this.quadVertexViewF32=new Float32Array(C),this.quadVertexBuffer=_.createVertexBuffer(C,this.gl.STATIC_DRAW),this.onResize(_.width,_.height),this.currentShader=this.copyShader,this.set2f("uResolution",_.width,_.height)},onResize:function(b,_){var C=this.quadVertexViewF32;C[1]=_,C[22]=_,C[14]=b,C[28]=b,C[35]=b,C[36]=_},batchQuad:function(b,_,C,w,T,S,E,D,A,M,R,L,I,O,N,H,X,V,z){var F=Math.min(_,w,S,D),k=Math.min(C,T,E,A),G=Math.max(_,w,S,D),Z=Math.max(C,T,E,A),J=G-F,W=Z-k,q=this.spriteBounds.setTo(F,k,J,W),ie=b?b.preFX.padding:0,re=J+ie*2,oe=W+ie*2,ve=Math.abs(Math.max(re,oe)),_e=this.manager.getRenderTarget(ve),ye=this.targetBounds.setTo(0,0,_e.width,_e.height);d(ye,Math.round(q.centerX),Math.round(q.centerY)),this.tempSprite=b;var xe=this.gl,st=this.renderer;st.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",st.width,st.height),this.flipProjectionMatrix(!0),b&&(this.onDrawSprite(b,_e),b.preFX.onFX(this));var at=this.fsTarget;return this.flush(),xe.viewport(0,0,st.width,st.height),xe.bindFramebuffer(xe.FRAMEBUFFER,at.framebuffer.webGLFramebuffer),xe.framebufferTexture2D(xe.FRAMEBUFFER,xe.COLOR_ATTACHMENT0,xe.TEXTURE_2D,at.texture.webGLTexture,0),xe.clearColor(0,0,0,0),xe.clear(xe.COLOR_BUFFER_BIT),this.setTexture2D(z),this.batchVert(_,C,M,R,0,V,O),this.batchVert(w,T,M,I,0,V,H),this.batchVert(S,E,L,I,0,V,X),this.batchVert(_,C,M,R,0,V,O),this.batchVert(S,E,L,I,0,V,X),this.batchVert(D,A,L,R,0,V,N),this.flush(),this.flipProjectionMatrix(!1),xe.activeTexture(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,_e.texture.webGLTexture),xe.copyTexSubImage2D(xe.TEXTURE_2D,0,0,0,ye.x,ye.y,ye.width,ye.height),xe.bindFramebuffer(xe.FRAMEBUFFER,null),xe.bindTexture(xe.TEXTURE_2D,null),this.onBatch(b),this.currentShader=this.copyShader,this.onDraw(_e,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(b,_,C,w,T,S,E){C===void 0&&(C=!0),w===void 0&&(w=!0),T===void 0&&(T=!1),E===void 0&&(E=this.copyShader);var D=this.gl,A=this.tempSprite;S&&(E=this.colorMatrixShader),this.currentShader=E;var M=this.setVertexBuffer(this.quadVertexBuffer);E.bind(M,!1);var R=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",R.width,R.height),A.preFX.onFXCopy(this),this.onCopySprite(b,_,A),S&&(this.set1fv("uColorMatrix",S.getData()),this.set1f("uAlpha",S.alpha)),D.activeTexture(D.TEXTURE0),D.bindTexture(D.TEXTURE_2D,b.texture.webGLTexture),b.height>_.height)D.viewport(0,0,b.width,b.height),this.setTargetUVs(b,_);else{var L=_.height-b.height;D.viewport(0,L,b.width,b.height),this.resetUVs()}if(D.bindFramebuffer(D.FRAMEBUFFER,_.framebuffer.webGLFramebuffer),D.framebufferTexture2D(D.FRAMEBUFFER,D.COLOR_ATTACHMENT0,D.TEXTURE_2D,_.texture.webGLTexture,0),C&&(D.clearColor(0,0,0,+!w),D.clear(D.COLOR_BUFFER_BIT)),T){var I=this.renderer.currentBlendMode;this.renderer.setBlendMode(o.ERASE)}D.bufferData(D.ARRAY_BUFFER,this.quadVertexData,D.STATIC_DRAW),D.drawArrays(D.TRIANGLES,0,6),T&&this.renderer.setBlendMode(I),D.bindFramebuffer(D.FRAMEBUFFER,null)},copy:function(b,_){var C=this.gl;this.set1i("uMainSampler",0),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,b.texture.webGLTexture),C.viewport(0,0,b.width,b.height),this.setUVs(0,0,0,1,1,1,1,0),C.bindFramebuffer(C.FRAMEBUFFER,_.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,_.texture.webGLTexture,0),C.clearColor(0,0,0,0),C.clear(C.COLOR_BUFFER_BIT),C.bufferData(C.ARRAY_BUFFER,this.quadVertexData,C.STATIC_DRAW),C.drawArrays(C.TRIANGLES,0,6),C.bindFramebuffer(C.FRAMEBUFFER,null)},blendFrames:function(b,_,C,w,T){this.manager.blendFrames(b,_,C,w,T)},blendFramesAdditive:function(b,_,C,w,T){this.manager.blendFramesAdditive(b,_,C,w,T)},drawToGame:function(b){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(b)},copyToGame:function(b){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(b)},bindAndDraw:function(b){var _=this.gl,C=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(b.texture);var w=this._tempMatrix1.loadIdentity(),T=this.targetBounds.x,S=this.targetBounds.y,E=T+b.width,D=S+b.height,A=w.getX(T,S),M=w.getX(T,D),R=w.getX(E,D),L=w.getX(E,S),I=w.getY(T,S),O=w.getY(T,D),N=w.getY(E,D),H=w.getY(E,S),X=16777215;this.batchVert(A,I,0,0,0,0,X),this.batchVert(M,O,0,1,0,0,X),this.batchVert(R,N,1,1,0,0,X),this.batchVert(A,I,0,0,0,0,X),this.batchVert(R,N,1,1,0,0,X),this.batchVert(L,H,1,0,0,0,X),C.restoreFramebuffer(!1,!0),C.currentFramebuffer||_.viewport(0,0,C.width,C.height),C.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(b){this.drawToGame(b)},setUVs:function(b,_,C,w,T,S,E,D){var A=this.quadVertexViewF32;A[2]=b,A[3]=_,A[9]=C,A[10]=w,A[16]=T,A[17]=S,A[23]=b,A[24]=_,A[30]=T,A[31]=S,A[37]=E,A[38]=D},setTargetUVs:function(b,_){var C=_.height/b.height;C>.5?C=.5-(C-.5):C=.5+(.5-C),this.setUVs(0,C,0,1+C,1,1+C,1,C)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,u.prototype.destroy.call(this),this}});n.exports=x},81041:(n,a,s)=>{var o=s(83419),d=s(95540),l=s(57516),c=new o({Extends:l,initialize:function(u){u.topology=5,u.batchSize=d(u,"batchSize",256),l.call(this,u)}});n.exports=c},12385:(n,a,s)=>{var o=s(83419),d=s(95540),l=s(57516),c=s(45561),h=s(60722),u=s(29100),f=new o({Extends:l,initialize:function(m){m.fragShader=d(m,"fragShader",c),m.vertShader=d(m,"vertShader",h),m.forceZero=!0,l.call(this,m)},boot:function(){u.prototype.boot.call(this);var p=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",p.width,p.height)}});n.exports=f},7589:(n,a,s)=>{var o=s(35407),d=s(10312),l=s(83419),c=s(89422),h=s(96293),u=s(36682),f=s(95540),p=s(48247),m=s(49627),g=s(29100),v=new l({Extends:g,initialize:function(x){x.renderTarget=f(x,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),x.vertShader=f(x,"vertShader",m),x.shaders=f(x,"shaders",[{name:"Copy",fragShader:u},{name:"AddBlend",fragShader:o},{name:"LinearBlend",fragShader:p},{name:"ColorMatrix",fragShader:h}]),x.attributes=f(x,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),x.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],x.batchSize=1,g.call(this,x),this.colorMatrix=new c,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){g.prototype.boot.call(this);var y=this.shaders,x=this.renderTargets;this.copyShader=y[0],this.addShader=y[1],this.linearShader=y[2],this.colorMatrixShader=y[3],this.fullFrame1=x[0],this.fullFrame2=x[1],this.halfFrame1=x[2],this.halfFrame2=x[3]},copyFrame:function(y,x,b,_,C){b===void 0&&(b=1),_===void 0&&(_=!0),C===void 0&&(C=!0);var w=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",b),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,y.texture.webGLTexture),x?(w.viewport(0,0,x.width,x.height),w.bindFramebuffer(w.FRAMEBUFFER,x.framebuffer.webGLFramebuffer),w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,x.texture.webGLTexture,0)):w.viewport(0,0,y.width,y.height),_&&(C?w.clearColor(0,0,0,0):w.clearColor(0,0,0,1),w.clear(w.COLOR_BUFFER_BIT)),w.bufferData(w.ARRAY_BUFFER,this.vertexData,w.STATIC_DRAW),w.drawArrays(w.TRIANGLES,0,6),w.bindFramebuffer(w.FRAMEBUFFER,null),w.bindTexture(w.TEXTURE_2D,null)},blitFrame:function(y,x,b,_,C,w,T){b===void 0&&(b=1),_===void 0&&(_=!0),C===void 0&&(C=!0),w===void 0&&(w=!1),T===void 0&&(T=!1);var S=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",b),S.activeTexture(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,y.texture.webGLTexture),y.height>x.height)S.viewport(0,0,y.width,y.height),this.setTargetUVs(y,x);else{var E=x.height-y.height;S.viewport(0,E,y.width,y.height)}if(S.bindFramebuffer(S.FRAMEBUFFER,x.framebuffer.webGLFramebuffer),S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_2D,x.texture.webGLTexture,0),_&&(C?S.clearColor(0,0,0,0):S.clearColor(0,0,0,1),S.clear(S.COLOR_BUFFER_BIT)),w){var D=this.renderer.currentBlendMode;this.renderer.setBlendMode(d.ERASE)}T&&this.flipY(),S.bufferData(S.ARRAY_BUFFER,this.vertexData,S.STATIC_DRAW),S.drawArrays(S.TRIANGLES,0,6),w&&this.renderer.setBlendMode(D),S.bindFramebuffer(S.FRAMEBUFFER,null),S.bindTexture(S.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(y,x,b,_,C,w,T,S){T===void 0&&(T=!0),S===void 0&&(S=!0);var E=this.gl;E.bindFramebuffer(E.FRAMEBUFFER,y.framebuffer.webGLFramebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,y.texture.webGLTexture,0),T&&(S?E.clearColor(0,0,0,0):E.clearColor(0,0,0,1),E.clear(E.COLOR_BUFFER_BIT)),E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,x.texture.webGLTexture),E.copyTexSubImage2D(E.TEXTURE_2D,0,0,0,b,_,C,w),E.bindFramebuffer(E.FRAMEBUFFER,null),E.bindTexture(E.TEXTURE_2D,null)},copyToGame:function(y){var x=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,y.texture.webGLTexture),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6)},drawFrame:function(y,x,b,_){b===void 0&&(b=!0),_===void 0&&(_=this.colorMatrix);var C=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",_.getData()),this.set1f("uAlpha",_.alpha),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,y.texture.webGLTexture),x?(C.viewport(0,0,x.width,x.height),C.bindFramebuffer(C.FRAMEBUFFER,x.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,x.texture.webGLTexture,0)):C.viewport(0,0,y.width,y.height),b?C.clearColor(0,0,0,0):C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT),C.bufferData(C.ARRAY_BUFFER,this.vertexData,C.STATIC_DRAW),C.drawArrays(C.TRIANGLES,0,6),C.bindFramebuffer(C.FRAMEBUFFER,null),C.bindTexture(C.TEXTURE_2D,null)},blendFrames:function(y,x,b,_,C,w){_===void 0&&(_=1),C===void 0&&(C=!0),w===void 0&&(w=this.linearShader);var T=this.gl;this.setShader(w),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",_),T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,y.texture.webGLTexture),T.activeTexture(T.TEXTURE1),T.bindTexture(T.TEXTURE_2D,x.texture.webGLTexture),b?(T.bindFramebuffer(T.FRAMEBUFFER,b.framebuffer.webGLFramebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,b.texture.webGLTexture,0),T.viewport(0,0,b.width,b.height)):T.viewport(0,0,y.width,y.height),C?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT),T.bufferData(T.ARRAY_BUFFER,this.vertexData,T.STATIC_DRAW),T.drawArrays(T.TRIANGLES,0,6),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null)},blendFramesAdditive:function(y,x,b,_,C){this.blendFrames(y,x,b,_,C,this.addShader)},clearFrame:function(y,x){x===void 0&&(x=!0);var b=this.gl;b.viewport(0,0,y.width,y.height),b.bindFramebuffer(b.FRAMEBUFFER,y.framebuffer.webGLFramebuffer),x?b.clearColor(0,0,0,0):b.clearColor(0,0,0,1),b.clear(b.COLOR_BUFFER_BIT);var _=this.renderer.currentFramebuffer;b.bindFramebuffer(b.FRAMEBUFFER,_.webGLFramebuffer)},setUVs:function(y,x,b,_,C,w,T,S){var E=this.vertexViewF32;E[2]=y,E[3]=x,E[6]=b,E[7]=_,E[10]=C,E[11]=w,E[14]=y,E[15]=x,E[18]=C,E[19]=w,E[22]=T,E[23]=S},setTargetUVs:function(y,x){var b=x.height/y.height;b>.5?b=.5-(b-.5):b=.5+(.5-b),this.setUVs(0,b,0,1+b,1,1+b,1,b)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});n.exports=v},36060:n=>{var a={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"};n.exports=a},84817:n=>{n.exports="pipelineafterflush"},36712:n=>{n.exports="pipelinebeforeflush"},40285:n=>{n.exports="pipelinebind"},65918:n=>{n.exports="pipelineboot"},92852:n=>{n.exports="pipelinedestroy"},56072:n=>{n.exports="pipelinerebind"},57566:n=>{n.exports="pipelineresize"},77085:(n,a,s)=>{n.exports={AFTER_FLUSH:s(84817),BEFORE_FLUSH:s(36712),BIND:s(40285),BOOT:s(65918),DESTROY:s(92852),REBIND:s(56072),RESIZE:s(57566)}},54812:(n,a,s)=>{var o=s(83419),d=s(99155),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.amount=1},onPreRender:function(h,u){h=this.getController(h),this.set1f("amount",h.amount,u)}});n.exports=c},67329:(n,a,s)=>{var o=s(83419),d=s(24400),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(h){h=this.getController(h),this.set1f("strength",h.blurStrength),this.set3fv("color",h.glcolor)},onDraw:function(h){var u=this.getController(),f=this.fullFrame1,p=this.fullFrame2;this.copyFrame(h,p);for(var m=2/h.width*u.offsetX,g=2/h.height*u.offsetY,v=0;v{var o=s(83419),d=s(41514),l=s(51078),c=s(94328),h=s(84057),u=new o({Extends:h,initialize:function(p){h.call(this,{game:p,shaders:[{name:"Gaussian5",fragShader:d},{name:"Gaussian9",fragShader:l},{name:"Gaussian13",fragShader:c}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(f){var p=this.getController(),m=this.gl,g=this.fullFrame1,v=m.getParameter(m.FRAMEBUFFER_BINDING);this.bind(this.shaders[p.quality]),m.activeTexture(m.TEXTURE0),m.viewport(0,0,f.width,f.height),this.set1i("uMainSampler",0),this.set2f("resolution",f.width,f.height),this.set1f("strength",p.strength),this.set3fv("color",p.glcolor);for(var y=0;y{var o=s(83419),d=s(90610),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(h,u,f,p){h=this.getController(h),this.set1f("radius",h.radius,u),this.set1f("amount",h.amount,u),this.set1f("contrast",h.contrast,u),this.set1f("strength",h.strength,u),this.set2f("blur",h.blurX,h.blurY,u),this.setBoolean("isTiltShift",h.isTiltShift,u),f&&p&&this.set2f("resolution",f,p,u)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});n.exports=c},89428:(n,a,s)=>{var o=s(83419),d=s(91899),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(h,u,f,p){h=this.getController(h),this.set1f("scale",h.scale,u),this.set1f("feather",h.feather,u),this.set1f("thickness",h.thickness,u),this.set3fv("color",h.glcolor,u),this.set4fv("backgroundColor",h.glcolor2,u),f&&p&&this.set2f("resolution",f,p,u)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});n.exports=c},88904:(n,a,s)=>{var o=s(83419),d=s(84057),l=new o({Extends:d,initialize:function(h){d.call(this,{game:h})},onDraw:function(c){var h=this.fullFrame1;this.controller?this.manager.drawFrame(c,h,!0,this.controller):this.drawFrame(c,h),this.copyToGame(h)}});n.exports=l},63563:(n,a,s)=>{var o=s(83419),d=s(47838),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(h){var u=this.game.textures.getFrame(h);u&&(this.glTexture=u.glTexture)},onDraw:function(h){var u=this.getController(),f=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",u.x,u.y),this.bindTexture(u.glTexture,1),this.copySprite(h,f),this.copyToGame(f)}});n.exports=c},94045:(n,a,s)=>{var o=s(83419),d=s(95540),l=s(98656),c=s(84057),h=s(70554),u=new o({Extends:c,initialize:function(p,m){var g=d(m,"quality",.1),v=d(m,"distance",10);c.call(this,{game:p,fragShader:h.setGlowQuality(l,p,g,v)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(f,p,m,g){f=this.getController(f),this.set1f("outerStrength",f.outerStrength,p),this.set1f("innerStrength",f.innerStrength,p),this.set4fv("glowColor",f.glcolor,p),this.setBoolean("knockout",f.knockout,p),m&&g&&this.set2f("resolution",m,g,p)},onDraw:function(f){this.set2f("resolution",f.width,f.height),this.bindAndDraw(f)}});n.exports=u},74088:(n,a,s)=>{var o=s(83419),d=s(70463),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(h,u){h=this.getController(h),this.set1f("alpha",h.alpha,u),this.set1i("size",h.size,u),this.set3fv("color1",h.glcolor1,u),this.set3fv("color2",h.glcolor2,u),this.set2f("positionFrom",h.fromX,h.fromY,u),this.set2f("positionTo",h.toX,h.toY,u)}});n.exports=c},99636:(n,a,s)=>{var o=s(83419),d=s(50831),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.amount=1},onPreRender:function(h,u,f,p){h=this.getController(h),this.set1f("amount",h.amount,u),f&&p&&this.set2f("resolution",f,p,u)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});n.exports=c},34700:(n,a,s)=>{var o=s(83419),d=s(92595),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(h,u){h=this.getController(h);var f=h.samples;this.set1i("samples",f,u),this.set1f("intensity",h.intensity,u),this.set1f("decay",h.decay,u),this.set1f("power",h.power/f,u),this.set2f("lightPosition",h.x,h.y,u),this.set4fv("color",h.glcolor,u)}});n.exports=c},91157:(n,a,s)=>{var o=s(83419),d=s(72464),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(h,u,f,p){h=this.getController(h),this.setTime("time",u),this.set1f("speed",h.speed,u),this.set1f("lineWidth",h.lineWidth,u),this.set1f("gradient",h.gradient,u),this.setBoolean("reveal",h.reveal,u),f&&p&&this.set2f("resolution",f,p,u)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});n.exports=c},27797:(n,a,s)=>{var o=s(83419),d=s(39249),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(h,u){h=this.getController(h),this.set1f("radius",h.radius,u),this.set1f("strength",h.strength,u),this.set2f("position",h.x,h.y,u)}});n.exports=c},67603:(n,a,s)=>{var o=s(83419),d=s(2878),l=s(84057),c=new o({Extends:l,initialize:function(u){l.call(this,{game:u,fragShader:d}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(h,u){h=this.getController(h);var f=h.progress,p=h.wipeWidth,m=h.direction,g=h.axis;this.set4f("config",f,p,m,g,u),this.setBoolean("reveal",h.reveal,u)}});n.exports=c},58918:(n,a,s)=>{var o={Barrel:s(54812),Bloom:s(67329),Blur:s(8861),Bokeh:s(51051),Circle:s(89428),ColorMatrix:s(88904),Displacement:s(63563),Glow:s(94045),Gradient:s(74088),Pixelate:s(99636),Shadow:s(34700),Shine:s(91157),Vignette:s(27797),Wipe:s(67603)};n.exports=o},96615:(n,a,s)=>{var o=s(36060),d=s(79291),l={FX:s(58918),BitmapMaskPipeline:s(31302),Events:s(77085),FXPipeline:s(92651),LightPipeline:s(96569),MobilePipeline:s(56527),MultiPipeline:s(57516),PointLightPipeline:s(43439),PostFXPipeline:s(84057),PreFXPipeline:s(43558),RopePipeline:s(81041),SinglePipeline:s(12385),UtilityPipeline:s(7589)};l=d(!1,l,o),n.exports=l},35407:n=>{n.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join(` +`)},78908:n=>{n.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join(` +`)},85191:n=>{n.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join(` +`)},96293:n=>{n.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join(` +`)},36682:n=>{n.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join(` +`)},99155:n=>{n.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(` +`)},24400:n=>{n.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join(` +`)},94328:n=>{n.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` +`)},41514:n=>{n.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` +`)},51078:n=>{n.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` +`)},90610:n=>{n.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join(` +`)},91899:n=>{n.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join(` +`)},47838:n=>{n.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join(` +`)},98656:n=>{n.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(` +`)},70463:n=>{n.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join(` +`)},50831:n=>{n.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join(` +`)},92595:n=>{n.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join(` +`)},72464:n=>{n.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join(` +`)},39249:n=>{n.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," col = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join(` +`)},2878:n=>{n.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join(` +`)},31063:n=>{n.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join(` +`)},48247:n=>{n.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join(` +`)},41214:n=>{n.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join(` +`)},39653:n=>{n.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join(` +`)},62143:n=>{n.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` +`)},47940:n=>{n.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)},98840:n=>{n.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` +`)},44667:n=>{n.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)},4127:n=>{n.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join(` +`)},89924:n=>{n.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join(` +`)},27681:n=>{n.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(` +`)},49627:n=>{n.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join(` +`)},45561:n=>{n.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` +`)},60722:n=>{n.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)},89350:(n,a,s)=>{n.exports={AddBlendFrag:s(35407),BitmapMaskFrag:s(78908),BitmapMaskVert:s(85191),ColorMatrixFrag:s(96293),CopyFrag:s(36682),FXBarrelFrag:s(99155),FXBloomFrag:s(24400),FXBlurHighFrag:s(94328),FXBlurLowFrag:s(41514),FXBlurMedFrag:s(51078),FXBokehFrag:s(90610),FXCircleFrag:s(91899),FXDisplacementFrag:s(47838),FXGlowFrag:s(98656),FXGradientFrag:s(70463),FXPixelateFrag:s(50831),FXShadowFrag:s(92595),FXShineFrag:s(72464),FXVignetteFrag:s(39249),FXWipeFrag:s(2878),LightFrag:s(31063),LinearBlendFrag:s(48247),MeshFrag:s(41214),MeshVert:s(39653),MobileFrag:s(62143),MobileVert:s(47940),MultiFrag:s(98840),MultiVert:s(44667),PointLightFrag:s(4127),PointLightVert:s(89924),PostFXFrag:s(27681),QuadVert:s(49627),SingleFrag:s(45561),SingleVert:s(60722)}},93567:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h,u){this.webGLAttribLocation=-1,this.gl=c,this.program=h,this.name=u,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLAttribLocation=-1;return}var l=this.gl;l.isContextLost()||(this.webGLAttribLocation=l.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});n.exports=d},26128:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h,u,f){this.webGLBuffer=null,this.gl=c,this.initialDataOrSize=h,this.bufferType=u,this.bufferUsage=f,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var l=this.gl;if(!l.isContextLost()){var c=this.bufferType,h=l.createBuffer();this.webGLBuffer=h,l.bindBuffer(c,this.webGLBuffer),l.bufferData(c,this.initialDataOrSize,this.bufferUsage),l.bindBuffer(c,null)}}},destroy:function(){var l=this.gl;l.isContextLost()||l.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});n.exports=d},84387:(n,a,s)=>{var o=s(83419),d={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},l=new o({initialize:function(h,u,f,p,m){this.webGLFramebuffer=null,this.gl=h,this.width=u,this.height=f,this.renderTexture=p,this.addDepthStencilBuffer=!!m,this.createResource()},createResource:function(){var c=this.gl;if(!c.isContextLost()){var h=this.renderTexture,u=0,f=c.createFramebuffer();if(this.webGLFramebuffer=f,c.bindFramebuffer(c.FRAMEBUFFER,f),h.isRenderTexture=!0,h.isAlphaPremultiplied=!1,c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,h.webGLTexture,0),u=c.checkFramebufferStatus(c.FRAMEBUFFER),u!==c.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(d[u]||u));if(this.addDepthStencilBuffer){var p=c.createRenderbuffer();c.bindRenderbuffer(c.RENDERBUFFER,p),c.renderbufferStorage(c.RENDERBUFFER,c.DEPTH_STENCIL,this.width,this.height),c.framebufferRenderbuffer(c.FRAMEBUFFER,c.DEPTH_STENCIL_ATTACHMENT,c.RENDERBUFFER,p)}c.bindFramebuffer(c.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var c=this.gl;if(!c.isContextLost()){c.bindFramebuffer(c.FRAMEBUFFER,this.webGLFramebuffer);var h=c.getFramebufferAttachmentParameter(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);h!==null&&(c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,null,0),c.deleteTexture(h));var u=c.getFramebufferAttachmentParameter(c.FRAMEBUFFER,c.DEPTH_STENCIL_ATTACHMENT,c.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);u!==null&&c.deleteRenderbuffer(u),c.bindFramebuffer(c.FRAMEBUFFER,null),c.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});n.exports=l},1482:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h,u){this.webGLProgram=null,this.gl=c,this.vertexSource=h,this.fragmentSource=u,this.createResource()},createResource:function(){var l=this.gl;if(!l.isContextLost()){var c=l.createProgram(),h=l.createShader(l.VERTEX_SHADER),u=l.createShader(l.FRAGMENT_SHADER);l.shaderSource(h,this.vertexSource),l.shaderSource(u,this.fragmentSource),l.compileShader(h),l.compileShader(u);var f=`Shader failed: +`;if(!l.getShaderParameter(h,l.COMPILE_STATUS))throw new Error("Vertex "+f+l.getShaderInfoLog(h));if(!l.getShaderParameter(u,l.COMPILE_STATUS))throw new Error("Fragment "+f+l.getShaderInfoLog(u));if(l.attachShader(c,h),l.attachShader(c,u),l.linkProgram(c),!l.getProgramParameter(c,l.LINK_STATUS))throw new Error("Link "+f+l.getProgramInfoLog(c));l.useProgram(c),this.webGLProgram=c}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});n.exports=d},82751:(n,a,s)=>{var o=s(83419),d=s(50030),l=new o({initialize:function(h,u,f,p,m,g,v,y,x,b,_,C,w){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=h,this.mipLevel=u,this.minFilter=f,this.magFilter=p,this.wrapT=m,this.wrapS=g,this.format=v,this.pixels=y,this.width=x,this.height=b,this.pma=_??!0,this.forceSize=!!C,this.flipY=!!w,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var c=this.gl;if(!c.isContextLost()){if(this.pixels instanceof l){this.webGLTexture=this.pixels.webGLTexture;return}var h=c.createTexture();h.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=h,this._processTexture()}},update:function(c,h,u,f,p,m,g,v,y){if(!(h===0||u===0)){this.pixels=c,this.width=h,this.height=u,this.flipY=f,this.wrapS=p,this.wrapT=m,this.minFilter=g,this.magFilter=v,this.format=y;var x=this.gl;x.isContextLost()||this._processTexture()}},_processTexture:function(){var c=this.gl;c.activeTexture(c.TEXTURE0);var h=c.getParameter(c.TEXTURE_BINDING_2D);c.bindTexture(c.TEXTURE_2D,this.webGLTexture),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,this.minFilter),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,this.magFilter),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,this.wrapS),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,this.wrapT),c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,this.flipY);var u=this.pixels,f=this.mipLevel,p=this.width,m=this.height,g=this.format,v=!1;if(u==null)c.texImage2D(c.TEXTURE_2D,f,g,p,m,0,g,c.UNSIGNED_BYTE,null),v=d(p,m);else if(u.compressed){p=u.width,m=u.height,v=u.generateMipmap;for(var y=0;y{var o=s(83419),d=new o({initialize:function(c,h,u){this.webGLUniformLocation=null,this.gl=c,this.program=h,this.name=u,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLUniformLocation=null;return}var l=this.gl;l.isContextLost()||(this.webGLUniformLocation=l.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});n.exports=d},9503:(n,a,s)=>{var o={WebGLAttribLocationWrapper:s(93567),WebGLBufferWrapper:s(26128),WebGLProgramWrapper:s(1482),WebGLTextureWrapper:s(82751),WebGLFramebufferWrapper:s(84387),WebGLUniformLocationWrapper:s(57183)};n.exports=o},76531:(n,a,s)=>{var o=s(13560),d=s(83419),l=s(50792),c=s(97480),h=s(8443),u=s(57811),f=s(74403),p=s(45818),m=s(29747),g=s(87841),v=s(86555),y=s(56583),x=s(26099),b=s(38058),_=new d({Extends:l,initialize:function(w){l.call(this),this.game=w,this.canvas,this.canvasBounds=new g,this.parent=null,this.parentIsWindow=!1,this.parentSize=new v,this.gameSize=new v,this.baseSize=new v,this.displaySize=new v,this.scaleMode=o.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new x(1,1),this.autoRound=!1,this.autoCenter=o.CENTER.NO_CENTER,this.orientation=o.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:m,windowResize:m,fullScreenChange:m,fullScreenError:m}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(h.BOOT,this.boot,this)},boot:function(){var C=this.game;this.canvas=C.canvas,this.fullscreen=C.device.fullscreen;var w=this.scaleMode;w!==o.SCALE_MODE.RESIZE&&w!==o.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(w),w===o.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),C.events.on(h.PRE_STEP,this.step,this),C.events.once(h.READY,this.refresh,this),C.events.once(h.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(C){this.getParent(C),this.getParentBounds();var w=C.width,T=C.height,S=C.scaleMode,E=C.zoom,D=C.autoRound;if(typeof w=="string")if(w.substr(-1)!=="%")w=parseInt(w,10);else{var A=this.parentSize.width;A===0&&(A=window.innerWidth);var M=parseInt(w,10)/100;w=Math.floor(A*M)}if(typeof T=="string")if(T.substr(-1)!=="%")T=parseInt(T,10);else{var R=this.parentSize.height;R===0&&(R=window.innerHeight);var L=parseInt(T,10)/100;T=Math.floor(R*L)}this.scaleMode=S,this.autoRound=D,this.autoCenter=C.autoCenter,this.resizeInterval=C.resizeInterval,D&&(w=Math.floor(w),T=Math.floor(T)),this.gameSize.setSize(w,T),E===o.ZOOM.MAX_ZOOM&&(E=this.getMaxZoom()),this.zoom=E,E!==1&&(this._resetZoom=!0),this.baseSize.setSize(w,T),D&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),C.minWidth>0&&this.displaySize.setMin(C.minWidth*E,C.minHeight*E),C.maxWidth>0&&this.displaySize.setMax(C.maxWidth*E,C.maxHeight*E),this.displaySize.setSize(w,T),(C.snapWidth>0||C.snapHeight>0)&&this.displaySize.setSnap(C.snapWidth,C.snapHeight),this.orientation=p(w,T)},getParent:function(C){var w=C.parent;if(w!==null){if(this.parent=f(w),this.parentIsWindow=this.parent===document.body,C.expandParent&&C.scaleMode!==o.SCALE_MODE.NONE){var T=this.parent.getBoundingClientRect();(this.parentIsWindow||T.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",T=this.parent.getBoundingClientRect(),!this.parentIsWindow&&T.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}C.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=f(C.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var C=this.parentSize,w=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(w.height=u(!0));var T=w.width,S=w.height;if(C.width!==T||C.height!==S)return C.setSize(T,S),!0;if(this.canvas){var E=this.canvasBounds,D=this.canvas.getBoundingClientRect();if(D.x!==E.x||D.y!==E.y)return!0}return!1},lockOrientation:function(C){var w=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return w?w.call(screen,C):!1},setParentSize:function(C,w){return this.parentSize.setSize(C,w),this.refresh()},setGameSize:function(C,w){var T=this.autoRound;T&&(C=Math.floor(C),w=Math.floor(w));var S=this.width,E=this.height;return this.gameSize.resize(C,w),this.baseSize.resize(C,w),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(C/w),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(S,E)},resize:function(C,w){var T=this.zoom,S=this.autoRound;S&&(C=Math.floor(C),w=Math.floor(w));var E=this.width,D=this.height;this.gameSize.resize(C,w),this.baseSize.resize(C,w),S&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(C*T,w*T),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var A=this.canvas.style,M=C*T,R=w*T;return S&&(M=Math.floor(M),R=Math.floor(R)),(M!==C||R!==w)&&(A.width=M+"px",A.height=R+"px"),this.refresh(E,D)},setZoom:function(C){return this.zoom=C,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(C,w){return C===void 0&&(C=0),w===void 0&&(w=C),this.displaySize.setSnap(C,w),this.refresh()},refresh:function(C,w){C===void 0&&(C=this.width),w===void 0&&(w=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var T=this.game.domContainer;if(T){this.baseSize.setCSS(T);var S=this.canvas.style,E=T.style;E.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",E.marginLeft=S.marginLeft,E.marginTop=S.marginTop}return this.emit(c.RESIZE,this.gameSize,this.baseSize,this.displaySize,C,w),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var C=p(this.width,this.height);C!==this.orientation&&(this.orientation=C,this.emit(c.ORIENTATION_CHANGE,C))}},updateScale:function(){var C=this.canvas.style,w=this.gameSize.width,T=this.gameSize.height,S,E,D=this.zoom,A=this.autoRound;if(this.scaleMode===o.SCALE_MODE.NONE)this.displaySize.setSize(w*D,T*D),S=this.displaySize.width,E=this.displaySize.height,A&&(S=Math.floor(S),E=Math.floor(E)),this._resetZoom&&(C.width=S+"px",C.height=E+"px",this._resetZoom=!1);else if(this.scaleMode===o.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),S=this.displaySize.width,E=this.displaySize.height,A&&(S=Math.floor(S),E=Math.floor(E)),this.canvas.width=S,this.canvas.height=E;else if(this.scaleMode===o.SCALE_MODE.EXPAND){var M=this.game.config.width,R=this.game.config.height;this.displaySize.setSize(this.parentSize.width,this.parentSize.height),S=this.displaySize.width,E=this.displaySize.height,A&&(S=Math.floor(S),E=Math.floor(E)),C.width=S+"px",C.height=E+"px";var L=this.parentSize.width/M,I=this.parentSize.height/R;L=0?0:-(E.x*D.x),M=E.y>=0?0:-(E.y*D.y),R;S.width>=E.width?R=T.width:R=T.width-(E.width-S.width)*D.x;var L;return S.height>=E.height?L=T.height:L=T.height-(E.height-S.height)*D.y,w.setTo(A,M,R,L),C&&(w.width/=C.zoomX,w.height/=C.zoomY,w.centerX=C.centerX+C.scrollX,w.centerY=C.centerY+C.scrollY),w},step:function(C,w){this.parent&&(this._lastCheck+=w,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var C=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",C.orientationChange,!1):window.removeEventListener("orientationchange",C.orientationChange,!1),window.removeEventListener("resize",C.windowResize,!1);var w=["webkit","moz",""];w.forEach(function(T){document.removeEventListener(T+"fullscreenchange",C.fullScreenChange,!1),document.removeEventListener(T+"fullscreenerror",C.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",C.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",C.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===o.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===o.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});n.exports=_},64743:n=>{n.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:n=>{n.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:n=>{n.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:n=>{n.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(n,a,s)=>{var o={CENTER:s(64743),ORIENTATION:s(39218),SCALE_MODE:s(81050),ZOOM:s(80805)};n.exports=o},56139:n=>{n.exports="enterfullscreen"},2336:n=>{n.exports="fullscreenfailed"},47412:n=>{n.exports="fullscreenunsupported"},51452:n=>{n.exports="leavefullscreen"},20666:n=>{n.exports="orientationchange"},47945:n=>{n.exports="resize"},97480:(n,a,s)=>{n.exports={ENTER_FULLSCREEN:s(56139),FULLSCREEN_FAILED:s(2336),FULLSCREEN_UNSUPPORTED:s(47412),LEAVE_FULLSCREEN:s(51452),ORIENTATION_CHANGE:s(20666),RESIZE:s(47945)}},93364:(n,a,s)=>{var o=s(79291),d=s(13560),l={Center:s(64743),Events:s(97480),Orientation:s(39218),ScaleManager:s(76531),ScaleModes:s(81050),Zoom:s(80805)};l=o(!1,l,d.CENTER),l=o(!1,l,d.ORIENTATION),l=o(!1,l,d.SCALE_MODE),l=o(!1,l,d.ZOOM),n.exports=l},27397:(n,a,s)=>{var o=s(95540),d=s(35355),l=function(c){var h=c.game.config.defaultPhysicsSystem,u=o(c.settings,"physics",!1);if(!(!h&&!u)){var f=[];if(h&&f.push(d(h+"Physics")),u)for(var p in u)p=d(p.concat("Physics")),f.indexOf(p)===-1&&f.push(p);return f}};n.exports=l},52106:(n,a,s)=>{var o=s(95540),d=function(l){var c=l.plugins.getDefaultScenePlugins(),h=o(l.settings,"plugins",!1);return Array.isArray(h)?h:c||[]};n.exports=d},87033:n=>{var a={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};n.exports=a},97482:(n,a,s)=>{var o=s(83419),d=s(2368),l=new o({initialize:function(h){this.sys=new d(this,h),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});n.exports=l},60903:(n,a,s)=>{var o=s(83419),d=s(89993),l=s(44594),c=s(8443),h=s(35154),u=s(54899),f=s(29747),p=s(97482),m=s(2368),g=new o({initialize:function(y,x){if(this.game=y,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,x){Array.isArray(x)||(x=[x]);for(var b=0;b-1&&(delete this.keys[b],this.scenes.splice(x,1),this._start.indexOf(b)>-1&&(x=this._start.indexOf(b),this._start.splice(x,1)),y.sys.destroy()),this},bootScene:function(v){var y=v.sys,x=y.settings;y.sceneUpdate=f,v.init&&(v.init.call(v,x.data),x.status=d.INIT,x.isTransition&&y.events.emit(l.TRANSITION_INIT,x.transitionFrom,x.transitionDuration));var b;y.load&&(b=y.load,b.reset()),b&&v.preload?(v.preload.call(v),x.status=d.LOADING,b.once(u.COMPLETE,this.loadComplete,this),b.start()):this.create(v)},loadComplete:function(v){this.create(v.scene)},payloadComplete:function(v){this.bootScene(v.scene)},update:function(v,y){this.processQueue(),this.isProcessing=!0;for(var x=this.scenes.length-1;x>=0;x--){var b=this.scenes[x].sys;b.settings.status>d.START&&b.settings.status<=d.RUNNING&&b.step(v,y),b.scenePlugin&&b.scenePlugin._target&&b.scenePlugin.step(v,y)}},render:function(v){for(var y=0;y=d.LOADING&&x.settings.status=d.START&&_<=d.CREATING)return this;if(_>=d.RUNNING&&_<=d.SLEEPING)b.shutdown(),b.sceneUpdate=f,b.start(y);else{b.sceneUpdate=f,b.start(y);var C;if(b.load&&(C=b.load),C&&b.settings.hasOwnProperty("pack")&&(C.reset(),C.addPack({payload:b.settings.pack})))return b.settings.status=d.LOADING,C.once(u.COMPLETE,this.payloadComplete,this),C.start(),this}return this.bootScene(x),this},stop:function(v,y){var x=this.getScene(v);if(x&&!x.sys.isTransitioning()&&x.sys.settings.status!==d.SHUTDOWN){var b=x.sys.load;b&&(b.off(u.COMPLETE,this.loadComplete,this),b.off(u.COMPLETE,this.payloadComplete,this)),x.sys.shutdown(y)}return this},switch:function(v,y,x){var b=this.getScene(v),_=this.getScene(y);return b&&_&&b!==_&&(this.sleep(v),this.isSleeping(y)?this.wake(y,x):this.start(y,x)),this},getAt:function(v){return this.scenes[v]},getIndex:function(v){var y=this.getScene(v);return this.scenes.indexOf(y)},bringToTop:function(v){if(this.isProcessing)return this.queueOp("bringToTop",v);var y=this.getIndex(v),x=this.scenes;if(y!==-1&&y0){var x=this.getScene(v);this.scenes.splice(y,1),this.scenes.unshift(x)}return this},moveDown:function(v){if(this.isProcessing)return this.queueOp("moveDown",v);var y=this.getIndex(v);if(y>0){var x=y-1,b=this.getScene(v),_=this.getAt(x);this.scenes[y]=_,this.scenes[x]=b}return this},moveUp:function(v){if(this.isProcessing)return this.queueOp("moveUp",v);var y=this.getIndex(v);if(yx),0,_)}return this},moveBelow:function(v,y){if(v===y)return this;if(this.isProcessing)return this.queueOp("moveBelow",v,y);var x=this.getIndex(v),b=this.getIndex(y);if(x!==-1&&b!==-1&&b>x){var _=this.getAt(b);this.scenes.splice(b,1),x===0?this.scenes.unshift(_):this.scenes.splice(x-(b{var o=s(45319),d=s(83419),l=s(44594),c=s(95540),h=s(37277),u=new d({initialize:function(p){this.scene=p,this.systems=p.sys,this.settings=p.sys.settings,this.key=p.sys.settings.key,this.manager=p.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,p.sys.events.once(l.BOOT,this.boot,this),p.sys.events.on(l.START,this.pluginStart,this)},boot:function(){this.systems.events.once(l.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(l.SHUTDOWN,this.shutdown,this)},start:function(f,p){return f===void 0&&(f=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",f,p),this},restart:function(f){var p=this.key;return this.manager.queueOp("stop",p),this.manager.queueOp("start",p,f),this},transition:function(f){f===void 0&&(f={});var p=c(f,"target",!1),m=this.manager.getScene(p);if(!p||!this.checkValidTransition(m))return!1;var g=c(f,"duration",1e3);this._elapsed=0,this._target=m,this._duration=g,this._willSleep=c(f,"sleep",!1),this._willRemove=c(f,"remove",!1);var v=c(f,"onUpdate",null);v&&(this._onUpdate=v,this._onUpdateScope=c(f,"onUpdateScope",this.scene));var y=c(f,"allowInput",!1);this.settings.transitionAllowInput=y;var x=m.sys.settings;x.isTransition=!0,x.transitionFrom=this.scene,x.transitionDuration=g,x.transitionAllowInput=y,c(f,"moveAbove",!1)?this.manager.moveAbove(this.key,p):c(f,"moveBelow",!1)&&this.manager.moveBelow(this.key,p),m.sys.isSleeping()?m.sys.wake(c(f,"data")):this.manager.start(p,c(f,"data"));var b=c(f,"onStart",null),_=c(f,"onStartScope",this.scene);return b&&b.call(_,this.scene,m,g),this.systems.events.emit(l.TRANSITION_OUT,m,g),!0},checkValidTransition:function(f){return!(!f||f.sys.isActive()||f.sys.isTransitioning()||f===this.scene||this.systems.isTransitioning())},step:function(f,p){this._elapsed+=p,this.transitionProgress=o(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var f=this._target.sys,p=this._target.sys.settings;f.events.emit(l.TRANSITION_COMPLETE,this.scene),p.isTransition=!1,p.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(f,p,m,g){return this.manager.add(f,p,m,g)},launch:function(f,p){return f&&f!==this.key&&this.manager.queueOp("start",f,p),this},run:function(f,p){return f&&f!==this.key&&this.manager.queueOp("run",f,p),this},pause:function(f,p){return f===void 0&&(f=this.key),this.manager.queueOp("pause",f,p),this},resume:function(f,p){return f===void 0&&(f=this.key),this.manager.queueOp("resume",f,p),this},sleep:function(f,p){return f===void 0&&(f=this.key),this.manager.queueOp("sleep",f,p),this},wake:function(f,p){return f===void 0&&(f=this.key),this.manager.queueOp("wake",f,p),this},switch:function(f,p){return f!==this.key&&this.manager.queueOp("switch",this.key,f,p),this},stop:function(f,p){return f===void 0&&(f=this.key),this.manager.queueOp("stop",f,p),this},setActive:function(f,p,m){p===void 0&&(p=this.key);var g=this.manager.getScene(p);return g&&g.sys.setActive(f,m),this},setVisible:function(f,p){p===void 0&&(p=this.key);var m=this.manager.getScene(p);return m&&m.sys.setVisible(f),this},isSleeping:function(f){return f===void 0&&(f=this.key),this.manager.isSleeping(f)},isActive:function(f){return f===void 0&&(f=this.key),this.manager.isActive(f)},isPaused:function(f){return f===void 0&&(f=this.key),this.manager.isPaused(f)},isVisible:function(f){return f===void 0&&(f=this.key),this.manager.isVisible(f)},swapPosition:function(f,p){return p===void 0&&(p=this.key),f!==p&&this.manager.swapPosition(f,p),this},moveAbove:function(f,p){return p===void 0&&(p=this.key),f!==p&&this.manager.moveAbove(f,p),this},moveBelow:function(f,p){return p===void 0&&(p=this.key),f!==p&&this.manager.moveBelow(f,p),this},remove:function(f){return f===void 0&&(f=this.key),this.manager.remove(f),this},moveUp:function(f){return f===void 0&&(f=this.key),this.manager.moveUp(f),this},moveDown:function(f){return f===void 0&&(f=this.key),this.manager.moveDown(f),this},bringToTop:function(f){return f===void 0&&(f=this.key),this.manager.bringToTop(f),this},sendToBack:function(f){return f===void 0&&(f=this.key),this.manager.sendToBack(f),this},get:function(f){return this.manager.getScene(f)},getStatus:function(f){var p=this.manager.getScene(f);if(p)return p.sys.getStatus()},getIndex:function(f){return f===void 0&&(f=this.key),this.manager.getIndex(f)},shutdown:function(){var f=this.systems.events;f.off(l.SHUTDOWN,this.shutdown,this),f.off(l.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(l.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});h.register("ScenePlugin",u,"scenePlugin"),n.exports=u},55681:(n,a,s)=>{var o=s(89993),d=s(35154),l=s(46975),c=s(87033),h={create:function(u){return typeof u=="string"?u={key:u}:u===void 0&&(u={}),{status:o.PENDING,key:d(u,"key",""),active:d(u,"active",!1),visible:d(u,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:d(u,"pack",!1),cameras:d(u,"cameras",null),map:d(u,"map",l(c,d(u,"mapAdd",{}))),physics:d(u,"physics",{}),loader:d(u,"loader",{}),plugins:d(u,"plugins",!1),input:d(u,"input",{})}}};n.exports=h},2368:(n,a,s)=>{var o=s(83419),d=s(89993),l=s(42363),c=s(44594),h=s(27397),u=s(52106),f=s(29747),p=s(55681),m=new o({initialize:function(v,y){this.scene=v,this.game,this.renderer,this.config=y,this.settings=p.create(y),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=f},init:function(g){this.settings.status=d.INIT,this.sceneUpdate=f,this.game=g,this.renderer=g.renderer,this.canvas=g.canvas,this.context=g.context;var v=g.plugins;this.plugins=v,v.addToScene(this,l.Global,[l.CoreScene,u(this),h(this)]),this.events.emit(c.BOOT,this),this.settings.isBooted=!0},step:function(g,v){var y=this.events;y.emit(c.PRE_UPDATE,g,v),y.emit(c.UPDATE,g,v),this.sceneUpdate.call(this.scene,g,v),y.emit(c.POST_UPDATE,g,v)},render:function(g){var v=this.displayList;v.depthSort(),this.events.emit(c.PRE_RENDER,g),this.cameras.render(g,v),this.events.emit(c.RENDER,g)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(g){var v=this.settings,y=this.getStatus();return y!==d.CREATING&&y!==d.RUNNING?console.warn("Cannot pause non-running Scene",v.key):this.settings.active&&(v.status=d.PAUSED,v.active=!1,this.events.emit(c.PAUSE,this,g)),this},resume:function(g){var v=this.events,y=this.settings;return this.settings.active||(y.status=d.RUNNING,y.active=!0,v.emit(c.RESUME,this,g)),this},sleep:function(g){var v=this.settings,y=this.getStatus();return y!==d.CREATING&&y!==d.RUNNING?console.warn("Cannot sleep non-running Scene",v.key):(v.status=d.SLEEPING,v.active=!1,v.visible=!1,this.events.emit(c.SLEEP,this,g)),this},wake:function(g){var v=this.events,y=this.settings;return y.status=d.RUNNING,y.active=!0,y.visible=!0,v.emit(c.WAKE,this,g),y.isTransition&&v.emit(c.TRANSITION_WAKE,y.transitionFrom,y.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var g=this.settings.status;return g>d.PENDING&&g<=d.RUNNING},isSleeping:function(){return this.settings.status===d.SLEEPING},isActive:function(){return this.settings.status===d.RUNNING},isPaused:function(){return this.settings.status===d.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(g){return this.settings.visible=g,this},setActive:function(g,v){return g?this.resume(v):this.pause(v)},start:function(g){var v=this.events,y=this.settings;g&&(y.data=g),y.status=d.START,y.active=!0,y.visible=!0,v.emit(c.START,this),v.emit(c.READY,this,g)},shutdown:function(g){var v=this.events,y=this.settings;v.off(c.TRANSITION_INIT),v.off(c.TRANSITION_START),v.off(c.TRANSITION_COMPLETE),v.off(c.TRANSITION_OUT),y.status=d.SHUTDOWN,y.active=!1,y.visible=!1,v.emit(c.SHUTDOWN,this,g)},destroy:function(){var g=this.events,v=this.settings;v.status=d.DESTROYED,v.active=!1,v.visible=!1,g.emit(c.DESTROY,this),g.removeAllListeners();for(var y=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],x=0;x{var a={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};n.exports=a},69830:n=>{n.exports="addedtoscene"},7919:n=>{n.exports="boot"},46763:n=>{n.exports="create"},11763:n=>{n.exports="destroy"},71555:n=>{n.exports="pause"},36735:n=>{n.exports="postupdate"},3809:n=>{n.exports="prerender"},90716:n=>{n.exports="preupdate"},58262:n=>{n.exports="ready"},91633:n=>{n.exports="removedfromscene"},10319:n=>{n.exports="render"},87132:n=>{n.exports="resume"},81961:n=>{n.exports="shutdown"},90194:n=>{n.exports="sleep"},6265:n=>{n.exports="start"},33178:n=>{n.exports="transitioncomplete"},43063:n=>{n.exports="transitioninit"},11259:n=>{n.exports="transitionout"},61611:n=>{n.exports="transitionstart"},45209:n=>{n.exports="transitionwake"},22966:n=>{n.exports="update"},21747:n=>{n.exports="wake"},44594:(n,a,s)=>{n.exports={ADDED_TO_SCENE:s(69830),BOOT:s(7919),CREATE:s(46763),DESTROY:s(11763),PAUSE:s(71555),POST_UPDATE:s(36735),PRE_RENDER:s(3809),PRE_UPDATE:s(90716),READY:s(58262),REMOVED_FROM_SCENE:s(91633),RENDER:s(10319),RESUME:s(87132),SHUTDOWN:s(81961),SLEEP:s(90194),START:s(6265),TRANSITION_COMPLETE:s(33178),TRANSITION_INIT:s(43063),TRANSITION_OUT:s(11259),TRANSITION_START:s(61611),TRANSITION_WAKE:s(45209),UPDATE:s(22966),WAKE:s(21747)}},62194:(n,a,s)=>{var o=s(89993),d=s(79291),l={Events:s(44594),GetPhysicsPlugins:s(27397),GetScenePlugins:s(52106),SceneManager:s(60903),ScenePlugin:s(52209),Settings:s(55681),Systems:s(2368)};l=d(!1,l,o),n.exports=l},30341:(n,a,s)=>{var o=s(83419),d=s(50792),l=s(14463),c=s(79291),h=s(29747),u=new o({Extends:d,initialize:function(p,m,g){d.call(this),this.manager=p,this.key=m,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=c(this.config,g),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(f){return!f||!f.name||typeof f.name!="string"?!1:this.markers[f.name]?(console.error("addMarker "+f.name+" already exists in Sound"),!1):(f=c(!0,{name:"",start:0,duration:this.totalDuration-(f.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},f),this.markers[f.name]=f,!0)},updateMarker:function(f){return!f||!f.name||typeof f.name!="string"?!1:this.markers[f.name]?(this.markers[f.name]=c(!0,this.markers[f.name],f),!0):(console.warn("Audio Marker: "+f.name+" missing in Sound: "+this.key),!1)},removeMarker:function(f){var p=this.markers[f];return p?(this.markers[f]=null,p):null},play:function(f,p){if(f===void 0&&(f=""),typeof f=="object"&&(p=f,f=""),typeof f!="string")return!1;if(!f)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[f])return console.warn("Marker: "+f+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[f],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=c(this.currentConfig,p),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:h,calculateRate:function(){var f=1.0005777895065548,p=this.currentConfig.detune+this.manager.detune,m=Math.pow(f,p);this.totalRate=this.currentConfig.rate*this.manager.rate*m},destroy:function(){this.pendingRemove||(this.stop(),this.emit(l.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});n.exports=u},85034:(n,a,s)=>{var o=s(83419),d=s(41786),l=s(50792),c=s(14463),h=s(8443),u=s(46710),f=s(58731),p=s(29747),m=s(26099),g=new o({Extends:l,initialize:function(y){l.call(this),this.game=y,this.jsonCache=y.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new m,y.events.on(h.BLUR,this.onGameBlur,this),y.events.on(h.FOCUS,this.onGameFocus,this),y.events.on(h.PRE_STEP,this.update,this),y.events.once(h.DESTROY,this.destroy,this)},add:p,addAudioSprite:function(v,y){y===void 0&&(y={});var x=this.add(v,y);x.spritemap=this.jsonCache.get(v).spritemap;for(var b in x.spritemap)if(x.spritemap.hasOwnProperty(b)){var _=d(y),C=x.spritemap[b];_.loop=C.hasOwnProperty("loop")?C.loop:!1,x.addMarker({name:b,start:C.start,duration:C.end-C.start,config:_})}return x},get:function(v){return f(this.sounds,"key",v)},getAll:function(v){return v?u(this.sounds,"key",v):u(this.sounds)},getAllPlaying:function(){return u(this.sounds,"isPlaying",!0)},play:function(v,y){var x=this.add(v);return x.once(c.COMPLETE,x.destroy,x),y?y.name?(x.addMarker(y),x.play(y.name)):x.play(y):x.play()},playAudioSprite:function(v,y,x){var b=this.addAudioSprite(v);return b.once(c.COMPLETE,b.destroy,b),b.play(y,x)},remove:function(v){var y=this.sounds.indexOf(v);return y!==-1?(v.destroy(),this.sounds.splice(y,1),!0):!1},removeAll:function(){this.sounds.forEach(function(v){v.destroy()}),this.sounds.length=0},removeByKey:function(v){for(var y=0,x=this.sounds.length-1;x>=0;x--){var b=this.sounds[x];b.key===v&&(b.destroy(),this.sounds.splice(x,1),y++)}return y},pauseAll:function(){this.forEachActiveSound(function(v){v.pause()}),this.emit(c.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(v){v.resume()}),this.emit(c.RESUME_ALL,this)},setListenerPosition:p,stopAll:function(){this.forEachActiveSound(function(v){v.stop()}),this.emit(c.STOP_ALL,this)},stopByKey:function(v){var y=0;return this.getAll(v).forEach(function(x){x.stop()&&y++}),y},isPlaying:function(v){var y=this.sounds,x=y.length-1,b;if(v===void 0){for(;x>=0;x--)if(b=this.sounds[x],b.isPlaying)return!0}else for(;x>=0;x--)if(b=this.sounds[x],b.key===v&&b.isPlaying)return!0;return!1},unlock:p,onBlur:p,onFocus:p,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(v,y){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(c.UNLOCKED,this));for(var x=this.sounds.length-1;x>=0;x--)this.sounds[x].pendingRemove&&this.sounds.splice(x,1);this.sounds.forEach(function(b){b.update(v,y)})},destroy:function(){this.game.events.off(h.BLUR,this.onGameBlur,this),this.game.events.off(h.FOCUS,this.onGameFocus,this),this.game.events.off(h.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(v,y){var x=this;this.sounds.forEach(function(b,_){b&&!b.pendingRemove&&v.call(y||x,b,_,x.sounds)})},setRate:function(v){return this.rate=v,this},rate:{get:function(){return this._rate},set:function(v){this._rate=v,this.forEachActiveSound(function(y){y.calculateRate()}),this.emit(c.GLOBAL_RATE,this,v)}},setDetune:function(v){return this.detune=v,this},detune:{get:function(){return this._detune},set:function(v){this._detune=v,this.forEachActiveSound(function(y){y.calculateRate()}),this.emit(c.GLOBAL_DETUNE,this,v)}}});n.exports=g},14747:(n,a,s)=>{var o=s(33684),d=s(25960),l=s(57490),c={create:function(h){var u=h.config.audio,f=h.device.audio;return u.noAudio||!f.webAudio&&!f.audioData?new d(h):f.webAudio&&!u.disableWebAudio?new l(h):new o(h)}};n.exports=c},19723:n=>{n.exports="complete"},98882:n=>{n.exports="decodedall"},57506:n=>{n.exports="decoded"},73146:n=>{n.exports="destroy"},11305:n=>{n.exports="detune"},40577:n=>{n.exports="detune"},30333:n=>{n.exports="mute"},20394:n=>{n.exports="rate"},21802:n=>{n.exports="volume"},1299:n=>{n.exports="looped"},99190:n=>{n.exports="loop"},97125:n=>{n.exports="mute"},89259:n=>{n.exports="pan"},79986:n=>{n.exports="pauseall"},17586:n=>{n.exports="pause"},19618:n=>{n.exports="play"},42306:n=>{n.exports="rate"},10387:n=>{n.exports="resumeall"},48959:n=>{n.exports="resume"},9960:n=>{n.exports="seek"},19180:n=>{n.exports="stopall"},98328:n=>{n.exports="stop"},50401:n=>{n.exports="unlocked"},52498:n=>{n.exports="volume"},14463:(n,a,s)=>{n.exports={COMPLETE:s(19723),DECODED:s(57506),DECODED_ALL:s(98882),DESTROY:s(73146),DETUNE:s(11305),GLOBAL_DETUNE:s(40577),GLOBAL_MUTE:s(30333),GLOBAL_RATE:s(20394),GLOBAL_VOLUME:s(21802),LOOP:s(99190),LOOPED:s(1299),MUTE:s(97125),PAN:s(89259),PAUSE_ALL:s(79986),PAUSE:s(17586),PLAY:s(19618),RATE:s(42306),RESUME_ALL:s(10387),RESUME:s(48959),SEEK:s(9960),STOP_ALL:s(19180),STOP:s(98328),UNLOCKED:s(50401),VOLUME:s(52498)}},64895:(n,a,s)=>{var o=s(30341),d=s(83419),l=s(14463),c=s(45319),h=new d({Extends:o,initialize:function(f,p,m){if(m===void 0&&(m={}),this.tags=f.game.cache.audio.get(p),!this.tags)throw new Error('No cached audio asset with key "'+p);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,o.call(this,f,p,m)},play:function(u,f){return this.manager.isLocked(this,"play",[u,f])||!o.prototype.play.call(this,u,f)||!this.pickAndPlayAudioTag()?!1:(this.emit(l.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!o.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(l.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!o.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(l.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!o.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(l.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var u=this.currentConfig.seek,f=this.currentConfig.delay,p=(this.currentMarker?this.currentMarker.start:0)+u;return this.previousTime=p,this.audio.currentTime=p,this.applyConfig(),f===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+f*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var u=0;u0){this.startTime=p-this.manager.loopEndOffset?(this.audio.currentTime=f+Math.max(0,m-p),m=this.audio.currentTime):m=p){this.reset(),this.stopAndReleaseAudioTag(),this.emit(l.COMPLETE,this);return}this.previousTime=m}},destroy:function(){o.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=c(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){o.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(u){this.currentConfig.mute=u,!this.manager.isLocked(this,"mute",u)&&(this.updateMute(),this.emit(l.MUTE,this,u))}},setMute:function(u){return this.mute=u,this},volume:{get:function(){return this.currentConfig.volume},set:function(u){this.currentConfig.volume=u,!this.manager.isLocked(this,"volume",u)&&(this.updateVolume(),this.emit(l.VOLUME,this,u))}},setVolume:function(u){return this.volume=u,this},rate:{get:function(){return this.currentConfig.rate},set:function(u){this.currentConfig.rate=u,!this.manager.isLocked(this,l.RATE,u)&&(this.calculateRate(),this.emit(l.RATE,this,u))}},setRate:function(u){return this.rate=u,this},detune:{get:function(){return this.currentConfig.detune},set:function(u){this.currentConfig.detune=u,!this.manager.isLocked(this,l.DETUNE,u)&&(this.calculateRate(),this.emit(l.DETUNE,this,u))}},setDetune:function(u){return this.detune=u,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(u){this.manager.isLocked(this,"seek",u)||this.startTime>0||(this.isPlaying||this.isPaused)&&(u=Math.min(Math.max(0,u),this.duration),this.isPlaying?(this.previousTime=u,this.audio.currentTime=u):this.isPaused&&(this.currentConfig.seek=u),this.emit(l.SEEK,this,u))}},setSeek:function(u){return this.seek=u,this},loop:{get:function(){return this.currentConfig.loop},set:function(u){this.currentConfig.loop=u,!this.manager.isLocked(this,"loop",u)&&(this.audio&&(this.audio.loop=u),this.emit(l.LOOP,this,u))}},setLoop:function(u){return this.loop=u,this},pan:{get:function(){return this.currentConfig.pan},set:function(u){this.currentConfig.pan=u,this.emit(l.PAN,this,u)}},setPan:function(u){return this.pan=u,this}});n.exports=h},33684:(n,a,s)=>{var o=s(85034),d=s(83419),l=s(14463),c=s(64895),h=new d({Extends:o,initialize:function(f){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,o.call(this,f)},add:function(u,f){var p=new c(this,u,f);return this.sounds.push(p),p},unlock:function(){this.locked=!1;var u=this;if(this.game.cache.audio.entries.each(function(g,v){for(var y=0;y{n.exports={SoundManagerCreator:s(14747),Events:s(14463),BaseSound:s(30341),BaseSoundManager:s(85034),WebAudioSound:s(71741),WebAudioSoundManager:s(57490),HTML5AudioSound:s(64895),HTML5AudioSoundManager:s(33684),NoAudioSound:s(4603),NoAudioSoundManager:s(25960)}},4603:(n,a,s)=>{var o=s(30341),d=s(83419),l=s(50792),c=s(79291),h=s(29747),u=function(){return!1},f=function(){return null},p=function(){return this},m=new d({Extends:l,initialize:function(v,y,x){x===void 0&&(x={}),l.call(this),this.manager=v,this.key=y,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=c({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},x),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:u,updateMarker:u,removeMarker:f,play:u,pause:u,resume:u,stop:u,setMute:p,setVolume:p,setRate:p,setDetune:p,setSeek:p,setLoop:p,setPan:p,applyConfig:f,resetConfig:f,update:h,calculateRate:f,destroy:function(){o.prototype.destroy.call(this)}});n.exports=m},25960:(n,a,s)=>{var o=s(85034),d=s(83419),l=s(50792),c=s(4603),h=s(29747),u=new d({Extends:l,initialize:function(p){l.call(this),this.game=p,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(f,p){var m=new c(this,f,p);return this.sounds.push(m),m},addAudioSprite:function(f,p){var m=this.add(f,p);return m.spritemap={},m},get:function(f){return o.prototype.get.call(this,f)},getAll:function(f){return o.prototype.getAll.call(this,f)},play:function(f,p){return!1},playAudioSprite:function(f,p,m){return!1},remove:function(f){return o.prototype.remove.call(this,f)},removeAll:function(){return o.prototype.removeAll.call(this)},removeByKey:function(f){return o.prototype.removeByKey.call(this,f)},stopByKey:function(f){return o.prototype.stopByKey.call(this,f)},onBlur:h,onFocus:h,onGameBlur:h,onGameFocus:h,pauseAll:h,resumeAll:h,stopAll:h,update:h,setRate:h,setDetune:h,setMute:h,setVolume:h,unlock:h,forEachActiveSound:function(f,p){o.prototype.forEachActiveSound.call(this,f,p)},destroy:function(){o.prototype.destroy.call(this)}});n.exports=u},71741:(n,a,s)=>{var o=s(30341),d=s(83419),l=s(14463),c=s(95540),h=new d({Extends:o,initialize:function(f,p,m){if(m===void 0&&(m={}),this.audioBuffer=f.game.cache.audio.get(p),!this.audioBuffer)throw new Error('Audio key "'+p+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=f.context.createGain(),this.volumeNode=f.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),f.context.createPanner&&(this.spatialNode=f.context.createPanner(),this.volumeNode.connect(this.spatialNode)),f.context.createStereoPanner?(this.pannerNode=f.context.createStereoPanner(),f.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(f.destination)):f.context.createPanner?this.spatialNode.connect(f.destination):this.volumeNode.connect(f.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,o.call(this,f,p,m)},play:function(u,f){return o.prototype.play.call(this,u,f)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(l.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{var o=s(53134),d=s(85034),l=s(83419),c=s(14463),h=s(8443),u=s(71741),f=s(95540),p=new l({Extends:d,initialize:function(g){this.context=this.createAudioContext(g),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked=this.context.state==="suspended"&&("ontouchstart"in window||"onclick"in window),d.call(this,g),this.locked&&g.isBooted?this.unlock():g.events.once(h.BOOT,this.unlock,this)},createAudioContext:function(m){var g=m.config.audio;if(g.context)return g.context.resume(),g.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(m){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=m,this.masterMuteNode=m.createGain(),this.masterVolumeNode=m.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(m.destination),this.destination=this.masterMuteNode,this},add:function(m,g){var v=new u(this,m,g);return this.sounds.push(v),v},decodeAudio:function(m,g){var v;Array.isArray(m)?v=m:v=[{key:m,data:g}];for(var y=this.game.cache.audio,x=v.length,b=0;b{var o=s(37105),d=s(83419),l=s(29747),c=s(19186),h=new d({initialize:function(f){this.parent=f,this.list=[],this.position=0,this.addCallback=l,this.removeCallback=l,this._sortKey=""},add:function(u,f){return f?o.Add(this.list,u):o.Add(this.list,u,0,this.addCallback,this)},addAt:function(u,f,p){return p?o.AddAt(this.list,u,f):o.AddAt(this.list,u,f,0,this.addCallback,this)},getAt:function(u){return this.list[u]},getIndex:function(u){return this.list.indexOf(u)},sort:function(u,f){return u?(f===void 0&&(f=function(p,m){return p[u]-m[u]}),c(this.list,f),this):this},getByName:function(u){return o.GetFirst(this.list,"name",u)},getRandom:function(u,f){return o.GetRandom(this.list,u,f)},getFirst:function(u,f,p,m){return o.GetFirst(this.list,u,f,p,m)},getAll:function(u,f,p,m){return o.GetAll(this.list,u,f,p,m)},count:function(u,f){return o.CountAllMatching(this.list,u,f)},swap:function(u,f){o.Swap(this.list,u,f)},moveTo:function(u,f){return o.MoveTo(this.list,u,f)},moveAbove:function(u,f){return o.MoveAbove(this.list,u,f)},moveBelow:function(u,f){return o.MoveBelow(this.list,u,f)},remove:function(u,f){return f?o.Remove(this.list,u):o.Remove(this.list,u,this.removeCallback,this)},removeAt:function(u,f){return f?o.RemoveAt(this.list,u):o.RemoveAt(this.list,u,this.removeCallback,this)},removeBetween:function(u,f,p){return p?o.RemoveBetween(this.list,u,f):o.RemoveBetween(this.list,u,f,this.removeCallback,this)},removeAll:function(u){for(var f=this.list.length;f--;)this.remove(this.list[f],u);return this},bringToTop:function(u){return o.BringToTop(this.list,u)},sendToBack:function(u){return o.SendToBack(this.list,u)},moveUp:function(u){return o.MoveUp(this.list,u),u},moveDown:function(u){return o.MoveDown(this.list,u),u},reverse:function(){return this.list.reverse(),this},shuffle:function(){return o.Shuffle(this.list),this},replace:function(u,f){return o.Replace(this.list,u,f)},exists:function(u){return this.list.indexOf(u)>-1},setAll:function(u,f,p,m){return o.SetAll(this.list,u,f,p,m),this},each:function(u,f){for(var p=[null],m=2;m0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});n.exports=h},90330:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c){this.entries={},this.size=0,this.setAll(c)},setAll:function(l){if(Array.isArray(l))for(var c=0;c{var o=s(83419),d=s(50792),l=s(82348),c=new o({Extends:d,initialize:function(){d.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(h){return this._active.indexOf(h)>-1},isPending:function(h){return this._toProcess>0&&this._pending.indexOf(h)>-1},isDestroying:function(h){return this._destroy.indexOf(h)>-1},add:function(h){return this.checkQueue&&this.isActive(h)&&!this.isDestroying(h)||this.isPending(h)||(this._pending.push(h),this._toProcess++),h},remove:function(h){if(this.isPending(h)){var u=this._pending,f=u.indexOf(h);f!==-1&&u.splice(f,1)}else this.isActive(h)&&(this._destroy.push(h),this._toProcess++);return h},removeAll:function(){for(var h=this._active,u=this._destroy,f=h.length;f--;)u.push(h[f]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var h=this._destroy,u=this._active,f,p;for(f=0;f{var o=s(43886);function d(w){var T=[".left",".top",".right",".bottom"];if(!(this instanceof d))return new d(w,T);this._maxEntries=Math.max(4,w||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}d.prototype={all:function(){return this._all(this.data,[])},search:function(w){var T=this.data,S=[],E=this.toBBox;if(!b(w,T))return S;for(var D=[],A,M,R,L;T;){for(A=0,M=T.children.length;A=0&&A[T].children.length>this._maxEntries;)this._split(A,T),T--;this._adjustParentBBoxes(D,A,T)},_split:function(w,T){var S=w[T],E=S.children.length,D=this._minEntries;this._chooseSplitAxis(S,D,E);var A=this._chooseSplitIndex(S,D,E),M=_(S.children.splice(A,S.children.length-A));M.height=S.height,M.leaf=S.leaf,c(S,this.toBBox),c(M,this.toBBox),T?w[T-1].children.push(M):this._splitRoot(S,M)},_splitRoot:function(w,T){this.data=_([w,T]),this.data.height=w.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},_chooseSplitIndex:function(w,T,S){var E,D,A,M,R,L,I,O;for(L=I=1/0,E=T;E<=S-T;E++)D=h(w,0,E,this.toBBox),A=h(w,E,S,this.toBBox),M=y(D,A),R=m(D)+m(A),M=T;L--)I=w.children[L],u(M,w.leaf?D(I):I),R+=g(M);return R},_adjustParentBBoxes:function(w,T,S){for(var E=S;E>=0;E--)u(T[E],w)},_condense:function(w){for(var T=w.length-1,S;T>=0;T--)w[T].children.length===0?T>0?(S=w[T-1].children,S.splice(S.indexOf(w[T]),1)):this.clear():c(w[T],this.toBBox)},compareMinX:function(w,T){return w.left-T.left},compareMinY:function(w,T){return w.top-T.top},toBBox:function(w){return{minX:w.left,minY:w.top,maxX:w.right,maxY:w.bottom}}};function l(w,T,S){if(!S)return T.indexOf(w);for(var E=0;E=w.minX&&T.maxY>=w.minY}function _(w){return{children:w,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function C(w,T,S,E,D){for(var A=[T,S],M;A.length;)S=A.pop(),T=A.pop(),!(S-T<=E)&&(M=T+Math.ceil((S-T)/E/2)*E,o(w,M,T,S,D),A.push(T,M,M,S))}n.exports=d},35072:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c){if(this.entries=[],Array.isArray(c))for(var h=0;h-1&&this.entries.splice(c,1),this},dump:function(){console.group("Set");for(var l=0;l-1},union:function(l){var c=new d;return l.entries.forEach(function(h){c.set(h)}),this.entries.forEach(function(h){c.set(h)}),c},intersect:function(l){var c=new d;return this.entries.forEach(function(h){l.contains(h)&&c.set(h)}),c},difference:function(l){var c=new d;return this.entries.forEach(function(h){l.contains(h)||c.set(h)}),c},size:{get:function(){return this.entries.length},set:function(l){return l{var o=s(45319),d=s(83419),l=s(56583),c=s(26099),h=new d({initialize:function(f,p,m,g){f===void 0&&(f=0),p===void 0&&(p=f),m===void 0&&(m=0),g===void 0&&(g=null),this._width=f,this._height=p,this._parent=g,this.aspectMode=m,this.aspectRatio=p===0?1:f/p,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new c},setAspectMode:function(u){return u===void 0&&(u=0),this.aspectMode=u,this.setSize(this._width,this._height)},setSnap:function(u,f){return u===void 0&&(u=0),f===void 0&&(f=u),this.snapTo.set(u,f),this.setSize(this._width,this._height)},setParent:function(u){return this._parent=u,this.setSize(this._width,this._height)},setMin:function(u,f){return u===void 0&&(u=0),f===void 0&&(f=u),this.minWidth=o(u,0,this.maxWidth),this.minHeight=o(f,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(u,f){return u===void 0&&(u=Number.MAX_VALUE),f===void 0&&(f=u),this.maxWidth=o(u,this.minWidth,Number.MAX_VALUE),this.maxHeight=o(f,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(u,f){switch(u===void 0&&(u=0),f===void 0&&(f=u),this.aspectMode){case h.NONE:this._width=this.getNewWidth(l(u,this.snapTo.x)),this._height=this.getNewHeight(l(f,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case h.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(l(u,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case h.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(l(f,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case h.FIT:this.constrain(u,f,!0);break;case h.ENVELOP:this.constrain(u,f,!1);break}return this},setAspectRatio:function(u){return this.aspectRatio=u,this.setSize(this._width,this._height)},resize:function(u,f){return this._width=this.getNewWidth(l(u,this.snapTo.x)),this._height=this.getNewHeight(l(f,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(u,f){return f===void 0&&(f=!0),u=o(u,this.minWidth,this.maxWidth),f&&this._parent&&u>this._parent.width&&(u=Math.max(this.minWidth,this._parent.width)),u},getNewHeight:function(u,f){return f===void 0&&(f=!0),u=o(u,this.minHeight,this.maxHeight),f&&this._parent&&u>this._parent.height&&(u=Math.max(this.minHeight,this._parent.height)),u},constrain:function(u,f,p){u===void 0&&(u=0),f===void 0&&(f=u),p===void 0&&(p=!0),u=this.getNewWidth(u),f=this.getNewHeight(f);var m=this.snapTo,g=f===0?1:u/f;return p&&this.aspectRatio>g||!p&&this.aspectRatio0&&(f=l(f,m.y),u=f*this.aspectRatio)):(p&&this.aspectRatiog)&&(f=l(f,m.y),u=f*this.aspectRatio,m.x>0&&(u=l(u,m.x),f=u*(1/this.aspectRatio))),this._width=u,this._height=f,this},fitTo:function(u,f){return this.constrain(u,f,!0)},envelop:function(u,f){return this.constrain(u,f,!1)},setWidth:function(u){return this.setSize(u,this._height)},setHeight:function(u){return this.setSize(this._width,u)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(u){u&&u.style&&(u.style.width=this._width+"px",u.style.height=this._height+"px")},copy:function(u){return u.setAspectMode(this.aspectMode),u.aspectRatio=this.aspectRatio,u.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(u){this.setSize(u,this._height)}},height:{get:function(){return this._height},set:function(u){this.setSize(this._width,u)}}});h.NONE=0,h.WIDTH_CONTROLS_HEIGHT=1,h.HEIGHT_CONTROLS_WIDTH=2,h.FIT=3,h.ENVELOP=4,n.exports=h},15238:n=>{n.exports="add"},56187:n=>{n.exports="remove"},82348:(n,a,s)=>{n.exports={PROCESS_QUEUE_ADD:s(15238),PROCESS_QUEUE_REMOVE:s(56187)}},41392:(n,a,s)=>{n.exports={Events:s(82348),List:s(73162),Map:s(90330),ProcessQueue:s(25774),RTree:s(59542),Set:s(35072),Size:s(86555)}},57382:(n,a,s)=>{var o=s(83419),d=s(45319),l=s(40987),c=s(8054),h=s(50030),u=s(79237),f=new o({Extends:u,initialize:function(m,g,v,y,x){u.call(this,m,g,v,y,x),this.add("__BASE",0,0,0,y,x),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=y,this.height=x,this.imageData=this.context.getImageData(0,0,y,x),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===c.WEBGL&&this.refresh(),this},draw:function(p,m,g,v){return v===void 0&&(v=!0),this.context.drawImage(g,p,m),v&&this.update(),this},drawFrame:function(p,m,g,v,y){g===void 0&&(g=0),v===void 0&&(v=0),y===void 0&&(y=!0);var x=this.manager.getFrame(p,m);if(x){var b=x.canvasData,_=x.cutWidth,C=x.cutHeight,w=x.source.resolution;this.context.drawImage(x.source.image,b.x,b.y,_,C,g,v,_/w,C/w),y&&this.update()}return this},setPixel:function(p,m,g,v,y,x){x===void 0&&(x=255),p=Math.abs(Math.floor(p)),m=Math.abs(Math.floor(m));var b=this.getIndex(p,m);if(b>-1){var _=this.context.getImageData(p,m,1,1);_.data[0]=g,_.data[1]=v,_.data[2]=y,_.data[3]=x,this.context.putImageData(_,p,m)}return this},putData:function(p,m,g,v,y,x,b){return v===void 0&&(v=0),y===void 0&&(y=0),x===void 0&&(x=p.width),b===void 0&&(b=p.height),this.context.putImageData(p,m,g,v,y,x,b),this},getData:function(p,m,g,v){p=d(Math.floor(p),0,this.width-1),m=d(Math.floor(m),0,this.height-1),g=d(g,1,this.width-p),v=d(v,1,this.height-m);var y=this.context.getImageData(p,m,g,v);return y},getPixel:function(p,m,g){g||(g=new l);var v=this.getIndex(p,m);if(v>-1){var y=this.data,x=y[v+0],b=y[v+1],_=y[v+2],C=y[v+3];g.setTo(x,b,_,C)}return g},getPixels:function(p,m,g,v){p===void 0&&(p=0),m===void 0&&(m=0),g===void 0&&(g=this.width),v===void 0&&(v=g),p=Math.abs(Math.round(p)),m=Math.abs(Math.round(m));for(var y=d(p,0,this.width),x=d(p+g,0,this.width),b=d(m,0,this.height),_=d(m+v,0,this.height),C=new l,w=[],T=b;T<_;T++){for(var S=[],E=y;E{var o=s(10312),d=s(38058),l=s(27919),c=s(83419),h=s(8054),u=s(4327),f=s(95540),p=s(36060),m=s(32302),g=s(79237),v=s(70554),y=new c({Extends:g,initialize:function(b,_,C,w){C===void 0&&(C=256),w===void 0&&(w=256),this.type="DynamicTexture";var T=b.game.renderer,S=T&&T.type===h.CANVAS,E=S?l.create2D(this,C,w):[this];g.call(this,b,_,E,C,w),this.add("__BASE",0,0,0,C,w),this.renderer=T,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=S?E:null,this.context=S?E.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new d(0,0,C,w).setScene(b.game.scene.systemScene,!1),this.renderTarget=S?null:new m(T,C,w,1,0,!1,!1,!0,!1),this.pipeline=S?null:T.pipelines.get(p.SINGLE_PIPELINE),this.setSize(C,w)},setSize:function(x,b){b===void 0&&(b=x);var _=this.get(),C=_.source;if(x!==this.width||b!==this.height){this.canvas&&(this.canvas.width=x,this.canvas.height=b);var w=this.renderTarget;w&&(w.willResize(x,b)&&w.resize(x,b),w.texture!==C.glTexture&&this.renderer.deleteTexture(C.glTexture),this.setFromRenderTarget()),this.camera.setSize(x,b),C.width=x,C.height=b,_.setSize(x,b),this.width=x,this.height=b}else{var T=this.getSourceImage();_.cutX+x>T.width&&(x=T.width-_.cutX),_.cutY+b>T.height&&(b=T.height-_.cutY),_.setSize(x,b,_.cutX,_.cutY)}return this},setFromRenderTarget:function(){var x=this.get(),b=x.source,_=this.renderTarget;return b.isRenderTexture=!0,b.isGLTexture=!0,b.glTexture=_.texture,this},setIsSpriteTexture:function(x){return this.isSpriteTexture=x,this},fill:function(x,b,_,C,w,T){var S=this.camera,E=this.renderer;b===void 0&&(b=1),_===void 0&&(_=0),C===void 0&&(C=0),w===void 0&&(w=this.width),T===void 0&&(T=this.height);var D=x>>16&255,A=x>>8&255,M=x&255,R=this.renderTarget;if(S.preRender(),R){R.bind(!0);var L=this.pipeline.manager.set(this.pipeline),I=E.width/R.width,O=E.height/R.height,N=R.height-(C+T);L.drawFillRect(_*I,N*O,w*I,T*O,v.getTintFromFloats(M/255,A/255,D/255,1),b),R.unbind(!0)}else{var H=this.context;E.setContext(H),H.globalCompositeOperation="source-over",H.fillStyle="rgba("+D+","+A+","+M+","+b+")",H.fillRect(_,C,w,T),E.setContext()}return this.dirty=!0,this},clear:function(x,b,_,C){if(this.dirty){var w=this.context,T=this.renderTarget;T?T.clear(x,b,_,C):w&&(x!==void 0&&b!==void 0&&_!==void 0&&C!==void 0?w.clearRect(x,b,_,C):(w.save(),w.setTransform(1,0,0,1,0,0),w.clearRect(0,0,this.width,this.height),w.restore())),this.dirty=!1}return this},stamp:function(x,b,_,C,w){_===void 0&&(_=0),C===void 0&&(C=0);var T=f(w,"alpha",1),S=f(w,"tint",16777215),E=f(w,"angle",0),D=f(w,"rotation",0),A=f(w,"scale",1),M=f(w,"scaleX",A),R=f(w,"scaleY",A),L=f(w,"originX",.5),I=f(w,"originY",.5),O=f(w,"blendMode",0),N=f(w,"erase",!1),H=f(w,"skipBatch",!1),X=this.manager.resetStamp(T,S);return X.setAngle(0),E!==0?X.setAngle(E):D!==0&&X.setRotation(D),X.setScale(M,R),X.setTexture(x,b),X.setOrigin(L,I),X.setBlendMode(O),N&&(this._eraseMode=!0),H?this.batchGameObject(X,_,C):this.draw(X,_,C),N&&(this._eraseMode=!1),this},erase:function(x,b,_){return this._eraseMode=!0,this.draw(x,b,_),this._eraseMode=!1,this},draw:function(x,b,_,C,w){return this.beginDraw(),this.batchDraw(x,b,_,C,w),this.endDraw(),this},drawFrame:function(x,b,_,C,w,T){return this.beginDraw(),this.batchDrawFrame(x,b,_,C,w,T),this.endDraw(),this},repeat:function(x,b,_,C,w,T,S,E,D){if(_===void 0&&(_=0),C===void 0&&(C=0),w===void 0&&(w=this.width),T===void 0&&(T=this.height),S===void 0&&(S=1),E===void 0&&(E=16777215),D===void 0&&(D=!1),x instanceof u?b=x:b=this.manager.getFrame(x,b),!b)return this;var A=this.manager.resetStamp(S,E);A.setFrame(b),A.setOrigin(0);var M=b.width,R=b.height;w=Math.floor(w),T=Math.floor(T);var L=Math.ceil(w/M),I=Math.ceil(T/R),O=L*M-w,N=I*R-T;O>0&&(O=M-O),N>0&&(N=R-N),_<0&&(L+=Math.ceil(Math.abs(_)/M)),C<0&&(I+=Math.ceil(Math.abs(C)/R));var H=_,X=C,V=!1,z=this.manager.stampCrop.setTo(0,0,M,R);D||this.beginDraw();for(var F=0;F0&&k===L-1&&(V=!0,z.width=O),N>0&&F===I-1&&(V=!0,z.height=N),V&&A.setCrop(z),this.batchGameObject(A,H,X),A.isCropped=!1,z.setTo(0,0,M,R),H+=M}H=_,X+=R}return D||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var x=this.camera,b=this.renderer,_=this.renderTarget;x.preRender(),_?b.beginCapture(_.width,_.height):b.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(x,b,_,C,w){return Array.isArray(x)||(x=[x]),this.batchList(x,b,_,C,w),this},batchDrawFrame:function(x,b,_,C,w,T){_===void 0&&(_=0),C===void 0&&(C=0),w===void 0&&(w=1),T===void 0&&(T=16777215);var S=this.manager.getFrame(x,b);return S&&(this.renderTarget?this.pipeline.batchTextureFrame(S,_,C,T,w,this.camera.matrix,null):this.batchTextureFrame(S,_,C,w,T)),this},endDraw:function(x){if(x===void 0&&(x=this._eraseMode),this.isDrawing){var b=this.renderer,_=this.renderTarget;if(_){var C=b.endCapture(),w=b.pipelines.setUtility();w.blitFrame(C,_,1,!1,!1,x,this.isSpriteTexture),b.resetScissor(),b.resetViewport()}else b.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(x,b,_,C,w){var T=x.length;if(T!==0)for(var S=0;S0&&D.height>0&&E.drawImage(A,D.x,D.y,D.width,D.height,b,_,D.width,D.height),E.restore()}},snapshotArea:function(x,b,_,C,w,T,S){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,w,!1,x,b,_,C,T,S):this.renderer.snapshotCanvas(this.canvas,w,!1,x,b,_,C,T,S),this},snapshot:function(x,b,_){return this.snapshotArea(0,0,this.width,this.height,x,b,_)},snapshotPixel:function(x,b,_){return this.snapshotArea(x,b,1,1,_,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(x,b,_,C){var w=this.manager.resetStamp();w.setTexture(this),w.setOrigin(0),w.renderWebGL(x,w,_,C)},renderCanvas:function(){},destroy:function(){var x=this.manager.stamp;x&&x.texture===this&&this.manager.resetStamp(),g.prototype.destroy.call(this),l.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});n.exports=y},4327:(n,a,s)=>{var o=s(83419),d=s(45319),l=s(79291),c=new o({initialize:function(u,f,p,m,g,v,y){this.texture=u,this.name=f,this.source=u.source[p],this.sourceIndex=p,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(v,y,m,g)},setCutPosition:function(h,u){return h===void 0&&(h=0),u===void 0&&(u=0),this.cutX=h,this.cutY=u,this.updateUVs()},setCutSize:function(h,u){return this.cutWidth=h,this.cutHeight=u,this.updateUVs()},setSize:function(h,u,f,p){f===void 0&&(f=0),p===void 0&&(p=0),this.setCutPosition(f,p),this.setCutSize(h,u),this.width=h,this.height=u,this.halfWidth=Math.floor(h*.5),this.halfHeight=Math.floor(u*.5),this.centerX=Math.floor(h/2),this.centerY=Math.floor(u/2);var m=this.data,g=m.cut;g.x=f,g.y=p,g.w=h,g.h=u,g.r=f+h,g.b=p+u,m.sourceSize.w=h,m.sourceSize.h=u,m.spriteSourceSize.w=h,m.spriteSourceSize.h=u,m.radius=.5*Math.sqrt(h*h+u*u);var v=m.drawImage;return v.x=f,v.y=p,v.width=h,v.height=u,this.updateUVs()},setTrim:function(h,u,f,p,m,g){var v=this.data,y=v.spriteSourceSize;return v.trim=!0,v.sourceSize.w=h,v.sourceSize.h=u,y.x=f,y.y=p,y.w=m,y.h=g,y.r=f+m,y.b=p+g,this.x=f,this.y=p,this.width=m,this.height=g,this.halfWidth=m*.5,this.halfHeight=g*.5,this.centerX=Math.floor(m/2),this.centerY=Math.floor(g/2),this.updateUVs()},setScale9:function(h,u,f,p){var m=this.data;return m.scale9=!0,m.is3Slice=u===0&&p===this.height,m.scale9Borders.x=h,m.scale9Borders.y=u,m.scale9Borders.w=f,m.scale9Borders.h=p,this},setCropUVs:function(h,u,f,p,m,g,v){var y=this.cutX,x=this.cutY,b=this.cutWidth,_=this.cutHeight,C=this.realWidth,w=this.realHeight;u=d(u,0,C),f=d(f,0,w),p=d(p,0,C-u),m=d(m,0,w-f);var T=y+u,S=x+f,E=p,D=m,A=this.data;if(A.trim){var M=A.spriteSourceSize;p=d(p,0,b-u),m=d(m,0,_-f);var R=u+p,L=f+m,I=!(M.rR||M.y>L);if(I){var O=Math.max(M.x,u),N=Math.max(M.y,f),H=Math.min(M.r,R)-O,X=Math.min(M.b,L)-N;E=H,D=X,g?T=y+(b-(O-M.x)-H):T=y+(O-M.x),v?S=x+(_-(N-M.y)-X):S=x+(N-M.y),u=O,f=N,p=H,m=X}else T=0,S=0,E=0,D=0}else g&&(T=y+(b-u-p)),v&&(S=x+(_-f-m));var V=this.source.width,z=this.source.height;return h.u0=Math.max(0,T/V),h.v0=Math.max(0,S/z),h.u1=Math.min(1,(T+E)/V),h.v1=Math.min(1,(S+D)/z),h.x=u,h.y=f,h.cx=T,h.cy=S,h.cw=E,h.ch=D,h.width=p,h.height=m,h.flipX=g,h.flipY=v,h},updateCropUVs:function(h,u,f){return this.setCropUVs(h,h.x,h.y,h.width,h.height,u,f)},setUVs:function(h,u,f,p,m,g){var v=this.data.drawImage;return v.width=h,v.height=u,this.u0=f,this.v0=p,this.u1=m,this.v1=g,this},updateUVs:function(){var h=this.cutX,u=this.cutY,f=this.cutWidth,p=this.cutHeight,m=this.data.drawImage;m.width=f,m.height=p;var g=this.source.width,v=this.source.height;return this.u0=h/g,this.v0=u/v,this.u1=(h+f)/g,this.v1=(u+p)/v,this},updateUVsInverted:function(){var h=this.source.width,u=this.source.height;return this.u0=(this.cutX+this.cutHeight)/h,this.v0=this.cutY/u,this.u1=this.cutX/h,this.v1=(this.cutY+this.cutWidth)/u,this},clone:function(){var h=new c(this.texture,this.name,this.sourceIndex);return h.cutX=this.cutX,h.cutY=this.cutY,h.cutWidth=this.cutWidth,h.cutHeight=this.cutHeight,h.x=this.x,h.y=this.y,h.width=this.width,h.height=this.height,h.halfWidth=this.halfWidth,h.halfHeight=this.halfHeight,h.centerX=this.centerX,h.centerY=this.centerY,h.rotated=this.rotated,h.data=l(!0,h.data,this.data),h.updateUVs(),h},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});n.exports=c},79237:(n,a,s)=>{var o=s(83419),d=s(4327),l=s(11876),c='Texture "%s" has no frame "%s"',h=new o({initialize:function(f,p,m,g,v){Array.isArray(m)||(m=[m]),this.manager=f,this.key=p,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var y=0;yv&&(v=b.cutX+b.cutWidth),b.cutY+b.cutHeight>y&&(y=b.cutY+b.cutHeight)}return{x:m,y:g,width:v-m,height:y-g}},getFrameNames:function(u){u===void 0&&(u=!1);var f=Object.keys(this.frames);if(!u){var p=f.indexOf("__BASE");p!==-1&&f.splice(p,1)}return f},getSourceImage:function(u){(u==null||this.frameTotal===1)&&(u="__BASE");var f=this.frames[u];return f?f.source.image:(console.warn(c,this.key,u),this.frames.__BASE.source.image)},getDataSourceImage:function(u){(u==null||this.frameTotal===1)&&(u="__BASE");var f=this.frames[u],p;return f?p=f.sourceIndex:(console.warn(c,this.key,u),p=this.frames.__BASE.sourceIndex),this.dataSource[p].image},setDataSource:function(u){Array.isArray(u)||(u=[u]);for(var f=0;f{var o=s(27919),d=s(57382),l=s(83419),c=s(40987),h=s(8054),u=s(81320),f=s(50792),p=s(69442),m=s(4327),g=s(8443),v=s(99584),y=s(35154),x=s(88571),b=s(41212),_=s(61309),C=s(87841),w=s(79237),T=new l({Extends:f,initialize:function(E){f.call(this),this.game=E,this.name="TextureManager",this.list={},this._tempCanvas=o.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new C,this.silentWarnings=!1,E.events.once(g.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(p.LOAD,this.updatePending,this),this.on(p.ERROR,this.updatePending,this);var S=this.game.config;S.defaultImage!==null&&this.addBase64("__DEFAULT",S.defaultImage),S.missingImage!==null&&this.addBase64("__MISSING",S.missingImage),S.whiteImage!==null&&this.addBase64("__WHITE",S.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(g.DESTROY,this.destroy,this),this.game.events.once(g.SYSTEM_READY,function(E){this.stamp=new x(E).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(p.LOAD),this.off(p.ERROR),this.emit(p.READY))},checkKey:function(S){return!S||typeof S!="string"||this.exists(S)?(this.silentWarnings||console.error("Texture key already in use: "+S),!1):!0},remove:function(S){if(typeof S=="string")if(this.exists(S))S=this.get(S);else return this.silentWarnings||console.warn("No texture found matching key: "+S),this;var E=S.key;return this.list.hasOwnProperty(E)&&(S.destroy(),this.emit(p.REMOVE,E),this.emit(p.REMOVE_KEY+E)),this},removeKey:function(S){return this.list.hasOwnProperty(S)&&delete this.list[S],this},addBase64:function(S,E){if(this.checkKey(S)){var D=this,A=new Image;A.onerror=function(){D.emit(p.ERROR,S)},A.onload=function(){var M=D.create(S,A);_.Image(M,0),D.emit(p.ADD,S,M),D.emit(p.ADD_KEY+S,M),D.emit(p.LOAD,S,M)},A.src=E}return this},getBase64:function(S,E,D,A){D===void 0&&(D="image/png"),A===void 0&&(A=.92);var M="",R=this.getFrame(S,E);if(R&&(R.source.isRenderTexture||R.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(R){var L=R.canvasData,I=o.create2D(this,L.width,L.height),O=I.getContext("2d",{willReadFrequently:!0});L.width>0&&L.height>0&&O.drawImage(R.source.image,L.x,L.y,L.width,L.height,0,0,L.width,L.height),M=I.toDataURL(D,A),o.remove(I)}return M},addImage:function(S,E,D){var A=null;return this.checkKey(S)&&(A=this.create(S,E),_.Image(A,0),D&&A.setDataSource(D),this.emit(p.ADD,S,A),this.emit(p.ADD_KEY+S,A)),A},addGLTexture:function(S,E){var D=null;if(this.checkKey(S)){var A=E.width,M=E.height;D=this.create(S,E,A,M),D.add("__BASE",0,0,0,A,M),this.emit(p.ADD,S,D),this.emit(p.ADD_KEY+S,D)}return D},addCompressedTexture:function(S,E,D){var A=null;if(this.checkKey(S)){if(A=this.create(S,E),A.add("__BASE",0,0,0,E.width,E.height),D){var M=function(L,I,O){Array.isArray(O.textures)||Array.isArray(O.frames)?_.JSONArray(L,I,O):_.JSONHash(L,I,O)};if(Array.isArray(D))for(var R=0;R=R.x&&S=R.y&&E=R.x&&S=R.y&&E{var o=s(27919),d=s(83419),l=s(50030),c=s(29795),h=s(82751),u=new d({initialize:function(p,m,g,v,y){y===void 0&&(y=!1);var x=p.manager.game;this.renderer=x.renderer,this.texture=p,this.source=m,this.image=m.compressed?null:m,this.compressionAlgorithm=m.compressed?m.format:null,this.resolution=1,this.width=g||m.naturalWidth||m.videoWidth||m.width||0,this.height=v||m.naturalHeight||m.videoHeight||m.height||0,this.scaleMode=c.DEFAULT,this.isCanvas=m instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&m instanceof HTMLVideoElement,this.isRenderTexture=m.type==="RenderTexture"||m.type==="DynamicTexture",this.isGLTexture=m instanceof h,this.isPowerOf2=l(this.width,this.height),this.glTexture=null,this.flipY=y,this.init(x)},init:function(f){var p=this.renderer;if(p){var m=this.source;if(p.gl){var g=this.image,v=this.flipY,y=this.width,x=this.height,b=this.scaleMode;this.isCanvas?this.glTexture=p.createCanvasTexture(g,!1,v):this.isVideo?this.glTexture=p.createVideoTexture(g,!1,v):this.isRenderTexture?this.glTexture=p.createTextureFromSource(null,y,x,b):this.isGLTexture?this.glTexture=m:this.compressionAlgorithm?this.glTexture=p.createTextureFromSource(m,void 0,void 0,b):m instanceof Uint8Array?this.glTexture=p.createUint8ArrayTexture(m,y,x,b):this.glTexture=p.createTextureFromSource(g,y,x,b)}else this.isRenderTexture&&(this.image=m.canvas)}f.config.antialias||this.setFilter(1)},setFilter:function(f){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,f),this.scaleMode=f},setFlipY:function(f){return f===void 0&&(f=!0),f===this.flipY?this:(this.flipY=f,this.update(),this)},update:function(){var f=this.renderer,p=this.image,m=this.flipY,g=f.gl;g&&this.isCanvas?f.updateCanvasTexture(p,this.glTexture,m):g&&this.isVideo&&f.updateVideoTexture(p,this.glTexture,m)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&o.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});n.exports=u},19673:n=>{var a={LINEAR:0,NEAREST:1};n.exports=a},44538:n=>{n.exports="addtexture"},63486:n=>{n.exports="addtexture-"},94851:n=>{n.exports="onerror"},29099:n=>{n.exports="onload"},8678:n=>{n.exports="ready"},86415:n=>{n.exports="removetexture"},30879:n=>{n.exports="removetexture-"},69442:(n,a,s)=>{n.exports={ADD:s(44538),ADD_KEY:s(63486),ERROR:s(94851),LOAD:s(29099),READY:s(8678),REMOVE:s(86415),REMOVE_KEY:s(30879)}},27458:(n,a,s)=>{var o=s(79291),d=s(19673),l={CanvasTexture:s(57382),DynamicTexture:s(81320),Events:s(69442),FilterMode:d,Frame:s(4327),Parsers:s(61309),Texture:s(79237),TextureManager:s(17130),TextureSource:s(11876)};l=o(!1,l,d),n.exports=l},89905:n=>{var a=function(s,o,d){if(!d.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var l=s.source[o];s.add("__BASE",o,0,0,l.width,l.height);for(var c=d.getElementsByTagName("SubTexture"),h,u=0;u{var a=function(s,o){var d=s.source[o];return s.add("__BASE",o,0,0,d.width,d.height),s};n.exports=a},4832:n=>{var a=function(s,o){var d=s.source[o];return s.add("__BASE",o,0,0,d.width,d.height),s};n.exports=a},78566:(n,a,s)=>{var o=s(41786),d=function(l,c,h){if(!h.frames&&!h.textures){console.warn("Invalid Texture Atlas JSON Array");return}var u=l.source[c];l.add("__BASE",c,0,0,u.width,u.height);for(var f=Array.isArray(h.textures)?h.textures[c].frames:h.frames,p,m=0;m{var o=s(41786),d=function(l,c,h){if(!h.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var u=l.source[c];l.add("__BASE",c,0,0,u.width,u.height);var f=h.frames,p;for(var m in f)if(f.hasOwnProperty(m)){var g=f[m];if(p=l.add(m,c,g.frame.x,g.frame.y,g.frame.w,g.frame.h),!p){console.warn("Invalid atlas json, frame already exists: "+m);continue}g.trimmed&&p.setTrim(g.sourceSize.w,g.sourceSize.h,g.spriteSourceSize.x,g.spriteSourceSize.y,g.spriteSourceSize.w,g.spriteSourceSize.h),g.rotated&&(p.rotated=!0,p.updateUVsInverted());var v=g.anchor||g.pivot;v&&(p.customPivot=!0,p.pivotX=v.x,p.pivotY=v.y),g.scale9Borders&&p.setScale9(g.scale9Borders.x,g.scale9Borders.y,g.scale9Borders.w,g.scale9Borders.h),p.customData=o(g)}for(var y in h)y!=="frames"&&(Array.isArray(h[y])?l.customData[y]=h[y].slice(0):l.customData[y]=h[y]);return l};n.exports=d},31403:n=>{var a=function(s){var o=[171,75,84,88,32,49,49,187,13,10,26,10],d,l=new Uint8Array(s,0,12);for(d=0;d>1),C=Math.max(1,C>>1),b+=w}return{mipmaps:x,width:m,height:g,internalFormat:p,compressed:!0,generateMipmap:!1}};n.exports=a},82038:n=>{function a(E,D,A,M,R,L,I){return I===void 0&&(I=16),Math.floor((E+A)/R)*Math.floor((D+M)/L)*I}function s(E,D){return E=Math.max(E,16),D=Math.max(D,8),E*D/4}function o(E,D){return E=Math.max(E,8),D=Math.max(D,8),E*D/2}function d(E,D){return Math.ceil(E/4)*Math.ceil(D/4)*16}function l(E,D){return a(E,D,3,3,4,4,8)}function c(E,D){return a(E,D,3,3,4,4)}function h(E,D){return a(E,D,4,3,5,4)}function u(E,D){return a(E,D,4,4,5,5)}function f(E,D){return a(E,D,5,4,6,5)}function p(E,D){return a(E,D,5,5,6,6)}function m(E,D){return a(E,D,7,4,8,5)}function g(E,D){return a(E,D,7,5,8,6)}function v(E,D){return a(E,D,7,7,8,8)}function y(E,D){return a(E,D,9,4,10,5)}function x(E,D){return a(E,D,9,5,10,6)}function b(E,D){return a(E,D,9,7,10,8)}function _(E,D){return a(E,D,9,9,10,10)}function C(E,D){return a(E,D,11,9,12,10)}function w(E,D){return a(E,D,11,11,12,12)}var T={0:{sizeFunc:s,glFormat:[35841]},1:{sizeFunc:s,glFormat:[35843]},2:{sizeFunc:o,glFormat:[35840]},3:{sizeFunc:o,glFormat:[35842]},6:{sizeFunc:l,glFormat:[36196]},7:{sizeFunc:l,glFormat:[33776,35916]},8:{sizeFunc:c,glFormat:[33777,35917]},9:{sizeFunc:c,glFormat:[33778,35918]},11:{sizeFunc:c,glFormat:[33779,35919]},14:{sizeFunc:d,glFormat:[36494,36495]},15:{sizeFunc:d,glFormat:[36492,36493]},22:{sizeFunc:l,glFormat:[37492,37493]},23:{sizeFunc:c,glFormat:[37496,37497]},24:{sizeFunc:l,glFormat:[37494,37495]},25:{sizeFunc:l,glFormat:[37488]},26:{sizeFunc:c,glFormat:[37490]},27:{sizeFunc:c,glFormat:[37808,37840]},28:{sizeFunc:h,glFormat:[37809,37841]},29:{sizeFunc:u,glFormat:[37810,37842]},30:{sizeFunc:f,glFormat:[37811,37843]},31:{sizeFunc:p,glFormat:[37812,37844]},32:{sizeFunc:m,glFormat:[37813,37845]},33:{sizeFunc:g,glFormat:[37814,37846]},34:{sizeFunc:v,glFormat:[37815,37847]},35:{sizeFunc:y,glFormat:[37816,37848]},36:{sizeFunc:x,glFormat:[37817,37849]},37:{sizeFunc:b,glFormat:[37818,37850]},38:{sizeFunc:_,glFormat:[37819,37851]},39:{sizeFunc:C,glFormat:[37820,37852]},40:{sizeFunc:w,glFormat:[37821,37853]}},S=function(E){for(var D=new Uint32Array(E,0,13),A=D[0],M=A===55727696,R=M?D[2]:D[3],L=D[4],I=T[R].glFormat[L],O=T[R].sizeFunc,N=D[11],H=D[7],X=D[6],V=52+D[12],z=new Uint8Array(E,V),F=new Array(N),k=0,G=H,Z=X,J=0;J>1),Z=Math.max(1,Z>>1),k+=W}return{mipmaps:F,width:H,height:X,internalFormat:I,compressed:!0,generateMipmap:!1}};n.exports=S},75549:(n,a,s)=>{var o=s(95540),d=function(l,c,h,u,f,p,m){var g=o(m,"frameWidth",null),v=o(m,"frameHeight",g);if(g===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var y=l.source[c];l.add("__BASE",c,0,0,y.width,y.height);var x=o(m,"startFrame",0),b=o(m,"endFrame",-1),_=o(m,"margin",0),C=o(m,"spacing",0),w=Math.floor((f-_+C)/(g+C)),T=Math.floor((p-_+C)/(v+C)),S=w*T;S===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",l.key),(x>S||x<-S)&&(x=0),x<0&&(x=S+x),(b===-1||b>S||bf&&(A=I-f),O>p&&(M=O-p),L>=x&&L<=b&&(l.add(R,c,h+E,u+D,g-A,v-M),R++),E+=g+C,E+g>f&&(E=_,D+=v+C)}return l};n.exports=d},47534:(n,a,s)=>{var o=s(95540),d=function(l,c,h){var u=o(h,"frameWidth",null),f=o(h,"frameHeight",u);if(!u)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var p=l.source[0];l.add("__BASE",0,0,0,p.width,p.height);var m=o(h,"startFrame",0),g=o(h,"endFrame",-1),v=o(h,"margin",0),y=o(h,"spacing",0),x=c.cutX,b=c.cutY,_=c.cutWidth,C=c.cutHeight,w=c.realWidth,T=c.realHeight,S=Math.floor((w-v+y)/(u+y)),E=Math.floor((T-v+y)/(f+y)),D=S*E,A=c.x,M=u-A,R=u-(w-_-A),L=c.y,I=f-L,O=f-(T-C-L);(m>D||m<-D)&&(m=0),m<0&&(m=D+m),g!==-1&&(D=m+(g+1));for(var N,H=v,X=v,V=0,z=0,F=0;F{var a=0,s=function(d,l,c,h){var u=a-h.y-h.height;d.add(c,l,h.x,u,h.width,h.height)},o=function(d,l,c){var h=d.source[l];d.add("__BASE",l,0,0,h.width,h.height),a=h.height;for(var u=c.split(` +`),f=/^[ ]*(- )*(\w+)+[: ]+(.*)/,p="",m="",g={x:0,y:0,width:0,height:0},v=0;v{var o=s(50030),d=function(p){for(var m=p.mipmaps,g=1;g{n.exports={AtlasXML:s(89905),Canvas:s(72893),Image:s(4832),JSONArray:s(78566),JSONHash:s(39711),KTXParser:s(31403),PVRParser:s(82038),SpriteSheet:s(75549),SpriteSheetFromAtlas:s(47534),UnityYAML:s(86147)}},80341:n=>{n.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(n,a,s)=>{var o=s(83419),d=new o({initialize:function(c,h,u,f,p,m,g){(u===void 0||u<=0)&&(u=32),(f===void 0||f<=0)&&(f=32),p===void 0&&(p=0),m===void 0&&(m=0),this.name=c,this.firstgid=h|0,this.imageWidth=u|0,this.imageHeight=f|0,this.imageMargin=p|0,this.imageSpacing=m|0,this.properties=g||{},this.images=[],this.total=0},containsImageIndex:function(l){return l>=this.firstgid&&l{var o=s(83419),d=new o({initialize:function(c){if(this.gids=[],c!==void 0)for(var h=0;h{var o=s(80341),d=s(87010),l=s(46177),c=s(49075),h=function(u,f,p,m,g,v,y,x){p===void 0&&(p=32),m===void 0&&(m=32),g===void 0&&(g=10),v===void 0&&(v=10),x===void 0&&(x=!1);var b=null;if(Array.isArray(y)){var _=f!==void 0?f:"map";b=l(_,o.ARRAY_2D,y,p,m,x)}else if(f!==void 0){var C=u.cache.tilemap.get(f);C?b=l(f,C.format,C.data,p,m,x):console.warn("No map data found for key "+f)}return b===null&&(b=new d({tileWidth:p,tileHeight:m,width:g,height:v})),new c(u,b)};n.exports=h},23029:(n,a,s)=>{var o=s(83419),d=s(31401),l=s(91907),c=s(62644),h=s(93232),u=new o({Mixins:[d.AlphaSingle,d.Flip,d.Visible],initialize:function(p,m,g,v,y,x,b,_){this.layer=p,this.index=m,this.x=g,this.y=v,this.width=y,this.height=x,this.right,this.bottom,this.baseWidth=b!==void 0?b:y,this.baseHeight=_!==void 0?_:x,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(f,p){return!(fthis.right||p>this.bottom)},copy:function(f){return this.index=f.index,this.alpha=f.alpha,this.properties=c(f.properties),this.visible=f.visible,this.setFlip(f.flipX,f.flipY),this.tint=f.tint,this.rotation=f.rotation,this.collideUp=f.collideUp,this.collideDown=f.collideDown,this.collideLeft=f.collideLeft,this.collideRight=f.collideRight,this.collisionCallback=f.collisionCallback,this.collisionCallbackContext=f.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(f){var p=this.tilemapLayer;if(p){var m=p.tileToWorldXY(this.x,this.y,void 0,f);return m.x}return this.x*this.baseWidth},getRight:function(f){var p=this.tilemapLayer;return p?this.getLeft(f)+this.width*p.scaleX:this.getLeft(f)+this.width},getTop:function(f){var p=this.tilemapLayer;if(p){var m=p.tileToWorldXY(this.x,this.y,void 0,f);return m.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(f){var p=this.tilemapLayer;return p?this.getTop(f)+this.height*p.scaleY:this.getTop(f)+this.height},getBounds:function(f,p){return p===void 0&&(p=new h),p.x=this.getLeft(f),p.y=this.getTop(f),p.width=this.getRight(f)-p.x,p.height=this.getBottom(f)-p.y,p},getCenterX:function(f){return(this.getLeft(f)+this.getRight(f))/2},getCenterY:function(f){return(this.getTop(f)+this.getBottom(f))/2},intersects:function(f,p,m,g){return!(m<=this.pixelX||g<=this.pixelY||f>=this.right||p>=this.bottom)},isInteresting:function(f,p){return f&&p?this.canCollide||this.hasInterestingFace:f?this.collides:p?this.hasInterestingFace:!1},resetCollision:function(f){if(f===void 0&&(f=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,f){var p=this.tilemapLayer;p&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(f,p,m,g,v){if(p===void 0&&(p=f),m===void 0&&(m=f),g===void 0&&(g=f),v===void 0&&(v=!0),this.collideLeft=f,this.collideRight=p,this.collideUp=m,this.collideDown=g,this.faceLeft=f,this.faceRight=p,this.faceTop=m,this.faceBottom=g,v){var y=this.tilemapLayer;y&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(f,p){return f===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=f,this.collisionCallbackContext=p),this},setSize:function(f,p,m,g){return f!==void 0&&(this.width=f),p!==void 0&&(this.height=p),m!==void 0&&(this.baseWidth=m),g!==void 0&&(this.baseHeight=g),this.updatePixelXY(),this},updatePixelXY:function(){var f=this.layer.orientation;if(f===l.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(f===l.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(f===l.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(f===l.HEXAGONAL){var p=this.layer.staggerAxis,m=this.layer.staggerIndex,g=this.layer.hexSideLength,v,y;p==="y"?(y=(this.baseHeight-g)/2+g,m==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*y):p==="x"&&(v=(this.baseWidth-g)/2+g,this.pixelX=this.x*v,m==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var f=this.layer.tilemapLayer;if(f){var p=f.gidMap[this.index];if(p)return p}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var f=this.tilemapLayer;return f?f.tilemap:null}}});n.exports=u},49075:(n,a,s)=>{var o=s(84101),d=s(83419),l=s(39506),c=s(80341),h=s(95540),u=s(14977),f=s(27462),p=s(91907),m=s(36305),g=s(19133),v=s(68287),y=s(23029),x=s(81086),b=s(20442),_=s(33629),C=new d({initialize:function(T,S){this.scene=T,this.tileWidth=S.tileWidth,this.tileHeight=S.tileHeight,this.width=S.width,this.height=S.height,this.orientation=S.orientation,this.renderOrder=S.renderOrder,this.format=S.format,this.version=S.version,this.properties=S.properties,this.widthInPixels=S.widthInPixels,this.heightInPixels=S.heightInPixels,this.imageCollections=S.imageCollections,this.images=S.images,this.layers=S.layers,this.tiles=S.tiles,this.tilesets=S.tilesets,this.objects=S.objects,this.currentLayerIndex=0,this.hexSideLength=S.hexSideLength;var E=this.orientation;this._convert={WorldToTileXY:x.GetWorldToTileXYFunction(E),WorldToTileX:x.GetWorldToTileXFunction(E),WorldToTileY:x.GetWorldToTileYFunction(E),TileToWorldXY:x.GetTileToWorldXYFunction(E),TileToWorldX:x.GetTileToWorldXFunction(E),TileToWorldY:x.GetTileToWorldYFunction(E),GetTileCorners:x.GetTileCornersFunction(E)}},setRenderOrder:function(w){var T=["right-down","left-down","right-up","left-up"];return typeof w=="number"&&(w=T[w]),T.indexOf(w)>-1&&(this.renderOrder=w),this},addTilesetImage:function(w,T,S,E,D,A,M,R){if(w===void 0)return null;T==null&&(T=w);var L=this.scene.sys.textures;if(!L.exists(T))return console.warn('Texture key "%s" not found',T),null;var I=L.get(T),O=this.getTilesetIndex(w);if(O===null&&this.format===c.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',w,this.tilesets),null;var N=this.tilesets[O];return N?((S||E)&&N.setTileSize(S,E),(D||A)&&N.setSpacing(D,A),N.setImage(I),N):(S===void 0&&(S=this.tileWidth),E===void 0&&(E=this.tileHeight),D===void 0&&(D=0),A===void 0&&(A=0),M===void 0&&(M=0),R===void 0&&(R={x:0,y:0}),N=new _(w,M,S,E,D,A,void 0,void 0,R),N.setImage(I),this.tilesets.push(N),this.tiles=o(this),N)},copy:function(w,T,S,E,D,A,M,R){return R=this.getLayer(R),R!==null?(x.Copy(w,T,S,E,D,A,M,R),this):null},createBlankLayer:function(w,T,S,E,D,A,M,R){S===void 0&&(S=0),E===void 0&&(E=0),D===void 0&&(D=this.width),A===void 0&&(A=this.height),M===void 0&&(M=this.tileWidth),R===void 0&&(R=this.tileHeight);var L=this.getLayerIndex(w);if(L!==null)return console.warn("Invalid Tilemap Layer ID: "+w),null;for(var I=new u({name:w,tileWidth:M,tileHeight:R,width:D,height:A,orientation:this.orientation}),O,N=0;N-1&&this.putTileAt(T,A.x,A.y,S,A.tilemapLayer)}return E},removeTileAt:function(w,T,S,E,D){return S===void 0&&(S=!0),E===void 0&&(E=!0),D=this.getLayer(D),D===null?null:x.RemoveTileAt(w,T,S,E,D)},removeTileAtWorldXY:function(w,T,S,E,D,A){return S===void 0&&(S=!0),E===void 0&&(E=!0),A=this.getLayer(A),A===null?null:x.RemoveTileAtWorldXY(w,T,S,E,D,A)},renderDebug:function(w,T,S){return S=this.getLayer(S),S===null?null:(this.orientation===p.ORTHOGONAL&&x.RenderDebug(w,T,S),this)},renderDebugFull:function(w,T){for(var S=this.layers,E=0;E{var o=s(44603),d=s(31989);o.register("tilemap",function(l){var c=l!==void 0?l:{};return d(this.scene,c.key,c.tileWidth,c.tileHeight,c.width,c.height,c.data,c.insertNull)})},46029:(n,a,s)=>{var o=s(39429),d=s(31989);o.register("tilemap",function(l,c,h,u,f,p,m){return l===null&&(l=void 0),c===null&&(c=void 0),h===null&&(h=void 0),u===null&&(u=void 0),f===null&&(f=void 0),d(this.scene,l,c,h,u,f,p,m)})},20442:(n,a,s)=>{var o=s(83419),d=s(78389),l=s(31401),c=s(95643),h=s(81086),u=s(19218),f=s(26099),p=new o({Extends:c,Mixins:[l.Alpha,l.BlendMode,l.ComputedSize,l.Depth,l.Flip,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.Transform,l.Visible,l.ScrollFactor,d,u],initialize:function(g,v,y,x,b,_){c.call(this,g,"TilemapLayer"),this.isTilemap=!0,this.tilemap=v,this.layerIndex=y,this.layer=v.layers[y],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new f,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(x),this.setAlpha(this.layer.alpha),this.setPosition(b,_),this.setOrigin(0,0),this.setSize(v.tileWidth*this.layer.width,v.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(m){var g=[],v=[],y=this.tilemap;Array.isArray(m)||(m=[m]);for(var x=0;x=0&&m<4&&(this._renderOrder=m),this},calculateFacesAt:function(m,g){return h.CalculateFacesAt(m,g,this.layer),this},calculateFacesWithin:function(m,g,v,y){return h.CalculateFacesWithin(m,g,v,y,this.layer),this},createFromTiles:function(m,g,v,y,x){return h.CreateFromTiles(m,g,v,y,x,this.layer)},cull:function(m){return this.cullCallback(this.layer,m,this.culledTiles,this._renderOrder)},copy:function(m,g,v,y,x,b,_){return h.Copy(m,g,v,y,x,b,_,this.layer),this},fill:function(m,g,v,y,x,b){return h.Fill(m,g,v,y,x,b,this.layer),this},filterTiles:function(m,g,v,y,x,b,_){return h.FilterTiles(m,g,v,y,x,b,_,this.layer)},findByIndex:function(m,g,v){return h.FindByIndex(m,g,v,this.layer)},findTile:function(m,g,v,y,x,b,_){return h.FindTile(m,g,v,y,x,b,_,this.layer)},forEachTile:function(m,g,v,y,x,b,_){return h.ForEachTile(m,g,v,y,x,b,_,this.layer),this},setTint:function(m,g,v,y,x,b){m===void 0&&(m=16777215);var _=function(C){C.tint=m,C.tintFill=!1};return this.forEachTile(_,this,g,v,y,x,b)},setTintFill:function(m,g,v,y,x,b){m===void 0&&(m=16777215);var _=function(C){C.tint=m,C.tintFill=!0};return this.forEachTile(_,this,g,v,y,x,b)},getTileAt:function(m,g,v){return h.GetTileAt(m,g,v,this.layer)},getTileAtWorldXY:function(m,g,v,y){return h.GetTileAtWorldXY(m,g,v,y,this.layer)},getIsoTileAtWorldXY:function(m,g,v,y,x){v===void 0&&(v=!0);var b=this.tempVec;return h.IsometricWorldToTileXY(m,g,!0,b,x,this.layer,v),this.getTileAt(b.x,b.y,y)},getTilesWithin:function(m,g,v,y,x){return h.GetTilesWithin(m,g,v,y,x,this.layer)},getTilesWithinShape:function(m,g,v){return h.GetTilesWithinShape(m,g,v,this.layer)},getTilesWithinWorldXY:function(m,g,v,y,x,b){return h.GetTilesWithinWorldXY(m,g,v,y,x,b,this.layer)},hasTileAt:function(m,g){return h.HasTileAt(m,g,this.layer)},hasTileAtWorldXY:function(m,g,v){return h.HasTileAtWorldXY(m,g,v,this.layer)},putTileAt:function(m,g,v,y){return h.PutTileAt(m,g,v,y,this.layer)},putTileAtWorldXY:function(m,g,v,y,x){return h.PutTileAtWorldXY(m,g,v,y,x,this.layer)},putTilesAt:function(m,g,v,y){return h.PutTilesAt(m,g,v,y,this.layer),this},randomize:function(m,g,v,y,x){return h.Randomize(m,g,v,y,x,this.layer),this},removeTileAt:function(m,g,v,y){return h.RemoveTileAt(m,g,v,y,this.layer)},removeTileAtWorldXY:function(m,g,v,y,x){return h.RemoveTileAtWorldXY(m,g,v,y,x,this.layer)},renderDebug:function(m,g){return h.RenderDebug(m,g,this.layer),this},replaceByIndex:function(m,g,v,y,x,b){return h.ReplaceByIndex(m,g,v,y,x,b,this.layer),this},setSkipCull:function(m){return m===void 0&&(m=!0),this.skipCull=m,this},setCullPadding:function(m,g){return m===void 0&&(m=1),g===void 0&&(g=1),this.cullPaddingX=m,this.cullPaddingY=g,this},setCollision:function(m,g,v,y){return h.SetCollision(m,g,v,this.layer,y),this},setCollisionBetween:function(m,g,v,y){return h.SetCollisionBetween(m,g,v,y,this.layer),this},setCollisionByProperty:function(m,g,v){return h.SetCollisionByProperty(m,g,v,this.layer),this},setCollisionByExclusion:function(m,g,v){return h.SetCollisionByExclusion(m,g,v,this.layer),this},setCollisionFromCollisionGroup:function(m,g){return h.SetCollisionFromCollisionGroup(m,g,this.layer),this},setTileIndexCallback:function(m,g,v){return h.SetTileIndexCallback(m,g,v,this.layer),this},setTileLocationCallback:function(m,g,v,y,x,b){return h.SetTileLocationCallback(m,g,v,y,x,b,this.layer),this},shuffle:function(m,g,v,y){return h.Shuffle(m,g,v,y,this.layer),this},swapByIndex:function(m,g,v,y,x,b){return h.SwapByIndex(m,g,v,y,x,b,this.layer),this},tileToWorldX:function(m,g){return this.tilemap.tileToWorldX(m,g,this)},tileToWorldY:function(m,g){return this.tilemap.tileToWorldY(m,g,this)},tileToWorldXY:function(m,g,v,y){return this.tilemap.tileToWorldXY(m,g,v,y,this)},getTileCorners:function(m,g,v){return this.tilemap.getTileCorners(m,g,v,this)},weightedRandomize:function(m,g,v,y,x){return h.WeightedRandomize(g,v,y,x,m,this.layer),this},worldToTileX:function(m,g,v){return this.tilemap.worldToTileX(m,g,v,this)},worldToTileY:function(m,g,v){return this.tilemap.worldToTileY(m,g,v,this)},worldToTileXY:function(m,g,v,y,x){return this.tilemap.worldToTileXY(m,g,v,y,x,this)},destroy:function(m){m===void 0&&(m=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),m&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],c.prototype.destroy.call(this))}});n.exports=p},16153:(n,a,s)=>{var o=s(61340),d=new o,l=new o,c=new o,h=function(u,f,p,m){var g=f.cull(p),v=g.length,y=p.alpha*f.alpha;if(!(v===0||y<=0)){var x=d,b=l,_=c;b.applyITRS(f.x,f.y,f.rotation,f.scaleX,f.scaleY),x.copyFrom(p.matrix);var C=u.currentContext,w=f.gidMap;C.save(),m?(x.multiplyWithOffset(m,-p.scrollX*f.scrollFactorX,-p.scrollY*f.scrollFactorY),b.e=f.x,b.f=f.y,x.multiply(b,_),_.copyToContext(C)):(b.e-=p.scrollX*f.scrollFactorX,b.f-=p.scrollY*f.scrollFactorY,b.copyToContext(C)),(!u.antialias||f.scaleX>1||f.scaleY>1)&&(C.imageSmoothingEnabled=!1);for(var T=0;T{var o=s(29747),d=o,l=o;d=s(99558),l=s(16153),n.exports={renderWebGL:d,renderCanvas:l}},99558:(n,a,s)=>{var o=s(70554),d=function(l,c,h){var u=c.cull(h),f=u.length,p=h.alpha*c.alpha;if(!(f===0||p<=0)){var m=c.gidMap,g=l.pipelines.set(c.pipeline,c),v=o.getTintAppendFloatAlpha,y=c.scrollFactorX,x=c.scrollFactorY,b=c.x,_=c.y,C=c.scaleX,w=c.scaleY;l.pipelines.preBatch(c);for(var T=0;T{var o=s(83419),d=s(26099),l=new o({initialize:function(h,u,f,p,m,g,v,y,x){(f===void 0||f<=0)&&(f=32),(p===void 0||p<=0)&&(p=32),m===void 0&&(m=0),g===void 0&&(g=0),v===void 0&&(v={}),y===void 0&&(y={}),this.name=h,this.firstgid=u,this.tileWidth=f,this.tileHeight=p,this.tileMargin=m,this.tileSpacing=g,this.tileProperties=v,this.tileData=y,this.tileOffset=new d,x!==void 0&&this.tileOffset.set(x.x,x.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(c){return this.containsTileIndex(c)?this.tileProperties[c-this.firstgid]:null},getTileData:function(c){return this.containsTileIndex(c)?this.tileData[c-this.firstgid]:null},getTileCollisionGroup:function(c){var h=this.getTileData(c);return h&&h.objectgroup?h.objectgroup:null},containsTileIndex:function(c){return c>=this.firstgid&&cu.width||h.height>u.height?this.updateTileData(h.width,h.height):this.updateTileData(u.width,u.height,u.x,u.y),this},setTileSize:function(c,h){return c!==void 0&&(this.tileWidth=c),h!==void 0&&(this.tileHeight=h),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(c,h){return c!==void 0&&(this.tileMargin=c),h!==void 0&&(this.tileSpacing=h),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(c,h,u,f){u===void 0&&(u=0),f===void 0&&(f=0);var p=(h-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),m=(c-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(p%1!==0||m%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),p=Math.floor(p),m=Math.floor(m),this.rows=p,this.columns=m,this.total=p*m,this.texCoordinates.length=0;for(var g=this.tileMargin+u,v=this.tileMargin+f,y=0;y{var o=s(7423),d=function(l,c,h){var u=o(l,c,!0,h),f=o(l,c-1,!0,h),p=o(l,c+1,!0,h),m=o(l-1,c,!0,h),g=o(l+1,c,!0,h),v=u&&u.collides;return v&&(u.faceTop=!0,u.faceBottom=!0,u.faceLeft=!0,u.faceRight=!0),f&&f.collides&&(v&&(u.faceTop=!1),f.faceBottom=!v),p&&p.collides&&(v&&(u.faceBottom=!1),p.faceTop=!v),m&&m.collides&&(v&&(u.faceLeft=!1),m.faceRight=!v),g&&g.collides&&(v&&(u.faceRight=!1),g.faceLeft=!v),u&&!u.collides&&u.resetFaces(),u};n.exports=d},42573:(n,a,s)=>{var o=s(7423),d=s(7386),l=function(c,h,u,f,p){for(var m=null,g=null,v=null,y=null,x=d(c,h,u,f,null,p),b=0;b{var o=s(26099),d=new o,l=function(c,h,u,f){var p=u.tilemapLayer,m=p.cullPaddingX,g=p.cullPaddingY,v=p.tilemap.tileToWorldXY(c,h,d,f,p);return v.x>f.worldView.x+p.scaleX*u.tileWidth*(-m-.5)&&v.xf.worldView.y+p.scaleY*u.tileHeight*(-g-1)&&v.y{var o=s(42573),d=s(7386),l=s(62991),c=s(23029),h=function(u,f,p,m,g,v,y,x){y===void 0&&(y=!0);var b=d(u,f,p,m,null,x),_=[];b.forEach(function(A){var M=new c(A.layer,A.index,A.x,A.y,A.width,A.height,A.baseWidth,A.baseHeight);M.copy(A),_.push(M)});for(var C=g-u,w=v-f,T=0;T<_.length;T++){var S=_[T],E=S.x+C,D=S.y+w;l(E,D,x)&&x.data[D][E]&&(S.x=E,S.y=D,S.updatePixelXY(),x.data[D][E]=S)}y&&o(g-1,v-1,p+2,m+2,x),b.length=0,_.length=0};n.exports=h},78419:(n,a,s)=>{var o=s(62644),d=s(7386),l=s(27987),c=function(h,u,f,p,m,g){f||(f={}),Array.isArray(h)||(h=[h]);var v=g.tilemapLayer;p||(p=v.scene),m||(m=p.cameras.main);var y=g.width,x=g.height,b=d(0,0,y,x,null,g),_=[],C,w=function(D,A,M){for(var R=0;R{var o=s(87841),d=s(63448),l=s(56583),c=new o,h=function(u,f){var p=u.tilemapLayer.tilemap,m=u.tilemapLayer,g=Math.floor(p.tileWidth*m.scaleX),v=Math.floor(p.tileHeight*m.scaleY),y=l(f.worldView.x-m.x,g,0,!0)-m.cullPaddingX,x=d(f.worldView.right-m.x,g,0,!0)+m.cullPaddingX,b=l(f.worldView.y-m.y,v,0,!0)-m.cullPaddingY,_=d(f.worldView.bottom-m.y,v,0,!0)+m.cullPaddingY;return c.setTo(y,b,x-y,_-b)};n.exports=h},30003:(n,a,s)=>{var o=s(19545),d=s(32483),l=function(c,h,u,f){u===void 0&&(u=[]),f===void 0&&(f=0),u.length=0;var p=c.tilemapLayer,m=o(c,h);return(p.skipCull||p.scrollFactorX!==1||p.scrollFactorY!==1)&&(m.left=0,m.right=c.width,m.top=0,m.bottom=c.height),d(c,m,f,u),u};n.exports=l},35137:(n,a,s)=>{var o=s(7386),d=s(42573),l=s(20576),c=function(h,u,f,p,m,g,v){for(var y=v.collideIndexes.indexOf(h)!==-1,x=o(u,f,p,m,null,v),b=0;b{var o=s(7386),d=function(l,c,h,u,f,p,m,g){var v=o(h,u,f,p,m,g);return v.filter(l,c)};n.exports=d},52692:n=>{var a=function(s,o,d,l){o===void 0&&(o=0),d===void 0&&(d=!1);var c=0,h,u,f;if(d){for(u=l.height-1;u>=0;u--)for(h=l.width-1;h>=0;h--)if(f=l.data[u][h],f&&f.index===s){if(c===o)return f;c+=1}}else for(u=0;u{var o=s(7386),d=function(l,c,h,u,f,p,m,g){var v=o(h,u,f,p,m,g);return v.find(l,c)||null};n.exports=d},97560:(n,a,s)=>{var o=s(7386),d=function(l,c,h,u,f,p,m,g){var v=o(h,u,f,p,m,g);v.forEach(l,c)};n.exports=d},43305:(n,a,s)=>{var o=s(91907),d=s(30003),l=s(9474),c=s(14018),h=s(29747),u=s(54503),f=function(p){return p===o.ORTHOGONAL?d:p===o.HEXAGONAL?l:p===o.STAGGERED?u:p===o.ISOMETRIC?c:h};n.exports=f},7423:(n,a,s)=>{var o=s(62991),d=function(l,c,h,u){if(o(l,c,u)){var f=u.data[c][l]||null;return f?f.index===-1?h?f:null:f:null}else return null};n.exports=d},60540:(n,a,s)=>{var o=s(7423),d=s(26099),l=new d,c=function(h,u,f,p,m){return m.tilemapLayer.worldToTileXY(h,u,!0,l,p),o(l.x,l.y,f,m)};n.exports=c},55826:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u){var f=u.baseTileWidth,p=u.baseTileHeight,m=u.tilemapLayer,g=0,v=0;m&&(h||(h=m.scene.cameras.main),g=m.x+h.scrollX*(1-m.scrollFactorX),v=m.y+h.scrollY*(1-m.scrollFactorY),f*=m.scaleX,p*=m.scaleY);var y=g+l*f,x=v+c*p;return[new o(y,x),new o(y+f,x),new o(y+f,x+p),new o(y,x+p)]};n.exports=d},11758:(n,a,s)=>{var o=s(91907),d=s(27229),l=s(29747),c=s(55826),h=function(u){return u===o.ORTHOGONAL?c:u===o.ISOMETRIC?l:u===o.HEXAGONAL?d:(u===o.STAGGERED,l)};n.exports=h},39167:(n,a,s)=>{var o=s(91907),d=s(29747),l=s(97281),c=function(h){return h===o.ORTHOGONAL?l:d};n.exports=c},62e3:(n,a,s)=>{var o=s(91907),d=s(19951),l=s(14127),c=s(29747),h=s(97202),u=s(70326),f=function(p){return p===o.ORTHOGONAL?u:p===o.ISOMETRIC?l:p===o.HEXAGONAL?d:p===o.STAGGERED?h:c};n.exports=f},5984:(n,a,s)=>{var o=s(91907),d=s(29747),l=s(28054),c=s(29650),h=function(u){return u===o.ORTHOGONAL?c:u===o.STAGGERED?l:d};n.exports=h},7386:(n,a,s)=>{var o=s(95540),d=function(l,c,h,u,f,p){l===void 0&&(l=0),c===void 0&&(c=0),h===void 0&&(h=p.width),u===void 0&&(u=p.height),f||(f={});var m=o(f,"isNotEmpty",!1),g=o(f,"isColliding",!1),v=o(f,"hasInterestingFace",!1);l<0&&(h+=l,l=0),c<0&&(u+=c,c=0),l+h>p.width&&(h=Math.max(p.width-l,0)),c+u>p.height&&(u=Math.max(p.height-c,0));for(var y=[],x=c;x{var o=s(55738),d=s(7386),l=s(91865),c=s(29747),h=s(26099),u=function(v,y){return l.RectangleToTriangle(y,v)},f=new h,p=new h,m=new h,g=function(v,y,x,b){if(v===void 0)return[];var _=c;v instanceof o.Circle?_=l.CircleToRectangle:v instanceof o.Rectangle?_=l.RectangleToRectangle:v instanceof o.Triangle?_=u:v instanceof o.Line&&(_=l.LineToRectangle),b.tilemapLayer.worldToTileXY(v.left,v.top,!0,p,x);var C=p.x,w=p.y;b.tilemapLayer.worldToTileXY(v.right,v.bottom,!1,m,x);var T=Math.ceil(m.x),S=Math.ceil(m.y),E=Math.max(T-C,1),D=Math.max(S-w,1),A=d(C,w,E,D,y,b),M=b.tileWidth,R=b.tileHeight;b.tilemapLayer&&(M*=b.tilemapLayer.scaleX,R*=b.tilemapLayer.scaleY);for(var L=[],I=new o.Rectangle(0,0,M,R),O=0;O{var o=s(7386),d=s(26099),l=new d,c=new d,h=function(u,f,p,m,g,v,y){var x=y.tilemapLayer.tilemap._convert.WorldToTileXY;x(u,f,!0,l,v,y);var b=l.x,_=l.y;x(u+p,f+m,!1,c,v,y);var C=Math.ceil(c.x),w=Math.ceil(c.y);return o(b,_,C-b,w-_,g,y)};n.exports=h},96113:(n,a,s)=>{var o=s(91907),d=s(20242),l=s(10095),c=function(h){return h===o.ORTHOGONAL?l:d};n.exports=c},16926:(n,a,s)=>{var o=s(91907),d=s(86625),l=s(96897),c=s(29747),h=s(15108),u=s(85896),f=function(p){return p===o.ORTHOGONAL?u:p===o.ISOMETRIC?l:p===o.HEXAGONAL?d:p===o.STAGGERED?h:c};n.exports=f},55762:(n,a,s)=>{var o=s(91907),d=s(20242),l=s(51900),c=s(63288),h=function(u){return u===o.ORTHOGONAL?c:u===o.STAGGERED?l:d};n.exports=h},45091:(n,a,s)=>{var o=s(62991),d=function(l,c,h){if(o(l,c,h)){var u=h.data[c][l];return u!==null&&u.index>-1}else return!1};n.exports=d},24152:(n,a,s)=>{var o=s(45091),d=s(26099),l=new d,c=function(h,u,f,p){p.tilemapLayer.worldToTileXY(h,u,!0,l,f);var m=l.x,g=l.y;return o(m,g,p)};n.exports=c},90454:(n,a,s)=>{var o=s(63448),d=s(56583),l=function(c,h){var u=c.tilemapLayer.tilemap,f=c.tilemapLayer,p=Math.floor(u.tileWidth*f.scaleX),m=Math.floor(u.tileHeight*f.scaleY),g=c.hexSideLength,v,y,x,b;if(c.staggerAxis==="y"){var _=(m-g)/2+g;v=d(h.worldView.x-f.x,p,0,!0)-f.cullPaddingX,y=o(h.worldView.right-f.x,p,0,!0)+f.cullPaddingX,x=d(h.worldView.y-f.y,_,0,!0)-f.cullPaddingY,b=o(h.worldView.bottom-f.y,_,0,!0)+f.cullPaddingY}else{var C=(p-g)/2+g;v=d(h.worldView.x-f.x,C,0,!0)-f.cullPaddingX,y=o(h.worldView.right-f.x,C,0,!0)+f.cullPaddingX,x=d(h.worldView.y-f.y,m,0,!0)-f.cullPaddingY,b=o(h.worldView.bottom-f.y,m,0,!0)+f.cullPaddingY}return{left:v,right:y,top:x,bottom:b}};n.exports=l},9474:(n,a,s)=>{var o=s(90454),d=s(32483),l=function(c,h,u,f){u===void 0&&(u=[]),f===void 0&&(f=0),u.length=0;var p=c.tilemapLayer,m=o(c,h);return p.skipCull&&p.scrollFactorX===1&&p.scrollFactorY===1&&(m.left=0,m.right=c.width,m.top=0,m.bottom=c.height),d(c,m,f,u),u};n.exports=l},27229:(n,a,s)=>{var o=s(19951),d=s(26099),l=new d,c=function(h,u,f,p){var m=p.baseTileWidth,g=p.baseTileHeight,v=p.tilemapLayer;v&&(m*=v.scaleX,g*=v.scaleY);var y=o(h,u,l,f,p),x=[],b=.5773502691896257,_,C;p.staggerAxis==="y"?(_=b*m,C=g/2):(_=m/2,C=b*g);for(var w=0;w<6;w++){var T=2*Math.PI*(.5-w)/6;x.push(new d(y.x+_*Math.cos(T),y.y+C*Math.sin(T)))}return x};n.exports=c},19951:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u,f){h||(h=new o);var p=f.baseTileWidth,m=f.baseTileHeight,g=f.tilemapLayer,v=0,y=0;g&&(u||(u=g.scene.cameras.main),v=g.x+u.scrollX*(1-g.scrollFactorX),y=g.y+u.scrollY*(1-g.scrollFactorY),p*=g.scaleX,m*=g.scaleY);var x=p/2,b=m/2,_,C,w=f.staggerAxis,T=f.staggerIndex;return w==="y"?(_=v+p*l+p,C=y+1.5*c*b+b,c%2===0&&(T==="odd"?_-=x:_+=x)):w==="x"&&T==="odd"&&(_=v+1.5*l*x+x,C=y+m*l+m,l%2===0&&(T==="odd"?C-=b:C+=b)),h.set(_,C)};n.exports=d},86625:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u,f,p){u||(u=new o);var m=p.baseTileWidth,g=p.baseTileHeight,v=p.tilemapLayer;v&&(f||(f=v.scene.cameras.main),l=l-(v.x+f.scrollX*(1-v.scrollFactorX)),c=c-(v.y+f.scrollY*(1-v.scrollFactorY)),m*=v.scaleX,g*=v.scaleY);var y=.5773502691896257,x=-.3333333333333333,b=0,_=.6666666666666666,C=m/2,w=g/2,T,S,E,D,A;p.staggerAxis==="y"?(T=(l-C)/(y*m),S=(c-w)/w,E=y*T+x*S,D=b*T+_*S):(T=(l-C)/C,S=(c-w)/(y*g),E=x*T+y*S,D=_*T+b*S),A=-E-D;var M=Math.round(E),R=Math.round(D),L=Math.round(A),I=Math.abs(M-E),O=Math.abs(R-D),N=Math.abs(L-A);I>O&&I>N?M=-R-L:O>N&&(R=-M-L);var H,X=R;return p.staggerIndex==="odd"?H=X%2===0?R/2+M:R/2+M-.5:H=X%2===0?R/2+M:R/2+M+.5,u.set(H,X)};n.exports=d},62991:n=>{var a=function(s,o,d){return s>=0&&s=0&&o{var o=s(33528),d=function(l,c,h,u){h===void 0&&(h=[]),u===void 0&&(u=0),h.length=0;var f=l.tilemapLayer,p=l.data,m=l.width,g=l.height,v=f.skipCull,y=0,x=m,b=0,_=g,C,w,T;if(u===0)for(w=b;w<_;w++)for(C=y;C=y;C--)T=p[w][C],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!v&&!o(C,w,l,c)||h.push(T));else if(u===2)for(w=_;w>=b;w--)for(C=y;C=b;w--)for(C=x;C>=y;C--)T=p[w][C],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!v&&!o(C,w,l,c)||h.push(T));return f.tilesDrawn=h.length,f.tilesTotal=m*g,h};n.exports=d},14127:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u,f){h||(h=new o);var p=f.baseTileWidth,m=f.baseTileHeight,g=f.tilemapLayer,v=0,y=0;g&&(u||(u=g.scene.cameras.main),v=g.x+u.scrollX*(1-g.scrollFactorX),p*=g.scaleX,y=g.y+u.scrollY*(1-g.scrollFactorY),m*=g.scaleY);var x=v+(l-c)*(p/2),b=y+(l+c)*(m/2);return h.set(x,b)};n.exports=d},96897:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u,f,p,m){u||(u=new o);var g=p.baseTileWidth,v=p.baseTileHeight,y=p.tilemapLayer;y&&(f||(f=y.scene.cameras.main),c=c-(y.y+f.scrollY*(1-y.scrollFactorY)),v*=y.scaleY,l=l-(y.x+f.scrollX*(1-y.scrollFactorX)),g*=y.scaleX);var x=g/2,b=v/2;l=l-x,m||(c=c-v);var _=.5*(l/x+c/b),C=.5*(-l/x+c/b);return h&&(_=Math.floor(_),C=Math.floor(C)),u.set(_,C)};n.exports=d},71558:(n,a,s)=>{var o=s(23029),d=s(62991),l=s(72023),c=s(20576),h=function(u,f,p,m,g){if(m===void 0&&(m=!0),!d(f,p,g))return null;var v,y=g.data[p][f],x=y&&y.collides;u instanceof o?(g.data[p][f]===null&&(g.data[p][f]=new o(g,u.index,f,p,g.tileWidth,g.tileHeight)),g.data[p][f].copy(u)):(v=u,g.data[p][f]===null?g.data[p][f]=new o(g,v,f,p,g.tileWidth,g.tileHeight):g.data[p][f].index=v);var b=g.data[p][f],_=g.collideIndexes.indexOf(b.index)!==-1;if(v=u instanceof o?u.index:u,v===-1)b.width=g.tileWidth,b.height=g.tileHeight;else{var C=g.tilemapLayer.tilemap,w=C.tiles,T=w[v][2],S=C.tilesets[T];b.width=S.tileWidth,b.height=S.tileHeight}return c(b,_),m&&x!==b.collides&&l(f,p,g),b};n.exports=h},26303:(n,a,s)=>{var o=s(71558),d=s(26099),l=new d,c=function(h,u,f,p,m,g){return g.tilemapLayer.worldToTileXY(u,f,!0,l,m,g),o(h,l.x,l.y,p,g)};n.exports=c},14051:(n,a,s)=>{var o=s(42573),d=s(71558),l=function(c,h,u,f,p){if(f===void 0&&(f=!0),!Array.isArray(c))return null;Array.isArray(c[0])||(c=[c]);for(var m=c.length,g=c[0].length,v=0;v{var o=s(7386),d=s(26546),l=function(c,h,u,f,p,m){var g,v=o(c,h,u,f,{},m);if(!p)for(p=[],g=0;g{var o=s(23029),d=s(62991),l=s(72023),c=function(h,u,f,p,m){if(f===void 0&&(f=!0),p===void 0&&(p=!0),!d(h,u,m))return null;var g=m.data[u][h];if(g)m.data[u][h]=f?null:new o(m,-1,h,u,m.tileWidth,m.tileHeight);else return null;return p&&g&&g.collides&&l(h,u,m),g};n.exports=c},94178:(n,a,s)=>{var o=s(63557),d=s(26099),l=new d,c=function(h,u,f,p,m,g){return g.tilemapLayer.worldToTileXY(h,u,!0,l,m,g),o(l.x,l.y,f,p,g)};n.exports=c},15533:(n,a,s)=>{var o=s(7386),d=s(3956),l=new d(105,210,231,150),c=new d(243,134,48,200),h=new d(40,39,37,150),u=function(f,p,m){p===void 0&&(p={});var g=p.tileColor!==void 0?p.tileColor:l,v=p.collidingTileColor!==void 0?p.collidingTileColor:c,y=p.faceColor!==void 0?p.faceColor:h,x=o(0,0,m.width,m.height,null,m);f.translateCanvas(m.tilemapLayer.x,m.tilemapLayer.y),f.scaleCanvas(m.tilemapLayer.scaleX,m.tilemapLayer.scaleY);for(var b=0;b{var o=s(7386),d=function(l,c,h,u,f,p,m){for(var g=o(h,u,f,p,null,m),v=0;v{var a=function(s,o,d,l){var c=s.data,h=s.width,u=s.height,f=s.tilemapLayer,p=Math.max(0,o.left),m=Math.min(h,o.right),g=Math.max(0,o.top),v=Math.min(u,o.bottom),y,x,b;if(d===0)for(x=g;x=p;y--)b=c[x][y],!(!b||b.index===-1||!b.visible||b.alpha===0)&&l.push(b);else if(d===2)for(x=v;x>=g;x--)for(y=p;c[x]&&y=g;x--)for(y=m;c[x]&&y>=p;y--)b=c[x][y],!(!b||b.index===-1||!b.visible||b.alpha===0)&&l.push(b);return f.tilesDrawn=l.length,f.tilesTotal=h*u,l};n.exports=a},57068:(n,a,s)=>{var o=s(20576),d=s(42573),l=s(9589),c=function(h,u,f,p,m){u===void 0&&(u=!0),f===void 0&&(f=!0),m===void 0&&(m=!0),Array.isArray(h)||(h=[h]);for(var g=0;g{var o=s(20576),d=s(42573),l=s(9589),c=function(h,u,f,p,m,g){if(f===void 0&&(f=!0),p===void 0&&(p=!0),g===void 0&&(g=!0),!(h>u)){for(var v=h;v<=u;v++)l(v,f,m);if(g)for(var y=0;y=h&&b.index<=u&&o(b,f)}p&&d(0,0,m.width,m.height,m)}};n.exports=c},75661:(n,a,s)=>{var o=s(20576),d=s(42573),l=s(9589),c=function(h,u,f,p){u===void 0&&(u=!0),f===void 0&&(f=!0),Array.isArray(h)||(h=[h]);for(var m=0;m{var o=s(20576),d=s(42573),l=s(97022),c=function(h,u,f,p){u===void 0&&(u=!0),f===void 0&&(f=!0);for(var m=0;m{var o=s(20576),d=s(42573),l=function(c,h,u){c===void 0&&(c=!0),h===void 0&&(h=!0);for(var f=0;f0&&o(m,c)}}h&&d(0,0,u.width,u.height,u)};n.exports=l},9589:n=>{var a=function(s,o,d){var l=d.collideIndexes.indexOf(s);o&&l===-1?d.collideIndexes.push(s):!o&&l!==-1&&d.collideIndexes.splice(l,1)};n.exports=a},20576:n=>{var a=function(s,o){o?s.setCollision(!0,!0,!0,!0,!1):s.resetCollision(!1)};n.exports=a},79583:n=>{var a=function(s,o,d,l){if(typeof s=="number")l.callbacks[s]=o!==null?{callback:o,callbackContext:d}:void 0;else for(var c=0,h=s.length;c{var o=s(7386),d=function(l,c,h,u,f,p,m){for(var g=o(l,c,h,u,null,m),v=0;v{var o=s(7386),d=s(33680),l=function(c,h,u,f,p){var m=o(c,h,u,f,null,p),g=m.map(function(y){return y.index});d(g);for(var v=0;v{var o=s(63448),d=s(56583),l=function(c,h){var u=c.tilemapLayer.tilemap,f=c.tilemapLayer,p=Math.floor(u.tileWidth*f.scaleX),m=Math.floor(u.tileHeight*f.scaleY),g=d(h.worldView.x-f.x,p,0,!0)-f.cullPaddingX,v=o(h.worldView.right-f.x,p,0,!0)+f.cullPaddingX,y=d(h.worldView.y-f.y,m/2,0,!0)-f.cullPaddingY,x=o(h.worldView.bottom-f.y,m/2,0,!0)+f.cullPaddingY;return{left:g,right:v,top:y,bottom:x}};n.exports=l},54503:(n,a,s)=>{var o=s(61325),d=s(32483),l=function(c,h,u,f){u===void 0&&(u=[]),f===void 0&&(f=0),u.length=0;var p=c.tilemapLayer,m=o(c,h);return p.skipCull&&p.scrollFactorX===1&&p.scrollFactorY===1&&(m.left=0,m.right=c.width,m.top=0,m.bottom=c.height),d(c,m,f,u),u};n.exports=l},97202:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u,f){h||(h=new o);var p=f.baseTileWidth,m=f.baseTileHeight,g=f.tilemapLayer,v=0,y=0;g&&(u||(u=g.scene.cameras.main),v=g.x+u.scrollX*(1-g.scrollFactorX),p*=g.scaleX,y=g.y+u.scrollY*(1-g.scrollFactorY),m*=g.scaleY);var x=v+l*p+c%2*(p/2),b=y+c*(m/2);return h.set(x,b)};n.exports=d},28054:n=>{var a=function(s,o,d){var l=d.baseTileHeight,c=d.tilemapLayer,h=0;return c&&(o===void 0&&(o=c.scene.cameras.main),h=c.y+o.scrollY*(1-c.scrollFactorY),l*=c.scaleY),h+s*(l/2)+l};n.exports=a},15108:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u,f,p){u||(u=new o);var m=p.baseTileWidth,g=p.baseTileHeight,v=p.tilemapLayer;v&&(f||(f=v.scene.cameras.main),c=c-(v.y+f.scrollY*(1-v.scrollFactorY)),g*=v.scaleY,l=l-(v.x+f.scrollX*(1-v.scrollFactorX)),m*=v.scaleX);var y=h?Math.floor(c/(g/2)):c/(g/2),x=h?Math.floor((l+y%2*.5*m)/m):(l+y%2*.5*m)/m;return u.set(x,y)};n.exports=d},51900:n=>{var a=function(s,o,d,l){var c=l.baseTileHeight,h=l.tilemapLayer;return h&&(d||(d=h.scene.cameras.main),s=s-(h.y+d.scrollY*(1-h.scrollFactorY)),c*=h.scaleY),o?Math.floor(s/(c/2)):s/(c/2)};n.exports=a},86560:(n,a,s)=>{var o=s(7386),d=function(l,c,h,u,f,p,m){for(var g=o(h,u,f,p,null,m),v=0;v{var a=function(s,o,d){var l=d.baseTileWidth,c=d.tilemapLayer,h=0;return c&&(o||(o=c.scene.cameras.main),h=c.x+o.scrollX*(1-c.scrollFactorX),l*=c.scaleX),h+s*l};n.exports=a},70326:(n,a,s)=>{var o=s(97281),d=s(29650),l=s(26099),c=function(h,u,f,p,m){return f||(f=new l(0,0)),f.x=o(h,p,m),f.y=d(u,p,m),f};n.exports=c},29650:n=>{var a=function(s,o,d){var l=d.baseTileHeight,c=d.tilemapLayer,h=0;return c&&(o||(o=c.scene.cameras.main),h=c.y+o.scrollY*(1-c.scrollFactorY),l*=c.scaleY),h+s*l};n.exports=a},77366:(n,a,s)=>{var o=s(7386),d=s(75508),l=function(c,h,u,f,p,m){if(p){var g,v=o(c,h,u,f,null,m),y=0;for(g=0;g{var o=s(85896),d=s(26099),l=new d,c=function(h,u,f,p){return o(h,0,u,l,f,p),l.x};n.exports=c},85896:(n,a,s)=>{var o=s(26099),d=function(l,c,h,u,f,p){h===void 0&&(h=!0),u||(u=new o);var m=p.baseTileWidth,g=p.baseTileHeight,v=p.tilemapLayer;v&&(f||(f=v.scene.cameras.main),l=l-(v.x+f.scrollX*(1-v.scrollFactorX)),c=c-(v.y+f.scrollY*(1-v.scrollFactorY)),m*=v.scaleX,g*=v.scaleY);var y=l/m,x=c/g;return h&&(y=Math.floor(y),x=Math.floor(x)),u.set(y,x)};n.exports=d},63288:(n,a,s)=>{var o=s(85896),d=s(26099),l=new d,c=function(h,u,f,p){return o(0,h,u,l,f,p),l.y};n.exports=c},81086:(n,a,s)=>{n.exports={CalculateFacesAt:s(72023),CalculateFacesWithin:s(42573),CheckIsoBounds:s(33528),Copy:s(1785),CreateFromTiles:s(78419),CullBounds:s(19545),CullTiles:s(30003),Fill:s(35137),FilterTiles:s(40253),FindByIndex:s(52692),FindTile:s(66151),ForEachTile:s(97560),GetCullTilesFunction:s(43305),GetTileAt:s(7423),GetTileAtWorldXY:s(60540),GetTileCorners:s(55826),GetTileCornersFunction:s(11758),GetTilesWithin:s(7386),GetTilesWithinShape:s(91141),GetTilesWithinWorldXY:s(96523),GetTileToWorldXFunction:s(39167),GetTileToWorldXYFunction:s(62e3),GetTileToWorldYFunction:s(5984),GetWorldToTileXFunction:s(96113),GetWorldToTileXYFunction:s(16926),GetWorldToTileYFunction:s(55762),HasTileAt:s(45091),HasTileAtWorldXY:s(24152),HexagonalCullBounds:s(90454),HexagonalCullTiles:s(9474),HexagonalGetTileCorners:s(27229),HexagonalTileToWorldXY:s(19951),HexagonalWorldToTileXY:s(86625),IsInLayerBounds:s(62991),IsometricCullTiles:s(14018),IsometricTileToWorldXY:s(14127),IsometricWorldToTileXY:s(96897),PutTileAt:s(71558),PutTileAtWorldXY:s(26303),PutTilesAt:s(14051),Randomize:s(77389),RemoveTileAt:s(63557),RemoveTileAtWorldXY:s(94178),RenderDebug:s(15533),ReplaceByIndex:s(27987),RunCull:s(32483),SetCollision:s(57068),SetCollisionBetween:s(37266),SetCollisionByExclusion:s(75661),SetCollisionByProperty:s(64740),SetCollisionFromCollisionGroup:s(63307),SetLayerCollisionIndex:s(9589),SetTileCollision:s(20576),SetTileIndexCallback:s(79583),SetTileLocationCallback:s(93254),Shuffle:s(32903),StaggeredCullBounds:s(61325),StaggeredCullTiles:s(54503),StaggeredTileToWorldXY:s(97202),StaggeredTileToWorldY:s(28054),StaggeredWorldToTileXY:s(15108),StaggeredWorldToTileY:s(51900),SwapByIndex:s(86560),TileToWorldX:s(97281),TileToWorldXY:s(70326),TileToWorldY:s(29650),WeightedRandomize:s(77366),WorldToTileX:s(10095),WorldToTileXY:s(85896),WorldToTileY:s(63288)}},91907:n=>{n.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(n,a,s)=>{var o={ORIENTATION:s(91907)};n.exports=o},62501:(n,a,s)=>{var o=s(79291),d=s(21829),l={Components:s(81086),Parsers:s(57442),Formats:s(80341),ImageCollection:s(16536),ParseToTilemap:s(31989),Tile:s(23029),Tilemap:s(49075),TilemapCreator:s(45939),TilemapFactory:s(46029),Tileset:s(33629),TilemapLayer:s(20442),Orientation:s(91907),LayerData:s(14977),MapData:s(87010),ObjectLayer:s(48700)};l=o(!1,l,d.ORIENTATION),n.exports=l},14977:(n,a,s)=>{var o=s(83419),d=s(91907),l=s(95540),c=new o({initialize:function(u){u===void 0&&(u={}),this.name=l(u,"name","layer"),this.id=l(u,"id",0),this.x=l(u,"x",0),this.y=l(u,"y",0),this.width=l(u,"width",0),this.height=l(u,"height",0),this.tileWidth=l(u,"tileWidth",0),this.tileHeight=l(u,"tileHeight",0),this.baseTileWidth=l(u,"baseTileWidth",this.tileWidth),this.baseTileHeight=l(u,"baseTileHeight",this.tileHeight),this.orientation=l(u,"orientation",d.ORTHOGONAL),this.widthInPixels=l(u,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=l(u,"heightInPixels",this.height*this.baseTileHeight),this.alpha=l(u,"alpha",1),this.visible=l(u,"visible",!0),this.properties=l(u,"properties",[]),this.indexes=l(u,"indexes",[]),this.collideIndexes=l(u,"collideIndexes",[]),this.callbacks=l(u,"callbacks",[]),this.bodies=l(u,"bodies",[]),this.data=l(u,"data",[]),this.tilemapLayer=l(u,"tilemapLayer",null),this.hexSideLength=l(u,"hexSideLength",0),this.staggerAxis=l(u,"staggerAxis","y"),this.staggerIndex=l(u,"staggerIndex","odd")}});n.exports=c},87010:(n,a,s)=>{var o=s(83419),d=s(91907),l=s(95540),c=new o({initialize:function(u){u===void 0&&(u={}),this.name=l(u,"name","map"),this.width=l(u,"width",0),this.height=l(u,"height",0),this.infinite=l(u,"infinite",!1),this.tileWidth=l(u,"tileWidth",0),this.tileHeight=l(u,"tileHeight",0),this.widthInPixels=l(u,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=l(u,"heightInPixels",this.height*this.tileHeight),this.format=l(u,"format",null),this.orientation=l(u,"orientation",d.ORTHOGONAL),this.renderOrder=l(u,"renderOrder","right-down"),this.version=l(u,"version","1"),this.properties=l(u,"properties",{}),this.layers=l(u,"layers",[]),this.images=l(u,"images",[]),this.objects=l(u,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=l(u,"collision",{}),this.tilesets=l(u,"tilesets",[]),this.imageCollections=l(u,"imageCollections",[]),this.tiles=l(u,"tiles",[]),this.hexSideLength=l(u,"hexSideLength",0),this.staggerAxis=l(u,"staggerAxis","y"),this.staggerIndex=l(u,"staggerIndex","odd")}});n.exports=c},48700:(n,a,s)=>{var o=s(83419),d=s(95540),l=new o({initialize:function(h){h===void 0&&(h={}),this.name=d(h,"name","object layer"),this.id=d(h,"id",0),this.opacity=d(h,"opacity",1),this.properties=d(h,"properties",{}),this.propertyTypes=d(h,"propertytypes",{}),this.type=d(h,"type","objectgroup"),this.visible=d(h,"visible",!0),this.objects=d(h,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});n.exports=l},6641:(n,a,s)=>{var o=s(91907),d=function(l){return l=l.toLowerCase(),l==="isometric"?o.ISOMETRIC:l==="staggered"?o.STAGGERED:l==="hexagonal"?o.HEXAGONAL:o.ORTHOGONAL};n.exports=d},46177:(n,a,s)=>{var o=s(80341),d=s(2342),l=s(82593),c=s(46594),h=s(87021),u=function(f,p,m,g,v,y){var x;switch(p){case o.ARRAY_2D:x=d(f,m,g,v,y);break;case o.CSV:x=l(f,m,g,v,y);break;case o.TILED_JSON:x=c(f,m,y);break;case o.WELTMEISTER:x=h(f,m,y);break;default:console.warn("Unrecognized tilemap data format: "+p),x=null}return x};n.exports=u},2342:(n,a,s)=>{var o=s(80341),d=s(14977),l=s(87010),c=s(23029),h=function(u,f,p,m,g){for(var v=new d({tileWidth:p,tileHeight:m}),y=new l({name:u,tileWidth:p,tileHeight:m,format:o.ARRAY_2D,layers:[v]}),x=[],b=f.length,_=0,C=0;C{var o=s(80341),d=s(2342),l=function(c,h,u,f,p){var m=h.trim().split(` +`).map(function(v){return v.split(",")}),g=d(c,m,u,f,p);return g.format=o.CSV,g};n.exports=l},6656:(n,a,s)=>{var o=s(14977),d=s(23029),l=function(c,h){for(var u=[],f=0;f-1?_=new d(m,b,x,y,p.tilesize,p.tilesize):_=h?null:new d(m,-1,x,y,p.tilesize,p.tilesize),g.push(_)}v.push(g),g=[]}m.data=v,u.push(m)}return u};n.exports=l},96483:(n,a,s)=>{var o=s(33629),d=function(l){for(var c=[],h=[],u=0;u{var o=s(80341),d=s(87010),l=s(6656),c=s(96483),h=function(u,f,p){if(f.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+u),null;for(var m=0,g=0,v=0;vm&&(m=f.layer[v].width),f.layer[v].height>g&&(g=f.layer[v].height);var y=new d({width:m,height:g,name:u,tileWidth:f.layer[0].tilesize,tileHeight:f.layer[0].tilesize,format:o.WELTMEISTER});return y.layers=l(f,p),y.tilesets=c(f),y};n.exports=h},52833:(n,a,s)=>{n.exports={ParseTileLayers:s(6656),ParseTilesets:s(96483),ParseWeltmeister:s(87021)}},57442:(n,a,s)=>{n.exports={FromOrientationString:s(6641),Parse:s(46177),Parse2DArray:s(2342),ParseCSV:s(82593),Impact:s(52833),Tiled:s(96761)}},51233:(n,a,s)=>{var o=s(79291),d=function(l){for(var c,h,u,f,p,m=0;m{var a=function(s){for(var o=window.atob(s),d=o.length,l=new Array(d/4),c=0;c>>0;return l};n.exports=a},84101:(n,a,s)=>{var o=s(33629),d=function(l){var c,h,u=[];for(c=0;c{var o=s(95540),d=function(l,c,h){if(!c)return{i:0,layers:l.layers,name:"",opacity:1,visible:!0,x:0,y:0};var u=c.x+o(c,"startx",0)*l.tilewidth+o(c,"offsetx",0),f=c.y+o(c,"starty",0)*l.tileheight+o(c,"offsety",0);return{i:0,layers:c.layers,name:h.name+c.name+"/",opacity:h.opacity*c.opacity,visible:h.visible&&c.visible,x:h.x+u,y:h.y+f}};n.exports=d},29920:n=>{var a=2147483648,s=1073741824,o=536870912,d=function(l){var c=!!(l&a),h=!!(l&s),u=!!(l&o);l=l&~(a|s|o);var f=0,p=!1;return c&&h&&u?(f=Math.PI/2,p=!0):c&&h&&!u?(f=Math.PI,p=!1):c&&!h&&u?(f=Math.PI/2,p=!1):c&&!h&&!u?(f=0,p=!0):!c&&h&&u?(f=3*Math.PI/2,p=!1):!c&&h&&!u?(f=Math.PI,p=!0):!c&&!h&&u?(f=3*Math.PI/2,p=!0):!c&&!h&&!u&&(f=0,p=!1),{gid:l,flippedHorizontal:c,flippedVertical:h,flippedAntiDiagonal:u,rotation:f,flipped:p}};n.exports=d},12635:(n,a,s)=>{var o=s(95540),d=s(79677),l=function(c){for(var h=[],u=[],f=d(c);f.i0;){if(f.i>=f.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}f=u.pop();continue}var p=f.layers[f.i];if(f.i++,p.type!=="imagelayer"){if(p.type==="group"){var m=d(c,p,f);u.push(f),f=m}continue}var g=o(p,"offsetx",0)+o(p,"startx",0),v=o(p,"offsety",0)+o(p,"starty",0);h.push({name:f.name+p.name,image:p.image,x:f.x+g+p.x,y:f.y+v+p.y,alpha:f.opacity*p.opacity,visible:f.visible&&p.visible,properties:o(p,"properties",{})})}return h};n.exports=l},46594:(n,a,s)=>{var o=s(51233),d=s(84101),l=s(91907),c=s(62644),h=s(80341),u=s(6641),f=s(87010),p=s(12635),m=s(22611),g=s(28200),v=s(24619),y=function(x,b,_){var C=c(b),w=new f({width:C.width,height:C.height,name:x,tileWidth:C.tilewidth,tileHeight:C.tileheight,orientation:u(C.orientation),format:h.TILED_JSON,version:C.version,properties:C.properties,renderOrder:C.renderorder,infinite:C.infinite});w.orientation===l.HEXAGONAL&&(w.hexSideLength=C.hexsidelength,w.staggerAxis=C.staggeraxis,w.staggerIndex=C.staggerindex),w.layers=g(C,_),w.images=p(C);var T=v(C);return w.tilesets=T.tilesets,w.imageCollections=T.imageCollections,w.objects=m(C),w.tiles=d(w),o(w),w};n.exports=y},52205:(n,a,s)=>{var o=s(18254),d=s(29920),l=function(u){return{x:u.x,y:u.y}},c=["id","name","type","rotation","properties","visible","x","y","width","height"],h=function(u,f,p){f===void 0&&(f=0),p===void 0&&(p=0);var m=o(u,c);if(m.x+=f,m.y+=p,u.gid){var g=d(u.gid);m.gid=g.gid,m.flippedHorizontal=g.flippedHorizontal,m.flippedVertical=g.flippedVertical,m.flippedAntiDiagonal=g.flippedAntiDiagonal}else u.polyline?m.polyline=u.polyline.map(l):u.polygon?m.polygon=u.polygon.map(l):u.ellipse?m.ellipse=u.ellipse:u.text?m.text=u.text:u.point?m.point=!0:m.rectangle=!0;return m};n.exports=h},22611:(n,a,s)=>{var o=s(95540),d=s(52205),l=s(48700),c=s(79677),h=function(u){for(var f=[],p=[],m=c(u);m.i0;){if(m.i>=m.layers.length){if(p.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}m=p.pop();continue}var g=m.layers[m.i];if(m.i++,g.opacity*=m.opacity,g.visible=m.visible&&g.visible,g.type!=="objectgroup"){if(g.type==="group"){var v=c(u,g,m);p.push(m),m=v}continue}g.name=m.name+g.name;for(var y=m.x+o(g,"startx",0)+o(g,"offsetx",0),x=m.y+o(g,"starty",0)+o(g,"offsety",0),b=[],_=0;_{var o=s(41868),d=s(91907),l=s(79677),c=s(6641),h=s(95540),u=s(14977),f=s(29920),p=s(23029),m=function(g,v){for(var y=h(g,"infinite",!1),x=[],b=[],_=l(g);_.i<_.layers.length||b.length>0;){if(_.i>=_.layers.length){if(b.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}_=b.pop();continue}var C=_.layers[_.i];if(_.i++,C.type!=="tilelayer"){if(C.type==="group"){var w=l(g,C,_);b.push(_),_=w}continue}if(C.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+C.name+"'");continue}else if(C.encoding&&C.encoding==="base64"){if(C.chunks)for(var T=0;T0?(D=new p(S,E.gid,G,Z,g.tilewidth,g.tileheight),D.rotation=E.rotation,D.flipX=E.flipped,M[Z][G]=D):(A=v?null:new p(S,-1,G,Z,g.tilewidth,g.tileheight),M[Z][G]=A),R++,R===H.width&&(z++,R=0)}}else{S=new u({name:_.name+C.name,id:C.id,x:_.x+h(C,"offsetx",0)+C.x,y:_.y+h(C,"offsety",0)+C.y,width:C.width,height:C.height,tileWidth:g.tilewidth,tileHeight:g.tileheight,alpha:_.opacity*C.opacity,visible:_.visible&&C.visible,properties:h(C,"properties",[]),orientation:c(g.orientation)}),S.orientation===d.HEXAGONAL&&(S.hexSideLength=g.hexsidelength,S.staggerAxis=g.staggeraxis,S.staggerIndex=g.staggerindex);for(var J=[],W=0,q=C.data.length;W0?(D=new p(S,E.gid,R,M.length,g.tilewidth,g.tileheight),D.rotation=E.rotation,D.flipX=E.flipped,J.push(D)):(A=v?null:new p(S,-1,R,M.length,g.tilewidth,g.tileheight),J.push(A)),R++,R===C.width&&(M.push(J),R=0,J=[])}S.data=M,x.push(S)}return x};n.exports=m},24619:(n,a,s)=>{var o=s(33629),d=s(16536),l=s(52205),c=s(57880),h=function(u){for(var f=[],p=[],m=null,g,v=0;v1){var b=void 0,_=void 0;if(Array.isArray(y.tiles)){b=b||{},_=_||{};for(var C=0;C{var a=function(s,o){for(var d=0;d0){var h={},u={},f,p,m;if(Array.isArray(l.edgecolors))for(f=0;f{n.exports={AssignTileProperties:s(51233),Base64Decode:s(41868),BuildTilesetIndex:s(84101),CreateGroupLayer:s(79677),ParseGID:s(29920),ParseImageLayers:s(12635),ParseJSONTiled:s(46594),ParseObject:s(52205),ParseObjectLayers:s(22611),ParseTileLayers:s(28200),ParseTilesets:s(24619)}},33385:(n,a,s)=>{var o=s(83419),d=s(37277),l=s(44594),c=s(94880),h=s(72905),u=new o({initialize:function(p){this.scene=p,this.systems=p.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],p.sys.events.once(l.BOOT,this.boot,this),p.sys.events.on(l.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var f=this.systems.events;f.on(l.PRE_UPDATE,this.preUpdate,this),f.on(l.UPDATE,this.update,this),f.once(l.SHUTDOWN,this.shutdown,this)},addEvent:function(f){var p;return f instanceof c?(p=f,this.removeEvent(p),p.elapsed=p.startAt,p.hasDispatched=!1,p.repeatCount=p.repeat===-1||p.loop?999999999999:p.repeat):p=new c(f),this._pendingInsertion.push(p),p},delayedCall:function(f,p,m,g){return this.addEvent({delay:f,callback:p,args:m,callbackScope:g})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(f){Array.isArray(f)||(f=[f]);for(var p=0;p-1&&this._active.splice(v,1),g.destroy()}for(m=0;m=g.delay)){var v=g.elapsed-g.delay;if(g.elapsed=g.delay,!g.hasDispatched&&g.callback&&(g.hasDispatched=!0,g.callback.apply(g.callbackScope,g.args)),g.repeatCount>0){if(g.repeatCount--,v>=g.delay)for(;v>=g.delay&&g.repeatCount>0;)g.callback&&g.callback.apply(g.callbackScope,g.args),v-=g.delay,g.repeatCount--;g.elapsed=v,g.hasDispatched=!1}else g.hasDispatched&&this._pendingRemoval.push(g)}}}},shutdown:function(){var f;for(f=0;f{var o=s(83419),d=s(50792),l=s(39429),c=s(95540),h=s(44594),u=s(89809),f=new o({Extends:d,initialize:function(m,g){d.call(this),this.scene=m,this.systems=m.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var v=this.systems.events;v.on(h.PRE_UPDATE,this.preUpdate,this),v.on(h.UPDATE,this.update,this),v.once(h.SHUTDOWN,this.destroy,this),g&&this.add(g)},preUpdate:function(p,m){this.paused||(this.elapsed+=m*this.timeScale)},update:function(){if(!(this.paused||this.complete)){var p,m=this.events,g=!1,v=this.systems,y;for(p=0;p=m.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(u.COMPLETE,this)}},play:function(p){return p===void 0&&(p=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,p&&this.reset(),this},pause:function(){this.paused=!0;for(var p=this.events,m=0;m0&&(g=m[m.length-1].time);for(var v=0;v{var o=s(83419),d=s(95540),l=new o({initialize:function(h){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(h)},reset:function(c){if(this.delay=d(c,"delay",0),this.repeat=d(c,"repeat",0),this.loop=d(c,"loop",!1),this.callback=d(c,"callback",void 0),this.callbackScope=d(c,"callbackScope",this),this.args=d(c,"args",[]),this.timeScale=d(c,"timeScale",1),this.startAt=d(c,"startAt",0),this.paused=d(c,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay===0&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var c=this.delay+this.delay*this.repeat,h=this.elapsed+this.delay*(this.repeat-this.repeatCount);return h/c}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(c){c===void 0&&(c=!1),this.elapsed=this.delay,this.hasDispatched=!c,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});n.exports=l},35945:n=>{n.exports="complete"},89809:(n,a,s)=>{n.exports={COMPLETE:s(35945)}},90291:(n,a,s)=>{n.exports={Clock:s(33385),Events:s(89809),Timeline:s(96120),TimerEvent:s(94880)}},40382:(n,a,s)=>{var o=s(72905),d=s(83419),l=s(43491),c=s(88032),h=s(37277),u=s(44594),f=s(93109),p=s(86081),m=s(8357),g=s(43960),v=s(26012),y=new d({initialize:function(b){this.scene=b,this.events=b.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(u.BOOT,this.boot,this),this.events.on(u.START,this.start,this)},boot:function(){this.events.once(u.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(u.UPDATE,this.update,this),this.events.once(u.SHUTDOWN,this.shutdown,this)},create:function(x){Array.isArray(x)||(x=[x]);for(var b=[],_=0;_-1},existing:function(x){return this.has(x)||this.tweens.push(x.reset()),this},addCounter:function(x){var b=c(this,x);return this.tweens.push(b.reset()),b},stagger:function(x,b){return f(x,b)},setLagSmooth:function(x,b){return x===void 0&&(x=1/1e-8),b===void 0&&(b=0),this.maxLag=x,this.lagSkip=Math.min(b,this.maxLag),this},setFps:function(x){return x===void 0&&(x=240),this.gap=1e3/x,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(x){var b=Date.now()-this.prevTime;b>this.maxLag&&(this.startTime+=b-this.lagSkip),this.prevTime+=b;var _=this.prevTime-this.startTime,C=_-this.nextTime,w=_-this.time*1e3;return C>0||x?(_/=1e3,this.time=_,this.nextTime+=C+(C>=this.gap?4:this.gap-C)):w=0,w},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(x){x===void 0&&(x=!1);var b=this.getDelta(x);if(!(b<=0)){this.processing=!0;var _,C,w=[],T=this.tweens;for(_=0;_0){for(_=0;_-1&&(C.isPendingRemove()||C.isDestroyed())&&(T.splice(E,1),C.destroy())}w.length=0}this.processing=!1}},remove:function(x){return this.processing?x.setPendingRemoveState():(o(this.tweens,x),x.setRemovedState()),this},reset:function(x){return this.existing(x),x.seek(),x.setActiveState(),this},makeActive:function(x){return this.existing(x),x.setActiveState(),this},each:function(x,b){var _,C=[null];for(_=1;_{var a=function(s,o,d){return s&&s.hasOwnProperty(o)?s[o]:d};n.exports=a},6113:(n,a,s)=>{var o=s(62640),d=s(35355),l=function(c,h){var u=o.Power0;if(typeof c=="string")if(o.hasOwnProperty(c))u=o[c];else{var f="";if(c.indexOf(".")){f=c.substring(c.indexOf(".")+1);var p=f.toLowerCase();p==="in"?f="easeIn":p==="out"?f="easeOut":p==="inout"&&(f="easeInOut")}c=d(c.substring(0,c.indexOf(".")+1)+f),o.hasOwnProperty(c)&&(u=o[c])}else typeof c=="function"&&(u=c);if(!h)return u;var m=h.slice(0);return m.unshift(0),function(g){return m[0]=g,u.apply(this,m)}};n.exports=l},91389:(n,a,s)=>{var o=s(89318),d=s(77259),l=s(28392),c={bezier:o,catmull:d,catmullrom:d,linear:l},h=function(u){if(u===null)return null;var f=c.linear;return typeof u=="string"?c.hasOwnProperty(u)&&(f=c[u]):typeof u=="function"&&(f=u),f};n.exports=h},55292:n=>{var a=function(s,o,d){var l;if(s.hasOwnProperty(o)){var c=typeof s[o];c==="function"?l=function(h,u,f,p,m,g){return s[o](h,u,f,p,m,g)}:l=function(){return s[o]}}else typeof d=="function"?l=d:l=function(){return d};return l};n.exports=a},82985:(n,a,s)=>{var o=s(81076),d=function(l){var c,h=[];if(l.hasOwnProperty("props"))for(c in l.props)c.substring(0,1)!=="_"&&h.push({key:c,value:l.props[c]});else for(c in l)o.indexOf(c)===-1&&c.substring(0,1)!=="_"&&h.push({key:c,value:l[c]});return h};n.exports=d},62329:(n,a,s)=>{var o=s(35154),d=function(l){var c=o(l,"targets",null);return c===null||(typeof c=="function"&&(c=c.call()),Array.isArray(c)||(c=[c])),c};n.exports=d},17777:(n,a,s)=>{var o=s(30976),d=s(99472);function l(p){return!!p.getActive&&typeof p.getActive=="function"}function c(p){return!!p.getStart&&typeof p.getStart=="function"}function h(p){return!!p.getEnd&&typeof p.getEnd=="function"}function u(p){return c(p)||h(p)||l(p)}var f=function(p,m){var g,v=function(H,X,V){return V},y=function(H,X,V){return V},x=null,b=typeof m;if(b==="number")v=function(){return m};else if(Array.isArray(m))y=function(){return m[0]},v=function(){return m[m.length-1]};else if(b==="string"){var _=m.toLowerCase(),C=_.substring(0,6)==="random",w=_.substring(0,3)==="int";if(C||w){var T=_.indexOf("("),S=_.indexOf(")"),E=_.indexOf(",");if(T&&S&&E){var D=parseFloat(_.substring(T+1,E)),A=parseFloat(_.substring(E+1,S));C?v=function(){return d(D,A)}:v=function(){return o(D,A)}}else throw new Error("invalid random() format")}else{_=_[0];var M=parseFloat(m.substr(2));switch(_){case"+":v=function(H,X,V){return V+M};break;case"-":v=function(H,X,V){return V-M};break;case"*":v=function(H,X,V){return V*M};break;case"/":v=function(H,X,V){return V/M};break;default:v=function(){return parseFloat(m)}}}}else if(b==="function")v=m;else if(b==="object")if(u(m))l(m)&&(x=m.getActive),h(m)&&(v=m.getEnd),c(m)&&(y=m.getStart);else if(m.hasOwnProperty("value"))g=f(p,m.value);else{var R=m.hasOwnProperty("to"),L=m.hasOwnProperty("from"),I=m.hasOwnProperty("start");if(R&&(L||I)){if(g=f(p,m.to),I){var O=f(p,m.start);g.getActive=O.getEnd}if(L){var N=f(p,m.from);g.getStart=N.getEnd}}}return g||(g={getActive:x,getEnd:v,getStart:y}),g};n.exports=f},88032:(n,a,s)=>{var o=s(70402),d=s(69902),l=s(23568),c=s(57355),h=s(6113),u=s(55292),f=s(35154),p=s(17777),m=s(269),g=s(86081),v=function(y,x,b){if(x instanceof g)return x.parent=y,x;b===void 0?b=d:b=m(d,b);var _=f(x,"from",0),C=f(x,"to",1),w=[{value:_}],T=f(x,"delay",b.delay),S=f(x,"easeParams",b.easeParams),E=f(x,"ease",b.ease),D=p("value",C),A=new g(y,w),M=A.add(0,"value",D.getEnd,D.getStart,D.getActive,h(f(x,"ease",E),f(x,"easeParams",S)),u(x,"delay",T),f(x,"duration",b.duration),c(x,"yoyo",b.yoyo),f(x,"hold",b.hold),f(x,"repeat",b.repeat),f(x,"repeatDelay",b.repeatDelay),!1,!1);M.start=_,M.current=_,A.completeDelay=l(x,"completeDelay",0),A.loop=Math.round(l(x,"loop",0)),A.loopDelay=Math.round(l(x,"loopDelay",0)),A.paused=c(x,"paused",!1),A.persist=c(x,"persist",!1),A.callbackScope=f(x,"callbackScope",A);for(var R=o.TYPES,L=0;L{var o=s(6113),d=s(35154),l=s(36383),c=function(h,u){u===void 0&&(u={});var f,p=d(u,"start",0),m=d(u,"ease",null),g=d(u,"grid",null),v=d(u,"from",0),y=v==="first",x=v==="center",b=v==="last",_=typeof v=="number",C=Array.isArray(h),w=parseFloat(C?h[0]:h),T=C?parseFloat(h[1]):0,S=Math.max(w,T);if(C&&(p+=w),g){var E=g[0],D=g[1],A=0,M=0,R=0,L=0,I=[];b?(A=E-1,M=D-1):_?(A=v%E,M=Math.floor(v/E)):x&&(A=(E-1)/2,M=(D-1)/2);for(var O=l.MIN_SAFE_INTEGER,N=0;NO&&(O=X),I[N][H]=X}}}var V=m?o(m):null;return g?f=function(z,F,k,G){var Z=0,J=G%E,W=Math.floor(G/E);J>=0&&J=0&&W{var o=s(70402),d=s(69902),l=s(23568),c=s(57355),h=s(6113),u=s(91389),f=s(55292),p=s(82985),m=s(62329),g=s(35154),v=s(17777),y=s(269),x=s(86081),b=function(_,C,w){if(C instanceof x)return C.parent=_,C;w===void 0?w=d:w=y(d,w);var T=m(C);!T&&w.targets&&(T=w.targets);for(var S=p(C),E=g(C,"delay",w.delay),D=g(C,"duration",w.duration),A=g(C,"easeParams",w.easeParams),M=g(C,"ease",w.ease),R=g(C,"hold",w.hold),L=g(C,"repeat",w.repeat),I=g(C,"repeatDelay",w.repeatDelay),O=c(C,"yoyo",w.yoyo),N=c(C,"flipX",w.flipX),H=c(C,"flipY",w.flipY),X=g(C,"interpolation",w.interpolation),V=function(oe,ve,_e,ye){if(_e==="texture"){var xe=ye,st=void 0;Array.isArray(ye)?(xe=ye[0],st=ye[1]):ye.hasOwnProperty("value")?(xe=ye.value,Array.isArray(ye.value)?(xe=ye.value[0],st=ye.value[1]):typeof ye.value=="string"&&(xe=ye.value)):typeof ye=="string"&&(xe=ye),oe.addFrame(ve,xe,st,f(ye,"delay",E),g(ye,"duration",D),g(ye,"hold",R),g(ye,"repeat",L),g(ye,"repeatDelay",I),c(ye,"flipX",N),c(ye,"flipY",H))}else{var at=v(_e,ye),Ge=u(g(ye,"interpolation",X));oe.add(ve,_e,at.getEnd,at.getStart,at.getActive,h(g(ye,"ease",M),g(ye,"easeParams",A)),f(ye,"delay",E),g(ye,"duration",D),c(ye,"yoyo",O),g(ye,"hold",R),g(ye,"repeat",L),g(ye,"repeatDelay",I),c(ye,"flipX",N),c(ye,"flipY",H),Ge,Ge?ye:null)}},z=new x(_,T),F=0;F{var o=s(70402),d=s(23568),l=s(57355),c=s(62329),h=s(35154),u=s(8357),f=s(43960),p=function(m,g){if(g instanceof f)return g.parent=m,g;var v=new f(m);v.startDelay=h(g,"delay",0),v.completeDelay=d(g,"completeDelay",0),v.loop=Math.round(d(g,"loop",h(g,"repeat",0))),v.loopDelay=Math.round(d(g,"loopDelay",h(g,"repeatDelay",0))),v.paused=l(g,"paused",!1),v.persist=l(g,"persist",!1),v.callbackScope=h(g,"callbackScope",v);var y,x=o.TYPES;for(y=0;y{n.exports={GetBoolean:s(57355),GetEaseFunction:s(6113),GetInterpolationFunction:s(91389),GetNewValue:s(55292),GetProps:s(82985),GetTargets:s(62329),GetValueOp:s(17777),NumberTweenBuilder:s(88032),StaggerBuilder:s(93109),TweenBuilder:s(8357)}},73685:n=>{n.exports="active"},98540:n=>{n.exports="complete"},67233:n=>{n.exports="loop"},2859:n=>{n.exports="pause"},98336:n=>{n.exports="repeat"},25764:n=>{n.exports="resume"},32193:n=>{n.exports="start"},84371:n=>{n.exports="stop"},70766:n=>{n.exports="update"},55659:n=>{n.exports="yoyo"},842:(n,a,s)=>{n.exports={TWEEN_ACTIVE:s(73685),TWEEN_COMPLETE:s(98540),TWEEN_LOOP:s(67233),TWEEN_PAUSE:s(2859),TWEEN_RESUME:s(25764),TWEEN_REPEAT:s(98336),TWEEN_START:s(32193),TWEEN_STOP:s(84371),TWEEN_UPDATE:s(70766),TWEEN_YOYO:s(55659)}},43066:(n,a,s)=>{var o={States:s(86353),Builders:s(30231),Events:s(842),TweenManager:s(40382),Tween:s(86081),TweenData:s(48177),TweenFrameData:s(42220),BaseTween:s(70402),TweenChain:s(43960)};n.exports=o},70402:(n,a,s)=>{var o=s(83419),d=s(50792),l=s(842),c=s(86353),h=new o({Extends:d,initialize:function(f){d.call(this),this.parent=f,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=c.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(u){return this.timeScale=u,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(l.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(l.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(l.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(l.TWEEN_COMPLETE,"onComplete")},complete:function(u){return u===void 0&&(u=0),u?(this.setCompleteDelayState(),this.countdown=u):this.onCompleteHandler(),this},completeAfterLoop:function(u){return u===void 0&&(u=0),this.loopCounter>u&&(this.loopCounter=u),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(l.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(u){this.countdown-=u,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(l.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(u){return this.countdown-=u,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(l.TWEEN_START,"onStart"),u=0),u},updateCompleteDelay:function(u){this.countdown-=u,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(u,f,p){return p===void 0&&(p=[]),this.callbacks.hasOwnProperty(u)&&(this.callbacks[u]={func:f,params:p}),this},setPendingState:function(){this.state=c.PENDING},setActiveState:function(){this.state=c.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=c.LOOP_DELAY},setCompleteDelayState:function(){this.state=c.COMPLETE_DELAY},setStartDelayState:function(){this.state=c.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=c.PENDING_REMOVE},setRemovedState:function(){this.state=c.REMOVED},setFinishedState:function(){this.state=c.FINISHED},setDestroyedState:function(){this.state=c.DESTROYED},isPending:function(){return this.state===c.PENDING},isActive:function(){return this.state===c.ACTIVE},isLoopDelayed:function(){return this.state===c.LOOP_DELAY},isCompleteDelayed:function(){return this.state===c.COMPLETE_DELAY},isStartDelayed:function(){return this.state===c.START_DELAY},isPendingRemove:function(){return this.state===c.PENDING_REMOVE},isRemoved:function(){return this.state===c.REMOVED},isFinished:function(){return this.state===c.FINISHED},isDestroyed:function(){return this.state===c.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(u){u.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});h.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],n.exports=h},95042:(n,a,s)=>{var o=s(83419),d=s(842),l=s(86353),c=new o({initialize:function(u,f,p,m,g,v,y,x,b,_){this.tween=u,this.targetIndex=f,this.duration=m,this.totalDuration=0,this.delay=0,this.getDelay=p,this.yoyo=g,this.hold=v,this.repeat=y,this.repeatDelay=x,this.repeatCounter=0,this.flipX=b,this.flipY=_,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(h){h===void 0&&(h=this.current),this.tween.targets[this.targetIndex][this.key]=h},setCreatedState:function(){this.state=l.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=l.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=l.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=l.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=l.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=l.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=l.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=l.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===l.CREATED},isDelayed:function(){return this.state===l.DELAY},isPendingRender:function(){return this.state===l.PENDING_RENDER},isPlayingForward:function(){return this.state===l.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===l.PLAYING_BACKWARD},isHolding:function(){return this.state===l.HOLD_DELAY},isRepeating:function(){return this.state===l.REPEAT_DELAY},isComplete:function(){return this.state===l.COMPLETE},setStateFromEnd:function(h){this.yoyo?this.onRepeat(h,!0,!0):this.repeatCounter>0?this.onRepeat(h,!0,!1):this.setCompleteState()},setStateFromStart:function(h){this.repeatCounter>0?this.onRepeat(h,!1):this.setCompleteState()},reset:function(){var h=this.tween,u=h.totalTargets,f=this.targetIndex,p=h.targets[f],m=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(p,m,0,f,u,h),this.repeatCounter=this.repeat===-1?l.MAX:this.repeat,this.setPendingRenderState();var g=this.duration+this.hold;this.yoyo&&(g+=this.duration);var v=g+this.repeatDelay;this.totalDuration=this.delay+g,this.repeat===-1?(this.totalDuration+=v*l.MAX,h.isInfinite=!0):this.repeat>0&&(this.totalDuration+=v*this.repeat),this.totalDuration>h.duration&&(h.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(h,u,f){var p=this.tween,m=p.totalTargets,g=this.targetIndex,v=p.targets[g],y=this.key,x=y!=="texture";if(this.elapsed=h,this.progress=h/this.duration,this.flipX&&v.toggleFlipX(),this.flipY&&v.toggleFlipY(),x&&(u||f)&&(this.start=this.getStartValue(v,y,this.start,g,m,p)),f){this.setPlayingBackwardState(),this.dispatchEvent(d.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,x&&(this.end=this.getEndValue(v,y,this.start,g,m,p)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-h,x&&(this.current=this.start,v[y]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(d.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});n.exports=c},69902:n=>{var a={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null};n.exports=a},81076:n=>{n.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},86081:(n,a,s)=>{var o=s(70402),d=s(83419),l=s(842),c=s(44603),h=s(39429),u=s(36383),f=s(86353),p=s(48177),m=s(42220),g=new d({Extends:o,initialize:function(y,x){o.call(this,y),this.targets=x,this.totalTargets=x.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(v,y,x,b,_,C,w,T,S,E,D,A,M,R,L,I){var O=new p(this,v,y,x,b,_,C,w,T,S,E,D,A,M,R,L,I);return this.totalData=this.data.push(O),O},addFrame:function(v,y,x,b,_,C,w,T,S,E){var D=new m(this,v,y,x,b,_,C,w,T,S,E);return this.totalData=this.data.push(D),D},getValue:function(v){v===void 0&&(v=0);var y=null;return this.data&&(y=this.data[v].current),y},hasTarget:function(v){return this.targets&&this.targets.indexOf(v)!==-1},updateTo:function(v,y,x){if(x===void 0&&(x=!1),v!=="texture")for(var b=0;b0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(l.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,o.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(v,y,x){if(v===void 0&&(v=0),y===void 0&&(y=16.6),x===void 0&&(x=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;x||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(l.TWEEN_ACTIVE,"onActive");var b=this.paused;if(this.paused=!1,v>0){for(var _=Math.floor(v/y),C=v-_*y,w=0;w<_;w++)this.update(y);C>0&&this.update(C)}return this.paused=b,this.isSeeking=!1,this},initTweenData:function(v){v===void 0&&(v=!1),this.duration=0,this.startDelay=u.MAX_SAFE_INTEGER;for(var y=this.data,x=0;x0?this.totalDuration=b+_+(b+w)*C:this.totalDuration=b+_},reset:function(v){return v===void 0&&(v=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,this.loop===-1&&(this.isInfinite=!0,this.loopCounter=f.MAX),v||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(l.TWEEN_ACTIVE,"onActive")),this},update:function(v){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(v*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(v),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(v),!1;this.hasStarted||(this.startDelay-=v,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(l.TWEEN_START,"onStart"),v=0));var y=!1;if(this.isActive())for(var x=this.data,b=0;b{var o=s(72905),d=s(70402),l=s(83419),c=s(842),h=s(44603),u=s(39429),f=s(86353),p=new l({Extends:d,initialize:function(g){d.call(this,g),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?f.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(m){var g=this.parent.create(m);Array.isArray(g)||(g=[g]);for(var v=this.data,y=0;y0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(c.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var m=this.data,g=this.totalData,v=0;v{var o=s(95042),d=s(45319),l=s(83419),c=s(842),h=new l({Extends:o,initialize:function(f,p,m,g,v,y,x,b,_,C,w,T,S,E,D,A,M){o.call(this,f,p,b,_,C,w,T,S,E,D),this.key=m,this.getActiveValue=y,this.getEndValue=g,this.getStartValue=v,this.ease=x,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=A,this.interpolationData=M},reset:function(u){o.prototype.reset.call(this);var f=this.tween.targets[this.targetIndex],p=this.key;u&&(f[p]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(f[p]=this.getActiveValue(f,p,0))},update:function(u){var f=this.tween,p=f.totalTargets,m=this.targetIndex,g=f.targets[m],v=this.key;if(!g)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=u,this.elapsed<=0&&(this.elapsed=0,u=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(c.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(g,v,g[v],m,p,f),this.end=this.getEndValue(g,v,this.start,m,p,f),this.current=this.start,g[v]=this.start,this.setPlayingForwardState(),!0;var y=this.isPlayingForward(),x=this.isPlayingBackward();if(y||x){var b=this.elapsed,_=this.duration,C=0,w=!1;b+=u,b>=_?(C=b-_,b=_,w=!0):b<0&&(b=0);var T=d(b/_,0,1);this.elapsed=b,this.progress=T,this.previous=this.current,y||(T=1-T);var S=this.ease(T);this.interpolation?this.current=this.interpolation(this.interpolationData,S):this.current=this.start+(this.end-this.start)*S,g[v]=this.current,w&&(y?this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(C):this.setStateFromStart(C)),this.dispatchEvent(c.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(u,f){var p=this.tween;if(!p.isSeeking){var m=p.targets[this.targetIndex],g=this.key,v=this.current,y=this.previous;p.emit(u,p,g,m,v,y);var x=p.callbacks[f];x&&x.func.apply(p.callbackScope,[p,m,g,v,y].concat(x.params))}},destroy:function(){o.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});n.exports=h},42220:(n,a,s)=>{var o=s(95042),d=s(45319),l=s(83419),c=s(842),h=new l({Extends:o,initialize:function(f,p,m,g,v,y,x,b,_,C,w){o.call(this,f,p,v,y,!1,x,b,_,C,w),this.key="texture",this.startTexture=null,this.endTexture=m,this.startFrame=null,this.endFrame=g,this.yoyo=b!==0},reset:function(u){o.prototype.reset.call(this);var f=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=f.texture.key,this.startFrame=f.frame.name),u&&f.setTexture(this.startTexture,this.startFrame)},update:function(u){var f=this.tween,p=this.targetIndex,m=f.targets[p];if(!m)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=u,this.elapsed<=0&&(this.elapsed=0,u=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(c.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&m.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var g=this.isPlayingForward(),v=this.isPlayingBackward();if(g||v){var y=this.elapsed,x=this.duration,b=0,_=!1;y+=u,y>=x?(b=y-x,y=x,_=!0):y<0&&(y=0);var C=d(y/x,0,1);this.elapsed=y,this.progress=C,_&&(g?(m.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(b)):(m.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(b))),this.dispatchEvent(c.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(u,f){var p=this.tween;if(!p.isSeeking){var m=p.targets[this.targetIndex],g=this.key;p.emit(u,p,g,m);var v=p.callbacks[f];v&&v.func.apply(p.callbackScope,[p,m,g].concat(v.params))}},destroy:function(){o.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});n.exports=h},86353:n=>{var a={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999};n.exports=a},83419:n=>{function a(h){return!!h.get&&typeof h.get=="function"||!!h.set&&typeof h.set=="function"}function s(h,u,f){var p=f?h[u]:Object.getOwnPropertyDescriptor(h,u);return!f&&p.value&&typeof p.value=="object"&&(p=p.value),p&&a(p)?(typeof p.enumerable>"u"&&(p.enumerable=!0),typeof p.configurable>"u"&&(p.configurable=!0),p):!1}function o(h,u){var f=Object.getOwnPropertyDescriptor(h,u);return f?(f.value&&typeof f.value=="object"&&(f=f.value),f.configurable===!1):!1}function d(h,u,f,p){for(var m in u)if(u.hasOwnProperty(m)){var g=s(u,m,f);if(g!==!1){var v=p||h;if(o(v.prototype,m)){if(c.ignoreFinals)continue;throw new Error("cannot override final property '"+m+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(h.prototype,m,g)}else h.prototype[m]=u[m]}}function l(h,u){if(u){Array.isArray(u)||(u=[u]);for(var f=0;f{var a=function(){};n.exports=a},20242:n=>{var a=function(){return null};n.exports=a},71146:n=>{var a=function(s,o,d,l,c){if(c===void 0&&(c=s),d>0){var h=d-s.length;if(h<=0)return null}if(!Array.isArray(o))return s.indexOf(o)===-1?(s.push(o),l&&l.call(c,o),o):null;for(var u=o.length-1;u>=0;)s.indexOf(o[u])!==-1&&o.splice(u,1),u--;if(u=o.length,u===0)return null;d>0&&u>h&&(o.splice(h),u=h);for(var f=0;f{var a=function(s,o,d,l,c,h){if(d===void 0&&(d=0),h===void 0&&(h=s),l>0){var u=l-s.length;if(u<=0)return null}if(!Array.isArray(o))return s.indexOf(o)===-1?(s.splice(d,0,o),c&&c.call(h,o),o):null;for(var f=o.length-1;f>=0;)s.indexOf(o[f])!==-1&&o.pop(),f--;if(f=o.length,f===0)return null;l>0&&f>u&&(o.splice(u),f=u);for(var p=f-1;p>=0;p--){var m=o[p];s.splice(d,0,m),c&&c.call(h,m)}return o};n.exports=a},66905:n=>{var a=function(s,o){var d=s.indexOf(o);return d!==-1&&d{var o=s(82011),d=function(l,c,h,u,f){u===void 0&&(u=0),f===void 0&&(f=l.length);var p=0;if(o(l,u,f))for(var m=u;m{var a=function(s,o,d){var l,c=[null];for(l=3;l{var o=s(82011),d=function(l,c,h,u,f){if(u===void 0&&(u=0),f===void 0&&(f=l.length),o(l,u,f)){var p,m=[null];for(p=5;p{var a=function(s,o,d){if(o.length){if(o.length===1)return o[0]}else return NaN;var l=1,c,h;if(d){if(so.length&&(l=o.length),d?(c=o[l-1][d],h=o[l][d],h-s<=s-c?o[l]:o[l-1]):(c=o[l-1],h=o[l],h-s<=s-c?h:c)};n.exports=a},43491:n=>{var a=function(s,o){o===void 0&&(o=[]);for(var d=0;d{var o=s(82011),d=function(l,c,h,u,f){u===void 0&&(u=0),f===void 0&&(f=l.length);var p=[];if(o(l,u,f))for(var m=u;m{var o=s(82011),d=function(l,c,h,u,f){if(u===void 0&&(u=0),f===void 0&&(f=l.length),o(l,u,f))for(var p=u;p{var a=function(s,o,d){o===void 0&&(o=0),d===void 0&&(d=s.length);var l=o+Math.floor(Math.random()*d);return s[l]===void 0?null:s[l]};n.exports=a},85835:n=>{var a=function(s,o,d){if(o===d)return s;var l=s.indexOf(o),c=s.indexOf(d);if(l<0||c<0)throw new Error("Supplied items must be elements of the same array");return l>c||(s.splice(l,1),c=s.indexOf(d),s.splice(c+1,0,o)),s};n.exports=a},83371:n=>{var a=function(s,o,d){if(o===d)return s;var l=s.indexOf(o),c=s.indexOf(d);if(l<0||c<0)throw new Error("Supplied items must be elements of the same array");return l{var a=function(s,o){var d=s.indexOf(o);if(d>0){var l=s[d-1],c=s.indexOf(l);s[d]=l,s[c]=o}return s};n.exports=a},69693:n=>{var a=function(s,o,d){var l=s.indexOf(o);if(l===-1||d<0||d>=s.length)throw new Error("Supplied index out of bounds");return l!==d&&(s.splice(l,1),s.splice(d,0,o)),o};n.exports=a},40853:n=>{var a=function(s,o){var d=s.indexOf(o);if(d!==-1&&d{var a=function(s,o,d,l){var c=[],h,u=!1;if((d||l)&&(u=!0,d||(d=""),l||(l="")),o=o;h--)u?c.push(d+h.toString()+l):c.push(h);else for(h=s;h<=o;h++)u?c.push(d+h.toString()+l):c.push(h);return c};n.exports=a},593:(n,a,s)=>{var o=s(2284),d=function(l,c,h){l===void 0&&(l=0),c===void 0&&(c=null),h===void 0&&(h=1),c===null&&(c=l,l=0);for(var u=[],f=Math.max(o((c-l)/(h||1)),0),p=0;p{function a(d,l,c){var h=d[l];d[l]=d[c],d[c]=h}function s(d,l){return dl?1:0}var o=function(d,l,c,h,u){for(c===void 0&&(c=0),h===void 0&&(h=d.length-1),u===void 0&&(u=s);h>c;){if(h-c>600){var f=h-c+1,p=l-c+1,m=Math.log(f),g=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*g*(f-g)/f)*(p-f/2<0?-1:1),y=Math.max(c,Math.floor(l-p*g/f+v)),x=Math.min(h,Math.floor(l+(f-p)*g/f+v));o(d,l,y,x,u)}var b=d[l],_=c,C=h;for(a(d,c,l),u(d[h],b)>0&&a(d,c,h);_0;)C--}u(d[c],b)===0?a(d,c,C):(C++,a(d,C,h)),C<=l&&(c=C+1),l<=C&&(h=C-1)}};n.exports=o},88492:(n,a,s)=>{var o=s(35154),d=s(33680),l=function(h,u,f){for(var p=[],m=0;m{var o=s(19133),d=function(l,c,h,u){u===void 0&&(u=l);var f;if(!Array.isArray(c))return f=l.indexOf(c),f!==-1?(o(l,f),h&&h.call(u,c),c):null;for(var p=c.length-1,m=[];p>=0;){var g=c[p];f=l.indexOf(g),f!==-1&&(o(l,f),m.push(g),h&&h.call(u,g)),p--}return m};n.exports=d},60248:(n,a,s)=>{var o=s(19133),d=function(l,c,h,u){if(u===void 0&&(u=l),c<0||c>l.length-1)throw new Error("Index out of bounds");var f=o(l,c);return h&&h.call(u,f),f};n.exports=d},81409:(n,a,s)=>{var o=s(82011),d=function(l,c,h,u,f){if(c===void 0&&(c=0),h===void 0&&(h=l.length),f===void 0&&(f=l),o(l,c,h)){var p=h-c,m=l.splice(c,p);if(u)for(var g=0;g{var o=s(19133),d=function(l,c,h){c===void 0&&(c=0),h===void 0&&(h=l.length);var u=c+Math.floor(Math.random()*h);return o(l,u)};n.exports=d},42169:n=>{var a=function(s,o,d){var l=s.indexOf(o),c=s.indexOf(d);return l!==-1&&c===-1?(s[l]=d,!0):!1};n.exports=a},86003:n=>{var a=function(s,o){o===void 0&&(o=1);for(var d=null,l=0;l{var a=function(s,o){o===void 0&&(o=1);for(var d=null,l=0;l{var a=function(s,o,d,l){var c=s.length;if(o<0||o>c||o>=d||d>c){if(l)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};n.exports=a},89545:n=>{var a=function(s,o){var d=s.indexOf(o);return d!==-1&&d>0&&(s.splice(d,1),s.unshift(o)),o};n.exports=a},17810:(n,a,s)=>{var o=s(82011),d=function(l,c,h,u,f){if(u===void 0&&(u=0),f===void 0&&(f=l.length),o(l,u,f))for(var p=u;p{var a=function(s){for(var o=s.length-1;o>0;o--){var d=Math.floor(Math.random()*(o+1)),l=s[o];s[o]=s[d],s[d]=l}return s};n.exports=a},90126:n=>{var a=function(s){var o=/\D/g;return s.sort(function(d,l){return parseInt(d.replace(o,""),10)-parseInt(l.replace(o,""),10)}),s};n.exports=a},19133:n=>{var a=function(s,o){if(!(o>=s.length)){for(var d=s.length-1,l=s[o],c=o;c{var o=s(82264);function d(u,f){return String(u).localeCompare(f)}function l(u,f){var p=u.length;if(p<=1)return u;for(var m=new Array(p),g=1;gg&&(b=g),_>g&&(_=g),C=x,w=b;;)if(C{var a=function(s,o,d){if(o===d)return s;var l=s.indexOf(o),c=s.indexOf(d);if(l<0||c<0)throw new Error("Supplied items must be elements of the same array");return s[l]=d,s[c]=o,s};n.exports=a},37105:(n,a,s)=>{n.exports={Matrix:s(54915),Add:s(71146),AddAt:s(51067),BringToTop:s(66905),CountAllMatching:s(21612),Each:s(95428),EachInRange:s(36914),FindClosestInSorted:s(81957),Flatten:s(43491),GetAll:s(46710),GetFirst:s(58731),GetRandom:s(26546),MoveDown:s(70864),MoveTo:s(69693),MoveUp:s(40853),MoveAbove:s(85835),MoveBelow:s(83371),NumberArray:s(20283),NumberArrayStep:s(593),QuickSelect:s(43886),Range:s(88492),Remove:s(72905),RemoveAt:s(60248),RemoveBetween:s(81409),RemoveRandomElement:s(31856),Replace:s(42169),RotateLeft:s(86003),RotateRight:s(49498),SafeRange:s(82011),SendToBack:s(89545),SetAll:s(17810),Shuffle:s(33680),SortByDigits:s(90126),SpliceOne:s(19133),StableSort:s(19186),Swap:s(25630)}},86922:n=>{var a=function(s){if(!Array.isArray(s)||!Array.isArray(s[0]))return!1;for(var o=s[0].length,d=1;d{var o=s(41836),d=s(86922),l=function(c){var h="";if(!d(c))return h;for(var u=0;u{var a=function(s){return s.reverse()};n.exports=a},21224:n=>{var a=function(s){for(var o=0;o{var o=s(37829),d=function(l){return o(l,180)};n.exports=d},44657:(n,a,s)=>{var o=s(37829),d=function(l,c){c===void 0&&(c=1);for(var h=0;h{var o=s(86922),d=s(2429),l=function(c,h){if(h===void 0&&(h=90),!o(c))return null;if(typeof h!="string"&&(h=(h%360+360)%360),h===90||h===-270||h==="rotateLeft")c=d(c),c.reverse();else if(h===-90||h===270||h==="rotateRight")c.reverse(),c=d(c);else if(Math.abs(h)===180||h==="rotate180"){for(var u=0;u{var o=s(37829),d=function(l,c){c===void 0&&(c=1);for(var h=0;h{var o=s(86003),d=s(49498),l=function(c,h,u){if(h===void 0&&(h=0),u===void 0&&(u=0),u!==0&&(u<0?o(c,Math.abs(u)):d(c,u)),h!==0)for(var f=0;f{var a=function(s){for(var o=s.length,d=s[0].length,l=new Array(d),c=0;c-1;h--)l[c][h]=s[h][c]}return l};n.exports=a},54915:(n,a,s)=>{n.exports={CheckMatrix:s(86922),MatrixToString:s(63362),ReverseColumns:s(92598),ReverseRows:s(21224),Rotate180:s(98717),RotateLeft:s(44657),RotateMatrix:s(37829),RotateRight:s(92632),Translate:s(69512),TransposeMatrix:s(2429)}},71334:n=>{var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(o,d){for(var l=new Uint8Array(o),c=l.length,h=d?"data:"+d+";base64,":"",u=0;u>2],h+=a[(l[u]&3)<<4|l[u+1]>>4],h+=a[(l[u+1]&15)<<2|l[u+2]>>6],h+=a[l[u+2]&63];return c%3===2?h=h.substring(0,h.length-1)+"=":c%3===1&&(h=h.substring(0,h.length-2)+"=="),h};n.exports=s},53134:n=>{for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(256),o=0;o>4,y[u++]=(p&15)<<4|m>>2,y[u++]=(m&3)<<6|g&63;return v};n.exports=d},65839:(n,a,s)=>{n.exports={ArrayBufferToBase64:s(71334),Base64ToArrayBuffer:s(53134)}},91799:(n,a,s)=>{n.exports={Array:s(37105),Base64:s(65839),Objects:s(1183),String:s(31749),NOOP:s(29747),NULL:s(20242)}},41786:n=>{var a=function(s){var o={};for(var d in s)Array.isArray(s[d])?o[d]=s[d].slice(0):o[d]=s[d];return o};n.exports=a},62644:n=>{var a=function(s){var o,d,l;if(typeof s!="object"||s===null)return s;o=Array.isArray(s)?[]:{};for(l in s)d=s[l],o[l]=a(d);return o};n.exports=a},79291:(n,a,s)=>{var o=s(41212),d=function(){var l,c,h,u,f,p,m=arguments[0]||{},g=1,v=arguments.length,y=!1;for(typeof m=="boolean"&&(y=m,m=arguments[1]||{},g=2),v===g&&(m=this,--g);g{var o=s(75508),d=s(35154),l=function(c,h,u){var f=d(c,h,null);if(f===null)return u;if(Array.isArray(f))return o.RND.pick(f);if(typeof f=="object"){if(f.hasOwnProperty("randInt"))return o.RND.integerInRange(f.randInt[0],f.randInt[1]);if(f.hasOwnProperty("randFloat"))return o.RND.realInRange(f.randFloat[0],f.randFloat[1])}else if(typeof f=="function")return f(h);return f};n.exports=l},95540:n=>{var a=function(s,o,d){var l=typeof s;return!s||l==="number"||l==="string"?d:s.hasOwnProperty(o)&&s[o]!==void 0?s[o]:d};n.exports=a},82840:(n,a,s)=>{var o=s(35154),d=s(45319),l=function(c,h,u,f,p){p===void 0&&(p=u);var m=o(c,h,p);return d(m,u,f)};n.exports=l},35154:n=>{var a=function(s,o,d,l){if(!s&&!l||typeof s=="number")return d;if(s&&s.hasOwnProperty(o))return s[o];if(l&&l.hasOwnProperty(o))return l[o];if(o.indexOf(".")!==-1){for(var c=o.split("."),h=s,u=l,f=d,p=d,m=!0,g=!0,v=0;v{var a=function(s,o){for(var d=0;d{var a=function(s,o){for(var d=0;d{var a=function(s,o){return s.hasOwnProperty(o)};n.exports=a},41212:n=>{var a=function(s){if(!s||typeof s!="object"||s.nodeType||s===s.window)return!1;try{if(s.constructor&&!{}.hasOwnProperty.call(s.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};n.exports=a},46975:(n,a,s)=>{var o=s(41786),d=function(l,c){var h=o(l);for(var u in c)h.hasOwnProperty(u)||(h[u]=c[u]);return h};n.exports=d},269:(n,a,s)=>{var o=s(41786),d=function(l,c){var h=o(l);for(var u in c)h.hasOwnProperty(u)&&(h[u]=c[u]);return h};n.exports=d},18254:(n,a,s)=>{var o=s(97022),d=function(l,c){for(var h={},u=0;u{var a=function(s,o,d){if(!s||typeof s=="number")return!1;if(s.hasOwnProperty(o))return s[o]=d,!0;if(o.indexOf(".")!==-1){for(var l=o.split("."),c=s,h=s,u=0;u{n.exports={Clone:s(41786),DeepCopy:s(62644),Extend:s(79291),GetAdvancedValue:s(23568),GetFastValue:s(95540),GetMinMaxValue:s(82840),GetValue:s(35154),HasAll:s(69036),HasAny:s(1985),HasValue:s(97022),IsPlainObject:s(41212),Merge:s(46975),MergeRight:s(269),Pick:s(18254),SetValue:s(61622)}},27902:n=>{var a=function(s,o){return s.replace(/%([0-9]+)/g,function(d,l){return o[Number(l)-1]})};n.exports=a},41836:n=>{var a=function(s,o,d,l){o===void 0&&(o=0),d===void 0&&(d=" "),l===void 0&&(l=3),s=s.toString();var c=0;if(o+1>=s.length)switch(l){case 1:s=new Array(o+1-s.length).join(d)+s;break;case 3:var h=Math.ceil((c=o-s.length)/2),u=c-h;s=new Array(u+1).join(d)+s+new Array(h+1).join(d);break;default:s=s+new Array(o+1-s.length).join(d);break}return s};n.exports=a},33628:n=>{var a=function(s,o){return o===0?s.slice(1):s.slice(0,o)+s.slice(o+1)};n.exports=a},27671:n=>{var a=function(s){return s.split("").reverse().join("")};n.exports=a},45650:n=>{var a=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var o=Math.random()*16|0,d=s==="x"?o:o&3|8;return d.toString(16)})};n.exports=a},35355:n=>{var a=function(s){return s&&s[0].toUpperCase()+s.slice(1)};n.exports=a},31749:(n,a,s)=>{n.exports={Format:s(27902),Pad:s(41836),RemoveAt:s(33628),Reverse:s(27671),UppercaseFirst:s(35355),UUID:s(45650)}}},i={};function e(n){var a=i[n];if(a!==void 0)return a.exports;var s=i[n]={exports:{}};return t[n](s,s.exports,e),s.exports}e.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var r=e(85454);return r})())});function S3(t,i){return Object.is(t,i)}var Vr=null,Ag=!1,aE=1,As=Symbol("SIGNAL");function Di(t){let i=Vr;return Vr=t,i}function E3(){return Vr}function Uq(){return Ag}var Lu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function gx(t){if(Ag)throw new Error("");if(Vr===null)return;Vr.consumerOnSignalRead(t);let i=Vr.nextProducerIndex++;if(yx(Vr),it.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Pg(t){yx(t);for(let i=0;i0}function yx(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function P3(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function k3(t){return t.producerNode!==void 0}function oE(t){let i=Object.create(Gq);i.computation=t;let e=()=>{if(D3(i),gx(i),i.value===px)throw i.error;return i.value};return e[As]=i,e}var nE=Symbol("UNSET"),rE=Symbol("COMPUTING"),px=Symbol("ERRORED"),Gq=Mt(Me({},Lu),{value:nE,dirty:!0,error:null,equal:S3,kind:"computed",producerMustRecompute(t){return t.value===nE||t.value===rE},producerRecomputeValue(t){if(t.value===rE)throw new Error("Detected cycle in computations.");let i=t.value;t.value=rE;let e=Cf(t),r,n=!1;try{r=t.computation(),Di(null),n=i!==nE&&i!==px&&r!==px&&t.equal(i,r)}catch(a){r=px,t.error=a}finally{Rg(t,e)}if(n){t.value=i;return}t.value=r,t.version++}});function Hq(){throw new Error}var F3=Hq;function O3(){F3()}function L3(t){F3=t}var jq=null;function N3(t){let i=Object.create(lE);i.value=t;let e=()=>(gx(i),i.value);return e[As]=i,e}function xx(t,i){A3()||O3(),t.equal(t.value,i)||(t.value=i,Wq(t))}function B3(t,i){A3()||O3(),xx(t,i(t.value))}var lE=Mt(Me({},Lu),{equal:S3,value:void 0,kind:"signal"});function Wq(t){t.version++,zq(),M3(t),jq?.()}function V3(t,i,e){let r=Object.create(Xq);e&&(r.consumerAllowSignalWrites=!0),r.fn=t,r.schedule=i;let n=d=>{r.cleanupFn=d};function a(d){return d.fn===null&&d.schedule===null}function s(d){a(d)||(Tf(d),d.cleanupFn(),d.fn=null,d.schedule=null,d.cleanupFn=sE)}let o=()=>{if(r.fn===null)return;if(Uq())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(r.dirty=!1,r.hasRun&&!Pg(r))return;r.hasRun=!0;let d=Cf(r);try{r.cleanupFn(),r.cleanupFn=sE,r.fn(n)}finally{Rg(r,d)}};return r.ref={notify:()=>I3(r),run:o,cleanup:()=>r.cleanupFn(),destroy:()=>s(r),[As]:r},r.ref}var sE=()=>{},Xq=Mt(Me({},Lu),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:t=>{t.schedule!==null&&t.schedule(t.ref)},hasRun:!1,cleanupFn:sE});function qt(t){return typeof t=="function"}function Sf(t){let e=t(r=>{Error.call(r),r.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var bx=Sf(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription: +${e.map((r,n)=>`${n+1}) ${r.toString()}`).join(` + `)}`:"",this.name="UnsubscriptionError",this.errors=e});function Nu(t,i){if(t){let e=t.indexOf(i);0<=e&&t.splice(e,1)}}var kt=class t{constructor(i){this.initialTeardown=i,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let i;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let a of e)a.remove(this);else e.remove(this);let{initialTeardown:r}=this;if(qt(r))try{r()}catch(a){i=a instanceof bx?a.errors:[a]}let{_finalizers:n}=this;if(n){this._finalizers=null;for(let a of n)try{U3(a)}catch(s){i=i??[],s instanceof bx?i=[...i,...s.errors]:i.push(s)}}if(i)throw new bx(i)}}add(i){var e;if(i&&i!==this)if(this.closed)U3(i);else{if(i instanceof t){if(i.closed||i._hasParent(this))return;i._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(i)}}_hasParent(i){let{_parentage:e}=this;return e===i||Array.isArray(e)&&e.includes(i)}_addParent(i){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(i),e):e?[e,i]:i}_removeParent(i){let{_parentage:e}=this;e===i?this._parentage=null:Array.isArray(e)&&Nu(e,i)}remove(i){let{_finalizers:e}=this;e&&Nu(e,i),i instanceof t&&i._removeParent(this)}};kt.EMPTY=(()=>{let t=new kt;return t.closed=!0,t})();var cE=kt.EMPTY;function _x(t){return t instanceof kt||t&&"closed"in t&&qt(t.remove)&&qt(t.add)&&qt(t.unsubscribe)}function U3(t){qt(t)?t():t.unsubscribe()}var $o={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Ef={setTimeout(t,i,...e){let{delegate:r}=Ef;return r?.setTimeout?r.setTimeout(t,i,...e):setTimeout(t,i,...e)},clearTimeout(t){let{delegate:i}=Ef;return(i?.clearTimeout||clearTimeout)(t)},delegate:void 0};function wx(t){Ef.setTimeout(()=>{let{onUnhandledError:i}=$o;if(i)i(t);else throw t})}function Bu(){}var z3=dE("C",void 0,void 0);function G3(t){return dE("E",void 0,t)}function H3(t){return dE("N",t,void 0)}function dE(t,i,e){return{kind:t,value:i,error:e}}var Vu=null;function Df(t){if($o.useDeprecatedSynchronousErrorHandling){let i=!Vu;if(i&&(Vu={errorThrown:!1,error:null}),t(),i){let{errorThrown:e,error:r}=Vu;if(Vu=null,e)throw r}}else t()}function j3(t){$o.useDeprecatedSynchronousErrorHandling&&Vu&&(Vu.errorThrown=!0,Vu.error=t)}var Uu=class extends kt{constructor(i){super(),this.isStopped=!1,i?(this.destination=i,_x(i)&&i.add(this)):this.destination=Qq}static create(i,e,r){return new Qo(i,e,r)}next(i){this.isStopped?hE(H3(i),this):this._next(i)}error(i){this.isStopped?hE(G3(i),this):(this.isStopped=!0,this._error(i))}complete(){this.isStopped?hE(z3,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(i){this.destination.next(i)}_error(i){try{this.destination.error(i)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Yq=Function.prototype.bind;function uE(t,i){return Yq.call(t,i)}var fE=class{constructor(i){this.partialObserver=i}next(i){let{partialObserver:e}=this;if(e.next)try{e.next(i)}catch(r){Cx(r)}}error(i){let{partialObserver:e}=this;if(e.error)try{e.error(i)}catch(r){Cx(r)}else Cx(i)}complete(){let{partialObserver:i}=this;if(i.complete)try{i.complete()}catch(e){Cx(e)}}},Qo=class extends Uu{constructor(i,e,r){super();let n;if(qt(i)||!i)n={next:i??void 0,error:e??void 0,complete:r??void 0};else{let a;this&&$o.useDeprecatedNextContext?(a=Object.create(i),a.unsubscribe=()=>this.unsubscribe(),n={next:i.next&&uE(i.next,a),error:i.error&&uE(i.error,a),complete:i.complete&&uE(i.complete,a)}):n=i}this.destination=new fE(n)}};function Cx(t){$o.useDeprecatedSynchronousErrorHandling?j3(t):wx(t)}function $q(t){throw t}function hE(t,i){let{onStoppedNotification:e}=$o;e&&Ef.setTimeout(()=>e(t,i))}var Qq={closed:!0,next:Bu,error:$q,complete:Bu};var Mf=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Zs(t){return t}function mE(...t){return pE(t)}function pE(t){return t.length===0?Zs:t.length===1?t[0]:function(e){return t.reduce((r,n)=>n(r),e)}}var $t=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){let r=new t;return r.source=this,r.operator=e,r}subscribe(e,r,n){let a=Zq(e)?e:new Qo(e,r,n);return Df(()=>{let{operator:s,source:o}=this;a.add(s?s.call(a,o):o?this._subscribe(a):this._trySubscribe(a))}),a}_trySubscribe(e){try{return this._subscribe(e)}catch(r){e.error(r)}}forEach(e,r){return r=W3(r),new r((n,a)=>{let s=new Qo({next:o=>{try{e(o)}catch(d){a(d),s.unsubscribe()}},error:a,complete:n});this.subscribe(s)})}_subscribe(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)}[Mf](){return this}pipe(...e){return pE(e)(this)}toPromise(e){return e=W3(e),new e((r,n)=>{let a;this.subscribe(s=>a=s,s=>n(s),()=>r(a))})}}return t.create=i=>new t(i),t})();function W3(t){var i;return(i=t??$o.Promise)!==null&&i!==void 0?i:Promise}function Kq(t){return t&&qt(t.next)&&qt(t.error)&&qt(t.complete)}function Zq(t){return t&&t instanceof Uu||Kq(t)&&_x(t)}function gE(t){return qt(t?.lift)}function ri(t){return i=>{if(gE(i))return i.lift(function(e){try{return t(e,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function ni(t,i,e,r,n){return new vE(t,i,e,r,n)}var vE=class extends Uu{constructor(i,e,r,n,a,s){super(i),this.onFinalize=a,this.shouldUnsubscribe=s,this._next=e?function(o){try{e(o)}catch(d){i.error(d)}}:super._next,this._error=n?function(o){try{n(o)}catch(d){i.error(d)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(o){i.error(o)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((i=this.onFinalize)===null||i===void 0||i.call(this))}}};function Af(){return ri((t,i)=>{let e=null;t._refCount++;let r=ni(i,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){e=null;return}let n=t._connection,a=e;e=null,n&&(!a||n===a)&&n.unsubscribe(),i.unsubscribe()});t.subscribe(r),r.closed||(e=t.connect())})}var xd=class extends $t{constructor(i,e){super(),this.source=i,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,gE(i)&&(this.lift=i.lift)}_subscribe(i){return this.getSubject().subscribe(i)}getSubject(){let i=this._subject;return(!i||i.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:i}=this;this._subject=this._connection=null,i?.unsubscribe()}connect(){let i=this._connection;if(!i){i=this._connection=new kt;let e=this.getSubject();i.add(this.source.subscribe(ni(e,void 0,()=>{this._teardown(),e.complete()},r=>{this._teardown(),e.error(r)},()=>this._teardown()))),i.closed&&(this._connection=null,i=kt.EMPTY)}return i}refCount(){return Af()(this)}};var If={schedule(t){let i=requestAnimationFrame,e=cancelAnimationFrame,{delegate:r}=If;r&&(i=r.requestAnimationFrame,e=r.cancelAnimationFrame);let n=i(a=>{e=void 0,t(a)});return new kt(()=>e?.(n))},requestAnimationFrame(...t){let{delegate:i}=If;return(i?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:i}=If;return(i?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var X3=Sf(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Oe=(()=>{class t extends $t{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let r=new Tx(this,this);return r.operator=e,r}_throwIfClosed(){if(this.closed)throw new X3}next(e){Df(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(e)}})}error(e){Df(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:r}=this;for(;r.length;)r.shift().error(e)}})}complete(){Df(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:r,isStopped:n,observers:a}=this;return r||n?cE:(this.currentObservers=null,a.push(e),new kt(()=>{this.currentObservers=null,Nu(a,e)}))}_checkFinalizedStatuses(e){let{hasError:r,thrownError:n,isStopped:a}=this;r?e.error(n):a&&e.complete()}asObservable(){let e=new $t;return e.source=this,e}}return t.create=(i,e)=>new Tx(i,e),t})(),Tx=class extends Oe{constructor(i,e){super(),this.destination=i,this.source=e}next(i){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.next)===null||r===void 0||r.call(e,i)}error(i){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.error)===null||r===void 0||r.call(e,i)}complete(){var i,e;(e=(i=this.destination)===null||i===void 0?void 0:i.complete)===null||e===void 0||e.call(i)}_subscribe(i){var e,r;return(r=(e=this.source)===null||e===void 0?void 0:e.subscribe(i))!==null&&r!==void 0?r:cE}};var Ci=class extends Oe{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){let e=super._subscribe(i);return!e.closed&&i.next(this._value),e}getValue(){let{hasError:i,thrownError:e,_value:r}=this;if(i)throw e;return this._throwIfClosed(),r}next(i){super.next(this._value=i)}};var kg={now(){return(kg.delegate||Date).now()},delegate:void 0};var wo=class extends Oe{constructor(i=1/0,e=1/0,r=kg){super(),this._bufferSize=i,this._windowTime=e,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,i),this._windowTime=Math.max(1,e)}next(i){let{isStopped:e,_buffer:r,_infiniteTimeWindow:n,_timestampProvider:a,_windowTime:s}=this;e||(r.push(i),!n&&r.push(a.now()+s)),this._trimBuffer(),super.next(i)}_subscribe(i){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(i),{_infiniteTimeWindow:r,_buffer:n}=this,a=n.slice();for(let s=0;s0?super.requestAsyncId(i,e,r):(i.actions.push(this),i._scheduled||(i._scheduled=If.requestAnimationFrame(()=>i.flush(void 0))))}recycleAsyncId(i,e,r=0){var n;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(i,e,r);let{actions:a}=i;e!=null&&((n=a[a.length-1])===null||n===void 0?void 0:n.id)!==e&&(If.cancelAnimationFrame(e),i._scheduled=void 0)}};var Dx=class extends kf{flush(i){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let{actions:r}=this,n;i=i||r.shift();do if(n=i.execute(i.state,i.delay))break;while((i=r[0])&&i.id===e&&r.shift());if(this._active=!1,n){for(;(i=r[0])&&i.id===e&&r.shift();)i.unsubscribe();throw n}}};var Mx=new Dx(Ex);var lr=new $t(t=>t.complete());function Ax(t){return t&&qt(t.schedule)}function yE(t){return t[t.length-1]}function Ix(t){return qt(yE(t))?t.pop():void 0}function Tl(t){return Ax(yE(t))?t.pop():void 0}function $3(t,i){return typeof yE(t)=="number"?t.pop():i}function K3(t,i,e,r){function n(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(r.next(c))}catch(h){s(h)}}function d(c){try{l(r.throw(c))}catch(h){s(h)}}function l(c){c.done?a(c.value):n(c.value).then(o,d)}l((r=r.apply(t,i||[])).next())})}function Q3(t){var i=typeof Symbol=="function"&&Symbol.iterator,e=i&&t[i],r=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function zu(t){return this instanceof zu?(this.v=t,this):new zu(t)}function Z3(t,i,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(t,i||[]),n,a=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),n[Symbol.asyncIterator]=function(){return this},n;function s(f){return function(p){return Promise.resolve(p).then(f,h)}}function o(f,p){r[f]&&(n[f]=function(m){return new Promise(function(g,v){a.push([f,m,g,v])>1||d(f,m)})},p&&(n[f]=p(n[f])))}function d(f,p){try{l(r[f](p))}catch(m){u(a[0][3],m)}}function l(f){f.value instanceof zu?Promise.resolve(f.value.v).then(c,h):u(a[0][2],f)}function c(f){d("next",f)}function h(f){d("throw",f)}function u(f,p){f(p),a.shift(),a.length&&d(a[0][0],a[0][1])}}function J3(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t[Symbol.asyncIterator],e;return i?i.call(t):(t=typeof Q3=="function"?Q3(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(a){e[a]=t[a]&&function(s){return new Promise(function(o,d){s=t[a](s),n(o,d,s.done,s.value)})}}function n(a,s,o,d){Promise.resolve(d).then(function(l){a({value:l,done:o})},s)}}var Ff=t=>t&&typeof t.length=="number"&&typeof t!="function";function Rx(t){return qt(t?.then)}function Px(t){return qt(t[Mf])}function kx(t){return Symbol.asyncIterator&&qt(t?.[Symbol.asyncIterator])}function Fx(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Jq(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ox=Jq();function Lx(t){return qt(t?.[Ox])}function Nx(t){return Z3(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:r,done:n}=yield zu(e.read());if(n)return yield zu(void 0);yield yield zu(r)}}finally{e.releaseLock()}})}function Bx(t){return qt(t?.getReader)}function en(t){if(t instanceof $t)return t;if(t!=null){if(Px(t))return qq(t);if(Ff(t))return eee(t);if(Rx(t))return tee(t);if(kx(t))return q3(t);if(Lx(t))return iee(t);if(Bx(t))return nee(t)}throw Fx(t)}function qq(t){return new $t(i=>{let e=t[Mf]();if(qt(e.subscribe))return e.subscribe(i);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function eee(t){return new $t(i=>{for(let e=0;e{t.then(e=>{i.closed||(i.next(e),i.complete())},e=>i.error(e)).then(null,wx)})}function iee(t){return new $t(i=>{for(let e of t)if(i.next(e),i.closed)return;i.complete()})}function q3(t){return new $t(i=>{ree(t,i).catch(e=>i.error(e))})}function nee(t){return q3(Nx(t))}function ree(t,i){var e,r,n,a;return K3(this,void 0,void 0,function*(){try{for(e=J3(t);r=yield e.next(),!r.done;){let s=r.value;if(i.next(s),i.closed)return}}catch(s){n={error:s}}finally{try{r&&!r.done&&(a=e.return)&&(yield a.call(e))}finally{if(n)throw n.error}}i.complete()})}function ya(t,i,e,r=0,n=!1){let a=i.schedule(function(){e(),n?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(a),!n)return a}function Vx(t,i=0){return ri((e,r)=>{e.subscribe(ni(r,n=>ya(r,t,()=>r.next(n),i),()=>ya(r,t,()=>r.complete(),i),n=>ya(r,t,()=>r.error(n),i)))})}function Ux(t,i=0){return ri((e,r)=>{r.add(t.schedule(()=>e.subscribe(r),i))})}function eL(t,i){return en(t).pipe(Ux(i),Vx(i))}function tL(t,i){return en(t).pipe(Ux(i),Vx(i))}function iL(t,i){return new $t(e=>{let r=0;return i.schedule(function(){r===t.length?e.complete():(e.next(t[r++]),e.closed||this.schedule())})})}function nL(t,i){return new $t(e=>{let r;return ya(e,i,()=>{r=t[Ox](),ya(e,i,()=>{let n,a;try{({value:n,done:a}=r.next())}catch(s){e.error(s);return}a?e.complete():e.next(n)},0,!0)}),()=>qt(r?.return)&&r.return()})}function zx(t,i){if(!t)throw new Error("Iterable cannot be null");return new $t(e=>{ya(e,i,()=>{let r=t[Symbol.asyncIterator]();ya(e,i,()=>{r.next().then(n=>{n.done?e.complete():e.next(n.value)})},0,!0)})})}function rL(t,i){return zx(Nx(t),i)}function sL(t,i){if(t!=null){if(Px(t))return eL(t,i);if(Ff(t))return iL(t,i);if(Rx(t))return tL(t,i);if(kx(t))return zx(t,i);if(Lx(t))return nL(t,i);if(Bx(t))return rL(t,i)}throw Fx(t)}function wn(t,i){return i?sL(t,i):en(t)}function bt(...t){let i=Tl(t);return wn(t,i)}function Sl(t,i){let e=qt(t)?t:()=>t,r=n=>n.error(e());return new $t(i?n=>i.schedule(r,0,n):r)}function bd(t){return!!t&&(t instanceof $t||qt(t.lift)&&qt(t.subscribe))}var Za=Sf(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function sn(t,i){let e=typeof i=="object";return new Promise((r,n)=>{let a=!1,s;t.subscribe({next:o=>{s=o,a=!0},error:n,complete:()=>{a?r(s):e?r(i.defaultValue):n(new Za)}})})}function xE(t,i){let e=typeof i=="object";return new Promise((r,n)=>{let a=new Qo({next:s=>{r(s),a.unsubscribe()},error:n,complete:()=>{e?r(i.defaultValue):n(new Za)}});t.subscribe(a)})}function aL(t){return t instanceof Date&&!isNaN(t)}function mt(t,i){return ri((e,r)=>{let n=0;e.subscribe(ni(r,a=>{r.next(t.call(i,a,n++))}))})}var{isArray:see}=Array;function aee(t,i){return see(i)?t(...i):t(i)}function Of(t){return mt(i=>aee(t,i))}var{isArray:oee}=Array,{getPrototypeOf:lee,prototype:cee,keys:dee}=Object;function Gx(t){if(t.length===1){let i=t[0];if(oee(i))return{args:i,keys:null};if(uee(i)){let e=dee(i);return{args:e.map(r=>i[r]),keys:e}}}return{args:t,keys:null}}function uee(t){return t&&typeof t=="object"&&lee(t)===cee}function Hx(t,i){return t.reduce((e,r,n)=>(e[r]=i[n],e),{})}function Js(...t){let i=Tl(t),e=Ix(t),{args:r,keys:n}=Gx(t);if(r.length===0)return wn([],i);let a=new $t(hee(r,i,n?s=>Hx(n,s):Zs));return e?a.pipe(Of(e)):a}function hee(t,i,e=Zs){return r=>{oL(i,()=>{let{length:n}=t,a=new Array(n),s=n,o=n;for(let d=0;d{let l=wn(t[d],i),c=!1;l.subscribe(ni(r,h=>{a[d]=h,c||(c=!0,o--),o||r.next(e(a.slice()))},()=>{--s||r.complete()}))},r)},r)}}function oL(t,i,e){t?ya(e,t,i):i()}function lL(t,i,e,r,n,a,s,o){let d=[],l=0,c=0,h=!1,u=()=>{h&&!d.length&&!l&&i.complete()},f=m=>l{a&&i.next(m),l++;let g=!1;en(e(m,c++)).subscribe(ni(i,v=>{n?.(v),a?f(v):i.next(v)},()=>{g=!0},void 0,()=>{if(g)try{for(l--;d.length&&lp(v)):p(v)}u()}catch(v){i.error(v)}}))};return t.subscribe(ni(i,f,()=>{h=!0,u()})),()=>{o?.()}}function Jn(t,i,e=1/0){return qt(i)?Jn((r,n)=>mt((a,s)=>i(r,a,n,s))(en(t(r,n))),e):(typeof i=="number"&&(e=i),ri((r,n)=>lL(r,n,t,e)))}function _d(t=1/0){return Jn(Zs,t)}function cL(){return _d(1)}function El(...t){return cL()(wn(t,Tl(t)))}function Co(t){return new $t(i=>{en(t()).subscribe(i)})}function Og(...t){let i=Ix(t),{args:e,keys:r}=Gx(t),n=new $t(a=>{let{length:s}=e;if(!s){a.complete();return}let o=new Array(s),d=s,l=s;for(let c=0;c{h||(h=!0,l--),o[c]=u},()=>d--,void 0,()=>{(!d||!h)&&(l||a.next(r?Hx(r,o):o),a.complete())}))}});return i?n.pipe(Of(i)):n}var fee=["addListener","removeListener"],mee=["addEventListener","removeEventListener"],pee=["on","off"];function Lg(t,i,e,r){if(qt(e)&&(r=e,e=void 0),r)return Lg(t,i,e).pipe(Of(r));let[n,a]=yee(t)?mee.map(s=>o=>t[s](i,o,e)):gee(t)?fee.map(dL(t,i)):vee(t)?pee.map(dL(t,i)):[];if(!n&&Ff(t))return Jn(s=>Lg(s,i,e))(en(t));if(!n)throw new TypeError("Invalid event target");return new $t(s=>{let o=(...d)=>s.next(1a(o)})}function dL(t,i){return e=>r=>t[e](i,r)}function gee(t){return qt(t.addListener)&&qt(t.removeListener)}function vee(t){return qt(t.on)&&qt(t.off)}function yee(t){return qt(t.addEventListener)&&qt(t.removeEventListener)}function Ko(t=0,i,e=Y3){let r=-1;return i!=null&&(Ax(i)?e=i:r=i),new $t(n=>{let a=aL(t)?+t-e.now():t;a<0&&(a=0);let s=0;return e.schedule(function(){n.closed||(n.next(s++),0<=r?this.schedule(void 0,r):n.complete())},a)})}function bE(t=0,i=bc){return t<0&&(t=0),Ko(t,t,i)}function Fi(...t){let i=Tl(t),e=$3(t,1/0),r=t;return r.length?r.length===1?en(r[0]):_d(e)(wn(r,i)):lr}function Xt(t,i){return ri((e,r)=>{let n=0;e.subscribe(ni(r,a=>t.call(i,a,n++)&&r.next(a)))})}function uL(t){return ri((i,e)=>{let r=!1,n=null,a=null,s=!1,o=()=>{if(a?.unsubscribe(),a=null,r){r=!1;let l=n;n=null,e.next(l)}s&&e.complete()},d=()=>{a=null,s&&e.complete()};i.subscribe(ni(e,l=>{r=!0,n=l,a||en(t(l)).subscribe(a=ni(e,o,d))},()=>{s=!0,(!r||!a||a.closed)&&e.complete()}))})}function jx(t,i=bc){return uL(()=>Ko(t,i))}function Rn(t){return ri((i,e)=>{let r=null,n=!1,a;r=i.subscribe(ni(e,void 0,void 0,s=>{a=en(t(s,Rn(t)(i))),r?(r.unsubscribe(),r=null,a.subscribe(e)):n=!0})),n&&(r.unsubscribe(),r=null,a.subscribe(e))})}function hL(t,i,e,r,n){return(a,s)=>{let o=e,d=i,l=0;a.subscribe(ni(s,c=>{let h=l++;d=o?t(d,c,h):(o=!0,c),r&&s.next(d)},n&&(()=>{o&&s.next(d),s.complete()})))}}function _c(t,i){return qt(i)?Jn(t,i,1):Jn(t,1)}function Tr(t,i=bc){return ri((e,r)=>{let n=null,a=null,s=null,o=()=>{if(n){n.unsubscribe(),n=null;let l=a;a=null,r.next(l)}};function d(){let l=s+t,c=i.now();if(c{a=l,s=i.now(),n||(n=i.schedule(d,t),r.add(n))},()=>{o(),r.complete()},void 0,()=>{a=n=null}))})}function wd(t){return ri((i,e)=>{let r=!1;i.subscribe(ni(e,n=>{r=!0,e.next(n)},()=>{r||e.next(t),e.complete()}))})}function Vi(t){return t<=0?()=>lr:ri((i,e)=>{let r=0;i.subscribe(ni(e,n=>{++r<=t&&(e.next(n),t<=r&&e.complete())}))})}function fL(){return ri((t,i)=>{t.subscribe(ni(i,Bu))})}function Lf(t){return mt(()=>t)}function _E(t,i){return i?e=>El(i.pipe(Vi(1),fL()),e.pipe(_E(t))):Jn((e,r)=>en(t(e,r)).pipe(Vi(1),Lf(e)))}function wE(t,i=bc){let e=Ko(t,i);return _E(()=>e)}function qs(t,i=Zs){return t=t??xee,ri((e,r)=>{let n,a=!0;e.subscribe(ni(r,s=>{let o=i(s);(a||!t(n,o))&&(a=!1,n=o,r.next(s))}))})}function xee(t,i){return t===i}function Wx(t=bee){return ri((i,e)=>{let r=!1;i.subscribe(ni(e,n=>{r=!0,e.next(n)},()=>r?e.complete():e.error(t())))})}function bee(){return new Za}function Dl(t){return ri((i,e)=>{try{i.subscribe(e)}finally{e.add(t)}})}function Jr(t,i){let e=arguments.length>=2;return r=>r.pipe(t?Xt((n,a)=>t(n,a,r)):Zs,Vi(1),e?wd(i):Wx(()=>new Za))}function Nf(t){return t<=0?()=>lr:ri((i,e)=>{let r=[];i.subscribe(ni(e,n=>{r.push(n),t{for(let n of r)e.next(n);e.complete()},void 0,()=>{r=null}))})}function CE(t,i){let e=arguments.length>=2;return r=>r.pipe(t?Xt((n,a)=>t(n,a,r)):Zs,Nf(1),e?wd(i):Wx(()=>new Za))}function Xx(){return ri((t,i)=>{let e,r=!1;t.subscribe(ni(i,n=>{let a=e;e=n,r&&i.next([a,n]),r=!0}))})}function TE(t,i){return ri(hL(t,i,arguments.length>=2,!0))}function Ng(t={}){let{connector:i=()=>new Oe,resetOnError:e=!0,resetOnComplete:r=!0,resetOnRefCountZero:n=!0}=t;return a=>{let s,o,d,l=0,c=!1,h=!1,u=()=>{o?.unsubscribe(),o=void 0},f=()=>{u(),s=d=void 0,c=h=!1},p=()=>{let m=s;f(),m?.unsubscribe()};return ri((m,g)=>{l++,!h&&!c&&u();let v=d=d??i();g.add(()=>{l--,l===0&&!h&&!c&&(o=SE(p,n))}),v.subscribe(g),!s&&l>0&&(s=new Qo({next:y=>v.next(y),error:y=>{h=!0,u(),o=SE(f,e,y),v.error(y)},complete:()=>{c=!0,u(),o=SE(f,r),v.complete()}}),en(m).subscribe(s))})(a)}}function SE(t,i,...e){if(i===!0){t();return}if(i===!1)return;let r=new Qo({next:()=>{r.unsubscribe(),t()}});return en(i(...e)).subscribe(r)}function Yx(t,i,e){let r,n=!1;return t&&typeof t=="object"?{bufferSize:r=1/0,windowTime:i=1/0,refCount:n=!1,scheduler:e}=t:r=t??1/0,Ng({connector:()=>new wo(r,i,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:n})}function Gu(t){return Xt((i,e)=>t<=e)}function Wi(...t){let i=Tl(t);return ri((e,r)=>{(i?El(t,e,i):El(t,e)).subscribe(r)})}function tn(t,i){return ri((e,r)=>{let n=null,a=0,s=!1,o=()=>s&&!n&&r.complete();e.subscribe(ni(r,d=>{n?.unsubscribe();let l=0,c=a++;en(t(d,c)).subscribe(n=ni(r,h=>r.next(i?i(d,h,c,l++):h),()=>{n=null,o()}))},()=>{s=!0,o()}))})}function Vt(t){return ri((i,e)=>{en(t).subscribe(ni(e,()=>e.complete(),Bu)),!e.closed&&i.subscribe(e)})}function Bf(t,i=!1){return ri((e,r)=>{let n=0;e.subscribe(ni(r,a=>{let s=t(a,n++);(s||i)&&r.next(a),!s&&r.complete()}))})}function Ui(t,i,e){let r=qt(t)||i||e?{next:t,error:i,complete:e}:t;return r?ri((n,a)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let o=!0;n.subscribe(ni(a,d=>{var l;(l=r.next)===null||l===void 0||l.call(r,d),a.next(d)},()=>{var d;o=!1,(d=r.complete)===null||d===void 0||d.call(r),a.complete()},d=>{var l;o=!1,(l=r.error)===null||l===void 0||l.call(r,d),a.error(d)},()=>{var d,l;o&&((d=r.unsubscribe)===null||d===void 0||d.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):Zs}var oN="https://g.co/ng/security#xss",et=class extends Error{code;constructor(i,e){super(B1(i,e)),this.code=i}};function B1(t,i){return`${`NG0${Math.abs(t)}`}${i?": "+i:""}`}var lN=Symbol("InputSignalNode#UNSET"),_ee=Mt(Me({},lE),{transformFn:void 0,applyValueToInputSignal(t,i){xx(t,i)}});function cN(t,i){let e=Object.create(_ee);e.value=t,e.transformFn=i?.transform;function r(){if(gx(e),e.value===lN)throw new et(-950,!1);return e.value}return r[As]=e,r}function Jg(t){return{toString:t}.toString()}var $x="__parameters__";function wee(t){return function(...e){if(t){let r=t(...e);for(let n in r)this[n]=r[n]}}}function dN(t,i,e){return Jg(()=>{let r=wee(i);function n(...a){if(this instanceof n)return r.apply(this,a),this;let s=new n(...a);return o.annotation=s,o;function o(d,l,c){let h=d.hasOwnProperty($x)?d[$x]:Object.defineProperty(d,$x,{value:[]})[$x];for(;h.length<=c;)h.push(null);return(h[c]=h[c]||[]).push(s),d}}return e&&(n.prototype=Object.create(e.prototype)),n.prototype.ngMetadataName=t,n.annotationCls=n,n})}var fs=globalThis;function Cn(t){for(let i in t)if(t[i]===Cn)return i;throw Error("Could not find renamed property on target object.")}function Cee(t,i){for(let e in i)i.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=i[e])}function ta(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map(ta).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;let i=t.toString();if(i==null)return""+i;let e=i.indexOf(` +`);return e===-1?i:i.substring(0,e)}function VE(t,i){return t==null||t===""?i===null?"":i:i==null||i===""?t:t+" "+i}var Tee=Cn({__forward_ref__:Cn});function Pn(t){return t.__forward_ref__=Pn,t.toString=function(){return ta(this())},t}function ms(t){return uN(t)?t():t}function uN(t){return typeof t=="function"&&t.hasOwnProperty(Tee)&&t.__forward_ref__===Pn}function Fe(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function nt(t){return{providers:t.providers||[],imports:t.imports||[]}}function V1(t){return mL(t,fN)||mL(t,mN)}function hN(t){return V1(t)!==null}function mL(t,i){return t.hasOwnProperty(i)?t[i]:null}function See(t){let i=t&&(t[fN]||t[mN]);return i||null}function pL(t){return t&&(t.hasOwnProperty(gL)||t.hasOwnProperty(Eee))?t[gL]:null}var fN=Cn({\u0275prov:Cn}),gL=Cn({\u0275inj:Cn}),mN=Cn({ngInjectableDef:Cn}),Eee=Cn({ngInjectorDef:Cn}),Se=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(i,e){this._desc=i,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=Fe({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function pN(t){return t&&!!t.\u0275providers}var Dee=Cn({\u0275cmp:Cn}),Mee=Cn({\u0275dir:Cn}),Aee=Cn({\u0275pipe:Cn}),Iee=Cn({\u0275mod:Cn}),o1=Cn({\u0275fac:Cn}),zg=Cn({__NG_ELEMENT_ID__:Cn}),vL=Cn({__NG_ENV_ID__:Cn});function Al(t){return typeof t=="string"?t:t==null?"":String(t)}function Ree(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Al(t)}function Pee(t,i){let e=i?`. Dependency path: ${i.join(" > ")} > ${t}`:"";throw new et(-200,t)}function $2(t,i){throw new et(-201,!1)}var Ti=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(Ti||{}),UE;function gN(){return UE}function xa(t){let i=UE;return UE=t,i}function vN(t,i,e){let r=V1(t);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(e&Ti.Optional)return null;if(i!==void 0)return i;$2(t,"Injector")}var kee={},Hg=kee,zE="__NG_DI_FLAG__",l1="ngTempTokenPath",Fee="ngTokenPath",Oee=/\n/gm,Lee="\u0275",yL="__source",Hf;function Nee(){return Hf}function Cd(t){let i=Hf;return Hf=t,i}function Bee(t,i=Ti.Default){if(Hf===void 0)throw new et(-203,!1);return Hf===null?vN(t,void 0,i):Hf.get(t,i&Ti.Optional?null:void 0,i)}function _t(t,i=Ti.Default){return(gN()||Bee)(ms(t),i)}function Q(t,i=Ti.Default){return _t(t,U1(i))}function U1(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function GE(t){let i=[];for(let e=0;e ");else if(typeof i=="object"){let a=[];for(let s in i)if(i.hasOwnProperty(s)){let o=i[s];a.push(s+":"+(typeof o=="string"?JSON.stringify(o):ta(o)))}n=`{${a.join(", ")}}`}return`${e}${r?"("+r+")":""}[${n}]: ${t.replace(Oee,` + `)}`}var Dc=yN(dN("Optional"),8);var ih=yN(dN("SkipSelf"),4);function Wu(t,i){let e=t.hasOwnProperty(o1);return e?t[o1]:null}function Gee(t,i,e){if(t.length!==i.length)return!1;for(let r=0;rArray.isArray(e)?Q2(e,i):i(e))}function xN(t,i,e){i>=t.length?t.push(e):t.splice(i,0,e)}function c1(t,i){return i>=t.length-1?t.pop():t.splice(i,1)[0]}function jee(t,i){let e=[];for(let r=0;ri;){let a=n-2;t[n]=t[a],n--}t[i]=e,t[i+1]=r}}function z1(t,i,e){let r=qg(t,i);return r>=0?t[r|1]=e:(r=~r,Wee(t,r,i,e)),r}function EE(t,i){let e=qg(t,i);if(e>=0)return t[e|1]}function qg(t,i){return Xee(t,i,1)}function Xee(t,i,e){let r=0,n=t.length>>e;for(;n!==r;){let a=r+(n-r>>1),s=t[a<i?n=a:r=a+1}return~(n<{e.push(s)};return Q2(i,s=>{let o=s;HE(o,a,[],r)&&(n||=[],n.push(o))}),n!==void 0&&EN(n,a),e}function EN(t,i){for(let e=0;e{i(a,r)})}}function HE(t,i,e,r){if(t=ms(t),!t)return!1;let n=null,a=pL(t),s=!a&&Cc(t);if(!a&&!s){let d=t.ngModule;if(a=pL(d),a)n=d;else return!1}else{if(s&&!s.standalone)return!1;n=t}let o=r.has(n);if(s){if(o)return!1;if(r.add(n),s.dependencies){let d=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of d)HE(l,i,e,r)}}else if(a){if(a.imports!=null&&!o){r.add(n);let l;try{Q2(a.imports,c=>{HE(c,i,e,r)&&(l||=[],l.push(c))})}finally{}l!==void 0&&EN(l,i)}if(!o){let l=Wu(n)||(()=>new n);i({provide:n,useFactory:l,deps:ea},n),i({provide:_N,useValue:n,multi:!0},n),i({provide:Wf,useValue:()=>_t(n),multi:!0},n)}let d=a.providers;if(d!=null&&!o){let l=t;Z2(d,c=>{i(c,l)})}}else return!1;return n!==t&&t.providers!==void 0}function Z2(t,i){for(let e of t)pN(e)&&(e=e.\u0275providers),Array.isArray(e)?Z2(e,i):i(e)}var $ee=Cn({provide:String,useValue:Cn});function DN(t){return t!==null&&typeof t=="object"&&$ee in t}function Qee(t){return!!(t&&t.useExisting)}function Kee(t){return!!(t&&t.useFactory)}function Xf(t){return typeof t=="function"}function Zee(t){return!!t.useClass}var H1=new Se(""),t1={},Jee={},DE;function j1(){return DE===void 0&&(DE=new d1),DE}var vr=class{},jg=class extends vr{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(i,e,r,n){super(),this.parent=e,this.source=r,this.scopes=n,WE(i,s=>this.processProvider(s)),this.records.set(bN,Vf(void 0,this)),n.has("environment")&&this.records.set(vr,Vf(void 0,this));let a=this.records.get(H1);a!=null&&typeof a.value=="string"&&this.scopes.add(a.value),this.injectorDefTypes=new Set(this.get(_N,ea,Ti.Self))}destroy(){Vg(this),this._destroyed=!0;let i=Di(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of e)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Di(i)}}onDestroy(i){return Vg(this),this._onDestroyHooks.push(i),()=>this.removeOnDestroy(i)}runInContext(i){Vg(this);let e=Cd(this),r=xa(void 0),n;try{return i()}finally{Cd(e),xa(r)}}get(i,e=Hg,r=Ti.Default){if(Vg(this),i.hasOwnProperty(vL))return i[vL](this);r=U1(r);let n,a=Cd(this),s=xa(void 0);try{if(!(r&Ti.SkipSelf)){let d=this.records.get(i);if(d===void 0){let l=nte(i)&&V1(i);l&&this.injectableDefInScope(l)?d=Vf(jE(i),t1):d=null,this.records.set(i,d)}if(d!=null)return this.hydrate(i,d)}let o=r&Ti.Self?j1():this.parent;return e=r&Ti.Optional&&e===Hg?null:e,o.get(i,e)}catch(o){if(o.name==="NullInjectorError"){if((o[l1]=o[l1]||[]).unshift(ta(i)),a)throw o;return Uee(o,i,"R3InjectorError",this.source)}else throw o}finally{xa(s),Cd(a)}}resolveInjectorInitializers(){let i=Di(null),e=Cd(this),r=xa(void 0),n;try{let a=this.get(Wf,ea,Ti.Self);for(let s of a)s()}finally{Cd(e),xa(r),Di(i)}}toString(){let i=[],e=this.records;for(let r of e.keys())i.push(ta(r));return`R3Injector[${i.join(", ")}]`}processProvider(i){i=ms(i);let e=Xf(i)?i:ms(i&&i.provide),r=ete(i);if(!Xf(i)&&i.multi===!0){let n=this.records.get(e);n||(n=Vf(void 0,t1,!0),n.factory=()=>GE(n.multi),this.records.set(e,n)),e=i,n.multi.push(i)}this.records.set(e,r)}hydrate(i,e){let r=Di(null);try{return e.value===t1&&(e.value=Jee,e.value=e.factory()),typeof e.value=="object"&&e.value&&ite(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{Di(r)}}injectableDefInScope(i){if(!i.providedIn)return!1;let e=ms(i.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(i){let e=this._onDestroyHooks.indexOf(i);e!==-1&&this._onDestroyHooks.splice(e,1)}};function jE(t){let i=V1(t),e=i!==null?i.factory:Wu(t);if(e!==null)return e;if(t instanceof Se)throw new et(204,!1);if(t instanceof Function)return qee(t);throw new et(204,!1)}function qee(t){if(t.length>0)throw new et(204,!1);let e=See(t);return e!==null?()=>e.factory(t):()=>new t}function ete(t){if(DN(t))return Vf(void 0,t.useValue);{let i=MN(t);return Vf(i,t1)}}function MN(t,i,e){let r;if(Xf(t)){let n=ms(t);return Wu(n)||jE(n)}else if(DN(t))r=()=>ms(t.useValue);else if(Kee(t))r=()=>t.useFactory(...GE(t.deps||[]));else if(Qee(t))r=()=>_t(ms(t.useExisting));else{let n=ms(t&&(t.useClass||t.provide));if(tte(t))r=()=>new n(...GE(t.deps));else return Wu(n)||jE(n)}return r}function Vg(t){if(t.destroyed)throw new et(205,!1)}function Vf(t,i,e=!1){return{factory:t,value:i,multi:e?[]:void 0}}function tte(t){return!!t.deps}function ite(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function nte(t){return typeof t=="function"||typeof t=="object"&&t instanceof Se}function WE(t,i){for(let e of t)Array.isArray(e)?WE(e,i):e&&pN(e)?WE(e.\u0275providers,i):i(e)}function wa(t,i){t instanceof jg&&Vg(t);let e,r=Cd(t),n=xa(void 0);try{return i()}finally{Cd(r),xa(n)}}function AN(){return gN()!==void 0||Nee()!=null}function W1(t){if(!AN())throw new et(-203,!1)}function rte(t){let i=fs.ng;if(i&&i.\u0275compilerFacade)return i.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function ste(t){return typeof t=="function"}var Ol=0,pi=1,si=2,Rs=3,qo=4,Ca=5,Yf=6,u1=7,ps=8,Wg=9,Tc=10,Wn=11,Xg=12,xL=13,em=14,qa=15,Xu=16,Uf=17,Sc=18,X1=19,IN=20,Td=21,i1=22,Yu=23,Ja=24,Sr=25,J2=1;var $u=7,h1=8,$f=9,Is=10;function Sd(t){return Array.isArray(t)&&typeof t[J2]=="object"}function Mc(t){return Array.isArray(t)&&t[J2]===!0}function q2(t){return(t.flags&4)!==0}function nh(t){return t.componentOffset>-1}function Y1(t){return(t.flags&1)===1}function Il(t){return!!t.template}function f1(t){return(t[si]&512)!==0}function e0(t){return(t[si]&256)===256}var XE=class{previousValue;currentValue;firstChange;constructor(i,e,r){this.previousValue=i,this.currentValue=e,this.firstChange=r}isFirstChange(){return this.firstChange}};function RN(t,i,e,r){i!==null?i.applyValueToInputSignal(i,r):t[e]=r}var ei=(()=>{let t=()=>PN;return t.ngInherit=!0,t})();function PN(t){return t.type.prototype.ngOnChanges&&(t.setInput=ote),ate}function ate(){let t=FN(this),i=t?.current;if(i){let e=t.previous;if(e===wc)t.previous=i;else for(let r in i)e[r]=i[r];t.current=null,this.ngOnChanges(i)}}function ote(t,i,e,r,n){let a=this.declaredInputs[r],s=FN(t)||lte(t,{previous:wc,current:null}),o=s.current||(s.current={}),d=s.previous,l=d[a];o[a]=new XE(l&&l.currentValue,e,d===wc),RN(t,i,n,e)}var kN="__ngSimpleChanges__";function FN(t){return t[kN]||null}function lte(t,i){return t[kN]=i}var bL=null;var To=function(t,i,e){bL?.(t,i,e)},ON="svg",cte="math";function Rl(t){for(;Array.isArray(t);)t=t[Ol];return t}function dte(t){for(;Array.isArray(t);){if(typeof t[J2]=="object")return t;t=t[Ol]}return null}function LN(t,i){return Rl(i[t])}function tl(t,i){return Rl(i[t.index])}function eD(t,i){return t.data[i]}function $1(t,i){return t[i]}function Pl(t,i){let e=i[t];return Sd(e)?e:e[Ol]}function ute(t){return(t[si]&4)===4}function tD(t){return(t[si]&128)===128}function hte(t){return Mc(t[Rs])}function Ed(t,i){return i==null?null:t[i]}function NN(t){t[Uf]=0}function iD(t){t[si]&1024||(t[si]|=1024,tD(t)&&t0(t))}function fte(t,i){for(;t>0;)i=i[em],t--;return i}function Q1(t){return!!(t[si]&9216||t[Ja]?.dirty)}function YE(t){t[Tc].changeDetectionScheduler?.notify(9),t[si]&64&&(t[si]|=1024),Q1(t)&&t0(t)}function t0(t){t[Tc].changeDetectionScheduler?.notify(0);let i=Qu(t);for(;i!==null&&!(i[si]&8192||(i[si]|=8192,!tD(i)));)i=Qu(i)}function BN(t,i){if(e0(t))throw new et(911,!1);t[Td]===null&&(t[Td]=[]),t[Td].push(i)}function mte(t,i){if(t[Td]===null)return;let e=t[Td].indexOf(i);e!==-1&&t[Td].splice(e,1)}function Qu(t){let i=t[Rs];return Mc(i)?i[Rs]:i}function VN(t){return t[u1]??=[]}function UN(t){return t.cleanup??=[]}function pte(t,i,e,r){let n=VN(i);n.push(e),t.firstCreatePass&&UN(t).push(r,n.length-1)}var gi={lFrame:YN(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var $E=!1;function gte(){return gi.lFrame.elementDepthCount}function vte(){gi.lFrame.elementDepthCount++}function yte(){gi.lFrame.elementDepthCount--}function K1(){return gi.bindingsEnabled}function zN(){return gi.skipHydrationRootTNode!==null}function xte(t){return gi.skipHydrationRootTNode===t}function bte(){gi.skipHydrationRootTNode=null}function Kt(){return gi.lFrame.lView}function kn(){return gi.lFrame.tView}function ue(t){return gi.lFrame.contextLView=t,t[ps]}function he(t){return gi.lFrame.contextLView=null,t}function gs(){let t=GN();for(;t!==null&&t.type===64;)t=t.parent;return t}function GN(){return gi.lFrame.currentTNode}function _te(){let t=gi.lFrame,i=t.currentTNode;return t.isParent?i:i.parent}function rh(t,i){let e=gi.lFrame;e.currentTNode=t,e.isParent=i}function nD(){return gi.lFrame.isParent}function rD(){gi.lFrame.isParent=!1}function wte(){return gi.lFrame.contextLView}function HN(){return $E}function m1(t){let i=$E;return $E=t,i}function tm(){let t=gi.lFrame,i=t.bindingRootIndex;return i===-1&&(i=t.bindingRootIndex=t.tView.bindingStartIndex),i}function jN(){return gi.lFrame.bindingIndex}function Cte(t){return gi.lFrame.bindingIndex=t}function Ad(){return gi.lFrame.bindingIndex++}function Z1(t){let i=gi.lFrame,e=i.bindingIndex;return i.bindingIndex=i.bindingIndex+t,e}function Tte(){return gi.lFrame.inI18n}function Ste(t,i){let e=gi.lFrame;e.bindingIndex=e.bindingRootIndex=t,QE(i)}function Ete(){return gi.lFrame.currentDirectiveIndex}function QE(t){gi.lFrame.currentDirectiveIndex=t}function sD(t){let i=gi.lFrame.currentDirectiveIndex;return i===-1?null:t[i]}function aD(){return gi.lFrame.currentQueryIndex}function J1(t){gi.lFrame.currentQueryIndex=t}function Dte(t){let i=t[pi];return i.type===2?i.declTNode:i.type===1?t[Ca]:null}function WN(t,i,e){if(e&Ti.SkipSelf){let n=i,a=t;for(;n=n.parent,n===null&&!(e&Ti.Host);)if(n=Dte(a),n===null||(a=a[em],n.type&10))break;if(n===null)return!1;i=n,t=a}let r=gi.lFrame=XN();return r.currentTNode=i,r.lView=t,!0}function oD(t){let i=XN(),e=t[pi];gi.lFrame=i,i.currentTNode=e.firstChild,i.lView=t,i.tView=e,i.contextLView=t,i.bindingIndex=e.bindingStartIndex,i.inI18n=!1}function XN(){let t=gi.lFrame,i=t===null?null:t.child;return i===null?YN(t):i}function YN(t){let i={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:t,child:null,inI18n:!1};return t!==null&&(t.child=i),i}function $N(){let t=gi.lFrame;return gi.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var QN=$N;function lD(){let t=$N();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Mte(t){return(gi.lFrame.contextLView=fte(t,gi.lFrame.contextLView))[ps]}function Ll(){return gi.lFrame.selectedIndex}function Ku(t){gi.lFrame.selectedIndex=t}function im(){let t=gi.lFrame;return eD(t.tView,t.selectedIndex)}function yr(){gi.lFrame.currentNamespace=ON}function sh(){Ate()}function Ate(){gi.lFrame.currentNamespace=null}function Ite(){return gi.lFrame.currentNamespace}var KN=!0;function q1(){return KN}function eb(t){KN=t}function Rte(t,i,e){let{ngOnChanges:r,ngOnInit:n,ngDoCheck:a}=i.type.prototype;if(r){let s=PN(i);(e.preOrderHooks??=[]).push(t,s),(e.preOrderCheckHooks??=[]).push(t,s)}n&&(e.preOrderHooks??=[]).push(0-t,n),a&&((e.preOrderHooks??=[]).push(t,a),(e.preOrderCheckHooks??=[]).push(t,a))}function cD(t,i){for(let e=i.directiveStart,r=i.directiveEnd;e=r)break}else i[d]<0&&(t[Uf]+=65536),(o>14>16&&(t[si]&3)===i&&(t[si]+=16384,_L(o,a)):_L(o,a)}var jf=-1,Zu=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(i,e,r){this.factory=i,this.canSeeViewProviders=e,this.injectImpl=r}};function kte(t){return t instanceof Zu}function Fte(t){return(t.flags&8)!==0}function Ote(t){return(t.flags&16)!==0}function Lte(t,i,e){let r=0;for(;ri){s=a-1;break}}}for(;a>16}function g1(t,i){let e=Bte(t),r=i;for(;e>0;)r=r[em],e--;return r}var ZE=!0;function v1(t){let i=ZE;return ZE=t,i}var Vte=256,e5=Vte-1,t5=5,Ute=0,Ml={};function zte(t,i,e){let r;typeof e=="string"?r=e.charCodeAt(0)||0:e.hasOwnProperty(zg)&&(r=e[zg]),r==null&&(r=e[zg]=Ute++);let n=r&e5,a=1<>t5)]|=a}function y1(t,i){let e=i5(t,i);if(e!==-1)return e;let r=i[pi];r.firstCreatePass&&(t.injectorIndex=i.length,IE(r.data,t),IE(i,null),IE(r.blueprint,null));let n=dD(t,i),a=t.injectorIndex;if(qN(n)){let s=p1(n),o=g1(n,i),d=o[pi].data;for(let l=0;l<8;l++)i[a+l]=o[s+l]|d[s+l]}return i[a+8]=n,a}function IE(t,i){t.push(0,0,0,0,0,0,0,0,i)}function i5(t,i){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||i[t.injectorIndex+8]===null?-1:t.injectorIndex}function dD(t,i){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let e=0,r=null,n=i;for(;n!==null;){if(r=o5(n),r===null)return jf;if(e++,n=n[em],r.injectorIndex!==-1)return r.injectorIndex|e<<16}return jf}function JE(t,i,e){zte(t,i,e)}function Gte(t,i){if(i==="class")return t.classes;if(i==="style")return t.styles;let e=t.attrs;if(e){let r=e.length,n=0;for(;n>20,h=r?o:o+c,u=n?o+c:l;for(let f=h;f=d&&p.type===e)return f}if(n){let f=s[d];if(f&&Il(f)&&f.type===e)return d}return null}function Yg(t,i,e,r){let n=t[e],a=i.data;if(kte(n)){let s=n;s.resolving&&Pee(Ree(a[e]));let o=v1(s.canSeeViewProviders);s.resolving=!0;let d,l=s.injectImpl?xa(s.injectImpl):null,c=WN(t,r,Ti.Default);try{n=t[e]=s.factory(void 0,a,t,r),i.firstCreatePass&&e>=r.directiveStart&&Rte(e,a[e],i)}finally{l!==null&&xa(l),v1(o),s.resolving=!1,QN()}}return n}function jte(t){if(typeof t=="string")return t.charCodeAt(0)||0;let i=t.hasOwnProperty(zg)?t[zg]:void 0;return typeof i=="number"?i>=0?i&e5:Wte:i}function CL(t,i,e){let r=1<>t5)]&r)}function TL(t,i){return!(t&Ti.Self)&&!(t&Ti.Host&&i)}var ju=class{_tNode;_lView;constructor(i,e){this._tNode=i,this._lView=e}get(i,e,r){return s5(this._tNode,this._lView,i,U1(r),e)}};function Wte(){return new ju(gs(),Kt())}function bi(t){return Jg(()=>{let i=t.prototype.constructor,e=i[o1]||qE(i),r=Object.prototype,n=Object.getPrototypeOf(t.prototype).constructor;for(;n&&n!==r;){let a=n[o1]||qE(n);if(a&&a!==e)return a;n=Object.getPrototypeOf(n)}return a=>new a})}function qE(t){return uN(t)?()=>{let i=qE(ms(t));return i&&i()}:Wu(t)}function Xte(t,i,e,r,n){let a=t,s=i;for(;a!==null&&s!==null&&s[si]&2048&&!f1(s);){let o=a5(a,s,e,r|Ti.Self,Ml);if(o!==Ml)return o;let d=a.parent;if(!d){let l=s[IN];if(l){let c=l.get(e,Ml,r);if(c!==Ml)return c}d=o5(s),s=s[em]}a=d}return n}function o5(t){let i=t[pi],e=i.type;return e===2?i.declTNode:e===1?t[Ca]:null}function tb(t){return Gte(gs(),t)}function SL(t,i=null,e=null,r){let n=l5(t,i,e,r);return n.resolveInjectorInitializers(),n}function l5(t,i=null,e=null,r,n=new Set){let a=[e||ea,Yee(t)];return r=r||(typeof t=="object"?void 0:ta(t)),new jg(a,i||j1(),r||null,n)}var Wt=class t{static THROW_IF_NOT_FOUND=Hg;static NULL=new d1;static create(i,e){if(Array.isArray(i))return SL({name:""},e,i,"");{let r=i.name??"";return SL({name:r},i.parent,i.providers,r)}}static \u0275prov=Fe({token:t,providedIn:"any",factory:()=>_t(bN)});static __NG_ELEMENT_ID__=-1};var Ur=class{attributeName;constructor(i){this.attributeName=i}__NG_ELEMENT_ID__=()=>tb(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},Yte=new Se("");Yte.__NG_ELEMENT_ID__=t=>{let i=gs();if(i===null)throw new et(204,!1);if(i.type&2)return i.value;if(t&Ti.Optional)return null;throw new et(204,!1)};var c5=!1,ah=(()=>{class t{static __NG_ELEMENT_ID__=$te;static __NG_ENV_ID__=e=>e}return t})(),x1=class extends ah{_lView;constructor(i){super(),this._lView=i}onDestroy(i){return BN(this._lView,i),()=>mte(this._lView,i)}};function $te(){return new x1(Kt())}var Ju=class{},uD=new Se("",{providedIn:"root",factory:()=>!1});var d5=new Se(""),u5=new Se(""),Nl=(()=>{class t{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Ci(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=Fe({token:t,providedIn:"root",factory:()=>new t})}return t})();var e2=class extends Oe{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(i=!1){super(),this.__isAsync=i,AN()&&(this.destroyRef=Q(ah,{optional:!0})??void 0,this.pendingTasks=Q(Nl,{optional:!0})??void 0)}emit(i){let e=Di(null);try{super.next(i)}finally{Di(e)}}subscribe(i,e,r){let n=i,a=e||(()=>null),s=r;if(i&&typeof i=="object"){let d=i;n=d.next?.bind(d),a=d.error?.bind(d),s=d.complete?.bind(d)}this.__isAsync&&(a=this.wrapInTimeout(a),n&&(n=this.wrapInTimeout(n)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:n,error:a,complete:s});return i instanceof kt&&i.add(o),o}wrapInTimeout(i){return e=>{let r=this.pendingTasks?.add();setTimeout(()=>{i(e),r!==void 0&&this.pendingTasks?.remove(r)})}}},Le=e2;function $g(...t){}function h5(t){let i,e;function r(){t=$g;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),i!==void 0&&clearTimeout(i)}catch{}}return i=setTimeout(()=>{t(),r()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{t(),r()})),()=>r()}function EL(t){return queueMicrotask(()=>t()),()=>{t=$g}}var hD="isAngularZone",b1=hD+"_ID",Qte=0,dt=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Le(!1);onMicrotaskEmpty=new Le(!1);onStable=new Le(!1);onError=new Le(!1);constructor(i){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:n=!1,scheduleInRootZone:a=c5}=i;if(typeof Zone>"u")throw new et(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!n&&r,s.shouldCoalesceRunChangeDetection=n,s.callbackScheduled=!1,s.scheduleInRootZone=a,Jte(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(hD)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new et(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new et(909,!1)}run(i,e,r){return this._inner.run(i,e,r)}runTask(i,e,r,n){let a=this._inner,s=a.scheduleEventTask("NgZoneEvent: "+n,i,Kte,$g,$g);try{return a.runTask(s,e,r)}finally{a.cancelTask(s)}}runGuarded(i,e,r){return this._inner.runGuarded(i,e,r)}runOutsideAngular(i){return this._outer.run(i)}},Kte={};function fD(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Zte(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function i(){h5(()=>{t.callbackScheduled=!1,t2(t),t.isCheckStableRunning=!0,fD(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{i()}):t._outer.run(()=>{i()}),t2(t)}function Jte(t){let i=()=>{Zte(t)},e=Qte++;t._inner=t._inner.fork({name:"angular",properties:{[hD]:!0,[b1]:e,[b1+e]:!0},onInvokeTask:(r,n,a,s,o,d)=>{if(qte(d))return r.invokeTask(a,s,o,d);try{return DL(t),r.invokeTask(a,s,o,d)}finally{(t.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&i(),ML(t)}},onInvoke:(r,n,a,s,o,d,l)=>{try{return DL(t),r.invoke(a,s,o,d,l)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!eie(d)&&i(),ML(t)}},onHasTask:(r,n,a,s)=>{r.hasTask(a,s),n===a&&(s.change=="microTask"?(t._hasPendingMicrotasks=s.microTask,t2(t),fD(t)):s.change=="macroTask"&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,n,a,s)=>(r.handleError(a,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}function t2(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function DL(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function ML(t){t._nesting--,fD(t)}var _1=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Le;onMicrotaskEmpty=new Le;onStable=new Le;onError=new Le;run(i,e,r){return i.apply(e,r)}runGuarded(i,e,r){return i.apply(e,r)}runOutsideAngular(i){return i()}runTask(i,e,r,n){return i.apply(e,r)}};function qte(t){return f5(t,"__ignore_ng_zone__")}function eie(t){return f5(t,"__scheduler_tick__")}function f5(t,i){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[i]===!0}function tie(t="zone.js",i){return t==="noop"?new _1:t==="zone.js"?new dt(i):t}var ba=class{_console=console;handleError(i){this._console.error("ERROR",i)}},iie=new Se("",{providedIn:"root",factory:()=>{let t=Q(dt),i=Q(ba);return e=>t.runOutsideAngular(()=>i.handleError(e))}});function AL(t,i){return cN(t,i)}function nie(t){return cN(lN,t)}var m5=(AL.required=nie,AL);function rie(){return nm(gs(),Kt())}function nm(t,i){return new Ze(tl(t,i))}var Ze=(()=>{class t{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=rie}return t})();function p5(t){return t instanceof Ze?t.nativeElement:t}var IL=new Set;function So(t){IL.has(t)||(IL.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}function Id(t){return typeof t=="function"&&t[As]!==void 0}function Ta(t,i){So("NgSignals");let e=N3(t),r=e[As];return i?.equal&&(r.equal=i.equal),e.set=n=>xx(r,n),e.update=n=>B3(r,n),e.asReadonly=sie.bind(e),e}function sie(){let t=this[As];if(t.readonlyFn===void 0){let i=()=>this();i[As]=t,t.readonlyFn=i}return t.readonlyFn}function g5(t){return Id(t)&&typeof t.set=="function"}function aie(){return this._results[Symbol.iterator]()}var eo=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Oe}constructor(i=!1){this._emitDistinctChangesOnly=i}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,e){return this._results.reduce(i,e)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,e){this.dirty=!1;let r=Hee(i);(this._changesDetected=!Gee(this._results,r,e))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(i){this._onDirty=i}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=aie};function v5(t){return(t.flags&128)===128}var y5=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(y5||{}),x5=new Map,oie=0;function lie(){return oie++}function cie(t){x5.set(t[X1],t)}function i2(t){x5.delete(t[X1])}var RL="__ngContext__";function oh(t,i){Sd(i)?(t[RL]=i[X1],cie(i)):t[RL]=i}function b5(t){return w5(t[Xg])}function _5(t){return w5(t[qo])}function w5(t){for(;t!==null&&!Mc(t);)t=t[qo];return t}var n2;function C5(t){n2=t}function T5(){if(n2!==void 0)return n2;if(typeof document<"u")return document;throw new et(210,!1)}var rm=new Se("",{providedIn:"root",factory:()=>die}),die="ng",mD=new Se(""),Ac=new Se("",{providedIn:"platform",factory:()=>"unknown"});var Mi=new Se(""),i0=new Se("",{providedIn:"root",factory:()=>T5().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var uie="h",hie="b";var S5=!1,fie=new Se("",{providedIn:"root",factory:()=>S5});var pD=function(t){return t[t.CHANGE_DETECTION=0]="CHANGE_DETECTION",t[t.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",t}(pD||{}),sm=new Se("");var zf=function(t){return t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read",t}(zf||{}),E5=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=Fe({token:t,providedIn:"root",factory:()=>new t})}return t})(),mie=[zf.EarlyRead,zf.Write,zf.MixedReadWrite,zf.Read],pie=(()=>{class t{ngZone=Q(dt);scheduler=Q(Ju);errorHandler=Q(ba,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Q(sm,{optional:!0})}execute(){this.executing=!0;for(let e of mie)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[e]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>r.hooks[e](r.pipelinedValue),r.snapshot))}catch(n){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(n)}this.executing=!1;for(let e of this.sequences)e.afterRun(),e.once&&(this.sequences.delete(e),e.destroy());for(let e of this.deferredRegistrations)this.sequences.add(e);this.deferredRegistrations.size>0&&this.scheduler.notify(8),this.deferredRegistrations.clear()}register(e){this.executing?this.deferredRegistrations.add(e):(this.sequences.add(e),this.scheduler.notify(7))}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,r){return r?r.run(pD.AFTER_NEXT_RENDER,e):e()}static \u0275prov=Fe({token:t,providedIn:"root",factory:()=>new t})}return t})(),r2=class{impl;hooks;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(i,e,r,n,a=null){this.impl=i,this.hooks=e,this.once=r,this.snapshot=a,this.unregisterOnDestroy=n?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}};function n0(t,i){!i?.injector&&W1(n0);let e=i?.injector??Q(Wt);return So("NgAfterRender"),D5(t,e,i,!1)}function pn(t,i){!i?.injector&&W1(pn);let e=i?.injector??Q(Wt);return So("NgAfterNextRender"),D5(t,e,i,!0)}function gie(t,i){if(t instanceof Function){let e=[void 0,void 0,void 0,void 0];return e[i]=t,e}else return[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function D5(t,i,e,r){let n=i.get(E5);n.impl??=i.get(pie);let a=i.get(sm,null,{optional:!0}),s=e?.phase??zf.MixedReadWrite,o=e?.manualCleanup!==!0?i.get(ah):null,d=new r2(n.impl,gie(t,s),r,o,a?.snapshot(null));return n.impl.register(d),d}var vie=()=>null;function M5(t,i,e=!1){return vie(t,i,e)}function A5(t,i){let e=t.contentQueries;if(e!==null){let r=Di(null);try{for(let n=0;nt,createScript:t=>t,createScriptURL:t=>t})}catch{}return Qx}function ib(t){return yie()?.createHTML(t)||t}var Kx;function I5(){if(Kx===void 0&&(Kx=null,fs.trustedTypes))try{Kx=fs.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Kx}function PL(t){return I5()?.createHTML(t)||t}function kL(t){return I5()?.createScriptURL(t)||t}var Ec=class{changingThisBreaksApplicationSecurity;constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${oN})`}},a2=class extends Ec{getTypeName(){return"HTML"}},o2=class extends Ec{getTypeName(){return"Style"}},l2=class extends Ec{getTypeName(){return"Script"}},c2=class extends Ec{getTypeName(){return"URL"}},d2=class extends Ec{getTypeName(){return"ResourceURL"}};function Eo(t){return t instanceof Ec?t.changingThisBreaksApplicationSecurity:t}function Ic(t,i){let e=xie(t);if(e!=null&&e!==i){if(e==="ResourceURL"&&i==="URL")return!0;throw new Error(`Required a safe ${i}, got a ${e} (see ${oN})`)}return e===i}function xie(t){return t instanceof Ec&&t.getTypeName()||null}function R5(t){return new a2(t)}function P5(t){return new o2(t)}function k5(t){return new l2(t)}function F5(t){return new c2(t)}function O5(t){return new d2(t)}function bie(t){let i=new h2(t);return _ie()?new u2(i):i}var u2=class{inertDocumentHelper;constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{let e=new window.DOMParser().parseFromString(ib(i),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(i):(e.firstChild?.remove(),e)}catch{return null}}},h2=class{defaultDoc;inertDocument;constructor(i){this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(i){let e=this.inertDocument.createElement("template");return e.innerHTML=ib(i),e}};function _ie(){try{return!!new window.DOMParser().parseFromString(ib(""),"text/html")}catch{return!1}}var wie=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function nb(t){return t=String(t),t.match(wie)?t:"unsafe:"+t}function Rc(t){let i={};for(let e of t.split(","))i[e]=!0;return i}function r0(...t){let i={};for(let e of t)for(let r in e)e.hasOwnProperty(r)&&(i[r]=!0);return i}var L5=Rc("area,br,col,hr,img,wbr"),N5=Rc("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),B5=Rc("rp,rt"),Cie=r0(B5,N5),Tie=r0(N5,Rc("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Sie=r0(B5,Rc("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),FL=r0(L5,Tie,Sie,Cie),V5=Rc("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Eie=Rc("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Die=Rc("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),Mie=r0(V5,Eie,Die),Aie=Rc("script,style,template"),f2=class{sanitizedSomething=!1;buf=[];sanitizeChildren(i){let e=i.firstChild,r=!0,n=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?r=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,r&&e.firstChild){n.push(e),e=Pie(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let a=Rie(e);if(a){e=a;break}e=n.pop()}}return this.buf.join("")}startElement(i){let e=OL(i).toLowerCase();if(!FL.hasOwnProperty(e))return this.sanitizedSomething=!0,!Aie.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let r=i.attributes;for(let n=0;n"),!0}endElement(i){let e=OL(i).toLowerCase();FL.hasOwnProperty(e)&&!L5.hasOwnProperty(e)&&(this.buf.push(""))}chars(i){this.buf.push(LL(i))}};function Iie(t,i){return(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function Rie(t){let i=t.nextSibling;if(i&&t!==i.previousSibling)throw U5(i);return i}function Pie(t){let i=t.firstChild;if(i&&Iie(t,i))throw U5(i);return i}function OL(t){let i=t.nodeName;return typeof i=="string"?i:"FORM"}function U5(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var kie=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fie=/([^\#-~ |!])/g;function LL(t){return t.replace(/&/g,"&").replace(kie,function(i){let e=i.charCodeAt(0),r=i.charCodeAt(1);return"&#"+((e-55296)*1024+(r-56320)+65536)+";"}).replace(Fie,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}var Zx;function vD(t,i){let e=null;try{Zx=Zx||bie(t);let r=i?String(i):"";e=Zx.getInertBodyElement(r);let n=5,a=r;do{if(n===0)throw new Error("Failed to sanitize html because the input is unstable");n--,r=a,a=e.innerHTML,e=Zx.getInertBodyElement(r)}while(r!==a);let o=new f2().sanitizeChildren(NL(e)||e);return ib(o)}finally{if(e){let r=NL(e)||e;for(;r.firstChild;)r.firstChild.remove()}}}function NL(t){return"content"in t&&Oie(t)?t.content:null}function Oie(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var vs=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(vs||{});function Bl(t){let i=yD();return i?PL(i.sanitize(vs.HTML,t)||""):Ic(t,"HTML")?PL(Eo(t)):vD(T5(),Al(t))}function lh(t){let i=yD();return i?i.sanitize(vs.URL,t)||"":Ic(t,"URL")?Eo(t):nb(Al(t))}function Lie(t){let i=yD();if(i)return kL(i.sanitize(vs.RESOURCE_URL,t)||"");if(Ic(t,"ResourceURL"))return kL(Eo(t));throw new et(904,!1)}function Nie(t,i){return i==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||i==="href"&&(t==="base"||t==="link")?Lie:lh}function z5(t,i,e){return Nie(i,e)(t)}function yD(){let t=Kt();return t&&t[Tc].sanitizer}var Bie=/^>|^->||--!>|)/g,Uie="\u200B$1\u200B";function zie(t){return t.replace(Bie,i=>i.replace(Vie,Uie))}function G5(t){return t instanceof Function?t():t}function Gie(t,i,e){let r=t.length;for(;;){let n=t.indexOf(i,e);if(n===-1)return n;if(n===0||t.charCodeAt(n-1)<=32){let a=i.length;if(n+a===r||t.charCodeAt(n+a)<=32)return n}e=n+1}}var H5="ng-template";function Hie(t,i,e,r){let n=0;if(r){for(;n-1){let a;for(;++na?h="":h=n[c+1].toLowerCase(),r&2&&l!==h){if(Zo(r))return!1;s=!0}}}}return Zo(r)||s}function Zo(t){return(t&1)===0}function Xie(t,i,e,r){if(i===null)return-1;let n=0;if(r||!e){let a=!1;for(;n-1)for(e++;e0?'="'+o+'"':"")+"]"}else r&8?n+="."+s:r&4&&(n+=" "+s);else n!==""&&!Zo(s)&&(i+=BL(a,n),n=""),r=s,a=a||!Zo(r);e++}return n!==""&&(i+=BL(a,n)),i}function Jie(t){return t.map(Zie).join(",")}function qie(t){let i=[],e=[],r=1,n=2;for(;rSr&&$5(t,i,Sr,!1),To(s?2:0,n),e(r,n)}finally{Ku(a),To(s?3:1,n)}}function _D(t,i,e){K1()&&(oh(tl(e,i),i),Z5(t,i,e))}function Z5(t,i,e){fne(t,i,e),(e.flags&64)===64&&mne(t,i,e)}function wD(t,i,e=tl){let r=i.localNames;if(r!==null){let n=i.index+1;for(let a=0;anull;function une(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function s0(t,i,e,r,n,a,s,o){let d=tl(i,e),l=i.inputs,c;!o&&l!=null&&(c=l[r])?(ED(t,e,c,r,n),nh(i)&&hne(e,i.index)):i.type&3?(r=une(r),n=s!=null?s(n,i.value||"",r):n,a.setProperty(d,r,n)):i.type&12}function hne(t,i){let e=Pl(i,t);e[si]&16||(e[si]|=64)}function fne(t,i,e){let r=e.directiveStart,n=e.directiveEnd;nh(e)&&gne(i,e,t.data[r+e.componentOffset]),t.firstCreatePass||y1(e,i);let a=e.initialInputs;for(let s=r;s0&&(e[n-1][qo]=i),r0&&(t[e-1][qo]=r[qo]);let a=c1(t,Is+i);Tne(r[pi],r);let s=a[Sc];s!==null&&s.detachView(a[pi]),r[Rs]=null,r[qo]=null,r[si]&=-129}return r}function rb(t,i){if(e0(i))return;let e=i[Wn];e.destroyNode&&ab(t,i,e,3,null,null),Ene(i)}function RE(t,i){if(e0(i))return;let e=Di(null);try{i[si]&=-129,i[si]|=256,i[Ja]&&Tf(i[Ja]),Ane(t,i),Mne(t,i),i[pi].type===1&&i[Wn].destroy();let r=i[Xu];if(r!==null&&Mc(i[Rs])){r!==i[Rs]&&ID(r,i);let n=i[Sc];n!==null&&n.detachView(t)}i2(i)}finally{Di(e)}}function Mne(t,i){let e=t.cleanup,r=i[u1];if(e!==null)for(let s=0;s=0?r[o]():r[-o].unsubscribe(),s+=2}else{let o=r[e[s+1]];e[s].call(o)}r!==null&&(i[u1]=null);let n=i[Td];if(n!==null){i[Td]=null;for(let s=0;s{t0(t.lView)},consumerOnSignalRead(){this.lView[Ja]=this}});function zne(t){let i=t[Ja]??Object.create(Gne);return i.lView=t,i}var Gne=Mt(Me({},Lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let i=Qu(t.lView);for(;i&&!u8(i[pi]);)i=Qu(i);i&&iD(i)},consumerOnSignalRead(){this.lView[Ja]=this}});function u8(t){return t.type!==2}function h8(t){if(t[Yu]===null)return;let i=!0;for(;i;){let e=!1;for(let r of t[Yu])r.dirty&&(e=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));i=e&&!!(t[si]&8192)}}var Hne=100;function f8(t,i=!0,e=0){let n=t[Tc].rendererFactory,a=!1;a||n.begin?.();try{jne(t,e)}catch(s){throw i&&t8(t,s),s}finally{a||n.end?.()}}function jne(t,i){let e=HN();try{m1(!0),p2(t,i);let r=0;for(;Q1(t);){if(r===Hne)throw new et(103,!1);r++,p2(t,1)}}finally{m1(e)}}function Wne(t,i,e,r){if(e0(i))return;let n=i[si],a=!1,s=!1;oD(i);let o=!0,d=null,l=null;a||(u8(t)?(l=Nne(i),d=Cf(l)):E3()===null?(o=!1,l=zne(i),d=Cf(l)):i[Ja]&&(Tf(i[Ja]),i[Ja]=null));try{NN(i),Cte(t.bindingStartIndex),e!==null&&K5(t,i,e,2,r);let c=(n&3)===3;if(!a)if(c){let f=t.preOrderCheckHooks;f!==null&&n1(i,f,null)}else{let f=t.preOrderHooks;f!==null&&r1(i,f,0,null),ME(i,0)}if(s||Xne(i),h8(i),m8(i,0),t.contentQueries!==null&&A5(t,i),!a)if(c){let f=t.contentCheckHooks;f!==null&&n1(i,f)}else{let f=t.contentHooks;f!==null&&r1(i,f,1),ME(i,1)}$ne(t,i);let h=t.components;h!==null&&g8(i,h,0);let u=t.viewQuery;if(u!==null&&s2(2,u,r),!a)if(c){let f=t.viewCheckHooks;f!==null&&n1(i,f)}else{let f=t.viewHooks;f!==null&&r1(i,f,2),ME(i,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),i[i1]){for(let f of i[i1])f();i[i1]=null}a||(i[si]&=-73)}catch(c){throw a||t0(i),c}finally{l!==null&&(Rg(l,d),o&&Vne(l)),lD()}}function m8(t,i){for(let e=b5(t);e!==null;e=_5(e))for(let r=Is;r-1&&(Qg(i,r),c1(e,r))}this._attachedToViewContainer=!1}rb(this._lView[pi],this._lView)}onDestroy(i){BN(this._lView,i)}markForCheck(){PD(this._cdRefInjectingView||this._lView,4)}markForRefresh(){iD(this._cdRefInjectingView||this._lView)}detach(){this._lView[si]&=-129}reattach(){YE(this._lView),this._lView[si]|=128}detectChanges(){this._lView[si]|=1024,f8(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new et(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let i=f1(this._lView),e=this._lView[Xu];e!==null&&!i&&ID(e,this._lView),i8(this._lView[pi],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new et(902,!1);this._appRef=i;let e=f1(this._lView),r=this._lView[Xu];r!==null&&!e&&n8(r,this._lView),YE(this._lView)}},Oi=(()=>{class t{static __NG_ELEMENT_ID__=Zne}return t})(),Qne=Oi,Kne=class extends Qne{_declarationLView;_declarationTContainer;elementRef;constructor(i,e,r){super(),this._declarationLView=i,this._declarationTContainer=e,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(i,e){return this.createEmbeddedViewImpl(i,e)}createEmbeddedViewImpl(i,e,r){let n=a0(this._declarationLView,this._declarationTContainer,i,{embeddedViewInjector:e,dehydratedView:r});return new qu(n)}};function Zne(){return ob(gs(),Kt())}function ob(t,i){return t.type&4?new Kne(i,t,nm(t,i)):null}function l0(t,i,e,r,n){let a=t.data[i];if(a===null)a=Jne(t,i,e,r,n),Tte()&&(a.flags|=32);else if(a.type&64){a.type=e,a.value=r,a.attrs=n;let s=_te();a.injectorIndex=s===null?-1:s.injectorIndex}return rh(a,!0),a}function Jne(t,i,e,r,n){let a=GN(),s=nD(),o=s?a:a&&a.parent,d=t.data[i]=ere(t,o,e,i,r,n);return qne(t,d,a,s),d}function qne(t,i,e,r){t.firstChild===null&&(t.firstChild=i),e!==null&&(r?e.child==null&&i.parent!==null&&(e.child=i):e.next===null&&(e.next=i,i.prev=e))}function ere(t,i,e,r,n,a){let s=i?i.injectorIndex:-1,o=0;return zN()&&(o|=128),{type:e,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:o,providerIndexes:0,value:n,attrs:a,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:i,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var PXe=new RegExp(`^(\\d+)*(${hie}|${uie})*(.*)`);var tre=()=>null;function Zf(t,i){return tre(t,i)}var g2=class{},T1=class{},v2=class{resolveComponentFactory(i){throw Error(`No component factory found for ${ta(i)}.`)}},Jf=class{static NULL=new v2},Ps=class{},Ai=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>ire()}return t})();function ire(){let t=Kt(),i=gs(),e=Pl(i.index,t);return(Sd(e)?e:t)[Wn]}var nre=(()=>{class t{static \u0275prov=Fe({token:t,providedIn:"root",factory:()=>null})}return t})();function y2(t,i,e){let r=e?t.styles:null,n=e?t.classes:null,a=0;if(i!==null)for(let s=0;s0;){let e=t[--i];if(typeof e=="number"&&e<0)return e}return 0}function fre(t,i,e){if(e){if(i.exportAs)for(let r=0;r[this.componentDef],!0,0);u&&(Y5(h,u,m),oh(u,f)),Z5(d,f,m),gD(d,m,f),b8(d,m),e!==void 0&&yre(m,this.ngContentSelectors,e),p=Pl(m.index,f),f[ps]=p[ps],DD(d,f,null)}catch(m){throw p!==null&&i2(p),i2(f),m}finally{lD()}return new x2(this.componentType,f)}finally{Di(a)}}},x2=class extends g2{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(i,e){super(),this._rootLView=e,this._tNode=eD(e[pi],Sr),this.location=nm(this._tNode,e),this.instance=Pl(this._tNode.index,e)[ps],this.hostView=this.changeDetectorRef=new qu(e,void 0,!1),this.componentType=i}setInput(i,e){let r=this._tNode.inputs,n;if(r!==null&&(n=r[i])){if(this.previousInputValues??=new Map,this.previousInputValues.has(i)&&Object.is(this.previousInputValues.get(i),e))return;let a=this._rootLView;ED(a[pi],a,n,i,e),this.previousInputValues.set(i,e);let s=Pl(this._tNode.index,a);PD(s,1)}}get injector(){return new ju(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(i){this.hostView.onDestroy(i)}};function yre(t,i,e){let r=t.projection=[];for(let n=0;n{class t{static __NG_ELEMENT_ID__=xre}return t})();function xre(){let t=gs();return w8(t,Kt())}var bre=Xi,_8=class extends bre{_lContainer;_hostTNode;_hostLView;constructor(i,e,r){super(),this._lContainer=i,this._hostTNode=e,this._hostLView=r}get element(){return nm(this._hostTNode,this._hostLView)}get injector(){return new ju(this._hostTNode,this._hostLView)}get parentInjector(){let i=dD(this._hostTNode,this._hostLView);if(qN(i)){let e=g1(i,this._hostLView),r=p1(i),n=e[pi].data[r+8];return new ju(n,e)}else return new ju(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){let e=jL(this._lContainer);return e!==null&&e[i]||null}get length(){return this._lContainer.length-Is}createEmbeddedView(i,e,r){let n,a;typeof r=="number"?n=r:r!=null&&(n=r.index,a=r.injector);let s=Zf(this._lContainer,i.ssrId),o=i.createEmbeddedViewImpl(e||{},a,s);return this.insertImpl(o,n,Kf(this._hostTNode,s)),o}createComponent(i,e,r,n,a){let s=i&&!ste(i),o;if(s)o=e;else{let p=e||{};o=p.index,r=p.injector,n=p.projectableNodes,a=p.environmentInjector||p.ngModuleRef}let d=s?i:new eh(Cc(i)),l=r||this.parentInjector;if(!a&&d.ngModule==null){let m=(s?l:this.parentInjector).get(vr,null);m&&(a=m)}let c=Cc(d.componentType??{}),h=Zf(this._lContainer,c?.id??null),u=h?.firstChild??null,f=d.create(l,n,u,a);return this.insertImpl(f.hostView,o,Kf(this._hostTNode,h)),f}insert(i,e){return this.insertImpl(i,e,!0)}insertImpl(i,e,r){let n=i._lView;if(hte(n)){let o=this.indexOf(i);if(o!==-1)this.detach(o);else{let d=n[Rs],l=new _8(d,d[Ca],d[Rs]);l.detach(l.indexOf(i))}}let a=this._adjustIndex(e),s=this._lContainer;return o0(s,n,a,r),i.attachToViewContainerRef(),xN(PE(s),a,i),i}move(i,e){return this.insert(i,e)}indexOf(i){let e=jL(this._lContainer);return e!==null?e.indexOf(i):-1}remove(i){let e=this._adjustIndex(i,-1),r=Qg(this._lContainer,e);r&&(c1(PE(this._lContainer),e),rb(r[pi],r))}detach(i){let e=this._adjustIndex(i,-1),r=Qg(this._lContainer,e);return r&&c1(PE(this._lContainer),e)!=null?new qu(r):null}_adjustIndex(i,e=0){return i??this.length+e}};function jL(t){return t[h1]}function PE(t){return t[h1]||(t[h1]=[])}function w8(t,i){let e,r=i[t.index];return Mc(r)?e=r:(e=q5(r,i,null,t),i[t.index]=e,SD(i,e)),wre(e,i,t,r),new _8(e,t,i)}function _re(t,i){let e=t[Wn],r=e.createComment(""),n=tl(i,t),a=e.parentNode(n);return w1(e,a,r,e.nextSibling(n),!1),r}var wre=Sre,Cre=()=>!1;function Tre(t,i,e){return Cre(t,i,e)}function Sre(t,i,e,r){if(t[$u])return;let n;e.type&8?n=Rl(r):n=_re(i,e),t[$u]=n}var b2=class t{queryList;matches=null;constructor(i){this.queryList=i}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},_2=class t{queries;constructor(i=[]){this.queries=i}createEmbeddedView(i){let e=i.queries;if(e!==null){let r=i.contentQueries!==null?i.contentQueries[0]:e.length,n=[];for(let a=0;a0)r.push(s[o/2]);else{let l=a[o+1],c=i[-d];for(let h=Is;hi.trim())}function E8(t,i,e){t.queries===null&&(t.queries=new w2),t.queries.track(new C2(i,e))}function Pre(t,i){let e=t.contentQueries||(t.contentQueries=[]),r=e.length?e[e.length-1]:-1;i!==r&&e.push(t.queries.length-1,i)}function OD(t,i){return t.queries.getByIndex(i)}function D8(t,i){let e=t[pi],r=OD(e,i);return r.crossesNgTemplate?T2(e,t,i,[]):C8(e,t,r,i)}function M8(t,i,e){let r,n=oE(()=>{r._dirtyCounter();let a=Lre(r,t);if(i&&a===void 0)throw new et(-951,!1);return a});return r=n[As],r._dirtyCounter=Ta(0),r._flatValue=void 0,n}function kre(t){return M8(!0,!1,t)}function Fre(t){return M8(!0,!0,t)}function Ore(t,i){let e=t[As];e._lView=Kt(),e._queryIndex=i,e._queryList=FD(e._lView,i),e._queryList.onDirty(()=>e._dirtyCounter.update(r=>r+1))}function Lre(t,i){let e=t._lView,r=t._queryIndex;if(e===void 0||r===void 0||e[si]&4)return i?void 0:ea;let n=FD(e,r),a=D8(e,r);return n.reset(a,p5),i?n.first:n._changesDetected||t._flatValue===void 0?t._flatValue=n.toArray():t._flatValue}function WL(t,i){return kre(i)}function Nre(t,i){return Fre(i)}var A8=(WL.required=Nre,WL);function Bre(t){let i=[],e=new Map;function r(n){let a=e.get(n);if(!a){let s=t(n);e.set(n,a=s.then(Gre))}return a}return D1.forEach((n,a)=>{let s=[];n.templateUrl&&s.push(r(n.templateUrl).then(l=>{n.template=l}));let o=typeof n.styles=="string"?[n.styles]:n.styles||[];if(n.styles=o,n.styleUrl&&n.styleUrls?.length)throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");if(n.styleUrls?.length){let l=n.styles.length,c=n.styleUrls;n.styleUrls.forEach((h,u)=>{o.push(""),s.push(r(h).then(f=>{o[l+u]=f,c.splice(c.indexOf(h),1),c.length==0&&(n.styleUrls=void 0)}))})}else n.styleUrl&&s.push(r(n.styleUrl).then(l=>{o.push(l),n.styleUrl=void 0}));let d=Promise.all(s).then(()=>Hre(a));i.push(d)}),Ure(),Promise.all(i).then(()=>{})}var D1=new Map,Vre=new Set;function Ure(){let t=D1;return D1=new Map,t}function zre(){return D1.size===0}function Gre(t){return typeof t=="string"?t:t.text()}function Hre(t){Vre.delete(t)}var el=class{},Kg=class{};var M1=class extends el{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new S1(this);constructor(i,e,r,n=!0){super(),this.ngModuleType=i,this._parent=e;let a=wN(i);this._bootstrapComponents=G5(a.bootstrap),this._r3Injector=l5(i,e,[{provide:el,useValue:this},{provide:Jf,useValue:this.componentFactoryResolver},...r],ta(i),new Set(["environment"])),n&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}},A1=class extends Kg{moduleType;constructor(i){super(),this.moduleType=i}create(i){return new M1(this.moduleType,i,[])}};function jre(t,i,e){return new M1(t,i,e,!1)}var S2=class extends el{injector;componentFactoryResolver=new S1(this);instance=null;constructor(i){super();let e=new jg([...i.providers,{provide:el,useValue:this},{provide:Jf,useValue:this.componentFactoryResolver}],i.parent||j1(),i.debugName,new Set(["environment"]));this.injector=e,i.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}};function lb(t,i,e=null){return new S2({providers:t,parent:i,debugName:e,runEnvironmentInitializers:!0}).injector}var Wre=(()=>{class t{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let r=SN(!1,e.type),n=r.length>0?lb([r],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,n)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=Fe({token:t,providedIn:"environment",factory:()=>new t(_t(vr))})}return t})();function Te(t){return Jg(()=>{let i=I8(t),e=Mt(Me({},i),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===y5.OnPush,directiveDefs:null,pipeDefs:null,dependencies:i.standalone&&t.dependencies||null,getStandaloneInjector:i.standalone?n=>n.get(Wre).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||kl.Emulated,styles:t.styles||ea,_:null,schemas:t.schemas||null,tView:null,id:""});i.standalone&&So("NgStandalone"),R8(e);let r=t.dependencies;return e.directiveDefs=YL(r,!1),e.pipeDefs=YL(r,!0),e.id=$re(e),e})}function Xre(t){return Cc(t)||K2(t)}function Yre(t){return t!==null}function rt(t){return Jg(()=>({type:t.type,bootstrap:t.bootstrap||ea,declarations:t.declarations||ea,imports:t.imports||ea,exports:t.exports||ea,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function XL(t,i){if(t==null)return wc;let e={};for(let r in t)if(t.hasOwnProperty(r)){let n=t[r],a,s,o=Dd.None;Array.isArray(n)?(o=n[0],a=n[1],s=n[2]??a):(a=n,s=n),i?(e[a]=o!==Dd.None?[r,o]:r,i[a]=s):e[a]=r}return e}function Ue(t){return Jg(()=>{let i=I8(t);return R8(i),i})}function Do(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function I8(t){let i={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputTransforms:null,inputConfig:t.inputs||wc,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||ea,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:XL(t.inputs,i),outputs:XL(t.outputs),debugInfo:null}}function R8(t){t.features?.forEach(i=>i(t))}function YL(t,i){if(!t)return null;let e=i?CN:Xre;return()=>(typeof t=="function"?t():t).map(r=>e(r)).filter(Yre)}function $re(t){let i=0,e=typeof t.consts=="function"?"":t.consts,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,e,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let a of r.join("|"))i=Math.imul(31,i)+a.charCodeAt(0)<<0;return i+=2147483648,"c"+i}function Qre(t){return Object.getPrototypeOf(t.prototype).constructor}function Ft(t){let i=Qre(t.type),e=!0,r=[t];for(;i;){let n;if(Il(t))n=i.\u0275cmp||i.\u0275dir;else{if(i.\u0275cmp)throw new et(903,!1);n=i.\u0275dir}if(n){if(e){r.push(n);let s=t;s.inputs=Jx(t.inputs),s.inputTransforms=Jx(t.inputTransforms),s.declaredInputs=Jx(t.declaredInputs),s.outputs=Jx(t.outputs);let o=n.hostBindings;o&&ese(t,o);let d=n.viewQuery,l=n.contentQueries;if(d&&Jre(t,d),l&&qre(t,l),Kre(t,n),Cee(t.outputs,n.outputs),Il(n)&&n.data.animation){let c=t.data;c.animation=(c.animation||[]).concat(n.data.animation)}}let a=n.features;if(a)for(let s=0;s=0;r--){let n=t[r];n.hostVars=i+=n.hostVars,n.hostAttrs=Qf(n.hostAttrs,e=Qf(e,n.hostAttrs))}}function Jx(t){return t===wc?{}:t===ea?[]:t}function Jre(t,i){let e=t.viewQuery;e?t.viewQuery=(r,n)=>{i(r,n),e(r,n)}:t.viewQuery=i}function qre(t,i){let e=t.contentQueries;e?t.contentQueries=(r,n,a)=>{i(r,n,a),e(r,n,a)}:t.contentQueries=i}function ese(t,i){let e=t.hostBindings;e?t.hostBindings=(r,n)=>{i(r,n),e(r,n)}:t.hostBindings=i}function P8(t){let i=e=>{let r=Array.isArray(t);e.hostDirectives===null?(e.findHostDirectiveDefs=k8,e.hostDirectives=r?t.map(E2):[t]):r?e.hostDirectives.unshift(...t.map(E2)):e.hostDirectives.unshift(t)};return i.ngInherit=!0,i}function k8(t,i,e){if(t.hostDirectives!==null)for(let r of t.hostDirectives)if(typeof r=="function"){let n=r();for(let a of n)$L(E2(a),i,e)}else $L(r,i,e)}function $L(t,i,e){let r=K2(t.directive);tse(r.declaredInputs,t.inputs),k8(r,i,e),e.set(r,t),i.push(r)}function E2(t){return typeof t=="function"?{directive:ms(t),inputs:wc,outputs:wc}:{directive:ms(t.directive),inputs:QL(t.inputs),outputs:QL(t.outputs)}}function QL(t){if(t===void 0||t.length===0)return wc;let i={};for(let e=0;e{class t{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();var VD=new Se(""),c0=new Se(""),db=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];taskTrackingZone=null;constructor(e,r,n){this._ngZone=e,this.registry=r,UD||(ose(n),n.addToWindow(r)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{dt.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>r.updateCb&&r.updateCb(e)?(clearTimeout(r.timeoutId),!1):!0)}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,r,n){let a=-1;r&&r>0&&(a=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==a),e()},r)),this._callbacks.push({doneCb:e,timeoutId:a,updateCb:n})}whenStable(e,r,n){if(n&&!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(e,r,n),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,r,n){return[]}static \u0275fac=function(r){return new(r||t)(_t(dt),_t(ub),_t(c0))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})(),ub=(()=>{class t{_applications=new Map;registerApplication(e,r){this._applications.set(e,r)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,r=!0){return UD?.findTestabilityInTree(this,e,r)??null}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function ose(t){UD=t}var UD;function Rd(t){return!!t&&typeof t.then=="function"}function zD(t){return!!t&&typeof t.subscribe=="function"}var hb=new Se("");var L8=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,r)=>{this.resolve=e,this.reject=r});appInits=Q(hb,{optional:!0})??[];injector=Q(Wt);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let n of this.appInits){let a=wa(this.injector,n);if(Rd(a))e.push(a);else if(zD(a)){let s=new Promise((o,d)=>{a.subscribe({complete:o,error:d})});e.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{r()}).catch(n=>{this.reject(n)}),e.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),N8=(()=>{class t{static \u0275prov=Fe({token:t,providedIn:"root",factory:()=>new R1})}return t})(),R1=class{queuedEffectCount=0;queues=new Map;schedule(i){this.enqueue(i)}remove(i){let e=i.zone,r=this.queues.get(e);r.has(i)&&(r.delete(i),this.queuedEffectCount--)}enqueue(i){let e=i.zone;this.queues.has(e)||this.queues.set(e,new Set);let r=this.queues.get(e);r.has(i)||(this.queuedEffectCount++,r.add(i))}flush(){for(;this.queuedEffectCount>0;)for(let[i,e]of this.queues)i===null?this.flushQueue(e):i.run(()=>this.flushQueue(e))}flushQueue(i){for(let e of i)i.delete(e),this.queuedEffectCount--,e.run()}},fb=new Se("");function lse(){L3(()=>{throw new et(600,!1)})}function cse(t){return t.isBoundToModule}var dse=10;function B8(t,i){return Array.isArray(i)?i.reduce(B8,t):Me(Me({},t),i)}var ia=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Q(iie);afterRenderManager=Q(E5);zonelessEnabled=Q(uD);rootEffectScheduler=Q(N8);dirtyFlags=0;deferredDirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new Oe;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=Q(Nl).hasPendingTasks.pipe(mt(e=>!e));constructor(){Q(sm,{optional:!0})}whenStable(){let e;return new Promise(r=>{e=this.isStable.subscribe({next:n=>{n&&r()}})}).finally(()=>{e.unsubscribe()})}_injector=Q(vr);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,r){let n=e instanceof T1;if(!this._injector.get(L8).done){let u=!n&&TN(e),f=!1;throw new et(405,f)}let s;n?s=e:s=this._injector.get(Jf).resolveComponentFactory(e),this.componentTypes.push(s.componentType);let o=cse(s)?void 0:this._injector.get(el),d=r||s.selector,l=s.create(Wt.NULL,[],d,o),c=l.location.nativeElement,h=l.injector.get(VD,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),a1(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick=()=>{if(this.tracingSnapshot!==null){let r=this.tracingSnapshot;this.tracingSnapshot=null,r.run(pD.CHANGE_DETECTION,this._tick),r.dispose();return}if(this._runningTick)throw new et(101,!1);let e=Di(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,Di(e),this.afterTick.next()}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Ps,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let e=0;for(;this.dirtyFlags!==0&&e++Q1(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let r=e;this._views.push(r),r.attachToAppRef(this)}detachView(e){let r=e;a1(this._views,r),r.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(fb,[]).forEach(n=>n(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>a1(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new et(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function a1(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function use(t,i,e,r){if(!e&&!Q1(t))return;f8(t,i,e&&!r?0:1)}function pt(t,i,e,r){let n=Kt(),a=Ad();if(_a(n,a,i)){let s=kn(),o=im();vne(o,n,t,i,e,r)}return pt}function GD(t,i,e,r){return _a(t,Ad(),e)?i+Al(e)+r:ks}function hse(t,i,e,r,n,a){let s=jN(),o=ND(t,s,e,n);return Z1(2),o?i+Al(e)+r+Al(n)+a:ks}function fse(t,i,e,r,n,a,s,o){let d=jN(),l=O8(t,d,e,n,s);return Z1(3),l?i+Al(e)+r+Al(n)+a+Al(s)+o:ks}function qx(t,i){return t<<17|i<<2}function th(t){return t>>17&32767}function mse(t){return(t&2)==2}function pse(t,i){return t&131071|i<<17}function D2(t){return t|2}function qf(t){return(t&131068)>>2}function kE(t,i){return t&-131069|i<<2}function gse(t){return(t&1)===1}function M2(t){return t|1}function vse(t,i,e,r,n,a){let s=a?i.classBindings:i.styleBindings,o=th(s),d=qf(s);t[r]=e;let l=!1,c;if(Array.isArray(e)){let h=e;c=h[1],(c===null||qg(h,c)>0)&&(l=!0)}else c=e;if(n)if(d!==0){let u=th(t[o+1]);t[r+1]=qx(u,o),u!==0&&(t[u+1]=kE(t[u+1],r)),t[o+1]=pse(t[o+1],r)}else t[r+1]=qx(o,0),o!==0&&(t[o+1]=kE(t[o+1],r)),o=r;else t[r+1]=qx(d,0),o===0?o=r:t[d+1]=kE(t[d+1],r),d=r;l&&(t[r+1]=D2(t[r+1])),KL(t,c,r,!0),KL(t,c,r,!1),yse(i,c,t,r,a),s=qx(o,d),a?i.classBindings=s:i.styleBindings=s}function yse(t,i,e,r,n){let a=n?t.residualClasses:t.residualStyles;a!=null&&typeof i=="string"&&qg(a,i)>=0&&(e[r+1]=M2(e[r+1]))}function KL(t,i,e,r){let n=t[e+1],a=i===null,s=r?th(n):qf(n),o=!1;for(;s!==0&&(o===!1||a);){let d=t[s],l=t[s+1];xse(d,i)&&(o=!0,t[s+1]=r?M2(l):D2(l)),s=r?th(l):qf(l)}o&&(t[e+1]=r?D2(n):M2(n))}function xse(t,i){return t===null||i==null||(Array.isArray(t)?t[1]:t)===i?!0:Array.isArray(t)&&typeof i=="string"?qg(t,i)>=0:!1}var Jo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function bse(t){return t.substring(Jo.key,Jo.keyEnd)}function _se(t){return wse(t),V8(t,U8(t,0,Jo.textEnd))}function V8(t,i){let e=Jo.textEnd;return e===i?-1:(i=Jo.keyEnd=Cse(t,Jo.key=i,e),U8(t,i,e))}function wse(t){Jo.key=0,Jo.keyEnd=0,Jo.value=0,Jo.valueEnd=0,Jo.textEnd=t.length}function U8(t,i,e){for(;i32;)i++;return i}function ee(t,i,e){let r=Kt(),n=Ad();if(_a(r,n,i)){let a=kn(),s=im();s0(a,s,r,t,i,r[Wn],e,!1)}return ee}function A2(t,i,e,r,n){let a=i.inputs,s=n?"class":"style";ED(t,e,a[s],s,r)}function gn(t,i,e){return G8(t,i,e,!1),gn}function ut(t,i){return G8(t,i,null,!0),ut}function Tn(t){H8(Ase,z8,t,!0)}function z8(t,i){for(let e=_se(i);e>=0;e=V8(i,e))z1(t,bse(i),!0)}function G8(t,i,e,r){let n=Kt(),a=kn(),s=Z1(2);if(a.firstUpdatePass&&W8(a,t,s,r),i!==ks&&_a(n,s,i)){let o=a.data[Ll()];X8(a,o,n,n[Wn],t,n[s+1]=Rse(i,e),r,s)}}function H8(t,i,e,r){let n=kn(),a=Z1(2);n.firstUpdatePass&&W8(n,null,a,r);let s=Kt();if(e!==ks&&_a(s,a,e)){let o=n.data[Ll()];if(Y8(o,r)&&!j8(n,a)){let d=r?o.classesWithoutHost:o.stylesWithoutHost;d!==null&&(e=VE(d,e||"")),A2(n,o,s,e,r)}else Ise(n,o,s,s[Wn],s[a+1],s[a+1]=Mse(t,i,e),r,a)}}function j8(t,i){return i>=t.expandoStartIndex}function W8(t,i,e,r){let n=t.data;if(n[e+1]===null){let a=n[Ll()],s=j8(t,e);Y8(a,r)&&i===null&&!s&&(i=!1),i=Tse(n,a,i,r),vse(n,a,i,e,s,r)}}function Tse(t,i,e,r){let n=sD(t),a=r?i.residualClasses:i.residualStyles;if(n===null)(r?i.classBindings:i.styleBindings)===0&&(e=FE(null,t,i,e,r),e=Zg(e,i.attrs,r),a=null);else{let s=i.directiveStylingLast;if(s===-1||t[s]!==n)if(e=FE(n,t,i,e,r),a===null){let d=Sse(t,i,r);d!==void 0&&Array.isArray(d)&&(d=FE(null,t,i,d[1],r),d=Zg(d,i.attrs,r),Ese(t,i,r,d))}else a=Dse(t,i,r)}return a!==void 0&&(r?i.residualClasses=a:i.residualStyles=a),e}function Sse(t,i,e){let r=e?i.classBindings:i.styleBindings;if(qf(r)!==0)return t[th(r)]}function Ese(t,i,e,r){let n=e?i.classBindings:i.styleBindings;t[th(n)]=r}function Dse(t,i,e){let r,n=i.directiveEnd;for(let a=1+i.directiveStylingLast;a0;){let d=t[n],l=Array.isArray(d),c=l?d[1]:d,h=c===null,u=e[n+1];u===ks&&(u=h?ea:void 0);let f=h?EE(u,r):c===r?u:void 0;if(l&&!P1(f)&&(f=EE(d,r)),P1(f)&&(o=f,s))return o;let p=t[n+1];n=s?th(p):qf(p)}if(i!==null){let d=a?i.residualClasses:i.residualStyles;d!=null&&(o=EE(d,r))}return o}function P1(t){return t!==void 0}function Rse(t,i){return t==null||t===""||(typeof i=="string"?t=t+i:typeof t=="object"&&(t=ta(Eo(t)))),t}function Y8(t,i){return(t.flags&(i?8:16))!==0}function $8(t,i,e){let r=Kt(),n=GD(r,t,i,e);H8(z1,z8,n,!0)}var I2=class{destroy(i){}updateValue(i,e){}swap(i,e){let r=Math.min(i,e),n=Math.max(i,e),a=this.detach(n);if(n-r>1){let s=this.detach(r);this.attach(r,a),this.attach(n,s)}else this.attach(r,a)}move(i,e){this.attach(e,this.detach(i))}};function OE(t,i,e,r,n){return t===e&&Object.is(i,r)?1:Object.is(n(t,i),n(e,r))?-1:0}function Pse(t,i,e){let r,n,a=0,s=t.length-1,o=void 0;if(Array.isArray(i)){let d=i.length-1;for(;a<=s&&a<=d;){let l=t.at(a),c=i[a],h=OE(a,l,a,c,e);if(h!==0){h<0&&t.updateValue(a,c),a++;continue}let u=t.at(s),f=i[d],p=OE(s,u,d,f,e);if(p!==0){p<0&&t.updateValue(s,f),s--,d--;continue}let m=e(a,l),g=e(s,u),v=e(a,c);if(Object.is(v,g)){let y=e(d,f);Object.is(y,m)?(t.swap(a,s),t.updateValue(s,f),d--,s--):t.move(s,a),t.updateValue(a,c),a++;continue}if(r??=new k1,n??=qL(t,a,s,e),R2(t,r,a,v))t.updateValue(a,c),a++,s++;else if(n.has(v))r.set(m,t.detach(a)),s--;else{let y=t.create(a,i[a]);t.attach(a,y),a++,s++}}for(;a<=d;)JL(t,r,e,a,i[a]),a++}else if(i!=null){let d=i[Symbol.iterator](),l=d.next();for(;!l.done&&a<=s;){let c=t.at(a),h=l.value,u=OE(a,c,a,h,e);if(u!==0)u<0&&t.updateValue(a,h),a++,l=d.next();else{r??=new k1,n??=qL(t,a,s,e);let f=e(a,h);if(R2(t,r,a,f))t.updateValue(a,h),a++,s++,l=d.next();else if(!n.has(f))t.attach(a,t.create(a,h)),a++,s++,l=d.next();else{let p=e(a,c);r.set(p,t.detach(a)),s--}}}for(;!l.done;)JL(t,r,e,t.length,l.value),l=d.next()}for(;a<=s;)t.destroy(t.detach(s--));r?.forEach(d=>{t.destroy(d)})}function R2(t,i,e,r){return i!==void 0&&i.has(r)?(t.attach(e,i.get(r)),i.delete(r),!0):!1}function JL(t,i,e,r,n){if(R2(t,i,r,e(r,n)))t.updateValue(r,n);else{let a=t.create(r,n);t.attach(r,a)}}function qL(t,i,e,r){let n=new Set;for(let a=i;a<=e;a++)n.add(r(a,t.at(a)));return n}var k1=class{kvMap=new Map;_vMap=void 0;has(i){return this.kvMap.has(i)}delete(i){if(!this.has(i))return!1;let e=this.kvMap.get(i);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(i,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(i),!0}get(i){return this.kvMap.get(i)}set(i,e){if(this.kvMap.has(i)){let r=this.kvMap.get(i);this._vMap===void 0&&(this._vMap=new Map);let n=this._vMap;for(;n.has(r);)r=n.get(r);n.set(r,e)}else this.kvMap.set(i,e)}forEach(i){for(let[e,r]of this.kvMap)if(i(r,e),this._vMap!==void 0){let n=this._vMap;for(;n.has(r);)r=n.get(r),i(r,e)}}};function Qt(t,i){So("NgControlFlow");let e=Kt(),r=Ad(),n=e[r]!==ks?e[r]:-1,a=n!==-1?F1(e,Sr+n):void 0,s=0;if(_a(e,r,t)){let o=Di(null);try{if(a!==void 0&&c8(a,s),t!==-1){let d=Sr+t,l=F1(e,d),c=O2(e[pi],d),h=Zf(l,c.tView.ssrId),u=a0(e,c,i,{dehydratedView:h});o0(l,u,s,Kf(c,h))}}finally{Di(o)}}else if(a!==void 0){let o=l8(a,s);o!==void 0&&(o[ps]=i)}}var P2=class{lContainer;$implicit;$index;constructor(i,e,r){this.lContainer=i,this.$implicit=e,this.$index=r}get $count(){return this.lContainer.length-Is}};function d0(t,i){return i}var k2=class{hasEmptyBlock;trackByFn;liveCollection;constructor(i,e,r){this.hasEmptyBlock=i,this.trackByFn=e,this.liveCollection=r}};function am(t,i,e,r,n,a,s,o,d,l,c,h,u){So("NgControlFlow");let f=Kt(),p=kn(),m=d!==void 0,g=Kt(),v=o?s.bind(g[qa][ps]):s,y=new k2(m,v);g[Sr+t]=y,I1(f,p,t+1,i,e,r,n,Ed(p.consts,a)),m&&I1(f,p,t+2,d,l,c,h,Ed(p.consts,u))}var F2=class extends I2{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(i,e,r){super(),this.lContainer=i,this.hostLView=e,this.templateTNode=r}get length(){return this.lContainer.length-Is}at(i){return this.getLView(i)[ps].$implicit}attach(i,e){let r=e[Yf];this.needsIndexUpdate||=i!==this.length,o0(this.lContainer,e,i,Kf(this.templateTNode,r))}detach(i){return this.needsIndexUpdate||=i!==this.length-1,kse(this.lContainer,i)}create(i,e){let r=Zf(this.lContainer,this.templateTNode.tView.ssrId),n=a0(this.hostLView,this.templateTNode,new P2(this.lContainer,e,i),{dehydratedView:r});return this.operationsCounter?.recordCreate(),n}destroy(i){rb(i[pi],i),this.operationsCounter?.recordDestroy()}updateValue(i,e){this.getLView(i)[ps].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let i=0;i(eb(!0),W5(r,n,Ite()));function Lse(t,i,e,r,n){let a=i.consts,s=Ed(a,r),o=l0(i,t,8,"ng-container",s);s!==null&&y2(o,s,!0);let d=Ed(a,n);return K1()&&kD(i,e,o,d,TD),o.mergedAttrs=Qf(o.mergedAttrs,o.attrs),i.queries!==null&&i.queries.elementStart(i,o),o}function Gt(t,i,e){let r=Kt(),n=kn(),a=t+Sr,s=n.firstCreatePass?Lse(a,n,r,i,e):n.data[a];rh(s,!0);let o=Nse(n,r,s,t);return r[a]=o,q1()&&sb(n,r,o,s),oh(o,r),Y1(s)&&(_D(n,r,s),gD(n,s,r)),e!=null&&wD(r,s),Gt}function Ht(){let t=gs(),i=kn();return nD()?rD():(t=t.parent,rh(t,!1)),i.firstCreatePass&&(cD(i,t),q2(t)&&i.queries.elementEnd(t)),Ht}function zr(t,i,e){return Gt(t,i,e),Ht(),zr}var Nse=(t,i,e,r)=>(eb(!0),ine(i[Wn],""));function Ce(){return Kt()}function na(t,i,e){let r=Kt(),n=Ad();if(_a(r,n,i)){let a=kn(),s=im();s0(a,s,r,t,i,r[Wn],e,!0)}return na}function HD(t,i,e){let r=Kt(),n=Ad();if(_a(r,n,i)){let a=kn(),s=im(),o=sD(a.data),d=e8(o,s,r);s0(a,s,r,t,i,d,e,!0)}return HD}var Hu=void 0;function Bse(t){let i=t,e=Math.floor(Math.abs(t)),r=t.toString().replace(/^[^.]*\.?/,"").length;return e===1&&r===0?1:5}var Vse=["en",[["a","p"],["AM","PM"],Hu],[["AM","PM"],Hu,Hu],[["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"]],Hu,[["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"]],Hu,[["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}",Hu,"{1} 'at' {0}",Hu],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",Bse],LE={};function to(t){let i=Use(t),e=eN(i);if(e)return e;let r=i.split("-")[0];if(e=eN(r),e)return e;if(r==="en")return Vse;throw new et(701,!1)}function eN(t){return t in LE||(LE[t]=fs.ng&&fs.ng.common&&fs.ng.common.locales&&fs.ng.common.locales[t]),LE[t]}var cr=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}(cr||{});function Use(t){return t.toLowerCase().replace(/_/g,"-")}var O1="en-US";var zse=O1;function Gse(t){typeof t=="string"&&(zse=t.toLowerCase().replace(/_/g,"-"))}var Hse=(t,i,e)=>{};function ce(t,i,e,r){let n=Kt(),a=kn(),s=gs();return WD(a,n,n[Wn],s,t,i,r),ce}function jD(t,i){let e=gs(),r=Kt(),n=kn(),a=sD(n.data),s=e8(a,e,r);return WD(n,r,s,e,t,i),jD}function jse(t,i,e,r){let n=t.cleanup;if(n!=null)for(let a=0;ad?o[d]:null}typeof s=="string"&&(a+=2)}return null}function WD(t,i,e,r,n,a,s){let o=Y1(r),l=t.firstCreatePass&&UN(t),c=i[ps],h=VN(i),u=!0;if(r.type&3||s){let m=tl(r,i),g=s?s(m):m,v=h.length,y=s?b=>s(Rl(b[r.index])):r.index,x=null;if(!s&&o&&(x=jse(t,i,n,r.index)),x!==null){let b=x.__ngLastListenerFn__||x;b.__ngNextListenerFn__=a,x.__ngLastListenerFn__=a,u=!1}else{a=iN(r,i,c,a),Hse(m,n,a);let b=e.listen(g,n,a);h.push(a,b),l&&l.push(n,y,v,v+1)}}else a=iN(r,i,c,a);let f=r.outputs,p;if(u&&f!==null&&(p=f[n])){let m=p.length;if(m)for(let g=0;g=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),i[e]=r}function Pt(t){let i=wte();return $1(i,Sr+t)}function Y(t,i=""){let e=Kt(),r=kn(),n=t+Sr,a=r.firstCreatePass?l0(r,n,1,i,null):r.data[n],s=$se(r,e,a,i,t);e[n]=s,q1()&&sb(r,e,s,a),rh(a,!1)}var $se=(t,i,e,r,n)=>(eb(!0),ene(i[Wn],r));function ze(t){return Qe("",t,""),ze}function Qe(t,i,e){let r=Kt(),n=GD(r,t,i,e);return n!==ks&&XD(r,Ll(),n),Qe}function Gr(t,i,e,r,n){let a=Kt(),s=hse(a,t,i,e,r,n);return s!==ks&&XD(a,Ll(),s),Gr}function ch(t,i,e,r,n,a,s){let o=Kt(),d=fse(o,t,i,e,r,n,a,s);return d!==ks&&XD(o,Ll(),d),ch}function XD(t,i,e){let r=LN(i,t);tne(t[Wn],r,e)}function Fn(t,i,e){g5(i)&&(i=i());let r=Kt(),n=Ad();if(_a(r,n,i)){let a=kn(),s=im();s0(a,s,r,t,i,r[Wn],e,!1)}return Fn}function Xn(t,i){let e=g5(t);return e&&t.set(i),e}function On(t,i){let e=Kt(),r=kn(),n=gs();return WD(r,e,e[Wn],n,t,i),On}function Qse(t,i,e){let r=kn();if(r.firstCreatePass){let n=Il(t);L2(e,r.data,r.blueprint,n,!0),L2(i,r.data,r.blueprint,n,!1)}}function L2(t,i,e,r,n){if(t=ms(t),Array.isArray(t))for(let a=0;a>20;if(Xf(t)||!t.multi){let f=new Zu(l,n,be),p=BE(d,i,n?c:c+u,h);p===-1?(JE(y1(o,s),a,d),NE(a,t,i.length),i.push(d),o.directiveStart++,o.directiveEnd++,n&&(o.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{let f=BE(d,i,c+u,h),p=BE(d,i,c,c+u),m=f>=0&&e[f],g=p>=0&&e[p];if(n&&!g||!n&&!m){JE(y1(o,s),a,d);let v=Jse(n?Zse:Kse,e.length,n,r,l);!n&&g&&(e[p].providerFactory=v),NE(a,t,i.length,0),i.push(d),o.directiveStart++,o.directiveEnd++,n&&(o.providerIndexes+=1048576),e.push(v),s.push(v)}else{let v=Z8(e[n?p:f],l,!n&&r);NE(a,t,f>-1?f:p,v)}!n&&r&&g&&e[p].componentProviders++}}}function NE(t,i,e,r){let n=Xf(i),a=Zee(i);if(n||a){let d=(a?ms(i.useClass):i).prototype.ngOnDestroy;if(d){let l=t.destroyHooks||(t.destroyHooks=[]);if(!n&&i.multi){let c=l.indexOf(e);c===-1?l.push(e,[r,d]):l[c+1].push(r,d)}else l.push(e,d)}}}function Z8(t,i,e){return e&&t.componentProviders++,t.multi.push(i)-1}function BE(t,i,e,r){for(let n=e;n{e.providersResolver=(r,n)=>Qse(r,n?n(t):t,i)}}function Yn(t,i,e){let r=tm()+t,n=Kt();return n[r]===ks?cb(n,r,e?i.call(e):i()):nse(n,r)}function qr(t,i,e,r){return J8(Kt(),tm(),t,i,e,r)}function pb(t,i,e,r,n){return q8(Kt(),tm(),t,i,e,r,n)}function YD(t,i){let e=t[i];return e===ks?void 0:e}function J8(t,i,e,r,n,a){let s=i+e;return _a(t,s,n)?cb(t,s+1,a?r.call(a,n):r(n)):YD(t,s+1)}function q8(t,i,e,r,n,a,s){let o=i+e;return ND(t,o,n,a)?cb(t,o+2,s?r.call(s,n,a):r(n,a)):YD(t,o+2)}function qse(t,i,e,r,n,a,s,o){let d=i+e;return O8(t,d,n,a,s)?cb(t,d+3,o?r.call(o,n,a,s):r(n,a,s)):YD(t,d+3)}function qi(t,i){let e=kn(),r,n=t+Sr;e.firstCreatePass?(r=eae(i,e.pipeRegistry),e.data[n]=r,r.onDestroy&&(e.destroyHooks??=[]).push(n,r.onDestroy)):r=e.data[n];let a=r.factory||(r.factory=Wu(r.type,!0)),s,o=xa(be);try{let d=v1(!1),l=a();return v1(d),Yse(e,Kt(),n,l),l}finally{xa(o)}}function eae(t,i){if(i)for(let e=i.length-1;e>=0;e--){let r=i[e];if(t===r.name)return r}}function es(t,i,e){let r=t+Sr,n=Kt(),a=$1(n,r);return $D(n,r)?J8(n,tm(),i,a.transform,e,a):a.transform(e)}function Hr(t,i,e,r){let n=t+Sr,a=Kt(),s=$1(a,n);return $D(a,n)?q8(a,tm(),i,s.transform,e,r,s):s.transform(e,r)}function eB(t,i,e,r,n){let a=t+Sr,s=Kt(),o=$1(s,a);return $D(s,a)?qse(s,tm(),i,o.transform,e,r,n,o):o.transform(e,r,n)}function $D(t,i){return t[pi].data[i].pure}function u0(t,i){return ob(t,i)}var e1=null;function tae(t){e1!==null&&(t.defaultEncapsulation!==e1.defaultEncapsulation||t.preserveWhitespaces!==e1.preserveWhitespaces)||(e1=t)}var Md=class{full;major;minor;patch;constructor(i){this.full=i;let e=i.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}},QD=new Md("19.1.5"),B2=class{ngModuleFactory;componentFactories;constructor(i,e){this.ngModuleFactory=i,this.componentFactories=e}},gb=(()=>{class t{compileModuleSync(e){return new A1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let r=this.compileModuleSync(e),n=wN(e),a=G5(n.declarations).reduce((s,o)=>{let d=Cc(o);return d&&s.push(new eh(d)),s},[]);return new B2(r,a)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),iae=new Se("");function nae(t,i,e){let r=new A1(e);return Promise.resolve(r)}function nN(t){for(let i=t.length-1;i>=0;i--)if(t[i]!==void 0)return t[i]}var rae=(()=>{class t{zone=Q(dt);changeDetectionScheduler=Q(Ju);applicationRef=Q(ia);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function sae({ngZoneFactory:t,ignoreChangesOutsideZone:i,scheduleInRootZone:e}){return t??=()=>new dt(Mt(Me({},tB()),{scheduleInRootZone:e})),[{provide:dt,useFactory:t},{provide:Wf,multi:!0,useFactory:()=>{let r=Q(rae,{optional:!0});return()=>r.initialize()}},{provide:Wf,multi:!0,useFactory:()=>{let r=Q(aae);return()=>{r.initialize()}}},i===!0?{provide:d5,useValue:!0}:[],{provide:u5,useValue:e??c5}]}function tB(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var aae=(()=>{class t{subscription=new kt;initialized=!1;zone=Q(dt);pendingTasks=Q(Nl);initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{dt.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{dt.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var oae=(()=>{class t{appRef=Q(ia);taskService=Q(Nl);ngZone=Q(dt);zonelessEnabled=Q(uD);tracing=Q(sm,{optional:!0});disableScheduling=Q(d5,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new kt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(b1):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Q(u5,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof _1||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let r=!1;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 8:{this.appRef.deferredDirtyFlags|=8;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 13:{this.appRef.dirtyFlags|=16,r=!0;break}case 14:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{r=!0;break}case 10:case 9:case 7:case 11:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let n=this.useMicrotaskScheduler?EL:h5;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>n(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>n(()=>this.tick()))}shouldScheduleTick(e){return!(this.disableScheduling&&!e||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(b1+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(e),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,EL(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function lae(){return typeof $localize<"u"&&$localize.locale||O1}var lm=new Se("",{providedIn:"root",factory:()=>Q(lm,Ti.Optional|Ti.SkipSelf)||lae()});var L1=new Se(""),cae=new Se("");function Bg(t){return!t.moduleRef}function dae(t){let i=Bg(t)?t.r3Injector:t.moduleRef.injector,e=i.get(dt);return e.run(()=>{Bg(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let r=i.get(ba,null),n;if(e.runOutsideAngular(()=>{n=e.onError.subscribe({next:a=>{r.handleError(a)}})}),Bg(t)){let a=()=>i.destroy(),s=t.platformInjector.get(L1);s.add(a),i.onDestroy(()=>{n.unsubscribe(),s.delete(a)})}else{let a=()=>t.moduleRef.destroy(),s=t.platformInjector.get(L1);s.add(a),t.moduleRef.onDestroy(()=>{a1(t.allPlatformModules,t.moduleRef),n.unsubscribe(),s.delete(a)})}return hae(r,e,()=>{let a=i.get(L8);return a.runInitializers(),a.donePromise.then(()=>{let s=i.get(lm,O1);if(Gse(s||O1),!i.get(cae,!0))return Bg(t)?i.get(ia):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(Bg(t)){let d=i.get(ia);return t.rootComponent!==void 0&&d.bootstrap(t.rootComponent),d}else return uae(t.moduleRef,t.allPlatformModules),t.moduleRef})})})}function uae(t,i){let e=t.injector.get(ia);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>e.bootstrap(r));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(e);else throw new et(-403,!1);i.push(t)}function hae(t,i,e){try{let r=e();return Rd(r)?r.catch(n=>{throw i.runOutsideAngular(()=>t.handleError(n)),n}):r}catch(r){throw i.runOutsideAngular(()=>t.handleError(r)),r}}var iB=(()=>{class t{_injector;_modules=[];_destroyListeners=[];_destroyed=!1;constructor(e){this._injector=e}bootstrapModuleFactory(e,r){let n=r?.scheduleInRootZone,a=()=>tie(r?.ngZone,Mt(Me({},tB({eventCoalescing:r?.ngZoneEventCoalescing,runCoalescing:r?.ngZoneRunCoalescing})),{scheduleInRootZone:n})),s=r?.ignoreChangesOutsideZone,o=[sae({ngZoneFactory:a,ignoreChangesOutsideZone:s}),{provide:Ju,useExisting:oae}],d=jre(e.moduleType,this.injector,o);return dae({moduleRef:d,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(e,r=[]){let n=B8({},r);return nae(this.injector,n,e).then(a=>this.bootstrapModuleFactory(a,n))}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new et(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());let e=this._injector.get(L1,null);e&&(e.forEach(r=>r()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static \u0275fac=function(r){return new(r||t)(_t(Wt))};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})(),Gg=null,nB=new Se("");function fae(t){if(Gg&&!Gg.get(nB,!1))throw new et(400,!1);lse(),Gg=t;let i=t.get(iB);return gae(t),i}function KD(t,i,e=[]){let r=`Platform: ${i}`,n=new Se(r);return(a=[])=>{let s=rB();if(!s||s.injector.get(nB,!1)){let o=[...e,...a,{provide:n,useValue:!0}];t?t(o):fae(mae(o,r))}return pae(n)}}function mae(t=[],i){return Wt.create({name:i,providers:[{provide:H1,useValue:"platform"},{provide:L1,useValue:new Set([()=>Gg=null])},...t]})}function pae(t){let i=rB();if(!i)throw new et(401,!1);return i}function rB(){return Gg?.get(iB)??null}function gae(t){let i=t.get(mD,null);wa(t,()=>{i?.forEach(e=>e())})}var Ut=(()=>{class t{static __NG_ELEMENT_ID__=vae}return t})();function vae(t){return yae(gs(),Kt(),(t&16)===16)}function yae(t,i,e){if(nh(t)&&!e){let r=Pl(t.index,i);return new qu(r,r)}else if(t.type&175){let r=i[qa];return new qu(r,i)}return null}var V2=class{constructor(){}supports(i){return F8(i)}create(i){return new U2(i)}},xae=(t,i)=>i,U2=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(i){this._trackByFn=i||xae}forEachItem(i){let e;for(e=this._itHead;e!==null;e=e._next)i(e)}forEachOperation(i){let e=this._itHead,r=this._removalsHead,n=0,a=null;for(;e||r;){let s=!r||e&&e.currentIndex{s=this._trackByFn(n,o),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,o,s,n),r=!0):(r&&(e=this._verifyReinsertion(e,o,s,n)),Object.is(e.item,o)||this._addIdentityChange(e,o)),e=e._next,n++}),this.length=n;return this._truncate(e),this.collection=i,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;i!==null;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;i!==null;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;i!==null;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,e,r,n){let a;return i===null?a=this._itTail:(a=i._prev,this._remove(i)),i=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null),i!==null?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._reinsertAfter(i,a,n)):(i=this._linkedRecords===null?null:this._linkedRecords.get(r,n),i!==null?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._moveAfter(i,a,n)):i=this._addAfter(new z2(e,r),a,n)),i}_verifyReinsertion(i,e,r,n){let a=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null);return a!==null?i=this._reinsertAfter(a,i._prev,n):i.currentIndex!=n&&(i.currentIndex=n,this._addToMoves(i,n)),i}_truncate(i){for(;i!==null;){let e=i._next;this._addToRemovals(this._unlink(i)),i=e}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(i,e,r){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(i);let n=i._prevRemoved,a=i._nextRemoved;return n===null?this._removalsHead=a:n._nextRemoved=a,a===null?this._removalsTail=n:a._prevRemoved=n,this._insertAfter(i,e,r),this._addToMoves(i,r),i}_moveAfter(i,e,r){return this._unlink(i),this._insertAfter(i,e,r),this._addToMoves(i,r),i}_addAfter(i,e,r){return this._insertAfter(i,e,r),this._additionsTail===null?this._additionsTail=this._additionsHead=i:this._additionsTail=this._additionsTail._nextAdded=i,i}_insertAfter(i,e,r){let n=e===null?this._itHead:e._next;return i._next=n,i._prev=e,n===null?this._itTail=i:n._prev=i,e===null?this._itHead=i:e._next=i,this._linkedRecords===null&&(this._linkedRecords=new N1),this._linkedRecords.put(i),i.currentIndex=r,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){this._linkedRecords!==null&&this._linkedRecords.remove(i);let e=i._prev,r=i._next;return e===null?this._itHead=r:e._next=r,r===null?this._itTail=e:r._prev=e,i}_addToMoves(i,e){return i.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=i:this._movesTail=this._movesTail._nextMoved=i),i}_addToRemovals(i){return this._unlinkedRecords===null&&(this._unlinkedRecords=new N1),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,e){return i.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=i:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=i,i}},z2=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(i,e){this.item=i,this.trackById=e}},G2=class{_head=null;_tail=null;add(i){this._head===null?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,e){let r;for(r=this._head;r!==null;r=r._nextDup)if((e===null||e<=r.currentIndex)&&Object.is(r.trackById,i))return r;return null}remove(i){let e=i._prevDup,r=i._nextDup;return e===null?this._head=r:e._nextDup=r,r===null?this._tail=e:r._prevDup=e,this._head===null}},N1=class{map=new Map;put(i){let e=i.trackById,r=this.map.get(e);r||(r=new G2,this.map.set(e,r)),r.add(i)}get(i,e){let r=i,n=this.map.get(r);return n?n.get(i,e):null}remove(i){let e=i.trackById;return this.map.get(e).remove(i)&&this.map.delete(e),i}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function rN(t,i,e){let r=t.previousIndex;if(r===null)return r;let n=0;return e&&r{if(e&&e.key===n)this._maybeAddToChanges(e,r),this._appendAfter=e,e=e._next;else{let a=this._getOrCreateRecordForKey(n,r);e=this._insertBeforeOrAppend(e,a)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let r=e;r!==null;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,e){if(i){let r=i._prev;return e._next=i,e._prev=r,i._prev=e,r&&(r._next=e),i===this._mapHead&&(this._mapHead=e),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(i,e){if(this._records.has(i)){let n=this._records.get(i);this._maybeAddToChanges(n,e);let a=n._prev,s=n._next;return a&&(a._next=s),s&&(s._prev=a),n._next=null,n._prev=null,n}let r=new W2(i);return this._records.set(i,r),r.currentValue=e,this._addToAdditions(r),r}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;i!==null;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;i!==null;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;i!=null;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,e){Object.is(e,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=e,this._addToChanges(i))}_addToAdditions(i){this._additionsHead===null?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){this._changesHead===null?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,e){i instanceof Map?i.forEach(e):Object.keys(i).forEach(r=>e(i[r],r))}},W2=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(i){this.key=i}};function sN(){return new Vl([new V2])}var Vl=(()=>{class t{factories;static \u0275prov=Fe({token:t,providedIn:"root",factory:sN});constructor(e){this.factories=e}static create(e,r){if(r!=null){let n=r.factories.slice();e=e.concat(n)}return new t(e)}static extend(e){return{provide:t,useFactory:r=>t.create(e,r||sN()),deps:[[t,new ih,new Dc]]}}find(e){let r=this.factories.find(n=>n.supports(e));if(r!=null)return r;throw new et(901,!1)}}return t})();function aN(){return new vb([new H2])}var vb=(()=>{class t{static \u0275prov=Fe({token:t,providedIn:"root",factory:aN});factories;constructor(e){this.factories=e}static create(e,r){if(r){let n=r.factories.slice();e=e.concat(n)}return new t(e)}static extend(e){return{provide:t,useFactory:r=>t.create(e,r||aN()),deps:[[t,new ih,new Dc]]}}find(e){let r=this.factories.find(n=>n.supports(e));if(r)return r;throw new et(901,!1)}}return t})();var sB=KD(null,"core",[]),aB=(()=>{class t{constructor(e){}static \u0275fac=function(r){return new(r||t)(_t(ia))};static \u0275mod=rt({type:t});static \u0275inj=nt({})}return t})();function $e(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function Yi(t,i=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):i}function Pc(t,i){So("NgSignals");let e=oE(t);return i?.equal&&(e[As].equal=i.equal),e}function Sa(t){let i=Di(null);try{return t()}finally{Di(i)}}var oB=(()=>{class t{view;node;constructor(e,r){this.view=e,this.node=r}static __NG_ELEMENT_ID__=bae}return t})();function bae(){return new oB(Kt(),gs())}var _ae=!1,wae=(()=>{class t extends R1{pendingTasks=Q(Nl);taskId=null;schedule(e){super.schedule(e),this.taskId===null&&(this.taskId=this.pendingTasks.add(),queueMicrotask(()=>this.flush()))}flush(){try{super.flush()}finally{this.taskId!==null&&(this.pendingTasks.remove(this.taskId),this.taskId=null)}}static \u0275prov=Fe({token:t,providedIn:"root",factory:()=>new t})}return t})(),X2=class{scheduler;effectFn;zone;injector;unregisterOnDestroy;watcher;constructor(i,e,r,n,a,s){this.scheduler=i,this.effectFn=e,this.zone=r,this.injector=a,this.watcher=V3(o=>this.runEffect(o),()=>this.schedule(),s),this.unregisterOnDestroy=n?.onDestroy(()=>this.destroy())}runEffect(i){try{this.effectFn(i)}catch(e){this.injector.get(ba,null,{optional:!0})?.handleError(e)}}run(){this.watcher.run()}schedule(){this.scheduler.schedule(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}};function Cae(){}function Tae(t,i){So("NgSignals"),!i?.injector&&W1(Cae);let e=i?.injector??Q(Wt),r=i?.manualCleanup!==!0?e.get(ah):null,n=new X2(e.get(wae),t,typeof Zone>"u"?null:Zone.current,r,e,i?.allowSignalWrites??!1),a=e.get(Ut,null,{optional:!0});return!a||!(a._lView[si]&8)?n.watcher.notify():(a._lView[i1]??=[]).push(n.watcher.notify),n}var Sae=_ae;var Y2=class{[As];constructor(i){this[As]=i}destroy(){this[As].destroy()}};function h0(t,i){if(Sae)return Tae(t,i);So("NgSignals"),!i?.injector&&W1(h0);let e=i?.injector??Q(Wt),r=i?.manualCleanup!==!0?e.get(ah):null,n,a=e.get(oB,null,{optional:!0}),s=e.get(Ju);return a!==null&&!i?.forceRoot?(n=Mae(a.view,s,t),r instanceof x1&&r._lView===a.view&&(r=null)):n=Aae(t,e.get(N8),s),n.injector=e,r!==null&&(n.onDestroyFn=r.onDestroy(()=>n.destroy())),new Y2(n)}var lB=Mt(Me({},Lu),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,hasRun:!1,cleanupFns:void 0,zone:null,kind:"effect",onDestroyFn:$g,run(){if(this.dirty=!1,this.hasRun&&!Pg(this))return;this.hasRun=!0;let t=r=>(this.cleanupFns??=[]).push(r),i=Cf(this),e=m1(!1);try{this.maybeCleanup(),this.fn(t)}finally{m1(e),Rg(this,i)}},maybeCleanup(){if(this.cleanupFns?.length)try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[]}}}),Eae=Mt(Me({},lB),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(13)},destroy(){Tf(this),this.onDestroyFn(),this.maybeCleanup(),this.scheduler.remove(this)}}),Dae=Mt(Me({},lB),{consumerMarkedDirty(){this.view[si]|=8192,t0(this.view),this.notifier.notify(14)},destroy(){Tf(this),this.onDestroyFn(),this.maybeCleanup(),this.view[Yu]?.delete(this)}});function Mae(t,i,e){let r=Object.create(Dae);return r.view=t,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=i,r.fn=e,t[Yu]??=new Set,t[Yu].add(r),r.consumerMarkedDirty(r),r}function Aae(t,i,e){let r=Object.create(Eae);return r.fn=t,r.scheduler=i,r.notifier=e,r.zone=typeof Zone<"u"?Zone.current:null,r.scheduler.schedule(r),r.notifier.notify(13),r}function yb(t,i){let e=Cc(t),r=i.elementInjector||j1();return new eh(e).create(r,i.projectableNodes,i.hostElement,i.environmentInjector)}function cB(t){let i=Cc(t);if(!i)return null;let e=new eh(i);return{get selector(){return e.selector},get type(){return e.componentType},get inputs(){return e.inputs},get outputs(){return e.outputs},get ngContentSelectors(){return e.ngContentSelectors},get isStandalone(){return i.standalone},get isSignal(){return i.signals}}}var yB=null;function Ul(){return yB}function xB(t){yB??=t}var Db=class{};var St=new Se(""),lM=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:()=>Q(Iae),providedIn:"platform"})}return t})(),bB=new Se(""),Iae=(()=>{class t extends lM{_location;_history;_doc=Q(St);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ul().getBaseHref(this._doc)}onPopState(e){let r=Ul().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",e,!1),()=>r.removeEventListener("popstate",e)}onHashChange(e){let r=Ul().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",e,!1),()=>r.removeEventListener("hashchange",e)}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(e){this._location.pathname=e}pushState(e,r,n){this._history.pushState(e,r,n)}replaceState(e,r,n){this._history.replaceState(e,r,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function cM(t,i){return t?i?t.endsWith("/")?i.startsWith("/")?t+i.slice(1):t+i:i.startsWith("/")?t+i:`${t}/${i}`:t:i}function dB(t){let i=t.match(/#|\?|$/),e=i&&i.index||t.length,r=e-(t[e-1]==="/"?1:0);return t.slice(0,r)+t.slice(e)}function Fc(t){return t&&t[0]!=="?"?"?"+t:t}var Lc=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:()=>Q(dM),providedIn:"root"})}return t})(),_B=new Se(""),dM=(()=>{class t extends Lc{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,r){super(),this._platformLocation=e,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??Q(St).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return cM(this._baseHref,e)}path(e=!1){let r=this._platformLocation.pathname+Fc(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?`${r}${n}`:r}pushState(e,r,n,a){let s=this.prepareExternalUrl(n+Fc(a));this._platformLocation.pushState(e,r,s)}replaceState(e,r,n,a){let s=this.prepareExternalUrl(n+Fc(a));this._platformLocation.replaceState(e,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(r){return new(r||t)(_t(lM),_t(_B,8))};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),wB=(()=>{class t extends Lc{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,r){super(),this._platformLocation=e,r!=null&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(e){let r=cM(this._baseHref,e);return r.length>0?"#"+r:r}pushState(e,r,n,a){let s=this.prepareExternalUrl(n+Fc(a));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,r,s)}replaceState(e,r,n,a){let s=this.prepareExternalUrl(n+Fc(a));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(r){return new(r||t)(_t(lM),_t(_B,8))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})(),Pd=(()=>{class t{_subject=new Oe;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let r=this._locationStrategy.getBaseHref();this._basePath=kae(dB(uB(r))),this._locationStrategy.onPopState(n=>{this._subject.next({url:this.path(!0),pop:!0,state:n.state,type:n.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,r=""){return this.path()==this.normalize(e+Fc(r))}normalize(e){return t.stripTrailingSlash(Pae(this._basePath,uB(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,r="",n=null){this._locationStrategy.pushState(n,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Fc(r)),n)}replaceState(e,r="",n=null){this._locationStrategy.replaceState(n,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Fc(r)),n)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",r){this._urlChangeListeners.forEach(n=>n(e,r))}subscribe(e,r,n){return this._subject.subscribe({next:e,error:r??void 0,complete:n??void 0})}static normalizeQueryParams=Fc;static joinWithSlash=cM;static stripTrailingSlash=dB;static \u0275fac=function(r){return new(r||t)(_t(Lc))};static \u0275prov=Fe({token:t,factory:()=>Rae(),providedIn:"root"})}return t})();function Rae(){return new Pd(_t(Lc))}function Pae(t,i){if(!t||!i.startsWith(t))return i;let e=i.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:i}function uB(t){return t.replace(/\/index.html$/,"")}function kae(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var CB=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}(CB||{});var ra=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}(ra||{}),Sn=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}(Sn||{}),no=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}(no||{}),ro={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Fae(t){return to(t)[cr.LocaleId]}function Oae(t,i,e){let r=to(t),n=[r[cr.DayPeriodsFormat],r[cr.DayPeriodsStandalone]],a=Mo(n,i);return Mo(a,e)}function Lae(t,i,e){let r=to(t),n=[r[cr.DaysFormat],r[cr.DaysStandalone]],a=Mo(n,i);return Mo(a,e)}function Nae(t,i,e){let r=to(t),n=[r[cr.MonthsFormat],r[cr.MonthsStandalone]],a=Mo(n,i);return Mo(a,e)}function Bae(t,i){let r=to(t)[cr.Eras];return Mo(r,i)}function xb(t,i){let e=to(t);return Mo(e[cr.DateFormat],i)}function bb(t,i){let e=to(t);return Mo(e[cr.TimeFormat],i)}function _b(t,i){let r=to(t)[cr.DateTimeFormat];return Mo(r,i)}function Oc(t,i){let e=to(t),r=e[cr.NumberSymbols][i];if(typeof r>"u"){if(i===ro.CurrencyDecimal)return e[cr.NumberSymbols][ro.Decimal];if(i===ro.CurrencyGroup)return e[cr.NumberSymbols][ro.Group]}return r}function Vae(t,i){return to(t)[cr.NumberFormats][i]}function TB(t){if(!t[cr.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[cr.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Uae(t){let i=to(t);return TB(i),(i[cr.ExtraData][2]||[]).map(r=>typeof r=="string"?ZD(r):[ZD(r[0]),ZD(r[1])])}function zae(t,i,e){let r=to(t);TB(r);let n=[r[cr.ExtraData][0],r[cr.ExtraData][1]],a=Mo(n,i)||[];return Mo(a,e)||[]}function Mo(t,i){for(let e=i;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new Error("Locale data API: locale data undefined")}function ZD(t){let[i,e]=t.split(":");return{hours:+i,minutes:+e}}var Gae=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,wb={},Hae=/((?:[^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]*)/;function jae(t,i,e,r){let n=qae(t);i=kc(e,i)||i;let s=[],o;for(;i;)if(o=Hae.exec(i),o){s=s.concat(o.slice(1));let c=s.pop();if(!c)break;i=c}else{s.push(i);break}let d=n.getTimezoneOffset();r&&(d=EB(r,d),n=Jae(n,r,!0));let l="";return s.forEach(c=>{let h=Kae(c);l+=h?h(n,e,d):c==="''"?"'":c.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function Mb(t,i,e){let r=new Date(0);return r.setFullYear(t,i,e),r.setHours(0,0,0),r}function kc(t,i){let e=Fae(t);if(wb[e]??={},wb[e][i])return wb[e][i];let r="";switch(i){case"shortDate":r=xb(t,no.Short);break;case"mediumDate":r=xb(t,no.Medium);break;case"longDate":r=xb(t,no.Long);break;case"fullDate":r=xb(t,no.Full);break;case"shortTime":r=bb(t,no.Short);break;case"mediumTime":r=bb(t,no.Medium);break;case"longTime":r=bb(t,no.Long);break;case"fullTime":r=bb(t,no.Full);break;case"short":let n=kc(t,"shortTime"),a=kc(t,"shortDate");r=Cb(_b(t,no.Short),[n,a]);break;case"medium":let s=kc(t,"mediumTime"),o=kc(t,"mediumDate");r=Cb(_b(t,no.Medium),[s,o]);break;case"long":let d=kc(t,"longTime"),l=kc(t,"longDate");r=Cb(_b(t,no.Long),[d,l]);break;case"full":let c=kc(t,"fullTime"),h=kc(t,"fullDate");r=Cb(_b(t,no.Full),[c,h]);break}return r&&(wb[e][i]=r),r}function Cb(t,i){return i&&(t=t.replace(/\{([^}]+)}/g,function(e,r){return i!=null&&r in i?i[r]:e})),t}function il(t,i,e="-",r,n){let a="";(t<0||n&&t<=0)&&(n?t=-t+1:(t=-t,a=e));let s=String(t);for(;s.length0||o>-e)&&(o+=e),t===3)o===0&&e===-12&&(o=12);else if(t===6)return Wae(o,i);let d=Oc(s,ro.MinusSign);return il(o,i,d,r,n)}}function Xae(t,i){switch(t){case 0:return i.getFullYear();case 1:return i.getMonth();case 2:return i.getDate();case 3:return i.getHours();case 4:return i.getMinutes();case 5:return i.getSeconds();case 6:return i.getMilliseconds();case 7:return i.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}function Ln(t,i,e=ra.Format,r=!1){return function(n,a){return Yae(n,a,t,i,e,r)}}function Yae(t,i,e,r,n,a){switch(e){case 2:return Nae(i,n,r)[t.getMonth()];case 1:return Lae(i,n,r)[t.getDay()];case 0:let s=t.getHours(),o=t.getMinutes();if(a){let l=Uae(i),c=zae(i,n,r),h=l.findIndex(u=>{if(Array.isArray(u)){let[f,p]=u,m=s>=f.hours&&o>=f.minutes,g=s0?Math.floor(n/60):Math.ceil(n/60);switch(t){case 0:return(n>=0?"+":"")+il(s,2,a)+il(Math.abs(n%60),2,a);case 1:return"GMT"+(n>=0?"+":"")+il(s,1,a);case 2:return"GMT"+(n>=0?"+":"")+il(s,2,a)+":"+il(Math.abs(n%60),2,a);case 3:return r===0?"Z":(n>=0?"+":"")+il(s,2,a)+":"+il(Math.abs(n%60),2,a);default:throw new Error(`Unknown zone width "${t}"`)}}}var $ae=0,Eb=4;function Qae(t){let i=Mb(t,$ae,1).getDay();return Mb(t,0,1+(i<=Eb?Eb:Eb+7)-i)}function SB(t){let i=t.getDay(),e=i===0?-3:Eb-i;return Mb(t.getFullYear(),t.getMonth(),t.getDate()+e)}function JD(t,i=!1){return function(e,r){let n;if(i){let a=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();n=1+Math.floor((s+a)/7)}else{let a=SB(e),s=Qae(a.getFullYear()),o=a.getTime()-s.getTime();n=1+Math.round(o/6048e5)}return il(n,t,Oc(r,ro.MinusSign))}}function Sb(t,i=!1){return function(e,r){let a=SB(e).getFullYear();return il(a,t,Oc(r,ro.MinusSign),i)}}var qD={};function Kae(t){if(qD[t])return qD[t];let i;switch(t){case"G":case"GG":case"GGG":i=Ln(3,Sn.Abbreviated);break;case"GGGG":i=Ln(3,Sn.Wide);break;case"GGGGG":i=Ln(3,Sn.Narrow);break;case"y":i=Er(0,1,0,!1,!0);break;case"yy":i=Er(0,2,0,!0,!0);break;case"yyy":i=Er(0,3,0,!1,!0);break;case"yyyy":i=Er(0,4,0,!1,!0);break;case"Y":i=Sb(1);break;case"YY":i=Sb(2,!0);break;case"YYY":i=Sb(3);break;case"YYYY":i=Sb(4);break;case"M":case"L":i=Er(1,1,1);break;case"MM":case"LL":i=Er(1,2,1);break;case"MMM":i=Ln(2,Sn.Abbreviated);break;case"MMMM":i=Ln(2,Sn.Wide);break;case"MMMMM":i=Ln(2,Sn.Narrow);break;case"LLL":i=Ln(2,Sn.Abbreviated,ra.Standalone);break;case"LLLL":i=Ln(2,Sn.Wide,ra.Standalone);break;case"LLLLL":i=Ln(2,Sn.Narrow,ra.Standalone);break;case"w":i=JD(1);break;case"ww":i=JD(2);break;case"W":i=JD(1,!0);break;case"d":i=Er(2,1);break;case"dd":i=Er(2,2);break;case"c":case"cc":i=Er(7,1);break;case"ccc":i=Ln(1,Sn.Abbreviated,ra.Standalone);break;case"cccc":i=Ln(1,Sn.Wide,ra.Standalone);break;case"ccccc":i=Ln(1,Sn.Narrow,ra.Standalone);break;case"cccccc":i=Ln(1,Sn.Short,ra.Standalone);break;case"E":case"EE":case"EEE":i=Ln(1,Sn.Abbreviated);break;case"EEEE":i=Ln(1,Sn.Wide);break;case"EEEEE":i=Ln(1,Sn.Narrow);break;case"EEEEEE":i=Ln(1,Sn.Short);break;case"a":case"aa":case"aaa":i=Ln(0,Sn.Abbreviated);break;case"aaaa":i=Ln(0,Sn.Wide);break;case"aaaaa":i=Ln(0,Sn.Narrow);break;case"b":case"bb":case"bbb":i=Ln(0,Sn.Abbreviated,ra.Standalone,!0);break;case"bbbb":i=Ln(0,Sn.Wide,ra.Standalone,!0);break;case"bbbbb":i=Ln(0,Sn.Narrow,ra.Standalone,!0);break;case"B":case"BB":case"BBB":i=Ln(0,Sn.Abbreviated,ra.Format,!0);break;case"BBBB":i=Ln(0,Sn.Wide,ra.Format,!0);break;case"BBBBB":i=Ln(0,Sn.Narrow,ra.Format,!0);break;case"h":i=Er(3,1,-12);break;case"hh":i=Er(3,2,-12);break;case"H":i=Er(3,1);break;case"HH":i=Er(3,2);break;case"m":i=Er(4,1);break;case"mm":i=Er(4,2);break;case"s":i=Er(5,1);break;case"ss":i=Er(5,2);break;case"S":i=Er(6,1);break;case"SS":i=Er(6,2);break;case"SSS":i=Er(6,3);break;case"Z":case"ZZ":case"ZZZ":i=Tb(0);break;case"ZZZZZ":i=Tb(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":i=Tb(1);break;case"OOOO":case"ZZZZ":case"zzzz":i=Tb(2);break;default:return null}return qD[t]=i,i}function EB(t,i){t=t.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?i:e}function Zae(t,i){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+i),t}function Jae(t,i,e){let r=e?-1:1,n=t.getTimezoneOffset(),a=EB(i,n);return Zae(t,r*(a-n))}function qae(t){if(hB(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[n,a=1,s=1]=t.split("-").map(o=>+o);return Mb(n,a-1,s)}let e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let r;if(r=t.match(Gae))return eoe(r)}let i=new Date(t);if(!hB(i))throw new Error(`Unable to convert "${t}" into a date`);return i}function eoe(t){let i=new Date(0),e=0,r=0,n=t[8]?i.setUTCFullYear:i.setFullYear,a=t[8]?i.setUTCHours:i.setHours;t[9]&&(e=Number(t[9]+t[10]),r=Number(t[9]+t[11])),n.call(i,Number(t[1]),Number(t[2])-1,Number(t[3]));let s=Number(t[4]||0)-e,o=Number(t[5]||0)-r,d=Number(t[6]||0),l=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return a.call(i,s,o,d,l),i}function hB(t){return t instanceof Date&&!isNaN(t.valueOf())}var toe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,fB=22,Ab=".",f0="0",ioe=";",noe=",",eM="#";function roe(t,i,e,r,n,a,s=!1){let o="",d=!1;if(!isFinite(t))o=Oc(e,ro.Infinity);else{let l=loe(t);s&&(l=ooe(l));let c=i.minInt,h=i.minFrac,u=i.maxFrac;if(a){let y=a.match(toe);if(y===null)throw new Error(`${a} is not a valid digit info`);let x=y[1],b=y[3],_=y[5];x!=null&&(c=tM(x)),b!=null&&(h=tM(b)),_!=null?u=tM(_):b!=null&&h>u&&(u=h)}coe(l,h,u);let f=l.digits,p=l.integerLen,m=l.exponent,g=[];for(d=f.every(y=>!y);p0?g=f.splice(p,f.length):(g=f,f=[0]);let v=[];for(f.length>=i.lgSize&&v.unshift(f.splice(-i.lgSize,f.length).join(""));f.length>i.gSize;)v.unshift(f.splice(-i.gSize,f.length).join(""));f.length&&v.unshift(f.join("")),o=v.join(Oc(e,r)),g.length&&(o+=Oc(e,n)+g.join("")),m&&(o+=Oc(e,ro.Exponential)+"+"+m)}return t<0&&!d?o=i.negPre+o+i.negSuf:o=i.posPre+o+i.posSuf,o}function soe(t,i,e){let r=Vae(i,CB.Decimal),n=aoe(r,Oc(i,ro.MinusSign));return roe(t,n,i,ro.Group,ro.Decimal,e)}function aoe(t,i="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=t.split(ioe),n=r[0],a=r[1],s=n.indexOf(Ab)!==-1?n.split(Ab):[n.substring(0,n.lastIndexOf(f0)+1),n.substring(n.lastIndexOf(f0)+1)],o=s[0],d=s[1]||"";e.posPre=o.substring(0,o.indexOf(eM));for(let c=0;c-1&&(i=i.replace(Ab,"")),(a=i.search(/e/i))>0?(n<0&&(n=a),n+=+i.slice(a+1),i=i.substring(0,a)):n<0&&(n=i.length),a=0;i.charAt(a)===f0;a++);if(a===(o=i.length))r=[0],n=1;else{for(o--;i.charAt(o)===f0;)o--;for(n-=a,r=[],s=0;a<=o;a++,s++)r[s]=Number(i.charAt(a))}return n>fB&&(r=r.splice(0,fB-1),e=n-1,n=1),{digits:r,exponent:e,integerLen:n}}function coe(t,i,e){if(i>e)throw new Error(`The minimum number of digits after fraction (${i}) is higher than the maximum (${e}).`);let r=t.digits,n=r.length-t.integerLen,a=Math.min(Math.max(i,n),e),s=a+t.integerLen,o=r[s];if(s>0){r.splice(Math.max(t.integerLen,s));for(let h=s;h=5)if(s-1<0){for(let h=0;h>s;h--)r.unshift(0),t.integerLen++;r.unshift(1),t.integerLen++}else r[s-1]++;for(;n=l?p.pop():d=!1),u>=10?1:0},0);c&&(r.unshift(c),t.integerLen++)}function tM(t){let i=parseInt(t);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+t);return i}function Ib(t,i){i=encodeURIComponent(i);for(let e of t.split(";")){let r=e.indexOf("="),[n,a]=r==-1?[e,""]:[e.slice(0,r),e.slice(r+1)];if(n.trim()===i)return decodeURIComponent(a)}return null}var iM=/\s+/,mB=[],Ea=(()=>{class t{_ngEl;_renderer;initialClasses=mB;rawClass;stateMap=new Map;constructor(e,r){this._ngEl=e,this._renderer=r}set klass(e){this.initialClasses=e!=null?e.trim().split(iM):mB}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(iM):e}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let r of e)this._updateState(r,!0);else if(e!=null)for(let r of Object.keys(e))this._updateState(r,!!e[r]);this._applyStateDiff()}_updateState(e,r){let n=this.stateMap.get(e);n!==void 0?(n.enabled!==r&&(n.changed=!0,n.enabled=r),n.touched=!0):this.stateMap.set(e,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let r=e[0],n=e[1];n.changed?(this._toggleClass(r,n.enabled),n.changed=!1):n.touched||(n.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),n.touched=!1}}_toggleClass(e,r){e=e.trim(),e.length>0&&e.split(iM).forEach(n=>{r?this._renderer.addClass(this._ngEl.nativeElement,n):this._renderer.removeClass(this._ngEl.nativeElement,n)})}static \u0275fac=function(r){return new(r||t)(be(Ze),be(Ai))};static \u0275dir=Ue({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})();var nM=class{$implicit;ngForOf;index;count;constructor(i,e,r,n){this.$implicit=i,this.ngForOf=e,this.index=r,this.count=n}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},ci=(()=>{class t{_viewContainer;_template;_differs;set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(e,r,n){this._viewContainer=e,this._template=r,this._differs=n}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let r=this._viewContainer;e.forEachOperation((n,a,s)=>{if(n.previousIndex==null)r.createEmbeddedView(this._template,new nM(n.item,this._ngForOf,-1,-1),s===null?void 0:s);else if(s==null)r.remove(a===null?void 0:a);else if(a!==null){let o=r.get(a);r.move(o,s),pB(o,n)}});for(let n=0,a=r.length;n{let a=r.get(n.currentIndex);pB(a,n)})}static ngTemplateContextGuard(e,r){return!0}static \u0275fac=function(r){return new(r||t)(be(Xi),be(Oi),be(Vl))};static \u0275dir=Ue({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return t})();function pB(t,i){t.context.$implicit=i.item}var oi=(()=>{class t{_viewContainer;_context=new rM;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(e,r){this._viewContainer=e,this._thenTemplateRef=r}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){gB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){gB("ngIfElse",e),this._elseTemplateRef=e,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 ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(e,r){return!0}static \u0275fac=function(r){return new(r||t)(be(Xi),be(Oi))};static \u0275dir=Ue({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return t})(),rM=class{$implicit=null;ngIf=null};function gB(t,i){if(!!!(!i||i.createEmbeddedView))throw new Error(`${t} must be a TemplateRef, but received '${ta(i)}'.`)}var DB=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(e,r,n){this._ngEl=e,this._differs=r,this._renderer=n}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,r){let[n,a]=e.split("."),s=n.indexOf("-")===-1?void 0:Fl.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,n,a?`${r}${a}`:r,s):this._renderer.removeStyle(this._ngEl.nativeElement,n,s)}_applyChanges(e){e.forEachRemovedItem(r=>this._setStyle(r.key,null)),e.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),e.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(r){return new(r||t)(be(Ze),be(vb),be(Ai))};static \u0275dir=Ue({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),Rb=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let n=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,n,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,r,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,n):!1,get:(e,r,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,n)}})}static \u0275fac=function(r){return new(r||t)(be(Xi))};static \u0275dir=Ue({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ei]})}return t})();function dm(t,i){return new et(2100,!1)}var sM=class{createSubscription(i,e){return Sa(()=>i.subscribe({next:e,error:r=>{throw r}}))}dispose(i){Sa(()=>i.unsubscribe())}},aM=class{createSubscription(i,e){return i.then(e,r=>{throw r})}dispose(i){}},doe=new aM,uoe=new sM,Pb=(()=>{class t{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,r=>this._updateLatestValue(e,r))}_selectStrategy(e){if(Rd(e))return doe;if(zD(e))return uoe;throw dm(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,r){e===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(r){return new(r||t)(be(Ut,16))};static \u0275pipe=Do({name:"async",type:t,pure:!1})}return t})();var hoe=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g,kb=(()=>{class t{transform(e){if(e==null)return null;if(typeof e!="string")throw dm(t,e);return e.replace(hoe,r=>r[0].toUpperCase()+r.slice(1).toLowerCase())}static \u0275fac=function(r){return new(r||t)};static \u0275pipe=Do({name:"titlecase",type:t,pure:!0})}return t})(),Fb=(()=>{class t{transform(e){if(e==null)return null;if(typeof e!="string")throw dm(t,e);return e.toUpperCase()}static \u0275fac=function(r){return new(r||t)};static \u0275pipe=Do({name:"uppercase",type:t,pure:!0})}return t})(),foe="mediumDate",moe=new Se(""),poe=new Se(""),Fs=(()=>{class t{locale;defaultTimezone;defaultOptions;constructor(e,r,n){this.locale=e,this.defaultTimezone=r,this.defaultOptions=n}transform(e,r,n,a){if(e==null||e===""||e!==e)return null;try{let s=r??this.defaultOptions?.dateFormat??foe,o=n??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return jae(e,s,a||this.locale,o)}catch(s){throw dm(t,s.message)}}static \u0275fac=function(r){return new(r||t)(be(lm,16),be(moe,24),be(poe,24))};static \u0275pipe=Do({name:"date",type:t,pure:!0})}return t})();function goe(t,i){return{key:t,value:i}}var MB=(()=>{class t{differs;constructor(e){this.differs=e}differ;keyValues=[];compareFn=vB;transform(e,r=vB){if(!e||!(e instanceof Map)&&typeof e!="object")return null;this.differ??=this.differs.find(e).create();let n=this.differ.diff(e),a=r!==this.compareFn;return n&&(this.keyValues=[],n.forEachItem(s=>{this.keyValues.push(goe(s.key,s.currentValue))})),(n||a)&&(r&&this.keyValues.sort(r),this.compareFn=r),this.keyValues}static \u0275fac=function(r){return new(r||t)(be(vb,16))};static \u0275pipe=Do({name:"keyvalue",type:t,pure:!1})}return t})();function vB(t,i){let e=t.key,r=i.key;if(e===r)return 0;if(e==null)return 1;if(r==null)return-1;if(typeof e=="string"&&typeof r=="string")return e{class t{_locale;constructor(e){this._locale=e}transform(e,r,n){if(!voe(e))return null;n||=this._locale;try{let a=yoe(e);return soe(a,n,r)}catch(a){throw dm(t,a.message)}}static \u0275fac=function(r){return new(r||t)(be(lm,16))};static \u0275pipe=Do({name:"number",type:t,pure:!0})}return t})();function voe(t){return!(t==null||t===""||t!==t)}function yoe(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new Error(`${t} is not a number`);return t}var IB=(()=>{class t{transform(e,r,n){if(e==null)return null;if(!this.supports(e))throw dm(t,e);return e.slice(r,n)}supports(e){return typeof e=="string"||Array.isArray(e)}static \u0275fac=function(r){return new(r||t)};static \u0275pipe=Do({name:"slice",type:t,pure:!1})}return t})();var RB=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({})}return t})(),uM="browser",xoe="server";function PB(t){return t===uM}function hM(t){return t===xoe}var kB=(()=>{class t{static \u0275prov=Fe({token:t,providedIn:"root",factory:()=>new oM(Q(St),window)})}return t})(),oM=class{document;window;offset=()=>[0,0];constructor(i,e){this.document=i,this.window=e}setOffset(i){Array.isArray(i)?this.offset=()=>i:this.offset=i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i){this.window.scrollTo(i[0],i[1])}scrollToAnchor(i){let e=boe(this.document,i);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(i){this.window.history.scrollRestoration=i}scrollToElement(i){let e=i.getBoundingClientRect(),r=e.left+this.window.pageXOffset,n=e.top+this.window.pageYOffset,a=this.offset();this.window.scrollTo(r-a[0],n-a[1])}};function boe(t,i){let e=t.getElementById(i)||t.getElementsByName(i)[0];if(e)return e;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let r=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),n=r.currentNode;for(;n;){let a=n.shadowRoot;if(a){let s=a.getElementById(i)||a.querySelector(`[name="${i}"]`);if(s)return s}n=r.nextNode()}}return null}var cm=class{};var p0=class{},Lb=class{},zl=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(i){i?typeof i=="string"?this.lazyInit=()=>{this.headers=new Map,i.split(` +`).forEach(e=>{let r=e.indexOf(":");if(r>0){let n=e.slice(0,r),a=e.slice(r+1).trim();this.addHeaderEntry(n,a)}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((e,r)=>{this.addHeaderEntry(r,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([e,r])=>{this.setHeaderEntries(e,r)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();let e=this.headers.get(i.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,e){return this.clone({name:i,value:e,op:"a"})}set(i,e){return this.clone({name:i,value:e,op:"s"})}delete(i,e){return this.clone({name:i,value:e,op:"d"})}maybeSetNormalizedName(i,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,i)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(e=>{this.headers.set(e,i.headers.get(e)),this.normalizedNames.set(e,i.normalizedNames.get(e))})}clone(i){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([i]),e}applyUpdate(i){let e=i.name.toLowerCase();switch(i.op){case"a":case"s":let r=i.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(i.name,e);let n=(i.op==="a"?this.headers.get(e):void 0)||[];n.push(...r),this.headers.set(e,n);break;case"d":let a=i.value;if(!a)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(o=>a.indexOf(o)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}addHeaderEntry(i,e){let r=i.toLowerCase();this.maybeSetNormalizedName(i,r),this.headers.has(r)?this.headers.get(r).push(e):this.headers.set(r,[e])}setHeaderEntries(i,e){let r=(Array.isArray(e)?e:[e]).map(a=>a.toString()),n=i.toLowerCase();this.headers.set(n,r),this.maybeSetNormalizedName(i,n)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>i(this.normalizedNames.get(e),this.headers.get(e)))}};var mM=class{encodeKey(i){return FB(i)}encodeValue(i){return FB(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}};function _oe(t,i){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(n=>{let a=n.indexOf("="),[s,o]=a==-1?[i.decodeKey(n),""]:[i.decodeKey(n.slice(0,a)),i.decodeValue(n.slice(a+1))],d=e.get(s)||[];d.push(o),e.set(s,d)}),e}var woe=/%(\d[a-f0-9])/gi,Coe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function FB(t){return encodeURIComponent(t).replace(woe,(i,e)=>Coe[e]??i)}function Ob(t){return`${t}`}var kd=class t{map;encoder;updates=null;cloneFrom=null;constructor(i={}){if(this.encoder=i.encoder||new mM,i.fromString){if(i.fromObject)throw new et(2805,!1);this.map=_oe(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(e=>{let r=i.fromObject[e],n=Array.isArray(r)?r.map(Ob):[Ob(r)];this.map.set(e,n)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();let e=this.map.get(i);return e?e[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,e){return this.clone({param:i,value:e,op:"a"})}appendAll(i){let e=[];return Object.keys(i).forEach(r=>{let n=i[r];Array.isArray(n)?n.forEach(a=>{e.push({param:r,value:a,op:"a"})}):e.push({param:r,value:n,op:"a"})}),this.clone(e)}set(i,e){return this.clone({param:i,value:e,op:"s"})}delete(i,e){return this.clone({param:i,value:e,op:"d"})}toString(){return this.init(),this.keys().map(i=>{let e=this.encoder.encodeKey(i);return this.map.get(i).map(r=>e+"="+this.encoder.encodeValue(r)).join("&")}).filter(i=>i!=="").join("&")}clone(i){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(i),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":let e=(i.op==="a"?this.map.get(i.param):void 0)||[];e.push(Ob(i.value)),this.map.set(i.param,e);break;case"d":if(i.value!==void 0){let r=this.map.get(i.param)||[],n=r.indexOf(Ob(i.value));n!==-1&&r.splice(n,1),r.length>0?this.map.set(i.param,r):this.map.delete(i.param)}else{this.map.delete(i.param);break}}}),this.cloneFrom=this.updates=null)}};var pM=class{map=new Map;set(i,e){return this.map.set(i,e),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}};function Toe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function OB(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function LB(t){return typeof Blob<"u"&&t instanceof Blob}function NB(t){return typeof FormData<"u"&&t instanceof FormData}function Soe(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var BB="Content-Type",VB="Accept",HB="X-Request-URL",jB="text/plain",WB="application/json",Eoe=`${WB}, ${jB}, */*`,m0=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(i,e,r,n){this.url=e,this.method=i.toUpperCase();let a;if(Toe(this.method)||n?(this.body=r!==void 0?r:null,a=n):a=r,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.context&&(this.context=a.context),a.params&&(this.params=a.params),this.transferCache=a.transferCache),this.headers??=new zl,this.context??=new pM,!this.params)this.params=new kd,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let o=e.indexOf("?"),d=o===-1?"?":ou.set(f,i.setHeaders[f]),l)),i.setParams&&(c=Object.keys(i.setParams).reduce((u,f)=>u.set(f,i.setParams[f]),c)),new t(e,r,s,{params:c,headers:l,context:h,reportProgress:d,responseType:n,withCredentials:o,transferCache:a})}},um=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(um||{}),g0=class{headers;status;statusText;url;ok;type;constructor(i,e=200,r="OK"){this.headers=i.headers||new zl,this.status=i.status!==void 0?i.status:e,this.statusText=i.statusText||r,this.url=i.url||null,this.ok=this.status>=200&&this.status<300}},gM=class t extends g0{constructor(i={}){super(i)}type=um.ResponseHeader;clone(i={}){return new t({headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}},Nb=class t extends g0{body;constructor(i={}){super(i),this.body=i.body!==void 0?i.body:null}type=um.Response;clone(i={}){return new t({body:i.body!==void 0?i.body:this.body,headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}},Bb=class extends g0{name="HttpErrorResponse";message;error;ok=!1;constructor(i){super(i,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${i.url||"(unknown url)"}`:this.message=`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}},Doe=200,Moe=204;function fM(t,i){return{body:i,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var nr=(()=>{class t{handler;constructor(e){this.handler=e}request(e,r,n={}){let a;if(e instanceof m0)a=e;else{let d;n.headers instanceof zl?d=n.headers:d=new zl(n.headers);let l;n.params&&(n.params instanceof kd?l=n.params:l=new kd({fromObject:n.params})),a=new m0(e,r,n.body!==void 0?n.body:null,{headers:d,context:n.context,params:l,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials,transferCache:n.transferCache})}let s=bt(a).pipe(_c(d=>this.handler.handle(d)));if(e instanceof m0||n.observe==="events")return s;let o=s.pipe(Xt(d=>d instanceof Nb));switch(n.observe||"body"){case"body":switch(a.responseType){case"arraybuffer":return o.pipe(mt(d=>{if(d.body!==null&&!(d.body instanceof ArrayBuffer))throw new et(2806,!1);return d.body}));case"blob":return o.pipe(mt(d=>{if(d.body!==null&&!(d.body instanceof Blob))throw new et(2807,!1);return d.body}));case"text":return o.pipe(mt(d=>{if(d.body!==null&&typeof d.body!="string")throw new et(2808,!1);return d.body}));case"json":default:return o.pipe(mt(d=>d.body))}case"response":return o;default:throw new et(2809,!1)}}delete(e,r={}){return this.request("DELETE",e,r)}get(e,r={}){return this.request("GET",e,r)}head(e,r={}){return this.request("HEAD",e,r)}jsonp(e,r){return this.request("JSONP",e,{params:new kd().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,r={}){return this.request("OPTIONS",e,r)}patch(e,r,n={}){return this.request("PATCH",e,fM(n,r))}post(e,r,n={}){return this.request("POST",e,fM(n,r))}put(e,r,n={}){return this.request("PUT",e,fM(n,r))}static \u0275fac=function(r){return new(r||t)(_t(p0))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})();var Aoe=new Se("");function XB(t,i){return i(t)}function Ioe(t,i){return(e,r)=>i.intercept(e,{handle:n=>t(n,r)})}function Roe(t,i,e){return(r,n)=>wa(e,()=>i(r,a=>t(a,n)))}var Poe=new Se(""),vM=new Se(""),koe=new Se(""),YB=new Se("",{providedIn:"root",factory:()=>!0});function Foe(){let t=null;return(i,e)=>{t===null&&(t=(Q(Poe,{optional:!0})??[]).reduceRight(Ioe,XB));let r=Q(Nl);if(Q(YB)){let a=r.add();return t(i,e).pipe(Dl(()=>r.remove(a)))}else return t(i,e)}}var UB=(()=>{class t extends p0{backend;injector;chain=null;pendingTasks=Q(Nl);contributeToStability=Q(YB);constructor(e,r){super(),this.backend=e,this.injector=r}handle(e){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(vM),...this.injector.get(koe,[])]));this.chain=r.reduceRight((n,a)=>Roe(n,a,this.injector),XB)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(e,n=>this.backend.handle(n)).pipe(Dl(()=>this.pendingTasks.remove(r)))}else return this.chain(e,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||t)(_t(Lb),_t(vr))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})();var Ooe=/^\)\]\}',?\n/,Loe=RegExp(`^${HB}:`,"m");function Noe(t){return"responseURL"in t&&t.responseURL?t.responseURL:Loe.test(t.getAllResponseHeaders())?t.getResponseHeader(HB):null}var zB=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new et(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?wn(r.\u0275loadImpl()):bt(null)).pipe(tn(()=>new $t(a=>{let s=r.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((m,g)=>s.setRequestHeader(m,g.join(","))),e.headers.has(VB)||s.setRequestHeader(VB,Eoe),!e.headers.has(BB)){let m=e.detectContentTypeHeader();m!==null&&s.setRequestHeader(BB,m)}if(e.responseType){let m=e.responseType.toLowerCase();s.responseType=m!=="json"?m:"text"}let o=e.serializeBody(),d=null,l=()=>{if(d!==null)return d;let m=s.statusText||"OK",g=new zl(s.getAllResponseHeaders()),v=Noe(s)||e.url;return d=new gM({headers:g,status:s.status,statusText:m,url:v}),d},c=()=>{let{headers:m,status:g,statusText:v,url:y}=l(),x=null;g!==Moe&&(x=typeof s.response>"u"?s.responseText:s.response),g===0&&(g=x?Doe:0);let b=g>=200&&g<300;if(e.responseType==="json"&&typeof x=="string"){let _=x;x=x.replace(Ooe,"");try{x=x!==""?JSON.parse(x):null}catch(C){x=_,b&&(b=!1,x={error:C,text:x})}}b?(a.next(new Nb({body:x,headers:m,status:g,statusText:v,url:y||void 0})),a.complete()):a.error(new Bb({error:x,headers:m,status:g,statusText:v,url:y||void 0}))},h=m=>{let{url:g}=l(),v=new Bb({error:m,status:s.status||0,statusText:s.statusText||"Unknown Error",url:g||void 0});a.error(v)},u=!1,f=m=>{u||(a.next(l()),u=!0);let g={type:um.DownloadProgress,loaded:m.loaded};m.lengthComputable&&(g.total=m.total),e.responseType==="text"&&s.responseText&&(g.partialText=s.responseText),a.next(g)},p=m=>{let g={type:um.UploadProgress,loaded:m.loaded};m.lengthComputable&&(g.total=m.total),a.next(g)};return s.addEventListener("load",c),s.addEventListener("error",h),s.addEventListener("timeout",h),s.addEventListener("abort",h),e.reportProgress&&(s.addEventListener("progress",f),o!==null&&s.upload&&s.upload.addEventListener("progress",p)),s.send(o),a.next({type:um.Sent}),()=>{s.removeEventListener("error",h),s.removeEventListener("abort",h),s.removeEventListener("load",c),s.removeEventListener("timeout",h),e.reportProgress&&(s.removeEventListener("progress",f),o!==null&&s.upload&&s.upload.removeEventListener("progress",p)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(r){return new(r||t)(_t(cm))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})(),$B=new Se(""),Boe="XSRF-TOKEN",Voe=new Se("",{providedIn:"root",factory:()=>Boe}),Uoe="X-XSRF-TOKEN",zoe=new Se("",{providedIn:"root",factory:()=>Uoe}),Vb=class{},Goe=(()=>{class t{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,r,n){this.doc=e,this.platform=r,this.cookieName=n}getToken(){if(this.platform==="server")return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Ib(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(r){return new(r||t)(_t(St),_t(Ac),_t(Voe))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})();function Hoe(t,i){let e=t.url.toLowerCase();if(!Q($B)||t.method==="GET"||t.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return i(t);let r=Q(Vb).getToken(),n=Q(zoe);return r!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,r)})),i(t)}var QB=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(QB||{});function joe(t,i){return{\u0275kind:t,\u0275providers:i}}function KB(...t){let i=[nr,zB,UB,{provide:p0,useExisting:UB},{provide:Lb,useFactory:()=>Q(Aoe,{optional:!0})??Q(zB)},{provide:vM,useValue:Hoe,multi:!0},{provide:$B,useValue:!0},{provide:Vb,useClass:Goe}];for(let e of t)i.push(...e.\u0275providers);return G1(i)}var GB=new Se("");function ZB(){return joe(QB.LegacyInterceptors,[{provide:GB,useFactory:Foe},{provide:vM,useExisting:GB,multi:!0}])}var xM=class extends Db{supportsDOMEvents=!0},bM=class t extends xM{static makeCurrent(){xB(new t)}onAndCancel(i,e,r,n){return i.addEventListener(e,r,n),()=>{i.removeEventListener(e,r,n)}}dispatchEvent(i,e){i.dispatchEvent(e)}remove(i){i.remove()}createElement(i,e){return e=e||this.getDefaultDocument(),e.createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,e){return e==="window"?window:e==="document"?i:e==="body"?i.body:null}getBaseHref(i){let e=Woe();return e==null?null:Xoe(e)}resetBaseElement(){v0=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return Ib(document.cookie,i)}},v0=null;function Woe(){return v0=v0||document.querySelector("base"),v0?v0.getAttribute("href"):null}function Xoe(t){return new URL(t,document.baseURI).pathname}var _M=class{addToWindow(i){fs.getAngularTestability=(r,n=!0)=>{let a=i.findTestabilityInTree(r,n);if(a==null)throw new et(5103,!1);return a},fs.getAllAngularTestabilities=()=>i.getAllTestabilities(),fs.getAllAngularRootElements=()=>i.getAllRootElements();let e=r=>{let n=fs.getAllAngularTestabilities(),a=n.length,s=function(){a--,a==0&&r()};n.forEach(o=>{o.whenStable(s)})};fs.frameworkStabilizers||(fs.frameworkStabilizers=[]),fs.frameworkStabilizers.push(e)}findTestabilityInTree(i,e,r){if(e==null)return null;let n=i.getTestability(e);return n??(r?Ul().isShadowRoot(e)?this.findTestabilityInTree(i,e.host,!0):this.findTestabilityInTree(i,e.parentElement,!0):null)}},Yoe=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})(),wM=new Se(""),i9=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(n=>{n.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,r,n,a){return this._findPluginFor(r).addEventListener(e,r,n,a)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(a=>a.supports(e)),!r)throw new et(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||t)(_t(wM),_t(dt))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})(),zb=class{_doc;constructor(i){this._doc=i}manager},Ub="ng-app-id";function JB(t){for(let i of t)i.remove()}function qB(t,i){let e=i.createElement("style");return e.textContent=t,e}function $oe(t,i,e,r){let n=t.head?.querySelectorAll(`style[${Ub}="${i}"],link[${Ub}="${i}"]`);if(n)for(let a of n)a.removeAttribute(Ub),a instanceof HTMLLinkElement?r.set(a.href.slice(a.href.lastIndexOf("/")+1),{usage:0,elements:[a]}):a.textContent&&e.set(a.textContent,{usage:0,elements:[a]})}function CM(t,i){let e=i.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var n9=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,r,n,a={}){this.doc=e,this.appId=r,this.nonce=n,this.isServer=hM(a),$oe(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let n of e)this.addUsage(n,this.inline,qB);r?.forEach(n=>this.addUsage(n,this.external,CM))}removeStyles(e,r){for(let n of e)this.removeUsage(n,this.inline);r?.forEach(n=>this.removeUsage(n,this.external))}addUsage(e,r,n){let a=r.get(e);a?a.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,n(e,this.doc)))})}removeUsage(e,r){let n=r.get(e);n&&(n.usage--,n.usage<=0&&(JB(n.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])JB(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:n}]of this.inline)n.push(this.addElement(e,qB(r,this.doc)));for(let[r,{elements:n}]of this.external)n.push(this.addElement(e,CM(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(Ub,this.appId),e.appendChild(r)}static \u0275fac=function(r){return new(r||t)(_t(St),_t(rm),_t(i0,8),_t(Ac))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})(),yM={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/Math/MathML"},SM=/%COMP%/g;var r9="%COMP%",Qoe=`_nghost-${r9}`,Koe=`_ngcontent-${r9}`,Zoe=!0,Joe=new Se("",{providedIn:"root",factory:()=>Zoe});function qoe(t){return Koe.replace(SM,t)}function ele(t){return Qoe.replace(SM,t)}function s9(t,i){return i.map(e=>e.replace(SM,t))}var Gb=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,r,n,a,s,o,d,l=null,c=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=n,this.removeStylesOnCompDestroy=a,this.doc=s,this.platformId=o,this.ngZone=d,this.nonce=l,this.tracingService=c,this.platformIsServer=hM(o),this.defaultRenderer=new y0(e,s,d,this.platformIsServer,this.tracingService)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===kl.ShadowDom&&(r=Mt(Me({},r),{encapsulation:kl.Emulated}));let n=this.getOrCreateRenderer(e,r);return n instanceof Hb?n.applyToHost(e):n instanceof x0&&n.applyStyles(),n}getOrCreateRenderer(e,r){let n=this.rendererByCompId,a=n.get(r.id);if(!a){let s=this.doc,o=this.ngZone,d=this.eventManager,l=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,h=this.platformIsServer,u=this.tracingService;switch(r.encapsulation){case kl.Emulated:a=new Hb(d,l,r,this.appId,c,s,o,h,u);break;case kl.ShadowDom:return new TM(d,l,e,r,s,o,this.nonce,h,u);default:a=new x0(d,l,r,c,s,o,h,u);break}n.set(r.id,a)}return a}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||t)(_t(i9),_t(n9),_t(rm),_t(Joe),_t(St),_t(Ac),_t(dt),_t(i0),_t(sm,8))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})(),y0=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(i,e,r,n,a){this.eventManager=i,this.doc=e,this.ngZone=r,this.platformIsServer=n,this.tracingService=a}destroy(){}destroyNode=null;createElement(i,e){return e?this.doc.createElementNS(yM[e]||e,i):this.doc.createElement(i)}createComment(i){return this.doc.createComment(i)}createText(i){return this.doc.createTextNode(i)}appendChild(i,e){(e9(i)?i.content:i).appendChild(e)}insertBefore(i,e,r){i&&(e9(i)?i.content:i).insertBefore(e,r)}removeChild(i,e){e.remove()}selectRootElement(i,e){let r=typeof i=="string"?this.doc.querySelector(i):i;if(!r)throw new et(-5104,!1);return e||(r.textContent=""),r}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,e,r,n){if(n){e=n+":"+e;let a=yM[n];a?i.setAttributeNS(a,e,r):i.setAttribute(e,r)}else i.setAttribute(e,r)}removeAttribute(i,e,r){if(r){let n=yM[r];n?i.removeAttributeNS(n,e):i.removeAttribute(`${r}:${e}`)}else i.removeAttribute(e)}addClass(i,e){i.classList.add(e)}removeClass(i,e){i.classList.remove(e)}setStyle(i,e,r,n){n&(Fl.DashCase|Fl.Important)?i.style.setProperty(e,r,n&Fl.Important?"important":""):i.style[e]=r}removeStyle(i,e,r){r&Fl.DashCase?i.style.removeProperty(e):i.style[e]=""}setProperty(i,e,r){i!=null&&(i[e]=r)}setValue(i,e){i.nodeValue=e}listen(i,e,r,n){if(typeof i=="string"&&(i=Ul().getGlobalEventTarget(this.doc,i),!i))throw new Error(`Unsupported event target ${i} for event ${e}`);let a=this.decoratePreventDefault(r);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(a=this.tracingService.wrapEventListener(i,e,a)),this.eventManager.addEventListener(i,e,a,n)}decoratePreventDefault(i){return e=>{if(e==="__ngUnwrap__")return i;(this.platformIsServer?this.ngZone.runGuarded(()=>i(e)):i(e))===!1&&e.preventDefault()}}};function e9(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var TM=class extends y0{sharedStylesHost;hostEl;shadowRoot;constructor(i,e,r,n,a,s,o,d,l){super(i,a,s,d,l),this.sharedStylesHost=e,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=s9(n.id,c);for(let u of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=u,this.shadowRoot.appendChild(f)}let h=n.getExternalStyles?.();if(h)for(let u of h){let f=CM(u,a);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(i){return i===this.hostEl?this.shadowRoot:i}appendChild(i,e){return super.appendChild(this.nodeOrShadowRoot(i),e)}insertBefore(i,e,r){return super.insertBefore(this.nodeOrShadowRoot(i),e,r)}removeChild(i,e){return super.removeChild(null,e)}parentNode(i){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(i)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},x0=class extends y0{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(i,e,r,n,a,s,o,d,l){super(i,a,s,o,d),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=n;let c=r.styles;this.styles=l?s9(l,c):c,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Hb=class extends x0{contentAttr;hostAttr;constructor(i,e,r,n,a,s,o,d,l){let c=n+"-"+r.id;super(i,e,r,a,s,o,d,l,c),this.contentAttr=qoe(c),this.hostAttr=ele(c)}applyToHost(i){this.applyStyles(),this.setAttribute(i,this.hostAttr,"")}createElement(i,e){let r=super.createElement(i,e);return super.setAttribute(r,this.contentAttr,""),r}},tle=(()=>{class t extends zb{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,n,a){return e.addEventListener(r,n,a),()=>this.removeEventListener(e,r,n,a)}removeEventListener(e,r,n,a){return e.removeEventListener(r,n,a)}static \u0275fac=function(r){return new(r||t)(_t(St))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})(),t9=["alt","control","meta","shift"],ile={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},nle={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},rle=(()=>{class t extends zb{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,r,n,a){let s=t.parseEventName(r),o=t.eventCallback(s.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ul().onAndCancel(e,s.domEventName,o,a))}static parseEventName(e){let r=e.toLowerCase().split("."),n=r.shift();if(r.length===0||!(n==="keydown"||n==="keyup"))return null;let a=t._normalizeKey(r.pop()),s="",o=r.indexOf("code");if(o>-1&&(r.splice(o,1),s="code."),t9.forEach(l=>{let c=r.indexOf(l);c>-1&&(r.splice(c,1),s+=l+".")}),s+=a,r.length!=0||a.length===0)return null;let d={};return d.domEventName=n,d.fullKey=s,d}static matchEventFullKeyCode(e,r){let n=ile[e.key]||e.key,a="";return r.indexOf("code.")>-1&&(n=e.code,a="code."),n==null||!n?!1:(n=n.toLowerCase(),n===" "?n="space":n==="."&&(n="dot"),t9.forEach(s=>{if(s!==n){let o=nle[s];o(e)&&(a+=s+".")}}),a+=n,a===r)}static eventCallback(e,r,n){return a=>{t.matchEventFullKeyCode(a,e)&&n.runGuarded(()=>r(a))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||t)(_t(St))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})();function sle(){bM.makeCurrent()}function ale(){return new ba}function ole(){return C5(document),document}var lle=[{provide:Ac,useValue:uM},{provide:mD,useValue:sle,multi:!0},{provide:St,useFactory:ole,deps:[]}],a9=KD(sB,"browser",lle);var cle=[{provide:c0,useClass:_M,deps:[]},{provide:VD,useClass:db,deps:[dt,ub,c0]},{provide:db,useClass:db,deps:[dt,ub,c0]}],dle=[{provide:H1,useValue:"root"},{provide:ba,useFactory:ale,deps:[]},{provide:wM,useClass:tle,multi:!0,deps:[St]},{provide:wM,useClass:rle,multi:!0,deps:[St]},Gb,n9,i9,{provide:Ps,useExisting:Gb},{provide:cm,useClass:Yoe,deps:[]},[]],jb=(()=>{class t{constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[...dle,...cle],imports:[RB,aB]})}return t})();var o9=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||t)(_t(St))};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var EM=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:function(r){let n=null;return r?n=new(r||t):n=_t(ule),n},providedIn:"root"})}return t})(),ule=(()=>{class t extends EM{_doc;constructor(e){super(),this._doc=e}sanitize(e,r){if(r==null)return null;switch(e){case vs.NONE:return r;case vs.HTML:return Ic(r,"HTML")?Eo(r):vD(this._doc,String(r)).toString();case vs.STYLE:return Ic(r,"Style")?Eo(r):r;case vs.SCRIPT:if(Ic(r,"Script"))return Eo(r);throw new et(5200,!1);case vs.URL:return Ic(r,"URL")?Eo(r):nb(String(r));case vs.RESOURCE_URL:if(Ic(r,"ResourceURL"))return Eo(r);throw new et(5201,!1);default:throw new et(5202,!1)}}bypassSecurityTrustHtml(e){return R5(e)}bypassSecurityTrustStyle(e){return P5(e)}bypassSecurityTrustScript(e){return k5(e)}bypassSecurityTrustUrl(e){return F5(e)}bypassSecurityTrustResourceUrl(e){return O5(e)}static \u0275fac=function(r){return new(r||t)(_t(St))};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var _i="primary",P0=Symbol("RouteTitle"),PM=class{params;constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e[0]:e}return null}getAll(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function vm(t){return new PM(t)}function hle(t,i,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(i.hasChildren()||r.lengthr[a]===n)}else return t===i}function y9(t){return t.length>0?t[t.length-1]:null}function Od(t){return bd(t)?t:Rd(t)?wn(Promise.resolve(t)):bt(t)}var mle={exact:b9,subset:_9},x9={exact:ple,subset:gle,ignored:()=>!0};function l9(t,i,e){return mle[e.paths](t.root,i.root,e.matrixParams)&&x9[e.queryParams](t.queryParams,i.queryParams)&&!(e.fragment==="exact"&&t.fragment!==i.fragment)}function ple(t,i){return Gl(t,i)}function b9(t,i,e){if(!uh(t.segments,i.segments)||!Yb(t.segments,i.segments,e)||t.numberOfChildren!==i.numberOfChildren)return!1;for(let r in i.children)if(!t.children[r]||!b9(t.children[r],i.children[r],e))return!1;return!0}function gle(t,i){return Object.keys(i).length<=Object.keys(t).length&&Object.keys(i).every(e=>v9(t[e],i[e]))}function _9(t,i,e){return w9(t,i,i.segments,e)}function w9(t,i,e,r){if(t.segments.length>e.length){let n=t.segments.slice(0,e.length);return!(!uh(n,e)||i.hasChildren()||!Yb(n,e,r))}else if(t.segments.length===e.length){if(!uh(t.segments,e)||!Yb(t.segments,e,r))return!1;for(let n in i.children)if(!t.children[n]||!_9(t.children[n],i.children[n],r))return!1;return!0}else{let n=e.slice(0,t.segments.length),a=e.slice(t.segments.length);return!uh(t.segments,n)||!Yb(t.segments,n,r)||!t.children[_i]?!1:w9(t.children[_i],i,a,r)}}function Yb(t,i,e){return i.every((r,n)=>x9[e](t[n].parameters,r.parameters))}var Bc=class{root;queryParams;fragment;_queryParamMap;constructor(i=new an([],{}),e={},r=null){this.root=i,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=vm(this.queryParams),this._queryParamMap}toString(){return xle.serialize(this)}},an=class{segments;children;parent=null;constructor(i,e){this.segments=i,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return $b(this)}},dh=class{path;parameters;_parameterMap;constructor(i,e){this.path=i,this.parameters=e}get parameterMap(){return this._parameterMap??=vm(this.parameters),this._parameterMap}toString(){return T9(this)}};function vle(t,i){return uh(t,i)&&t.every((e,r)=>Gl(e.parameters,i[r].parameters))}function uh(t,i){return t.length!==i.length?!1:t.every((e,r)=>e.path===i[r].path)}function yle(t,i){let e=[];return Object.entries(t.children).forEach(([r,n])=>{r===_i&&(e=e.concat(i(n,r)))}),Object.entries(t.children).forEach(([r,n])=>{r!==_i&&(e=e.concat(i(n,r)))}),e}var k0=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:()=>new ym,providedIn:"root"})}return t})(),ym=class{parse(i){let e=new OM(i);return new Bc(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(i){let e=`/${b0(i.root,!0)}`,r=wle(i.queryParams),n=typeof i.fragment=="string"?`#${ble(i.fragment)}`:"";return`${e}${r}${n}`}},xle=new ym;function $b(t){return t.segments.map(i=>T9(i)).join("/")}function b0(t,i){if(!t.hasChildren())return $b(t);if(i){let e=t.children[_i]?b0(t.children[_i],!1):"",r=[];return Object.entries(t.children).forEach(([n,a])=>{n!==_i&&r.push(`${n}:${b0(a,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=yle(t,(r,n)=>n===_i?[b0(t.children[_i],!1)]:[`${n}:${b0(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[_i]!=null?`${$b(t)}/${e[0]}`:`${$b(t)}/(${e.join("//")})`}}function C9(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Wb(t){return C9(t).replace(/%3B/gi,";")}function ble(t){return encodeURI(t)}function FM(t){return C9(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Qb(t){return decodeURIComponent(t)}function c9(t){return Qb(t.replace(/\+/g,"%20"))}function T9(t){return`${FM(t.path)}${_le(t.parameters)}`}function _le(t){return Object.entries(t).map(([i,e])=>`;${FM(i)}=${FM(e)}`).join("")}function wle(t){let i=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(n=>`${Wb(e)}=${Wb(n)}`).join("&"):`${Wb(e)}=${Wb(r)}`).filter(e=>e);return i.length?`?${i.join("&")}`:""}var Cle=/^[^\/()?;#]+/;function MM(t){let i=t.match(Cle);return i?i[0]:""}var Tle=/^[^\/()?;=#]+/;function Sle(t){let i=t.match(Tle);return i?i[0]:""}var Ele=/^[^=?&#]+/;function Dle(t){let i=t.match(Ele);return i?i[0]:""}var Mle=/^[^&#]+/;function Ale(t){let i=t.match(Mle);return i?i[0]:""}var OM=class{url;remaining;constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new an([],{}):new an([],this.parseChildren())}parseQueryParams(){let i={};if(this.consumeOptional("?"))do this.parseQueryParam(i);while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let i=[];for(this.peekStartsWith("(")||i.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),i.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(i.length>0||Object.keys(e).length>0)&&(r[_i]=new an(i,e)),r}parseSegment(){let i=MM(this.remaining);if(i===""&&this.peekStartsWith(";"))throw new et(4009,!1);return this.capture(i),new dh(Qb(i),this.parseMatrixParams())}parseMatrixParams(){let i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){let e=Sle(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let n=MM(this.remaining);n&&(r=n,this.capture(r))}i[Qb(e)]=Qb(r)}parseQueryParam(i){let e=Dle(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Ale(this.remaining);s&&(r=s,this.capture(r))}let n=c9(e),a=c9(r);if(i.hasOwnProperty(n)){let s=i[n];Array.isArray(s)||(s=[s],i[n]=s),s.push(a)}else i[n]=a}parseParens(i){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=MM(this.remaining),n=this.remaining[r.length];if(n!=="/"&&n!==")"&&n!==";")throw new et(4010,!1);let a;r.indexOf(":")>-1?(a=r.slice(0,r.indexOf(":")),this.capture(a),this.capture(":")):i&&(a=_i);let s=this.parseChildren();e[a]=Object.keys(s).length===1?s[_i]:new an([],s),this.consumeOptional("//")}return e}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return this.peekStartsWith(i)?(this.remaining=this.remaining.substring(i.length),!0):!1}capture(i){if(!this.consumeOptional(i))throw new et(4011,!1)}};function S9(t){return t.segments.length>0?new an([],{[_i]:t}):t}function E9(t){let i={};for(let[r,n]of Object.entries(t.children)){let a=E9(n);if(r===_i&&a.segments.length===0&&a.hasChildren())for(let[s,o]of Object.entries(a.children))i[s]=o;else(a.segments.length>0||a.hasChildren())&&(i[r]=a)}let e=new an(t.segments,i);return Ile(e)}function Ile(t){if(t.numberOfChildren===1&&t.children[_i]){let i=t.children[_i];return new an(t.segments.concat(i.segments),i.children)}return t}function hh(t){return t instanceof Bc}function Rle(t,i,e=null,r=null){let n=D9(t);return M9(n,i,e,r)}function D9(t){let i;function e(a){let s={};for(let d of a.children){let l=e(d);s[d.outlet]=l}let o=new an(a.url,s);return a===t&&(i=o),o}let r=e(t.root),n=S9(r);return i??n}function M9(t,i,e,r){let n=t;for(;n.parent;)n=n.parent;if(i.length===0)return AM(n,n,n,e,r);let a=Ple(i);if(a.toRoot())return AM(n,n,new an([],{}),e,r);let s=kle(a,n,t),o=s.processChildren?w0(s.segmentGroup,s.index,a.commands):I9(s.segmentGroup,s.index,a.commands);return AM(n,s.segmentGroup,o,e,r)}function Kb(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function S0(t){return typeof t=="object"&&t!=null&&t.outlets}function AM(t,i,e,r,n){let a={};r&&Object.entries(r).forEach(([d,l])=>{a[d]=Array.isArray(l)?l.map(c=>`${c}`):`${l}`});let s;t===i?s=e:s=A9(t,i,e);let o=S9(E9(s));return new Bc(o,a,n)}function A9(t,i,e){let r={};return Object.entries(t.children).forEach(([n,a])=>{a===i?r[n]=e:r[n]=A9(a,i,e)}),new an(t.segments,r)}var Zb=class{isAbsolute;numberOfDoubleDots;commands;constructor(i,e,r){if(this.isAbsolute=i,this.numberOfDoubleDots=e,this.commands=r,i&&r.length>0&&Kb(r[0]))throw new et(4003,!1);let n=r.find(S0);if(n&&n!==y9(r))throw new et(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Ple(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new Zb(!0,0,t);let i=0,e=!1,r=t.reduce((n,a,s)=>{if(typeof a=="object"&&a!=null){if(a.outlets){let o={};return Object.entries(a.outlets).forEach(([d,l])=>{o[d]=typeof l=="string"?l.split("/"):l}),[...n,{outlets:o}]}if(a.segmentPath)return[...n,a.segmentPath]}return typeof a!="string"?[...n,a]:s===0?(a.split("/").forEach((o,d)=>{d==0&&o==="."||(d==0&&o===""?e=!0:o===".."?i++:o!=""&&n.push(o))}),n):[...n,a]},[]);return new Zb(e,i,r)}var mm=class{segmentGroup;processChildren;index;constructor(i,e,r){this.segmentGroup=i,this.processChildren=e,this.index=r}};function kle(t,i,e){if(t.isAbsolute)return new mm(i,!0,0);if(!e)return new mm(i,!1,NaN);if(e.parent===null)return new mm(e,!0,0);let r=Kb(t.commands[0])?0:1,n=e.segments.length-1+r;return Fle(e,n,t.numberOfDoubleDots)}function Fle(t,i,e){let r=t,n=i,a=e;for(;a>n;){if(a-=n,r=r.parent,!r)throw new et(4005,!1);n=r.segments.length}return new mm(r,!1,n-a)}function Ole(t){return S0(t[0])?t[0].outlets:{[_i]:t}}function I9(t,i,e){if(t??=new an([],{}),t.segments.length===0&&t.hasChildren())return w0(t,i,e);let r=Lle(t,i,e),n=e.slice(r.commandIndex);if(r.match&&r.pathIndexa!==_i)&&t.children[_i]&&t.numberOfChildren===1&&t.children[_i].segments.length===0){let a=w0(t.children[_i],i,e);return new an(t.segments,a.children)}return Object.entries(r).forEach(([a,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(n[a]=I9(t.children[a],i,s))}),Object.entries(t.children).forEach(([a,s])=>{r[a]===void 0&&(n[a]=s)}),new an(t.segments,n)}}function Lle(t,i,e){let r=0,n=i,a={match:!1,pathIndex:0,commandIndex:0};for(;n=e.length)return a;let s=t.segments[n],o=e[r];if(S0(o))break;let d=`${o}`,l=r0&&d===void 0)break;if(d&&l&&typeof l=="object"&&l.outlets===void 0){if(!u9(d,l,s))return a;r+=2}else{if(!u9(d,{},s))return a;r++}n++}return{match:!0,pathIndex:n,commandIndex:r}}function LM(t,i,e){let r=t.segments.slice(0,i),n=0;for(;n{typeof r=="string"&&(r=[r]),r!==null&&(i[e]=LM(new an([],{}),0,r))}),i}function d9(t){let i={};return Object.entries(t).forEach(([e,r])=>i[e]=`${r}`),i}function u9(t,i,e){return t==e.path&&Gl(i,e.parameters)}var C0="imperative",ts=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(ts||{}),Ao=class{id;url;constructor(i,e){this.id=i,this.url=e}},xm=class extends Ao{type=ts.NavigationStart;navigationTrigger;restoredState;constructor(i,e,r="imperative",n=null){super(i,e),this.navigationTrigger=r,this.restoredState=n}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Io=class extends Ao{urlAfterRedirects;type=ts.NavigationEnd;constructor(i,e,r){super(i,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},ao=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(ao||{}),Jb=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(Jb||{}),Nc=class extends Ao{reason;code;type=ts.NavigationCancel;constructor(i,e,r,n){super(i,e),this.reason=r,this.code=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Fd=class extends Ao{reason;code;type=ts.NavigationSkipped;constructor(i,e,r,n){super(i,e),this.reason=r,this.code=n}},E0=class extends Ao{error;target;type=ts.NavigationError;constructor(i,e,r,n){super(i,e),this.error=r,this.target=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},qb=class extends Ao{urlAfterRedirects;state;type=ts.RoutesRecognized;constructor(i,e,r,n){super(i,e),this.urlAfterRedirects=r,this.state=n}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},NM=class extends Ao{urlAfterRedirects;state;type=ts.GuardsCheckStart;constructor(i,e,r,n){super(i,e),this.urlAfterRedirects=r,this.state=n}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},BM=class extends Ao{urlAfterRedirects;state;shouldActivate;type=ts.GuardsCheckEnd;constructor(i,e,r,n,a){super(i,e),this.urlAfterRedirects=r,this.state=n,this.shouldActivate=a}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},VM=class extends Ao{urlAfterRedirects;state;type=ts.ResolveStart;constructor(i,e,r,n){super(i,e),this.urlAfterRedirects=r,this.state=n}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},UM=class extends Ao{urlAfterRedirects;state;type=ts.ResolveEnd;constructor(i,e,r,n){super(i,e),this.urlAfterRedirects=r,this.state=n}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},zM=class{route;type=ts.RouteConfigLoadStart;constructor(i){this.route=i}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},GM=class{route;type=ts.RouteConfigLoadEnd;constructor(i){this.route=i}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},HM=class{snapshot;type=ts.ChildActivationStart;constructor(i){this.snapshot=i}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},jM=class{snapshot;type=ts.ChildActivationEnd;constructor(i){this.snapshot=i}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},WM=class{snapshot;type=ts.ActivationStart;constructor(i){this.snapshot=i}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},XM=class{snapshot;type=ts.ActivationEnd;constructor(i){this.snapshot=i}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},e_=class{routerEvent;position;anchor;type=ts.Scroll;constructor(i,e,r){this.routerEvent=i,this.position=e,this.anchor=r}toString(){let i=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${i}')`}},D0=class{},bm=class{url;navigationBehaviorOptions;constructor(i,e){this.url=i,this.navigationBehaviorOptions=e}};function Ble(t,i){return t.providers&&!t._injector&&(t._injector=lb(t.providers,i,`Route: ${t.path}`)),t._injector??i}function rl(t){return t.outlet||_i}function Vle(t,i){let e=t.filter(r=>rl(r)===i);return e.push(...t.filter(r=>rl(r)!==i)),e}function F0(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let i=t.parent;i;i=i.parent){let e=i.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var YM=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return F0(this.route?.snapshot)??this.rootInjector}constructor(i){this.rootInjector=i,this.children=new O0(this.rootInjector)}},O0=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let n=this.getOrCreateContext(e);n.outlet=r,this.contexts.set(e,n)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new YM(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(_t(vr))};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),t_=class{_root;constructor(i){this._root=i}get root(){return this._root.value}parent(i){let e=this.pathFromRoot(i);return e.length>1?e[e.length-2]:null}children(i){let e=$M(i,this._root);return e?e.children.map(r=>r.value):[]}firstChild(i){let e=$M(i,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(i){let e=QM(i,this._root);return e.length<2?[]:e[e.length-2].children.map(n=>n.value).filter(n=>n!==i)}pathFromRoot(i){return QM(i,this._root).map(e=>e.value)}};function $M(t,i){if(t===i.value)return i;for(let e of i.children){let r=$M(t,e);if(r)return r}return null}function QM(t,i){if(t===i.value)return[i];for(let e of i.children){let r=QM(t,e);if(r.length)return r.unshift(i),r}return[]}var so=class{value;children;constructor(i,e){this.value=i,this.children=e}toString(){return`TreeNode(${this.value})`}};function fm(t){let i={};return t&&t.children.forEach(e=>i[e.value.outlet]=e),i}var i_=class extends t_{snapshot;constructor(i,e){super(i),this.snapshot=e,rA(this,i)}toString(){return this.snapshot.toString()}};function R9(t){let i=Ule(t),e=new Ci([new dh("",{})]),r=new Ci({}),n=new Ci({}),a=new Ci({}),s=new Ci(""),o=new jr(e,r,a,s,n,_i,t,i.root);return o.snapshot=i.root,new i_(new so(o,[]),i)}function Ule(t){let i={},e={},r={},n="",a=new pm([],i,r,n,e,_i,t,null,{});return new r_("",new so(a,[]))}var jr=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(i,e,r,n,a,s,o,d){this.urlSubject=i,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=n,this.dataSubject=a,this.outlet=s,this.component=o,this._futureSnapshot=d,this.title=this.dataSubject?.pipe(mt(l=>l[P0]))??bt(void 0),this.url=i,this.params=e,this.queryParams=r,this.fragment=n,this.data=a}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.params.pipe(mt(i=>vm(i))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(mt(i=>vm(i))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function n_(t,i,e="emptyOnly"){let r,{routeConfig:n}=t;return i!==null&&(e==="always"||n?.path===""||!i.component&&!i.routeConfig?.loadComponent)?r={params:Me(Me({},i.params),t.params),data:Me(Me({},i.data),t.data),resolve:Me(Me(Me(Me({},t.data),i.data),n?.data),t._resolvedData)}:r={params:Me({},t.params),data:Me({},t.data),resolve:Me(Me({},t.data),t._resolvedData??{})},n&&k9(n)&&(r.resolve[P0]=n.title),r}var pm=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[P0]}constructor(i,e,r,n,a,s,o,d,l){this.url=i,this.params=e,this.queryParams=r,this.fragment=n,this.data=a,this.outlet=s,this.component=o,this.routeConfig=d,this._resolve=l}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??=vm(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=vm(this.queryParams),this._queryParamMap}toString(){let i=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${i}', path:'${e}')`}},r_=class extends t_{url;constructor(i,e){super(e),this.url=i,rA(this,e)}toString(){return P9(this._root)}};function rA(t,i){i.value._routerState=t,i.children.forEach(e=>rA(t,e))}function P9(t){let i=t.children.length>0?` { ${t.children.map(P9).join(", ")} } `:"";return`${t.value}${i}`}function IM(t){if(t.snapshot){let i=t.snapshot,e=t._futureSnapshot;t.snapshot=e,Gl(i.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),i.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),Gl(i.params,e.params)||t.paramsSubject.next(e.params),fle(i.url,e.url)||t.urlSubject.next(e.url),Gl(i.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function KM(t,i){let e=Gl(t.params,i.params)&&vle(t.url,i.url),r=!t.parent!=!i.parent;return e&&!r&&(!t.parent||KM(t.parent,i.parent))}function k9(t){return typeof t.title=="string"||t.title===null}var zle=new Se(""),sA=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=_i;activateEvents=new Le;deactivateEvents=new Le;attachEvents=new Le;detachEvents=new Le;routerOutletData=m5(void 0);parentContexts=Q(O0);location=Q(Xi);changeDetector=Q(Ut);inputBinder=Q(c_,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:n}=e.name;if(r)return;this.isTrackedInParentContexts(n)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(n)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new et(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new et(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new et(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new et(4013,!1);this._activatedRoute=e;let n=this.location,s=e.snapshot.component,o=this.parentContexts.getOrCreateContext(this.name).children,d=new ZM(e,o,n.injector,this.routerOutletData);this.activated=n.createComponent(s,{index:n.length,injector:d,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[ei]})}return t})(),ZM=class t{route;childContexts;parent;outletData;__ngOutletInjector(i){return new t(this.route,this.childContexts,i,this.outletData)}constructor(i,e,r,n){this.route=i,this.childContexts=e,this.parent=r,this.outletData=n}get(i,e){return i===jr?this.route:i===O0?this.childContexts:i===zle?this.outletData:this.parent.get(i,e)}},c_=new Se(""),h9=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,n=Js([r.queryParams,r.params,r.data]).pipe(tn(([a,s,o],d)=>(o=Me(Me(Me({},a),s),o),d===0?bt(o):Promise.resolve(o)))).subscribe(a=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=cB(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:o}of s.inputs)e.activatedComponentRef.setInput(o,a[o])});this.outletDataSubscriptions.set(e,n)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})();function Gle(t,i,e){let r=M0(t,i._root,e?e._root:void 0);return new i_(r,i)}function M0(t,i,e){if(e&&t.shouldReuseRoute(i.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=i.value;let n=Hle(t,i,e);return new so(r,n)}else{if(t.shouldAttach(i.value)){let a=t.retrieve(i.value);if(a!==null){let s=a.route;return s.value._futureSnapshot=i.value,s.children=i.children.map(o=>M0(t,o)),s}}let r=jle(i.value),n=i.children.map(a=>M0(t,a));return new so(r,n)}}function Hle(t,i,e){return i.children.map(r=>{for(let n of e.children)if(t.shouldReuseRoute(r.value,n.value.snapshot))return M0(t,r,n);return M0(t,r)})}function jle(t){return new jr(new Ci(t.url),new Ci(t.params),new Ci(t.queryParams),new Ci(t.fragment),new Ci(t.data),t.outlet,t.component,t)}var A0=class{redirectTo;navigationBehaviorOptions;constructor(i,e){this.redirectTo=i,this.navigationBehaviorOptions=e}},F9="ngNavigationCancelingError";function s_(t,i){let{redirectTo:e,navigationBehaviorOptions:r}=hh(i)?{redirectTo:i,navigationBehaviorOptions:void 0}:i,n=O9(!1,ao.Redirect);return n.url=e,n.navigationBehaviorOptions=r,n}function O9(t,i){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[F9]=!0,e.cancellationCode=i,e}function Wle(t){return L9(t)&&hh(t.url)}function L9(t){return!!t&&t[F9]}var Xle=(t,i,e,r)=>mt(n=>(new JM(i,n.targetRouterState,n.currentRouterState,e,r).activate(t),n)),JM=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(i,e,r,n,a){this.routeReuseStrategy=i,this.futureState=e,this.currState=r,this.forwardEvent=n,this.inputBindingEnabled=a}activate(i){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,i),IM(this.futureState.root),this.activateChildRoutes(e,r,i)}deactivateChildRoutes(i,e,r){let n=fm(e);i.children.forEach(a=>{let s=a.value.outlet;this.deactivateRoutes(a,n[s],r),delete n[s]}),Object.values(n).forEach(a=>{this.deactivateRouteAndItsChildren(a,r)})}deactivateRoutes(i,e,r){let n=i.value,a=e?e.value:null;if(n===a)if(n.component){let s=r.getContext(n.outlet);s&&this.deactivateChildRoutes(i,e,s.children)}else this.deactivateChildRoutes(i,e,r);else a&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(i,e){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,e):this.deactivateRouteAndOutlet(i,e)}detachAndStoreRouteSubtree(i,e){let r=e.getContext(i.value.outlet),n=r&&i.value.component?r.children:e,a=fm(i);for(let s of Object.values(a))this.deactivateRouteAndItsChildren(s,n);if(r&&r.outlet){let s=r.outlet.detach(),o=r.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:s,route:i,contexts:o})}}deactivateRouteAndOutlet(i,e){let r=e.getContext(i.value.outlet),n=r&&i.value.component?r.children:e,a=fm(i);for(let s of Object.values(a))this.deactivateRouteAndItsChildren(s,n);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(i,e,r){let n=fm(e);i.children.forEach(a=>{this.activateRoutes(a,n[a.value.outlet],r),this.forwardEvent(new XM(a.value.snapshot))}),i.children.length&&this.forwardEvent(new jM(i.value.snapshot))}activateRoutes(i,e,r){let n=i.value,a=e?e.value:null;if(IM(n),n===a)if(n.component){let s=r.getOrCreateContext(n.outlet);this.activateChildRoutes(i,e,s.children)}else this.activateChildRoutes(i,e,r);else if(n.component){let s=r.getOrCreateContext(n.outlet);if(this.routeReuseStrategy.shouldAttach(n.snapshot)){let o=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),s.children.onOutletReAttached(o.contexts),s.attachRef=o.componentRef,s.route=o.route.value,s.outlet&&s.outlet.attach(o.componentRef,o.route.value),IM(o.route.value),this.activateChildRoutes(i,null,s.children)}else s.attachRef=null,s.route=n,s.outlet&&s.outlet.activateWith(n,s.injector),this.activateChildRoutes(i,null,s.children)}else this.activateChildRoutes(i,null,r)}},a_=class{path;route;constructor(i){this.path=i,this.route=this.path[this.path.length-1]}},gm=class{component;route;constructor(i,e){this.component=i,this.route=e}};function Yle(t,i,e){let r=t._root,n=i?i._root:null;return _0(r,n,e,[r.value])}function $le(t){let i=t.routeConfig?t.routeConfig.canActivateChild:null;return!i||i.length===0?null:{node:t,guards:i}}function wm(t,i){let e=Symbol(),r=i.get(t,e);return r===e?typeof t=="function"&&!hN(t)?t:i.get(t):r}function _0(t,i,e,r,n={canDeactivateChecks:[],canActivateChecks:[]}){let a=fm(i);return t.children.forEach(s=>{Qle(s,a[s.value.outlet],e,r.concat([s.value]),n),delete a[s.value.outlet]}),Object.entries(a).forEach(([s,o])=>T0(o,e.getContext(s),n)),n}function Qle(t,i,e,r,n={canDeactivateChecks:[],canActivateChecks:[]}){let a=t.value,s=i?i.value:null,o=e?e.getContext(t.value.outlet):null;if(s&&a.routeConfig===s.routeConfig){let d=Kle(s,a,a.routeConfig.runGuardsAndResolvers);d?n.canActivateChecks.push(new a_(r)):(a.data=s.data,a._resolvedData=s._resolvedData),a.component?_0(t,i,o?o.children:null,r,n):_0(t,i,e,r,n),d&&o&&o.outlet&&o.outlet.isActivated&&n.canDeactivateChecks.push(new gm(o.outlet.component,s))}else s&&T0(i,o,n),n.canActivateChecks.push(new a_(r)),a.component?_0(t,null,o?o.children:null,r,n):_0(t,null,e,r,n);return n}function Kle(t,i,e){if(typeof e=="function")return e(t,i);switch(e){case"pathParamsChange":return!uh(t.url,i.url);case"pathParamsOrQueryParamsChange":return!uh(t.url,i.url)||!Gl(t.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!KM(t,i)||!Gl(t.queryParams,i.queryParams);case"paramsChange":default:return!KM(t,i)}}function T0(t,i,e){let r=fm(t),n=t.value;Object.entries(r).forEach(([a,s])=>{n.component?i?T0(s,i.children.getContext(a),e):T0(s,null,e):T0(s,i,e)}),n.component?i&&i.outlet&&i.outlet.isActivated?e.canDeactivateChecks.push(new gm(i.outlet.component,n)):e.canDeactivateChecks.push(new gm(null,n)):e.canDeactivateChecks.push(new gm(null,n))}function L0(t){return typeof t=="function"}function Zle(t){return typeof t=="boolean"}function Jle(t){return t&&L0(t.canLoad)}function qle(t){return t&&L0(t.canActivate)}function ece(t){return t&&L0(t.canActivateChild)}function tce(t){return t&&L0(t.canDeactivate)}function ice(t){return t&&L0(t.canMatch)}function N9(t){return t instanceof Za||t?.name==="EmptyError"}var Xb=Symbol("INITIAL_VALUE");function _m(){return tn(t=>Js(t.map(i=>i.pipe(Vi(1),Wi(Xb)))).pipe(mt(i=>{for(let e of i)if(e!==!0){if(e===Xb)return Xb;if(e===!1||nce(e))return e}return!0}),Xt(i=>i!==Xb),Vi(1)))}function nce(t){return hh(t)||t instanceof A0}function rce(t,i){return Jn(e=>{let{targetSnapshot:r,currentSnapshot:n,guards:{canActivateChecks:a,canDeactivateChecks:s}}=e;return s.length===0&&a.length===0?bt(Mt(Me({},e),{guardsResult:!0})):sce(s,r,n,t).pipe(Jn(o=>o&&Zle(o)?ace(r,a,t,i):bt(o)),mt(o=>Mt(Me({},e),{guardsResult:o})))})}function sce(t,i,e,r){return wn(t).pipe(Jn(n=>uce(n.component,n.route,e,i,r)),Jr(n=>n!==!0,!0))}function ace(t,i,e,r){return wn(i).pipe(_c(n=>El(lce(n.route.parent,r),oce(n.route,r),dce(t,n.path,e),cce(t,n.route,e))),Jr(n=>n!==!0,!0))}function oce(t,i){return t!==null&&i&&i(new WM(t)),bt(!0)}function lce(t,i){return t!==null&&i&&i(new HM(t)),bt(!0)}function cce(t,i,e){let r=i.routeConfig?i.routeConfig.canActivate:null;if(!r||r.length===0)return bt(!0);let n=r.map(a=>Co(()=>{let s=F0(i)??e,o=wm(a,s),d=qle(o)?o.canActivate(i,t):wa(s,()=>o(i,t));return Od(d).pipe(Jr())}));return bt(n).pipe(_m())}function dce(t,i,e){let r=i[i.length-1],a=i.slice(0,i.length-1).reverse().map(s=>$le(s)).filter(s=>s!==null).map(s=>Co(()=>{let o=s.guards.map(d=>{let l=F0(s.node)??e,c=wm(d,l),h=ece(c)?c.canActivateChild(r,t):wa(l,()=>c(r,t));return Od(h).pipe(Jr())});return bt(o).pipe(_m())}));return bt(a).pipe(_m())}function uce(t,i,e,r,n){let a=i&&i.routeConfig?i.routeConfig.canDeactivate:null;if(!a||a.length===0)return bt(!0);let s=a.map(o=>{let d=F0(i)??n,l=wm(o,d),c=tce(l)?l.canDeactivate(t,i,e,r):wa(d,()=>l(t,i,e,r));return Od(c).pipe(Jr())});return bt(s).pipe(_m())}function hce(t,i,e,r){let n=i.canLoad;if(n===void 0||n.length===0)return bt(!0);let a=n.map(s=>{let o=wm(s,t),d=Jle(o)?o.canLoad(i,e):wa(t,()=>o(i,e));return Od(d)});return bt(a).pipe(_m(),B9(r))}function B9(t){return mE(Ui(i=>{if(typeof i!="boolean")throw s_(t,i)}),mt(i=>i===!0))}function fce(t,i,e,r){let n=i.canMatch;if(!n||n.length===0)return bt(!0);let a=n.map(s=>{let o=wm(s,t),d=ice(o)?o.canMatch(i,e):wa(t,()=>o(i,e));return Od(d)});return bt(a).pipe(_m(),B9(r))}var I0=class{segmentGroup;constructor(i){this.segmentGroup=i||null}},R0=class extends Error{urlTree;constructor(i){super(),this.urlTree=i}};function hm(t){return Sl(new I0(t))}function mce(t){return Sl(new et(4e3,!1))}function pce(t){return Sl(O9(!1,ao.GuardRejected))}var qM=class{urlSerializer;urlTree;constructor(i,e){this.urlSerializer=i,this.urlTree=e}lineralizeSegments(i,e){let r=[],n=e.root;for(;;){if(r=r.concat(n.segments),n.numberOfChildren===0)return bt(r);if(n.numberOfChildren>1||!n.children[_i])return mce(`${i.redirectTo}`);n=n.children[_i]}}applyRedirectCommands(i,e,r,n,a){if(typeof e!="string"){let o=e,{queryParams:d,fragment:l,routeConfig:c,url:h,outlet:u,params:f,data:p,title:m}=n,g=wa(a,()=>o({params:f,data:p,queryParams:d,fragment:l,routeConfig:c,url:h,outlet:u,title:m}));if(g instanceof Bc)throw new R0(g);e=g}let s=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),i,r);if(e[0]==="/")throw new R0(s);return s}applyRedirectCreateUrlTree(i,e,r,n){let a=this.createSegmentGroup(i,e.root,r,n);return new Bc(a,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(i,e){let r={};return Object.entries(i).forEach(([n,a])=>{if(typeof a=="string"&&a[0]===":"){let o=a.substring(1);r[n]=e[o]}else r[n]=a}),r}createSegmentGroup(i,e,r,n){let a=this.createSegments(i,e.segments,r,n),s={};return Object.entries(e.children).forEach(([o,d])=>{s[o]=this.createSegmentGroup(i,d,r,n)}),new an(a,s)}createSegments(i,e,r,n){return e.map(a=>a.path[0]===":"?this.findPosParam(i,a,n):this.findOrReturn(a,r))}findPosParam(i,e,r){let n=r[e.path.substring(1)];if(!n)throw new et(4001,!1);return n}findOrReturn(i,e){let r=0;for(let n of e){if(n.path===i.path)return e.splice(r),n;r++}return i}},eA={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function gce(t,i,e,r,n){let a=V9(t,i,e);return a.matched?(r=Ble(i,r),fce(r,i,e,n).pipe(mt(s=>s===!0?a:Me({},eA)))):bt(a)}function V9(t,i,e){if(i.path==="**")return vce(e);if(i.path==="")return i.pathMatch==="full"&&(t.hasChildren()||e.length>0)?Me({},eA):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let n=(i.matcher||hle)(e,t,i);if(!n)return Me({},eA);let a={};Object.entries(n.posParams??{}).forEach(([o,d])=>{a[o]=d.path});let s=n.consumed.length>0?Me(Me({},a),n.consumed[n.consumed.length-1].parameters):a;return{matched:!0,consumedSegments:n.consumed,remainingSegments:e.slice(n.consumed.length),parameters:s,positionalParamSegments:n.posParams??{}}}function vce(t){return{matched:!0,parameters:t.length>0?y9(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function f9(t,i,e,r){return e.length>0&&bce(t,e,r)?{segmentGroup:new an(i,xce(r,new an(e,t.children))),slicedSegments:[]}:e.length===0&&_ce(t,e,r)?{segmentGroup:new an(t.segments,yce(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new an(t.segments,t.children),slicedSegments:e}}function yce(t,i,e,r){let n={};for(let a of e)if(d_(t,i,a)&&!r[rl(a)]){let s=new an([],{});n[rl(a)]=s}return Me(Me({},r),n)}function xce(t,i){let e={};e[_i]=i;for(let r of t)if(r.path===""&&rl(r)!==_i){let n=new an([],{});e[rl(r)]=n}return e}function bce(t,i,e){return e.some(r=>d_(t,i,r)&&rl(r)!==_i)}function _ce(t,i,e){return e.some(r=>d_(t,i,r))}function d_(t,i,e){return(t.hasChildren()||i.length>0)&&e.pathMatch==="full"?!1:e.path===""}function wce(t,i,e){return i.length===0&&!t.children[e]}var tA=class{};function Cce(t,i,e,r,n,a,s="emptyOnly"){return new iA(t,i,e,r,n,s,a).recognize()}var Tce=31,iA=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(i,e,r,n,a,s,o){this.injector=i,this.configLoader=e,this.rootComponentType=r,this.config=n,this.urlTree=a,this.paramsInheritanceStrategy=s,this.urlSerializer=o,this.applyRedirects=new qM(this.urlSerializer,this.urlTree)}noMatchError(i){return new et(4002,`'${i.segmentGroup}'`)}recognize(){let i=f9(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(i).pipe(mt(({children:e,rootSnapshot:r})=>{let n=new so(r,e),a=new r_("",n),s=Rle(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,a.url=this.urlSerializer.serialize(s),{state:a,tree:s}}))}match(i){let e=new pm([],Object.freeze({}),Object.freeze(Me({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),_i,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,i,_i,e).pipe(mt(r=>({children:r,rootSnapshot:e})),Rn(r=>{if(r instanceof R0)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof I0?this.noMatchError(r):r}))}processSegmentGroup(i,e,r,n,a){return r.segments.length===0&&r.hasChildren()?this.processChildren(i,e,r,a):this.processSegment(i,e,r,r.segments,n,!0,a).pipe(mt(s=>s instanceof so?[s]:[]))}processChildren(i,e,r,n){let a=[];for(let s of Object.keys(r.children))s==="primary"?a.unshift(s):a.push(s);return wn(a).pipe(_c(s=>{let o=r.children[s],d=Vle(e,s);return this.processSegmentGroup(i,d,o,s,n)}),TE((s,o)=>(s.push(...o),s)),wd(null),CE(),Jn(s=>{if(s===null)return hm(r);let o=U9(s);return Sce(o),bt(o)}))}processSegment(i,e,r,n,a,s,o){return wn(e).pipe(_c(d=>this.processSegmentAgainstRoute(d._injector??i,e,d,r,n,a,s,o).pipe(Rn(l=>{if(l instanceof I0)return bt(null);throw l}))),Jr(d=>!!d),Rn(d=>{if(N9(d))return wce(r,n,a)?bt(new tA):hm(r);throw d}))}processSegmentAgainstRoute(i,e,r,n,a,s,o,d){return rl(r)!==s&&(s===_i||!d_(n,a,r))?hm(n):r.redirectTo===void 0?this.matchSegmentAgainstRoute(i,n,r,a,s,d):this.allowRedirects&&o?this.expandSegmentAgainstRouteUsingRedirect(i,n,e,r,a,s,d):hm(n)}expandSegmentAgainstRouteUsingRedirect(i,e,r,n,a,s,o){let{matched:d,parameters:l,consumedSegments:c,positionalParamSegments:h,remainingSegments:u}=V9(e,n,a);if(!d)return hm(e);typeof n.redirectTo=="string"&&n.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Tce&&(this.allowRedirects=!1));let f=new pm(a,l,Object.freeze(Me({},this.urlTree.queryParams)),this.urlTree.fragment,m9(n),rl(n),n.component??n._loadedComponent??null,n,p9(n)),p=n_(f,o,this.paramsInheritanceStrategy);f.params=Object.freeze(p.params),f.data=Object.freeze(p.data);let m=this.applyRedirects.applyRedirectCommands(c,n.redirectTo,h,f,i);return this.applyRedirects.lineralizeSegments(n,m).pipe(Jn(g=>this.processSegment(i,r,e,g.concat(u),s,!1,o)))}matchSegmentAgainstRoute(i,e,r,n,a,s){let o=gce(e,r,n,i,this.urlSerializer);return r.path==="**"&&(e.children={}),o.pipe(tn(d=>d.matched?(i=r._injector??i,this.getChildConfig(i,r,n).pipe(tn(({routes:l})=>{let c=r._loadedInjector??i,{parameters:h,consumedSegments:u,remainingSegments:f}=d,p=new pm(u,h,Object.freeze(Me({},this.urlTree.queryParams)),this.urlTree.fragment,m9(r),rl(r),r.component??r._loadedComponent??null,r,p9(r)),m=n_(p,s,this.paramsInheritanceStrategy);p.params=Object.freeze(m.params),p.data=Object.freeze(m.data);let{segmentGroup:g,slicedSegments:v}=f9(e,u,f,l);if(v.length===0&&g.hasChildren())return this.processChildren(c,l,g,p).pipe(mt(x=>new so(p,x)));if(l.length===0&&v.length===0)return bt(new so(p,[]));let y=rl(r)===a;return this.processSegment(c,l,g,v,y?_i:a,!0,p).pipe(mt(x=>new so(p,x instanceof so?[x]:[])))}))):hm(e)))}getChildConfig(i,e,r){return e.children?bt({routes:e.children,injector:i}):e.loadChildren?e._loadedRoutes!==void 0?bt({routes:e._loadedRoutes,injector:e._loadedInjector}):hce(i,e,r,this.urlSerializer).pipe(Jn(n=>n?this.configLoader.loadChildren(i,e).pipe(Ui(a=>{e._loadedRoutes=a.routes,e._loadedInjector=a.injector})):pce(e))):bt({routes:[],injector:i})}};function Sce(t){t.sort((i,e)=>i.value.outlet===_i?-1:e.value.outlet===_i?1:i.value.outlet.localeCompare(e.value.outlet))}function Ece(t){let i=t.value.routeConfig;return i&&i.path===""}function U9(t){let i=[],e=new Set;for(let r of t){if(!Ece(r)){i.push(r);continue}let n=i.find(a=>r.value.routeConfig===a.value.routeConfig);n!==void 0?(n.children.push(...r.children),e.add(n)):i.push(r)}for(let r of e){let n=U9(r.children);i.push(new so(r.value,n))}return i.filter(r=>!e.has(r))}function m9(t){return t.data||{}}function p9(t){return t.resolve||{}}function Dce(t,i,e,r,n,a){return Jn(s=>Cce(t,i,e,r,s.extractedUrl,n,a).pipe(mt(({state:o,tree:d})=>Mt(Me({},s),{targetSnapshot:o,urlAfterRedirects:d}))))}function Mce(t,i){return Jn(e=>{let{targetSnapshot:r,guards:{canActivateChecks:n}}=e;if(!n.length)return bt(e);let a=new Set(n.map(d=>d.route)),s=new Set;for(let d of a)if(!s.has(d))for(let l of z9(d))s.add(l);let o=0;return wn(s).pipe(_c(d=>a.has(d)?Ace(d,r,t,i):(d.data=n_(d,d.parent,t).resolve,bt(void 0))),Ui(()=>o++),Nf(1),Jn(d=>o===s.size?bt(e):lr))})}function z9(t){let i=t.children.map(e=>z9(e)).flat();return[t,...i]}function Ace(t,i,e,r){let n=t.routeConfig,a=t._resolve;return n?.title!==void 0&&!k9(n)&&(a[P0]=n.title),Ice(a,t,i,r).pipe(mt(s=>(t._resolvedData=s,t.data=n_(t,t.parent,e).resolve,null)))}function Ice(t,i,e,r){let n=kM(t);if(n.length===0)return bt({});let a={};return wn(n).pipe(Jn(s=>Rce(t[s],i,e,r).pipe(Jr(),Ui(o=>{if(o instanceof A0)throw s_(new ym,o);a[s]=o}))),Nf(1),mt(()=>a),Rn(s=>N9(s)?lr:Sl(s)))}function Rce(t,i,e,r){let n=F0(i)??r,a=wm(t,n),s=a.resolve?a.resolve(i,e):wa(n,()=>a(i,e));return Od(s)}function RM(t){return tn(i=>{let e=t(i);return e?wn(e).pipe(mt(()=>i)):bt(i)})}var G9=(()=>{class t{buildTitle(e){let r,n=e.root;for(;n!==void 0;)r=this.getResolvedTitleForRoute(n)??r,n=n.children.find(a=>a.outlet===_i);return r}getResolvedTitleForRoute(e){return e.data[P0]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:()=>Q(Pce),providedIn:"root"})}return t})(),Pce=(()=>{class t extends G9{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(_t(o9))};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),N0=new Se("",{providedIn:"root",factory:()=>({})}),kce=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,n){r&1&&we(0,"router-outlet")},dependencies:[sA],encapsulation:2})}return t})();function aA(t){let i=t.children&&t.children.map(aA),e=i?Mt(Me({},t),{children:i}):Me({},t);return!e.component&&!e.loadComponent&&(i||e.loadChildren)&&e.outlet&&e.outlet!==_i&&(e.component=kce),e}var o_=new Se(""),oA=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=Q(gb);loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return bt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let r=Od(e.loadComponent()).pipe(mt(H9),Ui(a=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=a}),Dl(()=>{this.componentLoaders.delete(e)})),n=new xd(r,()=>new Oe).pipe(Af());return this.componentLoaders.set(e,n),n}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return bt({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let a=Fce(r,this.compiler,e,this.onLoadEndListener).pipe(Dl(()=>{this.childrenLoaders.delete(r)})),s=new xd(a,()=>new Oe).pipe(Af());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Fce(t,i,e,r){return Od(t.loadChildren()).pipe(mt(H9),Jn(n=>n instanceof Kg||Array.isArray(n)?bt(n):wn(i.compileModuleAsync(n))),mt(n=>{r&&r(t);let a,s,o=!1;return Array.isArray(n)?(s=n,o=!0):(a=n.create(e).injector,s=a.get(o_,[],{optional:!0,self:!0}).flat()),{routes:s.map(aA),injector:a}}))}function Oce(t){return t&&typeof t=="object"&&"default"in t}function H9(t){return Oce(t)?t.default:t}var lA=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:()=>Q(Lce),providedIn:"root"})}return t})(),Lce=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),j9=new Se(""),W9=new Se("");function Nce(t,i,e){let r=t.get(W9),n=t.get(St);return t.get(dt).runOutsideAngular(()=>{if(!n.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,new Promise(l=>setTimeout(l));let a,s=new Promise(l=>{a=l}),o=n.startViewTransition(()=>(a(),Bce(t))),{onViewTransitionCreated:d}=r;return d&&wa(t,()=>d({transition:o,from:i,to:e})),s})}function Bce(t){return new Promise(i=>{pn({read:()=>setTimeout(i)},{injector:t})})}var X9=new Se(""),cA=(()=>{class t{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new Oe;transitionAbortSubject=new Oe;configLoader=Q(oA);environmentInjector=Q(vr);destroyRef=Q(ah);urlSerializer=Q(k0);rootContexts=Q(O0);location=Q(Pd);inputBindingEnabled=Q(c_,{optional:!0})!==null;titleStrategy=Q(G9);options=Q(N0,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=Q(lA);createViewTransition=Q(j9,{optional:!0});navigationErrorHandler=Q(X9,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>bt(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=n=>this.events.next(new zM(n)),r=n=>this.events.next(new GM(n));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;this.transitions?.next(Mt(Me(Me({},this.transitions.value),e),{id:r}))}setupNavigations(e,r,n){return this.transitions=new Ci({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:C0,restoredState:null,currentSnapshot:n.snapshot,targetSnapshot:null,currentRouterState:n,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Xt(a=>a.id!==0),mt(a=>Mt(Me({},a),{extractedUrl:this.urlHandlingStrategy.extract(a.rawUrl)})),tn(a=>{let s=!1,o=!1;return bt(a).pipe(tn(d=>{if(this.navigationId>a.id)return this.cancelNavigationTransition(a,"",ao.SupersededByNewNavigation),lr;this.currentTransition=a,this.currentNavigation={id:d.id,initialUrl:d.rawUrl,extractedUrl:d.extractedUrl,targetBrowserUrl:typeof d.extras.browserUrl=="string"?this.urlSerializer.parse(d.extras.browserUrl):d.extras.browserUrl,trigger:d.source,extras:d.extras,previousNavigation:this.lastSuccessfulNavigation?Mt(Me({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let l=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),c=d.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!l&&c!=="reload"){let h="";return this.events.next(new Fd(d.id,this.urlSerializer.serialize(d.rawUrl),h,Jb.IgnoredSameUrlNavigation)),d.resolve(!1),lr}if(this.urlHandlingStrategy.shouldProcessUrl(d.rawUrl))return bt(d).pipe(tn(h=>{let u=this.transitions?.getValue();return this.events.next(new xm(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),u!==this.transitions?.getValue()?lr:Promise.resolve(h)}),Dce(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),Ui(h=>{a.targetSnapshot=h.targetSnapshot,a.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation=Mt(Me({},this.currentNavigation),{finalUrl:h.urlAfterRedirects});let u=new qb(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(u)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(d.currentRawUrl)){let{id:h,extractedUrl:u,source:f,restoredState:p,extras:m}=d,g=new xm(h,this.urlSerializer.serialize(u),f,p);this.events.next(g);let v=R9(this.rootComponentType).snapshot;return this.currentTransition=a=Mt(Me({},d),{targetSnapshot:v,urlAfterRedirects:u,extras:Mt(Me({},m),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=u,bt(a)}else{let h="";return this.events.next(new Fd(d.id,this.urlSerializer.serialize(d.extractedUrl),h,Jb.IgnoredByUrlHandlingStrategy)),d.resolve(!1),lr}}),Ui(d=>{let l=new NM(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(l)}),mt(d=>(this.currentTransition=a=Mt(Me({},d),{guards:Yle(d.targetSnapshot,d.currentSnapshot,this.rootContexts)}),a)),rce(this.environmentInjector,d=>this.events.next(d)),Ui(d=>{if(a.guardsResult=d.guardsResult,d.guardsResult&&typeof d.guardsResult!="boolean")throw s_(this.urlSerializer,d.guardsResult);let l=new BM(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot,!!d.guardsResult);this.events.next(l)}),Xt(d=>d.guardsResult?!0:(this.cancelNavigationTransition(d,"",ao.GuardRejected),!1)),RM(d=>{if(d.guards.canActivateChecks.length)return bt(d).pipe(Ui(l=>{let c=new VM(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}),tn(l=>{let c=!1;return bt(l).pipe(Mce(this.paramsInheritanceStrategy,this.environmentInjector),Ui({next:()=>c=!0,complete:()=>{c||this.cancelNavigationTransition(l,"",ao.NoDataFromResolver)}}))}),Ui(l=>{let c=new UM(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}))}),RM(d=>{let l=c=>{let h=[];c.routeConfig?.loadComponent&&!c.routeConfig._loadedComponent&&h.push(this.configLoader.loadComponent(c.routeConfig).pipe(Ui(u=>{c.component=u}),mt(()=>{})));for(let u of c.children)h.push(...l(u));return h};return Js(l(d.targetSnapshot.root)).pipe(wd(null),Vi(1))}),RM(()=>this.afterPreactivation()),tn(()=>{let{currentSnapshot:d,targetSnapshot:l}=a,c=this.createViewTransition?.(this.environmentInjector,d.root,l.root);return c?wn(c).pipe(mt(()=>a)):bt(a)}),mt(d=>{let l=Gle(e.routeReuseStrategy,d.targetSnapshot,d.currentRouterState);return this.currentTransition=a=Mt(Me({},d),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,a}),Ui(()=>{this.events.next(new D0)}),Xle(this.rootContexts,e.routeReuseStrategy,d=>this.events.next(d),this.inputBindingEnabled),Vi(1),Ui({next:d=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Io(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects))),this.titleStrategy?.updateTitle(d.targetRouterState.snapshot),d.resolve(!0)},complete:()=>{s=!0}}),Vt(this.transitionAbortSubject.pipe(Ui(d=>{throw d}))),Dl(()=>{!s&&!o&&this.cancelNavigationTransition(a,"",ao.SupersededByNewNavigation),this.currentTransition?.id===a.id&&(this.currentNavigation=null,this.currentTransition=null)}),Rn(d=>{if(this.destroyed)return a.resolve(!1),lr;if(o=!0,L9(d))this.events.next(new Nc(a.id,this.urlSerializer.serialize(a.extractedUrl),d.message,d.cancellationCode)),Wle(d)?this.events.next(new bm(d.url,d.navigationBehaviorOptions)):a.resolve(!1);else{let l=new E0(a.id,this.urlSerializer.serialize(a.extractedUrl),d,a.targetSnapshot??void 0);try{let c=wa(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(c instanceof A0){let{message:h,cancellationCode:u}=s_(this.urlSerializer,c);this.events.next(new Nc(a.id,this.urlSerializer.serialize(a.extractedUrl),h,u)),this.events.next(new bm(c.redirectTo,c.navigationBehaviorOptions))}else throw this.events.next(l),d}catch(c){this.options.resolveNavigationPromiseOnError?a.resolve(!1):a.reject(c)}}return lr}))}))}cancelNavigationTransition(e,r,n){let a=new Nc(e.id,this.urlSerializer.serialize(e.extractedUrl),r,n);this.events.next(a),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Vce(t){return t!==C0}var Uce=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:()=>Q(zce),providedIn:"root"})}return t})(),nA=class{shouldDetach(i){return!1}store(i,e){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,e){return i.routeConfig===e.routeConfig}},zce=(()=>{class t extends nA{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Y9=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:()=>Q(Gce),providedIn:"root"})}return t})(),Gce=(()=>{class t extends Y9{location=Q(Pd);urlSerializer=Q(k0);options=Q(N0,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";urlHandlingStrategy=Q(lA);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new Bc;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}routerState=R9(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&e(r.url,r.state)})}handleRouterEvent(e,r){if(e instanceof xm)this.stateMemento=this.createStateMemento();else if(e instanceof Fd)this.rawUrlTree=r.initialUrl;else if(e instanceof qb){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let n=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??n,r)}}else e instanceof D0?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):e instanceof Nc&&(e.code===ao.GuardRejected||e.code===ao.NoDataFromResolver)?this.restoreHistory(r):e instanceof E0?this.restoreHistory(r,!0):e instanceof Io&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,r){let n=e instanceof Bc?this.urlSerializer.serialize(e):e;if(this.location.isCurrentPathEqualTo(n)||r.extras.replaceUrl){let a=this.browserPageId,s=Me(Me({},r.extras.state),this.generateNgRouterState(r.id,a));this.location.replaceState(n,"",s)}else{let a=Me(Me({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(n,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let n=this.browserPageId,a=this.currentPageId-n;a!==0?this.location.historyGo(a):this.currentUrlTree===e.finalUrl&&a===0&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function $9(t,i){t.events.pipe(Xt(e=>e instanceof Io||e instanceof Nc||e instanceof E0||e instanceof Fd),mt(e=>e instanceof Io||e instanceof Fd?0:(e instanceof Nc?e.code===ao.Redirect||e.code===ao.SupersededByNewNavigation:!1)?2:1),Xt(e=>e!==2),Vi(1)).subscribe(()=>{i()})}var Hce={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},jce={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ys=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=Q(BD);stateManager=Q(Y9);options=Q(N0,{optional:!0})||{};pendingTasks=Q(Nl);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=Q(cA);urlSerializer=Q(k0);location=Q(Pd);urlHandlingStrategy=Q(lA);_events=new Oe;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=Q(Uce);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=Q(o_,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!Q(c_,{optional:!0});constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new kt;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let n=this.navigationTransitions.currentTransition,a=this.navigationTransitions.currentNavigation;if(n!==null&&a!==null){if(this.stateManager.handleRouterEvent(r,a),r instanceof Nc&&r.code!==ao.Redirect&&r.code!==ao.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Io)this.navigated=!0;else if(r instanceof bm){let s=r.navigationBehaviorOptions,o=this.urlHandlingStrategy.merge(r.url,n.currentRawUrl),d=Me({browserUrl:n.extras.browserUrl,info:n.extras.info,skipLocationChange:n.extras.skipLocationChange,replaceUrl:n.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Vce(n.source)},s);this.scheduleNavigation(o,C0,null,d,{resolve:n.resolve,reject:n.reject,promise:n.promise})}}Xce(r)&&this._events.next(r)}catch(n){this.navigationTransitions.transitionAbortSubject.next(n)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),C0,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(e,"popstate",r)},0)})}navigateToSyncWithBrowser(e,r,n){let a={replaceUrl:!0},s=n?.navigationId?n:null;if(n){let d=Me({},n);delete d.navigationId,delete d.\u0275routerPageId,Object.keys(d).length!==0&&(a.state=d)}let o=this.parseUrl(e);this.scheduleNavigation(o,r,s,a)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(aA),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:n,queryParams:a,fragment:s,queryParamsHandling:o,preserveFragment:d}=r,l=d?this.currentUrlTree.fragment:s,c=null;switch(o??this.options.defaultQueryParamsHandling){case"merge":c=Me(Me({},this.currentUrlTree.queryParams),a);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=a||null}c!==null&&(c=this.removeEmptyProps(c));let h;try{let u=n?n.snapshot:this.routerState.snapshot.root;h=D9(u)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),h=this.currentUrlTree.root}return M9(h,e,c,l??null)}navigateByUrl(e,r={skipLocationChange:!1}){let n=hh(e)?e:this.parseUrl(e),a=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(a,C0,null,r)}navigate(e,r={skipLocationChange:!1}){return Wce(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,r){let n;if(r===!0?n=Me({},Hce):r===!1?n=Me({},jce):n=r,hh(e))return l9(this.currentUrlTree,e,n);let a=this.parseUrl(e);return l9(this.currentUrlTree,a,n)}removeEmptyProps(e){return Object.entries(e).reduce((r,[n,a])=>(a!=null&&(r[n]=a),r),{})}scheduleNavigation(e,r,n,a,s){if(this.disposed)return Promise.resolve(!1);let o,d,l;s?(o=s.resolve,d=s.reject,l=s.promise):l=new Promise((h,u)=>{o=h,d=u});let c=this.pendingTasks.add();return $9(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(c))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:a,resolve:o,reject:d,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(h=>Promise.reject(h))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Wce(t){for(let i=0;i{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;href=null;target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new Oe;constructor(e,r,n,a,s,o){this.router=e,this.route=r,this.tabIndexAttribute=n,this.renderer=a,this.el=s,this.locationStrategy=o;let d=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=d==="a"||d==="area",this.isAnchorElement?this.subscription=e.events.subscribe(l=>{l instanceof Io&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(hh(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,n,a,s){let o=this.urlTree;if(o===null||this.isAnchorElement&&(e!==0||r||n||a||s||typeof this.target=="string"&&this.target!="_self"))return!0;let d={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(o,d),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.href=e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e)):null;let r=this.href===null?null:z5(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",r)}applyAttributeValue(e,r){let n=this.renderer,a=this.el.nativeElement;r!==null?n.setAttribute(a,e,r):n.removeAttribute(a,e)}get urlTree(){return this.routerLinkInput===null?null:hh(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(be(ys),be(jr),tb("tabindex"),be(Ai),be(Ze),be(Lc))};static \u0275dir=Ue({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,n){r&1&&ce("click",function(s){return n.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&pt("target",n.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",$e],skipLocationChange:[2,"skipLocationChange","skipLocationChange",$e],replaceUrl:[2,"replaceUrl","replaceUrl",$e],routerLink:"routerLink"},features:[At,ei]})}return t})();var l_=class{};var Yce=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,r,n,a,s){this.router=e,this.injector=n,this.preloadingStrategy=a,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(Xt(e=>e instanceof Io),_c(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,r){let n=[];for(let a of r){a.providers&&!a._injector&&(a._injector=lb(a.providers,e,`Route: ${a.path}`));let s=a._injector??e,o=a._loadedInjector??s;(a.loadChildren&&!a._loadedRoutes&&a.canLoad===void 0||a.loadComponent&&!a._loadedComponent)&&n.push(this.preloadConfig(s,a)),(a.children||a._loadedRoutes)&&n.push(this.processRoutes(o,a.children??a._loadedRoutes))}return wn(n).pipe(_d())}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>{let n;r.loadChildren&&r.canLoad===void 0?n=this.loader.loadChildren(e,r):n=bt(null);let a=n.pipe(Jn(s=>s===null?bt(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));if(r.loadComponent&&!r._loadedComponent){let s=this.loader.loadComponent(r);return wn([a,s]).pipe(_d())}else return a})}static \u0275fac=function(r){return new(r||t)(_t(ys),_t(gb),_t(vr),_t(l_),_t(oA))};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Q9=new Se(""),$ce=(()=>{class t{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource="imperative";restoredId=0;store={};constructor(e,r,n,a,s={}){this.urlSerializer=e,this.transitions=r,this.viewportScroller=n,this.zone=a,this.options=s,s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof xm?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Io?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof Fd&&e.code===Jb.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof e_&&(e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new e_(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(r){v8()};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})();function Qce(t){return t.routerState.root}function B0(t,i){return{\u0275kind:t,\u0275providers:i}}function Kce(){let t=Q(Wt);return i=>{let e=t.get(ia);if(i!==e.components[0])return;let r=t.get(ys),n=t.get(K9);t.get(dA)===1&&r.initialNavigation(),t.get(Z9,null,Ti.Optional)?.setUpPreloading(),t.get(Q9,null,Ti.Optional)?.init(),r.resetRootComponentType(e.componentTypes[0]),n.closed||(n.next(),n.complete(),n.unsubscribe())}}var K9=new Se("",{factory:()=>new Oe}),dA=new Se("",{providedIn:"root",factory:()=>1});function Zce(){return B0(2,[{provide:dA,useValue:0},{provide:hb,multi:!0,deps:[Wt],useFactory:i=>{let e=i.get(bB,Promise.resolve());return()=>e.then(()=>new Promise(r=>{let n=i.get(ys),a=i.get(K9);$9(n,()=>{r(!0)}),i.get(cA).afterPreactivation=()=>(r(!0),a.closed?bt(void 0):a),n.initialNavigation()}))}}])}function Jce(){return B0(3,[{provide:hb,multi:!0,useFactory:()=>{let i=Q(ys);return()=>{i.setUpLocationChangeListener()}}},{provide:dA,useValue:2}])}var Z9=new Se("");function qce(t){return B0(0,[{provide:Z9,useExisting:Yce},{provide:l_,useExisting:t}])}function ede(){return B0(8,[h9,{provide:c_,useExisting:h9}])}function tde(t){let i=[{provide:j9,useValue:Nce},{provide:W9,useValue:Me({skipNextTransition:!!t?.skipInitialTransition},t)}];return B0(9,i)}var ide=[Pd,{provide:k0,useClass:ym},ys,O0,{provide:jr,useFactory:Qce,deps:[ys]},oA,[]],uA=(()=>{class t{constructor(){}static forRoot(e,r){return{ngModule:t,providers:[ide,[],{provide:o_,multi:!0,useValue:e},[],r?.errorHandler?{provide:X9,useValue:r.errorHandler}:[],{provide:N0,useValue:r||{}},r?.useHash?rde():sde(),nde(),r?.preloadingStrategy?qce(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?ade(r):[],r?.bindToComponentInputs?ede().\u0275providers:[],r?.enableViewTransitions?tde().\u0275providers:[],ode()]}}static forChild(e){return{ngModule:t,providers:[{provide:o_,multi:!0,useValue:e}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({})}return t})();function nde(){return{provide:Q9,useFactory:()=>{let t=Q(kB),i=Q(dt),e=Q(N0),r=Q(cA),n=Q(k0);return e.scrollOffset&&t.setOffset(e.scrollOffset),new $ce(n,r,t,i,e)}}}function rde(){return{provide:Lc,useClass:wB}}function sde(){return{provide:Lc,useClass:dM}}function ade(t){return[t.initialNavigation==="disabled"?Jce().\u0275providers:[],t.initialNavigation==="enabledBlocking"?Zce().\u0275providers:[]]}var g9=new Se("");function ode(){return[{provide:g9,useFactory:Kce},{provide:fb,multi:!0,useExisting:g9}]}var fh=class{};function h_(t){return t&&typeof t.connect=="function"&&!(t instanceof xd)}var Tm=function(t){return t[t.REPLACED=0]="REPLACED",t[t.INSERTED=1]="INSERTED",t[t.MOVED=2]="MOVED",t[t.REMOVED=3]="REMOVED",t}(Tm||{}),V0=new Se("_ViewRepeater"),Sm=class{applyChanges(i,e,r,n,a){i.forEachOperation((s,o,d)=>{let l,c;if(s.previousIndex==null){let h=r(s,o,d);l=e.createEmbeddedView(h.templateRef,h.context,h.index),c=Tm.INSERTED}else d==null?(e.remove(o),c=Tm.REMOVED):(l=e.get(o),e.move(l,d),c=Tm.MOVED);a&&a({context:l?.context,operation:c,record:s})})}detach(){}};var u_=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new Oe;constructor(i=!1,e,r=!0,n){this._multiple=i,this._emitChanges=r,this.compareWith=n,e&&e.length&&(i?e.forEach(a=>this._markSelected(a)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...i){this._verifyValueAssignment(i),i.forEach(r=>this._markSelected(r));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...i){this._verifyValueAssignment(i),i.forEach(r=>this._unmarkSelected(r));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...i){this._verifyValueAssignment(i);let e=this.selected,r=new Set(i);i.forEach(a=>this._markSelected(a)),e.filter(a=>!r.has(this._getConcreteValue(a,r))).forEach(a=>this._unmarkSelected(a));let n=this._hasQueuedChanges();return this._emitChangeEvent(),n}toggle(i){return this.isSelected(i)?this.deselect(i):this.select(i)}clear(i=!0){this._unmarkAll();let e=this._hasQueuedChanges();return i&&this._emitChangeEvent(),e}isSelected(i){return this._selection.has(this._getConcreteValue(i))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(i){this._multiple&&this.selected&&this._selected.sort(i)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(i){i=this._getConcreteValue(i),this.isSelected(i)||(this._multiple||this._unmarkAll(),this.isSelected(i)||this._selection.add(i),this._emitChanges&&this._selectedToEmit.push(i))}_unmarkSelected(i){i=this._getConcreteValue(i),this.isSelected(i)&&(this._selection.delete(i),this._emitChanges&&this._deselectedToEmit.push(i))}_unmarkAll(){this.isEmpty()||this._selection.forEach(i=>this._unmarkSelected(i))}_verifyValueAssignment(i){i.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(i,e){if(this.compareWith){e=e??this._selection;for(let r of e)if(this.compareWith(i,r))return r;return i}else return i}};var Em=(()=>{class t{_listeners=[];notify(e,r){for(let n of this._listeners)n(e,r)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(r=>e!==r)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var fA;try{fA=typeof Intl<"u"&&Intl.v8BreakIterator}catch{fA=!1}var hi=(()=>{class t{_platformId=Q(Ac);isBrowser=this._platformId?PB(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||fA)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Dm,J9=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function mA(){if(Dm)return Dm;if(typeof document!="object"||!document)return Dm=new Set(J9),Dm;let t=document.createElement("input");return Dm=new Set(J9.filter(i=>(t.setAttribute("type",i),t.type===i))),Dm}var U0;function lde(){if(U0==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>U0=!0}))}finally{U0=U0||!1}return U0}function xs(t){return lde()?t:!!t.capture}var sl=function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t}(sl||{}),f_,mh;function m_(){if(mh==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return mh=!1,mh;if("scrollBehavior"in document.documentElement.style)mh=!0;else{let t=Element.prototype.scrollTo;t?mh=!/\{\s*\[native code\]\s*\}/.test(t.toString()):mh=!1}}return mh}function Mm(){if(typeof document!="object"||!document)return sl.NORMAL;if(f_==null){let t=document.createElement("div"),i=t.style;t.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";let e=document.createElement("div"),r=e.style;r.width="2px",r.height="1px",t.appendChild(e),document.body.appendChild(t),f_=sl.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,f_=t.scrollLeft===0?sl.NEGATED:sl.INVERTED),t.remove()}return f_}var hA;function cde(){if(hA==null){let t=typeof document<"u"?document.head:null;hA=!!(t&&(t.createShadowRoot||t.attachShadow))}return hA}function Am(t){if(cde()){let i=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function z0(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let i=t.shadowRoot.activeElement;if(i===t)break;t=i}return t}function Dr(t){return t.composedPath?t.composedPath()[0]:t.target}function pA(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function gA(t,i,e,r,n){let a=parseInt(QD.major),s=parseInt(QD.minor);return a>19||a===19&&s>0||a===0&&s===0?t.listen(i,e,r,n):(i.addEventListener(e,r,n),()=>{i.removeEventListener(e,r,n)})}var p_=new WeakMap,on=(()=>{class t{_appRef;_injector=Q(Wt);_environmentInjector=Q(vr);load(e){let r=this._appRef=this._appRef||this._injector.get(ia),n=p_.get(r);n||(n={loaders:new Set,refs:[]},p_.set(r,n),r.onDestroy(()=>{p_.get(r)?.refs.forEach(a=>a.destroy()),p_.delete(r)})),n.loaders.has(e)||(n.loaders.add(e),n.refs.push(yb(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),G0=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,n){},styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}"],encapsulation:2,changeDetection:0})}return t})();function En(t,...i){return i.length?i.some(e=>t[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}function sa(t){return t!=null&&`${t}`!="false"}function Da(t,i=0){return vA(t)?Number(t):arguments.length===2?i:0}function vA(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function Ld(t){return Array.isArray(t)?t:[t]}function xr(t){return t==null?"":typeof t=="string"?t:`${t}px`}function dr(t){return t instanceof Ze?t.nativeElement:t}function dde(t){if(t.type==="characterData"&&t.target instanceof Comment)return!0;if(t.type==="childList"){for(let i=0;i{class t{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),e6=(()=>{class t{_mutationObserverFactory=Q(q9);_observedElements=new Map;_ngZone=Q(dt);constructor(){}ngOnDestroy(){this._observedElements.forEach((e,r)=>this._cleanupObserver(r))}observe(e){let r=dr(e);return new $t(n=>{let s=this._observeElement(r).pipe(mt(o=>o.filter(d=>!dde(d))),Xt(o=>!!o.length)).subscribe(o=>{this._ngZone.run(()=>{n.next(o)})});return()=>{s.unsubscribe(),this._unobserveElement(r)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let r=new Oe,n=this._mutationObserverFactory.create(a=>r.next(a));n&&n.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:n,stream:r,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:r,stream:n}=this._observedElements.get(e);r&&r.disconnect(),n.complete(),this._observedElements.delete(e)}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),yA=(()=>{class t{_contentObserver=Q(e6);_elementRef=Q(Ze);event=new Le;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(e){this._debounce=Da(e),this._subscribe()}_debounce;_currentSubscription=null;constructor(){}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?e.pipe(Tr(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",$e],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"],features:[At]})}return t})(),Im=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[q9]})}return t})();var t6=new Set,ph,ude=(()=>{class t{_platform=Q(hi);_nonce=Q(i0,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):fde}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&hde(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function hde(t,i){if(!t6.has(t))try{ph||(ph=document.createElement("style"),i&&ph.setAttribute("nonce",i),ph.setAttribute("type","text/css"),document.head.appendChild(ph)),ph.sheet&&(ph.sheet.insertRule(`@media ${t} {body{ }}`,0),t6.add(t))}catch(e){console.error(e)}}function fde(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var Rm=(()=>{class t{_mediaMatcher=Q(ude);_zone=Q(dt);_queries=new Map;_destroySubject=new Oe;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return i6(Ld(e)).some(n=>this._registerQuery(n).mql.matches)}observe(e){let n=i6(Ld(e)).map(s=>this._registerQuery(s).observable),a=Js(n);return a=El(a.pipe(Vi(1)),a.pipe(Gu(1),Tr(0))),a.pipe(mt(s=>{let o={matches:!1,breakpoints:{}};return s.forEach(({matches:d,query:l})=>{o.matches=o.matches||d,o.breakpoints[l]=d}),o}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let r=this._mediaMatcher.matchMedia(e),a={observable:new $t(s=>{let o=d=>this._zone.run(()=>s.next(d));return r.addListener(o),()=>{r.removeListener(o)}}).pipe(Wi(r),mt(({matches:s})=>({query:e,matches:s})),Vt(this._destroySubject)),mql:r};return this._queries.set(e,a),a}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function i6(t){return t.map(i=>i.split(",")).reduce((i,e)=>i.concat(e)).map(i=>i.trim())}var g_={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var o6=" ";function Lm(t,i,e){let r=b_(t,i);e=e.trim(),!r.some(n=>n.trim()===e)&&(r.push(e),t.setAttribute(i,r.join(o6)))}function Bd(t,i,e){let r=b_(t,i);e=e.trim();let n=r.filter(a=>a!==e);n.length?t.setAttribute(i,n.join(o6)):t.removeAttribute(i)}function b_(t,i){return t.getAttribute(i)?.match(/\S+/g)??[]}var l6="cdk-describedby-message",v_="cdk-describedby-host",wA=0,w_=(()=>{class t{_platform=Q(hi);_document=Q(St);_messageRegistry=new Map;_messagesContainer=null;_id=`${wA++}`;constructor(){Q(on).load(G0),this._id=Q(rm)+"-"+wA++}describe(e,r,n){if(!this._canBeDescribed(e,r))return;let a=xA(r,n);typeof r!="string"?(n6(r,this._id),this._messageRegistry.set(a,{messageElement:r,referenceCount:0})):this._messageRegistry.has(a)||this._createMessageElement(r,n),this._isElementDescribedByMessage(e,a)||this._addMessageReference(e,a)}removeDescription(e,r,n){if(!r||!this._isElementNode(e))return;let a=xA(r,n);if(this._isElementDescribedByMessage(e,a)&&this._removeMessageReference(e,a),typeof r=="string"){let s=this._messageRegistry.get(a);s&&s.referenceCount===0&&this._deleteMessageElement(a)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${v_}="${this._id}"]`);for(let r=0;rn.indexOf(l6)!=0);e.setAttribute("aria-describedby",r.join(" "))}_addMessageReference(e,r){let n=this._messageRegistry.get(r);Lm(e,"aria-describedby",n.messageElement.id),e.setAttribute(v_,this._id),n.referenceCount++}_removeMessageReference(e,r){let n=this._messageRegistry.get(r);n.referenceCount--,Bd(e,"aria-describedby",n.messageElement.id),e.removeAttribute(v_)}_isElementDescribedByMessage(e,r){let n=b_(e,"aria-describedby"),a=this._messageRegistry.get(r),s=a&&a.messageElement.id;return!!s&&n.indexOf(s)!=-1}_canBeDescribed(e,r){if(!this._isElementNode(e))return!1;if(r&&typeof r=="object")return!0;let n=r==null?"":`${r}`.trim(),a=e.getAttribute("aria-label");return n?!a||a.trim()!==n:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function xA(t,i){return typeof t=="string"?`${i||""}/${t}`:t}function n6(t,i){t.id||(t.id=`${l6}-${i}-${wA++}`)}var Ede=200,CA=class{_letterKeyStream=new Oe;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new Oe;selectedItem=this._selectedItem;constructor(i,e){let r=typeof e?.debounceInterval=="number"?e.debounceInterval:Ede;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(i),this._setupKeyHandler(r)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(i){this._selectedItemIndex=i}setItems(i){this._items=i}handleKey(i){let e=i.keyCode;i.key&&i.key.length===1?this._letterKeyStream.next(i.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(i){this._letterKeyStream.pipe(Ui(e=>this._pressedLetters.push(e)),Tr(i),Xt(()=>this._pressedLetters.length>0),mt(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let r=1;ri.disabled;constructor(i,e){this._items=i,i instanceof eo?this._itemChangesSubscription=i.changes.subscribe(r=>this._itemsChanged(r.toArray())):Id(i)&&(this._effectRef=h0(()=>this._itemsChanged(i()),{injector:e}))}tabOut=new Oe;change=new Oe;skipPredicate(i){return this._skipPredicateFn=i,this}withWrap(i=!0){return this._wrap=i,this}withVerticalOrientation(i=!0){return this._vertical=i,this}withHorizontalOrientation(i){return this._horizontal=i,this}withAllowedModifierKeys(i){return this._allowedModifierKeys=i,this}withTypeAhead(i=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new CA(e,{debounceInterval:typeof i=="number"?i:void 0,skipPredicate:r=>this._skipPredicateFn(r)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(r=>{this.setActiveItem(r)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(i=!0){return this._homeAndEnd=i,this}withPageUpDown(i=!0,e=10){return this._pageUpAndDown={enabled:i,delta:e},this}setActiveItem(i){let e=this._activeItem();this.updateActiveItem(i),this._activeItem()!==e&&this.change.next(this._activeItemIndex)}onKeydown(i){let e=i.keyCode,n=["altKey","ctrlKey","metaKey","shiftKey"].every(a=>!i[a]||this._allowedModifierKeys.indexOf(a)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&n){this.setNextItemActive();break}else return;case 38:if(this._vertical&&n){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&n){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&n){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&n){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&n){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(a>0?a:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(a-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r,this._typeahead?.setCurrentSelectedItemIndex(r))}}},km=class extends __{setActiveItem(i){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(i),this.activeItem&&this.activeItem.setActiveStyles()}},vh=class extends __{_origin="program";setFocusOrigin(i){return this._origin=i,this}setActiveItem(i){super.setActiveItem(i),this.activeItem&&this.activeItem.focus(this._origin)}};var H0=(()=>{class t{_platform=Q(hi);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return Mde(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let r=Dde(Lde(e));if(r&&(r6(r)===-1||!this.isVisible(r)))return!1;let n=e.nodeName.toLowerCase(),a=r6(e);return e.hasAttribute("contenteditable")?a!==-1:n==="iframe"||n==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Fde(e)?!1:n==="audio"?e.hasAttribute("controls")?a!==-1:!1:n==="video"?a===-1?!1:a!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,r){return Ode(e)&&!this.isDisabled(e)&&(r?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Dde(t){try{return t.frameElement}catch{return null}}function Mde(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function Ade(t){let i=t.nodeName.toLowerCase();return i==="input"||i==="select"||i==="button"||i==="textarea"}function Ide(t){return Pde(t)&&t.type=="hidden"}function Rde(t){return kde(t)&&t.hasAttribute("href")}function Pde(t){return t.nodeName.toLowerCase()=="input"}function kde(t){return t.nodeName.toLowerCase()=="a"}function c6(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let i=t.getAttribute("tabindex");return!!(i&&!isNaN(parseInt(i,10)))}function r6(t){if(!c6(t))return null;let i=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}function Fde(t){let i=t.nodeName.toLowerCase(),e=i==="input"&&t.type;return e==="text"||e==="password"||i==="select"||i==="textarea"}function Ode(t){return Ide(t)?!1:Ade(t)||Rde(t)||t.hasAttribute("contenteditable")||c6(t)}function Lde(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var TA=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_enabled=!0;constructor(i,e,r,n,a=!1,s){this._element=i,this._checker=e,this._ngZone=r,this._document=n,this._injector=s,a||this.attachAnchors()}destroy(){let i=this._startAnchor,e=this._endAnchor;i&&(i.removeEventListener("focus",this.startAnchorListener),i.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(i)))})}focusFirstTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(i)))})}focusLastTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(i)))})}_getRegionBoundary(i){let e=this._element.querySelectorAll(`[cdk-focus-region-${i}], [cdkFocusRegion${i}], [cdk-focus-${i}]`);return i=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(i){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let r=this._getFirstTabbableElement(e);return r?.focus(i),!!r}return e.focus(i),!0}return this.focusFirstTabbableElement(i)}focusFirstTabbableElement(i){let e=this._getRegionBoundary("start");return e&&e.focus(i),!!e}focusLastTabbableElement(i){let e=this._getRegionBoundary("end");return e&&e.focus(i),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;let e=i.children;for(let r=0;r=0;r--){let n=e[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[r]):null;if(n)return n}return null}_createAnchor(){let i=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,i),i.classList.add("cdk-visually-hidden"),i.classList.add("cdk-focus-trap-anchor"),i.setAttribute("aria-hidden","true"),i}_toggleAnchorTabIndex(i,e){i?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(i){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_executeOnStable(i){this._injector?pn(i,{injector:this._injector}):setTimeout(i)}},C_=(()=>{class t{_checker=Q(H0);_ngZone=Q(dt);_document=Q(St);_injector=Q(Wt);constructor(){Q(on).load(G0)}create(e,r=!1){return new TA(e,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function yh(t){return t.buttons===0||t.detail===0}function xh(t){let i=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!i&&i.identifier===-1&&(i.radiusX==null||i.radiusX===1)&&(i.radiusY==null||i.radiusY===1)}var Nde=new Se("cdk-input-modality-detector-options"),Bde={ignoreKeys:[18,17,224,91,16]},d6=650,Pm=xs({passive:!0,capture:!0}),Vde=(()=>{class t{_platform=Q(hi);modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Ci(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(r=>r===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Dr(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs{if(xh(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Dr(e)};constructor(){let e=Q(dt),r=Q(St),n=Q(Nde,{optional:!0});this._options=Me(Me({},Bde),n),this.modalityDetected=this._modality.pipe(Gu(1)),this.modalityChanged=this.modalityDetected.pipe(qs()),this._platform.isBrowser&&e.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Pm),r.addEventListener("mousedown",this._onMousedown,Pm),r.addEventListener("touchstart",this._onTouchstart,Pm)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Pm),document.removeEventListener("mousedown",this._onMousedown,Pm),document.removeEventListener("touchstart",this._onTouchstart,Pm))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ude=new Se("liveAnnouncerElement",{providedIn:"root",factory:zde});function zde(){return null}var Gde=new Se("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Hde=0,T_=(()=>{class t{_ngZone=Q(dt);_defaultOptions=Q(Gde,{optional:!0});_liveElement;_document=Q(St);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=Q(Ude,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...r){let n=this._defaultOptions,a,s;return r.length===1&&typeof r[0]=="number"?s=r[0]:[a,s]=r,this.clear(),clearTimeout(this._previousTimeout),a||(a=n&&n.politeness?n.politeness:"polite"),s==null&&n&&(s=n.duration),this._liveElement.setAttribute("aria-live",a),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(o=>this._currentResolve=o)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,typeof s=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",r=this._document.getElementsByClassName(e),n=this._document.createElement("div");for(let a=0;a .cdk-overlay-container [aria-modal="true"]');for(let n=0;n{class t{_ngZone=Q(dt);_platform=Q(hi);_inputModalityDetector=Q(Vde);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=Q(St,{optional:!0});_stopInputModalityDetector=new Oe;constructor(){let e=Q(jde,{optional:!0});this._detectionMode=e?.detectionMode||x_.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let r=Dr(e);for(let n=r;n;n=n.parentElement)e.type==="focus"?this._onFocus(e,n):this._onBlur(e,n)};monitor(e,r=!1){let n=dr(e);if(!this._platform.isBrowser||n.nodeType!==1)return bt();let a=Am(n)||this._getDocument(),s=this._elementInfo.get(n);if(s)return r&&(s.checkChildren=!0),s.subject;let o={checkChildren:r,subject:new Oe,rootNode:a};return this._elementInfo.set(n,o),this._registerGlobalListeners(o),o.subject}stopMonitoring(e){let r=dr(e),n=this._elementInfo.get(r);n&&(n.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(n))}focusVia(e,r,n){let a=dr(e),s=this._getDocument().activeElement;a===s?this._getClosestElementsInfo(a).forEach(([o,d])=>this._originChanged(o,r,d)):(this._setOrigin(r),typeof a.focus=="function"&&a.focus(n))}ngOnDestroy(){this._elementInfo.forEach((e,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===x_.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,r){e.classList.toggle("cdk-focused",!!r),e.classList.toggle("cdk-touch-focused",r==="touch"),e.classList.toggle("cdk-keyboard-focused",r==="keyboard"),e.classList.toggle("cdk-mouse-focused",r==="mouse"),e.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(e,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&r,this._detectionMode===x_.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?d6:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(e,r){let n=this._elementInfo.get(r),a=Dr(e);!n||!n.checkChildren&&r!==a||this._originChanged(r,this._getFocusOrigin(a),n)}_onBlur(e,r){let n=this._elementInfo.get(r);!n||n.checkChildren&&e.relatedTarget instanceof Node&&r.contains(e.relatedTarget)||(this._setClasses(r),this._emitOrigin(n,null))}_emitOrigin(e,r){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(r))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let r=e.rootNode,n=this._rootNodeFocusListenerCount.get(r)||0;n||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,y_),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,y_)}),this._rootNodeFocusListenerCount.set(r,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Vt(this._stopInputModalityDetector)).subscribe(a=>{this._setOrigin(a,!0)}))}_removeGlobalListeners(e){let r=e.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let n=this._rootNodeFocusListenerCount.get(r);n>1?this._rootNodeFocusListenerCount.set(r,n-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,y_),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,y_),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,r,n){this._setClasses(e,r),this._emitOrigin(n,r),this._lastFocusOrigin=r}_getClosestElementsInfo(e){let r=[];return this._elementInfo.forEach((n,a)=>{(a===e||n.checkChildren&&a.contains(e))&&r.push([a,n])}),r}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:r,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!r||r===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let a=e.labels;if(a){for(let s=0;s{class t{_elementRef=Q(Ze);_focusMonitor=Q(br);_monitorSubscription;_focusOrigin=null;cdkFocusChange=new Le;constructor(){}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,e.nodeType===1&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(r=>{this._focusOrigin=r,this.cdkFocusChange.emit(r)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]})}return t})(),gh=function(t){return t[t.NONE=0]="NONE",t[t.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",t[t.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",t}(gh||{}),s6="cdk-high-contrast-black-on-white",a6="cdk-high-contrast-white-on-black",bA="cdk-high-contrast-active",DA=(()=>{class t{_platform=Q(hi);_hasCheckedHighContrastMode;_document=Q(St);_breakpointSubscription;constructor(){this._breakpointSubscription=Q(Rm).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return gh.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let r=this._document.defaultView||window,n=r&&r.getComputedStyle?r.getComputedStyle(e):null,a=(n&&n.backgroundColor||"").replace(/ /g,"");switch(e.remove(),a){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return gh.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return gh.BLACK_ON_WHITE}return gh.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(bA,s6,a6),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===gh.BLACK_ON_WHITE?e.add(bA,s6):r===gh.WHITE_ON_BLACK&&e.add(bA,a6)}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),S_=(()=>{class t{constructor(){Q(DA)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Im]})}return t})(),_A={},wi=(()=>{class t{_appId=Q(rm);getId(e){return this._appId!=="ng"&&(e+=this._appId),_A.hasOwnProperty(e)||(_A[e]=0),`${e}${_A[e]++}`}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Wde=new Se("cdk-dir-doc",{providedIn:"root",factory:Xde});function Xde(){return Q(St)}var Yde=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function $de(t){let i=t?.toLowerCase()||"";return i==="auto"&&typeof navigator<"u"&&navigator?.language?Yde.test(navigator.language)?"rtl":"ltr":i==="rtl"?"rtl":"ltr"}var vn=(()=>{class t{value="ltr";change=new Le;constructor(){let e=Q(Wde,{optional:!0});if(e){let r=e.body?e.body.dir:null,n=e.documentElement?e.documentElement.dir:null;this.value=$de(r||n||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Vd=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({})}return t})();var Qde=["text"],Kde=[[["mat-icon"]],"*"],Zde=["mat-icon","*"];function Jde(t,i){if(t&1&&we(0,"mat-pseudo-checkbox",1),t&2){let e=ne();ee("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function qde(t,i){if(t&1&&we(0,"mat-pseudo-checkbox",3),t&2){let e=ne();ee("disabled",e.disabled)}}function eue(t,i){if(t&1&&(B(0,"span",4),Y(1),U()),t&2){let e=ne();j(),Qe("(",e.group.label,")")}}var tue=["mat-internal-form-field",""],iue=["*"];var x6=(()=>{class t{static STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)";static DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)";static ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)";static SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)"}return t})(),b6=(()=>{class t{static COMPLEX="375ms";static ENTERING="225ms";static EXITING="195ms"}return t})();var Ct=(()=>{class t{constructor(){Q(DA)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Vd,Vd]})}return t})(),Nm=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(i,e,r,n,a){this._defaultMatcher=i,this.ngControl=e,this._parentFormGroup=r,this._parentForm=n,this._stateChanges=a}updateErrorState(){let i=this.errorState,e=this._parentFormGroup||this._parentForm,r=this.matcher||this._defaultMatcher,n=this.ngControl?this.ngControl.control:null,a=r?.isErrorState(n,e)??!1;a!==i&&(this.errorState=a,this._stateChanges.next())}};var M_=(()=>{class t{isErrorState(e,r){return!!(e&&e.invalid&&(e.touched||r&&r.submitted))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Wr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["structural-styles"]],decls:0,vars:0,template:function(r,n){},styles:['.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}}'],encapsulation:2,changeDetection:0})}return t})();var oo=function(t){return t[t.FADING_IN=0]="FADING_IN",t[t.VISIBLE=1]="VISIBLE",t[t.FADING_OUT=2]="FADING_OUT",t[t.HIDDEN=3]="HIDDEN",t}(oo||{}),IA=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=oo.HIDDEN;constructor(i,e,r,n=!1){this._renderer=i,this.element=e,this.config=r,this._animationForciblyDisabledThroughCss=n}fadeOut(){this._renderer.fadeOutRipple(this)}},h6=xs({passive:!0,capture:!0}),RA=class{_events=new Map;addHandler(i,e,r,n){let a=this._events.get(e);if(a){let s=a.get(r);s?s.add(n):a.set(r,new Set([n]))}else this._events.set(e,new Map([[r,new Set([n])]])),i.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,h6)})}removeHandler(i,e,r){let n=this._events.get(i);if(!n)return;let a=n.get(e);a&&(a.delete(r),a.size===0&&n.delete(e),n.size===0&&(this._events.delete(i),document.removeEventListener(i,this._delegateEventHandler,h6)))}_delegateEventHandler=i=>{let e=Dr(i);e&&this._events.get(i.type)?.forEach((r,n)=>{(n===e||n.contains(e))&&r.forEach(a=>a.handleEvent(i))})}},D_={enterDuration:225,exitDuration:150},nue=800,f6=xs({passive:!0,capture:!0}),m6=["mousedown","touchstart"],p6=["mouseup","mouseleave","touchend","touchcancel"],rue=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(r,n){},styles:[".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}"],encapsulation:2,changeDetection:0})}return t})(),j0=class t{_target;_ngZone;_platform;_containerElement;_triggerElement;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect;static _eventManager=new RA;constructor(i,e,r,n,a){this._target=i,this._ngZone=e,this._platform=n,n.isBrowser&&(this._containerElement=dr(r)),a&&a.get(on).load(rue)}fadeInRipple(i,e,r={}){let n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=Me(Me({},D_),r.animation);r.centered&&(i=n.left+n.width/2,e=n.top+n.height/2);let s=r.radius||sue(i,e,n),o=i-n.left,d=e-n.top,l=a.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left=`${o-s}px`,c.style.top=`${d-s}px`,c.style.height=`${s*2}px`,c.style.width=`${s*2}px`,r.color!=null&&(c.style.backgroundColor=r.color),c.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(c);let h=window.getComputedStyle(c),u=h.transitionProperty,f=h.transitionDuration,p=u==="none"||f==="0s"||f==="0s, 0s"||n.width===0&&n.height===0,m=new IA(this,c,r,p);c.style.transform="scale3d(1, 1, 1)",m.state=oo.FADING_IN,r.persistent||(this._mostRecentTransientRipple=m);let g=null;return!p&&(l||a.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let v=()=>{g&&(g.fallbackTimer=null),clearTimeout(x),this._finishRippleTransition(m)},y=()=>this._destroyRipple(m),x=setTimeout(y,l+100);c.addEventListener("transitionend",v),c.addEventListener("transitioncancel",y),g={onTransitionEnd:v,onTransitionCancel:y,fallbackTimer:x}}),this._activeRipples.set(m,g),(p||!l)&&this._finishRippleTransition(m),m}fadeOutRipple(i){if(i.state===oo.FADING_OUT||i.state===oo.HIDDEN)return;let e=i.element,r=Me(Me({},D_),i.config.animation);e.style.transitionDuration=`${r.exitDuration}ms`,e.style.opacity="0",i.state=oo.FADING_OUT,(i._animationForciblyDisabledThroughCss||!r.exitDuration)&&this._finishRippleTransition(i)}fadeOutAll(){this._getActiveRipples().forEach(i=>i.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(i=>{i.config.persistent||i.fadeOut()})}setupTriggerEvents(i){let e=dr(i);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,m6.forEach(r=>{t._eventManager.addHandler(this._ngZone,r,e,this)}))}handleEvent(i){i.type==="mousedown"?this._onMousedown(i):i.type==="touchstart"?this._onTouchStart(i):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{p6.forEach(e=>{this._triggerElement.addEventListener(e,this,f6)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(i){i.state===oo.FADING_IN?this._startFadeOutTransition(i):i.state===oo.FADING_OUT&&this._destroyRipple(i)}_startFadeOutTransition(i){let e=i===this._mostRecentTransientRipple,{persistent:r}=i.config;i.state=oo.VISIBLE,!r&&(!e||!this._isPointerDown)&&i.fadeOut()}_destroyRipple(i){let e=this._activeRipples.get(i)??null;this._activeRipples.delete(i),this._activeRipples.size||(this._containerRect=null),i===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),i.state=oo.HIDDEN,e!==null&&(i.element.removeEventListener("transitionend",e.onTransitionEnd),i.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),i.element.remove()}_onMousedown(i){let e=yh(i),r=this._lastTouchStartEvent&&Date.now(){let e=i.state===oo.VISIBLE||i.config.terminateOnPointerUp&&i.state===oo.FADING_IN;!i.config.persistent&&e&&i.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let i=this._triggerElement;i&&(m6.forEach(e=>t._eventManager.removeHandler(e,i,this)),this._pointerUpEventsRegistered&&(p6.forEach(e=>i.removeEventListener(e,this,f6)),this._pointerUpEventsRegistered=!1))}};function sue(t,i,e){let r=Math.max(Math.abs(t-e.left),Math.abs(t-e.right)),n=Math.max(Math.abs(i-e.top),Math.abs(i-e.bottom));return Math.sqrt(r*r+n*n)}var X0=new Se("mat-ripple-global-options"),co=(()=>{class t{_elementRef=Q(Ze);_animationMode=Q(Mi,{optional:!0});color;unbounded;centered;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=Q(dt),r=Q(hi),n=Q(X0,{optional:!0}),a=Q(Wt);this._globalOptions=n||{},this._rippleRenderer=new j0(this,e,this._elementRef,r,a)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Me(Me(Me({},this._globalOptions.animation),this._animationMode==="NoopAnimations"?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,r=0,n){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,r,Me(Me({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,Me(Me({},this.rippleConfig),e))}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(r,n){r&2&&ut("mat-ripple-unbounded",n.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return t})(),ol=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,Ct]})}return t})(),aue=(()=>{class t{_animationMode=Q(Mi,{optional:!0});state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(r,n){r&2&&ut("mat-pseudo-checkbox-indeterminate",n.state==="indeterminate")("mat-pseudo-checkbox-checked",n.state==="checked")("mat-pseudo-checkbox-disabled",n.disabled)("mat-pseudo-checkbox-minimal",n.appearance==="minimal")("mat-pseudo-checkbox-full",n.appearance==="full")("_mat-animation-noopable",n._animationMode==="NoopAnimations")},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(r,n){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0})}return t})(),PA=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct]})}return t})(),Y0=new Se("MAT_OPTION_PARENT_COMPONENT"),$0=new Se("MatOptgroup");var W0=class{source;isUserInput;constructor(i,e=!1){this.source=i,this.isUserInput=e}},is=(()=>{class t{_element=Q(Ze);_changeDetectorRef=Q(Ut);_parent=Q(Y0,{optional:!0});group=Q($0,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_disabled=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=Q(wi).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(e){this._disabled=e}get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new Le;_text;_stateChanges=new Oe;constructor(){Q(on).load(Wr),Q(on).load(G0),this._signalDisableRipple=!!this._parent&&Id(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,r){let n=this._getHostElement();typeof n.focus=="function"&&n.focus(r)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!En(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new W0(this,e))}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-option"]],viewQuery:function(r,n){if(r&1&&vt(Qde,7),r&2){let a;je(a=We())&&(n._text=a.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(r,n){r&1&&ce("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),r&2&&(na("id",n.id),pt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ut("mdc-list-item--selected",n.selected)("mat-mdc-option-multiple",n.multiple)("mat-mdc-option-active",n.active)("mdc-list-item--disabled",n.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",$e]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],features:[At],ngContentSelectors:Zde,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(r,n){r&1&&(ti(Kde),de(0,Jde,1,2,"mat-pseudo-checkbox",1),wt(1),B(2,"span",2,0),wt(4,1),U(),de(5,qde,1,1,"mat-pseudo-checkbox",3)(6,eue,2,1,"span",4),we(7,"div",5)),r&2&&(Qt(n.multiple?0:-1),j(5),Qt(!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator?5:-1),j(),Qt(n.group&&n.group._inert?6:-1),j(),ee("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[aue,co],styles:['.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}return t})();function A_(t,i,e){if(e.length){let r=i.toArray(),n=e.toArray(),a=0;for(let s=0;se+r?Math.max(0,t-r+i):e}var Bm=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[ol,Ct,PA]})}return t})(),g6={capture:!0},v6=["focus","mousedown","mouseenter","touchstart"],MA="mat-ripple-loader-uninitialized",AA="mat-ripple-loader-class-name",y6="mat-ripple-loader-centered",E_="mat-ripple-loader-disabled",_6=(()=>{class t{_document=Q(St,{optional:!0});_animationMode=Q(Mi,{optional:!0});_globalRippleOptions=Q(X0,{optional:!0});_platform=Q(hi);_ngZone=Q(dt);_injector=Q(Wt);_hosts=new Map;constructor(){this._ngZone.runOutsideAngular(()=>{for(let e of v6)this._document?.addEventListener(e,this._onInteraction,g6)})}ngOnDestroy(){let e=this._hosts.keys();for(let r of e)this.destroyRipple(r);for(let r of v6)this._document?.removeEventListener(r,this._onInteraction,g6)}configureRipple(e,r){e.setAttribute(MA,this._globalRippleOptions?.namespace??""),(r.className||!e.hasAttribute(AA))&&e.setAttribute(AA,r.className||""),r.centered&&e.setAttribute(y6,""),r.disabled&&e.setAttribute(E_,"")}setDisabled(e,r){let n=this._hosts.get(e);n?(n.target.rippleDisabled=r,!r&&!n.hasSetUpEvents&&(n.hasSetUpEvents=!0,n.renderer.setupTriggerEvents(e))):r?e.setAttribute(E_,""):e.removeAttribute(E_)}_onInteraction=e=>{let r=Dr(e);if(r instanceof HTMLElement){let n=r.closest(`[${MA}="${this._globalRippleOptions?.namespace??""}"]`);n&&this._createRipple(n)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let r=this._document.createElement("span");r.classList.add("mat-ripple",e.getAttribute(AA)),e.append(r);let n=this._animationMode==="NoopAnimations",a=this._globalRippleOptions,s=n?0:a?.animation?.enterDuration??D_.enterDuration,o=n?0:a?.animation?.exitDuration??D_.exitDuration,d={rippleDisabled:n||a?.disabled||e.hasAttribute(E_),rippleConfig:{centered:e.hasAttribute(y6),terminateOnPointerUp:a?.terminateOnPointerUp,animation:{enterDuration:s,exitDuration:o}}},l=new j0(d,this._ngZone,r,this._platform,this._injector),c=!d.rippleDisabled;c&&l.setupTriggerEvents(e),this._hosts.set(e,{target:d,renderer:l,hasSetUpEvents:c}),e.removeAttribute(MA)}destroyRipple(e){let r=this._hosts.get(e);r&&(r.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Vm=(()=>{class t{labelPosition;static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(r,n){r&2&&ut("mdc-form-field--align-end",n.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:tue,ngContentSelectors:iue,decls:1,vars:0,template:function(r,n){r&1&&(ti(),wt(0))},styles:[".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}"],encapsulation:2,changeDetection:0})}return t})();var w6=["mat-button",""],C6=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],T6=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],oue='.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 12px);height:var(--mdc-text-button-container-height, 40px);font-family:var(--mdc-text-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display, block)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-filled-button-container-height, 40px);font-family:var(--mdc-filled-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-filled-button-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display, block)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-sys-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-filled-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-sys-level1));height:var(--mdc-protected-button-container-height, 40px);font-family:var(--mdc-protected-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-protected-button-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display, block)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-sys-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-protected-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-outlined-button-container-height, 40px);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-sys-corner-full));border-width:var(--mdc-outlined-button-outline-width, 1px);padding:0 var(--mat-outlined-button-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display, block)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-sys-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mdc-outlined-button-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width, 1px);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus>.mat-focus-indicator::before,.mat-mdc-unelevated-button:focus>.mat-focus-indicator::before,.mat-mdc-raised-button:focus>.mat-focus-indicator::before,.mat-mdc-outlined-button:focus>.mat-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}',S6="@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}";var lue=["mat-icon-button",""],cue=["*"];var due=new Se("MAT_BUTTON_CONFIG");var uue=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],kA=(()=>{class t{_elementRef=Q(Ze);_ngZone=Q(dt);_animationMode=Q(Mi,{optional:!0});_focusMonitor=Q(br);_rippleLoader=Q(_6);_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;constructor(){Q(on).load(Wr);let e=Q(due,{optional:!0}),r=this._elementRef.nativeElement,n=r.classList;this.disabledInteractive=e?.disabledInteractive??!1,this.color=e?.color??null,this._rippleLoader?.configureRipple(r,{className:"mat-mdc-button-ripple"});for(let{attribute:a,mdcClasses:s}of uue)r.hasAttribute(a)&&n.add(...s)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",r){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",$e],disabled:[2,"disabled","disabled",$e],ariaDisabled:[2,"aria-disabled","ariaDisabled",$e],disabledInteractive:[2,"disabledInteractive","disabledInteractive",$e]},features:[At]})}return t})();var hue=(()=>{class t extends kA{_renderer=Q(Ai);_cleanupClick;tabIndex;ngOnInit(){this._ngZone.runOutsideAngular(()=>{this._cleanupClick=this._renderer.listen(this._elementRef.nativeElement,"click",this._haltDisabledEvents)})}ngOnDestroy(){super.ngOnDestroy(),this._cleanupClick?.()}_haltDisabledEvents=e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())};_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this.disabled||null}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,inputs:{tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:Yi(e)]},features:[At,Ft]})}return t})(),di=(()=>{class t extends kA{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275cmp=Te({type:t,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(r,n){r&2&&(pt("disabled",n._getDisabledAttribute())("aria-disabled",n._getAriaDisabled()),Tn(n.color?"mat-"+n.color:""),ut("mat-mdc-button-disabled",n.disabled)("mat-mdc-button-disabled-interactive",n.disabledInteractive)("_mat-animation-noopable",n._animationMode==="NoopAnimations")("mat-unthemed",!n.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],features:[Ft],attrs:w6,ngContentSelectors:T6,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,n){r&1&&(ti(C6),we(0,"span",0),wt(1),B(2,"span",1),wt(3,1),U(),wt(4,2),we(5,"span",2)(6,"span",3)),r&2&&ut("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab)},styles:['.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 12px);height:var(--mdc-text-button-container-height, 40px);font-family:var(--mdc-text-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display, block)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-filled-button-container-height, 40px);font-family:var(--mdc-filled-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-filled-button-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display, block)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-sys-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-filled-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-sys-level1));height:var(--mdc-protected-button-container-height, 40px);font-family:var(--mdc-protected-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-protected-button-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display, block)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-sys-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-protected-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-outlined-button-container-height, 40px);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-sys-corner-full));border-width:var(--mdc-outlined-button-outline-width, 1px);padding:0 var(--mat-outlined-button-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display, block)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-sys-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mdc-outlined-button-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width, 1px);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus>.mat-focus-indicator::before,.mat-mdc-unelevated-button:focus>.mat-focus-indicator::before,.mat-mdc-raised-button:focus>.mat-focus-indicator::before,.mat-mdc-outlined-button:focus>.mat-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}',"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}"],encapsulation:2,changeDetection:0})}return t})(),E6=(()=>{class t extends hue{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275cmp=Te({type:t,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostVars:15,hostBindings:function(r,n){r&2&&(pt("disabled",n._getDisabledAttribute())("tabindex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex)("aria-disabled",n._getAriaDisabled()),Tn(n.color?"mat-"+n.color:""),ut("mat-mdc-button-disabled",n.disabled)("mat-mdc-button-disabled-interactive",n.disabledInteractive)("_mat-animation-noopable",n._animationMode==="NoopAnimations")("mat-unthemed",!n.color)("mat-mdc-button-base",!0))},exportAs:["matButton","matAnchor"],features:[Ft],attrs:w6,ngContentSelectors:T6,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,n){r&1&&(ti(C6),we(0,"span",0),wt(1),B(2,"span",1),wt(3,1),U(),wt(4,2),we(5,"span",2)(6,"span",3)),r&2&&ut("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab)},styles:[oue,S6],encapsulation:2,changeDetection:0})}return t})();var ln=(()=>{class t extends kA{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(r,n){r&2&&(pt("disabled",n._getDisabledAttribute())("aria-disabled",n._getAriaDisabled()),Tn(n.color?"mat-"+n.color:""),ut("mat-mdc-button-disabled",n.disabled)("mat-mdc-button-disabled-interactive",n.disabledInteractive)("_mat-animation-noopable",n._animationMode==="NoopAnimations")("mat-unthemed",!n.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],features:[Ft],attrs:lue,ngContentSelectors:cue,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,n){r&1&&(ti(),we(0,"span",0),wt(1),we(2,"span",1)(3,"span",2))},styles:['.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 40px);height:var(--mdc-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 40px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size, 24px);color:var(--mdc-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus>.mat-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display, block)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',S6],encapsulation:2,changeDetection:0})}return t})();var zm=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,ol,Ct]})}return t})();var li=function(t){return t[t.State=0]="State",t[t.Transition=1]="Transition",t[t.Sequence=2]="Sequence",t[t.Group=3]="Group",t[t.Animate=4]="Animate",t[t.Keyframes=5]="Keyframes",t[t.Style=6]="Style",t[t.Trigger=7]="Trigger",t[t.Reference=8]="Reference",t[t.AnimateChild=9]="AnimateChild",t[t.AnimateRef=10]="AnimateRef",t[t.Query=11]="Query",t[t.Stagger=12]="Stagger",t}(li||{}),jl="*";function hn(t,i){return{type:li.Trigger,name:t,definitions:i,options:{}}}function Ii(t,i=null){return{type:li.Animate,styles:i,timings:t}}function D6(t,i=null){return{type:li.Group,steps:t,options:i}}function M6(t,i=null){return{type:li.Sequence,steps:t,options:i}}function Rt(t){return{type:li.Style,styles:t,offset:null}}function qn(t,i,e){return{type:li.State,name:t,styles:i,options:e}}function R_(t){return{type:li.Keyframes,steps:t}}function Li(t,i,e=null){return{type:li.Transition,expr:t,animation:i,options:e}}function A6(t=null){return{type:li.AnimateChild,options:t}}function I6(t,i,e=null){return{type:li.Query,selector:t,animation:i,options:e}}var Ud=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(i=0,e=0){this.totalTime=i+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}},Q0=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(i){this.players=i;let e=0,r=0,n=0,a=this.players.length;a==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==a&&this._onFinish()}),s.onDestroy(()=>{++r==a&&this._onDestroy()}),s.onStart(()=>{++n==a&&this._onStart()})}),this.totalTime=this.players.reduce((s,o)=>Math.max(s,o.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){let e=i*this.totalTime;this.players.forEach(r=>{let n=r.totalTime?Math.min(1,e/r.totalTime):1;r.setPosition(n)})}getPosition(){let i=this.players.reduce((e,r)=>e===null||r.totalTime>e.totalTime?r:e,null);return i!=null?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}},P_="!";var K0=class{_attachedHost;attach(i){return this._attachedHost=i,i.attach(this)}detach(){let i=this._attachedHost;i!=null&&(this._attachedHost=null,i.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(i){this._attachedHost=i}},ll=class extends K0{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(i,e,r,n,a){super(),this.component=i,this.viewContainerRef=e,this.injector=r,this.projectableNodes=a}},ns=class extends K0{templateRef;viewContainerRef;context;injector;constructor(i,e,r,n){super(),this.templateRef=i,this.viewContainerRef=e,this.context=r,this.injector=n}get origin(){return this.templateRef.elementRef}attach(i,e=this.context){return this.context=e,super.attach(i)}detach(){return this.context=void 0,super.detach()}},FA=class extends K0{element;constructor(i){super(),this.element=i instanceof Ze?i.nativeElement:i}},zd=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(i){if(i instanceof ll)return this._attachedPortal=i,this.attachComponentPortal(i);if(i instanceof ns)return this._attachedPortal=i,this.attachTemplatePortal(i);if(this.attachDomPortal&&i instanceof FA)return this._attachedPortal=i,this.attachDomPortal(i)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(i){this._disposeFn=i}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var Z0=class extends zd{outletElement;_appRef;_defaultInjector;_document;constructor(i,e,r,n,a){super(),this.outletElement=i,this._appRef=r,this._defaultInjector=n,this._document=a}attachComponentPortal(i){let e;if(i.viewContainerRef){let r=i.injector||i.viewContainerRef.injector,n=r.get(el,null,{optional:!0})||void 0;e=i.viewContainerRef.createComponent(i.component,{index:i.viewContainerRef.length,injector:r,ngModuleRef:n,projectableNodes:i.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else e=yb(i.component,{elementInjector:i.injector||this._defaultInjector||Wt.NULL,environmentInjector:this._appRef.injector,projectableNodes:i.projectableNodes||void 0}),this._appRef.attachView(e.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(e.hostView),e.destroy()});return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=i,e}attachTemplatePortal(i){let e=i.viewContainerRef,r=e.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return r.rootNodes.forEach(n=>this.outletElement.appendChild(n)),r.detectChanges(),this.setDisposeFn(()=>{let n=e.indexOf(r);n!==-1&&e.remove(n)}),this._attachedPortal=i,r}attachDomPortal=i=>{let e=i.element;e.parentNode;let r=this._document.createComment("dom-portal");e.parentNode.insertBefore(r,e),this.outletElement.appendChild(e),this._attachedPortal=i,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(e,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(i){return i.hostView.rootNodes[0]}};var R6=(()=>{class t extends ns{constructor(){let e=Q(Oi),r=Q(Xi);super(e,r)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[Ft]})}return t})();var Ma=(()=>{class t extends zd{_moduleRef=Q(el,{optional:!0});_document=Q(St);_viewContainerRef=Q(Xi);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new Le;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let r=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,n=r.createComponent(e.component,{index:r.length,injector:e.injector||r.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(e){e.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=e=>{let r=e.element;r.parentNode;let n=this._document.createComment("dom-portal");e.setAttachedHost(this),r.parentNode.insertBefore(n,r),this._getRootNode().appendChild(r),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(r,n)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ft]})}return t})();var cl=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({})}return t})();var fue=20,Wl=(()=>{class t{_ngZone=Q(dt);_platform=Q(hi);_renderer=Q(Ps).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new Oe;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let r=this.scrollContainers.get(e);r&&(r.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=fue){return this._platform.isBrowser?new $t(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let n=e>0?this._scrolled.pipe(jx(e)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):bt()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(e,r){let n=this.getAncestorScrollContainers(e);return this.scrolled(r).pipe(Xt(a=>!a||n.indexOf(a)>-1))}getAncestorScrollContainers(e){let r=[];return this.scrollContainers.forEach((n,a)=>{this._scrollableContainsElement(a,e)&&r.push(a)}),r}_scrollableContainsElement(e,r){let n=dr(r),a=e.getElementRef().nativeElement;do if(n==a)return!0;while(n=n.parentElement);return!1}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Uc=(()=>{class t{elementRef=Q(Ze);scrollDispatcher=Q(Wl);ngZone=Q(dt);dir=Q(vn,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new Oe;_renderer=Q(Ai);_cleanupScroll;_elementScrolled=new Oe;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let r=this.elementRef.nativeElement,n=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=n?e.end:e.start),e.right==null&&(e.right=n?e.start:e.end),e.bottom!=null&&(e.top=r.scrollHeight-r.clientHeight-e.bottom),n&&Mm()!=sl.NORMAL?(e.left!=null&&(e.right=r.scrollWidth-r.clientWidth-e.left),Mm()==sl.INVERTED?e.left=e.right:Mm()==sl.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=r.scrollWidth-r.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let r=this.elementRef.nativeElement;m_()?r.scrollTo(e):(e.top!=null&&(r.scrollTop=e.top),e.left!=null&&(r.scrollLeft=e.left))}measureScrollOffset(e){let r="left",n="right",a=this.elementRef.nativeElement;if(e=="top")return a.scrollTop;if(e=="bottom")return a.scrollHeight-a.clientHeight-a.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?n:r:e=="end"&&(e=s?r:n),s&&Mm()==sl.INVERTED?e==r?a.scrollWidth-a.clientWidth-a.scrollLeft:a.scrollLeft:s&&Mm()==sl.NEGATED?e==r?a.scrollLeft+a.scrollWidth-a.clientWidth:-a.scrollLeft:e==r?a.scrollLeft:a.scrollWidth-a.clientWidth-a.scrollLeft}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return t})(),mue=20,Os=(()=>{class t{_platform=Q(hi);_listeners;_viewportSize;_change=new Oe;_document=Q(St,{optional:!0});constructor(){let e=Q(dt),r=Q(Ps).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let n=a=>this._change.next(a);this._listeners=[r.listen("window","resize",n),r.listen("window","orientationchange",n)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:r,height:n}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+n,right:e.left+r,height:n,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,r=this._getWindow(),n=e.documentElement,a=n.getBoundingClientRect(),s=-a.top||e.body.scrollTop||r.scrollY||n.scrollTop||0,o=-a.left||e.body.scrollLeft||r.scrollX||n.scrollLeft||0;return{top:s,left:o}}change(e=mue){return e>0?this._change.pipe(jx(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var aa=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({})}return t})(),J0=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Vd,aa,Vd,aa]})}return t})();var P6=m_(),OA=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(i,e){this._viewportRuler=i,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let i=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=i.style.left||"",this._previousHTMLStyles.top=i.style.top||"",i.style.left=xr(-this._previousScrollPosition.left),i.style.top=xr(-this._previousScrollPosition.top),i.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let i=this._document.documentElement,e=this._document.body,r=i.style,n=e.style,a=r.scrollBehavior||"",s=n.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,i.classList.remove("cdk-global-scrollblock"),P6&&(r.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),P6&&(r.scrollBehavior=a,n.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.body,r=this._viewportRuler.getViewportSize();return e.scrollHeight>r.height||e.scrollWidth>r.width}};var LA=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(i,e,r,n){this._scrollDispatcher=i,this._ngZone=e,this._viewportRuler=r,this._config=n}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(this._scrollSubscription)return;let i=this._scrollDispatcher.scrolled(0).pipe(Xt(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=i.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=i.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},k_=class{enable(){}disable(){}attach(){}};function NA(t,i){return i.some(e=>{let r=t.bottome.bottom,a=t.righte.right;return r||n||a||s})}function k6(t,i){return i.some(e=>{let r=t.tope.bottom,a=t.lefte.right;return r||n||a||s})}var BA=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(i,e,r,n){this._scrollDispatcher=i,this._viewportRuler=e,this._ngZone=r,this._config=n}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(!this._scrollSubscription){let i=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(i).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:n}=this._viewportRuler.getViewportSize();NA(e,[{width:r,height:n,bottom:n,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},gue=(()=>{class t{_scrollDispatcher=Q(Wl);_viewportRuler=Q(Os);_ngZone=Q(dt);_document=Q(St);constructor(){}noop=()=>new k_;close=e=>new LA(this._scrollDispatcher,this._ngZone,this._viewportRuler,e);block=()=>new OA(this._viewportRuler,this._document);reposition=e=>new BA(this._scrollDispatcher,this._viewportRuler,this._ngZone,e);static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ro=class{positionStrategy;scrollStrategy=new k_;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(i){if(i){let e=Object.keys(i);for(let r of e)i[r]!==void 0&&(this[r]=i[r])}}};var VA=class{connectionPair;scrollableViewProperties;constructor(i,e){this.connectionPair=i,this.scrollableViewProperties=e}};var V6=(()=>{class t{_attachedOverlays=[];_document=Q(St);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let r=this._attachedOverlays.indexOf(e);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),vue=(()=>{class t extends V6{_ngZone=Q(dt);_renderer=Q(Ps).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let r=this._attachedOverlays;for(let n=r.length-1;n>-1;n--)if(r[n]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[n]._keydownEvents.next(e));break}};static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),yue=(()=>{class t extends V6{_platform=Q(hi);_ngZone=Q(dt,{optional:!0});_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;add(e){if(super.add(e),!this._isAttached){let r=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(r)):this._addEventListeners(r),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}_pointerDownListener=e=>{this._pointerDownEventTarget=Dr(e)};_clickListener=e=>{let r=Dr(e),n=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let a=this._attachedOverlays.slice();for(let s=a.length-1;s>-1;s--){let o=a[s];if(o._outsidePointerEvents.observers.length<1||!o.hasAttached())continue;if(F6(o.overlayElement,r)||F6(o.overlayElement,n))break;let d=o._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>d.next(e)):d.next(e)}};static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function F6(t,i){let e=typeof ShadowRoot<"u"&&ShadowRoot,r=i;for(;r;){if(r===t)return!0;r=e&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var U6=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,n){},styles:[".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}"],encapsulation:2,changeDetection:0})}return t})(),F_=(()=>{class t{_platform=Q(hi);_containerElement;_document=Q(St);_styleLoader=Q(on);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||pA()){let n=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let a=0;an0(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(i){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(i);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=pn(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let i=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),i}dispose(){let i=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=null,i&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(i){i!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=i,this.hasAttached()&&(i.attach(this),this.updatePosition()))}updateSize(i){this._config=Me(Me({},this._config),i),this._updateElementSize()}setDirection(i){this._config=Mt(Me({},this._config),{direction:i}),this._updateElementDirection()}addPanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!0)}removePanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!1)}getDirection(){let i=this._config.direction;return i?typeof i=="string"?i:i.value:"ltr"}updateScrollStrategy(i){i!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=i,this.hasAttached()&&(i.attach(this),i.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let i=this._pane.style;i.width=xr(this._config.width),i.height=xr(this._config.height),i.minWidth=xr(this._config.minWidth),i.minHeight=xr(this._config.minHeight),i.maxWidth=xr(this._config.maxWidth),i.maxHeight=xr(this._config.maxHeight)}_togglePointerEvents(i){this._pane.style.pointerEvents=i?"":"none"}_attachBackdrop(){let i="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._cleanupBackdropClick?.(),this._cleanupBackdropClick=this._renderer.listen(this._backdropElement,"click",e=>this._backdropClick.next(e)),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(i)})}):this._backdropElement.classList.add(i)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let i=this._backdropElement;if(i){if(this._animationsDisabled){this._disposeBackdrop(i);return}i.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{this._cleanupBackdropTransitionEnd?.(),this._cleanupBackdropTransitionEnd=this._renderer.listen(i,"transitionend",e=>{this._disposeBackdrop(e.target)})}),i.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(i)},500))}}_toggleClasses(i,e,r){let n=Ld(e||[]).filter(a=>!!a);n.length&&(r?i.classList.add(...n):i.classList.remove(...n))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let i=this._renders.pipe(Vt(Fi(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),i.unsubscribe())})})}_disposeScrollStrategy(){let i=this._scrollStrategy;i&&(i.disable(),i.detach&&i.detach())}_disposeBackdrop(i){this._cleanupBackdropClick?.(),this._cleanupBackdropTransitionEnd?.(),i&&(i.remove(),this._backdropElement===i&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},O6="cdk-overlay-connected-position-bounding-box",xue=/([A-Za-z%]+)$/,UA=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new Oe;_resizeSubscription=kt.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(i,e,r,n,a){this._viewportRuler=e,this._document=r,this._platform=n,this._overlayContainer=a,this.setOrigin(i)}attach(i){this._overlayRef&&this._overlayRef,this._validatePositions(),i.hostElement.classList.add(O6),this._overlayRef=i,this._boundingBox=i.hostElement,this._pane=i.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let i=this._originRect,e=this._overlayRect,r=this._viewportRect,n=this._containerRect,a=[],s;for(let o of this._preferredPositions){let d=this._getOriginPoint(i,n,o),l=this._getOverlayPoint(d,e,o),c=this._getOverlayFit(l,e,r,o);if(c.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(o,d);return}if(this._canFitWithFlexibleDimensions(c,l,r)){a.push({position:o,origin:d,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(d,o)});continue}(!s||s.overlayFit.visibleAread&&(d=c,o=l)}this._isPushed=!1,this._applyPosition(o.position,o.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(O6),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let i=this._lastPosition;if(i){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,i);this._applyPosition(i,e)}else this.apply()}withScrollableContainers(i){return this._scrollables=i,this}withPositions(i){return this._preferredPositions=i,i.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(i){return this._viewportMargin=i,this}withFlexibleDimensions(i=!0){return this._hasFlexibleDimensions=i,this}withGrowAfterOpen(i=!0){return this._growAfterOpen=i,this}withPush(i=!0){return this._canPush=i,this}withLockedPosition(i=!0){return this._positionLocked=i,this}setOrigin(i){return this._origin=i,this}withDefaultOffsetX(i){return this._offsetX=i,this}withDefaultOffsetY(i){return this._offsetY=i,this}withTransformOriginOn(i){return this._transformOriginSelector=i,this}_getOriginPoint(i,e,r){let n;if(r.originX=="center")n=i.left+i.width/2;else{let s=this._isRtl()?i.right:i.left,o=this._isRtl()?i.left:i.right;n=r.originX=="start"?s:o}e.left<0&&(n-=e.left);let a;return r.originY=="center"?a=i.top+i.height/2:a=r.originY=="top"?i.top:i.bottom,e.top<0&&(a-=e.top),{x:n,y:a}}_getOverlayPoint(i,e,r){let n;r.overlayX=="center"?n=-e.width/2:r.overlayX==="start"?n=this._isRtl()?-e.width:0:n=this._isRtl()?0:-e.width;let a;return r.overlayY=="center"?a=-e.height/2:a=r.overlayY=="top"?0:-e.height,{x:i.x+n,y:i.y+a}}_getOverlayFit(i,e,r,n){let a=N6(e),{x:s,y:o}=i,d=this._getOffset(n,"x"),l=this._getOffset(n,"y");d&&(s+=d),l&&(o+=l);let c=0-s,h=s+a.width-r.width,u=0-o,f=o+a.height-r.height,p=this._subtractOverflows(a.width,c,h),m=this._subtractOverflows(a.height,u,f),g=p*m;return{visibleArea:g,isCompletelyWithinViewport:a.width*a.height===g,fitsInViewportVertically:m===a.height,fitsInViewportHorizontally:p==a.width}}_canFitWithFlexibleDimensions(i,e,r){if(this._hasFlexibleDimensions){let n=r.bottom-e.y,a=r.right-e.x,s=L6(this._overlayRef.getConfig().minHeight),o=L6(this._overlayRef.getConfig().minWidth),d=i.fitsInViewportVertically||s!=null&&s<=n,l=i.fitsInViewportHorizontally||o!=null&&o<=a;return d&&l}return!1}_pushOverlayOnScreen(i,e,r){if(this._previousPushAmount&&this._positionLocked)return{x:i.x+this._previousPushAmount.x,y:i.y+this._previousPushAmount.y};let n=N6(e),a=this._viewportRect,s=Math.max(i.x+n.width-a.width,0),o=Math.max(i.y+n.height-a.height,0),d=Math.max(a.top-r.top-i.y,0),l=Math.max(a.left-r.left-i.x,0),c=0,h=0;return n.width<=a.width?c=l||-s:c=i.xp&&!this._isInitialRender&&!this._growAfterOpen&&(s=i.y-p/2)}let d=e.overlayX==="start"&&!n||e.overlayX==="end"&&n,l=e.overlayX==="end"&&!n||e.overlayX==="start"&&n,c,h,u;if(l)u=r.width-i.x+this._viewportMargin*2,c=i.x-this._viewportMargin;else if(d)h=i.x,c=r.right-i.x;else{let f=Math.min(r.right-i.x+r.left,i.x),p=this._lastBoundingBoxSize.width;c=f*2,h=i.x-f,c>p&&!this._isInitialRender&&!this._growAfterOpen&&(h=i.x-p/2)}return{top:s,left:h,bottom:o,right:u,width:c,height:a}}_setBoundingBoxStyles(i,e){let r=this._calculateBoundingBoxRect(i,e);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{let a=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;n.height=xr(r.height),n.top=xr(r.top),n.bottom=xr(r.bottom),n.width=xr(r.width),n.left=xr(r.left),n.right=xr(r.right),e.overlayX==="center"?n.alignItems="center":n.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?n.justifyContent="center":n.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",a&&(n.maxHeight=xr(a)),s&&(n.maxWidth=xr(s))}this._lastBoundingBoxSize=r,bh(this._boundingBox.style,n)}_resetBoundingBoxStyles(){bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){bh(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(i,e){let r={},n=this._hasExactPosition(),a=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(n){let c=this._viewportRuler.getViewportScrollPosition();bh(r,this._getExactOverlayY(e,i,c)),bh(r,this._getExactOverlayX(e,i,c))}else r.position="static";let o="",d=this._getOffset(e,"x"),l=this._getOffset(e,"y");d&&(o+=`translateX(${d}px) `),l&&(o+=`translateY(${l}px)`),r.transform=o.trim(),s.maxHeight&&(n?r.maxHeight=xr(s.maxHeight):a&&(r.maxHeight="")),s.maxWidth&&(n?r.maxWidth=xr(s.maxWidth):a&&(r.maxWidth="")),bh(this._pane.style,r)}_getExactOverlayY(i,e,r){let n={top:"",bottom:""},a=this._getOverlayPoint(e,this._overlayRect,i);if(this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,r)),i.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;n.bottom=`${s-(a.y+this._overlayRect.height)}px`}else n.top=xr(a.y);return n}_getExactOverlayX(i,e,r){let n={left:"",right:""},a=this._getOverlayPoint(e,this._overlayRect,i);this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,r));let s;if(this._isRtl()?s=i.overlayX==="end"?"left":"right":s=i.overlayX==="end"?"right":"left",s==="right"){let o=this._document.documentElement.clientWidth;n.right=`${o-(a.x+this._overlayRect.width)}px`}else n.left=xr(a.x);return n}_getScrollVisibility(){let i=this._getOriginRect(),e=this._pane.getBoundingClientRect(),r=this._scrollables.map(n=>n.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:k6(i,r),isOriginOutsideView:NA(i,r),isOverlayClipped:k6(e,r),isOverlayOutsideView:NA(e,r)}}_subtractOverflows(i,...e){return e.reduce((r,n)=>r-Math.max(n,0),i)}_getNarrowedViewportRect(){let i=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._viewportMargin,left:r.left+this._viewportMargin,right:r.left+i-this._viewportMargin,bottom:r.top+e-this._viewportMargin,width:i-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(i,e){return e==="x"?i.offsetX==null?this._offsetX:i.offsetX:i.offsetY==null?this._offsetY:i.offsetY}_validatePositions(){}_addPanelClasses(i){this._pane&&Ld(i).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(i=>{this._pane.classList.remove(i)}),this._appliedPanelClasses=[])}_getOriginRect(){let i=this._origin;if(i instanceof Ze)return i.nativeElement.getBoundingClientRect();if(i instanceof Element)return i.getBoundingClientRect();let e=i.width||0,r=i.height||0;return{top:i.y,bottom:i.y+r,left:i.x,right:i.x+e,height:r,width:e}}};function bh(t,i){for(let e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return t}function L6(t){if(typeof t!="number"&&t!=null){let[i,e]=t.split(xue);return!e||e==="px"?parseFloat(i):null}return t||null}function N6(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function bue(t,i){return t===i?!0:t.isOriginClipped===i.isOriginClipped&&t.isOriginOutsideView===i.isOriginOutsideView&&t.isOverlayClipped===i.isOverlayClipped&&t.isOverlayOutsideView===i.isOverlayOutsideView}var B6="cdk-global-overlay-wrapper",zA=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(i){let e=i.getConfig();this._overlayRef=i,this._width&&!e.width&&i.updateSize({width:this._width}),this._height&&!e.height&&i.updateSize({height:this._height}),i.hostElement.classList.add(B6),this._isDisposed=!1}top(i=""){return this._bottomOffset="",this._topOffset=i,this._alignItems="flex-start",this}left(i=""){return this._xOffset=i,this._xPosition="left",this}bottom(i=""){return this._topOffset="",this._bottomOffset=i,this._alignItems="flex-end",this}right(i=""){return this._xOffset=i,this._xPosition="right",this}start(i=""){return this._xOffset=i,this._xPosition="start",this}end(i=""){return this._xOffset=i,this._xPosition="end",this}width(i=""){return this._overlayRef?this._overlayRef.updateSize({width:i}):this._width=i,this}height(i=""){return this._overlayRef?this._overlayRef.updateSize({height:i}):this._height=i,this}centerHorizontally(i=""){return this.left(i),this._xPosition="center",this}centerVertically(i=""){return this.top(i),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:n,height:a,maxWidth:s,maxHeight:o}=r,d=(n==="100%"||n==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(a==="100%"||a==="100vh")&&(!o||o==="100%"||o==="100vh"),c=this._xPosition,h=this._xOffset,u=this._overlayRef.getConfig().direction==="rtl",f="",p="",m="";d?m="flex-start":c==="center"?(m="center",u?p=h:f=h):u?c==="left"||c==="end"?(m="flex-end",f=h):(c==="right"||c==="start")&&(m="flex-start",p=h):c==="left"||c==="start"?(m="flex-start",f=h):(c==="right"||c==="end")&&(m="flex-end",p=h),i.position=this._cssPosition,i.marginLeft=d?"0":f,i.marginTop=l?"0":this._topOffset,i.marginBottom=this._bottomOffset,i.marginRight=d?"0":p,e.justifyContent=m,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,r=e.style;e.classList.remove(B6),r.justifyContent=r.alignItems=i.marginTop=i.marginBottom=i.marginLeft=i.marginRight=i.position="",this._overlayRef=null,this._isDisposed=!0}},_ue=(()=>{class t{_viewportRuler=Q(Os);_document=Q(St);_platform=Q(hi);_overlayContainer=Q(F_);constructor(){}global(){return new zA}flexibleConnectedTo(e){return new UA(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Dn=(()=>{class t{scrollStrategies=Q(gue);_overlayContainer=Q(F_);_positionBuilder=Q(_ue);_keyboardDispatcher=Q(vue);_injector=Q(Wt);_ngZone=Q(dt);_document=Q(St);_directionality=Q(vn);_location=Q(Pd);_outsideClickDispatcher=Q(yue);_animationsModuleType=Q(Mi,{optional:!0});_idGenerator=Q(wi);_renderer=Q(Ps).createRenderer(null,null);_appRef;_styleLoader=Q(on);constructor(){}create(e){this._styleLoader.load(U6);let r=this._createHostElement(),n=this._createPaneElement(r),a=this._createPortalOutlet(n),s=new Ro(e);return s.direction=s.direction||this._directionality.value,new Gm(a,r,n,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(vr),this._renderer)}position(){return this._positionBuilder}_createPaneElement(e){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),e.appendChild(r),r}_createHostElement(){let e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(ia)),new Z0(e,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),wue=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],z6=new Se("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let t=Q(Dn);return()=>t.scrollStrategies.reposition()}}),q0=(()=>{class t{elementRef=Q(Ze);constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return t})(),GA=(()=>{class t{_overlay=Q(Dn);_dir=Q(vn,{optional:!0});_overlayRef;_templatePortal;_backdropSubscription=kt.EMPTY;_attachSubscription=kt.EMPTY;_detachSubscription=kt.EMPTY;_positionSubscription=kt.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=Q(z6);_disposeOnNavigation=!1;_ngZone=Q(dt);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(e){this._disposeOnNavigation=e}backdropClick=new Le;positionChange=new Le;attach=new Le;detach=new Le;overlayKeydown=new Le;overlayOutsideClick=new Le;constructor(){let e=Q(Oi),r=Q(Xi);this._templatePortal=new ns(e,r),this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=wue);let e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(r=>{this.overlayKeydown.next(r),r.keyCode===27&&!this.disableClose&&!En(r)&&(r.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(r=>{let n=this._getOriginElement(),a=Dr(r);(!n||n!==a&&!n.contains(a))&&this.overlayOutsideClick.next(r)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),r=new Ro({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(r.width=this.width),(this.height||this.height===0)&&(r.height=this.height),(this.minWidth||this.minWidth===0)&&(r.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(r.minHeight=this.minHeight),this.backdropClass&&(r.backdropClass=this.backdropClass),this.panelClass&&(r.panelClass=this.panelClass),r}_updatePositionStrategy(e){let r=this.positions.map(n=>({originX:n.originX,originY:n.originY,overlayX:n.overlayX,overlayY:n.overlayY,offsetX:n.offsetX||this.offsetX,offsetY:n.offsetY||this.offsetY,panelClass:n.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(r).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=this._overlay.position().flexibleConnectedTo(this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof q0?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof q0?this.origin.elementRef.nativeElement:this.origin instanceof Ze?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(Bf(()=>this.positionChange.observers.length>0)).subscribe(e=>{this._ngZone.run(()=>this.positionChange.emit(e)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",$e],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",$e],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",$e],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",$e],push:[2,"cdkConnectedOverlayPush","push",$e],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",$e]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[At,ei]})}return t})();function Cue(t){return()=>t.scrollStrategies.reposition()}var Tue={provide:z6,deps:[Dn],useFactory:Cue},Ia=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[Dn,Tue],imports:[Vd,cl,J0,J0]})}return t})();function Sue(t,i){if(t&1){let e=Ce();B(0,"div",1)(1,"button",2),ce("click",function(){ue(e);let n=ne();return he(n.action())}),Y(2),U()()}if(t&2){let e=ne();j(2),Qe(" ",e.data.action," ")}}var Eue=["label"];function Due(t,i){}var Mue=Math.pow(2,31)-1,_h=class{_overlayRef;instance;containerInstance;_afterDismissed=new Oe;_afterOpened=new Oe;_onAction=new Oe;_durationTimeoutId;_dismissedByAction=!1;constructor(i,e){this._overlayRef=e,this.containerInstance=i,i._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(i){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(i,Mue))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},O_=new Se("MatSnackBarData"),Hm=class{politeness="assertive";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},Aue=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return t})(),Iue=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return t})(),Rue=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return t})(),G6=(()=>{class t{snackBarRef=Q(_h);data=Q(O_);constructor(){}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(r,n){r&1&&(B(0,"div",0),Y(1),U(),de(2,Sue,3,1,"div",1)),r&2&&(j(),Qe(" ",n.data.message,` +`),j(),Qt(n.hasAction?2:-1))},dependencies:[di,Aue,Iue,Rue],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0})}return t})(),Pue={snackBarState:hn("state",[qn("void, hidden",Rt({transform:"scale(0.8)",opacity:0})),qn("visible",Rt({transform:"scale(1)",opacity:1})),Li("* => visible",Ii("150ms cubic-bezier(0, 0, 0.2, 1)")),Li("* => void, * => hidden",Ii("75ms cubic-bezier(0.4, 0.0, 1, 1)",Rt({opacity:0})))])},kue=(()=>{class t extends zd{_ngZone=Q(dt);_elementRef=Q(Ze);_changeDetectorRef=Q(Ut);_platform=Q(hi);snackBarConfig=Q(Hm);_document=Q(St);_trackedModals=new Set;_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new Oe;_onExit=new Oe;_onEnter=new Oe;_animationState="void";_live;_label;_role;_liveElementId=Q(wi).getId("mat-snack-bar-container-live-");constructor(){super();let e=this.snackBarConfig;e.politeness==="assertive"&&!e.announcementMessage?this._live="assertive":e.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let r=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),r}attachTemplatePortal(e){this._assertNotAttached();let r=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),r}attachDomPortal=e=>{this._assertNotAttached();let r=this._portalOutlet.attachDomPortal(e);return this._afterPortalAttached(),r};onAnimationEnd(e){let{fromState:r,toState:n}=e;if((n==="void"&&r!=="void"||n==="hidden")&&this._completeExit(),n==="visible"){let a=this._onEnter;this._ngZone.run(()=>{a.next(),a.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,r=this.snackBarConfig.panelClass;r&&(Array.isArray(r)?r.forEach(s=>e.classList.add(s)):e.classList.add(r)),this._exposeToModals();let n=this._label.nativeElement,a="mdc-snackbar__label";n.classList.toggle(a,!n.querySelector(`.${a}`))}_exposeToModals(){let e=this._liveElementId,r=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n{let r=e.getAttribute("aria-owns");if(r){let n=r.replace(this._liveElementId,"").trim();n.length>0?e.setAttribute("aria-owns",n):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),r=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&r){let n=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(n=document.activeElement),e.removeAttribute("aria-hidden"),r.appendChild(e),n?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-snack-bar-container"]],viewQuery:function(r,n){if(r&1&&(vt(Ma,7),vt(Eue,7)),r&2){let a;je(a=We())&&(n._portalOutlet=a.first),je(a=We())&&(n._label=a.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:1,hostBindings:function(r,n){r&1&&jD("@state.done",function(s){return n.onAnimationEnd(s)}),r&2&&HD("@state",n._animationState)},features:[Ft],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(r,n){r&1&&(B(0,"div",1)(1,"div",2,0)(3,"div",3),de(4,Due,0,0,"ng-template",4),U(),we(5,"div"),U()()),r&2&&(j(5),pt("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Ma],styles:[".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mdc-snackbar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mdc-snackbar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mdc-snackbar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mdc-snackbar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mdc-snackbar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"],encapsulation:2,data:{animation:[Pue.snackBarState]}})}return t})();function Fue(){return new Hm}var Oue=new Se("mat-snack-bar-default-options",{providedIn:"root",factory:Fue}),oa=(()=>{class t{_overlay=Q(Dn);_live=Q(T_);_injector=Q(Wt);_breakpointObserver=Q(Rm);_parentSnackBar=Q(t,{optional:!0,skipSelf:!0});_defaultConfig=Q(Oue);_snackBarRefAtThisLevel=null;simpleSnackBarComponent=G6;snackBarContainerComponent=kue;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(){}openFromComponent(e,r){return this._attach(e,r)}openFromTemplate(e,r){return this._attach(e,r)}open(e,r="",n){let a=Me(Me({},this._defaultConfig),n);return a.data={message:e,action:r},a.announcementMessage===e&&(a.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,a)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,r){let n=r&&r.viewContainerRef&&r.viewContainerRef.injector,a=Wt.create({parent:n||this._injector,providers:[{provide:Hm,useValue:r}]}),s=new ll(this.snackBarContainerComponent,r.viewContainerRef,a),o=e.attach(s);return o.instance.snackBarConfig=r,o.instance}_attach(e,r){let n=Me(Me(Me({},new Hm),this._defaultConfig),r),a=this._createOverlay(n),s=this._attachSnackBarContainer(a,n),o=new _h(s,a);if(e instanceof Oi){let d=new ns(e,null,{$implicit:n.data,snackBarRef:o});o.instance=s.attachTemplatePortal(d)}else{let d=this._createInjector(n,o),l=new ll(e,void 0,d),c=s.attachComponentPortal(l);o.instance=c.instance}return this._breakpointObserver.observe(g_.HandsetPortrait).pipe(Vt(a.detachments())).subscribe(d=>{a.overlayElement.classList.toggle(this.handsetCssClass,d.matches)}),n.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(n.announcementMessage,n.politeness)}),this._animateSnackBar(o,n),this._openedSnackBarRef=o,this._openedSnackBarRef}_animateSnackBar(e,r){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),r.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),r.duration&&r.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(r.duration))}_createOverlay(e){let r=new Ro;r.direction=e.direction;let n=this._overlay.position().global(),a=e.direction==="rtl",s=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!a||e.horizontalPosition==="end"&&a,o=!s&&e.horizontalPosition!=="center";return s?n.left("0"):o?n.right("0"):n.centerHorizontally(),e.verticalPosition==="top"?n.top("0"):n.bottom("0"),r.positionStrategy=n,this._overlay.create(r)}_createInjector(e,r){let n=e&&e.viewContainerRef&&e.viewContainerRef.injector;return Wt.create({parent:n||this._injector,providers:[{provide:_h,useValue:r},{provide:O_,useValue:e.data}]})}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var H6=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[oa],imports:[Ia,cl,zm,Ct,G6,Ct]})}return t})();var Bi=(()=>{class t{constructor(e,r){this.sbRef=e,this.data=r}static{this.\u0275fac=function(r){return new(r||t)(be(_h),be(O_))}}static{this.\u0275cmp=Te({type:t,selectors:[["snack-alert"]],standalone:!1,decls:2,vars:1,consts:[[1,"example-alert"]],template:function(r,n){r&1&&(B(0,"span",0),Y(1),U()),r&2&&(j(),ze(n.data))},styles:[".example-alert[_ngcontent-%COMP%]{color:#fff}"]})}}return t})();var Ri=(()=>{class t{constructor(e,r){this.http=e,this._snackBar=r,this.snowstormFhirBase="https://snowstorm.ihtsdotools.org/fhir",this.defaultFhirUrlParam="http://snomed.info/sct",this.fhirUrlParam=this.defaultFhirUrlParam,this.lang="en",this.snowstormFhirBaseSubject=new Ci(this.snowstormFhirBase),this.fhirUrlParamSubject=new Ci(this.fhirUrlParam),this.langSubject=new Ci(this.lang),this.expandValuesetCache=new Map,this.CACHE_LIMIT=100,this.CACHE_DURATION=20*60*60*1e3,this.CACHE_KEY="valueSetCache",this.snowstormFhirBase$=this.snowstormFhirBaseSubject.asObservable(),this.fhirUrlParam$=this.fhirUrlParamSubject.asObservable(),this.lang$=this.langSubject.asObservable(),this.conceptCache=new Map,this.loadCache()}setSnowstormFhirBase(e){this.snowstormFhirBase=e,this.snowstormFhirBaseSubject.next(e)}setFhirUrlParam(e){this.fhirUrlParam=e,this.fhirUrlParamSubject.next(e)}setLang(e){this.lang=e,this.langSubject.next(e)}getSnowstormFhirBase(){return this.snowstormFhirBase}getFhirUrlParam(){return this.fhirUrlParam}getLang(){return this.lang}getCodeSystems(){let e=`${this.snowstormFhirBase}/CodeSystem`;return this.http.get(e).pipe(Rn(this.handleError("getCodeSystems",{})))}getCodeSystem(e){let r=`${this.snowstormFhirBase}/CodeSystem?version=${e}`;return this.http.get(r).pipe(Rn(this.handleError("getCodeSystem",{})))}getValueSetExpansionUrl(e,r,n,a){return n||(n=0),a||(a=20),typeof r!="string"&&(r=""),`${this.snowstormFhirBase}/ValueSet/$expand?url=${this.fhirUrlParam}?fhir_vs=ecl/${encodeURIComponent(e)}&count=${a}&offset=${n}&filter=${r}&language=${this.lang}&displayLanguage=${this.lang}`}expandValueSet(e,r,n,a){let s=this.getValueSetExpansionUrl(e,r,n,a);return this.http.get(s).pipe(Rn(this.handleError("expandValueSet",{})))}expandValueSetUsingCache(e,r,n,a){let s=this.getValueSetExpansionUrl(e,r,n,a),o=this.expandValuesetCache.get(s);return o&&Date.now()-o.timestamp{this.manageCacheLimit(),this.expandValuesetCache.set(s,{timestamp:Date.now(),data:d}),this.saveCache()}),Rn(this.handleError("expandValueSet",{})))}manageCacheLimit(){if(this.expandValuesetCache.size>=this.CACHE_LIMIT){let e=this.expandValuesetCache.keys().next().value;e&&this.expandValuesetCache.delete(e)}}saveCache(){try{let e=Array.from(this.expandValuesetCache.entries());localStorage.setItem(this.CACHE_KEY,JSON.stringify(e))}catch(e){console.error("Failed to save cache:",e)}}loadCache(){try{let e=localStorage.getItem(this.CACHE_KEY);if(e){let r=JSON.parse(e);this.expandValuesetCache=new Map(r)}}catch(e){console.error("Failed to load cache:",e)}}translate(e,r,n){n||(n=this.defaultFhirUrlParam);let a=`${this.snowstormFhirBase}/ConceptMap/$translate?url=http://snomed.info/sct?fhir_cm=${e}&code=${r}&system=${n}`;return this.http.get(a).pipe(Rn(this.handleError("translate",{})))}expandValueSetFromServer(e,r,n,a,s,o){s||(s=0),o||(o=20),e||(e=this.snowstormFhirBase),r||(r=this.fhirUrlParam),typeof a!="string"&&(a="");let d=`${e}/ValueSet/$expand?url=${r}?fhir_vs=ecl/${encodeURIComponent(n)}&count=${o}&offset=${s}&filter=${a}&language=${this.lang}&displayLanguage=${this.lang}`;return this.http.get(d).pipe(Rn(this.handleError("expandValueSet",{})))}handleError(e="operation",r){return n=>(console.error("There was an error!"),console.error(n),this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:n.message,panelClass:["red-snackbar"]}),bt(r))}lookupConcept(e,r){r||(r=this.fhirUrlParam);let n=`${r}:${e}`,a=this.conceptCache.get(n);if(a)return bt(a);let s=`${this.snowstormFhirBase}/CodeSystem/$lookup?system=http://snomed.info/sct&code=${e}&property=normalForm`;r!="http://snomed.info/sct"&&(s+=`&version=${r}`);let o={headers:new zl({"Accept-Language":"en"})};return this.http.get(s,o).pipe(Ui(d=>{this.conceptCache.set(n,d)}),Rn(this.handleError("lookupConcept",{})))}getMRCMAttributes(e){let r=`${this.snowstormFhirBase.replace("fhir","snowstorm/snomed-ct")}mrcm/MAIN/domain-attributes?parentIds=${e}&proximalPrimitiveModeling=false&contentType=POSTCOORDINATED`;return this.http.get(r).pipe(Rn(this.handleError("getMRCMAttributes",{})))}addPostcoordinatedExpression(e){let r=`${this.snowstormFhirBase}/CodeSystem/sct_11000003104_EXP`,n={headers:new zl({"Content-Type":"application/fhir+json"})};return this.http.patch(r,{resourceType:"CodeSystem",concept:[{code:e}]},n).pipe(Rn(this.handleError("addPostcoordinatedExpression",{})))}runEclLegacy(e){let r=`https://browser.ihtsdotools.org/snowstorm/snomed-ct/MAIN/SNOMEDCT-ES/2022-10-31/concepts?offset=0&limit=100&termActive=true&ecl=${encodeURIComponent(e)}`;return this.http.get(r).pipe(Rn(this.handleError("expandValueSet",{})))}getIcd10MapTargets(e){let r=`${this.snowstormFhirBase}/ConceptMap/$translate?code=${e}&system=http://snomed.info/sct&source=http://snomed.info/sct?fhir_vs&target=http://hl7.org/fhir/sid/icd-10&url=http://snomed.info/sct/900000000000207008/version/20200131?fhir_cm=447562003`;return this.http.get(r).pipe(Rn(this.handleError("translate",{})))}lookupOtherCodeSystems(e,r){let n=`${this.snowstormFhirBase}/CodeSystem/$lookup?system=${e}&code=${r}`;return this.http.get(n).pipe(Rn(this.handleError("lookup",{})))}getNormalForm(e){if(e.parameter)for(let r of e.parameter){let n=!1;if(r.name=="property"){for(let a of r.part)a.name=="code"&&a.valueString=="normalForm"&&(n=!0);if(n){for(let a of r.part)if(a.name=="valueString")return a.valueString}}}return""}parseNormmalForm(e){let r=[];return e.split("} {").forEach(a=>{let s=a.match(/\d+\|[^\|]+\|\s*=\s*\d+\|[^\|]+\|/g);if(!s)return;let o=s.map(d=>{let[l,c]=d.split("=").map(m=>m.trim()),[h,u]=l.split("|").map(m=>m.trim()),[f,p]=c.split("|").map(m=>m.trim());return{type:{code:h,display:u.replace(/\(.*\)/,"").trim()},target:{code:f,display:p}}});r.push(o)}),{groups:r}}static{this.\u0275fac=function(r){return new(r||t)(_t(nr),_t(oa))}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Lue=["*"],L_;function Nue(){if(L_===void 0&&(L_=null,typeof window<"u")){let t=window;t.trustedTypes!==void 0&&(L_=t.trustedTypes.createPolicy("angular#components",{createHTML:i=>i}))}return L_}function ev(t){return Nue()?.createHTML(t)||t}function j6(t){return Error(`Unable to find icon with the name "${t}"`)}function Bue(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function W6(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function X6(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}var zc=class{url;svgText;options;svgElement;constructor(i,e,r){this.url=i,this.svgText=e,this.options=r}},Vue=(()=>{class t{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(e,r,n,a){this._httpClient=e,this._sanitizer=r,this._errorHandler=a,this._document=n}addSvgIcon(e,r,n){return this.addSvgIconInNamespace("",e,r,n)}addSvgIconLiteral(e,r,n){return this.addSvgIconLiteralInNamespace("",e,r,n)}addSvgIconInNamespace(e,r,n,a){return this._addSvgIconConfig(e,r,new zc(n,null,a))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,r,n,a){let s=this._sanitizer.sanitize(vs.HTML,n);if(!s)throw X6(n);let o=ev(s);return this._addSvgIconConfig(e,r,new zc("",o,a))}addSvgIconSet(e,r){return this.addSvgIconSetInNamespace("",e,r)}addSvgIconSetLiteral(e,r){return this.addSvgIconSetLiteralInNamespace("",e,r)}addSvgIconSetInNamespace(e,r,n){return this._addSvgIconSetConfig(e,new zc(r,null,n))}addSvgIconSetLiteralInNamespace(e,r,n){let a=this._sanitizer.sanitize(vs.HTML,r);if(!a)throw X6(r);let s=ev(a);return this._addSvgIconSetConfig(e,new zc("",s,n))}registerFontClassAlias(e,r=e){return this._fontCssClassesByAlias.set(e,r),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let r=this._sanitizer.sanitize(vs.RESOURCE_URL,e);if(!r)throw W6(e);let n=this._cachedIconsByUrl.get(r);return n?bt(N_(n)):this._loadSvgIconFromConfig(new zc(e,null)).pipe(Ui(a=>this._cachedIconsByUrl.set(r,a)),mt(a=>N_(a)))}getNamedSvgIcon(e,r=""){let n=Y6(r,e),a=this._svgIconConfigs.get(n);if(a)return this._getSvgFromConfig(a);if(a=this._getIconConfigFromResolvers(r,e),a)return this._svgIconConfigs.set(n,a),this._getSvgFromConfig(a);let s=this._iconSetConfigs.get(r);return s?this._getSvgFromIconSetConfigs(e,s):Sl(j6(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?bt(N_(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(mt(r=>N_(r)))}_getSvgFromIconSetConfigs(e,r){let n=this._extractIconWithNameFromAnySet(e,r);if(n)return bt(n);let a=r.filter(s=>!s.svgText).map(s=>this._loadSvgIconSetFromConfig(s).pipe(Rn(o=>{let l=`Loading icon set URL: ${this._sanitizer.sanitize(vs.RESOURCE_URL,s.url)} failed: ${o.message}`;return this._errorHandler.handleError(new Error(l)),bt(null)})));return Og(a).pipe(mt(()=>{let s=this._extractIconWithNameFromAnySet(e,r);if(!s)throw j6(e);return s}))}_extractIconWithNameFromAnySet(e,r){for(let n=r.length-1;n>=0;n--){let a=r[n];if(a.svgText&&a.svgText.toString().indexOf(e)>-1){let s=this._svgElementFromConfig(a),o=this._extractSvgIconFromSet(s,e,a.options);if(o)return o}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(Ui(r=>e.svgText=r),mt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?bt(null):this._fetchIcon(e).pipe(Ui(r=>e.svgText=r))}_extractSvgIconFromSet(e,r,n){let a=e.querySelector(`[id="${r}"]`);if(!a)return null;let s=a.cloneNode(!0);if(s.removeAttribute("id"),s.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(s,n);if(s.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(s),n);let o=this._svgElementFromString(ev(""));return o.appendChild(s),this._setSvgAttributes(o,n)}_svgElementFromString(e){let r=this._document.createElement("DIV");r.innerHTML=e;let n=r.querySelector("svg");if(!n)throw Error(" tag not found");return n}_toSvgElement(e){let r=this._svgElementFromString(ev("")),n=e.attributes;for(let a=0;aev(l)),Dl(()=>this._inProgressUrlFetches.delete(s)),Ng());return this._inProgressUrlFetches.set(s,d),d}_addSvgIconConfig(e,r,n){return this._svgIconConfigs.set(Y6(e,r),n),this}_addSvgIconSetConfig(e,r){let n=this._iconSetConfigs.get(e);return n?n.push(r):this._iconSetConfigs.set(e,[r]),this}_svgElementFromConfig(e){if(!e.svgElement){let r=this._svgElementFromString(e.svgText);this._setSvgAttributes(r,e.options),e.svgElement=r}return e.svgElement}_getIconConfigFromResolvers(e,r){for(let n=0;ni?i.pathname+i.search:""}}var $6=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],jue=$6.map(t=>`[${t}]`).join(", "),Wue=/^url\(['"]?#(.*?)['"]?\)$/,Pi=(()=>{class t{_elementRef=Q(Ze);_iconRegistry=Q(Vue);_location=Q(Gue);_errorHandler=Q(ba);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let r=this._cleanupFontValue(e);r!==this._fontSet&&(this._fontSet=r,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let r=this._cleanupFontValue(e);r!==this._fontIcon&&(this._fontIcon=r,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName;_svgNamespace;_previousPath;_elementsWithExternalReferences;_currentIconFetch=kt.EMPTY;constructor(){let e=Q(new Ur("aria-hidden"),{optional:!0}),r=Q(zue,{optional:!0});r&&(r.color&&(this.color=this._defaultColor=r.color),r.fontSet&&(this.fontSet=r.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let r=e.split(":");switch(r.length){case 1:return["",r[0]];case 2:return r;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let r=this._location.getPathname();r!==this._previousPath&&(this._previousPath=r,this._prependPathToReferences(r))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let r=this._location.getPathname();this._previousPath=r,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(r),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,r=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();r--;){let n=e.childNodes[r];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,r=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>e.classList.remove(n)),r.forEach(n=>e.classList.add(n)),this._previousFontSetClass=r,this.fontIcon!==this._previousFontIconClass&&!r.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let r=this._elementsWithExternalReferences;r&&r.forEach((n,a)=>{n.forEach(s=>{a.setAttribute(s.name,`url('${e}#${s.value}')`)})})}_cacheChildrenWithExternalReferences(e){let r=e.querySelectorAll(jue),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let a=0;a{let o=r[a],d=o.getAttribute(s),l=d?d.match(Wue):null;if(l){let c=n.get(o);c||(c=[],n.set(o,c)),c.push({name:s,value:l[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[r,n]=this._splitIconName(e);r&&(this._svgNamespace=r),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,r).pipe(Vi(1)).subscribe(a=>this._setSvgElement(a),a=>{let s=`Error retrieving icon ${r}:${n}! ${a.message}`;this._errorHandler.handleError(new Error(s))})}}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(r,n){r&2&&(pt("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),Tn(n.color?"mat-"+n.color:""),ut("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",$e],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[At],ngContentSelectors:Lue,decls:1,vars:0,template:function(r,n){r&1&&(ti(),wt(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0})}return t})(),Q6=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,Ct]})}return t})();var Xue=["mat-menu-item",""],Yue=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],$ue=["mat-icon, [matMenuItemIcon]","*"];function Que(t,i){t&1&&(yr(),B(0,"svg",2),we(1,"polygon",3),U())}var Kue=["*"];function Zue(t,i){if(t&1){let e=Ce();B(0,"div",0),ce("click",function(){ue(e);let n=ne();return he(n.closed.emit("click"))})("animationstart",function(n){ue(e);let a=ne();return he(a._onAnimationStart(n.animationName))})("animationend",function(n){ue(e);let a=ne();return he(a._onAnimationDone(n.animationName))})("animationcancel",function(n){ue(e);let a=ne();return he(a._onAnimationDone(n.animationName))}),B(1,"div",1),wt(2),U()()}if(t&2){let e=ne();Tn(e._classList),ut("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating),ee("id",e.panelId),pt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var jA=new Se("MAT_MENU_PANEL"),_r=(()=>{class t{_elementRef=Q(Ze);_document=Q(St);_focusMonitor=Q(br);_parentMenu=Q(jA,{optional:!0});_changeDetectorRef=Q(Ut);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new Oe;_focused=new Oe;_highlighted=!1;_triggersSubmenu=!1;constructor(){Q(on).load(Wr),this._parentMenu?.addItem?.(this)}focus(e,r){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,r):this._getHostElement().focus(r),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),r=e.querySelectorAll("mat-icon, .material-icons");for(let n=0;n{class t{_elementRef=Q(Ze);_changeDetectorRef=Q(Ut);_injector=Q(Wt);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled;_allItems;_directDescendantItems=new eo;_classList={};_panelAnimationState="void";_animationDone=new Oe;_isAnimating=!1;parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger;hasBackdrop;set panelClass(e){let r=this._previousPanelClass,n=Me({},this._classList);r&&r.length&&r.split(" ").forEach(a=>{n[a]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{n[a]=!0}),this._elementRef.nativeElement.className=""),this._classList=n}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new Le;close=this.closed;panelId=Q(wi).getId("mat-menu-panel-");constructor(){let e=Q(que);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop,this._animationsDisabled=Q(Mi,{optional:!0})==="NoopAnimations"}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new vh(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Wi(this._directDescendantItems),tn(e=>Fi(...e.map(r=>r._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let r=this._keyManager;if(this._panelAnimationState==="enter"&&r.activeItem?._hasFocus()){let n=e.toArray(),a=Math.max(0,Math.min(n.length-1,r.activeItemIndex||0));n[a]&&!n[a].disabled?r.setActiveItem(a):r.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(Wi(this._directDescendantItems),tn(r=>Fi(...r.map(n=>n._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let r=e.keyCode,n=this._keyManager;switch(r){case 27:En(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(r===38||r===40)&&n.setFocusOrigin("keyboard"),n.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=pn(()=>{let r=this._resolvePanel();if(!r||!r.contains(document.activeElement)){let n=this._keyManager;n.setFocusOrigin(e).setFirstItemActive(),!n.activeItem&&r&&r.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,r=this.yPosition){this._classList=Mt(Me({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":r==="above","mat-menu-below":r==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let r=e===B_;(r||e===HA)&&(r&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(r?"void":"enter"),this._isAnimating=!1)}_onAnimationStart(e){(e===HA||e===B_)&&(this._isAnimating=!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let r=this._resolvePanel();r&&(r.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(B_),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?HA:B_)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(Wi(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(r=>r._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-menu"]],contentQueries:function(r,n,a){if(r&1&&(ui(a,Jue,5),ui(a,_r,5),ui(a,_r,4)),r&2){let s;je(s=We())&&(n.lazyContent=s.first),je(s=We())&&(n._allItems=s),je(s=We())&&(n.items=s)}},viewQuery:function(r,n){if(r&1&&vt(Oi,5),r&2){let a;je(a=We())&&(n.templateRef=a.first)}},hostVars:3,hostBindings:function(r,n){r&2&&pt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",$e],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:$e(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[Tt([{provide:jA,useExisting:t}]),At],ngContentSelectors:Kue,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(r,n){r&1&&(ti(),de(0,Zue,3,12,"ng-template"))},styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,changeDetection:0})}return t})(),Z6=new Se("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=Q(Dn);return()=>t.scrollStrategies.reposition()}});function the(t){return()=>t.scrollStrategies.reposition()}var ihe={provide:Z6,deps:[Dn],useFactory:the},K6=xs({passive:!0});var tv=new WeakMap,rs=(()=>{class t{_overlay=Q(Dn);_element=Q(Ze);_viewContainerRef=Q(Xi);_menuItemInstance=Q(_r,{optional:!0,self:!0});_dir=Q(vn,{optional:!0});_focusMonitor=Q(br);_ngZone=Q(dt);_scrollStrategy=Q(Z6);_changeDetectorRef=Q(Ut);_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=kt.EMPTY;_hoverSubscription=kt.EMPTY;_menuCloseSubscription=kt.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_handleTouchStart=e=>{xh(e)||(this._openedBy="touch")};_openedBy=void 0;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){e!==this._menu&&(this._menu=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(r=>{this._destroyMenu(r),(r==="click"||r==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(r)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}_menu;menuData;restoreFocus=!0;menuOpened=new Le;onMenuOpen=this.menuOpened;menuClosed=new Le;onMenuClose=this.menuClosed;constructor(){let e=Q(jA,{optional:!0});this._parentMaterialMenu=e instanceof ur?e:void 0,this._element.nativeElement.addEventListener("touchstart",this._handleTouchStart,K6)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this.menu&&this._ownsMenu(this.menu)&&tv.delete(this.menu),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,K6),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let e=this.menu;if(this._menuOpen||!e)return;this._pendingRemoval?.unsubscribe();let r=tv.get(e);tv.set(e,this),r&&r!==this&&r.closeMenu();let n=this._createOverlay(e),a=n.getConfig(),s=a.positionStrategy;this._setPosition(e,s),a.hasBackdrop=e.hasBackdrop==null?!this.triggersSubmenu():e.hasBackdrop,n.hasAttached()||(n.attach(this._getPortal(e)),e.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),e.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,e.direction=this.dir,e.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),e instanceof ur&&(e._setIsOpen(!0),e._directDescendantItems.changes.pipe(Vt(e.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(e,r){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,r):this._element.nativeElement.focus(r)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(e){let r=this._overlayRef,n=this._menu;!r||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),n instanceof ur&&this._ownsMenu(n)?(this._pendingRemoval=n._animationDone.pipe(Vi(1)).subscribe(()=>{r.detach(),n.lazyContent?.detach()}),n._setIsOpen(!1)):(r.detach(),n?.lazyContent?.detach()),n&&this._ownsMenu(n)&&tv.delete(n),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let r=this._getOverlayConfig(e);this._subscribeToPositions(e,r.positionStrategy),this._overlayRef=this._overlay.create(r),this._overlayRef.keydownEvents().subscribe(n=>{this.menu instanceof ur&&this.menu._handleKeydown(n)})}return this._overlayRef}_getOverlayConfig(e){return new Ro({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr"})}_subscribeToPositions(e,r){e.setPositionClasses&&r.positionChanges.subscribe(n=>{this._ngZone.run(()=>{let a=n.connectionPair.overlayX==="start"?"after":"before",s=n.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(a,s)})})}_setPosition(e,r){let[n,a]=e.xPosition==="before"?["end","start"]:["start","end"],[s,o]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[d,l]=[s,o],[c,h]=[n,a],u=0;if(this.triggersSubmenu()){if(h=n=e.xPosition==="before"?"start":"end",a=c=n==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let f=this._parentMaterialMenu.items.first;this._parentInnerPadding=f?f._getHostElement().offsetTop:0}u=s==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(d=s==="top"?"bottom":"top",l=o==="top"?"bottom":"top");r.withPositions([{originX:n,originY:d,overlayX:c,overlayY:s,offsetY:u},{originX:a,originY:d,overlayX:h,overlayY:s,offsetY:u},{originX:n,originY:l,overlayX:c,overlayY:o,offsetY:-u},{originX:a,originY:l,overlayX:h,overlayY:o,offsetY:-u}])}_menuClosingActions(){let e=this._overlayRef.backdropClick(),r=this._overlayRef.detachments(),n=this._parentMaterialMenu?this._parentMaterialMenu.closed:bt(),a=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Xt(s=>this._menuOpen&&s!==this._menuItemInstance)):bt();return Fi(e,n,a,r)}_handleMousedown(e){yh(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let r=e.keyCode;(r===13||r===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(r===39&&this.dir==="ltr"||r===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&(this._openedBy="mouse",this.openMenu())}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new ns(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return tv.get(e)===this}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(r,n){r&1&&ce("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),r&2&&pt("aria-haspopup",n.menu?"menu":null)("aria-expanded",n.menuOpen)("aria-controls",n.menuOpen?n.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]})}return t})(),J6=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[ihe],imports:[ol,Ct,Ia,aa,Ct]})}return t})(),q6={transformMenu:hn("transformMenu",[qn("void",Rt({opacity:0,transform:"scale(0.8)"})),Li("void => enter",Ii("120ms cubic-bezier(0, 0, 0.2, 1)",Rt({opacity:1,transform:"scale(1)"}))),Li("* => void",Ii("100ms 25ms linear",Rt({opacity:0})))]),fadeInItems:hn("fadeInItems",[qn("showing",Rt({opacity:1})),Li("void => *",[Rt({opacity:0}),Ii("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},kZe=q6.fadeInItems,FZe=q6.transformMenu;var nhe=["determinateSpinner"];function rhe(t,i){if(t&1&&(yr(),B(0,"svg",11),we(1,"circle",12),U()),t&2){let e=ne();pt("viewBox",e._viewBox()),j(),gn("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),pt("r",e._circleRadius())}}var she=new Se("mat-progress-spinner-default-options",{providedIn:"root",factory:ahe});function ahe(){return{diameter:eV}}var eV=100,ohe=10,Ls=(()=>{class t{_elementRef=Q(Ze);_noopAnimations;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";_determinateCircle;constructor(){let e=Q(Mi,{optional:!0}),r=Q(she);this._noopAnimations=e==="NoopAnimations"&&!!r&&!r._forceAnimations,this.mode=this._elementRef.nativeElement.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",r&&(r.color&&(this.color=this._defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}mode;get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0))}_value=0;get diameter(){return this._diameter}set diameter(e){this._diameter=e||0}_diameter=eV;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0}_strokeWidth;_circleRadius(){return(this.diameter-ohe)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(r,n){if(r&1&&vt(nhe,5),r&2){let a;je(a=We())&&(n._determinateCircle=a.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(r,n){r&2&&(pt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",n.mode==="determinate"?n.value:null)("mode",n.mode),Tn("mat-"+n.color),gn("width",n.diameter,"px")("height",n.diameter,"px")("--mdc-circular-progress-size",n.diameter+"px")("--mdc-circular-progress-active-indicator-width",n.diameter+"px"),ut("_mat-animation-noopable",n._noopAnimations)("mdc-circular-progress--indeterminate",n.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",Yi],diameter:[2,"diameter","diameter",Yi],strokeWidth:[2,"strokeWidth","strokeWidth",Yi]},exportAs:["matProgressSpinner"],features:[At],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(r,n){if(r&1&&(de(0,rhe,2,8,"ng-template",null,0,u0),B(2,"div",2,1),yr(),B(4,"svg",3),we(5,"circle",4),U()(),sh(),B(6,"div",5)(7,"div",6)(8,"div",7),zr(9,8),U(),B(10,"div",9),zr(11,8),U(),B(12,"div",10),zr(13,8),U()()()),r&2){let a=Pt(1);j(4),pt("viewBox",n._viewBox()),j(),gn("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),pt("r",n._circleRadius()),j(4),ee("ngTemplateOutlet",a),j(2),ee("ngTemplateOutlet",a),j(2),ee("ngTemplateOutlet",a)}},dependencies:[Rb],styles:[".mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width, 4px)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}"],encapsulation:2,changeDetection:0})}return t})();var tV=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct]})}return t})();var lhe=["*"];var che=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],dhe=["[mat-card-avatar], [matCardAvatar]",`mat-card-title, mat-card-subtitle, + [mat-card-title], [mat-card-subtitle], + [matCardTitle], [matCardSubtitle]`,"*"],uhe=new Se("MAT_CARD_CONFIG"),jd=(()=>{class t{appearance;constructor(){let e=Q(uhe,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(r,n){r&2&&ut("mat-mdc-card-outlined",n.appearance==="outlined")("mdc-card--outlined",n.appearance==="outlined")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:lhe,decls:1,vars:0,template:function(r,n){r&1&&(ti(),wt(0))},styles:['.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-color:var(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mdc-elevated-card-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mdc-outlined-card-container-color, var(--mat-sys-surface));border-radius:var(--mdc-outlined-card-container-shape, var(--mat-sys-corner-medium));border-width:var(--mdc-outlined-card-outline-width, 1px);border-color:var(--mdc-outlined-card-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mdc-outlined-card-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0})}return t})(),V_=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"]})}return t})();var U_=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return t})(),z_=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-mdc-card-subtitle"]})}return t})(),G_=(()=>{class t{align="start";static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(r,n){r&2&&ut("mat-mdc-card-actions-align-end",n.align==="end")},inputs:{align:"align"},exportAs:["matCardActions"]})}return t})(),H_=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],ngContentSelectors:dhe,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(r,n){r&1&&(ti(che),wt(0),B(1,"div",0),wt(2,1),U(),wt(3,2))},encapsulation:2,changeDetection:0})}return t})();var iV=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,Ct]})}return t})();var fhe=[[["caption"]],[["colgroup"],["col"]],"*"],mhe=["caption","colgroup, col","*"];function phe(t,i){t&1&&wt(0,2)}function ghe(t,i){t&1&&(B(0,"thead",0),zr(1,1),U(),B(2,"tbody",0),zr(3,2)(4,3),U(),B(5,"tfoot",0),zr(6,4),U())}function vhe(t,i){t&1&&zr(0,1)(1,2)(2,3)(3,4)}var dl=new Se("CDK_TABLE");var K_=(()=>{class t{template=Q(Oi);constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkCellDef",""]]})}return t})(),Z_=(()=>{class t{template=Q(Oi);constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkHeaderCellDef",""]]})}return t})(),sV=(()=>{class t{template=Q(Oi);constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkFooterCellDef",""]]})}return t})(),jm=(()=>{class t{_table=Q(dl,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(r,n,a){if(r&1&&(ui(a,K_,5),ui(a,Z_,5),ui(a,sV,5)),r&2){let s;je(s=We())&&(n.cell=s.first),je(s=We())&&(n.headerCell=s.first),je(s=We())&&(n.footerCell=s.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",$e],stickyEnd:[2,"stickyEnd","stickyEnd",$e]},features:[Tt([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),At]})}return t})(),X_=class{constructor(i,e){e.nativeElement.classList.add(...i._columnCssClassName)}},aV=(()=>{class t extends X_{constructor(){super(Q(jm),Q(Ze))}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[Ft]})}return t})();var oV=(()=>{class t extends X_{constructor(){let e=Q(jm),r=Q(Ze);super(e,r);let n=e._table?._getCellRole();n&&r.nativeElement.setAttribute("role",n)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[Ft]})}return t})(),Y_=class{tasks=[];endTasks=[]},$_=new Se("_COALESCED_STYLE_SCHEDULER"),XA=(()=>{class t{_currentSchedule=null;_ngZone=Q(dt);constructor(){}schedule(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)}scheduleEnd(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new Y_,this._ngZone.runOutsideAngular(()=>queueMicrotask(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){let e=this._currentSchedule;this._currentSchedule=new Y_;for(let r of e.tasks)r();for(let r of e.endTasks)r()}this._currentSchedule=null})))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})();var YA=(()=>{class t{template=Q(Oi);_differs=Q(Vl);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let r=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(r).create(),this._columnsDiffer.diff(r)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof iv?e.headerCell.template:this instanceof $A?e.footerCell.template:e.cell.template}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,features:[ei]})}return t})(),iv=(()=>{class t extends YA{_table=Q(dl,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(Q(Oi),Q(Vl))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",$e]},features:[At,Ft,ei]})}return t})(),$A=(()=>{class t extends YA{_table=Q(dl,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(Q(Oi),Q(Vl))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",$e]},features:[At,Ft,ei]})}return t})(),J_=(()=>{class t extends YA{_table=Q(dl,{optional:!0});when;constructor(){super(Q(Oi),Q(Vl))}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[Ft]})}return t})(),wh=(()=>{class t{_viewContainer=Q(Xi);cells;context;static mostRecentCellOutlet=null;constructor(){t.mostRecentCellOutlet=this}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkCellOutlet",""]]})}return t})(),QA=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(r,n){r&1&&zr(0,0)},dependencies:[wh],encapsulation:2})}return t})();var KA=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(r,n){r&1&&zr(0,0)},dependencies:[wh],encapsulation:2})}return t})(),lV=(()=>{class t{templateRef=Q(Oi);_contentClassName="cdk-no-data-row";constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["ng-template","cdkNoDataRow",""]]})}return t})(),nV=["top","bottom","left","right"],WA=class{_isNativeHtmlTable;_stickCellCss;direction;_coalescedStyleScheduler;_isBrowser;_needsPositionStickyOnElement;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(i=>this._updateCachedSizes(i)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(i,e,r,n,a=!0,s=!0,o,d){this._isNativeHtmlTable=i,this._stickCellCss=e,this.direction=r,this._coalescedStyleScheduler=n,this._isBrowser=a,this._needsPositionStickyOnElement=s,this._positionListener=o,this._tableInjector=d,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(i,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(i);let r=[];for(let n of i)n.nodeType===n.ELEMENT_NODE&&r.push(n,...Array.from(n.children));this._afterNextRender({write:()=>{for(let n of r)this._removeStickyStyle(n,e)}})}updateStickyColumns(i,e,r,n=!0,a=!0){if(a&&this._updateStickyColumnReplayQueue({rows:[...i],stickyStartStates:[...e],stickyEndStates:[...r]}),!i.length||!this._isBrowser||!(e.some(g=>g)||r.some(g=>g))){this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]}));return}let s=i[0],o=s.children.length,d=this.direction==="rtl",l=d?"right":"left",c=d?"left":"right",h=e.lastIndexOf(!0),u=r.indexOf(!0),f,p,m;this._afterNextRender({earlyRead:()=>{f=this._getCellWidths(s,n),p=this._getStickyStartColumnPositions(f,e),m=this._getStickyEndColumnPositions(f,r)},write:()=>{for(let g of i)for(let v=0;v!!g)&&(this._positionListener.stickyColumnsUpdated({sizes:h===-1?[]:f.slice(0,h+1).map((g,v)=>e[v]?g:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:u===-1?[]:f.slice(u).map((g,v)=>r[v+u]?g:null).reverse()}))}})}stickRows(i,e,r){if(!this._isBrowser)return;let n=r==="bottom"?i.slice().reverse():i,a=r==="bottom"?e.slice().reverse():e,s=[],o=[],d=[];this._afterNextRender({earlyRead:()=>{for(let l=0,c=0;l{let l=a.lastIndexOf(!0);for(let c=0;c{let r=i.querySelector("tfoot");r&&(e.some(n=>!n)?this._removeStickyStyle(r,["bottom"]):this._addStickyStyle(r,"bottom",0,!1))}})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._destroyed=!0}_removeStickyStyle(i,e){for(let n of e)i.style[n]="",i.classList.remove(this._borderCellCss[n]);nV.some(n=>e.indexOf(n)===-1&&i.style[n])?i.style.zIndex=this._getCalculatedZIndex(i):(i.style.zIndex="",this._needsPositionStickyOnElement&&(i.style.position=""),i.classList.remove(this._stickCellCss))}_addStickyStyle(i,e,r,n){i.classList.add(this._stickCellCss),n&&i.classList.add(this._borderCellCss[e]),i.style[e]=`${r}px`,i.style.zIndex=this._getCalculatedZIndex(i),this._needsPositionStickyOnElement&&(i.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(i){let e={top:100,bottom:10,left:1,right:1},r=0;for(let n of nV)i.style[n]&&(r+=e[n]);return r?`${r}`:""}_getCellWidths(i,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let r=[],n=i.children;for(let a=0;a0;a--)e[a]&&(r[a]=n,n+=i[a]);return r}_retrieveElementSize(i){let e=this._elemSizeCache.get(i);if(e)return e;let r=i.getBoundingClientRect(),n={width:r.width,height:r.height};return this._resizeObserver&&(this._elemSizeCache.set(i,n),this._resizeObserver.observe(i,{box:"border-box"})),n}_updateStickyColumnReplayQueue(i){this._removeFromStickyColumnReplayQueue(i.rows),!this._stickyColumnsReplayTimeout&&this._updatedStickyColumnsParamsToReplay.push(i)}_removeFromStickyColumnReplayQueue(i){let e=new Set(i);for(let r of this._updatedStickyColumnsParamsToReplay)r.rows=r.rows.filter(n=>!e.has(n));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(r=>!!r.rows.length)}_updateCachedSizes(i){let e=!1;for(let r of i){let n=r.borderBoxSize?.length?{width:r.borderBoxSize[0].inlineSize,height:r.borderBoxSize[0].blockSize}:{width:r.contentRect.width,height:r.contentRect.height};n.width!==this._elemSizeCache.get(r.target)?.width&&yhe(r.target)&&(e=!0),this._elemSizeCache.set(r.target,n)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let r of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(r.rows,r.stickyStartStates,r.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}_afterNextRender(i){this._tableInjector?pn(i,{injector:this._tableInjector}):this._coalescedStyleScheduler.schedule(()=>{i.earlyRead?.(),i.write()})}};function yhe(t){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(i=>t.classList.contains(i))}var Q_=new Se("CDK_SPL");var ZA=(()=>{class t{viewContainer=Q(Xi);elementRef=Q(Ze);constructor(){let e=Q(dl);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","rowOutlet",""]]})}return t})(),JA=(()=>{class t{viewContainer=Q(Xi);elementRef=Q(Ze);constructor(){let e=Q(dl);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","headerRowOutlet",""]]})}return t})(),qA=(()=>{class t{viewContainer=Q(Xi);elementRef=Q(Ze);constructor(){let e=Q(dl);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","footerRowOutlet",""]]})}return t})(),eI=(()=>{class t{viewContainer=Q(Xi);elementRef=Q(Ze);constructor(){let e=Q(dl);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","noDataRowOutlet",""]]})}return t})();var tI=(()=>{class t{_differs=Q(Vl);_changeDetectorRef=Q(Ut);_elementRef=Q(Ze);_dir=Q(vn,{optional:!0});_platform=Q(hi);_viewRepeater=Q(V0);_coalescedStyleScheduler=Q($_);_viewportRuler=Q(Os);_stickyPositioningListener=Q(Q_,{optional:!0,skipSelf:!0});_document=Q(St);_data;_onDestroy=new Oe;_renderRows;_renderChangeSubscription;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}_dataSource;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;contentChanged=new Le;viewChange=new Ci({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;_injector=Q(Wt);constructor(){Q(new Ur("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE"}ngOnInit(){this._setupStickyStyler(),this._dataDiffer=this._differs.find([]).create((e,r)=>this.trackBy?this.trackBy(r.dataIndex,r.data):r),this._viewportRuler.change().pipe(Vt(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),h_(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let r=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,r,(n,a,s)=>this._getEmbeddedViewArgs(n.item,s),n=>n.item.data,n=>{n.operation===Tm.INSERTED&&n.context&&this._renderCellTemplateForItem(n.record.item.rowDef,n.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(n=>{let a=r.get(n.currentIndex);a.context.$implicit=n.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let n=rV(this._headerRowOutlet,"thead");n&&(n.style.display=e.length?"":"none")}let r=this._headerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,r,"top"),this._headerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let n=rV(this._footerRowOutlet,"tfoot");n&&(n.style.display=e.length?"":"none")}let r=this._footerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,r,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,r),this._footerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),r=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...r,...n],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((a,s)=>{this._addStickyColumnStyles([a],this._headerRowDefs[s])}),this._rowDefs.forEach(a=>{let s=[];for(let o=0;o{this._addStickyColumnStyles([a],this._footerRowDefs[s])}),Array.from(this._columnDefsByName.values()).forEach(a=>a.resetStickyChanged())}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let r=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||r,this._forceRecalculateCellWidths=r,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){let e=[],r=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let n=0;n{let o=n&&n.has(s)?n.get(s):[];if(o.length){let d=o.shift();return d.dataIndex=r,d}else return{data:e,rowDef:s,dataIndex:r}})}_cacheColumnDefs(){this._columnDefsByName.clear(),W_(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(r=>{this._columnDefsByName.has(r.name),this._columnDefsByName.set(r.name,r)})}_cacheRowDefs(){this._headerRowDefs=W_(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=W_(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=W_(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(r=>!r.when);!this.multiTemplateDataRows&&e.length>1,this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(s,o)=>{let d=!!o.getColumnsDiff();return s||d},r=this._rowDefs.reduce(e,!1);r&&this._forceRenderDataRows();let n=this._headerRowDefs.reduce(e,!1);n&&this._forceRenderHeaderRows();let a=this._footerRowDefs.reduce(e,!1);return a&&this._forceRenderFooterRows(),r||n||a}_switchDataSource(e){this._data=[],h_(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;h_(this.dataSource)?e=this.dataSource.connect(this):bd(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=bt(this.dataSource)),this._renderChangeSubscription=e.pipe(Vt(this._onDestroy)).subscribe(r=>{this._data=r||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,r)=>this._renderRow(this._headerRowOutlet,e,r)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,r)=>this._renderRow(this._footerRowOutlet,e,r)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,r){let n=Array.from(r?.columns||[]).map(o=>{let d=this._columnDefsByName.get(o);return d}),a=n.map(o=>o.sticky),s=n.map(o=>o.stickyEnd);this._stickyStyler.updateStickyColumns(e,a,s,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let r=[];for(let n=0;n!a.when||a.when(r,e));else{let a=this._rowDefs.find(s=>s.when&&s.when(r,e))||this._defaultRowDef;a&&n.push(a)}return n.length,n}_getEmbeddedViewArgs(e,r){let n=e.rowDef,a={$implicit:e.data};return{templateRef:n.template,context:a,index:r}}_renderRow(e,r,n,a={}){let s=e.viewContainer.createEmbeddedView(r.template,a,n);return this._renderCellTemplateForItem(r,a),s}_renderCellTemplateForItem(e,r){for(let n of this._getCellTemplates(e))wh.mostRecentCellOutlet&&wh.mostRecentCellOutlet._viewContainer.createEmbeddedView(n,r);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let r=0,n=e.length;r{let n=this._columnDefsByName.get(r);return e.extractCellTemplate(n)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(r,n)=>r||n.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr";this._stickyStyler=new WA(this._isNativeHtmlTable,this.stickyCssClass,e,this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener,this._injector),(this._dir?this._dir.change:bt()).pipe(Vt(this._onDestroy)).subscribe(r=>{this._stickyStyler.direction=r,this.updateStickyColumnStyles()})}_getOwnDefs(e){return e.filter(r=>!r._table||r._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let r=this._rowOutlet.viewContainer.length===0;if(r===this._isShowingNoDataRow)return;let n=this._noDataRowOutlet.viewContainer;if(r){let a=n.createEmbeddedView(e.templateRef),s=a.rootNodes[0];a.rootNodes.length===1&&s?.nodeType===this._document.ELEMENT_NODE&&(s.setAttribute("role","row"),s.classList.add(e._contentClassName))}else n.clear();this._isShowingNoDataRow=r,this._changeDetectorRef.markForCheck()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(r,n,a){if(r&1&&(ui(a,lV,5),ui(a,jm,5),ui(a,J_,5),ui(a,iv,5),ui(a,$A,5)),r&2){let s;je(s=We())&&(n._noDataRow=s.first),je(s=We())&&(n._contentColumnDefs=s),je(s=We())&&(n._contentRowDefs=s),je(s=We())&&(n._contentHeaderRowDefs=s),je(s=We())&&(n._contentFooterRowDefs=s)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(r,n){r&2&&ut("cdk-table-fixed-layout",n.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",$e],fixedLayout:[2,"fixedLayout","fixedLayout",$e]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[Tt([{provide:dl,useExisting:t},{provide:V0,useClass:Sm},{provide:$_,useClass:XA},{provide:Q_,useValue:null}]),At],ngContentSelectors:mhe,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(r,n){r&1&&(ti(fhe),wt(0),wt(1,1),de(2,phe,1,0)(3,ghe,7,0)(4,vhe,4,0)),r&2&&(j(2),Qt(n._isServer?2:-1),j(),Qt(n._isNativeHtmlTable?3:4))},dependencies:[JA,ZA,eI,qA],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2})}return t})();function W_(t,i){return t.concat(Array.from(i))}function rV(t,i){let e=i.toUpperCase(),r=t.viewContainer.element.nativeElement;for(;r;){let n=r.nodeType===1?r.nodeName:null;if(n===e)return r;if(n==="TABLE")break;r=r.parentNode}return null}var cV=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[J0]})}return t})();var xhe=[[["caption"]],[["colgroup"],["col"]],"*"],bhe=["caption","colgroup, col","*"];function _he(t,i){t&1&&wt(0,2)}function whe(t,i){t&1&&(B(0,"thead",0),zr(1,1),U(),B(2,"tbody",2),zr(3,3)(4,4),U(),B(5,"tfoot",0),zr(6,5),U())}function Che(t,i){t&1&&zr(0,1)(1,3)(2,4)(3,5)}var Ra=(()=>{class t extends tI{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275cmp=Te({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(r,n){r&2&&ut("mdc-table-fixed-layout",n.fixedLayout)},exportAs:["matTable"],features:[Tt([{provide:tI,useExisting:t},{provide:dl,useExisting:t},{provide:$_,useClass:XA},{provide:V0,useClass:Sm},{provide:Q_,useValue:null}]),Ft],ngContentSelectors:bhe,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(r,n){r&1&&(ti(xhe),wt(0),wt(1,1),de(2,_he,1,0)(3,whe,7,0)(4,Che,4,0)),r&2&&(j(2),Qt(n._isServer?2:-1),j(),Qt(n._isNativeHtmlTable?3:4))},dependencies:[JA,ZA,eI,qA],styles:[".mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell{text-align:right}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mat-mdc-header-cell{text-align:right}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child>.mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2})}return t})(),Pa=(()=>{class t extends K_{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","matCellDef",""]],features:[Tt([{provide:K_,useExisting:t}]),Ft]})}return t})(),ka=(()=>{class t extends Z_{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","matHeaderCellDef",""]],features:[Tt([{provide:Z_,useExisting:t}]),Ft]})}return t})();var Fa=(()=>{class t extends jm{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[Tt([{provide:jm,useExisting:t},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),Ft]})}return t})(),Oa=(()=>{class t extends aV{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[Ft]})}return t})();var La=(()=>{class t extends oV{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[Ft]})}return t})();var Na=(()=>{class t extends iv{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",$e]},features:[Tt([{provide:iv,useExisting:t}]),At,Ft]})}return t})();var Ba=(()=>{class t extends J_{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[Tt([{provide:J_,useExisting:t}]),Ft]})}return t})(),Va=(()=>{class t extends QA{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275cmp=Te({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[Tt([{provide:QA,useExisting:t}]),Ft],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(r,n){r&1&&zr(0,0)},dependencies:[wh],encapsulation:2})}return t})();var Ua=(()=>{class t extends KA{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275cmp=Te({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[Tt([{provide:KA,useExisting:t}]),Ft],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(r,n){r&1&&zr(0,0)},dependencies:[wh],encapsulation:2})}return t})();var dV=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,cV,Ct]})}return t})(),The=9007199254740991,uo=class extends fh{_data;_renderData=new Ci([]);_filter=new Ci("");_internalPageChanges=new Oe;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i),this._renderChangesSubscription||this._filterData(i)}get filter(){return this._filter.value}set filter(i){this._filter.next(i),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(i){this._sort=i,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(i){this._paginator=i,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(i,e)=>{let r=i[e];if(vA(r)){let n=Number(r);return n{let r=e.active,n=e.direction;return!r||n==""?i:i.sort((a,s)=>{let o=this.sortingDataAccessor(a,r),d=this.sortingDataAccessor(s,r),l=typeof o,c=typeof d;l!==c&&(l==="number"&&(o+=""),c==="number"&&(d+=""));let h=0;return o!=null&&d!=null?o>d?h=1:o{let r=e.trim().toLowerCase();return Object.values(i).some(n=>`${n}`.toLowerCase().includes(r))};constructor(i=[]){super(),this._data=new Ci(i),this._updateChangeSubscription()}_updateChangeSubscription(){let i=this._sort?Fi(this._sort.sortChange,this._sort.initialized):bt(null),e=this._paginator?Fi(this._paginator.page,this._internalPageChanges,this._paginator.initialized):bt(null),r=this._data,n=Js([r,this._filter]).pipe(mt(([o])=>this._filterData(o))),a=Js([n,i]).pipe(mt(([o])=>this._orderData(o))),s=Js([a,e]).pipe(mt(([o])=>this._pageData(o)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=s.subscribe(o=>this._renderData.next(o))}_filterData(i){return this.filteredData=this.filter==null||this.filter===""?i:i.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(i){return this.sort?this.sortData(i.slice(),this.sort):i}_pageData(i){if(!this.paginator)return i;let e=this.paginator.pageIndex*this.paginator.pageSize;return i.slice(e,e+this.paginator.pageSize)}_updatePaginator(i){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=i,e.pageIndex>0)){let r=Math.ceil(e.length/e.pageSize)-1||0,n=Math.min(e.pageIndex,r);n!==e.pageIndex&&(e.pageIndex=n,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};var yV=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,r){this._renderer=e,this._elementRef=r}setProperty(e,r){this._renderer.setProperty(this._elementRef.nativeElement,e,r)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(r){return new(r||t)(be(Ai),be(Ze))};static \u0275dir=Ue({type:t})}return t})(),xV=(()=>{class t extends yV{static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,features:[Ft]})}return t})(),bs=new Se("");var She={provide:bs,useExisting:Pn(()=>hr),multi:!0};function Ehe(){let t=Ul()?Ul().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var Dhe=new Se(""),hr=(()=>{class t extends yV{_compositionMode;_composing=!1;constructor(e,r,n){super(e,r),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!Ehe())}writeValue(e){let r=e??"";this.setProperty("value",r)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(r){return new(r||t)(be(Ai),be(Ze),be(Dhe,8))};static \u0275dir=Ue({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,n){r&1&&ce("input",function(s){return n._handleInput(s.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(s){return n._compositionEnd(s.target.value)})},standalone:!1,features:[Tt([She]),Ft]})}return t})();function Wd(t){return t==null||(typeof t=="string"||Array.isArray(t))&&t.length===0}function bV(t){return t!=null&&typeof t.length=="number"}var Po=new Se(""),cv=new Se(""),Mhe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ns=class{static min(i){return Ahe(i)}static max(i){return Ihe(i)}static required(i){return _V(i)}static requiredTrue(i){return Rhe(i)}static email(i){return Phe(i)}static minLength(i){return wV(i)}static maxLength(i){return khe(i)}static pattern(i){return CV(i)}static nullValidator(i){return ew(i)}static compose(i){return AV(i)}static composeAsync(i){return IV(i)}};function Ahe(t){return i=>{if(Wd(i.value)||Wd(t))return null;let e=parseFloat(i.value);return!isNaN(e)&&e{if(Wd(i.value)||Wd(t))return null;let e=parseFloat(i.value);return!isNaN(e)&&e>t?{max:{max:t,actual:i.value}}:null}}function _V(t){return Wd(t.value)?{required:!0}:null}function Rhe(t){return t.value===!0?null:{required:!0}}function Phe(t){return Wd(t.value)||Mhe.test(t.value)?null:{email:!0}}function wV(t){return i=>Wd(i.value)||!bV(i.value)?null:i.value.lengthbV(i.value)&&i.value.length>t?{maxlength:{requiredLength:t,actualLength:i.value.length}}:null}function CV(t){if(!t)return ew;let i,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),i=new RegExp(e)):(e=t.toString(),i=t),r=>{if(Wd(r.value))return null;let n=r.value;return i.test(n)?null:{pattern:{requiredPattern:e,actualValue:n}}}}function ew(t){return null}function TV(t){return t!=null}function SV(t){return Rd(t)?wn(t):t}function EV(t){let i={};return t.forEach(e=>{i=e!=null?Me(Me({},i),e):i}),Object.keys(i).length===0?null:i}function DV(t,i){return i.map(e=>e(t))}function Fhe(t){return!t.validate}function MV(t){return t.map(i=>Fhe(i)?i:e=>i.validate(e))}function AV(t){if(!t)return null;let i=t.filter(TV);return i.length==0?null:function(e){return EV(DV(e,i))}}function oI(t){return t!=null?AV(MV(t)):null}function IV(t){if(!t)return null;let i=t.filter(TV);return i.length==0?null:function(e){let r=DV(e,i).map(SV);return Og(r).pipe(mt(EV))}}function lI(t){return t!=null?IV(MV(t)):null}function uV(t,i){return t===null?[i]:Array.isArray(t)?[...t,i]:[t,i]}function RV(t){return t._rawValidators}function PV(t){return t._rawAsyncValidators}function iI(t){return t?Array.isArray(t)?t:[t]:[]}function tw(t,i){return Array.isArray(t)?t.includes(i):t===i}function hV(t,i){let e=iI(i);return iI(t).forEach(n=>{tw(e,n)||e.push(n)}),e}function fV(t,i){return iI(i).filter(e=>!tw(t,e))}var iw=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=oI(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=lI(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,e){return this.control?this.control.hasError(i,e):!1}getError(i,e){return this.control?this.control.getError(i,e):null}},Hc=class extends iw{name;get formDirective(){return null}get path(){return null}},ho=class extends iw{_parent=null;name=null;valueAccessor=null},nw=class{_cd;constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Ohe={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},ZJe=Mt(Me({},Ohe),{"[class.ng-submitted]":"isSubmitted"}),xn=(()=>{class t extends nw{constructor(e){super(e)}static \u0275fac=function(r){return new(r||t)(be(ho,2))};static \u0275dir=Ue({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,n){r&2&&ut("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},standalone:!1,features:[Ft]})}return t})(),ko=(()=>{class t extends nw{constructor(e){super(e)}static \u0275fac=function(r){return new(r||t)(be(Hc,10))};static \u0275dir=Ue({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,n){r&2&&ut("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},standalone:!1,features:[Ft]})}return t})();var nv="VALID",q_="INVALID",Wm="PENDING",rv="DISABLED",Xd=class{},rw=class extends Xd{value;source;constructor(i,e){super(),this.value=i,this.source=e}},av=class extends Xd{pristine;source;constructor(i,e){super(),this.pristine=i,this.source=e}},ov=class extends Xd{touched;source;constructor(i,e){super(),this.touched=i,this.source=e}},Xm=class extends Xd{status;source;constructor(i,e){super(),this.status=i,this.source=e}},nI=class extends Xd{source;constructor(i){super(),this.source=i}},rI=class extends Xd{source;constructor(i){super(),this.source=i}};function cI(t){return(lw(t)?t.validators:t)||null}function Lhe(t){return Array.isArray(t)?oI(t):t||null}function dI(t,i){return(lw(i)?i.asyncValidators:t)||null}function Nhe(t){return Array.isArray(t)?lI(t):t||null}function lw(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function kV(t,i,e){let r=t.controls;if(!(i?Object.keys(r):r).length)throw new et(1e3,"");if(!r[e])throw new et(1001,"")}function FV(t,i,e){t._forEachChild((r,n)=>{if(e[n]===void 0)throw new et(1002,"")})}var Ym=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,e){this._assignValidators(i),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return Sa(this.statusReactive)}set status(i){Sa(()=>this.statusReactive.set(i))}_status=Pc(()=>this.statusReactive());statusReactive=Ta(void 0);get valid(){return this.status===nv}get invalid(){return this.status===q_}get pending(){return this.status==Wm}get disabled(){return this.status===rv}get enabled(){return this.status!==rv}errors;get pristine(){return Sa(this.pristineReactive)}set pristine(i){Sa(()=>this.pristineReactive.set(i))}_pristine=Pc(()=>this.pristineReactive());pristineReactive=Ta(!0);get dirty(){return!this.pristine}get touched(){return Sa(this.touchedReactive)}set touched(i){Sa(()=>this.touchedReactive.set(i))}_touched=Pc(()=>this.touchedReactive());touchedReactive=Ta(!1);get untouched(){return!this.touched}_events=new Oe;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(hV(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(hV(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(fV(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(fV(i,this._rawAsyncValidators))}hasValidator(i){return tw(this._rawValidators,i)}hasAsyncValidator(i){return tw(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let e=this.touched===!1;this.touched=!0;let r=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched(Mt(Me({},i),{sourceControl:r})),e&&i.emitEvent!==!1&&this._events.next(new ov(!0,r))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(i))}markAsUntouched(i={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=i.sourceControl??this;this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:r})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,r),e&&i.emitEvent!==!1&&this._events.next(new ov(!1,r))}markAsDirty(i={}){let e=this.pristine===!0;this.pristine=!1;let r=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty(Mt(Me({},i),{sourceControl:r})),e&&i.emitEvent!==!1&&this._events.next(new av(!1,r))}markAsPristine(i={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=i.sourceControl??this;this._forEachChild(n=>{n.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,r),e&&i.emitEvent!==!1&&this._events.next(new av(!0,r))}markAsPending(i={}){this.status=Wm;let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Xm(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending(Mt(Me({},i),{sourceControl:e}))}disable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=rv,this.errors=null,this._forEachChild(n=>{n.disable(Mt(Me({},i),{onlySelf:!0}))}),this._updateValue();let r=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new rw(this.value,r)),this._events.next(new Xm(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Mt(Me({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=nv,this._forEachChild(r=>{r.enable(Mt(Me({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(Mt(Me({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(i,e){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===nv||this.status===Wm)&&this._runAsyncValidator(r,i.emitEvent)}let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new rw(this.value,e)),this._events.next(new Xm(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(Mt(Me({},i),{sourceControl:e}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?rv:nv}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,e){if(this.asyncValidator){this.status=Wm,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let r=SV(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:e,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(i){let e=i;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((r,n)=>r&&r._find(n),this)}getError(i,e){let r=e?this.get(e):this;return r&&r.errors?r.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,e,r){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||r)&&this._events.next(new Xm(this.status,e)),this._parent&&this._parent._updateControlsErrors(i,e,r)}_initObservables(){this.valueChanges=new Le,this.statusChanges=new Le}_calculateStatus(){return this._allControlsDisabled()?rv:this.errors?q_:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Wm)?Wm:this._anyControlsHaveStatus(q_)?q_:nv}_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,e){let r=!this._anyControlsDirty(),n=this.pristine!==r;this.pristine=r,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,e),n&&this._events.next(new av(this.pristine,e))}_updateTouched(i={},e){this.touched=this._anyControlsTouched(),this._events.next(new ov(this.touched,e)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,e)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){lw(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){let e=this._parent&&this._parent.dirty;return!i&&!!e&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=Lhe(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=Nhe(this._rawAsyncValidators)}},Yd=class extends Ym{constructor(i,e,r){super(cI(e),dI(r,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,r={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,r={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}){FV(this,!0,i),Object.keys(i).forEach(r=>{kV(this,!0,r),this.controls[r].setValue(i[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(Object.keys(i).forEach(r=>{let n=this.controls[r];n&&n.patchValue(i[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((r,n)=>{r.reset(i?i[n]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(i,e,r)=>(i[r]=e.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,r)=>r._syncPendingControls()?!0:e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{let r=this.controls[e];r&&i(r,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[e,r]of Object.entries(this.controls))if(this.contains(e)&&i(r))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(e,r,n)=>((r.enabled||this.disabled)&&(e[n]=r.value),e))}_reduceChildren(i,e){let r=i;return this._forEachChild((n,a)=>{r=e(r,n,a)}),r}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var sI=class extends Yd{};var $m=new Se("",{providedIn:"root",factory:()=>cw}),cw="always";function OV(t,i){return[...i.path,t]}function lv(t,i,e=cw){uI(t,i),i.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&i.valueAccessor.setDisabledState?.(t.disabled),Vhe(t,i),zhe(t,i),Uhe(t,i),Bhe(t,i)}function sw(t,i,e=!0){let r=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(r),i.valueAccessor.registerOnTouched(r)),ow(t,i),t&&(i._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function aw(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function Bhe(t,i){if(i.valueAccessor.setDisabledState){let e=r=>{i.valueAccessor.setDisabledState(r)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function uI(t,i){let e=RV(t);i.validator!==null?t.setValidators(uV(e,i.validator)):typeof e=="function"&&t.setValidators([e]);let r=PV(t);i.asyncValidator!==null?t.setAsyncValidators(uV(r,i.asyncValidator)):typeof r=="function"&&t.setAsyncValidators([r]);let n=()=>t.updateValueAndValidity();aw(i._rawValidators,n),aw(i._rawAsyncValidators,n)}function ow(t,i){let e=!1;if(t!==null){if(i.validator!==null){let n=RV(t);if(Array.isArray(n)&&n.length>0){let a=n.filter(s=>s!==i.validator);a.length!==n.length&&(e=!0,t.setValidators(a))}}if(i.asyncValidator!==null){let n=PV(t);if(Array.isArray(n)&&n.length>0){let a=n.filter(s=>s!==i.asyncValidator);a.length!==n.length&&(e=!0,t.setAsyncValidators(a))}}}let r=()=>{};return aw(i._rawValidators,r),aw(i._rawAsyncValidators,r),e}function Vhe(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&LV(t,i)})}function Uhe(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&LV(t,i),t.updateOn!=="submit"&&t.markAsTouched()})}function LV(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function zhe(t,i){let e=(r,n)=>{i.valueAccessor.writeValue(r),n&&i.viewToModelUpdate(r)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function NV(t,i){t==null,uI(t,i)}function Ghe(t,i){return ow(t,i)}function hI(t,i){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(i,e.currentValue)}function Hhe(t){return Object.getPrototypeOf(t.constructor)===xV}function BV(t,i){t._syncPendingControls(),i.forEach(e=>{let r=e.control;r.updateOn==="submit"&&r._pendingChange&&(e.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function fI(t,i){if(!i)return null;Array.isArray(i);let e,r,n;return i.forEach(a=>{a.constructor===hr?e=a:Hhe(a)?r=a:n=a}),n||r||e||null}function jhe(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var Whe={provide:Hc,useExisting:Pn(()=>jc)},sv=Promise.resolve(),jc=(()=>{class t extends Hc{callSetDisabledState;get submitted(){return Sa(this.submittedReactive)}_submitted=Pc(()=>this.submittedReactive());submittedReactive=Ta(!1);_directives=new Set;form;ngSubmit=new Le;options;constructor(e,r,n){super(),this.callSetDisabledState=n,this.form=new Yd({},oI(e),lI(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){sv.then(()=>{let r=this._findContainer(e.path);e.control=r.registerControl(e.name,e.control),lv(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){sv.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){sv.then(()=>{let r=this._findContainer(e.path),n=new Yd({});NV(n,e),r.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){sv.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,r){sv.then(()=>{this.form.get(e.path).setValue(r)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),BV(this.form,this._directives),this.ngSubmit.emit(e),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(r){return new(r||t)(be(Po,10),be(cv,10),be($m,8))};static \u0275dir=Ue({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,n){r&1&&ce("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Tt([Whe]),Ft]})}return t})();function mV(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function pV(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var er=class extends Ym{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,e,r){super(cI(e),dI(r,e)),this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),lw(e)&&(e.nonNullable||e.initialValueIsDefault)&&(pV(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){mV(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){mV(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(i){pV(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},VV=er,Xhe=t=>t instanceof er;var Yhe={provide:ho,useExisting:Pn(()=>wr)},gV=Promise.resolve(),wr=(()=>{class t extends ho{_changeDetectorRef;callSetDisabledState;control=new er;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new Le;constructor(e,r,n,a,s,o){super(),this._changeDetectorRef=s,this.callSetDisabledState=o,this._parent=e,this._setValidators(r),this._setAsyncValidators(n),this.valueAccessor=fI(this,a)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let r=e.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),hI(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){lv(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){gV.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let r=e.isDisabled.currentValue,n=r!==0&&$e(r);gV.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?OV(e,this._parent):[e]}static \u0275fac=function(r){return new(r||t)(be(Hc,9),be(Po,10),be(cv,10),be(bs,10),be(Ut,8),be($m,8))};static \u0275dir=Ue({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[Tt([Yhe]),Ft,ei]})}return t})(),Xl=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),$he={provide:bs,useExisting:Pn(()=>dv),multi:!0},dv=(()=>{class t extends xV{writeValue(e){let r=e??"";this.setProperty("value",r)}registerOnChange(e){this.onChange=r=>{e(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,n){r&1&&ce("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[Tt([$he]),Ft]})}return t})();var mI=new Se(""),Qhe={provide:ho,useExisting:Pn(()=>Th)},Th=(()=>{class t extends ho{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new Le;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,n,a,s){super(),this._ngModelWarningConfig=a,this.callSetDisabledState=s,this._setValidators(e),this._setAsyncValidators(r),this.valueAccessor=fI(this,n)}ngOnChanges(e){if(this._isControlChanged(e)){let r=e.form.previousValue;r&&sw(r,this,!1),lv(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}hI(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&sw(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(r){return new(r||t)(be(Po,10),be(cv,10),be(bs,10),be(mI,8),be($m,8))};static \u0275dir=Ue({type:t,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[Tt([Qhe]),Ft,ei]})}return t})(),Khe={provide:Hc,useExisting:Pn(()=>la)},la=(()=>{class t extends Hc{callSetDisabledState;get submitted(){return Sa(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=Pc(()=>this._submittedReactive());_submittedReactive=Ta(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new Le;constructor(e,r,n){super(),this.callSetDisabledState=n,this._setValidators(e),this._setAsyncValidators(r)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(ow(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let r=this.form.get(e.path);return lv(r,e,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),r}getControl(e){return this.form.get(e.path)}removeControl(e){sw(e.control||null,e,!1),jhe(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,r){this.form.get(e.path).setValue(r)}onSubmit(e){return this._submittedReactive.set(!0),BV(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new nI(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new rI(this.form))}_updateDomValue(){this.directives.forEach(e=>{let r=e.control,n=this.form.get(e.path);r!==n&&(sw(r||null,e),Xhe(n)&&(lv(n,e,this.callSetDisabledState),e.control=n))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let r=this.form.get(e.path);NV(r,e),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let r=this.form.get(e.path);r&&Ghe(r,e)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){uI(this.form,this),this._oldForm&&ow(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(r){return new(r||t)(be(Po,10),be(cv,10),be($m,8))};static \u0275dir=Ue({type:t,selectors:[["","formGroup",""]],hostBindings:function(r,n){r&1&&ce("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Tt([Khe]),Ft,ei]})}return t})();var Zhe={provide:ho,useExisting:Pn(()=>Wc)},Wc=(()=>{class t extends ho{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new Le;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,n,a,s){super(),this._ngModelWarningConfig=s,this._parent=e,this._setValidators(r),this._setAsyncValidators(n),this.valueAccessor=fI(this,a)}ngOnChanges(e){this._added||this._setUpControl(),hI(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return OV(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(r){return new(r||t)(be(Hc,13),be(Po,10),be(cv,10),be(bs,10),be(mI,8))};static \u0275dir=Ue({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[Tt([Zhe]),Ft,ei]})}return t})();function Jhe(t){return typeof t=="number"?t:parseInt(t,10)}var pI=(()=>{class t{_validator=ew;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let r=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):ew,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,features:[ei]})}return t})();var qhe={provide:Po,useExisting:Pn(()=>gI),multi:!0};var gI=(()=>{class t extends pI{required;inputName="required";normalizeInput=$e;createValidator=e=>_V;enabled(e){return e}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,n){r&2&&pt("required",n._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[Tt([qhe]),Ft]})}return t})();var efe={provide:Po,useExisting:Pn(()=>vI),multi:!0},vI=(()=>{class t extends pI{minlength;inputName="minlength";normalizeInput=e=>Jhe(e);createValidator=e=>wV(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(r,n){r&2&&pt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},standalone:!1,features:[Tt([efe]),Ft]})}return t})();var tfe={provide:Po,useExisting:Pn(()=>uv),multi:!0},uv=(()=>{class t extends pI{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>CV(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(r,n){r&2&&pt("pattern",n._enabled?n.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[Tt([tfe]),Ft]})}return t})();var UV=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({})}return t})(),aI=class extends Ym{constructor(i,e,r){super(cI(e),dI(r,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(i){return this.controls[this._adjustIndex(i)]}push(i,e={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(i,e,r={}){this.controls.splice(i,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(i,e={}){let r=this._adjustIndex(i);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(i,e,r={}){let n=this._adjustIndex(i);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,e={}){FV(this,!1,i),i.forEach((r,n)=>{kV(this,!1,n),this.at(n).setValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(i.forEach((r,n)=>{this.at(n)&&this.at(n).patchValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i=[],e={}){this._forEachChild((r,n)=>{r.reset(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((e,r)=>r._syncPendingControls()?!0:e,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((e,r)=>{i(e,r)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(e=>e.enabled&&i(e))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(let i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}};function vV(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var $d=(()=>{class t{useNonNullable=!1;get nonNullable(){let e=new t;return e.useNonNullable=!0,e}group(e,r=null){let n=this._reduceControls(e),a={};return vV(r)?a=r:r!==null&&(a.validators=r.validator,a.asyncValidators=r.asyncValidator),new Yd(n,a)}record(e,r=null){let n=this._reduceControls(e);return new sI(n,r)}control(e,r,n){let a={};return this.useNonNullable?(vV(r)?a=r:(a.validators=r,a.asyncValidators=n),new er(e,Mt(Me({},a),{nonNullable:!0}))):new er(e,r,n)}array(e,r,n){let a=e.map(s=>this._createControl(s));return new aI(a,r,n)}_reduceControls(e){let r={};return Object.keys(e).forEach(n=>{r[n]=this._createControl(e[n])}),r}_createControl(e){if(e instanceof er)return e;if(e instanceof Ym)return e;if(Array.isArray(e)){let r=e[0],n=e.length>1?e[1]:null,a=e.length>2?e[2]:null;return this.control(r,n,a)}else return this.control(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hv=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:$m,useValue:e.callSetDisabledState??cw}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[UV]})}return t})(),zV=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:mI,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:$m,useValue:e.callSetDisabledState??cw}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[UV]})}return t})();var yI=class{_box;_destroyed=new Oe;_resizeSubject=new Oe;_resizeObserver;_elementObservables=new Map;constructor(i){this._box=i,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(i){return this._elementObservables.has(i)||this._elementObservables.set(i,new $t(e=>{let r=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(i,{box:this._box}),()=>{this._resizeObserver?.unobserve(i),r.unsubscribe(),this._elementObservables.delete(i)}}).pipe(Xt(e=>e.some(r=>r.target===i)),Yx({bufferSize:1,refCount:!0}),Vt(this._destroyed))),this._elementObservables.get(i)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},dw=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=Q(dt);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,r){let n=r?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new yI(n)),this._observers.get(n).observe(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ife=["notch"],nfe=["matFormFieldNotchedOutline",""],rfe=["*"],sfe=["textField"],afe=["iconPrefixContainer"],ofe=["textPrefixContainer"],lfe=["iconSuffixContainer"],cfe=["textSuffixContainer"],dfe=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],ufe=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function hfe(t,i){t&1&&we(0,"span",21)}function ffe(t,i){if(t&1&&(B(0,"label",20),wt(1,1),de(2,hfe,1,0,"span",21),U()),t&2){let e=ne(2);ee("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),pt("for",e._control.disableAutomaticLabeling?null:e._control.id),j(2),Qt(!e.hideRequiredMarker&&e._control.required?2:-1)}}function mfe(t,i){if(t&1&&de(0,ffe,3,5,"label",20),t&2){let e=ne();Qt(e._hasFloatingLabel()?0:-1)}}function pfe(t,i){t&1&&we(0,"div",7)}function gfe(t,i){}function vfe(t,i){if(t&1&&de(0,gfe,0,0,"ng-template",13),t&2){ne(2);let e=Pt(1);ee("ngTemplateOutlet",e)}}function yfe(t,i){if(t&1&&(B(0,"div",9),de(1,vfe,1,1,null,13),U()),t&2){let e=ne();ee("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),j(),Qt(e._forceDisplayInfixLabel()?-1:1)}}function xfe(t,i){t&1&&(B(0,"div",10,2),wt(2,2),U())}function bfe(t,i){t&1&&(B(0,"div",11,3),wt(2,3),U())}function _fe(t,i){}function wfe(t,i){if(t&1&&de(0,_fe,0,0,"ng-template",13),t&2){ne();let e=Pt(1);ee("ngTemplateOutlet",e)}}function Cfe(t,i){t&1&&(B(0,"div",14,4),wt(2,4),U())}function Tfe(t,i){t&1&&(B(0,"div",15,5),wt(2,5),U())}function Sfe(t,i){t&1&&we(0,"div",16)}function Efe(t,i){if(t&1&&(B(0,"div",18),wt(1,6),U()),t&2){let e=ne();ee("@transitionMessages",e._subscriptAnimationState)}}function Dfe(t,i){if(t&1&&(B(0,"mat-hint",22),Y(1),U()),t&2){let e=ne(2);ee("id",e._hintLabelId),j(),ze(e.hintLabel)}}function Mfe(t,i){if(t&1&&(B(0,"div",19),de(1,Dfe,2,2,"mat-hint",22),wt(2,7),we(3,"div",23),wt(4,8),U()),t&2){let e=ne();ee("@transitionMessages",e._subscriptAnimationState),j(),Qt(e.hintLabel?1:-1)}}var Nn=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-label"]]})}return t})(),$V=new Se("MatError"),hw=(()=>{class t{id=Q(wi).getId("mat-mdc-error-");constructor(){Q(new Ur("aria-live"),{optional:!0})||Q(Ze).nativeElement.setAttribute("aria-live","polite")}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(r,n){r&2&&na("id",n.id)},inputs:{id:"id"},features:[Tt([{provide:$V,useExisting:t}])]})}return t})(),za=(()=>{class t{align="start";id=Q(wi).getId("mat-mdc-hint-");static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,n){r&2&&(na("id",n.id),pt("align",null),ut("mat-mdc-form-field-hint-end",n.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),Afe=new Se("MatPrefix");var QV=new Se("MatSuffix"),fw=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[Tt([{provide:QV,useExisting:t}])]})}return t})(),KV=new Se("FloatingLabelParent"),GV=(()=>{class t{_elementRef=Q(Ze);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=Q(dw);_ngZone=Q(dt);_parent=Q(KV);_resizeSubscription=new kt;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return Ife(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,n){r&2&&ut("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function Ife(t){let i=t;if(i.offsetParent!==null)return i.scrollWidth;let e=i.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let r=e.scrollWidth;return e.remove(),r}var HV="mdc-line-ripple--active",uw="mdc-line-ripple--deactivating",jV=(()=>{class t{_elementRef=Q(Ze);_cleanupTransitionEnd;constructor(){let e=Q(dt),r=Q(Ai);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=r.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(uw),e.add(HV)}deactivate(){this._elementRef.nativeElement.classList.add(uw)}_handleTransitionEnd=e=>{let r=this._elementRef.nativeElement.classList,n=r.contains(uw);e.propertyName==="opacity"&&n&&r.remove(HV,uw)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),WV=(()=>{class t{_elementRef=Q(Ze);_ngZone=Q(dt);open=!1;_notch;constructor(){}ngAfterViewInit(){let e=this._elementRef.nativeElement.querySelector(".mdc-floating-label");e?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(e.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>e.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){!this.open||!e?this._notch.nativeElement.style.width="":this._notch.nativeElement.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,n){if(r&1&&vt(ife,5),r&2){let a;je(a=We())&&(n._notch=a.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,n){r&2&&ut("mdc-notched-outline--notched",n.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:nfe,ngContentSelectors:rfe,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(r,n){r&1&&(ti(),we(0,"div",1),B(1,"div",2,0),wt(3),U(),we(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),Rfe={transitionMessages:hn("transitionMessages",[qn("enter",Rt({opacity:1,transform:"translateY(0%)"})),Li("void => enter",[Rt({opacity:0,transform:"translateY(-5px)"}),Ii("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},Sh=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t})}return t})();var Eh=new Se("MatFormField"),Pfe=new Se("MAT_FORM_FIELD_DEFAULT_OPTIONS"),XV="fill",kfe="auto",YV="fixed",Ffe="translateY(-50%)",Bn=(()=>{class t{_elementRef=Q(Ze);_changeDetectorRef=Q(Ut);_dir=Q(vn);_platform=Q(hi);_idGenerator=Q(wi);_defaults=Q(Pfe,{optional:!0});_animationMode=Q(Mi,{optional:!0});_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=A8(Nn);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=sa(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||kfe}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearance}set appearance(e){let r=this._appearance,n=e||this._defaults?.appearance||XV;this._appearance=n,this._appearance==="outline"&&this._appearance!==r&&(this._needsOutlineLabelOffsetUpdate=!0)}_appearance=XV;get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||YV}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||YV}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_subscriptAnimationState="";get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new Oe;_isFocused=null;_explicitFormFieldControl;_needsOutlineLabelOffsetUpdate=!1;_previousControl=null;_stateChanges;_valueChanges;_describedByChanges;_injector=Q(Wt);constructor(){let e=this._defaults;e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._previousControl=this._control)}ngOnDestroy(){this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=Pc(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let r=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),r.controlType&&this._elementRef.nativeElement.classList.add(n+r.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=r.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=r.stateChanges.pipe(Wi([void 0,void 0]),mt(()=>[r.errorState,r.userAriaDescribedBy]),Xx(),Xt(([[a,s],[o,d]])=>a!==o||s!==d)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),r.ngControl&&r.ngControl.valueChanges&&(this._valueChanges=r.ngControl.valueChanges.pipe(Vt(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Fi(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),n0(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(Vt(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=Pc(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let r=this._control?this._control.ngControl:null;return r&&r[e]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getDisplayedMessages()==="hint"){let r=this._hintChildren?this._hintChildren.find(a=>a.align==="start"):null,n=this._hintChildren?this._hintChildren.find(a=>a.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),n&&e.push(n.id)}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));this._control.setDescribedByIds(e)}}_updateOutlineLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return;let e=this._floatingLabel.element;if(!(this._iconPrefixContainer||this._textPrefixContainer)){e.style.transform="";return}if(!this._isAttachedToDom()){this._needsOutlineLabelOffsetUpdate=!0;return}let r=this._iconPrefixContainer?.nativeElement,n=this._textPrefixContainer?.nativeElement,a=this._iconSuffixContainer?.nativeElement,s=this._textSuffixContainer?.nativeElement,o=r?.getBoundingClientRect().width??0,d=n?.getBoundingClientRect().width??0,l=a?.getBoundingClientRect().width??0,c=s?.getBoundingClientRect().width??0,h=this._dir.value==="rtl"?"-1":"1",u=`${o+d}px`,p=`calc(${h} * (${u} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;e.style.transform=`var( + --mat-mdc-form-field-label-transform, + ${Ffe} translateX(${p}) + )`;let m=o+d+l+c;this._elementRef.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${m}px)`)}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let r=e.getRootNode();return r&&r!==e}return document.documentElement.contains(e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-form-field"]],contentQueries:function(r,n,a){if(r&1&&(Q8(a,n._labelChild,Nn,5),ui(a,Sh,5),ui(a,Afe,5),ui(a,QV,5),ui(a,$V,5),ui(a,za,5)),r&2){K8();let s;je(s=We())&&(n._formFieldControl=s.first),je(s=We())&&(n._prefixChildren=s),je(s=We())&&(n._suffixChildren=s),je(s=We())&&(n._errorChildren=s),je(s=We())&&(n._hintChildren=s)}},viewQuery:function(r,n){if(r&1&&(vt(sfe,5),vt(afe,5),vt(ofe,5),vt(lfe,5),vt(cfe,5),vt(GV,5),vt(WV,5),vt(jV,5)),r&2){let a;je(a=We())&&(n._textField=a.first),je(a=We())&&(n._iconPrefixContainer=a.first),je(a=We())&&(n._textPrefixContainer=a.first),je(a=We())&&(n._iconSuffixContainer=a.first),je(a=We())&&(n._textSuffixContainer=a.first),je(a=We())&&(n._floatingLabel=a.first),je(a=We())&&(n._notchedOutline=a.first),je(a=We())&&(n._lineRipple=a.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(r,n){r&2&&ut("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-no-animations",n._animationMode==="NoopAnimations")("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-focused",n._control.focused)("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[Tt([{provide:Eh,useExisting:t},{provide:KV,useExisting:t}])],ngContentSelectors:ufe,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,n){if(r&1){let a=Ce();ti(dfe),de(0,mfe,1,1,"ng-template",null,0,u0),B(2,"div",6,1),ce("click",function(o){return ue(a),he(n._control.onContainerClick(o))}),de(4,pfe,1,0,"div",7),B(5,"div",8),de(6,yfe,2,2,"div",9)(7,xfe,3,0,"div",10)(8,bfe,3,0,"div",11),B(9,"div",12),de(10,wfe,1,1,null,13),wt(11),U(),de(12,Cfe,3,0,"div",14)(13,Tfe,3,0,"div",15),U(),de(14,Sfe,1,0,"div",16),U(),B(15,"div",17),de(16,Efe,2,1,"div",18)(17,Mfe,5,2,"div",19),U()}if(r&2){let a;j(2),ut("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),j(2),Qt(!n._hasOutline()&&!n._control.disabled?4:-1),j(2),Qt(n._hasOutline()?6:-1),j(),Qt(n._hasIconPrefix?7:-1),j(),Qt(n._hasTextPrefix?8:-1),j(2),Qt(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),j(2),Qt(n._hasTextSuffix?12:-1),j(),Qt(n._hasIconSuffix?13:-1),j(),Qt(n._hasOutline()?-1:14),j(),ut("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic"),j(),Qt((a=n._getDisplayedMessages())==="error"?16:a==="hint"?17:-1)}},dependencies:[GV,WV,Rb,jV,za],styles:['.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-filled-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-outlined-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-filled-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-filled-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-filled-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-outlined-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-outlined-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color, var(--mat-sys-outline));border-width:var(--mdc-outlined-text-field-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),100% - max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))*2)}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none;--mat-form-field-notch-max-width: 100%}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[Rfe.transitionMessages]},changeDetection:0})}return t})(),Dh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,Im,Ct]})}return t})();var Ofe=["panel"],Lfe=["*"];function Nfe(t,i){if(t&1){let e=Ce();B(0,"div",1,0),ce("@panelAnimation.done",function(n){ue(e);let a=ne();return he(a._animationDone.next(n))}),wt(2),U()}if(t&2){let e=i.id,r=ne();Tn(r._classList),ut("mat-mdc-autocomplete-visible",r.showPanel)("mat-mdc-autocomplete-hidden",!r.showPanel)("mat-primary",r._color==="primary")("mat-accent",r._color==="accent")("mat-warn",r._color==="warn"),ee("id",r.id)("@panelAnimation",r.isOpen?"visible":"hidden"),pt("aria-label",r.ariaLabel||null)("aria-labelledby",r._getPanelAriaLabelledby(e))}}var Bfe=hn("panelAnimation",[qn("void, hidden",Rt({opacity:0,transform:"scaleY(0.8)"})),Li(":enter, hidden => visible",[D6([Ii("0.03s linear",Rt({opacity:1})),Ii("0.12s cubic-bezier(0, 0, 0.2, 1)",Rt({transform:"scaleY(1)"}))])]),Li(":leave, visible => hidden",[Ii("0.075s linear",Rt({opacity:0}))])]),xI=class{source;option;constructor(i,e){this.source=i,this.option=e}},ZV=new Se("mat-autocomplete-default-options",{providedIn:"root",factory:Vfe});function Vfe(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}var JV=(()=>{class t{_changeDetectorRef=Q(Ut);_elementRef=Q(Ze);_defaults=Q(ZV);_activeOptionChanges=kt.EMPTY;_animationDone=new Le;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple;optionSelected=new Le;opened=new Le;closed=new Le;optionActivated=new Le;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=Q(wi).getId("mat-autocomplete-");inertGroups;constructor(){let e=Q(hi);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new km(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let r=new xI(this,e);this.optionSelected.emit(r)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let r=e?e+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(r,n,a){if(r&1&&(ui(a,is,5),ui(a,$0,5)),r&2){let s;je(s=We())&&(n.options=s),je(s=We())&&(n.optionGroups=s)}},viewQuery:function(r,n){if(r&1&&(vt(Oi,7),vt(Ofe,5)),r&2){let a;je(a=We())&&(n.template=a.first),je(a=We())&&(n.panel=a.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",$e],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",$e],requireSelection:[2,"requireSelection","requireSelection",$e],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",$e],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",$e]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[Tt([{provide:Y0,useExisting:t}]),At],ngContentSelectors:Lfe,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(r,n){r&1&&(ti(),de(0,Nfe,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[Bfe]},changeDetection:0})}return t})();var Ufe={provide:bs,useExisting:Pn(()=>bI),multi:!0};var qV=new Se("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let t=Q(Dn);return()=>t.scrollStrategies.reposition()}});function zfe(t){return()=>t.scrollStrategies.reposition()}var Gfe={provide:qV,deps:[Dn],useFactory:zfe},bI=(()=>{class t{_environmentInjector=Q(vr);_element=Q(Ze);_overlay=Q(Dn);_viewContainerRef=Q(Xi);_zone=Q(dt);_changeDetectorRef=Q(Ut);_dir=Q(vn,{optional:!0});_formField=Q(Eh,{optional:!0,host:!0});_document=Q(St);_viewportRuler=Q(Os);_scrollStrategy=Q(qV);_renderer=Q(Ai);_defaults=Q(ZV,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new Oe;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=kt.EMPTY;_breakpointObserver=Q(Rm);_handsetLandscapeSubscription=kt.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new Oe;_windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled;constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Bd(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Fi(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Xt(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Xt(()=>this._overlayAttached)):bt()).pipe(mt(e=>e instanceof W0?e:null))}optionSelections=Co(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Wi(e),tn(()=>Fi(...e.map(r=>r.onSelectionChange)))):this._initialized.pipe(tn(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new $t(e=>{let r=a=>{let s=Dr(a),o=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,d=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&s!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!o||!o.contains(s))&&(!d||!d.contains(s))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(s)&&e.next(a)},n=[this._renderer.listen("document","click",r),this._renderer.listen("document","auxclick",r),this._renderer.listen("document","touchend",r)];return()=>{n.forEach(a=>a())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let r=e.keyCode,n=En(e);if(r===27&&!n&&e.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&r===13&&this.panelOpen&&!n)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let a=this.autocomplete._keyManager.activeItem,s=r===38||r===40;r===9||s&&!n&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):s&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(s||this.autocomplete._keyManager.activeItem!==a)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let r=e.target,n=r.value;if(r.type==="number"&&(n=n==""?null:parseFloat(n)),this._previousValue!==n){if(this._previousValue=n,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(n),!n)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let a=this.autocomplete.options?.find(s=>s.selected);if(a){let s=this._getDisplayValue(a.value);n!==s&&a.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===e.target){let a=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(a)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new $t(n=>{pn(()=>{n.next()},{injector:this._environmentInjector})}),r=this.autocomplete.options.changes.pipe(Ui(()=>this._positionStrategy.reapplyLastPosition()),wE(0));return Fi(e,r).pipe(tn(()=>this._zone.run(()=>{let n=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),n!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Vi(1)).subscribe(n=>this._setValueAndClose(n))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let r=this.autocomplete;return r&&r.displayWith?r.displayWith(e):e}_assignOptionValue(e){let r=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(r??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let r=this.autocomplete,n=e?e.source:this._pendingAutoselectedOption;n?(this._clearPreviousSelectedOption(n),this._assignOptionValue(n.value),this._onChange(n.value),r._emitSelectEvent(n),this._element.nativeElement.focus()):r.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),r._animationDone?r._animationDone.pipe(Vi(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,r){this.autocomplete?.options?.forEach(n=>{n!==e&&n.selected&&n.deselect(r)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let r=this.autocomplete.id;Lm(this._trackedModal,"aria-owns",r)}}_attachOverlay(e){this.autocomplete;let r=this._overlayRef;r?(this._positionStrategy.setOrigin(this._getConnectedElement()),r.updateSize({width:this._getPanelWidth()})):(this._portal=new ns(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),r=this._overlay.create(this._getOverlayConfig()),this._overlayRef=r,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&r&&r.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(g_.HandsetLandscape).subscribe(a=>{a.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),r&&!r.hasAttached()&&(r.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let n=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&n!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!En(e)||e.keyCode===38&&En(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new Ro({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let r=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],n=this._aboveClass,a=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:n},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:n}],s;this.position==="above"?s=a:this.position==="below"?s=r:s=[...r,...a],e.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let r=-1;for(let n=0;n .cdk-overlay-container [aria-modal="true"]');if(!e)return;let r=this.autocomplete.id;this._trackedModal&&Bd(this._trackedModal,"aria-owns",r),Lm(e,"aria-owns",r),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;Bd(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(r,n){r&1&&ce("focusin",function(){return n._handleFocus()})("blur",function(){return n._onTouched()})("input",function(s){return n._handleInput(s)})("keydown",function(s){return n._handleKeydown(s)})("click",function(){return n._handleClick()}),r&2&&pt("autocomplete",n.autocompleteAttribute)("role",n.autocompleteDisabled?null:"combobox")("aria-autocomplete",n.autocompleteDisabled?null:"list")("aria-activedescendant",n.panelOpen&&n.activeOption?n.activeOption.id:null)("aria-expanded",n.autocompleteDisabled?null:n.panelOpen.toString())("aria-controls",n.autocompleteDisabled||!n.panelOpen||n.autocomplete==null?null:n.autocomplete.id)("aria-haspopup",n.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",$e]},exportAs:["matAutocompleteTrigger"],features:[Tt([Ufe]),At,ei]})}return t})(),e7=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[Gfe],imports:[Ia,Bm,Ct,aa,Bm,Ct]})}return t})();var jfe=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(r,n){},styles:["textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}"],encapsulation:2,changeDetection:0})}return t})(),t7=xs({passive:!0}),i7=(()=>{class t{_platform=Q(hi);_ngZone=Q(dt);_styleLoader=Q(on);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return lr;this._styleLoader.load(jfe);let r=dr(e),n=this._monitoredElements.get(r);if(n)return n.subject;let a=new Oe,s="cdk-text-field-autofilled",o=d=>{d.animationName==="cdk-text-field-autofill-start"&&!r.classList.contains(s)?(r.classList.add(s),this._ngZone.run(()=>a.next({target:d.target,isAutofilled:!0}))):d.animationName==="cdk-text-field-autofill-end"&&r.classList.contains(s)&&(r.classList.remove(s),this._ngZone.run(()=>a.next({target:d.target,isAutofilled:!1})))};return this._ngZone.runOutsideAngular(()=>{r.addEventListener("animationstart",o,t7),r.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(r,{subject:a,unlisten:()=>{r.removeEventListener("animationstart",o,t7)}}),a}stopMonitoring(e){let r=dr(e),n=this._monitoredElements.get(r);n&&(n.unlisten(),n.subject.complete(),r.classList.remove("cdk-text-field-autofill-monitored"),r.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(r))}ngOnDestroy(){this._monitoredElements.forEach((e,r)=>this.stopMonitoring(r))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var n7=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({})}return t})();var Wfe=new Se("MAT_INPUT_VALUE_ACCESSOR"),Xfe=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Yfe=new Se("MAT_INPUT_CONFIG"),ss=(()=>{class t{_elementRef=Q(Ze);_platform=Q(hi);ngControl=Q(ho,{optional:!0,self:!0});_autofillMonitor=Q(i7);_ngZone=Q(dt);_formField=Q(Eh,{optional:!0});_renderer=Q(Ai);_uid=Q(wi).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=Q(Yfe,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_formFieldDescribedBy;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new Oe;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=sa(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Ns.required)??!1}set required(e){this._required=sa(e)}_required;get type(){return this._type}set type(e){let r=this._type;this._type=e||"text",this._validateType(),!this._isTextarea&&mA().has(this._type)&&(this._elementRef.nativeElement.type=this._type),this._type!==r&&this._ensureWheelDefaultBehavior()}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=sa(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>mA().has(e));constructor(){let e=Q(jc,{optional:!0}),r=Q(la,{optional:!0}),n=Q(M_),a=Q(Wfe,{optional:!0,self:!0}),s=this._elementRef.nativeElement,o=s.nodeName.toLowerCase();a?Id(a.value)?this._signalBasedValueAccessor=a:this._inputValueAccessor=a:this._inputValueAccessor=s,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(s,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Nm(n,this.ngControl,r,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=o==="select",this._isTextarea=o==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=s.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&h0(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let r=this._elementRef.nativeElement;r.type==="number"?(r.type="text",r.setSelectionRange(0,0),r.type="number"):r.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let r=this._elementRef.nativeElement;this._previousPlaceholder=e,e?r.setAttribute("placeholder",e):r.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){Xfe.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,r=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&r&&r.label)}else return this.focused&&!this.disabled||!this.empty}setDescribedByIds(e){let r=this._elementRef.nativeElement,n=r.getAttribute("aria-describedby"),a;if(n){let s=this._formFieldDescribedBy||e;a=e.concat(n.split(" ").filter(o=>o&&!s.includes(o)))}else a=e;this._formFieldDescribedBy=e,a.length?r.setAttribute("aria-describedby",a.join(" ")):r.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let r=e.target;!r.value&&r.selectionStart===0&&r.selectionEnd===0&&(r.setSelectionRange(1,1),r.setSelectionRange(0,0))};_webkitBlinkWheelListener=()=>{};_ensureWheelDefaultBehavior(){this._cleanupWebkitWheel?.(),this._type==="number"&&(this._platform.BLINK||this._platform.WEBKIT)&&(this._cleanupWebkitWheel=this._renderer.listen(this._elementRef.nativeElement,"wheel",this._webkitBlinkWheelListener))}_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(r,n){r&1&&ce("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),r&2&&(na("id",n.id)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),pt("name",n.name||null)("readonly",n._getReadonlyAttribute())("aria-disabled",n.disabled&&n.disabledInteractive?"true":null)("aria-invalid",n.empty&&n.required?null:n.errorState)("aria-required",n.required)("id",n.id),ut("mat-input-server",n._isServer)("mat-mdc-form-field-textarea-control",n._isInFormField&&n._isTextarea)("mat-mdc-form-field-input-control",n._isInFormField)("mat-mdc-input-disabled-interactive",n.disabledInteractive)("mdc-text-field__input",n._isInFormField)("mat-mdc-native-select-inline",n._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",$e]},exportAs:["matInput"],features:[Tt([{provide:Sh,useExisting:t}]),At,ei]})}return t})(),r7=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,Dh,Dh,n7,Ct]})}return t})();function $fe(t,i){if(t&1&&(B(0,"mat-label"),Y(1),U()),t&2){let e=ne();j(),ze(e.binding.title)}}function Qfe(t,i){if(t&1){let e=Ce();B(0,"button",7),ce("click",function(){ue(e);let n=ne();return he(n.clearInput())}),B(1,"mat-icon"),Y(2,"close"),U()()}}function Kfe(t,i){t&1&&(B(0,"mat-option",8),we(1,"mat-spinner",9),U())}function Zfe(t,i){if(t&1&&(B(0,"mat-option",10)(1,"span",11),Y(2),U(),Y(3),U()),t&2){let e=i.$implicit;ee("value",e),j(2),ze(e.code),j(),Qe("",e.display," ")}}var Oo=(()=>{class t{static{this.nextId=0}constructor(e){this.terminologyService=e,this.term="",this.selectionChange=new Le,this.formControl=new VV,this.loading=!1,this.selectedConcept={},this.stateChanges=new Oe,this.focused=!1,this.ngControl=null,this.errorState=!1,this.controlType="app-autocomplete-binding",this.id=`app-autocomplete-binding-${t.nextId++}`,this.describedBy="",this.onChange=()=>{},this.onTouched=()=>{}}get empty(){return!this.formControl.value}setDescribedByIds(e){this.describedBy=e.join(" ")}onContainerClick(e){}writeValue(e){e&&typeof e=="object"&&e.display?this.formControl.setValue(e.display,{emitEvent:!1}):this.formControl.setValue(e,{emitEvent:!1})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}ngOnChanges(e){e.term&&(this.term=e.term.currentValue,this.term&&typeof this.term=="object"&&this.term.display?this.formControl.setValue(this.term.display):this.formControl.setValue(this.term))}ngOnInit(){this.autoFilter=this.formControl.valueChanges.pipe(Tr(300),qs(),tn(e=>e?.length>=3?(this.loading=!0,this.terminologyService.expandValueSet(this.binding.ecl,e,0,50)):bt([])),Ui(e=>{this.loading=!1}))}onTermChange(){this.formControl.setValue(this.term)}optionSelected(e){this.selectedConcept=e,this.selectionChange.emit(e),this.onChange(e)}clearInput(){this.formControl.reset(),this.selectedConcept={code:"",display:""},this.selectionChange.emit(this.selectedConcept)}change(e){let r=e?.option?.value;r&&(this.optionSelected({code:r.code,display:r.display}),this.formControl.setValue(r.display))}static{this.\u0275fac=function(r){return new(r||t)(be(Ri))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-autocomplete-binding"]],inputs:{binding:"binding",term:"term"},outputs:{selectionChange:"selectionChange"},standalone:!1,features:[Tt([{provide:bs,useExisting:Pn(()=>t),multi:!0},{provide:Sh,useExisting:t}]),ei],decls:11,vars:10,consts:[["auto","matAutocomplete"],[4,"ngIf"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["autoActiveFirstOption","",3,"optionSelected"],["disabled","","class","loading",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["disabled","",1,"loading"],["diameter","35"],[3,"value"],[1,"code"]],template:function(r,n){if(r&1){let a=Ce();B(0,"mat-form-field"),de(1,$fe,2,1,"mat-label",1),we(2,"input",2),B(3,"mat-hint"),Y(4),U(),de(5,Qfe,3,0,"button",3),B(6,"mat-autocomplete",4,0),ce("optionSelected",function(o){return ue(a),he(n.change(o))}),de(8,Kfe,2,0,"mat-option",5)(9,Zfe,4,3,"mat-option",6),qi(10,"async"),U()()}if(r&2){let a,s=Pt(7);j(),ee("ngIf",n.binding.title),j(),io("placeholder",(n.formControl.value==null?null:n.formControl.value.display)||n.binding.title||"Search..."),ee("formControl",n.formControl)("matAutocomplete",s),j(2),ze(n.binding.note),j(),ee("ngIf",n.formControl.value),j(3),ee("ngIf",n.loading),j(),ee("ngForOf",(a=es(10,8,n.autoFilter))==null||a.expansion==null?null:a.expansion.contains)}},dependencies:[ci,oi,ln,Pi,Bn,Nn,za,fw,JV,is,bI,Ls,ss,hr,xn,Th,Pb],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}.id-icon[_ngcontent-%COMP%]{margin-left:10px;color:#2e8b57}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return t})();function Jfe(t,i){t&1&&we(0,"mat-spinner",20)}function qfe(t,i){t&1&&(B(0,"th",21),Y(1," Date "),U())}function eme(t,i){if(t&1&&(B(0,"td",22),Y(1),qi(2,"date"),U()),t&2){let e=i.$implicit;j(),Qe(" ",Hr(2,1,e.date,"yyyy-MM-dd")," ")}}function tme(t,i){t&1&&(B(0,"th",21),Y(1," ConceptId "),U())}function ime(t,i){if(t&1&&(B(0,"td",22),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.code," ")}}function nme(t,i){t&1&&(B(0,"th",21),Y(1," Term "),U())}function rme(t,i){t&1&&(B(0,"span",24),Y(1,"Allergy / Intolerance condition"),U())}function sme(t,i){if(t&1&&(B(0,"td",22),de(1,rme,2,0,"span",23),Y(2),U()),t&2){let e=i.$implicit;j(),ee("ngIf",e.allergy),j(),Qe(" ",e.display," ")}}function ame(t,i){t&1&&we(0,"tr",25)}function ome(t,i){t&1&&we(0,"tr",26)}function lme(t,i){t&1&&(B(0,"th",21),Y(1," ConceptId "),U())}function cme(t,i){if(t&1&&(B(0,"td",22),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.code," ")}}function dme(t,i){t&1&&(B(0,"th",21),Y(1," Term "),U())}function ume(t,i){if(t&1&&(B(0,"td",22),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.display," ")}}function hme(t,i){t&1&&we(0,"tr",25)}function fme(t,i){t&1&&we(0,"tr",26)}var mme=[],pme=[],mw=(()=>{class t{constructor(e){this.terminologyService=e,this.problemBinding={ecl:"< 404684003 |Clinical finding|",title:"Search..."},this.eclProblem="< 404684003 |Clinical finding|",this.term="",this.displayedColumns=["date","code","display"],this.dataToDisplay=[...mme],this.dataSource=new _I(this.dataToDisplay),this.loading=!1,this.displayedColumns2=["code","display"],this.dataToDisplay2=[...pme],this.dataSource2=new wI(this.dataToDisplay2)}updateProblem(e){return Ve(this,null,function*(){this.selectedProblemSct=e})}addProblem(e){return Ve(this,null,function*(){if(this.selectedProblemSct||e){let r=e||this.selectedProblemSct;if(this.loading=!0,this.term=r.display,r.date=new Date,r.code.indexOf(":")>-1){r.allergy=!0;let n=r.substance;this.dataToDisplay2.find(a=>a.code===n.code)||(this.dataToDisplay2=[...this.dataToDisplay2,n],this.dataSource2.setData(this.dataToDisplay2))}else(yield this.getAllergyData(r))?.expansion?.contains?.length>0&&(r.allergy=!0,this.addAllergySubstanceToList(r));this.dataToDisplay.find(n=>n.code===r.code)||(this.dataToDisplay=[...this.dataToDisplay,r],this.dataSource.setData(this.dataToDisplay)),this.loading=!1,this.term=""}})}addAllergySubstanceToList(e){return Ve(this,null,function*(){(yield this.getAllergySubstance(e))?.expansion?.contains?.forEach(n=>{this.dataToDisplay2.find(a=>a.code===n.code)||(this.dataToDisplay2=[...this.dataToDisplay2,n],this.dataSource2.setData(this.dataToDisplay2))})})}getAllergyData(e){return Ve(this,null,function*(){let r=yield this.terminologyService.expandValueSet("<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",e.code,0,1);return sn(r.pipe(mt(n=>n)))})}getAllergySubstance(e){return Ve(this,null,function*(){let r=yield this.terminologyService.expandValueSet(`${e.code} |${e.display}| . (246075003 |Causative agent (attribute)| OR 47429007 |Associated with (attribute)|)`,"");return sn(r.pipe(mt(n=>n)))})}static{this.\u0275fac=function(r){return new(r||t)(be(Ri))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-allergies-problem-list"]],standalone:!1,decls:60,vars:11,consts:[["substancePopoverMenu","matMenu"],["id","main-card"],[1,"container-space"],[1,"problem-list"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],[1,"container"],[1,"item"],[3,"selectionChange","binding","term"],["mat-flat-button","","color","primary",3,"click"],["diameter","35",4,"ngIf"],["mat-table","",3,"dataSource"],["matColumnDef","date"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","code"],["matColumnDef","display"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35"],["mat-header-cell",""],["mat-cell",""],["class","tag pill",4,"ngIf"],[1,"tag","pill"],["mat-header-row",""],["mat-row",""]],template:function(r,n){if(r&1){let a=Ce();B(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"h4"),Y(4,"Problem List "),B(5,"button",4)(6,"mat-icon"),Y(7,"info"),U()(),B(8,"mat-menu",null,0)(10,"span",5),ce("click",function(o){return ue(a),he(o.stopPropagation())}),B(11,"h4"),Y(12,"Problem list"),U(),B(13,"p"),Y(14,"Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),U(),B(15,"p"),Y(16,"For practical guidance using SNOMED CT to document hypersensitivity to specific substances in a problem list, it is suggested to map to the appropriate concepts under the 473011001 |Allergic condition (finding)|hierarchies. This is due to the lack of sufficient content under 609433001 |Hypersensitivity disposition (finding)|and 421961002 |Hypersensitivity reaction (disorder)| and that many of the concepts under 609328004 |Allergic disposition (finding)|and 419076005 |Allergic reaction (disorder)| have unclear mechanisms which may actually represent non-allergic hypersensitivity. Please note that SNOMED international does not plan to create new children concepts of hypersensitivity disposition to specific substances unless more than one Member country would submit a request for them to answer to an active use-case."),U(),B(17,"p"),Y(18,"Almost all allergy concepts are modeled by substances in SNOMED CT. A very small number of allergy concepts are modeled by products but with explicit description for the specific intended meaning. Records of allergy to multiple substances or to multi-ingredient products should be recoded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),U(),B(19,"p"),Y(20,"Vaccine allergy is an example where allergy concepts are modeled using a product concept. For example, \u2018Allergy to component of vaccine product (finding)\u2019 with a synonym \u2018vaccine allergy\u2019 has been modeled by vaccine product. The concept represents that allergy is caused by any substance in a vaccine product."),U(),B(21,"p"),Y(22,"To record the level of certainty or verification status, it is recommended to use additional data elements in the EHR information model. Even though it is possible to utilize the SNOMED CT model for \u2018situation with explicit context\u2019 to express certainty, this is not recommended due to potential ambiguity. For example, \u201Csuspected penicillin allergy\u201D can mean uncertainty with the condition (is it real allergy?) or with the causative agent (is it penicillin?). Even though SNOMED CT editorial guideline is clear that the first interpretation is correct, it is better to use other methods to represent the uncertainty to avoid confusion."),U(),B(23,"p"),Y(24,"For more information check the "),B(25,"a",6),Y(26,"Implementation Guide"),U(),Y(27," developed by the SNOMED International Allergy Clinical Reference Group."),U()()()(),B(28,"div",7)(29,"div",8)(30,"app-autocomplete-binding",9),ce("selectionChange",function(o){return ue(a),he(n.updateProblem(o))}),U()(),B(31,"div",8)(32,"button",10),ce("click",function(){return ue(a),he(n.addProblem())}),Y(33,"Add problem"),U()(),B(34,"div",8),de(35,Jfe,1,0,"mat-spinner",11),U()(),B(36,"table",12),Gt(37,13),de(38,qfe,2,0,"th",14)(39,eme,3,4,"td",15),Ht(),Gt(40,16),de(41,tme,2,0,"th",14)(42,ime,2,1,"td",15),Ht(),Gt(43,17),de(44,nme,2,0,"th",14)(45,sme,3,2,"td",15),Ht(),de(46,ame,1,0,"tr",18)(47,ome,1,0,"tr",19),U()(),B(48,"div",3)(49,"h4"),Y(50,"Substances the patient is allergic to:"),U(),B(51,"table",12),Gt(52,16),de(53,lme,2,0,"th",14)(54,cme,2,1,"td",15),Ht(),Gt(55,17),de(56,dme,2,0,"th",14)(57,ume,2,1,"td",15),Ht(),de(58,hme,1,0,"tr",18)(59,fme,1,0,"tr",19),U()()()()}if(r&2){let a=Pt(9);j(5),ee("matMenuTriggerFor",a),j(5),ee("disableRipple",!0),j(20),ee("binding",n.problemBinding)("term",n.term),j(5),ee("ngIf",n.loading),j(),ee("dataSource",n.dataSource),j(10),ee("matHeaderRowDef",n.displayedColumns),j(),ee("matRowDefColumns",n.displayedColumns),j(4),ee("dataSource",n.dataSource2),j(7),ee("matHeaderRowDef",n.displayedColumns2),j(),ee("matRowDefColumns",n.displayedColumns2)}},dependencies:[oi,di,ln,Pi,ur,_r,rs,Ls,jd,Ra,ka,Na,Fa,Pa,Ba,Oa,La,Va,Ua,Oo,Fs],styles:["#main-card[_ngcontent-%COMP%]{padding:10px}app-autocomplete-binding[_ngcontent-%COMP%]{display:block;min-width:500px}.container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;margin:10px 0;gap:10px}.container-space[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;margin:10px 0;gap:10px}.problem-list[_ngcontent-%COMP%]{width:60%}.tag[_ngcontent-%COMP%]{position:absolute;top:0;right:0;padding-left:10px;padding-right:10px;margin-top:5px}td[_ngcontent-%COMP%]{position:relative}.pill[_ngcontent-%COMP%]{display:inline-block;font-size:10px;background-color:orange;color:#fff;padding:4px 8px;border-radius:20px;position:absolute;top:0;right:0;margin-top:1rem}.mat-column-display[_ngcontent-%COMP%]{min-width:350px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}}return t})(),_I=class extends fh{constructor(i){super(),this._dataStream=new wo,this.setData(i)}connect(){return this._dataStream}disconnect(){}setData(i){this._dataStream.next(i)}},wI=class extends fh{constructor(i){super(),this._dataStream=new wo,this.setData(i)}connect(){return this._dataStream}disconnect(){}setData(i){this._dataStream.next(i)}};var EI=["*"];function vme(t,i){t&1&&wt(0)}var yme=["tabListContainer"],xme=["tabList"],bme=["tabListInner"],_me=["nextPaginator"],wme=["previousPaginator"],Cme=t=>({animationDuration:t}),Tme=(t,i)=>({value:t,params:i});function Sme(t,i){}var Eme=["tabBodyWrapper"],Dme=["tabHeader"];function Mme(t,i){}function Ame(t,i){if(t&1&&de(0,Mme,0,0,"ng-template",12),t&2){let e=ne().$implicit;ee("cdkPortalOutlet",e.templateLabel)}}function Ime(t,i){if(t&1&&Y(0),t&2){let e=ne().$implicit;ze(e.textLabel)}}function Rme(t,i){if(t&1){let e=Ce();B(0,"div",7,2),ce("click",function(){let n=ue(e),a=n.$implicit,s=n.$index,o=ne(),d=Pt(1);return he(o._handleClick(a,d,s))})("cdkFocusChange",function(n){let a=ue(e).$index,s=ne();return he(s._tabFocusChanged(n,a))}),we(2,"span",8)(3,"div",9),B(4,"span",10)(5,"span",11),de(6,Ame,1,1,null,12)(7,Ime,1,1),U()()()}if(t&2){let e=i.$implicit,r=i.$index,n=Pt(1),a=ne();Tn(e.labelClass),ut("mdc-tab--active",a.selectedIndex===r),ee("id",a._getTabLabelId(r))("disabled",e.disabled)("fitInkBarToContent",a.fitInkBarToContent),pt("tabIndex",a._getTabIndex(r))("aria-posinset",r+1)("aria-setsize",a._tabs.length)("aria-controls",a._getTabContentId(r))("aria-selected",a.selectedIndex===r)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null),j(3),ee("matRippleTrigger",n)("matRippleDisabled",e.disabled||a.disableRipple),j(3),Qt(e.templateLabel?6:7)}}function Pme(t,i){t&1&&wt(0)}function kme(t,i){if(t&1){let e=Ce();B(0,"mat-tab-body",13),ce("_onCentered",function(){ue(e);let n=ne();return he(n._removeTabBodyWrapperHeight())})("_onCentering",function(n){ue(e);let a=ne();return he(a._setTabBodyWrapperHeight(n))}),U()}if(t&2){let e=i.$implicit,r=i.$index,n=ne();Tn(e.bodyClass),ut("mat-mdc-tab-body-active",n.selectedIndex===r),ee("id",n._getTabContentId(r))("content",e.content)("position",e.position)("origin",e.origin)("animationDuration",n.animationDuration)("preserveContent",n.preserveContent),pt("tabindex",n.contentTabIndex!=null&&n.selectedIndex===r?n.contentTabIndex:null)("aria-labelledby",n._getTabLabelId(r))("aria-hidden",n.selectedIndex!==r)}}var Fme=new Se("MatTabContent"),Ome=(()=>{class t{template=Q(Oi);constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","matTabContent",""]],features:[Tt([{provide:Fme,useExisting:t}])]})}return t})(),Lme=new Se("MatTabLabel"),o7=new Se("MAT_TAB"),Nme=(()=>{class t extends R6{_closestTab=Q(o7,{optional:!0});static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[Tt([{provide:Lme,useExisting:t}]),Ft]})}return t})(),l7=new Se("MAT_TAB_GROUP"),ul=(()=>{class t{_viewContainerRef=Q(Xi);_closestTabGroup=Q(l7,{optional:!0});disabled=!1;get templateLabel(){return this._templateLabel}set templateLabel(e){this._setTemplateLabelInput(e)}_templateLabel;_explicitContent=void 0;_implicitContent;textLabel="";ariaLabel;ariaLabelledby;labelClass;bodyClass;_contentPortal=null;get content(){return this._contentPortal}_stateChanges=new Oe;position=null;origin=null;isActive=!1;constructor(){Q(on).load(Wr)}ngOnChanges(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new ns(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(e){e&&e._closestTab===this&&(this._templateLabel=e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-tab"]],contentQueries:function(r,n,a){if(r&1&&(ui(a,Nme,5),ui(a,Ome,7,Oi)),r&2){let s;je(s=We())&&(n.templateLabel=s.first),je(s=We())&&(n._explicitContent=s.first)}},viewQuery:function(r,n){if(r&1&&vt(Oi,7),r&2){let a;je(a=We())&&(n._implicitContent=a.first)}},hostAttrs:["hidden",""],inputs:{disabled:[2,"disabled","disabled",$e],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},exportAs:["matTab"],features:[Tt([{provide:o7,useExisting:t}]),At,ei],ngContentSelectors:EI,decls:1,vars:0,template:function(r,n){r&1&&(ti(),de(0,vme,1,0,"ng-template"))},encapsulation:2})}return t})(),CI="mdc-tab-indicator--active",s7="mdc-tab-indicator--no-transition",TI=class{_items;_currentItem;constructor(i){this._items=i}hide(){this._items.forEach(i=>i.deactivateInkBar()),this._currentItem=void 0}alignToElement(i){let e=this._items.find(n=>n.elementRef.nativeElement===i),r=this._currentItem;if(e!==r&&(r?.deactivateInkBar(),e)){let n=r?.elementRef.nativeElement.getBoundingClientRect?.();e.activateInkBar(n),this._currentItem=e}}},Bme=(()=>{class t{_elementRef=Q(Ze);_inkBarElement;_inkBarContentElement;_fitToContent=!1;get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(e){this._fitToContent!==e&&(this._fitToContent=e,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(e){let r=this._elementRef.nativeElement;if(!e||!r.getBoundingClientRect||!this._inkBarContentElement){r.classList.add(CI);return}let n=r.getBoundingClientRect(),a=e.width/n.width,s=e.left-n.left;r.classList.add(s7),this._inkBarContentElement.style.setProperty("transform",`translateX(${s}px) scaleX(${a})`),r.getBoundingClientRect(),r.classList.remove(s7),r.classList.add(CI),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(CI)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let e=this._elementRef.nativeElement.ownerDocument||document,r=this._inkBarElement=e.createElement("span"),n=this._inkBarContentElement=e.createElement("span");r.className="mdc-tab-indicator",n.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",r.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let e=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;e.appendChild(this._inkBarElement)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",$e]},features:[At]})}return t})();var c7=(()=>{class t extends Bme{elementRef=Q(Ze);disabled=!1;focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(r,n){r&2&&(pt("aria-disabled",!!n.disabled),ut("mat-mdc-tab-disabled",n.disabled))},inputs:{disabled:[2,"disabled","disabled",$e]},features:[At,Ft]})}return t})(),a7={passive:!0},Vme=650,Ume=100,zme=(()=>{class t{_elementRef=Q(Ze);_changeDetectorRef=Q(Ut);_viewportRuler=Q(Os);_dir=Q(vn,{optional:!0});_ngZone=Q(dt);_platform=Q(hi);_sharedResizeObserver=Q(dw);_injector=Q(Wt);_renderer=Q(Ai);_animationMode=Q(Mi,{optional:!0});_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new Oe;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged;_keyManager;_currentTextContent;_stopScrolling=new Oe;disablePagination=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(e){let r=isNaN(e)?0:e;this._selectedIndex!=r&&(this._selectedIndexChanged=!0,this._selectedIndex=r,this._keyManager&&this._keyManager.updateActiveItem(r))}_selectedIndex=0;selectFocusedIndex=new Le;indexFocused=new Le;constructor(){this._eventCleanups=this._ngZone.runOutsideAngular(()=>[this._renderer.listen(this._elementRef.nativeElement,"mouseleave",()=>this._stopInterval())])}ngAfterViewInit(){this._eventCleanups.push(gA(this._renderer,this._previousPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("before"),a7),gA(this._renderer,this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),a7))}ngAfterContentInit(){let e=this._dir?this._dir.change:bt("ltr"),r=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(Tr(32),Vt(this._destroyed)),n=this._viewportRuler.change(150).pipe(Vt(this._destroyed)),a=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new vh(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),pn(a,{injector:this._injector}),Fi(e,n,r,this._items.changes,this._itemsResized()).pipe(Vt(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),a()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(s=>{this.indexFocused.emit(s),this._setTabFocus(s)})}_itemsResized(){return typeof ResizeObserver!="function"?lr:this._items.changes.pipe(Wi(this._items),tn(e=>new $t(r=>this._ngZone.runOutsideAngular(()=>{let n=new ResizeObserver(a=>r.next(a));return e.forEach(a=>n.observe(a.elementRef.nativeElement)),()=>{n.disconnect()}}))),Gu(1),Xt(e=>e.some(r=>r.contentRect.width>0&&r.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._eventCleanups.forEach(e=>e()),this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!En(e))switch(e.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let r=this._items.get(this.focusIndex);r&&!r.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e))}break;default:this._keyManager.onKeydown(e)}}_onContentChanges(){let e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){return this._items?!!this._items.toArray()[e]:!0}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();let r=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?r.scrollLeft=0:r.scrollLeft=r.scrollWidth-r.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let e=this.scrollDistance,r=this._getLayoutDirection()==="ltr"?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(r)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){let r=this._tabListContainer.nativeElement.offsetWidth,n=(e=="before"?-1:1)*r/3;return this._scrollTo(this._scrollDistance+n)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;let r=this._items?this._items.toArray()[e]:null;if(!r)return;let n=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:a,offsetWidth:s}=r.elementRef.nativeElement,o,d;this._getLayoutDirection()=="ltr"?(o=a,d=o+s):(d=this._tabListInner.nativeElement.offsetWidth-a,o=d-s);let l=this.scrollDistance,c=this.scrollDistance+n;oc&&(this.scrollDistance+=Math.min(d-c,o-l))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let e=this._tabListInner.nativeElement.scrollWidth,r=this._elementRef.nativeElement.offsetWidth,n=e-r>=5;n||(this.scrollDistance=0),n!==this._showPaginationControls&&(this._showPaginationControls=n,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let e=this._tabListInner.nativeElement.scrollWidth,r=this._tabListContainer.nativeElement.offsetWidth;return e-r||0}_alignInkBarToSelectedTab(){let e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,r=e?e.elementRef.nativeElement:null;r?this._inkBar.alignToElement(r):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,r){r&&r.button!=null&&r.button!==0||(this._stopInterval(),Ko(Vme,Ume).pipe(Vt(Fi(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:n,distance:a}=this._scrollHeader(e);(a===0||a>=n)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let r=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(r,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:r,distance:this._scrollDistance}}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,inputs:{disablePagination:[2,"disablePagination","disablePagination",$e],selectedIndex:[2,"selectedIndex","selectedIndex",Yi]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[At]})}return t})(),Gme=(()=>{class t extends zme{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new TI(this._items),super.ngAfterContentInit()}_itemSelected(e){e.preventDefault()}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275cmp=Te({type:t,selectors:[["mat-tab-header"]],contentQueries:function(r,n,a){if(r&1&&ui(a,c7,4),r&2){let s;je(s=We())&&(n._items=s)}},viewQuery:function(r,n){if(r&1&&(vt(yme,7),vt(xme,7),vt(bme,7),vt(_me,5),vt(wme,5)),r&2){let a;je(a=We())&&(n._tabListContainer=a.first),je(a=We())&&(n._tabList=a.first),je(a=We())&&(n._tabListInner=a.first),je(a=We())&&(n._nextPaginator=a.first),je(a=We())&&(n._previousPaginator=a.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(r,n){r&2&&ut("mat-mdc-tab-header-pagination-controls-enabled",n._showPaginationControls)("mat-mdc-tab-header-rtl",n._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",$e]},features:[At,Ft],ngContentSelectors:EI,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(r,n){if(r&1){let a=Ce();ti(),B(0,"div",5,0),ce("click",function(){return ue(a),he(n._handlePaginatorClick("before"))})("mousedown",function(o){return ue(a),he(n._handlePaginatorPress("before",o))})("touchend",function(){return ue(a),he(n._stopInterval())}),we(2,"div",6),U(),B(3,"div",7,1),ce("keydown",function(o){return ue(a),he(n._handleKeydown(o))}),B(5,"div",8,2),ce("cdkObserveContent",function(){return ue(a),he(n._onContentChanges())}),B(7,"div",9,3),wt(9),U()()(),B(10,"div",10,4),ce("mousedown",function(o){return ue(a),he(n._handlePaginatorPress("after",o))})("click",function(){return ue(a),he(n._handlePaginatorClick("after"))})("touchend",function(){return ue(a),he(n._stopInterval())}),we(12,"div",6),U()}r&2&&(ut("mat-mdc-tab-header-pagination-disabled",n._disableScrollBefore),ee("matRippleDisabled",n._disableScrollBefore||n.disableRipple),j(3),ut("_mat-animation-noopable",n._animationMode==="NoopAnimations"),j(2),pt("aria-label",n.ariaLabel||null)("aria-labelledby",n.ariaLabelledby||null),j(5),ut("mat-mdc-tab-header-pagination-disabled",n._disableScrollAfter),ee("matRippleDisabled",n._disableScrollAfter||n.disableRipple))},dependencies:[co,yA],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height, 1px);border-bottom-color:var(--mat-tab-header-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-header-divider-height, 1px);border-top-color:var(--mat-tab-header-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mdc-secondary-navigation-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}"],encapsulation:2})}return t})(),Hme=new Se("MAT_TABS_CONFIG"),jme={translateTab:hn("translateTab",[qn("center, void, left-origin-center, right-origin-center",Rt({transform:"none",visibility:"visible"})),qn("left",Rt({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),qn("right",Rt({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),Li("* => left, * => right, left => center, right => center",Ii("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),Li("void => left-origin-center",[Rt({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),Ii("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),Li("void => right-origin-center",[Rt({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),Ii("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},Wme=(()=>{class t extends Ma{_host=Q(d7);_centeringSub=kt.EMPTY;_leavingSub=kt.EMPTY;constructor(){super()}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(Wi(this._host._isCenterPosition(this._host._position))).subscribe(e=>{this._host._content&&e&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","matTabBodyHost",""]],features:[Ft]})}return t})(),d7=(()=>{class t{_elementRef=Q(Ze);_dir=Q(vn,{optional:!0});_positionIndex;_dirChangeSubscription=kt.EMPTY;_position;_translateTabComplete=new Oe;_onCentering=new Le;_beforeCentering=new Le;_afterLeavingCenter=new Le;_onCentered=new Le(!0);_portalHost;_content;origin;animationDuration="500ms";preserveContent=!1;set position(e){this._positionIndex=e,this._computePositionAnimationState()}constructor(){if(this._dir){let e=Q(Ut);this._dirChangeSubscription=this._dir.change.subscribe(r=>{this._computePositionAnimationState(r),e.markForCheck()})}this._translateTabComplete.subscribe(e=>{this._isCenterPosition(e.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(e.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){this._position=="center"&&this.origin!=null&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(e){let r=this._isCenterPosition(e.toState);this._beforeCentering.emit(r),r&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_isCenterPosition(e){return e=="center"||e=="left-origin-center"||e=="right-origin-center"}_computePositionAnimationState(e=this._getLayoutDirection()){this._positionIndex<0?this._position=e=="ltr"?"left":"right":this._positionIndex>0?this._position=e=="ltr"?"right":"left":this._position="center"}_computePositionFromOrigin(e){let r=this._getLayoutDirection();return r=="ltr"&&e<=0||r=="rtl"&&e>0?"left-origin-center":"right-origin-center"}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-tab-body"]],viewQuery:function(r,n){if(r&1&&vt(Ma,5),r&2){let a;je(a=We())&&(n._portalHost=a.first)}},hostAttrs:[1,"mat-mdc-tab-body"],inputs:{_content:[0,"content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"},decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(r,n){if(r&1){let a=Ce();B(0,"div",1,0),ce("@translateTab.start",function(o){return ue(a),he(n._onTranslateTabStarted(o))})("@translateTab.done",function(o){return ue(a),he(n._translateTabComplete.next(o))}),de(2,Sme,0,0,"ng-template",2),U()}r&2&&ee("@translateTab",pb(3,Tme,n._position,qr(1,Cme,n.animationDuration)))},dependencies:[Wme,Uc],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[jme.translateTab]}})}return t})(),Xme=!0,Ga=(()=>{class t{_elementRef=Q(Ze);_changeDetectorRef=Q(Ut);_animationMode=Q(Mi,{optional:!0});_allTabs;_tabBodyWrapper;_tabHeader;_tabs=new eo;_indexToSelect=0;_lastFocusedTabIndex=null;_tabBodyWrapperHeight=0;_tabsSubscription=kt.EMPTY;_tabLabelSubscription=kt.EMPTY;color;get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(e){this._fitInkBarToContent=e,this._changeDetectorRef.markForCheck()}_fitInkBarToContent=!1;stretchTabs=!0;alignTabs=null;dynamicHeight=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this._indexToSelect=isNaN(e)?null:e}_selectedIndex=null;headerPosition="above";get animationDuration(){return this._animationDuration}set animationDuration(e){let r=e+"";this._animationDuration=/^\d+$/.test(r)?e+"ms":r}_animationDuration;get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(e){this._contentTabIndex=isNaN(e)?null:e}_contentTabIndex;disablePagination=!1;disableRipple=!1;preserveContent=!1;get backgroundColor(){return this._backgroundColor}set backgroundColor(e){if(!Xme)throw new Error("mat-tab-group background color must be set through the Sass theming API");let r=this._elementRef.nativeElement.classList;r.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&r.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}_backgroundColor;ariaLabel;ariaLabelledby;selectedIndexChange=new Le;focusChange=new Le;animationDone=new Le;selectedTabChange=new Le(!0);_groupId;_isServer=!Q(hi).isBrowser;constructor(){let e=Q(Hme,{optional:!0});this._groupId=Q(wi).getId("mat-tab-group-"),this.animationDuration=e&&e.animationDuration?e.animationDuration:"500ms",this.disablePagination=e&&e.disablePagination!=null?e.disablePagination:!1,this.dynamicHeight=e&&e.dynamicHeight!=null?e.dynamicHeight:!1,e?.contentTabIndex!=null&&(this.contentTabIndex=e.contentTabIndex),this.preserveContent=!!e?.preserveContent,this.fitInkBarToContent=e&&e.fitInkBarToContent!=null?e.fitInkBarToContent:!1,this.stretchTabs=e&&e.stretchTabs!=null?e.stretchTabs:!0,this.alignTabs=e&&e.alignTabs!=null?e.alignTabs:null}ngAfterContentChecked(){let e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){let r=this._selectedIndex==null;if(!r){this.selectedTabChange.emit(this._createChangeEvent(e));let n=this._tabBodyWrapper.nativeElement;n.style.minHeight=n.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((n,a)=>n.isActive=a===e),r||(this.selectedIndexChange.emit(e),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((r,n)=>{r.position=n-e,this._selectedIndex!=null&&r.position==0&&!r.origin&&(r.origin=e-this._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let e=this._clampTabIndex(this._indexToSelect);if(e===this._selectedIndex){let r=this._tabs.toArray(),n;for(let a=0;a{r[e].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(e))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(Wi(this._allTabs)).subscribe(e=>{this._tabs.reset(e.filter(r=>r._closestTabGroup===this||!r._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(e){let r=this._tabHeader;r&&(r.focusIndex=e)}_focusChanged(e){this._lastFocusedTabIndex=e,this.focusChange.emit(this._createChangeEvent(e))}_createChangeEvent(e){let r=new SI;return r.index=e,this._tabs&&this._tabs.length&&(r.tab=this._tabs.toArray()[e]),r}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=Fi(...this._tabs.map(e=>e._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(e){return Math.min(this._tabs.length-1,Math.max(e||0,0))}_getTabLabelId(e){return`${this._groupId}-label-${e}`}_getTabContentId(e){return`${this._groupId}-content-${e}`}_setTabBodyWrapperHeight(e){if(!this.dynamicHeight||!this._tabBodyWrapperHeight)return;let r=this._tabBodyWrapper.nativeElement;r.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(r.style.height=e+"px")}_removeTabBodyWrapperHeight(){let e=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=e.clientHeight,e.style.height="",this.animationDone.emit()}_handleClick(e,r,n){r.focusIndex=n,e.disabled||(this.selectedIndex=n)}_getTabIndex(e){let r=this._lastFocusedTabIndex??this.selectedIndex;return e===r?0:-1}_tabFocusChanged(e,r){e&&e!=="mouse"&&e!=="touch"&&(this._tabHeader.focusIndex=r)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-tab-group"]],contentQueries:function(r,n,a){if(r&1&&ui(a,ul,5),r&2){let s;je(s=We())&&(n._allTabs=s)}},viewQuery:function(r,n){if(r&1&&(vt(Eme,5),vt(Dme,5)),r&2){let a;je(a=We())&&(n._tabBodyWrapper=a.first),je(a=We())&&(n._tabHeader=a.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:11,hostBindings:function(r,n){r&2&&(pt("mat-align-tabs",n.alignTabs),Tn("mat-"+(n.color||"primary")),gn("--mat-tab-animation-duration",n.animationDuration),ut("mat-mdc-tab-group-dynamic-height",n.dynamicHeight)("mat-mdc-tab-group-inverted-header",n.headerPosition==="below")("mat-mdc-tab-group-stretch-tabs",n.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",$e],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",$e],alignTabs:[0,"mat-align-tabs","alignTabs"],dynamicHeight:[2,"dynamicHeight","dynamicHeight",$e],selectedIndex:[2,"selectedIndex","selectedIndex",Yi],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",Yi],disablePagination:[2,"disablePagination","disablePagination",$e],disableRipple:[2,"disableRipple","disableRipple",$e],preserveContent:[2,"preserveContent","preserveContent",$e],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],features:[Tt([{provide:l7,useExisting:t}]),At],ngContentSelectors:EI,decls:9,vars:8,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination","aria-label","aria-labelledby"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"id","mdc-tab--active","class","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","mat-mdc-tab-body-active","class","content","position","origin","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"click","cdkFocusChange","id","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","id","content","position","origin","animationDuration","preserveContent"]],template:function(r,n){if(r&1){let a=Ce();ti(),B(0,"mat-tab-header",3,0),ce("indexFocused",function(o){return ue(a),he(n._focusChanged(o))})("selectFocusedIndex",function(o){return ue(a),he(n.selectedIndex=o)}),am(2,Rme,8,17,"div",4,d0),U(),de(4,Pme,1,0),B(5,"div",5,1),am(7,kme,1,13,"mat-tab-body",6,d0),U()}r&2&&(ee("selectedIndex",n.selectedIndex||0)("disableRipple",n.disableRipple)("disablePagination",n.disablePagination)("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledby),j(2),om(n._tabs),j(2),Qt(n._isServer?4:-1),j(),ut("_mat-animation-noopable",n._animationMode==="NoopAnimations"),j(2),om(n._tabs))},dependencies:[Gme,c7,u6,co,Ma,d7],styles:['.mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mdc-secondary-navigation-tab-container-height, 48px);font-family:var(--mat-tab-header-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-header-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-header-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-header-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-header-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mdc-tab-indicator-active-indicator-height, 2px);border-radius:var(--mdc-tab-indicator-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2})}return t})(),SI=class{index;tab};var u7=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,Ct]})}return t})();var b7=Ka(Qd());var AI=class{_document;_textarea;constructor(i,e){this._document=e;let r=this._textarea=this._document.createElement("textarea"),n=r.style;n.position="fixed",n.top=n.opacity="0",n.left="-999em",r.setAttribute("aria-hidden","true"),r.value=i,r.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(r)}copy(){let i=this._textarea,e=!1;try{if(i){let r=this._document.activeElement;i.select(),i.setSelectionRange(0,i.value.length),e=this._document.execCommand("copy"),r&&r.focus()}}catch{}return e}destroy(){let i=this._textarea;i&&(i.remove(),this._textarea=void 0)}},Km=(()=>{class t{_document=Q(St);constructor(){}copy(e){let r=this.beginCopy(e),n=r.copy();return r.destroy(),n}beginCopy(e){return new AI(e,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Yme=new Se("HighlightJs-Config"),Zm=(()=>{class t{constructor(e,r,n,a,s){this.el=e,this.ngModel=r,this.doc=n,this.ngZone=s,this.lang="html",this.mode="simple",Object.assign(this,a)}escapeHTML(e){return(e||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}init(){this.ngZone.runOutsideAngular(()=>{this.destroy();let e=this.el.nativeElement,r=this.code||""+e.innerHTML.trim();if(this.codeEl=this.doc.createElement(this.mode==="default"?"div":"pre"),this.codeEl==null)return;let n=this.mode==="simple";n?(this.lang&&(this.codeEl.className=this.lang),this.parentEl=e.parentNode,this.parentEl.insertBefore(this.codeEl,e.nextSibling)):(this.parentEl=e,this.parentEl.innerHTML="",this.parentEl.appendChild(this.codeEl)),this.codeEl.innerHTML=r,hljs.configure(Me({},this.options)),n?hljs.highlightElement(this.codeEl):this.codeEl.querySelectorAll("pre code").forEach(a=>{hljs.highlightElement(a)})})}destroy(){this.codeEl&&this.parentEl&&(this.parentEl.removeChild(this.codeEl),this.codeEl=void 0)}ngAfterViewInit(){this.init(),this.ngModel?this.modelValue$=this.ngModel.valueChanges?.subscribe(e=>{this.code=this.escapeHTML(e),this.init()}):this.initMutation()}ngOnDestroy(){this.destroy(),this.destroyMutation(),this.modelValue$&&this.modelValue$.unsubscribe()}initMutation(){typeof MutationObserver>"u"||this.ngZone.runOutsideAngular(()=>{this.observer=new MutationObserver(this.init.bind(this)),this.observer.observe(this.el.nativeElement,{characterData:!0,childList:!0,subtree:!0})})}destroyMutation(){this.observer&&this.observer.disconnect()}}return t.\u0275fac=function(e){return new(e||t)(be(Ze),be(wr,8),be(St),be(Yme,8),be(dt))},t.\u0275dir=Ue({type:t,selectors:[["","highlight-js",""]],hostVars:2,hostBindings:function(e,r){e&2&&gn("display",r.mode==="simple"?"none":null)},inputs:{options:"options",lang:"lang",code:"code",mode:"mode"},exportAs:["highlightJs"]}),t})();var h7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=rt({type:t}),t.\u0275inj=nt({imports:[hv]}),t})();var $me=["trigger"],Qme=["panel"],Kme=[[["mat-select-trigger"]],"*"],Zme=["mat-select-trigger","*"];function Jme(t,i){if(t&1&&(B(0,"span",4),Y(1),U()),t&2){let e=ne();j(),ze(e.placeholder)}}function qme(t,i){t&1&&wt(0)}function epe(t,i){if(t&1&&(B(0,"span",11),Y(1),U()),t&2){let e=ne(2);j(),ze(e.triggerValue)}}function tpe(t,i){if(t&1&&(B(0,"span",5),de(1,qme,1,0)(2,epe,2,1,"span",11),U()),t&2){let e=ne();j(),Qt(e.customTrigger?1:2)}}function ipe(t,i){if(t&1){let e=Ce();B(0,"div",12,1),ce("@transformPanel.done",function(n){ue(e);let a=ne();return he(a._panelDoneAnimatingStream.next(n.toState))})("keydown",function(n){ue(e);let a=ne();return he(a._handleKeydown(n))}),wt(2,1),U()}if(t&2){let e=ne();$8("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme(),""),ee("ngClass",e.panelClass)("@transformPanel","showing"),pt("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var npe={transformPanelWrap:hn("transformPanelWrap",[Li("* => void",I6("@transformPanel",[A6()],{optional:!0}))]),transformPanel:hn("transformPanel",[qn("void",Rt({opacity:0,transform:"scale(1, 0.8)"})),Li("void => showing",Ii("120ms cubic-bezier(0, 0, 0.2, 1)",Rt({opacity:1,transform:"scale(1, 1)"}))),Li("* => void",Ii("100ms linear",Rt({opacity:0})))])};var f7=new Se("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let t=Q(Dn);return()=>t.scrollStrategies.reposition()}});function rpe(t){return()=>t.scrollStrategies.reposition()}var spe=new Se("MAT_SELECT_CONFIG"),ape={provide:f7,deps:[Dn],useFactory:rpe},ope=new Se("MatSelectTrigger"),PI=class{source;value;constructor(i,e){this.source=i,this.value=e}},Lo=(()=>{class t{_viewportRuler=Q(Os);_changeDetectorRef=Q(Ut);_elementRef=Q(Ze);_dir=Q(vn,{optional:!0});_idGenerator=Q(wi);_parentFormField=Q(Eh,{optional:!0});ngControl=Q(ho,{self:!0,optional:!0});_liveAnnouncer=Q(T_);_defaultOptions=Q(spe,{optional:!0});_initialized=new Oe;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let r=this.options.toArray()[e];if(r){let n=this.panel.nativeElement,a=A_(e,this.options,this.optionGroups),s=r._getHostElement();e===0&&a===1?n.scrollTop=0:n.scrollTop=I_(s.offsetTop,s.offsetHeight,n.scrollTop,n.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new PI(this,e)}_scrollStrategyFactory=Q(f7);_panelOpen=!1;_compareWith=(e,r)=>e===r;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new Oe;_errorStateTracker;stateChanges=new Oe;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_panelDoneAnimatingStream=new Oe;_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;disableRipple=!1;tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(Ns.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=Co(()=>{let e=this.options;return e?e.changes.pipe(Wi(e),tn(()=>Fi(...e.map(r=>r.onSelectionChange)))):this._initialized.pipe(tn(()=>this.optionSelectionChanges))});openedChange=new Le;_openedStream=this.openedChange.pipe(Xt(e=>e),mt(()=>{}));_closedStream=this.openedChange.pipe(Xt(e=>!e),mt(()=>{}));selectionChange=new Le;valueChange=new Le;constructor(){let e=Q(M_),r=Q(jc,{optional:!0}),n=Q(la,{optional:!0}),a=Q(new Ur("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Nm(e,this.ngControl,n,r,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=a==null?0:parseInt(a)||0,this.id=this.id}ngOnInit(){this._selectionModel=new u_(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(qs(),Vt(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Vt(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Vt(this._destroy)).subscribe(e=>{e.added.forEach(r=>r.select()),e.removed.forEach(r=>r.deselect())}),this.options.changes.pipe(Wi(null),Vt(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),r=this.ngControl;if(e!==this._triggerAriaLabelledBy){let n=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?n.setAttribute("aria-labelledby",e):n.removeAttribute("aria-labelledby")}r&&(this._previousControl!==r.control&&(this._previousControl!==void 0&&r.disabled!==null&&r.disabled!==this.disabled&&(this.disabled=r.disabled),this._previousControl=r.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_trackedModal=null;_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let r=`${this.id}-panel`;this._trackedModal&&Bd(this._trackedModal,"aria-owns",r),Lm(e,"aria-owns",r),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;Bd(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(r=>r.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let r=e.keyCode,n=r===40||r===38||r===37||r===39,a=r===13||r===32,s=this._keyManager;if(!s.isTyping()&&a&&!En(e)||(this.multiple||e.altKey)&&n)e.preventDefault(),this.open();else if(!this.multiple){let o=this.selected;s.onKeydown(e);let d=this.selected;d&&o!==d&&this._liveAnnouncer.announce(d.viewValue,1e4)}}_handleOpenKeydown(e){let r=this._keyManager,n=e.keyCode,a=n===40||n===38,s=r.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!s&&(n===13||n===32)&&r.activeItem&&!En(e))e.preventDefault(),r.activeItem._selectViaInteraction();else if(!s&&this._multiple&&n===65&&e.ctrlKey){e.preventDefault();let o=this.options.some(d=>!d.disabled&&!d.selected);this.options.forEach(d=>{d.disabled||(o?d.select():d.deselect())})}else{let o=r.activeItemIndex;r.onKeydown(e),this._multiple&&a&&e.shiftKey&&r.activeItem&&r.activeItemIndex!==o&&r.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(Vi(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(r=>r.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(r=>this._selectOptionByValue(r)),this._sortValues();else{let r=this._selectOptionByValue(e);r?this._keyManager.updateActiveItem(r):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let r=this.options.find(n=>{if(this._selectionModel.isSelected(n))return!1;try{return(n.value!=null||this.canSelectNullableOptions)&&this._compareWith(n.value,e)}catch{return!1}});return r&&this._selectionModel.select(r),r}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof q0?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new km(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=Fi(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Vt(e)).subscribe(r=>{this._onSelect(r.source,r.isUserInput),r.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Fi(...this.options.map(r=>r._stateChanges)).pipe(Vt(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,r){let n=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(n!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),r&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),r&&this.focus())),n!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((r,n)=>this.sortComparator?this.sortComparator(r,n,e):e.indexOf(r)-e.indexOf(n)),this.stateChanges.next()}}_propagateChanges(e){let r;this.multiple?r=this.selected.map(n=>n.value):r=this.selected?this.selected.value:e,this._value=r,this.valueChange.emit(r),this._onChange(r),this.selectionChange.emit(this._getChangeEvent(r)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let r=0;r0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,r=e?e+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),r=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(r+=" "+this.ariaLabelledby),r}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-select"]],contentQueries:function(r,n,a){if(r&1&&(ui(a,ope,5),ui(a,is,5),ui(a,$0,5)),r&2){let s;je(s=We())&&(n.customTrigger=s.first),je(s=We())&&(n.options=s),je(s=We())&&(n.optionGroups=s)}},viewQuery:function(r,n){if(r&1&&(vt($me,5),vt(Qme,5),vt(GA,5)),r&2){let a;je(a=We())&&(n.trigger=a.first),je(a=We())&&(n.panel=a.first),je(a=We())&&(n._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(r,n){r&1&&ce("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),r&2&&(pt("id",n.id)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n.panelOpen?n.id+"-panel":null)("aria-expanded",n.panelOpen)("aria-label",n.ariaLabel||null)("aria-required",n.required.toString())("aria-disabled",n.disabled.toString())("aria-invalid",n.errorState)("aria-activedescendant",n._getAriaActiveDescendant()),ut("mat-mdc-select-disabled",n.disabled)("mat-mdc-select-invalid",n.errorState)("mat-mdc-select-required",n.required)("mat-mdc-select-empty",n.empty)("mat-mdc-select-multiple",n.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",$e],disableRipple:[2,"disableRipple","disableRipple",$e],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Yi(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",$e],placeholder:"placeholder",required:[2,"required","required",$e],multiple:[2,"multiple","multiple",$e],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",$e],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",Yi],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",$e]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[Tt([{provide:Sh,useExisting:t},{provide:Y0,useExisting:t}]),At,ei],ngContentSelectors:Zme,decls:11,vars:8,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"backdropClick","attach","detach","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(r,n){if(r&1){let a=Ce();ti(Kme),B(0,"div",2,0),ce("click",function(){return ue(a),he(n.open())}),B(3,"div",3),de(4,Jme,2,1,"span",4)(5,tpe,3,1,"span",5),U(),B(6,"div",6)(7,"div",7),yr(),B(8,"svg",8),we(9,"path",9),U()()()(),de(10,ipe,3,9,"ng-template",10),ce("backdropClick",function(){return ue(a),he(n.close())})("attach",function(){return ue(a),he(n._onAttached())})("detach",function(){return ue(a),he(n.close())})}if(r&2){let a=Pt(1);j(3),pt("id",n._valueId),j(),Qt(n.empty?4:5),j(6),ee("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||a)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[q0,GA,Ea],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-form-field-no-animations .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}'],encapsulation:2,data:{animation:[npe.transformPanel]},changeDetection:0})}return t})();var pw=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[ape],imports:[Ia,Bm,Ct,aa,Dh,Bm,Ct]})}return t})();var lpe=["tooltip"],g7=20;var v7=new Se("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let t=Q(Dn);return()=>t.scrollStrategies.reposition({scrollThrottle:g7})}});function cpe(t){return()=>t.scrollStrategies.reposition({scrollThrottle:g7})}var dpe={provide:v7,deps:[Dn],useFactory:cpe};function upe(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var hpe=new Se("mat-tooltip-default-options",{providedIn:"root",factory:upe});var m7="tooltip-panel",p7=xs({passive:!0}),fpe=8,mpe=8,ppe=24,gpe=200,as=(()=>{class t{_overlay=Q(Dn);_elementRef=Q(Ze);_scrollDispatcher=Q(Wl);_viewContainerRef=Q(Xi);_ngZone=Q(dt);_platform=Q(hi);_ariaDescriber=Q(w_);_focusMonitor=Q(br);_dir=Q(vn);_injector=Q(Wt);_defaultOptions=Q(hpe,{optional:!0});_overlayRef;_tooltipInstance;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_scrollStrategy=Q(v7);_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=vpe;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending;_dirSubscribed=!1;get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=sa(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let r=sa(e);this._disabled!==r&&(this._disabled=r,r?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Da(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Da(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let r=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(r)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_passiveListeners=[];_document=Q(St);_touchstartTimeout=null;_destroyed=new Oe;_isDestroyed=!1;constructor(){let e=this._defaultOptions;e&&(this._showDelay=e.showDelay,this._hideDelay=e.hideDelay,e.position&&(this.position=e.position),e.positionAtOrigin&&(this.positionAtOrigin=e.positionAtOrigin),e.touchGestures&&(this.touchGestures=e.touchGestures),e.tooltipClass&&(this.tooltipClass=e.tooltipClass)),this._viewportMargin=fpe}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Vt(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([r,n])=>{e.removeEventListener(r,n,p7)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,r){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let n=this._createOverlay(r);this._detach(),this._portal=this._portal||new ll(this._tooltipComponent,this._viewContainerRef);let a=this._tooltipInstance=n.attach(this._portal).instance;a._triggerElement=this._elementRef.nativeElement,a._mouseLeaveHideDelay=this._hideDelay,a.afterHidden().pipe(Vt(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),a.show(e)}hide(e=this.hideDelay){let r=this._tooltipInstance;r&&(r.isVisible()?r.hide(e):(r._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&a._origin instanceof Ze)return this._overlayRef;this._detach()}let r=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(r);return n.positionChanges.pipe(Vt(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:`${this._cssClassPrefix}-${m7}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Vt(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Vt(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Vt(this._destroyed)).subscribe(a=>{this._isTooltipVisible()&&a.keyCode===27&&!En(a)&&(a.preventDefault(),a.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(Vt(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let r=e.getConfig().positionStrategy,n=this._getOrigin(),a=this._getOverlayPosition();r.withPositions([this._addOffset(Me(Me({},n.main),a.main)),this._addOffset(Me(Me({},n.fallback),a.fallback))])}_addOffset(e){let r=mpe,n=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-r:e.originY==="bottom"?e.offsetY=r:e.originX==="start"?e.offsetX=n?-r:r:e.originX==="end"&&(e.offsetX=n?r:-r),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",r=this.position,n;r=="above"||r=="below"?n={originX:"center",originY:r=="above"?"top":"bottom"}:r=="before"||r=="left"&&e||r=="right"&&!e?n={originX:"start",originY:"center"}:(r=="after"||r=="right"&&e||r=="left"&&!e)&&(n={originX:"end",originY:"center"});let{x:a,y:s}=this._invertPosition(n.originX,n.originY);return{main:n,fallback:{originX:a,originY:s}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",r=this.position,n;r=="above"?n={overlayX:"center",overlayY:"bottom"}:r=="below"?n={overlayX:"center",overlayY:"top"}:r=="before"||r=="left"&&e||r=="right"&&!e?n={overlayX:"end",overlayY:"center"}:(r=="after"||r=="right"&&e||r=="left"&&!e)&&(n={overlayX:"start",overlayY:"center"});let{x:a,y:s}=this._invertPosition(n.overlayX,n.overlayY);return{main:n,fallback:{overlayX:a,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),pn(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,r){return this.position==="above"||this.position==="below"?r==="top"?r="bottom":r==="bottom"&&(r="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:r}}_updateCurrentPositionClass(e){let{overlayY:r,originX:n,originY:a}=e,s;if(r==="center"?this._dir&&this._dir.value==="rtl"?s=n==="end"?"left":"right":s=n==="start"?"left":"right":s=r==="bottom"&&a==="top"?"above":"below",s!==this._currentPosition){let o=this._overlayRef;if(o){let d=`${this._cssClassPrefix}-${m7}-`;o.removePanelClass(d+this._currentPosition),o.addPanelClass(d+s)}this._currentPosition=s}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let r;e.x!==void 0&&e.y!==void 0&&(r=e),this.show(void 0,r)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{let r=e.targetTouches?.[0],n=r?{x:r.clientX,y:r.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let a=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,n)},this._defaultOptions?.touchLongPressShowDelay??a)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",r=>{let n=r.relatedTarget;(!n||!this._overlayRef?.overlayElement.contains(n))&&this.hide()}],["wheel",r=>this._wheelListener(r)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let r=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};e.push(["touchend",r],["touchcancel",r])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([r,n])=>{this._elementRef.nativeElement.addEventListener(r,n,p7)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){let r=this._document.elementFromPoint(e.clientX,e.clientY),n=this._elementRef.nativeElement;r!==n&&!n.contains(r)&&this.hide()}}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let r=this._elementRef.nativeElement,n=r.style;(e==="on"||r.nodeName!=="INPUT"&&r.nodeName!=="TEXTAREA")&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),(e==="on"||!r.draggable)&&(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||pn({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(r,n){r&2&&ut("mat-mdc-tooltip-disabled",n.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return t})(),vpe=(()=>{class t{_changeDetectorRef=Q(Ut);_elementRef=Q(Ze);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled;_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new Oe;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";constructor(){let e=Q(Mi,{optional:!0});this._animationsDisabled=e==="NoopAnimations"}show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>ppe&&e.width>=gpe}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let r=this._tooltip.nativeElement,n=this._showAnimation,a=this._hideAnimation;if(r.classList.remove(e?a:n),r.classList.add(e?n:a),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let s=getComputedStyle(r);(s.getPropertyValue("animation-duration")==="0s"||s.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(r.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-tooltip-component"]],viewQuery:function(r,n){if(r&1&&vt(lpe,7),r&2){let a;je(a=We())&&(n._tooltip=a.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(r,n){r&1&&ce("mouseleave",function(s){return n._handleMouseLeave(s)})},decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(r,n){if(r&1){let a=Ce();B(0,"div",1,0),ce("animationend",function(o){return ue(a),he(n._handleAnimationEnd(o))}),B(2,"div",2),Y(3),U()()}r&2&&(ut("mdc-tooltip--multiline",n._isMultiline),ee("ngClass",n.tooltipClass),j(3),ze(n.message))},dependencies:[Ea],styles:['.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mdc-plain-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mdc-plain-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mdc-plain-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mdc-plain-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mdc-plain-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mdc-plain-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel{line-height:normal}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0})}return t})();var gw=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[dpe],imports:[S_,Ia,Ct,Ct,aa]})}return t})();var xpe=["switch"],bpe=["*"];function _pe(t,i){t&1&&(B(0,"span",10),yr(),B(1,"svg",12),we(2,"path",13),U(),B(3,"svg",14),we(4,"path",15),U()())}var wpe=new Se("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),Cpe={provide:bs,useExisting:Pn(()=>yw),multi:!0},vw=class{source;checked;constructor(i,e){this.source=i,this.checked=e}},yw=(()=>{class t{_elementRef=Q(Ze);_focusMonitor=Q(br);_changeDetectorRef=Q(Ut);defaults=Q(wpe);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=!1;_createChangeEvent(e){return new vw(this,e)}_labelId;get buttonId(){return`${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus()}_noopAnimations;_focused;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required;color;disabled=!1;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck()}hideIcon;disabledInteractive;change=new Le;toggleChange=new Le;get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){Q(on).load(Wr);let e=Q(new Ur("tabindex"),{optional:!0}),r=this.defaults,n=Q(Mi,{optional:!0});this.tabIndex=e==null?0:parseInt(e)||0,this.color=r.color||"accent",this._noopAnimations=n==="NoopAnimations",this.id=this._uniqueId=Q(wi).getId("mat-mdc-slide-toggle-"),this.hideIcon=r.hideIcon??!1,this.disabledInteractive=r.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(e){e.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorOnChange=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new vw(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(r,n){if(r&1&&vt(xpe,5),r&2){let a;je(a=We())&&(n._switchElement=a.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(r,n){r&2&&(na("id",n.id),pt("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Tn(n.color?"mat-"+n.color:""),ut("mat-mdc-slide-toggle-focused",n._focused)("mat-mdc-slide-toggle-checked",n.checked)("_mat-animation-noopable",n._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",$e],color:"color",disabled:[2,"disabled","disabled",$e],disableRipple:[2,"disableRipple","disableRipple",$e],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Yi(e)],checked:[2,"checked","checked",$e],hideIcon:[2,"hideIcon","hideIcon",$e],disabledInteractive:[2,"disabledInteractive","disabledInteractive",$e]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[Tt([Cpe,{provide:Po,useExisting:t,multi:!0}]),At,ei],ngContentSelectors:bpe,decls:13,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(r,n){if(r&1){let a=Ce();ti(),B(0,"div",1)(1,"button",2,0),ce("click",function(){return ue(a),he(n._handleClick())}),we(3,"span",3),B(4,"span",4)(5,"span",5)(6,"span",6),we(7,"span",7),U(),B(8,"span",8),we(9,"span",9),U(),de(10,_pe,5,0,"span",10),U()()(),B(11,"label",11),ce("click",function(o){return ue(a),he(o.stopPropagation())}),wt(12),U()()}if(r&2){let a=Pt(2);ee("labelPosition",n.labelPosition),j(),ut("mdc-switch--selected",n.checked)("mdc-switch--unselected",!n.checked)("mdc-switch--checked",n.checked)("mdc-switch--disabled",n.disabled)("mat-mdc-slide-toggle-disabled-interactive",n.disabledInteractive),ee("tabIndex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex)("disabled",n.disabled&&!n.disabledInteractive),pt("id",n.buttonId)("name",n.name)("aria-label",n.ariaLabel)("aria-labelledby",n._getAriaLabelledBy())("aria-describedby",n.ariaDescribedby)("aria-required",n.required||null)("aria-checked",n.checked)("aria-disabled",n.disabled&&n.disabledInteractive?"true":null),j(8),ee("matRippleTrigger",a)("matRippleDisabled",n.disableRipple||n.disabled)("matRippleCentered",!0),j(),Qt(n.hideIcon?-1:10),j(),ee("for",n.buttonId),pt("id",n._labelId)}},dependencies:[co,Vm],styles:['.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mdc-switch-track-width, 52px)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mdc-switch-track-height, 32px);border-radius:var(--mdc-switch-track-shape, var(--mat-sys-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity, 0.12)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-switch-track-outline-width, 2px);border-color:var(--mat-switch-track-outline-color, var(--mat-sys-outline))}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-switch-selected-track-outline-width, 2px);border-color:var(--mat-switch-selected-track-outline-color, transparent)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-switch-disabled-unselected-track-outline-width, 2px);border-color:var(--mat-switch-disabled-unselected-track-outline-color, var(--mat-sys-on-surface))}@media(forced-colors: active){.mdc-switch__track{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mdc-switch-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity, 0);transition:var(--mat-switch-hidden-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity, 1);transition:var(--mat-switch-visible-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, var(--mat-sys-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mdc-switch-selected-track-color, var(--mat-sys-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity, 1);transition:var(--mat-switch-visible-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity, 0);transition:var(--mat-switch-hidden-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, var(--mat-sys-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, var(--mat-sys-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mdc-switch-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mdc-switch-handle-width);height:var(--mdc-switch-handle-height);border-radius:var(--mdc-switch-handle-shape, var(--mat-sys-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size, 16px);height:var(--mat-switch-unselected-handle-size, 16px);margin:var(--mat-switch-unselected-handle-horizontal-margin, 0 8px)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin, 0 4px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size, 24px);height:var(--mat-switch-selected-handle-size, 24px);margin:var(--mat-switch-selected-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size, 24px);height:var(--mat-switch-with-icon-handle-size, 24px)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size, 28px);height:var(--mat-switch-pressed-handle-size, 28px)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin, 0 22px)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin, 0 2px)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity, 1)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity, 0.38)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media(forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mat-sys-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, var(--mat-sys-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, var(--mat-sys-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, var(--mat-sys-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, var(--mat-sys-on-surface))}.mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mdc-switch-state-layer-size, 40px);height:var(--mdc-switch-state-layer-size, 40px)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-pressed-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-selected-pressed-state-layer-color, var(--mat-sys-primary));opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 0.38)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity, 0.38)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size, 16px);height:var(--mdc-switch-unselected-icon-size, 16px);fill:var(--mdc-switch-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size, 16px);height:var(--mdc-switch-selected-icon-size, 16px);fill:var(--mdc-switch-selected-icon-color, var(--mat-sys-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mat-sys-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-switch-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-switch-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-switch-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-switch-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-switch-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-switch-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}'],encapsulation:2,changeDetection:0})}return t})();var y7=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[yw,Ct,Ct]})}return t})();function Spe(t,i){if(t&1){let e=Ce();B(0,"button",14),ce("click",function(){ue(e);let n=ne().index,a=ne();return he(a.removeReaction(n))}),B(1,"mat-icon"),Y(2,"close"),U()()}}function Epe(t,i){if(t&1){let e=Ce();B(0,"mat-option",15),ce("click",function(){let n=ue(e).$implicit,a=ne().$implicit,s=ne();return he(s.reactionSeveritySelected(a,n))}),Y(1),U()}if(t&2){let e=i.$implicit;ee("value",e),j(),ze(e.display)}}function Dpe(t,i){if(t&1){let e=Ce();B(0,"div",4)(1,"div",5),de(2,Spe,3,0,"button",6),U(),B(3,"div",7)(4,"div",8)(5,"app-autocomplete-binding",9),ce("selectionChange",function(n){let a=ue(e).$implicit,s=ne();return he(s.reactionManifestationSelected(a,n))}),U()(),B(6,"button",10)(7,"mat-icon"),Y(8,"info"),U()(),B(9,"mat-menu",null,0)(11,"span",11),ce("click",function(n){return ue(e),he(n.stopPropagation())}),B(12,"p"),Y(13,"Terminology binding:"),U(),B(14,"pre"),Y(15),U()()()(),B(16,"mat-form-field",12)(17,"mat-label"),Y(18,"Reaction Severity"),U(),B(19,"mat-select"),de(20,Epe,2,2,"mat-option",13),U()(),B(21,"div",7)(22,"div",8)(23,"app-autocomplete-binding",9),ce("selectionChange",function(n){let a=ue(e).$implicit,s=ne();return he(s.reactionRouteSelected(a,n))}),U()(),B(24,"button",10)(25,"mat-icon"),Y(26,"info"),U()(),B(27,"mat-menu",null,1)(29,"span",11),ce("click",function(n){return ue(e),he(n.stopPropagation())}),B(30,"p"),Y(31,"Terminology binding:"),U(),B(32,"pre"),Y(33),U()()()()()}if(t&2){let e=i.index,r=Pt(10),n=Pt(28),a=ne();j(2),ee("ngIf",e>0),j(3),ee("binding",a.reactionManifestationBinding),j(),ee("matMenuTriggerFor",r),j(5),ee("disableRipple",!0),j(4),ze(a.reactionManifestationBinding.ecl),j(5),ee("ngForOf",a.severityOptions),j(3),ee("binding",a.routeBinding),j(),ee("matMenuTriggerFor",n),j(5),ee("disableRipple",!0),j(4),ze(a.routeBinding.ecl)}}var x7=(()=>{class t{constructor(){this.reactions=[],this.newManifestation=new Le,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.reaction={},this.onChangeCallback=()=>{},this.onTouchedCallback=()=>{}}writeValue(e){e!==void 0&&(this.reactions=e)}setDisabledState(e){}addNewReaction(){this.reactions.push(this.reaction),this.reaction={},this.onChangeCallback(this.reactions)}removeReaction(e){this.reactions.splice(e,1),this.onChangeCallback(this.reactions)}reactionManifestationSelected(e,r){e.manifestation=r,this.newManifestation.emit(r),this.onChangeCallback(this.reactions)}reactionSeveritySelected(e,r){e.severity=r,this.onChangeCallback(this.reactions)}reactionRouteSelected(e,r){e.route=r,this.onChangeCallback(this.reactions)}registerOnChange(e){this.onChangeCallback=e}registerOnTouched(e){this.onTouchedCallback=e}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=Te({type:t,selectors:[["app-allergies-allergy-list-reaction"]],inputs:{reactions:"reactions"},outputs:{newManifestation:"newManifestation"},standalone:!1,features:[Tt([{provide:bs,useExisting:Pn(()=>t),multi:!0}])],decls:5,vars:1,consts:[["reactionPopoverMenu","matMenu"],["routePopoverMenu","matMenu"],["class","reaction",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Add reaction",3,"click"],[1,"reaction"],[1,"button-container"],["mat-icon-button","","color","primary","class","remove","matTooltip","Remove reaction",3,"click",4,"ngIf"],[1,"row-centered"],[1,"small-form-field"],[3,"selectionChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disableRipple"],[1,"form-field"],[3,"value","click",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Remove reaction",1,"remove",3,"click"],[3,"click","value"]],template:function(r,n){r&1&&(de(0,Dpe,34,10,"div",2),B(1,"div")(2,"button",3),ce("click",function(){return n.addNewReaction()}),B(3,"mat-icon"),Y(4,"add"),U()()()),r&2&&ee("ngForOf",n.reactions)},dependencies:[ci,oi,ln,Pi,ur,_r,rs,Bn,Nn,is,Lo,as,Oo],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px;margin-bottom:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;width:100%}"]})}}return t})();var Ape=()=>({});function Ipe(t,i){if(t&1){let e=Ce();B(0,"mat-option",31),ce("click",function(){ue(e);let n=ne();return he(n.updateAllergyStr())}),Y(1),U()}if(t&2){let e=i.$implicit;ee("value",e),j(),ze(e.display)}}function Rpe(t,i){if(t&1){let e=Ce();B(0,"mat-option",31),ce("click",function(){ue(e);let n=ne();return he(n.updateAllergyStr())}),Y(1),U()}if(t&2){let e=i.$implicit;ee("value",e),j(),ze(e.display)}}function Ppe(t,i){if(t&1){let e=Ce();B(0,"mat-option",31),ce("click",function(){ue(e);let n=ne();return he(n.updateAllergyStr())}),Y(1),U()}if(t&2){let e=i.$implicit;ee("value",e),j(),ze(e.display)}}function kpe(t,i){if(t&1){let e=Ce();B(0,"app-autocomplete-binding",11),ce("selectionChange",function(n){ue(e);let a=ne();return he(a.substanceSelected(n,!0))}),U()}if(t&2){let e=ne();ee("binding",e.substanceBinding)("term",e.selectedSubstanceTerm)}}function Fpe(t,i){if(t&1){let e=Ce();B(0,"app-autocomplete-binding",11),ce("selectionChange",function(n){ue(e);let a=ne();return he(a.substanceSelected(n))}),U()}if(t&2){let e=ne();ee("binding",e.refinedSubstanceBinding)("term",e.selectedSubstanceTerm)}}function Ope(t,i){if(t&1&&(B(0,"pre"),Y(1),U()),t&2){let e=ne();j(),ze(e.substanceBinding.ecl)}}function Lpe(t,i){if(t&1&&(B(0,"pre"),Y(1),U()),t&2){let e=ne();j(),ze(e.refinedSubstanceBinding.ecl)}}function Npe(t,i){if(t&1){let e=Ce();B(0,"mat-option",31),ce("click",function(){ue(e);let n=ne();return he(n.updateAllergyStr())}),Y(1),U()}if(t&2){let e=i.$implicit;ee("value",e),j(),ze(e.display)}}function Bpe(t,i){if(t&1){let e=Ce();B(0,"mat-option",31),ce("click",function(){ue(e);let n=ne();return he(n.updateAllergyStr())}),Y(1),U()}if(t&2){let e=i.$implicit;ee("value",e),j(),ze(e.display)}}var _7=(()=>{class t{constructor(e,r,n){this.terminologyService=e,this.clipboard=r,this._snackBar=n,this.newProblem=new Le,this.clinicalStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"active",display:"Active"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"inactive",display:"Inactive"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"resolved",display:"Resolved"}],this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.verificationStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"unconfirmed",display:"Unconfirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"presumed",display:"Presumed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"confirmed",display:"Confirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"refuted",display:"Refuted"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"entered-in-error",display:"Entered in Error"}],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.intoleranceTypeOptions=[{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"609433001",display:"Hypersensitivity disposition (finding)",fhirCode:"allergy",fhirDisplay:"Allergy"},{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"782197009",display:"Intolerance to substance (finding)",fhirCode:"intolerance",fhirDisplay:"Intolerance"}],this.selectedIntoleranceType=null,this.intoleranceCategoryOptions=[{code:"food",display:"Food"},{code:"medication",display:"Medication"},{code:"environment",display:"Environment"},{code:"biologic",display:"Biologic"}],this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new er(this.selectedIntoleranceCategories),this.criticalityOptions=[{code:"low",display:"Low Risk"},{code:"high",display:"High Risk"},{code:"unable-to-assess",display:"Unable to Assess Risk"}],this.selectedCriticality=null,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.codeBinding={ecl:"<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",title:"Allergy/Intolerance by propensity"},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.substanceBinding={ecl:"<<105590001 | Substance (substance) | OR <<373873005 | Pharmaceutical / biologic product (product) |",title:"Allergy/Intolerance substance or product"},this.refinedSubstanceBinding={ecl:"<<105590001 | Substance (substance) |",title:"Allergy/Intolerance substance based on propensity"},this.selectedSubstanceTerm="",this.selectedSubstance=null,this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm="",this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.selectedRoute=null,this.selectedRouteTerm="",this.outputAllergyBase={resourceType:"AllergyIntolerance",id:"medication",text:{},clinicalStatus:{coding:[]},verificationStatus:{coding:[]},type:"",category:[],criticality:"high",code:{coding:[]},reaction:[{substance:[{coding:[]}],manifestation:[{coding:[]}],exposureRoute:{coding:[]},severity:""}],patient:{reference:"Patient/example"},recordedDate:"2010-03-01",participant:[{function:{coding:[{system:"http://terminology.hl7.org/CodeSystem/provenance-participant-type",code:"author",display:"Author"}]},actor:{reference:"Practitioner/example"}}]},this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.outputAllergyStr=""}ngOnInit(){this.updateAllergyStr()}onReactionsChange(e){this.updateAllergyStr()}clear(){this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.selectedIntoleranceType=null,this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new er(this.selectedIntoleranceCategories),this.selectedCriticality=null,this.selectedSeverity={},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.selectedSubstanceTerm="",this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm=" ",this.selectedRoute=null,this.selectedRouteTerm=" ",this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.updateAllergyStr(),setTimeout(()=>{this.selectedReactionManifestationTerm="",this.selectedRouteTerm=""},100)}updateAllergyStr(){this.outputAllergy.clinicalStatus.coding=[this.selectedClinicalStatus],this.outputAllergy.verificationStatus.coding=[this.selectedVerificationStatus],this.outputAllergy.type=this.selectedIntoleranceType?this.selectedIntoleranceType.fhirCode:"",this.outputAllergy.category=this.selectedIntoleranceCategories.length?this.selectedIntoleranceCategories.map(e=>e.display):[],this.outputAllergy.criticality=this.selectedCriticality?.code?[this.selectedCriticality.code]:{},this.outputAllergy.reaction=[],this.selectedReactions.forEach(e=>{e.manifestation.code&&(e.manifestation.system="http://snomed.info/sct"),e.route.code&&(e.route.system="http://snomed.info/sct");let r={substance:[{coding:[this.selectedSubstance]}],manifestation:[{coding:e.manifestation?[e.manifestation]:[{}]}],exposureRoute:{coding:e.route?[e.route]:[{}]},severity:e.severity?e.severity.code:""};this.outputAllergy.reaction.push(r)}),setTimeout(()=>{this.outputAllergyStr=JSON.stringify(this.outputAllergy,null,2)},100)}substanceSelected(e,r){return Ve(this,null,function*(){r&&(this.selectedCodeTerm=""),this.selectedSubstance=e,this.selectedIntoleranceCategories=[],e=Object.assign({system:"http://snomed.info/sct"},e),this.recordPropensity||(this.outputAllergy.code.coding=[e]),this.outputAllergy.reaction[0].substance[0].coding=[e],(yield this.getSubstanceCategories(e))?.expansion?.contains?.forEach(a=>{a.code=="762766007"?this.selectedIntoleranceCategories.push(this.intoleranceCategoryOptions[0]):a.code=="115668003"?this.selectedIntoleranceCategories.push(this.intoleranceCategoryOptions[3]):a.code=="410942007"?this.selectedIntoleranceCategories.push(this.intoleranceCategoryOptions[1]):a.code=="57795002"&&this.selectedIntoleranceCategories.push(this.intoleranceCategoryOptions[2])}),this.selectedIntoleranceCategoriesControl.setValue(this.selectedIntoleranceCategories),this.updateAllergyStr()})}propensityRecordChanged(){this.outputAllergy.code.coding=[],this.selectedCode&&this.codeSelected(this.selectedCode)}codeSelected(e){return Ve(this,null,function*(){if(e=Object.assign({system:"http://snomed.info/sct"},e),e){this.selectedCodeTerm=e.display,this.selectedCode=e,this.recordPropensity&&(this.outputAllergy.code.coding=[e]);let r=yield this.getTypes(e);if(r.expansion?.contains){let a=r.expansion?.contains[0];this.selectedIntoleranceType=this.intoleranceTypeOptions.find(s=>s.code===a.code)}let n=yield this.getAllergySubstance(e);if(n.expansion.contains||(n=yield this.getIntoleranceSubstance(e)),n.expansion?.contains){let a=n.expansion?.contains[0];this.refinedSubstanceBinding.ecl=`<<${a.code} | ${a.display} |`,this.substanceSelected(a),this.selectedSubstanceTerm=a.display}else this.refinedSubstanceBinding.ecl="<<105590001 | Substance (substance) |"}})}getIntoleranceSubstance(e){return Ve(this,null,function*(){let r=yield this.terminologyService.expandValueSet(`${e.code} |${e.display}| . 47429007 |Associated with (attribute)|`,"");return sn(r.pipe(mt(n=>n)))})}getAllergySubstance(e){return Ve(this,null,function*(){let r=yield this.terminologyService.expandValueSet(`${e.code} |${e.display}| . 246075003 |Causative agent (attribute)|`,"");return sn(r.pipe(mt(n=>n)))})}getSubstanceCategories(e){return Ve(this,null,function*(){let r=yield this.terminologyService.expandValueSet(`> ${e.code} |${e.display}| AND (762766007 |Edible substance| OR 115668003 |Biological substance (substance)| OR 410942007 |Drug or medicament (substance)| OR 57795002 |Chemical element|)`,"");return sn(r.pipe(mt(n=>n)))})}getTypes(e){return Ve(this,null,function*(){let r=yield this.terminologyService.expandValueSet(`> ${e.code} |${e.display}| AND (609433001 |Hypersensitivity disposition| OR 782197009 |Intolerance to substance|)`,"");return sn(r.pipe(mt(n=>n)))})}saveFhirResource(){var e=new Blob([this.outputAllergyStr],{type:"text/plain;charset=utf-8"});(0,b7.saveAs)(e,"AllergyIntolerance.json")}copyToClipboard(e){this.clipboard.copy(e)}addToProblemsList(){if(this.selectedCode)this.newProblem.emit(this.selectedCode);else if(this.selectedSubstance&&this.selectedIntoleranceType){let e="";this.selectedIntoleranceType.code==="609433001"?e="Allergy to ":this.selectedIntoleranceType.code==="782197009"&&(e="Intolerance to "),e+=this.selectedSubstance.display;let r={code:`${this.selectedIntoleranceType.code}:246075003=${this.selectedSubstance.code}`,display:e,substance:this.selectedSubstance};this.newProblem.emit(r)}else this._snackBar.openFromComponent(Bi,{duration:1*1e3,data:"Nothing to add to problem list",panelClass:["yellow-snackbar"]});this.clear()}static{this.\u0275fac=function(r){return new(r||t)(be(Ri),be(Km),be(oa))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-allergies-allergy-list"]],outputs:{newProblem:"newProblem"},standalone:!1,decls:105,vars:30,consts:[["substancePopoverMenu","matMenu"],["codePopoverMenu","matMenu"],["id","main-card"],[1,"row"],[1,"column"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-flat-button","","color","accent","id","clear",3,"click"],[1,"row-centered"],[1,"smallest-form-field"],[3,"selectionChange","binding","term"],["mat-menu-item","",3,"click","disableRipple"],["matTooltip","Defines wether to use a propensity based model or a substance based model. Defines which one is recorded in the code element of the AllergyIntolerance resource.",3,"ngModelChange","click","ngModel"],[1,"form-field"],[3,"ngModelChange","ngModel"],[3,"value","click",4,"ngFor","ngForOf"],[1,"small-form-field"],[3,"binding","term","selectionChange",4,"ngIf"],[4,"ngIf"],[3,"formControl","multiple"],[3,"ngModelChange","newManifestation","ngModel"],["mat-flat-button","","color","accent",3,"click"],["href","https://hl7.org/FHIR/allergyintolerance.html","target","_blank"],["id","output"],["id","save"],["mat-icon-button","","matTooltip","Download FHIR Resource",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy FHIR Resource",3,"click"],["fontIcon","content_copy"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],[3,"click","value"]],template:function(r,n){if(r&1){let a=Ce();B(0,"mat-card",2)(1,"div",3)(2,"div",4)(3,"h4"),Y(4,"Allergy Intolerance Form "),B(5,"button",5)(6,"mat-icon"),Y(7,"info"),U()(),B(8,"mat-menu",null,0)(10,"span",6),ce("click",function(o){return ue(a),he(o.stopPropagation())}),B(11,"h4"),Y(12,"Allergy list"),U(),B(13,"p"),Y(14,"Allergy or intolerance can be recorded in a specific section (e.g., \u201CDrug Allergy and Intolerance\u201D) of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),U(),B(15,"p"),Y(16,"In terms of documenting sensitivity type in the allergy list there is the option to map to 609433001 |Hypersensitivity disposition which in SNOMED CT represents both immune-mediated and non-immune mediated hypersensitivity or to map to 609328004 |Allergic disposition (finding)|which is common clinical parlance for what many clinicians would mean by allergic or non-allergic hypersensitivity. In addition, as recommended in the FHIR documentation if one is unclear as to whether a condition represents hypersensitivity or intolerance, one can just omit the type element from the resource."),U(),B(17,"p"),Y(18,"If SNOMED CT concepts are used to document the causative agent, it is preferable to use concepts from the Substance rather than Pharmaceutical/biologic product hierarchy since this will facilitate the downstream use of data, e.g., clinical decision support, data exchange."),U(),B(19,"p"),Y(20,"Almost all allergy and intolerance finding concepts are modeled using substance concepts in SNOMED CT. The SNOMED CT substance hierarchy has grouper concepts that are based on structure (e.g., Macrolide) or disposition (e.g., substance with histamine receptor antagonist mechanism of action). Clinical decision support systems can utilize these grouper concepts to access information at the desired level of granularity. Clinicians can also record a class of substance instead of a specific drug or substance (e.g., angiotensin II receptor antagonist). Note that substance grouper concepts based on therapeutic role (e.g., anticonvulsant) is not recommended for use because they are currently under review and may be retired in future."),U(),B(21,"p"),Y(22,"There are situations in which it is difficult to determine the specific substance as a true cause or most likely cause of a condition. This is the case for allergy/intolerance to a product containing multiple substances."),U(),B(23,"p"),Y(24,"Records of allergy to multiple substances or to multi-ingredient products should be recorded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),U(),B(25,"p"),Y(26,"For more information check the "),B(27,"a",7),Y(28,"Implementation Guide"),U(),Y(29," developed by the SNOMED International Allergy Clinical Reference Group."),U()()()(),B(30,"button",8),ce("click",function(){return ue(a),he(n.clear())}),Y(31,"Clear"),U(),B(32,"div",9)(33,"div",10)(34,"app-autocomplete-binding",11),ce("selectionChange",function(o){return ue(a),he(n.codeSelected(o))}),U()(),B(35,"button",5)(36,"mat-icon"),Y(37,"info"),U()(),B(38,"mat-menu",null,1)(40,"span",12),ce("click",function(o){return ue(a),he(o.stopPropagation())}),B(41,"p"),Y(42,"Terminology binding:"),U(),B(43,"pre"),Y(44),U()()(),B(45,"mat-slide-toggle",13),On("ngModelChange",function(o){return ue(a),Xn(n.recordPropensity,o)||(n.recordPropensity=o),he(o)}),ce("click",function(){return ue(a),he(n.propensityRecordChanged())}),Y(46," Propensity based model "),U()(),B(47,"mat-form-field",14)(48,"mat-label"),Y(49,"Allergy Intolerance Type"),U(),B(50,"mat-select",15),On("ngModelChange",function(o){return ue(a),Xn(n.selectedIntoleranceType,o)||(n.selectedIntoleranceType=o),he(o)}),de(51,Ipe,2,2,"mat-option",16),U()(),B(52,"div",9)(53,"mat-form-field",4)(54,"mat-label"),Y(55,"Clinical Status"),U(),B(56,"mat-select",15),On("ngModelChange",function(o){return ue(a),Xn(n.selectedClinicalStatus,o)||(n.selectedClinicalStatus=o),he(o)}),de(57,Rpe,2,2,"mat-option",16),U()(),B(58,"mat-form-field",4)(59,"mat-label"),Y(60,"Verification Status"),U(),B(61,"mat-select",15),On("ngModelChange",function(o){return ue(a),Xn(n.selectedVerificationStatus,o)||(n.selectedVerificationStatus=o),he(o)}),de(62,Ppe,2,2,"mat-option",16),U()()(),B(63,"div",9)(64,"div",17),de(65,kpe,1,2,"app-autocomplete-binding",18)(66,Fpe,1,2,"app-autocomplete-binding",18),U(),B(67,"button",5)(68,"mat-icon"),Y(69,"info"),U()(),B(70,"mat-menu",null,0)(72,"span",12),ce("click",function(o){return ue(a),he(o.stopPropagation())}),B(73,"p"),Y(74,"Terminology binding:"),U(),de(75,Ope,2,1,"pre",19)(76,Lpe,2,1,"pre",19),U()()(),B(77,"div",9)(78,"mat-form-field",4)(79,"mat-label"),Y(80,"Substance Category"),U(),B(81,"mat-select",20),de(82,Npe,2,2,"mat-option",16),U()(),B(83,"mat-form-field",4)(84,"mat-label"),Y(85,"Allergy Criticality"),U(),B(86,"mat-select",15),On("ngModelChange",function(o){return ue(a),Xn(n.selectedCriticality,o)||(n.selectedCriticality=o),he(o)}),de(87,Bpe,2,2,"mat-option",16),U()()(),B(88,"app-allergies-allergy-list-reaction",21),On("ngModelChange",function(o){return ue(a),Xn(n.selectedReactions,o)||(n.selectedReactions=o),he(o)}),ce("ngModelChange",function(o){return ue(a),he(n.onReactionsChange(o))})("newManifestation",function(o){return ue(a),he(n.newProblem.emit(o))}),U(),B(89,"button",22),ce("click",function(){return ue(a),he(n.addToProblemsList())}),Y(90,"Save"),U()(),B(91,"div",4)(92,"h4"),Y(93,"AllergyIntolerance HL7 FHIR Resource ("),B(94,"a",23),Y(95,"link"),U(),Y(96,")"),U(),B(97,"div",24)(98,"div",25)(99,"button",26),ce("click",function(){return ue(a),he(n.saveFhirResource())}),we(100,"mat-icon",27),U(),B(101,"button",28),ce("click",function(){return ue(a),he(n.copyToClipboard(n.outputAllergyStr))}),we(102,"mat-icon",29),U()(),B(103,"textarea",30),Y(104," "),U()()()()()}if(r&2){let a=Pt(9),s=Pt(39);j(5),ee("matMenuTriggerFor",a),j(5),ee("disableRipple",!0),j(24),ee("binding",n.codeBinding)("term",n.selectedCodeTerm),j(),ee("matMenuTriggerFor",s),j(5),ee("disableRipple",!0),j(4),ze(n.codeBinding.ecl),j(),Fn("ngModel",n.recordPropensity),j(5),Fn("ngModel",n.selectedIntoleranceType),j(),ee("ngForOf",n.intoleranceTypeOptions),j(5),Fn("ngModel",n.selectedClinicalStatus),j(),ee("ngForOf",n.clinicalStatusOptions),j(4),Fn("ngModel",n.selectedVerificationStatus),j(),ee("ngForOf",n.verificationStatusOptions),j(3),ee("ngIf",!n.recordPropensity),j(),ee("ngIf",n.recordPropensity),j(),ee("matMenuTriggerFor",a),j(5),ee("disableRipple",!0),j(3),ee("ngIf",!n.recordPropensity),j(),ee("ngIf",n.recordPropensity),j(5),ee("formControl",n.selectedIntoleranceCategoriesControl)("multiple",!0),j(),ee("ngForOf",n.intoleranceCategoryOptions),j(4),Fn("ngModel",n.selectedCriticality),j(),ee("ngForOf",n.criticalityOptions),j(),Fn("ngModel",n.selectedReactions),j(15),ee("options",Yn(29,Ape))("lang","json")("innerHTML",n.outputAllergyStr,Bl)}},dependencies:[ci,oi,Zm,di,ln,Pi,ur,_r,rs,Bn,Nn,is,xn,Th,jd,Lo,wr,as,yw,Oo,x7],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{position:relative;flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}#clear[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}}return t})();var w7=(()=>{class t{constructor(e){this._snackBar=e}addProblem(e){return Ve(this,null,function*(){this.allergiesProblemListComponent.addProblem(e),this._snackBar.openFromComponent(Bi,{duration:1*1e3,data:"Problem list updated",panelClass:["green-snackbar"]})})}static{this.\u0275fac=function(r){return new(r||t)(be(oa))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-allergies"]],viewQuery:function(r,n){if(r&1&&vt(mw,5),r&2){let a;je(a=We())&&(n.allergiesProblemListComponent=a.first)}},standalone:!1,decls:31,vars:2,consts:[["substancePopoverMenu","matMenu"],["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Allergy List Approach (AllergyIntolerance FHIR resource)"],[3,"newProblem"],["label","Problem List Approach (Condition FHIR resource)"]],template:function(r,n){if(r&1){let a=Ce();B(0,"div",1)(1,"h3"),Y(2,"Allergy, Hypersensitivity and Intolerance "),B(3,"button",2)(4,"mat-icon"),Y(5,"info"),U()(),B(6,"mat-menu",null,0)(8,"span",3),ce("click",function(o){return ue(a),he(o.stopPropagation())}),B(9,"h4"),Y(10,"Allergy, Hypersensitivity and Intolerance Implementation Demo"),U(),B(11,"p"),Y(12,"This is a demonstration of different implementation approaches for recording Allergies, Hypersensitivity and Intolerance."),U(),B(13,"p")(14,"b"),Y(15,"Allergy list:"),U(),Y(16," allergy or intolerance can be recorded in a specific section of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),U(),B(17,"p")(18,"b"),Y(19,"Problem list:"),U(),Y(20," Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),U(),B(21,"p"),Y(22,"For more information check the "),B(23,"a",4),Y(24,"Implementation Guide"),U(),Y(25," developed by the SNOMED International Allergy Clinical Reference Group."),U()()()(),B(26,"mat-tab-group",5)(27,"mat-tab",6)(28,"app-allergies-allergy-list",7),ce("newProblem",function(o){return ue(a),he(n.addProblem(o))}),U()(),B(29,"mat-tab",8),we(30,"app-allergies-problem-list"),U()()()}if(r&2){let a=Pt(7);j(3),ee("matMenuTriggerFor",a),j(5),ee("disableRipple",!0)}},dependencies:[ln,Pi,ur,_r,rs,ul,Ga,mw,_7],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}#guideLink[_ngcontent-%COMP%]{font-size:smaller}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}}return t})();function V7(t){let i=t.cloneNode(!0),e=i.querySelectorAll("[id]"),r=t.nodeName.toLowerCase();i.removeAttribute("id");for(let n=0;n=r&&e<=n&&i>=a&&i<=s}function gv(t,i,e){t.top+=i,t.bottom=t.top+t.height,t.left+=e,t.right=t.left+t.width}function E7(t,i,e,r){let{top:n,right:a,bottom:s,left:o,width:d,height:l}=t,c=d*i,h=l*i;return r>n-h&&ro-c&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:UI(e)})})}handleScroll(i){let e=Dr(i),r=this.positions.get(e);if(!r)return null;let n=r.scrollPosition,a,s;if(e===this._document){let l=this.getViewportScrollPosition();a=l.top,s=l.left}else a=e.scrollTop,s=e.scrollLeft;let o=n.top-a,d=n.left-s;return this.positions.forEach((l,c)=>{l.clientRect&&e!==c&&e.contains(c)&&gv(l.clientRect,o,d)}),n.top=a,n.left=s,{top:o,left:d}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function U7(t,i){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let r=i.createElement("div");return e.forEach(n=>r.appendChild(n)),r}function zI(t,i,e){for(let r in i)if(i.hasOwnProperty(r)){let n=i[r];n?t.setProperty(r,n,e?.has(r)?"important":""):t.removeProperty(r)}return t}function Jm(t,i){let e=i?"":"none";zI(t.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function D7(t,i,e){zI(t.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},e)}function ww(t,i){return i&&i!="none"?t+" "+i:t}function M7(t,i){t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,t.style.transform=Cw(i.left,i.top)}function Cw(t,i){return`translate3d(${Math.round(t)}px, ${Math.round(i)}px, 0)`}function A7(t){let i=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*i}function zpe(t){let i=getComputedStyle(t),e=kI(i,"transition-property"),r=e.find(o=>o==="transform"||o==="all");if(!r)return 0;let n=e.indexOf(r),a=kI(i,"transition-duration"),s=kI(i,"transition-delay");return A7(a[n])+A7(s[n])}function kI(t,i){return t.getPropertyValue(i).split(",").map(r=>r.trim())}var Gpe=new Set(["position"]),OI=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(i,e,r,n,a,s,o,d,l,c){this._document=i,this._rootElement=e,this._direction=r,this._initialDomRect=n,this._previewTemplate=a,this._previewClass=s,this._pickupPositionOnPage=o,this._initialTransform=d,this._zIndex=l,this._renderer=c}attach(i){this._preview=this._createPreview(),i.appendChild(this._preview),I7(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(i){this._preview.style.transform=i}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(i){this._preview.classList.add(i)}getTransitionDuration(){return zpe(this._preview)}addEventListener(i,e){return this._renderer.listen(this._preview,i,e)}_createPreview(){let i=this._previewTemplate,e=this._previewClass,r=i?i.template:null,n;if(r&&i){let a=i.matchSize?this._initialDomRect:null,s=i.viewContainer.createEmbeddedView(r,i.context);s.detectChanges(),n=U7(s,this._document),this._previewEmbeddedView=s,i.matchSize?M7(n,a):n.style.transform=Cw(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else n=V7(this._rootElement),M7(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return zI(n.style,{"pointer-events":"none",margin:I7(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Gpe),Jm(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(a=>n.classList.add(a)):n.classList.add(e)),n}};function I7(t){return"showPopover"in t}var R7=xs({passive:!0}),xw=xs({passive:!1}),P7=xs({passive:!1,capture:!0}),Hpe=800,k7=new Set(["position"]),LI=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Ta(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new Oe;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=kt.EMPTY;_pointerUpSubscription=kt.EMPTY;_scrollSubscription=kt.EMPTY;_resizeSubscription=kt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(i){i!==this._disabled&&(this._disabled=i,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Jm(e,i)))}_disabled=!1;beforeStarted=new Oe;started=new Oe;released=new Oe;ended=new Oe;entered=new Oe;exited=new Oe;dropped=new Oe;moved=this._moveEvents;data;constrainPosition;constructor(i,e,r,n,a,s,o){this._config=e,this._document=r,this._ngZone=n,this._viewportRuler=a,this._dragDropRegistry=s,this._renderer=o,this.withRootElement(i).withParent(e.parentDragRef||null),this._parentPositions=new _w(r),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(r=>dr(r)),this._handles.forEach(r=>Jm(r,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(r=>{this._handles.indexOf(r)>-1&&e.add(r)}),this._disabledHandles=e,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){let e=dr(i);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,xw),e.addEventListener("touchstart",this._pointerDown,R7),e.addEventListener("dragstart",this._nativeDragStart,xw)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?dr(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),Jm(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),Jm(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){let i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){let i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",O7,P7)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=i=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,i)}else this.disabled||this._initializeDragSequence(this._rootElement,i)};_pointerMove=i=>{let e=this._getPointerPositionOnPage(i);if(!this._hasStartedDragging()){let n=Math.abs(e.x-this._pickupPositionOnPage.x),a=Math.abs(e.y-this._pickupPositionOnPage.y);if(n+a>=this._config.dragStartThreshold){let o=Date.now()>=this._dragStartTime+this._getDragStartDelay(i),d=this._dropContainer;if(!o){this._endDragSequence(i);return}(!d||!d.isDragging()&&!d.isReceiving())&&(i.cancelable&&i.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(i)))}return}i.cancelable&&i.preventDefault();let r=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(r),this._dropContainer)this._updateActiveDropContainer(r,e);else{let n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,a=this._activeTransform;a.x=r.x-n.x+this._passiveTransform.x,a.y=r.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(a.x,a.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:r,event:i,distance:this._getDragDistance(r),delta:this._pointerDirectionDelta})})};_pointerUp=i=>{this._endDragSequence(i)};_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){pv(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),r=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{e.addEventListener("selectstart",O7,P7)}),r){let n=this._rootElement,a=n.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");a.insertBefore(o,n),this._initialTransform=n.style.transform||"",this._preview=new OI(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(a,e)),D7(n,!1,k7),this._document.body.appendChild(a.replaceChild(s,n)),this.started.next({source:this,event:i}),r.start(),this._initialContainer=r,this._initialIndex=r.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(r?r.getScrollableParents():[])}_initializeDragSequence(i,e){this._parentDragRef&&e.stopPropagation();let r=this.isDragging(),n=pv(e),a=!n&&e.button!==0,s=this._rootElement,o=Dr(e),d=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+Hpe>Date.now(),l=n?xh(e):yh(e);if(o&&o.draggable&&e.type==="mousedown"&&e.preventDefault(),r||a||d||l)return;if(this._handles.length){let u=s.style;this._rootElementTapHighlight=u.webkitTapHighlightColor||"",u.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(u=>this._updateOnScroll(u)),this._boundaryElement&&(this._boundaryRect=UI(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,e);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(i){D7(this._rootElement,!0,k7),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,r=e.getItemIndex(this),n=this._getPointerPositionOnPage(i),a=this._getDragDistance(n),s=e._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:a,dropPoint:n,event:i}),this.dropped.next({item:this,currentIndex:r,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:a,dropPoint:n,event:i}),e.drop(this,r,this._initialIndex,this._initialContainer,s,a,n,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:e},{x:r,y:n}){let a=this._initialContainer._getSiblingContainerFromPosition(this,i,e);!a&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,e)&&(a=this._initialContainer),a&&a!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=a,this._dropContainer.enter(this,i,e,a===this._initialContainer&&a.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:a,currentIndex:a.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(r,n),this._dropContainer._sortItem(this,i,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,e):this._applyPreviewTransform(i-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let i=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(r=>{let n=o=>{(!o||this._preview&&Dr(o)===this._preview.element&&o.propertyName==="transform")&&(s(),r(),clearTimeout(a))},a=setTimeout(n,e*1.5),s=this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){let i=this._placeholderTemplate,e=i?i.template:null,r;return e?(this._placeholderRef=i.viewContainer.createEmbeddedView(e,i.context),this._placeholderRef.detectChanges(),r=U7(this._placeholderRef,this._document)):r=V7(this._rootElement),r.style.pointerEvents="none",r.classList.add("cdk-drag-placeholder"),r}_getPointerPositionInElement(i,e,r){let n=e===this._rootElement?null:e,a=n?n.getBoundingClientRect():i,s=pv(r)?r.targetTouches[0]:r,o=this._getViewportScrollPosition(),d=s.pageX-a.left-o.left,l=s.pageY-a.top-o.top;return{x:a.left-i.left+d,y:a.top-i.top+l}}_getPointerPositionOnPage(i){let e=this._getViewportScrollPosition(),r=pv(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,n=r.pageX-e.left,a=r.pageY-e.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let o=this._ownerSVGElement.createSVGPoint();return o.x=n,o.y=a,o.matrixTransform(s.inverse())}}return{x:n,y:a}}_getConstrainedPointerPosition(i){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:r,y:n}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if(this.lockAxis==="x"||e==="x"?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(r=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:a,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,o=this._boundaryRect,{width:d,height:l}=this._getPreviewRect(),c=o.top+s,h=o.bottom-(l-s),u=o.left+a,f=o.right-(d-a);r=F7(r,u,f),n=F7(n,c,h)}return{x:r,y:n}}_updatePointerDirectionDelta(i){let{x:e,y:r}=i,n=this._pointerDirectionDelta,a=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-a.x),o=Math.abs(r-a.y);return s>this._config.pointerDirectionChangeThreshold&&(n.x=e>a.x?1:-1,a.x=e),o>this._config.pointerDirectionChangeThreshold&&(n.y=r>a.y?1:-1,a.y=r),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,Jm(this._rootElement,i))}_removeRootElementListeners(i){i.removeEventListener("mousedown",this._pointerDown,xw),i.removeEventListener("touchstart",this._pointerDown,R7),i.removeEventListener("dragstart",this._nativeDragStart,xw)}_applyRootElementTransform(i,e){let r=1/this.scale,n=Cw(i*r,e*r),a=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=a.transform&&a.transform!="none"?a.transform:""),a.transform=ww(n,this._initialTransform)}_applyPreviewTransform(i,e){let r=this._previewTemplate?.template?void 0:this._initialTransform,n=Cw(i,e);this._preview.setTransform(ww(n,r))}_getDragDistance(i){let e=this._pickupPositionOnPage;return e?{x:i.x-e.x,y:i.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:e}=this._passiveTransform;if(i===0&&e===0||this.isDragging()||!this._boundaryElement)return;let r=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(n.width===0&&n.height===0||r.width===0&&r.height===0)return;let a=n.left-r.left,s=r.right-n.right,o=n.top-r.top,d=r.bottom-n.bottom;n.width>r.width?(a>0&&(i+=a),s>0&&(i-=s)):i=0,n.height>r.height?(o>0&&(e+=o),d>0&&(e-=d)):e=0,(i!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:i})}_getDragStartDelay(i){let e=this.dragStartDelay;return typeof e=="number"?e:pv(i)?e.touch:e?e.mouse:0}_updateOnScroll(i){let e=this._parentPositions.handleScroll(i);if(e){let r=Dr(i);this._boundaryRect&&r!==this._boundaryElement&&r.contains(this._boundaryElement)&&gv(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Am(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,e){let r=this._previewContainer||"global";if(r==="parent")return i;if(r==="global"){let n=this._document;return e||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return dr(r)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=i=>{if(this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&i.preventDefault()}else this.disabled||i.preventDefault()};_getTargetHandle(i){return this._handles.find(e=>i.target&&(i.target===e||e.contains(i.target)))}};function F7(t,i,e){return Math.max(i,Math.min(e,t))}function pv(t){return t.type[0]==="t"}function O7(t){t.preventDefault()}function qm(t,i,e){let r=L7(i,t.length-1),n=L7(e,t.length-1);if(r===n)return;let a=t[r],s=n0)return null;let o=this.orientation==="horizontal",d=a.findIndex(g=>g.drag===i),l=a[s],c=a[d].clientRect,h=l.clientRect,u=d>s?1:-1,f=this._getItemOffsetPx(c,h,u),p=this._getSiblingOffsetPx(d,a,u),m=a.slice();return qm(a,d,s),a.forEach((g,v)=>{if(m[v]===g)return;let y=g.drag===i,x=y?f:p,b=y?i.getPlaceholderElement():g.drag.getRootElement();g.offset+=x;let _=Math.round(g.offset*(1/g.drag.scale));o?(b.style.transform=ww(`translate3d(${_}px, 0, 0)`,g.initialTransform),gv(g.clientRect,0,x)):(b.style.transform=ww(`translate3d(0, ${_}px, 0)`,g.initialTransform),gv(g.clientRect,x,0))}),this._previousSwap.overlaps=FI(h,e,r),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?n.x:n.y,{previousIndex:d,currentIndex:s}}enter(i,e,r,n){let a=n==null||n<0?this._getItemIndexFromPointerPosition(i,e,r):n,s=this._activeDraggables,o=s.indexOf(i),d=i.getPlaceholderElement(),l=s[a];if(l===i&&(l=s[a+1]),!l&&(a==null||a===-1||a-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){let c=l.getRootElement();c.parentElement.insertBefore(d,c),s.splice(a,0,i)}else this._element.appendChild(d),s.push(i);d.style.transform="",this._cacheItemPositions()}withItems(i){this._activeDraggables=i.slice(),this._cacheItemPositions()}withSortPredicate(i){this._sortPredicate=i}reset(){this._activeDraggables?.forEach(i=>{let e=i.getRootElement();if(e){let r=this._itemPositions.find(n=>n.drag===i)?.initialTransform;e.style.transform=r||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(r=>r.drag===i)}updateOnScroll(i,e){this._itemPositions.forEach(({clientRect:r})=>{gv(r,i,e)}),this._itemPositions.forEach(({drag:r})=>{this._dragDropRegistry.isDragging(r)&&r._sortFromLastPointerPosition()})}withElementContainer(i){this._element=i}_cacheItemPositions(){let i=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let r=e.getVisibleElement();return{drag:e,offset:0,initialTransform:r.style.transform||"",clientRect:UI(r)}}).sort((e,r)=>i?e.clientRect.left-r.clientRect.left:e.clientRect.top-r.clientRect.top)}_getItemOffsetPx(i,e,r){let n=this.orientation==="horizontal",a=n?e.left-i.left:e.top-i.top;return r===-1&&(a+=n?e.width-i.width:e.height-i.height),a}_getSiblingOffsetPx(i,e,r){let n=this.orientation==="horizontal",a=e[i].clientRect,s=e[i+r*-1],o=a[n?"width":"height"]*r;if(s){let d=n?"left":"top",l=n?"right":"bottom";r===-1?o-=s.clientRect[d]-a[l]:o+=a[d]-s.clientRect[l]}return o}_shouldEnterAsFirstChild(i,e){if(!this._activeDraggables.length)return!1;let r=this._itemPositions,n=this.orientation==="horizontal";if(r[0].drag!==this._activeDraggables[0]){let s=r[r.length-1].clientRect;return n?i>=s.right:e>=s.bottom}else{let s=r[0].clientRect;return n?i<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(i,e,r,n){let a=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:o,clientRect:d})=>{if(o===i)return!1;if(n){let l=a?n.x:n.y;if(o===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return a?e>=Math.floor(d.left)&&e=Math.floor(d.top)&&rd?c.after(l):c.before(l),qm(this._activeItems,d,a);let h=this._getRootNode().elementFromPoint(e,r);return s.deltaX=n.x,s.deltaY=n.y,s.drag=o,s.overlaps=c===h||c.contains(h),{previousIndex:d,currentIndex:a}}enter(i,e,r,n){let a=n==null||n<0?this._getItemIndexFromPointerPosition(i,e,r):n;a===-1&&(a=this._getClosestItemIndexToPointer(i,e,r));let s=this._activeItems[a],o=this._activeItems.indexOf(i);o>-1&&this._activeItems.splice(o,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(a,0,i),s.getRootElement().before(i.getPlaceholderElement())):(this._activeItems.push(i),this._element.appendChild(i.getPlaceholderElement()))}withItems(i){this._activeItems=i.slice()}withSortPredicate(i){this._sortPredicate=i}reset(){let i=this._element,e=this._previousSwap;for(let r=this._relatedNodes.length-1;r>-1;r--){let[n,a]=this._relatedNodes[r];n.parentNode===i&&n.nextSibling!==a&&(a===null?i.appendChild(n):a.parentNode===i&&i.insertBefore(n,a))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(i){return this._activeItems.indexOf(i)}updateOnScroll(){this._activeItems.forEach(i=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(i){i!==this._element&&(this._element=i,this._rootNode=void 0)}_getItemIndexFromPointerPosition(i,e,r){let n=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(r)),a=n?this._activeItems.findIndex(s=>{let o=s.getRootElement();return n===o||o.contains(n)}):-1;return a===-1||!this._sortPredicate(a,i)?-1:a}_getRootNode(){return this._rootNode||(this._rootNode=Am(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(i,e,r){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let n=1/0,a=-1;for(let s=0;s!0;sortPredicate=()=>!0;beforeStarted=new Oe;entered=new Oe;exited=new Oe;dropped=new Oe;sorted=new Oe;receivingStarted=new Oe;receivingStopped=new Oe;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=kt.EMPTY;_verticalScrollDirection=No.NONE;_horizontalScrollDirection=da.NONE;_scrollNode;_stopScrollTimers=new Oe;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(i,e,r,n,a){this._dragDropRegistry=e,this._ngZone=n,this._viewportRuler=a;let s=this.element=dr(i);this._document=r,this.withOrientation("vertical").withElementContainer(s),e.registerDropContainer(this),this._parentPositions=new _w(r)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,e,r,n){this._draggingStarted(),n==null&&this.sortingDisabled&&(n=this._draggables.indexOf(i)),this._sortStrategy.enter(i,e,r,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,e,r,n,a,s,o,d={}){this._reset(),this.dropped.next({item:i,currentIndex:e,previousIndex:r,container:this,previousContainer:n,isPointerOverContainer:a,distance:s,dropPoint:o,event:d})}withItems(i){let e=this._draggables;return this._draggables=i,i.forEach(r=>r._withDropContainer(this)),this.isDragging()&&(e.filter(n=>n.isDragging()).every(n=>i.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._direction=i,this._sortStrategy instanceof Tw&&(this._sortStrategy.direction=i),this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){if(i==="mixed")this._sortStrategy=new NI(this._document,this._dragDropRegistry);else{let e=new Tw(this._dragDropRegistry);e.direction=this._direction,e.orientation=i,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,r)=>this.sortPredicate(e,r,this)),this}withScrollableParents(i){let e=this._container;return this._scrollableElements=i.indexOf(e)===-1?[e,...i]:i.slice(),this}withElementContainer(i){if(i===this._container)return this;let e=dr(this.element),r=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(i);return r>-1&&this._scrollableElements.splice(r,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(i),this._cachedShadowRoot=null,this._scrollableElements.unshift(i),this._container=i,this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,e,r,n){if(this.sortingDisabled||!this._domRect||!E7(this._domRect,N7,e,r))return;let a=this._sortStrategy.sort(i,e,r,n);a&&this.sorted.next({previousIndex:a.previousIndex,currentIndex:a.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,e){if(this.autoScrollDisabled)return;let r,n=No.NONE,a=da.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||r||E7(s.clientRect,N7,i,e)&&([n,a]=jpe(o,s.clientRect,this._direction,i,e),(n||a)&&(r=o))}),!n&&!a){let{width:s,height:o}=this._viewportRuler.getViewportSize(),d={width:s,height:o,top:0,right:s,bottom:o,left:0};n=G7(d,e),a=H7(d,i),r=window}r&&(n!==this._verticalScrollDirection||a!==this._horizontalScrollDirection||r!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=a,this._scrollNode=r,(n||a)&&r?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let i=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let i=this._container.style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),bE(0,Mx).pipe(Vt(this._stopScrollTimers)).subscribe(()=>{let i=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===No.UP?i.scrollBy(0,-e):this._verticalScrollDirection===No.DOWN&&i.scrollBy(0,e),this._horizontalScrollDirection===da.LEFT?i.scrollBy(-e,0):this._horizontalScrollDirection===da.RIGHT&&i.scrollBy(e,0)})};_isOverContainer(i,e){return this._domRect!=null&&FI(this._domRect,i,e)}_getSiblingContainerFromPosition(i,e,r){return this._siblings.find(n=>n._canReceive(i,e,r))}_canReceive(i,e,r){if(!this._domRect||!FI(this._domRect,e,r)||!this.enterPredicate(i,this))return!1;let n=this._getShadowRoot().elementFromPoint(e,r);return n?n===this._container||this._container.contains(n):!1}_startReceiving(i,e){let r=this._activeSiblings;!r.has(i)&&e.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(r.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:e}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(i);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let i=Am(this._container);this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let i=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,i))}};function G7(t,i){let{top:e,bottom:r,height:n}=t,a=n*z7;return i>=e-a&&i<=e+a?No.UP:i>=r-a&&i<=r+a?No.DOWN:No.NONE}function H7(t,i){let{left:e,right:r,width:n}=t,a=n*z7;return i>=e-a&&i<=e+a?da.LEFT:i>=r-a&&i<=r+a?da.RIGHT:da.NONE}function jpe(t,i,e,r,n){let a=G7(i,n),s=H7(i,r),o=No.NONE,d=da.NONE;if(a){let l=t.scrollTop;a===No.UP?l>0&&(o=No.UP):t.scrollHeight-l>t.clientHeight&&(o=No.DOWN)}if(s){let l=t.scrollLeft;e==="rtl"?s===da.RIGHT?l<0&&(d=da.RIGHT):t.scrollWidth+l>t.clientWidth&&(d=da.LEFT):s===da.LEFT?l>0&&(d=da.LEFT):t.scrollWidth-l>t.clientWidth&&(d=da.RIGHT)}return[o,d]}var bw=xs({passive:!1,capture:!0}),Wpe=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(r,n){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0})}return t})(),GI=(()=>{class t{_ngZone=Q(dt);_document=Q(St);_styleLoader=Q(on);_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Ta([]);_globalListeners=new Map;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new Oe;pointerUp=new Oe;scroll=new Oe;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,bw)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,bw)}startDragging(e,r){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(Wpe),this._activeDragInstances.update(n=>[...n,e]),this._activeDragInstances().length===1)){let n=r.type.startsWith("touch"),a={handler:s=>this.pointerUp.next(s),options:!0};n?(this._globalListeners.set("touchend",a),this._globalListeners.set("touchcancel",a)):this._globalListeners.set("mouseup",a),this._globalListeners.set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:bw}),n||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:bw}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,o)=>{this._document.addEventListener(o,s.handler,s.options)})})}}stopDragging(e){this._activeDragInstances.update(r=>{let n=r.indexOf(e);return n>-1?(r.splice(n,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let r=[this.scroll];return e&&e!==this._document&&r.push(new $t(n=>this._ngZone.runOutsideAngular(()=>{let s=o=>{this._activeDragInstances().length&&n.next(o)};return e.addEventListener("scroll",s,!0),()=>{e.removeEventListener("scroll",s,!0)}}))),Fi(...r)}registerDirectiveNode(e,r){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,r)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners.forEach((e,r)=>{this._document.removeEventListener(r,e.handler,e.options)}),this._globalListeners.clear()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Xpe={dragStartThreshold:5,pointerDirectionChangeThreshold:5},HI=(()=>{class t{_document=Q(St);_ngZone=Q(dt);_viewportRuler=Q(Os);_dragDropRegistry=Q(GI);_renderer=Q(Ps).createRenderer(null,null);constructor(){}createDrag(e,r=Xpe){return new LI(e,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(e){return new BI(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),VI=new Se("CDK_DRAG_PARENT");var j7=new Se("CdkDragHandle"),W7=(()=>{class t{element=Q(Ze);_parentDrag=Q(VI,{optional:!0,skipSelf:!0});_dragDropRegistry=Q(GI);_stateChanges=new Oe;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._stateChanges.next(this)}_disabled=!1;constructor(){this._parentDrag?._addHandle(this)}ngAfterViewInit(){if(!this._parentDrag){let e=this.element.nativeElement.parentElement;for(;e;){let r=this._dragDropRegistry.getDragDirectiveForNode(e);if(r){this._parentDrag=r,r._addHandle(this);break}e=e.parentElement}}}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",$e]},features:[Tt([{provide:j7,useExisting:t}]),At]})}return t})(),X7=new Se("CDK_DRAG_CONFIG"),Y7=new Se("CdkDropList"),Sw=(()=>{class t{element=Q(Ze);dropContainer=Q(Y7,{optional:!0,skipSelf:!0});_ngZone=Q(dt);_viewContainerRef=Q(Xi);_dir=Q(vn,{optional:!0});_changeDetectorRef=Q(Ut);_selfHandle=Q(j7,{optional:!0,self:!0});_parentDrag=Q(VI,{optional:!0,skipSelf:!0});_dragDropRegistry=Q(GI);_destroyed=new Oe;_handles=new Ci([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new Le;released=new Le;ended=new Le;entered=new Le;exited=new Le;dropped=new Le;moved=new $t(e=>{let r=this._dragRef.moved.pipe(mt(n=>({source:this,pointerPosition:n.pointerPosition,event:n.event,delta:n.delta,distance:n.distance}))).subscribe(e);return()=>{r.unsubscribe()}});_injector=Q(Wt);constructor(){let e=this.dropContainer,r=Q(X7,{optional:!0}),n=Q(HI);this._dragRef=n.createDrag(this.element,{dragStartThreshold:r&&r.dragStartThreshold!=null?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&r.pointerDirectionChangeThreshold!=null?r.pointerDirectionChangeThreshold:5,zIndex:r?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),r&&this._assignDefaults(r),e&&(this._dragRef._withDropContainer(e._dropListRef),e.addItem(this),e._dropListRef.beforeStarted.pipe(Vt(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){pn(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let r=e.rootElementSelector,n=e.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let r=this._handles.getValue();r.push(e),this._handles.next(r)}_removeHandle(e){let r=this._handles.getValue(),n=r.indexOf(e);n>-1&&(r.splice(n,1),this._handles.next(r))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,r=e;this.rootElementSelector&&(r=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):dr(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let r=this._dir,n=this.dragStartDelay,a=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof n=="object"&&n?n:Da(n),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(a).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),r&&e.withDirection(r.value)}}),e.beforeStarted.pipe(Vi(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){let n=this._dragDropRegistry.getDragDirectiveForNode(r);if(n){e.withParent(n._dragRef);break}r=r.parentElement}})}_handleEvents(e){e.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),e.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),e.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),e.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(e){let{lockAxis:r,dragStartDelay:n,constrainPosition:a,previewClass:s,boundaryElement:o,draggingDisabled:d,rootElementSelector:l,previewContainer:c}=e;this.disabled=d??!1,this.dragStartDelay=n||0,r&&(this.lockAxis=r),a&&(this.constrainPosition=a),s&&(this.previewClass=s),o&&(this.boundaryElement=o),l&&(this.rootElementSelector=l),c&&(this.previewContainer=c)}_setupHandlesListener(){this._handles.pipe(Ui(e=>{let r=e.map(n=>n.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),tn(e=>Fi(...e.map(r=>r._stateChanges.pipe(Wi(r))))),Vt(this._destroyed)).subscribe(e=>{let r=this._dragRef,n=e.element.nativeElement;e.disabled?r.disableHandle(n):r.enableHandle(n)})}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(r,n){r&2&&ut("cdk-drag-disabled",n.disabled)("cdk-drag-dragging",n._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",$e],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Yi]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Tt([{provide:VI,useExisting:t}]),At,ei]})}return t})(),B7=new Se("CdkDropListGroup");var Ew=(()=>{class t{element=Q(Ze);_changeDetectorRef=Q(Ut);_scrollDispatcher=Q(Wl);_dir=Q(vn,{optional:!0});_group=Q(B7,{optional:!0,skipSelf:!0});_destroyed=new Oe;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=Q(wi).getId("cdk-drop-list-");lockAxis;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;dropped=new Le;entered=new Le;exited=new Le;sorted=new Le;_unsortedItems=new Set;constructor(){let e=Q(HI),r=Q(X7,{optional:!0});this._dropListRef=e.createDropList(this.element),this._dropListRef.data=this,r&&this._assignDefaults(r),this._dropListRef.enterPredicate=(n,a)=>this.enterPredicate(n.data,a.data),this._dropListRef.sortPredicate=(n,a,s)=>this.sortPredicate(n,a.data,s.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,r)=>e._dragRef.getVisibleElement().compareDocumentPosition(r._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(Wi(this._dir.value),Vt(this._destroyed)).subscribe(r=>e.withDirection(r)),e.beforeStarted.subscribe(()=>{let r=Ld(this.connectedTo).map(n=>{if(typeof n=="string"){let a=t._dropLists.find(s=>s.id===n);return a}return n});if(this._group&&this._group._items.forEach(n=>{r.indexOf(n)===-1&&r.push(n)}),!this._scrollableParentsResolved){let n=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(a=>a.getElementRef().nativeElement);this._dropListRef.withScrollableParents(n),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let n=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(n)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=Da(this.autoScrollStep,2),e.connectedTo(r.filter(n=>n&&n!==this).map(n=>n._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(r=>{this.entered.emit({container:this,item:r.item.data,currentIndex:r.currentIndex})}),e.exited.subscribe(r=>{this.exited.emit({container:this,item:r.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(r=>{this.sorted.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:r.item.data})}),e.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,item:r.item.data,isPointerOverContainer:r.isPointerOverContainer,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),Fi(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:r,draggingDisabled:n,sortingDisabled:a,listAutoScrollDisabled:s,listOrientation:o}=e;this.disabled=n??!1,this.sortingDisabled=a??!1,this.autoScrollDisabled=s??!1,this.orientation=o||"vertical",r&&(this.lockAxis=r)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(r,n){r&2&&(pt("id",n.id),ut("cdk-drop-list-disabled",n.disabled)("cdk-drop-list-dragging",n._dropListRef.isDragging())("cdk-drop-list-receiving",n._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",$e],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",$e],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",$e],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[Tt([{provide:B7,useValue:void 0},{provide:Y7,useExisting:t}]),At]})}return t})();var $7=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[HI],imports:[aa]})}return t})();var Bw=Ka(Qd());function Ype(t,i){}var Zd=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext};var WI=(()=>{class t extends zd{_elementRef=Q(Ze);_focusTrapFactory=Q(C_);_config;_interactivityChecker=Q(H0);_ngZone=Q(dt);_overlayRef=Q(Gm);_focusMonitor=Q(br);_renderer=Q(Ai);_platform=Q(hi);_document=Q(St,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=Q(Ut);_injector=Q(Wt);_isDestroyed=!1;constructor(){super(),this._config=Q(Zd,{optional:!0})||new Zd,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let r=this._ariaLabelledByQueue.indexOf(e);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),r}attachTemplatePortal(e){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),r}attachDomPortal=e=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,r){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{a(),s(),e.removeAttribute("tabindex")},a=this._renderer.listen(e,"blur",n),s=this._renderer.listen(e,"mousedown",n)})),e.focus(r)}_focusByCssSelector(e,r){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,r)}_trapFocus(){this._isDestroyed||pn(()=>{let e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,r=null;if(typeof e=="string"?r=this._document.querySelector(e):typeof e=="boolean"?r=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(r=e),this._config.restoreFocus&&r&&typeof r.focus=="function"){let n=z0(),a=this._elementRef.nativeElement;(!n||n===this._document.body||n===a||a.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let e=this._elementRef.nativeElement,r=z0();return e===r||e.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=z0()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,n){if(r&1&&vt(Ma,7),r&2){let a;je(a=We())&&(n._portalOutlet=a.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,n){r&2&&pt("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[Ft],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,n){r&1&&de(0,Ype,0,0,"ng-template",0)},dependencies:[Ma],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}return t})(),vv=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new Oe;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(i,e){this.overlayRef=i,this.config=e,this.disableClose=e.disableClose,this.backdropClick=i.backdropClick(),this.keydownEvents=i.keydownEvents(),this.outsidePointerEvents=i.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(r=>{r.keyCode===27&&!this.disableClose&&!En(r)&&(r.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=i.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(i,e){if(this.containerInstance){let r=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),r.next(i),r.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(i="",e=""){return this.overlayRef.updateSize({width:i,height:e}),this}addPanelClass(i){return this.overlayRef.addPanelClass(i),this}removePanelClass(i){return this.overlayRef.removePanelClass(i),this}},$pe=new Se("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=Q(Dn);return()=>t.scrollStrategies.block()}}),Qpe=new Se("DialogData"),Kpe=new Se("DefaultDialogConfig");var XI=(()=>{class t{_overlay=Q(Dn);_injector=Q(Wt);_defaultOptions=Q(Kpe,{optional:!0});_parentDialog=Q(t,{optional:!0,skipSelf:!0});_overlayContainer=Q(F_);_idGenerator=Q(wi);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new Oe;_afterOpenedAtThisLevel=new Oe;_ariaHiddenElements=new Map;_scrollStrategy=Q($pe);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Co(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Wi(void 0)));constructor(){}open(e,r){let n=this._defaultOptions||new Zd;r=Me(Me({},n),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let a=this._getOverlayConfig(r),s=this._overlay.create(a),o=new vv(s,r),d=this._attachContainer(s,o,r);return o.containerInstance=d,this._attachDialogContent(e,o,d,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(o),o.closed.subscribe(()=>this._removeOpenDialog(o,!0)),this.afterOpened.next(o),o}closeAll(){jI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(r=>r.id===e)}ngOnDestroy(){jI(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),jI(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let r=new Ro({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(r.backdropClass=e.backdropClass),r}_attachContainer(e,r,n){let a=n.injector||n.viewContainerRef?.injector,s=[{provide:Zd,useValue:n},{provide:vv,useValue:r},{provide:Gm,useValue:e}],o;n.container?typeof n.container=="function"?o=n.container:(o=n.container.type,s.push(...n.container.providers(n))):o=WI;let d=new ll(o,n.viewContainerRef,Wt.create({parent:a||this._injector,providers:s}));return e.attach(d).instance}_attachDialogContent(e,r,n,a){if(e instanceof Oi){let s=this._createInjector(a,r,n,void 0),o={$implicit:a.data,dialogRef:r};a.templateContext&&(o=Me(Me({},o),typeof a.templateContext=="function"?a.templateContext():a.templateContext)),n.attachTemplatePortal(new ns(e,null,o,s))}else{let s=this._createInjector(a,r,n,this._injector),o=n.attachComponentPortal(new ll(e,a.viewContainerRef,s));r.componentRef=o,r.componentInstance=o.instance}}_createInjector(e,r,n,a){let s=e.injector||e.viewContainerRef?.injector,o=[{provide:Qpe,useValue:e.data},{provide:vv,useValue:r}];return e.providers&&(typeof e.providers=="function"?o.push(...e.providers(r,e,n)):o.push(...e.providers)),e.direction&&(!s||!s.get(vn,null,{optional:!0}))&&o.push({provide:vn,useValue:{value:e.direction,change:bt()}}),Wt.create({parent:s||a,providers:o})}_removeOpenDialog(e,r){let n=this.openDialogs.indexOf(e);n>-1&&(this.openDialogs.splice(n,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((a,s)=>{a?s.setAttribute("aria-hidden",a):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let e=this._overlayContainer.getContainerElement();if(e.parentElement){let r=e.parentElement.children;for(let n=r.length-1;n>-1;n--){let a=r[n];a!==e&&a.nodeName!=="SCRIPT"&&a.nodeName!=="STYLE"&&!a.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(a,a.getAttribute("aria-hidden")),a.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function jI(t,i){let e=t.length;for(;e--;)i(t[e])}var K7=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[XI],imports:[Ia,cl,S_,cl]})}return t})();function Zpe(t,i){}var Mw=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;componentFactoryResolver;enterAnimationDuration;exitAnimationDuration},YI="mdc-dialog--open",Z7="mdc-dialog--opening",J7="mdc-dialog--closing",Jpe=150,qpe=75,ege=(()=>{class t extends WI{_animationMode=Q(Mi,{optional:!0});_animationStateChanged=new Le;_animationsEnabled=this._animationMode!=="NoopAnimations";_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?eU(this._config.enterAnimationDuration)??Jpe:0;_exitAnimationDuration=this._animationsEnabled?eU(this._config.exitAnimationDuration)??qpe:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(q7,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Z7,YI)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(YI),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(YI),this._animationsEnabled?(this._hostElement.style.setProperty(q7,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(J7)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(Z7,J7)}_waitForAnimationToComplete(e,r){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(r,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let r=super.attachComponentPortal(e);return r.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),r}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275cmp=Te({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(r,n){r&2&&(na("id",n._config.id),pt("aria-modal",n._config.ariaModal)("role",n._config.role)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null),ut("_mat-animation-noopable",!n._animationsEnabled)("mat-mdc-dialog-container-with-actions",n._actionSectionCount>0))},features:[Ft],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(r,n){r&1&&(B(0,"div",0)(1,"div",1),de(2,Zpe,0,0,"ng-template",2),U()())},dependencies:[Ma],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2})}return t})(),q7="--mat-dialog-transition-duration";function eU(t){return t==null?null:typeof t=="number"?t:t.endsWith("ms")?Da(t.substring(0,t.length-2)):t.endsWith("s")?Da(t.substring(0,t.length-1))*1e3:t==="0"?0:null}var Dw=function(t){return t[t.OPEN=0]="OPEN",t[t.CLOSING=1]="CLOSING",t[t.CLOSED=2]="CLOSED",t}(Dw||{}),ua=class{_ref;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new Oe;_beforeClosed=new Oe;_result;_closeFallbackTimeout;_state=Dw.OPEN;_closeInteractionType;constructor(i,e,r){this._ref=i,this._containerInstance=r,this.disableClose=e.disableClose,this.id=i.id,i.addPanelClass("mat-mdc-dialog-panel"),r._animationStateChanged.pipe(Xt(n=>n.state==="opened"),Vi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),r._animationStateChanged.pipe(Xt(n=>n.state==="closed"),Vi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),i.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Fi(this.backdropClick(),this.keydownEvents().pipe(Xt(n=>n.keyCode===27&&!this.disableClose&&!En(n)))).subscribe(n=>{this.disableClose||(n.preventDefault(),tU(this,n.type==="keydown"?"keyboard":"mouse"))})}close(i){this._result=i,this._containerInstance._animationStateChanged.pipe(Xt(e=>e.state==="closing"),Vi(1)).subscribe(e=>{this._beforeClosed.next(i),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=Dw.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(i){let e=this._ref.config.positionStrategy;return i&&(i.left||i.right)?i.left?e.left(i.left):e.right(i.right):e.centerHorizontally(),i&&(i.top||i.bottom)?i.top?e.top(i.top):e.bottom(i.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(i="",e=""){return this._ref.updateSize(i,e),this}addPanelClass(i){return this._ref.addPanelClass(i),this}removePanelClass(i){return this._ref.removePanelClass(i),this}getState(){return this._state}_finishDialogClose(){this._state=Dw.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function tU(t,i,e){return t._closeInteractionType=i,t.close(e)}var Mh=new Se("MatMdcDialogData"),tge=new Se("mat-mdc-dialog-default-options"),ige=new Se("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let t=Q(Dn);return()=>t.scrollStrategies.block()}});var hl=(()=>{class t{_overlay=Q(Dn);_defaultOptions=Q(tge,{optional:!0});_scrollStrategy=Q(ige);_parentDialog=Q(t,{optional:!0,skipSelf:!0});_idGenerator=Q(wi);_dialog=Q(XI);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new Oe;_afterOpenedAtThisLevel=new Oe;dialogConfigClass=Mw;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=Co(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Wi(void 0)));constructor(){this._dialogRefConstructor=ua,this._dialogContainerType=ege,this._dialogDataToken=Mh}open(e,r){let n;r=Me(Me({},this._defaultOptions||new Mw),r),r.id=r.id||this._idGenerator.getId("mat-mdc-dialog-"),r.scrollStrategy=r.scrollStrategy||this._scrollStrategy();let a=this._dialog.open(e,Mt(Me({},r),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:r},{provide:Zd,useValue:r}]},templateContext:()=>({dialogRef:n}),providers:(s,o,d)=>(n=new this._dialogRefConstructor(s,r,d),n.updatePosition(r?.position),[{provide:this._dialogContainerType,useValue:d},{provide:this._dialogDataToken,useValue:o.data},{provide:this._dialogRefConstructor,useValue:n}])}));return n.componentRef=a.componentRef,n.componentInstance=a.componentInstance,this.openDialogs.push(n),this.afterOpened.next(n),n.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(n);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),n}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(r=>r.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let r=e.length;for(;r--;)e[r].close()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Yl=(()=>{class t{dialogRef=Q(ua,{optional:!0});_elementRef=Q(Ze);_dialog=Q(hl);ariaLabel;type="button";dialogResult;_matDialogClose;constructor(){}ngOnInit(){this.dialogRef||(this.dialogRef=nU(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let r=e._matDialogClose||e._matDialogCloseResult;r&&(this.dialogResult=r.currentValue)}_onButtonClick(e){tU(this.dialogRef,e.screenX===0&&e.screenY===0?"keyboard":"mouse",this.dialogResult)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(r,n){r&1&&ce("click",function(s){return n._onButtonClick(s)}),r&2&&pt("aria-label",n.ariaLabel||null)("type",n.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[ei]})}return t})(),iU=(()=>{class t{_dialogRef=Q(ua,{optional:!0});_elementRef=Q(Ze);_dialog=Q(hl);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=nU(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t})}return t})(),Aw=(()=>{class t extends iU{id=Q(wi).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(r,n){r&2&&na("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[Ft]})}return t})(),Jd=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[P8([Uc])]})}return t})(),qd=(()=>{class t extends iU{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=bi(t)))(n||t)}})();static \u0275dir=Ue({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(r,n){r&2&&ut("mat-mdc-dialog-actions-align-start",n.align==="start")("mat-mdc-dialog-actions-align-center",n.align==="center")("mat-mdc-dialog-actions-align-end",n.align==="end")},inputs:{align:"align"},features:[Ft]})}return t})();function nU(t,i){let e=t.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?i.find(r=>r.id===e.id):null}var rU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[hl],imports:[K7,Ia,cl,Ct,Ct]})}return t})();var sU=(()=>{class t{constructor(e,r){this.dialogRef=e,this.data=r,this.localEcl="",this.localEcl=r.ecl}onNoClick(){this.dialogRef.close()}eclChanged(e){this.data.ecl=e?.detail[0]}static{this.\u0275fac=function(r){return new(r||t)(be(ua),be(Mh))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-ecl-builder-dialog"]],standalone:!1,decls:7,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"full-height"],["apiurl","https://snowstorm.ihtsdotools.org/snowstorm/snomed-ct","branch","MAIN/2023-01-31","v-on:eclOutput","eclChange",3,"eclOutput","eclstring"],["mat-dialog-actions","",1,"actions"],["mat-flat-button","","color","accent","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(r,n){r&1&&(B(0,"h1",0),Y(1,"ECL Builder"),U(),B(2,"div",1)(3,"snomed-ecl-builder",2),ce("eclOutput",function(s){return n.eclChanged(s)}),U()(),B(4,"div",3)(5,"button",4),Y(6,"Ok"),U()()),r&2&&(j(3),io("eclstring",n.localEcl),j(2),ee("mat-dialog-close",n.data))},dependencies:[di,Yl,Aw,qd,Jd],styles:[".full-height[_ngcontent-%COMP%]{height:78%}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"]})}}return t})();var aU=new Se("CdkAccordion");var oU=(()=>{class t{accordion=Q(aU,{optional:!0,skipSelf:!0});_changeDetectorRef=Q(Ut);_expansionDispatcher=Q(Em);_openCloseAllSubscription=kt.EMPTY;closed=new Le;opened=new Le;destroyed=new Le;expandedChange=new Le;id=Q(wi).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let r=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,r)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;disabled=!1;_removeUniqueSelectionListener=()=>{};constructor(){}ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,r)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===r&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",$e],disabled:[2,"disabled","disabled",$e]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Tt([{provide:aU,useValue:void 0}]),At]})}return t})(),lU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({})}return t})();var nge=["body"],rge=["bodyWrapper"],sge=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],age=["mat-expansion-panel-header","*","mat-action-row"];function oge(t,i){}var lge=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],cge=["mat-panel-title","mat-panel-description","*"];function dge(t,i){t&1&&(B(0,"span",1),yr(),B(1,"svg",2),we(2,"path",3),U()())}var cU=new Se("MAT_ACCORDION"),dU=new Se("MAT_EXPANSION_PANEL"),uge=(()=>{class t{_template=Q(Oi);_expansionPanel=Q(dU,{optional:!0});constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["ng-template","matExpansionPanelContent",""]]})}return t})(),uU=new Se("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),$I=(()=>{class t extends oU{_viewContainerRef=Q(Xi);_animationsDisabled=Q(Mi,{optional:!0})==="NoopAnimations";_document=Q(St);_ngZone=Q(dt);_elementRef=Q(Ze);_renderer=Q(Ai);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new Le;afterCollapse=new Le;_inputChanges=new Oe;accordion=Q(cU,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=Q(wi).getId("mat-expansion-panel-header-");constructor(){super();let e=Q(uU,{optional:!0});this._expansionDispatcher=Q(Em),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Wi(null),Xt(()=>this.expanded&&!this._portal),Vi(1)).subscribe(()=>{this._portal=new ns(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,r=this._body.nativeElement;return e===r||r.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:r})=>{e===this._bodyWrapper?.nativeElement&&r==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(r,n,a){if(r&1&&ui(a,uge,5),r&2){let s;je(s=We())&&(n._lazyContent=s.first)}},viewQuery:function(r,n){if(r&1&&(vt(nge,5),vt(rge,5)),r&2){let a;je(a=We())&&(n._body=a.first),je(a=We())&&(n._bodyWrapper=a.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(r,n){r&2&&ut("mat-expanded",n.expanded)("mat-expansion-panel-spacing",n._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",$e],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[Tt([{provide:cU,useValue:void 0},{provide:dU,useExisting:t}]),At,Ft,ei],ngContentSelectors:age,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(r,n){r&1&&(ti(sge),wt(0),B(1,"div",2,0)(3,"div",3,1)(5,"div",4),wt(6,1),de(7,oge,0,0,"ng-template",5),U(),wt(8,2),U()()),r&2&&(j(),pt("inert",n.expanded?null:""),j(2),ee("id",n.id),pt("aria-labelledby",n._headerId),j(4),ee("cdkPortalOutlet",n._portal))},dependencies:[Ma],styles:[".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden;font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,changeDetection:0})}return t})();var hU=(()=>{class t{panel=Q($I,{host:!0});_element=Q(Ze);_focusMonitor=Q(br);_changeDetectorRef=Q(Ut);_parentChangeSubscription=kt.EMPTY;constructor(){Q(on).load(Wr);let e=this.panel,r=Q(uU,{optional:!0}),n=Q(new Ur("tabindex"),{optional:!0}),a=e.accordion?e.accordion._stateChanges.pipe(Xt(s=>!!(s.hideToggle||s.togglePosition))):lr;this.tabIndex=parseInt(n||"")||0,this._parentChangeSubscription=Fi(e.opened,e.closed,a,e._inputChanges.pipe(Xt(s=>!!(s.hideToggle||s.disabled||s.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(Xt(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),r&&(this.expandedHeight=r.expandedHeight,this.collapsedHeight=r.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:En(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,r){e?this._focusMonitor.focusVia(this._element,e,r):this._element.nativeElement.focus(r)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(r,n){r&1&&ce("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),r&2&&(pt("id",n.panel._headerId)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),gn("height",n._getHeaderHeight()),ut("mat-expanded",n._isExpanded())("mat-expansion-toggle-indicator-after",n._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",n._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Yi(e)]},features:[At],ngContentSelectors:cge,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(r,n){r&1&&(ti(lge),B(0,"span",0),wt(1),wt(2,1),wt(3,2),U(),de(4,dge,3,0,"span",1)),r&2&&(ut("mat-content-hide-toggle",!n._showToggle()),j(4),Qt(n._showToggle()?4:-1))},styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;height:var(--mat-expansion-header-collapsed-state-height, 48px);font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-sys-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}.mat-expansion-panel-animations-enabled .mat-expansion-panel-header{transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header::before{border-radius:inherit}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height, 64px)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-sys-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-sys-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-sys-on-surface-variant))}.mat-expansion-panel-animations-enabled .mat-expansion-indicator{transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded .mat-expansion-indicator{transform:rotate(180deg)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, none)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-header-indicator-display, inline-block)}@media(forced-colors: active){.mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}}'],encapsulation:2,changeDetection:0})}return t})(),fU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return t})(),mU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return t})();var pU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,lU,cl]})}return t})();function fge(t,i){if(t&1){let e=Ce();B(0,"mat-option",2),ce("click",function(){ue(e);let n=ne();return he(n.optionClicked())}),Y(1),U()}if(t&2){let e=i.$implicit;ee("value",e),j(),Qe(" ",e.display," ")}}var Iw=(()=>{class t{constructor(e){this.terminologyService=e,this.selectionChange=new Le}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(e=>this.options=e.expansion.contains)}optionClicked(){this.selectionChange.emit(this.selectedOptions)}static{this.\u0275fac=function(r){return new(r||t)(be(Ri))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-dropdown-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},standalone:!1,decls:7,vars:5,consts:[[3,"ngModelChange","multiple","ngModel"],[3,"value","click",4,"ngFor","ngForOf"],[3,"click","value"]],template:function(r,n){r&1&&(B(0,"mat-form-field")(1,"mat-label"),Y(2),U(),B(3,"mat-select",0),On("ngModelChange",function(s){return Xn(n.selectedOptions,s)||(n.selectedOptions=s),s}),de(4,fge,2,2,"mat-option",1),U(),B(5,"mat-hint"),Y(6),U()()),r&2&&(j(2),ze(n.binding.title),j(),ee("multiple",n.binding.type=="Select (Multiple)"),Fn("ngModel",n.selectedOptions),j(),ee("ngForOf",n.options),j(2),ze(n.binding.note))},dependencies:[ci,Bn,Nn,za,is,xn,Lo,wr],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return t})();var mge=["input"],pge=["formField"],gge=["*"],Rw=class{source;value;constructor(i,e){this.source=i,this.value=e}},vge={provide:bs,useExisting:Pn(()=>yv),multi:!0},vU=new Se("MatRadioGroup"),yge=new Se("mat-radio-default-options",{providedIn:"root",factory:xge});function xge(){return{color:"accent",disabledInteractive:!1}}var yv=(()=>{class t{_changeDetector=Q(Ut);_value=null;_name=Q(wi).getId("mat-radio-group-");_selected=null;_isInitialized=!1;_labelPosition="after";_disabled=!1;_required=!1;_buttonChanges;_controlValueAccessorChangeFn=()=>{};onTouched=()=>{};change=new Le;_radios;color;get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=e,this._markRadiosForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markRadiosForCheck()}_disabledInteractive=!1;constructor(){}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(r=>{r.checked=this.value===r.value,r.checked&&(this._selected=r)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new Rw(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-radio-group"]],contentQueries:function(r,n,a){if(r&1&&ui(a,ep,5),r&2){let s;je(s=We())&&(n._radios=s)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",$e],required:[2,"required","required",$e],disabledInteractive:[2,"disabledInteractive","disabledInteractive",$e]},outputs:{change:"change"},exportAs:["matRadioGroup"],features:[Tt([vge,{provide:vU,useExisting:t}]),At]})}return t})(),ep=(()=>{class t{_elementRef=Q(Ze);_changeDetector=Q(Ut);_focusMonitor=Q(br);_radioDispatcher=Q(Em);_defaultOptions=Q(yge,{optional:!0});_ngZone=Q(dt);_renderer=Q(Ai);_uniqueId=Q(wi).getId("mat-radio-");_cleanupClick;id=this._uniqueId;name;ariaLabel;ariaLabelledby;ariaDescribedby;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}_labelPosition;get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(e)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=e}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(e){this._color=e}_color;get disabledInteractive(){return this._disabledInteractive||this.radioGroup!==null&&this.radioGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new Le;radioGroup;get inputId(){return`${this.id||this._uniqueId}-input`}_checked=!1;_disabled;_required;_value=null;_removeUniqueSelectionListener=()=>{};_previousTabIndex;_inputElement;_rippleTrigger;_noopAnimations;_injector=Q(Wt);constructor(){Q(on).load(Wr);let e=Q(vU,{optional:!0}),r=Q(Mi,{optional:!0}),n=Q(new Ur("tabindex"),{optional:!0});this.radioGroup=e,this._noopAnimations=r==="NoopAnimations",this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,n&&(this.tabIndex=Yi(n,0))}focus(e,r){r?this._focusMonitor.focusVia(this._inputElement,r,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,r)=>{e!==this.id&&r===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._cleanupClick=this._renderer.listen(this._inputElement.nativeElement,"click",this._onInputClick)})}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new Rw(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let r=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),r&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_onInputClick=e=>{this.disabled&&this.disabledInteractive&&e.preventDefault()};_updateTabIndex(){let e=this.radioGroup,r;if(!e||!e.selected||this.disabled?r=this.tabIndex:r=e.selected===this?this.tabIndex:-1,r!==this._previousTabIndex){let n=this._inputElement?.nativeElement;n&&(n.setAttribute("tabindex",r+""),this._previousTabIndex=r,pn(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===n&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===n&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-radio-button"]],viewQuery:function(r,n){if(r&1&&(vt(mge,5),vt(pge,7,Ze)),r&2){let a;je(a=We())&&(n._inputElement=a.first),je(a=We())&&(n._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(r,n){r&1&&ce("focus",function(){return n._inputElement.nativeElement.focus()}),r&2&&(pt("id",n.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),ut("mat-primary",n.color==="primary")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("mat-mdc-radio-checked",n.checked)("mat-mdc-radio-disabled",n.disabled)("mat-mdc-radio-disabled-interactive",n.disabledInteractive)("_mat-animation-noopable",n._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",$e],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Yi(e)],checked:[2,"checked","checked",$e],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",$e],required:[2,"required","required",$e],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",$e]},outputs:{change:"change"},exportAs:["matRadioButton"],features:[At],ngContentSelectors:gge,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(r,n){if(r&1){let a=Ce();ti(),B(0,"div",2,0)(2,"div",3)(3,"div",4),ce("click",function(o){return ue(a),he(n._onTouchTargetClick(o))}),U(),B(4,"input",5,1),ce("change",function(o){return ue(a),he(n._onInputInteraction(o))}),U(),B(6,"div",6),we(7,"div",7)(8,"div",8),U(),B(9,"div",9),we(10,"div",10),U()(),B(11,"label",11),wt(12),U()()}r&2&&(ee("labelPosition",n.labelPosition),j(2),ut("mdc-radio--disabled",n.disabled),j(2),ee("id",n.inputId)("checked",n.checked)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),pt("name",n.name)("value",n.value)("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledby)("aria-describedby",n.ariaDescribedby)("aria-disabled",n.disabled&&n.disabledInteractive?"true":null),j(5),ee("matRippleTrigger",n._rippleTrigger.nativeElement)("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0),j(2),ee("for",n.inputId))},dependencies:[co,Vm],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px);top:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0})}return t})(),yU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,ol,ep,Ct]})}return t})();function bge(t,i){if(t&1){let e=Ce();B(0,"mat-radio-button",3),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.optionSelected(n))}),Y(1),U()}if(t&2){let e=i.$implicit;ee("value",e.code),j(),Qe(" ",e.display," ")}}var Pw=(()=>{class t{constructor(e){this.terminologyService=e,this.selectionChange=new Le}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(e=>this.options=e.expansion.contains)}optionSelected(e){this.selectionChange.emit(e)}static{this.\u0275fac=function(r){return new(r||t)(be(Ri))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-radios-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},standalone:!1,decls:6,vars:3,consts:[["aria-label","Select an option",1,"radio-group"],["class","radio-button",3,"value","click",4,"ngFor","ngForOf"],["id","hint"],[1,"radio-button",3,"click","value"]],template:function(r,n){r&1&&(B(0,"div"),Y(1),U(),B(2,"mat-radio-group",0),de(3,bge,2,2,"mat-radio-button",1),U(),B(4,"div",2),Y(5),U()),r&2&&(j(),ze(n.binding.title),j(2),ee("ngForOf",n.options),j(2),ze(n.binding.note))},dependencies:[ci,yv,ep],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.radio-button[_ngcontent-%COMP%]{margin:0}"]})}}return t})();var kw=(()=>{class t{constructor(e){this.terminologyService=e,this.textChange=new Le,this.text=""}ngOnInit(){}onTextChange(e){this.text=e,this.textChange.emit(e)}static{this.\u0275fac=function(r){return new(r||t)(be(Ri))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-textbox-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},standalone:!1,decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","placeholder","Enter text...",3,"ngModelChange","ngModel"]],template:function(r,n){r&1&&(B(0,"mat-form-field",0)(1,"mat-label"),Y(2),U(),B(3,"textarea",1),On("ngModelChange",function(s){return Xn(n.text,s)||(n.text=s),s}),ce("ngModelChange",function(s){return n.onTextChange(s)}),U(),B(4,"mat-hint"),Y(5),U()()),r&2&&(j(2),ze(n.binding.title),j(),Fn("ngModel",n.text),j(2),ze(n.binding.note))},dependencies:[Bn,Nn,za,ss,hr,xn,wr],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return t})();var _ge=["input"],wge=["label"],Cge=["*"],Tge=new Se("mat-checkbox-default-options",{providedIn:"root",factory:CU});function CU(){return{color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1}}var Bs=function(t){return t[t.Init=0]="Init",t[t.Checked=1]="Checked",t[t.Unchecked=2]="Unchecked",t[t.Indeterminate=3]="Indeterminate",t}(Bs||{}),Sge={provide:bs,useExisting:Pn(()=>eu),multi:!0},QI=class{source;checked},wU=CU(),eu=(()=>{class t{_elementRef=Q(Ze);_changeDetectorRef=Q(Ut);_ngZone=Q(dt);_animationMode=Q(Mi,{optional:!0});_options=Q(Tge,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let r=new QI;return r.source=this,r.checked=e,r}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required;labelPosition="after";name=null;change=new Le;indeterminateChange=new Le;value;disableRipple;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=Bs.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){Q(on).load(Wr);let e=Q(new Ur("tabindex"),{optional:!0});this._options=this._options||wU,this.color=this._options.color||wU.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=Q(wi).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate}set indeterminate(e){let r=e!=this._indeterminate;this._indeterminate=e,r&&(this._indeterminate?this._transitionCheckState(Bs.Indeterminate):this._transitionCheckState(this.checked?Bs.Checked:Bs.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_indeterminate=!1;_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let r=this._currentCheckState,n=this._getAnimationTargetElement();if(!(r===e||!n)&&(this._currentAnimationClass&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(r,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);let a=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{n.classList.remove(a)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?Bs.Checked:Bs.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,r){if(this._animationMode==="NoopAnimations")return"";switch(e){case Bs.Init:if(r===Bs.Checked)return this._animationClasses.uncheckedToChecked;if(r==Bs.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Bs.Unchecked:return r===Bs.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Bs.Checked:return r===Bs.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Bs.Indeterminate:return r===Bs.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let r=this._inputElement;r&&(r.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-checkbox"]],viewQuery:function(r,n){if(r&1&&(vt(_ge,5),vt(wge,5)),r&2){let a;je(a=We())&&(n._inputElement=a.first),je(a=We())&&(n._labelElement=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(r,n){r&2&&(na("id",n.id),pt("tabindex",null)("aria-label",null)("aria-labelledby",null),Tn(n.color?"mat-"+n.color:"mat-accent"),ut("_mat-animation-noopable",n._animationMode==="NoopAnimations")("mdc-checkbox--disabled",n.disabled)("mat-mdc-checkbox-disabled",n.disabled)("mat-mdc-checkbox-checked",n.checked)("mat-mdc-checkbox-disabled-interactive",n.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",$e],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",$e],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",$e],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:Yi(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",$e],checked:[2,"checked","checked",$e],disabled:[2,"disabled","disabled",$e],indeterminate:[2,"indeterminate","indeterminate",$e]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[Tt([Sge,{provide:Po,useExisting:t,multi:!0}]),At,ei],ngContentSelectors:Cge,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(r,n){if(r&1){let a=Ce();ti(),B(0,"div",3),ce("click",function(o){return ue(a),he(n._preventBubblingFromLabel(o))}),B(1,"div",4,0)(3,"div",5),ce("click",function(){return ue(a),he(n._onTouchTargetClick())}),U(),B(4,"input",6,1),ce("blur",function(){return ue(a),he(n._onBlur())})("click",function(){return ue(a),he(n._onInputClick())})("change",function(o){return ue(a),he(n._onInteractionEvent(o))}),U(),we(6,"div",7),B(7,"div",8),yr(),B(8,"svg",9),we(9,"path",10),U(),sh(),we(10,"div",11),U(),we(11,"div",12),U(),B(12,"label",13,2),wt(14),U()()}if(r&2){let a=Pt(2);ee("labelPosition",n.labelPosition),j(4),ut("mdc-checkbox--selected",n.checked),ee("checked",n.checked)("indeterminate",n.indeterminate)("disabled",n.disabled&&!n.disabledInteractive)("id",n.inputId)("required",n.required)("tabIndex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex),pt("aria-label",n.ariaLabel||null)("aria-labelledby",n.ariaLabelledby)("aria-describedby",n.ariaDescribedby)("aria-checked",n.indeterminate?"mixed":null)("aria-controls",n.ariaControls)("aria-disabled",n.disabled&&n.disabledInteractive?!0:null)("aria-expanded",n.ariaExpanded)("aria-owns",n.ariaOwns)("name",n.name)("value",n.value),j(7),ee("matRippleTrigger",a)("matRippleDisabled",n.disableRipple||n.disabled)("matRippleCentered",!0),j(),ee("for",n.inputId)}},dependencies:[co,Vm],styles:['.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover>.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:hover>.mat-mdc-checkbox-ripple>.mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus+.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control+.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked+.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control+.mdc-checkbox__ripple{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}@media(forced-colors: active){.mdc-checkbox--disabled{opacity:.5}}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mdc-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mat-sys-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover>.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-sys-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover>.mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-touch-target,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__native-control,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__ripple,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-ripple::before,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__mixedmark{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox .mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox .mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display, block)}.mat-mdc-checkbox .mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}return t})();var TU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[eu,Ct,Ct]})}return t})();function Ege(t,i){if(t&1){let e=Ce();B(0,"mat-checkbox",3),ce("click",function(){ue(e);let n=ne();return he(n.optionClicked())}),Y(1),U()}if(t&2){let e=i.$implicit;io("formControlName",e.display),j(),Qe(" ",e.display," ")}}var Fw=(()=>{class t{constructor(e,r){this.terminologyService=e,this._formBuilder=r,this.selectionChange=new Le,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.options=[{display:this.binding.title}],this.options?.forEach(e=>{this.checkboxes.addControl(e.display,this._formBuilder.control(!1))})}optionClicked(){let e=[];e.push({title:this.binding.title,code:this.binding.ecl,value:this.checkboxes.value[this.binding.title]?this.present:this.absent}),this.selectionChange.emit(e)}static{this.\u0275fac=function(r){return new(r||t)(be(Ri),be($d))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-checkbox-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},standalone:!1,decls:4,vars:3,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","before",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","before",1,"check",3,"click","formControlName"]],template:function(r,n){r&1&&(B(0,"form",0),de(1,Ege,2,2,"mat-checkbox",1),B(2,"span",2),Y(3),U()()),r&2&&(ee("formGroup",n.checkboxes),j(),ee("ngForOf",n.options),j(2),ze(n.binding.note))},dependencies:[ci,Xl,xn,ko,la,Wc,eu],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}}return t})();var Ow=(()=>{class t{constructor(e){this.terminologyService=e,this.textChange=new Le,this.value=0}ngOnInit(){}onValueChange(e){this.value=e,this.textChange.emit(e)}static{this.\u0275fac=function(r){return new(r||t)(be(Ri))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-integer-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},standalone:!1,decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter integer value...","pattern","^-?[0-9]\\d*$","title","Only integer values are allowed",3,"ngModelChange","ngModel"]],template:function(r,n){r&1&&(B(0,"mat-form-field",0)(1,"mat-label"),Y(2),U(),B(3,"input",1),On("ngModelChange",function(s){return Xn(n.value,s)||(n.value=s),s}),ce("ngModelChange",function(s){return n.onValueChange(s)}),U(),B(4,"mat-hint"),Y(5),U()()),r&2&&(j(2),ze(n.binding.title),j(),Fn("ngModel",n.value),j(2),ze(n.binding.note))},dependencies:[Bn,Nn,za,ss,hr,dv,xn,uv,wr],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return t})();var Lw=(()=>{class t{constructor(e){this.terminologyService=e,this.textChange=new Le,this.value=0}ngOnInit(){}onValueChange(e){this.value=e,this.textChange.emit(e)}static{this.\u0275fac=function(r){return new(r||t)(be(Ri))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-decimal-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},standalone:!1,decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter decimal value...","pattern","^-?[0-9]*\\.?[0-9]+$","title","Only decimal values are allowed","step","any",3,"ngModelChange","ngModel"]],template:function(r,n){r&1&&(B(0,"mat-form-field",0)(1,"mat-label"),Y(2),U(),B(3,"input",1),On("ngModelChange",function(s){return Xn(n.value,s)||(n.value=s),s}),ce("ngModelChange",function(s){return n.onValueChange(s)}),U(),B(4,"mat-hint"),Y(5),U()()),r&2&&(j(2),ze(n.binding.title),j(),Fn("ngModel",n.value),j(2),ze(n.binding.note))},dependencies:[Bn,Nn,za,ss,hr,dv,xn,uv,wr],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return t})();function Dge(t,i){if(t&1){let e=Ce();B(0,"mat-checkbox",3),ce("click",function(){ue(e);let n=ne();return he(n.optionClicked())}),Y(1),U()}if(t&2){let e=i.$implicit;io("formControlName",e.display),j(),Qe(" ",e.display," ")}}var Nw=(()=>{class t{constructor(e,r){this.terminologyService=e,this._formBuilder=r,this.selectionChange=new Le,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(e=>{this.options=e.expansion.contains,this.options?.forEach(r=>{this.checkboxes.addControl(r.display,this._formBuilder.control(!1))})})}optionClicked(){let e=[];this.options?.forEach(r=>{e.push({code:r,value:this.checkboxes.value[r.display]?this.present:this.absent})}),this.selectionChange.emit(e)}static{this.\u0275fac=function(r){return new(r||t)(be(Ri),be($d))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-checkbox-multiple-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},standalone:!1,decls:6,vars:4,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","after",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","after",1,"check",3,"click","formControlName"]],template:function(r,n){r&1&&(B(0,"div"),Y(1),U(),B(2,"form",0),de(3,Dge,2,2,"mat-checkbox",1),B(4,"span",2),Y(5),U()()),r&2&&(j(),ze(n.binding.title),j(),ee("formGroup",n.checkboxes),j(),ee("ngForOf",n.options),j(2),ze(n.binding.note))},dependencies:[ci,Xl,xn,ko,la,Wc,eu],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}}return t})();var Mge=["newPanel"],Age=()=>({standalone:!0}),ZI=()=>({});function Ige(t,i){t&1&&(B(0,"mat-panel-description"),Y(1," Click to add new binding "),U())}function Rge(t,i){if(t&1){let e=Ce();B(0,"button",46),ce("click",function(){let n;ue(e);let a=ne();return he((n=a.newBindingForm.get("title"))==null?null:n.reset())}),B(1,"mat-icon"),Y(2,"close"),U()()}}function Pge(t,i){t&1&&(B(0,"span"),Y(1,"Restrict to Observables"),U())}function kge(t,i){t&1&&(B(0,"span"),Y(1,"Open to Observables + Findings + Procedures + Situations"),U())}function Fge(t,i){if(t&1&&(B(0,"mat-option",47),Y(1),U()),t&2){let e=i.$implicit;ee("value",e),j(),Qe(" ",e," ")}}function Oge(t,i){if(t&1){let e=Ce();B(0,"button",46),ce("click",function(){let n;ue(e);let a=ne(2);return he((n=a.newBindingForm.get("ecl"))==null?null:n.reset())}),B(1,"mat-icon"),Y(2,"close"),U()()}}function Lge(t,i){if(t&1){let e=Ce();B(0,"mat-form-field",14)(1,"mat-label"),Y(2,"Answer options: ECL Expression"),U(),we(3,"input",48),B(4,"a",49),ce("click",function(){let n;ue(e);let a=ne();return he(a.openEclBuilder((n=a.newBindingForm.get("ecl"))==null?null:n.value,"ecl"))}),Y(5,"ECL Builder"),U(),de(6,Oge,3,0,"button",16),B(7,"mat-error"),Y(8),U()()}if(t&2){let e,r=ne();j(6),ee("ngIf",(e=r.newBindingForm.get("ecl"))==null?null:e.value),j(2),ze(r.getErrorMessage("ecl"))}}function Nge(t,i){t&1&&(B(0,"span"),Y(1,"Restrict to Observables"),U())}function Bge(t,i){t&1&&(B(0,"span"),Y(1,"Open to Observables + Findings + Procedures"),U())}function Vge(t,i){if(t&1){let e=Ce();B(0,"mat-form-field",14),we(1,"app-autocomplete-binding",50),B(2,"a",19),ce("click",function(){ue(e);let n=ne();return he(n.toggleCheckboxBinding())}),de(3,Nge,2,0,"span",10)(4,Bge,2,0,"span",10),U(),B(5,"mat-error"),Y(6),U()()}if(t&2){let e=ne();j(),ee("binding",e.checkboxBinding),j(2),ee("ngIf",e.checkboxBinding.ecl===e.codeBindingAll.ecl),j(),ee("ngIf",e.checkboxBinding.ecl!=e.codeBindingAll.ecl),j(2),ze(e.getErrorMessage("ecl"))}}function Uge(t,i){if(t&1){let e=Ce();B(0,"button",46),ce("click",function(){let n;ue(e);let a=ne(2);return he((n=a.newBindingForm.get("note"))==null?null:n.reset())}),B(1,"mat-icon"),Y(2,"close"),U()()}}function zge(t,i){if(t&1&&(B(0,"mat-form-field",51)(1,"mat-label"),Y(2,"Note"),U(),we(3,"input",52),de(4,Uge,3,0,"button",16),B(5,"mat-error"),Y(6),U()()),t&2){let e,r=ne();j(4),ee("ngIf",(e=r.newBindingForm.get("note"))==null?null:e.value),j(2),ze(r.getErrorMessage("note"))}}function Gge(t,i){if(t&1){let e=Ce();B(0,"button",27),ce("click",function(){ue(e);let n=ne();return he(n.addBinding())}),Y(1,"Add binding"),U()}}function Hge(t,i){if(t&1){let e=Ce();B(0,"button",27),ce("click",function(){ue(e);let n=ne();return n.addBinding(),he(n.clearOutput())}),Y(1,"Update binding"),U()}}function jge(t,i){if(t&1){let e=Ce();B(0,"button",35),ce("click",function(){ue(e);let n=ne();return he(n.showRightContainer=!n.showRightContainer)}),Y(1),U()}if(t&2){let e=ne();j(),Qe(" ",e.showRightContainer?"Close data panel":"Open data panel"," ")}}function Wge(t,i){if(t&1&&(B(0,"button",53),Y(1," Download form "),U()),t&2){ne();let e=Pt(69);ee("matMenuTriggerFor",e)}}function Xge(t,i){if(t&1){let e=Ce();B(0,"div",54)(1,"p",55),Y(2),U(),B(3,"button",56),ce("click",function(){ue(e);let n=ne();return he(n.titleEditMode=!0)}),B(4,"mat-icon"),Y(5,"edit"),U()()()}if(t&2){let e=ne();j(2),ze(e.formTitle)}}function Yge(t,i){if(t&1){let e=Ce();B(0,"div",54)(1,"form",57)(2,"mat-form-field")(3,"mat-label"),Y(4,"Title"),U(),B(5,"input",58),On("ngModelChange",function(n){ue(e);let a=ne();return Xn(a.formTitle,n)||(a.formTitle=n),he(n)}),ce("ngModelChange",function(){ue(e);let n=ne();return he(n.refreshFhirQuestionnaire())}),U(),B(6,"button",46),ce("click",function(){ue(e);let n=ne();return he(n.formTitle="")}),B(7,"mat-icon"),Y(8,"close"),U()()()(),B(9,"button",56),ce("click",function(){ue(e);let n=ne();return he(n.titleEditMode=!1)}),B(10,"mat-icon"),Y(11,"save"),U()()()}if(t&2){let e=ne();j(5),Fn("ngModel",e.formTitle),ee("ngModelOptions",Yn(2,Age))}}function $ge(t,i){if(t&1){let e=Ce();B(0,"app-autocomplete-binding",67),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function Qge(t,i){if(t&1){let e=Ce();B(0,"app-dropdown-binding",67),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function Kge(t,i){if(t&1){let e=Ce();B(0,"app-radios-binding",67),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function Zge(t,i){if(t&1&&(B(0,"span",68),Y(1),U()),t&2){let e=ne().$implicit;j(),ze(e.title)}}function Jge(t,i){if(t&1){let e=Ce();B(0,"app-textbox-binding",69),ce("textChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function qge(t,i){if(t&1){let e=Ce();B(0,"app-integer-binding",69),ce("textChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function e0e(t,i){if(t&1){let e=Ce();B(0,"app-decimal-binding",69),ce("textChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function t0e(t,i){if(t&1){let e=Ce();B(0,"app-checkbox-binding",67),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function i0e(t,i){if(t&1){let e=Ce();B(0,"app-checkbox-multiple-binding",67),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function n0e(t,i){if(t&1&&(B(0,"button",70)(1,"mat-icon"),Y(2,"info"),U()()),t&2){let e=ne().$implicit,r=Pt(15);ee("matMenuTriggerFor",r)("disabled",!e.code&&!e.ecl)}}function r0e(t,i){if(t&1){let e=Ce();B(0,"span",6),ce("click",function(n){return ue(e),he(n.stopPropagation())}),B(1,"h4"),Y(2,"Question terminology binding"),U(),B(3,"pre"),Y(4),U()()}if(t&2){let e=ne().$implicit;ee("disableRipple",!0),j(4),Gr("",e.code==null?null:e.code.code," |",e.code==null?null:e.code.display,"|")}}function s0e(t,i){if(t&1){let e=Ce();B(0,"span",6),ce("click",function(n){return ue(e),he(n.stopPropagation())}),B(1,"h4"),Y(2,"Answer terminology binding"),U(),B(3,"pre"),Y(4),U()()}if(t&2){let e=ne().$implicit;ee("disableRipple",!0),j(4),ze(e.ecl)}}function a0e(t,i){if(t&1){let e=Ce();B(0,"div",59)(1,"div",60)(2,"mat-icon",61),Y(3,"drag_indicator"),U(),de(4,$ge,1,1,"app-autocomplete-binding",62)(5,Qge,1,1,"app-dropdown-binding",62)(6,Kge,1,1,"app-radios-binding",62)(7,Zge,2,1,"span",63)(8,Jge,1,1,"app-textbox-binding",64)(9,qge,1,1,"app-integer-binding",64)(10,e0e,1,1,"app-decimal-binding",64)(11,t0e,1,1,"app-checkbox-binding",62)(12,i0e,1,1,"app-checkbox-multiple-binding",62)(13,n0e,3,2,"button",65),B(14,"mat-menu",null,0),de(16,r0e,5,3,"span",66)(17,s0e,5,2,"span",66),U(),B(18,"button",56),ce("click",function(){let n=ue(e).index,a=ne();return he(a.bindings.splice(n,1))}),B(19,"mat-icon"),Y(20,"delete"),U()(),B(21,"button",56),ce("click",function(){let n=ue(e).index,a=ne();return he(a.edit(n))}),B(22,"mat-icon"),Y(23,"edit"),U()()()()}if(t&2){let e=i.$implicit;j(4),ee("ngIf",e.type=="Autocomplete"),j(),ee("ngIf",e.type=="Select (Single)"||e.type=="Select (Multiple)"),j(),ee("ngIf",e.type=="Options"),j(),ee("ngIf",e.type=="Section header"),j(),ee("ngIf",e.type=="Text box"),j(),ee("ngIf",e.type=="Integer"),j(),ee("ngIf",e.type=="Decimal"),j(),ee("ngIf",e.type=="Checkbox"),j(),ee("ngIf",e.type=="Checkbox multiple"),j(),ee("ngIf",e.type!="Section header"),j(3),ee("ngIf",e.code),j(),ee("ngIf",e.ecl)}}function o0e(t,i){if(t&1){let e=Ce();B(0,"div",74)(1,"button",75),ce("click",function(){ue(e);let n=ne(2);return he(n.saveOutput(n.outputStr))}),we(2,"mat-icon",76),U(),B(3,"button",77),ce("click",function(){ue(e);let n=ne(2);return he(n.copyOutputToClipboard(n.outputStr))}),we(4,"mat-icon",78),U()()}}function l0e(t,i){if(t&1&&(B(0,"div",71),de(1,o0e,5,0,"div",72),B(2,"textarea",73),Y(3," "),U()()),t&2){let e=ne();j(),ee("ngIf",e.showRightContainer),j(),ee("options",Yn(4,ZI))("lang","json")("innerHTML",e.responseStr,Bl)}}function c0e(t,i){if(t&1){let e=Ce();B(0,"div",74)(1,"button",75),ce("click",function(){ue(e);let n=ne(2);return he(n.saveBundleOutput(n.responseBundleStr))}),we(2,"mat-icon",76),U(),B(3,"button",77),ce("click",function(){ue(e);let n=ne(2);return he(n.copyOutputToClipboard(n.responseBundleStr))}),we(4,"mat-icon",78),U()()}}function d0e(t,i){if(t&1&&(B(0,"div",71),de(1,c0e,5,0,"div",72),B(2,"textarea",73),Y(3," "),U()()),t&2){let e=ne();j(),ee("ngIf",e.showRightContainer),j(),ee("options",Yn(4,ZI))("lang","json")("innerHTML",e.responseBundleStr,Bl)}}function u0e(t,i){if(t&1){let e=Ce();B(0,"div",74)(1,"button",75),ce("click",function(){ue(e);let n=ne(2);return he(n.saveOutput(n.fhirQuestionnaireStr))}),we(2,"mat-icon",76),U(),B(3,"button",77),ce("click",function(){ue(e);let n=ne(2);return he(n.copyOutputToClipboard(n.fhirQuestionnaireStr))}),we(4,"mat-icon",78),U()()}}function h0e(t,i){if(t&1&&(B(0,"div",71),de(1,u0e,5,0,"div",72),B(2,"textarea",73),Y(3," "),U()()),t&2){let e=ne();j(),ee("ngIf",e.showRightContainer),j(),ee("options",Yn(4,ZI))("lang","json")("innerHTML",e.fhirQuestionnaireStr,Bl)}}var AU=(()=>{class t{constructor(e,r,n){this.terminologyService=e,this.clipboard=r,this.dialog=n,this.formTitle="My new form",this.titleEditMode=!1,this.bindings=[],this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}",this.fhirQuestionnaire={},this.fhirQuestionnaireStr="{}",this.observableBinding={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingObservables={title:"Question code (Observables)",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingAll={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)| OR << 404684003 |Clinical finding (finding)| OR << 71388002 |Procedure (procedure)| OR << 243796009 |Situation with explicit context (situation)|",value:""},this.codeBinding=this.codeBindingAll,this.checkboxBinding=JSON.parse(JSON.stringify(this.codeBindingAll)),this.example1={title:"Appendicitis data entry form (example)",bindings:[{title:"Diagnosis (type of appendicitis)",type:"Autocomplete",ecl:"<< 74400008 |Appendicitis|",value:"",note:"An autocomplete field to select between all descendants of appendicitis."},{title:"Clinical note",type:"Text box",ecl:"74400008 |Appendicitis|",value:"",note:"A text box for entering free text clinical information."},{title:"Appendicitis type",type:"Select (Single)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A single selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicitis type (M)",type:"Select (Multiple)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A multiple selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicectomy type",type:"Options",ecl:"<< 174036004 |Emergency appendectomy (procedure)|",value:"",note:"A radio buttons selector for the type of appendicectomy procedure."}]},this.newBindingForm=new Yd({title:new er("",[Ns.required,Ns.maxLength(50)]),code:new er("",[]),type:new er("",[Ns.required]),ecl:new er("",[]),value:new er("",[]),note:new er("",[Ns.maxLength(500)])}),this.indexInEdit=-1,this.panelOpenState=!1,this.maxSelectCount=50,this.maxOptionsCount=10,this.controlTypes=["Autocomplete","Select (Single)","Select (Multiple)","Options","Section header","Text box","Integer","Decimal","Checkbox","Checkbox multiple"].sort((a,s)=>a.localeCompare(s)),this.showRightContainer=!1}ngOnInit(){this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}get stateName(){return this.showRightContainer?"open":"closed"}addBinding(){return Ve(this,null,function*(){if(this.newBindingForm.markAllAsTouched(),this.newBindingForm.invalid)return;let{title:e,code:r,type:n,ecl:a,value:s,note:o}=this.newBindingForm.controls,d={title:e.value,code:r.value,type:n.value,ecl:a.value,value:s.value,note:o.value},l=!1;a.value?typeof d.type?.indexOf("Select")<"u"&&d.type?.indexOf("Select")>-1?(yield this.getEclPreview(a.value)).expansion.contains.length>this.maxSelectCount&&(l=!0,a.setErrors({selectTooManyResults:!0})):(typeof d.type?.indexOf("Options")<"u"&&d.type?.indexOf("Options")>-1||typeof d.type?.indexOf("Checkbox multiple")<"u"&&d.type?.indexOf("Checkbox multiple")>-1)&&(yield this.getEclPreview(a.value)).expansion.contains.length>this.maxOptionsCount&&(l=!0,a.setErrors({optionsTooManyResults:!0})):d.type!="Section header"&&d.type!="Text box"&&d.type!="Integer"&&d.type!="Decimal"&&(l=!0,a.setErrors({required:!0})),!l&&(this.indexInEdit>-1?this.bindings[this.indexInEdit]=d:this.bindings.push(d),this.newBindingForm.reset(),this.newPanel.close(),this.indexInEdit=-1,setTimeout(()=>{this.refreshFhirQuestionnaire(),this.refreshResponse()},100))})}refreshFhirQuestionnaire(){this.fhirQuestionnaire={resourceType:"Questionnaire",title:this.formTitle,status:"draft",item:[]},this.bindings.forEach((e,r)=>{let n=this.createItemForBinding(e,r);n&&this.fhirQuestionnaire.item.push(n)}),this.fhirQuestionnaireStr=JSON.stringify(this.fhirQuestionnaire,null,2)}createItemForBinding(e,r){let n=this.initializeBaseItem(e,r);return["Select (Single)","Select (Multiple)","Options","Autocomplete"].includes(e.type)&&(n.extension=this.getExtensionForSelectableTypes(),n.answerValueSet=this.getAnswerValueSet(e)),e.type==="Autocomplete"&&n.extension.push(this.getAutocompleteExtension()),e.type==="Select (Multiple)"&&(n.repeats=!0),n}initializeBaseItem(e,r){let n={linkId:r+1,text:e.title,type:this.getQuestionnaireItemType(e.type)};return e.code&&(n.code=[{system:"http://snomed.info/sct",code:e.code.code,display:e.code.display}]),n}getQuestionnaireItemType(e){switch(e){case"Section header":return"display";case"Select (Single)":case"Select (Multiple)":case"Options":case"Checkbox multiple":case"Autocomplete":return"choice";case"Text box":return"text";case"Integer":return"integer";case"Decimal":return"decimal";default:return console.warn(`Unhandled binding type: ${e}`),null}}getExtensionForSelectableTypes(){return[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-preferredTerminologyServer",valueUrl:"https://snowstorm.ihtsdotools.org/fhir"}]}getAutocompleteExtension(){return{url:"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",valueCodeableConcept:{coding:[{system:"http://hl7.org/fhir/questionnaire-item-control",code:"autocomplete",display:"Auto-complete"}]}}}getAnswerValueSet(e){return`http://snomed.info/sct/900000000000207008?fhir_vs=ecl%2F${encodeURIComponent(e.ecl)}`}getEclPreview(e){return Ve(this,null,function*(){let r=yield this.terminologyService.expandValueSet(e,"");return sn(r.pipe(mt(n=>n)))})}edit(e){this.indexInEdit=e;let r=this.bindings[e];this.newBindingForm.setValue({title:r.title,code:r.code?r.code:"",type:r.type,ecl:r.ecl,value:r.value,note:r.note}),this.newPanel.open()}onDrop(e){qm(this.bindings,e.previousIndex,e.currentIndex)}getErrors(e){let r=this.newBindingForm.get(e);return r?r.errors:null}getErrorMessage(e){let r=this.getErrors(e);if(r){if(r.required)return"This field is required";if(r.maxlength)return`This field must be less than ${r.maxlength.requiredLength} characters`;if(r.selectTooManyResults)return`Too many results (Max = ${this.maxSelectCount})`;if(r.optionsTooManyResults)return`Too many results (Max = ${this.maxOptionsCount})`}return null}refreshResponse(){this.response={};for(let e of this.bindings)this.response[e.title]={},e.code&&(this.response[e.title].code=e.code);for(let[e,r]of Object.entries(this.output))this.output[e].code&&(this.response[e].code=this.output[e].code),this.output[e].value&&(this.response[e].value=this.output[e].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[e,r]of Object.entries(this.response)){let n=r,a=n.code?{coding:[{system:"http://snomed.info/sct",code:n.code.code,display:n.code.display}]}:void 0,s=n.value?.code?{coding:[{system:"http://snomed.info/sct",code:n.value.code,display:n.value.display}]}:void 0,o={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};a?o.code=a:o.code={coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},s&&(o.valueCodeableConcept=s),n.value&&typeof n.value=="string"&&(o.valueString=n.value),(o.valueCodeableConcept||o.valueString)&&this.responseBundle.entry.push(o)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}optionSelected(e,r,n){this.output[e]={code:r,value:n},r||delete this.output[e].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}loadExample1(){this.formTitle=this.example1.title,this.bindings=this.example1.bindings,this.refreshFhirQuestionnaire(),this.clearOutput(),this.refreshResponse()}cancelEdit(){this.newBindingForm.reset(),this.newPanel.close(),this.indexInEdit=-1}clear(){this.bindings=[],this.clearOutput(),this.newBindingForm.reset(),this.formTitle="My new form",this.showRightContainer=!1}clearOutput(){this.output={},this.outputStr="{}";let e=JSON.parse(JSON.stringify(this.bindings));this.bindings=[],this.bindings=e}saveForm(){var e=new Blob([JSON.stringify({title:this.formTitle,bindings:this.bindings},null,2)],{type:"text/plain;charset=utf-8"});(0,Bw.saveAs)(e,`${this.formTitle}.json`)}saveOutput(e){var r=new Blob([e],{type:"text/plain;charset=utf-8"});(0,Bw.saveAs)(r,`${this.formTitle}-data.json`)}saveBundleOutput(e){var r=new Blob([e],{type:"text/plain;charset=utf-8"});(0,Bw.saveAs)(r,`${this.formTitle}-fhir-bundle.json`)}copyOutputToClipboard(e){this.clipboard.copy(e)}uploadFile(e){if(e.target.files.length!==1)console.error("No file selected");else{let r=new FileReader;r.onloadend=n=>{if(r.result){let a=JSON.parse(r.result?.toString());Array.isArray(a)?(this.bindings=a,this.formTitle="My new form"):(this.bindings=[],this.bindings=a.bindings,this.formTitle=a.title),this.clearOutput(),this.refreshResponse(),this.refreshFhirQuestionnaire()}},r.readAsText(e.target.files[0])}}openEclBuilder(e,r){this.dialog.open(sU,{data:{ecl:e},width:"80%",height:"80%"}).afterClosed().subscribe(a=>{if(a){let s=this.newBindingForm.get(r);s&&s.setValue(a.ecl)}})}toggleCodeBinding(){this.codeBinding=this.codeBinding===this.codeBindingAll?this.codeBindingObservables:this.codeBindingAll}toggleCheckboxBinding(){this.checkboxBinding=this.checkboxBinding.ecl===this.codeBindingAll.ecl?JSON.parse(JSON.stringify(this.codeBindingObservables)):JSON.parse(JSON.stringify(this.codeBindingAll)),this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}static{this.\u0275fac=function(r){return new(r||t)(be(Ri),be(Km),be(hl))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-bindings-sandbox"]],viewQuery:function(r,n){if(r&1&&vt(Mge,5),r&2){let a;je(a=We())&&(n.newPanel=a.first)}},standalone:!1,decls:94,vars:27,consts:[["substancePopoverMenu","matMenu"],["newPanel",""],["fileInput",""],["demosMenu","matMenu"],["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disableRipple"],[1,"flex","flex-row","mb-8"],[1,"w-2/3"],[1,"editPanel","w-full","pt-4","pb-4",3,"opened","closed"],[4,"ngIf"],[1,"row",3,"formGroup"],[1,"form-row"],[1,"form-column"],[1,"input-field"],["matInput","","type","text","formControlName","title","placeholder","Enter title..."],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"input-field","autocomplete-field"],["formControlName","code",1,"grow",3,"binding"],["href","javascript:void(0)",1,"bottom-right-link",3,"click"],["formControlName","type"],[3,"value",4,"ngFor","ngForOf"],["class","input-field",4,"ngIf"],["class","input-field full-width",4,"ngIf"],[1,"row"],[1,"grow"],["mat-flat-button","","color","primary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary",3,"click"],[1,"w-1/3"],[1,"flex","flex-row","gap-4","justify-end","flex-wrap"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["hidden","","type","file","id","file",3,"change"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor",4,"ngIf"],[1,"wide-menu"],["mat-menu-item","",3,"click"],["mat-flat-button","","color","accent",3,"click"],["class","compact-row-container",4,"ngIf"],[1,"row-container"],[1,"row-container-item"],["cdkDropList","",3,"cdkDropListDropped"],["class","output-panel","cdkDrag","",4,"ngFor","ngForOf"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Data collected from form"],["class","output",4,"ngIf"],["label","Data collected (FHIR Bundle)"],["label","FHIR Questionnaire"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"value"],["matInput","","type","text","formControlName","ecl","placeholder","Enter ECL..."],["href","javascript:void(0)",1,"top-right-link",3,"click"],["formControlName","ecl",1,"grow",3,"binding"],[1,"input-field","full-width"],["matInput","","type","text","formControlName","note","placeholder","Enter a description..."],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"compact-row-container"],[1,"title"],["mat-icon-button","","color","primary",1,"tool",3,"click"],[1,"row","form-title"],["matInput","","type","text","placeholder","Enter title...",3,"ngModelChange","ngModel","ngModelOptions"],["cdkDrag","",1,"output-panel"],[1,"row","control"],["cdkDragHandle","",1,"tool","drag-handle"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"selectionChange","binding"],[1,"title","grow"],[1,"grow",3,"textChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(r,n){if(r&1){let a=Ce();B(0,"div",4)(1,"h3"),Y(2,"Terminology Bindings Sandbox "),B(3,"button",5)(4,"mat-icon"),Y(5,"info"),U()(),B(6,"mat-menu",null,0)(8,"span",6),ce("click",function(o){return ue(a),he(o.stopPropagation())}),B(9,"h4"),Y(10,"Terminology Bindings Sandbox"),U(),B(11,"p"),Y(12,"This is a sandbox for creating terminology bindings, designed to support education activities."),U()()()(),B(13,"div",7)(14,"div",8)(15,"mat-expansion-panel",9,1),ce("opened",function(){return ue(a),he(n.panelOpenState=!0)})("closed",function(){return ue(a),he(n.panelOpenState=!1)}),B(17,"mat-expansion-panel-header")(18,"mat-panel-title")(19,"h4"),Y(20,"New binding:"),U()(),de(21,Ige,2,0,"mat-panel-description",10),U(),B(22,"div")(23,"form",11)(24,"div",12)(25,"div",13)(26,"h5"),Y(27,"Question"),U(),B(28,"mat-form-field",14)(29,"mat-label"),Y(30,"Question text"),U(),we(31,"input",15),de(32,Rge,3,0,"button",16),B(33,"mat-error"),Y(34),U()(),B(35,"mat-form-field",17),we(36,"app-autocomplete-binding",18),B(37,"a",19),ce("click",function(){return ue(a),he(n.toggleCodeBinding())}),de(38,Pge,2,0,"span",10)(39,kge,2,0,"span",10),U(),B(40,"mat-error"),Y(41),U()()(),B(42,"div",13)(43,"h5"),Y(44,"Answer"),U(),B(45,"mat-form-field",14)(46,"mat-label"),Y(47,"Answer Type"),U(),B(48,"mat-select",20),de(49,Fge,2,2,"mat-option",21),U(),B(50,"mat-error"),Y(51),U()(),de(52,Lge,9,2,"mat-form-field",22)(53,Vge,7,4,"mat-form-field",22),U()(),de(54,zge,7,2,"mat-form-field",23),U(),we(55,"br"),B(56,"div",24),we(57,"span",25),de(58,Gge,2,0,"button",26)(59,Hge,2,0,"button",26),B(60,"button",27),ce("click",function(){return ue(a),he(n.cancelEdit())}),Y(61,"Cancel"),U()()()()(),B(62,"div",28)(63,"div",29),de(64,jge,2,1,"button",30),B(65,"input",31,2),ce("change",function(o){return ue(a),he(n.uploadFile(o))}),U(),de(67,Wge,2,1,"button",32),B(68,"mat-menu",33,3)(70,"button",34),ce("click",function(){return ue(a),he(n.saveForm())}),Y(71,"Download"),U(),B(72,"button",34),ce("click",function(){return ue(a),he(n.saveOutput(n.fhirQuestionnaireStr))}),Y(73,"Download as FHIR Questionnaire"),U()(),B(74,"button",35),ce("click",function(){ue(a);let o=Pt(66);return he(o.click())}),Y(75,"Upload form"),U(),B(76,"button",35),ce("click",function(){return ue(a),he(n.loadExample1())}),Y(77,"Example"),U(),B(78,"button",35),ce("click",function(){return ue(a),he(n.clear())}),Y(79,"Clear"),U()()()(),de(80,Xge,6,1,"div",36)(81,Yge,12,3,"div",36),B(82,"div",37)(83,"div",38)(84,"div",39),ce("cdkDropListDropped",function(o){return ue(a),he(n.onDrop(o))}),de(85,a0e,24,12,"div",40),U()(),B(86,"div",38)(87,"mat-tab-group",41)(88,"mat-tab",42),de(89,l0e,4,5,"div",43),U(),B(90,"mat-tab",44),de(91,d0e,4,5,"div",43),U(),B(92,"mat-tab",45),de(93,h0e,4,5,"div",43),U()()()()()}if(r&2){let a,s=Pt(7);j(3),ee("matMenuTriggerFor",s),j(5),ee("disableRipple",!0),j(13),ee("ngIf",!n.panelOpenState),j(2),ee("formGroup",n.newBindingForm),j(9),ee("ngIf",(a=n.newBindingForm.get("title"))==null?null:a.value),j(2),ze(n.getErrorMessage("title")),j(2),ee("binding",n.codeBinding),j(2),ee("ngIf",n.codeBinding===n.codeBindingAll),j(),ee("ngIf",n.codeBinding!=n.codeBindingAll),j(2),ze(n.getErrorMessage("code")),j(8),ee("ngForOf",n.controlTypes),j(2),ze(n.getErrorMessage("type")),j(),ee("ngIf",n.newBindingForm.controls.type.value!="Section header"&&n.newBindingForm.controls.type.value!="Text box"&&n.newBindingForm.controls.type.value!="Checkbox"&&n.newBindingForm.controls.type.value!="Integer"&&n.newBindingForm.controls.type.value!="Decimal"),j(),ee("ngIf",n.newBindingForm.controls.type.value=="Checkbox"),j(),ee("ngIf",n.newBindingForm.controls.type.value!="Section header"),j(4),ee("ngIf",n.indexInEdit==-1),j(),ee("ngIf",n.indexInEdit>-1),j(5),ee("ngIf",n.bindings.length),j(3),ee("ngIf",n.bindings.length),j(13),ee("ngIf",!n.titleEditMode),j(),ee("ngIf",n.titleEditMode),j(2),ee("@growShrink",n.stateName),j(2),ee("ngForOf",n.bindings),j(),ee("@openClose",n.stateName),j(3),ee("ngIf",n.bindings.length>0),j(2),ee("ngIf",n.bindings.length>0),j(2),ee("ngIf",n.bindings.length>0)}},dependencies:[ci,oi,Zm,Ew,Sw,W7,di,ln,Pi,ur,_r,rs,Bn,Nn,hw,fw,is,ss,Xl,hr,xn,ko,la,Wc,ul,Ga,Lo,wr,jc,as,$I,hU,mU,fU,Oo,Iw,Pw,kw,Fw,Ow,Lw,Nw],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"],data:{animation:[hn("openClose",[qn("open",Rt({opacity:1,width:"50%"})),qn("closed",Rt({opacity:0,width:"0"})),Li("open <=> closed",[Ii("0.5s")])]),hn("growShrink",[qn("open",Rt({width:"50%"})),qn("closed",Rt({width:"100%"})),Li("open <=> closed",[Ii("0.5s")])])]}})}}return t})();var IU=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=Te({type:t,selectors:[["app-prescription-main"]],standalone:!1,decls:2,vars:0,template:function(r,n){r&1&&(B(0,"p"),Y(1,"prescription-main works!, no?"),U())},encapsulation:2})}}return t})();var f0e=["mat-sort-header",""],m0e=["*"];function p0e(t,i){t&1&&(B(0,"div",2),yr(),B(1,"svg",3),we(2,"path",4),U()())}var RU=new Se("MAT_SORT_DEFAULT_OPTIONS"),ha=(()=>{class t{_defaultOptions;_initializedStream=new wo(1);sortables=new Map;_stateChanges=new Oe;active;start="asc";get direction(){return this._direction}set direction(e){this._direction=e}_direction="";disableClear;disabled=!1;sortChange=new Le;initialized=this._initializedStream;constructor(e){this._defaultOptions=e}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){if(!e)return"";let r=e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear,n=g0e(e.start||this.start,r),a=n.indexOf(this.direction)+1;return a>=n.length&&(a=0),n[a]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}static \u0275fac=function(r){return new(r||t)(be(RU,8))};static \u0275dir=Ue({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",$e],disabled:[2,"matSortDisabled","disabled",$e]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[At,ei]})}return t})();function g0e(t,i){let e=["asc","desc"];return t=="desc"&&e.reverse(),i||e.push(""),e}var Vw=(()=>{class t{changes=new Oe;static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function v0e(t){return t||new Vw}var y0e={provide:Vw,deps:[[new Dc,new ih,Vw]],useFactory:v0e},tp=(()=>{class t{_intl=Q(Vw);_sort=Q(ha,{optional:!0});_columnDef=Q("MAT_SORT_HEADER_COLUMN_DEF",{optional:!0});_changeDetectorRef=Q(Ut);_focusMonitor=Q(br);_elementRef=Q(Ze);_ariaDescriber=Q(w_,{optional:!0});_renderChanges;_animationModule=Q(Mi,{optional:!0});_recentlyCleared=Ta(null);_sortButton;id;arrowPosition="after";start;disabled=!1;get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e)}_sortActionDescription="Sort";disableClear;constructor(){Q(on).load(Wr);let e=Q(RU,{optional:!0});this._sort,e?.arrowPosition&&(this.arrowPosition=e?.arrowPosition)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._sort.register(this),this._renderChanges=Fi(this._sort._stateChanges,this._sort.sortChange).subscribe(()=>this._changeDetectorRef.markForCheck()),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(()=>this._recentlyCleared.set(null))}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._renderChanges?.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription)}_toggleOnInteraction(){if(!this._isDisabled()){let e=this._isSorted(),r=this._sort.direction;this._sort.sort(this),this._recentlyCleared.set(e&&!this._isSorted()?r:null)}}_handleKeydown(e){(e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&(this._sort.direction==="asc"||this._sort.direction==="desc")}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?this._sort.direction=="asc"?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(r,n){r&1&&ce("click",function(){return n._toggleOnInteraction()})("keydown",function(s){return n._handleKeydown(s)})("mouseleave",function(){return n._recentlyCleared.set(!1)}),r&2&&(pt("aria-sort",n._getAriaSortAttribute()),ut("mat-sort-header-disabled",n._isDisabled()))},inputs:{id:[0,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[2,"disabled","disabled",$e],sortActionDescription:"sortActionDescription",disableClear:[2,"disableClear","disableClear",$e]},exportAs:["matSortHeader"],features:[At],attrs:f0e,ngContentSelectors:m0e,decls:4,vars:17,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],["viewBox","0 -960 960 960","focusable","false","aria-hidden","true"],["d","M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z"]],template:function(r,n){r&1&&(ti(),B(0,"div",0)(1,"div",1),wt(2),U(),de(3,p0e,3,0,"div",2),U()),r&2&&(ut("mat-sort-header-sorted",n._isSorted())("mat-sort-header-position-before",n.arrowPosition==="before")("mat-sort-header-descending",n._sort.direction==="desc")("mat-sort-header-ascending",n._sort.direction==="asc")("mat-sort-header-recently-cleared-ascending",n._recentlyCleared()==="asc")("mat-sort-header-recently-cleared-descending",n._recentlyCleared()==="desc")("mat-sort-header-animations-disabled",n._animationModule==="NoopAnimations"),pt("tabindex",n._isDisabled()?null:0)("role",n._isDisabled()?null:"button"),j(3),Qt(n._renderArrow()?3:-1))},styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-sort-header-content{display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}@keyframes _mat-sort-header-recently-cleared-ascending{from{transform:translateY(0);opacity:1}to{transform:translateY(-25%);opacity:0}}@keyframes _mat-sort-header-recently-cleared-descending{from{transform:translateY(0) rotate(180deg);opacity:1}to{transform:translateY(25%) rotate(180deg);opacity:0}}.mat-sort-header-arrow{height:12px;width:12px;position:relative;transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1),opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;overflow:visible;color:var(--mat-sort-arrow-color, var(--mat-sys-on-surface))}.mat-sort-header.cdk-keyboard-focused .mat-sort-header-arrow,.mat-sort-header.cdk-program-focused .mat-sort-header-arrow,.mat-sort-header:hover .mat-sort-header-arrow{opacity:.54}.mat-sort-header .mat-sort-header-sorted .mat-sort-header-arrow{opacity:1}.mat-sort-header-descending .mat-sort-header-arrow{transform:rotate(180deg)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transform:translateY(-25%)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-ascending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards}.mat-sort-header-recently-cleared-descending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-descending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards}.mat-sort-header-animations-disabled .mat-sort-header-arrow{transition-duration:0ms;animation-duration:0ms}.mat-sort-header-arrow svg{width:24px;height:24px;fill:currentColor;position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px;transform:translateZ(0)}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}"],encapsulation:2,changeDetection:0})}return t})(),PU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[y0e],imports:[Ct]})}return t})(),Yst=b6.ENTERING+" "+x6.STANDARD_CURVE;var HU=Ka(Qd());var qI=Ka(Qd());var kU=(()=>{class t{saveItem(e,r){localStorage.setItem(e,r)}getItem(e){return localStorage.getItem(e)}removeItem(e){localStorage.removeItem(e)}isLocalStorageSupported(){try{let e="__test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch{return!1}}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Bo=(()=>{class t{constructor(e,r){this.http=e,this.storageService=r,this.baseUrlSubject=new Ci("https://hapi.fhir.org/baseR4"),this.baseUrl$=this.baseUrlSubject.asObservable(),this.userTagSubject=new Ci(""),this.userTag$=this.userTagSubject.asObservable(),this.initialize()}initialize(){if(this.storageService.isLocalStorageSupported()){let e=this.storageService.getItem("baseUrl");e&&this.baseUrlSubject.next(e);let r=this.storageService.getItem("userTag");r&&this.userTagSubject.next(r)}}setBaseUrl(e){this.baseUrlSubject.next(e),this.storageService.saveItem("baseUrl",e)}getBaseUrl(){return this.baseUrlSubject.getValue()}setUserTag(e){this.userTagSubject.next(e),this.storageService.saveItem("userTag",e)}getUserTag(){return this.userTagSubject.getValue()}postQuestionnaire(e){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire`,e)}getQuestionnairesByTag(e,r){return r||(r=100),this.http.get(`${this.baseUrlSubject.value}/Questionnaire?_tag=${e}&_count=${r}`)}tagQuestionnaire(e,r){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire/${e}/$meta-add`,{resourceType:"Parameters",parameter:[{name:"meta",valueMeta:{tag:[{system:"http://snomed.org/tags",code:r}]}}]})}deleteQuestionnaire(e){return this.http.delete(`${this.baseUrlSubject.value}/Questionnaire/${e}`)}updateOrCreateQuestionnaire(e,r){if(e.id){let n=`${this.baseUrlSubject.value}/Questionnaire?_id=${e.id}&_tag=${r}`;return this.http.put(n,e).pipe(Rn(a=>a.status===404?this.postQuestionnaire(e):Sl(a)))}else return this.postQuestionnaire(e)}getQuestionnaireHistory(e){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${e}/_history`)}getSpecificQuestionnaireVersion(e,r){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${e}/_history/${r}`)}static{this.\u0275fac=function(r){return new(r||t)(_t(nr),_t(kU))}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function b0e(t,i){if(t&1&&(B(0,"mat-option",15),Y(1),U()),t&2){let e=i.$implicit;ee("value",e),j(),Qe(" ",e.title," ")}}function _0e(t,i){t&1&&we(0,"mat-spinner",16)}function w0e(t,i){if(t&1){let e=Ce();B(0,"div",17)(1,"span",18),Y(2,"\u2261"),U(),Y(3),B(4,"button",19),ce("click",function(){let n=ue(e).index,a=ne();return he(a.deleteQuestionnaire(n))}),B(5,"mat-icon"),Y(6,"delete"),U()()()}if(t&2){let e=i.$implicit;j(3),Qe(" ",e.title," ")}}var Uw=(()=>{class t{constructor(e,r,n,a){this.fb=e,this.fhirService=r,this.data=n,this.dialogRef=a,this.allQuestionnaires=[],this.availableQuestionnaires=[],this.addedQuestionnaires=[],this.userTag="",this.loading=!1}ngOnInit(){this.questionnaireForm=this.fb.group({selectedQuestionnaire:[{value:"",disabled:!0}],assignedName:[{value:"",disabled:!0}]}),this.data&&(this.addedQuestionnaires=this.data.questionnaires,this.questionnaireForm.get("assignedName")?.setValue(this.data.title)),this.questionnaireForm.get("selectedQuestionnaire"),this.userTag=this.fhirService.getUserTag(),this.loadAvailableQuestionnaires()}updateAvailableQuestionnaires(){this.addedQuestionnaires?this.availableQuestionnaires=this.allQuestionnaires.filter(e=>!this.addedQuestionnaires.some(r=>r.id===e.id)):this.availableQuestionnaires=this.allQuestionnaires,this.availableQuestionnaires=this.availableQuestionnaires.filter(e=>!e.extension||!e.extension.some(r=>r.url==="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"&&r.valueCode==="assemble-root"))}loadAvailableQuestionnaires(){this.loading=!0,this.fhirService.getQuestionnairesByTag(this.userTag).subscribe(e=>{this.allQuestionnaires=e.entry.map(r=>r.resource),this.allQuestionnaires.sort((r,n)=>r.title.localeCompare(n.title)),this.updateAvailableQuestionnaires(),this.loading=!1,this.questionnaireForm?.get("selectedQuestionnaire")?.enable(),this.questionnaireForm?.get("assignedName")?.enable()})}addQuestionnaire(){let e=this.questionnaireForm.value;e.selectedQuestionnaire&&(this.addedQuestionnaires.push(Mt(Me({},e.selectedQuestionnaire),{assignedName:e.assignedName})),this.questionnaireForm.get("selectedQuestionnaire")?.reset(),this.updateAvailableQuestionnaires())}drop(e){qm(this.addedQuestionnaires,e.previousIndex,e.currentIndex)}deleteQuestionnaire(e){e>-1&&(this.addedQuestionnaires.splice(e,1),this.updateAvailableQuestionnaires())}isSaveDisabled(){return!this.questionnaireForm.get("assignedName")?.value||!this.addedQuestionnaires.length}closeModal(){this.dialogRef.close({title:this.questionnaireForm.get("assignedName")?.value,questionnaires:this.addedQuestionnaires})}static{this.\u0275fac=function(r){return new(r||t)(be($d),be(Bo),be(Mh),be(ua))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-create-root-module"]],standalone:!1,decls:26,vars:6,consts:[[1,"form-layout",3,"formGroup"],[1,"form-row"],[1,"full-width"],["matInput","","formControlName","assignedName"],[1,"half-width"],["formControlName","selectedQuestionnaire"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary",1,"add-button",3,"click","disabled"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"questionnaire-list"],[1,"list",3,"cdkDropListDropped"],["cdkDrag","","class","cdk-drag",4,"ngFor","ngForOf"],[1,"button-container"],["mat-flat-button","","color","primary","mat-dialog-close",""],["mat-flat-button","","color","accent",3,"click","disabled"],[3,"value"],["diameter","35",1,"loading-spinner"],["cdkDrag","",1,"cdk-drag"],[1,"drag-handle"],["mat-icon-button","","aria-label","Delete questionnaire",3,"click"]],template:function(r,n){r&1&&(B(0,"mat-dialog-content")(1,"h2"),Y(2,"Create a modular Questionnaire"),U(),B(3,"form",0)(4,"div",1)(5,"mat-form-field",2)(6,"mat-label"),Y(7,"Assign Name"),U(),we(8,"input",3),U()(),B(9,"div",1)(10,"mat-form-field",4)(11,"mat-label"),Y(12,"Select Child Questionnaire"),U(),B(13,"mat-select",5),de(14,b0e,2,2,"mat-option",6),U()(),B(15,"button",7),ce("click",function(){return n.addQuestionnaire()}),Y(16,"Add questionnaire"),U(),de(17,_0e,1,0,"mat-spinner",8),U()(),B(18,"div",9)(19,"cdk-drop-list",10),ce("cdkDropListDropped",function(s){return n.drop(s)}),de(20,w0e,7,1,"div",11),U()()(),B(21,"mat-dialog-actions",12)(22,"button",13),Y(23,"Cancel"),U(),B(24,"button",14),ce("click",function(){return n.closeModal()}),Y(25,"Save"),U()()),r&2&&(j(3),ee("formGroup",n.questionnaireForm),j(11),ee("ngForOf",n.availableQuestionnaires),j(),ee("disabled",n.loading),j(2),ee("ngIf",n.loading),j(3),ee("ngForOf",n.addedQuestionnaires),j(4),ee("disabled",n.isSaveDisabled()||n.loading))},dependencies:[ci,oi,Ew,Sw,di,ln,Pi,Bn,Nn,is,Ls,ss,Xl,hr,xn,ko,la,Wc,Lo,Yl,qd,Jd],styles:[".questionnaire-list[_ngcontent-%COMP%]{width:100%;max-height:400px;overflow:auto;border:1px solid #ccc;border-radius:4px;background-color:#f9f9f9;padding:10px}.list[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:4px;background-color:#fff;margin-bottom:10px;padding:10px;display:flex;align-items:center;justify-content:left;box-shadow:0 2px 4px #0000001a}.drag-handle[_ngcontent-%COMP%]{cursor:move;margin-right:15px;font-size:20px;color:#666}.cdk-drag-preview[_ngcontent-%COMP%]{background-color:#e0e0e0}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.form-layout[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:15px}.form-layout[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%}.form-layout[_ngcontent-%COMP%] .half-width[_ngcontent-%COMP%]{width:50%;margin-right:15px}"]})}}return t})();function C0e(t,i){if(t&1&&(B(0,"mat-option",17),Y(1),U()),t&2){let e=i.$implicit;ee("value",e),j(),Qe(" ",e," ")}}function T0e(t,i){if(t&1){let e=Ce();B(0,"mat-form-field",14)(1,"mat-select",16,0),ce("selectionChange",function(n){ue(e);let a=ne(2);return he(a._changePageSize(n.value))}),am(3,C0e,2,2,"mat-option",17,d0),U(),B(5,"div",18),ce("click",function(){ue(e);let n=Pt(2);return he(n.open())}),U()()}if(t&2){let e=ne(2);ee("appearance",e._formFieldAppearance)("color",e.color),j(),ee("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),j(2),om(e._displayedPageSizeOptions)}}function S0e(t,i){if(t&1&&(B(0,"div",15),Y(1),U()),t&2){let e=ne(2);j(),ze(e.pageSize)}}function E0e(t,i){if(t&1&&(B(0,"div",3)(1,"div",13),Y(2),U(),de(3,T0e,6,7,"mat-form-field",14)(4,S0e,2,1,"div",15),U()),t&2){let e=ne();j(),pt("id",e._pageSizeLabelId),j(),Qe(" ",e._intl.itemsPerPageLabel," "),j(),Qt(e._displayedPageSizeOptions.length>1?3:-1),j(),Qt(e._displayedPageSizeOptions.length<=1?4:-1)}}function D0e(t,i){if(t&1){let e=Ce();B(0,"button",19),ce("click",function(){ue(e);let n=ne();return he(n._buttonClicked(0,n._previousButtonsDisabled()))}),yr(),B(1,"svg",8),we(2,"path",20),U()()}if(t&2){let e=ne();ee("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("disabled",e._previousButtonsDisabled()),pt("aria-label",e._intl.firstPageLabel)}}function M0e(t,i){if(t&1){let e=Ce();B(0,"button",21),ce("click",function(){ue(e);let n=ne();return he(n._buttonClicked(n.getNumberOfPages()-1,n._nextButtonsDisabled()))}),yr(),B(1,"svg",8),we(2,"path",22),U()()}if(t&2){let e=ne();ee("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("disabled",e._nextButtonsDisabled()),pt("aria-label",e._intl.lastPageLabel)}}var zw=(()=>{class t{changes=new Oe;itemsPerPageLabel="Items per page:";nextPageLabel="Next page";previousPageLabel="Previous page";firstPageLabel="First page";lastPageLabel="Last page";getRangeLabel=(e,r,n)=>{if(n==0||r==0)return`0 of ${n}`;n=Math.max(n,0);let a=e*r,s=a{class t{_intl=Q(zw);_changeDetectorRef=Q(Ut);_formFieldAppearance;_pageSizeLabelId=Q(wi).getId("mat-paginator-page-size-label-");_intlChanges;_isInitialized=!1;_initializedStream=new wo(1);color;get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(e||0,0),this._changeDetectorRef.markForCheck()}_pageIndex=0;get length(){return this._length}set length(e){this._length=e||0,this._changeDetectorRef.markForCheck()}_length=0;get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(e||0,0),this._updateDisplayedPageSizeOptions()}_pageSize;get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(r=>Yi(r,0)),this._updateDisplayedPageSizeOptions()}_pageSizeOptions=[];hidePageSize=!1;showFirstLastButtons=!1;selectConfig={};disabled=!1;page=new Le;_displayedPageSizeOptions;initialized=this._initializedStream;constructor(){let e=this._intl,r=Q(P0e,{optional:!0});if(this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){let{pageSize:n,pageSizeOptions:a,hidePageSize:s,showFirstLastButtons:o}=r;n!=null&&(this._pageSize=n),a!=null&&(this._pageSizeOptions=a),s!=null&&(this.hidePageSize=s),o!=null&&(this.showFirstLastButtons=o)}this._formFieldAppearance=r?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){this.hasNextPage()&&this._navigate(this.pageIndex+1)}previousPage(){this.hasPreviousPage()&&this._navigate(this.pageIndex-1)}firstPage(){this.hasPreviousPage()&&this._navigate(0)}lastPage(){this.hasNextPage()&&this._navigate(this.getNumberOfPages()-1)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let e=this.getNumberOfPages()-1;return this.pageIndexe-r),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}_navigate(e){let r=this.pageIndex;e!==r&&(this.pageIndex=e,this._emitPageEvent(r))}_buttonClicked(e,r){r||this._navigate(e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",Yi],length:[2,"length","length",Yi],pageSize:[2,"pageSize","pageSize",Yi],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",$e],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",$e],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",$e]},outputs:{page:"page"},exportAs:["matPaginator"],features:[At],decls:14,vars:12,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","disabled"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","disabled"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","disabled"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","disabled"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","disabled"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","disabled"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(r,n){r&1&&(B(0,"div",1)(1,"div",2),de(2,E0e,5,4,"div",3),B(3,"div",4)(4,"div",5),Y(5),U(),de(6,D0e,3,4,"button",6),B(7,"button",7),ce("click",function(){return n._buttonClicked(n.pageIndex-1,n._previousButtonsDisabled())}),yr(),B(8,"svg",8),we(9,"path",9),U()(),sh(),B(10,"button",10),ce("click",function(){return n._buttonClicked(n.pageIndex+1,n._nextButtonsDisabled())}),yr(),B(11,"svg",8),we(12,"path",11),U()(),de(13,M0e,3,4,"button",12),U()()()),r&2&&(j(2),Qt(n.hidePageSize?-1:2),j(3),Qe(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),j(),Qt(n.showFirstLastButtons?6:-1),j(),ee("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("disabled",n._previousButtonsDisabled()),pt("aria-label",n._intl.previousPageLabel),j(3),ee("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("disabled",n._nextButtonsDisabled()),pt("aria-label",n._intl.nextPageLabel),j(3),Qt(n.showFirstLastButtons?13:-1))},dependencies:[Bn,Lo,is,ln,as],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height:var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding, 8px)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors: active){.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display, block);position:absolute;top:50%;left:50%;width:84px;height:48px;background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}"],encapsulation:2,changeDetection:0})}return t})(),FU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:[I0e],imports:[zm,pw,gw,xv]})}return t})();var Gw=(()=>{class t{constructor(e,r){this.http=e,this.fhirService=r}generateRootQuestionnaire(e,r){return Ve(this,null,function*(){try{let a=yield sn(this.http.get("assets/questionnaires/root-questionnaire-template.json"));a.title=e;let s=0,o=this.fhirService.getBaseUrl(),d=this.fhirService.getUserTag();return r.forEach(l=>{s++,l.url=o+"/Questionnaire/"+l.id,a.item.push({linkId:s.toString(),text:l.title,type:"group",required:!1,item:[{extension:[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire",valueCanonical:l.url}],linkId:s.toString()+".1",text:"Unable to resolve sub-questionnaire",type:"display"}]})}),a}catch(n){throw console.error("Error generating root questionnaire:",n),n}})}getRootQuestionnaireData(e){return Ve(this,null,function*(){if(!e||!Array.isArray(e.item))throw new Error("Invalid root questionnaire");let r=e.title,n=e.item.filter(s=>s.type==="group"&&s.item&&Array.isArray(s.item)).flatMap(s=>s.item).map(s=>Ve(this,null,function*(){let o=s.extension?.find(d=>d.url==="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire");if(o){let d=o.valueCanonical;return this.getQuestionnaireFromUrl(d)}return null})),a=(yield Promise.all(n)).filter(s=>s!==null);return{title:r,questionnaires:a}})}checkForAssembleRoot(e){return!e||!e.extension||!Array.isArray(e.extension)?!1:e.extension.some(r=>r.valueCode==="assemble-root")}assembleQuestionnaire(e){return Ve(this,null,function*(){if(e=JSON.parse(JSON.stringify(e)),!this.checkForAssembleRoot(e))return null;for(let r of e.item)if(r.type=="group"){r.extension=[];for(let n of r.item)if(n.extension&&Array.isArray(n.extension)){for(let a of n.extension)if(a.url==="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"){let s=yield this.getQuestionnaireFromUrl(a.valueCanonical);s&&(r.item=s.item),r.extension||(r.extension=[]),r.extension.push({url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",valueCanonical:a.valueCanonical})}}}return e.extension=e.extension.filter(r=>r.valueCode!=="assemble-root"),e})}disassembleQuestionnaire(e){return Ve(this,null,function*(){if(!e||!e.item||!Array.isArray(e.item))throw new Error("Invalid root questionnaire");let r=e.title,n=[];for(let a of e.item)if(a.type==="group"&&a.extension&&Array.isArray(a.extension)){let s=a.extension.find(o=>o.url==="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom");if(s){let o=s.valueCanonical,d=yield this.getQuestionnaireFromUrl(o);d&&n.push(d)}}return{title:r,questionnaires:n}})}getQuestionnaireFromUrl(e){return Ve(this,null,function*(){try{return yield sn(this.http.get(e))}catch(r){return console.error("Error fetching questionnaire:",r),null}})}static{this.\u0275fac=function(r){return new(r||t)(_t(nr),_t(Bo))}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var F0e=()=>[5,10,20],O0e=t=>["status-pill",t],L0e=()=>["status-pill","active"],N0e=()=>["status-pill","draft"];function B0e(t,i){t&1&&(B(0,"th",19),Y(1," Title "),U())}function V0e(t,i){if(t&1&&(B(0,"td",20),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.title," ")}}function U0e(t,i){t&1&&(B(0,"th",19),Y(1," Status "),U())}function z0e(t,i){if(t&1&&(B(0,"td",20)(1,"span",21),Y(2),qi(3,"uppercase"),U()()),t&2){let e=i.$implicit;j(),ee("ngClass",qr(4,O0e,e.status)),j(),ze(es(3,2,e.status))}}function G0e(t,i){t&1&&(B(0,"th",22),Y(1," Version "),U())}function H0e(t,i){if(t&1&&(B(0,"td",20),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.meta.versionId," ")}}function j0e(t,i){t&1&&(B(0,"th",19),Y(1," Last updated "),U())}function W0e(t,i){if(t&1&&(B(0,"td",20),Y(1),qi(2,"date"),U()),t&2){let e=i.$implicit;j(),Qe(" ",Hr(2,1,e.meta.lastUpdated,"MMMM d, y, h:mm:ss a")," ")}}function X0e(t,i){t&1&&(B(0,"th",19),Y(1," Type "),U())}function Y0e(t,i){t&1&&(B(0,"span",21),Y(1,"QUESTIONNAIRE"),U()),t&2&&ee("ngClass",Yn(1,L0e))}function $0e(t,i){t&1&&(B(0,"span",21),Y(1,"MODULAR ROOT"),U()),t&2&&ee("ngClass",Yn(1,N0e))}function Q0e(t,i){if(t&1&&(B(0,"td",20),de(1,Y0e,2,2,"span",23)(2,$0e,2,2,"span",23),U()),t&2){let e=i.$implicit,r=ne();j(),ee("ngIf",!r.isRootQuestionnaire(e)),j(),ee("ngIf",r.isRootQuestionnaire(e))}}function K0e(t,i){t&1&&(B(0,"th",22),Y(1," Actions "),U())}function Z0e(t,i){if(t&1){let e=Ce();B(0,"button",34),ce("click",function(){ue(e);let n=ne().$implicit,a=ne();return he(a.validate(n))}),B(1,"mat-icon"),Y(2,"done"),U()()}if(t&2){let e=ne().$implicit,r=ne();ee("disabled",r.isRootQuestionnaire(e))}}function J0e(t,i){if(t&1){let e=Ce();B(0,"button",35),ce("click",function(){ue(e);let n=ne().$implicit,a=ne();return he(a.assemble(n))}),B(1,"mat-icon"),Y(2,"build"),U()()}}function q0e(t,i){if(t&1){let e=Ce();B(0,"button",36),ce("click",function(){ue(e);let n=ne().$implicit,a=ne();return he(a.preview(n))}),B(1,"mat-icon"),Y(2,"visibility"),U()()}}function eve(t,i){if(t&1){let e=Ce();B(0,"button",37),ce("click",function(){ue(e);let n=ne().$implicit,a=ne();return he(a.openInNewTab(n))}),B(1,"mat-icon"),Y(2,"open_in_new"),U()()}}function tve(t,i){if(t&1){let e=Ce();B(0,"button",38),ce("click",function(){ue(e);let n=ne().$implicit,a=ne();return he(a.editQuestionnaire(n))}),B(1,"mat-icon"),Y(2,"edit"),U()()}}function ive(t,i){if(t&1){let e=Ce();B(0,"button",39),ce("click",function(){ue(e);let n=ne().$implicit,a=ne();return he(a.openModularQuestionnaireModal(n))}),B(1,"mat-icon"),Y(2,"edit"),U()()}}function nve(t,i){if(t&1){let e=Ce();B(0,"td",20),de(1,Z0e,3,1,"button",24)(2,J0e,3,0,"button",25)(3,q0e,3,0,"button",26)(4,eve,3,0,"button",27),B(5,"button",28),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.saveQuestionnaire(n))}),B(6,"mat-icon"),Y(7,"cloud_download"),U()(),de(8,tve,3,0,"button",29)(9,ive,3,0,"button",30),B(10,"button",31),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.viewHistory(n))}),B(11,"mat-icon"),Y(12,"history"),U()(),B(13,"span",32)(14,"button",33),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.deleteQuestionnaire(n))}),B(15,"mat-icon"),Y(16,"delete"),U()()()()}if(t&2){let e=i.$implicit,r=ne();j(),ee("ngIf",r.config.validate),j(),ee("ngIf",r.isRootQuestionnaire(e)),j(),ee("ngIf",r.config.preview&&!r.isRootQuestionnaire(e)),j(),ee("ngIf",r.config.preview),j(4),ee("ngIf",!r.isRootQuestionnaire(e)),j(),ee("ngIf",r.isRootQuestionnaire(e)),j(),ee("disabled",e.meta.versionId==1),j(3),io("matTooltip",r.getDeleteTooltip(e)),j(),ee("disabled",r.getReferencingQuestionnaires(e).length>0)}}function rve(t,i){t&1&&we(0,"tr",40)}function sve(t,i){t&1&&we(0,"tr",41)}function ave(t,i){t&1&&(B(0,"p",42)(1,"i"),Y(2," No questionnaires found. Upload your questionnaires to start. "),U()())}function ove(t,i){t&1&&we(0,"mat-spinner",43)}function lve(t,i){if(t&1){let e=Ce();B(0,"button",44),ce("click",function(){ue(e);let n=ne();return he(n.downloadAllQuestionnaires())}),Y(1," Download bundle "),U()}}var Hw=(()=>{class t{constructor(e,r,n,a){this.fhirService=e,this.questionnaireService=r,this.dialog=n,this._snackBar=a,this.questionnaireSelected=new Le,this.validateQuestionnaire=new Le,this.previewQuestionnaire=new Le,this.viewQuestionaireHistory=new Le,this.config={},this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new uo,this.questionnaires=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.notFound=!1,this.baseUrlChanged=new Oe,this.userTagChanged=new Oe,this.fbUrl="https://formbuilder.nlm.nih.gov",this.blankQuestionnaire={resourceType:"Questionnaire",title:"New Form",status:"draft",item:[{type:"string",linkId:"4009522077787",text:"Item 0"}]}}ngOnInit(){}ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=(e,r)=>{switch(r){case"type":return this.isRootQuestionnaire(e)?"Modular root":"Questionnaire";case"version":return e.meta&&e.meta.versionId?e.meta.versionId:"";case"lastUpdated":return e.meta&&e.meta.lastUpdated?new Date(e.meta.lastUpdated):"";default:return e[r]}},this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires(),Js([this.fhirService.baseUrl$.pipe(Tr(1e3),qs()),this.fhirService.userTag$.pipe(Tr(1e3),qs())]).subscribe(([e,r])=>{(this.selectedFhirServer!==e||this.selectedUserTag!==r)&&(this.selectedFhirServer=e,this.selectedUserTag=r,this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires())})}ngOnChanges(e){}loadQuestionnaires(){this.loading=!0,this.notFound=!1,this.questionnaires=[],this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(e=>{e.entry?(this.questionnaires=e.entry.map(r=>r.resource),this.dataSource.data=this.questionnaires,this.dataSource.sort=this.sort,this.loading=!1,this.sort.active="title",this.sort.direction="asc",this.sort.sortChange.emit()):(this.questionnaires=[],this.dataSource.data=this.questionnaires,this.loading=!1,this.notFound=!0)})}updateQuestionnairesList(e){let r=this.questionnaires.findIndex(n=>n.id===e.id);r!==-1?(this.questionnaires[r]=e,this.dataSource.data=this.questionnaires):(this.questionnaires.push(e),this.dataSource.data=this.questionnaires)}addQuestionnaire(e){this.updateQuestionnairesList(e)}deleteQuestionnaire(e){this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Deleting Questionnaire...",panelClass:["green-snackbar"]}),this.fhirService.deleteQuestionnaire(e.id).subscribe(()=>{this.questionnaires=this.questionnaires.filter(r=>r.id!==e.id),this.dataSource.data=this.questionnaires,this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Questionnaire deleted successfully",panelClass:["green-snackbar"]})})}selectQuestionnaire(e){this.questionnaireSelected.emit(e)}validate(e){this.validateQuestionnaire.emit(e)}viewHistory(e){this.viewQuestionaireHistory.emit(e)}preview(e){this.previewQuestionnaire.emit(e)}openInNewTab(e){let r=this.selectedFhirServer+"/Questionnaire/"+e.id;window.open(r,"_blank")}saveQuestionnaire(e){var r=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});(0,qI.saveAs)(r,`${e.title}-v${e.meta.versionId}.json`)}isRootQuestionnaire(e){return e.extension&&Array.isArray(e.extension)?e.extension.some(r=>r.url==="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"&&r.valueCode==="assemble-root"):!1}assemble(e){this._snackBar.openFromComponent(Bi,{duration:2*1e3,data:"Assembling Questionnaire...",panelClass:["green-snackbar"]}),this.questionnaireService.assembleQuestionnaire(e).then(r=>{r.title=e.title+" (assembled)",this.previewQuestionnaire.emit(r),this._snackBar.openFromComponent(Bi,{duration:2*1e3,data:"Questionnaire ready",panelClass:["green-snackbar"]})}).catch(r=>{console.error("Error assembling questionnaire:",r)})}createQuestionnaire(){let e=this.blankQuestionnaire;e.meta||(e.meta={}),e.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.editQuestionnaire(e)}editQuestionnaire(e){let r=window.open(this.fbUrl+"/window-open?referrer="+encodeURIComponent(window.location.href));window.addEventListener("message",a,!0);let n=this;function a(s){if(s.origin===n.fbUrl){let o=s.data.type,d=s.data.questionnaire;switch(o){case"initialized":r?.postMessage({type:"initialQuestionnaire",questionnaire:e},n.fbUrl);break;case"updateQuestionnaire":break;case"closed":n.fhirService.updateOrCreateQuestionnaire(d,n.selectedUserTag).pipe(Jr()).subscribe(l=>{n._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),n.updateQuestionnairesList(l)},l=>{n._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})});break}}}}openModularQuestionnaireModal(e){return Ve(this,null,function*(){let r=yield this.questionnaireService.getRootQuestionnaireData(e);this.dialog.open(Uw,{data:r,width:"75%"}).afterClosed().subscribe(a=>{a&&this.handleDialogResult(a,e)})})}handleDialogResult(e,r){return Ve(this,null,function*(){this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Updating questionnaire...",panelClass:["green-snackbar"]});try{let n=yield this.questionnaireService.generateRootQuestionnaire(e.title,e.questionnaires);n&&(r.title=e.title,r.item=n.item,this.addQuestionnaire(r),this.fhirService.updateOrCreateQuestionnaire(r,this.selectedUserTag).pipe(Jr()).subscribe(a=>{this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),this.updateQuestionnairesList(a)},a=>{this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})}))}catch(n){console.error("Error handling dialog result:",n)}})}downloadAllQuestionnaires(){this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Downloading Questionnaires...",panelClass:["green-snackbar"]}),this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(e=>{var r=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});(0,qI.saveAs)(r,"questionnaires-bundle.json"),this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Questionnaires downloaded successfully",panelClass:["green-snackbar"]})})}getReferencingQuestionnaires(e){let n=`${this.fhirService.getBaseUrl()}/Questionnaire/${e.id}`;return this.dataSource.data.filter(s=>s.item&&Array.isArray(s.item)&&s.item.some(o=>o.item&&Array.isArray(o.item)&&o.item.some(d=>d.extension&&Array.isArray(d.extension)&&d.extension.some(l=>l.url==="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"&&l.valueCanonical===n))))}getDeleteTooltip(e){let r=this.getReferencingQuestionnaires(e);return r.length===0?"Delete Questionnaire":`Cannot delete: Referenced by ${r.map(a=>`"${a.title}"`).join(", ")}`}static{this.\u0275fac=function(r){return new(r||t)(be(Bo),be(Gw),be(hl),be(oa))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-list-questionnaires"]],viewQuery:function(r,n){if(r&1&&(vt(xv,5),vt(ha,5)),r&2){let a;je(a=We())&&(n.paginator=a.first),je(a=We())&&(n.sort=a.first)}},inputs:{config:"config"},outputs:{questionnaireSelected:"questionnaireSelected",validateQuestionnaire:"validateQuestionnaire",previewQuestionnaire:"previewQuestionnaire",viewQuestionaireHistory:"viewQuestionaireHistory"},standalone:!1,features:[ei],decls:28,vars:9,consts:[["id","table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",1,"mat-elevation-z8",3,"pageSizeOptions","pageSize"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["id","outer-container"],[1,"download-button-container"],["mat-flat-button","","color","accent","matTooltip","Download all Questionnaires",3,"click",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],["mat-header-cell",""],[3,"ngClass",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Validate Questionnaire",3,"disabled","click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Assemble Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Preview Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Open resource in new tab",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Modular Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","View Questionnaire History",1,"action-button",3,"click","disabled"],[3,"matTooltip"],["mat-icon-button","","color","accent",3,"click","disabled"],["mat-icon-button","","color","accent","matTooltip","Validate Questionnaire",1,"action-button",3,"click","disabled"],["mat-icon-button","","color","accent","matTooltip","Assemble Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Modular Questionnaire",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"],["mat-flat-button","","color","accent","matTooltip","Download all Questionnaires",3,"click"]],template:function(r,n){r&1&&(B(0,"div",0)(1,"table",1),Gt(2,2),de(3,B0e,2,0,"th",3)(4,V0e,2,1,"td",4),Ht(),Gt(5,5),de(6,U0e,2,0,"th",3)(7,z0e,4,6,"td",4),Ht(),Gt(8,6),de(9,G0e,2,0,"th",7)(10,H0e,2,1,"td",4),Ht(),Gt(11,8),de(12,j0e,2,0,"th",3)(13,W0e,3,4,"td",4),Ht(),Gt(14,9),de(15,X0e,2,0,"th",3)(16,Q0e,3,2,"td",4),Ht(),Gt(17,10),de(18,K0e,2,0,"th",7)(19,nve,17,9,"td",4),Ht(),de(20,rve,1,0,"tr",11)(21,sve,1,0,"tr",12),U(),we(22,"mat-paginator",13),de(23,ave,3,0,"p",14)(24,ove,1,0,"mat-spinner",15),U(),B(25,"div",16)(26,"div",17),de(27,lve,2,0,"button",18),U()()),r&2&&(j(),ee("dataSource",n.dataSource),j(19),ee("matHeaderRowDef",n.displayedColumns),j(),ee("matRowDefColumns",n.displayedColumns),j(),ee("pageSizeOptions",Yn(8,F0e))("pageSize",10),j(),ee("ngIf",n.notFound&&!n.questionnaires.length),j(),ee("ngIf",n.loading),j(3),ee("ngIf",!n.loading&&n.questionnaires.length>0))},dependencies:[Ea,oi,di,ln,Pi,Ls,Ra,ka,Na,Fa,Pa,Ba,Oa,La,Va,Ua,as,ha,tp,xv,Fb,Fs],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}#table-container[_ngcontent-%COMP%]{padding-bottom:2rem}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:2rem}"]})}}return t})();var NU=(()=>{class t{constructor(e){this.dialogRef=e,this.listConfig={select:!0}}selectAndDownload(e){this.dialogRef.close(e)}static{this.\u0275fac=function(r){return new(r||t)(be(ua))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-load-questionnaire-modal"]],standalone:!1,decls:7,vars:1,consts:[[3,"questionnaireSelected","config"],["align","end"],["mat-flat-button","","color","accent","mat-dialog-close",""]],template:function(r,n){r&1&&(B(0,"mat-dialog-content")(1,"h2"),Y(2,"Available Questionnaires"),U(),B(3,"app-list-questionnaires",0),ce("questionnaireSelected",function(s){return n.selectAndDownload(s)}),U()(),B(4,"mat-dialog-actions",1)(5,"button",2),Y(6,"Close"),U()()),r&2&&(j(3),ee("config",n.listConfig))},dependencies:[di,Yl,qd,Jd,Hw],encapsulation:2})}}return t})();var cve=["settingsForm"];function dve(t,i){t&1&&(B(0,"mat-error"),Y(1,"Base URL is required"),U())}function uve(t,i){t&1&&(B(0,"mat-error"),Y(1,"User Tag is required and must be at least 3 characters"),U())}var jw=(()=>{class t{constructor(e,r){this.fhirService=e,this.dialogRef=r,this.baseUrl="",this.userTag=""}ngAfterViewInit(){this.triggerValidation()}triggerValidation(){Object.keys(this.settingsForm.controls).forEach(e=>{let r=this.settingsForm.control.get(e);r?.markAsTouched({onlySelf:!0}),r?.markAsDirty({onlySelf:!0})})}ngOnInit(){this.baseUrl=this.fhirService.getBaseUrl(),this.userTag=this.fhirService.getUserTag()}updateSettings(){this.settingsForm.valid&&(this.fhirService.setBaseUrl(this.baseUrl),this.fhirService.setUserTag(this.userTag),this.dialogRef.close("save"))}static{this.\u0275fac=function(r){return new(r||t)(be(Bo),be(ua))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-fhir-server-settings-modal"]],viewQuery:function(r,n){if(r&1&&vt(cve,5),r&2){let a;je(a=We())&&(n.settingsForm=a.first)}},standalone:!1,decls:29,vars:5,consts:[["settingsForm","ngForm"],["baseUrlField","ngModel"],["userTagField","ngModel"],[1,"form-container"],[1,"warning"],[3,"ngSubmit"],["matInput","","name","baseUrl","required","",3,"ngModelChange","ngModel"],[4,"ngIf"],["matInput","","name","userTag","required","","minlength","3",3,"ngModelChange","ngModel"],[1,"button-container"],["mat-flat-button","","color","accent","type","submit",3,"disabled"],["mat-flat-button","","color","primary","mat-dialog-close",""]],template:function(r,n){if(r&1){let a=Ce();B(0,"div",3)(1,"h2"),Y(2,"FHIR Server Connection"),U(),B(3,"p"),Y(4,"Manager mode allows you to store questionnares in a FHIR Server. Enter the FHIR server URL and your "),B(5,"b"),Y(6,"User Tag"),U(),Y(7,", this value will be used to identify your questionnaires."),U(),B(8,"p",4),Y(9,"Warning: using the default public FHIR server will not ensure the persistence of your information, always save your questionnaires to your computer as a backup."),U(),B(10,"form",5,0),ce("ngSubmit",function(){return ue(a),he(n.updateSettings())}),B(12,"mat-form-field")(13,"mat-label"),Y(14,"Base URL of the FHIR Server"),U(),B(15,"input",6,1),On("ngModelChange",function(o){return ue(a),Xn(n.baseUrl,o)||(n.baseUrl=o),he(o)}),U(),de(17,dve,2,0,"mat-error",7),U(),B(18,"mat-form-field")(19,"mat-label"),Y(20,"User Tag"),U(),B(21,"input",8,2),On("ngModelChange",function(o){return ue(a),Xn(n.userTag,o)||(n.userTag=o),he(o)}),U(),de(23,uve,2,0,"mat-error",7),U(),B(24,"div",9)(25,"button",10),Y(26,"Open FHIR Repository"),U(),B(27,"button",11),Y(28,"Close"),U()()()()}if(r&2){let a=Pt(11),s=Pt(16),o=Pt(22);j(15),Fn("ngModel",n.baseUrl),j(2),ee("ngIf",s.invalid&&s.touched),j(4),Fn("ngModel",n.userTag),j(2),ee("ngIf",o.invalid&&o.touched),j(2),ee("disabled",!a.valid)}},dependencies:[oi,di,Bn,Nn,hw,ss,Xl,hr,xn,ko,gI,vI,wr,jc,Yl],styles:[".form-container[_ngcontent-%COMP%]{margin:auto;padding:20px}mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.warning[_ngcontent-%COMP%]{color:#ff9500;font-weight:lighter;font-style:italic}"]})}}return t})();var Ww=(()=>{class t{constructor(e,r){this.data=e,this.dialogRef=r}static{this.\u0275fac=function(r){return new(r||t)(be(Mh),be(ua))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-confirmation-dialog"]],standalone:!1,decls:10,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","",1,"button-container"],["mat-button","",3,"mat-dialog-close"]],template:function(r,n){r&1&&(B(0,"h1",0),Y(1),U(),B(2,"div",1)(3,"p"),Y(4),U()(),B(5,"div",2)(6,"button",3),Y(7,"Yes"),U(),B(8,"button",3),Y(9,"No"),U()()),r&2&&(j(),ze(n.data.title),j(3),ze(n.data.message),j(2),ee("mat-dialog-close",!0),j(2),ee("mat-dialog-close",!1))},dependencies:[di,Yl,Aw,qd,Jd],encapsulation:2})}}return t})();function hve(t,i){t&1&&we(0,"div",2)}var fve=new Se("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");var np=(()=>{class t{_elementRef=Q(Ze);_ngZone=Q(dt);_changeDetectorRef=Q(Ut);_renderer=Q(Ai);_cleanupTransitionEnd;_animationMode=Q(Mi,{optional:!0});constructor(){let e=Q(fve,{optional:!0});this._isNoopAnimation=this._animationMode==="NoopAnimations",e&&(e.color&&(this.color=this._defaultColor=e.color),this.mode=e.mode||this.mode)}_isNoopAnimation=!1;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";get value(){return this._value}set value(e){this._value=BU(e||0),this._changeDetectorRef.markForCheck()}_value=0;get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=BU(e||0),this._changeDetectorRef.markForCheck()}_bufferValue=0;animationEnd=new Le;get mode(){return this._mode}set mode(e){this._mode=e,this._changeDetectorRef.markForCheck()}_mode="determinate";ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._cleanupTransitionEnd=this._renderer.listen(this._elementRef.nativeElement,"transitionend",this._transitionendHandler)})}ngOnDestroy(){this._cleanupTransitionEnd?.()}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${this.mode==="buffer"?this.bufferValue:100}%`}_isIndeterminate(){return this.mode==="indeterminate"||this.mode==="query"}_transitionendHandler=e=>{this.animationEnd.observers.length===0||!e.target||!e.target.classList.contains("mdc-linear-progress__primary-bar")||(this.mode==="determinate"||this.mode==="buffer")&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))};static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(r,n){r&2&&(pt("aria-valuenow",n._isIndeterminate()?null:n.value)("mode",n.mode),Tn("mat-"+n.color),ut("_mat-animation-noopable",n._isNoopAnimation)("mdc-linear-progress--animation-ready",!n._isNoopAnimation)("mdc-linear-progress--indeterminate",n._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",Yi],bufferValue:[2,"bufferValue","bufferValue",Yi],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],features:[At],decls:7,vars:5,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(r,n){r&1&&(B(0,"div",0),we(1,"div",1),de(2,hve,1,0,"div",2),U(),B(3,"div",3),we(4,"span",4),U(),B(5,"div",5),we(6,"span",4),U()),r&2&&(j(),gn("flex-basis",n._getBufferBarFlexBasis()),j(),Qt(n.mode==="buffer"?2:-1),j(),gn("transform",n._getPrimaryBarTransform()))},styles:[`.mat-mdc-progress-bar{display:block;text-align:start}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:max(var(--mdc-linear-progress-track-height, 4px),var(--mdc-linear-progress-active-indicator-height, 4px))}@media(forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:var(--mdc-linear-progress-active-indicator-height, 4px)}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}[dir=rtl] .mdc-linear-progress__bar{right:0;transform-origin:center right}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid;border-color:var(--mdc-linear-progress-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mdc-linear-progress-active-indicator-height, 4px)}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden;height:var(--mdc-linear-progress-track-height, 4px);border-radius:var(--mdc-linear-progress-track-shape, var(--mat-sys-corner-none))}.mdc-linear-progress__buffer-dots{-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");background-repeat:repeat-x;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering 250ms infinite linear;background-color:var(--mdc-linear-progress-track-color, var(--mat-sys-surface-variant))}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}[dir=rtl] .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);background-color:var(--mdc-linear-progress-track-color, var(--mat-sys-surface-variant))}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mdc-linear-progress-track-height, 4px) * -2.5))}}@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(-83.67142%)}100%{transform:translateX(-200.611057%)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(-37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(-84.386165%)}100%{transform:translateX(-160.277782%)}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}`],encapsulation:2,changeDetection:0})}return t})();function BU(t,i=0,e=100){return Math.max(i,Math.min(e,t))}var VU=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct]})}return t})();var mve=["questionnairesList"];function pve(t,i){if(t&1&&(B(0,"div",19),we(1,"mat-progress-bar",20),B(2,"div",21),Y(3),U()()),t&2){let e=ne();j(),ee("value",e.validatingProgress),j(2),Qe("",e.validatingProgress,"%")}}function gve(t,i){if(t&1){let e=Ce();B(0,"button",22),ce("click",function(){ue(e);let n=ne();return he(n.saveQuestionnaire())}),Y(1," Save changes "),U()}if(t&2){let e=ne();ee("disabled",e.validating||!e.questionnaire)}}function vve(t,i){t&1&&(B(0,"span"),Y(1,"Run validation"),U())}function yve(t,i){t&1&&we(0,"mat-spinner",26)}function xve(t,i){if(t&1){let e=Ce();B(0,"button",23),ce("click",function(){ue(e);let n=ne();return he(n.validate())}),de(1,vve,2,0,"span",24)(2,yve,1,0,"mat-spinner",25),U()}if(t&2){let e=ne();j(),ee("ngIf",!e.validating),j(),ee("ngIf",e.validating)}}function bve(t,i){if(t&1&&(B(0,"span",32),Y(1),U()),t&2){let e=ne(2);j(),Qe("Error: ",e.loadResults.error,"")}}function _ve(t,i){if(t&1&&(B(0,"span",33),Y(1),U()),t&2){let e=ne(2);j(),Qe("Inactive: ",e.loadResults.inactive,"")}}function wve(t,i){if(t&1&&(B(0,"span",34),Y(1),U()),t&2){let e=ne(2);j(),Qe("Active: ",e.loadResults.active,"")}}function Cve(t,i){if(t&1&&(B(0,"p",27)(1,"b"),Y(2,"Questionnaire:"),U(),Y(3),B(4,"i"),Y(5),U(),Y(6,") - "),B(7,"span",28),Y(8),U(),Y(9),qi(10,"date"),de(11,bve,2,1,"span",29)(12,_ve,2,1,"span",30)(13,wve,2,1,"span",31),U()),t&2){let e=ne();j(3),Qe(" ",e.questionnaire.title," ("),j(2),ze(e.questionnaire.url),j(3),Qe("",e.dataSource.data.length," bindings"),j(),Gr(" - - Version: ",e.questionnaire.meta.versionId," (",Hr(10,8,e.questionnaire.meta.lastUpdated,"fullDate"),") "),j(2),ee("ngIf",e.loadResults.total>0),j(),ee("ngIf",e.loadResults.total>0),j(),ee("ngIf",e.loadResults.total>0)}}function Tve(t,i){t&1&&(B(0,"th",35),Y(1," # "),U())}function Sve(t,i){if(t&1&&(B(0,"td",36),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.order," ")}}function Eve(t,i){t&1&&(B(0,"th",35),Y(1," FHIRPath "),U())}function Dve(t,i){if(t&1&&(B(0,"td",36),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.path," ")}}function Mve(t,i){t&1&&(B(0,"th",35),Y(1," Path "),U())}function Ave(t,i){if(t&1&&(B(0,"td",36),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.readablePath," ")}}function Ive(t,i){t&1&&(B(0,"th",35),Y(1,"Code "),U())}function Rve(t,i){if(t&1&&(B(0,"td",36)(1,"a",37),Y(2),U()()),t&2){let e=i.$implicit;j(),mb("href","http://snomed.info/id/",e.code,"",lh),j(),ze(e.code)}}function Pve(t,i){t&1&&(B(0,"th",35),Y(1," Display "),U())}function kve(t,i){if(t&1&&(B(0,"p",41),Y(1),U()),t&2){let e=ne().$implicit;j(),Qe("Concept FSN: ",e.serverDisplay,"")}}function Fve(t,i){t&1&&(B(0,"p",42),Y(1,"Concept is inactive"),U())}function Ove(t,i){if(t&1){let e=Ce();B(0,"p",43),Y(1),B(2,"button",44),ce("click",function(){let n=ue(e).$implicit,a=ne().$implicit,s=ne();return he(s.replaceInactiveConcept(a,n.replacement))}),B(3,"mat-icon"),Y(4,"arrow_forward"),U()()()}if(t&2){let e=i.$implicit,r=ne(2);j(),ch(" Replacement: ",e.equivalence," to ",e.replacement.code," |",e.replacement.display,"| "),j(),ee("disabled",r.validating)}}function Lve(t,i){if(t&1&&(B(0,"td",36),Y(1),de(2,kve,2,1,"p",38)(3,Fve,2,0,"p",39)(4,Ove,5,4,"p",40),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.display," "),j(),ee("ngIf",e.serverDisplay),j(),ee("ngIf",e.status=="Inactive"),j(),ee("ngForOf",e.replacements)}}function Nve(t,i){t&1&&(B(0,"th",35),Y(1," System "),U())}function Bve(t,i){if(t&1&&(B(0,"td",36),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.system," ")}}function Vve(t,i){t&1&&(B(0,"th",35),Y(1," Status "),U())}function Uve(t,i){t&1&&(B(0,"span"),we(1,"mat-progress-bar",45),U())}function zve(t,i){if(t&1&&(B(0,"span")(1,"span",46),Y(2),U()()),t&2){let e=ne().$implicit;j(),ee("ngClass",e.status),j(),ze(e.status)}}function Gve(t,i){if(t&1&&(B(0,"td",36),de(1,Uve,2,0,"span",24)(2,zve,3,2,"span",24),U()),t&2){let e=i.$implicit;j(),ee("ngIf",e.status=="Validating"),j(),ee("ngIf",e.status!="Validating")}}function Hve(t,i){t&1&&we(0,"tr",47)}function jve(t,i){t&1&&we(0,"tr",48)}function Wve(t,i){t&1&&we(0,"mat-spinner",49)}var UU=(()=>{class t{constructor(e,r){this.terminologyService=e,this._snackBar=r,this.questionnaireUpdated=new Le,this.validatingQuestionnaire=new Le,this.loading=!1,this.validating=!1,this.displayedColumns=["order","readablePath","code","display","system","status"],this.dataSource=new uo,this.validatingProgress=0,this.orderCounter=0,this.loadResults={total:0,active:0,inactive:0,error:0},this.requiresSave=!1}ngOnChanges(e){e.questionnaire&&(this.questionnaire?this.loadQuestionnaire(this.questionnaire):this.clearQuestionnaire())}clearQuestionnaire(){this.questionnaire=null,this.dataSource.data=[],this.orderCounter=0,this.validatingProgress=0,this.loadResults={total:0,active:0,inactive:0,error:0}}loadQuestionnaire(e){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=e;let r=this.extractObjects(e);this.dataSource.data=r,this.dataSource.sort=this.sort},700)}validate(){this.loadResults={total:0,active:0,inactive:0,error:0},this.dataSource.data.forEach(n=>{n.status="Not checked"}),this.validating=!0,this.validatingQuestionnaire.emit(!0);let e=this.dataSource.data.length,r=0;this.asyncForEach(this.dataSource.data,n=>Ve(this,null,function*(){this.loadResults.total++,n.status="Validating",r++,this.validatingProgress=Math.round(r/e*100);try{let a=yield this.terminologyService.lookupConcept(n.code,n.system).pipe(Jr()).toPromise(),s=[],o="";for(let d of a.parameter){if(d.name==="designation"){let l="",c="";for(let h of d.part)h.name==="value"&&(l=h.valueString),h.name==="use"&&(c=h.valueCoding?.code);s.push(l),c==="900000000000003001"&&(o=l)}d.name==="inactive"&&(d.valueBoolean?(n.status="Inactive",this.loadResults.inactive++):(n.status="Active",this.loadResults.active++))}if((!n.display||!s.includes(n.display))&&(n.serverDisplay=o),n.status=="Inactive"){let d=yield this.getHistoricalAssociationsTarget("900000000000527005",n.code),l=yield this.getHistoricalAssociationsTarget("900000000000530003",n.code),c=yield this.getHistoricalAssociationsTarget("900000000000523009",n.code),h=yield this.getHistoricalAssociationsTarget("900000000000526001",n.code),u=d.concat(l,c,h);n.replacements=u}}catch{n.status="Error",this.loadResults.error++}})).then(()=>{this.validating=!1,this.validatingQuestionnaire.emit(!1)})}getHistoricalAssociationsTarget(e,r){return Ve(this,null,function*(){let n=[],a=this.terminologyService.translate(e,r),s=yield sn(a.pipe(mt(o=>o)));if(s.parameter){for(let o of s.parameter)if(o.name==="match"){let d={replacement:{},equivalence:""};for(let l of o.part)l.name==="concept"&&l.valueCoding&&(d.replacement={code:l.valueCoding.code,display:l.valueCoding.display,system:l.valueCoding.system}),l.name==="equivalence"&&l.valueCode&&(d.equivalence=l.valueCode);n.push(d)}}return n})}removeSemanticTag(e){return e.replace(/\s*\([^)]+\)\s*$/,"").trim().toLowerCase()}asyncForEach(e,r){return Ve(this,null,function*(){for(let n=0;n ${e.text}`:e.text),e.system&&e.system.startsWith("http://snomed.info/sct")&&e.code&&e.display){this.orderCounter++;let s={order:this.orderCounter,system:e.system,code:e.code,display:e.display,path:r,readablePath:n,status:"Not checked"};a.some(o=>o.system===s.system&&o.code===s.code&&o.display===s.display)||a.push(s)}if(Array.isArray(e))for(let s in e){let o=`${r}[${s}]`;a=a.concat(this.extractObjects(e[s],o,n))}else for(let s in e)if(e.hasOwnProperty(s)){let o=r?`${r}.${s}`:s;a=a.concat(this.extractObjects(e[s],o,n))}if(e.answerValueSet&&e.answerValueSet.startsWith("http")){let o=new URL(e.answerValueSet).searchParams.get("fhir_vs");if(o){let d=decodeURIComponent(o),l=/(\d{5,})(?:\s*\|\s*([^|]*)\s*\|)?/g,c;for(;(c=l.exec(d))!==null;)this.orderCounter++,a.push({order:this.orderCounter,code:c[1],display:c[2]?c[2].trim():void 0,system:"http://snomed.info/sct",path:r+".answerValueSet",readablePath:n+" -> answerValueSet [ECL]",status:"Not checked"})}}return a}replaceInactiveConcept(e,r){this.searchAndReplace(this.questionnaire,e,r,!1)&&(this.requiresSave=!0,this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Inactive reference replaced successfully. Save the questionnaire to persist the changes.",panelClass:["green-snackbar"]}))}saveQuestionnaire(){this.questionnaireUpdated.emit(this.questionnaire)}searchAndReplace(e,r,n,a){if(typeof e!="object"||e===null)return a;if(e.system==r.system&&e.code==r.code&&e.display==r.display&&(e.system=n.system,e.code=n.code,e.display=n.display,a=!0),e.answerValueSet){let s=new URL(e.answerValueSet),o=s.searchParams.get("fhir_vs");if(o){let d=decodeURIComponent(o),l=new RegExp(`(\\s|^)${r.code}(\\s|$|\\|)`,"g");if(l.test(d)){let c=d.replace(l,`$1${n.code}$2`);a=!0;let h=new RegExp(`\\|\\s*${r.display}\\s*\\|`,"g");if(h.test(c)){let u=c.replace(h,`| ${n.display} |`);s.searchParams.set("fhir_vs",encodeURIComponent(u)),e.answerValueSet=s.toString()}s.searchParams.set("fhir_vs",encodeURIComponent(c)),e.answerValueSet=s.toString()}}}if(Array.isArray(e))for(let s in e)a=this.searchAndReplace(e[s],r,n,a);else for(let s in e)e.hasOwnProperty(s)&&(a=this.searchAndReplace(e[s],r,n,a));if(a&&this.dataSource.data)for(let s in this.dataSource.data)this.dataSource.data[s].system==r.system&&this.dataSource.data[s].code==r.code&&this.dataSource.data[s].display==r.display&&(this.dataSource.data[s].system=n.system,this.dataSource.data[s].code=n.code,this.dataSource.data[s].display=n.display,this.dataSource.data[s].status="Active",this.dataSource.data[s].replacements=[]);return a}static{this.\u0275fac=function(r){return new(r||t)(be(Ri),be(oa))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-validate-questionnaire"]],viewQuery:function(r,n){if(r&1&&(vt(ha,5),vt(Ga,5),vt(mve,5)),r&2){let a;je(a=We())&&(n.sort=a.first),je(a=We())&&(n.tabGroup=a.first),je(a=We())&&(n.questionnairesList=a.first)}},inputs:{questionnaire:"questionnaire"},outputs:{questionnaireUpdated:"questionnaireUpdated",validatingQuestionnaire:"validatingQuestionnaire"},standalone:!1,features:[ei],decls:31,vars:8,consts:[[1,"button-container","bottom-spacer"],["class","progress-container",4,"ngIf"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["class","header","id","tab-header",4,"ngIf"],[1,"table-container","mt-4"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","order"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","path"],["matColumnDef","readablePath"],["matColumnDef","code"],["matColumnDef","display"],["matColumnDef","system"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"progress-container"],["mode","determinate",3,"value"],[1,"progress-label"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-flat-button","","color","accent",3,"click"],[4,"ngIf"],["diameter","20",4,"ngIf"],["diameter","20"],["id","tab-header",1,"header"],[1,"bindingsCount"],["class","mini-pill Error",4,"ngIf"],["class","mini-pill Inactive",4,"ngIf"],["class","mini-pill Active",4,"ngIf"],[1,"mini-pill","Error"],[1,"mini-pill","Inactive"],[1,"mini-pill","Active"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["target","_blank",1,"code-link",3,"href"],["class","server-name",4,"ngIf"],["class","concept-is-inactive",4,"ngIf"],["class","replacement",4,"ngFor","ngForOf"],[1,"server-name"],[1,"concept-is-inactive"],[1,"replacement"],["mat-icon-button","","color","primary","matTooltip","Replace using this concept",3,"click","disabled"],["mode","indeterminate"],[1,"pill",3,"ngClass"],["mat-header-row",""],["mat-row",""],["diameter","35",1,"loading-spinner"]],template:function(r,n){r&1&&(B(0,"div",0),de(1,pve,4,2,"div",1)(2,gve,2,1,"button",2)(3,xve,3,2,"button",3),U(),de(4,Cve,14,11,"p",4),B(5,"div",5)(6,"table",6),Gt(7,7),de(8,Tve,2,0,"th",8)(9,Sve,2,1,"td",9),Ht(),Gt(10,10),de(11,Eve,2,0,"th",8)(12,Dve,2,1,"td",9),Ht(),Gt(13,11),de(14,Mve,2,0,"th",8)(15,Ave,2,1,"td",9),Ht(),Gt(16,12),de(17,Ive,2,0,"th",8)(18,Rve,3,3,"td",9),Ht(),Gt(19,13),de(20,Pve,2,0,"th",8)(21,Lve,5,4,"td",9),Ht(),Gt(22,14),de(23,Nve,2,0,"th",8)(24,Bve,2,1,"td",9),Ht(),Gt(25,15),de(26,Vve,2,0,"th",8)(27,Gve,3,2,"td",9),Ht(),de(28,Hve,1,0,"tr",16)(29,jve,1,0,"tr",17),U(),de(30,Wve,1,0,"mat-spinner",18),U()),r&2&&(j(),ee("ngIf",n.validating),j(),ee("ngIf",n.requiresSave),j(),ee("ngIf",!n.validating&&n.questionnaire),j(),ee("ngIf",n.questionnaire),j(2),ee("dataSource",n.dataSource),j(22),ee("matHeaderRowDef",n.displayedColumns),j(),ee("matRowDefColumns",n.displayedColumns),j(),ee("ngIf",n.loading))},dependencies:[Ea,ci,oi,di,ln,Pi,np,Ls,Ra,ka,Na,Fa,Pa,Ba,Oa,La,Va,Ua,as,ha,tp,Fs],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem;padding-bottom:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}"]})}}return t})();var zU=Ka(Qd());var Yve=t=>["status-pill",t],$ve=()=>["status-pill","active"],Qve=()=>["status-pill","draft"];function Kve(t,i){t&1&&(B(0,"th",15),Y(1," Title "),U())}function Zve(t,i){if(t&1&&(B(0,"td",16),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.title," ")}}function Jve(t,i){t&1&&(B(0,"th",15),Y(1," Status "),U())}function qve(t,i){if(t&1&&(B(0,"td",16)(1,"span",17),Y(2),qi(3,"uppercase"),U()()),t&2){let e=i.$implicit;j(),ee("ngClass",qr(4,Yve,e.status)),j(),ze(es(3,2,e.status))}}function eye(t,i){t&1&&(B(0,"th",15),Y(1," Version "),U())}function tye(t,i){if(t&1&&(B(0,"td",16),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.meta.versionId," ")}}function iye(t,i){t&1&&(B(0,"th",15),Y(1," Date "),U())}function nye(t,i){if(t&1&&(B(0,"td",16)(1,"i"),Y(2),qi(3,"date"),U()()),t&2){let e=i.$implicit;j(2),ze(Hr(3,1,e.meta.lastUpdated,"MMMM d, y, h:mm:ss a"))}}function rye(t,i){t&1&&(B(0,"th",15),Y(1," Type "),U())}function sye(t,i){t&1&&(B(0,"span",17),Y(1,"QUESTIONNAIRE"),U()),t&2&&ee("ngClass",Yn(1,$ve))}function aye(t,i){t&1&&(B(0,"span",17),Y(1,"MODULAR ROOT"),U()),t&2&&ee("ngClass",Yn(1,Qve))}function oye(t,i){if(t&1&&(B(0,"td",16),de(1,sye,2,2,"span",18)(2,aye,2,2,"span",18),U()),t&2){let e=i.$implicit,r=ne();j(),ee("ngIf",!r.isRootQuestionnaire(e)),j(),ee("ngIf",r.isRootQuestionnaire(e))}}function lye(t,i){t&1&&(B(0,"th",19),Y(1," Actions "),U())}function cye(t,i){if(t&1){let e=Ce();B(0,"button",24),ce("click",function(){ue(e);let n=ne().$implicit,a=ne();return he(a.restore(n))}),B(1,"mat-icon"),Y(2,"restore_page"),U()()}}function dye(t,i){if(t&1){let e=Ce();B(0,"td",16)(1,"button",20),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.preview(n))}),B(2,"mat-icon"),Y(3,"visibility"),U()(),B(4,"button",21),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.openInNewTab(n))}),B(5,"mat-icon"),Y(6,"open_in_new"),U()(),B(7,"button",22),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.saveQuestionnaire(n))}),B(8,"mat-icon"),Y(9,"cloud_download"),U()(),de(10,cye,3,0,"button",23),U()}if(t&2){let e=i.$implicit,r=ne();j(10),ee("ngIf",(e==null||e.meta==null?null:e.meta.versionId)!=(r.versions[0]==null||r.versions[0].meta==null?null:r.versions[0].meta.versionId))}}function uye(t,i){t&1&&we(0,"tr",25)}function hye(t,i){t&1&&we(0,"tr",26)}function fye(t,i){t&1&&(B(0,"p",27)(1,"i"),Y(2," No questionnaire selected. "),U()())}function mye(t,i){t&1&&we(0,"mat-spinner",28)}var GU=(()=>{class t{constructor(e){this.fhirService=e,this.previewQuestionnaire=new Le,this.restoreQuestionnaireVersion=new Le,this.versions=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new uo}ngOnChanges(e){e.questionnaire&&e.questionnaire.currentValue&&e.questionnaire.currentValue.id&&this.loadVersions()}ngOnInit(){Js([this.fhirService.baseUrl$.pipe(Tr(1e3),qs()),this.fhirService.userTag$.pipe(Tr(1e3),qs())]).subscribe(([e,r])=>{(this.selectedFhirServer!==e||this.selectedUserTag!==r)&&(this.selectedFhirServer=e,this.selectedUserTag=r,this.selectedUserTag&&this.selectedFhirServer&&this.loadVersions())})}loadVersions(e){this.versions=[],this.dataSource.data=this.versions,e&&(this.questionnaire=e),this.questionnaire&&(this.loading=!0,this.fhirService.getQuestionnaireHistory(this.questionnaire.id).subscribe(r=>{this.versions=r.entry.map(n=>n.resource),this.dataSource.data=this.versions,this.loading=!1},r=>{this.loading=!1}))}preview(e){this.previewQuestionnaire.emit(e),this.loadVersions()}openInNewTab(e){let r=this.selectedFhirServer+"/Questionnaire/"+e.id+"/_history/"+e.meta.versionId;window.open(r,"_blank")}saveQuestionnaire(e){var r=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});(0,zU.saveAs)(r,`${e.title}-v${e.meta.versionId}.json`)}restore(e){this.restoreQuestionnaireVersion.emit(e)}isRootQuestionnaire(e){return e.extension&&Array.isArray(e.extension)?e.extension.some(r=>r.url==="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"&&r.valueCode==="assemble-root"):!1}static{this.\u0275fac=function(r){return new(r||t)(be(Bo))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-questionnaire-history"]],inputs:{questionnaire:"questionnaire"},outputs:{previewQuestionnaire:"previewQuestionnaire",restoreQuestionnaireVersion:"restoreQuestionnaireVersion"},standalone:!1,features:[ei],decls:24,vars:5,consts:[[1,"table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],[3,"ngClass",4,"ngIf"],["mat-header-cell",""],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Restore Version",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Restore Version",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"]],template:function(r,n){r&1&&(B(0,"div",0)(1,"table",1),Gt(2,2),de(3,Kve,2,0,"th",3)(4,Zve,2,1,"td",4),Ht(),Gt(5,5),de(6,Jve,2,0,"th",3)(7,qve,4,6,"td",4),Ht(),Gt(8,6),de(9,eye,2,0,"th",3)(10,tye,2,1,"td",4),Ht(),Gt(11,7),de(12,iye,2,0,"th",3)(13,nye,4,4,"td",4),Ht(),Gt(14,8),de(15,rye,2,0,"th",3)(16,oye,3,2,"td",4),Ht(),Gt(17,9),de(18,lye,2,0,"th",10)(19,dye,11,1,"td",4),Ht(),de(20,uye,1,0,"tr",11)(21,hye,1,0,"tr",12),U(),de(22,fye,3,0,"p",13)(23,mye,1,0,"mat-spinner",14),U()),r&2&&(j(),ee("dataSource",n.dataSource),j(19),ee("matHeaderRowDef",n.displayedColumns),j(),ee("matRowDefColumns",n.displayedColumns),j(),ee("ngIf",!n.questionnaire),j(),ee("ngIf",n.loading))},dependencies:[Ea,oi,ln,Pi,Ls,Ra,ka,Na,Fa,Pa,Ba,Oa,La,Va,Ua,as,ha,tp,Fb,Fs],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px}.table-container[_ngcontent-%COMP%]{margin:2rem;padding-bottom:2rem}"]})}}return t})();var gye=["questionnairesList"],vye=["fileInput"],yye=["questionnaireHistory"];function xye(t,i){t&1&&(B(0,"span"),Y(1," / Validator"),U())}function bye(t,i){t&1&&(B(0,"span"),Y(1," / Questionnaires repository"),U())}function _ye(t,i){if(t&1){let e=Ce();B(0,"span",19)(1,"a",20),ce("click",function(){ue(e);let n=ne(3);return he(n.mode="Manager")}),B(2,"mat-icon"),Y(3,"play_arrow"),U(),B(4,"span"),Y(5,"Reconnect to last FHIR Server"),U()()()}}function wye(t,i){if(t&1&&(B(0,"span",19)(1,"span",21),Y(2),B(3,"i"),Y(4),U(),Y(5,'" )'),U()()),t&2){let e=ne(3);j(2),Qe(" ( ",e.selectedFhirServer,' as "'),j(2),ze(e.selectedUserTag)}}function Cye(t,i){if(t&1){let e=Ce();B(0,"div",14)(1,"h3",15),Y(2,"Work with the Questionnaire Manager"),U(),B(3,"p",15),Y(4,"Connect to a FHIR server to store and version your questionnaire resources. Use the integrated questionnaire manager, editor and validator."),U(),B(5,"div",16)(6,"button",17),ce("click",function(){ue(e);let n=ne(2);return n.step1Response="repository",he(n.advanceFromStep1())}),Y(7,"Connect to a FHIR Server and Open Repository Manager"),U(),de(8,_ye,6,0,"span",18)(9,wye,6,2,"span",18),U()()}if(t&2){let e=ne(2);j(8),ee("ngIf",e.selectedFhirServer&&e.selectedUserTag),j(),ee("ngIf",e.selectedFhirServer&&e.selectedUserTag)}}function Tye(t,i){if(t&1){let e=Ce();B(0,"div",22)(1,"h3",15),Y(2,"Work with a single questionnaire"),U(),B(3,"p",15),Y(4,"Create, preview or validate a questionnaire you upload from your computer."),U(),B(5,"div",23)(6,"button",17),ce("click",function(){ue(e);let n=ne(2);return n.step1Response="edit",he(n.advanceFromStep1())}),Y(7,"Open NLM Form Builder"),U(),B(8,"button",17),ce("click",function(){ue(e);let n=ne(2);return n.step1Response="example",he(n.advanceFromStep1())}),Y(9,"Load an example questionnaire"),U(),B(10,"button",17),ce("click",function(){ue(e);let n=ne(2);return n.step1Response="validate",he(n.advanceFromStep1())}),Y(11,"Upload and validate a questionnaire"),U()()()}}function Sye(t,i){if(t&1&&(B(0,"div",10)(1,"div",11),de(2,Cye,10,2,"div",12)(3,Tye,12,0,"div",13),U()()),t&2){let e=ne();j(2),ee("ngIf",e.mode=="step1"),j(),ee("ngIf",e.mode=="utility")}}function Eye(t,i){if(t&1&&(B(0,"span"),Y(1," Connected to "),B(2,"a",37),Y(3),U(),Y(4,' as "'),B(5,"i"),Y(6),U(),Y(7,'" '),U()),t&2){let e=ne(2);j(2),ee("href",e.selectedFhirServer,lh),j(),ze(e.selectedFhirServer),j(3),ze(e.selectedUserTag)}}function Dye(t,i){if(t&1){let e=Ce();B(0,"button",26),ce("click",function(){ue(e);let n=ne(2);return he(n.createQuestionnaire())}),Y(1," Create Questionnaire "),U()}if(t&2){let e=ne(2);ee("disabled",e.validating)}}function Mye(t,i){if(t&1){let e=Ce();B(0,"button",26),ce("click",function(){ue(e);let n=ne(2);return he(n.openModularQuestionnaireModal())}),Y(1," Create Modular Questionnaire "),U()}if(t&2){let e=ne(2);ee("disabled",e.validating)}}function Aye(t,i){if(t&1){let e=Ce();B(0,"mat-tab",38)(1,"div",31)(2,"app-list-questionnaires",39,3),ce("validateQuestionnaire",function(n){ue(e);let a=ne(2);return he(a.switchToValidateTab(n))})("previewQuestionnaire",function(n){ue(e);let a=ne(2);return he(a.switchToPreviewTab(n))})("viewQuestionaireHistory",function(n){ue(e);let a=ne(2);return he(a.switchToHistoryTab(n))}),U()()()}if(t&2){let e=ne(2);j(2),ee("config",e.listConfig)}}function Iye(t,i){if(t&1&&(B(0,"h4"),Y(1),qi(2,"date"),U()),t&2){let e=ne(2);j(),ch("",e.questionnaire.title," - Version: ",e.questionnaire.meta.versionId," (",Hr(2,3,e.questionnaire.meta.lastUpdated,"fullDate"),")")}}function Rye(t,i){if(t&1){let e=Ce();B(0,"div")(1,"div",24),de(2,Eye,8,3,"span",8),B(3,"input",25,0),ce("change",function(n){ue(e);let a=ne();return he(a.onFileSelected(n))}),U(),B(5,"button",26),ce("click",function(){ue(e);let n=Pt(4);return he(n.click())}),Y(6," Upload "),U(),B(7,"button",26),ce("click",function(){ue(e);let n=ne();return he(n.saveQuestionnaireToDisk())}),Y(8,"Download"),U(),de(9,Dye,2,1,"button",27)(10,Mye,2,1,"button",27),U(),B(11,"mat-tab-group",28),ce("selectedIndexChange",function(n){ue(e);let a=ne();return he(a.onTabChange(n))}),de(12,Aye,4,1,"mat-tab",29),B(13,"mat-tab",30)(14,"div",31),de(15,Iye,3,6,"h4",8),we(16,"div",32),U()(),B(17,"mat-tab",33)(18,"app-validate-questionnaire",34,1),ce("questionnaireUpdated",function(n){ue(e);let a=ne();return he(a.saveQuestionnaire(n))})("validatingQuestionnaire",function(n){ue(e);let a=ne();return he(a.validating=n)}),U()(),B(20,"mat-tab",35)(21,"app-questionnaire-history",36,2),ce("previewQuestionnaire",function(n){ue(e);let a=ne();return he(a.switchToPreviewTab(n))})("restoreQuestionnaireVersion",function(n){ue(e);let a=ne();return he(a.saveQuestionnaire(n))}),U()()()()}if(t&2){let e=ne();j(2),ee("ngIf",e.mode=="Manager"),j(3),ee("disabled",e.validating),j(2),ee("disabled",e.validating||!e.questionnaire),j(2),ee("ngIf",e.mode=="Manager"),j(),ee("ngIf",e.mode=="Manager"),j(2),ee("ngIf",e.mode==="Manager"),j(3),ee("ngIf",e.questionnaire),j(),ut("hidden",!e.questionnaire),j(2),ee("questionnaire",e.questionnaire),j(3),ee("questionnaire",e.questionnaire)}}var jU=(()=>{class t{constructor(e,r,n,a,s,o,d){this.http=e,this.terminologyService=r,this.fhirService=n,this.questionnaireService=a,this.activatedRoute=s,this.dialog=o,this._snackBar=d,this.loading=!1,this.validating=!1,this.orderCounter=0,this.savingQuestionnaire=!1,this.selectedFhirServer="",this.selectedUserTag="",this.showFhirSetupModal=!1,this.listConfig={validate:!0,preview:!0},this.mode="step1"}ngOnInit(){this.fhirService.baseUrl$.subscribe(e=>{this.selectedFhirServer=e}),this.fhirService.userTag$.subscribe(e=>{this.selectedUserTag=e}),this.activatedRoute.queryParams.subscribe(e=>{e.utility==="true"?this.mode="utility":this.mode="step1"}),this.loadScript()}loadScript(){let e=document.createElement("script");e.src="https://clinicaltables.nlm.nih.gov/lforms-versions/36.3.2/webcomponent/lhc-forms.js",e.onload=()=>{let r=document.createElement("script");r.src="https://clinicaltables.nlm.nih.gov/lforms-versions/36.3.2/fhir/R4/lformsFHIR.min.js",r.onload=()=>{},document.head.appendChild(r)},document.head.appendChild(e)}toggleMode(){this.mode==="Validator"?this.dialog.open(jw,{width:"60%",disableClose:!0}).afterClosed().subscribe(r=>{r==="save"&&(this.mode="Manager",setTimeout(()=>{this.tabGroup.selectedIndex=0},500))}):this.mode="Validator"}previewForm(){this.getCurrentTabName()=="Preview"&&(this.questionnaire?LForms.Util.addFormToPage(this.questionnaire,"myFormContainer"):LForms.Util.addFormToPage({},"myFormContainer"))}getFormData(){if(this.questionnaire){let e=LForms.Util.getFormData("myFormContainer",!0,!0,!0)}}displayHistory(e){e&&this.questionnaireHistory.loadVersions(e)}loadExampleQuestionnaire(){sn(this.http.get("assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json")).then(e=>{this.loadQuestionnaire(e),this.mode==="Manager"&&(this.tabGroup.selectedIndex=1)})}clearQuestionnaire(){this.questionnaire=null,this.orderCounter=0,this.previewForm()}createQuestionnaire(){this.questionnairesList.createQuestionnaire()}loadQuestionnaire(e){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=e,this.previewForm()},700)}saveQuestionnaireToDisk(){var e=new Blob([JSON.stringify(this.questionnaire,null,2)],{type:"text/plain;charset=utf-8"});(0,HU.saveAs)(e,`${this.questionnaire.title}.json`)}onFileSelected(e){let r=e.target.files?.[0];if(r){let n=new FileReader;n.onload=a=>{try{let s=JSON.parse(a.target?.result);s.resourceType==="Questionnaire"?(this.loadQuestionnaire(s),setTimeout(()=>{this.mode==="Manager"?this.postCurrentQuestionnaire():this.tabGroup.selectedIndex=1},1e3)):this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"The file is not a FHIR Questionnaire Resource",panelClass:["red-snackbar"]})}catch(s){console.error(s),this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Invalid JSON file",panelClass:["red-snackbar"]})}},n.readAsText(r),e.target.value=""}}postCurrentQuestionnaire(){this.postQuestionnaire(this.questionnaire)}postQuestionnaire(e){if(this.questionnairesList.questionnaires.findIndex(n=>n.title===e.title&&n.id!==e.id)!==-1)this.dialog.open(Ww,{width:"400px",data:{title:"Confirm Action",message:"A questionnaire with the same title and different ID already exists. Do you want to proceed?"}}).afterClosed().subscribe(a=>{a?this.saveQuestionnaire(e):this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]})});else{let n=this.questionnairesList.questionnaires.findIndex(s=>s.title===e.title&&s.id===e.id&&s.meta?.versionId>=e.meta?.versionId),a=this.questionnairesList.questionnaires[n];n!==-1?this.dialog.open(Ww,{width:"400px",data:{title:"Confirm Action",message:"A newer version or identical of this questionnaire already exists. Do you want to proceed?"}}).afterClosed().subscribe(o=>{o?this.saveQuestionnaire(e):this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]})}):this.saveQuestionnaire(e)}}saveQuestionnaire(e){if(!e){this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"No questionnaire to save",panelClass:["red-snackbar"]});return}this.savingQuestionnaire=!0,this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Saving Questionnaire...",panelClass:["green-snackbar"]}),e.meta||(e.meta={}),e.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.fhirService.updateOrCreateQuestionnaire(e,this.selectedUserTag).pipe(Jr()).subscribe(r=>{setTimeout(()=>{this.tabGroup.selectedIndex=0,setTimeout(()=>{this.savingQuestionnaire=!1,this.questionnairesList.addQuestionnaire(r)},300)},300),this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Questionnaire saved successfully",panelClass:["green-snackbar"]})},r=>{this.savingQuestionnaire=!1,this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]}),this.dialog.open(Ww,{width:"400px",data:{title:"Save error",message:"This could be an ID conflict. Post again as a new questionnaire?"}}).afterClosed().subscribe(a=>{a?(delete e.id,this.saveQuestionnaire(e)):this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Questionnaire not saved",panelClass:["red-snackbar"]})})})}listQuestionnaires(){this.fhirService.getQuestionnairesByTag(this.selectedUserTag).pipe(Jr()).subscribe(e=>{},e=>{console.error(e)})}openLoadQuestionnairesDialog(){this.dialog.open(NU,{width:"70%"}).afterClosed().subscribe(r=>{this.loadQuestionnaire(r)})}setFhirServer(){this.fhirService.setBaseUrl(this.selectedFhirServer),this.fhirService.setUserTag(this.selectedUserTag)}setupFhirServer(){this.dialog.open(jw,{width:"60%"})}switchToValidateTab(e){this.loadQuestionnaire(e),this.tabGroup.selectedIndex=2}switchToPreviewTab(e){this.loadQuestionnaire(e),this.tabGroup.selectedIndex=1}switchToHistoryTab(e){this.displayHistory(e),this.tabGroup.selectedIndex=3}advanceFromStep1(){this.step1Response=="edit"?window.open("https://lhcformbuilder.nlm.nih.gov/","_blank"):this.step1Response=="validate"?(this.mode="Validator",setTimeout(()=>{this.uploadInput.nativeElement.click()},200)):this.step1Response=="repository"?this.dialog.open(jw,{width:"60%"}).afterClosed().subscribe(r=>{r&&(this.mode="Manager")}):this.step1Response=="example"?(this.mode="Validator",setTimeout(()=>{this.loadExampleQuestionnaire()},300)):this.step1Response=="reconnect"&&(this.mode="Manager"),this.step1Response=""}getCurrentTabName(){let e=this.tabGroup.selectedIndex;return e!=null?this.tabGroup._tabs.toArray()[e].textLabel:""}onTabChange(e){this.tabGroup._tabs.toArray()[e].textLabel==="Preview"&&setTimeout(()=>{this.previewForm()},300)}openModularQuestionnaireModal(){this.dialog.open(Uw,{width:"75%"}).afterClosed().subscribe(r=>{r&&this.questionnaireService.generateRootQuestionnaire(r.title,r.questionnaires).then(n=>{this.postQuestionnaire(n)}).catch(n=>{console.error("Error:",n)})})}static{this.\u0275fac=function(r){return new(r||t)(be(nr),be(Ri),be(Bo),be(Gw),be(jr),be(hl),be(oa))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-questionnaires-main"]],viewQuery:function(r,n){if(r&1&&(vt(ha,5),vt(Ga,5),vt(gye,5),vt(vye,5),vt(yye,5)),r&2){let a;je(a=We())&&(n.sort=a.first),je(a=We())&&(n.tabGroup=a.first),je(a=We())&&(n.questionnairesList=a.first),je(a=We())&&(n.uploadInput=a.first),je(a=We())&&(n.questionnaireHistory=a.first)}},standalone:!1,decls:11,vars:4,consts:[["fileInput",""],["validateQuestionnaire",""],["questionnaireHistory",""],["questionnairesList",""],[1,"header-container"],[1,"header"],[1,"breadcrumb"],["href","javascript:void(0)",3,"click"],[4,"ngIf"],["id","step1",4,"ngIf"],["id","step1"],[1,"flex","justify-between","pr-4"],["class","w-full border-2 border-blue-200 bg-transparent rounded-lg p-4 m-2 min-h-[500px]",4,"ngIf"],["class","w-full border-2 border-blue-200 bg-transparent rounded-lg p-4 m-2 min-h-[500px] justify-center",4,"ngIf"],[1,"w-full","border-2","border-blue-200","bg-transparent","rounded-lg","p-4","m-2","min-h-[500px]"],[1,"text-center"],[1,"flex","justify-center","flex-col","gap-1","mt-10"],["mat-flat-button","","color","accent",1,"mx-auto","w-auto","flex-none",3,"click"],["class","mx-auto w-auto flex-none",4,"ngIf"],[1,"mx-auto","w-auto","flex-none"],["href","javascript:void(0)","id","reconnect-link",3,"click"],[1,"muted"],[1,"w-full","border-2","border-blue-200","bg-transparent","rounded-lg","p-4","m-2","min-h-[500px]","justify-center"],[1,"flex","justify-center","flex-col","gap-5","mt-10"],[1,"button-container","bottom-spacer"],["type","file","hidden","",3,"change"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-stretch-tabs","false","mat-align-tabs","start",3,"selectedIndexChange"],["label","My Questionnaires",4,"ngIf"],["label","Preview"],[1,"tab-container"],["id","myFormContainer"],["label","Validate SNOMED Bindings"],[3,"questionnaireUpdated","validatingQuestionnaire","questionnaire"],["label","History"],[3,"previewQuestionnaire","restoreQuestionnaireVersion","questionnaire"],["target","_blank",3,"href"],["label","My Questionnaires"],[3,"validateQuestionnaire","previewQuestionnaire","viewQuestionaireHistory","config"]],template:function(r,n){r&1&&(B(0,"div",4)(1,"h2",5),Y(2," SNOMED CT Terminology Bindings Validator - FHIR Questionnaire Manager "),U(),B(3,"div",6)(4,"span")(5,"a",7),ce("click",function(){return n.mode="step1"}),Y(6,"Home"),U(),de(7,xye,2,0,"span",8)(8,bye,2,0,"span",8),U()()(),de(9,Sye,4,2,"div",9)(10,Rye,23,11,"div",8)),r&2&&(j(7),ee("ngIf",n.mode=="Validator"),j(),ee("ngIf",n.mode=="Manager"),j(),ee("ngIf",n.mode=="step1"||n.mode=="utility"),j(),ee("ngIf",n.mode=="Manager"||n.mode=="Validator"))},dependencies:[oi,di,Pi,ul,Ga,Hw,UU,GU,Fs],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding-top:1rem;padding-left:2rem;padding-right:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}#step1[_ngcontent-%COMP%]{margin-top:2rem;margin-left:2rem;font-size:large}#step1[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{margin-left:2rem;display:flex;flex-direction:column;align-items:flex-start}.step-button-container[_ngcontent-%COMP%]{margin-left:30rem;margin-top:2rem}.breadcrumb[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:2rem}.header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hidden[_ngcontent-%COMP%]{visibility:hidden}.muted[_ngcontent-%COMP%]{color:#8f9397}#reconnect[_ngcontent-%COMP%]{margin-left:5rem}#reconnect-link[_ngcontent-%COMP%]{display:flex;vertical-align:middle;flex-direction:row}"]})}}return t})();var Pye=t=>({"bg-pink":t});function kye(t,i){if(t&1&&(B(0,"p",18),Y(1),U()),t&2){let e=ne();j(),ze(e.studentSubsetDefinition)}}function Fye(t,i){t&1&&we(0,"mat-spinner",19)}function Oye(t,i){if(t&1&&(B(0,"p",23),Y(1),U()),t&2){let e=ne(2);j(),ze(e.definitionVsMembersValidationResult)}}function Lye(t,i){if(t&1&&(B(0,"p",23),Y(1),U()),t&2){let e=ne(2);j(),ze(e.keyConceptValidationResult)}}function Nye(t,i){if(t&1&&(B(0,"div",20)(1,"h3",21),Y(2,"Validation Results"),U(),de(3,Oye,2,1,"p",22)(4,Lye,2,1,"p",22),B(5,"p",23),Y(6),U(),B(7,"p",23),Y(8),U()()),t&2){let e=ne();j(3),ee("ngIf",e.selectedAssignment.referenceDefinition),j(),ee("ngIf",e.selectedAssignment.referenceDefinition),j(2),ze(e.membersNotInRefrenceListResult),j(2),ze(e.refrenceListVsStudentListResult)}}function Bye(t,i){t&1&&(B(0,"th",33),Y(1,"ID"),U())}function Vye(t,i){if(t&1&&(B(0,"td",34),Y(1),U()),t&2){let e=i.$implicit;j(),ze(e.referencedComponentId)}}function Uye(t,i){t&1&&(B(0,"th",33),Y(1,"Name"),U())}function zye(t,i){if(t&1&&(B(0,"td",34),Y(1),U()),t&2){let e=i.$implicit;j(),ze(e.name)}}function Gye(t,i){t&1&&(B(0,"th",33),Y(1,"Result"),U())}function Hye(t,i){t&1&&(B(0,"span"),Y(1,"OK"),U())}function jye(t,i){if(t&1&&(B(0,"span"),Y(1),U()),t&2){let e=ne(2).$implicit;j(),Qe(" ",e.customMessage.note," ")}}function Wye(t,i){t&1&&(B(0,"span"),Y(1," Error "),U())}function Xye(t,i){if(t&1&&(B(0,"span"),de(1,Hye,2,0,"span",16)(2,jye,2,1,"span",16)(3,Wye,2,0,"span",16),U()),t&2){let e=ne().$implicit;j(),ee("ngIf",e==null||e.inReferenceList==null?null:e.inReferenceList.value),j(),ee("ngIf",!(!(e==null||e.inReferenceList==null)&&e.inReferenceList.value)&&(e==null||e.customMessage==null?null:e.customMessage.value)),j(),ee("ngIf",!(!(e==null||e.inReferenceList==null)&&e.inReferenceList.value)&&!(!(e==null||e.customMessage==null)&&e.customMessage.value))}}function Yye(t,i){if(t&1&&(B(0,"td",34),de(1,Xye,4,3,"span",16),U()),t&2){let e=ne(2);j(),ee("ngIf",e.membersValidationResult)}}function $ye(t,i){t&1&&we(0,"tr",35)}function Qye(t,i){if(t&1&&we(0,"tr",36),t&2){let e=i.$implicit,r=ne(2);ee("ngClass",qr(1,Pye,!(e.inReferenceList!=null&&e.inReferenceList.value)&&r.membersValidationResult))}}function Kye(t,i){if(t&1&&(B(0,"div",24)(1,"table",25),Gt(2,26),de(3,Bye,2,0,"th",27)(4,Vye,2,1,"td",28),Ht(),Gt(5,29),de(6,Uye,2,0,"th",27)(7,zye,2,1,"td",28),Ht(),Gt(8,30),de(9,Gye,2,0,"th",27)(10,Yye,2,1,"td",28),Ht(),de(11,$ye,1,0,"tr",31)(12,Qye,1,3,"tr",32),U()()),t&2){let e=ne();j(),ee("dataSource",e.studentSubsetMembersDataSource),j(10),ee("matHeaderRowDef",e.studentSubsetMembersDisplayedColumns),j(),ee("matRowDefColumns",e.studentSubsetMembersDisplayedColumns)}}function Zye(t,i){if(t&1){let e=Ce();B(0,"button",40),ce("click",function(){let n=ue(e).$implicit,a=ne(2);return he(a.setAssignment(n))}),Y(1),U()}if(t&2){let e=i.$implicit;j(),ze(e.name)}}function Jye(t,i){if(t&1&&(B(0,"div")(1,"h3"),Y(2,"Assignment"),U(),B(3,"button",37),Y(4),U(),B(5,"mat-menu",38,2),de(7,Zye,2,1,"button",39),U()()),t&2){let e=Pt(6),r=ne();j(3),ee("matMenuTriggerFor",e),j(),Qe("Selected assignment: ",r.selectedAssignment==null?null:r.selectedAssignment.name,""),j(3),ee("ngForOf",r.assignments)}}function qye(t,i){if(t&1&&(B(0,"h3"),Y(1),U()),t&2){let e=ne();j(),Qe(" Assignment: ",e.selectedAssignment==null?null:e.selectedAssignment.name," ")}}function exe(t,i){t&1&&(B(0,"ol")(1,"li"),Y(2,"1- Upload definition file"),U(),B(3,"li"),Y(4,"2- Upload members file"),U(),B(5,"li"),Y(6,"3- Click validate"),U()())}function txe(t,i){t&1&&(B(0,"ol")(1,"li"),Y(2,"1- Upload members file"),U(),B(3,"li"),Y(4,"2- Click validate"),U()())}function ixe(t,i){if(t&1){let e=Ce();B(0,"div")(1,"div")(2,"h3"),Y(3,"Reference Data"),U(),B(4,"mat-form-field",41)(5,"mat-label"),Y(6,"Textarea"),U(),B(7,"textarea",42),On("ngModelChange",function(n){ue(e);let a=ne();return Xn(a.assignmentsString,n)||(a.assignmentsString=n),he(n)}),U()(),B(8,"button",11),ce("click",function(){ue(e);let n=ne();return he(n.updateAssignments())}),Y(9,"Update Assignments"),U()()()}if(t&2){let e=ne();j(7),Fn("ngModel",e.assignmentsString)}}var WU=(()=>{class t{constructor(e,r,n,a){this.http=e,this.terminologyService=r,this._snackBar=n,this.activatedRoute=a,this.studentSubsetMembersDisplayedColumns=["referencedComponentId","name","result"],this.studentSubsetMembersDataSource=new uo,this.studentSubsetmembers=[],this.studentSubsetDefinition="",this.keyConceptValidationResult="",this.definitionVsMembersValidationResult="",this.membersNotInRefrenceListResult="",this.membersValidationResult=!1,this.refrenceListVsStudentListResult="",this.embeddedMode=!1,this.loading=!1,this.ok="\u2705",this.error="\u{1F7E5}",this.assignments=[{name:"Assignment X",referenceData:[{referencedComponentId:"403197009",name:"Sun-induced wrinkles"},{referencedComponentId:"279002006",name:"Lichenification of skin"},{referencedComponentId:"274672009",name:"Changes in skin texture"},{referencedComponentId:"271767006",name:"Peeling of skin"},{referencedComponentId:"271761007",name:"Scaly skin"},{referencedComponentId:"247434009",name:"Wrinkled skin"}],referenceDefinition:"< 185823004 |Finding of skin texture (finding)|",keyConceptsInECL:[{code:"185823004",display:"Finding of skin texture (finding)"}],customMessages:[{conceptId:"85345005",note:"wrong hierarchy",principle:"wrong hierarchy"},{conceptId:"403197009",note:"wrong hierarchy",principle:"wrong hierarchy"}]}],this.assignmentsString=JSON.stringify(this.assignments),this.selectedAssignment=this.assignments[0],this.referenceDataDisplayedColumns=["referencedComponentId","name"],this.referenceDataDataSource=new uo(this.selectedAssignment.referenceData)}ngOnInit(){return Ve(this,null,function*(){let e=yield sn(this.http.get("assets/definitions/assignments.json"));this.assignments=e,this.assignmentsString=JSON.stringify(this.assignments),this.setAssignment(this.assignments[0]),this.activatedRoute.queryParams.subscribe(r=>{r.assignment&&this.setAssignment(this.assignments.find(n=>n.name===r.assignment)),r.embedded==="true"?this.embeddedMode=!0:this.embeddedMode=!1})})}setAssignment(e){e&&(this.selectedAssignment=e,this.referenceDataDataSource=new uo(this.selectedAssignment.referenceData))}checkStudentECLvsStudentList(){return Ve(this,null,function*(){let e=0;if(!this.studentSubsetDefinition){let r=yield this.terminologyService.expandValueSet(this.studentSubsetDefinition,"").toPromise(),n=this.studentSubsetmembers,a=0;n.forEach(s=>{r.expansion.contains.find(d=>d.code===s.referencedComponentId)?s.inStudentECL={value:!0,message:""}:(s.inStudentECL={value:!1,message:""},a++)})}return e})}checkStudentECLvsKeyConcept(){if(this.studentSubsetDefinition){console.log("Student ECL not defined");let e=this.studentSubsetDefinition,r=this.selectedAssignment.keyConceptsInECL,n=!0;return r.forEach(a=>{e.includes(a.code)||(n=!1)}),n}else return!0}checkStudentListVsReferenceList(){let e=this.studentSubsetmembers,r=this.selectedAssignment.referenceData,n=0;e.forEach(a=>{r.find(o=>o.referencedComponentId===a.referencedComponentId)?a.inReferenceList={value:!0,message:""}:(a.inReferenceList={value:!1,message:""},n++)})}checkReferenceListVsStudentList(){let e=this.studentSubsetmembers,r=this.selectedAssignment.referenceData,n=0;return r.forEach(a=>{e.find(o=>o.referencedComponentId===a.referencedComponentId)?a.inStudentList={value:!0,message:""}:(a.inStudentList={value:!1,message:""},n++)}),n}checkStudentListVsCustomMessages(){let e=this.studentSubsetmembers,r=this.selectedAssignment.customMessages;e.forEach(n=>{let a=r.find(s=>s.conceptId===n.referencedComponentId);a?n.customMessage={value:!0,principle:a.principle,note:a.note}:n.customMessage={value:!1,principle:"",note:""}})}updateAssignments(){this.assignments=JSON.parse(this.assignmentsString),this.setAssignment(this.assignments[0])}validateAssignment(){return Ve(this,null,function*(){this.loading=!0,this.keyConceptValidationResult="",this.definitionVsMembersValidationResult="",this.membersValidationResult=!1,this.loading=!0,this.studentSubsetDefinition&&((yield this.checkStudentECLvsStudentList())>0?this.definitionVsMembersValidationResult=this.error+" The uploaded definition and members files are not in alignment":this.definitionVsMembersValidationResult=this.ok+" The uploaded definition and members files are in alignment",this.checkStudentECLvsKeyConcept()?this.keyConceptValidationResult=this.ok+" The definition of your subset includes the key subhierarchy":this.keyConceptValidationResult=this.error+" The definition of your subset does not include the key subhierarchy"),this.checkStudentListVsReferenceList();let e=this.studentSubsetmembers.filter(n=>!n.inReferenceList.value).length;e>0?this.membersNotInRefrenceListResult=this.error+" There are "+e+" members in your subset that are not recommended to be included":this.membersNotInRefrenceListResult=this.ok+" All members match the recommended list of concepts for the subset",this.checkStudentListVsCustomMessages();let r=this.checkReferenceListVsStudentList();if(r>0){let n=r>1?"concepts are":"concept is";this.refrenceListVsStudentListResult=this.error+" "+r+" "+n+" missing in the uploaded member list that would be recommended to be included in this subset"}else this.refrenceListVsStudentListResult=this.ok+" All recommended concepts are included in this subset";this.loading=!1,this.membersValidationResult=!0})}onSubsetmembersFileSelected(e){this.studentSubsetmembers=[],this.studentSubsetMembersDataSource=new uo,this.studentSubsetMembersDataSource.sort=this.sort,this.loading=!0;let r=e.target.files?.[0];if(r){let n=new FileReader;n.onload=a=>{try{let o=n.result.split(` +`),d=o[0].split(" ");if(d.length<2)throw new Error("Invalid file format");let l=d.indexOf("referencedComponentId"),c=d.indexOf("name");if(l<0||c<0)throw new Error("Invalid file format");let h=[];for(let u=1;uu.name.localeCompare(f.name)),this.studentSubsetmembers=h,this.studentSubsetMembersDataSource.data=h,this.loading=!1}catch(s){this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Error reading file: "+s.message,panelClass:["red-snackbar"]}),this.loading=!1}},n.onerror=a=>{this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Error reading file: "+a,panelClass:["red-snackbar"]}),this.loading=!1},n.readAsText(r)}else this.loading=!1}onDefinitionFileSelected(e){this.studentSubsetDefinition="",this.loading=!0;let r=e.target.files?.[0];if(r){let n=new FileReader;n.onload=a=>{try{let d=n.result.replace(/\r/g,"").split(` +`),l=d[0].split(" ");if(l.length<2)throw new Error("Invalid file format");let c=l.indexOf("referencedComponentId"),h=l.indexOf("definition");if(c<0||h<0)throw new Error("Invalid file format");this.studentSubsetDefinition=d[1].split(" ")[h],this.loading=!1}catch(s){this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Error reading file: "+s.message,panelClass:["red-snackbar"]}),this.loading=!1}},n.onerror=a=>{this._snackBar.openFromComponent(Bi,{duration:5*1e3,data:"Error reading file: "+a,panelClass:["red-snackbar"]}),this.loading=!1},n.readAsText(r)}else this.loading=!1}static{this.\u0275fac=function(r){return new(r||t)(be(nr),be(Ri),be(oa),be(jr))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-subset-validator"]],viewQuery:function(r,n){if(r&1&&vt(ha,5),r&2){let a;je(a=We())&&(n.sort=a.first)}},standalone:!1,decls:31,vars:12,consts:[["fileInput",""],["fileInputDefinition",""],["demosMenu","matMenu"],[1,"layout-container"],[1,"left-column"],[1,"upload-controls"],[1,"mb-4"],["class","terminal-style",4,"ngIf"],["type","file",2,"display","none",3,"change"],[1,"buttons-panel"],["mat-flat-button","","color","primary",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click"],["class","spinner","diameter","30",4,"ngIf"],["class","blue-rounded-div",4,"ngIf"],["class","table-container",4,"ngIf"],[1,"right-column"],[4,"ngIf"],[1,"instructions"],[1,"terminal-style"],["diameter","30",1,"spinner"],[1,"blue-rounded-div"],[1,"text-white","mb-1"],["class","validation-result",4,"ngIf"],[1,"validation-result"],[1,"table-container"],["mat-table","",3,"dataSource"],["matColumnDef","referencedComponentId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","result"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"ngClass",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"ngClass"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"wide-menu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],["appearance","fill"],["matInput","",3,"ngModelChange","ngModel"]],template:function(r,n){if(r&1){let a=Ce();B(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3"),Y(4,"Subset Members Validator"),U(),B(5,"p",6),Y(6),U(),de(7,kye,2,1,"p",7),B(8,"input",8,0),ce("change",function(o){return ue(a),he(n.onSubsetmembersFileSelected(o))}),U(),B(10,"input",8,1),ce("change",function(o){return ue(a),he(n.onDefinitionFileSelected(o))}),U(),B(12,"div",9)(13,"button",10),ce("click",function(){ue(a);let o=Pt(11);return he(o.click())}),Y(14," Upload Definition File "),U(),B(15,"button",11),ce("click",function(){ue(a);let o=Pt(9);return he(o.click())}),Y(16,"Upload Members File"),U(),B(17,"button",10),ce("click",function(){return ue(a),he(n.validateAssignment())}),Y(18,"Validate"),U(),de(19,Fye,1,0,"mat-spinner",12),U(),de(20,Nye,9,4,"div",13),U(),de(21,Kye,13,3,"div",14),U(),B(22,"div",15),de(23,Jye,8,3,"div",16)(24,qye,2,1,"h3",16),B(25,"h3"),Y(26,"Instructions"),U(),B(27,"div",17),de(28,exe,7,0,"ol",16)(29,txe,5,0,"ol",16),U(),de(30,ixe,10,1,"div",16),U()()}r&2&&(j(6),Qe("Validating against ",n.terminologyService.getFhirUrlParam(),""),j(),ee("ngIf",n.studentSubsetDefinition),j(6),ee("disabled",!n.selectedAssignment.referenceDefinition),j(4),ee("disabled",!n.studentSubsetMembersDataSource.data.length),j(2),ee("ngIf",n.loading),j(),ee("ngIf",!n.loading&&n.membersNotInRefrenceListResult),j(),ee("ngIf",!n.loading&&n.studentSubsetMembersDataSource.data.length),j(2),ee("ngIf",!n.embeddedMode),j(),ee("ngIf",n.embeddedMode),j(4),ee("ngIf",n.selectedAssignment.referenceDefinition),j(),ee("ngIf",!n.selectedAssignment.referenceDefinition),j(),ee("ngIf",!n.embeddedMode))},dependencies:[Ea,ci,oi,di,ur,_r,rs,Bn,Nn,Ls,ss,hr,xn,Ra,ka,Na,Fa,Pa,Ba,Oa,La,Va,Ua,wr],styles:["[_nghost-%COMP%]{display:block;height:calc(100% - 65px)}.layout-container[_ngcontent-%COMP%]{display:flex;height:100%}.left-column[_ngcontent-%COMP%]{flex:0 0 68%;display:flex;flex-direction:column;height:100%}.right-column[_ngcontent-%COMP%]{flex:0 0 28%}.buttons-panel[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-top:2rem}.upload-controls[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.table-container[_ngcontent-%COMP%]{overflow-y:auto}.upload-controls[_ngcontent-%COMP%]{margin-left:20px}table[_ngcontent-%COMP%]{width:100%}.validation-result[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.blue-rounded-div[_ngcontent-%COMP%]{border-radius:10px;background-color:#4d7fb4;padding:.5rem 3rem 1rem;width:80%;color:#f5f5f5;margin-top:20px}.terminal-style[_ngcontent-%COMP%]{font-family:monospace;font-size:.9rem;background-color:#000;color:#fff;padding:10px;border-radius:10px;margin-top:20px;width:80%}h4[_ngcontent-%COMP%]{margin-top:10px}.instructions[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px;font-weight:lighter;font-size:larger}h3[_ngcontent-%COMP%]{margin-top:10px}.bg-pink[_ngcontent-%COMP%]{background-color:pink}tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background-color:#aba9a9!important}"]})}}return t})();var YU=function(t){let i=[],e=0;for(let r=0;r>6|192,i[e++]=n&63|128):(n&64512)===55296&&r+1>18|240,i[e++]=n>>12&63|128,i[e++]=n>>6&63|128,i[e++]=n&63|128):(i[e++]=n>>12|224,i[e++]=n>>6&63|128,i[e++]=n&63|128)}return i},nxe=function(t){let i=[],e=0,r=0;for(;e191&&n<224){let a=t[e++];i[r++]=String.fromCharCode((n&31)<<6|a&63)}else if(n>239&&n<365){let a=t[e++],s=t[e++],o=t[e++],d=((n&7)<<18|(a&63)<<12|(s&63)<<6|o&63)-65536;i[r++]=String.fromCharCode(55296+(d>>10)),i[r++]=String.fromCharCode(56320+(d&1023))}else{let a=t[e++],s=t[e++];i[r++]=String.fromCharCode((n&15)<<12|(a&63)<<6|s&63)}}return i.join("")},$U={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,i){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let e=i?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let n=0;n>2,h=(a&3)<<4|o>>4,u=(o&15)<<2|l>>6,f=l&63;d||(f=64,s||(u=64)),r.push(e[c],e[h],e[u],e[f])}return r.join("")},encodeString(t,i){return this.HAS_NATIVE_SUPPORT&&!i?btoa(t):this.encodeByteArray(YU(t),i)},decodeString(t,i){return this.HAS_NATIVE_SUPPORT&&!i?atob(t):nxe(this.decodeStringToByteArray(t,i))},decodeStringToByteArray(t,i){this.init_();let e=i?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let n=0;n>4;if(r.push(u),l!==64){let f=o<<4&240|l>>2;if(r.push(f),h!==64){let p=l<<6&192|h;r.push(p)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},tR=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},rxe=function(t){let i=YU(t);return $U.encodeByteArray(i,!0)},bv=function(t){return rxe(t).replace(/\./g,"")},sxe=function(t){try{return $U.decodeString(t,!0)}catch(i){console.error("base64Decode failed: ",i)}return null};function axe(){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.")}var oxe=()=>axe().__FIREBASE_DEFAULTS__,lxe=()=>{if(typeof process>"u"||typeof process.env>"u")return;let t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},cxe=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let i=t&&sxe(t[1]);return i&&JSON.parse(i)},iR=()=>{try{return oxe()||lxe()||cxe()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},dxe=t=>{var i,e;return(e=(i=iR())===null||i===void 0?void 0:i.emulatorHosts)===null||e===void 0?void 0:e[t]},QU=t=>{let i=dxe(t);if(!i)return;let e=i.lastIndexOf(":");if(e<=0||e+1===i.length)throw new Error(`Invalid host ${i} with no separate hostname and port!`);let r=parseInt(i.substring(e+1),10);return i[0]==="["?[i.substring(1,e-1),r]:[i.substring(0,e),r]},nR=()=>{var t;return(t=iR())===null||t===void 0?void 0:t.config};var Xw=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((i,e)=>{this.resolve=i,this.reject=e})}wrapCallback(i){return(e,r)=>{e?this.reject(e):this.resolve(r),typeof i=="function"&&(this.promise.catch(()=>{}),i.length===1?i(e):i(e,r))}}};function KU(t,i){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let e={alg:"none",type:"JWT"},r=i||"demo-project",n=t.iat||0,a=t.sub||t.user_id;if(!a)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");let s=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:n,exp:n+3600,auth_time:n,sub:a,user_id:a,firebase:{sign_in_provider:"custom",identities:{}}},t);return[bv(JSON.stringify(e)),bv(JSON.stringify(s)),""].join(".")}function ZU(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function uxe(){var t;let i=(t=iR())===null||t===void 0?void 0:t.forceEnvironment;if(i==="node")return!0;if(i==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function JU(){return!uxe()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function rR(){try{return typeof indexedDB=="object"}catch{return!1}}function qU(){return new Promise((t,i)=>{try{let e=!0,r="validate-browser-context-for-indexeddb-analytics-module",n=self.indexedDB.open(r);n.onsuccess=()=>{n.result.close(),e||self.indexedDB.deleteDatabase(r),t(!0)},n.onupgradeneeded=()=>{e=!1},n.onerror=()=>{var a;i(((a=n.error)===null||a===void 0?void 0:a.message)||"")}}catch(e){i(e)}})}var hxe="FirebaseError",$c=class t extends Error{constructor(i,e,r){super(e),this.code=i,this.customData=r,this.name=hxe,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,_v.prototype.create)}},_v=class{constructor(i,e,r){this.service=i,this.serviceName=e,this.errors=r}create(i,...e){let r=e[0]||{},n=`${this.service}/${i}`,a=this.errors[i],s=a?fxe(a,r):"Error",o=`${this.serviceName}: ${s} (${n}).`;return new $c(n,o,r)}};function fxe(t,i){return t.replace(mxe,(e,r)=>{let n=i[r];return n!=null?String(n):`<${r}?>`})}var mxe=/\{\$([^}]+)}/g;function wv(t,i){if(t===i)return!0;let e=Object.keys(t),r=Object.keys(i);for(let n of e){if(!r.includes(n))return!1;let a=t[n],s=i[n];if(XU(a)&&XU(s)){if(!wv(a,s))return!1}else if(a!==s)return!1}for(let n of r)if(!e.includes(n))return!1;return!0}function XU(t){return t!==null&&typeof t=="object"}var yot=4*60*60*1e3;function Ah(t){return t&&t._delegate?t._delegate:t}var Qc=class{constructor(i,e,r){this.name=i,this.instanceFactory=e,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(i){return this.instantiationMode=i,this}setMultipleInstances(i){return this.multipleInstances=i,this}setServiceProps(i){return this.serviceProps=i,this}setInstanceCreatedCallback(i){return this.onInstanceCreated=i,this}};var Ih="[DEFAULT]";var sR=class{constructor(i,e){this.name=i,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(i){let e=this.normalizeInstanceIdentifier(i);if(!this.instancesDeferred.has(e)){let r=new Xw;if(this.instancesDeferred.set(e,r),this.isInitialized(e)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:e});n&&r.resolve(n)}catch{}}return this.instancesDeferred.get(e).promise}getImmediate(i){var e;let r=this.normalizeInstanceIdentifier(i?.identifier),n=(e=i?.optional)!==null&&e!==void 0?e:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(a){if(n)return null;throw a}else{if(n)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(i){if(i.name!==this.name)throw Error(`Mismatching Component ${i.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=i,!!this.shouldAutoInitialize()){if(gxe(i))try{this.getOrInitializeService({instanceIdentifier:Ih})}catch{}for(let[e,r]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(e);try{let a=this.getOrInitializeService({instanceIdentifier:n});r.resolve(a)}catch{}}}}clearInstance(i=Ih){this.instancesDeferred.delete(i),this.instancesOptions.delete(i),this.instances.delete(i)}delete(){return Ve(this,null,function*(){let i=Array.from(this.instances.values());yield Promise.all([...i.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...i.filter(e=>"_delete"in e).map(e=>e._delete())])})}isComponentSet(){return this.component!=null}isInitialized(i=Ih){return this.instances.has(i)}getOptions(i=Ih){return this.instancesOptions.get(i)||{}}initialize(i={}){let{options:e={}}=i,r=this.normalizeInstanceIdentifier(i.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let n=this.getOrInitializeService({instanceIdentifier:r,options:e});for(let[a,s]of this.instancesDeferred.entries()){let o=this.normalizeInstanceIdentifier(a);r===o&&s.resolve(n)}return n}onInit(i,e){var r;let n=this.normalizeInstanceIdentifier(e),a=(r=this.onInitCallbacks.get(n))!==null&&r!==void 0?r:new Set;a.add(i),this.onInitCallbacks.set(n,a);let s=this.instances.get(n);return s&&i(s,n),()=>{a.delete(i)}}invokeOnInitCallbacks(i,e){let r=this.onInitCallbacks.get(e);if(r)for(let n of r)try{n(i,e)}catch{}}getOrInitializeService({instanceIdentifier:i,options:e={}}){let r=this.instances.get(i);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:pxe(i),options:e}),this.instances.set(i,r),this.instancesOptions.set(i,e),this.invokeOnInitCallbacks(r,i),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,i,r)}catch{}return r||null}normalizeInstanceIdentifier(i=Ih){return this.component?this.component.multipleInstances?i:Ih:i}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function pxe(t){return t===Ih?void 0:t}function gxe(t){return t.instantiationMode==="EAGER"}var Yw=class{constructor(i){this.name=i,this.providers=new Map}addComponent(i){let e=this.getProvider(i.name);if(e.isComponentSet())throw new Error(`Component ${i.name} has already been registered with ${this.name}`);e.setComponent(i)}addOrOverwriteComponent(i){this.getProvider(i.name).isComponentSet()&&this.providers.delete(i.name),this.addComponent(i)}getProvider(i){if(this.providers.has(i))return this.providers.get(i);let e=new sR(i,this);return this.providers.set(i,e),e}getProviders(){return Array.from(this.providers.values())}};var vxe=[],Qi=function(t){return t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT",t}(Qi||{}),yxe={debug:Qi.DEBUG,verbose:Qi.VERBOSE,info:Qi.INFO,warn:Qi.WARN,error:Qi.ERROR,silent:Qi.SILENT},xxe=Qi.INFO,bxe={[Qi.DEBUG]:"log",[Qi.VERBOSE]:"log",[Qi.INFO]:"info",[Qi.WARN]:"warn",[Qi.ERROR]:"error"},_xe=(t,i,...e)=>{if(ii.some(e=>t instanceof e),ez,tz;function Cxe(){return ez||(ez=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Txe(){return tz||(tz=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var iz=new WeakMap,oR=new WeakMap,nz=new WeakMap,aR=new WeakMap,cR=new WeakMap;function Sxe(t){let i=new Promise((e,r)=>{let n=()=>{t.removeEventListener("success",a),t.removeEventListener("error",s)},a=()=>{e($l(t.result)),n()},s=()=>{r(t.error),n()};t.addEventListener("success",a),t.addEventListener("error",s)});return i.then(e=>{e instanceof IDBCursor&&iz.set(e,t)}).catch(()=>{}),cR.set(i,t),i}function Exe(t){if(oR.has(t))return;let i=new Promise((e,r)=>{let n=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",s),t.removeEventListener("abort",s)},a=()=>{e(),n()},s=()=>{r(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",a),t.addEventListener("error",s),t.addEventListener("abort",s)});oR.set(t,i)}var lR={get(t,i,e){if(t instanceof IDBTransaction){if(i==="done")return oR.get(t);if(i==="objectStoreNames")return t.objectStoreNames||nz.get(t);if(i==="store")return e.objectStoreNames[1]?void 0:e.objectStore(e.objectStoreNames[0])}return $l(t[i])},set(t,i,e){return t[i]=e,!0},has(t,i){return t instanceof IDBTransaction&&(i==="done"||i==="store")?!0:i in t}};function rz(t){lR=t(lR)}function Dxe(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(i,...e){let r=t.call($w(this),i,...e);return nz.set(r,i.sort?i.sort():[i]),$l(r)}:Txe().includes(t)?function(...i){return t.apply($w(this),i),$l(iz.get(this))}:function(...i){return $l(t.apply($w(this),i))}}function Mxe(t){return typeof t=="function"?Dxe(t):(t instanceof IDBTransaction&&Exe(t),wxe(t,Cxe())?new Proxy(t,lR):t)}function $l(t){if(t instanceof IDBRequest)return Sxe(t);if(aR.has(t))return aR.get(t);let i=Mxe(t);return i!==t&&(aR.set(t,i),cR.set(i,t)),i}var $w=t=>cR.get(t);function az(t,i,{blocked:e,upgrade:r,blocking:n,terminated:a}={}){let s=indexedDB.open(t,i),o=$l(s);return r&&s.addEventListener("upgradeneeded",d=>{r($l(s.result),d.oldVersion,d.newVersion,$l(s.transaction),d)}),e&&s.addEventListener("blocked",d=>e(d.oldVersion,d.newVersion,d)),o.then(d=>{a&&d.addEventListener("close",()=>a()),n&&d.addEventListener("versionchange",l=>n(l.oldVersion,l.newVersion,l))}).catch(()=>{}),o}var Axe=["get","getKey","getAll","getAllKeys","count"],Ixe=["put","add","delete","clear"],dR=new Map;function sz(t,i){if(!(t instanceof IDBDatabase&&!(i in t)&&typeof i=="string"))return;if(dR.get(i))return dR.get(i);let e=i.replace(/FromIndex$/,""),r=i!==e,n=Ixe.includes(e);if(!(e in(r?IDBIndex:IDBObjectStore).prototype)||!(n||Axe.includes(e)))return;let a=function(s,...o){return Ve(this,null,function*(){let d=this.transaction(s,n?"readwrite":"readonly"),l=d.store;return r&&(l=l.index(o.shift())),(yield Promise.all([l[e](...o),n&&d.done]))[0]})};return dR.set(i,a),a}rz(t=>Mt(Me({},t),{get:(i,e,r)=>sz(i,e)||t.get(i,e,r),has:(i,e)=>!!sz(i,e)||t.has(i,e)}));var hR=class{constructor(i){this.container=i}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(Rxe(e)){let r=e.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(e=>e).join(" ")}};function Rxe(t){let i=t.getComponent();return i?.type==="VERSION"}var fR="@firebase/app",oz="0.10.6";var Rh=new rp("@firebase/app"),Pxe="@firebase/app-compat",kxe="@firebase/analytics-compat",Fxe="@firebase/analytics",Oxe="@firebase/app-check-compat",Lxe="@firebase/app-check",Nxe="@firebase/auth",Bxe="@firebase/auth-compat",Vxe="@firebase/database",Uxe="@firebase/database-compat",zxe="@firebase/functions",Gxe="@firebase/functions-compat",Hxe="@firebase/installations",jxe="@firebase/installations-compat",Wxe="@firebase/messaging",Xxe="@firebase/messaging-compat",Yxe="@firebase/performance",$xe="@firebase/performance-compat",Qxe="@firebase/remote-config",Kxe="@firebase/remote-config-compat",Zxe="@firebase/storage",Jxe="@firebase/storage-compat",qxe="@firebase/firestore",e1e="@firebase/vertexai-preview",t1e="@firebase/firestore-compat",i1e="firebase",n1e="10.12.3";var mR="[DEFAULT]",r1e={[fR]:"fire-core",[Pxe]:"fire-core-compat",[Fxe]:"fire-analytics",[kxe]:"fire-analytics-compat",[Lxe]:"fire-app-check",[Oxe]:"fire-app-check-compat",[Nxe]:"fire-auth",[Bxe]:"fire-auth-compat",[Vxe]:"fire-rtdb",[Uxe]:"fire-rtdb-compat",[zxe]:"fire-fn",[Gxe]:"fire-fn-compat",[Hxe]:"fire-iid",[jxe]:"fire-iid-compat",[Wxe]:"fire-fcm",[Xxe]:"fire-fcm-compat",[Yxe]:"fire-perf",[$xe]:"fire-perf-compat",[Qxe]:"fire-rc",[Kxe]:"fire-rc-compat",[Zxe]:"fire-gcs",[Jxe]:"fire-gcs-compat",[qxe]:"fire-fst",[t1e]:"fire-fst-compat",[e1e]:"fire-vertex","fire-js":"fire-js",[i1e]:"fire-js-all"};var Qw=new Map,s1e=new Map,pR=new Map;function lz(t,i){try{t.container.addComponent(i)}catch(e){Rh.debug(`Component ${i.name} failed to register with FirebaseApp ${t.name}`,e)}}function Cv(t){let i=t.name;if(pR.has(i))return Rh.debug(`There were multiple attempts to register component ${i}.`),!1;pR.set(i,t);for(let e of Qw.values())lz(e,t);for(let e of s1e.values())lz(e,t);return!0}function hz(t,i){let e=t.container.getProvider("heartbeat").getImmediate({optional:!0});return e&&e.triggerHeartbeat(),t.container.getProvider(i)}var a1e={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},tu=new _v("app","Firebase",a1e);var gR=class{constructor(i,e,r){this._isDeleted=!1,this._options=Object.assign({},i),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Qc("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(i){this.checkDestroyed(),this._automaticDataCollectionEnabled=i}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(i){this._isDeleted=i}checkDestroyed(){if(this.isDeleted)throw tu.create("app-deleted",{appName:this._name})}};var fz=n1e;function xR(t,i={}){let e=t;typeof i!="object"&&(i={name:i});let r=Object.assign({name:mR,automaticDataCollectionEnabled:!1},i),n=r.name;if(typeof n!="string"||!n)throw tu.create("bad-app-name",{appName:String(n)});if(e||(e=nR()),!e)throw tu.create("no-options");let a=Qw.get(n);if(a){if(wv(e,a.options)&&wv(r,a.config))return a;throw tu.create("duplicate-app",{appName:n})}let s=new Yw(n);for(let d of pR.values())s.addComponent(d);let o=new gR(e,r,s);return Qw.set(n,o),o}function mz(t=mR){let i=Qw.get(t);if(!i&&t===mR&&nR())return xR();if(!i)throw tu.create("no-app",{appName:t});return i}function iu(t,i,e){var r;let n=(r=r1e[t])!==null&&r!==void 0?r:t;e&&(n+=`-${e}`);let a=n.match(/\s|\//),s=i.match(/\s|\//);if(a||s){let o=[`Unable to register library "${n}" with version "${i}":`];a&&o.push(`library name "${n}" contains illegal characters (whitespace or "/")`),a&&s&&o.push("and"),s&&o.push(`version name "${i}" contains illegal characters (whitespace or "/")`),Rh.warn(o.join(" "));return}Cv(new Qc(`${n}-version`,()=>({library:n,version:i}),"VERSION"))}var o1e="firebase-heartbeat-database",l1e=1,Tv="firebase-heartbeat-store",uR=null;function pz(){return uR||(uR=az(o1e,l1e,{upgrade:(t,i)=>{switch(i){case 0:try{t.createObjectStore(Tv)}catch(e){console.warn(e)}}}}).catch(t=>{throw tu.create("idb-open",{originalErrorMessage:t.message})})),uR}function c1e(t){return Ve(this,null,function*(){try{let e=(yield pz()).transaction(Tv),r=yield e.objectStore(Tv).get(gz(t));return yield e.done,r}catch(i){if(i instanceof $c)Rh.warn(i.message);else{let e=tu.create("idb-get",{originalErrorMessage:i?.message});Rh.warn(e.message)}}})}function cz(t,i){return Ve(this,null,function*(){try{let r=(yield pz()).transaction(Tv,"readwrite");yield r.objectStore(Tv).put(i,gz(t)),yield r.done}catch(e){if(e instanceof $c)Rh.warn(e.message);else{let r=tu.create("idb-set",{originalErrorMessage:e?.message});Rh.warn(r.message)}}})}function gz(t){return`${t.name}!${t.options.appId}`}var d1e=1024,u1e=30*24*60*60*1e3,vR=class{constructor(i){this.container=i,this._heartbeatsCache=null;let e=this.container.getProvider("app").getImmediate();this._storage=new yR(e),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}triggerHeartbeat(){return Ve(this,null,function*(){var i,e;let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),a=dz();if(!(((i=this._heartbeatsCache)===null||i===void 0?void 0:i.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===a||this._heartbeatsCache.heartbeats.some(s=>s.date===a)))return this._heartbeatsCache.heartbeats.push({date:a,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{let o=new Date(s.date).valueOf();return Date.now()-o<=u1e}),this._storage.overwrite(this._heartbeatsCache)})}getHeartbeatsHeader(){return Ve(this,null,function*(){var i;if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((i=this._heartbeatsCache)===null||i===void 0?void 0:i.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let e=dz(),{heartbeatsToSend:r,unsentEntries:n}=h1e(this._heartbeatsCache.heartbeats),a=bv(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),a})}};function dz(){return new Date().toISOString().substring(0,10)}function h1e(t,i=d1e){let e=[],r=t.slice();for(let n of t){let a=e.find(s=>s.agent===n.agent);if(a){if(a.dates.push(n.date),uz(e)>i){a.dates.pop();break}}else if(e.push({agent:n.agent,dates:[n.date]}),uz(e)>i){e.pop();break}r=r.slice(1)}return{heartbeatsToSend:e,unsentEntries:r}}var yR=class{constructor(i){this.app=i,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return Ve(this,null,function*(){return rR()?qU().then(()=>!0).catch(()=>!1):!1})}read(){return Ve(this,null,function*(){if(yield this._canUseIndexedDBPromise){let e=yield c1e(this.app);return e?.heartbeats?e:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(i){return Ve(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let n=yield this.read();return cz(this.app,{lastSentHeartbeatDate:(e=i.lastSentHeartbeatDate)!==null&&e!==void 0?e:n.lastSentHeartbeatDate,heartbeats:i.heartbeats})}else return})}add(i){return Ve(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let n=yield this.read();return cz(this.app,{lastSentHeartbeatDate:(e=i.lastSentHeartbeatDate)!==null&&e!==void 0?e:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...i.heartbeats]})}else return})}};function uz(t){return bv(JSON.stringify({version:2,heartbeats:t})).length}function f1e(t){Cv(new Qc("platform-logger",i=>new hR(i),"PRIVATE")),Cv(new Qc("heartbeat",i=>new vR(i),"PRIVATE")),iu(fR,oz,t),iu(fR,oz,"esm2017"),iu("fire-js","")}f1e("");var vz=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yz={};var nu,bR;(function(){var t;function i(w,T){function S(){}S.prototype=T.prototype,w.D=T.prototype,w.prototype=new S,w.prototype.constructor=w,w.C=function(E,D,A){for(var M=Array(arguments.length-2),R=2;RD;++D)E[D]=T.charCodeAt(S++)|T.charCodeAt(S++)<<8|T.charCodeAt(S++)<<16|T.charCodeAt(S++)<<24;else for(D=0;16>D;++D)E[D]=T[S++]|T[S++]<<8|T[S++]<<16|T[S++]<<24;T=w.g[0],S=w.g[1],D=w.g[2];var A=w.g[3],M=T+(A^S&(D^A))+E[0]+3614090360&4294967295;T=S+(M<<7&4294967295|M>>>25),M=A+(D^T&(S^D))+E[1]+3905402710&4294967295,A=T+(M<<12&4294967295|M>>>20),M=D+(S^A&(T^S))+E[2]+606105819&4294967295,D=A+(M<<17&4294967295|M>>>15),M=S+(T^D&(A^T))+E[3]+3250441966&4294967295,S=D+(M<<22&4294967295|M>>>10),M=T+(A^S&(D^A))+E[4]+4118548399&4294967295,T=S+(M<<7&4294967295|M>>>25),M=A+(D^T&(S^D))+E[5]+1200080426&4294967295,A=T+(M<<12&4294967295|M>>>20),M=D+(S^A&(T^S))+E[6]+2821735955&4294967295,D=A+(M<<17&4294967295|M>>>15),M=S+(T^D&(A^T))+E[7]+4249261313&4294967295,S=D+(M<<22&4294967295|M>>>10),M=T+(A^S&(D^A))+E[8]+1770035416&4294967295,T=S+(M<<7&4294967295|M>>>25),M=A+(D^T&(S^D))+E[9]+2336552879&4294967295,A=T+(M<<12&4294967295|M>>>20),M=D+(S^A&(T^S))+E[10]+4294925233&4294967295,D=A+(M<<17&4294967295|M>>>15),M=S+(T^D&(A^T))+E[11]+2304563134&4294967295,S=D+(M<<22&4294967295|M>>>10),M=T+(A^S&(D^A))+E[12]+1804603682&4294967295,T=S+(M<<7&4294967295|M>>>25),M=A+(D^T&(S^D))+E[13]+4254626195&4294967295,A=T+(M<<12&4294967295|M>>>20),M=D+(S^A&(T^S))+E[14]+2792965006&4294967295,D=A+(M<<17&4294967295|M>>>15),M=S+(T^D&(A^T))+E[15]+1236535329&4294967295,S=D+(M<<22&4294967295|M>>>10),M=T+(D^A&(S^D))+E[1]+4129170786&4294967295,T=S+(M<<5&4294967295|M>>>27),M=A+(S^D&(T^S))+E[6]+3225465664&4294967295,A=T+(M<<9&4294967295|M>>>23),M=D+(T^S&(A^T))+E[11]+643717713&4294967295,D=A+(M<<14&4294967295|M>>>18),M=S+(A^T&(D^A))+E[0]+3921069994&4294967295,S=D+(M<<20&4294967295|M>>>12),M=T+(D^A&(S^D))+E[5]+3593408605&4294967295,T=S+(M<<5&4294967295|M>>>27),M=A+(S^D&(T^S))+E[10]+38016083&4294967295,A=T+(M<<9&4294967295|M>>>23),M=D+(T^S&(A^T))+E[15]+3634488961&4294967295,D=A+(M<<14&4294967295|M>>>18),M=S+(A^T&(D^A))+E[4]+3889429448&4294967295,S=D+(M<<20&4294967295|M>>>12),M=T+(D^A&(S^D))+E[9]+568446438&4294967295,T=S+(M<<5&4294967295|M>>>27),M=A+(S^D&(T^S))+E[14]+3275163606&4294967295,A=T+(M<<9&4294967295|M>>>23),M=D+(T^S&(A^T))+E[3]+4107603335&4294967295,D=A+(M<<14&4294967295|M>>>18),M=S+(A^T&(D^A))+E[8]+1163531501&4294967295,S=D+(M<<20&4294967295|M>>>12),M=T+(D^A&(S^D))+E[13]+2850285829&4294967295,T=S+(M<<5&4294967295|M>>>27),M=A+(S^D&(T^S))+E[2]+4243563512&4294967295,A=T+(M<<9&4294967295|M>>>23),M=D+(T^S&(A^T))+E[7]+1735328473&4294967295,D=A+(M<<14&4294967295|M>>>18),M=S+(A^T&(D^A))+E[12]+2368359562&4294967295,S=D+(M<<20&4294967295|M>>>12),M=T+(S^D^A)+E[5]+4294588738&4294967295,T=S+(M<<4&4294967295|M>>>28),M=A+(T^S^D)+E[8]+2272392833&4294967295,A=T+(M<<11&4294967295|M>>>21),M=D+(A^T^S)+E[11]+1839030562&4294967295,D=A+(M<<16&4294967295|M>>>16),M=S+(D^A^T)+E[14]+4259657740&4294967295,S=D+(M<<23&4294967295|M>>>9),M=T+(S^D^A)+E[1]+2763975236&4294967295,T=S+(M<<4&4294967295|M>>>28),M=A+(T^S^D)+E[4]+1272893353&4294967295,A=T+(M<<11&4294967295|M>>>21),M=D+(A^T^S)+E[7]+4139469664&4294967295,D=A+(M<<16&4294967295|M>>>16),M=S+(D^A^T)+E[10]+3200236656&4294967295,S=D+(M<<23&4294967295|M>>>9),M=T+(S^D^A)+E[13]+681279174&4294967295,T=S+(M<<4&4294967295|M>>>28),M=A+(T^S^D)+E[0]+3936430074&4294967295,A=T+(M<<11&4294967295|M>>>21),M=D+(A^T^S)+E[3]+3572445317&4294967295,D=A+(M<<16&4294967295|M>>>16),M=S+(D^A^T)+E[6]+76029189&4294967295,S=D+(M<<23&4294967295|M>>>9),M=T+(S^D^A)+E[9]+3654602809&4294967295,T=S+(M<<4&4294967295|M>>>28),M=A+(T^S^D)+E[12]+3873151461&4294967295,A=T+(M<<11&4294967295|M>>>21),M=D+(A^T^S)+E[15]+530742520&4294967295,D=A+(M<<16&4294967295|M>>>16),M=S+(D^A^T)+E[2]+3299628645&4294967295,S=D+(M<<23&4294967295|M>>>9),M=T+(D^(S|~A))+E[0]+4096336452&4294967295,T=S+(M<<6&4294967295|M>>>26),M=A+(S^(T|~D))+E[7]+1126891415&4294967295,A=T+(M<<10&4294967295|M>>>22),M=D+(T^(A|~S))+E[14]+2878612391&4294967295,D=A+(M<<15&4294967295|M>>>17),M=S+(A^(D|~T))+E[5]+4237533241&4294967295,S=D+(M<<21&4294967295|M>>>11),M=T+(D^(S|~A))+E[12]+1700485571&4294967295,T=S+(M<<6&4294967295|M>>>26),M=A+(S^(T|~D))+E[3]+2399980690&4294967295,A=T+(M<<10&4294967295|M>>>22),M=D+(T^(A|~S))+E[10]+4293915773&4294967295,D=A+(M<<15&4294967295|M>>>17),M=S+(A^(D|~T))+E[1]+2240044497&4294967295,S=D+(M<<21&4294967295|M>>>11),M=T+(D^(S|~A))+E[8]+1873313359&4294967295,T=S+(M<<6&4294967295|M>>>26),M=A+(S^(T|~D))+E[15]+4264355552&4294967295,A=T+(M<<10&4294967295|M>>>22),M=D+(T^(A|~S))+E[6]+2734768916&4294967295,D=A+(M<<15&4294967295|M>>>17),M=S+(A^(D|~T))+E[13]+1309151649&4294967295,S=D+(M<<21&4294967295|M>>>11),M=T+(D^(S|~A))+E[4]+4149444226&4294967295,T=S+(M<<6&4294967295|M>>>26),M=A+(S^(T|~D))+E[11]+3174756917&4294967295,A=T+(M<<10&4294967295|M>>>22),M=D+(T^(A|~S))+E[2]+718787259&4294967295,D=A+(M<<15&4294967295|M>>>17),M=S+(A^(D|~T))+E[9]+3951481745&4294967295,w.g[0]=w.g[0]+T&4294967295,w.g[1]=w.g[1]+(D+(M<<21&4294967295|M>>>11))&4294967295,w.g[2]=w.g[2]+D&4294967295,w.g[3]=w.g[3]+A&4294967295}r.prototype.u=function(w,T){T===void 0&&(T=w.length);for(var S=T-this.blockSize,E=this.B,D=this.h,A=0;Athis.h?this.blockSize:2*this.blockSize)-this.h);w[0]=128;for(var T=1;TT;++T)for(var E=0;32>E;E+=8)w[S++]=this.g[T]>>>E&255;return w};function a(w,T){var S=o;return Object.prototype.hasOwnProperty.call(S,w)?S[w]:S[w]=T(w)}function s(w,T){this.h=T;for(var S=[],E=!0,D=w.length-1;0<=D;D--){var A=w[D]|0;E&&A==T||(S[D]=A,E=!1)}this.g=S}var o={};function d(w){return-128<=w&&128>w?a(w,function(T){return new s([T|0],0>T?-1:0)}):new s([w|0],0>w?-1:0)}function l(w){if(isNaN(w)||!isFinite(w))return h;if(0>w)return g(l(-w));for(var T=[],S=1,E=0;w>=S;E++)T[E]=w/S|0,S*=4294967296;return new s(T,0)}function c(w,T){if(w.length==0)throw Error("number format error: empty string");if(T=T||10,2>T||36A?(A=l(Math.pow(T,A)),E=E.j(A).add(l(M))):(E=E.j(S),E=E.add(l(M)))}return E}var h=d(0),u=d(1),f=d(16777216);t=s.prototype,t.m=function(){if(m(this))return-g(this).m();for(var w=0,T=1,S=0;Sw||36>>0).toString(w);if(S=D,p(S))return A+E;for(;6>A.length;)A="0"+A;E=A+E}},t.i=function(w){return 0>w?0:w>>16)+(this.i(D)>>>16)+(w.i(D)>>>16);E=M>>>16,A&=65535,M&=65535,S[D]=M<<16|A}return new s(S,S[S.length-1]&-2147483648?-1:0)};function v(w,T){return w.add(g(T))}t.j=function(w){if(p(this)||p(w))return h;if(m(this))return m(w)?g(this).j(g(w)):g(g(this).j(w));if(m(w))return g(this.j(g(w)));if(0>this.l(f)&&0>w.l(f))return l(this.m()*w.m());for(var T=this.g.length+w.g.length,S=[],E=0;E<2*T;E++)S[E]=0;for(E=0;E>>16,M=this.i(E)&65535,R=w.i(D)>>>16,L=w.i(D)&65535;S[2*E+2*D]+=M*L,y(S,2*E+2*D),S[2*E+2*D+1]+=A*L,y(S,2*E+2*D+1),S[2*E+2*D+1]+=M*R,y(S,2*E+2*D+1),S[2*E+2*D+2]+=A*R,y(S,2*E+2*D+2)}for(E=0;E>>16,w[T]&=65535,T++}function x(w,T){this.g=w,this.h=T}function b(w,T){if(p(T))throw Error("division by zero");if(p(w))return new x(h,h);if(m(w))return T=b(g(w),T),new x(g(T.g),g(T.h));if(m(T))return T=b(w,g(T)),new x(g(T.g),T.h);if(30=E.l(w);)S=_(S),E=_(E);var D=C(S,1),A=C(E,1);for(E=C(E,2),S=C(S,2);!p(E);){var M=A.add(E);0>=M.l(w)&&(D=D.add(S),A=M),E=C(E,1),S=C(S,1)}return T=v(w,D.j(T)),new x(D,T)}for(D=h;0<=w.l(T);){for(S=Math.max(1,Math.floor(w.m()/T.m())),E=Math.ceil(Math.log(S)/Math.LN2),E=48>=E?1:Math.pow(2,E-48),A=l(S),M=A.j(T);m(M)||0>>31;return new s(S,w.h)}function C(w,T){var S=T>>5;T%=32;for(var E=w.g.length-S,D=[],A=0;A>>T|w.i(A+S+1)<<32-T:w.i(A+S);return new s(D,w.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,bR=yz.Md5=r,s.prototype.add=s.prototype.add,s.prototype.multiply=s.prototype.j,s.prototype.modulo=s.prototype.A,s.prototype.compare=s.prototype.l,s.prototype.toNumber=s.prototype.m,s.prototype.toString=s.prototype.toString,s.prototype.getBits=s.prototype.i,s.fromNumber=l,s.fromString=c,nu=yz.Integer=s}).apply(typeof vz<"u"?vz:typeof self<"u"?self:typeof window<"u"?window:{});var Kw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Kc={};var _R,wR,sp,CR,Sv,Zw,TR,SR,ER;(function(){var t,i=typeof Object.defineProperties=="function"?Object.defineProperty:function(P,K,te){return P==Array.prototype||P==Object.prototype||(P[K]=te.value),P};function e(P){P=[typeof globalThis=="object"&&globalThis,P,typeof window=="object"&&window,typeof self=="object"&&self,typeof Kw=="object"&&Kw];for(var K=0;K{throw P},0)}function M(){var P=H;let K=null;return P.g&&(K=P.g,P.g=P.g.next,P.g||(P.h=null),K.next=null),K}class R{constructor(){this.h=this.g=null}add(K,te){let ae=L.get();ae.set(K,te),this.h?this.h.next=ae:this.g=ae,this.h=ae}}var L=new v(()=>new I,P=>P.reset());class I{constructor(){this.next=this.g=this.h=null}set(K,te){this.h=K,this.g=te,this.next=null}reset(){this.next=this.g=this.h=null}}let O,N=!1,H=new R,X=()=>{let P=o.Promise.resolve(void 0);O=()=>{P.then(V)}};var V=()=>{for(var P;P=M();){try{P.h.call(P.g)}catch(te){A(te)}var K=L;K.j(P),100>K.h&&(K.h++,P.next=K.g,K.g=P)}N=!1};function z(){this.s=this.s,this.C=this.C}z.prototype.s=!1,z.prototype.ma=function(){this.s||(this.s=!0,this.N())},z.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function F(P,K){this.type=P,this.g=this.target=K,this.defaultPrevented=!1}F.prototype.h=function(){this.defaultPrevented=!0};var k=function(){if(!o.addEventListener||!Object.defineProperty)return!1;var P=!1,K=Object.defineProperty({},"passive",{get:function(){P=!0}});try{let te=()=>{};o.addEventListener("test",te,K),o.removeEventListener("test",te,K)}catch{}return P}();function G(P,K){if(F.call(this,P?P.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,P){var te=this.type=P.type,ae=P.changedTouches&&P.changedTouches.length?P.changedTouches[0]:null;if(this.target=P.target||P.srcElement,this.g=K,K=P.relatedTarget){if(_){e:{try{b(K.nodeName);var Ee=!0;break e}catch{}Ee=!1}Ee||(K=null)}}else te=="mouseover"?K=P.fromElement:te=="mouseout"&&(K=P.toElement);this.relatedTarget=K,ae?(this.clientX=ae.clientX!==void 0?ae.clientX:ae.pageX,this.clientY=ae.clientY!==void 0?ae.clientY:ae.pageY,this.screenX=ae.screenX||0,this.screenY=ae.screenY||0):(this.clientX=P.clientX!==void 0?P.clientX:P.pageX,this.clientY=P.clientY!==void 0?P.clientY:P.pageY,this.screenX=P.screenX||0,this.screenY=P.screenY||0),this.button=P.button,this.key=P.key||"",this.ctrlKey=P.ctrlKey,this.altKey=P.altKey,this.shiftKey=P.shiftKey,this.metaKey=P.metaKey,this.pointerId=P.pointerId||0,this.pointerType=typeof P.pointerType=="string"?P.pointerType:Z[P.pointerType]||"",this.state=P.state,this.i=P,P.defaultPrevented&&G.aa.h.call(this)}}p(G,F);var Z={2:"touch",3:"pen",4:"mouse"};G.prototype.h=function(){G.aa.h.call(this);var P=this.i;P.preventDefault?P.preventDefault():P.returnValue=!1};var J="closure_listenable_"+(1e6*Math.random()|0),W=0;function q(P,K,te,ae,Ee){this.listener=P,this.proxy=null,this.src=K,this.type=te,this.capture=!!ae,this.ha=Ee,this.key=++W,this.da=this.fa=!1}function ie(P){P.da=!0,P.listener=null,P.proxy=null,P.src=null,P.ha=null}function re(P){this.src=P,this.g={},this.h=0}re.prototype.add=function(P,K,te,ae,Ee){var Ne=P.toString();P=this.g[Ne],P||(P=this.g[Ne]=[],this.h++);var xt=ve(P,K,ae,Ee);return-1>>0);function Jt(P){return typeof P=="function"?P:(P[Je]||(P[Je]=function(K){return P.handleEvent(K)}),P[Je])}function Et(){z.call(this),this.i=new re(this),this.M=this,this.F=null}p(Et,z),Et.prototype[J]=!0,Et.prototype.removeEventListener=function(P,K,te,ae){ke(this,P,K,te,ae)};function Bt(P,K){var te,ae=P.F;if(ae)for(te=[];ae;ae=ae.F)te.push(ae);if(P=P.M,ae=K.type||K,typeof K=="string")K=new F(K,P);else if(K instanceof F)K.target=K.target||P;else{var Ee=K;K=new F(ae,P),E(K,Ee)}if(Ee=!0,te)for(var Ne=te.length-1;0<=Ne;Ne--){var xt=K.g=te[Ne];Ee=Zi(xt,ae,!0,K)&&Ee}if(xt=K.g=P,Ee=Zi(xt,ae,!0,K)&&Ee,Ee=Zi(xt,ae,!1,K)&&Ee,te)for(Ne=0;Ne{P.g=null,P.i&&(P.i=!1,ji(P))},P.l);let K=P.h;P.h=null,P.m.apply(null,K)}class jt extends z{constructor(K,te){super(),this.m=K,this.l=te,this.h=null,this.i=!1,this.g=null}j(K){this.h=arguments,this.g?this.i=!0:ji(this)}N(){super.N(),this.g&&(o.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Ei(P){z.call(this),this.h=P,this.g={}}p(Ei,z);var Br=[];function Qs(P){C(P.g,function(K,te){this.g.hasOwnProperty(te)&&qe(K)},P),P.g={}}Ei.prototype.N=function(){Ei.aa.N.call(this),Qs(this)},Ei.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Cr=o.JSON.stringify,ds=o.JSON.parse,Ks=class{stringify(P){return o.JSON.stringify(P,void 0)}parse(P){return o.JSON.parse(P,void 0)}};function gf(){}gf.prototype.h=null;function xg(P){return P.h||(P.h=P.i())}function ex(){}var Au={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function gd(){F.call(this,"d")}p(gd,F);function bg(){F.call(this,"c")}p(bg,F);var gc={},tx=null;function vf(){return tx=tx||new Et}gc.La="serverreachability";function ix(P){F.call(this,gc.La,P)}p(ix,F);function Iu(P){let K=vf();Bt(K,new ix(K))}gc.STAT_EVENT="statevent";function nx(P,K){F.call(this,gc.STAT_EVENT,P),this.stat=K}p(nx,F);function us(P){let K=vf();Bt(K,new nx(K,P))}gc.Ma="timingevent";function yf(P,K){F.call(this,gc.Ma,P),this.size=K}p(yf,F);function Ru(P,K){if(typeof P!="function")throw Error("Fn must not be null and must be a function");return o.setTimeout(function(){P()},K)}function Pu(){this.g=!0}Pu.prototype.xa=function(){this.g=!1};function XS(P,K,te,ae,Ee,Ne){P.info(function(){if(P.g)if(Ne)for(var xt="",_n=Ne.split("&"),hs=0;hs<_n.length;hs++){var Ji=_n[hs].split("=");if(1ae.length)){var Ee=ae[1];if(Array.isArray(Ee)&&!(1>Ee.length)){var Ne=Ee[0];if(Ne!="noop"&&Ne!="stop"&&Ne!="close")for(var xt=1;xtMs)&&(Ms!=3||this.g&&(this.h.h||this.g.oa()||o3(this.g)))){this.J||Ms!=4||K==7||(K==8||0>=wf?Iu(3):Iu(2)),Zr(this);var te=this.g.Z();this.X=te;t:if(gt(this)){var ae=o3(this.g);P="";var Ee=ae.length,Ne=xc(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){gr(this),In(this);var xt="";break t}this.h.i=new o.TextDecoder}for(K=0;KK.length?lt:(K=K.slice(ae,ae+te),P.C=ae+te,K)))}De.prototype.cancel=function(){this.J=!0,gr(this)};function ii(P){P.S=Date.now()+P.I,un(P,P.I)}function un(P,K){if(P.B!=null)throw Error("WatchDog timer not null");P.B=Ru(u(P.ba,P),K)}function Zr(P){P.B&&(o.clearTimeout(P.B),P.B=null)}De.prototype.ba=function(){this.B=null;let P=Date.now();0<=P-this.S?(le(this.i,this.A),this.L!=2&&(Iu(),us(17)),gr(this),this.s=2,In(this)):un(this,this.S-P)};function In(P){P.j.G==0||P.J||m3(P.j,P)}function gr(P){Zr(P);var K=P.M;K&&typeof K.ma=="function"&&K.ma(),P.M=null,Qs(P.U),P.g&&(K=P.g,P.g=null,K.abort(),K.ma())}function vc(P,K){try{var te=P.j;if(te.G!=0&&(te.g==P||YS(te.h,P))){if(!P.K&&YS(te.h,P)&&te.G==3){try{var ae=te.Da.g.parse(K)}catch{ae=null}if(Array.isArray(ae)&&ae.length==3){var Ee=ae;if(Ee[0]==0){e:if(!te.u){if(te.g)if(te.g.F+3e3Ee[2]&&te.F&&te.v==0&&!te.C&&(te.C=Ru(u(te.Za,te),6e3));if(1>=_o(te.h)&&te.ca){try{te.ca()}catch{}te.ca=void 0}}else Ou(te,11)}else if((P.K||te.g==P)&&ux(te),!y(K))for(Ee=te.Da.g.parse(K),K=0;K=P.j:!1}function _o(P){return P.h?1:P.g?P.g.size:0}function YS(P,K){return P.h?P.h==K:P.g?P.g.has(K):!1}function $S(P,K){P.g?P.g.add(K):P.h=K}function X4(P,K){P.h&&P.h==K?P.h=null:P.g&&P.g.has(K)&&P.g.delete(K)}Cl.prototype.cancel=function(){if(this.i=Y4(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(let P of this.g.values())P.cancel();this.g.clear()}};function Y4(P){if(P.h!=null)return P.i.concat(P.h.D);if(P.g!=null&&P.g.size!==0){let K=P.i;for(let te of P.g.values())K=K.concat(te.D);return K}return m(P.i)}function gq(P){if(P.V&&typeof P.V=="function")return P.V();if(typeof Map<"u"&&P instanceof Map||typeof Set<"u"&&P instanceof Set)return Array.from(P.values());if(typeof P=="string")return P.split("");if(d(P)){for(var K=[],te=P.length,ae=0;aeK)throw Error("Bad port number "+K);P.s=K}else P.s=null}function K4(P,K,te){K instanceof Cg?(P.i=K,Tq(P.i,P.h)):(te||(K=wg(K,wq)),P.i=new Cg(K,P.h))}function jn(P,K,te){P.i.set(K,te)}function ax(P){return jn(P,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),P}function _g(P,K){return P?K?decodeURI(P.replace(/%25/g,"%2525")):decodeURIComponent(P):""}function wg(P,K,te){return typeof P=="string"?(P=encodeURI(P).replace(K,xq),te&&(P=P.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),P):null}function xq(P){return P=P.charCodeAt(0),"%"+(P>>4&15).toString(16)+(P&15).toString(16)}var Z4=/[#\/\?@]/g,bq=/[#\?:]/g,_q=/[#\?]/g,wq=/[#\?@]/g,Cq=/#/g;function Cg(P,K){this.h=this.g=null,this.i=P||null,this.j=!!K}function vd(P){P.g||(P.g=new Map,P.h=0,P.i&&yq(P.i,function(K,te){P.add(decodeURIComponent(K.replace(/\+/g," ")),te)}))}t=Cg.prototype,t.add=function(P,K){vd(this),this.i=null,P=bf(this,P);var te=this.g.get(P);return te||this.g.set(P,te=[]),te.push(K),this.h+=1,this};function J4(P,K){vd(P),K=bf(P,K),P.g.has(K)&&(P.i=null,P.h-=P.g.get(K).length,P.g.delete(K))}function q4(P,K){return vd(P),K=bf(P,K),P.g.has(K)}t.forEach=function(P,K){vd(this),this.g.forEach(function(te,ae){te.forEach(function(Ee){P.call(K,Ee,ae,this)},this)},this)},t.na=function(){vd(this);let P=Array.from(this.g.values()),K=Array.from(this.g.keys()),te=[];for(let ae=0;ae{ae.abort(),yd(te,"TestPingServer: timeout",!1,K)},1e4);fetch(P,{signal:ae.signal}).then(Ne=>{clearTimeout(Ee),Ne.ok?yd(te,"TestPingServer: ok",!0,K):yd(te,"TestPingServer: server error",!1,K)}).catch(()=>{clearTimeout(Ee),yd(te,"TestPingServer: error",!1,K)})}function yd(P,K,te,ae,Ee){try{Ee&&(Ee.onload=null,Ee.onerror=null,Ee.onabort=null,Ee.ontimeout=null),ae(te)}catch{}}function Dq(){this.g=new Ks}function Mq(P,K,te){let ae=te||"";try{$4(P,function(Ee,Ne){let xt=Ee;l(Ee)&&(xt=Cr(Ee)),K.push(ae+Ne+"="+encodeURIComponent(xt))})}catch(Ee){throw K.push(ae+"type="+encodeURIComponent("_badmap")),Ee}}function Tg(P){this.l=P.Ub||null,this.j=P.eb||!1}p(Tg,gf),Tg.prototype.g=function(){return new ox(this.l,this.j)},Tg.prototype.i=function(P){return function(){return P}}({});function ox(P,K){Et.call(this),this.D=P,this.o=K,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}p(ox,Et),t=ox.prototype,t.open=function(P,K){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=P,this.A=K,this.readyState=1,Eg(this)},t.send=function(P){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;let K={headers:this.u,method:this.B,credentials:this.m,cache:void 0};P&&(K.body=P),(this.D||o).fetch(new Request(this.A,K)).then(this.Sa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,Sg(this)),this.readyState=0},t.Sa=function(P){if(this.g&&(this.l=P,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=P.headers,this.readyState=2,Eg(this)),this.g&&(this.readyState=3,Eg(this),this.g)))if(this.responseType==="arraybuffer")P.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof o.ReadableStream<"u"&&"body"in P){if(this.j=P.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;t3(this)}else P.text().then(this.Ra.bind(this),this.ga.bind(this))};function t3(P){P.j.read().then(P.Pa.bind(P)).catch(P.ga.bind(P))}t.Pa=function(P){if(this.g){if(this.o&&P.value)this.response.push(P.value);else if(!this.o){var K=P.value?P.value:new Uint8Array(0);(K=this.v.decode(K,{stream:!P.done}))&&(this.response=this.responseText+=K)}P.done?Sg(this):Eg(this),this.readyState==3&&t3(this)}},t.Ra=function(P){this.g&&(this.response=this.responseText=P,Sg(this))},t.Qa=function(P){this.g&&(this.response=P,Sg(this))},t.ga=function(){this.g&&Sg(this)};function Sg(P){P.readyState=4,P.l=null,P.j=null,P.v=null,Eg(P)}t.setRequestHeader=function(P,K){this.u.append(P,K)},t.getResponseHeader=function(P){return this.h&&this.h.get(P.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";let P=[],K=this.h.entries();for(var te=K.next();!te.done;)te=te.value,P.push(te[0]+": "+te[1]),te=K.next();return P.join(`\r +`)};function Eg(P){P.onreadystatechange&&P.onreadystatechange.call(P)}Object.defineProperty(ox.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(P){this.m=P?"include":"same-origin"}});function i3(P){let K="";return C(P,function(te,ae){K+=ae,K+=":",K+=te,K+=`\r +`}),K}function QS(P,K,te){e:{for(ae in te){var ae=!1;break e}ae=!0}ae||(te=i3(te),typeof P=="string"?te!=null&&encodeURIComponent(String(te)):jn(P,K,te))}function or(P){Et.call(this),this.headers=new Map,this.o=P||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}p(or,Et);var Aq=/^https?$/i,Iq=["POST","PUT"];t=or.prototype,t.Ha=function(P){this.J=P},t.ea=function(P,K,te,ae){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+P);K=K?K.toUpperCase():"GET",this.D=P,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Ie.g(),this.v=this.o?xg(this.o):xg(Ie),this.g.onreadystatechange=u(this.Ea,this);try{this.B=!0,this.g.open(K,String(P),!0),this.B=!1}catch(Ne){n3(this,Ne);return}if(P=te||"",te=new Map(this.headers),ae)if(Object.getPrototypeOf(ae)===Object.prototype)for(var Ee in ae)te.set(Ee,ae[Ee]);else if(typeof ae.keys=="function"&&typeof ae.get=="function")for(let Ne of ae.keys())te.set(Ne,ae.get(Ne));else throw Error("Unknown input type for opt_headers: "+String(ae));ae=Array.from(te.keys()).find(Ne=>Ne.toLowerCase()=="content-type"),Ee=o.FormData&&P instanceof o.FormData,!(0<=Array.prototype.indexOf.call(Iq,K,void 0))||ae||Ee||te.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(let[Ne,xt]of te)this.g.setRequestHeader(Ne,xt);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{a3(this),this.u=!0,this.g.send(P),this.u=!1}catch(Ne){n3(this,Ne)}};function n3(P,K){P.h=!1,P.g&&(P.j=!0,P.g.abort(),P.j=!1),P.l=K,P.m=5,r3(P),lx(P)}function r3(P){P.A||(P.A=!0,Bt(P,"complete"),Bt(P,"error"))}t.abort=function(P){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=P||7,Bt(this,"complete"),Bt(this,"abort"),lx(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),lx(this,!0)),or.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?s3(this):this.bb())},t.bb=function(){s3(this)};function s3(P){if(P.h&&typeof s<"u"&&(!P.v[1]||xc(P)!=4||P.Z()!=2)){if(P.u&&xc(P)==4)Si(P.Ea,0,P);else if(Bt(P,"readystatechange"),xc(P)==4){P.h=!1;try{let xt=P.Z();e:switch(xt){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var K=!0;break e;default:K=!1}var te;if(!(te=K)){var ae;if(ae=xt===0){var Ee=String(P.D).match(Q4)[1]||null;!Ee&&o.self&&o.self.location&&(Ee=o.self.location.protocol.slice(0,-1)),ae=!Aq.test(Ee?Ee.toLowerCase():"")}te=ae}if(te)Bt(P,"complete"),Bt(P,"success");else{P.m=6;try{var Ne=2{}:null;P.g=null,P.v=null,K||Bt(P,"ready");try{te.onreadystatechange=ae}catch{}}}function a3(P){P.I&&(o.clearTimeout(P.I),P.I=null)}t.isActive=function(){return!!this.g};function xc(P){return P.g?P.g.readyState:0}t.Z=function(){try{return 2=P.h.j-(P.s?1:0)?!1:P.s?(P.i=K.D.concat(P.i),!0):P.G==1||P.G==2||P.B>=(P.Va?0:P.Wa)?!1:(P.s=Ru(u(P.Ga,P,K),p3(P,P.B)),P.B++,!0)}t.Ga=function(P){if(this.s)if(this.s=null,this.G==1){if(!P){this.U=Math.floor(1e5*Math.random()),P=this.U++;let Ee=new De(this,this.j,P),Ne=this.o;if(this.S&&(Ne?(Ne=T(Ne),E(Ne,this.S)):Ne=this.S),this.m!==null||this.O||(Ee.H=Ne,Ne=null),this.P)e:{for(var K=0,te=0;teJi)Ne=Math.max(0,Ee[hs].g-100),_n=!1;else try{Mq(Ds,xt,"req"+Ji+"_")}catch{ae&&ae(Ds)}}if(_n){ae=xt.join("&");break e}}}return P=P.i.splice(0,te),K.D=P,ae}function h3(P){if(!P.g&&!P.u){P.Y=1;var K=P.Fa;O||X(),N||(O(),N=!0),H.add(K,P),P.v=0}}function ZS(P){return P.g||P.u||3<=P.v?!1:(P.Y++,P.u=Ru(u(P.Fa,P),p3(P,P.v)),P.v++,!0)}t.Fa=function(){if(this.u=null,f3(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var P=2*this.R;this.j.info("BP detection timer enabled: "+P),this.A=Ru(u(this.ab,this),P)}},t.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,us(10),cx(this),f3(this))};function JS(P){P.A!=null&&(o.clearTimeout(P.A),P.A=null)}function f3(P){P.g=new De(P,P.j,"rpc",P.Y),P.m===null&&(P.g.H=P.o),P.g.O=0;var K=yc(P.qa);jn(K,"RID","rpc"),jn(K,"SID",P.K),jn(K,"AID",P.T),jn(K,"CI",P.F?"0":"1"),!P.F&&P.ja&&jn(K,"TO",P.ja),jn(K,"TYPE","xmlhttp"),Mg(P,K),P.m&&P.o&&QS(K,P.m,P.o),P.L&&(P.g.I=P.L);var te=P.g;P=P.ia,te.L=1,te.v=ax(yc(K)),te.m=null,te.P=!0,Dt(te,P)}t.Za=function(){this.C!=null&&(this.C=null,cx(this),ZS(this),us(19))};function ux(P){P.C!=null&&(o.clearTimeout(P.C),P.C=null)}function m3(P,K){var te=null;if(P.g==K){ux(P),JS(P),P.g=null;var ae=2}else if(YS(P.h,K))te=K.D,X4(P.h,K),ae=1;else return;if(P.G!=0){if(K.o)if(ae==1){te=K.m?K.m.length:0,K=Date.now()-K.F;var Ee=P.B;ae=vf(),Bt(ae,new yf(ae,te)),dx(P)}else h3(P);else if(Ee=K.s,Ee==3||Ee==0&&0`${this.name}: [code=${this.code}]: ${this.message}`}};var Zl=class{constructor(){this.promise=new Promise((i,e)=>{this.resolve=i,this.reject=e})}};var iC=class{constructor(i,e){this.user=e,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${i}`)}},RR=class{getToken(){return Promise.resolve(null)}invalidateToken(){}start(i,e){i.enqueueRetryable(()=>e(os.UNAUTHENTICATED))}shutdown(){}},PR=class{constructor(i){this.token=i,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(i,e){this.changeListener=e,i.enqueueRetryable(()=>e(this.token.user))}shutdown(){this.changeListener=null}},kR=class{constructor(i){this.t=i,this.currentUser=os.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(i,e){let r=this.i,n=d=>this.i!==r?(r=this.i,e(d)):Promise.resolve(),a=new Zl;this.o=()=>{this.i++,this.currentUser=this.u(),a.resolve(),a=new Zl,i.enqueueRetryable(()=>n(this.currentUser))};let s=()=>{let d=a;i.enqueueRetryable(()=>Ve(this,null,function*(){yield d.promise,yield n(this.currentUser)}))},o=d=>{Ot("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=d,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(d=>o(d)),setTimeout(()=>{if(!this.auth){let d=this.t.getImmediate({optional:!0});d?o(d):(Ot("FirebaseAuthCredentialsProvider","Auth not yet detected"),a.resolve(),a=new Zl)}},0),s()}getToken(){let i=this.i,e=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(e).then(r=>this.i!==i?(Ot("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Vn(typeof r.accessToken=="string"),new iC(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){let i=this.auth&&this.auth.getUid();return Vn(i===null||typeof i=="string"),new os(i)}},FR=class{constructor(i,e,r){this.l=i,this.h=e,this.P=r,this.type="FirstParty",this.user=os.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);let i=this.T();return i&&this.I.set("Authorization",i),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}},OR=class{constructor(i,e,r){this.l=i,this.h=e,this.P=r}getToken(){return Promise.resolve(new FR(this.l,this.h,this.P))}start(i,e){i.enqueueRetryable(()=>e(os.FIRST_PARTY))}shutdown(){}invalidateToken(){}},LR=class{constructor(i){this.value=i,this.type="AppCheck",this.headers=new Map,i&&i.length>0&&this.headers.set("x-firebase-appcheck",this.value)}},NR=class{constructor(i){this.A=i,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(i,e){let r=a=>{a.error!=null&&Ot("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${a.error.message}`);let s=a.token!==this.R;return this.R=a.token,Ot("FirebaseAppCheckTokenProvider",`Received ${s?"new":"existing"} token.`),s?e(a.token):Promise.resolve()};this.o=a=>{i.enqueueRetryable(()=>r(a))};let n=a=>{Ot("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=a,this.appCheck.addTokenListener(this.o)};this.A.onInit(a=>n(a)),setTimeout(()=>{if(!this.appCheck){let a=this.A.getImmediate({optional:!0});a?n(a):Ot("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let i=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(i).then(e=>e?(Vn(typeof e.token=="string"),this.R=e.token,new LR(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}};function m1e(t){let i=typeof self<"u"&&(self.crypto||self.msCrypto),e=new Uint8Array(t);if(i&&typeof i.getRandomValues=="function")i.getRandomValues(e);else for(let r=0;ri?1:0}function mp(t,i,e){return t.length===i.length&&t.every((r,n)=>e(r,i[n]))}var $r=class t{constructor(i,e){if(this.seconds=i,this.nanoseconds=e,e<0)throw new It(tt.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new It(tt.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(i<-62135596800)throw new It(tt.INVALID_ARGUMENT,"Timestamp seconds out of range: "+i);if(i>=253402300800)throw new It(tt.INVALID_ARGUMENT,"Timestamp seconds out of range: "+i)}static now(){return t.fromMillis(Date.now())}static fromDate(i){return t.fromMillis(i.getTime())}static fromMillis(i){let e=Math.floor(i/1e3),r=Math.floor(1e6*(i-1e3*e));return new t(e,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(i){return this.seconds===i.seconds?nn(this.nanoseconds,i.nanoseconds):nn(this.seconds,i.seconds)}isEqual(i){return i.seconds===this.seconds&&i.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){let i=this.seconds- -62135596800;return String(i).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}};var vi=class t{constructor(i){this.timestamp=i}static fromTimestamp(i){return new t(i)}static min(){return new t(new $r(0,0))}static max(){return new t(new $r(253402300799,999999999))}compareTo(i){return this.timestamp._compareTo(i.timestamp)}isEqual(i){return this.timestamp.isEqual(i.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}};var rC=class t{constructor(i,e,r){e===void 0?e=0:e>i.length&&ai(),r===void 0?r=i.length-e:r>i.length-e&&ai(),this.segments=i,this.offset=e,this.len=r}get length(){return this.len}isEqual(i){return t.comparator(this,i)===0}child(i){let e=this.segments.slice(this.offset,this.limit());return i instanceof t?i.forEach(r=>{e.push(r)}):e.push(i),this.construct(e)}limit(){return this.offset+this.length}popFirst(i){return i=i===void 0?1:i,this.construct(this.segments,this.offset+i,this.length-i)}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(i){return this.segments[this.offset+i]}isEmpty(){return this.length===0}isPrefixOf(i){if(i.lengths)return 1}return i.lengthe.length?1:0}},rr=class t extends rC{construct(i,e,r){return new t(i,e,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...i){let e=[];for(let r of i){if(r.indexOf("//")>=0)throw new It(tt.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);e.push(...r.split("/").filter(n=>n.length>0))}return new t(e)}static emptyPath(){return new t([])}},p1e=/^[_a-zA-Z][_a-zA-Z0-9]*$/,fo=class t extends rC{construct(i,e,r){return new t(i,e,r)}static isValidIdentifier(i){return p1e.test(i)}canonicalString(){return this.toArray().map(i=>(i=i.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),t.isValidIdentifier(i)||(i="`"+i+"`"),i)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new t(["__name__"])}static fromServerFormat(i){let e=[],r="",n=0,a=()=>{if(r.length===0)throw new It(tt.INVALID_ARGUMENT,`Invalid field path (${i}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);e.push(r),r=""},s=!1;for(;n=2&&this.path.get(this.path.length-2)===i}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(i){return i!==null&&rr.comparator(this.path,i.path)===0}toString(){return this.path.toString()}static comparator(i,e){return rr.comparator(i.path,e.path)}static isDocumentKey(i){return i.length%2==0}static fromSegments(i){return new t(new rr(i.slice()))}};var BR=class{constructor(i,e,r,n){this.indexId=i,this.collectionGroup=e,this.fields=r,this.indexState=n}};BR.UNKNOWN_ID=-1;function g1e(t,i){let e=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,n=vi.fromTimestamp(r===1e9?new $r(e+1,0):new $r(e,r));return new Lh(n,Zt.empty(),i)}function v1e(t){return new Lh(t.readTime,t.key,-1)}var Lh=class t{constructor(i,e,r){this.readTime=i,this.documentKey=e,this.largestBatchId=r}static min(){return new t(vi.min(),Zt.empty(),-1)}static max(){return new t(vi.max(),Zt.empty(),-1)}};function y1e(t,i){let e=t.readTime.compareTo(i.readTime);return e!==0?e:(e=Zt.comparator(t.documentKey,i.documentKey),e!==0?e:nn(t.largestBatchId,i.largestBatchId))}var x1e="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",VR=class{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(i){this.onCommittedListeners.push(i)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(i=>i())}};function Wv(t){return Ve(this,null,function*(){if(t.code!==tt.FAILED_PRECONDITION||t.message!==x1e)throw t;Ot("LocalStore","Unexpectedly lost primary lease")})}var yt=class t{constructor(i){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,i(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(i){return this.next(void 0,i)}next(i,e){return this.callbackAttached&&ai(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(e,this.error):this.wrapSuccess(i,this.result):new t((r,n)=>{this.nextCallback=a=>{this.wrapSuccess(i,a).next(r,n)},this.catchCallback=a=>{this.wrapFailure(e,a).next(r,n)}})}toPromise(){return new Promise((i,e)=>{this.next(i,e)})}wrapUserFunction(i){try{let e=i();return e instanceof t?e:t.resolve(e)}catch(e){return t.reject(e)}}wrapSuccess(i,e){return i?this.wrapUserFunction(()=>i(e)):t.resolve(e)}wrapFailure(i,e){return i?this.wrapUserFunction(()=>i(e)):t.reject(e)}static resolve(i){return new t((e,r)=>{e(i)})}static reject(i){return new t((e,r)=>{r(i)})}static waitFor(i){return new t((e,r)=>{let n=0,a=0,s=!1;i.forEach(o=>{++n,o.next(()=>{++a,s&&a===n&&e()},d=>r(d))}),s=!0,a===n&&e()})}static or(i){let e=t.resolve(!1);for(let r of i)e=e.next(n=>n?t.resolve(n):r());return e}static forEach(i,e){let r=[];return i.forEach((n,a)=>{r.push(e.call(this,n,a))}),this.waitFor(r)}static mapArray(i,e){return new t((r,n)=>{let a=i.length,s=new Array(a),o=0;for(let d=0;d{s[l]=c,++o,o===a&&r(s)},c=>n(c))}})}static doWhile(i,e){return new t((r,n)=>{let a=()=>{i()===!0?e().next(()=>{a()},n):r()};a()})}};function b1e(t){let i=t.match(/Android ([\d.]+)/i),e=i?i[1].split(".").slice(0,2).join("."):"-1";return Number(e)}function Xv(t){return t.name==="IndexedDbTransactionError"}var Kz=(()=>{class t{constructor(e,r){this.previousValue=e,r&&(r.sequenceNumberHandler=n=>this.ie(n),this.se=n=>r.writeSequenceNumber(n))}ie(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.se&&this.se(e),e}}return t.oe=-1,t})();function PC(t){return t==null}function Pv(t){return t===0&&1/t==-1/0}function _1e(t){return typeof t=="number"&&Number.isInteger(t)&&!Pv(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}var w1e=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],Jot=[...w1e,"documentOverlays"],C1e=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],T1e=C1e,qot=[...T1e,"indexConfiguration","indexState","indexEntries"];function bz(t){let i=0;for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&i++;return i}function Sp(t,i){for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&i(e,t[e])}function Zz(t){for(let i in t)if(Object.prototype.hasOwnProperty.call(t,i))return!1;return!0}var mr=class t{constructor(i,e){this.comparator=i,this.root=e||Jl.EMPTY}insert(i,e){return new t(this.comparator,this.root.insert(i,e,this.comparator).copy(null,null,Jl.BLACK,null,null))}remove(i){return new t(this.comparator,this.root.remove(i,this.comparator).copy(null,null,Jl.BLACK,null,null))}get(i){let e=this.root;for(;!e.isEmpty();){let r=this.comparator(i,e.key);if(r===0)return e.value;r<0?e=e.left:r>0&&(e=e.right)}return null}indexOf(i){let e=0,r=this.root;for(;!r.isEmpty();){let n=this.comparator(i,r.key);if(n===0)return e+r.left.size;n<0?r=r.left:(e+=r.left.size+1,r=r.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(i){return this.root.inorderTraversal(i)}forEach(i){this.inorderTraversal((e,r)=>(i(e,r),!1))}toString(){let i=[];return this.inorderTraversal((e,r)=>(i.push(`${e}:${r}`),!1)),`{${i.join(", ")}}`}reverseTraversal(i){return this.root.reverseTraversal(i)}getIterator(){return new cp(this.root,null,this.comparator,!1)}getIteratorFrom(i){return new cp(this.root,i,this.comparator,!1)}getReverseIterator(){return new cp(this.root,null,this.comparator,!0)}getReverseIteratorFrom(i){return new cp(this.root,i,this.comparator,!0)}},cp=class{constructor(i,e,r,n){this.isReverse=n,this.nodeStack=[];let a=1;for(;!i.isEmpty();)if(a=e?r(i.key,e):1,e&&n&&(a*=-1),a<0)i=this.isReverse?i.left:i.right;else{if(a===0){this.nodeStack.push(i);break}this.nodeStack.push(i),i=this.isReverse?i.right:i.left}}getNext(){let i=this.nodeStack.pop(),e={key:i.key,value:i.value};if(this.isReverse)for(i=i.left;!i.isEmpty();)this.nodeStack.push(i),i=i.right;else for(i=i.right;!i.isEmpty();)this.nodeStack.push(i),i=i.left;return e}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;let i=this.nodeStack[this.nodeStack.length-1];return{key:i.key,value:i.value}}},Jl=class t{constructor(i,e,r,n,a){this.key=i,this.value=e,this.color=r??t.RED,this.left=n??t.EMPTY,this.right=a??t.EMPTY,this.size=this.left.size+1+this.right.size}copy(i,e,r,n,a){return new t(i??this.key,e??this.value,r??this.color,n??this.left,a??this.right)}isEmpty(){return!1}inorderTraversal(i){return this.left.inorderTraversal(i)||i(this.key,this.value)||this.right.inorderTraversal(i)}reverseTraversal(i){return this.right.reverseTraversal(i)||i(this.key,this.value)||this.left.reverseTraversal(i)}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(i,e,r){let n=this,a=r(i,n.key);return n=a<0?n.copy(null,null,null,n.left.insert(i,e,r),null):a===0?n.copy(null,e,null,null,null):n.copy(null,null,null,null,n.right.insert(i,e,r)),n.fixUp()}removeMin(){if(this.left.isEmpty())return t.EMPTY;let i=this;return i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.removeMin(),null),i.fixUp()}remove(i,e){let r,n=this;if(e(i,n.key)<0)n.left.isEmpty()||n.left.isRed()||n.left.left.isRed()||(n=n.moveRedLeft()),n=n.copy(null,null,null,n.left.remove(i,e),null);else{if(n.left.isRed()&&(n=n.rotateRight()),n.right.isEmpty()||n.right.isRed()||n.right.left.isRed()||(n=n.moveRedRight()),e(i,n.key)===0){if(n.right.isEmpty())return t.EMPTY;r=n.right.min(),n=n.copy(r.key,r.value,null,null,n.right.removeMin())}n=n.copy(null,null,null,null,n.right.remove(i,e))}return n.fixUp()}isRed(){return this.color}fixUp(){let i=this;return i.right.isRed()&&!i.left.isRed()&&(i=i.rotateLeft()),i.left.isRed()&&i.left.left.isRed()&&(i=i.rotateRight()),i.left.isRed()&&i.right.isRed()&&(i=i.colorFlip()),i}moveRedLeft(){let i=this.colorFlip();return i.right.left.isRed()&&(i=i.copy(null,null,null,null,i.right.rotateRight()),i=i.rotateLeft(),i=i.colorFlip()),i}moveRedRight(){let i=this.colorFlip();return i.left.left.isRed()&&(i=i.rotateRight(),i=i.colorFlip()),i}rotateLeft(){let i=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,i,null)}rotateRight(){let i=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,i)}colorFlip(){let i=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,i,e)}checkMaxDepth(){let i=this.check();return Math.pow(2,i)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw ai();let i=this.left.check();if(i!==this.right.check())throw ai();return i+(this.isRed()?0:1)}};Jl.EMPTY=null,Jl.RED=!0,Jl.BLACK=!1;Jl.EMPTY=new class{constructor(){this.size=0}get key(){throw ai()}get value(){throw ai()}get color(){throw ai()}get left(){throw ai()}get right(){throw ai()}copy(i,e,r,n,a){return this}insert(i,e,r){return new Jl(i,e)}remove(i,e){return this}isEmpty(){return!0}inorderTraversal(i){return!1}reverseTraversal(i){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};var Us=class t{constructor(i){this.comparator=i,this.data=new mr(this.comparator)}has(i){return this.data.get(i)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(i){return this.data.indexOf(i)}forEach(i){this.data.inorderTraversal((e,r)=>(i(e),!1))}forEachInRange(i,e){let r=this.data.getIteratorFrom(i[0]);for(;r.hasNext();){let n=r.getNext();if(this.comparator(n.key,i[1])>=0)return;e(n.key)}}forEachWhile(i,e){let r;for(r=e!==void 0?this.data.getIteratorFrom(e):this.data.getIterator();r.hasNext();)if(!i(r.getNext().key))return}firstAfterOrEqual(i){let e=this.data.getIteratorFrom(i);return e.hasNext()?e.getNext().key:null}getIterator(){return new sC(this.data.getIterator())}getIteratorFrom(i){return new sC(this.data.getIteratorFrom(i))}add(i){return this.copy(this.data.remove(i).insert(i,!0))}delete(i){return this.has(i)?this.copy(this.data.remove(i)):this}isEmpty(){return this.data.isEmpty()}unionWith(i){let e=this;return e.size{e=e.add(r)}),e}isEqual(i){if(!(i instanceof t)||this.size!==i.size)return!1;let e=this.data.getIterator(),r=i.data.getIterator();for(;e.hasNext();){let n=e.getNext().key,a=r.getNext().key;if(this.comparator(n,a)!==0)return!1}return!0}toArray(){let i=[];return this.forEach(e=>{i.push(e)}),i}toString(){let i=[];return this.forEach(e=>i.push(e)),"SortedSet("+i.toString()+")"}copy(i){let e=new t(this.comparator);return e.data=i,e}},sC=class{constructor(i){this.iter=i}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}};var Kl=class t{constructor(i){this.fields=i,i.sort(fo.comparator)}static empty(){return new t([])}unionWith(i){let e=new Us(fo.comparator);for(let r of this.fields)e=e.add(r);for(let r of i)e=e.add(r);return new t(e.toArray())}covers(i){for(let e of this.fields)if(e.isPrefixOf(i))return!0;return!1}isEqual(i){return mp(this.fields,i.fields,(e,r)=>e.isEqual(r))}};var aC=class extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}};var fa=class t{constructor(i){this.binaryString=i}static fromBase64String(i){let e=function(n){try{return atob(n)}catch(a){throw typeof DOMException<"u"&&a instanceof DOMException?new aC("Invalid base64 string: "+a):a}}(i);return new t(e)}static fromUint8Array(i){let e=function(n){let a="";for(let s=0;sitc(e,i))!==void 0}function pp(t,i){if(t===i)return 0;let e=Nh(t),r=Nh(i);if(e!==r)return nn(e,r);switch(e){case 0:case 9007199254740991:return 0;case 1:return nn(t.booleanValue,i.booleanValue);case 2:return function(a,s){let o=fr(a.integerValue||a.doubleValue),d=fr(s.integerValue||s.doubleValue);return od?1:o===d?0:isNaN(o)?isNaN(d)?0:-1:1}(t,i);case 3:return _z(t.timestampValue,i.timestampValue);case 4:return _z(kv(t),kv(i));case 5:return nn(t.stringValue,i.stringValue);case 6:return function(a,s){let o=su(a),d=su(s);return o.compareTo(d)}(t.bytesValue,i.bytesValue);case 7:return function(a,s){let o=a.split("/"),d=s.split("/");for(let l=0;li.mapValue.fields[e]=Mv(r)),i}if(t.arrayValue){let i={arrayValue:{values:[]}};for(let e=0;e<(t.arrayValue.values||[]).length;++e)i.arrayValue.values[e]=Mv(t.arrayValue.values[e]);return i}return Object.assign({},t)}function Jz(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}var fl=class t{constructor(i){this.value=i}static empty(){return new t({mapValue:{}})}field(i){if(i.isEmpty())return this.value;{let e=this.value;for(let r=0;r{if(!e.isImmediateParentOf(o)){let d=this.getFieldsMap(e);this.applyChanges(d,r,n),r={},n=[],e=o.popLast()}s?r[o.lastSegment()]=Mv(s):n.push(o.lastSegment())});let a=this.getFieldsMap(e);this.applyChanges(a,r,n)}delete(i){let e=this.field(i.popLast());eC(e)&&e.mapValue.fields&&delete e.mapValue.fields[i.lastSegment()]}isEqual(i){return tc(this.value,i.value)}getFieldsMap(i){let e=this.value;e.mapValue.fields||(e.mapValue={fields:{}});for(let r=0;ri[n]=a);for(let n of r)delete i[n]}clone(){return new t(Mv(this.value))}};function qz(t){let i=[];return Sp(t.fields,(e,r)=>{let n=new fo([e]);if(eC(r)){let a=qz(r.mapValue).fields;if(a.length===0)i.push(n);else for(let s of a)i.push(n.child(s))}else i.push(n)}),new Kl(i)}var ml=class t{constructor(i,e,r,n,a,s,o){this.key=i,this.documentType=e,this.version=r,this.readTime=n,this.createTime=a,this.data=s,this.documentState=o}static newInvalidDocument(i){return new t(i,0,vi.min(),vi.min(),vi.min(),fl.empty(),0)}static newFoundDocument(i,e,r,n){return new t(i,1,e,vi.min(),r,n,0)}static newNoDocument(i,e){return new t(i,2,e,vi.min(),vi.min(),fl.empty(),0)}static newUnknownDocument(i,e){return new t(i,3,e,vi.min(),vi.min(),fl.empty(),2)}convertToFoundDocument(i,e){return!this.createTime.isEqual(vi.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=i),this.version=i,this.documentType=1,this.data=e,this.documentState=0,this}convertToNoDocument(i){return this.version=i,this.documentType=2,this.data=fl.empty(),this.documentState=0,this}convertToUnknownDocument(i){return this.version=i,this.documentType=3,this.data=fl.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=vi.min(),this}setReadTime(i){return this.readTime=i,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(i){return i instanceof t&&this.key.isEqual(i.key)&&this.version.isEqual(i.version)&&this.documentType===i.documentType&&this.documentState===i.documentState&&this.data.isEqual(i.data)}mutableCopy(){return new t(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}};var vp=class{constructor(i,e){this.position=i,this.inclusive=e}};function Sz(t,i,e){let r=0;for(let n=0;n":return i>0;case">=":return i>=0;default:return ai()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}},pl=class t extends lC{constructor(i,e){super(),this.filters=i,this.op=e,this.ae=null}static create(i,e){return new t(i,e)}matches(i){return eG(this)?this.filters.find(e=>!e.matches(i))===void 0:this.filters.find(e=>e.matches(i))!==void 0}getFlattenedFilters(){return this.ae!==null||(this.ae=this.filters.reduce((i,e)=>i.concat(e.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}};function eG(t){return t.op==="and"}function tG(t){return D1e(t)&&eG(t)}function D1e(t){for(let i of t.filters)if(i instanceof pl)return!1;return!0}function HR(t){if(t instanceof Ir)return t.field.canonicalString()+t.op.toString()+gp(t.value);if(tG(t))return t.filters.map(i=>HR(i)).join(",");{let i=t.filters.map(e=>HR(e)).join(",");return`${t.op}(${i})`}}function iG(t,i){return t instanceof Ir?function(r,n){return n instanceof Ir&&r.op===n.op&&r.field.isEqual(n.field)&&tc(r.value,n.value)}(t,i):t instanceof pl?function(r,n){return n instanceof pl&&r.op===n.op&&r.filters.length===n.filters.length?r.filters.reduce((a,s,o)=>a&&iG(s,n.filters[o]),!0):!1}(t,i):void ai()}function nG(t){return t instanceof Ir?function(e){return`${e.field.canonicalString()} ${e.op} ${gp(e.value)}`}(t):t instanceof pl?function(e){return e.op.toString()+" {"+e.getFilters().map(nG).join(" ,")+"}"}(t):"Filter"}var jR=class extends Ir{constructor(i,e,r){super(i,e,r),this.key=Zt.fromName(r.referenceValue)}matches(i){let e=Zt.comparator(i.key,this.key);return this.matchesComparison(e)}},WR=class extends Ir{constructor(i,e){super(i,"in",e),this.keys=rG("in",e)}matches(i){return this.keys.some(e=>e.isEqual(i.key))}},XR=class extends Ir{constructor(i,e){super(i,"not-in",e),this.keys=rG("not-in",e)}matches(i){return!this.keys.some(e=>e.isEqual(i.key))}};function rG(t,i){var e;return(((e=i.arrayValue)===null||e===void 0?void 0:e.values)||[]).map(r=>Zt.fromName(r.referenceValue))}var YR=class extends Ir{constructor(i,e){super(i,"array-contains",e)}matches(i){let e=i.data.field(this.field);return vk(e)&&Fv(e.arrayValue,this.value)}},$R=class extends Ir{constructor(i,e){super(i,"in",e)}matches(i){let e=i.data.field(this.field);return e!==null&&Fv(this.value.arrayValue,e)}},QR=class extends Ir{constructor(i,e){super(i,"not-in",e)}matches(i){if(Fv(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let e=i.data.field(this.field);return e!==null&&!Fv(this.value.arrayValue,e)}},KR=class extends Ir{constructor(i,e){super(i,"array-contains-any",e)}matches(i){let e=i.data.field(this.field);return!(!vk(e)||!e.arrayValue.values)&&e.arrayValue.values.some(r=>Fv(this.value.arrayValue,r))}};var ZR=class{constructor(i,e=null,r=[],n=[],a=null,s=null,o=null){this.path=i,this.collectionGroup=e,this.orderBy=r,this.filters=n,this.limit=a,this.startAt=s,this.endAt=o,this.ue=null}};function Dz(t,i=null,e=[],r=[],n=null,a=null,s=null){return new ZR(t,i,e,r,n,a,s)}function yk(t){let i=fi(t);if(i.ue===null){let e=i.path.canonicalString();i.collectionGroup!==null&&(e+="|cg:"+i.collectionGroup),e+="|f:",e+=i.filters.map(r=>HR(r)).join(","),e+="|ob:",e+=i.orderBy.map(r=>function(a){return a.field.canonicalString()+a.dir}(r)).join(","),PC(i.limit)||(e+="|l:",e+=i.limit),i.startAt&&(e+="|lb:",e+=i.startAt.inclusive?"b:":"a:",e+=i.startAt.position.map(r=>gp(r)).join(",")),i.endAt&&(e+="|ub:",e+=i.endAt.inclusive?"a:":"b:",e+=i.endAt.position.map(r=>gp(r)).join(",")),i.ue=e}return i.ue}function xk(t,i){if(t.limit!==i.limit||t.orderBy.length!==i.orderBy.length)return!1;for(let e=0;e0?i.explicitOrderBy[i.explicitOrderBy.length-1].dir:"asc";(function(s){let o=new Us(fo.comparator);return s.filters.forEach(d=>{d.getFlattenedFilters().forEach(l=>{l.isInequality()&&(o=o.add(l.field))})}),o})(i).forEach(a=>{e.has(a.canonicalString())||a.isKeyField()||i.ce.push(new Bh(a,r))}),e.has(fo.keyField().canonicalString())||i.ce.push(new Bh(fo.keyField(),r))}return i.ce}function ql(t){let i=fi(t);return i.le||(i.le=A1e(i,Av(t))),i.le}function A1e(t,i){if(t.limitType==="F")return Dz(t.path,t.collectionGroup,i,t.filters,t.limit,t.startAt,t.endAt);{i=i.map(n=>{let a=n.dir==="desc"?"asc":"desc";return new Bh(n.field,a)});let e=t.endAt?new vp(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new vp(t.startAt.position,t.startAt.inclusive):null;return Dz(t.path,t.collectionGroup,i,t.filters,t.limit,e,r)}}function qR(t,i){let e=t.filters.concat([i]);return new au(t.path,t.collectionGroup,t.explicitOrderBy.slice(),e,t.limit,t.limitType,t.startAt,t.endAt)}function cC(t,i,e){return new au(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),i,e,t.startAt,t.endAt)}function kC(t,i){return xk(ql(t),ql(i))&&t.limitType===i.limitType}function oG(t){return`${yk(ql(t))}|lt:${t.limitType}`}function ap(t){return`Query(target=${function(e){let r=e.path.canonicalString();return e.collectionGroup!==null&&(r+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(r+=`, filters: [${e.filters.map(n=>nG(n)).join(", ")}]`),PC(e.limit)||(r+=", limit: "+e.limit),e.orderBy.length>0&&(r+=`, orderBy: [${e.orderBy.map(n=>function(s){return`${s.field.canonicalString()} (${s.dir})`}(n)).join(", ")}]`),e.startAt&&(r+=", startAt: ",r+=e.startAt.inclusive?"b:":"a:",r+=e.startAt.position.map(n=>gp(n)).join(",")),e.endAt&&(r+=", endAt: ",r+=e.endAt.inclusive?"a:":"b:",r+=e.endAt.position.map(n=>gp(n)).join(",")),`Target(${r})`}(ql(t))}; limitType=${t.limitType})`}function FC(t,i){return i.isFoundDocument()&&function(r,n){let a=n.key.path;return r.collectionGroup!==null?n.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(a):Zt.isDocumentKey(r.path)?r.path.isEqual(a):r.path.isImmediateParentOf(a)}(t,i)&&function(r,n){for(let a of Av(r))if(!a.field.isKeyField()&&n.data.field(a.field)===null)return!1;return!0}(t,i)&&function(r,n){for(let a of r.filters)if(!a.matches(n))return!1;return!0}(t,i)&&function(r,n){return!(r.startAt&&!function(s,o,d){let l=Sz(s,o,d);return s.inclusive?l<=0:l<0}(r.startAt,Av(r),n)||r.endAt&&!function(s,o,d){let l=Sz(s,o,d);return s.inclusive?l>=0:l>0}(r.endAt,Av(r),n))}(t,i)}function I1e(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function lG(t){return(i,e)=>{let r=!1;for(let n of Av(t)){let a=R1e(n,i,e);if(a!==0)return a;r=r||n.field.isKeyField()}return 0}}function R1e(t,i,e){let r=t.field.isKeyField()?Zt.comparator(i.key,e.key):function(a,s,o){let d=s.data.field(a),l=o.data.field(a);return d!==null&&l!==null?pp(d,l):ai()}(t.field,i,e);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return ai()}}var ou=class{constructor(i,e){this.mapKeyFn=i,this.equalsFn=e,this.inner={},this.innerSize=0}get(i){let e=this.mapKeyFn(i),r=this.inner[e];if(r!==void 0){for(let[n,a]of r)if(this.equalsFn(n,i))return a}}has(i){return this.get(i)!==void 0}set(i,e){let r=this.mapKeyFn(i),n=this.inner[r];if(n===void 0)return this.inner[r]=[[i,e]],void this.innerSize++;for(let a=0;a{for(let[n,a]of r)i(n,a)})}isEmpty(){return Zz(this.inner)}size(){return this.innerSize}};var P1e=new mr(Zt.comparator);function qc(){return P1e}var cG=new mr(Zt.comparator);function Dv(...t){let i=cG;for(let e of t)i=i.insert(e.key,e);return i}function dG(t){let i=cG;return t.forEach((e,r)=>i=i.insert(e,r.overlayedDocument)),i}function Ph(){return Iv()}function uG(){return Iv()}function Iv(){return new ou(t=>t.toString(),(t,i)=>t.isEqual(i))}var k1e=new mr(Zt.comparator),F1e=new Us(Zt.comparator);function Ni(...t){let i=F1e;for(let e of t)i=i.add(e);return i}var O1e=new Us(nn);function L1e(){return O1e}function hG(t,i){if(t.useProto3Json){if(isNaN(i))return{doubleValue:"NaN"};if(i===1/0)return{doubleValue:"Infinity"};if(i===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Pv(i)?"-0":i}}function fG(t){return{integerValue:""+t}}function N1e(t,i){return _1e(i)?fG(i):hG(t,i)}var yp=class{constructor(){this._=void 0}};function B1e(t,i,e){return t instanceof xp?function(n,a){let s={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:n.seconds,nanos:n.nanoseconds}}}};return a&&pk(a)&&(a=gk(a)),a&&(s.fields.__previous_value__=a),{mapValue:s}}(e,i):t instanceof Vh?pG(t,i):t instanceof Uh?gG(t,i):function(n,a){let s=mG(n,a),o=Az(s)+Az(n.Pe);return GR(s)&&GR(n.Pe)?fG(o):hG(n.serializer,o)}(t,i)}function V1e(t,i,e){return t instanceof Vh?pG(t,i):t instanceof Uh?gG(t,i):e}function mG(t,i){return t instanceof bp?function(r){return GR(r)||function(a){return!!a&&"doubleValue"in a}(r)}(i)?i:{integerValue:0}:null}var xp=class extends yp{},Vh=class extends yp{constructor(i){super(),this.elements=i}};function pG(t,i){let e=vG(i);for(let r of t.elements)e.some(n=>tc(n,r))||e.push(r);return{arrayValue:{values:e}}}var Uh=class extends yp{constructor(i){super(),this.elements=i}};function gG(t,i){let e=vG(i);for(let r of t.elements)e=e.filter(n=>!tc(n,r));return{arrayValue:{values:e}}}var bp=class extends yp{constructor(i,e){super(),this.serializer=i,this.Pe=e}};function Az(t){return fr(t.integerValue||t.doubleValue)}function vG(t){return vk(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function U1e(t,i){return t.field.isEqual(i.field)&&function(r,n){return r instanceof Vh&&n instanceof Vh||r instanceof Uh&&n instanceof Uh?mp(r.elements,n.elements,tc):r instanceof bp&&n instanceof bp?tc(r.Pe,n.Pe):r instanceof xp&&n instanceof xp}(t.transform,i.transform)}var eP=class{constructor(i,e){this.version=i,this.transformResults=e}},Fh=class t{constructor(i,e){this.updateTime=i,this.exists=e}static none(){return new t}static exists(i){return new t(void 0,i)}static updateTime(i){return new t(i)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(i){return this.exists===i.exists&&(this.updateTime?!!i.updateTime&&this.updateTime.isEqual(i.updateTime):!i.updateTime)}};function tC(t,i){return t.updateTime!==void 0?i.isFoundDocument()&&i.version.isEqual(t.updateTime):t.exists===void 0||t.exists===i.isFoundDocument()}var _p=class{};function yG(t,i){if(!t.hasLocalMutations||i&&i.fields.length===0)return null;if(i===null)return t.isNoDocument()?new dC(t.key,Fh.none()):new zh(t.key,t.data,Fh.none());{let e=t.data,r=fl.empty(),n=new Us(fo.comparator);for(let a of i.fields)if(!n.has(a)){let s=e.field(a);s===null&&a.length>1&&(a=a.popLast(),s=e.field(a)),s===null?r.delete(a):r.set(a,s),n=n.add(a)}return new ed(t.key,r,new Kl(n.toArray()),Fh.none())}}function z1e(t,i,e){t instanceof zh?function(n,a,s){let o=n.value.clone(),d=Rz(n.fieldTransforms,a,s.transformResults);o.setAll(d),a.convertToFoundDocument(s.version,o).setHasCommittedMutations()}(t,i,e):t instanceof ed?function(n,a,s){if(!tC(n.precondition,a))return void a.convertToUnknownDocument(s.version);let o=Rz(n.fieldTransforms,a,s.transformResults),d=a.data;d.setAll(xG(n)),d.setAll(o),a.convertToFoundDocument(s.version,d).setHasCommittedMutations()}(t,i,e):function(n,a,s){a.convertToNoDocument(s.version).setHasCommittedMutations()}(0,i,e)}function Rv(t,i,e,r){return t instanceof zh?function(a,s,o,d){if(!tC(a.precondition,s))return o;let l=a.value.clone(),c=Pz(a.fieldTransforms,d,s);return l.setAll(c),s.convertToFoundDocument(s.version,l).setHasLocalMutations(),null}(t,i,e,r):t instanceof ed?function(a,s,o,d){if(!tC(a.precondition,s))return o;let l=Pz(a.fieldTransforms,d,s),c=s.data;return c.setAll(xG(a)),c.setAll(l),s.convertToFoundDocument(s.version,c).setHasLocalMutations(),o===null?null:o.unionWith(a.fieldMask.fields).unionWith(a.fieldTransforms.map(h=>h.field))}(t,i,e,r):function(a,s,o){return tC(a.precondition,s)?(s.convertToNoDocument(s.version).setHasLocalMutations(),null):o}(t,i,e)}function G1e(t,i){let e=null;for(let r of t.fieldTransforms){let n=i.data.field(r.field),a=mG(r.transform,n||null);a!=null&&(e===null&&(e=fl.empty()),e.set(r.field,a))}return e||null}function Iz(t,i){return t.type===i.type&&!!t.key.isEqual(i.key)&&!!t.precondition.isEqual(i.precondition)&&!!function(r,n){return r===void 0&&n===void 0||!(!r||!n)&&mp(r,n,(a,s)=>U1e(a,s))}(t.fieldTransforms,i.fieldTransforms)&&(t.type===0?t.value.isEqual(i.value):t.type!==1||t.data.isEqual(i.data)&&t.fieldMask.isEqual(i.fieldMask))}var zh=class extends _p{constructor(i,e,r,n=[]){super(),this.key=i,this.value=e,this.precondition=r,this.fieldTransforms=n,this.type=0}getFieldMask(){return null}},ed=class extends _p{constructor(i,e,r,n,a=[]){super(),this.key=i,this.data=e,this.fieldMask=r,this.precondition=n,this.fieldTransforms=a,this.type=1}getFieldMask(){return this.fieldMask}};function xG(t){let i=new Map;return t.fieldMask.fields.forEach(e=>{if(!e.isEmpty()){let r=t.data.field(e);i.set(e,r)}}),i}function Rz(t,i,e){let r=new Map;Vn(t.length===e.length);for(let n=0;n{let a=i.get(n.key),s=a.overlayedDocument,o=this.applyToLocalView(s,a.mutatedFields);o=e.has(n.key)?null:o;let d=yG(s,o);d!==null&&r.set(n.key,d),s.isValidDocument()||s.convertToNoDocument(vi.min())}),r}keys(){return this.mutations.reduce((i,e)=>i.add(e.key),Ni())}isEqual(i){return this.batchId===i.batchId&&mp(this.mutations,i.mutations,(e,r)=>Iz(e,r))&&mp(this.baseMutations,i.baseMutations,(e,r)=>Iz(e,r))}},nP=class t{constructor(i,e,r,n){this.batch=i,this.commitVersion=e,this.mutationResults=r,this.docVersions=n}static from(i,e,r){Vn(i.mutations.length===r.length);let n=function(){return k1e}(),a=i.mutations;for(let s=0;s=8)throw new kh(`Invalid padding: ${e}`);if(r<0)throw new kh(`Invalid hash count: ${r}`);if(i.length>0&&this.hashCount===0)throw new kh(`Invalid hash count: ${r}`);if(i.length===0&&e!==0)throw new kh(`Invalid padding when bitmap length is 0: ${e}`);this.Ie=8*i.length-e,this.Te=nu.fromNumber(this.Ie)}Ee(i,e,r){let n=i.add(e.multiply(nu.fromNumber(r)));return n.compare(W1e)===1&&(n=new nu([n.getBits(0),n.getBits(1)],0)),n.modulo(this.Te).toNumber()}de(i){return(this.bitmap[Math.floor(i/8)]&1<s.insert(o)),s}insert(i){if(this.Ie===0)return;let e=Fz(i),[r,n]=Oz(e);for(let a=0;a0&&(this.we=!0,this.pe=i)}Ce(){let i=Ni(),e=Ni(),r=Ni();return this.ge.forEach((n,a)=>{switch(a){case 0:i=i.add(n);break;case 2:e=e.add(n);break;case 1:r=r.add(n);break;default:ai()}}),new Ov(this.pe,this.ye,i,e,r)}ve(){this.we=!1,this.ge=Nz()}Fe(i,e){this.we=!0,this.ge=this.ge.insert(i,e)}Me(i){this.we=!0,this.ge=this.ge.remove(i)}xe(){this.fe+=1}Oe(){this.fe-=1,Vn(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}},oP=class{constructor(i){this.Le=i,this.Be=new Map,this.ke=qc(),this.qe=Lz(),this.Qe=new mr(nn)}Ke(i){for(let e of i.Re)i.Ve&&i.Ve.isFoundDocument()?this.$e(e,i.Ve):this.Ue(e,i.key,i.Ve);for(let e of i.removedTargetIds)this.Ue(e,i.key,i.Ve)}We(i){this.forEachTarget(i,e=>{let r=this.Ge(e);switch(i.state){case 0:this.ze(e)&&r.De(i.resumeToken);break;case 1:r.Oe(),r.Se||r.ve(),r.De(i.resumeToken);break;case 2:r.Oe(),r.Se||this.removeTarget(e);break;case 3:this.ze(e)&&(r.Ne(),r.De(i.resumeToken));break;case 4:this.ze(e)&&(this.je(e),r.De(i.resumeToken));break;default:ai()}})}forEachTarget(i,e){i.targetIds.length>0?i.targetIds.forEach(e):this.Be.forEach((r,n)=>{this.ze(n)&&e(n)})}He(i){let e=i.targetId,r=i.me.count,n=this.Je(e);if(n){let a=n.target;if(JR(a))if(r===0){let s=new Zt(a.path);this.Ue(e,s,ml.newNoDocument(s,vi.min()))}else Vn(r===1);else{let s=this.Ye(e);if(s!==r){let o=this.Ze(i),d=o?this.Xe(o,i,s):1;if(d!==0){this.je(e);let l=d===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Qe=this.Qe.insert(e,l)}kz?.et(function(c,h,u,f,p){var m,g,v,y,x,b;let _={localCacheCount:c,existenceFilterCount:h.count,databaseId:u.database,projectId:u.projectId},C=h.unchangedNames;return C&&(_.bloomFilter={applied:p===0,hashCount:(m=C?.hashCount)!==null&&m!==void 0?m:0,bitmapLength:(y=(v=(g=C?.bits)===null||g===void 0?void 0:g.bitmap)===null||v===void 0?void 0:v.length)!==null&&y!==void 0?y:0,padding:(b=(x=C?.bits)===null||x===void 0?void 0:x.padding)!==null&&b!==void 0?b:0,mightContain:w=>{var T;return(T=f?.mightContain(w))!==null&&T!==void 0&&T}}),_}(s,i.me,this.Le.tt(),o,d))}}}}Ze(i){let e=i.me.unchangedNames;if(!e||!e.bits)return null;let{bits:{bitmap:r="",padding:n=0},hashCount:a=0}=e,s,o;try{s=su(r).toUint8Array()}catch(d){if(d instanceof aC)return fp("Decoding the base64 bloom filter in existence filter failed ("+d.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw d}try{o=new aP(s,n,a)}catch(d){return fp(d instanceof kh?"BloomFilter error: ":"Applying bloom filter failed: ",d),null}return o.Ie===0?null:o}Xe(i,e,r){return e.me.count===r-this.nt(i,e.targetId)?0:2}nt(i,e){let r=this.Le.getRemoteKeysForTarget(e),n=0;return r.forEach(a=>{let s=this.Le.tt(),o=`projects/${s.projectId}/databases/${s.database}/documents/${a.path.canonicalString()}`;i.mightContain(o)||(this.Ue(e,a,null),n++)}),n}rt(i){let e=new Map;this.Be.forEach((a,s)=>{let o=this.Je(s);if(o){if(a.current&&JR(o.target)){let d=new Zt(o.target.path);this.ke.get(d)!==null||this.it(s,d)||this.Ue(s,d,ml.newNoDocument(d,i))}a.be&&(e.set(s,a.Ce()),a.ve())}});let r=Ni();this.qe.forEach((a,s)=>{let o=!0;s.forEachWhile(d=>{let l=this.Je(d);return!l||l.purpose==="TargetPurposeLimboResolution"||(o=!1,!1)}),o&&(r=r.add(a))}),this.ke.forEach((a,s)=>s.setReadTime(i));let n=new uC(i,e,this.Qe,this.ke,r);return this.ke=qc(),this.qe=Lz(),this.Qe=new mr(nn),n}$e(i,e){if(!this.ze(i))return;let r=this.it(i,e.key)?2:0;this.Ge(i).Fe(e.key,r),this.ke=this.ke.insert(e.key,e),this.qe=this.qe.insert(e.key,this.st(e.key).add(i))}Ue(i,e,r){if(!this.ze(i))return;let n=this.Ge(i);this.it(i,e)?n.Fe(e,1):n.Me(e),this.qe=this.qe.insert(e,this.st(e).delete(i)),r&&(this.ke=this.ke.insert(e,r))}removeTarget(i){this.Be.delete(i)}Ye(i){let e=this.Ge(i).Ce();return this.Le.getRemoteKeysForTarget(i).size+e.addedDocuments.size-e.removedDocuments.size}xe(i){this.Ge(i).xe()}Ge(i){let e=this.Be.get(i);return e||(e=new mC,this.Be.set(i,e)),e}st(i){let e=this.qe.get(i);return e||(e=new Us(nn),this.qe=this.qe.insert(i,e)),e}ze(i){let e=this.Je(i)!==null;return e||Ot("WatchChangeAggregator","Detected inactive target",i),e}Je(i){let e=this.Be.get(i);return e&&e.Se?null:this.Le.ot(i)}je(i){this.Be.set(i,new mC),this.Le.getRemoteKeysForTarget(i).forEach(e=>{this.Ue(i,e,null)})}it(i,e){return this.Le.getRemoteKeysForTarget(i).has(e)}};function Lz(){return new mr(Zt.comparator)}function Nz(){return new mr(Zt.comparator)}var X1e={asc:"ASCENDING",desc:"DESCENDING"},Y1e={"<":"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"},$1e={and:"AND",or:"OR"},lP=class{constructor(i,e){this.databaseId=i,this.useProto3Json=e}};function cP(t,i){return t.useProto3Json||PC(i)?i:{value:i}}function pC(t,i){return t.useProto3Json?`${new Date(1e3*i.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+i.nanoseconds).slice(-9)}Z`:{seconds:""+i.seconds,nanos:i.nanoseconds}}function _G(t,i){return t.useProto3Json?i.toBase64():i.toUint8Array()}function Q1e(t,i){return pC(t,i.toTimestamp())}function ec(t){return Vn(!!t),vi.fromTimestamp(function(e){let r=Jc(e);return new $r(r.seconds,r.nanos)}(t))}function bk(t,i){return dP(t,i).canonicalString()}function dP(t,i){let e=function(n){return new rr(["projects",n.projectId,"databases",n.database])}(t).child("documents");return i===void 0?e:e.child(i)}function wG(t){let i=rr.fromString(t);return Vn(DG(i)),i}function uP(t,i){return bk(t.databaseId,i.path)}function DR(t,i){let e=wG(i);if(e.get(1)!==t.databaseId.projectId)throw new It(tt.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+e.get(1)+" vs "+t.databaseId.projectId);if(e.get(3)!==t.databaseId.database)throw new It(tt.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+e.get(3)+" vs "+t.databaseId.database);return new Zt(TG(e))}function CG(t,i){return bk(t.databaseId,i)}function K1e(t){let i=wG(t);return i.length===4?rr.emptyPath():TG(i)}function hP(t){return new rr(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function TG(t){return Vn(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function Bz(t,i,e){return{name:uP(t,i),fields:e.value.mapValue.fields}}function Z1e(t,i){let e;if("targetChange"in i){i.targetChange;let r=function(l){return l==="NO_CHANGE"?0:l==="ADD"?1:l==="REMOVE"?2:l==="CURRENT"?3:l==="RESET"?4:ai()}(i.targetChange.targetChangeType||"NO_CHANGE"),n=i.targetChange.targetIds||[],a=function(l,c){return l.useProto3Json?(Vn(c===void 0||typeof c=="string"),fa.fromBase64String(c||"")):(Vn(c===void 0||c instanceof Buffer||c instanceof Uint8Array),fa.fromUint8Array(c||new Uint8Array))}(t,i.targetChange.resumeToken),s=i.targetChange.cause,o=s&&function(l){let c=l.code===void 0?tt.UNKNOWN:bG(l.code);return new It(c,l.message||"")}(s);e=new fC(r,n,a,o||null)}else if("documentChange"in i){i.documentChange;let r=i.documentChange;r.document,r.document.name,r.document.updateTime;let n=DR(t,r.document.name),a=ec(r.document.updateTime),s=r.document.createTime?ec(r.document.createTime):vi.min(),o=new fl({mapValue:{fields:r.document.fields}}),d=ml.newFoundDocument(n,a,s,o),l=r.targetIds||[],c=r.removedTargetIds||[];e=new up(l,c,d.key,d)}else if("documentDelete"in i){i.documentDelete;let r=i.documentDelete;r.document;let n=DR(t,r.document),a=r.readTime?ec(r.readTime):vi.min(),s=ml.newNoDocument(n,a),o=r.removedTargetIds||[];e=new up([],o,s.key,s)}else if("documentRemove"in i){i.documentRemove;let r=i.documentRemove;r.document;let n=DR(t,r.document),a=r.removedTargetIds||[];e=new up([],a,n,null)}else{if(!("filter"in i))return ai();{i.filter;let r=i.filter;r.targetId;let{count:n=0,unchangedNames:a}=r,s=new sP(n,a),o=r.targetId;e=new hC(o,s)}}return e}function J1e(t,i){let e;if(i instanceof zh)e={update:Bz(t,i.key,i.value)};else if(i instanceof dC)e={delete:uP(t,i.key)};else if(i instanceof ed)e={update:Bz(t,i.key,i.data),updateMask:obe(i.fieldMask)};else{if(!(i instanceof tP))return ai();e={verify:uP(t,i.key)}}return i.fieldTransforms.length>0&&(e.updateTransforms=i.fieldTransforms.map(r=>function(a,s){let o=s.transform;if(o instanceof xp)return{fieldPath:s.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(o instanceof Vh)return{fieldPath:s.field.canonicalString(),appendMissingElements:{values:o.elements}};if(o instanceof Uh)return{fieldPath:s.field.canonicalString(),removeAllFromArray:{values:o.elements}};if(o instanceof bp)return{fieldPath:s.field.canonicalString(),increment:o.Pe};throw ai()}(0,r))),i.precondition.isNone||(e.currentDocument=function(n,a){return a.updateTime!==void 0?{updateTime:Q1e(n,a.updateTime)}:a.exists!==void 0?{exists:a.exists}:ai()}(t,i.precondition)),e}function q1e(t,i){return t&&t.length>0?(Vn(i!==void 0),t.map(e=>function(n,a){let s=n.updateTime?ec(n.updateTime):ec(a);return s.isEqual(vi.min())&&(s=ec(a)),new eP(s,n.transformResults||[])}(e,i))):[]}function ebe(t,i){return{documents:[CG(t,i.path)]}}function tbe(t,i){let e={structuredQuery:{}},r=i.path,n;i.collectionGroup!==null?(n=r,e.structuredQuery.from=[{collectionId:i.collectionGroup,allDescendants:!0}]):(n=r.popLast(),e.structuredQuery.from=[{collectionId:r.lastSegment()}]),e.parent=CG(t,n);let a=function(l){if(l.length!==0)return EG(pl.create(l,"and"))}(i.filters);a&&(e.structuredQuery.where=a);let s=function(l){if(l.length!==0)return l.map(c=>function(u){return{field:op(u.field),direction:rbe(u.dir)}}(c))}(i.orderBy);s&&(e.structuredQuery.orderBy=s);let o=cP(t,i.limit);return o!==null&&(e.structuredQuery.limit=o),i.startAt&&(e.structuredQuery.startAt=function(l){return{before:l.inclusive,values:l.position}}(i.startAt)),i.endAt&&(e.structuredQuery.endAt=function(l){return{before:!l.inclusive,values:l.position}}(i.endAt)),{_t:e,parent:n}}function ibe(t){let i=K1e(t.parent),e=t.structuredQuery,r=e.from?e.from.length:0,n=null;if(r>0){Vn(r===1);let c=e.from[0];c.allDescendants?n=c.collectionId:i=i.child(c.collectionId)}let a=[];e.where&&(a=function(h){let u=SG(h);return u instanceof pl&&tG(u)?u.getFilters():[u]}(e.where));let s=[];e.orderBy&&(s=function(h){return h.map(u=>function(p){return new Bh(lp(p.field),function(g){switch(g){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(p.direction))}(u))}(e.orderBy));let o=null;e.limit&&(o=function(h){let u;return u=typeof h=="object"?h.value:h,PC(u)?null:u}(e.limit));let d=null;e.startAt&&(d=function(h){let u=!!h.before,f=h.values||[];return new vp(f,u)}(e.startAt));let l=null;return e.endAt&&(l=function(h){let u=!h.before,f=h.values||[];return new vp(f,u)}(e.endAt)),M1e(i,n,s,a,o,"F",d,l)}function nbe(t,i){let e=function(n){switch(n){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return ai()}}(i.purpose);return e==null?null:{"goog-listen-tags":e}}function SG(t){return t.unaryFilter!==void 0?function(e){switch(e.unaryFilter.op){case"IS_NAN":let r=lp(e.unaryFilter.field);return Ir.create(r,"==",{doubleValue:NaN});case"IS_NULL":let n=lp(e.unaryFilter.field);return Ir.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let a=lp(e.unaryFilter.field);return Ir.create(a,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let s=lp(e.unaryFilter.field);return Ir.create(s,"!=",{nullValue:"NULL_VALUE"});default:return ai()}}(t):t.fieldFilter!==void 0?function(e){return Ir.create(lp(e.fieldFilter.field),function(n){switch(n){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 ai()}}(e.fieldFilter.op),e.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(e){return pl.create(e.compositeFilter.filters.map(r=>SG(r)),function(n){switch(n){case"AND":return"and";case"OR":return"or";default:return ai()}}(e.compositeFilter.op))}(t):ai()}function rbe(t){return X1e[t]}function sbe(t){return Y1e[t]}function abe(t){return $1e[t]}function op(t){return{fieldPath:t.canonicalString()}}function lp(t){return fo.fromServerFormat(t.fieldPath)}function EG(t){return t instanceof Ir?function(e){if(e.op==="=="){if(Tz(e.value))return{unaryFilter:{field:op(e.field),op:"IS_NAN"}};if(Cz(e.value))return{unaryFilter:{field:op(e.field),op:"IS_NULL"}}}else if(e.op==="!="){if(Tz(e.value))return{unaryFilter:{field:op(e.field),op:"IS_NOT_NAN"}};if(Cz(e.value))return{unaryFilter:{field:op(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:op(e.field),op:sbe(e.op),value:e.value}}}(t):t instanceof pl?function(e){let r=e.getFilters().map(n=>EG(n));return r.length===1?r[0]:{compositeFilter:{op:abe(e.op),filters:r}}}(t):ai()}function obe(t){let i=[];return t.fields.forEach(e=>i.push(e.canonicalString())),{fieldPaths:i}}function DG(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}var Lv=class t{constructor(i,e,r,n,a=vi.min(),s=vi.min(),o=fa.EMPTY_BYTE_STRING,d=null){this.target=i,this.targetId=e,this.purpose=r,this.sequenceNumber=n,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=o,this.expectedCount=d}withSequenceNumber(i){return new t(this.target,this.targetId,this.purpose,i,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(i,e){return new t(this.target,this.targetId,this.purpose,this.sequenceNumber,e,this.lastLimboFreeSnapshotVersion,i,null)}withExpectedCount(i){return new t(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,i)}withLastLimboFreeSnapshotVersion(i){return new t(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,i,this.resumeToken,this.expectedCount)}};var fP=class{constructor(i){this.ct=i}};function lbe(t){let i=ibe({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?cC(i,i.limit,"L"):i}var gC=class{constructor(){}Pt(i,e){this.It(i,e),e.Tt()}It(i,e){if("nullValue"in i)this.Et(e,5);else if("booleanValue"in i)this.Et(e,10),e.dt(i.booleanValue?1:0);else if("integerValue"in i)this.Et(e,15),e.dt(fr(i.integerValue));else if("doubleValue"in i){let r=fr(i.doubleValue);isNaN(r)?this.Et(e,13):(this.Et(e,15),Pv(r)?e.dt(0):e.dt(r))}else if("timestampValue"in i){let r=i.timestampValue;this.Et(e,20),typeof r=="string"&&(r=Jc(r)),e.At(`${r.seconds||""}`),e.dt(r.nanos||0)}else if("stringValue"in i)this.Rt(i.stringValue,e),this.Vt(e);else if("bytesValue"in i)this.Et(e,30),e.ft(su(i.bytesValue)),this.Vt(e);else if("referenceValue"in i)this.gt(i.referenceValue,e);else if("geoPointValue"in i){let r=i.geoPointValue;this.Et(e,45),e.dt(r.latitude||0),e.dt(r.longitude||0)}else"mapValue"in i?Jz(i)?this.Et(e,Number.MAX_SAFE_INTEGER):(this.yt(i.mapValue,e),this.Vt(e)):"arrayValue"in i?(this.wt(i.arrayValue,e),this.Vt(e)):ai()}Rt(i,e){this.Et(e,25),this.St(i,e)}St(i,e){e.At(i)}yt(i,e){let r=i.fields||{};this.Et(e,55);for(let n of Object.keys(r))this.Rt(n,e),this.It(r[n],e)}wt(i,e){let r=i.values||[];this.Et(e,50);for(let n of r)this.It(n,e)}gt(i,e){this.Et(e,37),Zt.fromName(i).path.forEach(r=>{this.Et(e,60),this.St(r,e)})}Et(i,e){i.dt(e)}Vt(i){i.dt(2)}};gC.bt=new gC;var mP=class{constructor(){this._n=new pP}addToCollectionParentIndex(i,e){return this._n.add(e),yt.resolve()}getCollectionParents(i,e){return yt.resolve(this._n.getEntries(e))}addFieldIndex(i,e){return yt.resolve()}deleteFieldIndex(i,e){return yt.resolve()}deleteAllFieldIndexes(i){return yt.resolve()}createTargetIndexes(i,e){return yt.resolve()}getDocumentsMatchingTarget(i,e){return yt.resolve(null)}getIndexType(i,e){return yt.resolve(0)}getFieldIndexes(i,e){return yt.resolve([])}getNextCollectionGroupToUpdate(i){return yt.resolve(null)}getMinOffset(i,e){return yt.resolve(Lh.min())}getMinOffsetFromCollectionGroup(i,e){return yt.resolve(Lh.min())}updateCollectionGroup(i,e,r){return yt.resolve()}updateIndexEntries(i,e){return yt.resolve()}},pP=class{constructor(){this.index={}}add(i){let e=i.lastSegment(),r=i.popLast(),n=this.index[e]||new Us(rr.comparator),a=!n.has(r);return this.index[e]=n.add(r),a}has(i){let e=i.lastSegment(),r=i.popLast(),n=this.index[e];return n&&n.has(r)}getEntries(i){return(this.index[i]||new Us(rr.comparator)).toArray()}};var tlt=new Uint8Array(0);var Ql=class t{constructor(i,e,r){this.cacheSizeCollectionThreshold=i,this.percentileToCollect=e,this.maximumSequenceNumbersToCollect=r}static withCacheSize(i){return new t(i,t.DEFAULT_COLLECTION_PERCENTILE,t.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}};Ql.DEFAULT_COLLECTION_PERCENTILE=10,Ql.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Ql.DEFAULT=new Ql(41943040,Ql.DEFAULT_COLLECTION_PERCENTILE,Ql.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Ql.DISABLED=new Ql(-1,0,0);var Nv=class t{constructor(i){this.On=i}next(){return this.On+=2,this.On}static Nn(){return new t(0)}static Ln(){return new t(-1)}};var gP=class{constructor(){this.changes=new ou(i=>i.toString(),(i,e)=>i.isEqual(e)),this.changesApplied=!1}addEntry(i){this.assertNotApplied(),this.changes.set(i.key,i)}removeEntry(i,e){this.assertNotApplied(),this.changes.set(i,ml.newInvalidDocument(i).setReadTime(e))}getEntry(i,e){this.assertNotApplied();let r=this.changes.get(e);return r!==void 0?yt.resolve(r):this.getFromCache(i,e)}getEntries(i,e){return this.getAllFromCache(i,e)}apply(i){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(i)}assertNotApplied(){}};var vP=class{constructor(i,e){this.overlayedDocument=i,this.mutatedFields=e}};var yP=class{constructor(i,e,r,n){this.remoteDocumentCache=i,this.mutationQueue=e,this.documentOverlayCache=r,this.indexManager=n}getDocument(i,e){let r=null;return this.documentOverlayCache.getOverlay(i,e).next(n=>(r=n,this.remoteDocumentCache.getEntry(i,e))).next(n=>(r!==null&&Rv(r.mutation,n,Kl.empty(),$r.now()),n))}getDocuments(i,e){return this.remoteDocumentCache.getEntries(i,e).next(r=>this.getLocalViewOfDocuments(i,r,Ni()).next(()=>r))}getLocalViewOfDocuments(i,e,r=Ni()){let n=Ph();return this.populateOverlays(i,n,e).next(()=>this.computeViews(i,e,n,r).next(a=>{let s=Dv();return a.forEach((o,d)=>{s=s.insert(o,d.overlayedDocument)}),s}))}getOverlayedDocuments(i,e){let r=Ph();return this.populateOverlays(i,r,e).next(()=>this.computeViews(i,e,r,Ni()))}populateOverlays(i,e,r){let n=[];return r.forEach(a=>{e.has(a)||n.push(a)}),this.documentOverlayCache.getOverlays(i,n).next(a=>{a.forEach((s,o)=>{e.set(s,o)})})}computeViews(i,e,r,n){let a=qc(),s=Iv(),o=function(){return Iv()}();return e.forEach((d,l)=>{let c=r.get(l.key);n.has(l.key)&&(c===void 0||c.mutation instanceof ed)?a=a.insert(l.key,l):c!==void 0?(s.set(l.key,c.mutation.getFieldMask()),Rv(c.mutation,l,c.mutation.getFieldMask(),$r.now())):s.set(l.key,Kl.empty())}),this.recalculateAndSaveOverlays(i,a).next(d=>(d.forEach((l,c)=>s.set(l,c)),e.forEach((l,c)=>{var h;return o.set(l,new vP(c,(h=s.get(l))!==null&&h!==void 0?h:null))}),o))}recalculateAndSaveOverlays(i,e){let r=Iv(),n=new mr((s,o)=>s-o),a=Ni();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(i,e).next(s=>{for(let o of s)o.keys().forEach(d=>{let l=e.get(d);if(l===null)return;let c=r.get(d)||Kl.empty();c=o.applyToLocalView(l,c),r.set(d,c);let h=(n.get(o.batchId)||Ni()).add(d);n=n.insert(o.batchId,h)})}).next(()=>{let s=[],o=n.getReverseIterator();for(;o.hasNext();){let d=o.getNext(),l=d.key,c=d.value,h=uG();c.forEach(u=>{if(!a.has(u)){let f=yG(e.get(u),r.get(u));f!==null&&h.set(u,f),a=a.add(u)}}),s.push(this.documentOverlayCache.saveOverlays(i,l,h))}return yt.waitFor(s)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(i,e){return this.remoteDocumentCache.getEntries(i,e).next(r=>this.recalculateAndSaveOverlays(i,r))}getDocumentsMatchingQuery(i,e,r,n){return function(s){return Zt.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}(e)?this.getDocumentsMatchingDocumentQuery(i,e.path):aG(e)?this.getDocumentsMatchingCollectionGroupQuery(i,e,r,n):this.getDocumentsMatchingCollectionQuery(i,e,r,n)}getNextDocuments(i,e,r,n){return this.remoteDocumentCache.getAllFromCollectionGroup(i,e,r,n).next(a=>{let s=n-a.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(i,e,r.largestBatchId,n-a.size):yt.resolve(Ph()),o=-1,d=a;return s.next(l=>yt.forEach(l,(c,h)=>(o{d=d.insert(c,u)}))).next(()=>this.populateOverlays(i,l,a)).next(()=>this.computeViews(i,d,l,Ni())).next(c=>({batchId:o,changes:dG(c)})))})}getDocumentsMatchingDocumentQuery(i,e){return this.getDocument(i,new Zt(e)).next(r=>{let n=Dv();return r.isFoundDocument()&&(n=n.insert(r.key,r)),n})}getDocumentsMatchingCollectionGroupQuery(i,e,r,n){let a=e.collectionGroup,s=Dv();return this.indexManager.getCollectionParents(i,a).next(o=>yt.forEach(o,d=>{let l=function(h,u){return new au(u,null,h.explicitOrderBy.slice(),h.filters.slice(),h.limit,h.limitType,h.startAt,h.endAt)}(e,d.child(a));return this.getDocumentsMatchingCollectionQuery(i,l,r,n).next(c=>{c.forEach((h,u)=>{s=s.insert(h,u)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(i,e,r,n){let a;return this.documentOverlayCache.getOverlaysForCollection(i,e.path,r.largestBatchId).next(s=>(a=s,this.remoteDocumentCache.getDocumentsMatchingQuery(i,e,r,a,n))).next(s=>{a.forEach((d,l)=>{let c=l.getKey();s.get(c)===null&&(s=s.insert(c,ml.newInvalidDocument(c)))});let o=Dv();return s.forEach((d,l)=>{let c=a.get(d);c!==void 0&&Rv(c.mutation,l,Kl.empty(),$r.now()),FC(e,l)&&(o=o.insert(d,l))}),o})}};var xP=class{constructor(i){this.serializer=i,this.cr=new Map,this.lr=new Map}getBundleMetadata(i,e){return yt.resolve(this.cr.get(e))}saveBundleMetadata(i,e){return this.cr.set(e.id,function(n){return{id:n.id,version:n.version,createTime:ec(n.createTime)}}(e)),yt.resolve()}getNamedQuery(i,e){return yt.resolve(this.lr.get(e))}saveNamedQuery(i,e){return this.lr.set(e.name,function(n){return{name:n.name,query:lbe(n.bundledQuery),readTime:ec(n.readTime)}}(e)),yt.resolve()}};var bP=class{constructor(){this.overlays=new mr(Zt.comparator),this.hr=new Map}getOverlay(i,e){return yt.resolve(this.overlays.get(e))}getOverlays(i,e){let r=Ph();return yt.forEach(e,n=>this.getOverlay(i,n).next(a=>{a!==null&&r.set(n,a)})).next(()=>r)}saveOverlays(i,e,r){return r.forEach((n,a)=>{this.ht(i,e,a)}),yt.resolve()}removeOverlaysForBatchId(i,e,r){let n=this.hr.get(r);return n!==void 0&&(n.forEach(a=>this.overlays=this.overlays.remove(a)),this.hr.delete(r)),yt.resolve()}getOverlaysForCollection(i,e,r){let n=Ph(),a=e.length+1,s=new Zt(e.child("")),o=this.overlays.getIteratorFrom(s);for(;o.hasNext();){let d=o.getNext().value,l=d.getKey();if(!e.isPrefixOf(l.path))break;l.path.length===a&&d.largestBatchId>r&&n.set(d.getKey(),d)}return yt.resolve(n)}getOverlaysForCollectionGroup(i,e,r,n){let a=new mr((l,c)=>l-c),s=this.overlays.getIterator();for(;s.hasNext();){let l=s.getNext().value;if(l.getKey().getCollectionGroup()===e&&l.largestBatchId>r){let c=a.get(l.largestBatchId);c===null&&(c=Ph(),a=a.insert(l.largestBatchId,c)),c.set(l.getKey(),l)}}let o=Ph(),d=a.getIterator();for(;d.hasNext()&&(d.getNext().value.forEach((l,c)=>o.set(l,c)),!(o.size()>=n)););return yt.resolve(o)}ht(i,e,r){let n=this.overlays.get(r.key);if(n!==null){let s=this.hr.get(n.largestBatchId).delete(r.key);this.hr.set(n.largestBatchId,s)}this.overlays=this.overlays.insert(r.key,new rP(e,r));let a=this.hr.get(e);a===void 0&&(a=Ni(),this.hr.set(e,a)),this.hr.set(e,a.add(r.key))}};var Bv=class{constructor(){this.Pr=new Us(Ar.Ir),this.Tr=new Us(Ar.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(i,e){let r=new Ar(i,e);this.Pr=this.Pr.add(r),this.Tr=this.Tr.add(r)}dr(i,e){i.forEach(r=>this.addReference(r,e))}removeReference(i,e){this.Ar(new Ar(i,e))}Rr(i,e){i.forEach(r=>this.removeReference(r,e))}Vr(i){let e=new Zt(new rr([])),r=new Ar(e,i),n=new Ar(e,i+1),a=[];return this.Tr.forEachInRange([r,n],s=>{this.Ar(s),a.push(s.key)}),a}mr(){this.Pr.forEach(i=>this.Ar(i))}Ar(i){this.Pr=this.Pr.delete(i),this.Tr=this.Tr.delete(i)}gr(i){let e=new Zt(new rr([])),r=new Ar(e,i),n=new Ar(e,i+1),a=Ni();return this.Tr.forEachInRange([r,n],s=>{a=a.add(s.key)}),a}containsKey(i){let e=new Ar(i,0),r=this.Pr.firstAfterOrEqual(e);return r!==null&&i.isEqual(r.key)}},Ar=class{constructor(i,e){this.key=i,this.pr=e}static Ir(i,e){return Zt.comparator(i.key,e.key)||nn(i.pr,e.pr)}static Er(i,e){return nn(i.pr,e.pr)||Zt.comparator(i.key,e.key)}};var _P=class{constructor(i,e){this.indexManager=i,this.referenceDelegate=e,this.mutationQueue=[],this.yr=1,this.wr=new Us(Ar.Ir)}checkEmpty(i){return yt.resolve(this.mutationQueue.length===0)}addMutationBatch(i,e,r,n){let a=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let s=new iP(a,e,r,n);this.mutationQueue.push(s);for(let o of n)this.wr=this.wr.add(new Ar(o.key,a)),this.indexManager.addToCollectionParentIndex(i,o.key.path.popLast());return yt.resolve(s)}lookupMutationBatch(i,e){return yt.resolve(this.Sr(e))}getNextMutationBatchAfterBatchId(i,e){let r=e+1,n=this.br(r),a=n<0?0:n;return yt.resolve(this.mutationQueue.length>a?this.mutationQueue[a]:null)}getHighestUnacknowledgedBatchId(){return yt.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(i){return yt.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(i,e){let r=new Ar(e,0),n=new Ar(e,Number.POSITIVE_INFINITY),a=[];return this.wr.forEachInRange([r,n],s=>{let o=this.Sr(s.pr);a.push(o)}),yt.resolve(a)}getAllMutationBatchesAffectingDocumentKeys(i,e){let r=new Us(nn);return e.forEach(n=>{let a=new Ar(n,0),s=new Ar(n,Number.POSITIVE_INFINITY);this.wr.forEachInRange([a,s],o=>{r=r.add(o.pr)})}),yt.resolve(this.Dr(r))}getAllMutationBatchesAffectingQuery(i,e){let r=e.path,n=r.length+1,a=r;Zt.isDocumentKey(a)||(a=a.child(""));let s=new Ar(new Zt(a),0),o=new Us(nn);return this.wr.forEachWhile(d=>{let l=d.key.path;return!!r.isPrefixOf(l)&&(l.length===n&&(o=o.add(d.pr)),!0)},s),yt.resolve(this.Dr(o))}Dr(i){let e=[];return i.forEach(r=>{let n=this.Sr(r);n!==null&&e.push(n)}),e}removeMutationBatch(i,e){Vn(this.Cr(e.batchId,"removed")===0),this.mutationQueue.shift();let r=this.wr;return yt.forEach(e.mutations,n=>{let a=new Ar(n.key,e.batchId);return r=r.delete(a),this.referenceDelegate.markPotentiallyOrphaned(i,n.key)}).next(()=>{this.wr=r})}Mn(i){}containsKey(i,e){let r=new Ar(e,0),n=this.wr.firstAfterOrEqual(r);return yt.resolve(e.isEqual(n&&n.key))}performConsistencyCheck(i){return this.mutationQueue.length,yt.resolve()}Cr(i,e){return this.br(i)}br(i){return this.mutationQueue.length===0?0:i-this.mutationQueue[0].batchId}Sr(i){let e=this.br(i);return e<0||e>=this.mutationQueue.length?null:this.mutationQueue[e]}};var wP=class{constructor(i){this.vr=i,this.docs=function(){return new mr(Zt.comparator)}(),this.size=0}setIndexManager(i){this.indexManager=i}addEntry(i,e){let r=e.key,n=this.docs.get(r),a=n?n.size:0,s=this.vr(e);return this.docs=this.docs.insert(r,{document:e.mutableCopy(),size:s}),this.size+=s-a,this.indexManager.addToCollectionParentIndex(i,r.path.popLast())}removeEntry(i){let e=this.docs.get(i);e&&(this.docs=this.docs.remove(i),this.size-=e.size)}getEntry(i,e){let r=this.docs.get(e);return yt.resolve(r?r.document.mutableCopy():ml.newInvalidDocument(e))}getEntries(i,e){let r=qc();return e.forEach(n=>{let a=this.docs.get(n);r=r.insert(n,a?a.document.mutableCopy():ml.newInvalidDocument(n))}),yt.resolve(r)}getDocumentsMatchingQuery(i,e,r,n){let a=qc(),s=e.path,o=new Zt(s.child("")),d=this.docs.getIteratorFrom(o);for(;d.hasNext();){let{key:l,value:{document:c}}=d.getNext();if(!s.isPrefixOf(l.path))break;l.path.length>s.length+1||y1e(v1e(c),r)<=0||(n.has(c.key)||FC(e,c))&&(a=a.insert(c.key,c.mutableCopy()))}return yt.resolve(a)}getAllFromCollectionGroup(i,e,r,n){ai()}Fr(i,e){return yt.forEach(this.docs,r=>e(r))}newChangeBuffer(i){return new CP(this)}getSize(i){return yt.resolve(this.size)}},CP=class extends gP{constructor(i){super(),this.ar=i}applyChanges(i){let e=[];return this.changes.forEach((r,n)=>{n.isValidDocument()?e.push(this.ar.addEntry(i,n)):this.ar.removeEntry(r)}),yt.waitFor(e)}getFromCache(i,e){return this.ar.getEntry(i,e)}getAllFromCache(i,e){return this.ar.getEntries(i,e)}};var TP=class{constructor(i){this.persistence=i,this.Mr=new ou(e=>yk(e),xk),this.lastRemoteSnapshotVersion=vi.min(),this.highestTargetId=0,this.Or=0,this.Nr=new Bv,this.targetCount=0,this.Lr=Nv.Nn()}forEachTarget(i,e){return this.Mr.forEach((r,n)=>e(n)),yt.resolve()}getLastRemoteSnapshotVersion(i){return yt.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(i){return yt.resolve(this.Or)}allocateTargetId(i){return this.highestTargetId=this.Lr.next(),yt.resolve(this.highestTargetId)}setTargetsMetadata(i,e,r){return r&&(this.lastRemoteSnapshotVersion=r),e>this.Or&&(this.Or=e),yt.resolve()}qn(i){this.Mr.set(i.target,i);let e=i.targetId;e>this.highestTargetId&&(this.Lr=new Nv(e),this.highestTargetId=e),i.sequenceNumber>this.Or&&(this.Or=i.sequenceNumber)}addTargetData(i,e){return this.qn(e),this.targetCount+=1,yt.resolve()}updateTargetData(i,e){return this.qn(e),yt.resolve()}removeTargetData(i,e){return this.Mr.delete(e.target),this.Nr.Vr(e.targetId),this.targetCount-=1,yt.resolve()}removeTargets(i,e,r){let n=0,a=[];return this.Mr.forEach((s,o)=>{o.sequenceNumber<=e&&r.get(o.targetId)===null&&(this.Mr.delete(s),a.push(this.removeMatchingKeysForTargetId(i,o.targetId)),n++)}),yt.waitFor(a).next(()=>n)}getTargetCount(i){return yt.resolve(this.targetCount)}getTargetData(i,e){let r=this.Mr.get(e)||null;return yt.resolve(r)}addMatchingKeys(i,e,r){return this.Nr.dr(e,r),yt.resolve()}removeMatchingKeys(i,e,r){this.Nr.Rr(e,r);let n=this.persistence.referenceDelegate,a=[];return n&&e.forEach(s=>{a.push(n.markPotentiallyOrphaned(i,s))}),yt.waitFor(a)}removeMatchingKeysForTargetId(i,e){return this.Nr.Vr(e),yt.resolve()}getMatchingKeysForTargetId(i,e){let r=this.Nr.gr(e);return yt.resolve(r)}containsKey(i,e){return yt.resolve(this.Nr.containsKey(e))}};var SP=class{constructor(i,e){this.Br={},this.overlays={},this.kr=new Kz(0),this.qr=!1,this.qr=!0,this.referenceDelegate=i(this),this.Qr=new TP(this),this.indexManager=new mP,this.remoteDocumentCache=function(n){return new wP(n)}(r=>this.referenceDelegate.Kr(r)),this.serializer=new fP(e),this.$r=new xP(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(i){return this.indexManager}getDocumentOverlayCache(i){let e=this.overlays[i.toKey()];return e||(e=new bP,this.overlays[i.toKey()]=e),e}getMutationQueue(i,e){let r=this.Br[i.toKey()];return r||(r=new _P(e,this.referenceDelegate),this.Br[i.toKey()]=r),r}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(i,e,r){Ot("MemoryPersistence","Starting transaction:",i);let n=new EP(this.kr.next());return this.referenceDelegate.Ur(),r(n).next(a=>this.referenceDelegate.Wr(n).next(()=>a)).toPromise().then(a=>(n.raiseOnCommittedEvent(),a))}Gr(i,e){return yt.or(Object.values(this.Br).map(r=>()=>r.containsKey(i,e)))}},EP=class extends VR{constructor(i){super(),this.currentSequenceNumber=i}},DP=class t{constructor(i){this.persistence=i,this.zr=new Bv,this.jr=null}static Hr(i){return new t(i)}get Jr(){if(this.jr)return this.jr;throw ai()}addReference(i,e,r){return this.zr.addReference(r,e),this.Jr.delete(r.toString()),yt.resolve()}removeReference(i,e,r){return this.zr.removeReference(r,e),this.Jr.add(r.toString()),yt.resolve()}markPotentiallyOrphaned(i,e){return this.Jr.add(e.toString()),yt.resolve()}removeTarget(i,e){this.zr.Vr(e.targetId).forEach(n=>this.Jr.add(n.toString()));let r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(i,e.targetId).next(n=>{n.forEach(a=>this.Jr.add(a.toString()))}).next(()=>r.removeTargetData(i,e))}Ur(){this.jr=new Set}Wr(i){let e=this.persistence.getRemoteDocumentCache().newChangeBuffer();return yt.forEach(this.Jr,r=>{let n=Zt.fromPath(r);return this.Yr(i,n).next(a=>{a||e.removeEntry(n,vi.min())})}).next(()=>(this.jr=null,e.apply(i)))}updateLimboDocument(i,e){return this.Yr(i,e).next(r=>{r?this.Jr.delete(e.toString()):this.Jr.add(e.toString())})}Kr(i){return 0}Yr(i,e){return yt.or([()=>yt.resolve(this.zr.containsKey(e)),()=>this.persistence.getTargetCache().containsKey(i,e),()=>this.persistence.Gr(i,e)])}};var MP=class t{constructor(i,e,r,n){this.targetId=i,this.fromCache=e,this.qi=r,this.Qi=n}static Ki(i,e){let r=Ni(),n=Ni();for(let a of e.docChanges)switch(a.type){case 0:r=r.add(a.doc.key);break;case 1:n=n.add(a.doc.key)}return new t(i,e.fromCache,r,n)}};var AP=class{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(i){this._documentReadCount+=i}};var IP=class{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function(){return JU()?8:b1e(ZU())>0?6:4}()}initialize(i,e){this.zi=i,this.indexManager=e,this.$i=!0}getDocumentsMatchingQuery(i,e,r,n){let a={result:null};return this.ji(i,e).next(s=>{a.result=s}).next(()=>{if(!a.result)return this.Hi(i,e,n,r).next(s=>{a.result=s})}).next(()=>{if(a.result)return;let s=new AP;return this.Ji(i,e,s).next(o=>{if(a.result=o,this.Ui)return this.Yi(i,e,s,o.size)})}).next(()=>a.result)}Yi(i,e,r,n){return r.documentReadCountthis.Gi*n?(Ev()<=Qi.DEBUG&&Ot("QueryEngine","The SDK decides to create cache indexes for query:",ap(e),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(i,ql(e))):yt.resolve())}ji(i,e){if(Mz(e))return yt.resolve(null);let r=ql(e);return this.indexManager.getIndexType(i,r).next(n=>n===0?null:(e.limit!==null&&n===1&&(e=cC(e,null,"F"),r=ql(e)),this.indexManager.getDocumentsMatchingTarget(i,r).next(a=>{let s=Ni(...a);return this.zi.getDocuments(i,s).next(o=>this.indexManager.getMinOffset(i,r).next(d=>{let l=this.Zi(e,o);return this.Xi(e,l,s,d.readTime)?this.ji(i,cC(e,null,"F")):this.es(i,l,e,d)}))})))}Hi(i,e,r,n){return Mz(e)||n.isEqual(vi.min())?yt.resolve(null):this.zi.getDocuments(i,r).next(a=>{let s=this.Zi(e,a);return this.Xi(e,s,r,n)?yt.resolve(null):(Ev()<=Qi.DEBUG&&Ot("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),ap(e)),this.es(i,s,e,g1e(n,-1)).next(o=>o))})}Zi(i,e){let r=new Us(lG(i));return e.forEach((n,a)=>{FC(i,a)&&(r=r.add(a))}),r}Xi(i,e,r,n){if(i.limit===null)return!1;if(r.size!==e.size)return!0;let a=i.limitType==="F"?e.last():e.first();return!!a&&(a.hasPendingWrites||a.version.compareTo(n)>0)}Ji(i,e,r){return Ev()<=Qi.DEBUG&&Ot("QueryEngine","Using full collection scan to execute query:",ap(e)),this.zi.getDocumentsMatchingQuery(i,e,Lh.min(),r)}es(i,e,r,n){return this.zi.getDocumentsMatchingQuery(i,r,n).next(a=>(e.forEach(s=>{a=a.insert(s.key,s)}),a))}};var RP=class{constructor(i,e,r,n){this.persistence=i,this.ts=e,this.serializer=n,this.ns=new mr(nn),this.rs=new ou(a=>yk(a),xk),this.ss=new Map,this.os=i.getRemoteDocumentCache(),this.Qr=i.getTargetCache(),this.$r=i.getBundleCache(),this._s(r)}_s(i){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(i),this.indexManager=this.persistence.getIndexManager(i),this.mutationQueue=this.persistence.getMutationQueue(i,this.indexManager),this.localDocuments=new yP(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(i){return this.persistence.runTransaction("Collect garbage","readwrite-primary",e=>i.collect(e,this.ns))}};function cbe(t,i,e,r){return new RP(t,i,e,r)}function MG(t,i){return Ve(this,null,function*(){let e=fi(t);return yield e.persistence.runTransaction("Handle user change","readonly",r=>{let n;return e.mutationQueue.getAllMutationBatches(r).next(a=>(n=a,e._s(i),e.mutationQueue.getAllMutationBatches(r))).next(a=>{let s=[],o=[],d=Ni();for(let l of n){s.push(l.batchId);for(let c of l.mutations)d=d.add(c.key)}for(let l of a){o.push(l.batchId);for(let c of l.mutations)d=d.add(c.key)}return e.localDocuments.getDocuments(r,d).next(l=>({us:l,removedBatchIds:s,addedBatchIds:o}))})})})}function dbe(t,i){let e=fi(t);return e.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{let n=i.batch.keys(),a=e.os.newChangeBuffer({trackRemovals:!0});return function(o,d,l,c){let h=l.batch,u=h.keys(),f=yt.resolve();return u.forEach(p=>{f=f.next(()=>c.getEntry(d,p)).next(m=>{let g=l.docVersions.get(p);Vn(g!==null),m.version.compareTo(g)<0&&(h.applyToRemoteDocument(m,l),m.isValidDocument()&&(m.setReadTime(l.commitVersion),c.addEntry(m)))})}),f.next(()=>o.mutationQueue.removeMutationBatch(d,h))}(e,r,i,a).next(()=>a.apply(r)).next(()=>e.mutationQueue.performConsistencyCheck(r)).next(()=>e.documentOverlayCache.removeOverlaysForBatchId(r,n,i.batch.batchId)).next(()=>e.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(o){let d=Ni();for(let l=0;l0&&(d=d.add(o.batch.mutations[l].key));return d}(i))).next(()=>e.localDocuments.getDocuments(r,n))})}function AG(t){let i=fi(t);return i.persistence.runTransaction("Get last remote snapshot version","readonly",e=>i.Qr.getLastRemoteSnapshotVersion(e))}function ube(t,i){let e=fi(t),r=i.snapshotVersion,n=e.ns;return e.persistence.runTransaction("Apply remote event","readwrite-primary",a=>{let s=e.os.newChangeBuffer({trackRemovals:!0});n=e.ns;let o=[];i.targetChanges.forEach((c,h)=>{let u=n.get(h);if(!u)return;o.push(e.Qr.removeMatchingKeys(a,c.removedDocuments,h).next(()=>e.Qr.addMatchingKeys(a,c.addedDocuments,h)));let f=u.withSequenceNumber(a.currentSequenceNumber);i.targetMismatches.get(h)!==null?f=f.withResumeToken(fa.EMPTY_BYTE_STRING,vi.min()).withLastLimboFreeSnapshotVersion(vi.min()):c.resumeToken.approximateByteSize()>0&&(f=f.withResumeToken(c.resumeToken,r)),n=n.insert(h,f),function(m,g,v){return m.resumeToken.approximateByteSize()===0||g.snapshotVersion.toMicroseconds()-m.snapshotVersion.toMicroseconds()>=3e8?!0:v.addedDocuments.size+v.modifiedDocuments.size+v.removedDocuments.size>0}(u,f,c)&&o.push(e.Qr.updateTargetData(a,f))});let d=qc(),l=Ni();if(i.documentUpdates.forEach(c=>{i.resolvedLimboDocuments.has(c)&&o.push(e.persistence.referenceDelegate.updateLimboDocument(a,c))}),o.push(hbe(a,s,i.documentUpdates).next(c=>{d=c.cs,l=c.ls})),!r.isEqual(vi.min())){let c=e.Qr.getLastRemoteSnapshotVersion(a).next(h=>e.Qr.setTargetsMetadata(a,a.currentSequenceNumber,r));o.push(c)}return yt.waitFor(o).next(()=>s.apply(a)).next(()=>e.localDocuments.getLocalViewOfDocuments(a,d,l)).next(()=>d)}).then(a=>(e.ns=n,a))}function hbe(t,i,e){let r=Ni(),n=Ni();return e.forEach(a=>r=r.add(a)),i.getEntries(t,r).next(a=>{let s=qc();return e.forEach((o,d)=>{let l=a.get(o);d.isFoundDocument()!==l.isFoundDocument()&&(n=n.add(o)),d.isNoDocument()&&d.version.isEqual(vi.min())?(i.removeEntry(o,d.readTime),s=s.insert(o,d)):!l.isValidDocument()||d.version.compareTo(l.version)>0||d.version.compareTo(l.version)===0&&l.hasPendingWrites?(i.addEntry(d),s=s.insert(o,d)):Ot("LocalStore","Ignoring outdated watch update for ",o,". Current version:",l.version," Watch version:",d.version)}),{cs:s,ls:n}})}function fbe(t,i){let e=fi(t);return e.persistence.runTransaction("Get next mutation batch","readonly",r=>(i===void 0&&(i=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(r,i)))}function mbe(t,i){let e=fi(t);return e.persistence.runTransaction("Allocate target","readwrite",r=>{let n;return e.Qr.getTargetData(r,i).next(a=>a?(n=a,yt.resolve(n)):e.Qr.allocateTargetId(r).next(s=>(n=new Lv(i,s,"TargetPurposeListen",r.currentSequenceNumber),e.Qr.addTargetData(r,n).next(()=>n))))}).then(r=>{let n=e.ns.get(r.targetId);return(n===null||r.snapshotVersion.compareTo(n.snapshotVersion)>0)&&(e.ns=e.ns.insert(r.targetId,r),e.rs.set(i,r.targetId)),r})}function PP(t,i,e){return Ve(this,null,function*(){let r=fi(t),n=r.ns.get(i),a=e?"readwrite":"readwrite-primary";try{e||(yield r.persistence.runTransaction("Release target",a,s=>r.persistence.referenceDelegate.removeTarget(s,n)))}catch(s){if(!Xv(s))throw s;Ot("LocalStore",`Failed to update sequence numbers for target ${i}: ${s}`)}r.ns=r.ns.remove(i),r.rs.delete(n.target)})}function Vz(t,i,e){let r=fi(t),n=vi.min(),a=Ni();return r.persistence.runTransaction("Execute query","readwrite",s=>function(d,l,c){let h=fi(d),u=h.rs.get(c);return u!==void 0?yt.resolve(h.ns.get(u)):h.Qr.getTargetData(l,c)}(r,s,ql(i)).next(o=>{if(o)return n=o.lastLimboFreeSnapshotVersion,r.Qr.getMatchingKeysForTargetId(s,o.targetId).next(d=>{a=d})}).next(()=>r.ts.getDocumentsMatchingQuery(s,i,e?n:vi.min(),e?a:Ni())).next(o=>(pbe(r,I1e(i),o),{documents:o,hs:a})))}function pbe(t,i,e){let r=t.ss.get(i)||vi.min();e.forEach((n,a)=>{a.readTime.compareTo(r)>0&&(r=a.readTime)}),t.ss.set(i,r)}var vC=class{constructor(){this.activeTargetIds=L1e()}As(i){this.activeTargetIds=this.activeTargetIds.add(i)}Rs(i){this.activeTargetIds=this.activeTargetIds.delete(i)}ds(){let i={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(i)}};var kP=class{constructor(){this.no=new vC,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(i){}updateMutationState(i,e,r){}addLocalQueryTarget(i){return this.no.As(i),this.ro[i]||"not-current"}updateQueryState(i,e,r){this.ro[i]=e}removeLocalQueryTarget(i){this.no.Rs(i)}isLocalQueryTarget(i){return this.no.activeTargetIds.has(i)}clearQueryState(i){delete this.ro[i]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(i){return this.no.activeTargetIds.has(i)}start(){return this.no=new vC,Promise.resolve()}handleUserChange(i,e,r){}setOnlineState(i){}shutdown(){}writeSequenceNumber(i){}notifyBundleLoaded(i){}};var FP=class{io(i){}shutdown(){}};var yC=class{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(i){this.uo.push(i)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){Ot("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(let i of this.uo)i(0)}ao(){Ot("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(let i of this.uo)i(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}};var qw=null;function MR(){return qw===null?qw=function(){return 268435456+Math.round(2147483648*Math.random())}():qw++,"0x"+qw.toString(16)}var gbe={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};var OP=class{constructor(i){this.lo=i.lo,this.ho=i.ho}Po(i){this.Io=i}To(i){this.Eo=i}Ao(i){this.Ro=i}onMessage(i){this.Vo=i}close(){this.ho()}send(i){this.lo(i)}mo(){this.Io()}fo(){this.Eo()}po(i){this.Ro(i)}yo(i){this.Vo(i)}};var Vs="WebChannelConnection",LP=class extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let r=e.ssl?"https":"http",n=encodeURIComponent(this.databaseId.projectId),a=encodeURIComponent(this.databaseId.database);this.wo=r+"://"+e.host,this.So=`projects/${n}/databases/${a}`,this.bo=this.databaseId.database==="(default)"?`project_id=${n}`:`project_id=${n}&database_id=${a}`}get Do(){return!1}Co(e,r,n,a,s){let o=MR(),d=this.vo(e,r.toUriEncodedString());Ot("RestConnection",`Sending RPC '${e}' ${o}:`,d,n);let l={"google-cloud-resource-prefix":this.So,"x-goog-request-params":this.bo};return this.Fo(l,a,s),this.Mo(e,d,l,n).then(c=>(Ot("RestConnection",`Received RPC '${e}' ${o}: `,c),c),c=>{throw fp("RestConnection",`RPC '${e}' ${o} failed with error: `,c,"url: ",d,"request:",n),c})}xo(e,r,n,a,s,o){return this.Co(e,r,n,a,s)}Fo(e,r,n){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+Tp}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((a,s)=>e[s]=a),n&&n.headers.forEach((a,s)=>e[s]=a)}vo(e,r){let n=gbe[e];return`${this.wo}/v1/${r}:${n}`}terminate(){}}{constructor(i){super(i),this.forceLongPolling=i.forceLongPolling,this.autoDetectLongPolling=i.autoDetectLongPolling,this.useFetchStreams=i.useFetchStreams,this.longPollingOptions=i.longPollingOptions}Mo(i,e,r,n){let a=MR();return new Promise((s,o)=>{let d=new _R;d.setWithCredentials(!0),d.listenOnce(CR.COMPLETE,()=>{try{switch(d.getLastErrorCode()){case Sv.NO_ERROR:let c=d.getResponseJson();Ot(Vs,`XHR for RPC '${i}' ${a} received:`,JSON.stringify(c)),s(c);break;case Sv.TIMEOUT:Ot(Vs,`RPC '${i}' ${a} timed out`),o(new It(tt.DEADLINE_EXCEEDED,"Request time out"));break;case Sv.HTTP_ERROR:let h=d.getStatus();if(Ot(Vs,`RPC '${i}' ${a} failed with status:`,h,"response text:",d.getResponseText()),h>0){let u=d.getResponseJson();Array.isArray(u)&&(u=u[0]);let f=u?.error;if(f&&f.status&&f.message){let p=function(g){let v=g.toLowerCase().replace(/_/g,"-");return Object.values(tt).indexOf(v)>=0?v:tt.UNKNOWN}(f.status);o(new It(p,f.message))}else o(new It(tt.UNKNOWN,"Server responded with status "+d.getStatus()))}else o(new It(tt.UNAVAILABLE,"Connection failed."));break;default:ai()}}finally{Ot(Vs,`RPC '${i}' ${a} completed.`)}});let l=JSON.stringify(n);Ot(Vs,`RPC '${i}' ${a} sending request:`,n),d.send(e,"POST",l,r,15)})}Oo(i,e,r){let n=MR(),a=[this.wo,"/","google.firestore.v1.Firestore","/",i,"/channel"],s=ER(),o=SR(),d={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},l=this.longPollingOptions.timeoutSeconds;l!==void 0&&(d.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(d.xmlHttpFactory=new wR({})),this.Fo(d.initMessageHeaders,e,r),d.encodeInitMessageHeaders=!0;let c=a.join("");Ot(Vs,`Creating RPC '${i}' stream ${n}: ${c}`,d);let h=s.createWebChannel(c,d),u=!1,f=!1,p=new OP({lo:g=>{f?Ot(Vs,`Not sending because RPC '${i}' stream ${n} is closed:`,g):(u||(Ot(Vs,`Opening RPC '${i}' stream ${n} transport.`),h.open(),u=!0),Ot(Vs,`RPC '${i}' stream ${n} sending:`,g),h.send(g))},ho:()=>h.close()}),m=(g,v,y)=>{g.listen(v,x=>{try{y(x)}catch(b){setTimeout(()=>{throw b},0)}})};return m(h,sp.EventType.OPEN,()=>{f||(Ot(Vs,`RPC '${i}' stream ${n} transport opened.`),p.mo())}),m(h,sp.EventType.CLOSE,()=>{f||(f=!0,Ot(Vs,`RPC '${i}' stream ${n} transport closed`),p.po())}),m(h,sp.EventType.ERROR,g=>{f||(f=!0,fp(Vs,`RPC '${i}' stream ${n} transport errored:`,g),p.po(new It(tt.UNAVAILABLE,"The operation could not be completed")))}),m(h,sp.EventType.MESSAGE,g=>{var v;if(!f){let y=g.data[0];Vn(!!y);let x=y,b=x.error||((v=x[0])===null||v===void 0?void 0:v.error);if(b){Ot(Vs,`RPC '${i}' stream ${n} received error:`,b);let _=b.status,C=function(S){let E=Mr[S];if(E!==void 0)return bG(E)}(_),w=b.message;C===void 0&&(C=tt.INTERNAL,w="Unknown error status: "+_+" with message "+b.message),f=!0,p.po(new It(C,w)),h.close()}else Ot(Vs,`RPC '${i}' stream ${n} received:`,y),p.yo(y)}}),m(o,TR.STAT_EVENT,g=>{g.stat===Zw.PROXY?Ot(Vs,`RPC '${i}' stream ${n} detected buffering proxy`):g.stat===Zw.NOPROXY&&Ot(Vs,`RPC '${i}' stream ${n} detected no buffering proxy`)}),setTimeout(()=>{p.fo()},0),p}};function AR(){return typeof document<"u"?document:null}function OC(t){return new lP(t,!0)}var xC=class{constructor(i,e,r=1e3,n=1.5,a=6e4){this.oi=i,this.timerId=e,this.No=r,this.Lo=n,this.Bo=a,this.ko=0,this.qo=null,this.Qo=Date.now(),this.reset()}reset(){this.ko=0}Ko(){this.ko=this.Bo}$o(i){this.cancel();let e=Math.floor(this.ko+this.Uo()),r=Math.max(0,Date.now()-this.Qo),n=Math.max(0,e-r);n>0&&Ot("ExponentialBackoff",`Backing off for ${n} ms (base delay: ${this.ko} ms, delay with jitter: ${e} ms, last attempt: ${r} ms ago)`),this.qo=this.oi.enqueueAfterDelay(this.timerId,n,()=>(this.Qo=Date.now(),i())),this.ko*=this.Lo,this.kothis.Bo&&(this.ko=this.Bo)}Wo(){this.qo!==null&&(this.qo.skipDelay(),this.qo=null)}cancel(){this.qo!==null&&(this.qo.cancel(),this.qo=null)}Uo(){return(Math.random()-.5)*this.ko}};var bC=class{constructor(i,e,r,n,a,s,o,d){this.oi=i,this.Go=r,this.zo=n,this.connection=a,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=o,this.listener=d,this.state=0,this.jo=0,this.Ho=null,this.Jo=null,this.stream=null,this.Yo=new xC(i,e)}Zo(){return this.state===1||this.state===5||this.Xo()}Xo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.e_()}stop(){return Ve(this,null,function*(){this.Zo()&&(yield this.close(0))})}t_(){this.state=0,this.Yo.reset()}n_(){this.Xo()&&this.Ho===null&&(this.Ho=this.oi.enqueueAfterDelay(this.Go,6e4,()=>this.r_()))}i_(i){this.s_(),this.stream.send(i)}r_(){return Ve(this,null,function*(){if(this.Xo())return this.close(0)})}s_(){this.Ho&&(this.Ho.cancel(),this.Ho=null)}o_(){this.Jo&&(this.Jo.cancel(),this.Jo=null)}close(i,e){return Ve(this,null,function*(){this.s_(),this.o_(),this.Yo.cancel(),this.jo++,i!==4?this.Yo.reset():e&&e.code===tt.RESOURCE_EXHAUSTED?(Zc(e.toString()),Zc("Using maximum backoff delay to prevent overloading the backend."),this.Yo.Ko()):e&&e.code===tt.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.__(),this.stream.close(),this.stream=null),this.state=i,yield this.listener.Ao(e)})}__(){}auth(){this.state=1;let i=this.a_(this.jo),e=this.jo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,n])=>{this.jo===e&&this.u_(r,n)},r=>{i(()=>{let n=new It(tt.UNKNOWN,"Fetching auth token failed: "+r.message);return this.c_(n)})})}u_(i,e){let r=this.a_(this.jo);this.stream=this.l_(i,e),this.stream.Po(()=>{r(()=>this.listener.Po())}),this.stream.To(()=>{r(()=>(this.state=2,this.Jo=this.oi.enqueueAfterDelay(this.zo,1e4,()=>(this.Xo()&&(this.state=3),Promise.resolve())),this.listener.To()))}),this.stream.Ao(n=>{r(()=>this.c_(n))}),this.stream.onMessage(n=>{r(()=>this.onMessage(n))})}e_(){this.state=5,this.Yo.$o(()=>Ve(this,null,function*(){this.state=0,this.start()}))}c_(i){return Ot("PersistentStream",`close with error: ${i}`),this.stream=null,this.close(4,i)}a_(i){return e=>{this.oi.enqueueAndForget(()=>this.jo===i?e():(Ot("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}},NP=class extends bC{constructor(i,e,r,n,a,s){super(i,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",e,r,n,s),this.serializer=a}l_(i,e){return this.connection.Oo("Listen",i,e)}onMessage(i){this.Yo.reset();let e=Z1e(this.serializer,i),r=function(a){if(!("targetChange"in a))return vi.min();let s=a.targetChange;return s.targetIds&&s.targetIds.length?vi.min():s.readTime?ec(s.readTime):vi.min()}(i);return this.listener.h_(e,r)}P_(i){let e={};e.database=hP(this.serializer),e.addTarget=function(a,s){let o,d=s.target;if(o=JR(d)?{documents:ebe(a,d)}:{query:tbe(a,d)._t},o.targetId=s.targetId,s.resumeToken.approximateByteSize()>0){o.resumeToken=_G(a,s.resumeToken);let l=cP(a,s.expectedCount);l!==null&&(o.expectedCount=l)}else if(s.snapshotVersion.compareTo(vi.min())>0){o.readTime=pC(a,s.snapshotVersion.toTimestamp());let l=cP(a,s.expectedCount);l!==null&&(o.expectedCount=l)}return o}(this.serializer,i);let r=nbe(this.serializer,i);r&&(e.labels=r),this.i_(e)}I_(i){let e={};e.database=hP(this.serializer),e.removeTarget=i,this.i_(e)}},BP=class extends bC{constructor(i,e,r,n,a,s){super(i,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",e,r,n,s),this.serializer=a,this.T_=!1}get E_(){return this.T_}start(){this.T_=!1,this.lastStreamToken=void 0,super.start()}__(){this.T_&&this.d_([])}l_(i,e){return this.connection.Oo("Write",i,e)}onMessage(i){if(Vn(!!i.streamToken),this.lastStreamToken=i.streamToken,this.T_){this.Yo.reset();let e=q1e(i.writeResults,i.commitTime),r=ec(i.commitTime);return this.listener.A_(r,e)}return Vn(!i.writeResults||i.writeResults.length===0),this.T_=!0,this.listener.R_()}V_(){let i={};i.database=hP(this.serializer),this.i_(i)}d_(i){let e={streamToken:this.lastStreamToken,writes:i.map(r=>J1e(this.serializer,r))};this.i_(e)}};var VP=class extends class{}{constructor(i,e,r,n){super(),this.authCredentials=i,this.appCheckCredentials=e,this.connection=r,this.serializer=n,this.m_=!1}f_(){if(this.m_)throw new It(tt.FAILED_PRECONDITION,"The client has already been terminated.")}Co(i,e,r,n){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([a,s])=>this.connection.Co(i,dP(e,r),n,a,s)).catch(a=>{throw a.name==="FirebaseError"?(a.code===tt.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),a):new It(tt.UNKNOWN,a.toString())})}xo(i,e,r,n,a){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.xo(i,dP(e,r),n,s,o,a)).catch(s=>{throw s.name==="FirebaseError"?(s.code===tt.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new It(tt.UNKNOWN,s.toString())})}terminate(){this.m_=!0,this.connection.terminate()}},UP=class{constructor(i,e){this.asyncQueue=i,this.onlineStateHandler=e,this.state="Unknown",this.g_=0,this.p_=null,this.y_=!0}w_(){this.g_===0&&(this.S_("Unknown"),this.p_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.p_=null,this.b_("Backend didn't respond within 10 seconds."),this.S_("Offline"),Promise.resolve())))}D_(i){this.state==="Online"?this.S_("Unknown"):(this.g_++,this.g_>=1&&(this.C_(),this.b_(`Connection failed 1 times. Most recent error: ${i.toString()}`),this.S_("Offline")))}set(i){this.C_(),this.g_=0,i==="Online"&&(this.y_=!1),this.S_(i)}S_(i){i!==this.state&&(this.state=i,this.onlineStateHandler(i))}b_(i){let e=`Could not reach Cloud Firestore backend. ${i} +This 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.y_?(Zc(e),this.y_=!1):Ot("OnlineStateTracker",e)}C_(){this.p_!==null&&(this.p_.cancel(),this.p_=null)}};var zP=class{constructor(i,e,r,n,a){this.localStore=i,this.datastore=e,this.asyncQueue=r,this.remoteSyncer={},this.v_=[],this.F_=new Map,this.M_=new Set,this.x_=[],this.O_=a,this.O_.io(s=>{r.enqueueAndForget(()=>Ve(this,null,function*(){Gh(this)&&(Ot("RemoteStore","Restarting streams for network reachability change."),yield function(d){return Ve(this,null,function*(){let l=fi(d);l.M_.add(4),yield Yv(l),l.N_.set("Unknown"),l.M_.delete(4),yield LC(l)})}(this))}))}),this.N_=new UP(r,n)}};function LC(t){return Ve(this,null,function*(){if(Gh(t))for(let i of t.x_)yield i(!0)})}function Yv(t){return Ve(this,null,function*(){for(let i of t.x_)yield i(!1)})}function IG(t,i){let e=fi(t);e.F_.has(i.targetId)||(e.F_.set(i.targetId,i),Tk(e)?Ck(e):Ep(e).Xo()&&wk(e,i))}function _k(t,i){let e=fi(t),r=Ep(e);e.F_.delete(i),r.Xo()&&RG(e,i),e.F_.size===0&&(r.Xo()?r.n_():Gh(e)&&e.N_.set("Unknown"))}function wk(t,i){if(t.L_.xe(i.targetId),i.resumeToken.approximateByteSize()>0||i.snapshotVersion.compareTo(vi.min())>0){let e=t.remoteSyncer.getRemoteKeysForTarget(i.targetId).size;i=i.withExpectedCount(e)}Ep(t).P_(i)}function RG(t,i){t.L_.xe(i),Ep(t).I_(i)}function Ck(t){t.L_=new oP({getRemoteKeysForTarget:i=>t.remoteSyncer.getRemoteKeysForTarget(i),ot:i=>t.F_.get(i)||null,tt:()=>t.datastore.serializer.databaseId}),Ep(t).start(),t.N_.w_()}function Tk(t){return Gh(t)&&!Ep(t).Zo()&&t.F_.size>0}function Gh(t){return fi(t).M_.size===0}function PG(t){t.L_=void 0}function vbe(t){return Ve(this,null,function*(){t.N_.set("Online")})}function ybe(t){return Ve(this,null,function*(){t.F_.forEach((i,e)=>{wk(t,i)})})}function xbe(t,i){return Ve(this,null,function*(){PG(t),Tk(t)?(t.N_.D_(i),Ck(t)):t.N_.set("Unknown")})}function bbe(t,i,e){return Ve(this,null,function*(){if(t.N_.set("Online"),i instanceof fC&&i.state===2&&i.cause)try{yield function(n,a){return Ve(this,null,function*(){let s=a.cause;for(let o of a.targetIds)n.F_.has(o)&&(yield n.remoteSyncer.rejectListen(o,s),n.F_.delete(o),n.L_.removeTarget(o))})}(t,i)}catch(r){Ot("RemoteStore","Failed to remove targets %s: %s ",i.targetIds.join(","),r),yield _C(t,r)}else if(i instanceof up?t.L_.Ke(i):i instanceof hC?t.L_.He(i):t.L_.We(i),!e.isEqual(vi.min()))try{let r=yield AG(t.localStore);e.compareTo(r)>=0&&(yield function(a,s){let o=a.L_.rt(s);return o.targetChanges.forEach((d,l)=>{if(d.resumeToken.approximateByteSize()>0){let c=a.F_.get(l);c&&a.F_.set(l,c.withResumeToken(d.resumeToken,s))}}),o.targetMismatches.forEach((d,l)=>{let c=a.F_.get(d);if(!c)return;a.F_.set(d,c.withResumeToken(fa.EMPTY_BYTE_STRING,c.snapshotVersion)),RG(a,d);let h=new Lv(c.target,d,l,c.sequenceNumber);wk(a,h)}),a.remoteSyncer.applyRemoteEvent(o)}(t,e))}catch(r){Ot("RemoteStore","Failed to raise snapshot:",r),yield _C(t,r)}})}function _C(t,i,e){return Ve(this,null,function*(){if(!Xv(i))throw i;t.M_.add(1),yield Yv(t),t.N_.set("Offline"),e||(e=()=>AG(t.localStore)),t.asyncQueue.enqueueRetryable(()=>Ve(this,null,function*(){Ot("RemoteStore","Retrying IndexedDB access"),yield e(),t.M_.delete(1),yield LC(t)}))})}function kG(t,i){return i().catch(e=>_C(t,e,i))}function NC(t){return Ve(this,null,function*(){let i=fi(t),e=lu(i),r=i.v_.length>0?i.v_[i.v_.length-1].batchId:-1;for(;_be(i);)try{let n=yield fbe(i.localStore,r);if(n===null){i.v_.length===0&&e.n_();break}r=n.batchId,wbe(i,n)}catch(n){yield _C(i,n)}FG(i)&&OG(i)})}function _be(t){return Gh(t)&&t.v_.length<10}function wbe(t,i){t.v_.push(i);let e=lu(t);e.Xo()&&e.E_&&e.d_(i.mutations)}function FG(t){return Gh(t)&&!lu(t).Zo()&&t.v_.length>0}function OG(t){lu(t).start()}function Cbe(t){return Ve(this,null,function*(){lu(t).V_()})}function Tbe(t){return Ve(this,null,function*(){let i=lu(t);for(let e of t.v_)i.d_(e.mutations)})}function Sbe(t,i,e){return Ve(this,null,function*(){let r=t.v_.shift(),n=nP.from(r,i,e);yield kG(t,()=>t.remoteSyncer.applySuccessfulWrite(n)),yield NC(t)})}function Ebe(t,i){return Ve(this,null,function*(){i&&lu(t).E_&&(yield function(r,n){return Ve(this,null,function*(){if(function(s){return H1e(s)&&s!==tt.ABORTED}(n.code)){let a=r.v_.shift();lu(r).t_(),yield kG(r,()=>r.remoteSyncer.rejectFailedWrite(a.batchId,n)),yield NC(r)}})}(t,i)),FG(t)&&OG(t)})}function Uz(t,i){return Ve(this,null,function*(){let e=fi(t);e.asyncQueue.verifyOperationInProgress(),Ot("RemoteStore","RemoteStore received new credentials");let r=Gh(e);e.M_.add(3),yield Yv(e),r&&e.N_.set("Unknown"),yield e.remoteSyncer.handleCredentialChange(i),e.M_.delete(3),yield LC(e)})}function Dbe(t,i){return Ve(this,null,function*(){let e=fi(t);i?(e.M_.delete(2),yield LC(e)):i||(e.M_.add(2),yield Yv(e),e.N_.set("Unknown"))})}function Ep(t){return t.B_||(t.B_=function(e,r,n){let a=fi(e);return a.f_(),new NP(r,a.connection,a.authCredentials,a.appCheckCredentials,a.serializer,n)}(t.datastore,t.asyncQueue,{Po:vbe.bind(null,t),To:ybe.bind(null,t),Ao:xbe.bind(null,t),h_:bbe.bind(null,t)}),t.x_.push(i=>Ve(this,null,function*(){i?(t.B_.t_(),Tk(t)?Ck(t):t.N_.set("Unknown")):(yield t.B_.stop(),PG(t))}))),t.B_}function lu(t){return t.k_||(t.k_=function(e,r,n){let a=fi(e);return a.f_(),new BP(r,a.connection,a.authCredentials,a.appCheckCredentials,a.serializer,n)}(t.datastore,t.asyncQueue,{Po:()=>Promise.resolve(),To:Cbe.bind(null,t),Ao:Ebe.bind(null,t),R_:Tbe.bind(null,t),A_:Sbe.bind(null,t)}),t.x_.push(i=>Ve(this,null,function*(){i?(t.k_.t_(),yield NC(t)):(yield t.k_.stop(),t.v_.length>0&&(Ot("RemoteStore",`Stopping write stream with ${t.v_.length} pending writes`),t.v_=[]))}))),t.k_}var GP=class t{constructor(i,e,r,n,a){this.asyncQueue=i,this.timerId=e,this.targetTimeMs=r,this.op=n,this.removalCallback=a,this.deferred=new Zl,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(s=>{})}get promise(){return this.deferred.promise}static createAndSchedule(i,e,r,n,a){let s=Date.now()+r,o=new t(i,e,s,n,a);return o.start(r),o}start(i){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),i)}skipDelay(){return this.handleDelayElapsed()}cancel(i){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new It(tt.CANCELLED,"Operation cancelled"+(i?": "+i:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(i=>this.deferred.resolve(i))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}};function Sk(t,i){if(Zc("AsyncQueue",`${i}: ${t}`),Xv(t))return new It(tt.UNAVAILABLE,`${i}: ${t}`);throw t}var wC=class t{constructor(i){this.comparator=i?(e,r)=>i(e,r)||Zt.comparator(e.key,r.key):(e,r)=>Zt.comparator(e.key,r.key),this.keyedMap=Dv(),this.sortedSet=new mr(this.comparator)}static emptySet(i){return new t(i.comparator)}has(i){return this.keyedMap.get(i)!=null}get(i){return this.keyedMap.get(i)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(i){let e=this.keyedMap.get(i);return e?this.sortedSet.indexOf(e):-1}get size(){return this.sortedSet.size}forEach(i){this.sortedSet.inorderTraversal((e,r)=>(i(e),!1))}add(i){let e=this.delete(i.key);return e.copy(e.keyedMap.insert(i.key,i),e.sortedSet.insert(i,null))}delete(i){let e=this.get(i);return e?this.copy(this.keyedMap.remove(i),this.sortedSet.remove(e)):this}isEqual(i){if(!(i instanceof t)||this.size!==i.size)return!1;let e=this.sortedSet.getIterator(),r=i.sortedSet.getIterator();for(;e.hasNext();){let n=e.getNext().key,a=r.getNext().key;if(!n.isEqual(a))return!1}return!0}toString(){let i=[];return this.forEach(e=>{i.push(e.toString())}),i.length===0?"DocumentSet ()":`DocumentSet ( + `+i.join(` +`)+` +)`}copy(i,e){let r=new t;return r.comparator=this.comparator,r.keyedMap=i,r.sortedSet=e,r}};var CC=class{constructor(){this.q_=new mr(Zt.comparator)}track(i){let e=i.doc.key,r=this.q_.get(e);r?i.type!==0&&r.type===3?this.q_=this.q_.insert(e,i):i.type===3&&r.type!==1?this.q_=this.q_.insert(e,{type:r.type,doc:i.doc}):i.type===2&&r.type===2?this.q_=this.q_.insert(e,{type:2,doc:i.doc}):i.type===2&&r.type===0?this.q_=this.q_.insert(e,{type:0,doc:i.doc}):i.type===1&&r.type===0?this.q_=this.q_.remove(e):i.type===1&&r.type===2?this.q_=this.q_.insert(e,{type:1,doc:r.doc}):i.type===0&&r.type===1?this.q_=this.q_.insert(e,{type:2,doc:i.doc}):ai():this.q_=this.q_.insert(e,i)}Q_(){let i=[];return this.q_.inorderTraversal((e,r)=>{i.push(r)}),i}},wp=class t{constructor(i,e,r,n,a,s,o,d,l){this.query=i,this.docs=e,this.oldDocs=r,this.docChanges=n,this.mutatedKeys=a,this.fromCache=s,this.syncStateChanged=o,this.excludesMetadataChanges=d,this.hasCachedResults=l}static fromInitialDocuments(i,e,r,n,a){let s=[];return e.forEach(o=>{s.push({type:0,doc:o})}),new t(i,e,wC.emptySet(e),s,r,n,!0,!1,a)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(i){if(!(this.fromCache===i.fromCache&&this.hasCachedResults===i.hasCachedResults&&this.syncStateChanged===i.syncStateChanged&&this.mutatedKeys.isEqual(i.mutatedKeys)&&kC(this.query,i.query)&&this.docs.isEqual(i.docs)&&this.oldDocs.isEqual(i.oldDocs)))return!1;let e=this.docChanges,r=i.docChanges;if(e.length!==r.length)return!1;for(let n=0;ni.G_())}},jP=class{constructor(){this.queries=new ou(i=>oG(i),kC),this.onlineState="Unknown",this.z_=new Set}};function Mbe(t,i){return Ve(this,null,function*(){let e=fi(t),r=3,n=i.query,a=e.queries.get(n);a?!a.W_()&&i.G_()&&(r=2):(a=new HP,r=i.G_()?0:1);try{switch(r){case 0:a.K_=yield e.onListen(n,!0);break;case 1:a.K_=yield e.onListen(n,!1);break;case 2:yield e.onFirstRemoteStoreListen(n)}}catch(s){let o=Sk(s,`Initialization of query '${ap(i.query)}' failed`);return void i.onError(o)}e.queries.set(n,a),a.U_.push(i),i.j_(e.onlineState),a.K_&&i.H_(a.K_)&&Ek(e)})}function Abe(t,i){return Ve(this,null,function*(){let e=fi(t),r=i.query,n=3,a=e.queries.get(r);if(a){let s=a.U_.indexOf(i);s>=0&&(a.U_.splice(s,1),a.U_.length===0?n=i.G_()?0:1:!a.W_()&&i.G_()&&(n=2))}switch(n){case 0:return e.queries.delete(r),e.onUnlisten(r,!0);case 1:return e.queries.delete(r),e.onUnlisten(r,!1);case 2:return e.onLastRemoteStoreUnlisten(r);default:return}})}function Ibe(t,i){let e=fi(t),r=!1;for(let n of i){let a=n.query,s=e.queries.get(a);if(s){for(let o of s.U_)o.H_(n)&&(r=!0);s.K_=n}}r&&Ek(e)}function Rbe(t,i,e){let r=fi(t),n=r.queries.get(i);if(n)for(let a of n.U_)a.onError(e);r.queries.delete(i)}function Ek(t){t.z_.forEach(i=>{i.next()})}var WP,zz;(zz=WP||(WP={})).J_="default",zz.Cache="cache";var XP=class{constructor(i,e,r){this.query=i,this.Y_=e,this.Z_=!1,this.X_=null,this.onlineState="Unknown",this.options=r||{}}H_(i){if(!this.options.includeMetadataChanges){let r=[];for(let n of i.docChanges)n.type!==3&&r.push(n);i=new wp(i.query,i.docs,i.oldDocs,r,i.mutatedKeys,i.fromCache,i.syncStateChanged,!0,i.hasCachedResults)}let e=!1;return this.Z_?this.ea(i)&&(this.Y_.next(i),e=!0):this.ta(i,this.onlineState)&&(this.na(i),e=!0),this.X_=i,e}onError(i){this.Y_.error(i)}j_(i){this.onlineState=i;let e=!1;return this.X_&&!this.Z_&&this.ta(this.X_,i)&&(this.na(this.X_),e=!0),e}ta(i,e){if(!i.fromCache||!this.G_())return!0;let r=e!=="Offline";return(!this.options.ra||!r)&&(!i.docs.isEmpty()||i.hasCachedResults||e==="Offline")}ea(i){if(i.docChanges.length>0)return!0;let e=this.X_&&this.X_.hasPendingWrites!==i.hasPendingWrites;return!(!i.syncStateChanged&&!e)&&this.options.includeMetadataChanges===!0}na(i){i=wp.fromInitialDocuments(i.query,i.docs,i.mutatedKeys,i.fromCache,i.hasCachedResults),this.Z_=!0,this.Y_.next(i)}G_(){return this.options.source!==WP.Cache}};var TC=class{constructor(i){this.key=i}},SC=class{constructor(i){this.key=i}},YP=class{constructor(i,e){this.query=i,this.la=e,this.ha=null,this.hasCachedResults=!1,this.current=!1,this.Pa=Ni(),this.mutatedKeys=Ni(),this.Ia=lG(i),this.Ta=new wC(this.Ia)}get Ea(){return this.la}da(i,e){let r=e?e.Aa:new CC,n=e?e.Ta:this.Ta,a=e?e.mutatedKeys:this.mutatedKeys,s=n,o=!1,d=this.query.limitType==="F"&&n.size===this.query.limit?n.last():null,l=this.query.limitType==="L"&&n.size===this.query.limit?n.first():null;if(i.inorderTraversal((c,h)=>{let u=n.get(c),f=FC(this.query,h)?h:null,p=!!u&&this.mutatedKeys.has(u.key),m=!!f&&(f.hasLocalMutations||this.mutatedKeys.has(f.key)&&f.hasCommittedMutations),g=!1;u&&f?u.data.isEqual(f.data)?p!==m&&(r.track({type:3,doc:f}),g=!0):this.Ra(u,f)||(r.track({type:2,doc:f}),g=!0,(d&&this.Ia(f,d)>0||l&&this.Ia(f,l)<0)&&(o=!0)):!u&&f?(r.track({type:0,doc:f}),g=!0):u&&!f&&(r.track({type:1,doc:u}),g=!0,(d||l)&&(o=!0)),g&&(f?(s=s.add(f),a=m?a.add(c):a.delete(c)):(s=s.delete(c),a=a.delete(c)))}),this.query.limit!==null)for(;s.size>this.query.limit;){let c=this.query.limitType==="F"?s.last():s.first();s=s.delete(c.key),a=a.delete(c.key),r.track({type:1,doc:c})}return{Ta:s,Aa:r,Xi:o,mutatedKeys:a}}Ra(i,e){return i.hasLocalMutations&&e.hasCommittedMutations&&!e.hasLocalMutations}applyChanges(i,e,r,n){let a=this.Ta;this.Ta=i.Ta,this.mutatedKeys=i.mutatedKeys;let s=i.Aa.Q_();s.sort((c,h)=>function(f,p){let m=g=>{switch(g){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return ai()}};return m(f)-m(p)}(c.type,h.type)||this.Ia(c.doc,h.doc)),this.Va(r),n=n!=null&&n;let o=e&&!n?this.ma():[],d=this.Pa.size===0&&this.current&&!n?1:0,l=d!==this.ha;return this.ha=d,s.length!==0||l?{snapshot:new wp(this.query,i.Ta,a,s,i.mutatedKeys,d===0,l,!1,!!r&&r.resumeToken.approximateByteSize()>0),fa:o}:{fa:o}}j_(i){return this.current&&i==="Offline"?(this.current=!1,this.applyChanges({Ta:this.Ta,Aa:new CC,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{fa:[]}}ga(i){return!this.la.has(i)&&!!this.Ta.has(i)&&!this.Ta.get(i).hasLocalMutations}Va(i){i&&(i.addedDocuments.forEach(e=>this.la=this.la.add(e)),i.modifiedDocuments.forEach(e=>{}),i.removedDocuments.forEach(e=>this.la=this.la.delete(e)),this.current=i.current)}ma(){if(!this.current)return[];let i=this.Pa;this.Pa=Ni(),this.Ta.forEach(r=>{this.ga(r.key)&&(this.Pa=this.Pa.add(r.key))});let e=[];return i.forEach(r=>{this.Pa.has(r)||e.push(new SC(r))}),this.Pa.forEach(r=>{i.has(r)||e.push(new TC(r))}),e}pa(i){this.la=i.hs,this.Pa=Ni();let e=this.da(i.documents);return this.applyChanges(e,!0)}ya(){return wp.fromInitialDocuments(this.query,this.Ta,this.mutatedKeys,this.ha===0,this.hasCachedResults)}},$P=class{constructor(i,e,r){this.query=i,this.targetId=e,this.view=r}},QP=class{constructor(i){this.key=i,this.wa=!1}},KP=class{constructor(i,e,r,n,a,s){this.localStore=i,this.remoteStore=e,this.eventManager=r,this.sharedClientState=n,this.currentUser=a,this.maxConcurrentLimboResolutions=s,this.Sa={},this.ba=new ou(o=>oG(o),kC),this.Da=new Map,this.Ca=new Set,this.va=new mr(Zt.comparator),this.Fa=new Map,this.Ma=new Bv,this.xa={},this.Oa=new Map,this.Na=Nv.Ln(),this.onlineState="Unknown",this.La=void 0}get isPrimaryClient(){return this.La===!0}};function Pbe(t,i,e=!0){return Ve(this,null,function*(){let r=zG(t),n,a=r.ba.get(i);return a?(r.sharedClientState.addLocalQueryTarget(a.targetId),n=a.view.ya()):n=yield LG(r,i,e,!0),n})}function kbe(t,i){return Ve(this,null,function*(){let e=zG(t);yield LG(e,i,!0,!1)})}function LG(t,i,e,r){return Ve(this,null,function*(){let n=yield mbe(t.localStore,ql(i)),a=n.targetId,s=e?t.sharedClientState.addLocalQueryTarget(a):"not-current",o;return r&&(o=yield Fbe(t,i,a,s==="current",n.resumeToken)),t.isPrimaryClient&&e&&IG(t.remoteStore,n),o})}function Fbe(t,i,e,r,n){return Ve(this,null,function*(){t.Ba=(h,u,f)=>function(m,g,v,y){return Ve(this,null,function*(){let x=g.view.da(v);x.Xi&&(x=yield Vz(m.localStore,g.query,!1).then(({documents:w})=>g.view.da(w,x)));let b=y&&y.targetChanges.get(g.targetId),_=y&&y.targetMismatches.get(g.targetId)!=null,C=g.view.applyChanges(x,m.isPrimaryClient,b,_);return Hz(m,g.targetId,C.fa),C.snapshot})}(t,h,u,f);let a=yield Vz(t.localStore,i,!0),s=new YP(i,a.hs),o=s.da(a.documents),d=Ov.createSynthesizedTargetChangeForCurrentChange(e,r&&t.onlineState!=="Offline",n),l=s.applyChanges(o,t.isPrimaryClient,d);Hz(t,e,l.fa);let c=new $P(i,e,s);return t.ba.set(i,c),t.Da.has(e)?t.Da.get(e).push(i):t.Da.set(e,[i]),l.snapshot})}function Obe(t,i,e){return Ve(this,null,function*(){let r=fi(t),n=r.ba.get(i),a=r.Da.get(n.targetId);if(a.length>1)return r.Da.set(n.targetId,a.filter(s=>!kC(s,i))),void r.ba.delete(i);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(n.targetId),r.sharedClientState.isActiveQueryTarget(n.targetId)||(yield PP(r.localStore,n.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(n.targetId),e&&_k(r.remoteStore,n.targetId),ZP(r,n.targetId)}).catch(Wv))):(ZP(r,n.targetId),yield PP(r.localStore,n.targetId,!0))})}function Lbe(t,i){return Ve(this,null,function*(){let e=fi(t),r=e.ba.get(i),n=e.Da.get(r.targetId);e.isPrimaryClient&&n.length===1&&(e.sharedClientState.removeLocalQueryTarget(r.targetId),_k(e.remoteStore,r.targetId))})}function Nbe(t,i,e){return Ve(this,null,function*(){let r=jbe(t);try{let n=yield function(s,o){let d=fi(s),l=$r.now(),c=o.reduce((f,p)=>f.add(p.key),Ni()),h,u;return d.persistence.runTransaction("Locally write mutations","readwrite",f=>{let p=qc(),m=Ni();return d.os.getEntries(f,c).next(g=>{p=g,p.forEach((v,y)=>{y.isValidDocument()||(m=m.add(v))})}).next(()=>d.localDocuments.getOverlayedDocuments(f,p)).next(g=>{h=g;let v=[];for(let y of o){let x=G1e(y,h.get(y.key).overlayedDocument);x!=null&&v.push(new ed(y.key,x,qz(x.value.mapValue),Fh.exists(!0)))}return d.mutationQueue.addMutationBatch(f,l,v,o)}).next(g=>{u=g;let v=g.applyToLocalDocumentSet(h,m);return d.documentOverlayCache.saveOverlays(f,g.batchId,v)})}).then(()=>({batchId:u.batchId,changes:dG(h)}))}(r.localStore,i);r.sharedClientState.addPendingMutation(n.batchId),function(s,o,d){let l=s.xa[s.currentUser.toKey()];l||(l=new mr(nn)),l=l.insert(o,d),s.xa[s.currentUser.toKey()]=l}(r,n.batchId,e),yield $v(r,n.changes),yield NC(r.remoteStore)}catch(n){let a=Sk(n,"Failed to persist write");e.reject(a)}})}function NG(t,i){return Ve(this,null,function*(){let e=fi(t);try{let r=yield ube(e.localStore,i);i.targetChanges.forEach((n,a)=>{let s=e.Fa.get(a);s&&(Vn(n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size<=1),n.addedDocuments.size>0?s.wa=!0:n.modifiedDocuments.size>0?Vn(s.wa):n.removedDocuments.size>0&&(Vn(s.wa),s.wa=!1))}),yield $v(e,r,i)}catch(r){yield Wv(r)}})}function Gz(t,i,e){let r=fi(t);if(r.isPrimaryClient&&e===0||!r.isPrimaryClient&&e===1){let n=[];r.ba.forEach((a,s)=>{let o=s.view.j_(i);o.snapshot&&n.push(o.snapshot)}),function(s,o){let d=fi(s);d.onlineState=o;let l=!1;d.queries.forEach((c,h)=>{for(let u of h.U_)u.j_(o)&&(l=!0)}),l&&Ek(d)}(r.eventManager,i),n.length&&r.Sa.h_(n),r.onlineState=i,r.isPrimaryClient&&r.sharedClientState.setOnlineState(i)}}function Bbe(t,i,e){return Ve(this,null,function*(){let r=fi(t);r.sharedClientState.updateQueryState(i,"rejected",e);let n=r.Fa.get(i),a=n&&n.key;if(a){let s=new mr(Zt.comparator);s=s.insert(a,ml.newNoDocument(a,vi.min()));let o=Ni().add(a),d=new uC(vi.min(),new Map,new mr(nn),s,o);yield NG(r,d),r.va=r.va.remove(a),r.Fa.delete(i),Dk(r)}else yield PP(r.localStore,i,!1).then(()=>ZP(r,i,e)).catch(Wv)})}function Vbe(t,i){return Ve(this,null,function*(){let e=fi(t),r=i.batch.batchId;try{let n=yield dbe(e.localStore,i);VG(e,r,null),BG(e,r),e.sharedClientState.updateMutationState(r,"acknowledged"),yield $v(e,n)}catch(n){yield Wv(n)}})}function Ube(t,i,e){return Ve(this,null,function*(){let r=fi(t);try{let n=yield function(s,o){let d=fi(s);return d.persistence.runTransaction("Reject batch","readwrite-primary",l=>{let c;return d.mutationQueue.lookupMutationBatch(l,o).next(h=>(Vn(h!==null),c=h.keys(),d.mutationQueue.removeMutationBatch(l,h))).next(()=>d.mutationQueue.performConsistencyCheck(l)).next(()=>d.documentOverlayCache.removeOverlaysForBatchId(l,c,o)).next(()=>d.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,c)).next(()=>d.localDocuments.getDocuments(l,c))})}(r.localStore,i);VG(r,i,e),BG(r,i),r.sharedClientState.updateMutationState(i,"rejected",e),yield $v(r,n)}catch(n){yield Wv(n)}})}function BG(t,i){(t.Oa.get(i)||[]).forEach(e=>{e.resolve()}),t.Oa.delete(i)}function VG(t,i,e){let r=fi(t),n=r.xa[r.currentUser.toKey()];if(n){let a=n.get(i);a&&(e?a.reject(e):a.resolve(),n=n.remove(i)),r.xa[r.currentUser.toKey()]=n}}function ZP(t,i,e=null){t.sharedClientState.removeLocalQueryTarget(i);for(let r of t.Da.get(i))t.ba.delete(r),e&&t.Sa.ka(r,e);t.Da.delete(i),t.isPrimaryClient&&t.Ma.Vr(i).forEach(r=>{t.Ma.containsKey(r)||UG(t,r)})}function UG(t,i){t.Ca.delete(i.path.canonicalString());let e=t.va.get(i);e!==null&&(_k(t.remoteStore,e),t.va=t.va.remove(i),t.Fa.delete(e),Dk(t))}function Hz(t,i,e){for(let r of e)r instanceof TC?(t.Ma.addReference(r.key,i),zbe(t,r)):r instanceof SC?(Ot("SyncEngine","Document no longer in limbo: "+r.key),t.Ma.removeReference(r.key,i),t.Ma.containsKey(r.key)||UG(t,r.key)):ai()}function zbe(t,i){let e=i.key,r=e.path.canonicalString();t.va.get(e)||t.Ca.has(r)||(Ot("SyncEngine","New document in limbo: "+e),t.Ca.add(r),Dk(t))}function Dk(t){for(;t.Ca.size>0&&t.va.size{s.push(r.Ba(d,i,e).then(l=>{var c;if((l||e)&&r.isPrimaryClient){let h=l?!l.fromCache:(c=e?.targetChanges.get(d.targetId))===null||c===void 0?void 0:c.current;r.sharedClientState.updateQueryState(d.targetId,h?"current":"not-current")}if(l){n.push(l);let h=MP.Ki(d.targetId,l);a.push(h)}}))}),yield Promise.all(s),r.Sa.h_(n),yield function(d,l){return Ve(this,null,function*(){let c=fi(d);try{yield c.persistence.runTransaction("notifyLocalViewChanges","readwrite",h=>yt.forEach(l,u=>yt.forEach(u.qi,f=>c.persistence.referenceDelegate.addReference(h,u.targetId,f)).next(()=>yt.forEach(u.Qi,f=>c.persistence.referenceDelegate.removeReference(h,u.targetId,f)))))}catch(h){if(!Xv(h))throw h;Ot("LocalStore","Failed to update sequence numbers: "+h)}for(let h of l){let u=h.targetId;if(!h.fromCache){let f=c.ns.get(u),p=f.snapshotVersion,m=f.withLastLimboFreeSnapshotVersion(p);c.ns=c.ns.insert(u,m)}}})}(r.localStore,a))})}function Gbe(t,i){return Ve(this,null,function*(){let e=fi(t);if(!e.currentUser.isEqual(i)){Ot("SyncEngine","User change. New user:",i.toKey());let r=yield MG(e.localStore,i);e.currentUser=i,function(a,s){a.Oa.forEach(o=>{o.forEach(d=>{d.reject(new It(tt.CANCELLED,s))})}),a.Oa.clear()}(e,"'waitForPendingWrites' promise is rejected due to a user change."),e.sharedClientState.handleUserChange(i,r.removedBatchIds,r.addedBatchIds),yield $v(e,r.us)}})}function Hbe(t,i){let e=fi(t),r=e.Fa.get(i);if(r&&r.wa)return Ni().add(r.key);{let n=Ni(),a=e.Da.get(i);if(!a)return n;for(let s of a){let o=e.ba.get(s);n=n.unionWith(o.view.Ea)}return n}}function zG(t){let i=fi(t);return i.remoteStore.remoteSyncer.applyRemoteEvent=NG.bind(null,i),i.remoteStore.remoteSyncer.getRemoteKeysForTarget=Hbe.bind(null,i),i.remoteStore.remoteSyncer.rejectListen=Bbe.bind(null,i),i.Sa.h_=Ibe.bind(null,i.eventManager),i.Sa.ka=Rbe.bind(null,i.eventManager),i}function jbe(t){let i=fi(t);return i.remoteStore.remoteSyncer.applySuccessfulWrite=Vbe.bind(null,i),i.remoteStore.remoteSyncer.rejectFailedWrite=Ube.bind(null,i),i}var EC=class{constructor(){this.synchronizeTabs=!1}initialize(i){return Ve(this,null,function*(){this.serializer=OC(i.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(i),this.persistence=this.createPersistence(i),yield this.persistence.start(),this.localStore=this.createLocalStore(i),this.gcScheduler=this.createGarbageCollectionScheduler(i,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(i,this.localStore)})}createGarbageCollectionScheduler(i,e){return null}createIndexBackfillerScheduler(i,e){return null}createLocalStore(i){return cbe(this.persistence,new IP,i.initialUser,this.serializer)}createPersistence(i){return new SP(DP.Hr,this.serializer)}createSharedClientState(i){return new kP}terminate(){return Ve(this,null,function*(){var i,e;(i=this.gcScheduler)===null||i===void 0||i.stop(),(e=this.indexBackfillerScheduler)===null||e===void 0||e.stop(),this.sharedClientState.shutdown(),yield this.persistence.shutdown()})}};var JP=class{initialize(i,e){return Ve(this,null,function*(){this.localStore||(this.localStore=i.localStore,this.sharedClientState=i.sharedClientState,this.datastore=this.createDatastore(e),this.remoteStore=this.createRemoteStore(e),this.eventManager=this.createEventManager(e),this.syncEngine=this.createSyncEngine(e,!i.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>Gz(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=Gbe.bind(null,this.syncEngine),yield Dbe(this.remoteStore,this.syncEngine.isPrimaryClient))})}createEventManager(i){return function(){return new jP}()}createDatastore(i){let e=OC(i.databaseInfo.databaseId),r=function(a){return new LP(a)}(i.databaseInfo);return function(a,s,o,d){return new VP(a,s,o,d)}(i.authCredentials,i.appCheckCredentials,r,e)}createRemoteStore(i){return function(r,n,a,s,o){return new zP(r,n,a,s,o)}(this.localStore,this.datastore,i.asyncQueue,e=>Gz(this.syncEngine,e,0),function(){return yC.D()?new yC:new FP}())}createSyncEngine(i,e){return function(n,a,s,o,d,l,c){let h=new KP(n,a,s,o,d,l);return c&&(h.La=!0),h}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,i.initialUser,i.maxConcurrentLimboResolutions,e)}terminate(){return Ve(this,null,function*(){var i;yield function(r){return Ve(this,null,function*(){let n=fi(r);Ot("RemoteStore","RemoteStore shutting down."),n.M_.add(5),yield Yv(n),n.O_.shutdown(),n.N_.set("Unknown")})}(this.remoteStore),(i=this.datastore)===null||i===void 0||i.terminate()})}};var qP=class{constructor(i){this.observer=i,this.muted=!1}next(i){this.observer.next&&this.Ka(this.observer.next,i)}error(i){this.observer.error?this.Ka(this.observer.error,i):Zc("Uncaught Error in snapshot listener:",i.toString())}$a(){this.muted=!0}Ka(i,e){this.muted||setTimeout(()=>{this.muted||i(e)},0)}};var ek=class{constructor(i,e,r,n){this.authCredentials=i,this.appCheckCredentials=e,this.asyncQueue=r,this.databaseInfo=n,this.user=os.UNAUTHENTICATED,this.clientId=nC.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,a=>Ve(this,null,function*(){Ot("FirestoreClient","Received user=",a.uid),yield this.authCredentialListener(a),this.user=a})),this.appCheckCredentials.start(r,a=>(Ot("FirestoreClient","Received new app check token=",a),this.appCheckCredentialListener(a,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(i){this.authCredentialListener=i}setAppCheckTokenChangeListener(i){this.appCheckCredentialListener=i}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new It(tt.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();let i=new Zl;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(()=>Ve(this,null,function*(){try{this._onlineComponents&&(yield this._onlineComponents.terminate()),this._offlineComponents&&(yield this._offlineComponents.terminate()),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),i.resolve()}catch(e){let r=Sk(e,"Failed to shutdown persistence");i.reject(r)}})),i.promise}};function IR(t,i){return Ve(this,null,function*(){t.asyncQueue.verifyOperationInProgress(),Ot("FirestoreClient","Initializing OfflineComponentProvider");let e=t.configuration;yield i.initialize(e);let r=e.initialUser;t.setCredentialChangeListener(n=>Ve(this,null,function*(){r.isEqual(n)||(yield MG(i.localStore,n),r=n)})),i.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=i})}function jz(t,i){return Ve(this,null,function*(){t.asyncQueue.verifyOperationInProgress();let e=yield Xbe(t);Ot("FirestoreClient","Initializing OnlineComponentProvider"),yield i.initialize(e,t.configuration),t.setCredentialChangeListener(r=>Uz(i.remoteStore,r)),t.setAppCheckTokenChangeListener((r,n)=>Uz(i.remoteStore,n)),t._onlineComponents=i})}function Wbe(t){return t.name==="FirebaseError"?t.code===tt.FAILED_PRECONDITION||t.code===tt.UNIMPLEMENTED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}function Xbe(t){return Ve(this,null,function*(){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){Ot("FirestoreClient","Using user provided OfflineComponentProvider");try{yield IR(t,t._uninitializedComponentsProvider._offline)}catch(i){let e=i;if(!Wbe(e))throw e;fp("Error using user provided cache. Falling back to memory cache: "+e),yield IR(t,new EC)}}else Ot("FirestoreClient","Using default OfflineComponentProvider"),yield IR(t,new EC);return t._offlineComponents})}function GG(t){return Ve(this,null,function*(){return t._onlineComponents||(t._uninitializedComponentsProvider?(Ot("FirestoreClient","Using user provided OnlineComponentProvider"),yield jz(t,t._uninitializedComponentsProvider._online)):(Ot("FirestoreClient","Using default OnlineComponentProvider"),yield jz(t,new JP))),t._onlineComponents})}function Ybe(t){return GG(t).then(i=>i.syncEngine)}function $be(t){return Ve(this,null,function*(){let i=yield GG(t),e=i.eventManager;return e.onListen=Pbe.bind(null,i.syncEngine),e.onUnlisten=Obe.bind(null,i.syncEngine),e.onFirstRemoteStoreListen=kbe.bind(null,i.syncEngine),e.onLastRemoteStoreUnlisten=Lbe.bind(null,i.syncEngine),e})}function Qbe(t,i,e={}){let r=new Zl;return t.asyncQueue.enqueueAndForget(()=>Ve(this,null,function*(){return function(a,s,o,d,l){let c=new qP({next:u=>{s.enqueueAndForget(()=>Abe(a,h)),u.fromCache&&d.source==="server"?l.reject(new It(tt.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):l.resolve(u)},error:u=>l.reject(u)}),h=new XP(o,c,{includeMetadataChanges:!0,ra:!0});return Mbe(a,h)}(yield $be(t),t.asyncQueue,i,e,r)})),r.promise}function HG(t){let i={};return t.timeoutSeconds!==void 0&&(i.timeoutSeconds=t.timeoutSeconds),i}var Wz=new Map;function jG(t,i,e){if(!e)throw new It(tt.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${i}.`)}function Kbe(t,i,e,r){if(i===!0&&r===!0)throw new It(tt.INVALID_ARGUMENT,`${t} and ${e} cannot be used together.`)}function Xz(t){if(!Zt.isDocumentKey(t))throw new It(tt.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function Yz(t){if(Zt.isDocumentKey(t))throw new It(tt.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function BC(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{let i=function(r){return r.constructor?r.constructor.name:null}(t);return i?`a custom ${i} object`:"an object"}}return typeof t=="function"?"a function":ai()}function DC(t,i){if("_delegate"in t&&(t=t._delegate),!(t instanceof i)){if(i.name===t.constructor.name)throw new It(tt.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let e=BC(t);throw new It(tt.INVALID_ARGUMENT,`Expected type '${i.name}', but it was: ${e}`)}}return t}function Zbe(t,i){if(i<=0)throw new It(tt.INVALID_ARGUMENT,`Function ${t}() requires a positive number, but it was: ${i}.`)}var MC=class{constructor(i){var e,r;if(i.host===void 0){if(i.ssl!==void 0)throw new It(tt.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=i.host,this.ssl=(e=i.ssl)===null||e===void 0||e;if(this.credentials=i.credentials,this.ignoreUndefinedProperties=!!i.ignoreUndefinedProperties,this.localCache=i.localCache,i.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(i.cacheSizeBytes!==-1&&i.cacheSizeBytes<1048576)throw new It(tt.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=i.cacheSizeBytes}Kbe("experimentalForceLongPolling",i.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",i.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!i.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:i.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!i.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=HG((r=i.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(a){if(a.timeoutSeconds!==void 0){if(isNaN(a.timeoutSeconds))throw new It(tt.INVALID_ARGUMENT,`invalid long polling timeout: ${a.timeoutSeconds} (must not be NaN)`);if(a.timeoutSeconds<5)throw new It(tt.INVALID_ARGUMENT,`invalid long polling timeout: ${a.timeoutSeconds} (minimum allowed value is 5)`);if(a.timeoutSeconds>30)throw new It(tt.INVALID_ARGUMENT,`invalid long polling timeout: ${a.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!i.useFetchStreams}isEqual(i){return this.host===i.host&&this.ssl===i.ssl&&this.credentials===i.credentials&&this.cacheSizeBytes===i.cacheSizeBytes&&this.experimentalForceLongPolling===i.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===i.experimentalAutoDetectLongPolling&&function(r,n){return r.timeoutSeconds===n.timeoutSeconds}(this.experimentalLongPollingOptions,i.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===i.ignoreUndefinedProperties&&this.useFetchStreams===i.useFetchStreams}},Cp=class{constructor(i,e,r,n){this._authCredentials=i,this._appCheckCredentials=e,this._databaseId=r,this._app=n,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new MC({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new It(tt.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 this._terminateTask!==void 0}_setSettings(i){if(this._settingsFrozen)throw new It(tt.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 MC(i),i.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new RR;switch(r.type){case"firstParty":return new OR(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new It(tt.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(i.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){let r=Wz.get(e);r&&(Ot("ComponentProvider","Removing Datastore"),Wz.delete(e),r.terminate())}(this),Promise.resolve()}};function Jbe(t,i,e,r={}){var n;let a=(t=DC(t,Cp))._getSettings(),s=`${i}:${e}`;if(a.host!=="firestore.googleapis.com"&&a.host!==s&&fp("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},a),{host:s,ssl:!1})),r.mockUserToken){let o,d;if(typeof r.mockUserToken=="string")o=r.mockUserToken,d=os.MOCK_USER;else{o=KU(r.mockUserToken,(n=t._app)===null||n===void 0?void 0:n.options.projectId);let l=r.mockUserToken.sub||r.mockUserToken.user_id;if(!l)throw new It(tt.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");d=new os(l)}t._authCredentials=new PR(new iC(o,d))}}var cu=class t{constructor(i,e,r){this.converter=e,this._query=r,this.type="query",this.firestore=i}withConverter(i){return new t(this.firestore,i,this._query)}},Vo=class t{constructor(i,e,r){this.converter=e,this._key=r,this.type="document",this.firestore=i}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new ru(this.firestore,this.converter,this._key.path.popLast())}withConverter(i){return new t(this.firestore,i,this._key)}},ru=class t extends cu{constructor(i,e,r){super(i,e,sG(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let i=this._path.popLast();return i.isEmpty()?null:new Vo(this.firestore,null,new Zt(i))}withConverter(i){return new t(this.firestore,i,this._path)}};function Mk(t,i,...e){if(t=Ah(t),jG("collection","path",i),t instanceof Cp){let r=rr.fromString(i,...e);return Yz(r),new ru(t,null,r)}{if(!(t instanceof Vo||t instanceof ru))throw new It(tt.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let r=t._path.child(rr.fromString(i,...e));return Yz(r),new ru(t.firestore,null,r)}}function qbe(t,i,...e){if(t=Ah(t),arguments.length===1&&(i=nC.newId()),jG("doc","path",i),t instanceof Cp){let r=rr.fromString(i,...e);return Xz(r),new Vo(t,null,new Zt(r))}{if(!(t instanceof Vo||t instanceof ru))throw new It(tt.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let r=t._path.child(rr.fromString(i,...e));return Xz(r),new Vo(t.firestore,t instanceof ru?t.converter:null,new Zt(r))}}var tk=class{constructor(){this.iu=Promise.resolve(),this.su=[],this.ou=!1,this._u=[],this.au=null,this.uu=!1,this.cu=!1,this.lu=[],this.Yo=new xC(this,"async_queue_retry"),this.hu=()=>{let e=AR();e&&Ot("AsyncQueue","Visibility state changed to "+e.visibilityState),this.Yo.Wo()};let i=AR();i&&typeof i.addEventListener=="function"&&i.addEventListener("visibilitychange",this.hu)}get isShuttingDown(){return this.ou}enqueueAndForget(i){this.enqueue(i)}enqueueAndForgetEvenWhileRestricted(i){this.Pu(),this.Iu(i)}enterRestrictedMode(i){if(!this.ou){this.ou=!0,this.cu=i||!1;let e=AR();e&&typeof e.removeEventListener=="function"&&e.removeEventListener("visibilitychange",this.hu)}}enqueue(i){if(this.Pu(),this.ou)return new Promise(()=>{});let e=new Zl;return this.Iu(()=>this.ou&&this.cu?Promise.resolve():(i().then(e.resolve,e.reject),e.promise)).then(()=>e.promise)}enqueueRetryable(i){this.enqueueAndForget(()=>(this.su.push(i),this.Tu()))}Tu(){return Ve(this,null,function*(){if(this.su.length!==0){try{yield this.su[0](),this.su.shift(),this.Yo.reset()}catch(i){if(!Xv(i))throw i;Ot("AsyncQueue","Operation failed with retryable error: "+i)}this.su.length>0&&this.Yo.$o(()=>this.Tu())}})}Iu(i){let e=this.iu.then(()=>(this.uu=!0,i().catch(r=>{this.au=r,this.uu=!1;let n=function(s){let o=s.message||"";return s.stack&&(o=s.stack.includes(s.message)?s.stack:s.message+` +`+s.stack),o}(r);throw Zc("INTERNAL UNHANDLED ERROR: ",n),r}).then(r=>(this.uu=!1,r))));return this.iu=e,e}enqueueAfterDelay(i,e,r){this.Pu(),this.lu.indexOf(i)>-1&&(e=0);let n=GP.createAndSchedule(this,i,e,r,a=>this.Eu(a));return this._u.push(n),n}Pu(){this.au&&ai()}verifyOperationInProgress(){}du(){return Ve(this,null,function*(){let i;do i=this.iu,yield i;while(i!==this.iu)})}Au(i){for(let e of this._u)if(e.timerId===i)return!0;return!1}Ru(i){return this.du().then(()=>{this._u.sort((e,r)=>e.targetTimeMs-r.targetTimeMs);for(let e of this._u)if(e.skipDelay(),i!=="all"&&e.timerId===i)break;return this.du()})}Vu(i){this.lu.push(i)}Eu(i){let e=this._u.indexOf(i);this._u.splice(e,1)}};var Vv=class extends Cp{constructor(i,e,r,n){super(i,e,r,n),this.type="firestore",this._queue=function(){return new tk}(),this._persistenceKey=n?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||YG(this),this._firestoreClient.terminate()}};function WG(t,i){let e=typeof t=="object"?t:mz(),r=typeof t=="string"?t:i||"(default)",n=hz(e,"firestore").getImmediate({identifier:r});if(!n._initialized){let a=QU("firestore");a&&Jbe(n,...a)}return n}function XG(t){return t._firestoreClient||YG(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function YG(t){var i,e,r;let n=t._freezeSettings(),a=function(o,d,l,c){return new UR(o,d,l,c.host,c.ssl,c.experimentalForceLongPolling,c.experimentalAutoDetectLongPolling,HG(c.experimentalLongPollingOptions),c.useFetchStreams)}(t._databaseId,((i=t._app)===null||i===void 0?void 0:i.options.appId)||"",t._persistenceKey,n);t._firestoreClient=new ek(t._authCredentials,t._appCheckCredentials,t._queue,a),!((e=n.localCache)===null||e===void 0)&&e._offlineComponentProvider&&(!((r=n.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(t._firestoreClient._uninitializedComponentsProvider={_offlineKind:n.localCache.kind,_offline:n.localCache._offlineComponentProvider,_online:n.localCache._onlineComponentProvider})}var Uv=class t{constructor(i){this._byteString=i}static fromBase64String(i){try{return new t(fa.fromBase64String(i))}catch(e){throw new It(tt.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(i){return new t(fa.fromUint8Array(i))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(i){return this._byteString.isEqual(i._byteString)}};var zv=class{constructor(...i){for(let e=0;e90)throw new It(tt.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+i);if(!isFinite(e)||e<-180||e>180)throw new It(tt.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=i,this._long=e}get latitude(){return this._lat}get longitude(){return this._long}isEqual(i){return this._lat===i._lat&&this._long===i._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(i){return nn(this._lat,i._lat)||nn(this._long,i._long)}};var e_e=/^__.*__$/,ik=class{constructor(i,e,r){this.data=i,this.fieldMask=e,this.fieldTransforms=r}toMutation(i,e){return this.fieldMask!==null?new ed(i,this.data,this.fieldMask,e,this.fieldTransforms):new zh(i,this.data,e,this.fieldTransforms)}};function $G(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw ai()}}var nk=class t{constructor(i,e,r,n,a,s){this.settings=i,this.databaseId=e,this.serializer=r,this.ignoreUndefinedProperties=n,a===void 0&&this.mu(),this.fieldTransforms=a||[],this.fieldMask=s||[]}get path(){return this.settings.path}get fu(){return this.settings.fu}gu(i){return new t(Object.assign(Object.assign({},this.settings),i),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}pu(i){var e;let r=(e=this.path)===null||e===void 0?void 0:e.child(i),n=this.gu({path:r,yu:!1});return n.wu(i),n}Su(i){var e;let r=(e=this.path)===null||e===void 0?void 0:e.child(i),n=this.gu({path:r,yu:!1});return n.mu(),n}bu(i){return this.gu({path:void 0,yu:!0})}Du(i){return IC(i,this.settings.methodName,this.settings.Cu||!1,this.path,this.settings.vu)}contains(i){return this.fieldMask.find(e=>i.isPrefixOf(e))!==void 0||this.fieldTransforms.find(e=>i.isPrefixOf(e.field))!==void 0}mu(){if(this.path)for(let i=0;id.covers(h.field))}else d=null,l=s.fieldTransforms;return new ik(new fl(o),d,l)}function i_e(t,i,e,r=!1){return Ak(e,t.Fu(r?4:3,i))}function Ak(t,i){if(ZG(t=Ah(t)))return JG("Unsupported field value:",i,t),KG(t,i);if(t instanceof AC)return function(r,n){if(!$G(n.fu))throw n.Du(`${r._methodName}() can only be used with update() and set()`);if(!n.path)throw n.Du(`${r._methodName}() is not currently supported inside arrays`);let a=r._toFieldTransform(n);a&&n.fieldTransforms.push(a)}(t,i),null;if(t===void 0&&i.ignoreUndefinedProperties)return null;if(i.path&&i.fieldMask.push(i.path),t instanceof Array){if(i.settings.yu&&i.fu!==4)throw i.Du("Nested arrays are not supported");return function(r,n){let a=[],s=0;for(let o of r){let d=Ak(o,n.bu(s));d==null&&(d={nullValue:"NULL_VALUE"}),a.push(d),s++}return{arrayValue:{values:a}}}(t,i)}return function(r,n){if((r=Ah(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return N1e(n.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){let a=$r.fromDate(r);return{timestampValue:pC(n.serializer,a)}}if(r instanceof $r){let a=new $r(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:pC(n.serializer,a)}}if(r instanceof Gv)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof Uv)return{bytesValue:_G(n.serializer,r._byteString)};if(r instanceof Vo){let a=n.databaseId,s=r.firestore._databaseId;if(!s.isEqual(a))throw n.Du(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${a.projectId}/${a.database}`);return{referenceValue:bk(r.firestore._databaseId||n.databaseId,r._key.path)}}throw n.Du(`Unsupported field value: ${BC(r)}`)}(t,i)}function KG(t,i){let e={};return Zz(t)?i.path&&i.path.length>0&&i.fieldMask.push(i.path):Sp(t,(r,n)=>{let a=Ak(n,i.pu(r));a!=null&&(e[r]=a)}),{mapValue:{fields:e}}}function ZG(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof $r||t instanceof Gv||t instanceof Uv||t instanceof Vo||t instanceof AC)}function JG(t,i,e){if(!ZG(e)||!function(n){return typeof n=="object"&&n!==null&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null)}(e)){let r=BC(e);throw r==="an object"?i.Du(t+" a custom object"):i.Du(t+" "+r)}}function n_e(t,i,e){if((i=Ah(i))instanceof zv)return i._internalPath;if(typeof i=="string")return qG(t,i);throw IC("Field path arguments must be of type string or ",t,!1,void 0,e)}var r_e=new RegExp("[~\\*/\\[\\]]");function qG(t,i,e){if(i.search(r_e)>=0)throw IC(`Invalid field path (${i}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,e);try{return new zv(...i.split("."))._internalPath}catch{throw IC(`Invalid field path (${i}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,e)}}function IC(t,i,e,r,n){let a=r&&!r.isEmpty(),s=n!==void 0,o=`Function ${i}() called with invalid data`;e&&(o+=" (via `toFirestore()`)"),o+=". ";let d="";return(a||s)&&(d+=" (found",a&&(d+=` in field ${r}`),s&&(d+=` in document ${n}`),d+=")"),new It(tt.INVALID_ARGUMENT,o+t+d)}function s_e(t,i){return t.some(e=>e.isEqual(i))}var RC=class{constructor(i,e,r,n,a){this._firestore=i,this._userDataWriter=e,this._key=r,this._document=n,this._converter=a}get id(){return this._key.path.lastSegment()}get ref(){return new Vo(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){let i=new sk(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(i)}return this._userDataWriter.convertValue(this._document.data.value)}}get(i){if(this._document){let e=this._document.data.field(Ik("DocumentSnapshot.get",i));if(e!==null)return this._userDataWriter.convertValue(e)}}},sk=class extends RC{data(){return super.data()}};function Ik(t,i){return typeof i=="string"?qG(t,i):i instanceof zv?i._internalPath:i._delegate._internalPath}function a_e(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new It(tt.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Hv=class{},jv=class extends Hv{};function eH(t,i,...e){let r=[];i instanceof Hv&&r.push(i),r=r.concat(e),function(a){let s=a.filter(d=>d instanceof ok).length,o=a.filter(d=>d instanceof ak).length;if(s>1||s>0&&o>0)throw new It(tt.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(let n of r)t=n._apply(t);return t}var ak=class t extends jv{constructor(i,e,r){super(),this._field=i,this._op=e,this._value=r,this.type="where"}static _create(i,e,r){return new t(i,e,r)}_apply(i){let e=this._parse(i);return nH(i._query,e),new cu(i.firestore,i.converter,qR(i._query,e))}_parse(i){let e=QG(i.firestore);return function(a,s,o,d,l,c,h){let u;if(l.isKeyField()){if(c==="array-contains"||c==="array-contains-any")throw new It(tt.INVALID_ARGUMENT,`Invalid Query. You can't perform '${c}' queries on documentId().`);if(c==="in"||c==="not-in"){Qz(h,c);let f=[];for(let p of h)f.push($z(d,a,p));u={arrayValue:{values:f}}}else u=$z(d,a,h)}else c!=="in"&&c!=="not-in"&&c!=="array-contains-any"||Qz(h,c),u=i_e(o,s,h,c==="in"||c==="not-in");return Ir.create(l,c,u)}(i._query,"where",e,i.firestore._databaseId,this._field,this._op,this._value)}};var ok=class t extends Hv{constructor(i,e){super(),this.type=i,this._queryConstraints=e}static _create(i,e){return new t(i,e)}_parse(i){let e=this._queryConstraints.map(r=>r._parse(i)).filter(r=>r.getFilters().length>0);return e.length===1?e[0]:pl.create(e,this._getOperator())}_apply(i){let e=this._parse(i);return e.getFilters().length===0?i:(function(n,a){let s=n,o=a.getFlattenedFilters();for(let d of o)nH(s,d),s=qR(s,d)}(i._query,e),new cu(i.firestore,i.converter,qR(i._query,e)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}};var lk=class t extends jv{constructor(i,e){super(),this._field=i,this._direction=e,this.type="orderBy"}static _create(i,e){return new t(i,e)}_apply(i){let e=function(n,a,s){if(n.startAt!==null)throw new It(tt.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(n.endAt!==null)throw new It(tt.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new Bh(a,s)}(i._query,this._field,this._direction);return new cu(i.firestore,i.converter,function(n,a){let s=n.explicitOrderBy.concat([a]);return new au(n.path,n.collectionGroup,s,n.filters.slice(),n.limit,n.limitType,n.startAt,n.endAt)}(i._query,e))}};function tH(t,i="asc"){let e=i,r=Ik("orderBy",t);return lk._create(r,e)}var ck=class t extends jv{constructor(i,e,r){super(),this.type=i,this._limit=e,this._limitType=r}static _create(i,e,r){return new t(i,e,r)}_apply(i){return new cu(i.firestore,i.converter,cC(i._query,this._limit,this._limitType))}};function iH(t){return Zbe("limit",t),ck._create("limit",t,"F")}function $z(t,i,e){if(typeof(e=Ah(e))=="string"){if(e==="")throw new It(tt.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!aG(i)&&e.indexOf("/")!==-1)throw new It(tt.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${e}' contains a '/' character.`);let r=i.path.child(rr.fromString(e));if(!Zt.isDocumentKey(r))throw new It(tt.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return wz(t,new Zt(r))}if(e instanceof Vo)return wz(t,e._key);throw new It(tt.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${BC(e)}.`)}function Qz(t,i){if(!Array.isArray(t)||t.length===0)throw new It(tt.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${i.toString()}' filters.`)}function nH(t,i){let e=function(n,a){for(let s of n)for(let o of s.getFlattenedFilters())if(a.indexOf(o.op)>=0)return o.op;return null}(t.filters,function(n){switch(n){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(i.op));if(e!==null)throw e===i.op?new It(tt.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${i.op.toString()}' filter.`):new It(tt.INVALID_ARGUMENT,`Invalid query. You cannot use '${i.op.toString()}' filters with '${e.toString()}' filters.`)}var dk=class{convertValue(i,e="none"){switch(Nh(i)){case 0:return null;case 1:return i.booleanValue;case 2:return fr(i.integerValue||i.doubleValue);case 3:return this.convertTimestamp(i.timestampValue);case 4:return this.convertServerTimestamp(i,e);case 5:return i.stringValue;case 6:return this.convertBytes(su(i.bytesValue));case 7:return this.convertReference(i.referenceValue);case 8:return this.convertGeoPoint(i.geoPointValue);case 9:return this.convertArray(i.arrayValue,e);case 10:return this.convertObject(i.mapValue,e);default:throw ai()}}convertObject(i,e){return this.convertObjectMap(i.fields,e)}convertObjectMap(i,e="none"){let r={};return Sp(i,(n,a)=>{r[n]=this.convertValue(a,e)}),r}convertGeoPoint(i){return new Gv(fr(i.latitude),fr(i.longitude))}convertArray(i,e){return(i.values||[]).map(r=>this.convertValue(r,e))}convertServerTimestamp(i,e){switch(e){case"previous":let r=gk(i);return r==null?null:this.convertValue(r,e);case"estimate":return this.convertTimestamp(kv(i));default:return null}}convertTimestamp(i){let e=Jc(i);return new $r(e.seconds,e.nanos)}convertDocumentKey(i,e){let r=rr.fromString(i);Vn(DG(r));let n=new oC(r.get(1),r.get(3)),a=new Zt(r.popFirst(5));return n.isEqual(e)||Zc(`Document ${a} contains a document reference within a different database (${n.projectId}/${n.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`),a}};function o_e(t,i,e){let r;return r=t?e&&(e.merge||e.mergeFields)?t.toFirestore(i,e):t.toFirestore(i):i,r}var dp=class{constructor(i,e){this.hasPendingWrites=i,this.fromCache=e}isEqual(i){return this.hasPendingWrites===i.hasPendingWrites&&this.fromCache===i.fromCache}},uk=class extends RC{constructor(i,e,r,n,a,s){super(i,e,r,n,s),this._firestore=i,this._firestoreImpl=i,this.metadata=a}exists(){return super.exists()}data(i={}){if(this._document){if(this._converter){let e=new hp(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(e,i)}return this._userDataWriter.convertValue(this._document.data.value,i.serverTimestamps)}}get(i,e={}){if(this._document){let r=this._document.data.field(Ik("DocumentSnapshot.get",i));if(r!==null)return this._userDataWriter.convertValue(r,e.serverTimestamps)}}},hp=class extends uk{data(i={}){return super.data(i)}},hk=class{constructor(i,e,r,n){this._firestore=i,this._userDataWriter=e,this._snapshot=n,this.metadata=new dp(n.hasPendingWrites,n.fromCache),this.query=r}get docs(){let i=[];return this.forEach(e=>i.push(e)),i}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(i,e){this._snapshot.docs.forEach(r=>{i.call(e,new hp(this._firestore,this._userDataWriter,r.key,r,new dp(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(i={}){let e=!!i.includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new It(tt.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(n,a){if(n._snapshot.oldDocs.isEmpty()){let s=0;return n._snapshot.docChanges.map(o=>{let d=new hp(n._firestore,n._userDataWriter,o.doc.key,o.doc,new dp(n._snapshot.mutatedKeys.has(o.doc.key),n._snapshot.fromCache),n.query.converter);return o.doc,{type:"added",doc:d,oldIndex:-1,newIndex:s++}})}{let s=n._snapshot.oldDocs;return n._snapshot.docChanges.filter(o=>a||o.type!==3).map(o=>{let d=new hp(n._firestore,n._userDataWriter,o.doc.key,o.doc,new dp(n._snapshot.mutatedKeys.has(o.doc.key),n._snapshot.fromCache),n.query.converter),l=-1,c=-1;return o.type!==0&&(l=s.indexOf(o.doc.key),s=s.delete(o.doc.key)),o.type!==1&&(s=s.add(o.doc),c=s.indexOf(o.doc.key)),{type:l_e(o.type),doc:d,oldIndex:l,newIndex:c}})}}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}};function l_e(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return ai()}}var fk=class extends dk{constructor(i){super(),this.firestore=i}convertBytes(i){return new Uv(i)}convertReference(i){let e=this.convertDocumentKey(i,this.firestore._databaseId);return new Vo(this.firestore,null,e)}};function rH(t){t=DC(t,cu);let i=DC(t.firestore,Vv),e=XG(i),r=new fk(i);return a_e(t._query),Qbe(e,t._query).then(n=>new hk(i,r,t,n))}function sH(t,i){let e=DC(t.firestore,Vv),r=qbe(t),n=o_e(t.converter,i);return c_e(e,[t_e(QG(t.firestore),"addDoc",r._key,n,t.converter!==null,{}).toMutation(r._key,Fh.exists(!1))]).then(()=>r)}function c_e(t,i){return function(r,n){let a=new Zl;return r.asyncQueue.enqueueAndForget(()=>Ve(this,null,function*(){return Nbe(yield Ybe(r),n,a)})),a.promise}(XG(t),i)}(function(i,e=!0){(function(n){Tp=n})(fz),Cv(new Qc("firestore",(r,{instanceIdentifier:n,options:a})=>{let s=r.getProvider("app").getImmediate(),o=new Vv(new kR(r.getProvider("auth-internal")),new NR(r.getProvider("app-check-internal")),function(l,c){if(!Object.prototype.hasOwnProperty.apply(l.options,["projectId"]))throw new It(tt.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new oC(l.options.projectId,c)}(s,n),s);return a=Object.assign({useFetchStreams:e},a),o._setSettings(a),o},"PUBLIC").setMultipleInstances(!0)),iu(xz,"4.6.4",i),iu(xz,"4.6.4","esm2017")})();var VC=(()=>{class t{constructor(e){this.terminologyService=e,this.goals=[{name:"Bronze",score:100},{name:"Silver",score:200},{name:"Gold",score:300},{name:"Platinum",score:400},{name:"Diamond",score:500}],this.difficultyLevels=[{name:"Easy",rules:{maxHitPoints:5,hitpointsAwardedForGuessingfullTerm:1,freeHints:2,pointsPerGuessedLetter:1,goals:this.goals,difficultyBonus:0,endless:!1,maxRoundTime:60}},{name:"Medium",rules:{maxHitPoints:4,hitpointsAwardedForGuessingfullTerm:1,freeHints:1,pointsPerGuessedLetter:2,goals:this.goals,difficultyBonus:50,endless:!1,maxRoundTime:50}},{name:"Hard",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals,difficultyBonus:100,endless:!1,maxRoundTime:40}},{name:"Endless",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals,difficultyBonus:100,endless:!0,maxRoundTime:30}}],this.rules=this.difficultyLevels[0].rules,this.fsn="",this.scg="",this.focusConcepts=[],this.attributePairs=[],this.usedHints=new Set,this.randomLimit=4e3,this.guessResult=new Le,this.termResult=new Le,this.game=new Ci(this.initialize())}loadMenu(){this.clearRoundTimer(),this.game.next(Mt(Me({},this.game.value),{state:"menu"}))}getDifficultyLevels(){return this.difficultyLevels}newRound(e){return Ve(this,null,function*(){this.clearRoundTimer(),this.game.next(Mt(Me({},this.game.value),{state:"choosingTerm",score:e?0:this.game.value.score,hitPoints:e?this.rules.maxHitPoints:this.game.value.hitPoints,round:e?1:this.game.value.round+1,remainingTime:this.rules.maxRoundTime}));let r=Math.floor(Math.random()*this.randomLimit)+1,n=yield sn(this.terminologyService.expandValueSet("^ 816080008 |International Patient Summary| {{ C definitionStatus = defined }}","",r,1));this.randomLimit=n.expansion.total-1;let a=yield sn(this.terminologyService.lookupConcept(n.expansion.contains[0].code)),s=this.extractFSN(a);this.fsn=s||"";let o=this.extractScg(a);this.scg=o||"";let d=this.extractFocusConcepts(o||"");this.focusConcepts=d||[];let l=this.extractAttributePairs(o||"");this.attributePairs=l||[],s?this.initializeRound(s,e):this.initializeRound("No term found"),this.usedHints.clear()})}extractFSN(e){let r=this.extractTerm(e,"900000000000003001",this.terminologyService.getLang());return r||(r=this.extractTerm(e,"900000000000013009",this.terminologyService.getLang())),r||(r=this.extractTerm(e,"900000000000003001","en")),r}extractTerm(e,r,n){let a="";return e.parameter.forEach(s=>{if(s.name==="designation"){let o=s.part.some(l=>l.name==="use"&&l.valueCoding.code===r),d=s.part.some(l=>l.name==="language"&&l.valueCode===n);o&&d&&(a=s.part.find(l=>l.name==="value")?.valueString)}}),a}extractScg(e){let r;return e.parameter.forEach(n=>{n.name==="property"&&n.part.some(a=>a.name==="code"&&a.valueString==="normalForm")&&(r=n.part.find(a=>a.name==="valueString")?.valueString)}),r}extractFocusConcepts(e){let[r]=e.split(":").map(o=>o.trim()),n=/\d+\|.*?\|/g,a=r.match(n);return a?a.map(o=>{let d=this.transformSnomedConcept(o.trim());return d||{code:"",display:""}}).filter(o=>o.code!==""):[]}extractAttributePairs(e){let r=e.split(":").slice(1).join(":").trim(),n=/(\d+\|.*?\|)\s*=\s*(\d+\|.*?\|)/g,a,s=[];for(;(a=n.exec(r))!==null;){let o=this.transformSnomedConcept(a[1].trim()),d=this.transformSnomedConcept(a[2].trim());o&&d&&s.push({type:o,target:d})}return s}transformSnomedConcept(e){let r=/^(\d+)\|(.+?)\|$/,n=e.match(r);return n?{code:n[1],display:n[2]}:null}initialize(){return{term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"menu",score:0,round:0,rules:this.rules,difficultyLevel:"",startTimestamp:0,endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0,maxRoundTime:0,remainingTime:0}}startGame(e){this.clearRoundTimer(),this.rules=this.difficultyLevels.find(r=>r.name.toLowerCase()===e.toLowerCase())?.rules,this.game.next({term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"playing",score:0,round:0,rules:this.rules,difficultyLevel:e,startTimestamp:Date.now(),endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0,maxRoundTime:this.rules.maxRoundTime,remainingTime:this.rules.maxRoundTime}),this.newRound(!0)}initializeRound(e,r){let n=e.match(/\(([^)]+)\)$/),a=n?n[0]:"",s=a?e.lastIndexOf(a):e.length,o=e.split("").map((d,l)=>l>=s?d:/[a-zA-Z0-9á-úñ]/.test(d)?"_":d);this.game.next(Mt(Me({},this.game.value),{term:e,displayTerm:o,hitPoints:r?this.rules.maxHitPoints:this.game.value.hitPoints,hints:[],state:"playing",score:r?0:this.game.value.score,remainingTime:this.rules.maxRoundTime})),this.startRoundTimer();for(let d=0;d{dthis.goals[this.goals.length-1].score&&this.rules.endless===!1){r.state="won",r.endTimestamp=Date.now(),r.difficultyBonus=this.rules.difficultyBonus,r.livesBonus=r.hitPoints*10;let d=Math.round((r.endTimestamp-r.startTimestamp)/1e3);r.timeBonus=Math.max(0,180-d),r.score+=r.difficultyBonus+r.livesBonus+r.timeBonus}else r.hitPoints=r.hitPoints+this.rules.hitpointsAwardedForGuessingfullTerm,r.hitPoints>this.rules.maxHitPoints&&(r.hitPoints=this.rules.maxHitPoints),setTimeout(()=>{this.newRound()},1500);this.game.next(r)}revealHint(e){let r=Me({},this.game.value),n="";if(this.focusConcepts.length===0&&this.attributePairs.length===0){r.hints.push("No more hints available."),this.game.next(r);return}let a=this.focusConcepts.length>0,s=this.attributePairs.length>0;if(a&&s&&(a=Math.random()<.5),a){let o=Math.floor(Math.random()*this.focusConcepts.length);n=`One of the parents of this concept is: ${this.focusConcepts[o].display}`,this.focusConcepts.splice(o,1)}else if(s){let o=Math.floor(Math.random()*this.attributePairs.length),d=this.attributePairs[o];n=`This concept has a ${d.type.display} of ${d.target.display}`,this.attributePairs.splice(o,1)}this.usedHints.add(n),r.hints.push(n),e||(r.hitPoints-=1),r.hintsAvailable=this.focusConcepts.length>0||this.attributePairs.length>0,this.game.next(r),r.hitPoints<=0&&(r.hitPoints=0,r.state="gameOver",r.endTimestamp=Date.now(),this.clearRoundTimer(),this.game.next(r))}getGameState(){return this.game.asObservable()}startRoundTimer(){this.roundTimer=setInterval(()=>{let e=this.game.value,r=e.remainingTime-1,n=Mt(Me({},e),{remainingTime:r});r<=0?(n.remainingTime=0,n.state="gameOver",n.endTimestamp=Date.now(),this.clearRoundTimer(),this.game.next(n)):this.game.next(n)},1e3)}clearRoundTimer(){this.roundTimer&&(clearInterval(this.roundTimer),this.roundTimer=null)}static{this.\u0275fac=function(r){return new(r||t)(_t(Ri))}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var oH=(()=>{class t{constructor(){this.loadingProgress=new Ci(0)}preloadImages(e){let r=e.map((n,a)=>this.preloadImage(n,e.length,a));return Promise.all(r).then(()=>{this.loadingProgress.next(100)})}preloadImage(e,r,n){return new Promise((a,s)=>{let o=new Image;o.src=e,o.onload=()=>{let d=(n+1)/r*100;this.loadingProgress.next(d),a()},o.onerror=s})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var UC=(()=>{class t{constructor(){this.db=WG(),this.scoreLimit=20}addScore(e,r){return Ve(this,null,function*(){try{let n=yield sH(Mk(this.db,e),r)}catch(n){console.error("Error adding document: ",n)}})}getScores(e){return Ve(this,null,function*(){let r=Mk(this.db,e),n=eH(r,tH("score","desc"),iH(this.scoreLimit));return(yield rH(n)).docs.map(s=>Me({id:s.id},s.data()))})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function u_e(t,i){if(t&1){let e=Ce();B(0,"button",4),ce("click",function(){let n=ue(e).$implicit,a=ne(2);return he(a.guessLetter(n))}),Y(1),U()}if(t&2){let e=i.$implicit,r=ne(2);ut("guessed-correct",r.guessedLetters[e]==="correct")("guessed-wrong",r.guessedLetters[e]==="wrong"),ee("disabled",r.isLetterGuessed(e)),j(),Qe(" ",e," ")}}function h_e(t,i){if(t&1&&(B(0,"div",2),de(1,u_e,2,6,"button",3),U()),t&2){let e=i.$implicit;j(),ee("ngForOf",e)}}var cH=(()=>{class t{constructor(){this.keyboardLayout=[["1","2","3","4","5","6","7","8","9","0"],["Q","W","E","R","T","Y","U","I","O","P"],["A","S","D","F","G","H","J","K","L"],["Z","X","C","V","B","N","M"]],this.guessedLetters={},this.letterGuessed=new Le}addGuessedLetter(e,r){this.guessedLetters[e]=r?"correct":"wrong"}guessLetter(e){this.letterGuessed.emit(e)}isLetterGuessed(e){return e in this.guessedLetters}markLetterAsGuessed(e,r){this.guessedLetters[e]=r}reset(){this.guessedLetters={}}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=Te({type:t,selectors:[["app-keyboard"]],outputs:{letterGuessed:"letterGuessed"},standalone:!1,decls:2,vars:1,consts:[[1,"keyboard-container"],["class","keyboard-row",4,"ngFor","ngForOf"],[1,"keyboard-row"],["mat-button","",3,"guessed-correct","guessed-wrong","disabled","click",4,"ngFor","ngForOf"],["mat-button","",3,"click","disabled"]],template:function(r,n){r&1&&(B(0,"div",0),de(1,h_e,2,1,"div",1),U()),r&2&&(j(),ee("ngForOf",n.keyboardLayout))},dependencies:[ci,di],styles:[".keyboard-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.keyboard-row[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:5px;flex-wrap:wrap}button[_ngcontent-%COMP%]{margin:2px;padding:8px 6px;border-radius:8px;border:1px solid #000;transition:background-color .3s ease;min-width:40px;flex:1}button.guessed-correct[_ngcontent-%COMP%]{background-color:green;color:#fff}button.guessed-wrong[_ngcontent-%COMP%]{background-color:red;color:#fff}@media (max-width: 768px){.keyboard-row[_ngcontent-%COMP%]{margin:1px 0}.keyboard-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:1px;padding:8px;min-width:0;width:9%;flex:1 1 auto;font-size:14px}}"]})}}return t})();var dH=(()=>{class t{constructor(){this.tooltipDismissedKey="iosSafariTooltipDismissed"}isIosSafari(){return/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&/Safari/i.test(window.navigator.userAgent)&&!/CriOS/i.test(window.navigator.userAgent)&&!/FxiOS/i.test(window.navigator.userAgent)}tooltipDismissed(){return localStorage.getItem(this.tooltipDismissedKey)==="true"}dismissTooltip(){localStorage.setItem(this.tooltipDismissedKey,"true")}isRunningStandalone(){return"standalone"in window.navigator&&window.navigator.standalone}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function p_e(t,i){if(t&1){let e=Ce();B(0,"div",1)(1,"div",2),Y(2," Install this webapp on your iPhone: tap "),B(3,"mat-icon"),Y(4,"ios_share"),U(),Y(5," and then 'Add to Home Screen' "),U(),B(6,"button",3),ce("click",function(){ue(e);let n=ne();return he(n.dismiss())}),B(7,"mat-icon"),Y(8,"close"),U()()()}}var uH=(()=>{class t{constructor(e){this.platformDetectionService=e,this.isIosSafari=!1,this.tooltipDismissed=!1}ngOnInit(){this.isIosSafari=this.platformDetectionService.isIosSafari(),this.tooltipDismissed=this.platformDetectionService.tooltipDismissed()||this.platformDetectionService.isRunningStandalone()}dismiss(){this.tooltipDismissed=!0,this.platformDetectionService.dismissTooltip()}static{this.\u0275fac=function(r){return new(r||t)(be(dH))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-add-to-home"]],standalone:!1,decls:1,vars:1,consts:[["class","custom-tooltip",4,"ngIf"],[1,"custom-tooltip"],[1,"tooltip-text"],[1,"tooltip-dismiss-button",3,"click"]],template:function(r,n){r&1&&de(0,p_e,9,0,"div",0),r&2&&ee("ngIf",n.isIosSafari&&!n.tooltipDismissed)},dependencies:[oi,Pi],styles:['.custom-tooltip[_ngcontent-%COMP%]{position:fixed;bottom:20px;left:50%;transform:translate(-50%);background:#fff;border-radius:8px;padding:16px;box-shadow:0 4px 8px #0003;display:flex;flex-direction:row;align-items:center;max-width:320px;box-sizing:border-box;z-index:1000}.custom-tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:-20px;left:50%;transform:translate(-50%);width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:20px solid white}.tooltip-icon[_ngcontent-%COMP%]{background:#007bff;color:#fff;border-radius:50%;padding:10px;margin-right:16px}.tooltip-text[_ngcontent-%COMP%]{color:#333;font-size:16px}.tooltip-dismiss-button[_ngcontent-%COMP%]{margin-left:auto;background:transparent;border:none;cursor:pointer}.tooltip-dismiss-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#666;vertical-align:bottom}']})}}return t})();var zC=(()=>{class t{transform(e,...r){if(!e)return e;let n=Math.floor(e/1e3%60),a=Math.floor(e/(1e3*60)%60),s=Math.floor(e/(1e3*60*60)%24),o=s===0&&a<10?a.toString():a<10?"0"+a:a,d=s===0&&a===0&&n<10?n.toString():n<10?"0"+n:n,l=s<10?"0"+s:s,c="";return s>0&&(c+=`${l}h `),(a>0||s>0)&&(c+=`${o}m `),c+=`${d}s`,c}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275pipe=Do({name:"elapsedTime",type:t,pure:!0,standalone:!1})}}return t})();var v_e=["keyboard"],fH=()=>[],y_e=(t,i)=>[t,i],Rk=t=>[t],mH=t=>[t,"shadow-local"],x_e=t=>[t,"trophy-large","shadow-local"];function b_e(t,i){if(t&1&&(B(0,"div",8)(1,"div",9)(2,"div",10),Y(3," Loading... "),U(),we(4,"mat-progress-bar",11),U()()),t&2){let e=ne(2);j(4),ee("value",e.loadingAssetsProgress)}}function __e(t,i){t&1&&(B(0,"span")(1,"mat-icon"),Y(2,"favorite"),U()())}function w_e(t,i){t&1&&(B(0,"span")(1,"mat-icon"),Y(2,"favorite_border"),U()())}function C_e(t,i){if(t&1&&(B(0,"span"),Y(1),U()),t&2){let e=i.$implicit;j(),ze(e)}}function T_e(t,i){if(t&1&&(B(0,"span",33),de(1,C_e,2,1,"span",18),U()),t&2){let e=i.$implicit;j(),ee("ngForOf",e.split(""))}}function S_e(t,i){if(t&1&&(B(0,"div",31),de(1,T_e,2,1,"span",32),U()),t&2){let e=ne(2).ngIf;j(),ee("ngForOf",e.displayTerm.join("").split(" "))}}function E_e(t,i){t&1&&(B(0,"div",34)(1,"div",35),Y(2," Choosing a random SNOMED CT concept using the FHIR API "),U(),we(3,"mat-progress-bar",36),U())}function D_e(t,i){if(t&1){let e=Ce();B(0,"div",37),ce("click",function(){ue(e);let n=ne(3);return he(n.revealHint())}),Y(1," Reveal Hint "),U()}}function M_e(t,i){if(t&1){let e=Ce();B(0,"div",37),ce("click",function(){ue(e);let n=ne(3);return he(n.loadMenu())}),Y(1," Abandon game "),U()}}function A_e(t,i){if(t&1&&we(0,"li",41),t&2){let e=i.$implicit;ee("innerHTML",e,Bl)}}function I_e(t,i){if(t&1&&(B(0,"div",38)(1,"div",39)(2,"h2"),Y(3,"Hints:"),U(),B(4,"ul"),de(5,A_e,1,1,"li",40),U()()()),t&2){let e=ne(2).ngIf;j(5),ee("ngForOf",e.hints)}}function R_e(t,i){if(t&1&&(B(0,"mat-icon",47),Y(1,"grade"),U()),t&2){let e=ne().$implicit,r=ne(3);gn("left",r.calculateGoalPosition(e.score-5),"%"),ee("ngClass",qr(3,Rk,e.name.toLowerCase()))}}function P_e(t,i){if(t&1&&(B(0,"mat-icon",48),Y(1,"grade"),U()),t&2){let e=ne().$implicit,r=ne(3);gn("left",r.calculateGoalPosition(e.score-1),"%"),ee("ngClass",qr(3,Rk,e.name.toLowerCase()))}}function k_e(t,i){if(t&1&&(B(0,"div",49),Y(1),U()),t&2){let e=ne().$implicit,r=ne(3);gn("left",r.calculateGoalPosition(e.score),"%"),ee("ngClass",qr(4,Rk,e.name.toLowerCase())),j(),Qe("",e.name," trophy!")}}function F_e(t,i){if(t&1&&(Gt(0),we(1,"div",42),de(2,R_e,2,5,"mat-icon",43),B(3,"mat-icon",44),Y(4,"emoji_events"),U(),de(5,P_e,2,5,"mat-icon",45)(6,k_e,2,6,"div",46),Ht()),t&2){let e=i.$implicit,r=ne(2).ngIf,n=ne();j(),Tn(e.name.toLowerCase()),gn("left",n.calculateGoalPosition(e.score),"%"),j(),ee("ngIf",r.score>=e.score),j(),gn("left",n.calculateGoalPosition(e.score-3),"%"),ee("ngClass",pb(10,y_e,e.name.toLowerCase(),r.score>=e.score?"trophy-large":"")),j(2),ee("ngIf",r.score>=e.score),j(),ee("ngIf",r.score>=e.score)}}function O_e(t,i){if(t&1){let e=Ce();B(0,"div")(1,"div",12)(2,"div",13),we(3,"img",14),B(4,"div",15),Y(5),U()()(),B(6,"div",16)(7,"span",17),Y(8),U(),de(9,__e,3,0,"span",18)(10,w_e,3,0,"span",18),B(11,"span",17),Y(12),U()(),de(13,S_e,2,1,"div",19)(14,E_e,4,0,"div",20),B(15,"p",21),Y(16,"Click the keys to guess the letters of the term!"),U(),B(17,"div")(18,"app-keyboard",22,0),ce("letterGuessed",function(n){ue(e);let a=ne(2);return he(a.guessLetter(n))}),U()(),B(20,"div",23),de(21,D_e,2,0,"div",24)(22,M_e,2,0,"div",25),U(),de(23,I_e,6,1,"div",26),B(24,"div",27),Y(25," * Hints are generated from the definition of the SNOMED CT concept, retrieved from the FHIR API as an SCG grammar expression "),U(),B(26,"div",28)(27,"h3"),Y(28,"Score Progression"),U(),B(29,"div",29),we(30,"mat-progress-bar",30),de(31,F_e,7,13,"ng-container",18),U()()()}if(t&2){let e=ne().ngIf,r=ne();j(3),ee("@popIn",void 0),j(2),Gr(" ",e.difficultyLevel," - ",r.getLanguageName(r.selectedLanguage)," "),j(3),Gr(" Round: ",e.round," \xA0\xA0\xA0\xA0 Score: ",e.score," \xA0\xA0\xA0\xA0 Life: "),j(),ee("ngForOf",Yn(16,fH).constructor(e.hitPoints)),j(),ee("ngForOf",Yn(17,fH).constructor(e.rules.maxHitPoints-e.hitPoints)),j(2),Qe(" \xA0\xA0\xA0\xA0 Time to guess: ",e.remainingTime,""),j(),ee("ngIf",e.state=="playing"),j(),ee("ngIf",e.state==="choosingTerm"),j(3),ee("@shake",r.shakeState),j(4),ee("ngIf",e.state=="playing"&&e.hintsAvailable&&e.hitPoints>1),j(),ee("ngIf",e.state=="playing"),j(),ee("ngIf",e.hints.length>0&&e.state=="playing"),j(7),ee("value",r.calculateProgress(e.score)),j(),ee("ngForOf",r.goals)}}function L_e(t,i){if(t&1){let e=Ce();B(0,"div",50),we(1,"img",51)(2,"img",52),B(3,"p",53)(4,"b"),Y(5,"Welcome to SnoGuess!"),U()(),B(6,"p",53),Y(7," A fun way to learn about SNOMED CT concepts and their definitions. "),U(),B(8,"div",54),ce("click",function(){ue(e);let n=ne(2);return he(n.chooseDifficultyLevel())}),Y(9," New game "),U(),B(10,"div",54),ce("click",function(){ue(e);let n=ne(2);return he(n.showInstructionsPanel())}),Y(11," Instructions "),U(),B(12,"div",55),ce("click",function(){ue(e);let n=ne(2);return he(n.openScoreboard())}),Y(13," High Scores "),U(),B(14,"p",56),Y(15," Playing with terms in the IPS Reference Set in "),B(16,"b"),Y(17),U(),Y(18,", change language: "),U(),B(19,"div",57)(20,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("da"))}),Y(21,"DA"),U(),B(22,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("de"))}),Y(23,"DE"),U(),B(24,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("en"))}),Y(25,"EN"),U(),B(26,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("es"))}),Y(27,"ES"),U(),B(28,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("et"))}),Y(29,"ET"),U(),B(30,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("fi"))}),Y(31,"FI"),U(),B(32,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("fr"))}),Y(33,"FR"),U(),B(34,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("nl"))}),Y(35,"NL"),U(),B(36,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("no"))}),Y(37,"NO"),U(),B(38,"button",58),ce("click",function(){ue(e);let n=ne(2);return he(n.setLanguage("sv"))}),Y(39,"SV"),U()()()}if(t&2){let e=ne(2);j(2),ee("@popIn",void 0),j(6),ee("@scrollUp",void 0),j(2),ee("@scrollUp",void 0),j(2),ee("@scrollUp",void 0),j(5),ze(e.getLanguageName(e.selectedLanguage))}}function N_e(t,i){t&1&&(B(0,"span"),Y(1,", Endless"),U())}function B_e(t,i){if(t&1){let e=Ce();B(0,"div",62)(1,"div",63),ce("click",function(){let n=ue(e).$implicit,a=ne(3);return he(a.startGame(n.name))}),Y(2),U(),B(3,"p",64),Y(4),B(5,"mat-icon",65),Y(6,"favorite"),U(),Y(7),B(8,"mat-icon",66),Y(9,"contact_support"),U(),Y(10),B(11,"mat-icon",67),Y(12,"timer"),U(),de(13,N_e,2,0,"span",5),U()()}if(t&2){let e=i.$implicit;j(),ee("@scrollUp",void 0),j(),Qe(" ",e.name," "),j(),ee("@fadeInDelayed",void 0),j(),Qe(" Life: ",e.rules.maxHitPoints," "),j(3),Qe(", Free hints: ",e.rules.freeHints," "),j(3),Gr(", Points per letter: ",e.rules.pointsPerGuessedLetter,", Time to guess: ",e.rules.maxRoundTime," "),j(3),ee("ngIf",e.rules.endless)}}function V_e(t,i){if(t&1){let e=Ce();B(0,"div",50),we(1,"img",51)(2,"img",59),B(3,"p",53)(4,"b"),Y(5,"Choose the game difficulty"),U()(),de(6,B_e,14,8,"div",60),B(7,"div",61),ce("click",function(){ue(e);let n=ne(2);return he(n.backToMenu())}),Y(8," Back "),U()()}if(t&2){let e=ne(2);j(2),ee("@popIn",void 0),j(4),ee("ngForOf",e.difficultyLevels),j(),ee("@scrollUp",void 0)}}function U_e(t,i){if(t&1){let e=Ce();B(0,"div",50),we(1,"img",51)(2,"img",68),B(3,"ul",69)(4,"li",70)(5,"mat-icon"),Y(6,"check"),U(),Y(7,"Click the keys on the screen to guess the letters of the term "),B(8,"mat-icon",71),Y(9,"keyboard"),U()(),B(10,"li",70)(11,"mat-icon"),Y(12,"check"),U(),Y(13,"You have three to five lives, depending on your difficulty level "),B(14,"span",72)(15,"mat-icon"),Y(16,"favorite"),U(),B(17,"mat-icon"),Y(18,"favorite"),U(),B(19,"mat-icon"),Y(20,"favorite"),U()()(),B(21,"li",70)(22,"mat-icon"),Y(23,"check"),U(),Y(24,"There is also a maxmimum time to guess each term "),B(25,"mat-icon",73),Y(26,"timer"),U()(),B(27,"li",70)(28,"mat-icon"),Y(29,"check"),U(),Y(30,"You will loose one life with each wrong guess "),B(31,"mat-icon",72),Y(32,"favorite_border"),U()(),B(33,"li",70)(34,"mat-icon"),Y(35,"check"),U(),Y(36,"The game ends when you run out of lives or time"),B(37,"mat-icon",72),Y(38,"close"),U()(),B(39,"li",70)(40,"mat-icon"),Y(41,"check"),U(),Y(42,"You earn points for each correct guess "),B(43,"mat-icon",71),Y(44,"plus_one"),U()(),B(45,"li",70)(46,"mat-icon"),Y(47,"check"),U(),Y(48,"In Easy mode you get 2 hints for free, and in Medium mode you get one \u{1F4A1} "),U(),B(49,"li",70)(50,"mat-icon"),Y(51,"check"),U(),Y(52,"You can reveal more hints, but each hint it will cost one life "),B(53,"mat-icon",72),Y(54,"favorite_border"),U()(),B(55,"li",70)(56,"mat-icon"),Y(57,"check"),U(),Y(58,"If you guess the whole term you can recover one life"),B(59,"mat-icon",72),Y(60,"favorite"),U()(),B(61,"li",70)(62,"mat-icon"),Y(63,"check"),U(),Y(64,"Keep guessing terms to increase your score and earn trophies "),B(65,"mat-icon",74),Y(66,"emoji_events"),U()(),B(67,"li",70)(68,"mat-icon"),Y(69,"check"),U(),Y(70,"Endless mode will not finish when you reach the Diamond Trophy "),B(71,"mat-icon",75),Y(72,"emoji_events"),U()()(),B(73,"div",76),ce("click",function(){ue(e);let n=ne(2);return he(n.hideInstructionsPanel())}),Y(74," Back "),U()()}t&2&&(j(2),ee("@popIn",void 0),j(71),ee("@scrollUp",void 0))}function z_e(t,i){t&1&&(B(0,"div",77),we(1,"img",78),U()),t&2&&(j(),ee("@popIn",void 0))}function G_e(t,i){if(t&1&&(B(0,"div"),Y(1),U()),t&2){let e=ne(2).ngIf,r=ne();j(),Qe(" Trophy: ",r.getMaxTrophyObtained(e.score)," ")}}function H_e(t,i){if(t&1&&(B(0,"div")(1,"mat-icon",88),Y(2,"grade"),U(),Y(3," \xA0\xA0 "),B(4,"mat-icon",88),Y(5,"emoji_events"),U(),Y(6," \xA0 "),B(7,"mat-icon",88),Y(8,"grade"),U()()),t&2){let e=ne(2).ngIf,r=ne();j(),ee("ngClass",qr(3,mH,r.getMaxTrophyObtained(e.score).toLocaleLowerCase())),j(3),ee("ngClass",qr(5,x_e,r.getMaxTrophyObtained(e.score).toLocaleLowerCase())),j(3),ee("ngClass",qr(7,mH,r.getMaxTrophyObtained(e.score).toLocaleLowerCase()))}}function j_e(t,i){t&1&&(B(0,"p",89),Y(1,"Checking high scores..."),U())}function W_e(t,i){if(t&1){let e=Ce();B(0,"div",90)(1,"p",91),Y(2," This is a High Score! Save a message to the public leaderboard! "),U(),B(3,"input",92),On("ngModelChange",function(n){ue(e);let a=ne(3);return Xn(a.messageForLeaderboard,n)||(a.messageForLeaderboard=n),he(n)}),U(),B(4,"div",93),ce("click",function(){ue(e);let n=ne(2).ngIf,a=ne();return he(a.saveScore(n))}),Y(5," Save "),U(),B(6,"p",94),Y(7,"No personal information is recorded"),U()()}if(t&2){let e=ne(3);j(3),Fn("ngModel",e.messageForLeaderboard)}}function X_e(t,i){if(t&1){let e=Ce();B(0,"div",50),we(1,"img",51)(2,"img",79),B(3,"div",80)(4,"div"),Y(5," The term was: "),U(),B(6,"div",81),Y(7),U(),B(8,"div",82),Y(9),U(),B(10,"div",83),Y(11),qi(12,"elapsedTime"),U(),de(13,G_e,2,1,"div",5),U(),de(14,H_e,9,9,"div",5)(15,j_e,2,0,"p",84)(16,W_e,8,1,"div",85),B(17,"div",86),ce("click",function(){ue(e);let n=ne(2);return n.loadMenu(),he(n.chooseDifficultyLevel())}),Y(18," New game "),U(),B(19,"div",86),ce("click",function(){ue(e);let n=ne(2);return he(n.openScoreboard())}),Y(20," High Scores "),U(),B(21,"div",87),ce("click",function(){ue(e);let n=ne(2);return he(n.loadMenu())}),Y(22," Main menu "),U()()}if(t&2){let e=ne().ngIf,r=ne();j(2),ee("@popIn",void 0),j(5),Qe(" ",e.term,""),j(2),Gr("",e.round," ",e.round==1?"round":"rounds",""),j(2),ch(" Final Score: ",e.score," points - Difficulty: ",e.difficultyLevel," - Total time: ",es(12,14,e.endTimestamp-e.startTimestamp)," "),j(2),ee("ngIf",r.getMaxTrophyObtained(e.score)),j(),ee("ngIf",r.getMaxTrophyObtained(e.score)),j(),ee("ngIf",r.highScoresLoading),j(),ee("ngIf",r.highScore),j(),ee("@scrollUp",void 0),j(2),ee("@scrollUp",void 0),j(2),ee("@scrollUp",void 0)}}function Y_e(t,i){if(t&1&&(B(0,"span"),Y(1),U()),t&2){let e=ne(2).ngIf;j(),Qe("\u2192 Bonus: ",e.livesBonus,"")}}function $_e(t,i){if(t&1&&(B(0,"span"),Y(1),U()),t&2){let e=ne(2).ngIf;j(),Qe("\u2192 Bonus: ",e.difficultyBonus,"")}}function Q_e(t,i){if(t&1&&(B(0,"span"),Y(1),U()),t&2){let e=ne(2).ngIf;j(),Qe("\u2192 Bonus: ",e.timeBonus,"")}}function K_e(t,i){if(t&1){let e=Ce();B(0,"div",90)(1,"p",91),Y(2," This is a High Score! Save a message to the public leaderboard! "),U(),B(3,"input",100),On("ngModelChange",function(n){ue(e);let a=ne(3);return Xn(a.messageForLeaderboard,n)||(a.messageForLeaderboard=n),he(n)}),U(),B(4,"div",101),ce("click",function(){ue(e);let n=ne(2).ngIf,a=ne();return he(a.saveScore(n))}),Y(5," Save "),U(),B(6,"p",94),Y(7,"No personal information is recorded"),U()()}if(t&2){let e=ne(3);j(3),Fn("ngModel",e.messageForLeaderboard)}}function Z_e(t,i){if(t&1){let e=Ce();B(0,"div",50),we(1,"img",51)(2,"img",95),B(3,"div",96)(4,"mat-icon",97),Y(5,"grade"),U(),B(6,"mat-icon",97),Y(7,"emoji_events"),U(),B(8,"mat-icon",97),Y(9,"grade"),U()(),B(10,"div",98),Y(11),de(12,Y_e,2,1,"span",5),U(),B(13,"div",98),Y(14),de(15,$_e,2,1,"span",5),U(),B(16,"div",98),Y(17),qi(18,"elapsedTime"),de(19,Q_e,2,1,"span",5),U(),B(20,"div",99),Y(21),U(),de(22,K_e,8,1,"div",85),B(23,"div",86),ce("click",function(){ue(e);let n=ne(2);return n.loadMenu(),he(n.chooseDifficultyLevel())}),Y(24," New game "),U(),B(25,"div",86),ce("click",function(){ue(e);let n=ne(2);return he(n.openScoreboard())}),Y(26," High Scores "),U(),B(27,"div",87),ce("click",function(){ue(e);let n=ne(2);return he(n.loadMenu())}),Y(28," Main menu "),U()()}if(t&2){let e=ne().ngIf,r=ne();j(2),ee("@popIn",void 0),j(9),Qe("Lives left: ",e.hitPoints," "),j(),ee("ngIf",e.livesBonus>0),j(2),Qe("Difficulty: ",e.difficultyLevel," "),j(),ee("ngIf",e.difficultyBonus>0),j(2),Qe("Time: ",es(18,12,e.endTimestamp-e.startTimestamp)," "),j(2),ee("ngIf",e.timeBonus>0),j(2),Qe("Final score: ",e.score,""),j(),ee("ngIf",r.highScore),j(),ee("@scrollUp",void 0),j(2),ee("@scrollUp",void 0),j(2),ee("@scrollUp",void 0)}}function J_e(t,i){if(t&1&&(B(0,"div",3),de(1,b_e,5,1,"div",4)(2,O_e,32,18,"div",5)(3,L_e,40,5,"div",6)(4,V_e,9,3,"div",6)(5,U_e,75,2,"div",6)(6,z_e,2,1,"div",7)(7,X_e,23,16,"div",6)(8,Z_e,29,14,"div",6),U()),t&2){let e=i.ngIf,r=ne();j(),ee("ngIf",r.loadingAssets),j(),ee("ngIf",(e.state=="playing"||e.state=="choosingTerm")&&!r.loadingAssets),j(),ee("ngIf",e.state==="menu"&&!r.chooseDifficulty&&!r.showInstructions&&!r.loadingAssets),j(),ee("ngIf",e.state==="menu"&&r.chooseDifficulty&&!r.showInstructions&&!r.loadingAssets),j(),ee("ngIf",r.showInstructions),j(),ee("ngIf",r.termGuessed),j(),ee("ngIf",e.state==="gameOver"),j(),ee("ngIf",e.state=="won")}}var pH=(()=>{class t{constructor(e,r,n,a,s){this.snoguessMainService=e,this.preloadService=r,this.terminologyService=n,this.firebaseService=a,this.router=s,this.shakeState="normal",this.termGuessed="",this.goals=[],this.loadingAssetsProgress=0,this.loadingAssets=!0,this.highScoresLoading=!1,this.showInstructions=!1,this.chooseDifficulty=!1,this.currentYear=new Date,this.difficultyLevels=[],this.elapsedTime=0,this.gameInProgress=!1,this.messageForLeaderboard="",this.highScore=!1}ngOnInit(){this.game=this.snoguessMainService.getGameState(),this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.game.subscribe(r=>{r.state==="playing"&&(this.goals=r.rules.goals),(r.state==="gameOver"||r.state==="won")&&(this.stopTimer(),this.highScoresLoading=!0,this.firebaseService.getScores(r.difficultyLevel).then(n=>{this.highScoresLoading=!1,(!n||n.length<20||r.score>n[n.length-1].score)&&(this.highScore=!0)}))}),this.snoguessMainService.guessResult.subscribe(r=>{r.result===!1?(this.keyboard?.addGuessedLetter(r.letter,!1),this.shakeState="shake",setTimeout(()=>this.shakeState="normal",200)):this.keyboard?.addGuessedLetter(r.letter,!0)}),this.snoguessMainService.termResult.subscribe(r=>{r&&(this.keyboard?.reset(),this.termGuessed=r,setTimeout(()=>{this.termGuessed=""},2e3))});let e=["assets/img/SI_CT_w_tagline.png","assets/img/snoguess-logo.png","assets/img/congratulations.png","assets/img/correct.png","assets/img/game-over.png","assets/img/instructions.png","assets/img/difficulty.png","assets/img/scoreboard.png"];this.preloadService.preloadImages(e).then(()=>{setTimeout(()=>{this.loadingAssets=!1,this.loadMenu()},500)}),this.preloadService.loadingProgress.subscribe(r=>{this.loadingAssetsProgress=r}),this.terminologyService.fhirUrlParam$.subscribe(r=>{r&&this.terminologyService.getCodeSystem(r).subscribe(n=>{this.selectedEdition=n?.entry[0]?.resource?.title})}),this.terminologyService.lang$.subscribe(r=>{this.selectedLanguage=r})}loadMenu(){this.snoguessMainService.loadMenu()}backToMenu(){this.chooseDifficulty=!1}showInstructionsPanel(){this.showInstructions=!0}hideInstructionsPanel(){this.showInstructions=!1}chooseDifficultyLevel(){this.chooseDifficulty=!0}startGame(e){this.chooseDifficulty=!1,this.keyboard&&this.keyboard.reset(),this.stopTimer(),this.snoguessMainService.startGame(e),this.startTimer(),this.highScore=!1}guessLetter(e){return Ve(this,null,function*(){(yield xE(this.game))?.state==="playing"&&this.snoguessMainService.guessLetter(e)})}revealHint(){this.snoguessMainService.revealHint()}calculateProgress(e){let r=this.goals[this.goals.length-1].score,n=e/r*100;return Math.min(n,100)}calculateGoalPosition(e){let r=this.goals[this.goals.length-1].score;return e/r*100}findCurrentGoal(e){if(!e||e{e>=n.score&&(r=n.name)}),r}startTimer(){this.elapsedTime=0,this.gameInProgress=!0;let e=Ko(0,1e3).pipe(mt(r=>this.elapsedTime=r),Bf(()=>this.gameInProgress));this.gameTimerSubscription=e.subscribe()}stopTimer(){this.gameInProgress=!1,this.gameTimerSubscription&&this.gameTimerSubscription.unsubscribe()}openScoreboard(e){e||(e=this.difficultyLevels[0].name),this.router.navigate(["/snoguess/scoreboard"],{queryParams:{level:e}})}saveScore(e){let r={score:e.score,numberOfRounds:e.round,difficulty:e.difficultyLevel,elapsed:e.endTimestamp-e.startTimestamp,date:$r.now(),message:this.messageForLeaderboard};this.firebaseService.addScore(e.difficultyLevel,r).then(()=>{this.messageForLeaderboard="",this.openScoreboard(e.difficultyLevel)}).catch(n=>{this.messageForLeaderboard="",console.error("Error saving score: ",n),this.loadMenu()})}getLanguageName(e){return{en:"English",es:"Spanish",fr:"French",de:"German",da:"Danish",nl:"Dutch",et:"Estonian",fi:"Finnish",no:"Norwegian",sv:"Swedish"}[e]||e}setLanguage(e){let r={en:{lang:"en",fhirUrl:"http://snomed.info/sct/900000000000207008"},es:{lang:"es",fhirUrl:"http://snomed.info/sct/449081005"},fr:{lang:"fr",fhirUrl:"http://snomed.info/sct/11000241103"},de:{lang:"de",fhirUrl:"http://snomed.info/sct/11000274103"},da:{lang:"da",fhirUrl:"http://snomed.info/sct/554471000005108"},nl:{lang:"nl",fhirUrl:"http://snomed.info/sct/11000146104"},et:{lang:"et",fhirUrl:"http://snomed.info/sct/11000181102"},fi:{lang:"fi",fhirUrl:"http://snomed.info/sct/11000229106"},no:{lang:"no",fhirUrl:"http://snomed.info/sct/51000202101"},sv:{lang:"sv",fhirUrl:"http://snomed.info/sct/45991000052106"}};this.terminologyService.setLang(e),this.terminologyService.setFhirUrlParam(r[e].fhirUrl)}static{this.\u0275fac=function(r){return new(r||t)(be(VC),be(oH),be(Ri),be(UC),be(ys))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-snoguess-main"]],viewQuery:function(r,n){if(r&1&&vt(v_e,5),r&2){let a;je(a=We())&&(n.keyboard=a.first)}},standalone:!1,decls:6,vars:7,consts:[["keyboard",""],["class","snoguess-game",4,"ngIf"],[1,"text-center","mt-8","mb-4"],[1,"snoguess-game"],["class","assets-loading-container",4,"ngIf"],[4,"ngIf"],["class","flex flex-col items-center gap-4",4,"ngIf"],["class","overlay overlay-transparent",4,"ngIf"],[1,"assets-loading-container"],[1,"mt-48","mb-48"],[1,"progress-bar-message","text-center"],["mode","determinate",1,"game-progress-bar",3,"value"],[1,"flex","justify-center","mt-8","mb-8"],[1,"relative","w-1/4"],["src","assets/img/snoguess-logo.png","alt","Game Logo"],[1,"diff-label","absolute","-bottom-3","right-5","italic","text-gray-500"],[1,"hit-points"],[1,"score"],[4,"ngFor","ngForOf"],["class","term-display flex flex-row flex-wrap justify-center gap-8",4,"ngIf"],["class","loading-container",4,"ngIf"],[1,"guess-message"],[3,"letterGuessed"],[1,"game-buttons","mt-4"],["class",`bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black + rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white`,3,"click",4,"ngIf"],["class",`bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black + rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white`,3,"click",4,"ngIf"],["class","hints-container",4,"ngIf"],[1,"note"],[1,"score-progression-panel"],[1,"progress-bar-container"],["mode","determinate",3,"value"],[1,"term-display","flex","flex-row","flex-wrap","justify-center","gap-8"],["class","whitespace-nowrap",4,"ngFor","ngForOf"],[1,"whitespace-nowrap"],[1,"loading-container"],[1,"progress-bar-message"],["mode","indeterminate"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pt-1","pb-1","pl-6","pr-6","w-fit","text-center","cursor-pointer","font-bold","text-white",3,"click"],[1,"hints-container"],[1,"hints-callout","text-center"],["class","hint-item",3,"innerHTML",4,"ngFor","ngForOf"],[1,"hint-item",3,"innerHTML"],[1,"goal-indicator"],["class","star-icon left-star",3,"ngClass","left",4,"ngIf"],[1,"trophy-icon",3,"ngClass"],["class","star-icon right-star",3,"ngClass","left",4,"ngIf"],["class","goal-name",3,"left","ngClass",4,"ngIf"],[1,"star-icon","left-star",3,"ngClass"],[1,"star-icon","right-star",3,"ngClass"],[1,"goal-name",3,"ngClass"],[1,"flex","flex-col","items-center","gap-4"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/snoguess-logo.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,"text-center","font-light","text-lg"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","text-3xl",3,"click"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-12","text-3xl",3,"click"],[1,"text-center","font-light","italic","text-lg"],[1,"text-center","font-light","italic","text-sm"],["mat-button","",3,"click"],["src","assets/img/difficulty.png","alt","Game Logo",1,"w-1/4","mt-8"],["class","level-container w-full flex flex-col justify-center items-center",4,"ngFor","ngForOf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","mb-8","text-3xl",3,"click"],[1,"level-container","w-full","flex","flex-col","justify-center","items-center"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","text-3xl",3,"click"],[1,"level-details","text-center","mt-3","flex","flex-row","items-center"],[1,"text-red-500","text-sm"],[1,"text-yellow-500","text-sm"],[1,"text-green-500","text-sm"],["src","assets/img/instructions.png","alt","Game Logo",1,"w-1/4","mt-8","mb-12"],[1,"text-left","instructions-text"],[1,"flex","flex-row","items-center","gap-2"],[1,"text-blue-900"],[1,"text-red-500"],[1,"text-green-500"],[1,"text-yellow-500"],[1,"text-blue-500"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-3xl",3,"click"],[1,"overlay","overlay-transparent"],["src","assets/img/correct.png","alt","Correct",1,"w-1/5","mt-8"],["src","assets/img/game-over.png","alt","Game Logo",1,"w-1/4","mt-8"],[1,"text-xl","text-pretty","text-center"],[1,"font-bold"],[1,"mt-12"],[1,"mt-4"],["class","text-center italic text-gray-500",4,"ngIf"],["class","flex flex-col items-center gap-4 w-full",4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","text-2xl",3,"click"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],[3,"ngClass"],[1,"text-center","italic","text-gray-500"],[1,"flex","flex-col","items-center","gap-4","w-full"],[1,"font-bold","text-lg","md:text-xl","text-blue-900"],["type","text","placeholder","Type your message here",1,"w-full","md:w-1/2","text-base","md:text-2xl","text-center","bg-blue-50","border-solid","border-2",3,"ngModelChange","ngModel"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4","md:text-2xl",3,"click"],[1,"text-sm","text-gray-400"],["src","assets/img/congratulations.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,""],[1,"large-icon","diamond","shadow-local"],[1,"text-lg"],[1,"reveal","won"],["type","text","placeholder","Your message here",1,"w-full","md:w-1/2","text-base","md:text-lg",3,"ngModelChange","ngModel"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4",3,"click"]],template:function(r,n){r&1&&(de(0,J_e,9,8,"div",1),qi(1,"async"),B(2,"div",2),Y(3),qi(4,"date"),U(),we(5,"app-add-to-home")),r&2&&(ee("ngIf",es(1,2,n.game)),j(3),Qe(" Copyright \xA9 ",Hr(4,4,n.currentYear,"yyyy"),` SNOMED International +`))},dependencies:[Ea,ci,oi,di,Pi,np,hr,xn,wr,cH,uH,Pb,Fs,zC],styles:[".snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a;min-height:85vh!important}.term-display[_ngcontent-%COMP%]{font-size:24px;letter-spacing:4px;word-break:break-all;margin-bottom:20px;text-align:center;font-family:monospace}.term-display[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0}.hit-points[_ngcontent-%COMP%]{font-weight:700;color:#d9534f;text-align:center;margin-bottom:2rem}mat-form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}button[_ngcontent-%COMP%]{margin-right:8px}.guess-field[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1000}.overlay-dark[_ngcontent-%COMP%]{background-color:#00000080}.overlay-transparent[_ngcontent-%COMP%]{background-color:#0000}.message[_ngcontent-%COMP%]{font-size:4rem;text-align:center;margin-bottom:20px;font-weight:bolder}.reveal[_ngcontent-%COMP%]{font-size:2rem;text-align:center;margin-bottom:20px;font-weight:bolder}.won[_ngcontent-%COMP%]{color:#4caf50;text-shadow:black 2px 2px 2px}.lost[_ngcontent-%COMP%]{color:#f44336;text-shadow:rgb(0,0,0) 2px 2px 2px}.overlay[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1.5rem;padding:10px 20px}.loading-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center;margin-bottom:1rem}.progress-bar-message[_ngcontent-%COMP%]{color:#000;font-size:larger;margin-bottom:10px;font-style:italic;font-weight:lighter}.score[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700}.score-progression-panel[_ngcontent-%COMP%]{margin-top:2rem}.progress-bar-container[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:5rem;position:relative;background-color:#e0e0e0;border-radius:5px}.goal-indicator[_ngcontent-%COMP%]{position:absolute;bottom:0;width:2px;height:10px;background-color:#000}.goal-indicator.bronze[_ngcontent-%COMP%]{background-color:#cd7f32}.goal-indicator.silver[_ngcontent-%COMP%]{background-color:silver}.goal-indicator.gold[_ngcontent-%COMP%]{background-color:gold}.goal-indicator.platinum[_ngcontent-%COMP%]{background-color:#e5e4e2}.goal-indicator.diamond[_ngcontent-%COMP%]{background-color:#3b49c4}.trophy-icon[_ngcontent-%COMP%]{position:absolute;bottom:-35px;font-size:24px;width:24px;transition:transform .3s ease}.trophy-large[_ngcontent-%COMP%]{transform:scale(2.5) translate(-2px,3px)}.bronze[_ngcontent-%COMP%]{color:#cd7f32}.silver[_ngcontent-%COMP%]{color:silver}.gold[_ngcontent-%COMP%]{color:gold}.platinum[_ngcontent-%COMP%]{color:#e5e4e2}.diamond[_ngcontent-%COMP%]{color:#3b49c4}.shadow-local[_ngcontent-%COMP%]{text-shadow:black 2px 2px 2px}.star-icon[_ngcontent-%COMP%]{position:absolute;bottom:-40px;font-size:30px;width:30px;transition:transform .3s ease}.left-star[_ngcontent-%COMP%]{transform:translate(-50px)}.right-star[_ngcontent-%COMP%]{transform:translate(30px)}.goal-name[_ngcontent-%COMP%]{position:absolute;bottom:-75px;width:100px;margin-left:-50px;text-align:center;font-size:12px;font-weight:700;color:#000}.large-icon[_ngcontent-%COMP%]{font-size:5rem;width:5rem;height:5rem}.note[_ngcontent-%COMP%]{font-size:.8rem;font-weight:lighter;margin-top:1rem;text-align:center}.hints-container[_ngcontent-%COMP%]{margin-top:1rem}.hints-callout[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:.5rem}.hint-item[_ngcontent-%COMP%]{color:#555;font-size:1em;list-style-type:none;position:relative;padding:5px 0 5px 30px}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin:0}li[_ngcontent-%COMP%]{margin-bottom:10px;color:#666;font-size:1.2rem}.guess-message[_ngcontent-%COMP%]{text-align:center;margin-top:1rem;font-size:1.2rem}.assests-loading-container[_ngcontent-%COMP%]{text-align:center;font-size:20px;color:#fff}.game-progress-bar[_ngcontent-%COMP%]{border-radius:22px;overflow:hidden;background-color:#e0e0e0;box-shadow:0 4px 8px #0003}.game-progress-bar[_ngcontent-%COMP%] .mat-progress-bar-fill[_ngcontent-%COMP%]:after{background-color:#4caf50;border-radius:22px}.game-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.level-details[_ngcontent-%COMP%]{visibility:hidden}.level-container[_ngcontent-%COMP%]:hover .level-details[_ngcontent-%COMP%]{visibility:visible}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}"],data:{animation:[hn("shake",[Li("normal => shake",Ii(200,R_([Rt({transform:"translateX(0)"}),Rt({transform:"translateX(-10px)"}),Rt({transform:"translateX(10px)"}),Rt({transform:"translateX(0)"})])))]),hn("popIn",[Li(":enter",[Rt({transform:"scale(0.8)",opacity:0}),Ii("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",Rt({transform:"scale(1.3)",opacity:1})),Ii("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",Rt({transform:"scale(1)",opacity:1}))])]),hn("scrollUp",[Li(":enter",[Rt({transform:"translateY(100%)",opacity:0}),Ii("0.5s ease-out",Rt({transform:"translateY(0)",opacity:1}))])]),hn("fadeInDelayed",[Li(":enter",[Rt({opacity:0}),Ii("1s 0.5s ease-out",Rt({opacity:1}))])])]}})}}return t})();var gH=Ka(Qd());var q_e=()=>({});function ewe(t,i){if(t&1){let e=Ce();B(0,"li")(1,"a",11),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.findingWithExplicitContextSelected(n))}),Y(2),U()()}if(t&2){let e=i.$implicit;j(2),ze(e.display)}}function twe(t,i){t&1&&(B(0,"th",20),Y(1," Type "),U())}function iwe(t,i){if(t&1&&(B(0,"td",21),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.type.display," ")}}function nwe(t,i){t&1&&(B(0,"th",20),Y(1," Target "),U())}function rwe(t,i){if(t&1&&(B(0,"td",21),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.target.code," ")}}function swe(t,i){t&1&&(B(0,"th",20),Y(1," Target "),U())}function awe(t,i){if(t&1&&(B(0,"td",21),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.target.display," ")}}function owe(t,i){t&1&&we(0,"tr",22)}function lwe(t,i){t&1&&we(0,"tr",23)}function cwe(t,i){if(t&1&&(B(0,"div",4)(1,"h3"),Y(2),U(),B(3,"table",12),Gt(4,13),de(5,twe,2,0,"th",14)(6,iwe,2,1,"td",15),Ht(),Gt(7,16),de(8,nwe,2,0,"th",14)(9,rwe,2,1,"td",15),Ht(),Gt(10,17),de(11,swe,2,0,"th",14)(12,awe,2,1,"td",15),Ht(),de(13,owe,1,0,"tr",18)(14,lwe,1,0,"tr",19),U()()),t&2){let e=ne();j(2),Qe("Relevant attributes (",e.selectedSituation.display,")"),j(),ee("dataSource",e.dataSource),j(10),ee("matHeaderRowDef",e.displayedColumns),j(),ee("matRowDefColumns",e.displayedColumns)}}function dwe(t,i){if(t&1&&(B(0,"div",4)(1,"h3"),Y(2,"Resource Type"),U(),B(3,"a",24)(4,"span"),Y(5),U(),B(6,"mat-icon"),Y(7,"open_in_new"),U()()()),t&2){let e=ne();j(3),ee("href","https://hl7.org/fhir/R4/"+e.resourceType+".html",lh),j(2),Qe("FHIR R4 ",e.resourceType,"")}}function uwe(t,i){if(t&1){let e=Ce();B(0,"div",25)(1,"button",26),ce("click",function(){ue(e);let n=ne();return he(n.saveOutput(n.fhirRepresentationString))}),we(2,"mat-icon",27),U(),B(3,"button",28),ce("click",function(){ue(e);let n=ne();return he(n.copyOutputToClipboard(n.fhirRepresentationString))}),we(4,"mat-icon",29),U()()}}var vH=(()=>{class t{constructor(e,r){this.terminologyService=e,this.clipboard=r,this.fhirRepresentationString="{}",this.situationsBinding={title:"Finding with explicit context",type:"Autocomplete",ecl:"<< 413350009 |Finding with explicit context (situation)|",value:"",note:"Select a finding with explicit context"},this.SituationConstants={KnownPresent:{code:"410515003",display:"Known present",selfAndDescendants:[]},KnownAbsent:{code:"410516002",display:"Known absent",selfAndDescendants:[]},SubjectOfRecord:{code:"410604004",display:"Subject of record",selfAndDescendants:[]},PersonInTheFamily:{code:"303071001",display:"Person in the family",selfAndDescendants:[]},InThePast:{code:"410513005",display:"In the past",selfAndDescendants:[]},CurrentOrSpecifiedTime:{code:"410512000",display:"Current or specified time",selfAndDescendants:[]},KnownPossible:{code:"410590009",display:"Known possible",selfAndDescendants:[]}},this.examples=[{code:"160377001",display:"Family history of asthma"},{code:"12147341000119108",display:"History of burn"},{code:"428942009",display:"History of fall"},{code:"300890009",display:"Swelling absent"},{code:"162057007",display:"Nausea present"},{code:"401204006",display:"Suspected autism"}],this.displayedColumns=["type","targetCode","targetDisplay"],this.dataSource=[]}ngOnInit(){this.loadOrUpdateConstants()}loadOrUpdateConstants(){return Ve(this,null,function*(){let e=localStorage.getItem("SituationConstants");e?(this.SituationConstants=JSON.parse(e),console.log("Loaded constants from cache.")):(yield this.updateConstantDescendants(),localStorage.setItem("SituationConstants",JSON.stringify(this.SituationConstants)),console.log("Updated constants and cached them."))})}updateConstantDescendants(){return Ve(this,null,function*(){for(let e in this.SituationConstants)if(Object.prototype.hasOwnProperty.call(this.SituationConstants,e)){let r=this.SituationConstants[e],n=yield sn(this.terminologyService.expandValueSet("<< "+r.code,"",0,1e3));r.selfAndDescendants=n.expansion.contains.map(a=>a.code)}})}convertSituationToFhir(e){return Ve(this,null,function*(){this.selectedSituation=e,this.fhirRepresentation=null,this.fhirRepresentationString="Loading...",this.dataSource=[],this.resourceType=void 0;let r=yield sn(this.terminologyService.lookupConcept(e.code)),n=this.terminologyService.getNormalForm(r),a=this.terminologyService.parseNormmalForm(n),s,o,d,l;if(a.groups.forEach(c=>{let h=c.find(m=>m.type.code==="408732007");h&&(this.dataSource=[...this.dataSource,h],o=h.target);let u=c.find(m=>m.type.code==="408729009");u&&(this.dataSource=[...this.dataSource,u],s=u.target);let f=c.find(m=>m.type.code==="408731000");f&&(this.dataSource=[...this.dataSource,f],d=f.target);let p=c.find(m=>m.type.code==="246090004");p&&(this.dataSource=[...this.dataSource,p],l=p.target)}),l){let c=this.SituationConstants.KnownPresent.selfAndDescendants.includes(s?.code),h=this.SituationConstants.SubjectOfRecord.selfAndDescendants.includes(o?.code),u=this.SituationConstants.InThePast.selfAndDescendants.includes(d?.code),f=this.SituationConstants.KnownAbsent.selfAndDescendants.includes(s?.code),p=this.SituationConstants.KnownPossible.selfAndDescendants.includes(s?.code),m=this.SituationConstants.CurrentOrSpecifiedTime.selfAndDescendants.includes(d?.code),g=this.SituationConstants.PersonInTheFamily.selfAndDescendants.includes(o?.code);c&&h&&u?this.updateFhirRepresentation(this.createFhirCondition(l,"inactive")):c&&h&&m?this.updateFhirRepresentation(this.createFhirCondition(l,"active")):p&&h&&m?this.updateFhirRepresentation(this.createFhirCondition(l,"unconfirmed")):c&&g?this.updateFhirRepresentation(this.createFamilyMemberHistoryForFinding(l,o)):f&&h&&m?this.updateFhirRepresentation(this.createFhirObservationForAbsentFinding(l)):this.fhirRepresentationString="No FHIR representation for this situation"}else this.fhirRepresentationString="No FHIR representation for this situation"})}updateFhirRepresentation(e){this.fhirRepresentation=e,this.fhirRepresentationString=JSON.stringify(e,null,2)}findingWithExplicitContextSelected(e){e&&e.code&&this.convertSituationToFhir(e)}createFhirCondition(e,r){return this.resourceType="Condition",{resourceType:"Condition",subject:{reference:"Patient/1234"},clinicalStatus:{coding:[{system:"http://terminology.hl7.org/CodeSystem/condition-clinical",code:r}]},code:{coding:[{system:"http://snomed.info/sct",code:e.code,display:e.display}]}}}createFhirObservationForAbsentFinding(e){return this.resourceType="Observation",{resourceType:"Observation",subject:{reference:"Patient/1234"},status:"registered",code:{coding:[{system:"http://snomed.info/sct",code:e.code,display:e.display}]},valueCodeableConcept:{coding:[{system:"http://snomed.info/sct",code:"410516002",display:"Known absent"}]}}}createFamilyMemberHistoryForFinding(e,r){return this.resourceType="FamilyMemberHistory",{resourceType:"FamilyMemberHistory",status:"completed",patient:{reference:"Patient/1234"},relationship:{coding:[{system:"http://snomed.info/sct",code:r.code,display:r.display}]},condition:[{code:{coding:[{system:"http://snomed.info/sct",code:e.code,display:e.display}]}}]}}saveOutput(e){var r=new Blob([e],{type:"text/plain;charset=utf-8"});(0,gH.saveAs)(r,`${this.selectedSituation.display}-fhir.json`)}copyOutputToClipboard(e){this.clipboard.copy(e)}static{this.\u0275fac=function(r){return new(r||t)(be(Ri),be(Km))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-situation-map"]],standalone:!1,decls:17,vars:9,consts:[[1,"p-8"],[1,"flex","flex-wrap","gap-4"],[1,"w-1/3"],[1,"w-auto",3,"selectionChange","binding"],[1,"mt-8"],[4,"ngFor","ngForOf"],["class","mt-8",4,"ngIf"],[1,"flex-grow"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["href","javascript:void(0);",3,"click"],["mat-table","",3,"dataSource"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","targetCode"],["matColumnDef","targetDisplay"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["target","_blank",1,"flex","flex-row","items-center","gap-2",3,"href"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(r,n){r&1&&(B(0,"div",0)(1,"h2"),Y(2,"Consistent Context Representation for Situations with Explicit Context"),U(),B(3,"div",1)(4,"div",2)(5,"app-autocomplete-binding",3),ce("selectionChange",function(s){return n.findingWithExplicitContextSelected(s)}),U(),B(6,"h3",4),Y(7,"Examples"),U(),B(8,"ul"),de(9,ewe,3,1,"li",5),U(),de(10,cwe,15,4,"div",6)(11,dwe,8,2,"div",6),U(),B(12,"div",7)(13,"div",8),de(14,uwe,5,0,"div",9),B(15,"textarea",10),Y(16," "),U()()()()()),r&2&&(j(5),ee("binding",n.situationsBinding),j(4),ee("ngForOf",n.examples),j(),ee("ngIf",n.selectedSituation==null?null:n.selectedSituation.display),j(),ee("ngIf",n.resourceType),j(3),ee("ngIf",n.fhirRepresentationString.length>15),j(),ee("options",Yn(8,q_e))("lang","json")("innerHTML",n.fhirRepresentationString,Bl))},dependencies:[ci,oi,Zm,ln,Pi,Ra,ka,Na,Fa,Pa,Ba,Oa,La,Va,Ua,as,Oo],styles:[".output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem;min-height:45rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}"]})}}return t})();var yH=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=Te({type:t,selectors:[["app-context-main"]],standalone:!1,decls:1,vars:0,template:function(r,n){r&1&&we(0,"app-situation-map")},dependencies:[vH],encapsulation:2})}}return t})();var IH=Ka(AH());var RH=(()=>{class t{constructor(){this.filter=new IH.default}transform(e){return e&&this.filter.clean(e)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275pipe=Do({name:"safeText",type:t,pure:!0,standalone:!1})}}return t})();function vwe(t,i){if(t&1){let e=Ce();B(0,"a",13),ce("click",function(){ue(e);let n=ne().$implicit,a=ne();return he(a.setLevel(n.name))}),Y(1),U()}if(t&2){let e=ne().$implicit;j(),Qe(" ",e.name," ")}}function ywe(t,i){if(t&1&&(B(0,"span",14),Y(1),U()),t&2){let e=ne().$implicit;j(),ze(e.name)}}function xwe(t,i){if(t&1&&(B(0,"span"),de(1,vwe,2,1,"a",7)(2,ywe,2,1,"span",8),U()),t&2){let e=i.$implicit,r=ne();j(),ee("ngIf",r.selectedLevel!=e.name),j(),ee("ngIf",r.selectedLevel==e.name)}}function bwe(t,i){if(t&1){let e=Ce();B(0,"a",13),ce("click",function(){ue(e);let n=ne();return he(n.setLevel("scoreboard"))}),Y(1," Legacy "),U()}}function _we(t,i){t&1&&(B(0,"span",14),Y(1,"Legacy"),U())}function wwe(t,i){t&1&&we(0,"mat-spinner",15)}function Cwe(t,i){t&1&&(B(0,"th",28),Y(1," Position "),U())}function Twe(t,i){if(t&1&&(B(0,"td",29),Y(1),U()),t&2){let e=i.index;j(),Qe(" ",e+1," ")}}function Swe(t,i){t&1&&(B(0,"th",28),Y(1," Message "),U())}function Ewe(t,i){if(t&1&&(B(0,"span"),Y(1),qi(2,"safeText"),U()),t&2){let e=ne().$implicit;j(),ze(es(2,1,e.message))}}function Dwe(t,i){t&1&&(B(0,"span",31)(1,"i"),Y(2,"No information available (qualifier value)"),U()())}function Mwe(t,i){if(t&1&&(B(0,"td",29),de(1,Ewe,3,3,"span",11)(2,Dwe,3,0,"span",30),U()),t&2){let e=i.$implicit;j(),ee("ngIf",e.message),j(),ee("ngIf",!e.message)}}function Awe(t,i){t&1&&(B(0,"th",28),Y(1," Score "),U())}function Iwe(t,i){if(t&1&&(B(0,"td",29),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.score," ")}}function Rwe(t,i){t&1&&(B(0,"th",28),Y(1," Rounds "),U())}function Pwe(t,i){if(t&1&&(B(0,"td",29),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.numberOfRounds," ")}}function kwe(t,i){t&1&&(B(0,"th",28),Y(1," Difficulty "),U())}function Fwe(t,i){if(t&1&&(B(0,"td",29),Y(1),U()),t&2){let e=i.$implicit;j(),Qe(" ",e.difficulty," ")}}function Owe(t,i){t&1&&(B(0,"th",28),Y(1," Time Played "),U())}function Lwe(t,i){if(t&1&&(B(0,"td",29),Y(1),qi(2,"elapsedTime"),U()),t&2){let e=i.$implicit;j(),Qe(" ",es(2,1,e.elapsed)," ")}}function Nwe(t,i){t&1&&(B(0,"th",28),Y(1," Date "),U())}function Bwe(t,i){if(t&1&&(B(0,"td",29),Y(1),qi(2,"date"),U()),t&2){let e=i.$implicit;j(),Qe(" ",Hr(2,1,e.date,"short")," ")}}function Vwe(t,i){t&1&&we(0,"tr",32)}function Uwe(t,i){t&1&&we(0,"tr",33)}function zwe(t,i){if(t&1&&(B(0,"div")(1,"table",16),Gt(2,17),de(3,Cwe,2,0,"th",18)(4,Twe,2,1,"td",19),Ht(),Gt(5,20),de(6,Swe,2,0,"th",18)(7,Mwe,3,2,"td",19),Ht(),Gt(8,21),de(9,Awe,2,0,"th",18)(10,Iwe,2,1,"td",19),Ht(),Gt(11,22),de(12,Rwe,2,0,"th",18)(13,Pwe,2,1,"td",19),Ht(),Gt(14,23),de(15,kwe,2,0,"th",18)(16,Fwe,2,1,"td",19),Ht(),Gt(17,24),de(18,Owe,2,0,"th",18)(19,Lwe,3,3,"td",19),Ht(),Gt(20,25),de(21,Nwe,2,0,"th",18)(22,Bwe,3,4,"td",19),Ht(),de(23,Vwe,1,0,"tr",26)(24,Uwe,1,0,"tr",27),U()()),t&2){let e=ne();j(),ee("dataSource",e.dataSource),j(22),ee("matHeaderRowDef",e.displayedColumns),j(),ee("matRowDefColumns",e.displayedColumns)}}var PH=(()=>{class t{constructor(e,r,n,a){this.firebaseService=e,this.router=r,this.snoguessMainService=n,this.route=a,this.displayedColumns=["position","message","difficulty","score","numberOfRounds","secondsPlayed","date"],this.dataSource=[],this.loadingScores=!1,this.difficultyLevels=[],this.selectedLevel=""}ngOnInit(){this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.route.queryParams.subscribe(e=>{let r=e.level;r&&this.difficultyLevels.some(a=>a.name===r)?this.selectedLevel=r:this.selectedLevel=this.difficultyLevels[0].name,this.loadScores(this.selectedLevel),e.refresh&&this.startAutoRefresh()})}ngOnDestroy(){this.stopAutoRefresh()}startAutoRefresh(){this.stopAutoRefresh(),this.intervalId=setInterval(()=>{this.loadScores(this.selectedLevel)},6e4)}stopAutoRefresh(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}setLevel(e){this.selectedLevel=e,this.loadScores(e)}loadScores(e){this.loadingScores=!0,this.firebaseService.getScores(e).then(r=>{this.dataSource=r.map(n=>Mt(Me({},n),{date:n.date?n.date.toDate():new Date})),this.loadingScores=!1})}backToGame(){this.router.navigate(["/snoguess"])}static{this.\u0275fac=function(r){return new(r||t)(be(UC),be(ys),be(VC),be(jr))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-scoreboard"]],standalone:!1,decls:19,vars:8,consts:[[1,"flex","flex-col","items-center","gap-4","pt-6","snoguess-game"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/scoreboard.png","alt","High Scores",1,"w-1/4","mt-8"],[1,"mb-2","flex","flex-row","items-center","gap-1"],[1,"diamond"],[1,"mb-3","flex","flex-row","items-center","gap-3"],[4,"ngFor","ngForOf"],["href","javascript:void(0)","class","text-blue-500 underline",3,"click",4,"ngIf"],["class","selected-level",4,"ngIf"],[1,"flex","flex-row","items-center","gap-3"],["diameter","50",4,"ngIf"],[4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],["href","javascript:void(0)",1,"text-blue-500","underline",3,"click"],[1,"selected-level"],["diameter","50"],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","position"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","message"],["matColumnDef","score"],["matColumnDef","numberOfRounds"],["matColumnDef","difficulty"],["matColumnDef","secondsPlayed"],["matColumnDef","date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","text-gray-400",4,"ngIf"],[1,"text-gray-400"],["mat-header-row",""],["mat-row",""]],template:function(r,n){r&1&&(B(0,"div",0),we(1,"img",1)(2,"img",2),B(3,"div",3)(4,"span"),Y(5,"Messages posted by players!\xA0"),U(),B(6,"mat-icon",4),Y(7,"emoji_events"),U()(),B(8,"div",5),de(9,xwe,3,2,"span",6)(10,bwe,2,0,"a",7)(11,_we,2,0,"span",8),U(),B(12,"div",9)(13,"h3"),Y(14),U()(),de(15,wwe,1,0,"mat-spinner",10)(16,zwe,25,3,"div",11),B(17,"div",12),ce("click",function(){return n.backToGame()}),Y(18," Back to game "),U()()),r&2&&(j(2),ee("@popIn",void 0),j(7),ee("ngForOf",n.difficultyLevels),j(),ee("ngIf",n.selectedLevel!="scoreboard"),j(),ee("ngIf",n.selectedLevel=="scoreboard"),j(3),Qe("Top 20 ",n.selectedLevel," level scores"),j(),ee("ngIf",n.loadingScores),j(),ee("ngIf",!n.loadingScores),j(),ee("@scrollUp",void 0))},dependencies:[ci,oi,Pi,Ls,Ra,ka,Na,Fa,Pa,Ba,Oa,La,Va,Ua,Fs,zC,RH],styles:[".diamond[_ngcontent-%COMP%]{color:#3b49c4}.snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}.selected-level[_ngcontent-%COMP%]{font-weight:700}"],data:{animation:[hn("shake",[Li("normal => shake",Ii(200,R_([Rt({transform:"translateX(0)"}),Rt({transform:"translateX(-10px)"}),Rt({transform:"translateX(10px)"}),Rt({transform:"translateX(0)"})])))]),hn("popIn",[Li(":enter",[Rt({transform:"scale(0.8)",opacity:0}),Ii("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",Rt({transform:"scale(1.3)",opacity:1})),Ii("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",Rt({transform:"scale(1)",opacity:1}))])]),hn("scrollUp",[Li(":enter",[Rt({transform:"translateY(100%)",opacity:0}),Ii("0.5s ease-out",Rt({transform:"translateY(0)",opacity:1}))])]),hn("fadeInDelayed",[Li(":enter",[Rt({opacity:0}),Ii("1s 0.5s ease-out",Rt({opacity:1}))])])]}})}}return t})();var $Q=Ka(RY());function ly(t){return t+.5|0}var uu=(t,i,e)=>Math.max(Math.min(t,e),i);function ay(t){return uu(ly(t*2.55),0,255)}function hu(t){return uu(ly(t*255),0,255)}function td(t){return uu(ly(t/2.55)/100,0,1)}function PY(t){return uu(ly(t*100),0,100)}var Uo={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},nF=[..."0123456789ABCDEF"],hAe=t=>nF[t&15],fAe=t=>nF[(t&240)>>4]+nF[t&15],eT=t=>(t&240)>>4===(t&15),mAe=t=>eT(t.r)&&eT(t.g)&&eT(t.b)&&eT(t.a);function pAe(t){var i=t.length,e;return t[0]==="#"&&(i===4||i===5?e={r:255&Uo[t[1]]*17,g:255&Uo[t[2]]*17,b:255&Uo[t[3]]*17,a:i===5?Uo[t[4]]*17:255}:(i===7||i===9)&&(e={r:Uo[t[1]]<<4|Uo[t[2]],g:Uo[t[3]]<<4|Uo[t[4]],b:Uo[t[5]]<<4|Uo[t[6]],a:i===9?Uo[t[7]]<<4|Uo[t[8]]:255})),e}var gAe=(t,i)=>t<255?i(t):"";function vAe(t){var i=mAe(t)?hAe:fAe;return t?"#"+i(t.r)+i(t.g)+i(t.b)+gAe(t.a,i):void 0}var yAe=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function LY(t,i,e){let r=i*Math.min(e,1-e),n=(a,s=(a+t/30)%12)=>e-r*Math.max(Math.min(s-3,9-s,1),-1);return[n(0),n(8),n(4)]}function xAe(t,i,e){let r=(n,a=(n+t/60)%6)=>e-e*i*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function bAe(t,i,e){let r=LY(t,1,.5),n;for(i+e>1&&(n=1/(i+e),i*=n,e*=n),n=0;n<3;n++)r[n]*=1-i-e,r[n]+=i;return r}function _Ae(t,i,e,r,n){return t===n?(i-e)/r+(i.5?c/(2-a-s):c/(a+s),d=_Ae(e,r,n,c,a),d=d*60+.5),[d|0,l||0,o]}function sF(t,i,e,r){return(Array.isArray(i)?t(i[0],i[1],i[2]):t(i,e,r)).map(hu)}function aF(t,i,e){return sF(LY,t,i,e)}function wAe(t,i,e){return sF(bAe,t,i,e)}function CAe(t,i,e){return sF(xAe,t,i,e)}function NY(t){return(t%360+360)%360}function TAe(t){let i=yAe.exec(t),e=255,r;if(!i)return;i[5]!==r&&(e=i[6]?ay(+i[5]):hu(+i[5]));let n=NY(+i[2]),a=+i[3]/100,s=+i[4]/100;return i[1]==="hwb"?r=wAe(n,a,s):i[1]==="hsv"?r=CAe(n,a,s):r=aF(n,a,s),{r:r[0],g:r[1],b:r[2],a:e}}function SAe(t,i){var e=rF(t);e[0]=NY(e[0]+i),e=aF(e),t.r=e[0],t.g=e[1],t.b=e[2]}function EAe(t){if(!t)return;let i=rF(t),e=i[0],r=PY(i[1]),n=PY(i[2]);return t.a<255?`hsla(${e}, ${r}%, ${n}%, ${td(t.a)})`:`hsl(${e}, ${r}%, ${n}%)`}var kY={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},FY={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function DAe(){let t={},i=Object.keys(FY),e=Object.keys(kY),r,n,a,s,o;for(r=0;r>16&255,a>>8&255,a&255]}return t}var tT;function MAe(t){tT||(tT=DAe(),tT.transparent=[0,0,0,0]);let i=tT[t.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:i.length===4?i[3]:255}}var AAe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function IAe(t){let i=AAe.exec(t),e=255,r,n,a;if(i){if(i[7]!==r){let s=+i[7];e=i[8]?ay(s):uu(s*255,0,255)}return r=+i[1],n=+i[3],a=+i[5],r=255&(i[2]?ay(r):uu(r,0,255)),n=255&(i[4]?ay(n):uu(n,0,255)),a=255&(i[6]?ay(a):uu(a,0,255)),{r,g:n,b:a,a:e}}}function RAe(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${td(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}var iF=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Np=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function PAe(t,i,e){let r=Np(td(t.r)),n=Np(td(t.g)),a=Np(td(t.b));return{r:hu(iF(r+e*(Np(td(i.r))-r))),g:hu(iF(n+e*(Np(td(i.g))-n))),b:hu(iF(a+e*(Np(td(i.b))-a))),a:t.a+e*(i.a-t.a)}}function iT(t,i,e){if(t){let r=rF(t);r[i]=Math.max(0,Math.min(r[i]+r[i]*e,i===0?360:1)),r=aF(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function BY(t,i){return t&&Object.assign(i||{},t)}function OY(t){var i={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(i={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(i.a=hu(t[3]))):(i=BY(t,{r:0,g:0,b:0,a:1}),i.a=hu(i.a)),i}function kAe(t){return t.charAt(0)==="r"?IAe(t):TAe(t)}var oy=class t{constructor(i){if(i instanceof t)return i;let e=typeof i,r;e==="object"?r=OY(i):e==="string"&&(r=pAe(i)||MAe(i)||kAe(i)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var i=BY(this._rgb);return i&&(i.a=td(i.a)),i}set rgb(i){this._rgb=OY(i)}rgbString(){return this._valid?RAe(this._rgb):void 0}hexString(){return this._valid?vAe(this._rgb):void 0}hslString(){return this._valid?EAe(this._rgb):void 0}mix(i,e){if(i){let r=this.rgb,n=i.rgb,a,s=e===a?.5:e,o=2*s-1,d=r.a-n.a,l=((o*d===-1?o:(o+d)/(1+o*d))+1)/2;a=1-l,r.r=255&l*r.r+a*n.r+.5,r.g=255&l*r.g+a*n.g+.5,r.b=255&l*r.b+a*n.b+.5,r.a=s*r.a+(1-s)*n.a,this.rgb=r}return this}interpolate(i,e){return i&&(this._rgb=PAe(this._rgb,i._rgb,e)),this}clone(){return new t(this.rgb)}alpha(i){return this._rgb.a=hu(i),this}clearer(i){let e=this._rgb;return e.a*=1-i,this}greyscale(){let i=this._rgb,e=ly(i.r*.3+i.g*.59+i.b*.11);return i.r=i.g=i.b=e,this}opaquer(i){let e=this._rgb;return e.a*=1+i,this}negate(){let i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return iT(this._rgb,2,i),this}darken(i){return iT(this._rgb,2,-i),this}saturate(i){return iT(this._rgb,1,i),this}desaturate(i){return iT(this._rgb,1,-i),this}rotate(i){return SAe(this._rgb,i),this}};function rc(){}var QY=(()=>{let t=0;return()=>t++})();function Gi(t){return t==null}function zn(t){if(Array.isArray&&Array.isArray(t))return!0;let i=Object.prototype.toString.call(t);return i.slice(0,7)==="[object"&&i.slice(-6)==="Array]"}function ki(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function sr(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function ja(t,i){return sr(t)?t:i}function mi(t,i){return typeof t>"u"?i:t}var KY=(t,i)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/i,dF=(t,i)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*i:+t;function Mn(t,i,e){if(t&&typeof t.call=="function")return t.apply(e,i)}function cn(t,i,e,r){let n,a,s;if(zn(t))if(a=t.length,r)for(n=a-1;n>=0;n--)i.call(e,t[n],n);else for(n=0;nt,x:t=>t.x,y:t=>t.y};function LAe(t){let i=t.split("."),e=[],r="";for(let n of i)r+=n,r.endsWith("\\")?r=r.slice(0,-1)+".":(e.push(r),r="");return e}function NAe(t){let i=LAe(t);return e=>{for(let r of i){if(r==="")break;e=e&&e[r]}return e}}function rd(t,i){return(VY[i]||(VY[i]=NAe(i)))(t)}function dT(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Gp=t=>typeof t<"u",id=t=>typeof t=="function",uF=(t,i)=>{if(t.size!==i.size)return!1;for(let e of t)if(!i.has(e))return!1;return!0};function JY(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}var Gn=Math.PI,Hn=2*Gn,BAe=Hn+Gn,oT=Number.POSITIVE_INFINITY,VAe=Gn/180,pr=Gn/2,jh=Gn/4,UY=Gn*2/3,nd=Math.log10,vl=Math.sign;function Hp(t,i,e){return Math.abs(t-i)n-a).pop(),i}function Yh(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e$(t,i){let e=Math.round(t);return e-i<=t&&e+i>=t}function fF(t,i,e){let r,n,a;for(r=0,n=t.length;rd&&l=Math.min(i,e)-r&&t<=Math.max(i,e)+r}function hT(t,i,e){e=e||(s=>t[s]1;)a=n+r>>1,e(a)?n=a:r=a;return{lo:n,hi:r}}var ic=(t,i,e,r)=>hT(t,e,r?n=>{let a=t[n][i];return at[n][i]hT(t,e,r=>t[r][i]>=e);function n$(t,i,e){let r=0,n=t.length;for(;rr&&t[n-1]>e;)n--;return r>0||n{let r="_onData"+dT(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...a){let s=n.apply(this,a);return t._chartjs.listeners.forEach(o=>{typeof o[r]=="function"&&o[r](...a)}),s}})})}function gF(t,i){let e=t._chartjs;if(!e)return;let r=e.listeners,n=r.indexOf(i);n!==-1&&r.splice(n,1),!(r.length>0)&&(r$.forEach(a=>{delete t[a]}),delete t._chartjs)}function vF(t){let i=new Set(t);return i.size===t.length?t:Array.from(i)}var yF=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function xF(t,i){let e=[],r=!1;return function(...n){e=n,r||(r=!0,yF.call(window,()=>{r=!1,t.apply(i,e)}))}}function a$(t,i){let e;return function(...r){return i?(clearTimeout(e),e=setTimeout(t,i,r)):t.apply(this,r),i}}var fT=t=>t==="start"?"left":t==="end"?"right":"center",_s=(t,i,e)=>t==="start"?i:t==="end"?e:(i+e)/2,o$=(t,i,e,r)=>t===(r?"left":"right")?e:t==="center"?(i+e)/2:i;function bF(t,i,e){let r=i.length,n=0,a=r;if(t._sorted){let{iScale:s,_parsed:o}=t,d=s.axis,{min:l,max:c,minDefined:h,maxDefined:u}=s.getUserBounds();h&&(n=Qr(Math.min(ic(o,d,l).lo,e?r:ic(i,d,s.getPixelForValue(l)).lo),0,r-1)),u?a=Qr(Math.max(ic(o,s.axis,c,!0).hi+1,e?0:ic(i,d,s.getPixelForValue(c),!0).hi+1),n,r)-n:a=r-n}return{start:n,count:a}}function _F(t){let{xScale:i,yScale:e,_scaleRanges:r}=t,n={xmin:i.min,xmax:i.max,ymin:e.min,ymax:e.max};if(!r)return t._scaleRanges=n,!0;let a=r.xmin!==i.min||r.xmax!==i.max||r.ymin!==e.min||r.ymax!==e.max;return Object.assign(r,n),a}var nT=t=>t===0||t===1,zY=(t,i,e)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-i)*Hn/e)),GY=(t,i,e)=>Math.pow(2,-10*t)*Math.sin((t-i)*Hn/e)+1,Bp={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*pr)+1,easeOutSine:t=>Math.sin(t*pr),easeInOutSine:t=>-.5*(Math.cos(Gn*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>nT(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>nT(t)?t:zY(t,.075,.3),easeOutElastic:t=>nT(t)?t:GY(t,.075,.3),easeInOutElastic(t){return nT(t)?t:t<.5?.5*zY(t*2,.1125,.45):.5+.5*GY(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let i=1.70158;return(t/=.5)<1?.5*(t*t*(((i*=1.525)+1)*t-i)):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:t=>1-Bp.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Bp.easeInBounce(t*2)*.5:Bp.easeOutBounce(t*2-1)*.5+.5};function wF(t){if(t&&typeof t=="object"){let i=t.toString();return i==="[object CanvasPattern]"||i==="[object CanvasGradient]"}return!1}function CF(t){return wF(t)?t:new oy(t)}function oF(t){return wF(t)?t:new oy(t).saturate(.5).darken(.1).hexString()}var zAe=["x","y","borderWidth","radius","tension"],GAe=["color","borderColor","backgroundColor"];function HAe(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>i!=="onProgress"&&i!=="onComplete"&&i!=="fn"}),t.set("animations",{colors:{type:"color",properties:GAe},numbers:{type:"number",properties:zAe}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>i|0}}}})}function jAe(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var HY=new Map;function WAe(t,i){i=i||{};let e=t+JSON.stringify(i),r=HY.get(e);return r||(r=new Intl.NumberFormat(t,i),HY.set(e,r)),r}function Wp(t,i,e){return WAe(i,e).format(t)}var l$={values(t){return zn(t)?t:""+t},numeric(t,i,e){if(t===0)return"0";let r=this.chart.options.locale,n,a=t;if(e.length>1){let l=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(l<1e-4||l>1e15)&&(n="scientific"),a=XAe(t,e)}let s=nd(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),d={notation:n,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(d,this.options.ticks.format),Wp(t,r,d)},logarithmic(t,i,e){if(t===0)return"0";let r=e[i].significand||t/Math.pow(10,Math.floor(nd(t)));return[1,2,3,5,10,15].includes(r)||i>.8*e.length?l$.numeric.call(this,t,i,e):""}};function XAe(t,i){let e=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(e)>=1&&t!==Math.floor(t)&&(e=t-Math.floor(t)),e}var hy={formatters:l$};function YAe(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,e)=>e.lineWidth,tickColor:(i,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:hy.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"&&i!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"})}var mu=Object.create(null),mT=Object.create(null);function cy(t,i){if(!i)return t;let e=i.split(".");for(let r=0,n=e.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,n)=>oF(n.backgroundColor),this.hoverBorderColor=(r,n)=>oF(n.borderColor),this.hoverColor=(r,n)=>oF(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(e)}set(i,e){return lF(this,i,e)}get(i){return cy(this,i)}describe(i,e){return lF(mT,i,e)}override(i,e){return lF(mu,i,e)}route(i,e,r,n){let a=cy(this,i),s=cy(this,r),o="_"+e;Object.defineProperties(a,{[o]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){let d=this[o],l=s[n];return ki(d)?Object.assign({},l,d):mi(d,l)},set(d){this[o]=d}}})}apply(i){i.forEach(e=>e(this))}},Qn=new cF({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[HAe,jAe,YAe]);function $Ae(t){return!t||Gi(t.size)||Gi(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function dy(t,i,e,r,n){let a=i[n];return a||(a=i[n]=t.measureText(n).width,e.push(n)),a>r&&(r=a),r}function c$(t,i,e,r){r=r||{};let n=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==i&&(n=r.data={},a=r.garbageCollect=[],r.font=i),t.save(),t.font=i;let s=0,o=e.length,d,l,c,h,u;for(d=0;de.length){for(d=0;d0&&t.stroke()}}function nc(t,i,e){return e=e||.5,!i||t&&t.x>i.left-e&&t.xi.top-e&&t.y0&&a.strokeColor!=="",d,l;for(t.save(),t.font=n.string,QAe(t,a),d=0;d+t||0;function gT(t,i){let e={},r=ki(i),n=r?Object.keys(i):i,a=ki(t)?r?s=>mi(t[s],t[i[s]]):s=>t[s]:()=>t;for(let s of n)e[s]=tIe(a(s));return e}function EF(t){return gT(t,{top:"y",right:"x",bottom:"y",left:"x"})}function vu(t){return gT(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ws(t){let i=EF(t);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Rr(t,i){t=t||{},i=i||Qn.font;let e=mi(t.size,i.size);typeof e=="string"&&(e=parseInt(e,10));let r=mi(t.style,i.style);r&&!(""+r).match(qAe)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);let n={family:mi(t.family,i.family),lineHeight:eIe(mi(t.lineHeight,i.lineHeight),e),size:e,style:r,weight:mi(t.weight,i.weight),string:""};return n.string=$Ae(n),n}function Yp(t,i,e,r){let n=!0,a,s,o;for(a=0,s=t.length;ae&&o===0?0:o+d;return{min:s(r,-Math.abs(a)),max:s(n,a)}}function sd(t,i){return Object.assign(Object.create(t),i)}function vT(t,i=[""],e,r,n=()=>t[0]){let a=e||t;typeof r>"u"&&(r=p$("_fallback",t));let s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:r,_getTarget:n,override:o=>vT([o,...t],i,a,r)};return new Proxy(s,{deleteProperty(o,d){return delete o[d],delete o._keys,delete t[0][d],!0},get(o,d){return f$(o,d,()=>cIe(d,i,t,o))},getOwnPropertyDescriptor(o,d){return Reflect.getOwnPropertyDescriptor(o._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(o,d){return WY(o).includes(d)},ownKeys(o){return WY(o)},set(o,d,l){let c=o._storage||(o._storage=n());return o[d]=c[d]=l,delete o._keys,!0}})}function Xh(t,i,e,r){let n={_cacheable:!1,_proxy:t,_context:i,_subProxy:e,_stack:new Set,_descriptors:DF(t,r),setContext:a=>Xh(t,a,e,r),override:a=>Xh(t.override(a),i,e,r)};return new Proxy(n,{deleteProperty(a,s){return delete a[s],delete t[s],!0},get(a,s,o){return f$(a,s,()=>nIe(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(a,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(a,s,o){return t[s]=o,delete a[s],!0}})}function DF(t,i={scriptable:!0,indexable:!0}){let{_scriptable:e=i.scriptable,_indexable:r=i.indexable,_allKeys:n=i.allKeys}=t;return{allKeys:n,scriptable:e,indexable:r,isScriptable:id(e)?e:()=>e,isIndexable:id(r)?r:()=>r}}var iIe=(t,i)=>t?t+dT(i):i,MF=(t,i)=>ki(i)&&t!=="adapters"&&(Object.getPrototypeOf(i)===null||i.constructor===Object);function f$(t,i,e){if(Object.prototype.hasOwnProperty.call(t,i)||i==="constructor")return t[i];let r=e();return t[i]=r,r}function nIe(t,i,e){let{_proxy:r,_context:n,_subProxy:a,_descriptors:s}=t,o=r[i];return id(o)&&s.isScriptable(i)&&(o=rIe(i,o,t,e)),zn(o)&&o.length&&(o=sIe(i,o,t,s.isIndexable)),MF(i,o)&&(o=Xh(o,n,a&&a[i],s)),o}function rIe(t,i,e,r){let{_proxy:n,_context:a,_subProxy:s,_stack:o}=e;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let d=i(a,s||r);return o.delete(t),MF(t,d)&&(d=AF(n._scopes,n,t,d)),d}function sIe(t,i,e,r){let{_proxy:n,_context:a,_subProxy:s,_descriptors:o}=e;if(typeof a.index<"u"&&r(t))return i[a.index%i.length];if(ki(i[0])){let d=i,l=n._scopes.filter(c=>c!==d);i=[];for(let c of d){let h=AF(l,n,t,c);i.push(Xh(h,a,s&&s[t],o))}}return i}function m$(t,i,e){return id(t)?t(i,e):t}var aIe=(t,i)=>t===!0?i:typeof t=="string"?rd(i,t):void 0;function oIe(t,i,e,r,n){for(let a of i){let s=aIe(e,a);if(s){t.add(s);let o=m$(s._fallback,e,n);if(typeof o<"u"&&o!==e&&o!==r)return o}else if(s===!1&&typeof r<"u"&&e!==r)return null}return!1}function AF(t,i,e,r){let n=i._rootScopes,a=m$(i._fallback,e,r),s=[...t,...n],o=new Set;o.add(r);let d=jY(o,s,e,a||e,r);return d===null||typeof a<"u"&&a!==e&&(d=jY(o,s,a,d,r),d===null)?!1:vT(Array.from(o),[""],n,a,()=>lIe(i,e,r))}function jY(t,i,e,r,n){for(;e;)e=oIe(t,i,e,r,n);return e}function lIe(t,i,e){let r=t._getTarget();i in r||(r[i]={});let n=r[i];return zn(n)&&ki(e)?e:n||{}}function cIe(t,i,e,r){let n;for(let a of i)if(n=p$(iIe(a,t),e),typeof n<"u")return MF(t,n)?AF(e,r,t,n):n}function p$(t,i){for(let e of i){if(!e)continue;let r=e[t];if(typeof r<"u")return r}}function WY(t){let i=t._keys;return i||(i=t._keys=dIe(t._scopes)),i}function dIe(t){let i=new Set;for(let e of t)for(let r of Object.keys(e).filter(n=>!n.startsWith("_")))i.add(r);return Array.from(i)}function IF(t,i,e,r){let{iScale:n}=t,{key:a="r"}=this._parsing,s=new Array(r),o,d,l,c;for(o=0,d=r;oit==="x"?"y":"x";function hIe(t,i,e,r){let n=t.skip?i:t,a=i,s=e.skip?i:e,o=lT(a,n),d=lT(s,a),l=o/(o+d),c=d/(o+d);l=isNaN(l)?0:l,c=isNaN(c)?0:c;let h=r*l,u=r*c;return{previous:{x:a.x-h*(s.x-n.x),y:a.y-h*(s.y-n.y)},next:{x:a.x+u*(s.x-n.x),y:a.y+u*(s.y-n.y)}}}function fIe(t,i,e){let r=t.length,n,a,s,o,d,l=Up(t,0);for(let c=0;c!l.skip)),i.cubicInterpolationMode==="monotone")pIe(t,n);else{let l=r?t[t.length-1]:t[0];for(a=0,s=t.length;at.ownerDocument.defaultView.getComputedStyle(t,null);function vIe(t,i){return bT(t).getPropertyValue(i)}var yIe=["top","right","bottom","left"];function Wh(t,i,e){let r={};e=e?"-"+e:"";for(let n=0;n<4;n++){let a=yIe[n];r[a]=parseFloat(t[i+"-"+a+e])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var xIe=(t,i,e)=>(t>0||i>0)&&(!e||!e.shadowRoot);function bIe(t,i){let e=t.touches,r=e&&e.length?e[0]:t,{offsetX:n,offsetY:a}=r,s=!1,o,d;if(xIe(n,a,t.target))o=n,d=a;else{let l=i.getBoundingClientRect();o=r.clientX-l.left,d=r.clientY-l.top,s=!0}return{x:o,y:d,box:s}}function yu(t,i){if("native"in t)return t;let{canvas:e,currentDevicePixelRatio:r}=i,n=bT(e),a=n.boxSizing==="border-box",s=Wh(n,"padding"),o=Wh(n,"border","width"),{x:d,y:l,box:c}=bIe(t,e),h=s.left+(c&&o.left),u=s.top+(c&&o.top),{width:f,height:p}=i;return a&&(f-=s.width+o.width,p-=s.height+o.height),{x:Math.round((d-h)/f*e.width/r),y:Math.round((l-u)/p*e.height/r)}}function _Ie(t,i,e){let r,n;if(i===void 0||e===void 0){let a=t&&xT(t);if(!a)i=t.clientWidth,e=t.clientHeight;else{let s=a.getBoundingClientRect(),o=bT(a),d=Wh(o,"border","width"),l=Wh(o,"padding");i=s.width-l.width-d.width,e=s.height-l.height-d.height,r=cT(o.maxWidth,a,"clientWidth"),n=cT(o.maxHeight,a,"clientHeight")}}return{width:i,height:e,maxWidth:r||oT,maxHeight:n||oT}}var sT=t=>Math.round(t*10)/10;function y$(t,i,e,r){let n=bT(t),a=Wh(n,"margin"),s=cT(n.maxWidth,t,"clientWidth")||oT,o=cT(n.maxHeight,t,"clientHeight")||oT,d=_Ie(t,i,e),{width:l,height:c}=d;if(n.boxSizing==="content-box"){let u=Wh(n,"border","width"),f=Wh(n,"padding");l-=f.width+u.width,c-=f.height+u.height}return l=Math.max(0,l-a.width),c=Math.max(0,r?l/r:c-a.height),l=sT(Math.min(l,s,d.maxWidth)),c=sT(Math.min(c,o,d.maxHeight)),l&&!c&&(c=sT(l/2)),(i!==void 0||e!==void 0)&&r&&d.height&&c>d.height&&(c=d.height,l=sT(Math.floor(c*r))),{width:l,height:c}}function RF(t,i,e){let r=i||1,n=Math.floor(t.height*r),a=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let s=t.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||s.height!==n||s.width!==a?(t.currentDevicePixelRatio=r,s.height=n,s.width=a,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}var x$=function(){let t=!1;try{let i={get passive(){return t=!0,!1}};yT()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch{}return t}();function PF(t,i){let e=vIe(t,i),r=e&&e.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function fu(t,i,e,r){return{x:t.x+e*(i.x-t.x),y:t.y+e*(i.y-t.y)}}function b$(t,i,e,r){return{x:t.x+e*(i.x-t.x),y:r==="middle"?e<.5?t.y:i.y:r==="after"?e<1?t.y:i.y:e>0?i.y:t.y}}function _$(t,i,e,r){let n={x:t.cp2x,y:t.cp2y},a={x:i.cp1x,y:i.cp1y},s=fu(t,n,e),o=fu(n,a,e),d=fu(a,i,e),l=fu(s,o,e),c=fu(o,d,e);return fu(l,c,e)}var wIe=function(t,i){return{x(e){return t+t+i-e},setWidth(e){i=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,r){return e-r},leftForLtr(e,r){return e-r}}},CIe=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,i){return t+i},leftForLtr(t,i){return t}}};function $h(t,i,e){return t?wIe(i,e):CIe()}function kF(t,i){let e,r;(i==="ltr"||i==="rtl")&&(e=t.canvas.style,r=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",i,"important"),t.prevTextDirection=r)}function FF(t,i){i!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",i[0],i[1]))}function w$(t){return t==="angle"?{between:jp,compare:UAe,normalize:Ha}:{between:sc,compare:(i,e)=>i-e,normalize:i=>i}}function XY({start:t,end:i,count:e,loop:r,style:n}){return{start:t%e,end:i%e,loop:r&&(i-t+1)%e===0,style:n}}function TIe(t,i,e){let{property:r,start:n,end:a}=e,{between:s,normalize:o}=w$(r),d=i.length,{start:l,end:c,loop:h}=t,u,f;if(h){for(l+=d,c+=d,u=0,f=d;ud(n,x,v)&&o(n,x)!==0,_=()=>o(a,v)===0||d(a,x,v),C=()=>m||b(),w=()=>!m||_();for(let T=c,S=c;T<=h;++T)y=i[T%s],!y.skip&&(v=l(y[r]),v!==x&&(m=d(v,n,a),g===null&&C()&&(g=o(v,n)===0?T:S),g!==null&&w()&&(p.push(XY({start:g,end:T,loop:u,count:s,style:f})),g=null),S=T,x=v));return g!==null&&p.push(XY({start:g,end:h,loop:u,count:s,style:f})),p}function LF(t,i){let e=[],r=t.segments;for(let n=0;nn&&t[a%i].skip;)a--;return a%=i,{start:n,end:a}}function EIe(t,i,e,r){let n=t.length,a=[],s=i,o=t[i],d;for(d=i+1;d<=e;++d){let l=t[d%n];l.skip||l.stop?o.skip||(r=!1,a.push({start:i%n,end:(d-1)%n,loop:r}),i=s=l.stop?d:null):(s=d,o.skip&&(i=d)),o=l}return s!==null&&a.push({start:i%n,end:s%n,loop:r}),a}function C$(t,i){let e=t.points,r=t.options.spanGaps,n=e.length;if(!n)return[];let a=!!t._loop,{start:s,end:o}=SIe(e,n,a,r);if(r===!0)return YY(t,[{start:s,end:o,loop:a}],e,i);let d=oo({chart:i,initial:e.initial,numSteps:s,currentStep:Math.min(r-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=yF.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let e=0;this._charts.forEach((r,n)=>{if(!r.running||!r.items.length)return;let a=r.items,s=a.length-1,o=!1,d;for(;s>=0;--s)d=a[s],d._active?(d._total>r.duration&&(r.duration=d._total),d.tick(i),o=!0):(a[s]=a[a.length-1],a.pop());o&&(n.draw(),this._notify(n,r,i,"progress")),a.length||(r.running=!1,this._notify(n,r,i,"complete"),r.initial=!1),e+=a.length}),this._lastDate=i,e===0&&(this._running=!1)}_getAnims(i){let e=this._charts,r=e.get(i);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(i,r)),r}listen(i,e,r){this._getAnims(i).listeners[e].push(r)}add(i,e){!e||!e.length||this._getAnims(i).items.push(...e)}has(i){return this._getAnims(i).items.length>0}start(i){let e=this._charts.get(i);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((r,n)=>Math.max(r,n._duration),0),this._refresh())}running(i){if(!this._running)return!1;let e=this._charts.get(i);return!(!e||!e.running||!e.items.length)}stop(i){let e=this._charts.get(i);if(!e||!e.items.length)return;let r=e.items,n=r.length-1;for(;n>=0;--n)r[n].cancel();e.items=[],this._notify(i,e,Date.now(),"complete")}remove(i){return this._charts.delete(i)}},ad=new YF,T$="transparent",AIe={boolean(t,i,e){return e>.5?i:t},color(t,i,e){let r=CF(t||T$),n=r.valid&&CF(i||T$);return n&&n.valid?n.mix(r,e).hexString():i},number(t,i,e){return t+(i-t)*e}},$F=class{constructor(i,e,r,n){let a=e[r];n=Yp([i.to,n,a,i.from]);let s=Yp([i.from,a,n]);this._active=!0,this._fn=i.fn||AIe[i.type||typeof s],this._easing=Bp[i.easing]||Bp.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=e,this._prop=r,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(i,e,r){if(this._active){this._notify(!1);let n=this._target[this._prop],a=r-this._start,s=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(s,i.duration)),this._total+=a,this._loop=!!i.loop,this._to=Yp([i.to,e,n,i.from]),this._from=Yp([i.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){let e=i-this._start,r=this._duration,n=this._prop,a=this._from,s=this._loop,o=this._to,d;if(this._active=a!==o&&(s||e1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[n]=this._fn(a,o,d)}wait(){let i=this._promises||(this._promises=[]);return new Promise((e,r)=>{i.push({res:e,rej:r})})}_notify(i){let e=i?"res":"rej",r=this._promises||[];for(let n=0;n{let a=i[n];if(!ki(a))return;let s={};for(let o of e)s[o]=a[o];(zn(a.properties)&&a.properties||[n]).forEach(o=>{(o===n||!r.has(o))&&r.set(o,s)})})}_animateOptions(i,e){let r=e.options,n=RIe(i,r);if(!n)return[];let a=this._createAnimations(n,r);return r.$shared&&IIe(i.options.$animations,r).then(()=>{i.options=r},()=>{}),a}_createAnimations(i,e){let r=this._properties,n=[],a=i.$animations||(i.$animations={}),s=Object.keys(e),o=Date.now(),d;for(d=s.length-1;d>=0;--d){let l=s[d];if(l.charAt(0)==="$")continue;if(l==="options"){n.push(...this._animateOptions(i,e));continue}let c=e[l],h=a[l],u=r.get(l);if(h)if(u&&h.active()){h.update(u,c,o);continue}else h.cancel();if(!u||!u.duration){i[l]=c;continue}a[l]=h=new $F(u,i,l,c),n.push(h)}return n}update(i,e){if(this._properties.size===0){Object.assign(i,e);return}let r=this._createAnimations(i,e);if(r.length)return ad.add(this._chart,r),!0}};function IIe(t,i){let e=[],r=Object.keys(i);for(let n=0;n0||!e&&a<0)return n.index}return null}function M$(t,i){let{chart:e,_cachedMeta:r}=t,n=e._stacks||(e._stacks={}),{iScale:a,vScale:s,index:o}=r,d=a.axis,l=s.axis,c=OIe(a,s,r),h=i.length,u;for(let f=0;fe[r].axis===i).shift()}function BIe(t,i){return sd(t,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})}function VIe(t,i,e){return sd(t,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:e,index:i,mode:"default",type:"data"})}function py(t,i){let e=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){i=i||t._parsed;for(let n of i){let a=n._stacks;if(!a||a[r]===void 0||a[r][e]===void 0)return;delete a[r][e],a[r]._visualValues!==void 0&&a[r]._visualValues[e]!==void 0&&delete a[r]._visualValues[e]}}}var VF=t=>t==="reset"||t==="none",A$=(t,i)=>i?t:Object.assign({},t),UIe=(t,i,e)=>t&&!i.hidden&&i._stacked&&{keys:TQ(e,!0),values:null},bu=(()=>{class t{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,r){this.chart=e,this._ctx=e.ctx,this.index=r,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=NF(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&py(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,r=this._cachedMeta,n=this.getDataset(),a=(u,f,p,m)=>u==="x"?f:u==="r"?m:p,s=r.xAxisID=mi(n.xAxisID,BF(e,"x")),o=r.yAxisID=mi(n.yAxisID,BF(e,"y")),d=r.rAxisID=mi(n.rAxisID,BF(e,"r")),l=r.indexAxis,c=r.iAxisID=a(l,s,o,d),h=r.vAxisID=a(l,o,s,d);r.xScale=this.getScaleForId(s),r.yScale=this.getScaleForId(o),r.rScale=this.getScaleForId(d),r.iScale=this.getScaleForId(c),r.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let r=this._cachedMeta;return e===r.iScale?r.vScale:r.iScale}reset(){this._update("reset")}_destroy(){let e=this._cachedMeta;this._data&&gF(this._data,this),e._stacked&&py(e)}_dataCheck(){let e=this.getDataset(),r=e.data||(e.data=[]),n=this._data;if(ki(r)){let a=this._cachedMeta;this._data=FIe(r,a)}else if(n!==r){if(n){gF(n,this);let a=this._cachedMeta;py(a),a._parsed=[]}r&&Object.isExtensible(r)&&s$(r,this),this._syncList=[],this._data=r}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let r=this._cachedMeta,n=this.getDataset(),a=!1;this._dataCheck();let s=r._stacked;r._stacked=NF(r.vScale,r),r.stack!==n.stack&&(a=!0,py(r),r.stack=n.stack),this._resyncElements(e),(a||s!==r._stacked)&&(M$(this,r._parsed),r._stacked=NF(r.vScale,r))}configure(){let e=this.chart.config,r=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),r,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,r){let{_cachedMeta:n,_data:a}=this,{iScale:s,_stacked:o}=n,d=s.axis,l=e===0&&r===a.length?!0:n._sorted,c=e>0&&n._parsed[e-1],h,u,f;if(this._parsing===!1)n._parsed=a,n._sorted=!0,f=a;else{zn(a[e])?f=this.parseArrayData(n,a,e,r):ki(a[e])?f=this.parseObjectData(n,a,e,r):f=this.parsePrimitiveData(n,a,e,r);let p=()=>u[d]===null||c&&u[d]g||u=0;--f)if(!m()){this.updateRangeFromParsed(c,e,p,l);break}}return c}getAllParsedValues(e){let r=this._cachedMeta._parsed,n=[],a,s,o;for(a=0,s=r.length;a=0&&ethis.getContext(n,a,r),g=c.resolveNamedOptions(f,p,m,u);return g.$shared&&(g.$shared=l,s[o]=Object.freeze(A$(g,l))),g}_resolveAnimations(e,r,n){let a=this.chart,s=this._cachedDataOpts,o=`animation-${r}`,d=s[o];if(d)return d;let l;if(a.options.animation!==!1){let h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,r),f=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(f,this.getContext(e,n,r))}let c=new IT(a,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,r){return!r||VF(e)||this.chart._animationsDisabled}_getSharedOptions(e,r){let n=this.resolveDataElementOptions(e,r),a=this._sharedOptions,s=this.getSharedOptions(n),o=this.includeOptions(r,s)||s!==a;return this.updateSharedOptions(s,r,n),{sharedOptions:s,includeOptions:o}}updateElement(e,r,n,a){VF(a)?Object.assign(e,n):this._resolveAnimations(r,a).update(e,n)}updateSharedOptions(e,r,n){e&&!VF(r)&&this._resolveAnimations(void 0,r).update(e,n)}_setStyle(e,r,n,a){e.active=a;let s=this.getStyle(r,a);this._resolveAnimations(r,n,a).update(e,{options:!a&&this.getSharedOptions(s)||s})}removeHoverStyle(e,r,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,r,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){let r=this._data,n=this._cachedMeta.data;for(let[d,l,c]of this._syncList)this[d](l,c);this._syncList=[];let a=n.length,s=r.length,o=Math.min(s,a);o&&this.parse(0,o),s>a?this._insertElements(a,s-a,e):s{for(c.length+=r,d=c.length-1;d>=o;d--)c[d]=c[d-r]};for(l(s),d=e;dn-a))}return t._cache.$bar}function GIe(t){let i=t.iScale,e=zIe(i,t.type),r=i._length,n,a,s,o,d=()=>{s===32767||s===-32768||(Gp(o)&&(r=Math.min(r,Math.abs(s-o)||r)),o=s)};for(n=0,a=e.length;n0?n[t-1]:null,o=tMath.abs(o)&&(d=o,l=s),i[e.axis]=l,i._custom={barStart:d,barEnd:l,start:n,end:a,min:s,max:o}}function SQ(t,i,e,r){return zn(t)?WIe(t,i,e,r):i[e.axis]=e.parse(t,r),i}function I$(t,i,e,r){let n=t.iScale,a=t.vScale,s=n.getLabels(),o=n===a,d=[],l,c,h,u;for(l=e,c=e+r;l=e?1:-1)}function YIe(t){let i,e,r,n,a;return t.horizontal?(i=t.base>t.x,e="left",r="right"):(i=t.base{class t extends bu{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,r,n,a){return I$(e,r,n,a)}parseArrayData(e,r,n,a){return I$(e,r,n,a)}parseObjectData(e,r,n,a){let{iScale:s,vScale:o}=e,{xAxisKey:d="x",yAxisKey:l="y"}=this._parsing,c=s.axis==="x"?d:l,h=o.axis==="x"?d:l,u=[],f,p,m,g;for(f=n,p=n+a;fh.controller.options.grouped),s=n.options.stacked,o=[],d=this._cachedMeta.controller.getParsed(r),l=d&&d[n.axis],c=h=>{let u=h._parsed.find(p=>p[n.axis]===l),f=u&&u[h.vScale.axis];if(Gi(f)||isNaN(f))return!0};for(let h of a)if(!(r!==void 0&&c(h))&&((s===!1||o.indexOf(h.stack)===-1||s===void 0&&h.stack===void 0)&&o.push(h.stack),h.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,r,n){let a=this._getStacks(e,n),s=r!==void 0?a.indexOf(r):-1;return s===-1?a.length-1:s}_getRuler(){let e=this.options,r=this._cachedMeta,n=r.iScale,a=[],s,o;for(s=0,o=r.data.length;s{class t extends bu{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,r,n,a){let s=super.parsePrimitiveData(e,r,n,a);for(let o=0;o=0;--n)r=Math.max(r,e[n].size(this.resolveDataElementOptions(n))/2);return r>0&&r}getLabelAndValue(e){let r=this._cachedMeta,n=this.chart.data.labels||[],{xScale:a,yScale:s}=r,o=this.getParsed(e),d=a.getLabelForValue(o.x),l=s.getLabelForValue(o.y),c=o._custom;return{label:n[e]||"",value:"("+d+", "+l+(c?", "+c:"")+")"}}update(e){let r=this._cachedMeta.data;this.updateElements(r,0,r.length,e)}updateElements(e,r,n,a){let s=a==="reset",{iScale:o,vScale:d}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(r,a),h=o.axis,u=d.axis;for(let f=r;fjp(x,o,d,!0)?1:Math.max(b,b*e,_,_*e),p=(x,b,_)=>jp(x,o,d,!0)?-1:Math.min(b,b*e,_,_*e),m=f(0,l,h),g=f(pr,c,u),v=p(Gn,l,h),y=p(Gn+pr,c,u);r=(m-v)/2,n=(g-y)/2,a=-(m+v)/2,s=-(g+y)/2}return{ratioX:r,ratioY:n,offsetX:a,offsetY:s}}var mO=(()=>{class t extends bu{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let r=e.data;if(r.labels.length&&r.datasets.length){let{labels:{pointStyle:n,color:a}}=e.legend.options;return r.labels.map((s,o)=>{let l=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:a,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,r,n){n.chart.toggleDataVisibility(r.index),n.chart.update()}}}};constructor(e,r){super(e,r),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,r){let n=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=n;else{let s=l=>+n[l];if(ki(n[e])){let{key:l="value"}=this._parsing;s=c=>+rd(n[c],l)}let o,d;for(o=e,d=e+r;o0&&!isNaN(e)?Hn*(Math.abs(e)/r):0}getLabelAndValue(e){let r=this._cachedMeta,n=this.chart,a=n.data.labels||[],s=Wp(r._parsed[e],n.options.locale);return{label:a[e]||"",value:s}}getMaxBorderWidth(e){let r=0,n=this.chart,a,s,o,d,l;if(!e){for(a=0,s=n.data.datasets.length;a{class t extends bu{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){let r=this._cachedMeta,{dataset:n,data:a=[],_dataset:s}=r,o=this.chart._animationsDisabled,{start:d,count:l}=bF(r,a,o);this._drawStart=d,this._drawCount=l,_F(r)&&(d=0,l=a.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!s._decimated,n.points=a;let c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:c},e),this.updateElements(a,d,l,e)}updateElements(e,r,n,a){let s=a==="reset",{iScale:o,vScale:d,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(r,a),f=o.axis,p=d.axis,{spanGaps:m,segment:g}=this.options,v=Yh(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||s||a==="none",x=r+n,b=e.length,_=r>0&&this.getParsed(r-1);for(let C=0;C=x){T.skip=!0;continue}let S=this.getParsed(C),E=Gi(S[p]),D=T[f]=o.getPixelForValue(S[f],C),A=T[p]=s||E?d.getBasePixel():d.getPixelForValue(l?this.applyStack(d,S,l):S[p],C);T.skip=isNaN(D)||isNaN(A)||E,T.stop=C>0&&Math.abs(S[f]-_[f])>v,g&&(T.parsed=S,T.raw=c.data[C]),u&&(T.options=h||this.resolveDataElementOptions(C,w.active?"active":a)),y||this.updateElement(w,C,T,a),_=S}}getMaxOverflow(){let e=this._cachedMeta,r=e.dataset,n=r.options&&r.options.borderWidth||0,a=e.data||[];if(!a.length)return n;let s=a[0].size(this.resolveDataElementOptions(0)),o=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(n,s,o)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}return t})(),EQ=(()=>{class t extends bu{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let r=e.data;if(r.labels.length&&r.datasets.length){let{labels:{pointStyle:n,color:a}}=e.legend.options;return r.labels.map((s,o)=>{let l=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:a,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,r,n){n.chart.toggleDataVisibility(r.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,r){super(e,r),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let r=this._cachedMeta,n=this.chart,a=n.data.labels||[],s=Wp(r._parsed[e].r,n.options.locale);return{label:a[e]||"",value:s}}parseObjectData(e,r,n,a){return IF.bind(this)(e,r,n,a)}update(e){let r=this._cachedMeta.data;this._updateRadius(),this.updateElements(r,0,r.length,e)}getMinMax(){let e=this._cachedMeta,r={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((n,a)=>{let s=this.getParsed(a).r;!isNaN(s)&&this.chart.getDataVisibility(a)&&(sr.max&&(r.max=s))}),r}_updateRadius(){let e=this.chart,r=e.chartArea,n=e.options,a=Math.min(r.right-r.left,r.bottom-r.top),s=Math.max(a/2,0),o=Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0),d=(s-o)/e.getVisibleDatasetCount();this.outerRadius=s-d*this.index,this.innerRadius=this.outerRadius-d}updateElements(e,r,n,a){let s=a==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,u=c.yCenter,f=c.getIndexAngle(0)-.5*Gn,p=f,m,g=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(a).r)&&this.chart.getDataVisibility(a)&&r++}),r}_computeAngle(e,r,n){return this.chart.getDataVisibility(e)?zo(this.resolveDataElementOptions(e,r).angle||n):0}}return t})(),tRe=(()=>{class t extends mO{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return t})(),iRe=(()=>{class t extends bu{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){let r=this._cachedMeta.vScale,n=this.getParsed(e);return{label:r.getLabels()[e],value:""+r.getLabelForValue(n[r.axis])}}parseObjectData(e,r,n,a){return IF.bind(this)(e,r,n,a)}update(e){let r=this._cachedMeta,n=r.dataset,a=r.data||[],s=r.iScale.getLabels();if(n.points=a,e!=="resize"){let o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);let d={_loop:!0,_fullLoop:s.length===a.length,options:o};this.updateElement(n,void 0,d,e)}this.updateElements(a,0,a.length,e)}updateElements(e,r,n,a){let s=this._cachedMeta.rScale,o=a==="reset";for(let d=r;d{class t extends bu{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){let r=this._cachedMeta,n=this.chart.data.labels||[],{xScale:a,yScale:s}=r,o=this.getParsed(e),d=a.getLabelForValue(o.x),l=s.getLabelForValue(o.y);return{label:n[e]||"",value:"("+d+", "+l+")"}}update(e){let r=this._cachedMeta,{data:n=[]}=r,a=this.chart._animationsDisabled,{start:s,count:o}=bF(r,n,a);if(this._drawStart=s,this._drawCount=o,_F(r)&&(s=0,o=n.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:d,_dataset:l}=r;d._chart=this.chart,d._datasetIndex=this.index,d._decimated=!!l._decimated,d.points=n;let c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(d,void 0,{animated:!a,options:c},e)}else this.datasetElementType&&(delete r.dataset,this.datasetElementType=!1);this.updateElements(n,s,o,e)}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,r,n,a){let s=a==="reset",{iScale:o,vScale:d,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(r,a),u=this.getSharedOptions(h),f=this.includeOptions(a,u),p=o.axis,m=d.axis,{spanGaps:g,segment:v}=this.options,y=Yh(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||s||a==="none",b=r>0&&this.getParsed(r-1);for(let _=r;_0&&Math.abs(w[p]-b[p])>y,v&&(T.parsed=w,T.raw=c.data[_]),f&&(T.options=u||this.resolveDataElementOptions(_,C.active?"active":a)),x||this.updateElement(C,_,T,a),b=w}this.updateSharedOptions(u,a,h)}getMaxOverflow(){let e=this._cachedMeta,r=e.data||[];if(!this.options.showLine){let d=0;for(let l=r.length-1;l>=0;--l)d=Math.max(d,r[l].size(this.resolveDataElementOptions(l))/2);return d>0&&d}let n=e.dataset,a=n.options&&n.options.borderWidth||0;if(!r.length)return a;let s=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(a,s,o)/2}}return t})(),rRe=Object.freeze({__proto__:null,BarController:ZIe,BubbleController:JIe,DoughnutController:mO,LineController:eRe,PieController:tRe,PolarAreaController:EQ,RadarController:iRe,ScatterController:nRe});function Qh(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var QF=class t{static override(i){Object.assign(t.prototype,i)}options;constructor(i){this.options=i||{}}init(){}formats(){return Qh()}parse(){return Qh()}format(){return Qh()}add(){return Qh()}diff(){return Qh()}startOf(){return Qh()}endOf(){return Qh()}},sRe={_date:QF};function aRe(t,i,e,r){let{controller:n,data:a,_sorted:s}=t,o=n._cachedMeta.iScale;if(o&&i===o.axis&&i!=="r"&&s&&a.length){let d=o._reversePixels?i$:ic;if(r){if(n._sharedOptions){let l=a[0],c=typeof l.getRange=="function"&&l.getRange(i);if(c){let h=d(a,i,e-c),u=d(a,i,e+c);return{lo:h.lo,hi:u.hi}}}}else return d(a,i,e)}return{lo:0,hi:a.length-1}}function Sy(t,i,e,r,n){let a=t.getSortedVisibleDatasetMetas(),s=e[i];for(let o=0,d=a.length;o{d[s]&&d[s](i[e],n)&&(a.push({element:d,datasetIndex:l,index:c}),o=o||d.inRange(i.x,i.y,n))}),r&&!o?[]:a}var dRe={evaluateInteractionItems:Sy,modes:{index(t,i,e,r){let n=yu(i,t),a=e.axis||"x",s=e.includeInvisible||!1,o=e.intersect?zF(t,n,a,r,s):GF(t,n,a,!1,r,s),d=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(l=>{let c=o[0].index,h=l.data[c];h&&!h.skip&&d.push({element:h,datasetIndex:l.index,index:c})}),d):[]},dataset(t,i,e,r){let n=yu(i,t),a=e.axis||"xy",s=e.includeInvisible||!1,o=e.intersect?zF(t,n,a,r,s):GF(t,n,a,!1,r,s);if(o.length>0){let d=o[0].datasetIndex,l=t.getDatasetMeta(d).data;o=[];for(let c=0;ce.pos===i)}function F$(t,i){return t.filter(e=>DQ.indexOf(e.pos)===-1&&e.box.axis===i)}function vy(t,i){return t.sort((e,r)=>{let n=i?r:e,a=i?e:r;return n.weight===a.weight?n.index-a.index:n.weight-a.weight})}function uRe(t){let i=[],e,r,n,a,s,o;for(e=0,r=(t||[]).length;el.box.fullSize),!0),r=vy(gy(i,"left"),!0),n=vy(gy(i,"right")),a=vy(gy(i,"top"),!0),s=vy(gy(i,"bottom")),o=F$(i,"x"),d=F$(i,"y");return{fullSize:e,leftAndTop:r.concat(a),rightAndBottom:n.concat(d).concat(s).concat(o),chartArea:gy(i,"chartArea"),vertical:r.concat(n).concat(d),horizontal:a.concat(s).concat(o)}}function O$(t,i,e,r){return Math.max(t[e],i[e])+Math.max(t[r],i[r])}function MQ(t,i){t.top=Math.max(t.top,i.top),t.left=Math.max(t.left,i.left),t.bottom=Math.max(t.bottom,i.bottom),t.right=Math.max(t.right,i.right)}function pRe(t,i,e,r){let{pos:n,box:a}=e,s=t.maxPadding;if(!ki(n)){e.size&&(t[n]-=e.size);let h=r[e.stack]||{size:0,count:1};h.size=Math.max(h.size,e.horizontal?a.height:a.width),e.size=h.size/h.count,t[n]+=e.size}a.getPadding&&MQ(s,a.getPadding());let o=Math.max(0,i.outerWidth-O$(s,t,"left","right")),d=Math.max(0,i.outerHeight-O$(s,t,"top","bottom")),l=o!==t.w,c=d!==t.h;return t.w=o,t.h=d,e.horizontal?{same:l,other:c}:{same:c,other:l}}function gRe(t){let i=t.maxPadding;function e(r){let n=Math.max(i[r]-t[r],0);return t[r]+=n,n}t.y+=e("top"),t.x+=e("left"),e("right"),e("bottom")}function vRe(t,i){let e=i.maxPadding;function r(n){let a={left:0,top:0,right:0,bottom:0};return n.forEach(s=>{a[s]=Math.max(i[s],e[s])}),a}return r(t?["left","right"]:["top","bottom"])}function by(t,i,e,r){let n=[],a,s,o,d,l,c;for(a=0,s=t.length,l=0;a{typeof m.beforeLayout=="function"&&m.beforeLayout()});let c=d.reduce((m,g)=>g.box.options&&g.box.options.display===!1?m:m+1,0)||1,h=Object.freeze({outerWidth:i,outerHeight:e,padding:n,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/c,hBoxMaxHeight:s/2}),u=Object.assign({},n);MQ(u,ws(r));let f=Object.assign({maxPadding:u,w:a,h:s,x:n.left,y:n.top},n),p=fRe(d.concat(l),h);by(o.fullSize,f,h,p),by(d,f,h,p),by(l,f,h,p)&&by(d,f,h,p),gRe(f),L$(o.leftAndTop,f,h,p),f.x+=f.w,f.y+=f.h,L$(o.rightAndBottom,f,h,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},cn(o.chartArea,m=>{let g=m.box;Object.assign(g,t.chartArea),g.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},RT=class{acquireContext(i,e){}releaseContext(i){return!1}addEventListener(i,e,r){}removeEventListener(i,e,r){}getDevicePixelRatio(){return 1}getMaximumSize(i,e,r,n){return e=Math.max(0,e||i.width),r=r||i.height,{width:e,height:Math.max(0,n?Math.floor(e/n):r)}}isAttached(i){return!0}updateConfig(i){}},KF=class extends RT{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}},MT="$chartjs",yRe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},N$=t=>t===null||t==="";function xRe(t,i){let e=t.style,r=t.getAttribute("height"),n=t.getAttribute("width");if(t[MT]={initial:{height:r,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",N$(n)){let a=PF(t,"width");a!==void 0&&(t.width=a)}if(N$(r))if(t.style.height==="")t.height=t.width/(i||2);else{let a=PF(t,"height");a!==void 0&&(t.height=a)}return t}var AQ=x$?{passive:!0}:!1;function bRe(t,i,e){t&&t.addEventListener(i,e,AQ)}function _Re(t,i,e){t&&t.canvas&&t.canvas.removeEventListener(i,e,AQ)}function wRe(t,i){let e=yRe[t.type]||t.type,{x:r,y:n}=yu(t,i);return{type:e,chart:i,native:t,x:r!==void 0?r:null,y:n!==void 0?n:null}}function PT(t,i){for(let e of t)if(e===i||e.contains(i))return!0}function CRe(t,i,e){let r=t.canvas,n=new MutationObserver(a=>{let s=!1;for(let o of a)s=s||PT(o.addedNodes,r),s=s&&!PT(o.removedNodes,r);s&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function TRe(t,i,e){let r=t.canvas,n=new MutationObserver(a=>{let s=!1;for(let o of a)s=s||PT(o.removedNodes,r),s=s&&!PT(o.addedNodes,r);s&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}var wy=new Map,B$=0;function IQ(){let t=window.devicePixelRatio;t!==B$&&(B$=t,wy.forEach((i,e)=>{e.currentDevicePixelRatio!==t&&i()}))}function SRe(t,i){wy.size||window.addEventListener("resize",IQ),wy.set(t,i)}function ERe(t){wy.delete(t),wy.size||window.removeEventListener("resize",IQ)}function DRe(t,i,e){let r=t.canvas,n=r&&xT(r);if(!n)return;let a=xF((o,d)=>{let l=n.clientWidth;e(o,d),l{let d=o[0],l=d.contentRect.width,c=d.contentRect.height;l===0&&c===0||a(l,c)});return s.observe(n),SRe(t,a),s}function HF(t,i,e){e&&e.disconnect(),i==="resize"&&ERe(t)}function MRe(t,i,e){let r=t.canvas,n=xF(a=>{t.ctx!==null&&e(wRe(a,t))},t);return bRe(r,i,n),n}var ZF=class extends RT{acquireContext(i,e){let r=i&&i.getContext&&i.getContext("2d");return r&&r.canvas===i?(xRe(i,e),r):null}releaseContext(i){let e=i.canvas;if(!e[MT])return!1;let r=e[MT].initial;["height","width"].forEach(a=>{let s=r[a];Gi(s)?e.removeAttribute(a):e.setAttribute(a,s)});let n=r.style||{};return Object.keys(n).forEach(a=>{e.style[a]=n[a]}),e.width=e.width,delete e[MT],!0}addEventListener(i,e,r){this.removeEventListener(i,e);let n=i.$proxies||(i.$proxies={}),s={attach:CRe,detach:TRe,resize:DRe}[e]||MRe;n[e]=s(i,e,r)}removeEventListener(i,e){let r=i.$proxies||(i.$proxies={}),n=r[e];if(!n)return;({attach:HF,detach:HF,resize:HF}[e]||_Re)(i,e,n),r[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,e,r,n){return y$(i,e,r,n)}isAttached(i){let e=i&&xT(i);return!!(e&&e.isConnected)}};function ARe(t){return!yT()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?KF:ZF}var yl=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(i){let{x:e,y:r}=this.getProps(["x","y"],i);return{x:e,y:r}}hasValue(){return Yh(this.x)&&Yh(this.y)}getProps(i,e){let r=this.$animations;if(!e||!r)return this;let n={};return i.forEach(a=>{n[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),n}};function IRe(t,i){let e=t.options.ticks,r=RRe(t),n=Math.min(e.maxTicksLimit||r,r),a=e.major.enabled?kRe(i):[],s=a.length,o=a[0],d=a[s-1],l=[];if(s>n)return FRe(i,l,a,s/n),l;let c=PRe(a,i,n);if(s>0){let h,u,f=s>1?Math.round((d-o)/(s-1)):null;for(wT(i,l,c,Gi(f)?0:o-f,o),h=0,u=s-1;hn)return d}return Math.max(n,1)}function kRe(t){let i=[],e,r;for(e=0,r=t.length;et==="left"?"right":t==="right"?"left":t,V$=(t,i,e)=>i==="top"||i==="left"?t[i]+e:t[i]-e,U$=(t,i)=>Math.min(i||t,t);function z$(t,i){let e=[],r=t.length/i,n=t.length,a=0;for(;as+o)))return d}function BRe(t,i){cn(t,e=>{let r=e.gc,n=r.length/2,a;if(n>i){for(a=0;ar?r:e,r=n&&e>r?e:r,{min:ja(e,ja(r,e)),max:ja(r,ja(e,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Mn(this.options.beforeUpdate,[this])}update(i,e,r){let{beginAtZero:n,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=e,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=h$(this,a,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let d=o=a||r<=1||!this.isHorizontal()){this.labelRotation=n;return}let c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,f=Qr(this.chart.width-h,0,this.maxWidth);o=i.offset?this.maxWidth/r:f/(r-1),h+6>o&&(o=f/(r-(i.offset?.5:1)),d=this.maxHeight-yy(i.grid)-e.padding-G$(i.title,this.chart.options.font),l=Math.sqrt(h*h+u*u),s=uT(Math.min(Math.asin(Qr((c.highest.height+6)/o,-1,1)),Math.asin(Qr(d/l,-1,1))-Math.asin(Qr(u/l,-1,1)))),s=Math.max(n,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Mn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Mn(this.options.beforeFit,[this])}fit(){let i={width:0,height:0},{chart:e,options:{ticks:r,title:n,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){let d=G$(n,e.options.font);if(o?(i.width=this.maxWidth,i.height=yy(a)+d):(i.height=this.maxHeight,i.width=yy(a)+d),r.display&&this.ticks.length){let{first:l,last:c,widest:h,highest:u}=this._getLabelSizes(),f=r.padding*2,p=zo(this.labelRotation),m=Math.cos(p),g=Math.sin(p);if(o){let v=r.mirror?0:g*h.width+m*u.height;i.height=Math.min(this.maxHeight,i.height+v+f)}else{let v=r.mirror?0:m*h.width+g*u.height;i.width=Math.min(this.maxWidth,i.width+v+f)}this._calculatePadding(l,c,g,m)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,e,r,n){let{ticks:{align:a,padding:s},position:o}=this.options,d=this.labelRotation!==0,l=o!=="top"&&this.axis==="x";if(this.isHorizontal()){let c=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;d?l?(u=n*i.width,f=r*e.height):(u=r*i.height,f=n*e.width):a==="start"?f=e.width:a==="end"?u=i.width:a!=="inner"&&(u=i.width/2,f=e.width/2),this.paddingLeft=Math.max((u-c+s)*this.width/(this.width-c),0),this.paddingRight=Math.max((f-h+s)*this.width/(this.width-h),0)}else{let c=e.height/2,h=i.height/2;a==="start"?(c=0,h=i.height):a==="end"&&(c=e.height,h=0),this.paddingTop=c+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Mn(this.options.afterFit,[this])}isHorizontal(){let{axis:i,position:e}=this.options;return e==="top"||e==="bottom"||i==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){this.beforeTickToLabelConversion(),this.generateTickLabels(i);let e,r;for(e=0,r=i.length;e({width:s[S]||0,height:o[S]||0});return{first:T(0),last:T(e-1),widest:T(C),highest:T(w),widths:s,heights:o}}getLabelForValue(i){return i}getPixelForValue(i,e){return NaN}getValueForPixel(i){}getPixelForTick(i){let e=this.ticks;return i<0||i>e.length-1?null:this.getPixelForValue(e[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);let e=this._startPixel+i*this._length;return t$(this._alignToPixels?pu(this.chart,e,0):e)}getDecimalForPixel(i){let e=(i-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:i,max:e}=this;return i<0&&e<0?e:i>0&&e>0?i:0}getContext(i){let e=this.ticks||[];if(i>=0&&io*n?o/r:d/n:d*n0}_computeGridLineItems(i){let e=this.axis,r=this.chart,n=this.options,{grid:a,position:s,border:o}=n,d=a.offset,l=this.isHorizontal(),h=this.ticks.length+(d?1:0),u=yy(a),f=[],p=o.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,v=function(I){return pu(r,I,m)},y,x,b,_,C,w,T,S,E,D,A,M;if(s==="top")y=v(this.bottom),w=this.bottom-u,S=y-g,D=v(i.top)+g,M=i.bottom;else if(s==="bottom")y=v(this.top),D=i.top,M=v(i.bottom)-g,w=y+g,S=this.top+u;else if(s==="left")y=v(this.right),C=this.right-u,T=y-g,E=v(i.left)+g,A=i.right;else if(s==="right")y=v(this.left),E=i.left,A=v(i.right)-g,C=y+g,T=this.left+u;else if(e==="x"){if(s==="center")y=v((i.top+i.bottom)/2+.5);else if(ki(s)){let I=Object.keys(s)[0],O=s[I];y=v(this.chart.scales[I].getPixelForValue(O))}D=i.top,M=i.bottom,w=y+g,S=w+u}else if(e==="y"){if(s==="center")y=v((i.left+i.right)/2);else if(ki(s)){let I=Object.keys(s)[0],O=s[I];y=v(this.chart.scales[I].getPixelForValue(O))}C=y-g,T=C-u,E=i.left,A=i.right}let R=mi(n.ticks.maxTicksLimit,h),L=Math.max(1,Math.ceil(h/R));for(x=0;x0&&(Z-=k/2);break}V={left:Z,top:G,width:k+z.width,height:F+z.height,color:L.backdropColor}}g.push({label:b,font:S,textOffset:A,options:{rotation:m,color:O,strokeColor:N,strokeWidth:H,textAlign:X,textBaseline:M,translation:[_,C],backdrop:V}})}return g}_getXAxisLabelAlignment(){let{position:i,ticks:e}=this.options;if(-zo(this.labelRotation))return i==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(i){let{position:e,ticks:{crossAlign:r,mirror:n,padding:a}}=this.options,s=this._getLabelSizes(),o=i+a,d=s.widest.width,l,c;return e==="left"?n?(c=this.right+a,r==="near"?l="left":r==="center"?(l="center",c+=d/2):(l="right",c+=d)):(c=this.right-o,r==="near"?l="right":r==="center"?(l="center",c-=d/2):(l="left",c=this.left)):e==="right"?n?(c=this.left+a,r==="near"?l="right":r==="center"?(l="center",c-=d/2):(l="left",c-=d)):(c=this.left+o,r==="near"?l="left":r==="center"?(l="center",c+=d/2):(l="right",c=this.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;let i=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:i.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:i.width}}drawBackground(){let{ctx:i,options:{backgroundColor:e},left:r,top:n,width:a,height:s}=this;e&&(i.save(),i.fillStyle=e,i.fillRect(r,n,a,s),i.restore())}getLineWidthForValue(i){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let n=this.ticks.findIndex(a=>a.value===i);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(i){let e=this.options.grid,r=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i)),a,s,o=(d,l,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(d.x,d.y),r.lineTo(l.x,l.y),r.stroke(),r.restore())};if(e.display)for(a=0,s=n.length;a{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(i){let e=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",n=[],a,s;for(a=0,s=e.length;a{let r=e.split("."),n=r.pop(),a=[t].concat(r).join("."),s=i[e].split("."),o=s.pop(),d=s.join(".");Qn.route(a,n,d,o)})}function WRe(t){return"id"in t&&"defaults"in t}var JF=class{constructor(){this.controllers=new Qp(bu,"datasets",!0),this.elements=new Qp(yl,"elements"),this.plugins=new Qp(Object,"plugins"),this.scales=new Qp(Zh,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,e,r){[...e].forEach(n=>{let a=r||this._getRegistryForType(n);r||a.isForType(n)||a===this.plugins&&n.id?this._exec(i,a,n):cn(n,s=>{let o=r||this._getRegistryForType(s);this._exec(i,o,s)})})}_exec(i,e,r){let n=dT(i);Mn(r["before"+n],[],r),e[i](r),Mn(r["after"+n],[],r)}_getRegistryForType(i){for(let e=0;ea.filter(o=>!s.some(d=>o.plugin.id===d.plugin.id));this._notify(n(e,r),i,"stop"),this._notify(n(r,e),i,"start")}};function XRe(t){let i={},e=[],r=Object.keys(oc.plugins.items);for(let a=0;a1&&H$(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function j$(t,i,e){if(e[i+"AxisID"]===t)return{axis:i}}function qRe(t,i){if(i.data&&i.data.datasets){let e=i.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(e.length)return j$(t,"x",e[0])||j$(t,"y",e[0])}return{}}function ePe(t,i){let e=mu[t.type]||{scales:{}},r=i.scales||{},n=eO(t.type,i),a=Object.create(null);return Object.keys(r).forEach(s=>{let o=r[s];if(!ki(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);let d=tO(s,o,qRe(s,t),Qn.scales[o.type]),l=ZRe(d,n),c=e.scales||{};a[s]=zp(Object.create(null),[{axis:d},o,c[d],c[l]])}),t.data.datasets.forEach(s=>{let o=s.type||t.type,d=s.indexAxis||eO(o,i),c=(mu[o]||{}).scales||{};Object.keys(c).forEach(h=>{let u=KRe(h,d),f=s[u+"AxisID"]||u;a[f]=a[f]||Object.create(null),zp(a[f],[{axis:u},r[f],c[h]])})}),Object.keys(a).forEach(s=>{let o=a[s];zp(o,[Qn.scales[o.type],Qn.scale])}),a}function RQ(t){let i=t.options||(t.options={});i.plugins=mi(i.plugins,{}),i.scales=ePe(t,i)}function PQ(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function tPe(t){return t=t||{},t.data=PQ(t.data),RQ(t),t}var W$=new Map,kQ=new Set;function CT(t,i){let e=W$.get(t);return e||(e=i(),W$.set(t,e),kQ.add(e)),e}var xy=(t,i,e)=>{let r=rd(i,e);r!==void 0&&t.add(r)},iO=class{constructor(i){this._config=tPe(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=PQ(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){let i=this._config;this.clearCache(),RQ(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return CT(i,()=>[[`datasets.${i}`,""]])}datasetAnimationScopeKeys(i,e){return CT(`${i}.transition.${e}`,()=>[[`datasets.${i}.transitions.${e}`,`transitions.${e}`],[`datasets.${i}`,""]])}datasetElementScopeKeys(i,e){return CT(`${i}-${e}`,()=>[[`datasets.${i}.elements.${e}`,`datasets.${i}`,`elements.${e}`,""]])}pluginScopeKeys(i){let e=i.id,r=this.type;return CT(`${r}-plugin-${e}`,()=>[[`plugins.${e}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,e){let r=this._scopeCache,n=r.get(i);return(!n||e)&&(n=new Map,r.set(i,n)),n}getOptionScopes(i,e,r){let{options:n,type:a}=this,s=this._cachedScopes(i,r),o=s.get(e);if(o)return o;let d=new Set;e.forEach(c=>{i&&(d.add(i),c.forEach(h=>xy(d,i,h))),c.forEach(h=>xy(d,n,h)),c.forEach(h=>xy(d,mu[a]||{},h)),c.forEach(h=>xy(d,Qn,h)),c.forEach(h=>xy(d,mT,h))});let l=Array.from(d);return l.length===0&&l.push(Object.create(null)),kQ.has(e)&&s.set(e,l),l}chartOptionScopes(){let{options:i,type:e}=this;return[i,mu[e]||{},Qn.datasets[e]||{},{type:e},Qn,mT]}resolveNamedOptions(i,e,r,n=[""]){let a={$shared:!0},{resolver:s,subPrefixes:o}=X$(this._resolverCache,i,n),d=s;if(nPe(s,e)){a.$shared=!1,r=id(r)?r():r;let l=this.createResolver(i,r,o);d=Xh(s,r,l)}for(let l of e)a[l]=d[l];return a}createResolver(i,e,r=[""],n){let{resolver:a}=X$(this._resolverCache,i,r);return ki(e)?Xh(a,e,void 0,n):a}};function X$(t,i,e){let r=t.get(i);r||(r=new Map,t.set(i,r));let n=e.join(),a=r.get(n);return a||(a={resolver:vT(i,e),subPrefixes:e.filter(o=>!o.toLowerCase().includes("hover"))},r.set(n,a)),a}var iPe=t=>ki(t)&&Object.getOwnPropertyNames(t).some(i=>id(t[i]));function nPe(t,i){let{isScriptable:e,isIndexable:r}=DF(t);for(let n of i){let a=e(n),s=r(n),o=(s||a)&&t[n];if(a&&(id(o)||iPe(o))||s&&zn(o))return!0}return!1}var rPe="4.4.7",sPe=["top","bottom","left","right","chartArea"];function Y$(t,i){return t==="top"||t==="bottom"||sPe.indexOf(t)===-1&&i==="x"}function $$(t,i){return function(e,r){return e[t]===r[t]?e[i]-r[i]:e[t]-r[t]}}function Q$(t){let i=t.chart,e=i.options.animation;i.notifyPlugins("afterRender"),Mn(e&&e.onComplete,[t],i)}function aPe(t){let i=t.chart,e=i.options.animation;Mn(e&&e.onProgress,[t],i)}function FQ(t){return yT()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var AT={},K$=t=>{let i=FQ(t);return Object.values(AT).filter(e=>e.canvas===i).pop()};function oPe(t,i,e){let r=Object.keys(t);for(let n of r){let a=+n;if(a>=i){let s=t[n];delete t[n],(e>0||a>i)&&(t[a+e]=s)}}}function lPe(t,i,e,r){return!e||t.type==="mouseout"?null:r?i:t}function TT(t,i,e){return t.options.clip?t[e]:i[e]}function cPe(t,i){let{xScale:e,yScale:r}=t;return e&&r?{left:TT(e,i,"left"),right:TT(e,i,"right"),top:TT(r,i,"top"),bottom:TT(r,i,"bottom")}:i}var LT=(()=>{class t{static defaults=Qn;static instances=AT;static overrides=mu;static registry=oc;static version=rPe;static getChart=K$;static register(...e){oc.add(...e),Z$()}static unregister(...e){oc.remove(...e),Z$()}constructor(e,r){let n=this.config=new iO(r),a=FQ(e),s=K$(a);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");let o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||ARe(a)),this.platform.updateConfig(n);let d=this.platform.acquireContext(a,o.aspectRatio),l=d&&d.canvas,c=l&&l.height,h=l&&l.width;if(this.id=QY(),this.ctx=d,this.canvas=l,this.width=h,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new qF,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=a$(u=>this.update(u),o.resizeDelay||0),this._dataChanges=[],AT[this.id]=this,!d||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ad.listen(this,"complete",Q$),ad.listen(this,"progress",aPe),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:r},width:n,height:a,_aspectRatio:s}=this;return Gi(e)?r&&s?s:a?n/a:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return oc}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():RF(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return TF(this.canvas,this.ctx),this}stop(){return ad.stop(this),this}resize(e,r){ad.running(this)?this._resizeBeforeDraw={width:e,height:r}:this._resize(e,r)}_resize(e,r){let n=this.options,a=this.canvas,s=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(a,e,r,s),d=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,RF(this,d,!0)&&(this.notifyPlugins("resize",{size:o}),Mn(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let r=this.options.scales||{};cn(r,(n,a)=>{n.id=a})}buildOrUpdateScales(){let e=this.options,r=e.scales,n=this.scales,a=Object.keys(n).reduce((o,d)=>(o[d]=!1,o),{}),s=[];r&&(s=s.concat(Object.keys(r).map(o=>{let d=r[o],l=tO(o,d),c=l==="r",h=l==="x";return{options:d,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),cn(s,o=>{let d=o.options,l=d.id,c=tO(l,d),h=mi(d.type,o.dtype);(d.position===void 0||Y$(d.position,c)!==Y$(o.dposition))&&(d.position=o.dposition),a[l]=!0;let u=null;if(l in n&&n[l].type===h)u=n[l];else{let f=oc.getScale(h);u=new f({id:l,type:h,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(d,e)}),cn(a,(o,d)=>{o||delete n[d]}),cn(n,o=>{zs.configure(this,o,o.options),zs.addBox(this,o)})}_updateMetasets(){let e=this._metasets,r=this.data.datasets.length,n=e.length;if(e.sort((a,s)=>a.index-s.index),n>r){for(let a=r;ar.length&&delete this._stacks,e.forEach((n,a)=>{r.filter(s=>s===n._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){let e=[],r=this.data.datasets,n,a;for(this._removeUnreferencedMetasets(),n=0,a=r.length;n{this.getDatasetMeta(r).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let r=this.config;r.update();let n=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort($$("z","_idx"));let{_active:d,_lastEvent:l}=this;l?this._eventHandler(l,!0):d.length&&this._updateHoverStyles(d,d,!0),this.render()}_updateScales(){cn(this.scales,e=>{zs.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!uF(r,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,r=this._getUniformDataChanges()||[];for(let{method:n,start:a,count:s}of r){let o=n==="_removeElements"?-s:s;oPe(e,a,o)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let r=this.data.datasets.length,n=s=>new Set(e.filter(o=>o[0]===s).map((o,d)=>d+","+o.splice(1).join(","))),a=n(0);for(let s=1;ss.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;zs.update(this,this.width,this.height,e);let r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],cn(this.boxes,a=>{n&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,s)=>{a._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let r=0,n=this.data.datasets.length;r=0;--r)this._drawDataset(e[r]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let r=this.ctx,n=e._clip,a=!n.disabled,s=cPe(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(a&&fy(r,{left:n.left===!1?0:s.left-n.left,right:n.right===!1?this.width:s.right+n.right,top:n.top===!1?0:s.top-n.top,bottom:n.bottom===!1?this.height:s.bottom+n.bottom}),e.controller.draw(),a&&my(r),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return nc(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,r,n,a){let s=dRe.modes[r];return typeof s=="function"?s(this,e,n,a):[]}getDatasetMeta(e){let r=this.data.datasets[e],n=this._metasets,a=n.filter(s=>s&&s._dataset===r).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r&&r.order||0,index:e,_dataset:r,_parsed:[],_sorted:!1},n.push(a)),a}getContext(){return this.$context||(this.$context=sd(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let r=this.data.datasets[e];if(!r)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!r.hidden}setDatasetVisibility(e,r){let n=this.getDatasetMeta(e);n.hidden=!r}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,r,n){let a=n?"show":"hide",s=this.getDatasetMeta(e),o=s.controller._resolveAnimations(void 0,a);Gp(r)?(s.data[r].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(s,{visible:n}),this.update(d=>d.datasetIndex===e?a:void 0))}hide(e,r){this._updateVisibility(e,r,!1)}show(e,r){this._updateVisibility(e,r,!0)}_destroyDatasetMeta(e){let r=this._metasets[e];r&&r.controller&&r.controller._destroy(),delete this._metasets[e]}_stop(){let e,r;for(this.stop(),ad.remove(this),e=0,r=this.data.datasets.length;e{r.addEventListener(this,s,o),e[s]=o},a=(s,o,d)=>{s.offsetX=o,s.offsetY=d,this._eventHandler(s)};cn(this.options.events,s=>n(s,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,r=this.platform,n=(l,c)=>{r.addEventListener(this,l,c),e[l]=c},a=(l,c)=>{e[l]&&(r.removeEventListener(this,l,c),delete e[l])},s=(l,c)=>{this.canvas&&this.resize(l,c)},o,d=()=>{a("attach",d),this.attached=!0,this.resize(),n("resize",s),n("detach",o)};o=()=>{this.attached=!1,a("resize",s),this._stop(),this._resize(0,0),n("attach",d)},r.isAttached(this.canvas)?d():o()}unbindEvents(){cn(this._listeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._listeners={},cn(this._responsiveListeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,r,n){let a=n?"set":"remove",s,o,d,l;for(r==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+a+"DatasetHoverStyle"]()),d=0,l=e.length;d{let d=this.getDatasetMeta(s);if(!d)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:d.data[o],index:o}});!uy(n,r)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}notifyPlugins(e,r,n){return this._plugins.notify(this,e,r,n)}isPluginEnabled(e){return this._plugins._cache.filter(r=>r.plugin.id===e).length===1}_updateHoverStyles(e,r,n){let a=this.options.hover,s=(l,c)=>l.filter(h=>!c.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),o=s(r,e),d=n?e:s(e,r);o.length&&this.updateHoverStyle(o,a.mode,!1),d.length&&a.mode&&this.updateHoverStyle(d,a.mode,!0)}_eventHandler(e,r){let n={event:e,replay:r,cancelable:!0,inChartArea:this.isPointInArea(e)},a=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,a)===!1)return;let s=this._handleEvent(e,r,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,a),(s||n.changed)&&this.render(),this}_handleEvent(e,r,n){let{_active:a=[],options:s}=this,o=r,d=this._getActiveElements(e,a,n,o),l=JY(e),c=lPe(e,this._lastEvent,n,l);n&&(this._lastEvent=null,Mn(s.onHover,[e,d,this],this),l&&Mn(s.onClick,[e,d,this],this));let h=!uy(d,a);return(h||r)&&(this._active=d,this._updateHoverStyles(d,a,r)),this._lastEvent=c,h}_getActiveElements(e,r,n,a){if(e.type==="mouseout")return[];if(!n)return r;let s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,a)}}return t})();function Z$(){return cn(LT.instances,t=>t._plugins.invalidate())}function dPe(t,i,e){let{startAngle:r,pixelMargin:n,x:a,y:s,outerRadius:o,innerRadius:d}=i,l=n/o;t.beginPath(),t.arc(a,s,o,r-l,e+l),d>n?(l=n/d,t.arc(a,s,d,e+l,r-l,!0)):t.arc(a,s,n,e+pr,r-pr),t.closePath(),t.clip()}function uPe(t){return gT(t,["outerStart","outerEnd","innerStart","innerEnd"])}function hPe(t,i,e,r){let n=uPe(t.options.borderRadius),a=(e-i)/2,s=Math.min(a,r*i/2),o=d=>{let l=(e-Math.min(a,d))*r/2;return Qr(d,0,Math.min(a,l))};return{outerStart:o(n.outerStart),outerEnd:o(n.outerEnd),innerStart:Qr(n.innerStart,0,s),innerEnd:Qr(n.innerEnd,0,s)}}function $p(t,i,e,r){return{x:e+t*Math.cos(i),y:r+t*Math.sin(i)}}function kT(t,i,e,r,n,a){let{x:s,y:o,startAngle:d,pixelMargin:l,innerRadius:c}=i,h=Math.max(i.outerRadius+r+e-l,0),u=c>0?c+r+e+l:0,f=0,p=n-d;if(r){let L=c>0?c-r:0,I=h>0?h-r:0,O=(L+I)/2,N=O!==0?p*O/(O+r):p;f=(p-N)/2}let m=Math.max(.001,p*h-e/Gn)/h,g=(p-m)/2,v=d+g+f,y=n-g-f,{outerStart:x,outerEnd:b,innerStart:_,innerEnd:C}=hPe(i,u,h,y-v),w=h-x,T=h-b,S=v+x/w,E=y-b/T,D=u+_,A=u+C,M=v+_/D,R=y-C/A;if(t.beginPath(),a){let L=(S+E)/2;if(t.arc(s,o,h,S,L),t.arc(s,o,h,L,E),b>0){let H=$p(T,E,s,o);t.arc(H.x,H.y,b,E,y+pr)}let I=$p(A,y,s,o);if(t.lineTo(I.x,I.y),C>0){let H=$p(A,R,s,o);t.arc(H.x,H.y,C,y+pr,R+Math.PI)}let O=(y-C/u+(v+_/u))/2;if(t.arc(s,o,u,y-C/u,O,!0),t.arc(s,o,u,O,v+_/u,!0),_>0){let H=$p(D,M,s,o);t.arc(H.x,H.y,_,M+Math.PI,v-pr)}let N=$p(w,v,s,o);if(t.lineTo(N.x,N.y),x>0){let H=$p(w,S,s,o);t.arc(H.x,H.y,x,v-pr,S)}}else{t.moveTo(s,o);let L=Math.cos(S)*h+s,I=Math.sin(S)*h+o;t.lineTo(L,I);let O=Math.cos(E)*h+s,N=Math.sin(E)*h+o;t.lineTo(O,N)}t.closePath()}function fPe(t,i,e,r,n){let{fullCircles:a,startAngle:s,circumference:o}=i,d=i.endAngle;if(a){kT(t,i,e,r,d,n);for(let l=0;li!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,i&&Object.assign(this,i)}inRange(i,e,r){let n=this.getProps(["x","y"],r),{angle:a,distance:s}=pF(n,{x:i,y:e}),{startAngle:o,endAngle:d,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),u=(this.options.spacing+this.options.borderWidth)/2,f=mi(h,d-o),p=jp(a,o,d)&&o!==d,m=f>=Hn||p,g=sc(s,l+u,c+u);return m&&g}getCenterPoint(i){let{x:e,y:r,startAngle:n,endAngle:a,innerRadius:s,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:d,spacing:l}=this.options,c=(n+a)/2,h=(s+o+l+d)/2;return{x:e+Math.cos(c)*h,y:r+Math.sin(c)*h}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){let{options:e,circumference:r}=this,n=(e.offset||0)/4,a=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=r>Hn?Math.floor(r/Hn):0,r===0||this.innerRadius<0||this.outerRadius<0)return;i.save();let o=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(o)*n,Math.sin(o)*n);let d=1-Math.sin(Math.min(Gn,r||0)),l=n*d;i.fillStyle=e.backgroundColor,i.strokeStyle=e.borderColor,fPe(i,this,l,a,s),mPe(i,this,l,a,s),i.restore()}};function OQ(t,i,e=i){t.lineCap=mi(e.borderCapStyle,i.borderCapStyle),t.setLineDash(mi(e.borderDash,i.borderDash)),t.lineDashOffset=mi(e.borderDashOffset,i.borderDashOffset),t.lineJoin=mi(e.borderJoinStyle,i.borderJoinStyle),t.lineWidth=mi(e.borderWidth,i.borderWidth),t.strokeStyle=mi(e.borderColor,i.borderColor)}function pPe(t,i,e){t.lineTo(e.x,e.y)}function gPe(t){return t.stepped?d$:t.tension||t.cubicInterpolationMode==="monotone"?u$:pPe}function LQ(t,i,e={}){let r=t.length,{start:n=0,end:a=r-1}=e,{start:s,end:o}=i,d=Math.max(n,s),l=Math.min(a,o),c=no&&a>o;return{count:r,start:d,loop:i.loop,ilen:l(s+(l?o-b:b))%a,x=()=>{m!==g&&(t.lineTo(c,g),t.lineTo(c,m),t.lineTo(c,v))};for(d&&(f=n[y(0)],t.moveTo(f.x,f.y)),u=0;u<=o;++u){if(f=n[y(u)],f.skip)continue;let b=f.x,_=f.y,C=b|0;C===p?(_g&&(g=_),c=(h*c+b)/++h):(x(),t.lineTo(b,_),p=C,h=0,m=g=_),v=_}x()}function rO(t){let i=t.options,e=i.borderDash&&i.borderDash.length;return!t._decimated&&!t._loop&&!i.tension&&i.cubicInterpolationMode!=="monotone"&&!i.stepped&&!e?yPe:vPe}function xPe(t){return t.stepped?b$:t.tension||t.cubicInterpolationMode==="monotone"?_$:fu}function bPe(t,i,e,r){let n=i._path;n||(n=i._path=new Path2D,i.path(n,e,r)&&n.closePath()),OQ(t,i.options),t.stroke(n)}function _Pe(t,i,e,r){let{segments:n,options:a}=i,s=rO(i);for(let o of n)OQ(t,a,o.style),t.beginPath(),s(t,i,o,{start:e,end:e+r-1})&&t.closePath(),t.stroke()}var wPe=typeof Path2D=="function";function CPe(t,i,e,r){wPe&&!i.options.segment?bPe(t,i,e,r):_Pe(t,i,e,r)}var NT=(()=>{class t extends yl{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,r){let n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){let a=n.spanGaps?this._loop:this._fullLoop;v$(this._points,n,e,a,r),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=C$(this,this.options.segment))}first(){let e=this.segments,r=this.points;return e.length&&r[e[0].start]}last(){let e=this.segments,r=this.points,n=e.length;return n&&r[e[n-1].end]}interpolate(e,r){let n=this.options,a=e[r],s=this.points,o=LF(this,{property:r,start:a,end:a});if(!o.length)return;let d=[],l=xPe(n),c,h;for(c=0,h=o.length;c{class t extends yl{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,r,n){let a=this.options,{x:s,y:o}=this.getProps(["x","y"],n);return Math.pow(e-s,2)+Math.pow(r-o,2)t.replace("rgb(","rgba(").replace(")",", 0.5)"));function BQ(t){return aO[t%aO.length]}function VQ(t){return q$[t%q$.length]}function RPe(t,i){return t.borderColor=BQ(i),t.backgroundColor=VQ(i),++i}function PPe(t,i){return t.backgroundColor=t.data.map(()=>BQ(i++)),i}function kPe(t,i){return t.backgroundColor=t.data.map(()=>VQ(i++)),i}function FPe(t){let i=0;return(e,r)=>{let n=t.getDatasetMeta(r).controller;n instanceof mO?i=PPe(e,i):n instanceof EQ?i=kPe(e,i):n&&(i=RPe(e,i))}}function eQ(t){let i;for(i in t)if(t[i].borderColor||t[i].backgroundColor)return!0;return!1}function OPe(t){return t&&(t.borderColor||t.backgroundColor)}function LPe(){return Qn.borderColor!=="rgba(0,0,0,0.1)"||Qn.backgroundColor!=="rgba(0,0,0,0.1)"}var NPe={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,i,e){if(!e.enabled)return;let{data:{datasets:r},options:n}=t.config,{elements:a}=n,s=eQ(r)||OPe(n)||a&&eQ(a)||LPe();if(!e.forceOverride&&s)return;let o=FPe(t);r.forEach(o)}};function BPe(t,i,e,r,n){let a=n.samples||r;if(a>=e)return t.slice(i,i+e);let s=[],o=(e-2)/(a-2),d=0,l=i+e-1,c=i,h,u,f,p,m;for(s[d++]=t[c],h=0;hf&&(f=p,u=t[y],m=y);s[d++]=u,c=m}return s[d++]=t[l],s}function VPe(t,i,e,r){let n=0,a=0,s,o,d,l,c,h,u,f,p,m,g=[],v=i+e-1,y=t[i].x,b=t[v].x-y;for(s=i;sm&&(m=l,u=s),n=(a*n+o.x)/++a;else{let C=s-1;if(!Gi(h)&&!Gi(u)){let w=Math.min(h,u),T=Math.max(h,u);w!==f&&w!==C&&g.push(Mt(Me({},t[w]),{x:n})),T!==f&&T!==C&&g.push(Mt(Me({},t[T]),{x:n}))}s>0&&C!==f&&g.push(t[C]),g.push(o),c=_,a=0,p=m=l,h=u=f=s}}return g}function UQ(t){if(t._decimated){let i=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function tQ(t){t.data.datasets.forEach(i=>{UQ(i)})}function UPe(t,i){let e=i.length,r=0,n,{iScale:a}=t,{min:s,max:o,minDefined:d,maxDefined:l}=a.getUserBounds();return d&&(r=Qr(ic(i,a.axis,s).lo,0,e-1)),l?n=Qr(ic(i,a.axis,o).hi+1,r,e)-r:n=e-r,{start:r,count:n}}var zPe={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,i,e)=>{if(!e.enabled){tQ(t);return}let r=t.width;t.data.datasets.forEach((n,a)=>{let{_data:s,indexAxis:o}=n,d=t.getDatasetMeta(a),l=s||n.data;if(Yp([o,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;let c=t.scales[d.xAxisID];if(c.type!=="linear"&&c.type!=="time"||t.options.parsing)return;let{start:h,count:u}=UPe(d,l),f=e.threshold||4*r;if(u<=f){UQ(n);return}Gi(s)&&(n._data=l,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(e.algorithm){case"lttb":p=BPe(l,h,u,r,e);break;case"min-max":p=VPe(l,h,u,r);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=p})},destroy(t){tQ(t)}};function GPe(t,i,e){let r=t.segments,n=t.points,a=i.points,s=[];for(let o of r){let{start:d,end:l}=o;l=pO(d,l,n);let c=oO(e,n[d],n[l],o.loop);if(!i.segments){s.push({source:o,target:c,start:n[d],end:n[l]});continue}let h=LF(i,c);for(let u of h){let f=oO(e,a[u.start],a[u.end],u.loop),p=OF(o,n,f);for(let m of p)s.push({source:m,target:u,start:{[e]:iQ(c,f,"start",Math.max)},end:{[e]:iQ(c,f,"end",Math.min)}})}}return s}function oO(t,i,e,r){if(r)return;let n=i[t],a=e[t];return t==="angle"&&(n=Ha(n),a=Ha(a)),{property:t,start:n,end:a}}function HPe(t,i){let{x:e=null,y:r=null}=t||{},n=i.points,a=[];return i.segments.forEach(({start:s,end:o})=>{o=pO(s,o,n);let d=n[s],l=n[o];r!==null?(a.push({x:d.x,y:r}),a.push({x:l.x,y:r})):e!==null&&(a.push({x:e,y:d.y}),a.push({x:e,y:l.y}))}),a}function pO(t,i,e){for(;i>t;i--){let r=e[i];if(!isNaN(r.x)&&!isNaN(r.y))break}return i}function iQ(t,i,e,r){return t&&i?r(t[e],i[e]):t?t[e]:i?i[e]:0}function zQ(t,i){let e=[],r=!1;return zn(t)?(r=!0,e=t):e=HPe(t,i),e.length?new NT({points:e,options:{tension:0},_loop:r,_fullLoop:r}):null}function nQ(t){return t&&t.fill!==!1}function jPe(t,i,e){let n=t[i].fill,a=[i],s;if(!e)return n;for(;n!==!1&&a.indexOf(n)===-1;){if(!sr(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;a.push(n),n=s.fill}return!1}function WPe(t,i,e){let r=QPe(t);if(ki(r))return isNaN(r.value)?!1:r;let n=parseFloat(r);return sr(n)&&Math.floor(n)===n?XPe(r[0],i,n,e):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function XPe(t,i,e,r){return(t==="-"||t==="+")&&(e=i+e),e===i||e<0||e>=r?!1:e}function YPe(t,i){let e=null;return t==="start"?e=i.bottom:t==="end"?e=i.top:ki(t)?e=i.getPixelForValue(t.value):i.getBasePixel&&(e=i.getBasePixel()),e}function $Pe(t,i,e){let r;return t==="start"?r=e:t==="end"?r=i.options.reverse?i.min:i.max:ki(t)?r=t.value:r=i.getBaseValue(),r}function QPe(t){let i=t.options,e=i.fill,r=mi(e&&e.target,e);return r===void 0&&(r=!!i.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function KPe(t){let{scale:i,index:e,line:r}=t,n=[],a=r.segments,s=r.points,o=ZPe(i,e);o.push(zQ({x:null,y:i.bottom},r));for(let d=0;d=0;--s){let o=n[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),r&&o.fill&&XF(t.ctx,o,a))}},beforeDatasetsDraw(t,i,e){if(e.drawTime!=="beforeDatasetsDraw")return;let r=t.getSortedVisibleDatasetMetas();for(let n=r.length-1;n>=0;--n){let a=r[n].$filler;nQ(a)&&XF(t.ctx,a,t.chartArea)}},beforeDatasetDraw(t,i,e){let r=i.meta.$filler;!nQ(r)||e.drawTime!=="beforeDatasetDraw"||XF(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},oQ=(t,i)=>{let{boxHeight:e=i,boxWidth:r=i}=t;return t.usePointStyle&&(e=Math.min(e,i),r=t.pointStyleWidth||Math.min(r,i)),{boxWidth:r,boxHeight:e,itemHeight:Math.max(i,e)}},lke=(t,i)=>t!==null&&i!==null&&t.datasetIndex===i.datasetIndex&&t.index===i.index,OT=class extends yl{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,e,r){this.maxWidth=i,this.maxHeight=e,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let i=this.options.labels||{},e=Mn(i.generateLabels,[this.chart],this)||[];i.filter&&(e=e.filter(r=>i.filter(r,this.chart.data))),i.sort&&(e=e.sort((r,n)=>i.sort(r,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:i,ctx:e}=this;if(!i.display){this.width=this.height=0;return}let r=i.labels,n=Rr(r.font),a=n.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:d}=oQ(r,a),l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(s,a,o,d)+10):(c=this.maxHeight,l=this._fitCols(s,n,o,d)+10),this.width=Math.min(l,i.maxWidth||this.maxWidth),this.height=Math.min(c,i.maxHeight||this.maxHeight)}_fitRows(i,e,r,n){let{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,d=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+o,h=i;a.textAlign="left",a.textBaseline="middle";let u=-1,f=-c;return this.legendItems.forEach((p,m)=>{let g=r+e/2+a.measureText(p.text).width;(m===0||l[l.length-1]+g+2*o>s)&&(h+=c,l[l.length-(m>0?0:1)]=0,f+=c,u++),d[m]={left:0,top:f,row:u,width:g,height:n},l[l.length-1]+=g+o}),h}_fitCols(i,e,r,n){let{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,d=this.legendHitBoxes=[],l=this.columnSizes=[],c=s-i,h=o,u=0,f=0,p=0,m=0;return this.legendItems.forEach((g,v)=>{let{itemWidth:y,itemHeight:x}=cke(r,e,a,g,n);v>0&&f+x+2*o>c&&(h+=u+o,l.push({width:u,height:f}),p+=u+o,m++,u=f=0),d[v]={left:p,top:f,col:m,width:y,height:x},u=Math.max(u,y),f+=x+o}),h+=u,l.push({width:u,height:f}),h}adjustHitBoxes(){if(!this.options.display)return;let i=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:r,labels:{padding:n},rtl:a}}=this,s=$h(a,this.left,this.width);if(this.isHorizontal()){let o=0,d=_s(r,this.left+n,this.right-this.lineWidths[o]);for(let l of e)o!==l.row&&(o=l.row,d=_s(r,this.left+n,this.right-this.lineWidths[o])),l.top+=this.top+i+n,l.left=s.leftForLtr(s.x(d),l.width),d+=l.width+n}else{let o=0,d=_s(r,this.top+i+n,this.bottom-this.columnSizes[o].height);for(let l of e)l.col!==o&&(o=l.col,d=_s(r,this.top+i+n,this.bottom-this.columnSizes[o].height)),l.top=d,l.left+=this.left+n,l.left=s.leftForLtr(s.x(l.left),l.width),d+=l.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let i=this.ctx;fy(i,this),this._draw(),my(i)}}_draw(){let{options:i,columnSizes:e,lineWidths:r,ctx:n}=this,{align:a,labels:s}=i,o=Qn.color,d=$h(i.rtl,this.left,this.width),l=Rr(s.font),{padding:c}=s,h=l.size,u=h/2,f;this.drawTitle(),n.textAlign=d.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;let{boxWidth:p,boxHeight:m,itemHeight:g}=oQ(s,h),v=function(C,w,T){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;n.save();let S=mi(T.lineWidth,1);if(n.fillStyle=mi(T.fillStyle,o),n.lineCap=mi(T.lineCap,"butt"),n.lineDashOffset=mi(T.lineDashOffset,0),n.lineJoin=mi(T.lineJoin,"miter"),n.lineWidth=S,n.strokeStyle=mi(T.strokeStyle,o),n.setLineDash(mi(T.lineDash,[])),s.usePointStyle){let E={radius:m*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:S},D=d.xPlus(C,p/2),A=w+u;SF(n,E,D,A,s.pointStyleWidth&&p)}else{let E=w+Math.max((h-m)/2,0),D=d.leftForLtr(C,p),A=vu(T.borderRadius);n.beginPath(),Object.values(A).some(M=>M!==0)?Xp(n,{x:D,y:E,w:p,h:m,radius:A}):n.rect(D,E,p,m),n.fill(),S!==0&&n.stroke()}n.restore()},y=function(C,w,T){gu(n,T.text,C,w+g/2,l,{strikethrough:T.hidden,textAlign:d.textAlign(T.textAlign)})},x=this.isHorizontal(),b=this._computeTitleHeight();x?f={x:_s(a,this.left+c,this.right-r[0]),y:this.top+c+b,line:0}:f={x:this.left+c,y:_s(a,this.top+b+c,this.bottom-e[0].height),line:0},kF(this.ctx,i.textDirection);let _=g+c;this.legendItems.forEach((C,w)=>{n.strokeStyle=C.fontColor,n.fillStyle=C.fontColor;let T=n.measureText(C.text).width,S=d.textAlign(C.textAlign||(C.textAlign=s.textAlign)),E=p+u+T,D=f.x,A=f.y;d.setWidth(this.width),x?w>0&&D+E+c>this.right&&(A=f.y+=_,f.line++,D=f.x=_s(a,this.left+c,this.right-r[f.line])):w>0&&A+_>this.bottom&&(D=f.x=D+e[f.line].width+c,f.line++,A=f.y=_s(a,this.top+b+c,this.bottom-e[f.line].height));let M=d.x(D);if(v(M,A,C),D=o$(S,D+p+u,x?D+E:this.right,i.rtl),y(d.x(D),A,C),x)f.x+=E+c;else if(typeof C.text!="string"){let R=l.lineHeight;f.y+=GQ(C,R)+c}else f.y+=_}),FF(this.ctx,i.textDirection)}drawTitle(){let i=this.options,e=i.title,r=Rr(e.font),n=ws(e.padding);if(!e.display)return;let a=$h(i.rtl,this.left,this.width),s=this.ctx,o=e.position,d=r.size/2,l=n.top+d,c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=_s(i.align,h,this.right-u);else{let p=this.columnSizes.reduce((m,g)=>Math.max(m,g.height),0);c=l+_s(i.align,this.top,this.bottom-p-i.labels.padding-this._computeTitleHeight())}let f=_s(o,h,h+u);s.textAlign=a.textAlign(fT(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=r.string,gu(s,e.text,f,c,r)}_computeTitleHeight(){let i=this.options.title,e=Rr(i.font),r=ws(i.padding);return i.display?e.lineHeight+r.height:0}_getLegendItemAt(i,e){let r,n,a;if(sc(i,this.left,this.right)&&sc(e,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;ra.length>s.length?a:s)),i+e.size/2+r.measureText(n).width}function uke(t,i,e){let r=t;return typeof i.text!="string"&&(r=GQ(i,e)),r}function GQ(t,i){let e=t.text?t.text.length:0;return i*e}function hke(t,i){return!!((t==="mousemove"||t==="mouseout")&&(i.onHover||i.onLeave)||i.onClick&&(t==="click"||t==="mouseup"))}var fke={id:"legend",_element:OT,start(t,i,e){let r=t.legend=new OT({ctx:t.ctx,options:e,chart:t});zs.configure(t,r,e),zs.addBox(t,r)},stop(t){zs.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,i,e){let r=t.legend;zs.configure(t,r,e),r.options=e},afterUpdate(t){let i=t.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(t,i){i.replay||t.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,i,e){let r=i.datasetIndex,n=e.chart;n.isDatasetVisible(r)?(n.hide(r),i.hidden=!0):(n.show(r),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let i=t.data.datasets,{labels:{usePointStyle:e,pointStyle:r,textAlign:n,color:a,useBorderRadius:s,borderRadius:o}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{let l=d.controller.getStyle(e?0:void 0),c=ws(l.borderWidth);return{text:i[d.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!d.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:s&&(o||l.borderRadius),datasetIndex:d.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},Cy=class extends yl{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,e){let r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=i,this.height=this.bottom=e;let n=zn(r.text)?r.text.length:1;this._padding=ws(r.padding);let a=n*Rr(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){let i=this.options.position;return i==="top"||i==="bottom"}_drawArgs(i){let{top:e,left:r,bottom:n,right:a,options:s}=this,o=s.align,d=0,l,c,h;return this.isHorizontal()?(c=_s(o,r,a),h=e+i,l=a-r):(s.position==="left"?(c=r+i,h=_s(o,n,e),d=Gn*-.5):(c=a-i,h=_s(o,e,n),d=Gn*.5),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:d}}draw(){let i=this.ctx,e=this.options;if(!e.display)return;let r=Rr(e.font),a=r.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:d,rotation:l}=this._drawArgs(a);gu(i,e.text,0,0,r,{color:e.color,maxWidth:d,rotation:l,textAlign:fT(e.align),textBaseline:"middle",translation:[s,o]})}};function mke(t,i){let e=new Cy({ctx:t.ctx,options:i,chart:t});zs.configure(t,e,i),zs.addBox(t,e),t.titleBlock=e}var pke={id:"title",_element:Cy,start(t,i,e){mke(t,e)},stop(t){let i=t.titleBlock;zs.removeBox(t,i),delete t.titleBlock},beforeUpdate(t,i,e){let r=t.titleBlock;zs.configure(t,r,e),r.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},ST=new WeakMap,gke={id:"subtitle",start(t,i,e){let r=new Cy({ctx:t.ctx,options:e,chart:t});zs.configure(t,r,e),zs.addBox(t,r),ST.set(t,r)},stop(t){zs.removeBox(t,ST.get(t)),ST.delete(t)},beforeUpdate(t,i,e){let r=ST.get(t);zs.configure(t,r,e),r.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},_y={average(t){if(!t.length)return!1;let i,e,r=new Set,n=0,a=0;for(i=0,e=t.length;io+d)/r.size,y:n/a}},nearest(t,i){if(!t.length)return!1;let e=i.x,r=i.y,n=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=t.length;a-1?t.split(` +`):t}function vke(t,i){let{element:e,datasetIndex:r,index:n}=i,a=t.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(n);return{chart:t,label:s,parsed:a.getParsed(n),raw:t.data.datasets[r].data[n],formattedValue:o,dataset:a.getDataset(),dataIndex:n,datasetIndex:r,element:e}}function lQ(t,i){let e=t.chart.ctx,{body:r,footer:n,title:a}=t,{boxWidth:s,boxHeight:o}=i,d=Rr(i.bodyFont),l=Rr(i.titleFont),c=Rr(i.footerFont),h=a.length,u=n.length,f=r.length,p=ws(i.padding),m=p.height,g=0,v=r.reduce((b,_)=>b+_.before.length+_.lines.length+_.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,h&&(m+=h*l.lineHeight+(h-1)*i.titleSpacing+i.titleMarginBottom),v){let b=i.displayColors?Math.max(o,d.lineHeight):d.lineHeight;m+=f*b+(v-f)*d.lineHeight+(v-1)*i.bodySpacing}u&&(m+=i.footerMarginTop+u*c.lineHeight+(u-1)*i.footerSpacing);let y=0,x=function(b){g=Math.max(g,e.measureText(b).width+y)};return e.save(),e.font=l.string,cn(t.title,x),e.font=d.string,cn(t.beforeBody.concat(t.afterBody),x),y=i.displayColors?s+2+i.boxPadding:0,cn(r,b=>{cn(b.before,x),cn(b.lines,x),cn(b.after,x)}),y=0,e.font=c.string,cn(t.footer,x),e.restore(),g+=p.width,{width:g,height:m}}function yke(t,i){let{y:e,height:r}=i;return et.height-r/2?"bottom":"center"}function xke(t,i,e,r){let{x:n,width:a}=r,s=e.caretSize+e.caretPadding;if(t==="left"&&n+a+s>i.width||t==="right"&&n-a-s<0)return!0}function bke(t,i,e,r){let{x:n,width:a}=e,{width:s,chartArea:{left:o,right:d}}=t,l="center";return r==="center"?l=n<=(o+d)/2?"left":"right":n<=a/2?l="left":n>=s-a/2&&(l="right"),xke(l,t,i,e)&&(l="center"),l}function cQ(t,i,e){let r=e.yAlign||i.yAlign||yke(t,e);return{xAlign:e.xAlign||i.xAlign||bke(t,i,e,r),yAlign:r}}function _ke(t,i){let{x:e,width:r}=t;return i==="right"?e-=r:i==="center"&&(e-=r/2),e}function wke(t,i,e){let{y:r,height:n}=t;return i==="top"?r+=e:i==="bottom"?r-=n+e:r-=n/2,r}function dQ(t,i,e,r){let{caretSize:n,caretPadding:a,cornerRadius:s}=t,{xAlign:o,yAlign:d}=e,l=n+a,{topLeft:c,topRight:h,bottomLeft:u,bottomRight:f}=vu(s),p=_ke(i,o),m=wke(i,d,l);return d==="center"?o==="left"?p+=l:o==="right"&&(p-=l):o==="left"?p-=Math.max(c,u)+n:o==="right"&&(p+=Math.max(h,f)+n),{x:Qr(p,0,r.width-i.width),y:Qr(m,0,r.height-i.height)}}function ET(t,i,e){let r=ws(e.padding);return i==="center"?t.x+t.width/2:i==="right"?t.x+t.width-r.right:t.x+r.left}function uQ(t){return ac([],od(t))}function Cke(t,i,e){return sd(t,{tooltip:i,tooltipItems:e,type:"tooltip"})}function hQ(t,i){let e=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return e?t.override(e):t}var HQ={beforeTitle:rc,title(t){if(t.length>0){let i=t[0],e=i.chart.data.labels,r=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return i.dataset.label||"";if(i.label)return i.label;if(r>0&&i.dataIndex"u"?HQ[i].call(e,r):n}var fQ=(()=>{class t extends yl{static positioners=_y;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let r=this.chart,n=this.options.setContext(this.getContext()),a=n.enabled&&r.options.animation&&n.animations,s=new IT(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Cke(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,r){let{callbacks:n}=r,a=Wa(n,"beforeTitle",this,e),s=Wa(n,"title",this,e),o=Wa(n,"afterTitle",this,e),d=[];return d=ac(d,od(a)),d=ac(d,od(s)),d=ac(d,od(o)),d}getBeforeBody(e,r){return uQ(Wa(r.callbacks,"beforeBody",this,e))}getBody(e,r){let{callbacks:n}=r,a=[];return cn(e,s=>{let o={before:[],lines:[],after:[]},d=hQ(n,s);ac(o.before,od(Wa(d,"beforeLabel",this,s))),ac(o.lines,Wa(d,"label",this,s)),ac(o.after,od(Wa(d,"afterLabel",this,s))),a.push(o)}),a}getAfterBody(e,r){return uQ(Wa(r.callbacks,"afterBody",this,e))}getFooter(e,r){let{callbacks:n}=r,a=Wa(n,"beforeFooter",this,e),s=Wa(n,"footer",this,e),o=Wa(n,"afterFooter",this,e),d=[];return d=ac(d,od(a)),d=ac(d,od(s)),d=ac(d,od(o)),d}_createItems(e){let r=this._active,n=this.chart.data,a=[],s=[],o=[],d=[],l,c;for(l=0,c=r.length;le.filter(h,u,f,n))),e.itemSort&&(d=d.sort((h,u)=>e.itemSort(h,u,n))),cn(d,h=>{let u=hQ(e.callbacks,h);a.push(Wa(u,"labelColor",this,h)),s.push(Wa(u,"labelPointStyle",this,h)),o.push(Wa(u,"labelTextColor",this,h))}),this.labelColors=a,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=d,d}update(e,r){let n=this.options.setContext(this.getContext()),a=this._active,s,o=[];if(!a.length)this.opacity!==0&&(s={opacity:0});else{let d=_y[n.position].call(this,a,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);let l=this._size=lQ(this,n),c=Object.assign({},d,l),h=cQ(this.chart,n,c),u=dQ(n,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,s={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:d.x,caretY:d.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(e,r,n,a){let s=this.getCaretPosition(e,n,a);r.lineTo(s.x1,s.y1),r.lineTo(s.x2,s.y2),r.lineTo(s.x3,s.y3)}getCaretPosition(e,r,n){let{xAlign:a,yAlign:s}=this,{caretSize:o,cornerRadius:d}=n,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=vu(d),{x:f,y:p}=e,{width:m,height:g}=r,v,y,x,b,_,C;return s==="center"?(_=p+g/2,a==="left"?(v=f,y=v-o,b=_+o,C=_-o):(v=f+m,y=v+o,b=_-o,C=_+o),x=v):(a==="left"?y=f+Math.max(l,h)+o:a==="right"?y=f+m-Math.max(c,u)-o:y=this.caretX,s==="top"?(b=p,_=b-o,v=y-o,x=y+o):(b=p+g,_=b+o,v=y+o,x=y-o),C=b),{x1:v,x2:y,x3:x,y1:b,y2:_,y3:C}}drawTitle(e,r,n){let a=this.title,s=a.length,o,d,l;if(s){let c=$h(n.rtl,this.x,this.width);for(e.x=ET(this,n.titleAlign,n),r.textAlign=c.textAlign(n.titleAlign),r.textBaseline="middle",o=Rr(n.titleFont),d=n.titleSpacing,r.fillStyle=n.titleColor,r.font=o.string,l=0;lx!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Xp(e,{x:g,y:m,w:c,h:l,radius:y}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Xp(e,{x:v,y:m+1,w:c-2,h:l-2,radius:y}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(g,m,c,l),e.strokeRect(g,m,c,l),e.fillStyle=o.backgroundColor,e.fillRect(v,m+1,c-2,l-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,r,n){let{body:a}=this,{bodySpacing:s,bodyAlign:o,displayColors:d,boxHeight:l,boxWidth:c,boxPadding:h}=n,u=Rr(n.bodyFont),f=u.lineHeight,p=0,m=$h(n.rtl,this.x,this.width),g=function(S){r.fillText(S,m.x(e.x+p),e.y+f/2),e.y+=f+s},v=m.textAlign(o),y,x,b,_,C,w,T;for(r.textAlign=o,r.textBaseline="middle",r.font=u.string,e.x=ET(this,v,n),r.fillStyle=n.bodyColor,cn(this.beforeBody,g),p=d&&v!=="right"?o==="center"?c/2+h:c+2+h:0,_=0,w=a.length;_0&&r.stroke()}_updateAnimationTarget(e){let r=this.chart,n=this.$animations,a=n&&n.x,s=n&&n.y;if(a||s){let o=_y[e.position].call(this,this._active,this._eventPosition);if(!o)return;let d=this._size=lQ(this,e),l=Object.assign({},o,this._size),c=cQ(r,e,l),h=dQ(e,l,c,r);(a._to!==h.x||s._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=d.width,this.height=d.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){let r=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(r);let a={width:this.width,height:this.height},s={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let o=ws(r.padding),d=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&d&&(e.save(),e.globalAlpha=n,this.drawBackground(s,e,a,r),kF(e,r.textDirection),s.y+=o.top,this.drawTitle(s,e,r),this.drawBody(s,e,r),this.drawFooter(s,e,r),FF(e,r.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,r){let n=this._active,a=e.map(({datasetIndex:d,index:l})=>{let c=this.chart.getDatasetMeta(d);if(!c)throw new Error("Cannot find a dataset at index "+d);return{datasetIndex:d,element:c.data[l],index:l}}),s=!uy(n,a),o=this._positionChanged(a,r);(s||o)&&(this._active=a,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,r,n=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let a=this.options,s=this._active||[],o=this._getActiveElements(e,s,r,n),d=this._positionChanged(o,e),l=r||!uy(o,s)||d;return l&&(this._active=o,(a.enabled||a.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,r))),l}_getActiveElements(e,r,n,a){let s=this.options;if(e.type==="mouseout")return[];if(!a)return r.filter(d=>this.chart.data.datasets[d.datasetIndex]&&this.chart.getDatasetMeta(d.datasetIndex).controller.getParsed(d.index)!==void 0);let o=this.chart.getElementsAtEventForMode(e,s.mode,s,n);return s.reverse&&o.reverse(),o}_positionChanged(e,r){let{caretX:n,caretY:a,options:s}=this,o=_y[s.position].call(this,e,r);return o!==!1&&(n!==o.x||a!==o.y)}}return t})(),Tke={id:"tooltip",_element:fQ,positioners:_y,afterInit(t,i,e){e&&(t.tooltip=new fQ({chart:t,options:e}))},beforeUpdate(t,i,e){t.tooltip&&t.tooltip.initialize(e)},reset(t,i,e){t.tooltip&&t.tooltip.initialize(e)},afterDraw(t){let i=t.tooltip;if(i&&i._willRender()){let e={tooltip:i};if(t.notifyPlugins("beforeTooltipDraw",Mt(Me({},e),{cancelable:!0}))===!1)return;i.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",e)}},afterEvent(t,i){if(t.tooltip){let e=i.replay;t.tooltip.handleEvent(i.event,e,i.inChartArea)&&(i.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,i)=>i.bodyFont.size,boxWidth:(t,i)=>i.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:HQ},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Ske=Object.freeze({__proto__:null,Colors:NPe,Decimation:zPe,Filler:oke,Legend:fke,SubTitle:gke,Title:pke,Tooltip:Tke}),Eke=(t,i,e,r)=>(typeof i=="string"?(e=t.push(i)-1,r.unshift({index:e,label:i})):isNaN(i)&&(e=null),e);function Dke(t,i,e,r){let n=t.indexOf(i);if(n===-1)return Eke(t,i,e,r);let a=t.lastIndexOf(i);return n!==a?e:n}var Mke=(t,i)=>t===null?null:Qr(Math.round(t),0,i);function mQ(t){let i=this.getLabels();return t>=0&&t{class t extends Zh{static id="category";static defaults={ticks:{callback:mQ}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let r=this._addedLabels;if(r.length){let n=this.getLabels();for(let{index:a,label:s}of r)n[a]===s&&n.splice(a,1);this._addedLabels=[]}super.init(e)}parse(e,r){if(Gi(e))return null;let n=this.getLabels();return r=isFinite(r)&&n[r]===e?r:Dke(n,e,mi(r,e),this._addedLabels),Mke(r,n.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:r}=this.getUserBounds(),{min:n,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(n=0),r||(a=this.getLabels().length-1)),this.min=n,this.max=a}buildTicks(){let e=this.min,r=this.max,n=this.options.offset,a=[],s=this.getLabels();s=e===0&&r===s.length-1?s:s.slice(e,r+1),this._valueRange=Math.max(s.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=e;o<=r;o++)a.push({value:o});return a}getLabelForValue(e){return mQ.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}return t})();function Ike(t,i){let e=[],{bounds:n,step:a,min:s,max:o,precision:d,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,f=a||1,p=c-1,{min:m,max:g}=i,v=!Gi(s),y=!Gi(o),x=!Gi(l),b=(g-m)/(h+1),_=hF((g-m)/p/f)*f,C,w,T,S;if(_<1e-14&&!v&&!y)return[{value:m},{value:g}];S=Math.ceil(g/_)-Math.floor(m/_),S>p&&(_=hF(S*_/p/f)*f),Gi(d)||(C=Math.pow(10,d),_=Math.ceil(_*C)/C),n==="ticks"?(w=Math.floor(m/_)*_,T=Math.ceil(g/_)*_):(w=m,T=g),v&&y&&a&&e$((o-s)/a,_/1e3)?(S=Math.round(Math.min((o-s)/_,c)),_=(o-s)/S,w=s,T=o):x?(w=v?s:w,T=y?o:T,S=l-1,_=(T-w)/S):(S=(T-w)/_,Hp(S,Math.round(S),_/1e3)?S=Math.round(S):S=Math.ceil(S));let E=Math.max(mF(_),mF(w));C=Math.pow(10,Gi(d)?E:d),w=Math.round(w*C)/C,T=Math.round(T*C)/C;let D=0;for(v&&(u&&w!==s?(e.push({value:s}),wo)break;e.push({value:A})}return y&&u&&T!==o?e.length&&Hp(e[e.length-1].value,o,pQ(o,b,t))?e[e.length-1].value=o:e.push({value:o}):(!y||T===o)&&e.push({value:T}),e}function pQ(t,i,{horizontal:e,minRotation:r}){let n=zo(r),a=(e?Math.sin(n):Math.cos(n))||.001,s=.75*i*(""+t).length;return Math.min(i/a,s)}var Kp=class extends Zh{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(i,e){return Gi(i)||(typeof i=="number"||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){let{beginAtZero:i}=this.options,{minDefined:e,maxDefined:r}=this.getUserBounds(),{min:n,max:a}=this,s=d=>n=e?n:d,o=d=>a=r?a:d;if(i){let d=vl(n),l=vl(a);d<0&&l<0?o(0):d>0&&l>0&&s(0)}if(n===a){let d=a===0?1:Math.abs(a*.05);o(a+d),i||s(n-d)}this.min=n,this.max=a}getTickLimit(){let i=this.options.ticks,{maxTicksLimit:e,stepSize:r}=i,n;return r?(n=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let i=this.options,e=i.ticks,r=this.getTickLimit();r=Math.max(2,r);let n={maxTicks:r,bounds:i.bounds,min:i.min,max:i.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},a=this._range||this,s=Ike(n,a);return i.bounds==="ticks"&&fF(s,this,"value"),i.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let i=this.ticks,e=this.min,r=this.max;if(super.configure(),this.options.offset&&i.length){let n=(r-e)/Math.max(i.length-1,1)/2;e-=n,r+=n}this._startValue=e,this._endValue=r,this._valueRange=r-e}getLabelForValue(i){return Wp(i,this.chart.options.locale,this.options.ticks.format)}},lO=class extends Kp{static id="linear";static defaults={ticks:{callback:hy.formatters.numeric}};determineDataLimits(){let{min:i,max:e}=this.getMinMax(!0);this.min=sr(i)?i:0,this.max=sr(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let i=this.isHorizontal(),e=i?this.width:this.height,r=zo(this.options.ticks.minRotation),n=(i?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/n))}getPixelForValue(i){return i===null?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange}},Ty=t=>Math.floor(nd(t)),Kh=(t,i)=>Math.pow(10,Ty(t)+i);function gQ(t){return t/Math.pow(10,Ty(t))===1}function vQ(t,i,e){let r=Math.pow(10,e),n=Math.floor(t/r);return Math.ceil(i/r)-n}function Rke(t,i){let e=i-t,r=Ty(e);for(;vQ(t,i,r)>10;)r++;for(;vQ(t,i,r)<10;)r--;return Math.min(r,Ty(t))}function Pke(t,{min:i,max:e}){i=ja(t.min,i);let r=[],n=Ty(i),a=Rke(i,e),s=a<0?Math.pow(10,Math.abs(a)):1,o=Math.pow(10,a),d=n>a?Math.pow(10,n):0,l=Math.round((i-d)*s)/s,c=Math.floor((i-d)/o/10)*o*10,h=Math.floor((l-c)/Math.pow(10,a)),u=ja(t.min,Math.round((d+c+h*Math.pow(10,a))*s)/s);for(;u=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,s=a>=0?1:s),u=Math.round((d+c+h*Math.pow(10,a))*s)/s;let f=ja(t.max,u);return r.push({value:f,major:gQ(f),significand:h}),r}var cO=class extends Zh{static id="logarithmic";static defaults={ticks:{callback:hy.formatters.logarithmic,major:{enabled:!0}}};constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(i,e){let r=Kp.prototype.parse.apply(this,[i,e]);if(r===0){this._zero=!0;return}return sr(r)&&r>0?r:null}determineDataLimits(){let{min:i,max:e}=this.getMinMax(!0);this.min=sr(i)?Math.max(0,i):null,this.max=sr(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!sr(this._userMin)&&(this.min=i===Kh(this.min,0)?Kh(this.min,-1):Kh(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:i,maxDefined:e}=this.getUserBounds(),r=this.min,n=this.max,a=o=>r=i?r:o,s=o=>n=e?n:o;r===n&&(r<=0?(a(1),s(10)):(a(Kh(r,-1)),s(Kh(n,1)))),r<=0&&a(Kh(n,-1)),n<=0&&s(Kh(r,1)),this.min=r,this.max=n}buildTicks(){let i=this.options,e={min:this._userMin,max:this._userMax},r=Pke(e,this);return i.bounds==="ticks"&&fF(r,this,"value"),i.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(i){return i===void 0?"0":Wp(i,this.chart.options.locale,this.options.ticks.format)}configure(){let i=this.min;super.configure(),this._startValue=nd(i),this._valueRange=nd(this.max)-nd(i)}getPixelForValue(i){return(i===void 0||i===0)&&(i=this.min),i===null||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:(nd(i)-this._startValue)/this._valueRange)}getValueForPixel(i){let e=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+e*this._valueRange)}};function dO(t){let i=t.ticks;if(i.display&&t.display){let e=ws(i.backdropPadding);return mi(i.font&&i.font.size,Qn.font.size)+e.height}return 0}function kke(t,i,e){return e=zn(e)?e:[e],{w:c$(t,i.string,e),h:e.length*i.lineHeight}}function yQ(t,i,e,r,n){return t===r||t===n?{start:i-e/2,end:i+e/2}:tn?{start:i-e,end:i}:{start:i,end:i+e}}function Fke(t){let i={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},e=Object.assign({},i),r=[],n=[],a=t._pointLabels.length,s=t.options.pointLabels,o=s.centerPointLabels?Gn/a:0;for(let d=0;di.r&&(o=(r.end-i.r)/a,t.r=Math.max(t.r,i.r+o)),n.starti.b&&(d=(n.end-i.b)/s,t.b=Math.max(t.b,i.b+d))}function Lke(t,i,e){let r=t.drawingArea,{extra:n,additionalAngle:a,padding:s,size:o}=e,d=t.getPointPosition(i,r+n+s,a),l=Math.round(uT(Ha(d.angle+pr))),c=zke(d.y,o.h,l),h=Vke(l),u=Uke(d.x,o.w,h);return{visible:!0,x:d.x,y:c,textAlign:h,left:u,top:c,right:u+o.w,bottom:c+o.h}}function Nke(t,i){if(!i)return!0;let{left:e,top:r,right:n,bottom:a}=t;return!(nc({x:e,y:r},i)||nc({x:e,y:a},i)||nc({x:n,y:r},i)||nc({x:n,y:a},i))}function Bke(t,i,e){let r=[],n=t._pointLabels.length,a=t.options,{centerPointLabels:s,display:o}=a.pointLabels,d={extra:dO(a)/2,additionalAngle:s?Gn/n:0},l;for(let c=0;c270||e<90)&&(t-=i),t}function Gke(t,i,e){let{left:r,top:n,right:a,bottom:s}=e,{backdropColor:o}=i;if(!Gi(o)){let d=vu(i.borderRadius),l=ws(i.backdropPadding);t.fillStyle=o;let c=r-l.left,h=n-l.top,u=a-r+l.width,f=s-n+l.height;Object.values(d).some(p=>p!==0)?(t.beginPath(),Xp(t,{x:c,y:h,w:u,h:f,radius:d}),t.fill()):t.fillRect(c,h,u,f)}}function Hke(t,i){let{ctx:e,options:{pointLabels:r}}=t;for(let n=i-1;n>=0;n--){let a=t._pointLabelItems[n];if(!a.visible)continue;let s=r.setContext(t.getPointLabelContext(n));Gke(e,s,a);let o=Rr(s.font),{x:d,y:l,textAlign:c}=a;gu(e,t._pointLabels[n],d,l+o.lineHeight/2,o,{color:s.color,textAlign:c,textBaseline:"middle"})}}function jQ(t,i,e,r){let{ctx:n}=t;if(e)n.arc(t.xCenter,t.yCenter,i,0,Hn);else{let a=t.getPointPosition(0,i);n.moveTo(a.x,a.y);for(let s=1;s{let n=Mn(this.options.pointLabels.callback,[e,r],this);return n||n===0?n:""}).filter((e,r)=>this.chart.getDataVisibility(r))}fit(){let i=this.options;i.display&&i.pointLabels.display?Fke(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(i,e,r,n){this.xCenter+=Math.floor((i-e)/2),this.yCenter+=Math.floor((r-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(i,e,r,n))}getIndexAngle(i){let e=Hn/(this._pointLabels.length||1),r=this.options.startAngle||0;return Ha(i*e+zo(r))}getDistanceFromCenterForValue(i){if(Gi(i))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-i)*e:(i-this.min)*e}getValueForDistanceFromCenter(i){if(Gi(i))return NaN;let e=i/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(i){let e=this._pointLabels||[];if(i>=0&&i{if(h!==0||h===0&&this.min<0){d=this.getDistanceFromCenterForValue(c.value);let u=this.getContext(h),f=n.setContext(u),p=a.setContext(u);jke(this,f,d,s,p)}}),r.display){for(i.save(),o=s-1;o>=0;o--){let c=r.setContext(this.getPointLabelContext(o)),{color:h,lineWidth:u}=c;!u||!h||(i.lineWidth=u,i.strokeStyle=h,i.setLineDash(c.borderDash),i.lineDashOffset=c.borderDashOffset,d=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(o,d),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(l.x,l.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){let i=this.ctx,e=this.options,r=e.ticks;if(!r.display)return;let n=this.getIndexAngle(0),a,s;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(n),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((o,d)=>{if(d===0&&this.min>=0&&!e.reverse)return;let l=r.setContext(this.getContext(d)),c=Rr(l.font);if(a=this.getDistanceFromCenterForValue(this.ticks[d].value),l.showLabelBackdrop){i.font=c.string,s=i.measureText(o.label).width,i.fillStyle=l.backdropColor;let h=ws(l.backdropPadding);i.fillRect(-s/2-h.left,-a-c.size/2-h.top,s+h.width,c.size+h.height)}gu(i,o.label,0,-a,c,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})}),i.restore()}drawTitle(){}},BT={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Xa=Object.keys(BT);function xQ(t,i){return t-i}function bQ(t,i){if(Gi(i))return null;let e=t._adapter,{parser:r,round:n,isoWeekday:a}=t._parseOpts,s=i;return typeof r=="function"&&(s=r(s)),sr(s)||(s=typeof r=="string"?e.parse(s,r):e.parse(s)),s===null?null:(n&&(s=n==="week"&&(Yh(a)||a===!0)?e.startOf(s,"isoWeek",a):e.startOf(s,n)),+s)}function _Q(t,i,e,r){let n=Xa.length;for(let a=Xa.indexOf(t);a=Xa.indexOf(e);a--){let s=Xa[a];if(BT[s].common&&t._adapter.diff(n,r,s)>=i-1)return s}return Xa[e?Xa.indexOf(e):0]}function Yke(t){for(let i=Xa.indexOf(t)+1,e=Xa.length;i=i?e[r]:e[n];t[a]=!0}}function $ke(t,i,e,r){let n=t._adapter,a=+n.startOf(i[0].value,r),s=i[i.length-1].value,o,d;for(o=a;o<=s;o=+n.add(o,1,r))d=e[o],d>=0&&(i[d].major=!0);return i}function CQ(t,i,e){let r=[],n={},a=i.length,s,o;for(s=0;s{class t extends Zh{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,r={}){let n=e.time||(e.time={}),a=this._adapter=new sRe._date(e.adapters.date);a.init(r),zp(n.displayFormats,a.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=r.normalized}parse(e,r){return e===void 0?null:bQ(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,r=this._adapter,n=e.time.unit||"day",{min:a,max:s,minDefined:o,maxDefined:d}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(a=Math.min(a,c.min)),!d&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!o||!d)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),a=sr(a)&&!isNaN(a)?a:+r.startOf(Date.now(),n),s=sr(s)&&!isNaN(s)?s:+r.endOf(Date.now(),n)+1,this.min=Math.min(a,s-1),this.max=Math.max(a+1,s)}_getLabelBounds(){let e=this.getLabelTimestamps(),r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(r=e[0],n=e[e.length-1]),{min:r,max:n}}buildTicks(){let e=this.options,r=e.time,n=e.ticks,a=n.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);let s=this.min,o=this.max,d=n$(a,s,o);return this._unit=r.unit||(n.autoSkip?_Q(r.minUnit,this.min,this.max,this._getLabelCapacity(s)):Xke(this,d.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Yke(this._unit),this.initOffsets(a),e.reverse&&d.reverse(),CQ(this,d,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let r=0,n=0,a,s;this.options.offset&&e.length&&(a=this.getDecimalForValue(e[0]),e.length===1?r=1-a:r=(this.getDecimalForValue(e[1])-a)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?n=s:n=(s-this.getDecimalForValue(e[e.length-2]))/2);let o=e.length<3?.5:.25;r=Qr(r,0,o),n=Qr(n,0,o),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){let e=this._adapter,r=this.min,n=this.max,a=this.options,s=a.time,o=s.unit||_Q(s.minUnit,r,n,this._getLabelCapacity(r)),d=mi(a.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,c=Yh(l)||l===!0,h={},u=r,f,p;if(c&&(u=+e.startOf(u,"isoWeek",l)),u=+e.startOf(u,c?"day":o),e.diff(n,r,o)>1e5*d)throw new Error(r+" and "+n+" are too far apart with stepSize of "+d+" "+o);let m=a.ticks.source==="data"&&this.getDataTimestamps();for(f=u,p=0;f+g)}getLabelForValue(e){let r=this._adapter,n=this.options.time;return n.tooltipFormat?r.format(e,n.tooltipFormat):r.format(e,n.displayFormats.datetime)}format(e,r){let a=this.options.time.displayFormats,s=this._unit,o=r||a[s];return this._adapter.format(e,o)}_tickFormatFunction(e,r,n,a){let s=this.options,o=s.ticks.callback;if(o)return Mn(o,[e,r,n],this);let d=s.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&d[l],u=c&&d[c],f=n[r],p=c&&u&&f&&f.major;return this._adapter.format(e,a||(p?u:h))}generateTickLabels(e){let r,n,a;for(r=0,n=e.length;r0?d:1}getDataTimestamps(){let e=this._cache.data||[],r,n;if(e.length)return e;let a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(r=0,n=a.length;r=t[r].pos&&i<=t[n].pos&&({lo:r,hi:n}=ic(t,"pos",i)),{pos:a,time:o}=t[r],{pos:s,time:d}=t[n]):(i>=t[r].time&&i<=t[n].time&&({lo:r,hi:n}=ic(t,"time",i)),{time:a,pos:o}=t[r],{time:s,pos:d}=t[n]);let l=s-a;return l?o+(d-o)*(i-a)/l:o}var fO=class extends hO{static id="timeseries";static defaults=hO.defaults;constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let i=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(i);this._minPos=DT(e,this.min),this._tableRange=DT(e,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){let{min:e,max:r}=this,n=[],a=[],s,o,d,l,c;for(s=0,o=i.length;s=e&&l<=r&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:r,pos:1}];for(s=0,o=n.length;sn-a)}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;let e=this.getDataTimestamps(),r=this.getLabelTimestamps();return e.length&&r.length?i=this.normalize(e.concat(r)):i=e.length?e:r,i=this._cache.all=i,i}getDecimalForValue(i){return(DT(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){let e=this._offsets,r=this.getDecimalForPixel(i)/e.factor-e.end;return DT(this._table,r*this._tableRange+this._minPos,!0)}},Qke=Object.freeze({__proto__:null,CategoryScale:Ake,LinearScale:lO,LogarithmicScale:cO,RadialLinearScale:uO,TimeScale:hO,TimeSeriesScale:fO}),WQ=[rRe,IPe,Ske,Qke];var Kke=["radarCanvas"],XQ=t=>({left:t});function Zke(t,i){if(t&1&&(B(0,"div",11)(1,"div",12),Y(2),U()()),t&2){let e=i.$implicit,r=ne();ee("ngStyle",qr(2,XQ,r.getMarkerPosition(e.value)+"%")),j(2),ze(e.value)}}function Jke(t,i){if(t&1&&(B(0,"span",13),Y(1),U()),t&2){let e=i.$implicit;j(),ze(e.label)}}function qke(t,i){if(t&1&&(B(0,"td"),Y(1),qi(2,"titlecase"),U()),t&2){let e=ne(2).$implicit,r=ne(2).$implicit,n=ne();pt("rowspan",n.getKpaRowSpan(n.maturityResponse,r,e)),j(),Qe(" ",es(2,2,n.getKpaName(e))," ")}}function eFe(t,i){if(t&1&&(B(0,"td"),Y(1),qi(2,"number"),U()),t&2){let e=ne(2).$implicit,r=ne(2).$implicit,n=ne();pt("rowspan",n.getKpaRowSpan(n.maturityResponse,r,e)),j(),Qe(" ",Hr(2,2,n.calculateAverage(n.getQuestions(n.maturityResponse,r,e)),"1.2-2")," ")}}function tFe(t,i){if(t&1&&(Gt(0),B(1,"tr"),de(2,qke,3,4,"td",14)(3,eFe,3,5,"td",14),U(),Ht()),t&2){let e=i.index,r=ne(4);j(2),ee("ngIf",r.isFirstRowInKpa(e)),j(),ee("ngIf",r.isFirstRowInKpa(e))}}function iFe(t,i){if(t&1&&(Gt(0),de(1,tFe,4,2,"ng-container",9),qi(2,"keyvalue"),Ht()),t&2){let e=i.$implicit,r=ne(2).$implicit,n=ne();j(),ee("ngForOf",es(2,1,n.getQuestions(n.maturityResponse,r,e)))}}function nFe(t,i){if(t&1&&(Gt(0),de(1,iFe,3,3,"ng-container",9),Ht()),t&2){let e=ne().$implicit,r=ne();j(),ee("ngForOf",r.getKpas(r.maturityResponse,e))}}function rFe(t,i){if(t&1&&(Gt(0),de(1,nFe,2,1,"ng-container",14),Ht()),t&2){let e=i.$implicit,r=ne();j(),ee("ngIf",e==r.maturityResponse.selectedStakeholder)}}LT.register(...WQ);var gO=(()=>{class t{constructor(){this.allQuestions=[],this.resultsScale=[{value:1,label:"Basic"},{value:2,label:"Limited"},{value:3,label:"Advanced"},{value:4,label:"Integrated"},{value:5,label:"Optimizing"}]}ngAfterViewInit(){this.maturityResponse&&this.generateChart()}ngOnChanges(e){this.radarCanvas&&e.maturityResponse&&this.maturityResponse&&this.generateChart()}generateChart(){this.chart&&this.chart.destroy();let e={};Object.entries(this.maturityResponse).forEach(([s,o])=>{let[d,l,c]=s.split(".");d&&l&&c&&d===this.maturityResponse.selectedStakeholder&&(e[l]=e[l]||{sum:0,count:0},e[l].sum+=o||0,e[l].count+=1)});let r=Array.from(new Set(Object.keys(this.maturityResponse).filter(s=>s.startsWith(this.maturityResponse.selectedStakeholder)).map(s=>s.split(".")[1]))),n=r.map(s=>this.getKpaName(s)||s),a=[{label:this.getStakeholderName(),data:r.map(s=>e[s]?e[s].sum/e[s].count:0),backgroundColor:"rgba(54, 162, 235, 0.3)",borderColor:"rgba(54, 162, 235, 1)",pointBackgroundColor:"rgba(54, 162, 235, 1)",pointBorderColor:"#fff"}];this.chart=new LT(this.radarCanvas.nativeElement,{type:"radar",data:{labels:n,datasets:a},options:{aspectRatio:2,responsive:!0,plugins:{legend:{position:"top"},title:{display:!0,text:"Maturity Results by Stakeholder and KPA"}},scales:{r:{pointLabels:{padding:5},suggestedMin:0,suggestedMax:5,ticks:{stepSize:1}}}}})}getStakeholders(e){return Array.from(new Set(Object.keys(e).map(r=>r.split(".")[0])))}getKpas(e,r){return Array.from(new Set(Object.keys(e).filter(n=>n.startsWith(r)).map(n=>n.split(".")[1])))}getStakeholderName(){return this.allQuestions[0].stakeholderName}getKpaName(e){let r=this.allQuestions.find(n=>n.kpaId===e);return r?r.kpaName:null}getQuestions(e,r,n){return Object.keys(e).filter(a=>a.startsWith(`${r}.${n}`)).reduce((a,s)=>{let o=s.split(".").slice(2).join(".");return a[o]=e[s],a},{})}getStakeholderRowSpan(e,r){return this.getKpas(e,r).reduce((a,s)=>a+this.getKpaRowSpan(e,r,s),0)}getKpaRowSpan(e,r,n){return Object.keys(e).filter(a=>a.startsWith(`${r}.${n}`)).length}isFirstRowInStakeholder(e,r,n){let a=this.getKpas(this.maturityResponse,r).indexOf(n);return e===0&&a===0}isFirstRowInKpa(e){return e===0}calculateAverage(e){let r=Object.values(e).filter(a=>a!==null),n=r.reduce((a,s)=>a+s,0);return r.length>0?n/r.length:0}calculateOverallAverage(e){let r={},n=["selectedStakeholder","name","author","timestamp","selectedKpas"];for(let o in e)if(e.hasOwnProperty(o)&&e[o]!==null&&!n.includes(o)){let d=o.split(".")[1];r[d]||(r[d]=[]),r[d].push(e[o])}let a=Object.keys(r).filter(o=>r[o].length>0).map(o=>{let d=r[o];return d.reduce((l,c)=>l+c,0)/d.length});return a.length>0?a.reduce((o,d)=>o+d,0)/a.length:0}getScaleLabel(e){return e=Math.floor(e),this.resultsScale.find(r=>r.value===e)?.label||""}getMarkerPosition(e){return e<1&&(e=1),e>5&&(e=5),(e-1)/4*100}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=Te({type:t,selectors:[["app-maturity-results"]],viewQuery:function(r,n){if(r&1&&vt(Kke,5),r&2){let a;je(a=We())&&(n.radarCanvas=a.first)}},inputs:{maturityResponse:"maturityResponse",allQuestions:"allQuestions"},standalone:!1,features:[ei],decls:24,vars:15,consts:[["radarCanvas",""],[1,"centered-box"],[1,"score-scale-container"],[1,"score-scale"],[1,"score-marker",3,"ngStyle"],["class","score-tick",3,"ngStyle",4,"ngFor","ngForOf"],[1,"score-scale-labels"],["class","level-label",4,"ngFor","ngForOf"],[1,"bordered-table"],[4,"ngFor","ngForOf"],[1,"chart-container"],[1,"score-tick",3,"ngStyle"],[1,"score-tick-label"],[1,"level-label"],[4,"ngIf"]],template:function(r,n){r&1&&(B(0,"h3",1),Y(1),qi(2,"number"),U(),we(3,"br"),B(4,"div",2)(5,"div",3),we(6,"div",4),de(7,Zke,3,4,"div",5),U(),B(8,"div",6),de(9,Jke,2,1,"span",7),qi(10,"slice"),U()(),B(11,"table",8)(12,"thead")(13,"tr")(14,"th"),Y(15,"KPA"),U(),B(16,"th"),Y(17,"Maturity score"),U()()(),B(18,"tbody"),de(19,rFe,2,1,"ng-container",9),U()(),B(20,"div",10),we(21,"canvas",null,0),U(),we(23,"br")),r&2&&(j(),Gr(" ",Hr(2,6,n.calculateOverallAverage(n.maturityResponse),"1.2-2")," - ",n.getScaleLabel(n.calculateOverallAverage(n.maturityResponse)),` +`),j(5),ee("ngStyle",qr(13,XQ,"calc("+n.getMarkerPosition(n.calculateOverallAverage(n.maturityResponse))+"% - 3px)")),j(),ee("ngForOf",n.resultsScale),j(2),ee("ngForOf",eB(10,9,n.resultsScale,0,n.resultsScale.length-1)),j(10),ee("ngForOf",n.getStakeholders(n.maturityResponse)))},dependencies:[ci,oi,DB,IB,AB,kb,MB],styles:[".bordered-table[_ngcontent-%COMP%]{border:1px solid #000;border-collapse:collapse;width:100%}.bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:1px solid #000;padding:4px}.chart-container[_ngcontent-%COMP%]{display:flex;justify-content:center}.centered-box[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:2px solid #000;padding:10px;margin:20px auto;width:fit-content;box-shadow:0 0 10px #0000001a}.score-scale-container[_ngcontent-%COMP%]{position:relative;width:100%;margin:1rem 0}.score-scale[_ngcontent-%COMP%]{position:relative;height:20px;width:100%;border-radius:4px;background:linear-gradient(to right,#c03700,#d47f00,#dfc500 66%,#417505)}.score-marker[_ngcontent-%COMP%]{position:absolute;top:-5px;width:6px;height:30px;background-color:#2821eb;transition:left .3s ease;border-radius:2px}.score-tick[_ngcontent-%COMP%]{position:absolute;top:0;width:1px;height:8px;background-color:#000;transform:translateY(-8px)}.score-tick-label[_ngcontent-%COMP%]{position:absolute;top:-20px;left:-4px;font-weight:700;font-size:small}.score-scale-labels[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:.5rem;width:100%}.level-label[_ngcontent-%COMP%]{text-align:center;font-weight:700;font-size:small;flex:1}"]})}}return t})();function sFe(t,i){if(t&1&&(B(0,"mat-radio-button",17),Y(1),B(2,"p",18),Y(3),U()()),t&2){let e=i.$implicit;ee("value",e.id),j(),Qe(" ",e.name," "),j(2),Qe(" ",e.description,"")}}function aFe(t,i){t&1&&(B(0,"div",19),Y(1," Please select a stakeholder. "),U())}function oFe(t,i){if(t&1&&(B(0,"div")(1,"h2"),Y(2,"Stakeholder Description"),U(),B(3,"mat-form-field",20)(4,"mat-label"),Y(5),qi(6,"titlecase"),U(),we(7,"input",21),B(8,"mat-hint"),Y(9,"Stakeholder name to be included in the final assessment report. This information is not stored."),U()(),B(10,"mat-form-field",22)(11,"mat-label"),Y(12,"User name "),U(),we(13,"input",23),B(14,"mat-hint"),Y(15,"User name to be included in the final assessment report. This information is not stored."),U()()()),t&2){let e,r=ne(2);j(5),Qe("",es(6,3,(e=r.getStakeHolder(r.responseForm.controls.selectedStakeholder.value))==null?null:e.name)," name "),j(2),ee("formControl",r.nameControl),j(6),ee("formControl",r.authorControl)}}function lFe(t,i){if(t&1){let e=Ce();B(0,"div",6)(1,"div",7)(2,"h2"),Y(3,"Select Stakeholder"),U(),B(4,"div",2)(5,"div",8)(6,"mat-radio-group",9),de(7,sFe,4,3,"mat-radio-button",10),U(),de(8,aFe,2,0,"div",11),U(),B(9,"div",12),de(10,oFe,16,5,"div",13),U()(),B(11,"div",14)(12,"button",15),ce("click",function(){ue(e);let n=ne();return he(n.onStakeholderSelected())}),Y(13," Start "),U(),B(14,"input",16,1),ce("change",function(n){ue(e);let a=ne();return he(a.loadState(n))}),U(),B(16,"button",3),ce("click",function(){ue(e);let n=Pt(15);return he(n.click())}),Y(17,"Upload assessment"),U()()()()}if(t&2){let e=ne();j(),ee("formGroup",e.responseForm),j(5),ee("formControl",e.currentControl)("@questionAnimation",e.animationState),j(),ee("ngForOf",e.maturityQuestions.stakeHolders),j(),ee("ngIf",(e.responseForm.controls.selectedStakeholder==null?null:e.responseForm.controls.selectedStakeholder.invalid)&&(e.responseForm.controls.selectedStakeholder==null?null:e.responseForm.controls.selectedStakeholder.touched)),j(2),ee("ngIf",!e.responseForm.controls.selectedStakeholder.invalid),j(2),ee("disabled",e.responseForm.controls.selectedStakeholder.invalid)}}function cFe(t,i){if(t&1&&(B(0,"mat-checkbox",30),Y(1),we(2,"br"),B(3,"span",31),Y(4),U()()),t&2){let e=ne().$implicit,r=ne(3);ee("formControl",r.getKpaControl(e.id)),j(),Qe(" ",e.name,""),j(3),ze(e.description)}}function dFe(t,i){if(t&1&&(B(0,"div",28),de(1,cFe,5,3,"mat-checkbox",29),U()),t&2){let e=i.$implicit,r=ne(3);j(),ee("ngIf",r.getKpaControl(e.id))}}function uFe(t,i){if(t&1){let e=Ce();B(0,"button",15),ce("click",function(){ue(e);let n=ne(3);return he(n.filterKpasAndGoNext())}),Y(1," Next "),U()}if(t&2){let e=ne(3);ee("disabled",e.currentControl.invalid)}}function hFe(t,i){if(t&1){let e=Ce();B(0,"div",7)(1,"h2"),Y(2),U(),B(3,"section",25)(4,"h4"),Y(5,"Select Relevant Key Process Areas:"),U(),de(6,dFe,2,1,"div",26),U(),B(7,"div",14),de(8,uFe,2,1,"button",27),U(),B(9,"div",14)(10,"button",3),ce("click",function(){ue(e);let n=ne(2);return he(n.startOver())}),Y(11," Restart assessment "),U()()()}if(t&2){let e=ne(2);ee("formGroup",e.responseForm),j(2),Gr("Stakeholder: ",e.nameControl.value," (",e.allQuestions[e.currentQuestionIndex+1].stakeholderName,")"),j(4),ee("ngForOf",e.currentKpas),j(2),ee("ngIf",e.currentQuestionIndex0),j(),ee("ngIf",e.currentQuestionIndex{class t{constructor(e,r,n){this.http=e,this.fb=r,this.dialog=n,this.baseMaturityQuestions={},this.maturityQuestions={},this.allQuestions=[],this.currentQuestionIndex=-2,this.selectedStakeholder=null,this.animationState="enter",this.currentKpas=[],this.responseForm=this.fb.group({selectedStakeholder:new er(null,Ns.required)}),this.currentControl=this.responseForm.controls.selectedStakeholder}ngOnInit(){return Ve(this,null,function*(){this.baseMaturityQuestions=yield sn(this.http.get("assets/maturity/maturityLevels.json")),this.initializeForm()})}initializeForm(){return Ve(this,null,function*(){this.maturityQuestions=(0,$Q.default)(this.baseMaturityQuestions),this.nameControl=new er(null),this.authorControl=new er(null),this.timestampControl=new er(new Date().toISOString()),this.responseForm=this.fb.group({selectedStakeholder:new er(null,Ns.required),name:this.nameControl,author:this.authorControl,timestamp:this.timestampControl}),this.currentControl=this.responseForm.controls.selectedStakeholder,this.maturityQuestions.stakeHolders.forEach(e=>{e.kpas.forEach(r=>{r.questions.forEach(n=>{let a=[e.id,r.id,n.id].join(".");this.responseForm.addControl(a,new er(null,Ns.required))})})})})}onStakeholderSelected(){this.animationState="leave",setTimeout(()=>{let e=this.responseForm.get("selectedStakeholder")?.value;this.selectedStakeholder=this.getStakeHolder(e);let r=this.fb.group({});this.selectedStakeholder.kpas.forEach(n=>{r.addControl(n.id,this.fb.control(!0))}),this.responseForm.addControl("selectedKpas",r),this.currentKpas=this.selectedStakeholder.kpas,this.flattenQuestions(),this.currentQuestionIndex++,this.animationState="enter"},200)}getKpaControl(e){return this.responseForm.get("selectedKpas")?.get(e)}getStakeHolder(e){return this.maturityQuestions.stakeHolders.find(n=>n.id===e)}flattenQuestions(){this.allQuestions=[],this.selectedStakeholder&&this.selectedStakeholder.kpas.forEach(e=>{e.questions.forEach(r=>{let n=[this.selectedStakeholder.id,e.id,r.id].join(".");this.allQuestions.push({stakeholderName:this.selectedStakeholder.name,kpaName:e.name,kpaId:e.id,question:r,questionFullPath:n})})})}filterKpasAndGoNext(){this.animationState="leave";let e=this.responseForm.get("selectedKpas"),r=Object.keys(e.controls).filter(n=>e.get(n)?.value);this.selectedStakeholder.kpas.forEach(n=>{r.includes(n.id)||n.questions.forEach(a=>{let s=[this.selectedStakeholder.id,n.id,a.id].join(".");this.responseForm.contains(s)&&this.responseForm.removeControl(s)})}),this.allQuestions=this.allQuestions.filter(n=>r.includes(n.kpaId)),setTimeout(()=>{this.currentQuestionIndex++,this.allQuestions.length>0&&(this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath]),this.animationState="enter"},200)}goToNextQuestion(){this.animationState="leave",setTimeout(()=>{this.currentQuestionIndex++,this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath],this.animationState="enter"},200)}goToPreviousQuestion(){this.animationState="leave",setTimeout(()=>{this.currentQuestionIndex--,this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath],this.animationState="enter"},200)}startOver(){this.currentQuestionIndex=-2,this.responseForm.reset(),this.currentKpas=[],this.selectedStakeholder=null,this.allQuestions=[],this.initializeForm()}uploadSpecification(e){if(e.target.files.length!==1)console.error("No file selected");else{let r=new FileReader;r.onloadend=n=>{if(r.result){let a=JSON.parse(r.result?.toString());this.maturityQuestions=a}},r.readAsText(e.target.files[0])}}downloadSpecification(){let e=JSON.stringify(this.maturityQuestions,null,2),r="data:application/json;charset=utf-8,"+encodeURIComponent(e),n="maturity_specification.json",a=document.createElement("a");a.setAttribute("href",r),a.setAttribute("download",n),a.click()}submitStakeholderResponses(){this.timestampControl.setValue(new Date().toISOString()),this.animationState="leave",setTimeout(()=>{this.currentQuestionIndex++,this.animationState="enter"},200)}getStakeholderFormGroup(e){return this.responseForm.get(e)}getKpas(e){return this.getStakeHolder(e).kpas}getUnansweredCount(e){let r=0,n=this.responseForm.get(e);return n&&Object.keys(n.controls).forEach(a=>{let s=n.get(a);s&&Object.keys(s.controls).forEach(o=>{let d=s.get(o);d&&d.invalid&&r++})}),r}saveState(){let e={selectedStakeholder:this.responseForm.get("selectedStakeholder")?.value,selectedKpas:this.responseForm.get("selectedKpas")?.value,responses:this.responseForm.value,currentQuestionIndex:this.currentQuestionIndex,currentControl:this.currentControl?.value,animationState:this.animationState,name:this.nameControl.value,author:this.authorControl.value,timestamp:this.timestampControl.value,allQuestions:this.allQuestions},r=new Blob([JSON.stringify(e)],{type:"application/json"}),n=document.createElement("a");n.href=URL.createObjectURL(r),n.download="maturity-assessment-results.json",n.click()}loadState(e){if(e.target.files.length!==1){console.error("No file selected");return}let r=new FileReader;r.onloadend=()=>{if(!r.result){console.error("FileReader result is empty");return}let n=JSON.parse(r.result.toString());this.responseForm.reset(),this.currentQuestionIndex=-2,this.allQuestions=[],this.selectedStakeholder=null,this.currentKpas=[],this.initializeForm().then(()=>{this.nameControl.setValue(n.name),this.authorControl.setValue(n.author),this.timestampControl.setValue(n.timestamp);let a=n.selectedStakeholder,s=n.selectedKpas||{};this.responseForm.get("selectedStakeholder")?.setValue(a);let o=this.fb.group({}),d=this.getStakeHolder(a);this.selectedStakeholder=d,d?.kpas&&d.kpas.forEach(h=>{o.addControl(h.id,this.fb.control(!!s[h.id]))}),this.responseForm.setControl("selectedKpas",o),this.selectedStakeholder?.kpas&&this.selectedStakeholder.kpas.forEach(h=>{h.questions.forEach(u=>{let f=[this.selectedStakeholder.id,h.id,u.id].join(".");this.responseForm.contains(f)||this.responseForm.addControl(f,new er(null,Ns.required))})});let l=Object.keys(s).filter(h=>s[h]);this.selectedStakeholder?.kpas&&this.selectedStakeholder.kpas.forEach(h=>{l.includes(h.id)||h.questions.forEach(u=>{let f=[this.selectedStakeholder.id,h.id,u.id].join(".");this.responseForm.contains(f)&&this.responseForm.removeControl(f)})}),this.flattenQuestions(),this.allQuestions=this.allQuestions.filter(h=>l.includes(h.kpaId));let c=n.responses||{};Object.keys(c).forEach(h=>{this.responseForm.contains(h)&&this.responseForm.controls[h].setValue(c[h])}),this.currentQuestionIndex=n.currentQuestionIndex||-2,this.animationState=n.animationState||"enter"})},r.readAsText(e.target.files[0])}static{this.\u0275fac=function(r){return new(r||t)(be(nr),be($d),be(hl))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-maturity-main"]],standalone:!1,decls:11,vars:4,consts:[["fileInput",""],["fileInputState",""],[1,"flex","flex-row","gap-4","justify-end","flex-wrap","p-2"],["mat-flat-button","","color","primary",3,"click"],["hidden","","type","file","id","file",3,"change"],["class","question-flow-container",4,"ngIf"],[1,"question-flow-container"],[1,"question-container",3,"formGroup"],[1,"flex-1"],[1,"options-container",3,"formControl"],["class","mb-5",3,"value",4,"ngFor","ngForOf"],["class","error-message",4,"ngIf"],[1,"flex-1","mb-10"],[4,"ngIf"],[1,"button-container"],["mat-flat-button","","color","primary",3,"click","disabled"],["hidden","","type","file","id","fileState",3,"change"],[1,"mb-5",3,"value"],[1,"stakeholder-description"],[1,"error-message"],[1,"w-full"],["matInput","","placeholder","Enter stakeholder name...",3,"formControl"],[1,"w-full","mt-10"],["matInput","","placeholder","Enter the name of the user conducting the assessment...",3,"formControl"],["class","question-container",3,"formGroup",4,"ngIf"],[1,"example-section","mt-10"],["class","kpa-checkbox",4,"ngFor","ngForOf"],["mat-flat-button","","color","primary",3,"disabled","click",4,"ngIf"],[1,"kpa-checkbox"],[3,"formControl",4,"ngIf"],[3,"formControl"],[1,"kpa-description"],["mode","determinate",1,"progress-bar",3,"value"],[1,"progress-message"],[1,"question-text"],[3,"value",4,"ngFor","ngForOf"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],[3,"value"],[1,"mat-radio-label-content"],["matTooltipPosition","right",3,"matTooltip",4,"ngIf"],["matTooltipPosition","right",3,"matTooltip"],["mat-flat-button","","color","accent",3,"click","disabled"],[1,"question-container"],[1,"text-center"],[1,"text-center","mt-10","text-lg"],[3,"maturityResponse","allQuestions"]],template:function(r,n){if(r&1){let a=Ce();B(0,"div",2)(1,"button",3),ce("click",function(){return ue(a),he(n.downloadSpecification())}),Y(2,"Download Maturiry Spec"),U(),B(3,"input",4,0),ce("change",function(o){return ue(a),he(n.uploadSpecification(o))}),U(),B(5,"button",3),ce("click",function(){ue(a);let o=Pt(4);return he(o.click())}),Y(6,"Upload Maturity Spec"),U()(),de(7,lFe,18,7,"div",5)(8,fFe,2,1,"div",5)(9,_Fe,2,1,"div",5)(10,CFe,22,11,"div",5)}r&2&&(j(7),ee("ngIf",n.currentQuestionIndex===-2),j(),ee("ngIf",n.currentQuestionIndex===-1),j(),ee("ngIf",n.currentQuestionIndex>=0&&n.currentQuestionIndex leave",[Ii("200ms ease-in-out",Rt({opacity:0}))]),Li("leave => enter",[Rt({opacity:0}),Ii("200ms ease-in-out",Rt({opacity:1}))])])]}})}}return t})();var VT=(()=>{class t{constructor(){this.demos=[{name:"Clinical User Interface Demo",subtitle:"Clinical demo",type:"external",url:"http://snomed.org/ui",description:"A simulation of clinical data entry on an EHR using SNOMED FHIR Terminology services"},{name:"Allergies",subtitle:"Clinical demo",type:"internal",url:"/allergies",description:"A SNOMED / FHIR implementation demo of recording Allergy / Intollerance details, from Allergies Clinical Reference Group"},{name:"Terminology Bindings Sandbox",subtitle:"Learning demo",type:"internal",url:"/sandbox",description:"A sandbox for learning and testing terminology bindings"},{name:"SNOMED Maps Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-icd-maps",description:"A SNOMED / ICD-10 maps demonstration, including complex map rules execution"},{name:"Post-coordination Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-postcoordination",description:"A SNOMED post-coordination demonstration, with new prototype Postcoordination Terminology server SNOWSTORM X"},{name:"IPS Terminology Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-ips/",description:"A demonstration of the International Patient Summary (IPS) terminology, including the IPS SNOMED CT refset"},{name:"SNOMED & FHIR Questionnaires Manager Application",subtitle:"Application",type:"internal",url:"/questionnaires",description:"An application to manage a FHIR Questionnaires repository, with SNOMED CT bindings"},{name:"SNOMED & FHIR Questionnaires Utilities",subtitle:"Utilities",type:"internal",url:"/questionnaires",queryParams:{utility:!0},description:"Utilities for working with FHIR Questionnaires, including SNOMED CT bindings"},{name:"Context Representation Transformations",subtitle:"Learning demo",type:"internal",url:"/context",description:"A demonstration of the transformation of context representations from SNOMED to FHIR Resources"},{name:"SNOMED and LLMs (AI Demo)",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/openai-demo/",description:"This demo uses OpenAI ChatGPT API to demonstrate the use of SNOMED CT with Language Model Models (LLMs). A developer key for the OpenAI API is required."},{name:"Snoguess (A SNOMED game)",subtitle:"Game",type:"internal",url:"/snoguess",description:"A SNOMED term guessing game, learn about SNOMED content while having fun and competing to achieve the highest score"},{name:"SNOMED Implementation Roadmap Generator",subtitle:"Tool",type:"external",url:"https://ihtsdo.github.io/roadmap-generator",description:"A tool designed to promote and support the creation of implementation roadmaps for the adoption of SNOMED CT in countries, regions or organizations."}]}getDemos(){return this.demos}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function TFe(t,i){if(t&1){let e=Ce();B(0,"div",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-subtitle"),Y(4),U(),B(5,"mat-card-title"),Y(6),U()(),B(7,"mat-card-content")(8,"p"),Y(9),U()(),B(10,"mat-card-actions")(11,"button",10),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.navigate(n))}),Y(12,"OPEN"),U()()()()}if(t&2){let e=i.$implicit;j(4),ze(e.subtitle),j(2),ze(e.name),j(3),ze(e.description)}}var vO=(()=>{class t{constructor(e,r,n){this.router=e,this.route=r,this.menuService=n,this.demos=[]}ngOnInit(){this.demos=this.menuService.getDemos()}navigate(e){if(e.type==="internal"){let r=e.queryParams,n=this.route.snapshot.queryParams;r?r=Me(Me({},n),r):r=n,this.router.navigate([e.url],{queryParams:r})}else this.openInNewTab(e.url)}openInNewTab(e){window.open(e,"_blank")}static{this.\u0275fac=function(r){return new(r||t)(be(ys),be(jr),be(VT))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-home"]],standalone:!1,decls:17,vars:1,consts:[[1,"main-panel"],[1,"intro"],["href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank"],["href","https://confluence.ihtsdotools.org/display/CP/Clinical+Engagement","target","_blank"],[1,"demos-panel"],["class","demo-card-wrapper",4,"ngFor","ngForOf"],[1,"center-image"],["src","assets/img/SI_CT_Logo_Delivered_By.png","alt","SNOMED Logo",1,"transparent-image"],[1,"demo-card-wrapper"],[1,"demo-card"],["mat-button","","color","accent",3,"click"]],template:function(r,n){r&1&&(B(0,"div",0)(1,"h1"),Y(2,"SNOMED CT Implementation Demonstrators"),U(),B(3,"p",1),Y(4,"Welcome to our collection of SNOMED CT Implementation Demonstrators! This curated selection of demos showcases the diverse ways SNOMED CT can be implemented across different use cases. Each demonstration is "),B(5,"a",2),Y(6,"open source"),U(),Y(7,", free to explore, and easy to replicate, providing a hands-on learning experience for developers, implementers, and healthcare professionals."),U(),B(8,"p",1),Y(9,"These implementation demos have been created through the collaboration and expertise of the "),B(10,"a",3),Y(11,"global SNOMED CT community of clinical experts"),U(),Y(12,", reflecting best practices and innovative use cases. Whether you\u2019re just getting started with SNOMED CT or looking to deepen your understanding, you\u2019ll find valuable insights here. Explore, learn, and join us in advancing healthcare interoperability."),U(),B(13,"div",4),de(14,TFe,13,3,"div",5),U(),B(15,"div",6),we(16,"img",7),U()()),r&2&&(j(14),ee("ngForOf",n.demos))},dependencies:[ci,di,jd,G_,U_,H_,z_,V_],styles:[".main-panel[_ngcontent-%COMP%]{padding:2rem;height:calc(100vh - 70px)}.intro[_ngcontent-%COMP%]{font-size:1.2rem;margin-bottom:1.5rem}.demos-panel[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;margin-top:3rem}.demo-card-wrapper[_ngcontent-%COMP%]{width:300px}.demo-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}mat-card-title[_ngcontent-%COMP%]{word-wrap:break-word;font-size:large;font-weight:700}mat-card-content[_ngcontent-%COMP%]{padding:1rem;margin-bottom:2rem}mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;padding-top:10px;margin-top:auto}.center-image[_ngcontent-%COMP%]{text-align:center;margin-top:4rem;margin-left:20%;margin-right:20%}.transparent-image[_ngcontent-%COMP%]{opacity:.5}"]})}}return t})();function SFe(t,i){if(t&1){let e=Ce();B(0,"app-autocomplete-binding",9),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function EFe(t,i){if(t&1){let e=Ce();B(0,"app-dropdown-binding",9),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function DFe(t,i){if(t&1){let e=Ce();B(0,"app-radios-binding",9),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function MFe(t,i){if(t&1&&(B(0,"span",10),Y(1),U()),t&2){let e=ne().$implicit;j(),ze(e.title)}}function AFe(t,i){if(t&1){let e=Ce();B(0,"app-textbox-binding",11),ce("textChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function IFe(t,i){if(t&1){let e=Ce();B(0,"app-integer-binding",11),ce("textChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function RFe(t,i){if(t&1){let e=Ce();B(0,"app-decimal-binding",11),ce("textChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function PFe(t,i){if(t&1){let e=Ce();B(0,"app-checkbox-binding",9),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function kFe(t,i){if(t&1){let e=Ce();B(0,"app-checkbox-multiple-binding",9),ce("selectionChange",function(n){ue(e);let a=ne().$implicit,s=ne();return he(s.optionSelected(a.title,a.code,n))}),U()}if(t&2){let e=ne().$implicit;ee("binding",e)}}function FFe(t,i){if(t&1&&(B(0,"button",12)(1,"mat-icon"),Y(2,"info"),U()()),t&2){let e=ne().$implicit,r=Pt(13);ee("matMenuTriggerFor",r)("disabled",!e.code&&!e.ecl)}}function OFe(t,i){if(t&1){let e=Ce();B(0,"span",13),ce("click",function(n){return ue(e),he(n.stopPropagation())}),B(1,"h4"),Y(2,"Question terminology binding"),U(),B(3,"pre"),Y(4),U()()}if(t&2){let e=ne().$implicit;ee("disableRipple",!0),j(4),Gr("",e.code==null?null:e.code.code," |",e.code==null?null:e.code.display,"|")}}function LFe(t,i){if(t&1){let e=Ce();B(0,"span",13),ce("click",function(n){return ue(e),he(n.stopPropagation())}),B(1,"h4"),Y(2,"Answer terminology binding"),U(),B(3,"pre"),Y(4),U()()}if(t&2){let e=ne().$implicit;ee("disableRipple",!0),j(4),ze(e.ecl)}}function NFe(t,i){if(t&1&&(B(0,"div",2)(1,"div",3),de(2,SFe,1,1,"app-autocomplete-binding",4)(3,EFe,1,1,"app-dropdown-binding",4)(4,DFe,1,1,"app-radios-binding",4)(5,MFe,2,1,"span",5)(6,AFe,1,1,"app-textbox-binding",6)(7,IFe,1,1,"app-integer-binding",6)(8,RFe,1,1,"app-decimal-binding",6)(9,PFe,1,1,"app-checkbox-binding",4)(10,kFe,1,1,"app-checkbox-multiple-binding",4)(11,FFe,3,2,"button",7),B(12,"mat-menu",null,0),de(14,OFe,5,3,"span",8)(15,LFe,5,2,"span",8),U()()()),t&2){let e=i.$implicit;j(2),ee("ngIf",e.type=="Autocomplete"),j(),ee("ngIf",e.type=="Select (Single)"||e.type=="Select (Multiple)"),j(),ee("ngIf",e.type=="Options"),j(),ee("ngIf",e.type=="Section header"),j(),ee("ngIf",e.type=="Text box"),j(),ee("ngIf",e.type=="Integer"),j(),ee("ngIf",e.type=="Decimal"),j(),ee("ngIf",e.type=="Checkbox"),j(),ee("ngIf",e.type=="Checkbox multiple"),j(),ee("ngIf",e.type!="Section header"),j(3),ee("ngIf",e.code),j(),ee("ngIf",e.ecl)}}var ZQ=(()=>{class t{constructor(){this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}"}optionSelected(e,r,n){this.output[e]={code:r,value:n},r||delete this.output[e].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}refreshResponse(){this.response={};for(let e of this.spec.bindings)this.response[e.title]={},e.code&&(this.response[e.title].code=e.code);for(let[e,r]of Object.entries(this.output))this.output[e].code&&(this.response[e].code=this.output[e].code),this.output[e].value&&(this.response[e].value=this.output[e].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[e,r]of Object.entries(this.response)){let n=r,a=n.code?{coding:[{system:"http://snomed.info/sct",code:n.code.code,display:n.code.display}]}:void 0,s=n.value?.code?{coding:[{system:"http://snomed.info/sct",code:n.value.code,display:n.value.display}]}:void 0,o={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};a?o.code=a:o.code={coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},s&&(o.valueCodeableConcept=s),n.value&&typeof n.value=="string"&&(o.valueString=n.value),(o.valueCodeableConcept||o.valueString)&&this.responseBundle.entry.push(o)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=Te({type:t,selectors:[["app-bindings-viewer"]],inputs:{spec:"spec"},standalone:!1,decls:3,vars:2,consts:[["substancePopoverMenu","matMenu"],["class","output-panel",4,"ngFor","ngForOf"],[1,"output-panel"],[1,"row","control"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"selectionChange","binding"],[1,"title","grow"],[1,"grow",3,"textChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],["mat-menu-item","",3,"click","disableRipple"]],template:function(r,n){r&1&&(B(0,"h2"),Y(1),U(),de(2,NFe,16,12,"div",1)),r&2&&(j(),ze(n.spec.title),j(),ee("ngForOf",n.spec.bindings))},dependencies:[ci,oi,ln,Pi,ur,_r,rs,Oo,Iw,Pw,kw,Fw,Ow,Lw,Nw],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"]})}}return t})();function VFe(t,i){if(t&1&&(B(0,"mat-tab",7)(1,"div",8),we(2,"app-bindings-viewer",9),U()()),t&2){let e=i.$implicit;io("label",e.spec.title),j(2),ee("spec",e.spec)}}var JQ=(()=>{class t{constructor(e){this.http=e,this.emptySpec={},this.specs=[{specFile:"Example-spec.json",spec:this.emptySpec},{specFile:"Example-spec-2.json",spec:this.emptySpec}]}ngOnInit(){this.specs.forEach(e=>Ve(this,null,function*(){let r=yield sn(this.http.get("assets/specs/ncpt/"+e.specFile));console.log(r),e.spec=r}))}static{this.\u0275fac=function(r){return new(r||t)(be(nr))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-ncpt"]],standalone:!1,decls:20,vars:3,consts:[["substancePopoverMenu","matMenu"],[1,"outer-container"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/display/WIPnutsig/SNOMED+CT+Implementation+Guide+for+the+Nutrition+Care+Process+Terminology","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"container"],[3,"spec"]],template:function(r,n){if(r&1){let a=Ce();B(0,"div",1)(1,"h3"),Y(2,"SNOMED CT - NCPT Implementation Demonstrator "),B(3,"button",2)(4,"mat-icon"),Y(5,"info"),U()(),B(6,"mat-menu",null,0)(8,"span",3),ce("click",function(o){return ue(a),he(o.stopPropagation())}),B(9,"h4"),Y(10,"SNOMED CT - NCPT Implementation Demonstrator"),U(),B(11,"p"),Y(12,"This is a demonstration of the use of SNOMED CT for coding clinical information related to the Nutrition Care Process."),U(),B(13,"p"),Y(14,"For more information check the "),B(15,"a",4),Y(16," Implementation Guide"),U(),Y(17,"."),U()()()(),B(18,"mat-tab-group",5),de(19,VFe,3,2,"mat-tab",6),U()()}if(r&2){let a=Pt(7);j(3),ee("matMenuTriggerFor",a),j(5),ee("disableRipple",!0),j(11),ee("ngForOf",n.specs)}},dependencies:[ci,ln,Pi,ur,_r,rs,ul,Ga,ZQ],styles:[".outer-container[_ngcontent-%COMP%]{margin:1rem;width:calc(100% - 2rem)}.container[_ngcontent-%COMP%]{margin:2rem;width:calc(100% - 4rem)}"]})}}return t})();var UFe=()=>["/reports"];function zFe(t,i){t&1&&(B(0,"div",4),Y(1,` Loading... +`),U())}var yO=(()=>{class t{constructor(e,r,n){this.http=e,this.renderer=r,this.elementRef=n,this.loading=!0}ngOnInit(){this.http.get("assets/reports/fsn_changes_with_details.html",{responseType:"text"}).subscribe(e=>{this.loading=!1;let r=this.elementRef.nativeElement.querySelector("#chart-container");r.innerHTML=e,r.querySelectorAll("script").forEach(a=>{let s=this.renderer.createElement("script");s.type=a.type||"text/javascript",a.src?s.src=a.src:s.text=a.textContent||"",this.renderer.appendChild(r,s)})})}static{this.\u0275fac=function(r){return new(r||t)(be(nr),be(Ai),be(Ze))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-fsn-changes"]],standalone:!1,decls:5,vars:3,consts:[[1,"pt-5","pl-10"],["mat-flat-button","","color","primary",3,"routerLink"],["class","mt-20 ml-10",4,"ngIf"],["id","chart-container",1,"mb-20"],[1,"mt-20","ml-10"]],template:function(r,n){r&1&&(B(0,"div",0)(1,"button",1),Y(2,"Back to reports"),U()(),de(3,zFe,2,0,"div",2),we(4,"div",3)),r&2&&(j(),ee("routerLink",Yn(2,UFe)),j(2),ee("ngIf",n.loading))},dependencies:[oi,Cm,di],styles:["#chart-container[_ngcontent-%COMP%]{padding:10px}"]})}}return t})();var GFe=()=>["/reports"];function HFe(t,i){t&1&&(B(0,"div",4),Y(1,` Loading... +`),U())}var qQ=(()=>{class t{constructor(e,r,n){this.http=e,this.renderer=r,this.elementRef=n,this.loading=!0}ngOnInit(){this.http.get("assets/reports/detect_inactivations_by_reason.html",{responseType:"text"}).subscribe(e=>{this.loading=!1;let r=this.elementRef.nativeElement.querySelector("#chart-container");r.innerHTML=e,r.querySelectorAll("script").forEach(a=>{let s=this.renderer.createElement("script");s.type=a.type||"text/javascript",a.src?s.src=a.src:s.text=a.textContent||"",this.renderer.appendChild(r,s)})})}static{this.\u0275fac=function(r){return new(r||t)(be(nr),be(Ai),be(Ze))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-inactivations-report"]],standalone:!1,decls:5,vars:3,consts:[[1,"pt-5","pl-10"],["mat-flat-button","","color","primary",3,"routerLink"],["class","mt-20 ml-10",4,"ngIf"],["id","chart-container"],[1,"mt-20","ml-10"]],template:function(r,n){r&1&&(B(0,"div",0)(1,"button",1),Y(2,"Back to reports"),U()(),de(3,HFe,2,0,"div",2),we(4,"div",3)),r&2&&(j(),ee("routerLink",Yn(2,GFe)),j(2),ee("ngIf",n.loading))},dependencies:[oi,Cm,di],styles:["#chart-container[_ngcontent-%COMP%]{padding:10px}"]})}}return t})();function jFe(t,i){if(t&1){let e=Ce();B(0,"div",12)(1,"mat-card",13)(2,"mat-card-header")(3,"mat-card-subtitle"),Y(4),U(),B(5,"mat-card-title"),Y(6),U()(),B(7,"mat-card-content")(8,"p"),Y(9),U()(),B(10,"mat-card-actions")(11,"button",14),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.navigate(n))}),Y(12,"OPEN"),U()()()()}if(t&2){let e=i.$implicit;j(4),ze(e.subtitle),j(2),ze(e.name),j(3),ze(e.description)}}var eK=(()=>{class t{constructor(e,r){this.router=e,this.route=r,this.reports=[{type:"external",name:"RF2 History Mechanism",subtitle:"Specification Guide",url:"https://confluence.ihtsdotools.org/display/DOCRELFMT/3.1.5+History+Mechanism",description:"How SNOMED terminology changes are represented in the release files."},{type:"external",name:"Historical Associations Refset",subtitle:"Specification Guide",url:"https://confluence.ihtsdotools.org/display/DOCRELFMT/5.2.5.1+Historical+Association+Reference+Sets",description:"How SNOMED represents historical associations linking active components with inactive ones."},{type:"external",name:"Editorial Conventions for Changes in Components",subtitle:"Editorial Guide",url:"https://confluence.ihtsdotools.org/display/EDUEG/Changes+to+Components",description:"An educational resource outlining policies for managing terminology changes."},{type:"external",name:"Translation Maintenance Advice",subtitle:"Translation Management Guide",url:"https://confluence.ihtsdotools.org/display/DOCMANAGETRANS/5.+Maintenance+of+a+Translation",description:"Recommendations for managing translations, adapting to changes in international concepts and descriptions."},{type:"external",name:"Managing Inactivations in the Authoring Platform",subtitle:"User Guide",url:"https://confluence.ihtsdotools.org/display/SIAPUG/Inactivation+-+Descriptions%2C+Relationships%2C+and+Concepts",description:"Step by step guides on how to perform content inactivations in the Authoring Platform."},{type:"external",name:"Managing Inactivations in the Refset & Translation Tool",subtitle:"User Guide",url:"https://confluence.ihtsdotools.org/display/REFSET/Migration",description:"Features in the Refset & Translation Tool that support content migration between releases and the replacement of inactive content in refsets."},{type:"external",name:"Managing Inactivations in Snap2Snomed",subtitle:"User Guide",url:"https://confluence.ihtsdotools.org/display/S2SUG/Appendix+A+-+FAQs",description:"How inactive content is reported in Snap2Snomed and how the tool supports replacement selection."},{type:"external",name:"History Supplements in ECL",subtitle:"User Guide",url:"https://confluence.ihtsdotools.org/display/DOCECL/6.11+History+Supplements",description:"How history supplements can be applied to an expression constraint to include relevant inactive concepts in the results."},{type:"external",name:"Release Management Home",subtitle:"Release Notes",url:"https://confluence.ihtsdotools.org/display/RMT/SNOMED+International+Release+Management+Home",description:"Information on past and upcoming SNOMED Releases and access to Releases Notes describing content changes."},{type:"external",name:"Last International Release Statistics",subtitle:"Changes Report",url:"https://browser.ihtsdotools.org/qa/#/SNOMEDCT",description:"Descriptive statistics from the latest release of the International Edition of SNOMED CT."},{type:"internal",name:"FSN Changes",subtitle:"Changes Report",url:"reports/fsn",description:"This report displays changes to the FSN of concepts over time."},{type:"internal",name:"Inactivations",subtitle:"Changes Report",url:"reports/inactivations",description:"This report displays concept inactivations over time."},{type:"internal",name:"New Concepts",subtitle:"Changes Report",url:"reports/new-concepts",description:"This report displays newly added concepts over time."}]}navigate(e){if(e.type==="internal"){let r=e.queryParams,n=this.route.snapshot.queryParams;r?r=Me(Me({},n),r):r=n,this.router.navigate([e.url],{queryParams:r})}else this.openInNewTab(e.url)}openInNewTab(e){window.open(e,"_blank")}static{this.\u0275fac=function(r){return new(r||t)(be(ys),be(jr))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-reports-main"]],standalone:!1,decls:23,vars:1,consts:[[1,"main-panel"],[1,"draft-banner"],[1,"mb-1"],[1,"text-gray-500"],[1,"text-container"],[1,"intro"],[1,"text-sm"],["href","https://pmc.ncbi.nlm.nih.gov/articles/PMC3415631/","target","_blank"],[1,"demos-panel"],["class","demo-card-wrapper",4,"ngFor","ngForOf"],[1,"center-image"],["src","assets/img/SI_CT_Logo_Delivered_By.png","alt","SNOMED Logo",1,"transparent-image"],[1,"demo-card-wrapper"],[1,"demo-card"],["mat-button","","color","accent",3,"click"]],template:function(r,n){r&1&&(B(0,"div",0)(1,"div",1)(2,"strong"),Y(3,"Draft Version:"),U(),Y(4," This page is a work in progress and for internal review only. "),U(),B(5,"h1",2),Y(6,"SNOMED CT as an evolving terminology"),U(),B(7,"h4",3),Y(8,"Supporting the management of terminology changes in clinical implementations"),U(),B(9,"div",4)(10,"p",5),Y(11,"Maintaining the integrity and usefulness of a clinical terminology like SNOMED CT requires continuous updates, including concept modifications and inactivations. These updates ensure that the terminology remains aligned with clinical practice and evolving medical knowledge while supporting interoperability across health systems. This page provides detailed information about SNOMED CT content changes, offering transparency for implementers, terminology managers, and system developers who depend on up-to-date SNOMED CT content for clinical decision support, coding, and analytics."),U(),B(12,"p",5),Y(13,"This aligns with the principle of graceful evolution, which emphasizes that terminologies should change in a way that minimizes disruption to users. SNOMED CT follows this principle by ensuring that inactivated concepts have clear historical relationships to their replacements, FSN changes history is fully tracked, and new concepts integrate seamlessly into existing hierarchies. "),B(14,"span",6)(15,"a",7),Y(16," Cimino J. J. (1998). Desiderata for controlled medical vocabularies in the twenty-first century. Methods of information in medicine, 37(4-5), 394\u2013403. "),U()()(),B(17,"p",5),Y(18,"While this information exists in the RF2 release files, it is spread across multiple tables and requires complex queries to interpret. These guides, tools, and reports are key in the maintenance of SNOMED extensions, helping implementers identify the volume of changes over time and track updates efficiently, and update extension content to ensure that SNOMED CT remains a reliable and evolving global standard while minimizing the impact of inevitable terminology changes. "),U()(),B(19,"div",8),de(20,jFe,13,3,"div",9),U(),B(21,"div",10),we(22,"img",11),U()()),r&2&&(j(20),ee("ngForOf",n.reports))},dependencies:[ci,di,jd,G_,U_,H_,z_,V_],styles:[".main-panel[_ngcontent-%COMP%]{padding:2rem;height:calc(100vh - 70px)}.intro[_ngcontent-%COMP%]{font-size:1.1rem;text-align:justify;margin-bottom:10px;line-height:1.2}.demos-panel[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;margin-top:3rem}.demo-card-wrapper[_ngcontent-%COMP%]{width:300px}.demo-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}mat-card-title[_ngcontent-%COMP%]{word-wrap:break-word;font-size:large;font-weight:700}mat-card-content[_ngcontent-%COMP%]{padding:1rem;margin-bottom:2rem}mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;padding-top:10px;margin-top:auto}.center-image[_ngcontent-%COMP%]{text-align:center;margin-top:4rem;margin-left:20%;margin-right:20%}.transparent-image[_ngcontent-%COMP%]{opacity:.5}.text-container[_ngcontent-%COMP%]{text-align:justify;padding:1rem 2rem;background-color:#fff;border:1px solid #e0e0e0}.draft-banner[_ngcontent-%COMP%]{background-color:#fc0;color:#333;text-align:center;font-weight:700;padding:10px;font-size:1rem;border-bottom:2px solid #e6b800;position:relative;margin-bottom:1rem}"]})}}return t})();var WFe=()=>["/reports"];function XFe(t,i){t&1&&(B(0,"div",4),Y(1,` Loading... +`),U())}var tK=(()=>{class t{constructor(e,r,n){this.http=e,this.renderer=r,this.elementRef=n,this.loading=!0}ngOnInit(){this.http.get("assets/reports/new_concepts_by_semantic_tag.html",{responseType:"text"}).subscribe(e=>{this.loading=!1;let r=this.elementRef.nativeElement.querySelector("#chart-container");r.innerHTML=e,r.querySelectorAll("script").forEach(a=>{let s=this.renderer.createElement("script");s.type=a.type||"text/javascript",a.src?s.src=a.src:s.text=a.textContent||"",this.renderer.appendChild(r,s)})})}static{this.\u0275fac=function(r){return new(r||t)(be(nr),be(Ai),be(Ze))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-inactivations-report"]],standalone:!1,decls:5,vars:3,consts:[[1,"pt-5","pl-10"],["mat-flat-button","","color","primary",3,"routerLink"],["class","mt-20 ml-10",4,"ngIf"],["id","chart-container"],[1,"mt-20","ml-10"]],template:function(r,n){r&1&&(B(0,"div",0)(1,"button",1),Y(2,"Back to reports"),U()(),de(3,XFe,2,0,"div",2),we(4,"div",3)),r&2&&(j(),ee("routerLink",Yn(2,WFe)),j(2),ee("ngIf",n.loading))},dependencies:[oi,Cm,di],styles:["#chart-container[_ngcontent-%COMP%]{padding:10px}"]})}}return t})();var bO=Ka(Dy());var iK=Ka(Dy()),_u=class extends iK.default.GameObjects.Rectangle{constructor(i,e,r,n=1,a=65280){super(i,e,r,40,40,a),this.inQueue=!1,this.queuePosition=0,this.queueStartTime=0,this.hitPoints=5,this.previousX=0,this.info={},this.speed=1,this.sceneRef=i,i.add.existing(this),i.physics.add.existing(this),this.body.setCollideWorldBounds(!0),this.body.setImmovable(!1),this.spriteType=n}walkTo(i,e){if(i.length===0){e();return}let r=n=>{if(n>=i.length){e();return}let a=i[n];this.sceneRef.tweens.add({targets:this,x:a.x,y:a.y,duration:a.duration/this.speed,ease:"Linear",onUpdate:()=>{},onComplete:()=>{r(n+1)}}),this.sceneRef.tweens.add({targets:this,yoyo:!0,repeat:a.duration/150,duration:150,onComplete:()=>{}})};r(0)}hurt(){this.hitPoints--;let i=this.sceneRef.add.text(this.x,this.y-10,"-1",{fontSize:"20px",color:"#ff0000",fontStyle:"bold"}).setOrigin(.5);this.sceneRef.tweens.add({targets:i,y:this.y-100,alpha:0,duration:3500/this.speed,ease:"Power2",onComplete:()=>i.destroy()}),this.hitPoints<=0&&this.destroy()}say(i,e=2e3){this.calloutText&&this.calloutText.destroy(),this.calloutLine&&this.calloutLine.destroy(),this.calloutText=this.sceneRef.add.text(this.x,this.y-50,i,{fontSize:"16px",color:"#ffffff",backgroundColor:"#000000",padding:{x:5,y:2},align:"center"}).setOrigin(.5).setDepth(10),this.calloutLine=this.sceneRef.add.line(this.x+5,this.y+10,0,0,10,-35,16777215).setLineWidth(1.5).setDepth(9),this.sceneRef.tweens.add({targets:[this.calloutText,this.calloutLine],alpha:0,duration:500/this.speed,delay:e,onComplete:()=>{this.calloutText?.destroy(),this.calloutText=void 0,this.calloutLine?.destroy()}})}};var UT=class extends _u{constructor(i,e,r,n=1,a=[]){if(super(i,e,r,n,16711680),this.clinicalData={},this.dxOptions=[],this.setScale(.5),this.dxOptions=i.cache.json.get("diagnosisData"),this.clinicalData.age=Phaser.Math.Between(18,100),this.clinicalData.diagnosis=[],a&&a.length>0)this.clinicalData.diagnosis=a;else{let s=Phaser.Math.Between(1,2);for(let o=0;othis.showDiagnosis()),this.on("pointerout",()=>this.hideDiagnosis())}showDiagnosis(){this.diagnosisText&&this.diagnosisText.destroy();let i=this.clinicalData.diagnosis.map(e=>e.display).join(` +`);i||(i="No diagnosis available"),this.diagnosisText=this.sceneRef.add.text(this.x,this.y-50,i,{fontSize:"14px",color:"#ffffff",backgroundColor:"#000000",padding:{x:5,y:2},align:"center"}).setOrigin(.5).setDepth(10)}hideDiagnosis(){this.diagnosisText?.destroy(),this.diagnosisText=void 0}};var My=class extends _u{constructor(i,e,r,n,a){super(i,e,r,2,16776960),this.triageRules=[],this.setScale(.5),this.triageRules=n,this.gameService=a,this.setInteractive({useHandCursor:!0})}setTriageRules(i){this.triageRules=i}triagePatient(i,e){return new Promise(r=>{this.gameService.checkPatientDiagnosisVsEcl(i,e).then(n=>{r(n.length>0)})})}};var zT=class extends _u{constructor(i,e,r,n,a){super(i,e,r,2,255),this.specialityEcl="",this.title="",this.busy=!1,this.setScale(.5),this.specialityEcl=n,this.gameService=a,this.setInteractive({useHandCursor:!0})}setSpecialityEcl(i){this.specialityEcl=i}setTitle(i){this.title=i}setBusy(i){this.busy=i}isBusy(){return this.busy}attendPatient(i){return new Promise(e=>{this.gameService.checkPatientDiagnosisVsEcl(i,this.specialityEcl).then(r=>{r.length>0?(i.clinicalData.diagnosis.forEach(n=>{r.find(a=>a.code===n.code)&&(n.status="treated")}),e(!0)):e(!1)})})}};var GT=class{constructor(i){this.terminologyService=i}checkPatientDiagnosisVsEcl(i,e){return new Promise((r,n)=>{let a=0,s="";if(i?.clinicalData.diagnosis.forEach((o,d)=>{o.status!=="treated"&&(a++,a>1?s+=` OR ${o.code}`:s+=` ${o.code}`)}),a===0){r([]);return}else e=e+" AND ("+s+" )",this.terminologyService.expandValueSetUsingCache(e,"").subscribe(o=>{o.expansion?.total>0?r(o.expansion.contains):r([])},o=>{n(o)})})}};var HT=class extends Phaser.Scene{constructor(i){super({key:"CdstdScene"}),this.terminologyService=i,this.maxPatients=10,this.spawnedPatients=0,this.patientsInQueue=0,this.outsideQueue=[],this.insideQueue=[],this.goodTriage=0,this.badTriage=0,this.diagnosisData=[],this.admitting=!1,this.lastTriageTime=0,this.speedMultiplier=1,this.admissionEcl="( << 386661006 |Fever| OR << 22253000 |Pain (finding)| )",this.internalTriageRules=[{ecl:"<< 386661006",doctorIndex:1},{ecl:"<< 22253000",doctorIndex:0},{ecl:"<< 22253000",doctorIndex:0}],this.attendingDoctors=[{x:130,y:207,title:"Cardiologist",ecl:"(<< 106063007 |Cardiovascular finding (finding)| OR << 29857009 |Chest pain (finding)|)"},{x:130,y:140,title:"Infectologist",ecl:"<< 386661006 |Fever (finding)|"}],this.gameService=new GT(i),this.terminologyService.setSnowstormFhirBase("https://snowstorm-lite.nw.r.appspot.com/fhir")}setSpeedMultiplier(i){this.speedMultiplier=i}getSelectedSpeed(){return this.speedMultiplier}preload(){this.load.json("diagnosisData","assets/cdstd/Data/dx_1.json")}create(){this.input.keyboard?.on("keydown-ENTER",()=>{this.internalTriage()}),this.input?.keyboard?.on("keydown-A",()=>{this.testNextPatientForAdmission()}),this.diagnosisData=this.cache.json.get("diagnosisData"),this.scoreText=this.add.text(750,10,`Patients: ${this.spawnedPatients}`,{fontSize:"20px",color:"#ffffff",fontStyle:"bold"}).setOrigin(1,0),this.input.enabled=!0,this.outsideQueue=[],this.goodTriage=0,this.spawnedPatients=0,this.patients=this.physics.add.group(),this.addDoctors(),this.gatekeeper=new My(this,315,190,[{ecl:this.admissionEcl,doctorIndex:0}],this.gameService),this.gatekeeper.setInteractive({useHandCursor:!0}),this.gatekeeper.on("pointerdown",()=>{this.openEclEditor(this.gatekeeper)}),this.add.existing(this.gatekeeper),this.wall=this.add.line(0,0,270,480,650,480,16777215).setLineWidth(10).setOrigin(0,0),this.physics.add.existing(this.wall,!0),this.spawnPatient(),this.scheduleRandomPatientSpawn()}update(){this.patients.getChildren().forEach(e=>{let r=e;if(!r.active)return;let n=r.x,a=r.previousX;na,r.previousX=n}),this.scoreText.setText(`Patients: ${this.spawnedPatients} Effectiveness: ${(this.spawnedPatients-this.badTriage)/this.spawnedPatients*100}%`),this.admitting&&this.testNextPatientForAdmission();let i=Date.now();this.insideQueue.length>0&&this.attendingDoctors.every(e=>!e.character.busy)&&i-this.lastTriageTime>=2e3&&(this.lastTriageTime=Date.now(),this.time.delayedCall(1e3,()=>{}))}openEclEditor(i){this.scene.pause(),this.scene.launch("EclEditorScene",{rules:i.triageRules,callback:e=>{i.setTriageRules(e)}})}scheduleRandomPatientSpawn(){if(this.spawnedPatients{this.spawnPatient(),this.scheduleRandomPatientSpawn()},callbackScope:this})}}addDoctors(){this.internalTriageDoctor=new My(this,270,350,this.internalTriageRules,this.gameService),this.internalTriageDoctor.setInteractive({useHandCursor:!0}),this.internalTriageDoctor.on("pointerdown",()=>{this.openEclEditor(this.internalTriageDoctor)}),this.attendingDoctors.forEach(i=>{let e=new zT(this,i.x,i.y,i.ecl,this.gameService);e.setTitle(i.title),e.setBusy(!1),i.character=e})}spawnPatient(){let i=new UT(this,80,10,Phaser.Math.Between(1,3));this.outsideQueue.push(i),i.queuePosition=this.outsideQueue.length;let e=[{x:80,y:533,duration:500},{x:330+30*i.queuePosition,y:533,duration:500}];i.walkTo(e,()=>{this.patientsInQueue++,this.time.delayedCall(100,()=>{}),this.patientsInQueue===this.maxPatients&&this.queueComplete()}),i.setActive(!0).setVisible(!0),this.patients.add(i),this.spawnedPatients++,this.physics.add.collider(i,this.wall)}queueComplete(){let i=[{x:315,y:350,duration:200},{x:240,y:350,duration:200},{x:240,y:533,duration:200},{x:310,y:533,duration:200}];this.gatekeeper.walkTo(i,()=>{this.gatekeeper.say("We will start soon",1100)})}testNextPatientForAdmission(){if(this.outsideQueue.length===0)return;let i=this.outsideQueue.shift();i&&(this.admitting=!1,this.gatekeeper.say("How do you feel?",1e3),this.time.delayedCall(1500,()=>{let e=`I have been feeling with: +`;e+=i.clinicalData.diagnosis.map(r=>r.display).join(` +`),i.say(e,1800),this.time.delayedCall(2e3,()=>{this.gatekeeper.triagePatient(i,this.gatekeeper.triageRules[0].ecl).then(r=>{r?(this.gatekeeper.say("Go in...",1500),this.time.delayedCall(1500,()=>{this.enterHospital(i),this.advanceQueue(this.outsideQueue),this.time.delayedCall(1e3,()=>{})})):(this.gatekeeper.say("Go home...",1500),this.time.delayedCall(500,()=>{this.walkAway(i),this.advanceQueue(this.outsideQueue),this.time.delayedCall(1e3,()=>{})}))})})}))}walkToInternalTriage(i){let e=[{x:310,y:350,duration:500}];i.walkTo(e,()=>{})}enterHospital(i){this.insideQueue.push(i),i.queuePosition=this.insideQueue.length;let e=Phaser.Math.Between(350,500),r=Phaser.Math.Between(330,380),n=[{x:240,y:i.y,duration:500},{x:240,y:350,duration:500},{x:e,y:r,duration:500}];i.walkTo(n,()=>{this.time.delayedCall(100,()=>{})})}walkAway(i){let e=[];i.y<500&&(e.push({x:240,y:i.y,duration:500}),e.push({x:240,y:560,duration:500}));let r=Phaser.Math.Between(0,1);e.push({x:r*800,y:560,duration:1e3}),i.walkTo(e,()=>{this.time.delayedCall(100,()=>{i.destroy()})})}advanceQueue(i){if(i.length===0)return;let e=i[0].x-60;i.forEach((r,n)=>{r.queuePosition=n+1;let a=[{x:e+30*r.queuePosition,y:r.y,duration:500}];r.walkTo(a,()=>{})})}internalTriage(){return Ve(this,null,function*(){if(this.insideQueue.length===0)return;let i=this.insideQueue.shift(),e=!1;if(i){this.walkToInternalTriage(i);for(let r of this.internalTriageRules){let n=this.attendingDoctors[r.doctorIndex].character;if(n.busy)continue;let a=!1;if(a=yield this.internalTriageDoctor.triagePatient(i,r.ecl),a){e=!0,this.internalTriageDoctor.say(`Go to the ${n?.title}`,1e3),this.time.delayedCall(1e3,()=>{let s=[{x:240,y:i.y,duration:200},{x:240,y:n.y,duration:300},{x:n.x+30,y:n.y,duration:300}];n.busy=!0,i.walkTo(s,()=>{this.attendPatient(i,n)})});break}}e||(this.internalTriageDoctor.say("We can't help you...",1e3),this.time.delayedCall(1e3,()=>{this.walkAway(i)})),i.active||this.addToInsideQueue(i)}})}addToInsideQueue(i){this.insideQueue.push(i),i.queuePosition=this.insideQueue.length;let n=[{x:280+20*i.queuePosition,y:350,duration:500/this.speedMultiplier}];i.walkTo(n,()=>{}),console.log(`Patient re-added to insideQueue at position ${i.queuePosition}`)}attendPatient(i,e){e.busy=!0,this.time.delayedCall(1e3,()=>{this.checkPatientDiagnosisVsEcl(i,e.specialityEcl).then(r=>{r.length>0?(i.clinicalData.diagnosis.forEach(n=>{r.find(a=>a.code===n.code)&&(n.status="treated")}),i.clinicalData.diagnosis.find(n=>n.status==="admitted")?(e.say(`${e.title} +Go to the next doctor`,1e3),this.time.delayedCall(1e3,()=>{this.enterHospital(i),e.busy=!1})):(e.say(`${e.title} +Have a nice day`,1e3),this.time.delayedCall(1e3,()=>{this.goodTriage++,this.walkAway(i),e.busy=!1}))):i.clinicalData.diagnosis.find(n=>n.status==="admitted")?(e.say(`${e.title} +I can't help with this, but go to the next doctor`,1e3),this.time.delayedCall(1e3,()=>{this.enterHospital(i),e.busy=!1})):(e.say(`${e.title} +I can't help you...`,1e3),this.time.delayedCall(1e3,()=>{this.badTriage++,this.walkAway(i),e.busy=!1}))})})}gameOver(){this.add.text(400,350,"Game Over",{fontSize:"48px",color:"#ff0000",fontStyle:"bold"}).setOrigin(.5),this.add.text(400,400,"Press R to Restart",{fontSize:"24px",color:"#ffffff"}).setOrigin(.5),this.physics.pause();let i=this.input?.keyboard?.addKey("R");i?i.once("down",()=>{this.time.removeAllEvents(),this.tweens.killAll(),this.scene.restart()}):console.error("Keyboard input is not available.")}checkPatientDiagnosisVsEcl(i,e){return new Promise((r,n)=>{let a=0,s="";if(i?.clinicalData.diagnosis.forEach((o,d)=>{o.status!=="treated"&&(a++,a>1?s+=` OR ${o.code}`:s+=` ${o.code}`)}),a===0){r([]);return}else e=e+" AND ("+s+" )",this.terminologyService.expandValueSetUsingCache(e,"").subscribe(o=>{o.expansion?.total>0?r(o.expansion.contains):r([])},o=>{n(o)})})}};var nK=Ka(Dy()),jT=class extends nK.default.Scene{constructor(){super({key:"UIScene",active:!0}),this.gamePaused=!1,this.speedButtons=[],this.speedLevels=[1,2,4,16],this.activeSpeedIndex=0}preload(){this.load.image("pauseButton","assets/cdstd/Objects/Buttons/button_pause.png"),this.load.image("unpauseButton","assets/cdstd/Objects/Buttons/button_unpause.png")}create(){this.pauseButton=this.add.image(75,50,"pauseButton").setInteractive(),this.pauseButton.on("pointerdown",()=>this.togglePause()),this.speedLevels.forEach((i,e)=>{let r=this.add.text(150+e*60,35,`${i}x`,{fontSize:"18px",color:e===this.activeSpeedIndex?"#ff0":"#fff",backgroundColor:"#000",padding:{x:10,y:5}}).setInteractive().on("pointerdown",()=>this.setSpeed(e));this.speedButtons.push(r)})}togglePause(){let i=this.scene.get("CdstdScene");this.gamePaused?(i.scene.resume(),this.gamePaused=!1,this.pauseButton.setTexture("pauseButton")):(i.scene.pause(),this.gamePaused=!0,this.pauseButton.setTexture("unpauseButton"))}setSpeed(i){this.activeSpeedIndex=i,this.speedButtons.forEach((r,n)=>{r.setStyle({color:n===this.activeSpeedIndex?"#ff0":"#fff"})});let e=this.scene.get("CdstdScene");e&&e.setSpeedMultiplier(this.speedLevels[this.activeSpeedIndex])}};var rK=Ka(Dy()),WT=class extends rK.Scene{constructor(){super({key:"EclEditorScene"}),this.lineHeight=25,this.maxLines=3}init(i){console.log("EclEditorScene init",i),this.rules=i.rules,this.updateCallback=i.callback}create(){let i=this.cameras.main.width/2,e=this.cameras.main.height/2;console.log("EclEditorScene create",this.rules);let r=this.rules.length*90+50;this.overlay=this.add.rectangle(i,e,this.cameras.main.width,this.cameras.main.height,0,.5).setDepth(100),this.inputBox=this.add.rectangle(i,e,700,500,3355443,.9).setOrigin(.5).setDepth(101),this.rules.forEach((n,a)=>{let s=e-r/2+a*90+40;this.add.text(i-320,s,`Doctor ${n.doctorIndex}:`,{fontSize:"16px",color:"#ffcc00"}).setOrigin(0,.5).setDepth(102);let o=this.add.text(i-200,s,n.ecl,{fontSize:"16px",color:"#ffffff",backgroundColor:"#000000",padding:{x:5,y:5},wordWrap:{width:500},fixedWidth:500,fixedHeight:this.lineHeight*this.maxLines}).setOrigin(0,.5).setDepth(102),d=this.add.rectangle(i+145,s+15,80,30,4474060).setOrigin(.5).setDepth(102).setInteractive({useHandCursor:!0}),l=this.add.text(i+145,s+15,"Copy",{fontSize:"14px",color:"#ffffff"}).setOrigin(.5).setDepth(103);d.on("pointerdown",()=>{navigator.clipboard.writeText(n.ecl).then(()=>{d.setFillStyle(52224),l.setText("Copied!"),this.time.delayedCall(1e3,()=>{d.setFillStyle(4474060),l.setText("Copy")})})});let c=this.add.rectangle(i+245,s+15,80,30,31436).setOrigin(.5).setDepth(102).setInteractive({useHandCursor:!0});this.add.text(i+245,s+15,"Paste",{fontSize:"14px",color:"#ffffff"}).setOrigin(.5).setDepth(103),c.on("pointerdown",()=>{navigator.clipboard.readText().then(h=>{n.ecl=h,o.setText(h)})})}),this.closeButton=this.add.rectangle(735,65,30,30,16711680).setOrigin(.5).setDepth(102).setInteractive({useHandCursor:!0}),this.add.text(735,65,"\u2715",{fontSize:"18px",color:"#ffffff"}).setOrigin(.5).setDepth(103),this.closeButton.on("pointerdown",()=>this.closeEclEditor()),this.confirmButton=this.add.rectangle(i,520,100,30,65280).setOrigin(.5).setDepth(102).setInteractive({useHandCursor:!0}),this.add.text(i,520,"OK",{fontSize:"16px",color:"#000000"}).setOrigin(.5).setDepth(103),this.confirmButton.on("pointerdown",()=>this.confirmEclChange())}confirmEclChange(){this.updateCallback(this.rules),this.closeEclEditor()}closeEclEditor(){this.scene.resume("CdstdScene"),this.scene.stop()}};var YFe=["gameContainer"],sK=(()=>{class t{constructor(e){this.terminologyService=e}ngOnInit(){let e=new jT,r=new WT,n=new HT(this.terminologyService),a={type:bO.default.AUTO,width:800,height:600,parent:this.gameContainer.nativeElement,scene:[n,e,r],physics:{default:"arcade",arcade:{debug:!1}}};this.game=new bO.default.Game(a)}ngOnDestroy(){this.game&&this.game.destroy(!0)}static{this.\u0275fac=function(r){return new(r||t)(be(Ri))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-triage-game"]],viewQuery:function(r,n){if(r&1&&vt(YFe,7),r&2){let a;je(a=We())&&(n.gameContainer=a.first)}},standalone:!1,decls:2,vars:0,consts:[["gameContainer",""]],template:function(r,n){r&1&&we(0,"div",null,0)},encapsulation:2})}}return t})();var aK=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=Te({type:t,selectors:[["app-loinc-order"]],standalone:!1,decls:2,vars:0,template:function(r,n){r&1&&(B(0,"p"),Y(1,"loinc-order works!"),U())},encapsulation:2})}}return t})();var oK=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=Te({type:t,selectors:[["app-loinc-results"]],standalone:!1,decls:2,vars:0,template:function(r,n){r&1&&(B(0,"p"),Y(1,"loinc-results works!"),U())},encapsulation:2})}}return t})();var lK=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=Te({type:t,selectors:[["app-loinc-main"]],standalone:!1,decls:8,vars:0,consts:[[1,"container"],[1,"tab-group"],["label","Order"],["label","Results"]],template:function(r,n){r&1&&(B(0,"div",0)(1,"h2"),Y(2,"LOINC Ontology Demonstrator"),U(),B(3,"mat-tab-group",1)(4,"mat-tab",2),we(5,"app-loinc-order"),U(),B(6,"mat-tab",3),we(7,"app-loinc-results"),U()()())},dependencies:[ul,Ga,aK,oK],styles:[".container[_ngcontent-%COMP%]{padding:1rem;width:100%;min-width:100%}"]})}}return t})();var KFe=[{path:"",component:vO},{path:"home",component:vO},{path:"allergies",component:w7},{path:"sandbox",component:AU},{path:"prescription",component:IU},{path:"questionnaires",component:jU},{path:"implementation-course/subset-validator",component:WU},{path:"snoguess",component:pH},{path:"snoguess/scoreboard",component:PH},{path:"context",component:yH},{path:"maturity",component:QQ},{path:"ncpt",component:JQ},{path:"triage",component:sK},{path:"fsn",component:yO},{path:"reports/fsn",component:yO},{path:"reports/inactivations",component:qQ},{path:"reports/new-concepts",component:tK},{path:"reports",component:eK},{path:"loinc",component:lK},{path:"**",redirectTo:""}],cK=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275mod=rt({type:t})}static{this.\u0275inj=nt({imports:[uA.forRoot(KFe,{useHash:!0}),uA]})}}return t})();var dK=[{title:"GROUP 1",description:"The first group of bindings in the coding demonstration",bindings:[{title:"Medicinal product + groupers",type:"autocomplete",ecl:`<< 763158003 |Medicinal product| : + [0..0] 1142139005 |Count of base of active ingredient| = *, + [0..0] 411116001 |Has manufactured dose form| = *, + [0..0] 774158006 |Has product name| = *`,value:"",note:"Medicinal products, contain at least provided ingredientes (open world assuption), no information on form."},{title:"Gender",type:"dropdown",ecl:"< 365873007 |Gender finding (finding)|",value:"",note:"Patient gender."},{title:"Medicinal product form + groupers",type:"autocomplete",ecl:`<< 763158003 |Medicinal product| : + [0..0] 1142139005 |Count of base of active ingredient| = *, + 411116001 |Has manufactured dose form| = *, + [0..0] 774158006 |Has product name| = *`,value:"",note:"Medicinal products, with form details."}]},{title:"GROUP 2",description:"The second group of bindings in the coding demonstration",bindings:[{title:"Medicinal product only",type:"autocomplete",ecl:`<< 763158003 |Medicinal product| : + 1142139005 |Count of base of active ingredient| = *, + [0..0] 411116001 |Has manufactured dose form| = *, + [0..0] 774158006 |Has product name| = *`,value:"",note:"Medicinal products, containing only the provided ingredientes (close world assuption), with no information on form."},{title:"Medicinal product form only",type:"autocomplete",ecl:`<< 763158003 |Medicinal product| : + 1142139005 |Count of base of active ingredient| = *, + 411116001 |Has manufactured dose form| = *, + [0..0] 732943007 |Has basis of strength substance (attribute)| = *, + [0..0] 774158006 |Has product name| = *`,value:"",note:"Medicinal products, with form details, containing only the provided ingredientes (close world assuption)."}]}];var uK=(()=>{class t{constructor(){}getCodingSpec(){return dK}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var DJ=Ka(Qd());var Ly={};Ly.version="0.20.2";var vo=1200,lg=1252,Ki,JFe=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],qFe={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},aZ=function(t){JFe.indexOf(t)!=-1&&(lg=qFe[0]=t)};function eOe(){aZ(1252)}var Ny=function(t){vo=t,aZ(t)};function tOe(){Ny(1200),eOe()}function iOe(t){for(var i=[],e=0;e>1;++e)i[e]=String.fromCharCode(t.charCodeAt(2*e+1)+(t.charCodeAt(2*e)<<8));return i.join("")}var XT=function(i){return String.fromCharCode(i)},hK=function(i){return String.fromCharCode(i)};var hc=null,fK=!0,Ws="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function tS(t){for(var i="",e=0,r=0,n=0,a=0,s=0,o=0,d=0,l=0;l>2,r=t.charCodeAt(l++),s=(e&3)<<4|r>>4,n=t.charCodeAt(l++),o=(r&15)<<2|n>>6,d=n&63,isNaN(r)?o=d=64:isNaN(n)&&(d=64),i+=Ws.charAt(a)+Ws.charAt(s)+Ws.charAt(o)+Ws.charAt(d);return i}function nOe(t){for(var i="",e=0,r=0,n=0,a=0,s=0,o=0,d=0,l=0;l255&&(e=95),a=e>>2,r=t.charCodeAt(l++),r>255&&(r=95),s=(e&3)<<4|r>>4,n=t.charCodeAt(l++),n>255&&(n=95),o=(r&15)<<2|n>>6,d=n&63,isNaN(r)?o=d=64:isNaN(n)&&(d=64),i+=Ws.charAt(a)+Ws.charAt(s)+Ws.charAt(o)+Ws.charAt(d);return i}function rOe(t){for(var i="",e=0,r=0,n=0,a=0,s=0,o=0,d=0,l=0;l>2,r=t[l++],s=(e&3)<<4|r>>4,n=t[l++],o=(r&15)<<2|n>>6,d=n&63,isNaN(r)?o=d=64:isNaN(n)&&(d=64),i+=Ws.charAt(a)+Ws.charAt(s)+Ws.charAt(o)+Ws.charAt(d);return i}function Tu(t){var i="",e=0,r=0,n=0,a=0,s=0,o=0,d=0;if(t.slice(0,5)=="data:"){var l=t.slice(0,1024).indexOf(";base64,");l>-1&&(t=t.slice(l+8))}t=t.replace(/[^\w\+\/\=]/g,"");for(var l=0;l>4,i+=String.fromCharCode(e),o=Ws.indexOf(t.charAt(l++)),r=(s&15)<<4|o>>2,o!==64&&(i+=String.fromCharCode(r)),d=Ws.indexOf(t.charAt(l++)),n=(o&3)<<6|d,d!==64&&(i+=String.fromCharCode(n));return i}var dn=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),mc=function(){if(typeof Buffer<"u"){var t=!Buffer.from;if(!t)try{Buffer.from("foo","utf8")}catch{t=!0}return t?function(i,e){return e?new Buffer(i,e):new Buffer(i)}:Buffer.from.bind(Buffer)}return function(){}}(),By=function(){if(typeof Buffer>"u")return!1;var t=mc([65,0]);if(!t)return!1;var i=t.toString("utf16le");return i.length==1}();function tf(t){return dn?Buffer.alloc?Buffer.alloc(t):new Buffer(t):typeof Uint8Array<"u"?new Uint8Array(t):new Array(t)}function mK(t){return dn?Buffer.allocUnsafe?Buffer.allocUnsafe(t):new Buffer(t):typeof Uint8Array<"u"?new Uint8Array(t):new Array(t)}var po=function(i){return dn?mc(i,"binary"):i.split("").map(function(e){return e.charCodeAt(0)&255})};function yS(t){if(typeof ArrayBuffer>"u")return po(t);for(var i=new ArrayBuffer(t.length),e=new Uint8Array(i),r=0;r!=t.length;++r)e[r]=t.charCodeAt(r)&255;return i}function nf(t){if(Array.isArray(t))return t.map(function(r){return String.fromCharCode(r)}).join("");for(var i=[],e=0;e"u")throw new Error("Unsupported");return new Uint8Array(t)}var Fr=dn?function(t){return Buffer.concat(t.map(function(i){return Buffer.isBuffer(i)?i:mc(i)}))}:function(t){if(typeof Uint8Array<"u"){var i=0,e=0;for(i=0;i>6&31,n[e++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var o=t.charCodeAt(++a)&1023;n[e++]=240|s>>8&7,n[e++]=128|s>>2&63,n[e++]=128|o>>6&15|(s&3)<<4,n[e++]=128|o&63}else n[e++]=224|s>>12&15,n[e++]=128|s>>6&63,n[e++]=128|s&63;e>r&&(i.push(n.slice(0,e)),e=0,n=tf(65535),r=65530)}return i.push(n.slice(0,e)),Fr(i)}var eg=/\u0000/g,YT=/[\u0001-\u0006]/g;function tg(t){for(var i="",e=t.length-1;e>=0;)i+=t.charAt(e--);return i}function bl(t,i){var e=""+t;return e.length>=i?e:tr("0",i-e.length)+e}function HO(t,i){var e=""+t;return e.length>=i?e:tr(" ",i-e.length)+e}function iS(t,i){var e=""+t;return e.length>=i?e:e+tr(" ",i-e.length)}function oOe(t,i){var e=""+Math.round(t);return e.length>=i?e:tr("0",i-e.length)+e}function lOe(t,i){var e=""+t;return e.length>=i?e:tr("0",i-e.length)+e}var pK=Math.pow(2,32);function Zp(t,i){if(t>pK||t<-pK)return oOe(t,i);var e=Math.round(t);return lOe(e,i)}function nS(t,i){return i=i||0,t.length>=7+i&&(t.charCodeAt(i)|32)===103&&(t.charCodeAt(i+1)|32)===101&&(t.charCodeAt(i+2)|32)===110&&(t.charCodeAt(i+3)|32)===101&&(t.charCodeAt(i+4)|32)===114&&(t.charCodeAt(i+5)|32)===97&&(t.charCodeAt(i+6)|32)===108}var gK=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],_O=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function cOe(t){return t||(t={}),t[0]="General",t[1]="0",t[2]="0.00",t[3]="#,##0",t[4]="#,##0.00",t[9]="0%",t[10]="0.00%",t[11]="0.00E+00",t[12]="# ?/?",t[13]="# ??/??",t[14]="m/d/yy",t[15]="d-mmm-yy",t[16]="d-mmm",t[17]="mmm-yy",t[18]="h:mm AM/PM",t[19]="h:mm:ss AM/PM",t[20]="h:mm",t[21]="h:mm:ss",t[22]="m/d/yy h:mm",t[37]="#,##0 ;(#,##0)",t[38]="#,##0 ;[Red](#,##0)",t[39]="#,##0.00;(#,##0.00)",t[40]="#,##0.00;[Red](#,##0.00)",t[45]="mm:ss",t[46]="[h]:mm:ss",t[47]="mmss.0",t[48]="##0.0E+0",t[49]="@",t[56]='"\u4E0A\u5348/\u4E0B\u5348 "hh"\u6642"mm"\u5206"ss"\u79D2 "',t}var Kn={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"\u4E0A\u5348/\u4E0B\u5348 "hh"\u6642"mm"\u5206"ss"\u79D2 "'},vK={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},dOe={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function rS(t,i,e){for(var r=t<0?-1:1,n=t*r,a=0,s=1,o=0,d=1,l=0,c=0,h=Math.floor(n);li&&(l>i?(c=d,o=a):(c=l,o=s)),!e)return[0,r*o,c];var u=Math.floor(r*o/c);return[u,r*o-u*c,c]}function uOe(t){var i=t.toPrecision(16);if(i.indexOf("e")>-1){var e=i.slice(0,i.indexOf("e"));return e=e.indexOf(".")>-1?e.slice(0,e.slice(0,2)=="0."?17:16):e.slice(0,15)+tr("0",e.length-15),e+i.slice(i.indexOf("e"))}var r=i.indexOf(".")>-1?i.slice(0,i.slice(0,2)=="0."?17:16):i.slice(0,15)+tr("0",i.length-15);return Number(r)}function Jp(t,i,e){if(t>2958465||t<0)return null;t=uOe(t);var r=t|0,n=Math.floor(86400*(t-r)),a=0,s=[],o={D:r,T:n,u:86400*(t-r)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(o.u)<1e-6&&(o.u=0),i&&i.date1904&&(r+=1462),o.u>.9999&&(o.u=0,++n==86400&&(o.T=n=0,++r,++o.D)),r===60)s=e?[1317,10,29]:[1900,2,29],a=3;else if(r===0)s=e?[1317,8,29]:[1900,1,0],a=6;else{r>60&&--r;var d=new Date(1900,0,1);d.setDate(d.getDate()+r-1),s=[d.getFullYear(),d.getMonth()+1,d.getDate()],a=d.getDay(),r<60&&(a=(a+6)%7),e&&(a=gOe(d,s))}return o.y=s[0],o.m=s[1],o.d=s[2],o.S=n%60,n=Math.floor(n/60),o.M=n%60,n=Math.floor(n/60),o.H=n,o.q=a,o}function jO(t){return t.indexOf(".")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function hOe(t){return t.indexOf("E")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function fOe(t){var i=t<0?12:11,e=jO(t.toFixed(12));return e.length<=i||(e=t.toPrecision(10),e.length<=i)?e:t.toExponential(5)}function mOe(t){var i=jO(t.toFixed(11));return i.length>(t<0?12:11)||i==="0"||i==="-0"?t.toPrecision(6):i}function pOe(t){var i=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),e;return i>=-4&&i<=-1?e=t.toPrecision(10+i):Math.abs(i)<=9?e=fOe(t):i===10?e=t.toFixed(10).substr(0,12):e=mOe(t),jO(hOe(e.toUpperCase()))}function OO(t,i){switch(typeof t){case"string":return t;case"boolean":return t?"TRUE":"FALSE";case"number":return(t|0)===t?t.toString(10):pOe(t);case"undefined":return"";case"object":if(t==null)return"";if(t instanceof Date)return fd(14,Es(t,i&&i.date1904),i)}throw new Error("unsupported value in General format: "+t)}function gOe(t,i){i[0]-=581;var e=t.getDay();return t<60&&(e=(e+6)%7),e}function vOe(t,i,e,r){var n="",a=0,s=0,o=e.y,d,l=0;switch(t){case 98:o=e.y+543;case 121:switch(i.length){case 1:case 2:d=o%100,l=2;break;default:d=o%1e4,l=4;break}break;case 109:switch(i.length){case 1:case 2:d=e.m,l=i.length;break;case 3:return _O[e.m-1][1];case 5:return _O[e.m-1][0];default:return _O[e.m-1][2]}break;case 100:switch(i.length){case 1:case 2:d=e.d,l=i.length;break;case 3:return gK[e.q][0];default:return gK[e.q][1]}break;case 104:switch(i.length){case 1:case 2:d=1+(e.H+11)%12,l=i.length;break;default:throw"bad hour format: "+i}break;case 72:switch(i.length){case 1:case 2:d=e.H,l=i.length;break;default:throw"bad hour format: "+i}break;case 77:switch(i.length){case 1:case 2:d=e.M,l=i.length;break;default:throw"bad minute format: "+i}break;case 115:if(i!="s"&&i!="ss"&&i!=".0"&&i!=".00"&&i!=".000")throw"bad second format: "+i;return e.u===0&&(i=="s"||i=="ss")?bl(e.S,i.length):(r>=2?s=r===3?1e3:100:s=r===1?10:1,a=Math.round(s*(e.S+e.u)),a>=60*s&&(a=0),i==="s"?a===0?"0":""+a/s:(n=bl(a,2+r),i==="ss"?n.substr(0,2):"."+n.substr(2,i.length-1)));case 90:switch(i){case"[h]":case"[hh]":d=e.D*24+e.H;break;case"[m]":case"[mm]":d=(e.D*24+e.H)*60+e.M;break;case"[s]":case"[ss]":d=((e.D*24+e.H)*60+e.M)*60+(r==0?Math.round(e.S+e.u):e.S);break;default:throw"bad abstime format: "+i}l=i.length===3?1:2;break;case 101:d=o,l=1;break}var c=l>0?bl(d,l):"";return c}function wu(t){var i=3;if(t.length<=i)return t;for(var e=t.length%i,r=t.substr(0,e);e!=t.length;e+=i)r+=(r.length>0?",":"")+t.substr(e,i);return r}var oZ=/%/g;function yOe(t,i,e){var r=i.replace(oZ,""),n=i.length-r.length;return dd(t,r,e*Math.pow(10,2*n))+tr("%",n)}function xOe(t,i,e){for(var r=i.length-1;i.charCodeAt(r-1)===44;)--r;return dd(t,i.substr(0,r),e/Math.pow(10,3*(i.length-r)))}function lZ(t,i){var e,r=t.indexOf("E")-t.indexOf(".")-1;if(t.match(/^#+0.0E\+0$/)){if(i==0)return"0.0E+0";if(i<0)return"-"+lZ(t,-i);var n=t.indexOf(".");n===-1&&(n=t.indexOf("E"));var a=Math.floor(Math.log(i)*Math.LOG10E)%n;if(a<0&&(a+=n),e=(i/Math.pow(10,a)).toPrecision(r+1+(n+a)%n),e.indexOf("e")===-1){var s=Math.floor(Math.log(i)*Math.LOG10E);for(e.indexOf(".")===-1?e=e.charAt(0)+"."+e.substr(1)+"E+"+(s-e.length+a):e+="E+"+(s-a);e.substr(0,2)==="0.";)e=e.charAt(0)+e.substr(2,n)+"."+e.substr(2+n),e=e.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");e=e.replace(/\+-/,"-")}e=e.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,d,l,c){return d+l+c.substr(0,(n+a)%n)+"."+c.substr(a)+"E"})}else e=i.toExponential(r);return t.match(/E\+00$/)&&e.match(/e[+-]\d$/)&&(e=e.substr(0,e.length-1)+"0"+e.charAt(e.length-1)),t.match(/E\-/)&&e.match(/e\+/)&&(e=e.replace(/e\+/,"e")),e.replace("e","E")}var cZ=/# (\?+)( ?)\/( ?)(\d+)/;function bOe(t,i,e){var r=parseInt(t[4],10),n=Math.round(i*r),a=Math.floor(n/r),s=n-a*r,o=r;return e+(a===0?"":""+a)+" "+(s===0?tr(" ",t[1].length+1+t[4].length):HO(s,t[1].length)+t[2]+"/"+t[3]+bl(o,t[4].length))}function _Oe(t,i,e){return e+(i===0?"":""+i)+tr(" ",t[1].length+2+t[4].length)}var dZ=/^#*0*\.([0#]+)/,uZ=/\)[^)]*[0#]/,hZ=/\(###\) ###\\?-####/;function pa(t){for(var i="",e,r=0;r!=t.length;++r)switch(e=t.charCodeAt(r)){case 35:break;case 63:i+=" ";break;case 48:i+="0";break;default:i+=String.fromCharCode(e)}return i}function yK(t,i){var e=Math.pow(10,i);return""+Math.round(t*e)/e}function xK(t,i){var e=t-Math.floor(t),r=Math.pow(10,i);return i<(""+Math.round(e*r)).length?0:Math.round(e*r)}function wOe(t,i){return i<(""+Math.round((t-Math.floor(t))*Math.pow(10,i))).length?1:0}function COe(t){return t<2147483647&&t>-2147483648?""+(t>=0?t|0:t-1|0):""+Math.floor(t)}function Go(t,i,e){if(t.charCodeAt(0)===40&&!i.match(uZ)){var r=i.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return e>=0?Go("n",r,e):"("+Go("n",r,-e)+")"}if(i.charCodeAt(i.length-1)===44)return xOe(t,i,e);if(i.indexOf("%")!==-1)return yOe(t,i,e);if(i.indexOf("E")!==-1)return lZ(i,e);if(i.charCodeAt(0)===36)return"$"+Go(t,i.substr(i.charAt(1)==" "?2:1),e);var n,a,s,o,d=Math.abs(e),l=e<0?"-":"";if(i.match(/^00+$/))return l+Zp(d,i.length);if(i.match(/^[#?]+$/))return n=Zp(e,0),n==="0"&&(n=""),n.length>i.length?n:pa(i.substr(0,i.length-n.length))+n;if(a=i.match(cZ))return bOe(a,d,l);if(i.match(/^#+0+$/))return l+Zp(d,i.length-i.indexOf("0"));if(a=i.match(dZ))return n=yK(e,a[1].length).replace(/^([^\.]+)$/,"$1."+pa(a[1])).replace(/\.$/,"."+pa(a[1])).replace(/\.(\d*)$/,function(p,m){return"."+m+tr("0",pa(a[1]).length-m.length)}),i.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(i=i.replace(/^#+([0.])/,"$1"),a=i.match(/^(0*)\.(#*)$/))return l+yK(d,a[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=i.match(/^#{1,3},##0(\.?)$/))return l+wu(Zp(d,0));if(a=i.match(/^#,##0\.([#0]*0)$/))return e<0?"-"+Go(t,i,-e):wu(""+(Math.floor(e)+wOe(e,a[1].length)))+"."+bl(xK(e,a[1].length),a[1].length);if(a=i.match(/^#,#*,#0/))return Go(t,i.replace(/^#,#*,/,""),e);if(a=i.match(/^([0#]+)(\\?-([0#]+))+$/))return n=tg(Go(t,i.replace(/[\\-]/g,""),e)),s=0,tg(tg(i.replace(/\\/g,"")).replace(/[0#]/g,function(p){return s=0?lc("n",r,e):"("+lc("n",r,-e)+")"}if(i.charCodeAt(i.length-1)===44)return TOe(t,i,e);if(i.indexOf("%")!==-1)return SOe(t,i,e);if(i.indexOf("E")!==-1)return fZ(i,e);if(i.charCodeAt(0)===36)return"$"+lc(t,i.substr(i.charAt(1)==" "?2:1),e);var n,a,s,o,d=Math.abs(e),l=e<0?"-":"";if(i.match(/^00+$/))return l+bl(d,i.length);if(i.match(/^[#?]+$/))return n=""+e,e===0&&(n=""),n.length>i.length?n:pa(i.substr(0,i.length-n.length))+n;if(a=i.match(cZ))return _Oe(a,d,l);if(i.match(/^#+0+$/))return l+bl(d,i.length-i.indexOf("0"));if(a=i.match(dZ))return n=(""+e).replace(/^([^\.]+)$/,"$1."+pa(a[1])).replace(/\.$/,"."+pa(a[1])),n=n.replace(/\.(\d*)$/,function(p,m){return"."+m+tr("0",pa(a[1]).length-m.length)}),i.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(i=i.replace(/^#+([0.])/,"$1"),a=i.match(/^(0*)\.(#*)$/))return l+(""+d).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=i.match(/^#{1,3},##0(\.?)$/))return l+wu(""+d);if(a=i.match(/^#,##0\.([#0]*0)$/))return e<0?"-"+lc(t,i,-e):wu(""+e)+"."+tr("0",a[1].length);if(a=i.match(/^#,#*,#0/))return lc(t,i.replace(/^#,#*,/,""),e);if(a=i.match(/^([0#]+)(\\?-([0#]+))+$/))return n=tg(lc(t,i.replace(/[\\-]/g,""),e)),s=0,tg(tg(i.replace(/\\/g,"")).replace(/[0#]/g,function(p){return s-1||e=="\\"&&t.charAt(i+1)=="-"&&"0#".indexOf(t.charAt(i+2))>-1););break;case"?":for(;t.charAt(++i)===e;);break;case"*":++i,(t.charAt(i)==" "||t.charAt(i)=="*")&&++i;break;case"(":case")":++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;i-1;);break;case" ":++i;break;default:++i;break}return!1}function DOe(t,i,e,r){for(var n=[],a="",s=0,o="",d="t",l,c,h,u="H";s=12?t.charAt(s+2):o),m.t="T",u="h",s+=3):t.substr(s,5).toUpperCase()==="AM/PM"?(l!=null&&(m.v=l.H>=12?"PM":"AM"),m.t="T",s+=5,u="h"):t.substr(s,5).toUpperCase()==="\u4E0A\u5348/\u4E0B\u5348"?(l!=null&&(m.v=l.H>=12?"\u4E0B\u5348":"\u4E0A\u5348"),m.t="T",s+=5,u="h"):(m.t="t",++s),l==null&&m.t==="T")return"";n[n.length]=m,d=o;break;case"[":for(a=o;t.charAt(s++)!=="]"&&s-1&&(a=(a.match(/\$([^-\[\]]*)/)||[])[1]||"$",rf(t)||(n[n.length]={t:"t",v:a}));break;case".":if(l!=null){for(a=o;++s-1;)a+=o;n[n.length]={t:"n",v:a};break;case"?":for(a=o;t.charAt(++s)===o;)a+=o;n[n.length]={t:o,v:a},d=o;break;case"*":++s,(t.charAt(s)==" "||t.charAt(s)=="*")&&++s;break;case"(":case")":n[n.length]={t:r===1?"t":o,v:o},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(a=o;s-1;)a+=t.charAt(s);n[n.length]={t:"D",v:a};break;case" ":n[n.length]={t:o,v:o},++s;break;case"$":n[n.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=\u20ACacfijklopqrtuvwxzP".indexOf(o)===-1)throw new Error("unrecognized character "+o+" in "+t);n[n.length]={t:"t",v:o},++s;break}var g=0,v=0,y;for(s=n.length-1,d="t";s>=0;--s)switch(n[s].t){case"h":case"H":n[s].t=u,d="h",g<1&&(g=1);break;case"s":(y=n[s].v.match(/\.0+$/))&&(v=Math.max(v,y[0].length-1),g=4),g<3&&(g=3);case"d":case"y":case"e":d=n[s].t;break;case"M":d=n[s].t,g<2&&(g=2);break;case"m":d==="s"&&(n[s].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&n[s].v.match(/[Hh]/)&&(g=1),g<2&&n[s].v.match(/[Mm]/)&&(g=2),g<3&&n[s].v.match(/[Ss]/)&&(g=3)}var x;switch(g){case 0:break;case 1:case 2:case 3:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H),l.H>=24&&(l.H=0,++l.D,x=Jp(l.D),x.u=l.u,x.S=l.S,x.M=l.M,x.H=l.H,l=x);break;case 4:switch(v){case 1:l.u=Math.round(l.u*10)/10;break;case 2:l.u=Math.round(l.u*100)/100;break;case 3:l.u=Math.round(l.u*1e3)/1e3;break}l.u>=1&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H),l.H>=24&&(l.H=0,++l.D,x=Jp(l.D),x.u=l.u,x.S=l.S,x.M=l.M,x.H=l.H,l=x);break}var b="",_;for(s=0;s0){b.charCodeAt(0)==40?(w=i<0&&b.charCodeAt(0)===45?-i:i,T=dd("n",b,w)):(w=i<0&&r>1?-i:i,T=dd("n",b,w),w<0&&n[0]&&n[0].t=="t"&&(T=T.substr(1),n[0].v="-"+n[0].v)),_=T.length-1;var S=n.length;for(s=0;s-1){S=s;break}var E=n.length;if(S===n.length&&T.indexOf("E")===-1){for(s=n.length-1;s>=0;--s)n[s]==null||"n?".indexOf(n[s].t)===-1||(_>=n[s].v.length-1?(_-=n[s].v.length,n[s].v=T.substr(_+1,n[s].v.length)):_<0?n[s].v="":(n[s].v=T.substr(0,_+1),_=-1),n[s].t="t",E=s);_>=0&&E=0;--s)if(!(n[s]==null||"n?".indexOf(n[s].t)===-1)){for(c=n[s].v.indexOf(".")>-1&&s===S?n[s].v.indexOf(".")-1:n[s].v.length-1,C=n[s].v.substr(c+1);c>=0;--c)_>=0&&(n[s].v.charAt(c)==="0"||n[s].v.charAt(c)==="#")&&(C=T.charAt(_--)+C);n[s].v=C,n[s].t="t",E=s}for(_>=0&&E-1&&s===S?n[s].v.indexOf(".")+1:0,C=n[s].v.substr(0,c);c-1&&(w=r>1&&i<0&&s>0&&n[s-1].v==="-"?-i:i,n[s].v=dd(n[s].t,n[s].v,w),n[s].t="t");var D="";for(s=0;s!==n.length;++s)n[s]!=null&&(D+=n[s].v);return D}var bK=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function _K(t,i){if(i==null)return!1;var e=parseFloat(i[2]);switch(i[1]){case"=":if(t==e)return!0;break;case">":if(t>e)return!0;break;case"<":if(t":if(t!=e)return!0;break;case">=":if(t>=e)return!0;break;case"<=":if(t<=e)return!0;break}return!1}function MOe(t,i){var e=EOe(t),r=e.length,n=e[r-1].indexOf("@");if(r<4&&n>-1&&--r,e.length>4)throw new Error("cannot find right format for |"+e.join("|")+"|");if(typeof i!="number")return[4,e.length===4||n>-1?e[e.length-1]:"@"];switch(e.length){case 1:e=n>-1?["General","General","General",e[0]]:[e[0],e[0],e[0],"@"];break;case 2:e=n>-1?[e[0],e[0],e[0],e[1]]:[e[0],e[1],e[0],"@"];break;case 3:e=n>-1?[e[0],e[1],e[0],e[2]]:[e[0],e[1],e[2],"@"];break;case 4:break}var a=i>0?e[0]:i<0?e[1]:e[2];if(e[0].indexOf("[")===-1&&e[1].indexOf("[")===-1)return[r,a];if(e[0].match(/\[[=<>]/)!=null||e[1].match(/\[[=<>]/)!=null){var s=e[0].match(bK),o=e[1].match(bK);return _K(i,s)?[r,e[0]]:_K(i,o)?[r,e[1]]:[r,e[s!=null&&o!=null?2:1]]}return[r,a]}function fd(t,i,e){e==null&&(e={});var r="";switch(typeof t){case"string":t=="m/d/yy"&&e.dateNF?r=e.dateNF:r=t;break;case"number":t==14&&e.dateNF?r=e.dateNF:r=(e.table!=null?e.table:Kn)[t],r==null&&(r=e.table&&e.table[vK[t]]||Kn[vK[t]]),r==null&&(r=dOe[t]||"General");break}if(nS(r,0))return OO(i,e);i instanceof Date&&(i=Es(i,e.date1904));var n=MOe(r,i);if(nS(n[1]))return OO(i,e);if(i===!0)i="TRUE";else if(i===!1)i="FALSE";else if(i===""||i==null)return"";return DOe(n[1],i,e,n[0])}function pZ(t,i){if(typeof i!="number"){i=+i||-1;for(var e=0;e<392;++e){if(Kn[e]==null){i<0&&(i=e);continue}if(Kn[e]==t){i=e;break}}i<0&&(i=391)}return Kn[i]=t,i}function xS(t){for(var i=0;i!=392;++i)t[i]!==void 0&&pZ(t[i],i)}function bS(){Kn=cOe()}var sS=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function AOe(t){var i=typeof t=="number"?Kn[t]:t;return i=i.replace(sS,"(\\d+)"),sS.lastIndex=0,new RegExp("^"+i+"$")}function IOe(t,i,e){var r=-1,n=-1,a=-1,s=-1,o=-1,d=-1;(i.match(sS)||[]).forEach(function(h,u){var f=parseInt(e[u+1],10);switch(h.toLowerCase().charAt(0)){case"y":r=f;break;case"d":a=f;break;case"h":s=f;break;case"s":d=f;break;case"m":s>=0?o=f:n=f;break}}),sS.lastIndex=0,d>=0&&o==-1&&n>=0&&(o=n,n=-1);var l=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(a>=1?a:1)).slice(-2);l.length==7&&(l="0"+l),l.length==8&&(l="20"+l);var c=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(d>=0?d:0)).slice(-2);return s==-1&&o==-1&&d==-1?l:r==-1&&n==-1&&a==-1?c:l+"T"+c}var ROe={"d.m":"d\\.m"};function POe(t,i){return pZ(ROe[t]||t,i)}var wK=function(){var t={};t.version="1.2.0";function i(){for(var w=0,T=new Array(256),S=0;S!=256;++S)w=S,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,T[S]=w;return typeof Int32Array<"u"?new Int32Array(T):T}var e=i();function r(w){var T=0,S=0,E=0,D=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(E=0;E!=256;++E)D[E]=w[E];for(E=0;E!=256;++E)for(S=w[E],T=256+E;T<4096;T+=256)S=D[T]=S>>>8^w[S&255];var A=[];for(E=1;E!=16;++E)A[E-1]=typeof Int32Array<"u"&&typeof D.subarray=="function"?D.subarray(E*256,E*256+256):D.slice(E*256,E*256+256);return A}var n=r(e),a=n[0],s=n[1],o=n[2],d=n[3],l=n[4],c=n[5],h=n[6],u=n[7],f=n[8],p=n[9],m=n[10],g=n[11],v=n[12],y=n[13],x=n[14];function b(w,T){for(var S=T^-1,E=0,D=w.length;E>>8^e[(S^w.charCodeAt(E++))&255];return~S}function _(w,T){for(var S=T^-1,E=w.length-15,D=0;D>8&255]^v[w[D++]^S>>16&255]^g[w[D++]^S>>>24]^m[w[D++]]^p[w[D++]]^f[w[D++]]^u[w[D++]]^h[w[D++]]^c[w[D++]]^l[w[D++]]^d[w[D++]]^o[w[D++]]^s[w[D++]]^a[w[D++]]^e[w[D++]];for(E+=15;D>>8^e[(S^w[D++])&255];return~S}function C(w,T){for(var S=T^-1,E=0,D=w.length,A=0,M=0;E>>8^e[(S^A)&255]:A<2048?(S=S>>>8^e[(S^(192|A>>6&31))&255],S=S>>>8^e[(S^(128|A&63))&255]):A>=55296&&A<57344?(A=(A&1023)+64,M=w.charCodeAt(E++)&1023,S=S>>>8^e[(S^(240|A>>8&7))&255],S=S>>>8^e[(S^(128|A>>2&63))&255],S=S>>>8^e[(S^(128|M>>6&15|(A&3)<<4))&255],S=S>>>8^e[(S^(128|M&63))&255]):(S=S>>>8^e[(S^(224|A>>12&15))&255],S=S>>>8^e[(S^(128|A>>6&63))&255],S=S>>>8^e[(S^(128|A&63))&255]);return~S}return t.table=e,t.bstr=b,t.buf=_,t.str=C,t}(),An=function(){var i={};i.version="1.2.2";function e(se,me){for(var le=se.split("/"),fe=me.split("/"),pe=0,ge=0,Ie=Math.min(le.length,fe.length);pe>>1,se.write_shift(2,le);var fe=me.getFullYear()-1980;fe=fe<<4|me.getMonth()+1,fe=fe<<5|me.getDate(),se.write_shift(2,fe)}function s(se){var me=se.read_shift(2)&65535,le=se.read_shift(2)&65535,fe=new Date,pe=le&31;le>>>=5;var ge=le&15;le>>>=4,fe.setMilliseconds(0),fe.setFullYear(le+1980),fe.setMonth(ge-1),fe.setDate(pe);var Ie=me&31;me>>>=5;var Be=me&63;return me>>>=6,fe.setHours(me),fe.setMinutes(Be),fe.setSeconds(Ie<<1),fe}function o(se){ga(se,0);for(var me={},le=0;se.l<=se.length-4;){var fe=se.read_shift(2),pe=se.read_shift(2),ge=se.l+pe,Ie={};switch(fe){case 21589:le=se.read_shift(1),le&1&&(Ie.mtime=se.read_shift(4)),pe>5&&(le&2&&(Ie.atime=se.read_shift(4)),le&4&&(Ie.ctime=se.read_shift(4))),Ie.mtime&&(Ie.mt=new Date(Ie.mtime*1e3));break;case 1:{var Be=se.read_shift(4),De=se.read_shift(4);Ie.usz=De*Math.pow(2,32)+Be,Be=se.read_shift(4),De=se.read_shift(4),Ie.csz=De*Math.pow(2,32)+Be}break}se.l=ge,me[fe]=Ie}return me}var d;function l(){return d||(d=Iy)}function c(se,me){if(se[0]==80&&se[1]==75)return xg(se,me);if((se[0]|32)==109&&(se[1]|32)==105)return Iu(se,me);if(se.length<512)throw new Error("CFB file size "+se.length+" < 512");var le=3,fe=512,pe=0,ge=0,Ie=0,Be=0,De=0,Re=[],Pe=se.slice(0,512);ga(Pe,0);var lt=h(Pe);switch(le=lt[0],le){case 3:fe=512;break;case 4:fe=4096;break;case 0:if(lt[1]==0)return xg(se,me);default:throw new Error("Major Version: Expected 3 or 4 saw "+le)}fe!==512&&(Pe=se.slice(0,fe),ga(Pe,28));var ht=se.slice(0,fe);u(Pe,le);var Dt=Pe.read_shift(4,"i");if(le===3&&Dt!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Dt);Pe.l+=4,Ie=Pe.read_shift(4,"i"),Pe.l+=4,Pe.chk("00100000","Mini Stream Cutoff Size: "),Be=Pe.read_shift(4,"i"),pe=Pe.read_shift(4,"i"),De=Pe.read_shift(4,"i"),ge=Pe.read_shift(4,"i");for(var gt=-1,ct=0;ct<109&&(gt=Pe.read_shift(4,"i"),!(gt<0));++ct)Re[ct]=gt;var ii=f(se,fe);g(De,ge,ii,fe,Re);var un=y(ii,Ie,Re,fe);Ie0&&Be!==M&&(un[Be].name="!MiniFAT"),un[Re[0]].name="!FAT",un.fat_addrs=Re,un.ssz=fe;var Zr={},In=[],gr=[],vc=[];x(Ie,un,ii,In,pe,Zr,gr,Be),p(gr,vc,In),In.shift();var ku={FileIndex:gr,FullPaths:vc};return me&&me.raw&&(ku.raw={header:ht,sectors:ii}),ku}function h(se){if(se[se.l]==80&&se[se.l+1]==75)return[0,0];se.chk(R,"Header Signature: "),se.l+=16;var me=se.read_shift(2,"u");return[se.read_shift(2,"u"),me]}function u(se,me){var le=9;switch(se.l+=2,le=se.read_shift(2)){case 9:if(me!=3)throw new Error("Sector Shift: Expected 9 saw "+le);break;case 12:if(me!=4)throw new Error("Sector Shift: Expected 12 saw "+le);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+le)}se.chk("0600","Mini Sector Shift: "),se.chk("000000000000","Reserved: ")}function f(se,me){for(var le=Math.ceil(se.length/me)-1,fe=[],pe=1;pe0&&Ie>=0;)ge.push(me.slice(Ie*A,Ie*A+A)),pe-=A,Ie=qh(le,Ie*4);return ge.length===0?Ae(0):Fr(ge).slice(0,se.size)}function g(se,me,le,fe,pe){var ge=M;if(se===M){if(me!==0)throw new Error("DIFAT chain shorter than expected")}else if(se!==-1){var Ie=le[se],Be=(fe>>>2)-1;if(!Ie)return;for(var De=0;De=1&&g(qh(Ie,fe-4),me-1,le,fe,pe)}}function v(se,me,le,fe,pe){var ge=[],Ie=[];pe||(pe=[]);var Be=fe-1,De=0,Re=0;for(De=me;De>=0;){pe[De]=!0,ge[ge.length]=De,Ie.push(se[De]);var Pe=le[Math.floor(De*4/fe)];if(Re=De*4&Be,fe<4+Re)throw new Error("FAT boundary crossed: "+De+" 4 "+fe);if(!se[Pe])break;De=qh(se[Pe],Re)}return{nodes:ge,data:AK([Ie])}}function y(se,me,le,fe){var pe=se.length,ge=[],Ie=[],Be=[],De=[],Re=fe-1,Pe=0,lt=0,ht=0,Dt=0;for(Pe=0;Pe=pe&&(ht-=pe),!Ie[ht]){De=[];var gt=[];for(lt=ht;lt>=0;){gt[lt]=!0,Ie[lt]=!0,Be[Be.length]=lt,De.push(se[lt]);var ct=le[Math.floor(lt*4/fe)];if(Dt=lt*4&Re,fe<4+Dt)throw new Error("FAT boundary crossed: "+lt+" 4 "+fe);if(!se[ct]||(lt=qh(se[ct],Dt),gt[lt]))break}ge[ht]={nodes:Be,data:AK([De])}}return ge}function x(se,me,le,fe,pe,ge,Ie,Be){for(var De=0,Re=fe.length?2:0,Pe=me[se].data,lt=0,ht=0,Dt;lt0&&De!==M&&(me[De].name="!StreamData")):ct.size>=4096?(ct.storage="fat",me[ct.start]===void 0&&(me[ct.start]=v(le,ct.start,me.fat_addrs,me.ssz)),me[ct.start].name=ct.name,ct.content=me[ct.start].data.slice(0,ct.size)):(ct.storage="minifat",ct.size<0?ct.size=0:De!==M&&ct.start!==M&&me[De]&&(ct.content=m(ct,me[De].data,(me[Be]||{}).data))),ct.content&&ga(ct.content,0),ge[Dt]=ct,Ie.push(ct)}}function b(se,me){return new Date((ls(se,me+4)/1e7*Math.pow(2,32)+ls(se,me)/1e7-11644473600)*1e3)}function _(se,me){return l(),c(d.readFileSync(se),me)}function C(se,me){var le=me&&me.type;switch(le||dn&&Buffer.isBuffer(se)&&(le="buffer"),le||"base64"){case"file":return _(se,me);case"base64":return c(po(Tu(se)),me);case"binary":return c(po(se),me)}return c(se,me)}function w(se,me){var le=me||{},fe=le.root||"Root Entry";if(se.FullPaths||(se.FullPaths=[]),se.FileIndex||(se.FileIndex=[]),se.FullPaths.length!==se.FileIndex.length)throw new Error("inconsistent CFB structure");se.FullPaths.length===0&&(se.FullPaths[0]=fe+"/",se.FileIndex[0]={name:fe,type:5}),le.CLSID&&(se.FileIndex[0].clsid=le.CLSID),T(se)}function T(se){var me="Sh33tJ5";if(!An.find(se,"/"+me)){var le=Ae(4);le[0]=55,le[1]=le[3]=50,le[2]=54,se.FileIndex.push({name:me,type:2,content:le,size:4,L:69,R:69,C:69}),se.FullPaths.push(se.FullPaths[0]+me),S(se)}}function S(se,me){w(se);for(var le=!1,fe=!1,pe=se.FullPaths.length-1;pe>=0;--pe){var ge=se.FileIndex[pe];switch(ge.type){case 0:fe?le=!0:(se.FileIndex.pop(),se.FullPaths.pop());break;case 1:case 2:case 5:fe=!0,isNaN(ge.R*ge.L*ge.C)&&(le=!0),ge.R>-1&&ge.L>-1&&ge.R==ge.L&&(le=!0);break;default:le=!0;break}}if(!(!le&&!me)){var Ie=new Date(1987,1,19),Be=0,De=Object.create?Object.create(null):{},Re=[];for(pe=0;pe1?1:-1,lt.size=0,lt.type=5;else if(ht.slice(-1)=="/"){for(Be=pe+1;Be=Re.length?-1:Be,Be=pe+1;Be=Re.length?-1:Be,lt.type=1}else r(se.FullPaths[pe+1]||"")==r(ht)&&(lt.R=pe+1),lt.type=2}}}function E(se,me){var le=me||{};if(le.fileType=="mad")return nx(se,le);switch(S(se),le.fileType){case"zip":return Au(se,le)}var fe=function(Dt){for(var gt=0,ct=0,ii=0;ii0&&(Zr<4096?gt+=Zr+63>>6:ct+=Zr+511>>9)}}for(var In=Dt.FullPaths.length+3>>2,gr=gt+7>>3,vc=gt+127>>7,ku=gr+ct+In+vc,Cl=ku+127>>7,xf=Cl<=109?0:Math.ceil((Cl-109)/127);ku+Cl+xf+127>>7>Cl;)xf=++Cl<=109?0:Math.ceil((Cl-109)/127);var _o=[1,xf,Cl,vc,In,ct,gt,0];return Dt.FileIndex[0].size=gt<<6,_o[7]=(Dt.FileIndex[0].start=_o[0]+_o[1]+_o[2]+_o[3]+_o[4]+_o[5])+(_o[6]+7>>3),_o}(se),pe=Ae(fe[7]<<9),ge=0,Ie=0;{for(ge=0;ge<8;++ge)pe.write_shift(1,L[ge]);for(ge=0;ge<8;++ge)pe.write_shift(2,0);for(pe.write_shift(2,62),pe.write_shift(2,3),pe.write_shift(2,65534),pe.write_shift(2,9),pe.write_shift(2,6),ge=0;ge<3;++ge)pe.write_shift(2,0);for(pe.write_shift(4,0),pe.write_shift(4,fe[2]),pe.write_shift(4,fe[0]+fe[1]+fe[2]+fe[3]-1),pe.write_shift(4,0),pe.write_shift(4,4096),pe.write_shift(4,fe[3]?fe[0]+fe[1]+fe[2]-1:M),pe.write_shift(4,fe[3]),pe.write_shift(-4,fe[1]?fe[0]-1:M),pe.write_shift(4,fe[1]),ge=0;ge<109;++ge)pe.write_shift(-4,ge>9)));for(Be(fe[6]+7>>3);pe.l&511;)pe.write_shift(-4,O.ENDOFCHAIN);for(Ie=ge=0,De=0;De=4096)&&(Pe.start=Ie,Be(Re+63>>6)));for(;pe.l&511;)pe.write_shift(-4,O.ENDOFCHAIN);for(ge=0;ge31&&(console.error("Name "+ht+" will be truncated to "+ht.slice(0,31)),ht=ht.slice(0,31)),Re=2*(ht.length+1),pe.write_shift(64,ht,"utf16le"),pe.write_shift(2,Re),pe.write_shift(1,Pe.type),pe.write_shift(1,Pe.color),pe.write_shift(-4,Pe.L),pe.write_shift(-4,Pe.R),pe.write_shift(-4,Pe.C),Pe.clsid)pe.write_shift(16,Pe.clsid,"hex");else for(De=0;De<4;++De)pe.write_shift(4,0);pe.write_shift(4,Pe.state||0),pe.write_shift(4,0),pe.write_shift(4,0),pe.write_shift(4,0),pe.write_shift(4,0),pe.write_shift(4,Pe.start),pe.write_shift(4,Pe.size),pe.write_shift(4,0)}for(ge=1;ge=4096)if(pe.l=Pe.start+1<<9,dn&&Buffer.isBuffer(Pe.content))Pe.content.copy(pe,pe.l,0,Pe.size),pe.l+=Pe.size+511&-512;else{for(De=0;De0&&Pe.size<4096)if(dn&&Buffer.isBuffer(Pe.content))Pe.content.copy(pe,pe.l,0,Pe.size),pe.l+=Pe.size+63&-64;else{for(De=0;De>16|me>>8|me)&255}for(var q=typeof Uint8Array<"u",ie=q?new Uint8Array(256):[],re=0;re<256;++re)ie[re]=W(re);function oe(se,me){var le=ie[se&255];return me<=8?le>>>8-me:(le=le<<8|ie[se>>8&255],me<=16?le>>>16-me:(le=le<<8|ie[se>>16&255],le>>>24-me))}function ve(se,me){var le=me&7,fe=me>>>3;return(se[fe]|(le<=6?0:se[fe+1]<<8))>>>le&3}function _e(se,me){var le=me&7,fe=me>>>3;return(se[fe]|(le<=5?0:se[fe+1]<<8))>>>le&7}function ye(se,me){var le=me&7,fe=me>>>3;return(se[fe]|(le<=4?0:se[fe+1]<<8))>>>le&15}function xe(se,me){var le=me&7,fe=me>>>3;return(se[fe]|(le<=3?0:se[fe+1]<<8))>>>le&31}function st(se,me){var le=me&7,fe=me>>>3;return(se[fe]|(le<=1?0:se[fe+1]<<8))>>>le&127}function at(se,me,le){var fe=me&7,pe=me>>>3,ge=(1<>>fe;return le<8-fe||(Ie|=se[pe+1]<<8-fe,le<16-fe)||(Ie|=se[pe+2]<<16-fe,le<24-fe)||(Ie|=se[pe+3]<<24-fe),Ie&ge}function Ge(se,me,le){var fe=me&7,pe=me>>>3;return fe<=5?se[pe]|=(le&7)<>8-fe),me+3}function ke(se,me,le){var fe=me&7,pe=me>>>3;return le=(le&1)<>>3;return le<<=fe,se[pe]|=le&255,le>>>=8,se[pe+1]=le,me+8}function ot(se,me,le){var fe=me&7,pe=me>>>3;return le<<=fe,se[pe]|=le&255,le>>>=8,se[pe+1]=le&255,se[pe+2]=le>>>8,me+16}function Nt(se,me){var le=se.length,fe=2*le>me?2*le:me+5,pe=0;if(le>=me)return se;if(dn){var ge=mK(fe);if(se.copy)se.copy(ge);else for(;pe>fe-lt,Ie=(1<=0;--Ie)me[Be|Ie<0;)De[De.l++]=Be[Re++]}return De.l}function Ie(Be,De){for(var Re=0,Pe=0,lt=q?new Uint16Array(32768):[];Pe0;)De[De.l++]=Be[Pe++];Re=De.l*8;continue}Re=Ge(De,Re,+(Pe+ht==Be.length)+2);for(var Dt=0;ht-- >0;){var gt=Be[Pe];Dt=(Dt<<5^gt)&32767;var ct=-1,ii=0;if((ct=lt[Dt])&&(ct|=Pe&-32768,ct>Pe&&(ct-=32768),ct2){gt=pe[ii],gt<=22?Re=qe(De,Re,ie[gt+1]>>1)-1:(qe(De,Re,3),Re+=5,qe(De,Re,ie[gt-23]>>5),Re+=3);var un=gt<8?0:gt-4>>2;un>0&&(ot(De,Re,ii-Z[gt]),Re+=un),gt=me[Pe-ct],Re=qe(De,Re,ie[gt]>>3),Re-=3;var Zr=gt<4?0:gt-2>>1;Zr>0&&(ot(De,Re,Pe-ct-J[gt]),Re+=Zr);for(var In=0;In>8-gt;for(var ct=(1<<7-gt)-1;ct>=0;--ct)Ei[Dt|ct<>>=3){case 16:for(ge=3+ve(se,me),me+=2,Dt=ii[ii.length-1];ge-- >0;)ii.push(Dt);break;case 17:for(ge=3+_e(se,me),me+=3;ge-- >0;)ii.push(0);break;case 18:for(ge=11+st(se,me),me+=7;ge-- >0;)ii.push(0);break;default:ii.push(Dt),De>>0,Be=0,De=0;!(fe&1);){if(fe=_e(se,le),le+=3,fe>>>1)fe>>1==1?(Be=9,De=5):(le=Cr(se,le),Be=Br,De=Qs);else{le&7&&(le+=8-(le&7));var Re=se[le>>>3]|se[(le>>>3)+1]<<8;if(le+=32,Re>0)for(!me&&Ie0;)pe[ge++]=se[le>>>3],le+=8;continue}for(;;){!me&&Ie>>1==1?Jt[Pe]:ji[Pe];if(le+=lt&15,lt>>>=4,!(lt>>>8&255))pe[ge++]=lt;else{if(lt==256)break;lt-=257;var ht=lt<8?0:lt-4>>2;ht>5&&(ht=0);var Dt=ge+Z[lt];ht>0&&(Dt+=at(se,le,ht),le+=ht),Pe=at(se,le,De),lt=fe>>>1==1?Et[Pe]:jt[Pe],le+=lt&15,lt>>>=4;var gt=lt<4?0:lt-2>>1,ct=J[lt];for(gt>0&&(ct+=at(se,le,gt),le+=gt),!me&&Ie>>3]:[pe.slice(0,ge),le+7>>>3]}function Ks(se,me){var le=se.slice(se.l||0),fe=ds(le,me);return se.l+=fe[1],fe[0]}function gf(se,me){if(se)typeof console<"u"&&console.error(me);else throw new Error(me)}function xg(se,me){var le=se;ga(le,0);var fe=[],pe=[],ge={FileIndex:fe,FullPaths:pe};w(ge,{root:me.root});for(var Ie=le.length-4;(le[Ie]!=80||le[Ie+1]!=75||le[Ie+2]!=5||le[Ie+3]!=6)&&Ie>=0;)--Ie;le.l=Ie+4,le.l+=4;var Be=le.read_shift(2);le.l+=6;var De=le.read_shift(4);for(le.l=De,Ie=0;Ie0&&(le=le.slice(0,le.length-1),le=le.slice(0,le.lastIndexOf("/")+1),ge.slice(0,le.length)!=le););var Ie=(fe[1]||"").match(/boundary="(.*?)"/);if(!Ie)throw new Error("MAD cannot find boundary");var Be="--"+(Ie[1]||""),De=[],Re=[],Pe={FileIndex:De,FullPaths:Re};w(Pe);var lt,ht=0;for(pe=0;pe=32&&Dt<128&&++lt;var ct=lt>=ht*4/5;pe.push(fe),pe.push("Content-Location: "+(le.root||"file:///C:/SheetJS/")+Ie),pe.push("Content-Transfer-Encoding: "+(ct?"quoted-printable":"base64")),pe.push("Content-Type: "+bg(Be,Ie)),pe.push(""),pe.push(ct?tx(Pe):gc(Pe))}return pe.push(fe+`--\r +`),pe.join(`\r +`)}function us(se){var me={};return w(me,se),me}function yf(se,me,le,fe){var pe=fe&&fe.unsafe;pe||w(se);var ge=!pe&&An.find(se,me);if(!ge){var Ie=se.FullPaths[0];me.slice(0,Ie.length)==Ie?Ie=me:(Ie.slice(-1)!="/"&&(Ie+="/"),Ie=(Ie+me).replace("//","/")),ge={name:n(me),type:2},se.FileIndex.push(ge),se.FullPaths.push(Ie),pe||An.utils.cfb_gc(se)}return ge.content=le,ge.size=le?le.length:0,fe&&(fe.CLSID&&(ge.clsid=fe.CLSID),fe.mt&&(ge.mt=fe.mt),fe.ct&&(ge.ct=fe.ct)),ge}function Ru(se,me){w(se);var le=An.find(se,me);if(le){for(var fe=0;fe=60&&t<61)return t;var i=new Date;return i.setTime((t>60?t:t+1)*24*60*60*1e3+gZ),i}var LOe=/^(\d+):(\d+)(:\d+)?(\.\d+)?$/,NOe=/^(\d+)-(\d+)-(\d+)$/,vZ=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/;function $a(t,i){if(t instanceof Date)return t;var e=t.match(LOe);if(e)return new Date((i?OOe:FOe)+((parseInt(e[1],10)*60+parseInt(e[2],10))*60+(e[3]?parseInt(e[3].slice(1),10):0))*1e3+(e[4]?parseInt((e[4]+"000").slice(1,4),10):0));if(e=t.match(NOe),e)return new Date(Date.UTC(+e[1],+e[2]-1,+e[3],0,0,0,0));if(e=t.match(vZ),e)return new Date(Date.UTC(+e[1],+e[2]-1,+e[3],+e[4],+e[5],e[6]&&parseInt(e[6].slice(1),10)||0,e[7]&&parseInt((e[7]+"0000").slice(1,4),10)||0));var r=new Date(t);return r}function XO(t,i){if(dn&&Buffer.isBuffer(t)){if(i&&By){if(t[0]==255&&t[1]==254)return cd(t.slice(2).toString("utf16le"));if(t[1]==254&&t[2]==255)return cd(iOe(t.slice(2).toString("binary")))}return t.toString("binary")}if(typeof TextDecoder<"u")try{if(i){if(t[0]==255&&t[1]==254)return cd(new TextDecoder("utf-16le").decode(t.slice(2)));if(t[0]==254&&t[1]==255)return cd(new TextDecoder("utf-16be").decode(t.slice(2)))}var e={"\u20AC":"\x80","\u201A":"\x82",\u0192:"\x83","\u201E":"\x84","\u2026":"\x85","\u2020":"\x86","\u2021":"\x87","\u02C6":"\x88","\u2030":"\x89",\u0160:"\x8A","\u2039":"\x8B",\u0152:"\x8C",\u017D:"\x8E","\u2018":"\x91","\u2019":"\x92","\u201C":"\x93","\u201D":"\x94","\u2022":"\x95","\u2013":"\x96","\u2014":"\x97","\u02DC":"\x98","\u2122":"\x99",\u0161:"\x9A","\u203A":"\x9B",\u0153:"\x9C",\u017E:"\x9E",\u0178:"\x9F"};return Array.isArray(t)&&(t=new Uint8Array(t)),new TextDecoder("latin1").decode(t).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(a){return e[a]||a})}catch{}var r=[],n=0;try{for(n=0;n3&&jOe.indexOf(i)==-1)return a}else if(i.replace(/[ap]m?/,"").match(/[a-z]/))return a;return s<0||s>8099||t.match(/[^-0-9:,\/\\\ ]/)?a:n}function cg(t){return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())}function wS(t){return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}function yi(t,i,e){if(t.FullPaths){if(typeof e=="string"){var r;return dn?r=mc(e):r=aOe(e),An.utils.cfb_add(t,i,r)}An.utils.cfb_add(t,i,e)}else t.file(i,e)}function YO(){return An.utils.cfb_new()}var Nr=`\r +`;var WOe={""":'"',"'":"'",">":">","<":"<","&":"&"},$O=WO(WOe);var QO=/[&<>'"]/g,XOe=/[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;function xi(t){var i=t+"";return i.replace(QO,function(e){return $O[e]}).replace(XOe,function(e){return"_x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+"_"})}function SK(t){return xi(t).replace(/ /g,"_x0020_")}var yZ=/[\u0000-\u001f]/g;function wO(t){var i=t+"";return i.replace(QO,function(e){return $O[e]}).replace(/\n/g,"
").replace(yZ,function(e){return"&#x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+";"})}function YOe(t){var i=t+"";return i.replace(QO,function(e){return $O[e]}).replace(yZ,function(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"})}function $Oe(t){return t.replace(/(\r\n|[\r\n])/g," ")}function QOe(t){switch(t){case 1:case!0:case"1":case"true":return!0;case 0:case!1:case"0":case"false":return!1}return!1}function CO(t){for(var i="",e=0,r=0,n=0,a=0,s=0,o=0;e191&&r<224){s=(r&31)<<6,s|=n&63,i+=String.fromCharCode(s);continue}if(a=t.charCodeAt(e++),r<240){i+=String.fromCharCode((r&15)<<12|(n&63)<<6|a&63);continue}s=t.charCodeAt(e++),o=((r&7)<<18|(n&63)<<12|(a&63)<<6|s&63)-65536,i+=String.fromCharCode(55296+(o>>>10&1023)),i+=String.fromCharCode(56320+(o&1023))}return i}function EK(t){var i=tf(2*t.length),e,r,n=1,a=0,s=0,o;for(r=0;r>>10&1023),e=56320+(e&1023)),s!==0&&(i[a++]=s&255,i[a++]=s>>>8,s=0),i[a++]=e%256,i[a++]=e>>>8;return i.slice(0,a).toString("ucs2")}function DK(t){return mc(t,"binary").toString("utf8")}var $T="foo bar baz\xE2\x98\x83\xF0\x9F\x8D\xA3",ng=dn&&(DK($T)==CO($T)&&DK||EK($T)==CO($T)&&EK)||CO,cd=dn?function(t){return mc(t,"utf8").toString("binary")}:function(t){for(var i=[],e=0,r=0,n=0;e>6))),i.push(String.fromCharCode(128+(r&63)));break;case(r>=55296&&r<57344):r-=55296,n=t.charCodeAt(e++)-56320+(r<<10),i.push(String.fromCharCode(240+(n>>18&7))),i.push(String.fromCharCode(144+(n>>12&63))),i.push(String.fromCharCode(128+(n>>6&63))),i.push(String.fromCharCode(128+(n&63)));break;default:i.push(String.fromCharCode(224+(r>>12))),i.push(String.fromCharCode(128+(r>>6&63))),i.push(String.fromCharCode(128+(r&63)))}return i.join("")},KOe=function(){var t=[["nbsp"," "],["middot","\xB7"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(i){return[new RegExp("&"+i[0]+";","ig"),i[1]]});return function(e){for(var r=e.replace(/^[\t\n\r ]+/,"").replace(/(^|[^\t\n\r ])[\t\n\r ]+$/,"$1").replace(/>\s+/g,">").replace(/\b\s+/g,` +`).replace(/<[^<>]*>/g,""),n=0;n"+i+""}function Vy(t){return Or(t).map(function(i){return" "+i+'="'+t[i]+'"'}).join("")}function ft(t,i,e){return"<"+t+(e!=null?Vy(e):"")+(i!=null?(i.match(xZ)?' xml:space="preserve"':"")+">"+i+""}function LO(t,i){try{return t.toISOString().replace(/\.\d*/,"")}catch(e){if(i)throw e}return""}function ZOe(t,i){switch(typeof t){case"string":var e=ft("vt:lpwstr",xi(t));return i&&(e=e.replace(/"/g,"_x0022_")),e;case"number":return ft((t|0)==t?"vt:i4":"vt:r8",xi(String(t)));case"boolean":return ft("vt:bool",t?"true":"false")}if(t instanceof Date)return ft("vt:filetime",LO(t));throw new Error("Unable to serialize "+t)}var cs={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},ug=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],go={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function JOe(t,i){for(var e=1-2*(t[i+7]>>>7),r=((t[i+7]&127)<<4)+(t[i+6]>>>4&15),n=t[i+6]&15,a=5;a>=0;--a)n=n*256+t[i+a];return r==2047?n==0?e*(1/0):NaN:(r==0?r=-1022:(r-=1023,n+=Math.pow(2,52)),e*Math.pow(2,r-52)*n)}function qOe(t,i,e){var r=(i<0||1/i==-1/0?1:0)<<7,n=0,a=0,s=r?-i:i;isFinite(s)?s==0?n=a=0:(n=Math.floor(Math.log(s)/Math.LN2),a=s*Math.pow(2,52-n),n<=-1023&&(!isFinite(a)||a>4|r}var MK=function(t){for(var i=[],e=10240,r=0;r0&&Buffer.isBuffer(t[0][0])?Buffer.concat(t[0].map(function(i){return Buffer.isBuffer(i)?i:mc(i)})):MK(t)}:MK,IK=function(t,i,e){for(var r=[],n=i;n0?hg(t,i+4,i+4+e-1):""},KO=_Z,wZ=function(t,i){var e=ls(t,i);return e>0?hg(t,i+4,i+4+e-1):""},ZO=wZ,CZ=function(t,i){var e=2*ls(t,i);return e>0?hg(t,i+4,i+4+e-1):""},JO=CZ,TZ=function(i,e){var r=ls(i,e);return r>0?CS(i,e+4,e+4+r):""},qO=TZ,SZ=function(t,i){var e=ls(t,i);return e>0?hg(t,i+4,i+4+e):""},e4=SZ,EZ=function(t,i){return JOe(t,i)},oS=EZ,t4=function(i){return Array.isArray(i)||typeof Uint8Array<"u"&&i instanceof Uint8Array};dn&&(KO=function(i,e){if(!Buffer.isBuffer(i))return _Z(i,e);var r=i.readUInt32LE(e);return r>0?i.toString("utf8",e+4,e+4+r-1):""},ZO=function(i,e){if(!Buffer.isBuffer(i))return wZ(i,e);var r=i.readUInt32LE(e);return r>0?i.toString("utf8",e+4,e+4+r-1):""},JO=function(i,e){if(!Buffer.isBuffer(i)||!By)return CZ(i,e);var r=2*i.readUInt32LE(e);return i.toString("utf16le",e+4,e+4+r-1)},qO=function(i,e){if(!Buffer.isBuffer(i)||!By)return TZ(i,e);var r=i.readUInt32LE(e);return i.toString("utf16le",e+4,e+4+r)},e4=function(i,e){if(!Buffer.isBuffer(i))return SZ(i,e);var r=i.readUInt32LE(e);return i.toString("utf8",e+4,e+4+r)},oS=function(i,e){return Buffer.isBuffer(i)?i.readDoubleLE(e):EZ(i,e)},t4=function(i){return Buffer.isBuffer(i)||Array.isArray(i)||typeof Uint8Array<"u"&&i instanceof Uint8Array});function e4e(){CS=function(t,i,e){return Ki.utils.decode(1200,t.slice(i,e)).replace(eg,"")},hg=function(t,i,e){return Ki.utils.decode(65001,t.slice(i,e))},KO=function(t,i){var e=ls(t,i);return e>0?Ki.utils.decode(lg,t.slice(i+4,i+4+e-1)):""},ZO=function(t,i){var e=ls(t,i);return e>0?Ki.utils.decode(vo,t.slice(i+4,i+4+e-1)):""},JO=function(t,i){var e=2*ls(t,i);return e>0?Ki.utils.decode(1200,t.slice(i+4,i+4+e-1)):""},qO=function(t,i){var e=ls(t,i);return e>0?Ki.utils.decode(1200,t.slice(i+4,i+4+e)):""},e4=function(t,i){var e=ls(t,i);return e>0?Ki.utils.decode(65001,t.slice(i+4,i+4+e)):""}}typeof Ki<"u"&&e4e();var qp=function(t,i){return t[i]},Ry=function(t,i){return t[i+1]*256+t[i]},t4e=function(t,i){var e=t[i+1]*256+t[i];return e<32768?e:(65535-e+1)*-1},ls=function(t,i){return t[i+3]*(1<<24)+(t[i+2]<<16)+(t[i+1]<<8)+t[i]},qh=function(t,i){return t[i+3]<<24|t[i+2]<<16|t[i+1]<<8|t[i]},i4e=function(t,i){return t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]};function Py(t,i){var e="",r,n,a=[],s,o,d,l;switch(i){case"dbcs":if(l=this.l,dn&&Buffer.isBuffer(this)&&By)e=this.slice(this.l,this.l+2*t).toString("utf16le");else for(d=0;d0?qh:i4e)(this,this.l),this.l+=4,r):(n=ls(this,this.l),this.l+=4,n);case 8:case-8:if(i==="f")return t==8?n=oS(this,this.l):n=oS([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,n;t=8;case 16:e=bZ(this,this.l,t);break}}return this.l+=t,e}var n4e=function(t,i,e){t[e]=i&255,t[e+1]=i>>>8&255,t[e+2]=i>>>16&255,t[e+3]=i>>>24&255},r4e=function(t,i,e){t[e]=i&255,t[e+1]=i>>8&255,t[e+2]=i>>16&255,t[e+3]=i>>24&255},s4e=function(t,i,e){t[e]=i&255,t[e+1]=i>>>8&255};function a4e(t,i,e){var r=0,n=0;if(e==="dbcs"){for(n=0;n!=i.length;++n)s4e(this,i.charCodeAt(n),this.l+2*n);r=2*i.length}else if(e==="sbcs"||e=="cpstr")if(typeof Ki<"u"&&lg==874){for(n=0;n!=i.length;++n){var a=Ki.utils.encode(lg,i.charAt(n));this[this.l+n]=a[0]}r=i.length}else if(typeof Ki<"u"&&e=="cpstr"){if(a=Ki.utils.encode(vo,i),a.length==i.length)for(n=0;n>8}for(;this.l>>=8,this[this.l+1]=i&255;break;case 3:r=3,this[this.l]=i&255,i>>>=8,this[this.l+1]=i&255,i>>>=8,this[this.l+2]=i&255;break;case 4:r=4,n4e(this,i,this.l);break;case 8:if(r=8,e==="f"){qOe(this,i,this.l);break}case 16:break;case-4:r=4,r4e(this,i,this.l);break}return this.l+=r,this}function DZ(t,i){var e=bZ(this,this.l,t.length>>1);if(e!==t)throw new Error(i+"Expected "+t+" saw "+e);this.l+=t.length>>1}function ga(t,i){t.l=i,t.read_shift=Py,t.chk=DZ,t.write_shift=a4e}function fc(t,i){t.l+=i}function Ae(t){var i=tf(t);return ga(i,0),i}function Xs(){var t=[],i=dn?256:2048,e=function(l){var c=Ae(l);return ga(c,0),c},r=e(i),n=function(){r&&(r.l&&(r.length>r.l&&(r=r.slice(0,r.l),r.l=r.length),r.length>0&&t.push(r)),r=null)},a=function(l){return r&&l=128?1:0)+1,r>=128&&++a,r>=16384&&++a,r>=2097152&&++a;var s=t.next(a);n<=127?s.write_shift(1,n):(s.write_shift(1,(n&127)+128),s.write_shift(1,n>>7));for(var o=0;o!=4;++o)if(r>=128)s.write_shift(1,(r&127)+128),r>>=7;else{s.write_shift(1,r);break}r>0&&t4(e)&&t.push(e)}}function ky(t,i,e){var r=$s(t);if(i.s?(r.cRel&&(r.c+=i.s.c),r.rRel&&(r.r+=i.s.r)):(r.cRel&&(r.c+=i.c),r.rRel&&(r.r+=i.r)),!e||e.biff<12){for(;r.c>=256;)r.c-=256;for(;r.r>=65536;)r.r-=65536}return r}function kK(t,i,e){var r=$s(t);return r.s=ky(r.s,i.s,e),r.e=ky(r.e,i.s,e),r}function Fy(t,i){if(t.cRel&&t.c<0)for(t=$s(t);t.c<0;)t.c+=i>8?16384:256;if(t.rRel&&t.r<0)for(t=$s(t);t.r<0;)t.r+=i>8?1048576:i>5?65536:16384;var e=ar(t);return!t.cRel&&t.cRel!=null&&(e=c4e(e)),!t.rRel&&t.rRel!=null&&(e=o4e(e)),e}function TO(t,i){return t.s.r==0&&!t.s.rRel&&t.e.r==(i.biff>=12?1048575:i.biff>=8?65536:16384)&&!t.e.rRel?(t.s.cRel?"":"$")+mn(t.s.c)+":"+(t.e.cRel?"":"$")+mn(t.e.c):t.s.c==0&&!t.s.cRel&&t.e.c==(i.biff>=12?16383:255)&&!t.e.cRel?(t.s.rRel?"":"$")+bn(t.s.r)+":"+(t.e.rRel?"":"$")+bn(t.e.r):Fy(t.s,i.biff)+":"+Fy(t.e,i.biff)}function i4(t){return parseInt(l4e(t),10)-1}function bn(t){return""+(t+1)}function o4e(t){return t.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function l4e(t){return t.replace(/\$(\d+)$/,"$1")}function n4(t){for(var i=d4e(t),e=0,r=0;r!==i.length;++r)e=26*e+i.charCodeAt(r)-64;return e-1}function mn(t){if(t<0)throw new Error("invalid column "+t);var i="";for(++t;t;t=Math.floor((t-1)/26))i=String.fromCharCode((t-1)%26+65)+i;return i}function c4e(t){return t.replace(/^([A-Z])/,"$$$1")}function d4e(t){return t.replace(/^\$([A-Z])/,"$1")}function u4e(t){return t.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function ir(t){for(var i=0,e=0,r=0;r=48&&n<=57?i=10*i+(n-48):n>=65&&n<=90&&(e=26*e+(n-64))}return{c:e-1,r:i-1}}function ar(t){for(var i=t.c+1,e="";i;i=(i-1)/26|0)e=String.fromCharCode((i-1)%26+65)+e;return e+(t.r+1)}function Ss(t){var i=t.indexOf(":");return i==-1?{s:ir(t),e:ir(t)}:{s:ir(t.slice(0,i)),e:ir(t.slice(i+1))}}function Lr(t,i){return typeof i>"u"||typeof i=="number"?Lr(t.s,t.e):(typeof t!="string"&&(t=ar(t)),typeof i!="string"&&(i=ar(i)),t==i?t:t+":"+i)}function Uy(t){var i=Ss(t);return"$"+mn(i.s.c)+"$"+bn(i.s.r)+":$"+mn(i.e.c)+"$"+bn(i.e.r)}function zy(t,i){if(!t&&!(i&&i.biff<=5&&i.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(t)?"'"+t.replace(/'/g,"''")+"'":t}function Zn(t){var i={s:{c:0,r:0},e:{c:0,r:0}},e=0,r=0,n=0,a=t.length;for(e=0;r26);++r)e=26*e+n;for(i.s.c=--e,e=0;r9);++r)e=10*e+n;if(i.s.r=--e,r===a||n!=10)return i.e.c=i.s.c,i.e.r=i.s.r,i;for(++r,e=0;r!=a&&!((n=t.charCodeAt(r)-64)<1||n>26);++r)e=26*e+n;for(i.e.c=--e,e=0;r!=a&&!((n=t.charCodeAt(r)-48)<0||n>9);++r)e=10*e+n;return i.e.r=--e,i}function FK(t,i){var e=t.t=="d"&&i instanceof Date;if(t.z!=null)try{return t.w=fd(t.z,e?Es(i):i)}catch{}try{return t.w=fd((t.XF||{}).numFmtId||(e?14:0),e?Es(i):i)}catch{return""+i}}function md(t,i,e){return t==null||t.t==null||t.t=="z"?"":t.w!==void 0?t.w:(t.t=="d"&&!t.z&&e&&e.dateNF&&(t.z=e.dateNF),t.t=="e"?Cu[t.v]||t.v:i==null?FK(t,t.v):FK(t,i))}function fg(t,i){var e=i&&i.sheet?i.sheet:"Sheet1",r={};return r[e]=t,{SheetNames:[e],Sheets:r}}function h4e(t){var i={},e=t||{};return e.dense&&(i["!data"]=[]),i}function MZ(t,i,e){var r=e||{},n=t?t["!data"]!=null:r.dense;hc!=null&&n==null&&(n=hc);var a=t||{};n&&!a["!data"]&&(a["!data"]=[]);var s=0,o=0;if(a&&r.origin!=null)if(typeof r.origin=="number")s=r.origin;else{var d=typeof r.origin=="string"?ir(r.origin):r.origin;s=d.r,o=d.c}var l={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(a["!ref"]){var c=Zn(a["!ref"]);l.s.c=c.s.c,l.s.r=c.s.r,l.e.c=Math.max(l.e.c,c.e.c),l.e.r=Math.max(l.e.r,c.e.r),s==-1&&(l.e.r=s=a["!ref"]?c.e.r+1:0)}else l.s.c=l.e.c=l.s.r=l.e.r=0;for(var h=[],u=!1,f=0;f!=i.length;++f)if(i[f]){if(!Array.isArray(i[f]))throw new Error("aoa_to_sheet expects an array of arrays");var p=s+f,m=""+(p+1);n&&(a["!data"][p]||(a["!data"][p]=[]),h=a["!data"][p]);for(var g=0;g!=i[f].length;++g)if(!(typeof i[f][g]>"u")){var v={v:i[f][g]},y=o+g;if(l.s.r>p&&(l.s.r=p),l.s.c>y&&(l.s.c=y),l.e.r0&&i.write_shift(0,t,"dbcs"),e?i.slice(0,i.l):i}function m4e(t){return{ich:t.read_shift(2),ifnt:t.read_shift(2)}}function p4e(t,i){return i||(i=Ae(4)),i.write_shift(2,t.ich||0),i.write_shift(2,t.ifnt||0),i}function r4(t,i){var e=t.l,r=t.read_shift(1),n=Ys(t),a=[],s={t:n,h:n};if(r&1){for(var o=t.read_shift(4),d=0;d!=o;++d)a.push(m4e(t));s.r=a}else s.r=[{ich:0,ifnt:0}];return t.l=e+i,s}function g4e(t,i){var e=!1;return i==null&&(e=!0,i=Ae(15+4*t.t.length)),i.write_shift(1,0),Kr(t.t,i),e?i.slice(0,i.l):i}var v4e=r4;function y4e(t,i){var e=!1;return i==null&&(e=!0,i=Ae(23+4*t.t.length)),i.write_shift(1,1),Kr(t.t,i),i.write_shift(4,1),p4e({ich:0,ifnt:0},i),e?i.slice(0,i.l):i}function Wo(t){var i=t.read_shift(4),e=t.read_shift(2);return e+=t.read_shift(1)<<16,t.l++,{c:i,iStyleRef:e}}function of(t,i){return i==null&&(i=Ae(8)),i.write_shift(-4,t.c),i.write_shift(3,t.iStyleRef||t.s),i.write_shift(1,0),i}function lf(t){var i=t.read_shift(2);return i+=t.read_shift(1)<<16,t.l++,{c:-1,iStyleRef:i}}function cf(t,i){return i==null&&(i=Ae(4)),i.write_shift(3,t.iStyleRef||t.s),i.write_shift(1,0),i}var x4e=Ys,AZ=Kr;function TS(t){var i=t.read_shift(4);return i===0||i===4294967295?"":t.read_shift(i,"dbcs")}function Gy(t,i){var e=!1;return i==null&&(e=!0,i=Ae(127)),i.write_shift(4,t.length>0?t.length:4294967295),t.length>0&&i.write_shift(0,t,"dbcs"),e?i.slice(0,i.l):i}var b4e=Ys,NO=TS,s4=Gy;function a4(t){var i=t.slice(t.l,t.l+4),e=i[0]&1,r=i[0]&2;t.l+=4;var n=r===0?oS([0,0,0,0,i[0]&252,i[1],i[2],i[3]],0):qh(i,0)>>2;return e?n/100:n}function IZ(t,i){i==null&&(i=Ae(4));var e=0,r=0,n=t*100;if(t==(t|0)&&t>=-(1<<29)&&t<1<<29?r=1:n==(n|0)&&n>=-(1<<29)&&n<1<<29&&(r=1,e=1),r)i.write_shift(-4,((e?n:t)<<2)+(e+2));else throw new Error("unsupported RkNumber "+t)}function RZ(t){var i={s:{},e:{}};return i.s.r=t.read_shift(4),i.e.r=t.read_shift(4),i.s.c=t.read_shift(4),i.e.c=t.read_shift(4),i}function _4e(t,i){return i||(i=Ae(16)),i.write_shift(4,t.s.r),i.write_shift(4,t.e.r),i.write_shift(4,t.s.c),i.write_shift(4,t.e.c),i}var df=RZ,pg=_4e;function gg(t){if(t.length-t.l<8)throw"XLS Xnum Buffer underflow";return t.read_shift(8,"f")}function sf(t,i){return(i||Ae(8)).write_shift(8,t,"f")}function w4e(t){var i={},e=t.read_shift(1),r=e>>>1,n=t.read_shift(1),a=t.read_shift(2,"i"),s=t.read_shift(1),o=t.read_shift(1),d=t.read_shift(1);switch(t.l++,r){case 0:i.auto=1;break;case 1:i.index=n;var l=R4e[n];l&&(i.rgb=XK(l));break;case 2:i.rgb=XK([s,o,d]);break;case 3:i.theme=n;break}return a!=0&&(i.tint=a>0?a/32767:a/32768),i}function lS(t,i){if(i||(i=Ae(8)),!t||t.auto)return i.write_shift(4,0),i.write_shift(4,0),i;t.index!=null?(i.write_shift(1,2),i.write_shift(1,t.index)):t.theme!=null?(i.write_shift(1,6),i.write_shift(1,t.theme)):(i.write_shift(1,5),i.write_shift(1,0));var e=t.tint||0;if(e>0?e*=32767:e<0&&(e*=32768),i.write_shift(2,e),!t.rgb||t.theme!=null)i.write_shift(2,0),i.write_shift(1,0),i.write_shift(1,0);else{var r=t.rgb||"FFFFFF";typeof r=="number"&&(r=("000000"+r.toString(16)).slice(-6)),i.write_shift(1,parseInt(r.slice(0,2),16)),i.write_shift(1,parseInt(r.slice(2,4),16)),i.write_shift(1,parseInt(r.slice(4,6),16)),i.write_shift(1,255)}return i}function C4e(t){var i=t.read_shift(1);t.l++;var e={fBold:i&1,fItalic:i&2,fUnderline:i&4,fStrikeout:i&8,fOutline:i&16,fShadow:i&32,fCondense:i&64,fExtend:i&128};return e}function T4e(t,i){i||(i=Ae(2));var e=(t.italic?2:0)|(t.strike?8:0)|(t.outline?16:0)|(t.shadow?32:0)|(t.condense?64:0)|(t.extend?128:0);return i.write_shift(1,e),i.write_shift(1,0),i}var PZ=2,mo=3,QT=11;var cS=19,KT=64,S4e=65,E4e=71,D4e=4108,M4e=4126,Cs=80;var OK={1:{n:"CodePage",t:PZ},2:{n:"Category",t:Cs},3:{n:"PresentationFormat",t:Cs},4:{n:"ByteCount",t:mo},5:{n:"LineCount",t:mo},6:{n:"ParagraphCount",t:mo},7:{n:"SlideCount",t:mo},8:{n:"NoteCount",t:mo},9:{n:"HiddenCount",t:mo},10:{n:"MultimediaClipCount",t:mo},11:{n:"ScaleCrop",t:QT},12:{n:"HeadingPairs",t:D4e},13:{n:"TitlesOfParts",t:M4e},14:{n:"Manager",t:Cs},15:{n:"Company",t:Cs},16:{n:"LinksUpToDate",t:QT},17:{n:"CharacterCount",t:mo},19:{n:"SharedDoc",t:QT},22:{n:"HyperlinksChanged",t:QT},23:{n:"AppVersion",t:mo,p:"version"},24:{n:"DigSig",t:S4e},26:{n:"ContentType",t:Cs},27:{n:"ContentStatus",t:Cs},28:{n:"Language",t:Cs},29:{n:"Version",t:Cs},255:{},2147483648:{n:"Locale",t:cS},2147483651:{n:"Behavior",t:cS},1919054434:{}},LK={1:{n:"CodePage",t:PZ},2:{n:"Title",t:Cs},3:{n:"Subject",t:Cs},4:{n:"Author",t:Cs},5:{n:"Keywords",t:Cs},6:{n:"Comments",t:Cs},7:{n:"Template",t:Cs},8:{n:"LastAuthor",t:Cs},9:{n:"RevNumber",t:Cs},10:{n:"EditTime",t:KT},11:{n:"LastPrinted",t:KT},12:{n:"CreatedDate",t:KT},13:{n:"ModifiedDate",t:KT},14:{n:"PageCount",t:mo},15:{n:"WordCount",t:mo},16:{n:"CharCount",t:mo},17:{n:"Thumbnail",t:E4e},18:{n:"Application",t:Cs},19:{n:"DocSecurity",t:mo},255:{},2147483648:{n:"Locale",t:cS},2147483651:{n:"Behavior",t:cS},1919054434:{}};function A4e(t){return t.map(function(i){return[i>>16&255,i>>8&255,i&255]})}var I4e=A4e([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,0,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),R4e=$s(I4e),Cu={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},BO={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},P4e=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"],k4e={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},ZT={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function kZ(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function FZ(t,i,e){var r=kOe(k4e),n=[],a;e||(n[n.length]=Nr,n[n.length]=ft("Types",null,{xmlns:cs.CT,"xmlns:xsd":cs.xsd,"xmlns:xsi":cs.xsi}),n=n.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(l){return ft("Default",null,{Extension:l[0],ContentType:l[1]})})));var s=function(l){t[l]&&t[l].length>0&&(a=t[l][0],n[n.length]=ft("Override",null,{PartName:(a[0]=="/"?"":"/")+a,ContentType:ZT[l][i.bookType]||ZT[l].xlsx}))},o=function(l){(t[l]||[]).forEach(function(c){n[n.length]=ft("Override",null,{PartName:(c[0]=="/"?"":"/")+c,ContentType:ZT[l][i.bookType]||ZT[l].xlsx})})},d=function(l){(t[l]||[]).forEach(function(c){n[n.length]=ft("Override",null,{PartName:(c[0]=="/"?"":"/")+c,ContentType:r[l][0]})})};return s("workbooks"),o("sheets"),o("charts"),d("themes"),["strs","styles"].forEach(s),["coreprops","extprops","custprops"].forEach(d),d("vba"),d("comments"),d("threadedcomments"),d("drawings"),o("metadata"),d("people"),!e&&n.length>2&&(n[n.length]="",n[1]=n[1].replace("/>",">")),n.join("")}var Hi={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",CONN:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function OZ(t){var i=t.lastIndexOf("/");return t.slice(0,i+1)+"_rels/"+t.slice(i+1)+".rels"}function rg(t){var i=[Nr,ft("Relationships",null,{xmlns:cs.RELS})];return Or(t["!id"]).forEach(function(e){i[i.length]=ft("Relationship",null,t["!id"][e])}),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function rn(t,i,e,r,n,a){if(n||(n={}),t["!id"]||(t["!id"]={}),t["!idx"]||(t["!idx"]=1),i<0)for(i=t["!idx"];t["!id"]["rId"+i];++i);if(t["!idx"]=i+1,n.Id="rId"+i,n.Type=r,n.Target=e,a?n.TargetMode=a:[Hi.HLINK,Hi.XPATH,Hi.XMISS].indexOf(n.Type)>-1&&(n.TargetMode="External"),t["!id"][n.Id])throw new Error("Cannot rewrite rId "+i);return t["!id"][n.Id]=n,t[("/"+n.Target).replace("//","/")]=n,i}function F4e(t){var i=[Nr];i.push(` +`),i.push(` +`);for(var e=0;e +`);return i.push(""),i.join("")}function NK(t,i,e){return[' +`,' +`,` +`].join("")}function O4e(t,i){return[' +`,' +`,` +`].join("")}function L4e(t){var i=[Nr];i.push(` +`);for(var e=0;e!=t.length;++e)i.push(NK(t[e][0],t[e][1])),i.push(O4e("",t[e][0]));return i.push(NK("","Document","pkg")),i.push(""),i.join("")}function LZ(t,i){return'SheetJS '+Ly.version+""}var ef=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function SO(t,i,e,r,n){n[t]!=null||i==null||i===""||(n[t]=i,i=xi(i),r[r.length]=e?ft(t,i,e):Ts(t,i))}function NZ(t,i){var e=i||{},r=[Nr,ft("cp:coreProperties",null,{"xmlns:cp":cs.CORE_PROPS,"xmlns:dc":cs.dc,"xmlns:dcterms":cs.dcterms,"xmlns:dcmitype":cs.dcmitype,"xmlns:xsi":cs.xsi})],n={};if(!t&&!e.Props)return r.join("");t&&(t.CreatedDate!=null&&SO("dcterms:created",typeof t.CreatedDate=="string"?t.CreatedDate:LO(t.CreatedDate,e.WTF),{"xsi:type":"dcterms:W3CDTF"},r,n),t.ModifiedDate!=null&&SO("dcterms:modified",typeof t.ModifiedDate=="string"?t.ModifiedDate:LO(t.ModifiedDate,e.WTF),{"xsi:type":"dcterms:W3CDTF"},r,n));for(var a=0;a!=ef.length;++a){var s=ef[a],o=e.Props&&e.Props[s[1]]!=null?e.Props[s[1]]:t?t[s[1]]:null;o===!0?o="1":o===!1?o="0":typeof o=="number"&&(o=String(o)),o!=null&&SO(s[0],o,null,r,n)}return r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}var sg=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],BZ=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function VZ(t){var i=[],e=ft;return t||(t={}),t.Application="SheetJS",i[i.length]=Nr,i[i.length]=ft("Properties",null,{xmlns:cs.EXT_PROPS,"xmlns:vt":cs.vt}),sg.forEach(function(r){if(t[r[1]]!==void 0){var n;switch(r[2]){case"string":n=xi(String(t[r[1]]));break;case"bool":n=t[r[1]]?"true":"false";break}n!==void 0&&(i[i.length]=e(r[0],n))}}),i[i.length]=e("HeadingPairs",e("vt:vector",e("vt:variant","Worksheets")+e("vt:variant",e("vt:i4",String(t.Worksheets))),{size:2,baseType:"variant"})),i[i.length]=e("TitlesOfParts",e("vt:vector",t.SheetNames.map(function(r){return""+xi(r)+""}).join(""),{size:t.Worksheets,baseType:"lpstr"})),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function UZ(t){var i=[Nr,ft("Properties",null,{xmlns:cs.CUST_PROPS,"xmlns:vt":cs.vt})];if(!t)return i.join("");var e=1;return Or(t).forEach(function(n){++e,i[i.length]=ft("property",ZOe(t[n],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e,name:xi(n)})}),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}var BK={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function N4e(t,i){var e=[];return Or(BK).map(function(r){for(var n=0;n'+n.join("")+""}function V4e(t){var i=typeof t=="string"?new Date(Date.parse(t)):t,e=i.getTime()/1e3+11644473600,r=e%Math.pow(2,32),n=(e-r)/Math.pow(2,32);r*=1e7,n*=1e7;var a=r/Math.pow(2,32)|0;a>0&&(r=r%Math.pow(2,32),n+=a);var s=Ae(8);return s.write_shift(4,r),s.write_shift(4,n),s}function VK(t,i){var e=Ae(4),r=Ae(4);switch(e.write_shift(4,t==80?31:t),t){case 3:r.write_shift(-4,i);break;case 5:r=Ae(8),r.write_shift(8,i,"f");break;case 11:r.write_shift(4,i?1:0);break;case 64:r=V4e(i);break;case 31:case 80:for(r=Ae(4+2*(i.length+1)+(i.length%2?0:2)),r.write_shift(4,i.length+1),r.write_shift(0,i,"dbcs");r.l!=r.length;)r.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+i)}return Fr([e,r])}var zZ=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function U4e(t){switch(typeof t){case"boolean":return 11;case"number":return(t|0)==t?3:5;case"string":return 31;case"object":if(t instanceof Date)return 64;break}return-1}function UK(t,i,e){var r=Ae(8),n=[],a=[],s=8,o=0,d=Ae(8),l=Ae(8);if(d.write_shift(4,2),d.write_shift(4,1200),l.write_shift(4,1),a.push(d),n.push(l),s+=8+d.length,!i){l=Ae(8),l.write_shift(4,0),n.unshift(l);var c=[Ae(4)];for(c[0].write_shift(4,t.length),o=0;o-1||BZ.indexOf(t[o][0])>-1)&&t[o][1]!=null){var u=t[o][1],f=0;if(i){f=+i[t[o][0]];var p=e[f];if(p.p=="version"&&typeof u=="string"){var m=u.split(".");u=(+m[0]<<16)+(+m[1]||0)}d=VK(p.t,u)}else{var g=U4e(u);g==-1&&(g=31,u=String(u)),d=VK(g,u)}a.push(d),l=Ae(8),l.write_shift(4,i?f:2+o),n.push(l),s+=8+d.length}var v=8*(a.length+1);for(o=0;o=12?2:1),n="sbcs-cont",a=vo;if(e&&e.biff>=8&&(vo=1200),!e||e.biff==8){var s=t.read_shift(1);s&&(n="dbcs-cont")}else e.biff==12&&(n="wstr");e.biff>=2&&e.biff<=5&&(n="cpstr");var o=r?t.read_shift(r,n):"";return vo=a,o}function H4e(t){var i=t.t||"",e=1,r=Ae(3+(e>1?2:0));r.write_shift(2,i.length),r.write_shift(1,(e>1?8:0)|1),e>1&&r.write_shift(2,e);var n=Ae(2*i.length);n.write_shift(2*i.length,i,"utf16le");var a=[r,n];return Fr(a)}function j4e(t,i,e){var r;if(e){if(e.biff>=2&&e.biff<=5)return t.read_shift(i,"cpstr");if(e.biff>=12)return t.read_shift(i,"dbcs-cont")}var n=t.read_shift(1);return n===0?r=t.read_shift(i,"sbcs-cont"):r=t.read_shift(i,"dbcs-cont"),r}function W4e(t,i,e){var r=t.read_shift(e&&e.biff==2?1:2);return r===0?(t.l++,""):j4e(t,r,e)}function X4e(t,i,e){if(e.biff>5)return W4e(t,i,e);var r=t.read_shift(1);return r===0?(t.l++,""):t.read_shift(r,e.biff<=4||!t.lens?"cpstr":"sbcs-cont")}function jZ(t,i,e){return e||(e=Ae(3+2*t.length)),e.write_shift(2,t.length),e.write_shift(1,1),e.write_shift(31,t,"utf16le"),e}function GK(t,i){i||(i=Ae(6+t.length*2)),i.write_shift(4,1+t.length);for(var e=0;e-1?31:23;switch(r.charAt(0)){case"#":a=28;break;case".":a&=-3;break}i.write_shift(4,2),i.write_shift(4,a);var s=[8,6815827,6619237,4849780,83];for(e=0;e-1?r.slice(0,n):r;for(i.write_shift(4,2*(o.length+1)),e=0;e-1?r.slice(n+1):"",i)}else{for(s="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),e=0;e8?4:2,n=t.read_shift(r),a=t.read_shift(r,"i"),s=t.read_shift(r,"i");return[n,a,s]}function Q4e(t){var i=t.read_shift(2),e=t.read_shift(2),r=t.read_shift(2),n=t.read_shift(2);return{s:{c:r,r:i},e:{c:n,r:e}}}function WZ(t,i){return i||(i=Ae(8)),i.write_shift(2,t.s.r),i.write_shift(2,t.e.r),i.write_shift(2,t.s.c),i.write_shift(2,t.e.c),i}function o4(t,i,e){var r=1536,n=16;switch(e.bookType){case"biff8":break;case"biff5":r=1280,n=8;break;case"biff4":r=4,n=6;break;case"biff3":r=3,n=6;break;case"biff2":r=2,n=4;break;case"xla":break;default:throw new Error("unsupported BIFF version")}var a=Ae(n);return a.write_shift(2,r),a.write_shift(2,i),n>4&&a.write_shift(2,29282),n>6&&a.write_shift(2,1997),n>8&&(a.write_shift(2,49161),a.write_shift(2,1),a.write_shift(2,1798),a.write_shift(2,0)),a}function K4e(t,i){var e=!i||i.biff==8,r=Ae(e?112:54);for(r.write_shift(i.biff==8?2:1,7),e&&r.write_shift(1,0),r.write_shift(4,859007059),r.write_shift(4,5458548|(e?0:536870912));r.l=8?2:1,r=Ae(8+e*t.name.length);r.write_shift(4,t.pos),r.write_shift(1,t.hs||0),r.write_shift(1,t.dt),r.write_shift(1,t.name.length),i.biff>=8&&r.write_shift(1,1),r.write_shift(e*t.name.length,t.name,i.biff<8?"sbcs":"utf16le");var n=r.slice(0,r.l);return n.l=r.l,n}function J4e(t,i){var e=Ae(8);e.write_shift(4,t.Count),e.write_shift(4,t.Unique);for(var r=[],n=0;nr.l?r.slice(0,r.l):r;return a.l==null&&(a.l=a.length),a}function s3e(t){var i=Ae(1+t.length);return i.write_shift(1,t.length),i.write_shift(t.length,t,"sbcs"),i}function a3e(t){var i=Ae(3+t.length);return i.l+=2,i.write_shift(1,t.length),i.write_shift(t.length,t,"sbcs"),i}function o3e(t,i){var e=i.biff==8||!i.biff?4:2,r=Ae(2*e+6);return r.write_shift(e,t.s.r),r.write_shift(e,t.e.r+1),r.write_shift(2,t.s.c),r.write_shift(2,t.e.c+1),r.write_shift(2,0),r}function HK(t,i,e,r){var n=e&&e.biff==5;r||(r=Ae(n?16:20)),r.write_shift(2,0),t.style?(r.write_shift(2,t.numFmtId||0),r.write_shift(2,65524)):(r.write_shift(2,t.numFmtId||0),r.write_shift(2,i<<4));var a=0;return t.numFmtId>0&&n&&(a|=1024),r.write_shift(4,a),r.write_shift(4,0),n||r.write_shift(4,0),r.write_shift(2,0),r}function l3e(t){var i=Ae(4);return i.l+=2,i.write_shift(1,t.numFmtId),i.l++,i}function XZ(t){var i=Ae(12);return i.l++,i.write_shift(1,t.numFmtId),i.l+=10,i}var c3e=XZ;function d3e(t){var i=Ae(8);return i.write_shift(4,0),i.write_shift(2,t[0]?t[0]+1:0),i.write_shift(2,t[1]?t[1]+1:0),i}function EO(t,i,e,r,n,a){var s=Ae(8);return af(t,i,r,s),GZ(e,a,s),s}function u3e(t,i,e,r){var n=Ae(14);return af(t,i,r,n),sf(e,n),n}function h3e(t,i,e){if(e.biff<8||!(e.biff>8)&&i==t[t.l]+(t[t.l+1]==3?1:0)+1)return jK(t,i,e);for(var r=[],n=t.l+i,a=t.read_shift(e.biff>8?4:2);a--!==0;)r.push($4e(t,e.biff>8?12:6,e));if(t.l!=n)throw new Error("Bad ExternSheet: "+t.l+" != "+n);return r}function jK(t,i,e){t[t.l+1]==3&&t[t.l]++;var r=HZ(t,i,e);return r.charCodeAt(0)==3?r.slice(1):r}function DO(t,i,e,r){var n=Ae(6+(r||t.length));return n.write_shift(2,i),n.write_shift(2,e),n.write_shift(2,r||t.length),n.write_shift(t.length,t,"sbcs"),n}function f3e(t){var i=Ae(2+t.length*8);i.write_shift(2,t.length);for(var e=0;e=12?4:2,n=t.read_shift(r),a=t.read_shift(r),s=t.read_shift(r),o=t.read_shift(r),d=t.read_shift(2);r==2&&(t.l+=2);var l={s:n,e:a,w:s,ixfe:o,flags:d};return(e.biff>=5||!e.biff)&&(l.level=d>>8&7),l}function y3e(t,i){var e=Ae(12);e.write_shift(2,i),e.write_shift(2,i),e.write_shift(2,t.width*256),e.write_shift(2,0);var r=0;return t.hidden&&(r|=1),e.write_shift(1,r),r=t.level||0,e.write_shift(1,r),e.write_shift(2,0),e}function x3e(t){for(var i=Ae(2*t),e=0;e1048576&&(m=1e6),h!=2&&(g=c.read_shift(2));var v=c.read_shift(2),y=d.codepage||1252;h!=2&&(c.l+=16,c.read_shift(1),c[c.l]!==0&&(y=t[c[c.l]]),c.l+=1,c.l+=2),p&&(c.l+=36);for(var x=[],b={},_=Math.min(c.length,h==2?521:g-10-(f?264:0)),C=p?32:11;c.l<_&&c[c.l]!=13;)switch(b={},b.name=(typeof Ki<"u"?Ki.utils.decode(y,c.slice(c.l,c.l+C)):nf(c.slice(c.l,c.l+C))).replace(/[\u0000\r\n][\S\s]*$/g,""),c.l+=C,b.type=String.fromCharCode(c.read_shift(1)),h!=2&&!p&&(b.offset=c.read_shift(4)),b.len=c.read_shift(1),h==2&&(b.offset=c.read_shift(2)),b.dec=c.read_shift(1),b.name.length&&x.push(b),h!=2&&(c.l+=p?13:14),b.type){case"B":(!f||b.len!=8)&&d.WTF&&console.log("Skipping "+b.name+":"+b.type);break;case"G":case"P":d.WTF&&console.log("Skipping "+b.name+":"+b.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+b.type)}if(c[c.l]!==13&&(c.l=g-1),c.read_shift(1)!==13)throw new Error("DBF Terminator not found "+c.l+" "+c[c.l]);c.l=g;var w=0,T=0;for(l[0]=[],T=0;T!=x.length;++T)l[0][T]=x[T].name;for(;m-- >0;){if(c[c.l]===42){c.l+=v;continue}for(++c.l,l[++w]=[],T=0,T=0;T!=x.length;++T){var S=c.slice(c.l,c.l+x[T].len);c.l+=x[T].len,ga(S,0);var E=typeof Ki<"u"?Ki.utils.decode(y,S):nf(S);switch(x[T].type){case"C":E.trim().length&&(l[w][T]=E.replace(/([^\s])\s+$/,"$1"));break;case"D":E.length===8?(l[w][T]=new Date(Date.UTC(+E.slice(0,4),+E.slice(4,6)-1,+E.slice(6,8),0,0,0,0)),d&&d.UTC||(l[w][T]=cg(l[w][T]))):l[w][T]=E;break;case"F":l[w][T]=parseFloat(E.trim());break;case"+":case"I":l[w][T]=p?S.read_shift(-4,"i")^2147483648:S.read_shift(4,"i");break;case"L":switch(E.trim().toUpperCase()){case"Y":case"T":l[w][T]=!0;break;case"N":case"F":l[w][T]=!1;break;case"":case"\0":case"?":break;default:throw new Error("DBF Unrecognized L:|"+E+"|")}break;case"M":if(!u)throw new Error("DBF Unexpected MEMO for type "+h.toString(16));l[w][T]="##MEMO##"+(p?parseInt(E.trim(),10):S.read_shift(4));break;case"N":E=E.replace(/\u0000/g,"").trim(),E&&E!="."&&(l[w][T]=+E||0);break;case"@":l[w][T]=new Date(S.read_shift(-8,"f")-621356832e5);break;case"T":{var D=S.read_shift(4),A=S.read_shift(4);if(D==0&&A==0)break;l[w][T]=new Date((D-2440588)*864e5+A),d&&d.UTC||(l[w][T]=cg(l[w][T]))}break;case"Y":l[w][T]=S.read_shift(4,"i")/1e4+S.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":l[w][T]=-S.read_shift(-8,"f");break;case"B":if(f&&x[T].len==8){l[w][T]=S.read_shift(8,"f");break}case"G":case"P":S.l+=x[T].len;break;case"0":if(x[T].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+x[T].type)}}}if(h!=2&&c.l=0&&Ny(+l.codepage),l.type=="string")throw new Error("Cannot write DBF to JS string");var h=Xs(),u=GO(o,{header:1,raw:!0,cellDates:!0}),f=u[0],p=u.slice(1),m=o["!cols"]||[],g=0,v=0,y=0,x=1;for(g=0;g250&&(E=250),S=((m[g]||{}).DBF||{}).type,S=="C"&&m[g].DBF.len>E&&(E=m[g].DBF.len),T=="B"&&S=="N"&&(T="N",w[g]=m[g].DBF.dec,E=m[g].DBF.len),C[g]=T=="C"||S=="N"?E:a[T]||0,x+=C[g],_[g]=T}var A=h.next(32);for(A.write_shift(4,318902576),A.write_shift(4,p.length),A.write_shift(2,296+32*y),A.write_shift(2,x),g=0;g<4;++g)A.write_shift(4,0);var M=+i[vo]||3;for(A.write_shift(4,0|M<<8),t[M]!=+l.codepage&&(l.codepage&&console.error("DBF Unsupported codepage "+vo+", using 1252"),vo=1252),g=0,v=0;gC[v]&&(N=N.slice(0,C[v])),y=0;y":190,"?":191,"{":223},i=new RegExp("\x1BN("+Or(t).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1").replace("{","\\{")+"|\\|)","gm");try{i=new RegExp("\x1BN("+Or(t).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm")}catch{}var e=function(f,p){var m=t[p];return typeof m=="number"?hK(m):m},r=function(f,p,m){var g=p.charCodeAt(0)-32<<4|m.charCodeAt(0)-48;return g==59?f:hK(g)};t["|"]=254;var n=function(f){return f.replace(/\n/g,"\x1B :").replace(/\r/g,"\x1B =")};function a(f,p){switch(p.type){case"base64":return s(Tu(f),p);case"binary":return s(f,p);case"buffer":return s(dn&&Buffer.isBuffer(f)?f.toString("binary"):nf(f),p);case"array":return s(XO(f),p)}throw new Error("Unrecognized type "+p.type)}function s(f,p){var m=f.split(/[\n\r]+/),g=-1,v=-1,y=0,x=0,b=[],_=[],C=null,w={},T=[],S=[],E=[],D=0,A,M={Workbook:{WBProps:{},Names:[]}};for(+p.codepage>=0&&Ny(+p.codepage);y!==m.length;++y){D=0;var R=m[y].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,r).replace(i,e),L=R.replace(/;;/g,"\0").split(";").map(function(re){return re.replace(/\u0000/g,";")}),I=L[0],O;if(R.length>0)switch(I){case"ID":break;case"E":break;case"B":break;case"O":for(x=1;x=1&&N<=4&&(M.Workbook.WBProps.date1904=!0)}break}break;case"W":break;case"P":switch(L[1].charAt(0)){case"P":_.push(R.slice(3).replace(/;;/g,";"));break}break;case"NN":{var H={Sheet:0};for(x=1;x-1&&b[k][G];if(!q||!q[1])throw new Error("SYLK shared formula cannot find base");Z=TLe(q[1],{r:g-k,c:v-G})}Z&&(b[g][v]?b[g][v].f=Z:b[g][v]={t:"n",f:Z}),W&&(b[g][v]||(b[g][v]={t:"z"}),b[g][v].c=[{a:"SheetJSYLK",t:W}]);break;case"F":var ie=0;for(x=1;x0?(T[g].hpt=D,T[g].hpx=KZ(D)):D===0&&(T[g].hidden=!0);break;default:if(p&&p.WTF)throw new Error("SYLK bad record "+R)}ie<1&&(C=null);break;default:if(p&&p.WTF)throw new Error("SYLK bad record "+R)}}return T.length>0&&(w["!rows"]=T),S.length>0&&(w["!cols"]=S),S.forEach(function(re){l4(re)}),p&&p.sheetRows&&(b=b.slice(0,p.sheetRows)),[b,w,M]}function o(f,p){var m=a(f,p),g=m[0],v=m[1],y=m[2],x=$s(p);x.date1904=(((y||{}).Workbook||{}).WBProps||{}).date1904;var b=mg(g,x);Or(v).forEach(function(C){b[C]=v[C]});var _=fg(b,p);return Or(y).forEach(function(C){_[C]=y[C]}),_.bookType="sylk",_}function d(f,p,m,g,v,y){var x="C;Y"+(m+1)+";X"+(g+1)+";K";switch(f.t){case"n":x+=f.v||0,f.f&&!f.F&&(x+=";E"+ES(f.f,{r:m,c:g}));break;case"b":x+=f.v?"TRUE":"FALSE";break;case"e":x+=f.w||Cu[f.v]||f.v;break;case"d":x+=Es($a(f.v,y),y);break;case"s":x+='"'+(f.v==null?"":String(f.v)).replace(/"/g,"").replace(/;/g,";;")+'"';break}return x}function l(f,p,m){var g="C;Y"+(p+1)+";X"+(m+1)+";A";return g+=n(f.map(function(v){return v.t}).join("")),g}function c(f,p){p.forEach(function(m,g){var v="F;W"+(g+1)+" "+(g+1)+" ";m.hidden?v+="0":(typeof m.width=="number"&&!m.wpx&&(m.wpx=dS(m.width)),typeof m.wpx=="number"&&!m.wch&&(m.wch=uS(m.wpx)),typeof m.wch=="number"&&(v+=Math.round(m.wch))),v.charAt(v.length-1)!=" "&&f.push(v)})}function h(f,p){p.forEach(function(m,g){var v="F;";m.hidden?v+="M0;":m.hpt?v+="M"+20*m.hpt+";":m.hpx&&(v+="M"+20*hS(m.hpx)+";"),v.length>2&&f.push(v+"R"+(g+1))})}function u(f,p,m){p||(p={}),p._formats=["General"];var g=["ID;PSheetJS;N;E"],v=[],y=Zn(f["!ref"]||"A1"),x,b=f["!data"]!=null,_=`\r +`,C=(((m||{}).Workbook||{}).WBProps||{}).date1904,w="General";g.push("P;PGeneral");var T=y.s.r,S=y.s.c,E=[];if(f["!ref"]){for(T=y.s.r;T<=y.e.r;++T)if(!(b&&!f["!data"][T])){for(E=[],S=y.s.c;S<=y.e.c;++S)x=b?f["!data"][T][S]:f[mn(S)+bn(T)],!(!x||!x.c)&&E.push(l(x.c,T,S));E.length&&v.push(E.join(_))}}if(f["!ref"]){for(T=y.s.r;T<=y.e.r;++T)if(!(b&&!f["!data"][T])){for(E=[],S=y.s.c;S<=y.e.c;++S)if(x=b?f["!data"][T][S]:f[mn(S)+bn(T)],!(!x||x.v==null&&(!x.f||x.F))){if((x.z||(x.t=="d"?Kn[14]:"General"))!=w){var D=p._formats.indexOf(x.z);D==-1&&(p._formats.push(x.z),D=p._formats.length-1,g.push("P;P"+x.z.replace(/;/g,";;"))),E.push("F;P"+D+";Y"+(T+1)+";X"+(S+1))}E.push(d(x,f,T,S,p,C))}v.push(E.join(_))}}return g.push("F;P0;DG0G8;M255"),f["!cols"]&&c(g,f["!cols"]),f["!rows"]&&h(g,f["!rows"]),f["!ref"]&&g.push("B;Y"+(y.e.r-y.s.r+1)+";X"+(y.e.c-y.s.c+1)+";D"+[y.s.c,y.s.r,y.e.c,y.e.r].join(" ")),g.push("O;L;D;B"+(C?";V4":"")+";K47;G100 0.001"),delete p._formats,g.join(_)+_+v.join(_)+_+"E"+_}return{to_workbook:o,from_sheet:u}}(),T3e=function(){function t(o,d){switch(d.type){case"base64":return i(Tu(o),d);case"binary":return i(o,d);case"buffer":return i(dn&&Buffer.isBuffer(o)?o.toString("binary"):nf(o),d);case"array":return i(XO(o),d)}throw new Error("Unrecognized type "+d.type)}function i(o,d){for(var l=o.split(` +`),c=-1,h=-1,u=0,f=[];u!==l.length;++u){if(l[u].trim()==="BOT"){f[++c]=[],h=0;continue}if(!(c<0)){var p=l[u].trim().split(","),m=p[0],g=p[1];++u;for(var v=l[u]||"";(v.match(/["]/g)||[]).length&1&&u=0&&p[m].length===0;)--m;for(var g=10,v=0,y=0;y<=m;++y)v=p[y].indexOf(" "),v==-1?v=p[y].length:v++,g=Math.max(g,v);for(y=0;y<=m;++y){f[y]=[];var x=0;for(t(p[y].slice(0,g).trim(),f,y,x,u),x=1;x<=(p[y].length-g)/10+1;++x)t(p[y].slice(g+(x-1)*10,g+x*10).trim(),f,y,x,u)}return u.sheetRows&&(f=f.slice(0,u.sheetRows)),f}var e={44:",",9:" ",59:";",124:"|"},r={44:3,9:2,59:1,124:0};function n(c){for(var h={},u=!1,f=0,p=0;f0&&E(),p["!ref"]=Lr(m),p}function s(c,h){return!(h&&h.PRN)||h.FS||c.slice(0,4)=="sep="||c.indexOf(" ")>=0||c.indexOf(",")>=0||c.indexOf(";")>=0?a(c,h):mg(i(c,h),h)}function o(c,h){var u="",f=h.type=="string"?[0,0,0,0]:JBe(c,h);switch(h.type){case"base64":u=Tu(c);break;case"binary":u=c;break;case"buffer":h.codepage==65001?u=c.toString("utf8"):h.codepage&&typeof Ki<"u"?u=Ki.utils.decode(h.codepage,c):u=dn&&Buffer.isBuffer(c)?c.toString("binary"):nf(c);break;case"array":u=XO(c);break;case"string":u=c;break;default:throw new Error("Unrecognized type "+h.type)}return f[0]==239&&f[1]==187&&f[2]==191?u=ng(u.slice(3)):h.type!="string"&&h.type!="buffer"&&h.codepage==65001?u=ng(u):h.type=="binary"&&typeof Ki<"u"&&h.codepage&&(u=Ki.utils.decode(h.codepage,Ki.utils.encode(28591,u))),u.slice(0,19)=="socialcalc:version:"?YZ.to_sheet(h.type=="string"?u:ng(u),h):s(u,h)}function d(c,h){return fg(o(c,h),h)}function l(c){var h=[];if(!c["!ref"])return"";for(var u=Zn(c["!ref"]),f,p=c["!data"]!=null,m=u.s.r;m<=u.e.r;++m){for(var g=[],v=u.s.c;v<=u.e.c;++v){var y=ar({r:m,c:v});if(f=p?(c["!data"][m]||[])[v]:c[y],!f||f.v==null){g.push(" ");continue}for(var x=(f.w||(md(f),f.w)||"").slice(0,10);x.length<10;)x+=" ";g.push(x+(v===0?" ":""))}h.push(g.join(""))}return h.join(` +`)}return{to_workbook:d,to_sheet:o,from_sheet:l}}();var WK=function(){function t(W,q,ie){if(W){ga(W,W.l||0);for(var re=ie.Enum||F;W.l=16&&W[14]==5&&W[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(W[2]==2)ie.Enum=F,t(W,function(Je,Jt,Et){switch(Et){case 0:ie.vers=Je,Je>=4096&&(ie.qpro=!0);break;case 255:ie.vers=Je,ie.works=!0;break;case 6:Ge=Je;break;case 204:Je&&(ve=Je);break;case 222:ve=Je;break;case 15:case 51:(!ie.qpro&&!ie.works||Et==51)&&Je[1].v.charCodeAt(0)<48&&(Je[1].v=Je[1].v.slice(1)),(ie.works||ie.works2)&&(Je[1].v=Je[1].v.replace(/\r\n/g,` +`));case 13:case 14:case 16:(Je[2]&112)==112&&(Je[2]&15)>1&&(Je[2]&15)<15&&(Je[1].z=ie.dateNF||e[(Je[2]&15)-1]||Kn[14],ie.cellDates&&(Je[1].v=ig(Je[1].v),Je[1].t=typeof Je[1].v=="number"?"n":"d")),ie.qpro&&Je[3]>_e&&(re["!ref"]=Lr(Ge),ye[oe]=re,xe.push(oe),re={},ie.dense&&(at=re["!data"]=[]),Ge={s:{r:0,c:0},e:{r:0,c:0}},_e=Je[3],oe=ve||"Sheet"+(_e+1),ve="");var Bt=ie.dense?(at[Je[0].r]||[])[Je[0].c]:re[ar(Je[0])];if(Bt){Bt.t=Je[1].t,Bt.v=Je[1].v,Je[1].z!=null&&(Bt.z=Je[1].z),Je[1].f!=null&&(Bt.f=Je[1].f),qe=Bt;break}ie.dense?(at[Je[0].r]||(at[Je[0].r]=[]),at[Je[0].r][Je[0].c]=Je[1]):re[ar(Je[0])]=Je[1],qe=Je[1];break;case 21509:ie.works2=!0;break;case 21506:Je==5281&&(qe.z="hh:mm:ss",ie.cellDates&&qe.t=="n"&&(qe.v=ig(qe.v),qe.t=typeof qe.v=="number"?"n":"d"));break}},ie);else if(W[2]==26||W[2]==14)ie.Enum=k,W[2]==14&&(ie.qpro=!0,W.l=0),t(W,function(Je,Jt,Et){switch(Et){case 204:oe=Je;break;case 22:Je[1].v.charCodeAt(0)<48&&(Je[1].v=Je[1].v.slice(1)),Je[1].v=Je[1].v.replace(/\x0F./g,function(Bt){return String.fromCharCode(Bt.charCodeAt(1)-32)}).replace(/\r\n/g,` +`);case 23:case 24:case 25:case 37:case 39:case 40:if(Je[3]>_e&&(re["!ref"]=Lr(Ge),ye[oe]=re,xe.push(oe),re={},ie.dense&&(at=re["!data"]=[]),Ge={s:{r:0,c:0},e:{r:0,c:0}},_e=Je[3],oe="Sheet"+(_e+1)),ke>0&&Je[0].r>=ke)break;ie.dense?(at[Je[0].r]||(at[Je[0].r]=[]),at[Je[0].r][Je[0].c]=Je[1]):re[ar(Je[0])]=Je[1],Ge.e.c=0&&Ny(+ie.codepage),ie.type=="string")throw new Error("Cannot write WK1 to JS string");var re=Xs();if(!W["!ref"])throw new Error("Cannot export empty sheet to WK1");var oe=Zn(W["!ref"]),ve=W["!data"]!=null,_e=[];it(re,0,s(1030)),it(re,6,l(oe));for(var ye=Math.min(oe.e.r,8191),xe=oe.s.c;xe<=oe.e.c;++xe)_e[xe]=mn(xe);for(var st=oe.s.r;st<=ye;++st){var at=bn(st);for(xe=oe.s.c;xe<=oe.e.c;++xe){var Ge=ve?(W["!data"][st]||[])[xe]:W[_e[xe]+at];if(!(!Ge||Ge.t=="z"))switch(Ge.t){case"n":(Ge.v|0)==Ge.v&&Ge.v>=-32768&&Ge.v<=32767?it(re,13,g(st,xe,Ge)):it(re,14,y(st,xe,Ge));break;case"d":var ke=Es(Ge.v);(ke|0)==ke&&ke>=-32768&&ke<=32767?it(re,13,g(st,xe,{t:"n",v:ke,z:Ge.z||Kn[14]})):it(re,14,y(st,xe,{t:"n",v:ke,z:Ge.z||Kn[14]}));break;default:var qe=md(Ge);it(re,15,f(st,xe,qe.slice(0,239)))}}}return it(re,1),re.end()}function a(W,q){var ie=q||{};if(+ie.codepage>=0&&Ny(+ie.codepage),ie.type=="string")throw new Error("Cannot write WK3 to JS string");var re=Xs();it(re,0,o(W));for(var oe=0,ve=0;oe8191&&(ie=8191),q.write_shift(2,ie),q.write_shift(1,oe),q.write_shift(1,re),q.write_shift(2,0),q.write_shift(2,0),q.write_shift(1,1),q.write_shift(1,2),q.write_shift(4,0),q.write_shift(4,0),q}function d(W,q,ie){var re={s:{c:0,r:0},e:{c:0,r:0}};return q==8&&ie.qpro?(re.s.c=W.read_shift(1),W.l++,re.s.r=W.read_shift(2),re.e.c=W.read_shift(1),W.l++,re.e.r=W.read_shift(2),re):(re.s.c=W.read_shift(2),re.s.r=W.read_shift(2),q==12&&ie.qpro&&(W.l+=2),re.e.c=W.read_shift(2),re.e.r=W.read_shift(2),q==12&&ie.qpro&&(W.l+=2),re.s.c==65535&&(re.s.c=re.e.c=re.s.r=re.e.r=0),re)}function l(W){var q=Ae(8);return q.write_shift(2,W.s.c),q.write_shift(2,W.s.r),q.write_shift(2,W.e.c),q.write_shift(2,W.e.r),q}function c(W,q,ie){var re=[{c:0,r:0},{t:"n",v:0},0,0];return ie.qpro&&ie.vers!=20768?(re[0].c=W.read_shift(1),re[3]=W.read_shift(1),re[0].r=W.read_shift(2),W.l+=2):ie.works?(re[0].c=W.read_shift(2),re[0].r=W.read_shift(2),re[2]=W.read_shift(2)):(re[2]=W.read_shift(1),re[0].c=W.read_shift(2),re[0].r=W.read_shift(2)),re}function h(W){return W.z&&rf(W.z)?240|(e.indexOf(W.z)+1||2):255}function u(W,q,ie){var re=W.l+q,oe=c(W,q,ie);if(oe[1].t="s",(ie.vers&65534)==20768){W.l++;var ve=W.read_shift(1);return oe[1].v=W.read_shift(ve,"utf8"),oe}return ie.qpro&&W.l++,oe[1].v=W.read_shift(re-W.l,"cstr"),oe}function f(W,q,ie){var re=Ae(7+ie.length);re.write_shift(1,255),re.write_shift(2,q),re.write_shift(2,W),re.write_shift(1,39);for(var oe=0;oe=128?95:ve)}return re.write_shift(1,0),re}function p(W,q,ie){var re=W.l+q,oe=c(W,q,ie);if(oe[1].t="s",ie.vers==20768){var ve=W.read_shift(1);return oe[1].v=W.read_shift(ve,"utf8"),oe}return oe[1].v=W.read_shift(re-W.l,"cstr"),oe}function m(W,q,ie){var re=c(W,q,ie);return re[1].v=W.read_shift(2,"i"),re}function g(W,q,ie){var re=Ae(7);return re.write_shift(1,h(ie)),re.write_shift(2,q),re.write_shift(2,W),re.write_shift(2,ie.v,"i"),re}function v(W,q,ie){var re=c(W,q,ie);return re[1].v=W.read_shift(8,"f"),re}function y(W,q,ie){var re=Ae(13);return re.write_shift(1,h(ie)),re.write_shift(2,q),re.write_shift(2,W),re.write_shift(8,ie.v,"f"),re}function x(W,q,ie){var re=W.l+q,oe=c(W,q,ie);if(oe[1].v=W.read_shift(8,"f"),ie.qpro)W.l=re;else{var ve=W.read_shift(2);w(W.slice(W.l,W.l+ve),oe),W.l+=ve}return oe}function b(W,q,ie){var re=q&32768;return q&=-32769,q=(re?W:0)+(q>=8192?q-16384:q),(re?"":"$")+(ie?mn(q):bn(q))}var _={31:["NA",0],33:["ABS",1],34:["TRUNC",1],35:["SQRT",1],36:["LOG",1],37:["LN",1],38:["PI",0],39:["SIN",1],40:["COS",1],41:["TAN",1],42:["ATAN2",2],43:["ATAN",1],44:["ASIN",1],45:["ACOS",1],46:["EXP",1],47:["MOD",2],49:["ISNA",1],50:["ISERR",1],51:["FALSE",0],52:["TRUE",0],53:["RAND",0],54:["DATE",3],63:["ROUND",2],64:["TIME",3],68:["ISNUMBER",1],69:["ISTEXT",1],70:["LEN",1],71:["VALUE",1],73:["MID",3],74:["CHAR",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],102:["UPPER",1],103:["LOWER",1],107:["PROPER",1],109:["TRIM",1],111:["T",1]},C=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function w(W,q){ga(W,0);for(var ie=[],re=0,oe="",ve="",_e="",ye="";W.lie.length){console.error("WK1 bad formula parse 0x"+xe.toString(16)+":|"+ie.join("|")+"|");return}var ke=ie.slice(-re);ie.length-=re,ie.push(_[xe][0]+"("+ke.join(",")+")")}else return xe<=7?console.error("WK1 invalid opcode "+xe.toString(16)):xe<=24?console.error("WK1 unsupported op "+xe.toString(16)):xe<=30?console.error("WK1 invalid opcode "+xe.toString(16)):xe<=115?console.error("WK1 unsupported function opcode "+xe.toString(16)):console.error("WK1 unrecognized opcode "+xe.toString(16))}}ie.length==1?q[1].f=""+ie[0]:console.error("WK1 bad formula parse |"+ie.join("|")+"|")}function T(W){var q=[{c:0,r:0},{t:"n",v:0},0];return q[0].r=W.read_shift(2),q[3]=W[W.l++],q[0].c=W[W.l++],q}function S(W,q){var ie=T(W,q);return ie[1].t="s",ie[1].v=W.read_shift(q-4,"cstr"),ie}function E(W,q,ie,re){var oe=Ae(6+re.length);oe.write_shift(2,W),oe.write_shift(1,ie),oe.write_shift(1,q),oe.write_shift(1,39);for(var ve=0;ve=128?95:_e)}return oe.write_shift(1,0),oe}function D(W,q){var ie=T(W,q);ie[1].v=W.read_shift(2);var re=ie[1].v>>1;if(ie[1].v&1)switch(re&7){case 0:re=(re>>3)*5e3;break;case 1:re=(re>>3)*500;break;case 2:re=(re>>3)/20;break;case 3:re=(re>>3)/200;break;case 4:re=(re>>3)/2e3;break;case 5:re=(re>>3)/2e4;break;case 6:re=(re>>3)/16;break;case 7:re=(re>>3)/64;break}return ie[1].v=re,ie}function A(W,q){var ie=T(W,q),re=W.read_shift(4),oe=W.read_shift(4),ve=W.read_shift(2);if(ve==65535)return re===0&&oe===3221225472?(ie[1].t="e",ie[1].v=15):re===0&&oe===3489660928?(ie[1].t="e",ie[1].v=42):ie[1].v=0,ie;var _e=ve&32768;return ve=(ve&32767)-16446,ie[1].v=(1-_e*2)*(oe*Math.pow(2,ve+32)+re*Math.pow(2,ve)),ie}function M(W,q,ie,re){var oe=Ae(14);if(oe.write_shift(2,W),oe.write_shift(1,ie),oe.write_shift(1,q),re==0)return oe.write_shift(4,0),oe.write_shift(4,0),oe.write_shift(2,65535),oe;var ve=0,_e=0,ye=0,xe=0;return re<0&&(ve=1,re=-re),_e=Math.log2(re)|0,re/=Math.pow(2,_e-31),xe=re>>>0,xe&2147483648||(re/=2,++_e,xe=re>>>0),re-=xe,xe|=2147483648,xe>>>=0,re*=Math.pow(2,32),ye=re>>>0,oe.write_shift(4,ye),oe.write_shift(4,xe),_e+=16383+(ve?32768:0),oe.write_shift(2,_e),oe}function R(W,q){var ie=A(W,14);return W.l+=q-14,ie}function L(W,q){var ie=T(W,q),re=W.read_shift(4);return ie[1].v=re>>6,ie}function I(W,q){var ie=T(W,q),re=W.read_shift(8,"f");return ie[1].v=re,ie}function O(W,q){var ie=I(W,12);return W.l+=q-12,ie}function N(W,q){return W[W.l+q-1]==0?W.read_shift(q,"cstr"):""}function H(W,q){var ie=W[W.l++];ie>q-1&&(ie=q-1);for(var re="";re.length127?95:oe}return ie[ie.l++]=0,ie}var F={0:{n:"BOF",f:eS},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:d},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:m},14:{n:"NUMBER",f:v},15:{n:"LABEL",f:u},16:{n:"FORMULA",f:x},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:p},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:N},222:{n:"SHEETNAMELP",f:H},255:{n:"BOF",f:eS},21506:{n:"WKSNF",f:eS},65535:{n:""}},k={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:S},23:{n:"NUMBER17",f:A},24:{n:"NUMBER18",f:D},25:{n:"FORMULA19",f:R},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:V},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:L},38:{n:"??"},39:{n:"NUMBER27",f:I},40:{n:"FORMULA28",f:O},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:N},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:X},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}},G={5:"dd-mmm-yy",6:"dd-mmm",7:"mmm-yy",8:"mm/dd/yy",10:"hh:mm:ss AM/PM",11:"hh:mm AM/PM",14:"dd-mmm-yyyy",15:"mmm-yyyy",34:"0.00",50:"0.00;[Red]0.00",66:"0.00;(0.00)",82:"0.00;[Red](0.00)",162:'"$"#,##0.00;\\("$"#,##0.00\\)',288:"0%",304:"0E+00",320:"# ?/?"};function Z(W){var q=W.read_shift(2),ie=W.read_shift(1);if(ie!=0)throw"unsupported QPW string type "+ie.toString(16);return W.read_shift(q,"sbcs-cont")}function J(W,q){ga(W,0);var ie=q||{};hc!=null&&ie.dense==null&&(ie.dense=hc);var re={};ie.dense&&(re["!data"]=[]);var oe=[],ve="",_e=[],ye={s:{r:-1,c:-1},e:{r:-1,c:-1}},xe=0,st=0,at=0,Ge=0,ke={SheetNames:[],Sheets:{}},qe=[];e:for(;W.l255||ye.s.r>999999)break;ye.e.cat&&(ye.s.c=at),Ge=He.read_shift(4),ye.s.r>Ge&&(ye.s.r=Ge),Ge=He.read_shift(4),ye.e.rGe&&(ye.s.r=Ge),ye.e.r0&&xe>=0;){if(Ei&32)switch(Ei&31){case 2:jt={t:"n",v:jt.v+Cr&65535};break;case 3:jt={t:"n",v:jt.v+Cr&65535},jt.v>32767&&(jt.v-=65536);break;case 7:jt={t:"s",v:oe[st=st+Cr>>>0]};break;default:throw"Cannot apply delta for QPW cell type "+(Ei&31)}else switch(Ei&31){case 1:jt={t:"z"};break;case 2:jt={t:"n",v:He.read_shift(2)};break;case 7:jt={t:"s",v:oe[st=He.read_shift(4)-1]};break;default:throw"Cannot apply repeat for QPW cell type "+(Ei&31)}Br!=-1,!ie.sheetStubs&&jt.t=="z"||(re["!data"]!=null?(re["!data"][Ge]||(re["!data"][Ge]=[]),re["!data"][Ge][at]=jt):re[ji+bn(Ge)]=jt),++Ge,--xe}}}break;case 3074:{at=He.read_shift(2),Ge=He.read_shift(4);var Ks=Z(He);re["!data"]!=null?(re["!data"][Ge]||(re["!data"][Ge]=[]),re["!data"][Ge][at]={t:"s",v:Ks}):re[mn(at)+bn(Ge)]={t:"s",v:Ks}}break;default:break}W.l+=Nt}return ke}return{sheet_to_wk1:n,book_to_wk3:a,to_workbook:i}}();var E3e=/^\s|\s$|[\t\n\r]/;function D3e(t,i){if(!i.bookSST)return"";var e=[Nr];e[e.length]=ft("sst",null,{xmlns:ug[0],count:t.Count,uniqueCount:t.Unique});for(var r=0;r!=t.length;++r)if(t[r]!=null){var n=t[r],a="";n.r?a+=n.r:(a+=""),a+="",e[e.length]=a}return e.length>2&&(e[e.length]="",e[1]=e[1].replace("/>",">")),e.join("")}function M3e(t){return[t.read_shift(4),t.read_shift(4)]}function A3e(t,i){return i||(i=Ae(8)),i.write_shift(4,t.Count),i.write_shift(4,t.Unique),i}var I3e=g4e;function R3e(t){var i=Xs();Xe(i,159,A3e(t));for(var e=0;e=0;--a)s=e[a],o=i&16384?1:0,d=i<<1&32767,l=o|d,i=l^s;return i^52811}function k3e(t,i){var e=["{\\rtf1\\ansi"];if(!t["!ref"])return e[0]+"}";for(var r=Zn(t["!ref"]),n,a=t["!data"]!=null,s=[],o=r.s.r;o<=r.e.r;++o){e.push("\\trowd\\trautofit1");for(var d=r.s.c;d<=r.e.c;++d)e.push("\\cellx"+(d+1));for(e.push("\\pard\\intbl"),a&&(s=t["!data"][o]||[]),d=r.s.c;d<=r.e.c;++d){var l=ar({r:o,c:d});if(n=a?s[d]:t[l],!n||n.v==null&&(!n.f||n.F)){e.push(" \\cell");continue}e.push(" "+(n.w||(md(n),n.w)||"").replace(/[\r\n]/g,"\\par ")),e.push("\\cell")}e.push("\\pard\\intbl\\row")}return e.join("")+"}"}function XK(t){for(var i=0,e=1;i!=3;++i)e=e*256+(t[i]>255?255:t[i]<0?0:t[i]);return e.toString(16).toUpperCase().slice(1)}var F3e=6;var hd=F3e;function dS(t){return Math.floor((t+Math.round(128/hd)/256)*hd)}function uS(t){return Math.floor((t-5)/hd*100+.5)/100}function VO(t){return Math.round((t*hd+5)/hd*256)/256}function l4(t){t.width?(t.wpx=dS(t.width),t.wch=uS(t.wpx),t.MDW=hd):t.wpx?(t.wch=uS(t.wpx),t.width=VO(t.wch),t.MDW=hd):typeof t.wch=="number"&&(t.width=VO(t.wch),t.wpx=dS(t.width),t.MDW=hd),t.customWidth&&delete t.customWidth}var O3e=96,QZ=O3e;function hS(t){return t*96/QZ}function KZ(t){return t*QZ/96}function L3e(t){var i=[""];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(e){for(var r=e[0];r<=e[1];++r)t[r]!=null&&(i[i.length]=ft("numFmt",null,{numFmtId:r,formatCode:xi(t[r])}))}),i.length===1?"":(i[i.length]="",i[0]=ft("numFmts",null,{count:i.length-2}).replace("/>",">"),i.join(""))}function N3e(t){var i=[];return i[i.length]=ft("cellXfs",null),t.forEach(function(e){i[i.length]=ft("xf",null,e)}),i[i.length]="",i.length===2?"":(i[0]=ft("cellXfs",null,{count:i.length-2}).replace("/>",">"),i.join(""))}function B3e(t,i){var e=[Nr,ft("styleSheet",null,{xmlns:ug[0],"xmlns:vt":cs.vt})],r;return t.SSF&&(r=L3e(t.SSF))!=null&&(e[e.length]=r),e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',(r=N3e(i.cellXfs))&&(e[e.length]=r),e[e.length]='',e[e.length]='',e[e.length]='',e.length>2&&(e[e.length]="",e[1]=e[1].replace("/>",">")),e.join("")}function V3e(t,i){var e=t.read_shift(2),r=Ys(t,i-2);return[e,r]}function U3e(t,i,e){e||(e=Ae(6+4*i.length)),e.write_shift(2,t),Kr(i,e);var r=e.length>e.l?e.slice(0,e.l):e;return e.l==null&&(e.l=e.length),r}function z3e(t,i,e){var r={};r.sz=t.read_shift(2)/20;var n=C4e(t,2,e);n.fItalic&&(r.italic=1),n.fCondense&&(r.condense=1),n.fExtend&&(r.extend=1),n.fShadow&&(r.shadow=1),n.fOutline&&(r.outline=1),n.fStrikeout&&(r.strike=1);var a=t.read_shift(2);switch(a===700&&(r.bold=1),t.read_shift(2)){case 1:r.vertAlign="superscript";break;case 2:r.vertAlign="subscript";break}var s=t.read_shift(1);s!=0&&(r.underline=s);var o=t.read_shift(1);o>0&&(r.family=o);var d=t.read_shift(1);switch(d>0&&(r.charset=d),t.l++,r.color=w4e(t,8),t.read_shift(1)){case 1:r.scheme="major";break;case 2:r.scheme="minor";break}return r.name=Ys(t,i-21),r}function G3e(t,i){i||(i=Ae(25+4*32)),i.write_shift(2,t.sz*20),T4e(t,i),i.write_shift(2,t.bold?700:400);var e=0;t.vertAlign=="superscript"?e=1:t.vertAlign=="subscript"&&(e=2),i.write_shift(2,e),i.write_shift(1,t.underline||0),i.write_shift(1,t.family||0),i.write_shift(1,t.charset||0),i.write_shift(1,0),lS(t.color,i);var r=0;return t.scheme=="major"&&(r=1),t.scheme=="minor"&&(r=2),i.write_shift(1,r),Kr(t.name,i),i.length>i.l?i.slice(0,i.l):i}var H3e=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],MO,j3e=fc;function YK(t,i){i||(i=Ae(4*3+8*7+16*1)),MO||(MO=WO(H3e));var e=MO[t.patternType];e==null&&(e=40),i.write_shift(4,e);var r=0;if(e!=40)for(lS({auto:1},i),lS({auto:1},i);r<12;++r)i.write_shift(4,0);else{for(;r<4;++r)i.write_shift(4,0);for(;r<12;++r)i.write_shift(4,0)}return i.length>i.l?i.slice(0,i.l):i}function W3e(t,i){var e=t.l+i,r=t.read_shift(2),n=t.read_shift(2);return t.l=e,{ixfe:r,numFmtId:n}}function ZZ(t,i,e){e||(e=Ae(16)),e.write_shift(2,i||0),e.write_shift(2,t.numFmtId||0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(1,0),e.write_shift(1,0);var r=0;return e.write_shift(1,r),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(1,0),e}function Ay(t,i){return i||(i=Ae(10)),i.write_shift(1,0),i.write_shift(1,0),i.write_shift(4,0),i.write_shift(4,0),i}var X3e=fc;function Y3e(t,i){return i||(i=Ae(51)),i.write_shift(1,0),Ay(null,i),Ay(null,i),Ay(null,i),Ay(null,i),Ay(null,i),i.length>i.l?i.slice(0,i.l):i}function $3e(t,i){return i||(i=Ae(12+4*10)),i.write_shift(4,t.xfId),i.write_shift(2,1),i.write_shift(1,+t.builtinId),i.write_shift(1,0),Gy(t.name||"",i),i.length>i.l?i.slice(0,i.l):i}function Q3e(t,i,e){var r=Ae(2052);return r.write_shift(4,t),Gy(i,r),Gy(e,r),r.length>r.l?r.slice(0,r.l):r}function K3e(t,i){if(i){var e=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var n=r[0];n<=r[1];++n)i[n]!=null&&++e}),e!=0&&(Xe(t,615,_l(e)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var n=r[0];n<=r[1];++n)i[n]!=null&&Xe(t,44,U3e(n,i[n]))}),Xe(t,616))}}function Z3e(t){var i=1;i!=0&&(Xe(t,611,_l(i)),Xe(t,43,G3e({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),Xe(t,612))}function J3e(t){var i=2;i!=0&&(Xe(t,603,_l(i)),Xe(t,45,YK({patternType:"none"})),Xe(t,45,YK({patternType:"gray125"})),Xe(t,604))}function q3e(t){var i=1;i!=0&&(Xe(t,613,_l(i)),Xe(t,46,Y3e({})),Xe(t,614))}function eLe(t){var i=1;Xe(t,626,_l(i)),Xe(t,47,ZZ({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),Xe(t,627)}function tLe(t,i){Xe(t,617,_l(i.length)),i.forEach(function(e){Xe(t,47,ZZ(e,0))}),Xe(t,618)}function iLe(t){var i=1;Xe(t,619,_l(i)),Xe(t,48,$3e({xfId:0,builtinId:0,name:"Normal"})),Xe(t,620)}function nLe(t){var i=0;Xe(t,505,_l(i)),Xe(t,506)}function rLe(t){var i=0;Xe(t,508,Q3e(i,"TableStyleMedium9","PivotStyleMedium4")),Xe(t,509)}function sLe(t,i){var e=Xs();return Xe(e,278),K3e(e,t.SSF),Z3e(e,t),J3e(e,t),q3e(e,t),eLe(e,t),tLe(e,i.cellXfs),iLe(e,t),nLe(e,t),rLe(e,t),Xe(e,279),e.end()}function JZ(t,i){if(i&&i.themeXLSX)return i.themeXLSX;if(t&&typeof t.raw=="string")return t.raw;var e=[Nr];return e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e.join("")}function aLe(t,i){return{flags:t.read_shift(4),version:t.read_shift(4),name:Ys(t,i-8)}}function oLe(t){var i=Ae(12+2*t.name.length);return i.write_shift(4,t.flags),i.write_shift(4,t.version),Kr(t.name,i),i.slice(0,i.l)}function lLe(t){for(var i=[],e=t.read_shift(4);e-- >0;)i.push([t.read_shift(4),t.read_shift(4)]);return i}function cLe(t){var i=Ae(4+8*t.length);i.write_shift(4,t.length);for(var e=0;e + + + + + + + + + + + + + + + + + +`),t.join("")}function pLe(t){var i={};i.i=t.read_shift(4);var e={};e.r=t.read_shift(4),e.c=t.read_shift(4),i.r=ar(e);var r=t.read_shift(1);return r&2&&(i.l="1"),r&8&&(i.a="1"),i}function qZ(t,i,e){var r=[21600,21600],n=["m0,0l0",r[1],r[0],r[1],r[0],"0xe"].join(","),a=[ft("xml",null,{"xmlns:v":go.v,"xmlns:o":go.o,"xmlns:x":go.x,"xmlns:mv":go.mv}).replace(/\/>/,">"),ft("o:shapelayout",ft("o:idmap",null,{"v:ext":"edit",data:t}),{"v:ext":"edit"})],s=65536*t,o=i||[];return o.length>0&&a.push(ft("v:shapetype",[ft("v:stroke",null,{joinstyle:"miter"}),ft("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202",coordsize:r.join(","),"o:spt":202,path:n})),o.forEach(function(d){++s,a.push(gLe(d,s))}),a.push(""),a.join("")}function gLe(t,i,e){var r=ir(t[0]),n={color2:"#BEFF82",type:"gradient"};n.type=="gradient"&&(n.angle="-180");var a=n.type=="gradient"?ft("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,s=ft("v:fill",a,n),o={on:"t",obscured:"t"};return["",s,ft("v:shadow",null,o),ft("v:path",null,{"o:connecttype":"none"}),'
','',"","",Ts("x:Anchor",[r.c+1,0,r.r+1,0,r.c+3,20,r.r+5,20].join(",")),Ts("x:AutoFill","False"),Ts("x:Row",String(r.r)),Ts("x:Column",String(r.c)),t[1].hidden?"":"","",""].join("")}function vLe(t){var i=[Nr,ft("comments",null,{xmlns:ug[0]})],e=[];return i.push(""),t.forEach(function(r){r[1].forEach(function(n){var a=xi(n.a);e.indexOf(a)==-1&&(e.push(a),i.push(""+a+"")),n.T&&n.ID&&e.indexOf("tc="+n.ID)==-1&&(e.push("tc="+n.ID),i.push("tc="+n.ID+""))})}),e.length==0&&(e.push("SheetJ5"),i.push("SheetJ5")),i.push(""),i.push(""),t.forEach(function(r){var n=0,a=[],s=0;if(r[1][0]&&r[1][0].T&&r[1][0].ID&&(n=e.indexOf("tc="+r[1][0].ID)),r[1].forEach(function(l){l.a&&(n=e.indexOf(xi(l.a))),l.T&&++s,a.push(l.t==null?"":xi(l.t))}),s===0)r[1].forEach(function(l){i.push(''),i.push(Ts("t",l.t==null?"":xi(l.t))),i.push("")});else{r[1][0]&&r[1][0].T&&r[1][0].ID&&(n=e.indexOf("tc="+r[1][0].ID)),i.push('');for(var o=`Comment: + `+a[0]+` +`,d=1;d")}}),i.push(""),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function eJ(t,i,e){var r=[Nr,ft("ThreadedComments",null,{xmlns:cs.TCMNT}).replace(/[\/]>/,">")];return t.forEach(function(n){var a="";(n[1]||[]).forEach(function(s,o){if(!s.T){delete s.ID;return}s.a&&i.indexOf(s.a)==-1&&i.push(s.a);var d={ref:n[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+e.tcid++).slice(-12)+"}"};o==0?a=d.id:d.parentId=a,s.ID=d.id,s.a&&(d.personId="{54EE7950-7262-4200-6969-"+("000000000000"+i.indexOf(s.a)).slice(-12)+"}"),r.push(ft("threadedComment",Ts("text",s.t||""),d))})}),r.push(""),r.join("")}function tJ(t){var i=[Nr,ft("personList",null,{xmlns:cs.TCMNT,"xmlns:x":ug[0]}).replace(/[\/]>/,">")];return t.forEach(function(e,r){i.push(ft("person",null,{displayName:e,id:"{54EE7950-7262-4200-6969-"+("000000000000"+r).slice(-12)+"}",userId:e,providerId:"None"}))}),i.push(""),i.join("")}function yLe(t){var i={};i.iauthor=t.read_shift(4);var e=df(t,16);return i.rfx=e.s,i.ref=ar(e.s),t.l+=16,i}function xLe(t,i){return i==null&&(i=Ae(36)),i.write_shift(4,t[1].iauthor),pg(t[0],i),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i}var bLe=Ys;function $K(t){return Kr(t.slice(0,54))}function _Le(t){var i=Xs(),e=[];return Xe(i,628),Xe(i,630),t.forEach(function(r){r[1].forEach(function(n){e.indexOf(n.a)>-1||(e.push(n.a.slice(0,54)),Xe(i,632,$K(n.a)),n.T&&n.ID&&e.indexOf("tc="+n.ID)==-1&&(e.push("tc="+n.ID),Xe(i,632,$K("tc="+n.ID))))})}),Xe(i,631),Xe(i,633),t.forEach(function(r){r[1].forEach(function(n){var a=-1;n.ID&&(a=e.indexOf("tc="+n.ID)),a==-1&&r[1][0].T&&r[1][0].ID&&(a=e.indexOf("tc="+r[1][0].ID)),a==-1&&(a=e.indexOf(n.a)),n.iauthor=a;var s={s:ir(r[0]),e:ir(r[0])};Xe(i,635,xLe([s,n])),n.t&&n.t.length>0&&Xe(i,637,y4e(n)),Xe(i,636),delete n.iauthor})}),Xe(i,634),Xe(i,629),i.end()}function wLe(t,i){i.FullPaths.forEach(function(e,r){if(r!=0){var n=e.replace(/^[\/]*[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");n.slice(-1)!=="/"&&An.utils.cfb_add(t,n,i.FileIndex[r].content)}})}var CLe=["xlsb","xlsm","xlam","biff8","xla"];var QK=function(){var t=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,i={r:0,c:0};function e(r,n,a,s){var o=!1,d=!1;a.length==0?d=!0:a.charAt(0)=="["&&(d=!0,a=a.slice(1,-1)),s.length==0?o=!0:s.charAt(0)=="["&&(o=!0,s=s.slice(1,-1));var l=a.length>0?parseInt(a,10)|0:0,c=s.length>0?parseInt(s,10)|0:0;return o?c+=i.c:--c,d?l+=i.r:--l,n+(o?"":"$")+mn(c)+(d?"":"$")+bn(l)}return function(n,a){return i=a,n.replace(t,e)}}(),SS=/(^|[^._A-Z0-9])(\$?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])(\$?)(\d{1,7})(?![_.\(A-Za-z0-9])/g;try{SS=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g}catch{}var ES=function(){return function(i,e){return i.replace(SS,function(r,n,a,s,o,d){var l=n4(s)-(a?0:e.c),c=i4(d)-(o?0:e.r),h=o=="$"?c+1:c==0?"":"["+c+"]",u=a=="$"?l+1:l==0?"":"["+l+"]";return n+"R"+h+"C"+u})}}();function TLe(t,i){return t.replace(SS,function(e,r,n,a,s,o){return r+(n=="$"?n+a:mn(n4(a)+i.c))+(s=="$"?s+o:bn(i4(o)+i.r))})}function SLe(t){return t.length!=1}function Pr(t){t.l+=1}function Su(t,i){var e=t.read_shift(i==1?1:2);return[e&16383,e>>14&1,e>>15&1]}function iJ(t,i,e){var r=2;if(e){if(e.biff>=2&&e.biff<=5)return nJ(t,i,e);e.biff==12&&(r=4)}var n=t.read_shift(r),a=t.read_shift(r),s=Su(t,2),o=Su(t,2);return{s:{r:n,c:s[0],cRel:s[1],rRel:s[2]},e:{r:a,c:o[0],cRel:o[1],rRel:o[2]}}}function nJ(t){var i=Su(t,2),e=Su(t,2),r=t.read_shift(1),n=t.read_shift(1);return{s:{r:i[0],c:r,cRel:i[1],rRel:i[2]},e:{r:e[0],c:n,cRel:e[1],rRel:e[2]}}}function ELe(t,i,e){if(e.biff<8)return nJ(t,i,e);var r=t.read_shift(e.biff==12?4:2),n=t.read_shift(e.biff==12?4:2),a=Su(t,2),s=Su(t,2);return{s:{r,c:a[0],cRel:a[1],rRel:a[2]},e:{r:n,c:s[0],cRel:s[1],rRel:s[2]}}}function rJ(t,i,e){if(e&&e.biff>=2&&e.biff<=5)return DLe(t,i,e);var r=t.read_shift(e&&e.biff==12?4:2),n=Su(t,2);return{r,c:n[0],cRel:n[1],rRel:n[2]}}function DLe(t){var i=Su(t,2),e=t.read_shift(1);return{r:i[0],c:e,cRel:i[1],rRel:i[2]}}function MLe(t){var i=t.read_shift(2),e=t.read_shift(2);return{r:i,c:e&255,fQuoted:!!(e&16384),cRel:e>>15,rRel:e>>15}}function ALe(t,i,e){var r=e&&e.biff?e.biff:8;if(r>=2&&r<=5)return ILe(t,i,e);var n=t.read_shift(r>=12?4:2),a=t.read_shift(2),s=(a&16384)>>14,o=(a&32768)>>15;if(a&=16383,o==1)for(;n>524287;)n-=1048576;if(s==1)for(;a>8191;)a=a-16384;return{r:n,c:a,cRel:s,rRel:o}}function ILe(t){var i=t.read_shift(2),e=t.read_shift(1),r=(i&32768)>>15,n=(i&16384)>>14;return i&=16383,r==1&&i>=8192&&(i=i-16384),n==1&&e>=128&&(e=e-256),{r:i,c:e,cRel:n,rRel:r}}function RLe(t,i,e){var r=(t[t.l++]&96)>>5,n=iJ(t,e.biff>=2&&e.biff<=5?6:8,e);return[r,n]}function PLe(t,i,e){var r=(t[t.l++]&96)>>5,n=t.read_shift(2,"i"),a=8;if(e)switch(e.biff){case 5:t.l+=12,a=6;break;case 12:a=12;break}var s=iJ(t,a,e);return[r,n,s]}function kLe(t,i,e){var r=(t[t.l++]&96)>>5;return t.l+=e&&e.biff>8?12:e.biff<8?6:8,[r]}function FLe(t,i,e){var r=(t[t.l++]&96)>>5,n=t.read_shift(2),a=8;if(e)switch(e.biff){case 5:t.l+=12,a=6;break;case 12:a=12;break}return t.l+=a,[r,n]}function OLe(t,i,e){var r=(t[t.l++]&96)>>5,n=ELe(t,i-1,e);return[r,n]}function LLe(t,i,e){var r=(t[t.l++]&96)>>5;return t.l+=e.biff==2?6:e.biff==12?14:7,[r]}function KK(t){var i=t[t.l+1]&1,e=1;return t.l+=4,[i,e]}function NLe(t,i,e){t.l+=2;for(var r=t.read_shift(e&&e.biff==2?1:2),n=[],a=0;a<=r;++a)n.push(t.read_shift(e&&e.biff==2?1:2));return n}function BLe(t,i,e){var r=t[t.l+1]&255?1:0;return t.l+=2,[r,t.read_shift(e&&e.biff==2?1:2)]}function VLe(t,i,e){var r=t[t.l+1]&255?1:0;return t.l+=2,[r,t.read_shift(e&&e.biff==2?1:2)]}function ULe(t){var i=t[t.l+1]&255?1:0;return t.l+=2,[i,t.read_shift(2)]}function zLe(t,i,e){var r=t[t.l+1]&255?1:0;return t.l+=e&&e.biff==2?3:4,[r]}function sJ(t){var i=t.read_shift(1),e=t.read_shift(1);return[i,e]}function GLe(t){return t.read_shift(2),sJ(t,2)}function HLe(t){return t.read_shift(2),sJ(t,2)}function jLe(t,i,e){var r=(t[t.l]&96)>>5;t.l+=1;var n=rJ(t,0,e);return[r,n]}function WLe(t,i,e){var r=(t[t.l]&96)>>5;t.l+=1;var n=ALe(t,0,e);return[r,n]}function XLe(t,i,e){var r=(t[t.l]&96)>>5;t.l+=1;var n=t.read_shift(2);e&&e.biff==5&&(t.l+=12);var a=rJ(t,0,e);return[r,n,a]}function YLe(t,i,e){var r=(t[t.l]&96)>>5;t.l+=1;var n=t.read_shift(e&&e.biff<=3?1:2);return[r5e[n],lJ[n],r]}function $Le(t,i,e){var r=t[t.l++],n=t.read_shift(1),a=e&&e.biff<=3?[r==88?-1:0,t.read_shift(1)]:QLe(t);return[n,(a[0]===0?lJ:n5e)[a[1]]]}function QLe(t){return[t[t.l+1]>>7,t.read_shift(2)&32767]}function KLe(t,i,e){t.l+=e&&e.biff==2?3:4}function ZLe(t,i,e){if(t.l++,e&&e.biff==12)return[t.read_shift(4,"i"),0];var r=t.read_shift(2),n=t.read_shift(e&&e.biff==2?1:2);return[r,n]}function JLe(t){return t.l++,Cu[t.read_shift(1)]}function qLe(t){return t.l++,t.read_shift(2)}function eNe(t){return t.l++,t.read_shift(1)!==0}function tNe(t){return t.l++,gg(t,8)}function iNe(t,i,e){return t.l++,HZ(t,i-1,e)}function nNe(t,i){var e=[t.read_shift(1)];if(i==12)switch(e[0]){case 2:e[0]=4;break;case 4:e[0]=16;break;case 0:e[0]=1;break;case 1:e[0]=2;break}switch(e[0]){case 4:e[1]=G4e(t,1)?"TRUE":"FALSE",i!=12&&(t.l+=7);break;case 37:case 16:e[1]=Cu[t[t.l]],t.l+=i==12?4:8;break;case 0:t.l+=8;break;case 1:e[1]=gg(t,8);break;case 2:e[1]=X4e(t,0,{biff:i>0&&i<8?2:i});break;default:throw new Error("Bad SerAr: "+e[0])}return e}function rNe(t,i,e){for(var r=t.read_shift(e.biff==12?4:2),n=[],a=0;a!=r;++a)n.push((e.biff==12?df:Q4e)(t,8));return n}function sNe(t,i,e){var r=0,n=0;e.biff==12?(r=t.read_shift(4),n=t.read_shift(4)):(n=1+t.read_shift(1),r=1+t.read_shift(2)),e.biff>=2&&e.biff<8&&(--r,--n==0&&(n=256));for(var a=0,s=[];a!=r&&(s[a]=[]);++a)for(var o=0;o!=n;++o)s[a][o]=nNe(t,e.biff);return s}function aNe(t,i,e){var r=t.read_shift(1)>>>5&3,n=!e||e.biff>=8?4:2,a=t.read_shift(n);switch(e.biff){case 2:t.l+=5;break;case 3:case 4:t.l+=8;break;case 5:t.l+=12;break}return[r,0,a]}function oNe(t,i,e){if(e.biff==5)return lNe(t,i,e);var r=t.read_shift(1)>>>5&3,n=t.read_shift(2),a=t.read_shift(4);return[r,n,a]}function lNe(t){var i=t.read_shift(1)>>>5&3,e=t.read_shift(2,"i");t.l+=8;var r=t.read_shift(2);return t.l+=12,[i,e,r]}function cNe(t,i,e){var r=t.read_shift(1)>>>5&3;t.l+=e&&e.biff==2?3:4;var n=t.read_shift(e&&e.biff==2?1:2);return[r,n]}function dNe(t,i,e){var r=t.read_shift(1)>>>5&3,n=t.read_shift(e&&e.biff==2?1:2);return[r,n]}function uNe(t,i,e){var r=t.read_shift(1)>>>5&3;return t.l+=4,e.biff<8&&t.l--,e.biff==12&&(t.l+=2),[r]}function hNe(t,i,e){var r=(t[t.l++]&96)>>5,n=t.read_shift(2),a=4;if(e)switch(e.biff){case 5:a=15;break;case 12:a=6;break}return t.l+=a,[r,n]}var fNe=fc,mNe=fc,pNe=fc;function Yy(t,i,e){return t.l+=2,[MLe(t,4,e)]}function c4(t){return t.l+=6,[]}var gNe=Yy,vNe=c4,yNe=c4,xNe=Yy;function aJ(t){return t.l+=2,[eS(t),t.read_shift(2)&1]}var bNe=Yy,_Ne=aJ,wNe=c4,CNe=Yy,TNe=Yy,SNe=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function ENe(t){t.l+=2;var i=t.read_shift(2),e=t.read_shift(2),r=t.read_shift(4),n=t.read_shift(2),a=t.read_shift(2),s=SNe[e>>2&31];return{ixti:i,coltype:e&3,rt:s,idx:r,c:n,C:a}}function DNe(t){return t.l+=2,[t.read_shift(4)]}function MNe(t,i,e){return t.l+=5,t.l+=2,t.l+=e.biff==2?1:4,["PTGSHEET"]}function ANe(t,i,e){return t.l+=e.biff==2?4:5,["PTGENDSHEET"]}function INe(t){var i=t.read_shift(1)>>>5&3,e=t.read_shift(2);return[i,e]}function RNe(t){var i=t.read_shift(1)>>>5&3,e=t.read_shift(2);return[i,e]}function PNe(t){return t.l+=4,[0,0]}var ZK={1:{n:"PtgExp",f:ZLe},2:{n:"PtgTbl",f:pNe},3:{n:"PtgAdd",f:Pr},4:{n:"PtgSub",f:Pr},5:{n:"PtgMul",f:Pr},6:{n:"PtgDiv",f:Pr},7:{n:"PtgPower",f:Pr},8:{n:"PtgConcat",f:Pr},9:{n:"PtgLt",f:Pr},10:{n:"PtgLe",f:Pr},11:{n:"PtgEq",f:Pr},12:{n:"PtgGe",f:Pr},13:{n:"PtgGt",f:Pr},14:{n:"PtgNe",f:Pr},15:{n:"PtgIsect",f:Pr},16:{n:"PtgUnion",f:Pr},17:{n:"PtgRange",f:Pr},18:{n:"PtgUplus",f:Pr},19:{n:"PtgUminus",f:Pr},20:{n:"PtgPercent",f:Pr},21:{n:"PtgParen",f:Pr},22:{n:"PtgMissArg",f:Pr},23:{n:"PtgStr",f:iNe},26:{n:"PtgSheet",f:MNe},27:{n:"PtgEndSheet",f:ANe},28:{n:"PtgErr",f:JLe},29:{n:"PtgBool",f:eNe},30:{n:"PtgInt",f:qLe},31:{n:"PtgNum",f:tNe},32:{n:"PtgArray",f:LLe},33:{n:"PtgFunc",f:YLe},34:{n:"PtgFuncVar",f:$Le},35:{n:"PtgName",f:aNe},36:{n:"PtgRef",f:jLe},37:{n:"PtgArea",f:RLe},38:{n:"PtgMemArea",f:cNe},39:{n:"PtgMemErr",f:fNe},40:{n:"PtgMemNoMem",f:mNe},41:{n:"PtgMemFunc",f:dNe},42:{n:"PtgRefErr",f:uNe},43:{n:"PtgAreaErr",f:kLe},44:{n:"PtgRefN",f:WLe},45:{n:"PtgAreaN",f:OLe},46:{n:"PtgMemAreaN",f:INe},47:{n:"PtgMemNoMemN",f:RNe},57:{n:"PtgNameX",f:oNe},58:{n:"PtgRef3d",f:XLe},59:{n:"PtgArea3d",f:PLe},60:{n:"PtgRefErr3d",f:hNe},61:{n:"PtgAreaErr3d",f:FLe},255:{}},kNe={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},FNe={1:{n:"PtgElfLel",f:aJ},2:{n:"PtgElfRw",f:CNe},3:{n:"PtgElfCol",f:gNe},6:{n:"PtgElfRwV",f:TNe},7:{n:"PtgElfColV",f:xNe},10:{n:"PtgElfRadical",f:bNe},11:{n:"PtgElfRadicalS",f:wNe},13:{n:"PtgElfColS",f:vNe},15:{n:"PtgElfColSV",f:yNe},16:{n:"PtgElfRadicalLel",f:_Ne},25:{n:"PtgList",f:ENe},29:{n:"PtgSxName",f:DNe},255:{}},ONe={0:{n:"PtgAttrNoop",f:PNe},1:{n:"PtgAttrSemi",f:zLe},2:{n:"PtgAttrIf",f:VLe},4:{n:"PtgAttrChoose",f:NLe},8:{n:"PtgAttrGoto",f:BLe},16:{n:"PtgAttrSum",f:KLe},32:{n:"PtgAttrBaxcel",f:KK},33:{n:"PtgAttrBaxcel",f:KK},64:{n:"PtgAttrSpace",f:GLe},65:{n:"PtgAttrSpaceSemi",f:HLe},128:{n:"PtgAttrIfError",f:ULe},255:{}};function LNe(t,i,e,r){if(r.biff<8)return fc(t,i);for(var n=t.l+i,a=[],s=0;s!==e.length;++s)switch(e[s][0]){case"PtgArray":e[s][1]=sNe(t,0,r),a.push(e[s][1]);break;case"PtgMemArea":e[s][2]=rNe(t,e[s][1],r),a.push(e[s][2]);break;case"PtgExp":r&&r.biff==12&&(e[s][1][1]=t.read_shift(4),a.push(e[s][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+e[s][0];default:break}return i=n-t.l,i!==0&&a.push(fc(t,i)),a}function NNe(t,i,e){for(var r=t.l+i,n,a,s=[];r!=t.l;)i=r-t.l,a=t[t.l],n=ZK[a]||ZK[kNe[a]],(a===24||a===25)&&(n=(a===24?FNe:ONe)[t[t.l+1]]),!n||!n.f?fc(t,i):s.push([n.n,n.f(t,i,e)]);return s}function BNe(t){for(var i=[],e=0;e=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function UNe(t,i){var e=t.lastIndexOf("!"),r=i.lastIndexOf("!");return e==-1&&r==-1?t+":"+i:e>0&&r>0&&t.slice(0,e).toLowerCase()==i.slice(0,r).toLowerCase()?t+":"+i.slice(r+1):(console.error("Cannot hydrate range",t,i),t+":"+i)}function oJ(t,i,e){if(!t)return"SH33TJSERR0";if(e.biff>8&&(!t.XTI||!t.XTI[i]))return t.SheetNames[i];if(!t.XTI)return"SH33TJSERR6";var r=t.XTI[i];if(e.biff<8)return i>1e4&&(i-=65536),i<0&&(i=-i),i==0?"":t.XTI[i-1];if(!r)return"SH33TJSERR1";var n="";if(e.biff>8)switch(t[r[0]][0]){case 357:return n=r[1]==-1?"#REF":t.SheetNames[r[1]],r[1]==r[2]?n:n+":"+t.SheetNames[r[2]];case 358:return e.SID!=null?t.SheetNames[e.SID]:"SH33TJSSAME"+t[r[0]][0];case 355:default:return"SH33TJSSRC"+t[r[0]][0]}switch(t[r[0]][0][0]){case 1025:return n=r[1]==-1?"#REF":t.SheetNames[r[1]]||"SH33TJSERR3",r[1]==r[2]?n:n+":"+t.SheetNames[r[2]];case 14849:return t[r[0]].slice(1).map(function(a){return a.Name}).join(";;");default:return t[r[0]][0][3]?(n=r[1]==-1?"#REF":t[r[0]][0][3][r[1]]||"SH33TJSERR4",r[1]==r[2]?n:n+":"+t[r[0]][0][3][r[2]]):"SH33TJSERR2"}}function JK(t,i,e){var r=oJ(t,i,e);return r=="#REF"?r:zy(r,e)}function dg(t,i,e,r,n){var a=n&&n.biff||8,s={s:{c:0,r:0},e:{c:0,r:0}},o=[],d,l,c,h=0,u=0,f,p="";if(!t[0]||!t[0][0])return"";for(var m=-1,g="",v=0,y=t[0].length;v=0){switch(t[0][m][1][0]){case 0:g=tr(" ",t[0][m][1][1]);break;case 1:g=tr("\r",t[0][m][1][1]);break;default:if(g="",n.WTF)throw new Error("Unexpected PtgAttrSpaceType "+t[0][m][1][0])}l=l+g,m=-1}o.push(l+VNe[x[0]]+d);break;case"PtgIsect":d=o.pop(),l=o.pop(),o.push(l+" "+d);break;case"PtgUnion":d=o.pop(),l=o.pop(),o.push(l+","+d);break;case"PtgRange":d=o.pop(),l=o.pop(),o.push(UNe(l,d));break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":c=ky(x[1][1],s,n),o.push(Fy(c,a));break;case"PtgRefN":c=e?ky(x[1][1],e,n):x[1][1],o.push(Fy(c,a));break;case"PtgRef3d":h=x[1][1],c=ky(x[1][2],s,n),p=JK(r,h,n);var b=p;o.push(p+"!"+Fy(c,a));break;case"PtgFunc":case"PtgFuncVar":var _=x[1][0],C=x[1][1];_||(_=0),_&=127;var w=_==0?[]:o.slice(-_);o.length-=_,C==="User"&&(C=w.shift()),o.push(C+"("+w.join(",")+")");break;case"PtgBool":o.push(x[1]?"TRUE":"FALSE");break;case"PtgInt":o.push(x[1]);break;case"PtgNum":o.push(String(x[1]));break;case"PtgStr":o.push('"'+x[1].replace(/"/g,'""')+'"');break;case"PtgErr":o.push(x[1]);break;case"PtgAreaN":f=kK(x[1][1],e?{s:e}:s,n),o.push(TO(f,n));break;case"PtgArea":f=kK(x[1][1],s,n),o.push(TO(f,n));break;case"PtgArea3d":h=x[1][1],f=x[1][2],p=JK(r,h,n),o.push(p+"!"+TO(f,n));break;case"PtgAttrSum":o.push("SUM("+o.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":u=x[1][2];var T=(r.names||[])[u-1]||(r[0]||[])[u],S=T?T.Name:"SH33TJSNAME"+String(u);S&&S.slice(0,6)=="_xlfn."&&!n.xlfn&&(S=S.slice(6)),o.push(S);break;case"PtgNameX":var E=x[1][1];u=x[1][2];var D;if(n.biff<=5)E<0&&(E=-E),r[E]&&(D=r[E][u]);else{var A="";if(((r[E]||[])[0]||[])[0]==14849||(((r[E]||[])[0]||[])[0]==1025?r[E][u]&&r[E][u].itab>0&&(A=r.SheetNames[r[E][u].itab-1]+"!"):A=r.SheetNames[u-1]+"!"),r[E]&&r[E][u])A+=r[E][u].Name;else if(r[0]&&r[0][u])A+=r[0][u].Name;else{var M=(oJ(r,E,n)||"").split(";;");M[u-1]?A=M[u-1]:A+="SH33TJSERRX"}o.push(A);break}D||(D={Name:"SH33TJSERRY"}),o.push(D.Name);break;case"PtgParen":var R="(",L=")";if(m>=0){switch(g="",t[0][m][1][0]){case 2:R=tr(" ",t[0][m][1][1])+R;break;case 3:R=tr("\r",t[0][m][1][1])+R;break;case 4:L=tr(" ",t[0][m][1][1])+L;break;case 5:L=tr("\r",t[0][m][1][1])+L;break;default:if(n.WTF)throw new Error("Unexpected PtgAttrSpaceType "+t[0][m][1][0])}m=-1}o.push(R+o.pop()+L);break;case"PtgRefErr":o.push("#REF!");break;case"PtgRefErr3d":o.push("#REF!");break;case"PtgExp":c={c:x[1][1],r:x[1][0]};var I={c:e.c,r:e.r};if(r.sharedf[ar(c)]){var O=r.sharedf[ar(c)];o.push(dg(O,s,I,r,n))}else{var N=!1;for(d=0;d!=r.arrayf.length;++d)if(l=r.arrayf[d],!(c.cl[0].e.c)&&!(c.rl[0].e.r)){o.push(dg(l[1],s,I,r,n)),N=!0;break}N||o.push(x[1])}break;case"PtgArray":o.push("{"+BNe(x[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":m=v;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":o.push("");break;case"PtgAreaErr":o.push("#REF!");break;case"PtgAreaErr3d":o.push("#REF!");break;case"PtgList":o.push("Table"+x[1].idx+"[#"+x[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(x));default:throw new Error("Unrecognized Formula Token: "+String(x))}var H=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(n.biff!=3&&m>=0&&H.indexOf(t[0][v][0])==-1){x=t[0][m];var X=!0;switch(x[1][0]){case 4:X=!1;case 0:g=tr(" ",x[1][1]);break;case 5:X=!1;case 1:g=tr("\r",x[1][1]);break;default:if(g="",n.WTF)throw new Error("Unexpected PtgAttrSpaceType "+x[1][0])}o.push((X?g:"")+o.pop()+(X?"":g)),m=-1}}if(o.length>1&&n.WTF)throw new Error("bad formula stack");return o[0]=="TRUE"?!0:o[0]=="FALSE"?!1:o[0]}function zNe(t){if(t==null){var i=Ae(8);return i.write_shift(1,3),i.write_shift(1,0),i.write_shift(2,0),i.write_shift(2,0),i.write_shift(2,65535),i}else if(typeof t=="number")return sf(t);return sf(0)}function GNe(t,i,e,r,n){var a=af(i,e,n),s=zNe(t.v),o=Ae(6),d=33;o.write_shift(2,d),o.write_shift(4,0);for(var l=Ae(t.bf.length),c=0;c0?LNe(t,a,n,e):null;return[n,s]}var HNe=DS,MS=DS,jNe=DS,WNe=DS;function qK(t){if((t|0)==t&&t=0){var i=Ae(11);return i.write_shift(4,3),i.write_shift(1,30),i.write_shift(2,t),i.write_shift(4,0),i}var e=Ae(17);return e.write_shift(4,11),e.write_shift(1,31),e.write_shift(8,t),e.write_shift(4,0),e}function XNe(t){var i=Ae(10);return i.write_shift(4,2),i.write_shift(1,28),i.write_shift(1,t),i.write_shift(4,0),i}function YNe(t){var i=Ae(10);return i.write_shift(4,2),i.write_shift(1,29),i.write_shift(1,t?1:0),i.write_shift(4,0),i}function $Ne(t){var i=Ae(7);i.write_shift(4,3+2*t.length),i.write_shift(1,23),i.write_shift(2,t.length);var e=Ae(2*t.length);e.write_shift(2*t.length,t,"utf16le");var r=Ae(4);return r.write_shift(4,0),Fr([i,e,r])}function QNe(t){var i=ir(t),e=Ae(15);return e.write_shift(4,7),e.write_shift(1,36),e.write_shift(4,i.r),e.write_shift(2,i.c|(t.charAt(0)=="$"?0:1)<<14|(t.match(/\$\d/)?0:1)<<15),e.write_shift(4,0),e}function KNe(t,i){var e=t.lastIndexOf("!"),r=t.slice(0,e);t=t.slice(e+1);var n=ir(t);r.charAt(0)=="'"&&(r=r.slice(1,-1).replace(/''/g,"'"));var a=Ae(17);return a.write_shift(4,9),a.write_shift(1,58),a.write_shift(2,2+i.SheetNames.map(function(s){return s.toLowerCase()}).indexOf(r.toLowerCase())),a.write_shift(4,n.r),a.write_shift(2,n.c|(t.charAt(0)=="$"?0:1)<<14|(t.match(/\$\d/)?0:1)<<15),a.write_shift(4,0),a}function ZNe(t,i){var e=t.lastIndexOf("!"),r=t.slice(0,e);t=t.slice(e+1),r.charAt(0)=="'"&&(r=r.slice(1,-1).replace(/''/g,"'"));var n=Ae(17);return n.write_shift(4,9),n.write_shift(1,60),n.write_shift(2,2+i.SheetNames.map(function(a){return a.toLowerCase()}).indexOf(r.toLowerCase())),n.write_shift(4,0),n.write_shift(2,0),n.write_shift(4,0),n}function JNe(t){var i=t.split(":"),e=i[0],r=Ae(23);r.write_shift(4,15),e=i[0];var n=ir(e);return r.write_shift(1,36),r.write_shift(4,n.r),r.write_shift(2,n.c|(e.charAt(0)=="$"?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),r.write_shift(4,0),e=i[1],n=ir(e),r.write_shift(1,36),r.write_shift(4,n.r),r.write_shift(2,n.c|(e.charAt(0)=="$"?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),r.write_shift(4,0),r.write_shift(1,17),r.write_shift(4,0),r}function qNe(t,i){var e=t.lastIndexOf("!"),r=t.slice(0,e);t=t.slice(e+1),r.charAt(0)=="'"&&(r=r.slice(1,-1).replace(/''/g,"'"));var n=t.split(":"),a=Ae(27);a.write_shift(4,19);var s=n[0],o=ir(s);return a.write_shift(1,58),a.write_shift(2,2+i.SheetNames.map(function(d){return d.toLowerCase()}).indexOf(r.toLowerCase())),a.write_shift(4,o.r),a.write_shift(2,o.c|(s.charAt(0)=="$"?0:1)<<14|(s.match(/\$\d/)?0:1)<<15),s=n[1],o=ir(s),a.write_shift(1,58),a.write_shift(2,2+i.SheetNames.map(function(d){return d.toLowerCase()}).indexOf(r.toLowerCase())),a.write_shift(4,o.r),a.write_shift(2,o.c|(s.charAt(0)=="$"?0:1)<<14|(s.match(/\$\d/)?0:1)<<15),a.write_shift(1,17),a.write_shift(4,0),a}function e5e(t,i){var e=t.lastIndexOf("!"),r=t.slice(0,e);t=t.slice(e+1),r.charAt(0)=="'"&&(r=r.slice(1,-1).replace(/''/g,"'"));var n=Ss(t),a=Ae(23);return a.write_shift(4,15),a.write_shift(1,59),a.write_shift(2,2+i.SheetNames.map(function(s){return s.toLowerCase()}).indexOf(r.toLowerCase())),a.write_shift(4,n.s.r),a.write_shift(4,n.e.r),a.write_shift(2,n.s.c),a.write_shift(2,n.e.c),a.write_shift(4,0),a}function t5e(t,i){if(typeof t=="number")return qK(t);if(typeof t=="boolean")return YNe(t);if(/^#(DIV\/0!|GETTING_DATA|N\/A|NAME\?|NULL!|NUM!|REF!|VALUE!)$/.test(t))return XNe(+BO[t]);if(t.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return QNe(t);if(t.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return JNe(t);if(t.match(/^#REF!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return e5e(t,i);if(t.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return KNe(t,i);if(t.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return qNe(t,i);if(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!#REF!$/.test(t))return ZNe(t,i);if(/^".*"$/.test(t))return $Ne(t);if(/^[+-]\d+$/.test(t))return qK(parseInt(t,10));throw"Formula |"+t+"| not supported for XLSB"}var i5e=t5e,n5e={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},lJ={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},r5e={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function s5e(t){var i="of:="+t.replace(SS,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return i.replace(/;/g,"|").replace(/,/g,";")}function cJ(t){return t.replace(/!/,".").replace(/:/,":.")}var Oy=typeof Map<"u";function d4(t,i,e){var r=0,n=t.length;if(e){if(Oy?e.has(i):Object.prototype.hasOwnProperty.call(e,i)){for(var a=Oy?e.get(i):e[i];r-1?(e.width=VO(r),e.customWidth=1):i.width!=null&&(e.width=i.width),i.hidden&&(e.hidden=!0),i.level!=null&&(e.outlineLevel=e.level=i.level),e}function dJ(t,i){if(t){var e=[.7,.7,.75,.75,.3,.3];i=="xlml"&&(e=[1,1,1,1,.5,.5]),t.left==null&&(t.left=e[0]),t.right==null&&(t.right=e[1]),t.top==null&&(t.top=e[2]),t.bottom==null&&(t.bottom=e[3]),t.header==null&&(t.header=e[4]),t.footer==null&&(t.footer=e[5])}}function Du(t,i,e){var r=e.revssf[i.z!=null?i.z:"General"],n=60,a=t.length;if(r==null&&e.ssf){for(;n<392;++n)if(e.ssf[n]==null){POe(i.z,n),e.ssf[n]=i.z,e.revssf[i.z]=r=n;break}}for(n=0;n!=a;++n)if(t[n].numFmtId===r)return n;return t[a]={numFmtId:r,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},a}function a5e(t,i,e){if(t&&t["!ref"]){var r=Zn(t["!ref"]);if(r.e.c',e=0;e!=t.length;++e)i+='';return i+""}function l5e(t,i,e,r,n){var a=!1,s={},o=null;if(r.bookType!=="xlsx"&&i.vbaraw){var d=i.SheetNames[e];try{i.Workbook&&(d=i.Workbook.Sheets[e].CodeName||d)}catch{}a=!0,s.codeName=cd(xi(d))}if(t&&t["!outline"]){var l={summaryBelow:1,summaryRight:1};t["!outline"].above&&(l.summaryBelow=0),t["!outline"].left&&(l.summaryRight=0),o=(o||"")+ft("outlinePr",null,l)}!a&&!o||(n[n.length]=ft("sheetPr",o,s))}var c5e=["objects","scenarios","selectLockedCells","selectUnlockedCells"],d5e=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function u5e(t){var i={sheet:1};return c5e.forEach(function(e){t[e]!=null&&t[e]&&(i[e]="1")}),d5e.forEach(function(e){t[e]!=null&&!t[e]&&(i[e]="0")}),t.password&&(i.password=$Z(t.password).toString(16).toUpperCase()),ft("sheetProtection",null,i)}function h5e(t){return dJ(t),ft("pageMargins",null,t)}function f5e(t,i){for(var e=[""],r,n=0;n!=i.length;++n)(r=i[n])&&(e[e.length]=ft("col",null,AS(n,r)));return e[e.length]="",e.join("")}function m5e(t,i,e,r){var n=typeof t.ref=="string"?t.ref:Lr(t.ref);e.Workbook||(e.Workbook={Sheets:[]}),e.Workbook.Names||(e.Workbook.Names=[]);var a=e.Workbook.Names,s=Ss(n);s.s.r==s.e.r&&(s.e.r=Ss(i["!ref"]).e.r,n=Lr(s));for(var o=0;o"u")return"";var o="",d=t.t,l=t.v;if(t.t!=="z")switch(t.t){case"b":o=t.v?"1":"0";break;case"n":isNaN(t.v)?(t.t="e",o=Cu[t.v=36]):isFinite(t.v)?o=""+t.v:(t.t="e",o=Cu[t.v=7]);break;case"e":o=Cu[t.v];break;case"d":if(r&&r.cellDates){var c=$a(t.v,s);o=c.toISOString(),c.getUTCFullYear()<1900&&(o=o.slice(o.indexOf("T")+1).replace("Z",""))}else t=$s(t),t.t="n",o=""+(t.v=Es($a(t.v,s),s));typeof t.z>"u"&&(t.z=Kn[14]);break;default:o=t.v;break}var h=t.t=="z"||t.v==null?"":Ts("v",xi(o)),u={r:i},f=Du(r.cellXfs,t,r);switch(f!==0&&(u.s=f),t.t){case"n":break;case"d":u.t="d";break;case"b":u.t="b";break;case"e":u.t="e";break;case"z":break;default:if(t.v==null){delete t.t;break}if(t.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(r&&r.bookSST){h=Ts("v",""+d4(r.Strings,t.v,r.revStrings)),u.t="s";break}else u.t="str";break}if(t.t!=d&&(t.t=d,t.v=l),typeof t.f=="string"&&t.f){var p=t.F&&t.F.slice(0,i.length)==i?{t:"array",ref:t.F}:null;h=ft("f",xi(t.f),p)+(t.v!=null?h:"")}return t.l&&(t.l.display=xi(o),e["!links"].push([i,t.l])),t.D&&(u.cm=1),ft("c",h,u)}function v5e(t,i,e,r){var n=[],a=[],s=Zn(t["!ref"]),o="",d,l="",c=[],h=0,u=0,f=t["!rows"],p=t["!data"]!=null,m={r:l},g,v=-1,y=(((r||{}).Workbook||{}).WBProps||{}).date1904;for(u=s.s.c;u<=s.e.c;++u)c[u]=mn(u);for(h=s.s.r;h<=s.e.r;++h){for(a=[],l=bn(h),u=s.s.c;u<=s.e.c;++u){d=c[u]+l;var x=p?(t["!data"][h]||[])[u]:t[d];x!==void 0&&(o=g5e(x,d,t,i,e,r,y))!=null&&a.push(o)}(a.length>0||f&&f[h])&&(m={r:l},f&&f[h]&&(g=f[h],g.hidden&&(m.hidden=1),v=-1,g.hpx?v=hS(g.hpx):g.hpt&&(v=g.hpt),v>-1&&(m.ht=v,m.customHeight=1),g.level&&(m.outlineLevel=g.level)),n[n.length]=ft("row",a.join(""),m))}if(f)for(;h-1&&(m.ht=v,m.customHeight=1),g.level&&(m.outlineLevel=g.level),n[n.length]=ft("row","",m));return n.join("")}function y5e(t,i,e,r){var n=[Nr,ft("worksheet",null,{xmlns:ug[0],"xmlns:r":cs.r})],a=e.SheetNames[t],s=0,o="",d=e.Sheets[a];d==null&&(d={});var l=d["!ref"]||"A1",c=Zn(l);if(c.e.c>16383||c.e.r>1048575){if(i.WTF)throw new Error("Range "+l+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383),c.e.r=Math.min(c.e.c,1048575),l=Lr(c)}r||(r={}),d["!comments"]=[];var h=[];l5e(d,e,t,i,n),n[n.length]=ft("dimension",null,{ref:l}),n[n.length]=p5e(d,i,t,e),i.sheetFormat&&(n[n.length]=ft("sheetFormatPr",null,{defaultRowHeight:i.sheetFormat.defaultRowHeight||"16",baseColWidth:i.sheetFormat.baseColWidth||"10",outlineLevelRow:i.sheetFormat.outlineLevelRow||"7"})),d["!cols"]!=null&&d["!cols"].length>0&&(n[n.length]=f5e(d,d["!cols"])),n[s=n.length]="",d["!links"]=[],d["!ref"]!=null&&(o=v5e(d,i,t,e,r),o.length>0&&(n[n.length]=o)),n.length>s+1&&(n[n.length]="",n[s]=n[s].replace("/>",">")),d["!protect"]&&(n[n.length]=u5e(d["!protect"])),d["!autofilter"]!=null&&(n[n.length]=m5e(d["!autofilter"],d,e,t)),d["!merges"]!=null&&d["!merges"].length>0&&(n[n.length]=o5e(d["!merges"]));var u=-1,f,p=-1;return d["!links"].length>0&&(n[n.length]="",d["!links"].forEach(function(m){m[1].Target&&(f={ref:m[0]},m[1].Target.charAt(0)!="#"&&(p=rn(r,-1,xi(m[1].Target).replace(/#[\s\S]*$/,""),Hi.HLINK),f["r:id"]="rId"+p),(u=m[1].Target.indexOf("#"))>-1&&(f.location=xi(m[1].Target.slice(u+1))),m[1].Tooltip&&(f.tooltip=xi(m[1].Tooltip)),f.display=m[1].display,n[n.length]=ft("hyperlink",null,f))}),n[n.length]=""),delete d["!links"],d["!margins"]!=null&&(n[n.length]=h5e(d["!margins"])),(!i||i.ignoreEC||i.ignoreEC==null)&&(n[n.length]=Ts("ignoredErrors",ft("ignoredError",null,{numberStoredAsText:1,sqref:l}))),h.length>0&&(p=rn(r,-1,"../drawings/drawing"+(t+1)+".xml",Hi.DRAW),n[n.length]=ft("drawing",null,{"r:id":"rId"+p}),d["!drawing"]=h),d["!comments"].length>0&&(p=rn(r,-1,"../drawings/vmlDrawing"+(t+1)+".vml",Hi.VML),n[n.length]=ft("legacyDrawing",null,{"r:id":"rId"+p}),d["!legacy"]=p),n.length>1&&(n[n.length]="",n[1]=n[1].replace("/>",">")),n.join("")}function x5e(t,i){var e={},r=t.l+i;e.r=t.read_shift(4),t.l+=4;var n=t.read_shift(2);t.l+=1;var a=t.read_shift(1);return t.l=r,a&7&&(e.level=a&7),a&16&&(e.hidden=!0),a&32&&(e.hpt=n/20),e}function b5e(t,i,e){var r=Ae(145),n=(e["!rows"]||[])[t]||{};r.write_shift(4,t),r.write_shift(4,0);var a=320;n.hpx?a=hS(n.hpx)*20:n.hpt&&(a=n.hpt*20),r.write_shift(2,a),r.write_shift(1,0);var s=0;n.level&&(s|=n.level),n.hidden&&(s|=16),(n.hpx||n.hpt)&&(s|=32),r.write_shift(1,s),r.write_shift(1,0);var o=0,d=r.l;r.l+=4;for(var l={r:t,c:0},c=e["!data"]!=null,h=0;h<16;++h)if(!(i.s.c>h+1<<10||i.e.cr.l?r.slice(0,r.l):r}function _5e(t,i,e,r){var n=b5e(r,e,i);(n.length>17||(i["!rows"]||[])[r])&&Xe(t,0,n)}var w5e=df,C5e=pg;function T5e(){}function S5e(t,i){var e={},r=t[t.l];return++t.l,e.above=!(r&64),e.left=!(r&128),t.l+=18,e.name=x4e(t,i-19),e}function E5e(t,i,e){e==null&&(e=Ae(84+4*t.length));var r=192;i&&(i.above&&(r&=-65),i.left&&(r&=-129)),e.write_shift(1,r);for(var n=1;n<3;++n)e.write_shift(1,0);return lS({auto:1},e),e.write_shift(-4,-1),e.write_shift(-4,-1),AZ(t,e),e.slice(0,e.l)}function D5e(t){var i=Wo(t);return[i]}function M5e(t,i,e){return e==null&&(e=Ae(8)),of(i,e)}function A5e(t){var i=lf(t);return[i]}function I5e(t,i,e){return e==null&&(e=Ae(4)),cf(i,e)}function R5e(t){var i=Wo(t),e=t.read_shift(1);return[i,e,"b"]}function P5e(t,i,e){return e==null&&(e=Ae(9)),of(i,e),e.write_shift(1,t.v?1:0),e}function k5e(t){var i=lf(t),e=t.read_shift(1);return[i,e,"b"]}function F5e(t,i,e){return e==null&&(e=Ae(5)),cf(i,e),e.write_shift(1,t.v?1:0),e}function O5e(t){var i=Wo(t),e=t.read_shift(1);return[i,e,"e"]}function AO(t,i,e){return e==null&&(e=Ae(9)),of(i,e),e.write_shift(1,t.v),e}function L5e(t){var i=lf(t),e=t.read_shift(1);return[i,e,"e"]}function IO(t,i,e){return e==null&&(e=Ae(8)),cf(i,e),e.write_shift(1,t.v),e.write_shift(2,0),e.write_shift(1,0),e}function N5e(t){var i=Wo(t),e=t.read_shift(4);return[i,e,"s"]}function B5e(t,i,e){return e==null&&(e=Ae(12)),of(i,e),e.write_shift(4,i.v),e}function V5e(t){var i=lf(t),e=t.read_shift(4);return[i,e,"s"]}function U5e(t,i,e){return e==null&&(e=Ae(8)),cf(i,e),e.write_shift(4,i.v),e}function z5e(t){var i=Wo(t),e=gg(t);return[i,e,"n"]}function G5e(t,i,e){return e==null&&(e=Ae(16)),of(i,e),sf(t.v,e),e}function H5e(t){var i=lf(t),e=gg(t);return[i,e,"n"]}function j5e(t,i,e){return e==null&&(e=Ae(12)),cf(i,e),sf(t.v,e),e}function W5e(t){var i=Wo(t),e=a4(t);return[i,e,"n"]}function X5e(t,i,e){return e==null&&(e=Ae(12)),of(i,e),IZ(t.v,e),e}function Y5e(t){var i=lf(t),e=a4(t);return[i,e,"n"]}function $5e(t,i,e){return e==null&&(e=Ae(8)),cf(i,e),IZ(t.v,e),e}function Q5e(t){var i=Wo(t),e=r4(t);return[i,e,"is"]}function K5e(t){var i=Wo(t),e=Ys(t);return[i,e,"str"]}function Z5e(t,i,e){var r=t.v==null?"":String(t.v);return e==null&&(e=Ae(12+4*t.v.length)),of(i,e),Kr(r,e),e.length>e.l?e.slice(0,e.l):e}function J5e(t){var i=lf(t),e=Ys(t);return[i,e,"str"]}function q5e(t,i,e){var r=t.v==null?"":String(t.v);return e==null&&(e=Ae(8+4*r.length)),cf(i,e),Kr(r,e),e.length>e.l?e.slice(0,e.l):e}function e8e(t,i,e){var r=t.l+i,n=Wo(t);n.r=e["!row"];var a=t.read_shift(1),s=[n,a,"b"];if(e.cellFormula){t.l+=2;var o=MS(t,r-t.l,e);s[3]=dg(o,null,n,e.supbooks,e)}else t.l=r;return s}function t8e(t,i,e){var r=t.l+i,n=Wo(t);n.r=e["!row"];var a=t.read_shift(1),s=[n,a,"e"];if(e.cellFormula){t.l+=2;var o=MS(t,r-t.l,e);s[3]=dg(o,null,n,e.supbooks,e)}else t.l=r;return s}function i8e(t,i,e){var r=t.l+i,n=Wo(t);n.r=e["!row"];var a=gg(t),s=[n,a,"n"];if(e.cellFormula){t.l+=2;var o=MS(t,r-t.l,e);s[3]=dg(o,null,n,e.supbooks,e)}else t.l=r;return s}function n8e(t,i,e){var r=t.l+i,n=Wo(t);n.r=e["!row"];var a=Ys(t),s=[n,a,"str"];if(e.cellFormula){t.l+=2;var o=MS(t,r-t.l,e);s[3]=dg(o,null,n,e.supbooks,e)}else t.l=r;return s}var r8e=df,s8e=pg;function a8e(t,i){return i==null&&(i=Ae(4)),i.write_shift(4,t),i}function o8e(t,i){var e=t.l+i,r=df(t,16),n=TS(t),a=Ys(t),s=Ys(t),o=Ys(t);t.l=e;var d={rfx:r,relId:n,loc:a,display:o};return s&&(d.Tooltip=s),d}function l8e(t,i){var e=Ae(50+4*(t[1].Target.length+(t[1].Tooltip||"").length));pg({s:ir(t[0]),e:ir(t[0])},e),s4("rId"+i,e);var r=t[1].Target.indexOf("#"),n=r==-1?"":t[1].Target.slice(r+1);return Kr(n||"",e),Kr(t[1].Tooltip||"",e),Kr("",e),e.slice(0,e.l)}function c8e(){}function d8e(t,i,e){var r=t.l+i,n=RZ(t,16),a=t.read_shift(1),s=[n];if(s[2]=a,e.cellFormula){var o=HNe(t,r-t.l,e);s[1]=o}else t.l=r;return s}function u8e(t,i,e){var r=t.l+i,n=df(t,16),a=[n];if(e.cellFormula){var s=WNe(t,r-t.l,e);a[1]=s,t.l=r}else t.l=r;return a}function h8e(t,i,e){e==null&&(e=Ae(18));var r=AS(t,i);e.write_shift(-4,t),e.write_shift(-4,t),e.write_shift(4,(r.width||10)*256),e.write_shift(4,0);var n=0;return i.hidden&&(n|=1),typeof r.width=="number"&&(n|=2),i.level&&(n|=i.level<<8),e.write_shift(2,n),e}var uJ=["left","right","top","bottom","header","footer"];function f8e(t){var i={};return uJ.forEach(function(e){i[e]=gg(t,8)}),i}function m8e(t,i){return i==null&&(i=Ae(6*8)),dJ(t),uJ.forEach(function(e){sf(t[e],i)}),i}function p8e(t){var i=t.read_shift(2);return t.l+=28,{RTL:i&32}}function g8e(t,i,e){e==null&&(e=Ae(30));var r=924;return(((i||{}).Views||[])[0]||{}).RTL&&(r|=32),e.write_shift(2,r),e.write_shift(4,0),e.write_shift(4,0),e.write_shift(4,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(2,0),e.write_shift(2,100),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(4,0),e}function v8e(t){var i=Ae(24);return i.write_shift(4,4),i.write_shift(4,1),pg(t,i),i}function y8e(t,i){return i==null&&(i=Ae(16*4+2)),i.write_shift(2,t.password?$Z(t.password):0),i.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(e){e[1]?i.write_shift(4,t[e[0]]!=null&&!t[e[0]]?1:0):i.write_shift(4,t[e[0]]!=null&&t[e[0]]?0:1)}),i}function x8e(){}function b8e(){}function _8e(t,i,e,r,n,a,s,o){var d={r:e,c:r};if(i.c&&a["!comments"].push([ar(d),i.c]),i.v===void 0)return!1;var l="";switch(i.t){case"b":l=i.v?"1":"0";break;case"d":i=$s(i),i.z=i.z||Kn[14],i.v=Es($a(i.v,o),o),i.t="n";break;case"n":case"e":l=""+i.v;break;default:l=i.v;break}switch(d.s=Du(n.cellXfs,i,n),i.l&&a["!links"].push([ar(d),i.l]),i.t){case"s":case"str":return n.bookSST?(l=d4(n.Strings,i.v==null?"":String(i.v),n.revStrings),d.t="s",d.v=l,s?Xe(t,18,U5e(i,d)):Xe(t,7,B5e(i,d))):(d.t="str",s?Xe(t,17,q5e(i,d)):Xe(t,6,Z5e(i,d))),!0;case"n":return i.v==(i.v|0)&&i.v>-1e3&&i.v<1e3?s?Xe(t,13,$5e(i,d)):Xe(t,2,X5e(i,d)):isNaN(i.v)?s?Xe(t,14,IO({t:"e",v:36},d)):Xe(t,3,AO({t:"e",v:36},d)):isFinite(i.v)?s?Xe(t,16,j5e(i,d)):Xe(t,5,G5e(i,d)):s?Xe(t,14,IO({t:"e",v:7},d)):Xe(t,3,AO({t:"e",v:7},d)),!0;case"b":return d.t="b",s?Xe(t,15,F5e(i,d)):Xe(t,4,P5e(i,d)),!0;case"e":return d.t="e",s?Xe(t,14,IO(i,d)):Xe(t,3,AO(i,d)),!0}return s?Xe(t,12,I5e(i,d)):Xe(t,1,M5e(i,d)),!0}function w8e(t,i,e,r,n){var a=Zn(i["!ref"]||"A1"),s,o="",d=[],l=(((n||{}).Workbook||{}).WBProps||{}).date1904;Xe(t,145);var c=i["!data"]!=null,h=a.e.r;i["!rows"]&&(h=Math.max(a.e.r,i["!rows"].length-1));for(var u=a.s.r;u<=h;++u){o=bn(u),_5e(t,i,a,u);var f=!1;if(u<=a.e.r)for(var p=a.s.c;p<=a.e.c;++p){u===a.s.r&&(d[p]=mn(p)),s=d[p]+o;var m=c?(i["!data"][u]||[])[p]:i[s];if(!m){f=!1;continue}f=_8e(t,m,u,p,r,i,f,l)}}Xe(t,146)}function C8e(t,i){!i||!i["!merges"]||(Xe(t,177,a8e(i["!merges"].length)),i["!merges"].forEach(function(e){Xe(t,176,s8e(e))}),Xe(t,178))}function T8e(t,i){!i||!i["!cols"]||(Xe(t,390),i["!cols"].forEach(function(e,r){e&&Xe(t,60,h8e(r,e))}),Xe(t,391))}function S8e(t,i){!i||!i["!ref"]||(Xe(t,648),Xe(t,649,v8e(Zn(i["!ref"]))),Xe(t,650))}function E8e(t,i,e){i["!links"].forEach(function(r){if(r[1].Target){var n=rn(e,-1,r[1].Target.replace(/#[\s\S]*$/,""),Hi.HLINK);Xe(t,494,l8e(r,n))}}),delete i["!links"]}function D8e(t,i,e,r){if(i["!comments"].length>0){var n=rn(r,-1,"../drawings/vmlDrawing"+(e+1)+".vml",Hi.VML);Xe(t,551,s4("rId"+n)),i["!legacy"]=n}}function M8e(t,i,e,r){if(i["!autofilter"]){var n=i["!autofilter"],a=typeof n.ref=="string"?n.ref:Lr(n.ref);e.Workbook||(e.Workbook={Sheets:[]}),e.Workbook.Names||(e.Workbook.Names=[]);var s=e.Workbook.Names,o=Ss(a);o.s.r==o.e.r&&(o.e.r=Ss(i["!ref"]).e.r,a=Lr(o));for(var d=0;d16383||d.e.r>1048575){if(i.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");d.e.c=Math.min(d.e.c,16383),d.e.r=Math.min(d.e.c,1048575)}return s["!links"]=[],s["!comments"]=[],Xe(n,129),(e.vbaraw||s["!outline"])&&Xe(n,147,E5e(o,s["!outline"])),Xe(n,148,C5e(d)),A8e(n,s,e.Workbook),T8e(n,s,t,i,e),w8e(n,s,t,i,e),I8e(n,s),M8e(n,s,e,t),C8e(n,s),E8e(n,s,r),s["!margins"]&&Xe(n,476,m8e(s["!margins"])),(!i||i.ignoreEC||i.ignoreEC==null)&&S8e(n,s),D8e(n,s,t,r),Xe(n,130),n.end()}function P8e(t,i){t.l+=10;var e=Ys(t,i-10);return{name:e}}var k8e=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]];function F8e(t){return!t.Workbook||!t.Workbook.WBProps?"false":QOe(t.Workbook.WBProps.date1904)?"true":"false"}var O8e=":][*?/\\".split("");function hJ(t,i){try{if(t=="")throw new Error("Sheet name cannot be blank");if(t.length>31)throw new Error("Sheet name cannot exceed 31 chars");if(t.charCodeAt(0)==39||t.charCodeAt(t.length-1)==39)throw new Error("Sheet name cannot start or end with apostrophe (')");if(t.toLowerCase()=="history")throw new Error("Sheet name cannot be 'History'");O8e.forEach(function(e){if(t.indexOf(e)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")})}catch(e){if(i)return!1;throw e}return!0}function L8e(t,i,e){t.forEach(function(r,n){hJ(r);for(var a=0;a22)throw new Error("Bad Code Name: Worksheet"+s)}})}function N8e(t){if(!t||!t.SheetNames||!t.Sheets)throw new Error("Invalid Workbook");if(!t.SheetNames.length)throw new Error("Workbook is empty");var i=t.Workbook&&t.Workbook.Sheets||[];L8e(t.SheetNames,i,!!t.vbaraw);for(var e=0;e0,r={codeName:"ThisWorkbook"};t.Workbook&&t.Workbook.WBProps&&(k8e.forEach(function(o){t.Workbook.WBProps[o[0]]!=null&&t.Workbook.WBProps[o[0]]!=o[1]&&(r[o[0]]=t.Workbook.WBProps[o[0]])}),t.Workbook.WBProps.CodeName&&(r.codeName=t.Workbook.WBProps.CodeName,delete r.CodeName)),i[i.length]=ft("workbookPr",null,r);var n=t.Workbook&&t.Workbook.Sheets||[],a=0;if(n&&n[0]&&n[0].Hidden){for(i[i.length]="",a=0;a!=t.SheetNames.length&&!(!n[a]||!n[a].Hidden);++a);a==t.SheetNames.length&&(a=0),i[i.length]='',i[i.length]=""}for(i[i.length]="",a=0;a!=t.SheetNames.length;++a){var s={name:xi(t.SheetNames[a].slice(0,31))};if(s.sheetId=""+(a+1),s["r:id"]="rId"+(a+1),n[a])switch(n[a].Hidden){case 1:s.state="hidden";break;case 2:s.state="veryHidden";break}i[i.length]=ft("sheet",null,s)}return i[i.length]="",e&&(i[i.length]="",t.Workbook&&t.Workbook.Names&&t.Workbook.Names.forEach(function(o){var d={name:o.Name};o.Comment&&(d.comment=o.Comment),o.Sheet!=null&&(d.localSheetId=""+o.Sheet),o.Hidden&&(d.hidden="1"),o.Ref&&(i[i.length]=ft("definedName",xi(o.Ref),d))}),i[i.length]=""),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function V8e(t,i){var e={};return e.Hidden=t.read_shift(4),e.iTabID=t.read_shift(4),e.strRelID=NO(t,i-8),e.name=Ys(t),e}function U8e(t,i){return i||(i=Ae(127)),i.write_shift(4,t.Hidden),i.write_shift(4,t.iTabID),s4(t.strRelID,i),Kr(t.name.slice(0,31),i),i.length>i.l?i.slice(0,i.l):i}function z8e(t,i){var e={},r=t.read_shift(4);e.defaultThemeVersion=t.read_shift(4);var n=i>8?Ys(t):"";return n.length>0&&(e.CodeName=n),e.autoCompressPictures=!!(r&65536),e.backupFile=!!(r&64),e.checkCompatibility=!!(r&4096),e.date1904=!!(r&1),e.filterPrivacy=!!(r&8),e.hidePivotFieldList=!!(r&1024),e.promptedSolutions=!!(r&16),e.publishItems=!!(r&2048),e.refreshAllConnections=!!(r&262144),e.saveExternalLinkValues=!!(r&128),e.showBorderUnselectedTables=!!(r&4),e.showInkAnnotation=!!(r&32),e.showObjects=["all","placeholders","none"][r>>13&3],e.showPivotChartFilter=!!(r&32768),e.updateLinks=["userSet","never","always"][r>>8&3],e}function G8e(t,i){i||(i=Ae(72));var e=0;return t&&(t.date1904&&(e|=1),t.filterPrivacy&&(e|=8)),i.write_shift(4,e),i.write_shift(4,0),AZ(t&&t.CodeName||"ThisWorkbook",i),i.slice(0,i.l)}function H8e(t,i,e){var r=t.l+i,n=t.read_shift(4);t.l+=1;var a=t.read_shift(4),s=b4e(t),o,d="";try{o=jNe(t,0,e);try{d=TS(t)}catch{}}catch{console.error("Could not parse defined name "+s)}n&32&&(s="_xlnm."+s),t.l=r;var l={Name:s,Ptg:o,Flags:n};return a<268435455&&(l.Sheet=a),d&&(l.Comment=d),l}function j8e(t,i){var e=Ae(9),r=0,n=t.Name;P4e.indexOf(n)>-1&&(r|=32,n=n.slice(6)),e.write_shift(4,r),e.write_shift(1,0),e.write_shift(4,t.Sheet==null?4294967295:t.Sheet);var a=[e,Kr(n),i5e(t.Ref,i)];if(t.Comment)a.push(Gy(t.Comment));else{var s=Ae(4);s.write_shift(4,4294967295),a.push(s)}return Fr(a)}function W8e(t,i){Xe(t,143);for(var e=0;e!=i.SheetNames.length;++e){var r=i.Workbook&&i.Workbook.Sheets&&i.Workbook.Sheets[e]&&i.Workbook.Sheets[e].Hidden||0,n={Hidden:r,iTabID:e+1,strRelID:"rId"+(e+1),name:i.SheetNames[e]};Xe(t,156,U8e(n))}Xe(t,144)}function X8e(t,i){i||(i=Ae(127));for(var e=0;e!=4;++e)i.write_shift(4,0);return Kr("SheetJS",i),Kr(Ly.version,i),Kr(Ly.version,i),Kr("7262",i),i.length>i.l?i.slice(0,i.l):i}function Y8e(t,i){i||(i=Ae(29)),i.write_shift(-4,0),i.write_shift(-4,460),i.write_shift(4,28800),i.write_shift(4,17600),i.write_shift(4,500),i.write_shift(4,t),i.write_shift(4,t);var e=120;return i.write_shift(1,e),i.length>i.l?i.slice(0,i.l):i}function $8e(t,i){if(!(!i.Workbook||!i.Workbook.Sheets)){for(var e=i.Workbook.Sheets,r=0,n=-1,a=-1;rn||(Xe(t,135),Xe(t,158,Y8e(n)),Xe(t,136))}}function Q8e(t,i){!i.Workbook||!i.Workbook.Names||i.Workbook.Names.forEach(function(e){try{if(e.Flags&14)return;Xe(t,39,j8e(e,i))}catch{console.error("Could not serialize defined name "+JSON.stringify(e))}})}function K8e(t){var i=t.SheetNames.length,e=Ae(12*i+28);e.write_shift(4,i+2),e.write_shift(4,0),e.write_shift(4,-2),e.write_shift(4,-2),e.write_shift(4,0),e.write_shift(4,-1),e.write_shift(4,-1);for(var r=0;r':""}function tBe(t,i){var e=[''];return i.cellXfs.forEach(function(r,n){var a=[];a.push(ft("NumberFormat",null,{"ss:Format":xi(Kn[r.numFmtId])}));var s={"ss:ID":"s"+(21+n)};e.push(ft("Style",a.join(""),s))}),ft("Styles",e.join(""))}function fJ(t){return ft("NamedRange",null,{"ss:Name":t.Name.slice(0,6)=="_xlnm."?t.Name.slice(6):t.Name,"ss:RefersTo":"="+ES(t.Ref,{r:0,c:0})})}function iBe(t){if(!((t||{}).Workbook||{}).Names)return"";for(var i=t.Workbook.Names,e=[],r=0;r"),t["!margins"].header&&n.push(ft("Header",null,{"x:Margin":t["!margins"].header})),t["!margins"].footer&&n.push(ft("Footer",null,{"x:Margin":t["!margins"].footer})),n.push(ft("PageMargins",null,{"x:Bottom":t["!margins"].bottom||"0.75","x:Left":t["!margins"].left||"0.7","x:Right":t["!margins"].right||"0.7","x:Top":t["!margins"].top||"0.75"})),n.push("")),r&&r.Workbook&&r.Workbook.Sheets&&r.Workbook.Sheets[e])if(r.Workbook.Sheets[e].Hidden)n.push(ft("Visible",r.Workbook.Sheets[e].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var a=0;a")}return((((r||{}).Workbook||{}).Views||[])[0]||{}).RTL&&n.push(""),t["!protect"]&&(n.push(Ts("ProtectContents","True")),t["!protect"].objects&&n.push(Ts("ProtectObjects","True")),t["!protect"].scenarios&&n.push(Ts("ProtectScenarios","True")),t["!protect"].selectLockedCells!=null&&!t["!protect"].selectLockedCells?n.push(Ts("EnableSelection","NoSelection")):t["!protect"].selectUnlockedCells!=null&&!t["!protect"].selectUnlockedCells&&n.push(Ts("EnableSelection","UnlockedCells")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(s){t["!protect"][s[0]]&&n.push("<"+s[1]+"/>")})),n.length==0?"":ft("WorksheetOptions",n.join(""),{xmlns:go.x})}function sBe(t){return t.map(function(i){var e=$Oe(i.t||""),r=ft("ss:Data",e,{xmlns:"http://www.w3.org/TR/REC-html40"}),n={};return i.a&&(n["ss:Author"]=i.a),t.hidden||(n["ss:ShowAlways"]="1"),ft("Comment",r,n)}).join("")}function aBe(t,i,e,r,n,a,s){if(!t||t.v==null&&t.f==null)return"";var o={};if(t.f&&(o["ss:Formula"]="="+xi(ES(t.f,s))),t.F&&t.F.slice(0,i.length)==i){var d=ir(t.F.slice(i.length+1));o["ss:ArrayRange"]="RC:R"+(d.r==s.r?"":"["+(d.r-s.r)+"]")+"C"+(d.c==s.c?"":"["+(d.c-s.c)+"]")}if(t.l&&t.l.Target&&(o["ss:HRef"]=xi(t.l.Target),t.l.Tooltip&&(o["x:HRefScreenTip"]=xi(t.l.Tooltip))),e["!merges"])for(var l=e["!merges"],c=0;c!=l.length;++c)l[c].s.c!=s.c||l[c].s.r!=s.r||(l[c].e.c>l[c].s.c&&(o["ss:MergeAcross"]=l[c].e.c-l[c].s.c),l[c].e.r>l[c].s.r&&(o["ss:MergeDown"]=l[c].e.r-l[c].s.r));var h="",u="";switch(t.t){case"z":if(!r.sheetStubs)return"";break;case"n":h="Number",u=String(t.v);break;case"b":h="Boolean",u=t.v?"1":"0";break;case"e":h="Error",u=Cu[t.v];break;case"d":h="DateTime",u=new Date(t.v).toISOString(),t.z==null&&(t.z=t.z||Kn[14]);break;case"s":h="String",u=YOe(t.v||"");break}var f=Du(r.cellXfs,t,r);o["ss:StyleID"]="s"+(21+f),o["ss:Index"]=s.c+1;var p=t.v!=null?u:"",m=t.t=="z"?"":''+p+"";return(t.c||[]).length>0&&(m+=sBe(t.c)),ft("Cell",m,o)}function oBe(t,i){var e='"}function lBe(t,i,e,r){if(!t["!ref"])return"";var n=Zn(t["!ref"]),a=t["!merges"]||[],s=0,o=[];t["!cols"]&&t["!cols"].forEach(function(g,v){l4(g);var y=!!g.width,x=AS(v,g),b={"ss:Index":v+1};y&&(b["ss:Width"]=dS(x.width)),g.hidden&&(b["ss:Hidden"]="1"),o.push(ft("Column",null,b))});for(var d=t["!data"]!=null,l=n.s.r;l<=n.e.r;++l){for(var c=[oBe(l,(t["!rows"]||[])[l])],h=n.s.c;h<=n.e.c;++h){var u=!1;for(s=0;s!=a.length;++s)if(!(a[s].s.c>h)&&!(a[s].s.r>l)&&!(a[s].e.c"),c.length>2&&o.push(c.join(""))}return o.join("")}function cBe(t,i,e){var r=[],n=e.SheetNames[t],a=e.Sheets[n],s=a?nBe(a,i,t,e):"";return s.length>0&&r.push(""+s+""),s=a?lBe(a,i,t,e):"",s.length>0&&r.push(""+s+"
"),r.push(rBe(a,i,t,e)),a["!autofilter"]&&r.push(''),r.join("")}function dBe(t,i){i||(i={}),t.SSF||(t.SSF=$s(Kn)),t.SSF&&(bS(),xS(t.SSF),i.revssf=_S(t.SSF),i.revssf[t.SSF[65535]]=0,i.ssf=t.SSF,i.cellXfs=[],Du(i.cellXfs,{},{revssf:{General:0}}));var e=[];e.push(q8e(t,i)),e.push(eBe(t,i)),e.push(""),e.push("");for(var r=0;r-1||BZ.indexOf(n[a][0])>-1||n[a][1]!=null&&l.push(n[a]);r.length&&An.utils.cfb_add(i,"/SummaryInformation",zK(r,RO.SI,d,LK)),(e.length||l.length)&&An.utils.cfb_add(i,"/DocumentSummaryInformation",zK(e,RO.DSI,o,OK,l.length?l:null,RO.UDI))}function hBe(t,i){var e=i||{},r=An.utils.cfb_new({root:"R"}),n="/Workbook";switch(e.bookType||"xls"){case"xls":e.bookType="biff8";case"xla":e.bookType||(e.bookType="xla");case"biff8":n="/Workbook",e.biff=8;break;case"biff5":n="/Book",e.biff=5;break;default:throw new Error("invalid type "+e.bookType+" for XLS CFB")}return An.utils.cfb_add(r,n,pJ(t,e)),e.biff==8&&(t.Props||t.Custprops)&&uBe(t,r),e.biff==8&&t.vbaraw&&wLe(r,An.read(t.vbaraw,{type:typeof t.vbaraw=="string"?"binary":"buffer"})),r}var fBe={0:{f:x5e},1:{f:D5e},2:{f:W5e},3:{f:O5e},4:{f:R5e},5:{f:z5e},6:{f:K5e},7:{f:N5e},8:{f:n8e},9:{f:i8e},10:{f:e8e},11:{f:t8e},12:{f:A5e},13:{f:Y5e},14:{f:L5e},15:{f:k5e},16:{f:H5e},17:{f:J5e},18:{f:V5e},19:{f:r4},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:H8e},40:{},42:{},43:{f:z3e},44:{f:V3e},45:{f:j3e},46:{f:X3e},47:{f:W3e},48:{},49:{f:f4e},50:{},51:{f:lLe},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:v3e},62:{f:Q5e},63:{f:pLe},64:{f:x8e},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:fc,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:p8e},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:S5e},148:{f:w5e,p:16},151:{f:c8e},152:{},153:{f:z8e},154:{},155:{},156:{f:V8e},157:{},158:{},159:{T:1,f:M3e},160:{T:-1},161:{T:1,f:df},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:r8e},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:aLe},336:{T:-1},337:{f:uLe,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:NO},357:{},358:{},359:{},360:{T:1},361:{},362:{f:h3e},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:d8e},427:{f:u8e},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:f8e},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:T5e},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:o8e},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:NO},551:{f:TS},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:bLe},633:{T:1},634:{T:-1},635:{T:1,f:yLe},636:{T:-1},637:{f:v4e},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:P8e},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:b8e},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function it(t,i,e,r){var n=i;if(!isNaN(n)){var a=r||(e||[]).length||0,s=t.next(4);s.write_shift(2,n),s.write_shift(2,a),a>0&&t4(e)&&t.push(e)}}function mBe(t,i,e,r){var n=r||(e||[]).length||0;if(n<=8224)return it(t,i,e,n);var a=i;if(!isNaN(a)){for(var s=e.parts||[],o=0,d=0,l=0;l+(s[o]||8224)<=8224;)l+=s[o]||8224,o++;var c=t.next(4);for(c.write_shift(2,a),c.write_shift(2,l),t.push(e.slice(d,d+l)),d+=l;d=0&&d<65536?it(t,2,_3e(e,r,d,o,s)):isNaN(d)?it(t,5,PO(e,r,36,"e")):isFinite(d)?it(t,3,b3e(e,r,d,o,s)):it(t,5,PO(e,r,7,"e"));return;case"b":case"e":it(t,5,PO(e,r,i.v,i.t));return;case"s":case"str":it(t,4,pBe(e,r,i.v==null?"":String(i.v).slice(0,255)));return}it(t,1,Xy(null,e,r))}function vBe(t,i,e,r,n){var a=i["!data"]!=null,s=Zn(i["!ref"]||"A1"),o="",d=[];if(s.e.c>255||s.e.r>16383){if(r.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV16384");s.e.c=Math.min(s.e.c,255),s.e.r=Math.min(s.e.c,16383)}for(var l=(((n||{}).Workbook||{}).WBProps||{}).date1904,c=[],h=[],u=s.s.c;u<=s.e.c;++u)d[u]=mn(u);for(var f=s.s.r;f<=s.e.r;++f)for(a&&(c=i["!data"][f]||[]),o=bn(f),u=s.s.c;u<=s.e.c;++u){var p=a?c[u]:i[d[u]+o];p&&(gBe(t,p,f,u,r,l),p.c&&h.push([p.c,f,u]))}mJ(t,h)}function yBe(t,i){for(var e=i||{},r=Xs(),n=0,a=0;a255||f.e.r>=p){if(i.WTF)throw new Error("Range "+(a["!ref"]||"A1")+" exceeds format limit A1:IV16384");f.e.c=Math.min(f.e.c,255),f.e.r=Math.min(f.e.c,p-1)}it(r,2057,o4(e,16,i)),it(r,13,jo(1)),it(r,12,jo(100)),it(r,15,js(!0)),it(r,17,js(!1)),it(r,16,sf(.001)),it(r,95,js(!0)),it(r,42,js(!1)),it(r,43,js(!1)),it(r,130,jo(1)),it(r,128,d3e([0,0])),it(r,131,js(!1)),it(r,132,js(!1)),l&&EBe(r,a["!cols"]),it(r,512,o3e(f,i));var m=(((e||{}).Workbook||{}).WBProps||{}).date1904;l&&(a["!links"]=[]);for(var g=f.s.c;g<=f.e.c;++g)u[g]=mn(g);for(var v=[],y=[],x=f.s.r;x<=f.e.r;++x)for(d&&(y=a["!data"][x]||[]),h=bn(x),g=f.s.c;g<=f.e.c;++g){c=u[g]+h;var b=d?y[g]:a[c];b&&(DBe(r,b,x,g,i,m),l&&b.l&&a["!links"].push([c,b.l]),b.c&&v.push([b.c,x,g]))}var _=o.CodeName||o.name||n;return l?bBe(r,v):mJ(r,v),l&&it(r,574,e3e((s.Views||[])[0])),l&&(a["!merges"]||[]).length&&it(r,229,f3e(a["!merges"])),l&&SBe(r,a),it(r,442,jZ(_,i)),l&&CBe(r,a),it(r,10),r.end()}function ABe(t,i,e){var r=Xs(),n=(t||{}).Workbook||{},a=n.Sheets||[],s=n.WBProps||{},o=e.biff==8,d=e.biff==5;if(it(r,2057,o4(t,5,e)),e.bookType=="xla"&&it(r,135),it(r,225,o?jo(1200):null),it(r,193,z4e(2)),d&&it(r,191),d&&it(r,192),it(r,226),it(r,92,K4e("SheetJS",e)),it(r,66,jo(o?1200:1252)),o&&it(r,353,jo(0)),o&&it(r,448),it(r,317,x3e(t.SheetNames.length)),o&&t.vbaraw&&it(r,211),o&&t.vbaraw){var l=s.CodeName||"ThisWorkbook";it(r,442,jZ(l,e))}it(r,156,jo(17)),it(r,25,js(!1)),it(r,18,js(!1)),it(r,19,jo(0)),o&&it(r,431,js(!1)),o&&it(r,444,jo(0)),it(r,61,q4e(e)),it(r,64,js(!1)),it(r,141,jo(0)),it(r,34,js(F8e(t)=="true")),it(r,14,js(!0)),o&&it(r,439,js(!1)),it(r,218,jo(0)),_Be(r,t,e),wBe(r,t.SSF,e),TBe(r,e),o&&it(r,352,js(!1));var c=r.end(),h=Xs();o&&it(h,140,g3e()),o&&Ho.length&&it(h,235,xBe()),o&&e.Strings&&mBe(h,252,J4e(e.Strings,e)),it(h,10);var u=h.end(),f=Xs(),p=0,m=0;for(m=0;m255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+t.SheetNames[e]+"' extends beyond column IV (255). Data may be lost.")}}var a=i||{};switch(a.biff||2){case 8:case 5:return IBe(t,i);case 4:case 3:case 2:return yBe(t,i)}throw new Error("invalid type "+a.bookType+" for BIFF")}function RBe(t,i,e,r){for(var n=t["!merges"]||[],a=[],s={},o=t["!data"]!=null,d=i.s.c;d<=i.e.c;++d){for(var l=0,c=0,h=0;he||n[h].s.c>d)&&!(n[h].e.r1&&(s.rowspan=l),c>1&&(s.colspan=c),r.editable?p=''+p+"":f&&(s["data-t"]=f&&f.t||"z",f.v!=null&&(s["data-v"]=wO(f.v instanceof Date?f.v.toISOString():f.v)),f.z!=null&&(s["data-z"]=f.z),f.l&&(f.l.Target||"#").charAt(0)!="#"&&(p=''+p+"")),s.id=(r.id||"sjs")+"-"+u,a.push(ft("td",p,s))}}var m="";return m+a.join("")+""}var PBe='SheetJS Table Export',kBe="";function FBe(t,i,e){var r=[];return r.join("")+""}function gJ(t,i){var e=i||{},r=e.header!=null?e.header:PBe,n=e.footer!=null?e.footer:kBe,a=[r],s=Ss(t["!ref"]||"A1");if(a.push(FBe(t,s,e)),t["!ref"])for(var o=s.s.r;o<=s.e.r;++o)a.push(RBe(t,s,o,e));return a.push(""+n),a.join("")}function vJ(t,i,e){var r=i.rows;if(!r)throw"Unsupported origin when "+i.tagName+" is not a TABLE";var n=e||{},a=t["!data"]!=null,s=0,o=0;if(n.origin!=null)if(typeof n.origin=="number")s=n.origin;else{var d=typeof n.origin=="string"?ir(n.origin):n.origin;s=d.r,o=d.c}var l=Math.min(n.sheetRows||1e7,r.length),c={s:{r:0,c:0},e:{r:s,c:o}};if(t["!ref"]){var h=Ss(t["!ref"]);c.s.r=Math.min(c.s.r,h.s.r),c.s.c=Math.min(c.s.c,h.s.c),c.e.r=Math.max(c.e.r,h.e.r),c.e.c=Math.max(c.e.c,h.e.c),s==-1&&(c.e.r=s=h.e.r+1)}var u=[],f=0,p=t["!rows"]||(t["!rows"]=[]),m=0,g=0,v=0,y=0,x=0,b=0;for(t["!cols"]||(t["!cols"]=[]);m1||b>1)&&u.push({s:{r:g+s,c:y+o},e:{r:g+s+(x||1)-1,c:y+o+(b||1)-1}});var D={t:"s",v:T},A=w.getAttribute("data-t")||w.getAttribute("t")||"";T!=null&&(T.length==0?D.t=A||"z":n.raw||T.trim().length==0||A=="s"||(T==="TRUE"?D={t:"b",v:!0}:T==="FALSE"?D={t:"b",v:!1}:isNaN(ud(T))?isNaN(aS(T).getDate())||(D={t:"d",v:$a(T)},n.UTC&&(D.v=wS(D.v)),n.cellDates||(D={t:"n",v:Es(D.v)}),D.z=n.dateNF||Kn[14]):D={t:"n",v:ud(T)})),D.z===void 0&&S!=null&&(D.z=S);var M="",R=w.getElementsByTagName("A");if(R&&R.length)for(var L=0;L=l&&(t["!fullref"]=Lr((c.e.r=r.length-m+g-1+s,c))),t}function yJ(t,i){var e=i||{},r={};return e.dense&&(r["!data"]=[]),vJ(r,t,i)}function OBe(t,i){var e=fg(yJ(t,i),i);return e}function eZ(t){var i="",e=LBe(t);return e&&(i=e(t).getPropertyValue("display")),i||(i=t.style&&t.style.display),i==="none"}function LBe(t){return t.ownerDocument.defaultView&&typeof t.ownerDocument.defaultView.getComputedStyle=="function"?t.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}var NBe=function(){var t=["",'',"",'',"",'',"",""].join(""),i=""+t+"";return function(){return Nr+i}}();function BBe(t,i){var e="number",r="",n={"style:name":i},a="",s=0;t=t.replace(/"[$]"/g,"$");e:{if(t.indexOf(";")>-1&&(console.error("Unsupported ODS Style Map exported. Using first branch of "+t),t=t.slice(0,t.indexOf(";"))),t=="@"){e="text",r="";break e}if(t.indexOf(/\$/)>-1&&(e="currency"),t[s]=='"'){for(a="";t[++s]!='"'||t[++s]=='"';)a+=t[s];--s,t[s+1]=="*"?(s++,r+=""+xi(a.replace(/""/g,'"'))+""):r+=""+xi(a.replace(/""/g,'"'))+"",t=t.slice(s+1),s=0}var o=t.match(/# (\?+)\/(\?+)/);if(o){r+=ft("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":o[1].length,"number:max-denominator-value":Math.max(+o[1].replace(/./g,"9"),+o[2].replace(/./g,"9"))});break e}if(o=t.match(/# (\?+)\/(\d+)/)){r+=ft("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":o[1].length,"number:denominator-value":+o[2]});break e}if(o=t.match(/\b(\d+)(|\.\d+)%/)){e="percentage",r+=ft("number:number",null,{"number:decimal-places":o[2]&&o.length-1||0,"number:min-decimal-places":o[2]&&o.length-1||0,"number:min-integer-digits":o[1].length})+"%";break e}var d=!1;if(["y","m","d"].indexOf(t[0])>-1){e="date";t:for(;s";break;case"yyy":case"yyyy":r+='';break;case"mmmmm":console.error("ODS has no equivalent of format |mmmmm|");case"m":case"mm":case"mmm":case"mmmm":r+='';break;case"d":case"dd":r+='';break;case"ddd":case"dddd":r+='';break}break;case'"':for(;t[++s]!='"'||t[++s]=='"';)a+=t[s];--s,r+=""+xi(a.slice(1).replace(/""/g,'"'))+"";break;case"\\":a=t[++s],r+=""+xi(a)+"";break;case"/":case":":r+=""+xi(a)+"";break;default:console.error("unrecognized character "+a+" in ODF format "+t)}if(!d)break e;t=t.slice(s+1),s=0}if(t.match(/^\[?[hms]/)){for(e=="number"&&(e="time"),t.match(/\[/)&&(t=t.replace(/[\[\]]/g,""),n["number:truncate-on-overflow"]="false");s';break;case"m":case"mm":r+='';break;case"s":case"ss":if(t[s+1]==".")do a+=t[s+1],++s;while(t[s+1]=="0");r+='";break}break;case'"':for(;t[++s]!='"'||t[++s]=='"';)a+=t[s];--s,r+=""+xi(a.slice(1).replace(/""/g,'"'))+"";break;case"/":case":":r+=""+xi(a)+"";break;case"a":if(t.slice(s,s+3).toLowerCase()=="a/p"){r+="",s+=2;break}if(t.slice(s,s+5).toLowerCase()=="am/pm"){r+="",s+=4;break}default:console.error("unrecognized character "+a+" in ODF format "+t)}break e}if(t.indexOf(/\$/)>-1&&(e="currency"),t[0]=="$"&&(r+='$',t=t.slice(1),s=0),s=0,t[s]=='"'){for(;t[++s]!='"'||t[++s]=='"';)a+=t[s];--s,t[s+1]=="*"?(s++,r+=""+xi(a.replace(/""/g,'"'))+""):r+=""+xi(a.replace(/""/g,'"'))+"",t=t.slice(s+1),s=0}var c=t.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i);if(!c||!c[0])console.error("Could not find numeric part of "+t);else{var h=c[1].replace(/,/g,"");r+="-1?' number:grouping="true"':"")+(c[2]&&' number:decimal-places="'+(c[2].length-1)+'"'||' number:decimal-places="0"')+(c[3]&&c[3].indexOf("+")>-1?' number:forced-exponent-sign="true"':"")+(c[3]?' number:min-exponent-digits="'+c[3].match(/0+/)[0].length+'"':"")+">",s=c.index+c[0].length}if(t[s]=='"'){for(a="";t[++s]!='"'||t[++s]=='"';)a+=t[s];--s,r+=""+xi(a.replace(/""/g,'"'))+""}}return r?ft("number:"+e+"-style",r,n):(console.error("Could not generate ODS number format for |"+t+"|"),"")}function tZ(t,i,e){for(var r=[],n=0;n +`+r.map(function(s){var o=(e==-1?"$":"")+cJ(s.Ref);return" "+ft("table:named-range",null,{"table:name":s.Name,"table:cell-range-address":o,"table:base-cell-address":o.replace(/[\.][^\.]*$/,".$A$1")})}).join(` +`)+` + +`:""}var iZ=function(){var t=function(n,a){return xi(n).replace(/ +/g,function(s){return''}).replace(/\t/g,"").replace(/\n/g,a?"":"").replace(/^ /,"").replace(/ $/,"")},i=` +`,e=function(n,a,s,o,d,l){var c=[];c.push(' +`);var h=0,u=0,f=Ss(n["!ref"]||"A1"),p=n["!merges"]||[],m=0,g=n["!data"]!=null;if(n["!cols"])for(u=0;u<=f.e.c;++u)c.push(" +`);var v="",y=n["!rows"]||[];for(h=0;h +`);for(;h<=f.e.r;++h){for(v=y[h]?' table:style-name="ro'+y[h].ods+'"':"",c.push(" +`),u=0;uu)&&!(p[m].s.r>h)&&!(p[m].e.c +`);continue}var C=ar({r:h,c:u}),w=g?(n["!data"][h]||[])[u]:n[C];if(w&&w.f&&(b["table:formula"]=xi(s5e(w.f)),w.F&&w.F.slice(0,C.length)==C)){var T=Ss(w.F);b["table:number-matrix-columns-spanned"]=T.e.c-T.s.c+1,b["table:number-matrix-rows-spanned"]=T.e.r-T.s.r+1}if(!w){c.push(i);continue}switch(w.t){case"b":_=w.v?"TRUE":"FALSE",b["office:value-type"]="boolean",b["office:boolean-value"]=w.v?"true":"false";break;case"n":_=w.w||String(w.v||0),b["office:value-type"]="float",b["office:value"]=w.v||0;break;case"s":case"str":_=w.v==null?"":w.v,b["office:value-type"]="string";break;case"d":_=w.w||$a(w.v,l).toISOString(),b["office:value-type"]="date",b["office:date-value"]=$a(w.v,l).toISOString(),b["table:style-name"]="ce1";break;default:c.push(i);continue}var S=t(_);if(w.l&&w.l.Target){var E=w.l.Target;E=E.charAt(0)=="#"?"#"+cJ(E.slice(1)):E,E.charAt(0)!="#"&&!E.match(/^\w+:/)&&(E="../"+E),S=ft("text:a",S,{"xlink:href":E.replace(/&/g,"&")})}d[w.z]&&(b["table:style-name"]="ce"+d[w.z].slice(1));var D=ft("text:p",S,{});if(w.c){for(var A="",M="",R={},L=0;L"+t(w.c[L].t)+"";w.c.hidden||(R["office:display"]=!0),D=ft("office:annotation",M,R)+D}c.push(" "+ft("table:table-cell",D,b)+` +`)}c.push(` +`)}return(a.Workbook||{}).Names&&c.push(tZ(a.Workbook.Names,a.SheetNames,s)),c.push(` +`),c.join("")},r=function(n,a){n.push(` +`);var s=0;a.SheetNames.map(function(c){return a.Sheets[c]}).forEach(function(c){if(c&&c["!cols"]){for(var h=0;h +`),n.push(' +`),n.push(` +`),++s}}});var o=0;a.SheetNames.map(function(c){return a.Sheets[c]}).forEach(function(c){if(c&&c["!rows"]){for(var h=0;h +`),n.push(' +`),n.push(` +`),++o}}}),n.push(` +`),n.push(` +`),n.push(` +`),n.push(` +`),n.push(` +`),n.push(` / +`),n.push(` +`),n.push(` / +`),n.push(` +`),n.push(` +`);var d={},l=69;return a.SheetNames.map(function(c){return a.Sheets[c]}).forEach(function(c){if(c){var h=c["!data"]!=null;if(c["!ref"])for(var u=Ss(c["!ref"]),f=0;f<=u.e.r;++f)for(var p=0;p<=u.e.c;++p){var m=h?(c["!data"][f]||[])[p]:c[ar({r:f,c:p})];if(!(!m||!m.z||m.z.toLowerCase()=="general")&&!d[m.z]){var g=BBe(m.z,"N"+l);g&&(d[m.z]="N"+l,++l,n.push(g+` +`))}}}}),n.push(` +`),Or(d).forEach(function(c){n.push(' +`)}),n.push(` +`),d};return function(a,s){var o=[Nr],d=Vy({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),l=Vy({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});s.bookType=="fods"?(o.push(" +`),o.push(LZ().replace(/]*?>/,"").replace(/<\/office:document-meta>/,"")+` +`)):o.push(" +`);var c=r(o,a);o.push(` +`),o.push(` +`),((a.Workbook||{}).WBProps||{}).date1904&&o.push(` + + +`);for(var h=0;h!=a.SheetNames.length;++h)o.push(e(a.Sheets[a.SheetNames[h]],a,h,s,c,((a.Workbook||{}).WBProps||{}).date1904));return(a.Workbook||{}).Names&&o.push(tZ(a.Workbook.Names,a.SheetNames,-1)),o.push(` +`),o.push(` +`),s.bookType=="fods"?o.push(""):o.push(""),o.join("")}}();function xJ(t,i){if(i.bookType=="fods")return iZ(t,i);var e=YO(),r="",n=[],a=[];return r="mimetype",yi(e,r,"application/vnd.oasis.opendocument.spreadsheet"),r="content.xml",yi(e,r,iZ(t,i)),n.push([r,"text/xml"]),a.push([r,"ContentFile"]),r="styles.xml",yi(e,r,NBe(t,i)),n.push([r,"text/xml"]),a.push([r,"StylesFile"]),r="meta.xml",yi(e,r,Nr+LZ()),n.push([r,"text/xml"]),a.push([r,"MetadataFile"]),r="manifest.rdf",yi(e,r,L4e(a)),n.push([r,"application/rdf+xml"]),r="META-INF/manifest.xml",yi(e,r,F4e(n)),e}var va=function(){try{return typeof Uint8Array>"u"||typeof Uint8Array.prototype.subarray>"u"?"slice":typeof Buffer<"u"?typeof Buffer.prototype.subarray>"u"?"slice":(typeof Buffer.from=="function"?Buffer.from([72,62]):new Buffer([72,62]))instanceof Uint8Array?"subarray":"slice":"subarray"}catch{return"slice"}}();function fS(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Hy(t){return typeof TextDecoder<"u"?new TextDecoder().decode(t):ng(nf(t))}function ma(t){return typeof TextEncoder<"u"?new TextEncoder().encode(t):po(cd(t))}function Eu(t){for(var i=0,e=0;e>7,t[i+14]|=(r&127)<<1;for(var a=0;n>=1;++a,n/=256)t[i+a]=n&255;t[i+15]|=e>=0?0:128}function jy(t,i){var e=i.l,r=t[e]&127;e:if(t[e++]>=128&&(r|=(t[e]&127)<<7,t[e++]<128||(r|=(t[e]&127)<<14,t[e++]<128)||(r|=(t[e]&127)<<21,t[e++]<128)||(r+=(t[e]&127)*Math.pow(2,28),++e,t[e++]<128)||(r+=(t[e]&127)*Math.pow(2,35),++e,t[e++]<128)||(r+=(t[e]&127)*Math.pow(2,42),++e,t[e++]<128)))break e;return i.l=e,r}function Lt(t){var i=new Uint8Array(7);i[0]=t&127;var e=1;e:if(t>127){if(i[e-1]|=128,i[e]=t>>7&127,++e,t<=16383||(i[e-1]|=128,i[e]=t>>14&127,++e,t<=2097151)||(i[e-1]|=128,i[e]=t>>21&127,++e,t<=268435455)||(i[e-1]|=128,i[e]=t/256>>>21&127,++e,t<=34359738367)||(i[e-1]|=128,i[e]=t/65536>>>21&127,++e,t<=4398046511103))break e;i[e-1]|=128,i[e]=t/16777216>>>21&127,++e}return i[va](0,e)}function bJ(t){for(var i={l:0},e=[];i.l=128;);s=t[va](e.l,o),e.l=o}break;case 1:s=t[va](o,o+8),e.l=o+8;break;case 2:{var d=jy(t,e);s=t[va](e.l,e.l+d),e.l+=d}break;case 5:s=t[va](o,o+4),e.l=o+4;break;default:throw new Error("PB Type ".concat(a," for Field ").concat(n," at offset ").concat(r))}var l={data:s,type:a};i[n]==null&&(i[n]=[]),i[n].push(l)}return i}function zt(t){var i=[];return t.forEach(function(e,r){r!=0&&e.forEach(function(n){n.data&&(i.push(Lt(r*8+n.type)),n.type==2&&i.push(Lt(n.data.length)),i.push(n.data))})}),Eu(i)}function mS(t,i){return t?.map(function(e){return i(e.data)})||[]}function pS(t){for(var i,e=[],r={l:0};r.l>>0>0),e.push(s)}return e}function ag(t){var i=[];return t.forEach(function(e){var r=[[],[{data:Lt(e.id),type:0}],[]];e.merge!=null&&(r[3]=[{data:Lt(+!!e.merge),type:0}]);var n=[];e.messages.forEach(function(s){n.push(s.data),s.meta[3]=[{type:0,data:Lt(s.data.length)}],r[2].push({data:zt(s.meta),type:2})});var a=zt(r);i.push(Lt(a.length)),i.push(a),n.forEach(function(s){return i.push(s)})}),Eu(i)}function UBe(t,i){if(t!=0)throw new Error("Unexpected Snappy chunk type ".concat(t));for(var e={l:0},r=jy(i,e),n=[],a=e.l;a>2;if(o<60)++o;else{var d=o-59;o=i[a],d>1&&(o|=i[a+1]<<8),d>2&&(o|=i[a+2]<<16),d>3&&(o|=i[a+3]<<24),o>>>=0,o++,a+=d}n.push(i[va](a,a+o)),a+=o;continue}else{var l=0,c=0;if(s==1?(c=(i[a]>>2&7)+4,l=(i[a++]&224)<<3,l|=i[a++]):(c=(i[a++]>>2)+1,s==2?(l=i[a]|i[a+1]<<8,a+=2):(l=(i[a]|i[a+1]<<8|i[a+2]<<16|i[a+3]<<24)>>>0,a+=4)),l==0)throw new Error("Invalid offset 0");for(var h=n.length-1,u=l;h>=0&&u>=n[h].length;)u-=n[h].length,--h;if(h<0)if(u==0)u=n[h=0].length;else throw new Error("Invalid offset beyond length");if(c0&&(n.push(n[h][va](n[h].length-u)),c-=u),++h;c>=n[h].length;)n.push(n[h]),c-=n[h].length,++h;c&&n.push(n[h][va](0,c))}n.length>25&&(n=[Eu(n)])}}for(var f=0,p=0;p>8&255]))):r<=16777216?(s+=4,i.push(new Uint8Array([248,r-1&255,r-1>>8&255,r-1>>16&255]))):r<=4294967296&&(s+=5,i.push(new Uint8Array([252,r-1&255,r-1>>8&255,r-1>>16&255,r-1>>>24&255]))),i.push(t[va](e,e+r)),s+=r,n[0]=0,n[1]=s&255,n[2]=s>>8&255,n[3]=s>>16&255,e+=r}return Eu(i)}function kO(t,i){var e=new Uint8Array(32),r=fS(e),n=12,a=0;switch(e[0]=5,t.t){case"n":if(t.z&&rf(t.z)){e[1]=5,r.setFloat64(n,(ig(t.v+1462).getTime()-Date.UTC(2001,0,1))/1e3,!0),a|=4,n+=8;break}else e[1]=2,VBe(e,n,t.v),a|=1,n+=16;break;case"b":e[1]=6,r.setFloat64(n,t.v?1:0,!0),a|=2,n+=8;break;case"s":{var s=t.v==null?"":String(t.v);if(t.l){var o=i.rsst.findIndex(function(l){var c;return l.v==s&&l.l==((c=t.l)==null?void 0:c.Target)});o==-1&&(i.rsst[o=i.rsst.length]={v:s,l:t.l.Target}),e[1]=9,r.setUint32(n,o,!0),a|=16,n+=4}else{var d=i.sst.indexOf(s);d==-1&&(i.sst[d=i.sst.length]=s),e[1]=3,r.setUint32(n,d,!0),a|=8,n+=4}}break;case"d":e[1]=5,r.setFloat64(n,(t.v.getTime()-Date.UTC(2001,0,1))/1e3,!0),a|=4,n+=8;break;case"z":e[1]=0;break;default:throw"unsupported cell type "+t.t}return t.c&&(i.cmnt.push(zBe(t.c)),r.setUint32(n,i.cmnt.length-1,!0),a|=524288,n+=4),r.setUint32(8,a,!0),e[va](0,n)}function FO(t,i){var e=new Uint8Array(32),r=fS(e),n=12,a=0,s="";switch(e[0]=4,t.t){case"n":break;case"b":break;case"s":if(s=t.v==null?"":String(t.v),t.l){var o=i.rsst.findIndex(function(l){var c;return l.v==s&&l.l==((c=t.l)==null?void 0:c.Target)});o==-1&&(i.rsst[o=i.rsst.length]={v:s,l:t.l.Target}),e[1]=9,r.setUint32(n,o,!0),a|=512,n+=4}break;case"d":break;case"e":break;case"z":break;default:throw"unsupported cell type "+t.t}switch(t.c&&(r.setUint32(n,i.cmnt.length-1,!0),a|=4096,n+=4),t.t){case"n":e[1]=2,r.setFloat64(n,t.v,!0),a|=32,n+=8;break;case"b":e[1]=6,r.setFloat64(n,t.v?1:0,!0),a|=32,n+=8;break;case"s":if(s=t.v==null?"":String(t.v),!t.l){var d=i.sst.indexOf(s);d==-1&&(i.sst[d=i.sst.length]=s),e[1]=3,r.setUint32(n,d,!0),a|=16,n+=4}break;case"d":e[1]=5,r.setFloat64(n,(t.v.getTime()-Date.UTC(2001,0,1))/1e3,!0),a|=64,n+=8;break;case"z":e[1]=0;break;default:throw"unsupported cell type "+t.t}return r.setUint32(8,a,!0),e[va](0,n)}function kr(t){var i=Yt(t);return yo(i[1][0].data)}function Hs(t){return zt([[],[{type:0,data:Lt(t)}]])}function Gs(t,i){var e,r=(e=t.messages[0].meta[5])!=null&&e[0]?bJ(t.messages[0].meta[5][0].data):[],n=r.indexOf(i);n==-1&&(r.push(i),t.messages[0].meta[5]=[{type:2,data:_J(r)}])}function ld(t,i){var e,r=(e=t.messages[0].meta[5])!=null&&e[0]?bJ(t.messages[0].meta[5][0].data):[];t.messages[0].meta[5]=[{type:2,data:_J(r.filter(function(n){return n!=i}))}]}function zBe(t){for(var i={a:"",t:"",replies:[]},e=0;e1)throw new Error("Template NUMBERS file must have exactly one sheet");return t.SheetNames.forEach(function(s,o){o>=1&&(XBe(e,r,o+1),n=uc(e,r,1),a=mS(Yt(n.messages[0].data)[1],kr)),YBe(e,r,t.Sheets[s],s,o,a[o])}),e}function fn(t,i,e,r){var n=An.find(t,i[e].location);if(!n)throw"Could not find ".concat(i[e].location," in Numbers template");var a=pS(gS(n.content)),s=a.find(function(o){return o.id==e});r(s,a),n.content=og(ag(a)),n.size=n.content.length}function uc(t,i,e){var r=An.find(t,i[e].location);if(!r)throw"Could not find ".concat(i[e].location," in Numbers template");var n=pS(gS(r.content)),a=n.find(function(s){return s.id==e});return a}function zO(t,i,e){t[3].push({type:2,data:zt([[],[{type:0,data:Lt(i)}],[{type:2,data:ma(e.replace(/-[\s\S]*$/,""))}],[{type:2,data:ma(e)}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:Lt(0)}],[],[{type:0,data:Lt(0)}]])}),t[1]=[{type:0,data:Lt(Math.max(i+1,yo(t[1][0].data)))}]}function Jh(t,i,e,r,n,a){a||(a=dc({deps:[],location:"",type:i},n));var s="".concat(r,"-").concat(a,".iwa");n[a].location="Root Entry"+s,An.utils.cfb_add(t,s,og(ag([{id:a,messages:[UO(i,zt(e))]}])));var o=s.replace(/^[\/]/,"").replace(/^Index\//,"").replace(/\.iwa$/,"");return fn(t,n,2,function(d){var l=Yt(d.messages[0].data);zO(l,a||0,o),d.messages[0].data=zt(l)}),a}function Ya(t,i,e,r){var n=i[e].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,""),a=t[3].findIndex(function(o){var d,l,c=Yt(o.data);return(d=c[3])!=null&&d[0]?Hy(c[3][0].data)==n:!!((l=c[2])!=null&&l[0]&&Hy(c[2][0].data)==n)}),s=Yt(t[3][a].data);s[6]||(s[6]=[]),(Array.isArray(r)?r:[r]).forEach(function(o){s[6].push({type:2,data:zt([[],[{type:0,data:Lt(o)}]])})}),t[3][a].data=zt(s)}function WBe(t,i,e,r){var n=i[e].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,""),a=t[3].findIndex(function(o){var d,l,c=Yt(o.data);return(d=c[3])!=null&&d[0]?Hy(c[3][0].data)==n:!!((l=c[2])!=null&&l[0]&&Hy(c[2][0].data)==n)}),s=Yt(t[3][a].data);s[6]||(s[6]=[]),s[6]=s[6].filter(function(o){return yo(Yt(o.data)[1][0].data)!=r}),t[3][a].data=zt(s)}function XBe(t,i,e){var r=-1,n=-1,a={};fn(t,i,1,function(d,l){var c=Yt(d.messages[0].data);r=kr(Yt(d.messages[0].data)[1][0].data),n=dc({deps:[1],location:i[r].location,type:2},i),a[r]=n,Gs(d,n),c[1].push({type:2,data:Hs(n)});var h=uc(t,i,r);h.id=n,i[1].location==i[n].location?l.push(h):fn(t,i,n,function(u,f){return f.push(h)}),d.messages[0].data=zt(c)});var s=-1;fn(t,i,n,function(d,l){for(var c=Yt(d.messages[0].data),h=3;h<=69;++h)delete c[h];var u=mS(c[2],kr);u.forEach(function(p){return ld(d,p)}),s=dc({deps:[n],location:i[u[0]].location,type:i[u[0]].type},i),Gs(d,s),a[u[0]]=s,c[2]=[{type:2,data:Hs(s)}];var f=uc(t,i,u[0]);f.id=s,i[u[0]].location==i[n].location?l.push(f):(fn(t,i,2,function(p){var m=Yt(p.messages[0].data);Ya(m,i,n,s),p.messages[0].data=zt(m)}),fn(t,i,s,function(p,m){return m.push(f)})),d.messages[0].data=zt(c)});var o=-1;fn(t,i,s,function(d,l){for(var c=Yt(d.messages[0].data),h=Yt(c[1][0].data),u=3;u<=69;++u)delete h[u];var f=kr(h[2][0].data);h[2][0].data=Hs(a[f]),c[1][0].data=zt(h);var p=kr(c[2][0].data);ld(d,p),o=dc({deps:[s],location:i[p].location,type:i[p].type},i),Gs(d,o),a[p]=o,c[2][0].data=Hs(o);var m=uc(t,i,p);m.id=o,i[s].location==i[o].location?l.push(m):fn(t,i,o,function(g,v){return v.push(m)}),d.messages[0].data=zt(c)}),fn(t,i,o,function(d,l){var c,h,u=Yt(d.messages[0].data),f=Hy(u[1][0].data),p=f.replace(/-[A-Z0-9]*/,"-".concat(("0000"+e.toString(16)).slice(-4)));if(u[1][0].data=ma(p),[12,13,29,31,32,33,39,44,47,81,82,84].forEach(function(_){return delete u[_]}),u[45]){var m=Yt(u[45][0].data),g=kr(m[1][0].data);ld(d,g),delete u[45]}if(u[70]){var v=Yt(u[70][0].data);(c=v[2])==null||c.forEach(function(_){var C=Yt(_.data);[2,3].map(function(w){return C[w][0]}).forEach(function(w){var T=Yt(w.data);if(T[8]){var S=kr(T[8][0].data);ld(d,S)}})}),delete u[70]}[46,30,34,35,36,38,48,49,60,61,62,63,64,71,72,73,74,75,85,86,87,88,89].forEach(function(_){if(u[_]){var C=kr(u[_][0].data);delete u[_],ld(d,C)}});var y=Yt(u[4][0].data);{[2,4,5,6,11,12,13,15,16,17,18,19,20,21,22].forEach(function(_){var C;if((C=y[_])!=null&&C[0]){var w=kr(y[_][0].data),T=dc({deps:[o],location:i[w].location,type:i[w].type},i);ld(d,w),Gs(d,T),a[w]=T;var S=uc(t,i,w);if(S.id=T,i[w].location==i[o].location)l.push(S);else{i[T].location=i[w].location.replace(w.toString(),T.toString()),i[T].location==i[w].location&&(i[T].location=i[T].location.replace(/\.iwa/,"-".concat(T,".iwa"))),An.utils.cfb_add(t,i[T].location,og(ag([S])));var E=i[T].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");fn(t,i,2,function(D){var A=Yt(D.messages[0].data);zO(A,T,E),Ya(A,i,o,T),D.messages[0].data=zt(A)})}y[_][0].data=Hs(T)}});var x=Yt(y[1][0].data);(h=x[2])==null||h.forEach(function(_){var C=kr(_.data),w=dc({deps:[o],location:i[C].location,type:i[C].type},i);ld(d,C),Gs(d,w),a[C]=w;var T=uc(t,i,C);if(T.id=w,i[C].location==i[o].location)l.push(T);else{i[w].location=i[C].location.replace(C.toString(),w.toString()),i[w].location==i[C].location&&(i[w].location=i[w].location.replace(/\.iwa/,"-".concat(w,".iwa"))),An.utils.cfb_add(t,i[w].location,og(ag([T])));var S=i[w].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");fn(t,i,2,function(E){var D=Yt(E.messages[0].data);zO(D,w,S),Ya(D,i,o,w),E.messages[0].data=zt(D)})}_.data=Hs(w)}),y[1][0].data=zt(x);var b=Yt(y[3][0].data);b[1].forEach(function(_){var C=Yt(_.data),w=kr(C[2][0].data),T=a[w];if(!a[w]){T=dc({deps:[o],location:"",type:i[w].type},i),i[T].location="Root Entry/Index/Tables/Tile-".concat(T,".iwa"),a[w]=T;var S=uc(t,i,w);S.id=T,ld(d,w),Gs(d,T),An.utils.cfb_add(t,"/Index/Tables/Tile-".concat(T,".iwa"),og(ag([S]))),fn(t,i,2,function(E){var D=Yt(E.messages[0].data);D[3].push({type:2,data:zt([[],[{type:0,data:Lt(T)}],[{type:2,data:ma("Tables/Tile")}],[{type:2,data:ma("Tables/Tile-".concat(T))}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:Lt(0)}],[],[{type:0,data:Lt(0)}]])}),D[1]=[{type:0,data:Lt(Math.max(T+1,yo(D[1][0].data)))}],Ya(D,i,o,T),E.messages[0].data=zt(D)})}C[2][0].data=Hs(T),_.data=zt(C)}),y[3][0].data=zt(b)}u[4][0].data=zt(y),d.messages[0].data=zt(u)})}function YBe(t,i,e,r,n,a){var s=[];fn(t,i,a,function(l){var c=Yt(l.messages[0].data);c[1]=[{type:2,data:ma(r)}],s=mS(c[2],kr),l.messages[0].data=zt(c)});var o=uc(t,i,s[0]),d=kr(Yt(o.messages[0].data)[2][0].data);fn(t,i,d,function(l,c){return $Be(t,i,e,l,c,d)})}var rZ=!0;function $Be(t,i,e,r,n,a){if(!e["!ref"])throw new Error("Cannot export empty sheet to NUMBERS");var s=Ss(e["!ref"]);s.s.r=s.s.c=0;var o=!1;s.e.c>999&&(o=!0,s.e.c=999),s.e.r>999999&&(o=!0,s.e.r=999999),o&&console.error("Truncating to ".concat(Lr(s)));var d=[];if(e["!data"])d=e["!data"];else{for(var l=[],c=0;c<=s.e.c;++c)l[c]=mn(c);for(var h=0;h<=s.e.r;++h){d[h]=[];var u=""+(h+1);for(c=0;c<=s.e.c;++c){var f=e[l[c]+u];f&&(d[h][c]=f)}}}var p={cmnt:[{a:"~54ee77S~",t:"... the people who are crazy enough to think they can change the world, are the ones who do."}],ferr:[],fmla:[],nfmt:[],ofmt:[],rsst:[{v:"~54ee77S~",l:"https://sheetjs.com/"}],sst:["~Sh33tJ5~"]},m=Yt(r.messages[0].data);{m[6][0].data=Lt(s.e.r+1),m[7][0].data=Lt(s.e.c+1),delete m[46];var g=Yt(m[4][0].data);{var v=kr(Yt(g[1][0].data)[2][0].data);fn(t,i,v,function(z,F){var k,G=Yt(z.messages[0].data);if((k=G?.[2])!=null&&k[0])for(var Z=0;Z1){var H=kr(g[19][0].data),X={},V=0;fn(t,i,H,function(z){var F=Yt(z.messages[0].data);F[3]=[],p.cmnt.forEach(function(k,G){if(G!=0){var Z=[];k.replies&&k.replies.forEach(function(q){X[q.a||""]||(X[q.a||""]=Jh(t,212,[[],[{type:2,data:ma(q.a||"")}],[{type:2,data:nZ(++V)}],[],[{type:0,data:Lt(0)}]],"/Index/Tables/DataList",i));var ie=X[q.a||""],re=Jh(t,3056,[[],[{type:2,data:ma(q.t||"")}],[{type:2,data:zt([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:Hs(ie)}]],"/Index/Tables/DataList",i);fn(t,i,re,function(oe){return Gs(oe,ie)}),Z.push(re),fn(t,i,2,function(oe){var ve=Yt(oe.messages[0].data);Ya(ve,i,re,ie),oe.messages[0].data=zt(ve)})}),X[k.a||""]||(X[k.a||""]=Jh(t,212,[[],[{type:2,data:ma(k.a||"")}],[{type:2,data:nZ(++V)}],[],[{type:0,data:Lt(0)}]],"/Index/Tables/DataList",i));var J=X[k.a||""],W=Jh(t,3056,[[],[{type:2,data:ma(k.t||"")}],[{type:2,data:zt([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:Hs(J)}],Z.map(function(q){return{type:2,data:Hs(q)}}),[{type:2,data:zt([[],[{type:0,data:Lt(G)}],[{type:0,data:Lt(0)}]])}]],"/Index/Tables/DataList",i);fn(t,i,W,function(q){Gs(q,J),Z.forEach(function(ie){return Gs(q,ie)})}),F[3].push({type:2,data:zt([[],[{type:0,data:Lt(G)}],[{type:0,data:Lt(1)}],[],[],[],[],[],[],[],[{type:2,data:Hs(W)}]])}),Gs(z,W),fn(t,i,2,function(q){var ie=Yt(q.messages[0].data);Ya(ie,i,H,W),Ya(ie,i,W,J),Z.length&&Ya(ie,i,W,Z),q.messages[0].data=zt(ie)})}}),F[2][0].data=Lt(p.cmnt.length+1),z.messages[0].data=zt(F)})}}m[4][0].data=zt(g)}r.messages[0].data=zt(m)}function QBe(t){return function(e){for(var r=0;r!=t.length;++r){var n=t[r];e[n[0]]===void 0&&(e[n[0]]=n[1]),n[2]==="n"&&(e[n[0]]=Number(e[n[0]]))}}}function u4(t){QBe([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(t)}function KBe(t,i){t&&!t.SSF&&(t.SSF=$s(Kn)),t&&t.SSF&&(bS(),xS(t.SSF),i.revssf=_S(t.SSF),i.revssf[t.SSF[65535]]=0,i.ssf=t.SSF),i.rels={},i.wbrels={},i.Strings=[],i.Strings.Count=0,i.Strings.Unique=0,Oy?i.revStrings=new Map:(i.revStrings={},i.revStrings.foo=[],delete i.revStrings.foo);var e="bin",r=!0,n=kZ();u4(i=i||{});var a=YO(),s="",o=0;if(i.cellXfs=[],Du(i.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),s="docProps/core.xml",yi(a,s,NZ(t.Props,i)),n.coreprops.push(s),rn(i.rels,2,s,Hi.CORE_PROPS),s="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var d=[],l=0;l0&&(s="docProps/custom.xml",yi(a,s,UZ(t.Custprops,i)),n.custprops.push(s),rn(i.rels,4,s,Hi.CUST_PROPS));var c=["SheetJ5"];for(i.tcid=0,o=1;o<=t.SheetNames.length;++o){var h={"!id":{}},u=t.Sheets[t.SheetNames[o-1]],f=(u||{})["!type"]||"sheet";switch(f){case"chart":default:s="xl/worksheets/sheet"+o+"."+e,yi(a,s,R8e(o-1,i,t,h)),n.sheets.push(s),rn(i.wbrels,-1,"worksheets/sheet"+o+"."+e,Hi.WS[0])}if(u){var p=u["!comments"],m=!1,g="";if(p&&p.length>0){var v=!1;p.forEach(function(x){x[1].forEach(function(b){b.T==!0&&(v=!0)})}),v&&(g="xl/threadedComments/threadedComment"+o+".xml",yi(a,g,eJ(p,c,i)),n.threadedcomments.push(g),rn(h,-1,"../threadedComments/threadedComment"+o+".xml",Hi.TCMNT)),g="xl/comments"+o+"."+e,yi(a,g,_Le(p,i)),n.comments.push(g),rn(h,-1,"../comments"+o+"."+e,Hi.CMNT),m=!0}u["!legacy"]&&m&&yi(a,"xl/drawings/vmlDrawing"+o+".vml",qZ(o,u["!comments"])),delete u["!comments"],delete u["!legacy"]}h["!id"].rId1&&yi(a,OZ(s),rg(h))}i.Strings!=null&&i.Strings.length>0&&(s="xl/sharedStrings."+e,yi(a,s,R3e(i.Strings,i)),n.strs.push(s),rn(i.wbrels,-1,"sharedStrings."+e,Hi.SST)),s="xl/workbook."+e,yi(a,s,J8e(t,i)),n.workbooks.push(s),rn(i.rels,1,s,Hi.WB),s="xl/theme/theme1.xml";var y=JZ(t.Themes,i);return yi(a,s,y),n.themes.push(s),rn(i.wbrels,-1,"theme/theme1.xml",Hi.THEME),s="xl/styles."+e,yi(a,s,sLe(t,i)),n.styles.push(s),rn(i.wbrels,-1,"styles."+e,Hi.STY),t.vbaraw&&r&&(s="xl/vbaProject.bin",yi(a,s,t.vbaraw),n.vba.push(s),rn(i.wbrels,-1,"vbaProject.bin",Hi.VBA)),s="xl/metadata."+e,yi(a,s,fLe()),n.metadata.push(s),rn(i.wbrels,-1,"metadata."+e,Hi.XLMETA),c.length>1&&(s="xl/persons/person.xml",yi(a,s,tJ(c,i)),n.people.push(s),rn(i.wbrels,-1,"persons/person.xml",Hi.PEOPLE)),yi(a,"[Content_Types].xml",FZ(n,i)),yi(a,"_rels/.rels",rg(i.rels)),yi(a,"xl/_rels/workbook."+e+".rels",rg(i.wbrels)),delete i.revssf,delete i.ssf,a}function ZBe(t,i){t&&!t.SSF&&(t.SSF=$s(Kn)),t&&t.SSF&&(bS(),xS(t.SSF),i.revssf=_S(t.SSF),i.revssf[t.SSF[65535]]=0,i.ssf=t.SSF),i.rels={},i.wbrels={},i.Strings=[],i.Strings.Count=0,i.Strings.Unique=0,Oy?i.revStrings=new Map:(i.revStrings={},i.revStrings.foo=[],delete i.revStrings.foo);var e="xml",r=CLe.indexOf(i.bookType)>-1,n=kZ();u4(i=i||{});var a=YO(),s="",o=0;if(i.cellXfs=[],Du(i.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),s="docProps/core.xml",yi(a,s,NZ(t.Props,i)),n.coreprops.push(s),rn(i.rels,2,s,Hi.CORE_PROPS),s="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var d=[],l=0;l0&&(s="docProps/custom.xml",yi(a,s,UZ(t.Custprops,i)),n.custprops.push(s),rn(i.rels,4,s,Hi.CUST_PROPS));var c=["SheetJ5"];for(i.tcid=0,o=1;o<=t.SheetNames.length;++o){var h={"!id":{}},u=t.Sheets[t.SheetNames[o-1]],f=(u||{})["!type"]||"sheet";switch(f){case"chart":default:s="xl/worksheets/sheet"+o+"."+e,yi(a,s,y5e(o-1,i,t,h)),n.sheets.push(s),rn(i.wbrels,-1,"worksheets/sheet"+o+"."+e,Hi.WS[0])}if(u){var p=u["!comments"],m=!1,g="";if(p&&p.length>0){var v=!1;p.forEach(function(y){y[1].forEach(function(x){x.T==!0&&(v=!0)})}),v&&(g="xl/threadedComments/threadedComment"+o+".xml",yi(a,g,eJ(p,c,i)),n.threadedcomments.push(g),rn(h,-1,"../threadedComments/threadedComment"+o+".xml",Hi.TCMNT)),g="xl/comments"+o+"."+e,yi(a,g,vLe(p,i)),n.comments.push(g),rn(h,-1,"../comments"+o+"."+e,Hi.CMNT),m=!0}u["!legacy"]&&m&&yi(a,"xl/drawings/vmlDrawing"+o+".vml",qZ(o,u["!comments"])),delete u["!comments"],delete u["!legacy"]}h["!id"].rId1&&yi(a,OZ(s),rg(h))}return i.Strings!=null&&i.Strings.length>0&&(s="xl/sharedStrings."+e,yi(a,s,D3e(i.Strings,i)),n.strs.push(s),rn(i.wbrels,-1,"sharedStrings."+e,Hi.SST)),s="xl/workbook."+e,yi(a,s,B8e(t,i)),n.workbooks.push(s),rn(i.rels,1,s,Hi.WB),s="xl/theme/theme1.xml",yi(a,s,JZ(t.Themes,i)),n.themes.push(s),rn(i.wbrels,-1,"theme/theme1.xml",Hi.THEME),s="xl/styles."+e,yi(a,s,B3e(t,i)),n.styles.push(s),rn(i.wbrels,-1,"styles."+e,Hi.STY),t.vbaraw&&r&&(s="xl/vbaProject.bin",yi(a,s,t.vbaraw),n.vba.push(s),rn(i.wbrels,-1,"vbaProject.bin",Hi.VBA)),s="xl/metadata."+e,yi(a,s,mLe()),n.metadata.push(s),rn(i.wbrels,-1,"metadata."+e,Hi.XLMETA),c.length>1&&(s="xl/persons/person.xml",yi(a,s,tJ(c,i)),n.people.push(s),rn(i.wbrels,-1,"persons/person.xml",Hi.PEOPLE)),yi(a,"[Content_Types].xml",FZ(n,i)),yi(a,"_rels/.rels",rg(i.rels)),yi(a,"xl/_rels/workbook."+e+".rels",rg(i.wbrels)),delete i.revssf,delete i.ssf,a}function JBe(t,i){var e="";switch((i||{}).type||"base64"){case"buffer":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];case"base64":e=Tu(t.slice(0,12));break;case"binary":e=t;break;case"array":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];default:throw new Error("Unrecognized type "+(i&&i.type||"undefined"))}return[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3),e.charCodeAt(4),e.charCodeAt(5),e.charCodeAt(6),e.charCodeAt(7)]}function wJ(t,i){switch(i.type){case"base64":case"binary":break;case"buffer":case"array":i.type="";break;case"file":return Wy(i.file,An.write(t,{type:dn?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+i.bookType+"' files");default:throw new Error("Unrecognized type "+i.type)}return An.write(t,i)}function qBe(t,i){switch(i.bookType){case"ods":return xJ(t,i);case"numbers":return jBe(t,i);case"xlsb":return KBe(t,i);default:return ZBe(t,i)}}function e9e(t,i){var e=$s(i||{}),r=qBe(t,e);return t9e(r,e)}function t9e(t,i){var e={},r=dn?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(i.compression&&(e.compression="DEFLATE"),i.password)e.type=r;else switch(i.type){case"base64":e.type="base64";break;case"binary":e.type="string";break;case"string":throw new Error("'string' output type invalid for '"+i.bookType+"' files");case"buffer":case"file":e.type=r;break;default:throw new Error("Unrecognized type "+i.type)}var n=t.FullPaths?An.write(t,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[e.type]||e.type,compression:!!i.compression}):t.generate(e);if(typeof Deno<"u"&&typeof n=="string"){if(i.type=="binary"||i.type=="base64")return n;n=new Uint8Array(yS(n))}return i.password&&typeof encrypt_agile<"u"?wJ(encrypt_agile(n,i.password),i):i.type==="file"?Wy(i.file,n):i.type=="string"?ng(n):n}function i9e(t,i){var e=i||{},r=hBe(t,e);return wJ(r,e)}function cc(t,i,e){e||(e="");var r=e+t;switch(i.type){case"base64":return tS(cd(r));case"binary":return cd(r);case"string":return t;case"file":return Wy(i.file,r,"utf8");case"buffer":return dn?mc(r,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(r):cc(r,{type:"binary"}).split("").map(function(n){return n.charCodeAt(0)})}throw new Error("Unrecognized type "+i.type)}function n9e(t,i){switch(i.type){case"base64":return nOe(t);case"binary":return t;case"string":return t;case"file":return Wy(i.file,t,"binary");case"buffer":return dn?mc(t,"binary"):t.split("").map(function(e){return e.charCodeAt(0)})}throw new Error("Unrecognized type "+i.type)}function qT(t,i){switch(i.type){case"string":case"base64":case"binary":for(var e="",r=0;r0&&(n=0);var h=bn(d.s.r),u=[],f=[],p=0,m=0,g=t["!data"]!=null,v=d.s.r,y=0,x={};g&&!t["!data"][v]&&(t["!data"][v]=[]);var b=l.skipHidden&&t["!cols"]||[],_=l.skipHidden&&t["!rows"]||[];for(y=d.s.c;y<=d.e.c;++y)if(!(b[y]||{}).hidden)switch(u[y]=mn(y),e=g?t["!data"][v][y]:t[u[y]+h],r){case 1:a[y]=y-d.s.c;break;case 2:a[y]=u[y];break;case 3:a[y]=l.header[y-d.s.c];break;default:if(e==null&&(e={w:"__EMPTY",t:"s"}),o=s=md(e,null,l),m=x[s]||0,!m)x[s]=1;else{do o=s+"_"+m++;while(x[o]);x[s]=m,x[o]=1}a[y]=o}for(v=d.s.r+n;v<=d.e.r;++v)if(!(_[v]||{}).hidden){var C=r9e(t,d,v,u,r,a,l);(C.isempty===!1||(r===1?l.blankrows!==!1:l.blankrows))&&(f[p++]=C.row)}return f.length=p,f}var sZ=/"/g;function s9e(t,i,e,r,n,a,s,o){for(var d=!0,l=[],c="",h=bn(e),u=t["!data"]!=null,f=u&&t["!data"][e]||[],p=i.s.c;p<=i.e.c;++p)if(r[p]){var m=u?f[p]:t[r[p]+h];if(m==null)c="";else if(m.v!=null){d=!1,c=""+(o.rawNumbers&&m.t=="n"?m.v:md(m,null,o));for(var g=0,v=0;g!==c.length;++g)if((v=c.charCodeAt(g))===n||v===a||v===34||o.forceQuotes){c='"'+c.replace(sZ,'""')+'"';break}c=="ID"&&(c='"ID"')}else m.f!=null&&!m.F?(d=!1,c="="+m.f,c.indexOf(",")>=0&&(c='"'+c.replace(sZ,'""')+'"')):c="";l.push(c)}if(o.strip)for(;l[l.length-1]==="";)--l.length;return o.blankrows===!1&&d?null:l.join(s)}function f4(t,i){var e=[],r=i??{};if(t==null||t["!ref"]==null)return"";for(var n=Zn(t["!ref"]),a=r.FS!==void 0?r.FS:",",s=a.charCodeAt(0),o=r.RS!==void 0?r.RS:` +`,d=o.charCodeAt(0),l="",c=[],h=r.skipHidden&&t["!cols"]||[],u=r.skipHidden&&t["!rows"]||[],f=n.s.c;f<=n.e.c;++f)(h[f]||{}).hidden||(c[f]=mn(f));for(var p=0,m=n.s.r;m<=n.e.r;++m)(u[m]||{}).hidden||(l=s9e(t,n,m,c,s,d,a,r),l!=null&&(l||r.blankrows!==!1)&&e.push((p++?o:"")+l));return e.join("")}function CJ(t,i){i||(i={}),i.FS=" ",i.RS=` +`;var e=f4(t,i);if(typeof Ki>"u"||i.type=="string")return e;var r=Ki.utils.encode(1200,e,"str");return"\xFF\xFE"+r}function a9e(t){var i="",e,r="";if(t==null||t["!ref"]==null)return[];var n=Zn(t["!ref"]),a="",s=[],o,d=[],l=t["!data"]!=null;for(o=n.s.c;o<=n.e.c;++o)s[o]=mn(o);for(var c=n.s.r;c<=n.e.r;++c)for(a=bn(c),o=n.s.c;o<=n.e.c;++o)if(i=s[o]+a,e=l?(t["!data"][c]||[])[o]:t[i],r="",e!==void 0){if(e.F!=null){if(i=e.F,!e.f)continue;r=e.f,i.indexOf(":")==-1&&(i=i+":"+i)}if(e.f!=null)r=e.f;else{if(e.t=="z")continue;if(e.t=="n"&&e.v!=null)r=""+e.v;else if(e.t=="b")r=e.v?"TRUE":"FALSE";else if(e.w!==void 0)r="'"+e.w;else{if(e.v===void 0)continue;e.t=="s"?r="'"+e.v:r=""+e.v}}d[d.length]=i+"="+r}return d}function TJ(t,i,e){var r=e||{},n=t?t["!data"]!=null:r.dense;hc!=null&&n==null&&(n=hc);var a=+!r.skipHeader,s=t||{};!t&&n&&(s["!data"]=[]);var o=0,d=0;if(s&&r.origin!=null)if(typeof r.origin=="number")o=r.origin;else{var l=typeof r.origin=="string"?ir(r.origin):r.origin;o=l.r,d=l.c}var c={s:{c:0,r:0},e:{c:d,r:o+i.length-1+a}};if(s["!ref"]){var h=Zn(s["!ref"]);c.e.c=Math.max(c.e.c,h.e.c),c.e.r=Math.max(c.e.r,h.e.r),o==-1&&(o=h.e.r+1,c.e.r=o+i.length-1+a)}else o==-1&&(o=0,c.e.r=i.length-1+a);var u=r.header||[],f=0,p=[];i.forEach(function(g,v){n&&!s["!data"][o+v+a]&&(s["!data"][o+v+a]=[]),n&&(p=s["!data"][o+v+a]),Or(g).forEach(function(y){(f=u.indexOf(y))==-1&&(u[f=u.length]=y);var x=g[y],b="z",_="",C=n?"":mn(d+f)+bn(o+v+a),w=n?p[d+f]:s[C];x&&typeof x=="object"&&!(x instanceof Date)?n?p[d+f]=x:s[C]=x:(typeof x=="number"?b="n":typeof x=="boolean"?b="b":typeof x=="string"?b="s":x instanceof Date?(b="d",r.UTC||(x=wS(x)),r.cellDates||(b="n",x=Es(x)),_=w!=null&&w.z&&rf(w.z)?w.z:r.dateNF||Kn[14]):x===null&&r.nullError&&(b="e",x=0),w?(w.t=b,w.v=x,delete w.w,delete w.R,_&&(w.z=_)):n?p[d+f]=w={t:b,v:x}:s[C]=w={t:b,v:x},_&&(w.z=_))})}),c.e.c=Math.max(c.e.c,d+u.length-1);var m=bn(o);if(n&&!s["!data"][o]&&(s["!data"][o]=[]),a)for(f=0;f=0&&t.SheetNames.length>i)return i;throw new Error("Cannot find sheet # "+i)}else if(typeof i=="string"){var e=t.SheetNames.indexOf(i);if(e>-1)return e;throw new Error("Cannot find sheet name |"+i+"|")}else throw new Error("Cannot find sheet |"+i+"|")}function c9e(t,i){var e={SheetNames:[],Sheets:{}};return t&&m4(e,t,i||"Sheet1"),e}function m4(t,i,e,r){var n=1;if(!e)for(;n<=65535&&t.SheetNames.indexOf(e="Sheet"+n)!=-1;++n,e=void 0);if(!e||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(r&&t.SheetNames.indexOf(e)>=0&&e.length<32){var a=e.match(/\d+$/);n=a&&+a[0]||0;var s=a&&e.slice(0,a.index)||e;for(++n;n<=65535&&t.SheetNames.indexOf(e=s+n)!=-1;++n);}if(hJ(e),t.SheetNames.indexOf(e)>=0)throw new Error("Worksheet with name |"+e+"| already exists!");return t.SheetNames.push(e),t.Sheets[e]=i,e}function d9e(t,i,e){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var r=l9e(t,i);switch(t.Workbook.Sheets[r]||(t.Workbook.Sheets[r]={}),e){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+e)}t.Workbook.Sheets[r].Hidden=e}function u9e(t,i){return t.z=i,t}function SJ(t,i,e){return i?(t.l={Target:i},e&&(t.l.Tooltip=e)):delete t.l,t}function h9e(t,i,e){return SJ(t,"#"+i,e)}function f9e(t,i,e){t.c||(t.c=[]),t.c.push({t:i,a:e||"SheetJS"})}function m9e(t,i,e,r){for(var n=typeof i!="string"?i:Zn(i),a=typeof i=="string"?i:Lr(i),s=n.s.r;s<=n.e.r;++s)for(var o=n.s.c;o<=n.e.c;++o){var d=vS(t,s,o);d.t="n",d.F=a,delete d.v,s==n.s.r&&o==n.s.c&&(d.f=e,r&&(d.D=!0))}var l=Ss(t["!ref"]);return l.s.r>n.s.r&&(l.s.r=n.s.r),l.s.c>n.s.c&&(l.s.c=n.s.c),l.e.r{class t{constructor(){}exportAsExcelFile(e,r){let a={Sheets:{data:EJ.json_to_sheet(e)},SheetNames:["data"]},s=h4(a,{bookType:"xlsx",type:"array"});this.saveAsExcelFile(s,r)}saveAsExcelFile(e,r){let n=new Blob([e],{type:g9e});DJ.saveAs(n,r+"_export_"+new Date().getTime()+v9e)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var x9e=["*",[["mat-toolbar-row"]]],b9e=["*","mat-toolbar-row"],_9e=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]})}return t})(),AJ=(()=>{class t{_elementRef=Q(Ze);_platform=Q(hi);_document=Q(St);color;_toolbarRows;constructor(){}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){this._toolbarRows.length}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-toolbar"]],contentQueries:function(r,n,a){if(r&1&&ui(a,_9e,5),r&2){let s;je(s=We())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(r,n){r&2&&(Tn(n.color?"mat-"+n.color:""),ut("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",n._toolbarRows.length===0))},inputs:{color:"color"},exportAs:["matToolbar"],ngContentSelectors:b9e,decls:2,vars:0,template:function(r,n){r&1&&(ti(x9e),wt(0),wt(1,1))},styles:[".mat-toolbar{background:var(--mat-toolbar-container-background-color, var(--mat-sys-surface));color:var(--mat-toolbar-container-text-color, var(--mat-sys-on-surface))}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:var(--mat-toolbar-title-text-font, var(--mat-sys-title-large-font));font-size:var(--mat-toolbar-title-text-size, var(--mat-sys-title-large-size));line-height:var(--mat-toolbar-title-text-line-height, var(--mat-sys-title-large-line-height));font-weight:var(--mat-toolbar-title-text-weight, var(--mat-sys-title-large-weight));letter-spacing:var(--mat-toolbar-title-text-tracking, var(--mat-sys-title-large-tracking));margin:0}@media(forced-colors: active){.mat-toolbar{outline:solid 1px}}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar .mat-mdc-button-base.mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color:var(--mat-toolbar-container-text-color, var(--mat-sys-on-surface));--mdc-outlined-button-label-text-color:var(--mat-toolbar-container-text-color, var(--mat-sys-on-surface))}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap;height:var(--mat-toolbar-standard-height, 64px)}@media(max-width: 599px){.mat-toolbar-row,.mat-toolbar-single-row{height:var(--mat-toolbar-mobile-height, 56px)}}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%;min-height:var(--mat-toolbar-standard-height, 64px)}@media(max-width: 599px){.mat-toolbar-multiple-rows{min-height:var(--mat-toolbar-mobile-height, 56px)}}"],encapsulation:2,changeDetection:0})}return t})();var IJ=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,Ct]})}return t})();var RJ=["*"],C9e=["content"],T9e=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],S9e=["mat-drawer","mat-drawer-content","*"];function E9e(t,i){if(t&1){let e=Ce();B(0,"div",1),ce("click",function(){ue(e);let n=ne();return he(n._onBackdropClicked())}),U()}if(t&2){let e=ne();ut("mat-drawer-shown",e._isShowingBackdrop())}}function D9e(t,i){t&1&&(B(0,"mat-drawer-content"),wt(1,2),U())}var M9e=new Se("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:A9e}),PJ=new Se("MAT_DRAWER_CONTAINER");function A9e(){return!1}var p4=(()=>{class t extends Uc{_platform=Q(hi);_changeDetectorRef=Q(Ut);_container=Q(v4);constructor(){let e=Q(Ze),r=Q(Wl),n=Q(dt);super(e,r,n)}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}_shouldBeHidden(){if(this._platform.isBrowser)return!1;let{start:e,end:r}=this._container;return e!=null&&e.mode!=="over"&&e.opened||r!=null&&r.mode!=="over"&&r.opened}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:6,hostBindings:function(r,n){r&2&&(gn("margin-left",n._container._contentMargins.left,"px")("margin-right",n._container._contentMargins.right,"px"),ut("mat-drawer-content-hidden",n._shouldBeHidden()))},features:[Tt([{provide:Uc,useExisting:t}]),Ft],ngContentSelectors:RJ,decls:1,vars:0,template:function(r,n){r&1&&(ti(),wt(0))},encapsulation:2,changeDetection:0})}return t})(),g4=(()=>{class t{_elementRef=Q(Ze);_focusTrapFactory=Q(C_);_focusMonitor=Q(br);_platform=Q(hi);_ngZone=Q(dt);_renderer=Q(Ai);_interactivityChecker=Q(H0);_doc=Q(St,{optional:!0});_container=Q(PJ,{optional:!0});_focusTrap=null;_elementFocusedBeforeDrawerWasOpened=null;_eventCleanups;_isAttached;_anchor;get position(){return this._position}set position(e){e=e==="end"?"end":"start",e!==this._position&&(this._isAttached&&this._updatePositionInParent(e),this._position=e,this.onPositionChanged.emit())}_position="start";get mode(){return this._mode}set mode(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}_mode="over";get disableClose(){return this._disableClose}set disableClose(e){this._disableClose=sa(e)}_disableClose=!1;get autoFocus(){let e=this._autoFocus;return e??(this.mode==="side"?"dialog":"first-tabbable")}set autoFocus(e){(e==="true"||e==="false"||e==null)&&(e=sa(e)),this._autoFocus=e}_autoFocus;get opened(){return this._opened}set opened(e){this.toggle(sa(e))}_opened=!1;_openedVia;_animationStarted=new Oe;_animationEnd=new Oe;openedChange=new Le(!0);_openedStream=this.openedChange.pipe(Xt(e=>e),mt(()=>{}));openedStart=this._animationStarted.pipe(Xt(()=>this.opened),Lf(void 0));_closedStream=this.openedChange.pipe(Xt(e=>!e),mt(()=>{}));closedStart=this._animationStarted.pipe(Xt(()=>!this.opened),Lf(void 0));_destroyed=new Oe;onPositionChanged=new Le;_content;_modeChanged=new Oe;_injector=Q(Wt);_changeDetectorRef=Q(Ut);constructor(){this.openedChange.pipe(Vt(this._destroyed)).subscribe(e=>{e?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{let e=this._elementRef.nativeElement;Lg(e,"keydown").pipe(Xt(r=>r.keyCode===27&&!this.disableClose&&!En(r)),Vt(this._destroyed)).subscribe(r=>this._ngZone.run(()=>{this.close(),r.stopPropagation(),r.preventDefault()})),this._eventCleanups=[this._renderer.listen(e,"transitionrun",this._handleTransitionEvent),this._renderer.listen(e,"transitionend",this._handleTransitionEvent),this._renderer.listen(e,"transitioncancel",this._handleTransitionEvent)]}),this._animationEnd.subscribe(()=>{this.openedChange.emit(this._opened)})}_forceFocus(e,r){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{a(),s(),e.removeAttribute("tabindex")},a=this._renderer.listen(e,"blur",n),s=this._renderer.listen(e,"mousedown",n)})),e.focus(r)}_focusByCssSelector(e,r){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,r)}_takeFocus(){if(!this._focusTrap)return;let e=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":pn(()=>{!this._focusTrap.focusInitialElement()&&typeof e.focus=="function"&&e.focus()},{injector:this._injector});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus);break}}_restoreFocus(e){this.autoFocus!=="dialog"&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,e):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){let e=this._doc.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterViewInit(){this._isAttached=!0,this._position==="end"&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngOnDestroy(){this._eventCleanups.forEach(e=>e()),this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(e){return this.toggle(!0,e)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(e=!this.opened,r){e&&r&&(this._openedVia=r);let n=this._setOpen(e,!e&&this._isFocusWithinDrawer(),this._openedVia||"program");return e||(this._openedVia=null),n}_setOpen(e,r,n){return e===this._opened?Promise.resolve(e?"open":"close"):(this._opened=e,this._container?._transitionsEnabled?this._setIsAnimating(!0):setTimeout(()=>{this._animationStarted.next(),this._animationEnd.next()}),this._elementRef.nativeElement.classList.toggle("mat-drawer-opened",e),!e&&r&&this._restoreFocus(n),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(a=>{this.openedChange.pipe(Vi(1)).subscribe(s=>a(s?"open":"close"))}))}_setIsAnimating(e){this._elementRef.nativeElement.classList.toggle("mat-drawer-animating",e)}_getWidth(){return this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=!!this._container?.hasBackdrop&&this.opened)}_updatePositionInParent(e){if(!this._platform.isBrowser)return;let r=this._elementRef.nativeElement,n=r.parentNode;e==="end"?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),n.insertBefore(this._anchor,r)),n.appendChild(r)):this._anchor&&this._anchor.parentNode.insertBefore(r,this._anchor)}_handleTransitionEvent=e=>{let r=this._elementRef.nativeElement;e.target===r&&this._ngZone.run(()=>{e.type==="transitionrun"?this._animationStarted.next(e):(e.type==="transitionend"&&this._setIsAnimating(!1),this._animationEnd.next(e))})};static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-drawer"]],viewQuery:function(r,n){if(r&1&&vt(C9e,5),r&2){let a;je(a=We())&&(n._content=a.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:11,hostBindings:function(r,n){r&2&&(pt("align",null),gn("visibility",!n._container&&!n.opened?"hidden":null),ut("mat-drawer-end",n.position==="end")("mat-drawer-over",n.mode==="over")("mat-drawer-push",n.mode==="push")("mat-drawer-side",n.mode==="side"))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:RJ,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(r,n){r&1&&(ti(),B(0,"div",1,0),wt(2),U())},dependencies:[Uc],encapsulation:2,changeDetection:0})}return t})(),v4=(()=>{class t{_dir=Q(vn,{optional:!0});_element=Q(Ze);_ngZone=Q(dt);_changeDetectorRef=Q(Ut);_animationMode=Q(Mi,{optional:!0});_transitionsEnabled=!1;_allDrawers;_drawers=new eo;_content;_userContent;get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(e){this._autosize=sa(e)}_autosize=Q(M9e);get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(e){this._backdropOverride=e==null?null:sa(e)}_backdropOverride;backdropClick=new Le;_start;_end;_left;_right;_destroyed=new Oe;_doCheckSubject=new Oe;_contentMargins={left:null,right:null};_contentMarginChanges=new Oe;get scrollable(){return this._userContent||this._content}_injector=Q(Wt);constructor(){let e=Q(hi),r=Q(Os);this._dir?.change.pipe(Vt(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),r.change().pipe(Vt(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._animationMode!=="NoopAnimations"&&e.isBrowser&&this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._element.nativeElement.classList.add("mat-drawer-transition"),this._transitionsEnabled=!0},200)})}ngAfterContentInit(){this._allDrawers.changes.pipe(Wi(this._allDrawers),Vt(this._destroyed)).subscribe(e=>{this._drawers.reset(e.filter(r=>!r._container||r._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Wi(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(e=>{this._watchDrawerToggle(e),this._watchDrawerPosition(e),this._watchDrawerMode(e)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Tr(10),Vt(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(e=>e.open())}close(){this._drawers.forEach(e=>e.close())}updateContentMargins(){let e=0,r=0;if(this._left&&this._left.opened){if(this._left.mode=="side")e+=this._left._getWidth();else if(this._left.mode=="push"){let n=this._left._getWidth();e+=n,r-=n}}if(this._right&&this._right.opened){if(this._right.mode=="side")r+=this._right._getWidth();else if(this._right.mode=="push"){let n=this._right._getWidth();r+=n,e-=n}}e=e||null,r=r||null,(e!==this._contentMargins.left||r!==this._contentMargins.right)&&(this._contentMargins={left:e,right:r},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(e){e._animationStarted.pipe(Vt(this._drawers.changes)).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),e.mode!=="side"&&e.openedChange.pipe(Vt(this._drawers.changes)).subscribe(()=>this._setContainerClass(e.opened))}_watchDrawerPosition(e){e.onPositionChanged.pipe(Vt(this._drawers.changes)).subscribe(()=>{pn({read:()=>this._validateDrawers()},{injector:this._injector})})}_watchDrawerMode(e){e._modeChanged.pipe(Vt(Fi(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(e){let r=this._element.nativeElement.classList,n="mat-drawer-container-has-open";e?r.add(n):r.remove(n)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(e=>{e.position=="end"?(this._end!=null,this._end=e):(this._start!=null,this._start=e)}),this._right=this._left=null,this._dir&&this._dir.value==="rtl"?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&this._start.mode!="over"||this._isDrawerOpen(this._end)&&this._end.mode!="over"}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(e=>e&&!e.disableClose&&this._drawerHasBackdrop(e)).forEach(e=>e._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(e){return e!=null&&e.opened}_drawerHasBackdrop(e){return this._backdropOverride==null?!!e&&e.mode!=="side":this._backdropOverride}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["mat-drawer-container"]],contentQueries:function(r,n,a){if(r&1&&(ui(a,p4,5),ui(a,g4,5)),r&2){let s;je(s=We())&&(n._content=s.first),je(s=We())&&(n._allDrawers=s)}},viewQuery:function(r,n){if(r&1&&vt(p4,5),r&2){let a;je(a=We())&&(n._userContent=a.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(r,n){r&2&&ut("mat-drawer-container-explicit-backdrop",n._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[Tt([{provide:PJ,useExisting:t}])],ngContentSelectors:S9e,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(r,n){r&1&&(ti(T9e),de(0,E9e,1,2,"div",0),wt(1),wt(2,1),de(3,D9e,2,0,"mat-drawer-content")),r&2&&(Qt(n.hasBackdrop?0:-1),j(3),Qt(n._content?-1:3))},dependencies:[p4],styles:[".mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-sys-background));box-sizing:border-box;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent))}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}@media(forced-colors: active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-content.mat-drawer-content-hidden{opacity:0}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow, none);background-color:var(--mat-sidenav-container-background-color, var(--mat-sys-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));width:var(--mat-sidenav-container-width, 360px);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}@media(forced-colors: active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media(forced-colors: active){[dir=rtl] .mat-drawer,.mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-transition .mat-drawer{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating){visibility:hidden;box-shadow:none}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container{display:none}.mat-drawer.mat-drawer-opened.mat-drawer-opened{transform:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto}.mat-sidenav-fixed{position:fixed}"],encapsulation:2,changeDetection:0})}return t})();var kJ=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,aa,aa,Ct]})}return t})();function R9e(t,i){if(t&1){let e=Ce();B(0,"button",19),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.navigate(n))}),Y(1),U()}if(t&2){let e=i.$implicit;j(),ze(e.name)}}function P9e(t,i){if(t&1){let e=Ce();B(0,"button",19),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.setFhirServer(n))}),Y(1),U()}if(t&2){let e=i.$implicit;j(),ze(e.name)}}function k9e(t,i){if(t&1){let e=Ce();B(0,"button",19),ce("click",function(){let n=ue(e).$implicit,a=ne(2);return he(a.setEdition(n))}),Y(1),U()}if(t&2){let e=i.$implicit;j(),ze(e.resource.version)}}function F9e(t,i){if(t&1&&(Gt(0),B(1,"button",20),Y(2),U(),B(3,"mat-menu",null,5)(5,"span",16),Y(6,"Versions / Releases"),U(),de(7,k9e,2,1,"button",15),U(),Ht()),t&2){let e=i.$implicit,r=Pt(4);j(),ee("matMenuTriggerFor",r),j(),ze(e.editionName),j(5),ee("ngForOf",e.editions)}}function O9e(t,i){if(t&1){let e=Ce();B(0,"button",19),ce("click",function(){let n=ue(e).$implicit,a=ne();return he(a.setLanguage(n))}),Y(1),U()}if(t&2){let e=i.$implicit;j(),ze(e)}}function L9e(t,i){if(t&1){let e=Ce();B(0,"button",19),ce("click",function(){let n=ue(e).$implicit,a=ne(2);return he(a.navigate(n))}),Y(1),U()}if(t&2){let e=i.$implicit;j(),ze(e.name)}}function N9e(t,i){if(t&1){let e=Ce();B(0,"button",19),ce("click",function(){let n=ue(e).$implicit,a=ne(2);return he(a.setFhirServer(n))}),Y(1),U()}if(t&2){let e=i.$implicit;j(),ze(e.name)}}function B9e(t,i){if(t&1){let e=Ce();B(0,"button",19),ce("click",function(){let n=ue(e).$implicit,a=ne(3);return he(a.setEdition(n))}),Y(1),U()}if(t&2){let e=i.$implicit;j(),ze(e.resource.version)}}function V9e(t,i){if(t&1&&(Gt(0),B(1,"button",20),Y(2),U(),B(3,"mat-menu",null,5)(5,"span",16),Y(6,"Versions / Releases"),U(),de(7,B9e,2,1,"button",15),U(),Ht()),t&2){let e=i.$implicit,r=Pt(4);j(),ee("matMenuTriggerFor",r),j(),ze(e.editionName),j(5),ee("ngForOf",e.editions)}}function U9e(t,i){if(t&1){let e=Ce();B(0,"button",19),ce("click",function(){let n=ue(e).$implicit,a=ne(2);return he(a.setLanguage(n))}),Y(1),U()}if(t&2){let e=i.$implicit;j(),ze(e)}}function z9e(t,i){if(t&1){let e=Ce();B(0,"mat-toolbar")(1,"button",21),ce("click",function(){ue(e),ne();let n=Pt(2);return he(n.toggle())}),B(2,"mat-icon"),Y(3,"menu"),U()(),B(4,"a",22),ce("click",function(){ue(e);let n=ne();return he(n.navigate({url:"home",type:"internal"}))}),we(5,"img",23),U(),B(6,"span",24),Y(7,"SNOMED CT Implementation Demos"),U(),B(8,"span",25),Y(9,"Implementation Demos"),U(),we(10,"span",26),B(11,"button",27),Y(12,"Select Demonstrator"),U(),B(13,"mat-menu",14,6),de(15,L9e,2,1,"button",15),U(),B(16,"button",28),Y(17),U(),B(18,"mat-menu",null,7),de(20,N9e,2,1,"button",15),U(),B(21,"button",28),Y(22),U(),B(23,"mat-menu",14,8)(25,"span",16),Y(26,"Editions"),U(),de(27,V9e,8,3,"ng-container",17),U(),B(28,"button",28),Y(29),U(),B(30,"mat-menu",null,9),de(32,U9e,2,1,"button",15),U(),B(33,"a",29)(34,"mat-icon"),Y(35,"info"),U()()()}if(t&2){let e=Pt(14),r=Pt(19),n=Pt(24),a=Pt(31),s=ne();j(11),ee("matMenuTriggerFor",e),j(4),ee("ngForOf",s.demos),j(),ee("matMenuTriggerFor",r),j(),Qe("FHIR Server: ",s.selectedServer.name,""),j(3),ee("ngForOf",s.fhirServers),j(),ee("matMenuTriggerFor",n),j(),ze(s.selectedEdition),j(5),ee("ngForOf",s.editionsDetails),j(),ee("matMenuTriggerFor",a),j(),ze(s.selectedLanguage),j(3),ee("ngForOf",s.languages)}}var FJ=(()=>{class t{constructor(e,r,n,a,s,o){this.codingSpecService=e,this.excelService=r,this.terminologyService=n,this.router=a,this.menuService=s,this.activatedRoute=o,this.title="sct-implementation-demonstrator",this.bindingsForExport=[],this.editions=[],this.editionsDetails=[],this.languages=["da","de","en","es","et","fi","fr","nl","no","sv"],this.selectedEdition="Edition",this.selectedLanguage="en",this.fhirServers=[{name:"SNOMED Dev IS",url:"https://dev-is-browser.ihtsdotools.org/fhir"},{name:"SNOMED Public",url:"https://snowstorm.ihtsdotools.org/fhir"},{name:"SNOMED Dev 2",url:"https://snowstorm-temp.kaicode.io/fhir"},{name:"SNOMED Lite Demo",url:"https://snowstorm-lite.nw.r.appspot.com/fhir"}],this.selectedServer=this.fhirServers[1],this.embeddedMode=!1,this.demos=[],this.router.events.subscribe(d=>{d instanceof Io&>ag("config","G-7SK998GPMX",{page_path:d.urlAfterRedirects})})}ngOnInit(){this.demos=this.menuService.getDemos(),this.setFhirServer(this.selectedServer),this.bindingsForExport=[];let e=this.codingSpecService.getCodingSpec();for(let r of e)for(let n of r.bindings)this.bindingsForExport.push({section:r.title,title:n.title,ecl:n.ecl.replace(/\s\s+/g," ")});this.activatedRoute.queryParams.subscribe(r=>{r.embedded==="true"?this.embeddedMode=!0:this.embeddedMode=!1,r.edition?this.updateCodeSystemOptions(r.edition):this.updateCodeSystemOptions()}),this.terminologyService.lang$.subscribe(r=>{this.selectedLanguage=r}),this.terminologyService.fhirUrlParam$.subscribe(r=>{this.editions?.length>0&&this.editions.forEach(n=>{n.resource.version===r&&(this.selectedEdition=n.resource.title?.replace("SNOMED CT release ",""))})})}navigate(e){e.type==="internal"?this.router.navigate([e.url],{queryParams:e.queryParams}):this.openInNewTab(e.url)}openInNewTab(e){window.open(e,"_blank")}updateCodeSystemOptions(e){this.terminologyService.getCodeSystems().subscribe(r=>{this.editionsDetails=[],this.editions=r.entry;let n=new Set;this.editions.forEach(s=>{n.add(s.resource.title)}),n.forEach(s=>{this.editionsDetails.push({editionName:s,editions:this.editions.filter(o=>o.resource.title.includes(s)).sort(this.compare)})});let a=this.editionsDetails.findIndex(s=>s.editionName==="International Edition");e?this.editions.forEach(s=>{s.resource.version===e&&this.setEdition(s)}):a>=0?this.setEdition(this.editionsDetails[a].editions[0]):this.setEdition(this.editions[0])})}compare(e,r){return e.resource.dater.resource.date?-1:0}setFhirServer(e){this.selectedServer=e,this.terminologyService.setSnowstormFhirBase(e.url),this.selectedEdition="Edition",this.editions=[],this.editionsDetails=[],this.updateCodeSystemOptions()}setEdition(e){this.selectedEdition=e.resource.title?.replace("SNOMED CT release ",""),this.terminologyService.setFhirUrlParam(e.resource.version)}setLanguage(e){this.selectedLanguage=e,this.terminologyService.setLang(e)}static{this.\u0275fac=function(r){return new(r||t)(be(uK),be(MJ),be(Ri),be(ys),be(VT),be(jr))}}static{this.\u0275cmp=Te({type:t,selectors:[["app-root"]],standalone:!1,decls:28,vars:12,consts:[["drawer",""],["demosMenuN","matMenu"],["serverMenuN","matMenu"],["editionsMenuN","matMenu"],["menuN","matMenu"],["sub_menu","matMenu"],["demosMenu","matMenu"],["serverMenu","matMenu"],["editionsMenu","matMenu"],["menu","matMenu"],["autosize","",1,"example-container"],["mode","over",1,"example-sidenav"],[1,"flex","flex-col","justify-center"],["mat-button","",3,"matMenuTriggerFor"],[1,"wide-menu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"ml-4"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-icon-button","","id","menu-button",3,"click"],["href","javascript:void(0)",3,"click"],["src","assets/img/small_logo.png","id","logo"],["id","title"],["id","short-title"],[1,"example-spacer"],["mat-flat-button","","color","accent",1,"bar-button",3,"matMenuTriggerFor"],["mat-flat-button","","color","primary",1,"bar-button",3,"matMenuTriggerFor"],["mat-flat-button","","href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank","color","primary","id","info-button"]],template:function(r,n){if(r&1&&(B(0,"mat-drawer-container",10)(1,"mat-drawer",11,0)(3,"div",12)(4,"button",13),Y(5,"Select Demonstrator"),U(),B(6,"mat-menu",14,1),de(8,R9e,2,1,"button",15),U(),B(9,"button",13),Y(10),U(),B(11,"mat-menu",null,2),de(13,P9e,2,1,"button",15),U(),B(14,"button",13),Y(15),U(),B(16,"mat-menu",14,3)(18,"span",16),Y(19,"Editions"),U(),de(20,F9e,8,3,"ng-container",17),U(),B(21,"button",13),Y(22),U(),B(23,"mat-menu",null,4),de(25,O9e,2,1,"button",15),U()()(),de(26,z9e,36,11,"mat-toolbar",18),we(27,"router-outlet"),U()),r&2){let a=Pt(7),s=Pt(12),o=Pt(17),d=Pt(24);j(4),ee("matMenuTriggerFor",a),j(4),ee("ngForOf",n.demos),j(),ee("matMenuTriggerFor",s),j(),Qe("FHIR Server: ",n.selectedServer.name,""),j(3),ee("ngForOf",n.fhirServers),j(),ee("matMenuTriggerFor",o),j(),Qe("Edition: ",n.selectedEdition,""),j(5),ee("ngForOf",n.editionsDetails),j(),ee("matMenuTriggerFor",d),j(),Qe("Language: ",n.selectedLanguage,""),j(3),ee("ngForOf",n.languages),j(),ee("ngIf",!n.embeddedMode)}},dependencies:[ci,oi,sA,AJ,E6,di,ln,Pi,ur,_r,rs,g4,v4],styles:[".mat-toolbar[_ngcontent-%COMP%]{background-color:#434a55;color:#fff;font-size:1.8rem;font-weight:700}button[_ngcontent-%COMP%]{font-weight:700;font-size:medium}.bar-button[_ngcontent-%COMP%]{margin-left:15px}#title[_ngcontent-%COMP%]{margin-left:15px;font-size:1.4rem}.example-spacer[_ngcontent-%COMP%]{flex:1 1 auto}a[_ngcontent-%COMP%]{margin-left:15px} .mat-mdc-menu-panel{max-width:fit-content!important;overflow-x:hidden!important}.mat-mdc-unelevated-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-raised-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-outlined-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{margin:0!important}#demo-selector[_ngcontent-%COMP%]{margin:5px 15px;padding:10px}#menu-button[_ngcontent-%COMP%], #short-title[_ngcontent-%COMP%]{display:none}#logo[_ngcontent-%COMP%]{height:4rem}@media (max-width: 768px){#title[_ngcontent-%COMP%]{display:none}#short-title[_ngcontent-%COMP%]{display:block;margin-left:15px;font-size:.9rem}#logo[_ngcontent-%COMP%]{height:3.5rem}#info-button[_ngcontent-%COMP%]{display:none}}@media (max-width: 1200px){.bar-button[_ngcontent-%COMP%]{display:none}#menu-button[_ngcontent-%COMP%]{display:block}}"]})}}return t})();function OJ(t){return new et(3e3,!1)}function G9e(){return new et(3100,!1)}function H9e(){return new et(3101,!1)}function j9e(t){return new et(3001,!1)}function W9e(t){return new et(3003,!1)}function X9e(t){return new et(3004,!1)}function Y9e(t,i){return new et(3005,!1)}function $9e(){return new et(3006,!1)}function Q9e(){return new et(3007,!1)}function K9e(t,i){return new et(3008,!1)}function Z9e(t){return new et(3002,!1)}function J9e(t,i,e,r,n){return new et(3010,!1)}function q9e(){return new et(3011,!1)}function e6e(){return new et(3012,!1)}function t6e(){return new et(3200,!1)}function i6e(){return new et(3202,!1)}function n6e(){return new et(3013,!1)}function r6e(t){return new et(3014,!1)}function s6e(t){return new et(3015,!1)}function a6e(t){return new et(3016,!1)}function o6e(t,i){return new et(3404,!1)}function l6e(t){return new et(3502,!1)}function c6e(t){return new et(3503,!1)}function d6e(){return new et(3300,!1)}function u6e(t){return new et(3504,!1)}function h6e(t){return new et(3301,!1)}function f6e(t,i){return new et(3302,!1)}function m6e(t){return new et(3303,!1)}function p6e(t,i){return new et(3400,!1)}function g6e(t){return new et(3401,!1)}function v6e(t){return new et(3402,!1)}function y6e(t,i){return new et(3505,!1)}function Mu(t){switch(t.length){case 0:return new Ud;case 1:return t[0];default:return new Q0(t)}}function QJ(t,i,e=new Map,r=new Map){let n=[],a=[],s=-1,o=null;if(i.forEach(d=>{let l=d.get("offset"),c=l==s,h=c&&o||new Map;d.forEach((u,f)=>{let p=f,m=u;if(f!=="offset")switch(p=t.normalizePropertyName(p,n),m){case P_:m=e.get(f);break;case jl:m=r.get(f);break;default:m=t.normalizeStyleValue(f,p,m,n);break}h.set(p,m)}),c||a.push(h),o=h,s=l}),n.length)throw l6e(n);return a}function V4(t,i,e,r){switch(i){case"start":t.onStart(()=>r(e&&y4(e,"start",t)));break;case"done":t.onDone(()=>r(e&&y4(e,"done",t)));break;case"destroy":t.onDestroy(()=>r(e&&y4(e,"destroy",t)));break}}function y4(t,i,e){let r=e.totalTime,n=!!e.disabled,a=U4(t.element,t.triggerName,t.fromState,t.toState,i||t.phaseName,r??t.totalTime,n),s=t._data;return s!=null&&(a._data=s),a}function U4(t,i,e,r,n="",a=0,s){return{element:t,triggerName:i,fromState:e,toState:r,phaseName:n,totalTime:a,disabled:!!s}}function bo(t,i,e){let r=t.get(i);return r||t.set(i,r=e),r}function LJ(t){let i=t.indexOf(":"),e=t.substring(1,i),r=t.slice(i+1);return[e,r]}var x6e=typeof document>"u"?null:document.documentElement;function z4(t){let i=t.parentNode||t.host||null;return i===x6e?null:i}function b6e(t){return t.substring(1,6)=="ebkit"}var uf=null,NJ=!1;function _6e(t){uf||(uf=w6e()||{},NJ=uf.style?"WebkitAppearance"in uf.style:!1);let i=!0;return uf.style&&!b6e(t)&&(i=t in uf.style,!i&&NJ&&(i="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in uf.style)),i}function w6e(){return typeof document<"u"?document.body:null}function KJ(t,i){for(;i;){if(i===t)return!0;i=z4(i)}return!1}function ZJ(t,i,e){if(e)return Array.from(t.querySelectorAll(i));let r=t.querySelector(i);return r?[r]:[]}var G4=(()=>{class t{validateStyleProperty(e){return _6e(e)}containsElement(e,r){return KJ(e,r)}getParentElement(e){return z4(e)}query(e,r,n){return ZJ(e,r,n)}computeStyle(e,r,n){return n||""}animate(e,r,n,a,s,o=[],d){return new Ud(n,a)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})(),mf=class{static NOOP=new G4},pf=class{};var C6e=1e3,JJ="{{",T6e="}}",qJ="ng-enter",T4="ng-leave",IS="ng-trigger",OS=".ng-trigger",BJ="ng-animating",S4=".ng-animating";function pd(t){if(typeof t=="number")return t;let i=t.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:E4(parseFloat(i[1]),i[2])}function E4(t,i){switch(i){case"s":return t*C6e;default:return t}}function LS(t,i,e){return t.hasOwnProperty("duration")?t:S6e(t,i,e)}function S6e(t,i,e){let r=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,n,a=0,s="";if(typeof t=="string"){let o=t.match(r);if(o===null)return i.push(OJ(t)),{duration:0,delay:0,easing:""};n=E4(parseFloat(o[1]),o[2]);let d=o[3];d!=null&&(a=E4(parseFloat(d),o[4]));let l=o[5];l&&(s=l)}else n=t;if(!e){let o=!1,d=i.length;n<0&&(i.push(G9e()),o=!0),a<0&&(i.push(H9e()),o=!0),o&&i.splice(d,0,OJ(t))}return{duration:n,delay:a,easing:s}}function E6e(t){return t.length?t[0]instanceof Map?t:t.map(i=>new Map(Object.entries(i))):[]}function pc(t,i,e){i.forEach((r,n)=>{let a=H4(n);e&&!e.has(n)&&e.set(n,t.style[a]),t.style[a]=r})}function ff(t,i){i.forEach((e,r)=>{let n=H4(r);t.style[n]=""})}function $y(t){return Array.isArray(t)?t.length==1?t[0]:M6(t):t}function D6e(t,i,e){let r=i.params||{},n=eq(t);n.length&&n.forEach(a=>{r.hasOwnProperty(a)||e.push(j9e(a))})}var D4=new RegExp(`${JJ}\\s*(.+?)\\s*${T6e}`,"g");function eq(t){let i=[];if(typeof t=="string"){let e;for(;e=D4.exec(t);)i.push(e[1]);D4.lastIndex=0}return i}function Ky(t,i,e){let r=`${t}`,n=r.replace(D4,(a,s)=>{let o=i[s];return o==null&&(e.push(W9e(s)),o=""),o.toString()});return n==r?t:n}var M6e=/-+([a-z0-9])/g;function H4(t){return t.replace(M6e,(...i)=>i[1].toUpperCase())}function A6e(t,i){return t===0||i===0}function I6e(t,i,e){if(e.size&&i.length){let r=i[0],n=[];if(e.forEach((a,s)=>{r.has(s)||n.push(s),r.set(s,a)}),n.length)for(let a=1;as.set(o,j4(t,o)))}}return i}function xo(t,i,e){switch(i.type){case li.Trigger:return t.visitTrigger(i,e);case li.State:return t.visitState(i,e);case li.Transition:return t.visitTransition(i,e);case li.Sequence:return t.visitSequence(i,e);case li.Group:return t.visitGroup(i,e);case li.Animate:return t.visitAnimate(i,e);case li.Keyframes:return t.visitKeyframes(i,e);case li.Style:return t.visitStyle(i,e);case li.Reference:return t.visitReference(i,e);case li.AnimateChild:return t.visitAnimateChild(i,e);case li.AnimateRef:return t.visitAnimateRef(i,e);case li.Query:return t.visitQuery(i,e);case li.Stagger:return t.visitStagger(i,e);default:throw X9e(i.type)}}function j4(t,i){return window.getComputedStyle(t)[i]}var R6e=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),NS=class extends pf{normalizePropertyName(i,e){return H4(i)}normalizeStyleValue(i,e,r,n){let a="",s=r.toString().trim();if(R6e.has(e)&&r!==0&&r!=="0")if(typeof r=="number")a="px";else{let o=r.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&n.push(Y9e(i,r))}return s+a}};var BS="*";function P6e(t,i){let e=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(r=>k6e(r,e,i)):e.push(t),e}function k6e(t,i,e){if(t[0]==":"){let d=F6e(t,e);if(typeof d=="function"){i.push(d);return}t=d}let r=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(r==null||r.length<4)return e.push(s6e(t)),i;let n=r[1],a=r[2],s=r[3];i.push(VJ(n,s));let o=n==BS&&s==BS;a[0]=="<"&&!o&&i.push(VJ(s,n))}function F6e(t,i){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,r)=>parseFloat(r)>parseFloat(e);case":decrement":return(e,r)=>parseFloat(r) *"}}var RS=new Set(["true","1"]),PS=new Set(["false","0"]);function VJ(t,i){let e=RS.has(t)||PS.has(t),r=RS.has(i)||PS.has(i);return(n,a)=>{let s=t==BS||t==n,o=i==BS||i==a;return!s&&e&&typeof n=="boolean"&&(s=n?RS.has(t):PS.has(t)),!o&&r&&typeof a=="boolean"&&(o=a?RS.has(i):PS.has(i)),s&&o}}var tq=":self",O6e=new RegExp(`s*${tq}s*,?`,"g");function iq(t,i,e,r){return new M4(t).build(i,e,r)}var UJ="",M4=class{_driver;constructor(i){this._driver=i}build(i,e,r){let n=new A4(e);return this._resetContextStyleTimingState(n),xo(this,$y(i),n)}_resetContextStyleTimingState(i){i.currentQuerySelector=UJ,i.collectedStyles=new Map,i.collectedStyles.set(UJ,new Map),i.currentTime=0}visitTrigger(i,e){let r=e.queryCount=0,n=e.depCount=0,a=[],s=[];return i.name.charAt(0)=="@"&&e.errors.push($9e()),i.definitions.forEach(o=>{if(this._resetContextStyleTimingState(e),o.type==li.State){let d=o,l=d.name;l.toString().split(/\s*,\s*/).forEach(c=>{d.name=c,a.push(this.visitState(d,e))}),d.name=l}else if(o.type==li.Transition){let d=this.visitTransition(o,e);r+=d.queryCount,n+=d.depCount,s.push(d)}else e.errors.push(Q9e())}),{type:li.Trigger,name:i.name,states:a,transitions:s,queryCount:r,depCount:n,options:null}}visitState(i,e){let r=this.visitStyle(i.styles,e),n=i.options&&i.options.params||null;if(r.containsDynamicStyles){let a=new Set,s=n||{};r.styles.forEach(o=>{o instanceof Map&&o.forEach(d=>{eq(d).forEach(l=>{s.hasOwnProperty(l)||a.add(l)})})}),a.size&&e.errors.push(K9e(i.name,[...a.values()]))}return{type:li.State,name:i.name,style:r,options:n?{params:n}:null}}visitTransition(i,e){e.queryCount=0,e.depCount=0;let r=xo(this,$y(i.animation),e),n=P6e(i.expr,e.errors);return{type:li.Transition,matchers:n,animation:r,queryCount:e.queryCount,depCount:e.depCount,options:hf(i.options)}}visitSequence(i,e){return{type:li.Sequence,steps:i.steps.map(r=>xo(this,r,e)),options:hf(i.options)}}visitGroup(i,e){let r=e.currentTime,n=0,a=i.steps.map(s=>{e.currentTime=r;let o=xo(this,s,e);return n=Math.max(n,e.currentTime),o});return e.currentTime=n,{type:li.Group,steps:a,options:hf(i.options)}}visitAnimate(i,e){let r=V6e(i.timings,e.errors);e.currentAnimateTimings=r;let n,a=i.styles?i.styles:Rt({});if(a.type==li.Keyframes)n=this.visitKeyframes(a,e);else{let s=i.styles,o=!1;if(!s){o=!0;let l={};r.easing&&(l.easing=r.easing),s=Rt(l)}e.currentTime+=r.duration+r.delay;let d=this.visitStyle(s,e);d.isEmptyStep=o,n=d}return e.currentAnimateTimings=null,{type:li.Animate,timings:r,style:n,options:null}}visitStyle(i,e){let r=this._makeStyleAst(i,e);return this._validateStyleAst(r,e),r}_makeStyleAst(i,e){let r=[],n=Array.isArray(i.styles)?i.styles:[i.styles];for(let o of n)typeof o=="string"?o===jl?r.push(o):e.errors.push(Z9e(o)):r.push(new Map(Object.entries(o)));let a=!1,s=null;return r.forEach(o=>{if(o instanceof Map&&(o.has("easing")&&(s=o.get("easing"),o.delete("easing")),!a)){for(let d of o.values())if(d.toString().indexOf(JJ)>=0){a=!0;break}}}),{type:li.Style,styles:r,easing:s,offset:i.offset,containsDynamicStyles:a,options:null}}_validateStyleAst(i,e){let r=e.currentAnimateTimings,n=e.currentTime,a=e.currentTime;r&&a>0&&(a-=r.duration+r.delay),i.styles.forEach(s=>{typeof s!="string"&&s.forEach((o,d)=>{let l=e.collectedStyles.get(e.currentQuerySelector),c=l.get(d),h=!0;c&&(a!=n&&a>=c.startTime&&n<=c.endTime&&(e.errors.push(J9e(d,c.startTime,c.endTime,a,n)),h=!1),a=c.startTime),h&&l.set(d,{startTime:a,endTime:n}),e.options&&D6e(o,e.options,e.errors)})})}visitKeyframes(i,e){let r={type:li.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(q9e()),r;let n=1,a=0,s=[],o=!1,d=!1,l=0,c=i.steps.map(v=>{let y=this._makeStyleAst(v,e),x=y.offset!=null?y.offset:B6e(y.styles),b=0;return x!=null&&(a++,b=y.offset=x),d=d||b<0||b>1,o=o||b0&&a{let x=u>0?y==f?1:u*y:s[y],b=x*g;e.currentTime=p+m.delay+b,m.duration=b,this._validateStyleAst(v,e),v.offset=x,r.styles.push(v)}),r}visitReference(i,e){return{type:li.Reference,animation:xo(this,$y(i.animation),e),options:hf(i.options)}}visitAnimateChild(i,e){return e.depCount++,{type:li.AnimateChild,options:hf(i.options)}}visitAnimateRef(i,e){return{type:li.AnimateRef,animation:this.visitReference(i.animation,e),options:hf(i.options)}}visitQuery(i,e){let r=e.currentQuerySelector,n=i.options||{};e.queryCount++,e.currentQuery=i;let[a,s]=L6e(i.selector);e.currentQuerySelector=r.length?r+" "+a:a,bo(e.collectedStyles,e.currentQuerySelector,new Map);let o=xo(this,$y(i.animation),e);return e.currentQuery=null,e.currentQuerySelector=r,{type:li.Query,selector:a,limit:n.limit||0,optional:!!n.optional,includeSelf:s,animation:o,originalSelector:i.selector,options:hf(i.options)}}visitStagger(i,e){e.currentQuery||e.errors.push(n6e());let r=i.timings==="full"?{duration:0,delay:0,easing:"full"}:LS(i.timings,e.errors,!0);return{type:li.Stagger,animation:xo(this,$y(i.animation),e),timings:r,options:null}}};function L6e(t){let i=!!t.split(/\s*,\s*/).find(e=>e==tq);return i&&(t=t.replace(O6e,"")),t=t.replace(/@\*/g,OS).replace(/@\w+/g,e=>OS+"-"+e.slice(1)).replace(/:animating/g,S4),[t,i]}function N6e(t){return t?Me({},t):null}var A4=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(i){this.errors=i}};function B6e(t){if(typeof t=="string")return null;let i=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){let r=e;i=parseFloat(r.get("offset")),r.delete("offset")}});else if(t instanceof Map&&t.has("offset")){let e=t;i=parseFloat(e.get("offset")),e.delete("offset")}return i}function V6e(t,i){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let a=LS(t,i).duration;return x4(a,0,"")}let e=t;if(e.split(/\s+/).some(a=>a.charAt(0)=="{"&&a.charAt(1)=="{")){let a=x4(0,0,"");return a.dynamic=!0,a.strValue=e,a}let n=LS(e,i);return x4(n.duration,n.delay,n.easing)}function hf(t){return t?(t=Me({},t),t.params&&(t.params=N6e(t.params))):t={},t}function x4(t,i,e){return{duration:t,delay:i,easing:e}}function W4(t,i,e,r,n,a,s=null,o=!1){return{type:1,element:t,keyframes:i,preStyleProps:e,postStyleProps:r,duration:n,delay:a,totalTime:n+a,easing:s,subTimeline:o}}var Zy=class{_map=new Map;get(i){return this._map.get(i)||[]}append(i,e){let r=this._map.get(i);r||this._map.set(i,r=[]),r.push(...e)}has(i){return this._map.has(i)}clear(){this._map.clear()}},U6e=1,z6e=":enter",G6e=new RegExp(z6e,"g"),H6e=":leave",j6e=new RegExp(H6e,"g");function nq(t,i,e,r,n,a=new Map,s=new Map,o,d,l=[]){return new I4().buildKeyframes(t,i,e,r,n,a,s,o,d,l)}var I4=class{buildKeyframes(i,e,r,n,a,s,o,d,l,c=[]){l=l||new Zy;let h=new R4(i,e,l,n,a,c,[]);h.options=d;let u=d.delay?pd(d.delay):0;h.currentTimeline.delayNextStep(u),h.currentTimeline.setStyles([s],null,h.errors,d),xo(this,r,h);let f=h.timelines.filter(p=>p.containsAnimation());if(f.length&&o.size){let p;for(let m=f.length-1;m>=0;m--){let g=f[m];if(g.element===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([o],null,h.errors,d)}return f.length?f.map(p=>p.buildKeyframes()):[W4(e,[],[],[],0,u,"",!1)]}visitTrigger(i,e){}visitState(i,e){}visitTransition(i,e){}visitAnimateChild(i,e){let r=e.subInstructions.get(e.element);if(r){let n=e.createSubContext(i.options),a=e.currentTimeline.currentTime,s=this._visitSubInstructions(r,n,n.options);a!=s&&e.transformIntoNewTimeline(s)}e.previousNode=i}visitAnimateRef(i,e){let r=e.createSubContext(i.options);r.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],e,r),this.visitReference(i.animation,r),e.transformIntoNewTimeline(r.currentTimeline.currentTime),e.previousNode=i}_applyAnimationRefDelays(i,e,r){for(let n of i){let a=n?.delay;if(a){let s=typeof a=="number"?a:pd(Ky(a,n?.params??{},e.errors));r.delayNextStep(s)}}}_visitSubInstructions(i,e,r){let a=e.currentTimeline.currentTime,s=r.duration!=null?pd(r.duration):null,o=r.delay!=null?pd(r.delay):null;return s!==0&&i.forEach(d=>{let l=e.appendInstructionToTimeline(d,s,o);a=Math.max(a,l.duration+l.delay)}),a}visitReference(i,e){e.updateOptions(i.options,!0),xo(this,i.animation,e),e.previousNode=i}visitSequence(i,e){let r=e.subContextCount,n=e,a=i.options;if(a&&(a.params||a.delay)&&(n=e.createSubContext(a),n.transformIntoNewTimeline(),a.delay!=null)){n.previousNode.type==li.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=VS);let s=pd(a.delay);n.delayNextStep(s)}i.steps.length&&(i.steps.forEach(s=>xo(this,s,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>r&&n.transformIntoNewTimeline()),e.previousNode=i}visitGroup(i,e){let r=[],n=e.currentTimeline.currentTime,a=i.options&&i.options.delay?pd(i.options.delay):0;i.steps.forEach(s=>{let o=e.createSubContext(i.options);a&&o.delayNextStep(a),xo(this,s,o),n=Math.max(n,o.currentTimeline.currentTime),r.push(o.currentTimeline)}),r.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(n),e.previousNode=i}_visitTiming(i,e){if(i.dynamic){let r=i.strValue,n=e.params?Ky(r,e.params,e.errors):r;return LS(n,e.errors)}else return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,e){let r=e.currentAnimateTimings=this._visitTiming(i.timings,e),n=e.currentTimeline;r.delay&&(e.incrementTime(r.delay),n.snapshotCurrentStyles());let a=i.style;a.type==li.Keyframes?this.visitKeyframes(a,e):(e.incrementTime(r.duration),this.visitStyle(a,e),n.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=i}visitStyle(i,e){let r=e.currentTimeline,n=e.currentAnimateTimings;!n&&r.hasCurrentStyleProperties()&&r.forwardFrame();let a=n&&n.easing||i.easing;i.isEmptyStep?r.applyEmptyStep(a):r.setStyles(i.styles,a,e.errors,e.options),e.previousNode=i}visitKeyframes(i,e){let r=e.currentAnimateTimings,n=e.currentTimeline.duration,a=r.duration,o=e.createSubContext().currentTimeline;o.easing=r.easing,i.styles.forEach(d=>{let l=d.offset||0;o.forwardTime(l*a),o.setStyles(d.styles,d.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(n+a),e.previousNode=i}visitQuery(i,e){let r=e.currentTimeline.currentTime,n=i.options||{},a=n.delay?pd(n.delay):0;a&&(e.previousNode.type===li.Style||r==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=VS);let s=r,o=e.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!n.optional,e.errors);e.currentQueryTotal=o.length;let d=null;o.forEach((l,c)=>{e.currentQueryIndex=c;let h=e.createSubContext(i.options,l);a&&h.delayNextStep(a),l===e.element&&(d=h.currentTimeline),xo(this,i.animation,h),h.currentTimeline.applyStylesToKeyframe();let u=h.currentTimeline.currentTime;s=Math.max(s,u)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),d&&(e.currentTimeline.mergeTimelineCollectedStyles(d),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=i}visitStagger(i,e){let r=e.parentContext,n=e.currentTimeline,a=i.timings,s=Math.abs(a.duration),o=s*(e.currentQueryTotal-1),d=s*e.currentQueryIndex;switch(a.duration<0?"reverse":a.easing){case"reverse":d=o-d;break;case"full":d=r.currentStaggerTime;break}let c=e.currentTimeline;d&&c.delayNextStep(d);let h=c.currentTime;xo(this,i.animation,e),e.previousNode=i,r.currentStaggerTime=n.currentTime-h+(n.startTime-r.currentTimeline.startTime)}},VS={},R4=class t{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=VS;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(i,e,r,n,a,s,o,d){this._driver=i,this.element=e,this.subInstructions=r,this._enterClassName=n,this._leaveClassName=a,this.errors=s,this.timelines=o,this.currentTimeline=d||new US(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,e){if(!i)return;let r=i,n=this.options;r.duration!=null&&(n.duration=pd(r.duration)),r.delay!=null&&(n.delay=pd(r.delay));let a=r.params;if(a){let s=n.params;s||(s=this.options.params={}),Object.keys(a).forEach(o=>{(!e||!s.hasOwnProperty(o))&&(s[o]=Ky(a[o],s,this.errors))})}}_copyOptions(){let i={};if(this.options){let e=this.options.params;if(e){let r=i.params={};Object.keys(e).forEach(n=>{r[n]=e[n]})}}return i}createSubContext(i=null,e,r){let n=e||this.element,a=new t(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,r||0));return a.previousNode=this.previousNode,a.currentAnimateTimings=this.currentAnimateTimings,a.options=this._copyOptions(),a.updateOptions(i),a.currentQueryIndex=this.currentQueryIndex,a.currentQueryTotal=this.currentQueryTotal,a.parentContext=this,this.subContextCount++,a}transformIntoNewTimeline(i){return this.previousNode=VS,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,e,r){let n={duration:e??i.duration,delay:this.currentTimeline.currentTime+(r??0)+i.delay,easing:""},a=new P4(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,n,i.stretchStartingKeyframe);return this.timelines.push(a),n}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,e,r,n,a,s){let o=[];if(n&&o.push(this.element),i.length>0){i=i.replace(G6e,"."+this._enterClassName),i=i.replace(j6e,"."+this._leaveClassName);let d=r!=1,l=this._driver.query(this.element,i,d);r!==0&&(l=r<0?l.slice(l.length+r,l.length):l.slice(0,r)),o.push(...l)}return!a&&o.length==0&&s.push(r6e(e)),o}},US=class t{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(i,e,r,n){this._driver=i,this.element=e,this.startTime=r,this._elementTimelineStylesLookup=n,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(i){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+i),e&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,e){return this.applyStylesToKeyframe(),new t(this._driver,i,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=U6e,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,e){this._localTimelineStyles.set(i,e),this._globalTimelineStyles.set(i,e),this._styleSummary.set(i,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[e,r]of this._globalTimelineStyles)this._backFill.set(e,r||jl),this._currentKeyframe.set(e,jl);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,e,r,n){e&&this._previousKeyframe.set("easing",e);let a=n&&n.params||{},s=W6e(i,this._globalTimelineStyles);for(let[o,d]of s){let l=Ky(d,a,r);this._pendingStyles.set(o,l),this._localTimelineStyles.has(o)||this._backFill.set(o,this._globalTimelineStyles.get(o)??jl),this._updateStyle(o,l)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((i,e)=>{this._currentKeyframe.set(e,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,i)}))}snapshotCurrentStyles(){for(let[i,e]of this._localTimelineStyles)this._pendingStyles.set(i,e),this._updateStyle(i,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let i=[];for(let e in this._currentKeyframe)i.push(e);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((e,r)=>{let n=this._styleSummary.get(r);(!n||e.time>n.time)&&this._updateStyle(r,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let i=new Set,e=new Set,r=this._keyframes.size===1&&this.duration===0,n=[];this._keyframes.forEach((o,d)=>{let l=new Map([...this._backFill,...o]);l.forEach((c,h)=>{c===P_?i.add(h):c===jl&&e.add(h)}),r||l.set("offset",d/this.duration),n.push(l)});let a=[...i.values()],s=[...e.values()];if(r){let o=n[0],d=new Map(o);o.set("offset",0),d.set("offset",1),n=[o,d]}return W4(this.element,n,a,s,this.duration,this.startTime,this.easing,!1)}},P4=class extends US{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(i,e,r,n,a,s,o=!1){super(i,e,s.delay),this.keyframes=r,this.preStyleProps=n,this.postStyleProps=a,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:e,duration:r,easing:n}=this.timings;if(this._stretchStartingKeyframe&&e){let a=[],s=r+e,o=e/s,d=new Map(i[0]);d.set("offset",0),a.push(d);let l=new Map(i[0]);l.set("offset",zJ(o)),a.push(l);let c=i.length-1;for(let h=1;h<=c;h++){let u=new Map(i[h]),f=u.get("offset"),p=e+f*r;u.set("offset",zJ(p/s)),a.push(u)}r=s,e=0,n="",i=a}return W4(this.element,i,this.preStyleProps,this.postStyleProps,r,e,n,!0)}};function zJ(t,i=3){let e=Math.pow(10,i-1);return Math.round(t*e)/e}function W6e(t,i){let e=new Map,r;return t.forEach(n=>{if(n==="*"){r??=i.keys();for(let a of r)e.set(a,jl)}else for(let[a,s]of n)e.set(a,s)}),e}function GJ(t,i,e,r,n,a,s,o,d,l,c,h,u){return{type:0,element:t,triggerName:i,isRemovalTransition:n,fromState:e,fromStyles:a,toState:r,toStyles:s,timelines:o,queriedElements:d,preStyleProps:l,postStyleProps:c,totalTime:h,errors:u}}var b4={},zS=class{_triggerName;ast;_stateStyles;constructor(i,e,r){this._triggerName=i,this.ast=e,this._stateStyles=r}match(i,e,r,n){return X6e(this.ast.matchers,i,e,r,n)}buildStyles(i,e,r){let n=this._stateStyles.get("*");return i!==void 0&&(n=this._stateStyles.get(i?.toString())||n),n?n.buildStyles(e,r):new Map}build(i,e,r,n,a,s,o,d,l,c){let h=[],u=this.ast.options&&this.ast.options.params||b4,f=o&&o.params||b4,p=this.buildStyles(r,f,h),m=d&&d.params||b4,g=this.buildStyles(n,m,h),v=new Set,y=new Map,x=new Map,b=n==="void",_={params:rq(m,u),delay:this.ast.options?.delay},C=c?[]:nq(i,e,this.ast.animation,a,s,p,g,_,l,h),w=0;return C.forEach(T=>{w=Math.max(T.duration+T.delay,w)}),h.length?GJ(e,this._triggerName,r,n,b,p,g,[],[],y,x,w,h):(C.forEach(T=>{let S=T.element,E=bo(y,S,new Set);T.preStyleProps.forEach(A=>E.add(A));let D=bo(x,S,new Set);T.postStyleProps.forEach(A=>D.add(A)),S!==e&&v.add(S)}),GJ(e,this._triggerName,r,n,b,p,g,C,[...v.values()],y,x,w))}};function X6e(t,i,e,r,n){return t.some(a=>a(i,e,r,n))}function rq(t,i){let e=Me({},i);return Object.entries(t).forEach(([r,n])=>{n!=null&&(e[r]=n)}),e}var k4=class{styles;defaultParams;normalizer;constructor(i,e,r){this.styles=i,this.defaultParams=e,this.normalizer=r}buildStyles(i,e){let r=new Map,n=rq(i,this.defaultParams);return this.styles.styles.forEach(a=>{typeof a!="string"&&a.forEach((s,o)=>{s&&(s=Ky(s,n,e));let d=this.normalizer.normalizePropertyName(o,e);s=this.normalizer.normalizeStyleValue(o,d,s,e),r.set(o,s)})}),r}};function Y6e(t,i,e){return new F4(t,i,e)}var F4=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(i,e,r){this.name=i,this.ast=e,this._normalizer=r,e.states.forEach(n=>{let a=n.options&&n.options.params||{};this.states.set(n.name,new k4(n.style,a,r))}),HJ(this.states,"true","1"),HJ(this.states,"false","0"),e.transitions.forEach(n=>{this.transitionFactories.push(new zS(i,n,this.states))}),this.fallbackTransition=$6e(i,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,e,r,n){return this.transitionFactories.find(s=>s.match(i,e,r,n))||null}matchStyles(i,e,r){return this.fallbackTransition.buildStyles(i,e,r)}};function $6e(t,i,e){let r=[(s,o)=>!0],n={type:li.Sequence,steps:[],options:null},a={type:li.Transition,animation:n,matchers:r,options:null,queryCount:0,depCount:0};return new zS(t,a,i)}function HJ(t,i,e){t.has(i)?t.has(e)||t.set(e,t.get(i)):t.has(e)&&t.set(i,t.get(e))}var Q6e=new Zy,O4=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(i,e,r){this.bodyNode=i,this._driver=e,this._normalizer=r}register(i,e){let r=[],n=[],a=iq(this._driver,e,r,n);if(r.length)throw c6e(r);this._animations.set(i,a)}_buildPlayer(i,e,r){let n=i.element,a=QJ(this._normalizer,i.keyframes,e,r);return this._driver.animate(n,a,i.duration,i.delay,i.easing,[],!0)}create(i,e,r={}){let n=[],a=this._animations.get(i),s,o=new Map;if(a?(s=nq(this._driver,e,a,qJ,T4,new Map,new Map,r,Q6e,n),s.forEach(c=>{let h=bo(o,c.element,new Map);c.postStyleProps.forEach(u=>h.set(u,null))})):(n.push(d6e()),s=[]),n.length)throw u6e(n);o.forEach((c,h)=>{c.forEach((u,f)=>{c.set(f,this._driver.computeStyle(h,f,jl))})});let d=s.map(c=>{let h=o.get(c.element);return this._buildPlayer(c,new Map,h)}),l=Mu(d);return this._playersById.set(i,l),l.onDestroy(()=>this.destroy(i)),this.players.push(l),l}destroy(i){let e=this._getPlayer(i);e.destroy(),this._playersById.delete(i);let r=this.players.indexOf(e);r>=0&&this.players.splice(r,1)}_getPlayer(i){let e=this._playersById.get(i);if(!e)throw h6e(i);return e}listen(i,e,r,n){let a=U4(e,"","","");return V4(this._getPlayer(i),r,a,n),()=>{}}command(i,e,r,n){if(r=="register"){this.register(i,n[0]);return}if(r=="create"){let s=n[0]||{};this.create(i,e,s);return}let a=this._getPlayer(i);switch(r){case"play":a.play();break;case"pause":a.pause();break;case"reset":a.reset();break;case"restart":a.restart();break;case"finish":a.finish();break;case"init":a.init();break;case"setPosition":a.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(i);break}}},jJ="ng-animate-queued",K6e=".ng-animate-queued",_4="ng-animate-disabled",Z6e=".ng-animate-disabled",J6e="ng-star-inserted",q6e=".ng-star-inserted",eVe=[],sq={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},tVe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},wl="__ng_removed",Jy=class{namespaceId;value;options;get params(){return this.options.params}constructor(i,e=""){this.namespaceId=e;let r=i&&i.hasOwnProperty("value"),n=r?i.value:i;if(this.value=nVe(n),r){let a=i,{value:s}=a,o=iE(a,["value"]);this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){let e=i.params;if(e){let r=this.options.params;Object.keys(e).forEach(n=>{r[n]==null&&(r[n]=e[n])})}}},Qy="void",w4=new Jy(Qy),L4=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(i,e,r){this.id=i,this.hostElement=e,this._engine=r,this._hostClassName="ng-tns-"+i,Xo(e,this._hostClassName)}listen(i,e,r,n){if(!this._triggers.has(e))throw f6e(r,e);if(r==null||r.length==0)throw m6e(e);if(!rVe(r))throw p6e(r,e);let a=bo(this._elementListeners,i,[]),s={name:e,phase:r,callback:n};a.push(s);let o=bo(this._engine.statesByElement,i,new Map);return o.has(e)||(Xo(i,IS),Xo(i,IS+"-"+e),o.set(e,w4)),()=>{this._engine.afterFlush(()=>{let d=a.indexOf(s);d>=0&&a.splice(d,1),this._triggers.has(e)||o.delete(e)})}}register(i,e){return this._triggers.has(i)?!1:(this._triggers.set(i,e),!0)}_getTrigger(i){let e=this._triggers.get(i);if(!e)throw g6e(i);return e}trigger(i,e,r,n=!0){let a=this._getTrigger(e),s=new qy(this.id,e,i),o=this._engine.statesByElement.get(i);o||(Xo(i,IS),Xo(i,IS+"-"+e),this._engine.statesByElement.set(i,o=new Map));let d=o.get(e),l=new Jy(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&d&&l.absorbOptions(d.options),o.set(e,l),d||(d=w4),!(l.value===Qy)&&d.value===l.value){if(!oVe(d.params,l.params)){let m=[],g=a.matchStyles(d.value,d.params,m),v=a.matchStyles(l.value,l.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush(()=>{ff(i,g),pc(i,v)})}return}let u=bo(this._engine.playersByElement,i,[]);u.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=a.matchTransition(d.value,l.value,i,l.params),p=!1;if(!f){if(!n)return;f=a.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:e,transition:f,fromState:d,toState:l,player:s,isFallbackTransition:p}),p||(Xo(i,jJ),s.onStart(()=>{vg(i,jJ)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);let g=this._engine.playersByElement.get(i);if(g){let v=g.indexOf(s);v>=0&&g.splice(v,1)}}),this.players.push(s),u.push(s),s}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(e=>e.delete(i)),this._elementListeners.forEach((e,r)=>{this._elementListeners.set(r,e.filter(n=>n.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);let e=this._engine.playersByElement.get(i);e&&(e.forEach(r=>r.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,e){let r=this._engine.driver.query(i,OS,!0);r.forEach(n=>{if(n[wl])return;let a=this._engine.fetchNamespacesByElement(n);a.size?a.forEach(s=>s.triggerLeaveAnimation(n,e,!1,!0)):this.clearElementCache(n)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(n=>this.clearElementCache(n)))}triggerLeaveAnimation(i,e,r,n){let a=this._engine.statesByElement.get(i),s=new Map;if(a){let o=[];if(a.forEach((d,l)=>{if(s.set(l,d.value),this._triggers.has(l)){let c=this.trigger(i,l,Qy,n);c&&o.push(c)}}),o.length)return this._engine.markElementAsRemoved(this.id,i,!0,e,s),r&&Mu(o).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){let e=this._elementListeners.get(i),r=this._engine.statesByElement.get(i);if(e&&r){let n=new Set;e.forEach(a=>{let s=a.name;if(n.has(s))return;n.add(s);let d=this._triggers.get(s).fallbackTransition,l=r.get(s)||w4,c=new Jy(Qy),h=new qy(this.id,s,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:s,transition:d,fromState:l,toState:c,player:h,isFallbackTransition:!0})})}}removeNode(i,e){let r=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,e),this.triggerLeaveAnimation(i,e,!0))return;let n=!1;if(r.totalAnimations){let a=r.players.length?r.playersByQueriedElement.get(i):[];if(a&&a.length)n=!0;else{let s=i;for(;s=s.parentNode;)if(r.statesByElement.get(s)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(i),n)r.markElementAsRemoved(this.id,i,!1,e);else{let a=i[wl];(!a||a===sq)&&(r.afterFlush(()=>this.clearElementCache(i)),r.destroyInnerAnimations(i),r._onRemovalComplete(i,e))}}insertNode(i,e){Xo(i,this._hostClassName)}drainQueuedTransitions(i){let e=[];return this._queue.forEach(r=>{let n=r.player;if(n.destroyed)return;let a=r.element,s=this._elementListeners.get(a);s&&s.forEach(o=>{if(o.name==r.triggerName){let d=U4(a,r.triggerName,r.fromState.value,r.toState.value);d._data=i,V4(r.player,o.phase,d,o.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):e.push(r)}),this._queue=[],e.sort((r,n)=>{let a=r.transition.ast.depCount,s=n.transition.ast.depCount;return a==0||s==0?a-s:this._engine.driver.containsElement(r.element,n.element)?1:-1})}destroy(i){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}},N4=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(i,e)=>{};_onRemovalComplete(i,e){this.onRemovalComplete(i,e)}constructor(i,e,r){this.bodyNode=i,this.driver=e,this._normalizer=r}get queuedPlayers(){let i=[];return this._namespaceList.forEach(e=>{e.players.forEach(r=>{r.queued&&i.push(r)})}),i}createNamespace(i,e){let r=new L4(i,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(r,e):(this.newHostElements.set(e,r),this.collectEnterElement(e)),this._namespaceLookup[i]=r}_balanceNamespaceList(i,e){let r=this._namespaceList,n=this.namespacesByHostElement;if(r.length-1>=0){let s=!1,o=this.driver.getParentElement(e);for(;o;){let d=n.get(o);if(d){let l=r.indexOf(d);r.splice(l+1,0,i),s=!0;break}o=this.driver.getParentElement(o)}s||r.unshift(i)}else r.push(i);return n.set(e,i),i}register(i,e){let r=this._namespaceLookup[i];return r||(r=this.createNamespace(i,e)),r}registerTrigger(i,e,r){let n=this._namespaceLookup[i];n&&n.register(e,r)&&this.totalAnimations++}destroy(i,e){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let r=this._fetchNamespace(i);this.namespacesByHostElement.delete(r.hostElement);let n=this._namespaceList.indexOf(r);n>=0&&this._namespaceList.splice(n,1),r.destroy(e),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){let e=new Set,r=this.statesByElement.get(i);if(r){for(let n of r.values())if(n.namespaceId){let a=this._fetchNamespace(n.namespaceId);a&&e.add(a)}}return e}trigger(i,e,r,n){if(kS(e)){let a=this._fetchNamespace(i);if(a)return a.trigger(e,r,n),!0}return!1}insertNode(i,e,r,n){if(!kS(e))return;let a=e[wl];if(a&&a.setForRemoval){a.setForRemoval=!1,a.setForMove=!0;let s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(i){let s=this._fetchNamespace(i);s&&s.insertNode(e,r)}n&&this.collectEnterElement(e)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,e){e?this.disabledNodes.has(i)||(this.disabledNodes.add(i),Xo(i,_4)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),vg(i,_4))}removeNode(i,e,r){if(kS(e)){let n=i?this._fetchNamespace(i):null;n?n.removeNode(e,r):this.markElementAsRemoved(i,e,!1,r);let a=this.namespacesByHostElement.get(e);a&&a.id!==i&&a.removeNode(e,r)}else this._onRemovalComplete(e,r)}markElementAsRemoved(i,e,r,n,a){this.collectedLeaveElements.push(e),e[wl]={namespaceId:i,setForRemoval:n,hasAnimation:r,removedBeforeQueried:!1,previousTriggersValues:a}}listen(i,e,r,n,a){return kS(e)?this._fetchNamespace(i).listen(e,r,n,a):()=>{}}_buildInstruction(i,e,r,n,a){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,r,n,i.fromState.options,i.toState.options,e,a)}destroyInnerAnimations(i){let e=this.driver.query(i,OS,!0);e.forEach(r=>this.destroyActiveAnimationsForElement(r)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(i,S4,!0),e.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(i){let e=this.playersByElement.get(i);e&&e.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(i){let e=this.playersByQueriedElement.get(i);e&&e.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return Mu(this.players).onDone(()=>i());i()})}processLeaveNode(i){let e=i[wl];if(e&&e.setForRemoval){if(i[wl]=sq,e.namespaceId){this.destroyInnerAnimations(i);let r=this._fetchNamespace(e.namespaceId);r&&r.clearElementCache(i)}this._onRemovalComplete(i,e.setForRemoval)}i.classList?.contains(_4)&&this.markElementAsDisabled(i,!1),this.driver.query(i,Z6e,!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(i=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,n)=>this._balanceNamespaceList(r,n)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;rr()),this._flushFns=[],this._whenQuietFns.length){let r=this._whenQuietFns;this._whenQuietFns=[],e.length?Mu(e).onDone(()=>{r.forEach(n=>n())}):r.forEach(n=>n())}}reportError(i){throw v6e(i)}_flushAnimations(i,e){let r=new Zy,n=[],a=new Map,s=[],o=new Map,d=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(I=>{c.add(I);let O=this.driver.query(I,K6e,!0);for(let N=0;N{let N=qJ+m++;p.set(O,N),I.forEach(H=>Xo(H,N))});let g=[],v=new Set,y=new Set;for(let I=0;Iv.add(H)):y.add(O))}let x=new Map,b=YJ(u,Array.from(v));b.forEach((I,O)=>{let N=T4+m++;x.set(O,N),I.forEach(H=>Xo(H,N))}),i.push(()=>{f.forEach((I,O)=>{let N=p.get(O);I.forEach(H=>vg(H,N))}),b.forEach((I,O)=>{let N=x.get(O);I.forEach(H=>vg(H,N))}),g.forEach(I=>{this.processLeaveNode(I)})});let _=[],C=[];for(let I=this._namespaceList.length-1;I>=0;I--)this._namespaceList[I].drainQueuedTransitions(e).forEach(N=>{let H=N.player,X=N.element;if(_.push(H),this.collectedEnterElements.length){let J=X[wl];if(J&&J.setForMove){if(J.previousTriggersValues&&J.previousTriggersValues.has(N.triggerName)){let W=J.previousTriggersValues.get(N.triggerName),q=this.statesByElement.get(N.element);if(q&&q.has(N.triggerName)){let ie=q.get(N.triggerName);ie.value=W,q.set(N.triggerName,ie)}}H.destroy();return}}let V=!h||!this.driver.containsElement(h,X),z=x.get(X),F=p.get(X),k=this._buildInstruction(N,r,F,z,V);if(k.errors&&k.errors.length){C.push(k);return}if(V){H.onStart(()=>ff(X,k.fromStyles)),H.onDestroy(()=>pc(X,k.toStyles)),n.push(H);return}if(N.isFallbackTransition){H.onStart(()=>ff(X,k.fromStyles)),H.onDestroy(()=>pc(X,k.toStyles)),n.push(H);return}let G=[];k.timelines.forEach(J=>{J.stretchStartingKeyframe=!0,this.disabledNodes.has(J.element)||G.push(J)}),k.timelines=G,r.append(X,k.timelines);let Z={instruction:k,player:H,element:X};s.push(Z),k.queriedElements.forEach(J=>bo(o,J,[]).push(H)),k.preStyleProps.forEach((J,W)=>{if(J.size){let q=d.get(W);q||d.set(W,q=new Set),J.forEach((ie,re)=>q.add(re))}}),k.postStyleProps.forEach((J,W)=>{let q=l.get(W);q||l.set(W,q=new Set),J.forEach((ie,re)=>q.add(re))})});if(C.length){let I=[];C.forEach(O=>{I.push(y6e(O.triggerName,O.errors))}),_.forEach(O=>O.destroy()),this.reportError(I)}let w=new Map,T=new Map;s.forEach(I=>{let O=I.element;r.has(O)&&(T.set(O,O),this._beforeAnimationBuild(I.player.namespaceId,I.instruction,w))}),n.forEach(I=>{let O=I.element;this._getPreviousPlayers(O,!1,I.namespaceId,I.triggerName,null).forEach(H=>{bo(w,O,[]).push(H),H.destroy()})});let S=g.filter(I=>$J(I,d,l)),E=new Map;XJ(E,this.driver,y,l,jl).forEach(I=>{$J(I,d,l)&&S.push(I)});let A=new Map;f.forEach((I,O)=>{XJ(A,this.driver,new Set(I),d,P_)}),S.forEach(I=>{let O=E.get(I),N=A.get(I);E.set(I,new Map([...O?.entries()??[],...N?.entries()??[]]))});let M=[],R=[],L={};s.forEach(I=>{let{element:O,player:N,instruction:H}=I;if(r.has(O)){if(c.has(O)){N.onDestroy(()=>pc(O,H.toStyles)),N.disabled=!0,N.overrideTotalTime(H.totalTime),n.push(N);return}let X=L;if(T.size>1){let z=O,F=[];for(;z=z.parentNode;){let k=T.get(z);if(k){X=k;break}F.push(z)}F.forEach(k=>T.set(k,X))}let V=this._buildAnimation(N.namespaceId,H,w,a,A,E);if(N.setRealPlayer(V),X===L)M.push(N);else{let z=this.playersByElement.get(X);z&&z.length&&(N.parentPlayer=Mu(z)),n.push(N)}}else ff(O,H.fromStyles),N.onDestroy(()=>pc(O,H.toStyles)),R.push(N),c.has(O)&&n.push(N)}),R.forEach(I=>{let O=a.get(I.element);if(O&&O.length){let N=Mu(O);I.setRealPlayer(N)}}),n.forEach(I=>{I.parentPlayer?I.syncPlayerEvents(I.parentPlayer):I.destroy()});for(let I=0;I!V.destroyed);X.length?sVe(this,O,X):this.processLeaveNode(O)}return g.length=0,M.forEach(I=>{this.players.push(I),I.onDone(()=>{I.destroy();let O=this.players.indexOf(I);this.players.splice(O,1)}),I.play()}),M}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,e,r,n,a){let s=[];if(e){let o=this.playersByQueriedElement.get(i);o&&(s=o)}else{let o=this.playersByElement.get(i);if(o){let d=!a||a==Qy;o.forEach(l=>{l.queued||!d&&l.triggerName!=n||s.push(l)})}}return(r||n)&&(s=s.filter(o=>!(r&&r!=o.namespaceId||n&&n!=o.triggerName))),s}_beforeAnimationBuild(i,e,r){let n=e.triggerName,a=e.element,s=e.isRemovalTransition?void 0:i,o=e.isRemovalTransition?void 0:n;for(let d of e.timelines){let l=d.element,c=l!==a,h=bo(r,l,[]);this._getPreviousPlayers(l,c,s,o,e.toState).forEach(f=>{let p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),h.push(f)})}ff(a,e.fromStyles)}_buildAnimation(i,e,r,n,a,s){let o=e.triggerName,d=e.element,l=[],c=new Set,h=new Set,u=e.timelines.map(p=>{let m=p.element;c.add(m);let g=m[wl];if(g&&g.removedBeforeQueried)return new Ud(p.duration,p.delay);let v=m!==d,y=aVe((r.get(m)||eVe).map(w=>w.getRealPlayer())).filter(w=>{let T=w;return T.element?T.element===m:!1}),x=a.get(m),b=s.get(m),_=QJ(this._normalizer,p.keyframes,x,b),C=this._buildPlayer(p,_,y);if(p.subTimeline&&n&&h.add(m),v){let w=new qy(i,o,m);w.setRealPlayer(C),l.push(w)}return C});l.forEach(p=>{bo(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>iVe(this.playersByQueriedElement,p.element,p))}),c.forEach(p=>Xo(p,BJ));let f=Mu(u);return f.onDestroy(()=>{c.forEach(p=>vg(p,BJ)),pc(d,e.toStyles)}),h.forEach(p=>{bo(n,p,[]).push(f)}),f}_buildPlayer(i,e,r){return e.length>0?this.driver.animate(i.element,e,i.duration,i.delay,i.easing,r):new Ud(i.duration,i.delay)}},qy=class{namespaceId;triggerName;element;_player=new Ud;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(i,e,r){this.namespaceId=i,this.triggerName=e,this.element=r}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((e,r)=>{e.forEach(n=>V4(i,r,void 0,n))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){let e=this._player;e.triggerCallback&&i.onStart(()=>e.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,e){bo(this._queuedCallbacks,i,[]).push(e)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){let e=this._player;e.triggerCallback&&e.triggerCallback(i)}};function iVe(t,i,e){let r=t.get(i);if(r){if(r.length){let n=r.indexOf(e);r.splice(n,1)}r.length==0&&t.delete(i)}return r}function nVe(t){return t??null}function kS(t){return t&&t.nodeType===1}function rVe(t){return t=="start"||t=="done"}function WJ(t,i){let e=t.style.display;return t.style.display=i??"none",e}function XJ(t,i,e,r,n){let a=[];e.forEach(d=>a.push(WJ(d)));let s=[];r.forEach((d,l)=>{let c=new Map;d.forEach(h=>{let u=i.computeStyle(l,h,n);c.set(h,u),(!u||u.length==0)&&(l[wl]=tVe,s.push(l))}),t.set(l,c)});let o=0;return e.forEach(d=>WJ(d,a[o++])),s}function YJ(t,i){let e=new Map;if(t.forEach(o=>e.set(o,[])),i.length==0)return e;let r=1,n=new Set(i),a=new Map;function s(o){if(!o)return r;let d=a.get(o);if(d)return d;let l=o.parentNode;return e.has(l)?d=l:n.has(l)?d=r:d=s(l),a.set(o,d),d}return i.forEach(o=>{let d=s(o);d!==r&&e.get(d).push(o)}),e}function Xo(t,i){t.classList?.add(i)}function vg(t,i){t.classList?.remove(i)}function sVe(t,i,e){Mu(e).onDone(()=>t.processLeaveNode(i))}function aVe(t){let i=[];return aq(t,i),i}function aq(t,i){for(let e=0;en.add(a)):i.set(t,r),e.delete(t),!0}var yg=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(i,e)=>{};constructor(i,e,r){this._driver=e,this._normalizer=r,this._transitionEngine=new N4(i.body,e,r),this._timelineEngine=new O4(i.body,e,r),this._transitionEngine.onRemovalComplete=(n,a)=>this.onRemovalComplete(n,a)}registerTrigger(i,e,r,n,a){let s=i+"-"+n,o=this._triggerCache[s];if(!o){let d=[],l=[],c=iq(this._driver,a,d,l);if(d.length)throw o6e(n,d);o=Y6e(n,c,this._normalizer),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(e,n,o)}register(i,e){this._transitionEngine.register(i,e)}destroy(i,e){this._transitionEngine.destroy(i,e)}onInsert(i,e,r,n){this._transitionEngine.insertNode(i,e,r,n)}onRemove(i,e,r){this._transitionEngine.removeNode(i,e,r)}disableAnimations(i,e){this._transitionEngine.markElementAsDisabled(i,e)}process(i,e,r,n){if(r.charAt(0)=="@"){let[a,s]=LJ(r),o=n;this._timelineEngine.command(a,e,s,o)}else this._transitionEngine.trigger(i,e,r,n)}listen(i,e,r,n,a){if(r.charAt(0)=="@"){let[s,o]=LJ(r);return this._timelineEngine.listen(s,e,o,a)}return this._transitionEngine.listen(i,e,r,n,a)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}};function lVe(t,i){let e=null,r=null;return Array.isArray(i)&&i.length?(e=C4(i[0]),i.length>1&&(r=C4(i[i.length-1]))):i instanceof Map&&(e=C4(i)),e||r?new cVe(t,e,r):null}var cVe=(()=>{class t{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,r,n){this._element=e,this._startStyles=r,this._endStyles=n;let a=t.initialStylesByElement.get(e);a||t.initialStylesByElement.set(e,a=new Map),this._initialStyles=a}start(){this._state<1&&(this._startStyles&&pc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(pc(this._element,this._initialStyles),this._endStyles&&(pc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(ff(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ff(this._element,this._endStyles),this._endStyles=null),pc(this._element,this._initialStyles),this._state=3)}}return t})();function C4(t){let i=null;return t.forEach((e,r)=>{dVe(r)&&(i=i||new Map,i.set(r,e))}),i}function dVe(t){return t==="display"||t==="position"}var GS=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(i,e,r,n){this.element=i,this.keyframes=e,this.options=r,this._specialStyles=n,this._duration=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let i=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,i,this.options),this._finalKeyframe=i.length?i[i.length-1]:new Map;let e=()=>this._onFinish();this.domPlayer.addEventListener("finish",e),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",e)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(i){let e=[];return i.forEach(r=>{e.push(Object.fromEntries(r))}),e}_triggerWebAnimation(i,e,r){return i.animate(this._convertKeyframesToObject(e),r)}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(i=>i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}setPosition(i){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=i*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((r,n)=>{n!=="offset"&&i.set(n,this._finished?r:j4(this.element,n))}),this.currentSnapshot=i}triggerCallback(i){let e=i==="start"?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}},HS=class{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}containsElement(i,e){return KJ(i,e)}getParentElement(i){return z4(i)}query(i,e,r){return ZJ(i,e,r)}computeStyle(i,e,r){return j4(i,e)}animate(i,e,r,n,a,s=[]){let o=n==0?"both":"forwards",d={duration:r,delay:n,fill:o};a&&(d.easing=a);let l=new Map,c=s.filter(f=>f instanceof GS);A6e(r,n)&&c.forEach(f=>{f.currentSnapshot.forEach((p,m)=>l.set(m,p))});let h=E6e(e).map(f=>new Map(f));h=I6e(i,h,l);let u=lVe(i,h);return new GS(i,h,d,u)}};var FS="@",oq="@.disabled",jS=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(i,e,r,n){this.namespaceId=i,this.delegate=e,this.engine=r,this._onDestroy=n}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,e){return this.delegate.createElement(i,e)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,e){this.delegate.appendChild(i,e),this.engine.onInsert(this.namespaceId,e,i,!1)}insertBefore(i,e,r,n=!0){this.delegate.insertBefore(i,e,r),this.engine.onInsert(this.namespaceId,e,i,n)}removeChild(i,e,r){this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(i,e){return this.delegate.selectRootElement(i,e)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,e,r,n){this.delegate.setAttribute(i,e,r,n)}removeAttribute(i,e,r){this.delegate.removeAttribute(i,e,r)}addClass(i,e){this.delegate.addClass(i,e)}removeClass(i,e){this.delegate.removeClass(i,e)}setStyle(i,e,r,n){this.delegate.setStyle(i,e,r,n)}removeStyle(i,e,r){this.delegate.removeStyle(i,e,r)}setProperty(i,e,r){e.charAt(0)==FS&&e==oq?this.disableAnimations(i,!!r):this.delegate.setProperty(i,e,r)}setValue(i,e){this.delegate.setValue(i,e)}listen(i,e,r,n){return this.delegate.listen(i,e,r,n)}disableAnimations(i,e){this.engine.disableAnimations(i,e)}},B4=class extends jS{factory;constructor(i,e,r,n,a){super(e,r,n,a),this.factory=i,this.namespaceId=e}setProperty(i,e,r){e.charAt(0)==FS?e.charAt(1)=="."&&e==oq?(r=r===void 0?!0:!!r,this.disableAnimations(i,r)):this.engine.process(this.namespaceId,i,e.slice(1),r):this.delegate.setProperty(i,e,r)}listen(i,e,r,n){if(e.charAt(0)==FS){let a=uVe(i),s=e.slice(1),o="";return s.charAt(0)!=FS&&([s,o]=hVe(s)),this.engine.listen(this.namespaceId,a,s,o,d=>{let l=d._data||-1;this.factory.scheduleListenerCallback(l,r,d)})}return this.delegate.listen(i,e,r,n)}};function uVe(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function hVe(t){let i=t.indexOf("."),e=t.substring(0,i),r=t.slice(i+1);return[e,r]}var WS=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(i,e,r){this.delegate=i,this.engine=e,this._zone=r,e.onRemovalComplete=(n,a)=>{a?.removeChild(null,n)}}createRenderer(i,e){let r="",n=this.delegate.createRenderer(i,e);if(!i||!e?.data?.animation){let l=this._rendererCache,c=l.get(n);if(!c){let h=()=>l.delete(n);c=new jS(r,n,this.engine,h),l.set(n,c)}return c}let a=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,i);let o=l=>{Array.isArray(l)?l.forEach(o):this.engine.registerTrigger(a,s,i,l.name,l)};return e.data.animation.forEach(o),new B4(this,s,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,e,r){if(i>=0&&ie(r));return}let n=this._animationCallbacksBuffer;n.length==0&&queueMicrotask(()=>{this._zone.run(()=>{n.forEach(a=>{let[s,o]=a;s(o)}),this._animationCallbacksBuffer=[]})}),n.push([e,r])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(i){this.engine.flush(),this.delegate.componentReplaced?.(i)}};var mVe=(()=>{class t extends yg{constructor(e,r,n){super(e,r,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(r){return new(r||t)(_t(St),_t(mf),_t(pf))};static \u0275prov=Fe({token:t,factory:t.\u0275fac})}return t})();function pVe(){return new NS}function gVe(t,i,e){return new WS(t,i,e)}var cq=[{provide:pf,useFactory:pVe},{provide:yg,useClass:mVe},{provide:Ps,useFactory:gVe,deps:[Gb,yg,dt]}],lq=[{provide:mf,useFactory:()=>new HS},{provide:Mi,useValue:"BrowserAnimations"},...cq],vVe=[{provide:mf,useClass:G4},{provide:Mi,useValue:"NoopAnimations"},...cq],dq=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?vVe:lq}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({providers:lq,imports:[jb]})}return t})();var uq=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,Ct]})}return t})();var hq=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Im,Ct,ol,PA,uq]})}return t})();var fq=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=rt({type:t});static \u0275inj=nt({imports:[Ct,ol]})}return t})();var yVe="firebase",xVe="10.12.3";iu(yVe,xVe,"app");var mq={apiKey:"AIzaSyAFjiIuMBA1IpTrw__WdkQiK5PKht4_go8",authDomain:"snoguess-e4d1c.firebaseapp.com",projectId:"snoguess-e4d1c",storageBucket:"snoguess-e4d1c.appspot.com",messagingSenderId:"289449411190",appId:"1:289449411190:web:49ff68411f9e5148f11557"};var vpt=xR(mq),pq=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275mod=rt({type:t,bootstrap:[FJ]})}static{this.\u0275inj=nt({providers:[KB(ZB())],imports:[jb,h7,cK,dq,$7,IJ,zm,Q6,J6,H6,VU,Dh,e7,tV,r7,zV,u7,iV,dV,pw,hv,gw,y7,pU,yU,rU,TU,hq,PU,hv,kJ,fq,FU]})}}return t})();a9().bootstrapModule(pq).catch(t=>console.error(t)); diff --git a/docs/browser/polyfills-FFHMD2TL.js b/docs/browser/polyfills-FFHMD2TL.js new file mode 100644 index 0000000..b01b791 --- /dev/null +++ b/docs/browser/polyfills-FFHMD2TL.js @@ -0,0 +1,2 @@ +var ce=globalThis;function te(e){return(ce.__Zone_symbol_prefix||"__zone_symbol__")+e}function dt(){let e=ce.performance;function n(M){e&&e.mark&&e.mark(M)}function a(M,s){e&&e.measure&&e.measure(M,s)}n("Zone");class t{static{this.__symbol__=te}static assertZonePatched(){if(ce.Promise!==S.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 s=t.current;for(;s.parent;)s=s.parent;return s}static get current(){return b.zone}static get currentTask(){return D}static __load_patch(s,i,o=!1){if(S.hasOwnProperty(s)){let g=ce[te("forceDuplicateZoneCheck")]===!0;if(!o&&g)throw Error("Already loaded patch: "+s)}else if(!ce["__Zone_disable_"+s]){let g="Zone:"+s;n(g),S[s]=i(ce,t,w),a(g,g)}}get parent(){return this._parent}get name(){return this._name}constructor(s,i){this._parent=s,this._name=i?i.name||"unnamed":"",this._properties=i&&i.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,i)}get(s){let i=this.getZoneWith(s);if(i)return i._properties[s]}getZoneWith(s){let i=this;for(;i;){if(i._properties.hasOwnProperty(s))return i;i=i._parent}return null}fork(s){if(!s)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,s)}wrap(s,i){if(typeof s!="function")throw new Error("Expecting function got: "+s);let o=this._zoneDelegate.intercept(this,s,i),g=this;return function(){return g.runGuarded(o,this,arguments,i)}}run(s,i,o,g){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,s,i,o,g)}finally{b=b.parent}}runGuarded(s,i=null,o,g){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,s,i,o,g)}catch(V){if(this._zoneDelegate.handleError(this,V))throw V}}finally{b=b.parent}}runTask(s,i,o){if(s.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(s.zone||J).name+"; Execution: "+this.name+")");let g=s,{type:V,data:{isPeriodic:ee=!1,isRefreshable:Z=!1}={}}=s;if(s.state===q&&(V===z||V===y))return;let he=s.state!=A;he&&g._transitionTo(A,d);let _e=D;D=g,b={parent:b,zone:this};try{V==y&&s.data&&!ee&&!Z&&(s.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,g,i,o)}catch(Q){if(this._zoneDelegate.handleError(this,Q))throw Q}}finally{let Q=s.state;if(Q!==q&&Q!==X)if(V==z||ee||Z&&Q===k)he&&g._transitionTo(d,A,k);else{let Ee=g._zoneDelegates;this._updateTaskCount(g,-1),he&&g._transitionTo(q,A,q),Z&&(g._zoneDelegates=Ee)}b=b.parent,D=_e}}scheduleTask(s){if(s.zone&&s.zone!==this){let o=this;for(;o;){if(o===s.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${s.zone.name}`);o=o.parent}}s._transitionTo(k,q);let i=[];s._zoneDelegates=i,s._zone=this;try{s=this._zoneDelegate.scheduleTask(this,s)}catch(o){throw s._transitionTo(X,k,q),this._zoneDelegate.handleError(this,o),o}return s._zoneDelegates===i&&this._updateTaskCount(s,1),s.state==k&&s._transitionTo(d,k),s}scheduleMicroTask(s,i,o,g){return this.scheduleTask(new E(G,s,i,o,g,void 0))}scheduleMacroTask(s,i,o,g,V){return this.scheduleTask(new E(y,s,i,o,g,V))}scheduleEventTask(s,i,o,g,V){return this.scheduleTask(new E(z,s,i,o,g,V))}cancelTask(s){if(s.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(s.zone||J).name+"; Execution: "+this.name+")");if(!(s.state!==d&&s.state!==A)){s._transitionTo(x,d,A);try{this._zoneDelegate.cancelTask(this,s)}catch(i){throw s._transitionTo(X,x),this._zoneDelegate.handleError(this,i),i}return this._updateTaskCount(s,-1),s._transitionTo(q,x),s.runCount=-1,s}}_updateTaskCount(s,i){let o=s._zoneDelegates;i==-1&&(s._zoneDelegates=null);for(let g=0;gM.hasTask(i,o),onScheduleTask:(M,s,i,o)=>M.scheduleTask(i,o),onInvokeTask:(M,s,i,o,g,V)=>M.invokeTask(i,o,g,V),onCancelTask:(M,s,i,o)=>M.cancelTask(i,o)};class f{get zone(){return this._zone}constructor(s,i,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=s,this._parentDelegate=i,this._forkZS=o&&(o&&o.onFork?o:i._forkZS),this._forkDlgt=o&&(o.onFork?i:i._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:i._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:i._interceptZS),this._interceptDlgt=o&&(o.onIntercept?i:i._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:i._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:i._invokeZS),this._invokeDlgt=o&&(o.onInvoke?i:i._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:i._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:i._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?i:i._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:i._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:i._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?i:i._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:i._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:i._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?i:i._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:i._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:i._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?i:i._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:i._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let g=o&&o.onHasTask,V=i&&i._hasTaskZS;(g||V)&&(this._hasTaskZS=g?o:c,this._hasTaskDlgt=i,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=i,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=i,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=i,this._cancelTaskCurrZone=this._zone))}fork(s,i){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,s,i):new t(s,i)}intercept(s,i,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,s,i,o):i}invoke(s,i,o,g,V){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,s,i,o,g,V):i.apply(o,g)}handleError(s,i){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,s,i):!0}scheduleTask(s,i){let o=i;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,s,i),o||(o=i);else if(i.scheduleFn)i.scheduleFn(i);else if(i.type==G)U(i);else throw new Error("Task is missing scheduleFn.");return o}invokeTask(s,i,o,g){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,s,i,o,g):i.callback.apply(o,g)}cancelTask(s,i){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,s,i);else{if(!i.cancelFn)throw Error("Task is not cancelable");o=i.cancelFn(i)}return o}hasTask(s,i){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,s,i)}catch(o){this.handleError(s,o)}}_updateTaskCount(s,i){let o=this._taskCounts,g=o[s],V=o[s]=g+i;if(V<0)throw new Error("More tasks executed then were scheduled.");if(g==0||V==0){let ee={microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:s};this.hasTask(this._zone,ee)}}}class E{constructor(s,i,o,g,V,ee){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=s,this.source=i,this.data=g,this.scheduleFn=V,this.cancelFn=ee,!o)throw new Error("callback is not defined");this.callback=o;let Z=this;s===z&&g&&g.useG?this.invoke=E.invokeTask:this.invoke=function(){return E.invokeTask.call(ce,Z,this,arguments)}}static invokeTask(s,i,o){s||(s=this),K++;try{return s.runCount++,s.zone.runTask(s,i,o)}finally{K==1&&$(),K--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(q,k)}_transitionTo(s,i,o){if(this._state===i||this._state===o)this._state=s,s==q&&(this._zoneDelegates=null);else throw new Error(`${this.type} '${this.source}': can not transition to '${s}', expecting state '${i}'${o?" or '"+o+"'":""}, was '${this._state}'.`)}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}}}let T=te("setTimeout"),p=te("Promise"),C=te("then"),_=[],P=!1,I;function H(M){if(I||ce[p]&&(I=ce[p].resolve(0)),I){let s=I[C];s||(s=I.then),s.call(I,M)}else ce[T](M,0)}function U(M){K===0&&_.length===0&&H($),M&&_.push(M)}function $(){if(!P){for(P=!0;_.length;){let M=_;_=[];for(let s=0;sb,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:U,showUncaughtError:()=>!t[te("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:H},b={parent:null,zone:new t(null,null)},D=null,K=0;function W(){}return a("Zone","Zone"),t}function _t(){let e=globalThis,n=e[te("forceDuplicateZoneCheck")]===!0;if(e.Zone&&(n||typeof e.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return e.Zone??=dt(),e.Zone}var be=Object.getOwnPropertyDescriptor,Ae=Object.defineProperty,je=Object.getPrototypeOf,Et=Object.create,Tt=Array.prototype.slice,He="addEventListener",xe="removeEventListener",Le=te(He),Ie=te(xe),ae="true",le="false",Pe=te("");function Ve(e,n){return Zone.current.wrap(e,n)}function Ge(e,n,a,t,c){return Zone.current.scheduleMacroTask(e,n,a,t,c)}var j=te,De=typeof window<"u",pe=De?window:void 0,Y=De&&pe||globalThis,gt="removeAttribute";function Fe(e,n){for(let a=e.length-1;a>=0;a--)typeof e[a]=="function"&&(e[a]=Ve(e[a],n+"_"+a));return e}function yt(e,n){let a=e.constructor.name;for(let t=0;t{let p=function(){return T.apply(this,Fe(arguments,a+"."+c))};return fe(p,T),p})(f)}}}function tt(e){return e?e.writable===!1?!1:!(typeof e.get=="function"&&typeof e.set>"u"):!0}var nt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Se=!("nw"in Y)&&typeof Y.process<"u"&&Y.process.toString()==="[object process]",Be=!Se&&!nt&&!!(De&&pe.HTMLElement),rt=typeof Y.process<"u"&&Y.process.toString()==="[object process]"&&!nt&&!!(De&&pe.HTMLElement),Ce={},mt=j("enable_beforeunload"),Ye=function(e){if(e=e||Y.event,!e)return;let n=Ce[e.type];n||(n=Ce[e.type]=j("ON_PROPERTY"+e.type));let a=this||e.target||Y,t=a[n],c;if(Be&&a===pe&&e.type==="error"){let f=e;c=t&&t.call(this,f.message,f.filename,f.lineno,f.colno,f.error),c===!0&&e.preventDefault()}else c=t&&t.apply(this,arguments),e.type==="beforeunload"&&Y[mt]&&typeof c=="string"?e.returnValue=c:c!=null&&!c&&e.preventDefault();return c};function $e(e,n,a){let t=be(e,n);if(!t&&a&&be(a,n)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;let c=j("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete t.writable,delete t.value;let f=t.get,E=t.set,T=n.slice(2),p=Ce[T];p||(p=Ce[T]=j("ON_PROPERTY"+T)),t.set=function(C){let _=this;if(!_&&e===Y&&(_=Y),!_)return;typeof _[p]=="function"&&_.removeEventListener(T,Ye),E&&E.call(_,null),_[p]=C,typeof C=="function"&&_.addEventListener(T,Ye,!1)},t.get=function(){let C=this;if(!C&&e===Y&&(C=Y),!C)return null;let _=C[p];if(_)return _;if(f){let P=f.call(this);if(P)return t.set.call(this,P),typeof C[gt]=="function"&&C.removeAttribute(n),P}return null},Ae(e,n,t),e[c]=!0}function ot(e,n,a){if(n)for(let t=0;tfunction(E,T){let p=a(E,T);return p.cbIdx>=0&&typeof T[p.cbIdx]=="function"?Ge(p.name,T[p.cbIdx],p,c):f.apply(E,T)})}function fe(e,n){e[j("OriginalDelegate")]=n}var Je=!1,Me=!1;function kt(){try{let e=pe.navigator.userAgent;if(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1)return!0}catch{}return!1}function vt(){if(Je)return Me;Je=!0;try{let e=pe.navigator.userAgent;(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1||e.indexOf("Edge/")!==-1)&&(Me=!0)}catch{}return Me}function Ke(e){return typeof e=="function"}function Qe(e){return typeof e=="number"}var me=!1;if(typeof window<"u")try{let e=Object.defineProperty({},"passive",{get:function(){me=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{me=!1}var bt={useG:!0},ne={},st={},it=new RegExp("^"+Pe+"(\\w+)(true|false)$"),ct=j("propagationStopped");function at(e,n){let a=(n?n(e):e)+le,t=(n?n(e):e)+ae,c=Pe+a,f=Pe+t;ne[e]={},ne[e][le]=c,ne[e][ae]=f}function Pt(e,n,a,t){let c=t&&t.add||He,f=t&&t.rm||xe,E=t&&t.listeners||"eventListeners",T=t&&t.rmAll||"removeAllListeners",p=j(c),C="."+c+":",_="prependListener",P="."+_+":",I=function(k,d,A){if(k.isRemoved)return;let x=k.callback;typeof x=="object"&&x.handleEvent&&(k.callback=y=>x.handleEvent(y),k.originalDelegate=x);let X;try{k.invoke(k,d,[A])}catch(y){X=y}let G=k.options;if(G&&typeof G=="object"&&G.once){let y=k.originalDelegate?k.originalDelegate:k.callback;d[f].call(d,A.type,y,G)}return X};function H(k,d,A){if(d=d||e.event,!d)return;let x=k||d.target||e,X=x[ne[d.type][A?ae:le]];if(X){let G=[];if(X.length===1){let y=I(X[0],x,d);y&&G.push(y)}else{let y=X.slice();for(let z=0;z{throw z})}}}let U=function(k){return H(this,k,!1)},$=function(k){return H(this,k,!0)};function J(k,d){if(!k)return!1;let A=!0;d&&d.useG!==void 0&&(A=d.useG);let x=d&&d.vh,X=!0;d&&d.chkDup!==void 0&&(X=d.chkDup);let G=!1;d&&d.rt!==void 0&&(G=d.rt);let y=k;for(;y&&!y.hasOwnProperty(c);)y=je(y);if(!y&&k[c]&&(y=k),!y||y[p])return!1;let z=d&&d.eventNameToString,S={},w=y[p]=y[c],b=y[j(f)]=y[f],D=y[j(E)]=y[E],K=y[j(T)]=y[T],W;d&&d.prepend&&(W=y[j(d.prepend)]=y[d.prepend]);function M(r,u){return!me&&typeof r=="object"&&r?!!r.capture:!me||!u?r:typeof r=="boolean"?{capture:r,passive:!0}:r?typeof r=="object"&&r.passive!==!1?{...r,passive:!0}:r:{passive:!0}}let s=function(r){if(!S.isExisting)return w.call(S.target,S.eventName,S.capture?$:U,S.options)},i=function(r){if(!r.isRemoved){let u=ne[r.eventName],v;u&&(v=u[r.capture?ae:le]);let R=v&&r.target[v];if(R){for(let m=0;mre.zone.cancelTask(re);r.call(Te,"abort",ie,{once:!0}),re.removeAbortListener=()=>Te.removeEventListener("abort",ie)}if(S.target=null,ke&&(ke.taskData=null),Ue&&(S.options.once=!0),!me&&typeof re.options=="boolean"||(re.options=se),re.target=N,re.capture=Oe,re.eventName=L,B&&(re.originalDelegate=F),O?ge.unshift(re):ge.push(re),m)return N}};return y[c]=l(w,C,ee,Z,G),W&&(y[_]=l(W,P,g,Z,G,!0)),y[f]=function(){let r=this||e,u=arguments[0];d&&d.transferEventName&&(u=d.transferEventName(u));let v=arguments[2],R=v?typeof v=="boolean"?!0:v.capture:!1,m=arguments[1];if(!m)return b.apply(this,arguments);if(x&&!x(b,m,r,arguments))return;let O=ne[u],N;O&&(N=O[R?ae:le]);let L=N&&r[N];if(L)for(let F=0;Ffunction(c,f){c[ct]=!0,t&&t.apply(c,f)})}function Rt(e,n){n.patchMethod(e,"queueMicrotask",a=>function(t,c){Zone.current.scheduleMicroTask("queueMicrotask",c[0])})}var Re=j("zoneTask");function ye(e,n,a,t){let c=null,f=null;n+=t,a+=t;let E={};function T(C){let _=C.data;_.args[0]=function(){return C.invoke.apply(this,arguments)};let P=c.apply(e,_.args);return Qe(P)?_.handleId=P:(_.handle=P,_.isRefreshable=Ke(P.refresh)),C}function p(C){let{handle:_,handleId:P}=C.data;return f.call(e,_??P)}c=ue(e,n,C=>function(_,P){if(Ke(P[0])){let I={isRefreshable:!1,isPeriodic:t==="Interval",delay:t==="Timeout"||t==="Interval"?P[1]||0:void 0,args:P},H=P[0];P[0]=function(){try{return H.apply(this,arguments)}finally{let{handle:A,handleId:x,isPeriodic:X,isRefreshable:G}=I;!X&&!G&&(x?delete E[x]:A&&(A[Re]=null))}};let U=Ge(n,P[0],I,T,p);if(!U)return U;let{handleId:$,handle:J,isRefreshable:q,isPeriodic:k}=U.data;if($)E[$]=U;else if(J&&(J[Re]=U,q&&!k)){let d=J.refresh;J.refresh=function(){let{zone:A,state:x}=U;return x==="notScheduled"?(U._state="scheduled",A._updateTaskCount(U,1)):x==="running"&&(U._state="scheduling"),d.call(this)}}return J??$??U}else return C.apply(e,P)}),f=ue(e,a,C=>function(_,P){let I=P[0],H;Qe(I)?(H=E[I],delete E[I]):(H=I?.[Re],H?I[Re]=null:H=I),H?.type?H.cancelFn&&H.zone.cancelTask(H):C.apply(e,P)})}function Ct(e,n){let{isBrowser:a,isMix:t}=n.getGlobalObjects();if(!a&&!t||!e.customElements||!("customElements"in e))return;let c=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"];n.patchCallbacks(n,e.customElements,"customElements","define",c)}function Dt(e,n){if(Zone[n.symbol("patchEventTarget")])return;let{eventNames:a,zoneSymbolEventNames:t,TRUE_STR:c,FALSE_STR:f,ZONE_SYMBOL_PREFIX:E}=n.getGlobalObjects();for(let p=0;pf.target===e);if(!t||t.length===0)return n;let c=t[0].ignoreProperties;return n.filter(f=>c.indexOf(f)===-1)}function et(e,n,a,t){if(!e)return;let c=ut(e,n,a);ot(e,c,t)}function Ze(e){return Object.getOwnPropertyNames(e).filter(n=>n.startsWith("on")&&n.length>2).map(n=>n.substring(2))}function Ot(e,n){if(Se&&!rt||Zone[e.symbol("patchEvents")])return;let a=n.__Zone_ignore_on_properties,t=[];if(Be){let c=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);let f=kt()?[{target:c,ignoreProperties:["error"]}]:[];et(c,Ze(c),a&&a.concat(f),je(c))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let c=0;c{let a=n[e.__symbol__("legacyPatch")];a&&a()}),e.__load_patch("timers",n=>{let a="set",t="clear";ye(n,a,t,"Timeout"),ye(n,a,t,"Interval"),ye(n,a,t,"Immediate")}),e.__load_patch("requestAnimationFrame",n=>{ye(n,"request","cancel","AnimationFrame"),ye(n,"mozRequest","mozCancel","AnimationFrame"),ye(n,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(n,a)=>{let t=["alert","prompt","confirm"];for(let c=0;cfunction(C,_){return a.current.run(E,n,_,p)})}}),e.__load_patch("EventTarget",(n,a,t)=>{St(n,t),Dt(n,t);let c=n.XMLHttpRequestEventTarget;c&&c.prototype&&t.patchEventTarget(n,t,[c.prototype])}),e.__load_patch("MutationObserver",(n,a,t)=>{ve("MutationObserver"),ve("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(n,a,t)=>{ve("IntersectionObserver")}),e.__load_patch("FileReader",(n,a,t)=>{ve("FileReader")}),e.__load_patch("on_property",(n,a,t)=>{Ot(t,n)}),e.__load_patch("customElements",(n,a,t)=>{Ct(n,t)}),e.__load_patch("XHR",(n,a)=>{C(n);let t=j("xhrTask"),c=j("xhrSync"),f=j("xhrListener"),E=j("xhrScheduled"),T=j("xhrURL"),p=j("xhrErrorBeforeScheduled");function C(_){let P=_.XMLHttpRequest;if(!P)return;let I=P.prototype;function H(w){return w[t]}let U=I[Le],$=I[Ie];if(!U){let w=_.XMLHttpRequestEventTarget;if(w){let b=w.prototype;U=b[Le],$=b[Ie]}}let J="readystatechange",q="scheduled";function k(w){let b=w.data,D=b.target;D[E]=!1,D[p]=!1;let K=D[f];U||(U=D[Le],$=D[Ie]),K&&$.call(D,J,K);let W=D[f]=()=>{if(D.readyState===D.DONE)if(!b.aborted&&D[E]&&w.state===q){let s=D[a.__symbol__("loadfalse")];if(D.status!==0&&s&&s.length>0){let i=w.invoke;w.invoke=function(){let o=D[a.__symbol__("loadfalse")];for(let g=0;gfunction(w,b){return w[c]=b[2]==!1,w[T]=b[1],x.apply(w,b)}),X="XMLHttpRequest.send",G=j("fetchTaskAborting"),y=j("fetchTaskScheduling"),z=ue(I,"send",()=>function(w,b){if(a.current[y]===!0||w[c])return z.apply(w,b);{let D={target:w,url:w[T],isPeriodic:!1,args:b,aborted:!1},K=Ge(X,d,D,k,A);w&&w[p]===!0&&!D.aborted&&K.state===q&&K.invoke()}}),S=ue(I,"abort",()=>function(w,b){let D=H(w);if(D&&typeof D.type=="string"){if(D.cancelFn==null||D.data&&D.data.aborted)return;D.zone.cancelTask(D)}else if(a.current[G]===!0)return S.apply(w,b)})}}),e.__load_patch("geolocation",n=>{n.navigator&&n.navigator.geolocation&&yt(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(n,a)=>{function t(c){return function(f){lt(n,c).forEach(T=>{let p=n.PromiseRejectionEvent;if(p){let C=new p(c,{promise:f.promise,reason:f.rejection});T.invoke(C)}})}}n.PromiseRejectionEvent&&(a[j("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),a[j("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(n,a,t)=>{Rt(n,t)})}function Lt(e){e.__load_patch("ZoneAwarePromise",(n,a,t)=>{let c=Object.getOwnPropertyDescriptor,f=Object.defineProperty;function E(h){if(h&&h.toString===Object.prototype.toString){let l=h.constructor&&h.constructor.name;return(l||"")+": "+JSON.stringify(h)}return h?h.toString():Object.prototype.toString.call(h)}let T=t.symbol,p=[],C=n[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,_=T("Promise"),P=T("then"),I="__creationTrace__";t.onUnhandledError=h=>{if(t.showUncaughtError()){let l=h&&h.rejection;l?console.error("Unhandled Promise rejection:",l instanceof Error?l.message:l,"; Zone:",h.zone.name,"; Task:",h.task&&h.task.source,"; Value:",l,l instanceof Error?l.stack:void 0):console.error(h)}},t.microtaskDrainDone=()=>{for(;p.length;){let h=p.shift();try{h.zone.runGuarded(()=>{throw h.throwOriginal?h.rejection:h})}catch(l){U(l)}}};let H=T("unhandledPromiseRejectionHandler");function U(h){t.onUnhandledError(h);try{let l=a[H];typeof l=="function"&&l.call(this,h)}catch{}}function $(h){return h&&h.then}function J(h){return h}function q(h){return Z.reject(h)}let k=T("state"),d=T("value"),A=T("finally"),x=T("parentPromiseValue"),X=T("parentPromiseState"),G="Promise.then",y=null,z=!0,S=!1,w=0;function b(h,l){return r=>{try{M(h,l,r)}catch(u){M(h,!1,u)}}}let D=function(){let h=!1;return function(r){return function(){h||(h=!0,r.apply(null,arguments))}}},K="Promise resolved with itself",W=T("currentTaskTrace");function M(h,l,r){let u=D();if(h===r)throw new TypeError(K);if(h[k]===y){let v=null;try{(typeof r=="object"||typeof r=="function")&&(v=r&&r.then)}catch(R){return u(()=>{M(h,!1,R)})(),h}if(l!==S&&r instanceof Z&&r.hasOwnProperty(k)&&r.hasOwnProperty(d)&&r[k]!==y)i(r),M(h,r[k],r[d]);else if(l!==S&&typeof v=="function")try{v.call(r,u(b(h,l)),u(b(h,!1)))}catch(R){u(()=>{M(h,!1,R)})()}else{h[k]=l;let R=h[d];if(h[d]=r,h[A]===A&&l===z&&(h[k]=h[X],h[d]=h[x]),l===S&&r instanceof Error){let m=a.currentTask&&a.currentTask.data&&a.currentTask.data[I];m&&f(r,W,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m{try{let O=h[d],N=!!r&&A===r[A];N&&(r[x]=O,r[X]=R);let L=l.run(m,void 0,N&&m!==q&&m!==J?[]:[O]);M(r,!0,L)}catch(O){M(r,!1,O)}},r)}let g="function ZoneAwarePromise() { [native code] }",V=function(){},ee=n.AggregateError;class Z{static toString(){return g}static resolve(l){return l instanceof Z?l:M(new this(null),z,l)}static reject(l){return M(new this(null),S,l)}static withResolvers(){let l={};return l.promise=new Z((r,u)=>{l.resolve=r,l.reject=u}),l}static any(l){if(!l||typeof l[Symbol.iterator]!="function")return Promise.reject(new ee([],"All promises were rejected"));let r=[],u=0;try{for(let m of l)u++,r.push(Z.resolve(m))}catch{return Promise.reject(new ee([],"All promises were rejected"))}if(u===0)return Promise.reject(new ee([],"All promises were rejected"));let v=!1,R=[];return new Z((m,O)=>{for(let N=0;N{v||(v=!0,m(L))},L=>{R.push(L),u--,u===0&&(v=!0,O(new ee(R,"All promises were rejected")))})})}static race(l){let r,u,v=new this((O,N)=>{r=O,u=N});function R(O){r(O)}function m(O){u(O)}for(let O of l)$(O)||(O=this.resolve(O)),O.then(R,m);return v}static all(l){return Z.allWithCallback(l)}static allSettled(l){return(this&&this.prototype instanceof Z?this:Z).allWithCallback(l,{thenCallback:u=>({status:"fulfilled",value:u}),errorCallback:u=>({status:"rejected",reason:u})})}static allWithCallback(l,r){let u,v,R=new this((L,F)=>{u=L,v=F}),m=2,O=0,N=[];for(let L of l){$(L)||(L=this.resolve(L));let F=O;try{L.then(B=>{N[F]=r?r.thenCallback(B):B,m--,m===0&&u(N)},B=>{r?(N[F]=r.errorCallback(B),m--,m===0&&u(N)):v(B)})}catch(B){v(B)}m++,O++}return m-=2,m===0&&u(N),R}constructor(l){let r=this;if(!(r instanceof Z))throw new Error("Must be an instanceof Promise.");r[k]=y,r[d]=[];try{let u=D();l&&l(u(b(r,z)),u(b(r,S)))}catch(u){M(r,!1,u)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return Z}then(l,r){let u=this.constructor?.[Symbol.species];(!u||typeof u!="function")&&(u=this.constructor||Z);let v=new u(V),R=a.current;return this[k]==y?this[d].push(R,v,l,r):o(this,R,v,l,r),v}catch(l){return this.then(null,l)}finally(l){let r=this.constructor?.[Symbol.species];(!r||typeof r!="function")&&(r=Z);let u=new r(V);u[A]=A;let v=a.current;return this[k]==y?this[d].push(v,u,l,l):o(this,v,u,l,l),u}}Z.resolve=Z.resolve,Z.reject=Z.reject,Z.race=Z.race,Z.all=Z.all;let he=n[_]=n.Promise;n.Promise=Z;let _e=T("thenPatched");function Q(h){let l=h.prototype,r=c(l,"then");if(r&&(r.writable===!1||!r.configurable))return;let u=l.then;l[P]=u,h.prototype.then=function(v,R){return new Z((O,N)=>{u.call(this,O,N)}).then(v,R)},h[_e]=!0}t.patchThen=Q;function Ee(h){return function(l,r){let u=h.apply(l,r);if(u instanceof Z)return u;let v=u.constructor;return v[_e]||Q(v),u}}return he&&(Q(he),ue(n,"fetch",h=>Ee(h))),Promise[a.__symbol__("uncaughtPromiseErrors")]=p,Z})}function It(e){e.__load_patch("toString",n=>{let a=Function.prototype.toString,t=j("OriginalDelegate"),c=j("Promise"),f=j("Error"),E=function(){if(typeof this=="function"){let _=this[t];if(_)return typeof _=="function"?a.call(_):Object.prototype.toString.call(_);if(this===Promise){let P=n[c];if(P)return a.call(P)}if(this===Error){let P=n[f];if(P)return a.call(P)}}return a.call(this)};E[t]=a,Function.prototype.toString=E;let T=Object.prototype.toString,p="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?p:T.call(this)}})}function Mt(e,n,a,t,c){let f=Zone.__symbol__(t);if(n[f])return;let E=n[f]=n[t];n[t]=function(T,p,C){return p&&p.prototype&&c.forEach(function(_){let P=`${a}.${t}::`+_,I=p.prototype;try{if(I.hasOwnProperty(_)){let H=e.ObjectGetOwnPropertyDescriptor(I,_);H&&H.value?(H.value=e.wrapWithCurrentZone(H.value,P),e._redefineProperty(p.prototype,_,H)):I[_]&&(I[_]=e.wrapWithCurrentZone(I[_],P))}else I[_]&&(I[_]=e.wrapWithCurrentZone(I[_],P))}catch{}}),E.call(n,T,p,C)},e.attachOriginToPatched(n[t],E)}function Zt(e){e.__load_patch("util",(n,a,t)=>{let c=Ze(n);t.patchOnProperties=ot,t.patchMethod=ue,t.bindArguments=Fe,t.patchMacroTask=pt;let f=a.__symbol__("BLACK_LISTED_EVENTS"),E=a.__symbol__("UNPATCHED_EVENTS");n[E]&&(n[f]=n[E]),n[f]&&(a[f]=a[E]=n[f]),t.patchEventPrototype=wt,t.patchEventTarget=Pt,t.isIEOrEdge=vt,t.ObjectDefineProperty=Ae,t.ObjectGetOwnPropertyDescriptor=be,t.ObjectCreate=Et,t.ArraySlice=Tt,t.patchClass=ve,t.wrapWithCurrentZone=Ve,t.filterProperties=ut,t.attachOriginToPatched=fe,t._redefineProperty=Object.defineProperty,t.patchCallbacks=Mt,t.getGlobalObjects=()=>({globalSources:st,zoneSymbolEventNames:ne,eventNames:c,isBrowser:Be,isMix:rt,isNode:Se,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:Pe,ADD_EVENT_LISTENER_STR:He,REMOVE_EVENT_LISTENER_STR:xe})})}function At(e){Lt(e),It(e),Zt(e)}var ft=_t();At(ft);Nt(ft); diff --git a/docs/browser/scripts-UGTJZXBK.js b/docs/browser/scripts-UGTJZXBK.js new file mode 100644 index 0000000..750903d --- /dev/null +++ b/docs/browser/scripts-UGTJZXBK.js @@ -0,0 +1,10 @@ +(function(v){var g={};function i(o){if(g[o])return g[o].exports;var f=g[o]={i:o,l:!1,exports:{}};return v[o].call(f.exports,f,f.exports,i),f.l=!0,f.exports}return i.m=v,i.c=g,i.d=function(o,f,c){i.o(o,f)||Object.defineProperty(o,f,{enumerable:!0,get:c})},i.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,f){if(f&1&&(o=i(o)),f&8||f&4&&typeof o=="object"&&o&&o.__esModule)return o;var c=Object.create(null);if(i.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:o}),f&2&&typeof o!="string")for(var a in o)i.d(c,a,function(p){return o[p]}.bind(null,a));return c},i.n=function(o){var f=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(f,"a",f),f},i.o=function(o,f){return Object.prototype.hasOwnProperty.call(o,f)},i.p="",i(i.s="5a74")})({"0100":function(v,g,i){"use strict";i.r(g);var o=i("65bb"),f=i.n(o);for(var c in o)["default"].indexOf(c)<0&&function(a){i.d(g,a,function(){return o[a]})}(c)},"02ce":function(v,g,i){var o=i("24fb");g=o(!1),g.push([v.i,".ConceptTypeahead[data-v-57c2009c]{position:relative;display:inline-block}.ConceptTypeahead input[data-v-57c2009c]{width:22em}.ConceptTypeahead__input[data-v-57c2009c]{width:100%;font-size:14px;color:#2c3e50;line-height:1.42857143;box-shadow:inset 0 1px 4px rgba(0,0,0,.4);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;font-weight:300;padding:12px 26px;border:none;border-radius:22px;letter-spacing:1px;box-sizing:border-box}.ConceptTypeahead__input[data-v-57c2009c]:focus{border-color:#4fc08d;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px #4fc08d}.fa-times[data-v-57c2009c]{cursor:pointer}i[data-v-57c2009c]{float:right;position:relative;top:30px;right:29px;opacity:.4}ul[data-v-57c2009c]{position:absolute;padding:0;margin-top:8px;min-width:100%;background-color:#fff;list-style:none;border-radius:4px;box-shadow:0 0 10px rgba(0,0,0,.25);z-index:1000}li[data-v-57c2009c]{padding:10px 16px;border-bottom:1px solid #ccc;cursor:pointer}li[data-v-57c2009c]:first-child{border-top-left-radius:4px;border-top-right-radius:4px}li[data-v-57c2009c]:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:0}span[data-v-57c2009c]{display:block;color:#2c3e50}.active[data-v-57c2009c]{background-color:#3aa373}.active span[data-v-57c2009c]{color:#fff}.name[data-v-57c2009c]{font-weight:700;font-size:18px}.screen-name[data-v-57c2009c]{font-style:italic}.info[data-v-57c2009c]{display:inline-block;cursor:pointer;visibility:hidden;position:absolute;margin-left:-22px;margin-top:4px}.icon[data-v-57c2009c]{font-size:.75em;font-weight:700;background-color:#5fb8e8;border-radius:10px;padding:0 7px;color:#fff}.info.show[data-v-57c2009c]{visibility:visible}.info-message[data-v-57c2009c]{position:absolute;background-color:#f0f8ff;padding:10px 16px;border-radius:5px;border:1px solid #c8cfd6;visibility:hidden;z-index:100}.info:hover>.info-message[data-v-57c2009c]{visibility:visible}",""]),v.exports=g},"03d6":function(v,g,i){var o=i("9c0e"),f=i("6ca1"),c=i("39ad")(!1),a=i("5a94")("IE_PROTO");v.exports=function(p,d){var h=f(p),_=0,y=[],b;for(b in h)b!=a&&o(h,b)&&y.push(b);for(;d.length>_;)o(h,b=d[_++])&&(~c(y,b)||y.push(b));return y}},"051b":function(v,g,i){var o=i("1a14"),f=i("10db");v.exports=i("0bad")?function(c,a,p){return o.f(c,a,f(1,p))}:function(c,a,p){return c[a]=p,c}},"05f5":function(v,g,i){var o=i("7a41"),f=i("ef08").document,c=o(f)&&o(f.createElement);v.exports=function(a){return c?f.createElement(a):{}}},"072d":function(v,g,i){"use strict";var o=i("0bad"),f=i("9876"),c=i("fed5"),a=i("1917"),p=i("0983"),d=i("9fbb"),h=Object.assign;v.exports=!h||i("4b8b")(function(){var _={},y={},b=Symbol(),x="abcdefghijklmnopqrst";return _[b]=7,x.split("").forEach(function(C){y[C]=C}),h({},_)[b]!=7||Object.keys(h({},y)).join("")!=x})?function(y,b){for(var x=p(y),C=arguments.length,M=1,D=c.f,H=a.f;C>M;)for(var N=d(arguments[M++]),B=D?f(N).concat(D(N)):f(N),ue=B.length,G=0,X;ue>G;)X=B[G++],(!o||H.call(N,X))&&(x[X]=N[X]);return x}:h},"0983":function(v,g,i){var o=i("c901");v.exports=function(f){return Object(o(f))}},"0a06":function(v,g,i){"use strict";var o=i("c532"),f=i("30b5"),c=i("f6b4"),a=i("5270"),p=i("4a7b"),d=i("848b"),h=d.validators;function _(y){this.defaults=y,this.interceptors={request:new c,response:new c}}_.prototype.request=function(b,x){typeof b=="string"?(x=x||{},x.url=b):x=b||{},x=p(this.defaults,x),x.method?x.method=x.method.toLowerCase():this.defaults.method?x.method=this.defaults.method.toLowerCase():x.method="get";var C=x.transitional;C!==void 0&&d.assertOptions(C,{silentJSONParsing:h.transitional(h.boolean),forcedJSONParsing:h.transitional(h.boolean),clarifyTimeoutError:h.transitional(h.boolean)},!1);var M=[],D=!0;this.interceptors.request.forEach(function(J){typeof J.runWhen=="function"&&J.runWhen(x)===!1||(D=D&&J.synchronous,M.unshift(J.fulfilled,J.rejected))});var H=[];this.interceptors.response.forEach(function(J){H.push(J.fulfilled,J.rejected)});var N;if(!D){var B=[a,void 0];for(Array.prototype.unshift.apply(B,M),B=B.concat(H),N=Promise.resolve(x);B.length;)N=N.then(B.shift(),B.shift());return N}for(var ue=x;M.length;){var G=M.shift(),X=M.shift();try{ue=G(ue)}catch(L){X(L);break}}try{N=a(ue)}catch(L){return Promise.reject(L)}for(;H.length;)N=N.then(H.shift(),H.shift());return N},_.prototype.getUri=function(b){return b=p(this.defaults,b),f(b.url,b.params,b.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(b){_.prototype[b]=function(x,C){return this.request(p(C||{},{method:b,url:x,data:(C||{}).data}))}}),o.forEach(["post","put","patch"],function(b){_.prototype[b]=function(x,C,M){return this.request(p(M||{},{method:b,url:x,data:C}))}}),v.exports=_},"0b99":function(v,g,i){"use strict";var o=i("19fa")(!0);i("393a")(String,"String",function(f){this._t=String(f),this._i=0},function(){var f=this._t,c=this._i,a;return c>=f.length?{value:void 0,done:!0}:(a=o(f,c),this._i+=a.length,{value:a,done:!1})})},"0bad":function(v,g,i){v.exports=!i("4b8b")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},"0c43":function(v,g,i){"use strict";i.r(g);var o=i("8d38"),f=i.n(o);for(var c in o)["default"].indexOf(c)<0&&function(a){i.d(g,a,function(){return o[a]})}(c)},"0df6":function(v,g,i){"use strict";v.exports=function(f){return function(a){return f.apply(null,a)}}},"10db":function(v,g){v.exports=function(i,o){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:o}}},1609:function(v,g){v.exports=function(i){if(typeof i!="function")throw TypeError(i+" is not a function!");return i}},1917:function(v,g){g.f={}.propertyIsEnumerable},"19fa":function(v,g,i){var o=i("fc5e"),f=i("c901");v.exports=function(c){return function(a,p){var d=String(f(a)),h=o(p),_=d.length,y,b;return h<0||h>=_?c?"":void 0:(y=d.charCodeAt(h),y<55296||y>56319||h+1===_||(b=d.charCodeAt(h+1))<56320||b>57343?c?d.charAt(h):y:c?d.slice(h,h+2):(y-55296<<10)+(b-56320)+65536)}}},"1a14":function(v,g,i){var o=i("77e9"),f=i("faf5"),c=i("3397"),a=Object.defineProperty;g.f=i("0bad")?Object.defineProperty:function(d,h,_){if(o(d),h=c(h,!0),o(_),f)try{return a(d,h,_)}catch{}if("get"in _||"set"in _)throw TypeError("Accessors not supported!");return"value"in _&&(d[h]=_.value),d}},"1d2b":function(v,g,i){"use strict";v.exports=function(f,c){return function(){for(var p=new Array(arguments.length),d=0;d=200&&x<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};f.forEach(["delete","get","head"],function(x){y.headers[x]={}}),f.forEach(["post","put","patch"],function(x){y.headers[x]=f.merge(p)}),v.exports=y}).call(this,i("4362"))},"24a2":function(v,g,i){var o=i("77e9"),f=i("7a41"),c=i("f2c2");v.exports=function(a,p){if(o(a),f(p)&&p.constructor===a)return p;var d=c.f(a),h=d.resolve;return h(p),d.promise}},"24fb":function(v,g,i){"use strict";v.exports=function(c){var a=[];return a.toString=function(){return this.map(function(d){var h=o(d,c);return d[2]?"@media ".concat(d[2]," {").concat(h,"}"):h}).join("")},a.i=function(p,d,h){typeof p=="string"&&(p=[[null,p,""]]);var _={};if(h)for(var y=0;y=0&&Math.floor(t)===t&&isFinite(e)}function D(e){return a(e)&&typeof e.then=="function"&&typeof e.catch=="function"}function H(e){return e==null?"":Array.isArray(e)||x(e)&&e.toString===y?JSON.stringify(e,null,2):String(e)}function N(e){var t=parseFloat(e);return isNaN(t)?e:t}function B(e,t){for(var r=Object.create(null),n=e.split(","),s=0;s-1)return e.splice(r,1)}}var L=Object.prototype.hasOwnProperty;function J(e,t){return L.call(e,t)}function ce(e){var t=Object.create(null);return function(n){var s=t[n];return s||(t[n]=e(n))}}var Se=/-(\w)/g,R=ce(function(e){return e.replace(Se,function(t,r){return r?r.toUpperCase():""})}),ee=ce(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),q=/\B([A-Z])/g,se=ce(function(e){return e.replace(q,"-$1").toLowerCase()});function ie(e,t){function r(n){var s=arguments.length;return s?s>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return r._length=e.length,r}function ge(e,t){return e.bind(t)}var Ie=Function.prototype.bind?ge:ie;function De(e,t){t=t||0;for(var r=e.length-t,n=new Array(r);r--;)n[r]=e[r+t];return n}function te(e,t){for(var r in t)e[r]=t[r];return e}function Me(e){for(var t={},r=0;r0,wt=$e&&$e.indexOf("edge/")>0,un=$e&&$e.indexOf("android")>0||gt==="android",cr=$e&&/iphone|ipad|ipod|ios/.test($e)||gt==="ios",fn=$e&&/chrome\/\d+/.test($e)&&!wt,cn=$e&&/phantomjs/.test($e),zt=$e&&$e.match(/firefox\/(\d+)/),Rt={}.watch,Wt=!1;if(ve)try{var Gt={};Object.defineProperty(Gt,"passive",{get:function(){Wt=!0}}),window.addEventListener("test-passive",null,Gt)}catch{}var bt,xt=function(){return bt===void 0&&(!ve&&!Be&&typeof o<"u"?bt=o.process&&o.process.env.VUE_ENV==="server":bt=!1),bt},Ct=ve&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function Ve(e){return typeof e=="function"&&/native code/.test(e.toString())}var Ot=typeof Symbol<"u"&&Ve(Symbol)&&typeof Reflect<"u"&&Ve(Reflect.ownKeys),st;typeof Set<"u"&&Ve(Set)?st=Set:st=function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(r){return this.set[r]===!0},e.prototype.add=function(r){this.set[r]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var Le=T,ln=T,dn=T,pn=T;if(0)var vn,hn,mn,_n;var lr=0,Ne=function(){this.id=lr++,this.subs=[]};Ne.prototype.addSub=function(t){this.subs.push(t)},Ne.prototype.removeSub=function(t){X(this.subs,t)},Ne.prototype.depend=function(){Ne.target&&Ne.target.addDep(this)},Ne.prototype.notify=function(){for(var t=this.subs.slice(),r=0,n=t.length;r-1){if(u&&!J(s,"default"))m=!1;else if(m===""||m===se(e)){var E=Cn(String,s.type);(E<0||O0&&(s=Rn(s,(t||"")+"_"+n),Mt(s[0])&&Mt(m)&&(r[u]=we(m.text+s[0].text),s.shift()),r.push.apply(r,s)):h(s)?Mt(m)?r[u]=we(m.text+s):s!==""&&r.push(we(s)):Mt(s)&&Mt(m)?r[u]=we(m.text+s.text):(p(e._isVList)&&a(s.tag)&&c(s.key)&&a(t)&&(s.key="__vlist"+t+"_"+n+"__"),r.push(s)));return r}function vs(e){var t=e.$options.provide;t&&(e._provided=typeof t=="function"?t.call(e):t)}function hs(e){var t=In(e.$options.inject,e);t&&(qe(!1),Object.keys(t).forEach(function(r){ut(e,r,t[r])}),qe(!0))}function In(e,t){if(e){for(var r=Object.create(null),n=Ot?Reflect.ownKeys(e):Object.keys(e),s=0;s0,u=e?!!e.$stable:!s,m=e&&e.$key;if(!e)n={};else{if(e._normalized)return e._normalized;if(u&&r&&r!==f&&m===r.$key&&!s&&!r.$hasNormal)return r;n={};for(var O in e)e[O]&&O[0]!=="$"&&(n[O]=_s(t,O,e[O]))}for(var E in t)E in n||(n[E]=ys(t,E));return e&&Object.isExtensible(e)&&(e._normalized=n),ye(n,"$stable",u),ye(n,"$key",m),ye(n,"$hasNormal",s),n}function _s(e,t,r){var n=function(){var s=arguments.length?r.apply(null,arguments):r({});s=s&&typeof s=="object"&&!Array.isArray(s)?[s]:Er(s);var u=s&&s[0];return s&&(!u||s.length===1&&u.isComment&&!Dt(u))?void 0:s};return r.proxy&&Object.defineProperty(e,t,{get:n,enumerable:!0,configurable:!0}),n}function ys(e,t){return function(){return e[t]}}function gs(e,t){var r,n,s,u,m;if(Array.isArray(e)||typeof e=="string")for(r=new Array(e.length),n=0,s=e.length;n1?De(u):u;for(var m=De(arguments,1),O='event handler for "'+r+'"',E=0,I=u.length;Edocument.createEvent("Event").timeStamp&&(Dr=function(){return Nr.now()})}function ks(){Zn=Dr(),Mr=!0;var e,t;for(Ke.sort(function(s,u){return s.id-u.id}),Et=0;EtEt&&Ke[r].id>e.id;)r--;Ke.splice(r+1,0,e)}$r||($r=!0,Cr(ks))}}var ro=0,ze=function(t,r,n,s,u){this.vm=t,u&&(t._watcher=this),t._watchers.push(this),s?(this.deep=!!s.deep,this.user=!!s.user,this.lazy=!!s.lazy,this.sync=!!s.sync,this.before=s.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++ro,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new st,this.newDepIds=new st,this.expression="",typeof r=="function"?this.getter=r:(this.getter=pe(r),this.getter||(this.getter=T)),this.value=this.lazy?void 0:this.get()};ze.prototype.get=function(){l(this);var t,r=this.vm;try{t=this.getter.call(r,r)}catch(n){if(this.user)ct(n,r,'getter for watcher "'+this.expression+'"');else throw n}finally{this.deep&&Qt(t),K(),this.cleanupDeps()}return t},ze.prototype.addDep=function(t){var r=t.id;this.newDepIds.has(r)||(this.newDepIds.add(r),this.newDeps.push(t),this.depIds.has(r)||t.addSub(this))},ze.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var r=this.deps[t];this.newDepIds.has(r.id)||r.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},ze.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():to(this)},ze.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||_(t)||this.deep){var r=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';St(this.cb,this.vm,[t,r],this.vm,n)}else this.cb.call(this.vm,t,r)}}},ze.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},ze.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},ze.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||X(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var tt={enumerable:!0,configurable:!0,get:T,set:T};function Lr(e,t,r){tt.get=function(){return this[t][r]},tt.set=function(s){this[t][r]=s},Object.defineProperty(e,r,tt)}function no(e){e._watchers=[];var t=e.$options;t.props&&io(e,t.props),t.methods&&fo(e,t.methods),t.data?so(e):at(e._data={},!0),t.computed&&uo(e,t.computed),t.watch&&t.watch!==Rt&&co(e,t.watch)}function io(e,t){var r=e.$options.propsData||{},n=e._props={},s=e.$options._propKeys=[],u=!e.$parent;u||qe(!1);var m=function(E){s.push(E);var I=_r(E,t,r,e);if(0)var $;else ut(n,E,I);E in e||Lr(e,"_props",E)};for(var O in t)m(O);qe(!0)}function so(e){var t=e.$options.data;t=e._data=typeof t=="function"?oo(t,e):t||{},x(t)||(t={});for(var r=Object.keys(t),n=e.$options.props,s=e.$options.methods,u=r.length;u--;){var m=r[u];n&&J(n,m)||ne(m)||Lr(e,"_data",m)}at(t,!0)}function oo(e,t){l();try{return e.call(t,t)}catch(r){return ct(r,t,"data()"),{}}finally{K()}}var ao={lazy:!0};function uo(e,t){var r=e._computedWatchers=Object.create(null),n=xt();for(var s in t){var u=t[s],m=typeof u=="function"?u:u.get;n||(r[s]=new ze(e,m||T,T,ao)),s in e||Qn(e,s,u)}}function Qn(e,t,r){var n=!xt();typeof r=="function"?(tt.get=n?kn(t):Vn(r),tt.set=T):(tt.get=r.get?n&&r.cache!==!1?kn(t):Vn(r.get):T,tt.set=r.set||T),Object.defineProperty(e,t,tt)}function kn(e){return function(){var r=this._computedWatchers&&this._computedWatchers[e];if(r)return r.dirty&&r.evaluate(),Ne.target&&r.depend(),r.value}}function Vn(e){return function(){return e.call(this,this)}}function fo(e,t){var r=e.$options.props;for(var n in t)e[n]=typeof t[n]!="function"?T:Ie(t[n],e)}function co(e,t){for(var r in t){var n=t[r];if(Array.isArray(n))for(var s=0;s-1)return this;var n=De(arguments,1);return n.unshift(this),typeof t.install=="function"?t.install.apply(t,n):typeof t=="function"&&t.apply(null,n),r.push(t),this}}function yo(e){e.mixin=function(t){return this.options=ft(this.options,t),this}}function go(e){e.cid=0;var t=1;e.extend=function(r){r=r||{};var n=this,s=n.cid,u=r._Ctor||(r._Ctor={});if(u[s])return u[s];var m=r.name||n.options.name,O=function(I){this._init(I)};return O.prototype=Object.create(n.prototype),O.prototype.constructor=O,O.cid=t++,O.options=ft(n.options,r),O.super=n,O.options.props&&bo(O),O.options.computed&&xo(O),O.extend=n.extend,O.mixin=n.mixin,O.use=n.use,xe.forEach(function(E){O[E]=n[E]}),m&&(O.options.components[m]=O),O.superOptions=n.options,O.extendOptions=r,O.sealedOptions=te({},O.options),u[s]=O,O}}function bo(e){var t=e.options.props;for(var r in t)Lr(e.prototype,"_props",r)}function xo(e){var t=e.options.computed;for(var r in t)Qn(e.prototype,r,t[r])}function Co(e){xe.forEach(function(t){e[t]=function(r,n){return n?(t==="component"&&x(n)&&(n.name=n.name||r,n=this.options._base.extend(n)),t==="directive"&&typeof n=="function"&&(n={bind:n,update:n}),this.options[t+"s"][r]=n,n):this.options[t+"s"][r]}})}function qn(e){return e&&(e.Ctor.options.name||e.tag)}function er(e,t){return Array.isArray(e)?e.indexOf(t)>-1:typeof e=="string"?e.split(",").indexOf(t)>-1:C(e)?e.test(t):!1}function ei(e,t){var r=e.cache,n=e.keys,s=e._vnode;for(var u in r){var m=r[u];if(m){var O=m.name;O&&!t(O)&&Ur(r,u,n,s)}}}function Ur(e,t,r,n){var s=e[t];s&&(!n||s.tag!==n.tag)&&s.componentInstance.$destroy(),e[t]=null,X(r,t)}var ti=[String,RegExp,Array],Oo={name:"keep-alive",abstract:!0,props:{include:ti,exclude:ti,max:[String,Number]},methods:{cacheVNode:function(){var t=this,r=t.cache,n=t.keys,s=t.vnodeToCache,u=t.keyToCache;if(s){var m=s.tag,O=s.componentInstance,E=s.componentOptions;r[u]={name:qn(E),tag:m,componentInstance:O},n.push(u),this.max&&n.length>parseInt(this.max)&&Ur(r,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ur(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",function(r){ei(t,function(n){return er(r,n)})}),this.$watch("exclude",function(r){ei(t,function(n){return!er(r,n)})})},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,r=Gn(t),n=r&&r.componentOptions;if(n){var s=qn(n),u=this,m=u.include,O=u.exclude;if(m&&(!s||!er(m,s))||O&&s&&er(O,s))return r;var E=this,I=E.cache,$=E.keys,U=r.key==null?n.Ctor.cid+(n.tag?"::"+n.tag:""):r.key;I[U]?(r.componentInstance=I[U].componentInstance,X($,U),$.push(U)):(this.vnodeToCache=r,this.keyToCache=U),r.data.keepAlive=!0}return r||t&&t[0]}},So={KeepAlive:Oo};function Eo(e){var t={};t.get=function(){return _e},Object.defineProperty(e,"config",t),e.util={warn:Le,extend:te,mergeOptions:ft,defineReactive:ut},e.set=pr,e.delete=gn,e.nextTick=Cr,e.observable=function(r){return at(r),r},e.options=Object.create(null),xe.forEach(function(r){e.options[r+"s"]=Object.create(null)}),e.options._base=e,te(e.options.components,So),_o(e),yo(e),go(e),Co(e)}Eo(Ae),Object.defineProperty(Ae.prototype,"$isServer",{get:xt}),Object.defineProperty(Ae.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Ae,"FunctionalRenderContext",{value:jr}),Ae.version="2.6.14";var Ao=B("style,class"),jo=B("input,textarea,option,select,progress"),To=function(e,t,r){return r==="value"&&jo(e)&&t!=="button"||r==="selected"&&e==="option"||r==="checked"&&e==="input"||r==="muted"&&e==="video"},ri=B("contenteditable,draggable,spellcheck"),Po=B("events,caret,typing,plaintext-only"),wo=function(e,t){return tr(t)||t==="false"?"false":e==="contenteditable"&&Po(t)?t:"true"},Ro=B("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Hr="http://www.w3.org/1999/xlink",zr=function(e){return e.charAt(5)===":"&&e.slice(0,5)==="xlink"},ni=function(e){return zr(e)?e.slice(6,e.length):""},tr=function(e){return e==null||e===!1};function Io(e){for(var t=e.data,r=e,n=e;a(n.componentInstance);)n=n.componentInstance._vnode,n&&n.data&&(t=ii(n.data,t));for(;a(r=r.parent);)r&&r.data&&(t=ii(t,r.data));return $o(t.staticClass,t.class)}function ii(e,t){return{staticClass:Wr(e.staticClass,t.staticClass),class:a(e.class)?[e.class,t.class]:t.class}}function $o(e,t){return a(e)||a(t)?Wr(e,Gr(t)):""}function Wr(e,t){return e?t?e+" "+t:e:t||""}function Gr(e){return Array.isArray(e)?Mo(e):_(e)?Do(e):typeof e=="string"?e:""}function Mo(e){for(var t="",r,n=0,s=e.length;n-1?rr[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:rr[e]=/HTMLUnknownElement/.test(t.toString())}var Kr=B("text,number,password,search,email,tel,url");function Uo(e){if(typeof e=="string"){var t=document.querySelector(e);return t||document.createElement("div")}else return e}function Ho(e,t){var r=document.createElement(e);return e!=="select"||t.data&&t.data.attrs&&t.data.attrs.multiple!==void 0&&r.setAttribute("multiple","multiple"),r}function zo(e,t){return document.createElementNS(No[e],t)}function Wo(e){return document.createTextNode(e)}function Go(e){return document.createComment(e)}function Jo(e,t,r){e.insertBefore(t,r)}function Ko(e,t){e.removeChild(t)}function Xo(e,t){e.appendChild(t)}function Yo(e){return e.parentNode}function Zo(e){return e.nextSibling}function Qo(e){return e.tagName}function ko(e,t){e.textContent=t}function Vo(e,t){e.setAttribute(t,"")}var qo=Object.freeze({createElement:Ho,createElementNS:zo,createTextNode:Wo,createComment:Go,insertBefore:Jo,removeChild:Ko,appendChild:Xo,parentNode:Yo,nextSibling:Zo,tagName:Qo,setTextContent:ko,setStyleScope:Vo}),ea={create:function(t,r){At(r)},update:function(t,r){t.data.ref!==r.data.ref&&(At(t,!0),At(r))},destroy:function(t){At(t,!0)}};function At(e,t){var r=e.data.ref;if(a(r)){var n=e.context,s=e.componentInstance||e.elm,u=n.$refs;t?Array.isArray(u[r])?X(u[r],s):u[r]===s&&(u[r]=void 0):e.data.refInFor?Array.isArray(u[r])?u[r].indexOf(s)<0&&u[r].push(s):u[r]=[s]:u[r]=s}}var dt=new j("",{},[]),Lt=["create","activate","update","remove","destroy"];function pt(e,t){return e.key===t.key&&e.asyncFactory===t.asyncFactory&&(e.tag===t.tag&&e.isComment===t.isComment&&a(e.data)===a(t.data)&&ta(e,t)||p(e.isAsyncPlaceholder)&&c(t.asyncFactory.error))}function ta(e,t){if(e.tag!=="input")return!0;var r,n=a(r=e.data)&&a(r=r.attrs)&&r.type,s=a(r=t.data)&&a(r=r.attrs)&&r.type;return n===s||Kr(n)&&Kr(s)}function ra(e,t,r){var n,s,u={};for(n=t;n<=r;++n)s=e[n].key,a(s)&&(u[s]=n);return u}function na(e){var t,r,n={},s=e.modules,u=e.nodeOps;for(t=0;tae?(Gi=c(w[de+1])?null:w[de+1].elm,Tt(A,Gi,w,oe,de,z)):oe>de&&Ye(S,fe,ae)}function sn(A){for(var S={},w=0;w-1?fi(e,t,r):Ro(t)?tr(r)?e.removeAttribute(t):(r=t==="allowfullscreen"&&e.tagName==="EMBED"?"true":t,e.setAttribute(t,r)):ri(t)?e.setAttribute(t,wo(t,r)):zr(t)?tr(r)?e.removeAttributeNS(Hr,ni(t)):e.setAttributeNS(Hr,t,r):fi(e,t,r)}function fi(e,t,r){if(tr(r))e.removeAttribute(t);else{if(Qe&&!ke&&e.tagName==="TEXTAREA"&&t==="placeholder"&&r!==""&&!e.__ieph){var n=function(s){s.stopImmediatePropagation(),e.removeEventListener("input",n)};e.addEventListener("input",n),e.__ieph=!0}e.setAttribute(t,r)}}var fa={create:ai,update:ai};function ci(e,t){var r=t.elm,n=t.data,s=e.data;if(!(c(n.staticClass)&&c(n.class)&&(c(s)||c(s.staticClass)&&c(s.class)))){var u=Io(t),m=r._transitionClasses;a(m)&&(u=Wr(u,Gr(m))),u!==r._prevClass&&(r.setAttribute("class",u),r._prevClass=u)}}var ca={create:ci,update:ci},Yr="__r",Zr="__c";function la(e){if(a(e[Yr])){var t=Qe?"change":"input";e[t]=[].concat(e[Yr],e[t]||[]),delete e[Yr]}a(e[Zr])&&(e.change=[].concat(e[Zr],e.change||[]),delete e[Zr])}var Bt;function da(e,t,r){var n=Bt;return function s(){var u=t.apply(null,arguments);u!==null&&li(e,s,r,n)}}var pa=gr&&!(zt&&Number(zt[1])<=53);function va(e,t,r,n){if(pa){var s=Zn,u=t;t=u._wrapper=function(m){if(m.target===m.currentTarget||m.timeStamp>=s||m.timeStamp<=0||m.target.ownerDocument!==document)return u.apply(this,arguments)}}Bt.addEventListener(e,t,Wt?{capture:r,passive:n}:r)}function li(e,t,r,n){(n||Bt).removeEventListener(e,t._wrapper||t,r)}function di(e,t){if(!(c(e.data.on)&&c(t.data.on))){var r=t.data.on||{},n=e.data.on||{};Bt=t.elm,la(r),Pn(r,n,va,li,da,t.context),Bt=void 0}}var ha={create:di,update:di},nr;function pi(e,t){if(!(c(e.data.domProps)&&c(t.data.domProps))){var r,n,s=t.elm,u=e.data.domProps||{},m=t.data.domProps||{};a(m.__ob__)&&(m=t.data.domProps=te({},m));for(r in u)r in m||(s[r]="");for(r in m){if(n=m[r],r==="textContent"||r==="innerHTML"){if(t.children&&(t.children.length=0),n===u[r])continue;s.childNodes.length===1&&s.removeChild(s.childNodes[0])}if(r==="value"&&s.tagName!=="PROGRESS"){s._value=n;var O=c(n)?"":String(n);ma(s,O)&&(s.value=O)}else if(r==="innerHTML"&&Jr(s.tagName)&&c(s.innerHTML)){nr=nr||document.createElement("div"),nr.innerHTML=""+n+"";for(var E=nr.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;E.firstChild;)s.appendChild(E.firstChild)}else if(n!==u[r])try{s[r]=n}catch{}}}}function ma(e,t){return!e.composing&&(e.tagName==="OPTION"||_a(e,t)||ya(e,t))}function _a(e,t){var r=!0;try{r=document.activeElement!==e}catch{}return r&&e.value!==t}function ya(e,t){var r=e.value,n=e._vModifiers;if(a(n)){if(n.number)return N(r)!==N(t);if(n.trim)return r.trim()!==t.trim()}return r!==t}var ga={create:pi,update:pi},ba=ce(function(e){var t={},r=/;(?![^(]*\))/g,n=/:(.+)/;return e.split(r).forEach(function(s){if(s){var u=s.split(n);u.length>1&&(t[u[0].trim()]=u[1].trim())}}),t});function Qr(e){var t=vi(e.style);return e.staticStyle?te(e.staticStyle,t):t}function vi(e){return Array.isArray(e)?Me(e):typeof e=="string"?ba(e):e}function xa(e,t){var r={},n;if(t)for(var s=e;s.componentInstance;)s=s.componentInstance._vnode,s&&s.data&&(n=Qr(s.data))&&te(r,n);(n=Qr(e.data))&&te(r,n);for(var u=e;u=u.parent;)u.data&&(n=Qr(u.data))&&te(r,n);return r}var Ca=/^--/,hi=/\s*!important$/,mi=function(e,t,r){if(Ca.test(t))e.style.setProperty(t,r);else if(hi.test(r))e.style.setProperty(se(t),r.replace(hi,""),"important");else{var n=Oa(t);if(Array.isArray(r))for(var s=0,u=r.length;s-1?t.split(gi).forEach(function(n){return e.classList.add(n)}):e.classList.add(t);else{var r=" "+(e.getAttribute("class")||"")+" ";r.indexOf(" "+t+" ")<0&&e.setAttribute("class",(r+t).trim())}}function xi(e,t){if(!(!t||!(t=t.trim())))if(e.classList)t.indexOf(" ")>-1?t.split(gi).forEach(function(s){return e.classList.remove(s)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var r=" "+(e.getAttribute("class")||"")+" ",n=" "+t+" ";r.indexOf(n)>=0;)r=r.replace(n," ");r=r.trim(),r?e.setAttribute("class",r):e.removeAttribute("class")}}function Ci(e){if(e){if(typeof e=="object"){var t={};return e.css!==!1&&te(t,Oi(e.name||"v")),te(t,e),t}else if(typeof e=="string")return Oi(e)}}var Oi=ce(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),Si=ve&&!ke,jt="transition",kr="animation",sr="transition",or="transitionend",Vr="animation",Ei="animationend";Si&&(window.ontransitionend===void 0&&window.onwebkittransitionend!==void 0&&(sr="WebkitTransition",or="webkitTransitionEnd"),window.onanimationend===void 0&&window.onwebkitanimationend!==void 0&&(Vr="WebkitAnimation",Ei="webkitAnimationEnd"));var Ai=ve?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function ji(e){Ai(function(){Ai(e)})}function vt(e,t){var r=e._transitionClasses||(e._transitionClasses=[]);r.indexOf(t)<0&&(r.push(t),bi(e,t))}function Xe(e,t){e._transitionClasses&&X(e._transitionClasses,t),xi(e,t)}function Ti(e,t,r){var n=Pi(e,t),s=n.type,u=n.timeout,m=n.propCount;if(!s)return r();var O=s===jt?or:Ei,E=0,I=function(){e.removeEventListener(O,$),r()},$=function(U){U.target===e&&++E>=m&&I()};setTimeout(function(){E0&&(I=jt,$=u,U=s.length):t===kr?E>0&&(I=kr,$=E,U=O.length):($=Math.max(u,E),I=$>0?u>E?jt:kr:null,U=I?I===jt?s.length:O.length:0);var k=I===jt&&Ea.test(r[sr+"Property"]);return{type:I,timeout:$,propCount:U,hasTransform:k}}function wi(e,t){for(;e.length explicit "+t+" duration is not a valid number - got "+JSON.stringify(e)+".",r.context):isNaN(e)&&Le(" explicit "+t+" duration is NaN - the duration expression might be incorrect.",r.context)}function $i(e){return typeof e=="number"&&!isNaN(e)}function en(e){if(c(e))return!1;var t=e.fns;return a(t)?en(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function Mi(e,t){t.data.show!==!0&&qr(t)}var Aa=ve?{create:Mi,activate:Mi,remove:function(t,r){t.data.show!==!0?Ii(t,r):r()}}:{},ja=[fa,ca,ha,ga,Sa,Aa],Ta=ja.concat(ua),Pa=na({nodeOps:qo,modules:Ta});ke&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&tn(e,"input")});var Di={inserted:function(t,r,n,s){n.tag==="select"?(s.elm&&!s.elm._vOptions?et(n,"postpatch",function(){Di.componentUpdated(t,r,n)}):Ni(t,r,n.context),t._vOptions=[].map.call(t.options,ar)):(n.tag==="textarea"||Kr(t.type))&&(t._vModifiers=r.modifiers,r.modifiers.lazy||(t.addEventListener("compositionstart",wa),t.addEventListener("compositionend",Bi),t.addEventListener("change",Bi),ke&&(t.vmodel=!0)))},componentUpdated:function(t,r,n){if(n.tag==="select"){Ni(t,r,n.context);var s=t._vOptions,u=t._vOptions=[].map.call(t.options,ar);if(u.some(function(O,E){return!P(O,s[E])})){var m=t.multiple?r.value.some(function(O){return Fi(O,u)}):r.value!==r.oldValue&&Fi(r.value,u);m&&tn(t,"change")}}}};function Ni(e,t,r){Li(e,t,r),(Qe||wt)&&setTimeout(function(){Li(e,t,r)},0)}function Li(e,t,r){var n=t.value,s=e.multiple;if(!(s&&!Array.isArray(n))){for(var u,m,O=0,E=e.options.length;O-1,m.selected!==u&&(m.selected=u);else if(P(ar(m),n)){e.selectedIndex!==O&&(e.selectedIndex=O);return}s||(e.selectedIndex=-1)}}function Fi(e,t){return t.every(function(r){return!P(r,e)})}function ar(e){return"_value"in e?e._value:e.value}function wa(e){e.target.composing=!0}function Bi(e){e.target.composing&&(e.target.composing=!1,tn(e.target,"input"))}function tn(e,t){var r=document.createEvent("HTMLEvents");r.initEvent(t,!0,!0),e.dispatchEvent(r)}function rn(e){return e.componentInstance&&(!e.data||!e.data.transition)?rn(e.componentInstance._vnode):e}var Ra={bind:function(t,r,n){var s=r.value;n=rn(n);var u=n.data&&n.data.transition,m=t.__vOriginalDisplay=t.style.display==="none"?"":t.style.display;s&&u?(n.data.show=!0,qr(n,function(){t.style.display=m})):t.style.display=s?m:"none"},update:function(t,r,n){var s=r.value,u=r.oldValue;if(!s!=!u){n=rn(n);var m=n.data&&n.data.transition;m?(n.data.show=!0,s?qr(n,function(){t.style.display=t.__vOriginalDisplay}):Ii(n,function(){t.style.display="none"})):t.style.display=s?t.__vOriginalDisplay:"none"}},unbind:function(t,r,n,s,u){u||(t.style.display=t.__vOriginalDisplay)}},Ia={model:Di,show:Ra},Ui={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function nn(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?nn(Gn(t.children)):e}function Hi(e){var t={},r=e.$options;for(var n in r.propsData)t[n]=e[n];var s=r._parentListeners;for(var u in s)t[R(u)]=s[u];return t}function zi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function $a(e){for(;e=e.parent;)if(e.data.transition)return!0}function Ma(e,t){return t.key===e.key&&t.tag===e.tag}var Da=function(e){return e.tag||Dt(e)},Na=function(e){return e.name==="show"},La={name:"transition",props:Ui,abstract:!0,render:function(t){var r=this,n=this.$slots.default;if(n&&(n=n.filter(Da),!!n.length)){var s=this.mode,u=n[0];if($a(this.$vnode))return u;var m=nn(u);if(!m)return u;if(this._leaving)return zi(t,u);var O="__transition-"+this._uid+"-";m.key=m.key==null?m.isComment?O+"comment":O+m.tag:h(m.key)?String(m.key).indexOf(O)===0?m.key:O+m.key:m.key;var E=(m.data||(m.data={})).transition=Hi(this),I=this._vnode,$=nn(I);if(m.data.directives&&m.data.directives.some(Na)&&(m.data.show=!0),$&&$.data&&!Ma(m,$)&&!Dt($)&&!($.componentInstance&&$.componentInstance._vnode.isComment)){var U=$.data.transition=te({},E);if(s==="out-in")return this._leaving=!0,et(U,"afterLeave",function(){r._leaving=!1,r.$forceUpdate()}),zi(t,u);if(s==="in-out"){if(Dt(m))return I;var k,he=function(){k()};et(E,"afterEnter",he),et(E,"enterCancelled",he),et(U,"delayLeave",function(Ee){k=Ee})}}return u}}},Wi=te({tag:String,moveClass:String},Ui);delete Wi.mode;var Fa={props:Wi,beforeMount:function(){var t=this,r=this._update;this._update=function(n,s){var u=Kn(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,u(),r.call(t,n,s)}},render:function(t){for(var r=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),s=this.prevChildren=this.children,u=this.$slots.default||[],m=this.children=[],O=Hi(this),E=0;E"u"||(o.isArray(x)?C=C+"[]":x=[x],o.forEach(x,function(D){o.isDate(D)?D=D.toISOString():o.isObject(D)&&(D=JSON.stringify(D)),_.push(f(C)+"="+f(D))}))}),h=_.join("&")}if(h){var y=a.indexOf("#");y!==-1&&(a=a.slice(0,y)),a+=(a.indexOf("?")===-1?"?":"&")+h}return a}},3397:function(v,g,i){var o=i("7a41");v.exports=function(f,c){if(!o(f))return f;var a,p;if(c&&typeof(a=f.toString)=="function"&&!o(p=a.call(f))||typeof(a=f.valueOf)=="function"&&!o(p=a.call(f))||!c&&typeof(a=f.toString)=="function"&&!o(p=a.call(f)))return p;throw TypeError("Can't convert object to primitive value")}},"35d6":function(v,g,i){"use strict";i.r(g),i.d(g,"default",function(){return f});function o(d,h){for(var _=[],y={},b=0;bb;)if(x=_[b++],x!=x)return!0}else for(;y>b;b++)if((a||b in _)&&_[b]===d)return a||b||0;return!a&&-1}}},"3f6b":function(v,g,i){v.exports={default:i("b9c7"),__esModule:!0}},4362:function(v,g,i){g.nextTick=function(f){var c=Array.prototype.slice.call(arguments);c.shift(),setTimeout(function(){f.apply(null,c)},0)},g.platform=g.arch=g.execPath=g.title="browser",g.pid=1,g.browser=!0,g.env={},g.argv=[],g.binding=function(o){throw new Error("No such module. (Possibly not yet loaded)")},function(){var o="/",f;g.cwd=function(){return o},g.chdir=function(c){f||(f=i("df7c")),o=f.resolve(c,o)}}(),g.exit=g.kill=g.umask=g.dlopen=g.uptime=g.memoryUsage=g.uvCounters=function(){},g.features={}},"467f":function(v,g,i){"use strict";var o=i("2d83");v.exports=function(c,a,p){var d=p.config.validateStatus;!p.status||!d||d(p.status)?c(p):a(o("Request failed with status code "+p.status,p.config,null,p.request,p))}},4849:function(v,g,i){v.exports={default:i("3787"),__esModule:!0}},"4a5c":function(v,g,i){var o=i("24fb");g=o(!1),g.push([v.i,".ecl-builder{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}input,select{padding:3px}.add{background-color:#4ea24e;color:#fff;font-weight:700;border-radius:11px;padding:0 6px;text-align:center;display:inline;cursor:pointer;margin-left:4px}.dropdown{position:relative;display:inline-block;cursor:pointer}.dropdown-content{display:none;width:200px;margin-left:-100px;position:absolute;background-color:#fff;box-shadow:0 0 10px rgba(0,0,0,.25);z-index:1;border-radius:4px}.dropdown:hover .dropdown-content{display:block}.dropdown .item{padding:7px 15px;border-bottom:1px solid #ccc}.dropdown .item:hover{background-color:#3aa373;color:#fff}.dropdown .item-subtitle{padding:7px;font-weight:700;color:grey;border-bottom:1px solid #ccc;font-size:.9em}.dropdown-content .item:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:0}",""]),v.exports=g},"4a7b":function(v,g,i){"use strict";var o=i("c532");v.exports=function(c,a){a=a||{};var p={};function d(C,M){return o.isPlainObject(C)&&o.isPlainObject(M)?o.merge(C,M):o.isPlainObject(M)?o.merge({},M):o.isArray(M)?M.slice():M}function h(C){if(o.isUndefined(a[C])){if(!o.isUndefined(c[C]))return d(void 0,c[C])}else return d(c[C],a[C])}function _(C){if(!o.isUndefined(a[C]))return d(void 0,a[C])}function y(C){if(o.isUndefined(a[C])){if(!o.isUndefined(c[C]))return d(void 0,c[C])}else return d(void 0,a[C])}function b(C){if(C in a)return d(c[C],a[C]);if(C in c)return d(void 0,c[C])}var x={url:_,method:_,data:_,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:b};return o.forEach(Object.keys(c).concat(Object.keys(a)),function(M){var D=x[M]||h,H=D(M);o.isUndefined(H)&&D!==b||(p[M]=H)}),p}},"4b8b":function(v,g){v.exports=function(i){try{return!!i()}catch{return!0}}},"4d88":function(v,g){var i={}.toString;v.exports=function(o){return i.call(o).slice(8,-1)}},"4de9":function(v,g){v.exports=function(i,o,f){var c=f===void 0;switch(o.length){case 0:return c?i():i.call(f);case 1:return c?i(o[0]):i.call(f,o[0]);case 2:return c?i(o[0],o[1]):i.call(f,o[0],o[1]);case 3:return c?i(o[0],o[1],o[2]):i.call(f,o[0],o[1],o[2]);case 4:return c?i(o[0],o[1],o[2],o[3]):i.call(f,o[0],o[1],o[2],o[3])}return i.apply(f,o)}},"512c":function(v,g,i){var o=i("ef08"),f=i("5524"),c=i("9c0c"),a=i("051b"),p=i("9c0e"),d="prototype",h=function(_,y,b){var x=_&h.F,C=_&h.G,M=_&h.S,D=_&h.P,H=_&h.B,N=_&h.W,B=C?f:f[y]||(f[y]={}),ue=B[d],G=C?o:M?o[y]:(o[y]||{})[d],X,L,J;C&&(b=y);for(X in b)L=!x&&G&&G[X]!==void 0,!(L&&p(B,X))&&(J=L?G[X]:b[X],B[X]=C&&typeof G[X]!="function"?b[X]:H&&L?c(J,o):N&&G[X]==J?function(ce){var Se=function(R,ee,q){if(this instanceof ce){switch(arguments.length){case 0:return new ce;case 1:return new ce(R);case 2:return new ce(R,ee)}return new ce(R,ee,q)}return ce.apply(this,arguments)};return Se[d]=ce[d],Se}(J):D&&typeof J=="function"?c(Function.call,J):J,D&&((B.virtual||(B.virtual={}))[X]=J,_&h.R&&ue&&!ue[X]&&a(ue,X,J)))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,v.exports=h},5270:function(v,g,i){"use strict";var o=i("c532"),f=i("c401"),c=i("2e67"),a=i("2444"),p=i("7a77");function d(h){if(h.cancelToken&&h.cancelToken.throwIfRequested(),h.signal&&h.signal.aborted)throw new p("canceled")}v.exports=function(_){d(_),_.headers=_.headers||{},_.data=f.call(_,_.data,_.headers,_.transformRequest),_.headers=o.merge(_.headers.common||{},_.headers[_.method]||{},_.headers),o.forEach(["delete","get","head","post","put","patch","common"],function(x){delete _.headers[x]});var y=_.adapter||a.adapter;return y(_).then(function(x){return d(_),x.data=f.call(_,x.data,x.headers,_.transformResponse),x},function(x){return c(x)||(d(_),x&&x.response&&(x.response.data=f.call(_,x.response.data,x.response.headers,_.transformResponse))),Promise.reject(x)})}},"531d":function(v,g,i){"use strict";i.r(g);var o=i("75d5"),f=i.n(o);for(var c in o)["default"].indexOf(c)<0&&function(a){i.d(g,a,function(){return o[a]})}(c)},5384:function(v,g,i){"use strict";i.r(g);var o=i("928e"),f=i.n(o);for(var c in o)["default"].indexOf(c)<0&&function(a){i.d(g,a,function(){return o[a]})}(c)},5524:function(v,g){var i=v.exports={version:"2.6.12"};typeof __e=="number"&&(__e=i)},5855:function(v,g,i){var o=i("24fb");g=o(!1),g.push([v.i,".expression-constraint[data-v-51336bc4]{background-color:#f5e6e6;padding:8px;display:inline-block;border-radius:10px;border:1px solid #c8cfd6;text-align:left}.expression-constraint>div[data-v-51336bc4]{margin:5px}",""]),v.exports=g},"5a74":function(v,g,i){"use strict";if(i.r(g),typeof window<"u"){var o=window.document.currentScript;if(Object({NODE_ENV:"production",BASE_URL:"/"}).NEED_CURRENTSCRIPT_POLYFILL){var f=i("8875");o=f(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:f})}var c=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(i.p=c[1])}var a=null,p=i("2b0e");const d=/-(\w)/g,h=T=>T.replace(d,(W,Z)=>Z?Z.toUpperCase():""),_=/\B([A-Z])/g,y=T=>T.replace(_,"-$1").toLowerCase();function b(T){const W={};return T.forEach(Z=>{W[Z]=void 0}),W}function x(T,W,Z){T[W]=[].concat(T[W]||[]),T[W].unshift(Z)}function C(T,W){T&&(T.$options[W]||[]).forEach(P=>{P.call(T)})}function M(T,W){return new CustomEvent(T,{bubbles:!1,cancelable:!1,detail:W})}const D=T=>/function Boolean/.test(String(T)),H=T=>/function Number/.test(String(T));function N(T,W,{type:Z}={}){if(D(Z))return T==="true"||T==="false"?T==="true":T===""||T===W||T!=null?!0:T;if(H(Z)){const P=parseFloat(T,10);return isNaN(P)?T:P}else return T}function B(T,W){const Z=[];for(let P=0,F=W.length;P(pe[Oe]=Ce[ye[ve]],pe),{}),x(ne,"beforeCreate",function(){const pe=this.$emit;this.$emit=(Oe,...ve)=>(this.$root.$options.customElement.dispatchEvent(M(Oe,ve)),pe.call(this,Oe,...ve))}),x(ne,"created",function(){V.forEach(pe=>{this.$root.props[pe]=this[pe]})}),V.forEach(pe=>{Object.defineProperty(_e.prototype,pe,{get(){return this._wrapper.props[pe]},set(Oe){this._wrapper.props[pe]=Oe},enumerable:!1,configurable:!0})}),P=!0}function je(be,ne){const ye=h(ne),Ce=be.hasAttribute(ne)?be.getAttribute(ne):void 0;be._wrapper.props[ye]=N(Ce,ne,re[ye])}class _e extends HTMLElement{constructor(){const ne=super();ne.attachShadow({mode:"open"});const ye=ne._wrapper=new T({name:"shadow-root",customElement:ne,shadowRoot:ne.shadowRoot,data(){return{props:{},slotChildren:[]}},render(pe){return pe(W,{ref:"inner",props:this.props},this.slotChildren)}});new MutationObserver(pe=>{let Oe=!1;for(let ve=0;ve{ne.props=b(V),F.forEach(Ce=>{je(this,Ce)})};P?ye():W().then(Ce=>{(Ce.__esModule||Ce[Symbol.toStringTag]==="Module")&&(Ce=Ce.default),xe(Ce),ye()}),ne.slotChildren=Object.freeze(B(ne.$createElement,this.childNodes)),ne.$mount(),this.shadowRoot.appendChild(ne.$el)}}disconnectedCallback(){C(this.vueComponent,"deactivated")}}return Z||xe(W),_e}var L=X,J=i("24fb"),ce=i("35d6"),Se=i("2877"),R=function(){var T=this,W=T.$createElement,Z=T._self._c||W;return Z("div",{staticClass:"ecl-builder",staticStyle:{display:"grid",margin:"10px"}},[Z("ExpressionConstraint",{attrs:{apiurl:T.apiurl,branch:T.branch,model:T.model,allowRefinement:"true"}}),T.eclModelString?Z("textarea",{directives:[{name:"model",rawName:"v-model",value:T.eclModelString,expression:"eclModelString"}],attrs:{cols:"60",rows:"5",hidden:""},domProps:{value:T.eclModelString},on:{input:function(P){P.target.composing||(T.eclModelString=P.target.value)}}}):T._e(),T.showoutput?Z("div",[Z("h3",[T._v("Output")]),T.eclOutput?Z("textarea",{directives:[{name:"model",rawName:"v-model",value:T.eclOutput,expression:"eclOutput"}],attrs:{cols:"60",rows:"5",disabled:""},domProps:{value:T.eclOutput},on:{input:function(P){P.target.composing||(T.eclOutput=P.target.value)}}}):T._e()]):T._e()],1)},ee=[],q=i("bc3a"),se=i.n(q),ie=i("8043"),ge={name:"ECLBuilder",components:{ExpressionConstraint:ie.default},props:{apiurl:String,branch:String,eclstring:String,showoutput:Boolean},emits:["eclOutput"],computed:{eclModelString(){let T=JSON.stringify(this.model);return this.updateOutput(this.model),T}},data(){return{model:{},eclOutput:"loading"}},watch:{eclstring(){this.readEcl()}},mounted(){this.readEcl()},methods:{readEcl(){this.model={},this.stringToModel(T=>this.model=T)},stringToModel:function(T){console.log('this.eclstring = "'+this.eclstring+'"');let W=this.eclstring;W||(W="*"),se()({url:this.apiurl+"/util/ecl-string-to-model",method:"post",data:W,headers:{"Content-Type":"text/plain"}}).then(Z=>{T(this.transformIn(Z.data))})},transformIn:function(T){const W=/[0-9]+/;let Z=this;for(var P in T)!W.test(P)&&Object.prototype.hasOwnProperty.call(T,P)&&(P==="wildcard"&&T[P]===!0?T.conceptId="*":P==="term"?T.conceptId+=" |"+T.term+"|":P==="returnAllMemberFields"?delete T[P]:Array.isArray(T[P])?T[P].forEach(function(V){V.id=Z.random(),Z.transformIn(V)}):this.transformIn(T[P]));return T},updateOutput:function(T){const W=JSON.stringify(T);if(W=="{}")return;let Z=JSON.parse(W);this.transformOut(Z);let P=this;se()({url:this.apiurl+"/util/ecl-model-to-string",method:"post",data:Z,headers:{"Content-Type":"text/plain"}}).then(F=>{P.eclOutput=F.data.eclString,P.$emit("eclOutput",P.eclOutput)})},transformOut:function(T){const W=/[0-9]+/;let Z=this;for(var P in T)if(!W.test(P)&&Object.prototype.hasOwnProperty.call(T,P))if(P==="operator"&&T[P].length===0)delete T[P];else if(P==="conceptId"){let F=T[P];T.wildcard=F==="*",T.wildcard?(delete T.conceptId,delete T.term):F.indexOf("|")!=-1&&(T.term=F.substring(F.indexOf("|")+1).replaceAll("|","").trim(),T[P]=F.substring(0,F.indexOf("|")).trim())}else Array.isArray(T[P])?T[P].forEach(function(V){delete V.id,Z.transformOut(V)}):this.transformOut(T[P])},random:function(){return Math.floor(Math.random()*1e8)}}},Ie=ge;function De(T){var W=i("0100");W.__inject__&&W.__inject__(T)}var te=Object(Se.a)(Ie,R,ee,!1,De,null,null,!0),Me=te.exports;window.customElements.define("snomed-ecl-builder",L(p.default,Me))},"5a94":function(v,g,i){var o=i("b367")("keys"),f=i("8b1a");v.exports=function(c){return o[c]||(o[c]=f(c))}},"5cb7":function(v,g,i){"use strict";var o=i("512c"),f=i("f2c2"),c=i("c2a3");o(o.S,"Promise",{try:function(a){var p=f.f(this),d=c(a);return(d.e?p.reject:p.resolve)(d.v),p.promise}})},"5cce":function(v,g){v.exports={version:"0.26.0"}},"5f02":function(v,g,i){"use strict";var o=i("c532");v.exports=function(c){return o.isObject(c)&&c.isAxiosError===!0}},6042:function(v,g,i){"use strict";g.__esModule=!0;var o=i("4849"),f=c(o);function c(a){return a&&a.__esModule?a:{default:a}}g.default=function(a,p,d){return p in a?(0,f.default)(a,p,{value:d,enumerable:!0,configurable:!0,writable:!0}):a[p]=d,a}},"658f":function(v,g,i){i("6858");for(var o=i("ef08"),f=i("051b"),c=i("8a0d"),a=i("cc15")("toStringTag"),p="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),d=0;d=p.length?(this._t=void 0,f(1)):d=="keys"?f(0,h):d=="values"?f(0,p[h]):f(0,[h,p[h]])},"values"),c.Arguments=c.Array,o("keys"),o("values"),o("entries")},"6aa8":function(v,g,i){var o=i("4d88"),f=i("cc15")("toStringTag"),c=o(function(){return arguments}())=="Arguments",a=function(p,d){try{return p[d]}catch{}};v.exports=function(p){var d,h,_;return p===void 0?"Undefined":p===null?"Null":typeof(h=a(d=Object(p),f))=="string"?h:c?o(d):(_=o(d))=="Object"&&typeof d.callee=="function"?"Arguments":_}},"6ca1":function(v,g,i){var o=i("9fbb"),f=i("c901");v.exports=function(c){return o(f(c))}},"6d2f":function(v,g,i){var o=i("8a0d"),f=i("cc15")("iterator"),c=Array.prototype;v.exports=function(a){return a!==void 0&&(o.Array===a||c[f]===a)}},"6f4f":function(v,g,i){var o=i("77e9"),f=i("85e7"),c=i("9742"),a=i("5a94")("IE_PROTO"),p=function(){},d="prototype",h=function(){var _=i("05f5")("iframe"),y=c.length,b="<",x=">",C;for(_.style.display="none",i("9141").appendChild(_),_.src="javascript:",C=_.contentWindow.document,C.open(),C.write(b+"script"+x+"document.F=Object"+b+"/script"+x),C.close(),h=C.F;y--;)delete h[d][c[y]];return h()};v.exports=Object.create||function(y,b){var x;return y!==null?(p[d]=o(y),x=new p,p[d]=null,x[a]=y):x=h(),b===void 0?x:f(x,b)}},"75d5":function(v,g,i){var o=i("02ce");o.__esModule&&(o=o.default),typeof o=="string"&&(o=[[v.i,o,""]]),o.locals&&(v.exports=o.locals);var f=i("35d6").default;v.exports.__inject__=function(c){f("3cba65ec",o,c)}},"77e9":function(v,g,i){var o=i("7a41");v.exports=function(f){if(!o(f))throw TypeError(f+" is not an object!");return f}},"7a41":function(v,g){v.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},"7a77":function(v,g,i){"use strict";function o(f){this.message=f}o.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},o.prototype.__CANCEL__=!0,v.exports=o},"7aac":function(v,g,i){"use strict";var o=i("c532");v.exports=o.isStandardBrowserEnv()?function(){return{write:function(a,p,d,h,_,y){var b=[];b.push(a+"="+encodeURIComponent(p)),o.isNumber(d)&&b.push("expires="+new Date(d).toGMTString()),o.isString(h)&&b.push("path="+h),o.isString(_)&&b.push("domain="+_),y===!0&&b.push("secure"),document.cookie=b.join("; ")},read:function(a){var p=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return p?decodeURIComponent(p[3]):null},remove:function(a){this.write(a,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},8043:function(v,g,i){"use strict";i.r(g);var o=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",{staticClass:"expression-constraint"},[l._v(" Focus concepts"),l.allowRefinement?j("div",{staticClass:"dropdown"},[l.model.exclusionExpressionConstraint?l._e():j("div",{staticClass:"add"},[l._v("+")]),j("div",{staticClass:"dropdown-content"},[j("div",{staticClass:"item-subtitle"},[l._v("Add constraint:")]),l.model.wildcard||l.model.conceptId?j("div",[j("div",{staticClass:"item",on:{click:l.addDisjunction}},[l._v(' "Or" concept ')]),j("div",{staticClass:"item",on:{click:l.addConjunction}},[l._v(' "And" concept ')]),j("div",{staticClass:"item",on:{click:l.addExclusion}},[l._v(' "Minus" concept ')])]):l._e(),l.model.disjunctionExpressionConstraints?j("div",{staticClass:"item",on:{click:l.addDisjunctionToExisting}},[l._v(' "Or" concept ')]):l._e(),l.model.conjunctionExpressionConstraints?j("div",{staticClass:"item",on:{click:l.addConjunctionToExisting}},[l._v(' "And" concept ')]):l._e()])]):l._e(),l.model.wildcard||l.model.conceptId?j("div",[j("SubExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model,allowRefinement:!0},on:{addAttribute:function(Y){return l.addAttribute(l.model)}}})],1):l._e(),l.model.eclRefinement?j("div",[j("RefinedExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model,allowRefinement:!0},on:{addAttribute:l.refinedExpressionAddAttribute}})],1):l._e(),l.model.conjunctionExpressionConstraints||l.model.disjunctionExpressionConstraints||l.model.exclusionExpressionConstraints?j("div",[j("CompoundExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model},on:{addAttribute:l.compoundExpressionAddAttribute}})],1):l._e()])},f=[],c=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",[l.model.nestedExpressionConstraint?l._e():j("div",{staticClass:"grid-container"},[j("ConstraintOperator",{attrs:{model:l.model}}),j("ConceptTypeahead",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model,ecl:l.ecl}}),l.allowRefinement?j("div",{staticClass:"dropdown"},[j("div",{staticClass:"add"},[l._v("+")]),j("div",{staticClass:"dropdown-content"},[j("div",{staticClass:"item-subtitle"},[l._v("Add refinement:")]),j("div",{staticClass:"item",on:{click:function(Y){return l.$emit("addAttribute")}}},[l._v('"And" attribute')])])]):l._e()],1),l.model.nestedExpressionConstraint?j("div",[j("ExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.nestedExpressionConstraint}})],1):l._e()])},a=[],p=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("select",{directives:[{name:"model",rawName:"v-model",value:l.model.operator,expression:"model.operator"}],on:{change:function(Y){var Te=Array.prototype.filter.call(Y.target.options,function(we){return we.selected}).map(function(we){var ot="_value"in we?we._value:we.value;return ot});l.$set(l.model,"operator",Y.target.multiple?Te:Te[0])}}},[j("option",{attrs:{value:""}},[l._v("Self")]),j("option",{attrs:{value:"descendantof"}},[l._v("< Descendant of")]),j("option",{attrs:{value:"descendantorselfof"}},[l._v("<< Descendants or Self of")]),j("option",{attrs:{value:"childof"}},[l._v(" Ancestor of")]),j("option",{attrs:{value:"ancestororselfof"}},[l._v(">> Ancestor or Self of")]),j("option",{attrs:{value:"parentof"}},[l._v(">! Parent of")]),j("option",{attrs:{value:"memberOf"}},[l._v("^ Member of")])])},d=[],h={name:"ConstraintOperator",props:{model:Object},mounted(){this.init()},updated(){this.init()},methods:{init(){this.model.operator||this.$set(this.model,"operator","")}}},_=h,y=i("2877"),b=Object(y.a)(_,p,d,!1,null,null,null,!0),x=b.exports,C=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",{staticClass:"ConceptTypeahead"},[l.loading?j("i",{staticClass:"fa fa-spinner fa-spin"}):[j("i",{directives:[{name:"show",rawName:"v-show",value:l.isEmpty,expression:"isEmpty"}],staticClass:"fa fa-search"}),j("i",{directives:[{name:"show",rawName:"v-show",value:l.isDirty,expression:"isDirty"}],staticClass:"fa fa-times",on:{click:l.reset}})],j("input",{directives:[{name:"model",rawName:"v-model",value:l.query,expression:"query"}],attrs:{type:"text",autocomplete:"off"},domProps:{value:l.query},on:{keydown:[function(Y){return!Y.type.indexOf("key")&&l._k(Y.keyCode,"down",40,Y.key,["Down","ArrowDown"])?null:l.down.apply(null,arguments)},function(Y){return!Y.type.indexOf("key")&&l._k(Y.keyCode,"up",38,Y.key,["Up","ArrowUp"])?null:l.up.apply(null,arguments)},function(Y){return!Y.type.indexOf("key")&&l._k(Y.keyCode,"enter",13,Y.key,"Enter")?null:l.hit.apply(null,arguments)},function(Y){return!Y.type.indexOf("key")&&l._k(Y.keyCode,"esc",27,Y.key,["Esc","Escape"])?null:l.reset.apply(null,arguments)}],blur:l.reset,input:[function(Y){Y.target.composing||(l.query=Y.target.value)},l.update]}}),j("div",{staticClass:"info",class:{show:l.ecl}},[j("div",{staticClass:"icon"},[l._v("i")]),l._m(0)]),j("ul",{directives:[{name:"show",rawName:"v-show",value:l.hasItems,expression:"hasItems"}]},l._l(l.items,function(Y,Te){return j("li",{key:Y.conceptId,class:l.activeClass(Te),on:{mousedown:l.hit,mousemove:function(we){return l.setActive(Te)}}},[j("span",{domProps:{textContent:l._s(Y.fsn.term)}})])}),0)],2)},M=[function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",{staticClass:"info-message"},[l._v("Input is constrained using the "),j("a",{attrs:{href:"http://snomed.org/mrcm",target:"_blank"}},[l._v("concept model rules")]),l._v(".")])}],D=i("ff5a"),H=i.n(D),N=i("bc3a"),B=i.n(N),ue=i("2b0e");ue.default.prototype.$http=B.a;var G={name:"ConceptTypeahead",extends:H.a,props:{apiurl:String,branch:String,model:Object,ecl:String},data:function(){return{query:this.model.conceptId,src:this.apiurl+"/"+this.branch+"/concepts",data:{activeFilter:!0,termActive:!0,limit:10},limit:10,minChars:3,selectFirst:!0,queryParamName:"term"}},methods:{onHit(l){l==="*"?this.query="*":this.query=l.conceptId+" |"+l.fsn.term+"|",this.$set(this.model,"conceptId",this.query),this.reset()},prepareResponseData(l){return l.items},update(){if(this.cancel(),!this.query)return this.reset();this.query!="*"&&this.minChars&&this.query.length{this.query==="*"?this.onHit("*"):(this.$set(this.data,"ecl",this.ecl),this.fetch().then(l=>{if(l&&this.query){let K=l.data;K=this.prepareResponseData?this.prepareResponseData(K):K,this.items=this.limit?K.slice(0,this.limit):K,this.current=-1,this.loading=!1,this.selectFirst&&this.down()}}))},300))},reset(){this.items=[],this.loading=!1}}},X=G;function L(l){var K=i("531d");K.__inject__&&K.__inject__(l)}var J=Object(y.a)(X,C,M,!1,L,"57c2009c",null,!0),ce=J.exports,Se={name:"SubExpressionConstraint",props:{apiurl:String,branch:String,model:Object,attributeTypeParentConcept:Object,ecl:String,allowRefinement:Boolean},components:{ConstraintOperator:x,ConceptTypeahead:ce,ExpressionConstraint:()=>Promise.resolve().then(i.bind(null,"8043"))}},R=Se;function ee(l){var K=i("382d");K.__inject__&&K.__inject__(l)}var q=Object(y.a)(R,c,a,!1,ee,"09487509",null,!0),se=q.exports,ie=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",[j("SubExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.subexpressionConstraint,allowRefinement:l.allowRefinement},on:{addAttribute:l.addAttribute}}),j("EclRefinement",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.eclRefinement,focusConcept:l.model.subexpressionConstraint}})],1)},ge=[],Ie=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",{staticClass:"eclRefinement"},[j("SubRefinement",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.subRefinement,focusConcept:l.focusConcept}}),l._l(l.model.disjunctionSubRefinements,function(Y){return j("div",{key:Y.id},[l._v(" Or "),j("SubRefinement",{attrs:{apiurl:l.apiurl,branch:l.branch,model:Y}})],1)})],2)},De=[],te=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",[j("EclAttributeSet",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.eclAttributeSet,focusConcept:l.focusConcept}})],1)},Me=[],T=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",[j("SubAttributeSet",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.subAttributeSet,focusConcept:l.focusConcept}}),l._l(l.model.conjunctionAttributeSet,function(Y){return j("div",{key:Y.id},[l._v(" And "),j("SubAttributeSet",{attrs:{apiurl:l.apiurl,branch:l.branch,model:Y,focusConcept:l.focusConcept}})],1)}),l._l(l.model.disjunctionAttributeSet,function(Y){return j("div",{key:Y.id},[l._v(" Or "),j("SubAttributeSet",{attrs:{apiurl:l.apiurl,branch:l.branch,model:Y,focusConcept:l.focusConcept}})],1)})],2)},W=[],Z=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",[j("EclAttribute",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.attribute,focusConcept:l.focusConcept}})],1)},P=[],F=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",{staticClass:"attribute-container"},[j("div",[l._v(" With attribute ")]),j("SubExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.attributeName,ecl:l.domainAttributesECL}}),l.model.expressionComparisonOperator?j("div",{staticClass:"grid-container"},[j("select",{directives:[{name:"model",rawName:"v-model",value:l.model.expressionComparisonOperator,expression:"model.expressionComparisonOperator"}],on:{change:function(Y){var Te=Array.prototype.filter.call(Y.target.options,function(we){return we.selected}).map(function(we){var ot="_value"in we?we._value:we.value;return ot});l.$set(l.model,"expressionComparisonOperator",Y.target.multiple?Te:Te[0])}}},[j("option",[l._v("=")]),j("option",[l._v("!=")])]),j("SubExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.value,ecl:l.attributeRangeEcl}})],1):l._e(),l.model.numericComparisonOperator?j("div",[l._v(" Numeric concrete domains not yet supported. ")]):l._e(),l.model.stringComparisonOperator?j("div",[l._v(" String concrete domains not yet supported. ")]):l._e(),l.model.booleanComparisonOperator?j("div",[l._v(" Boolean concrete domains not yet supported. ")]):l._e(),l.domainAttributesProxy==="xxx"?j("div",[l._v(l._s(l.domainAttributesProxy))]):l._e()],1)},V=[],re={name:"EclAttribute",props:{apiurl:String,branch:String,model:Object,focusConcept:Object},components:{SubExpressionConstraint:se},computed:{domainAttributesProxy:function(){let l="";return this.focusConcept&&this.focusConcept.operator!="memberOf"&&this.focusConcept.conceptId&&!this.focusConcept.conceptId!="*"&&(l=this.getConceptId(this.focusConcept.conceptId)),this.updateDomainAttributes(l),l},attributeRangeEcl:function(){let l="";if(this.model.attributeName&&this.model.attributeName.conceptId){let K=this.getConceptId(this.model.attributeName.conceptId);this.domainAttributes?this.domainAttributes.forEach(j=>{K===j.conceptId&&j.attributeRange&&(l=j.attributeRange[0].rangeConstraint)}):console.warn("Domain attributes missing.")}return l}},data:function(){return{domainAttributesECL:"",domainAttributes:[]}},methods:{updateDomainAttributes:function(l){l?B()({url:this.apiurl+"/mrcm/"+this.branch+"/domain-attributes",method:"get",params:{proximalPrimitiveModeling:!1,parentIds:l},headers:{"Content-Type":"text/plain"}}).then(K=>{console.log(K.data),this.domainAttributes=K.data.items;let j=[];K.data.items.forEach(Te=>j.push(Te.conceptId));let Y=j.join(" OR ");this.$set(this,"domainAttributesECL",Y)}):this.domainAttributesECL=""},getConceptId:function(l){return l&&l.indexOf("|")!=-1?l.substring(0,l.indexOf("|")).trim():l}}},xe=re;function je(l){var K=i("0c43");K.__inject__&&K.__inject__(l)}var _e=Object(y.a)(xe,F,V,!1,je,"65517054",null,!0),be=_e.exports,ne={name:"SubAttributeSet",props:{apiurl:String,branch:String,model:Object,focusConcept:Object},components:{EclAttribute:be}},ye=ne;function Ce(l){}var pe=Object(y.a)(ye,Z,P,!1,Ce,"2b4220d7",null,!0),Oe=pe.exports,ve={name:"EclAttributeSet",props:{apiurl:String,branch:String,model:Object,focusConcept:Object},components:{SubAttributeSet:Oe}},Be=ve;function gt(l){}var $e=Object(y.a)(Be,T,W,!1,gt,"3798b68e",null,!0),Qe=$e.exports,ke={name:"SubRefinement",props:{apiurl:String,branch:String,model:Object,focusConcept:Object},components:{EclAttributeSet:Qe}},wt=ke;function un(l){}var cr=Object(y.a)(wt,te,Me,!1,un,"4f0559fe",null,!0),fn=cr.exports,cn={name:"EclRefinement",props:{apiurl:String,branch:String,model:Object,focusConcept:Object},components:{SubRefinement:fn}},zt=cn;function Rt(l){var K=i("1ed7");K.__inject__&&K.__inject__(l)}var Wt=Object(y.a)(zt,Ie,De,!1,Rt,"237c85bc",null,!0),Gt=Wt.exports,bt={name:"RefinedExpressionConstraint",props:{apiurl:String,branch:String,model:Object,allowRefinement:Boolean},components:{SubExpressionConstraint:se,EclRefinement:Gt},methods:{addAttribute(){this.$emit("addAttribute")}}},xt=bt;function Ct(l){}var Ve=Object(y.a)(xt,ie,ge,!1,Ct,"7717dd68",null,!0),Ot=Ve.exports,st=function(){var l=this,K=l.$createElement,j=l._self._c||K;return j("div",{staticClass:"compoundExpressionConstraint"},[l._l(l.model.conjunctionExpressionConstraints,function(Y){return j("div",{key:Y.id},[j("span",{staticClass:"or"},[l._v("And ")]),j("SubExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:Y,allowRefinement:!0},on:{addAttribute:function(Te){return l.$emit("addAttribute",Y)}}})],1)}),l._l(l.model.disjunctionExpressionConstraints,function(Y){return j("div",{key:Y.id},[j("span",{staticClass:"or"},[l._v("Or ")]),j("SubExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:Y,allowRefinement:!0},on:{addAttribute:function(Te){return l.$emit("addAttribute",Y)}}})],1)}),l.model.exclusionExpressionConstraints?j("div",[l.model.exclusionExpressionConstraints.first?j("div",[j("SubExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.exclusionExpressionConstraints.first,allowRefinement:!0},on:{addAttribute:function(Y){return l.$emit("addAttribute",l.model.exclusionExpressionConstraints.first)}}})],1):l._e(),l.model.exclusionExpressionConstraints.second?j("div",[j("span",{staticClass:"minus"},[l._v("Minus ")]),j("SubExpressionConstraint",{attrs:{apiurl:l.apiurl,branch:l.branch,model:l.model.exclusionExpressionConstraints.second,allowRefinement:!0},on:{addAttribute:function(Y){return l.$emit("addAttribute",l.model.exclusionExpressionConstraints.second)}}})],1):l._e()]):l._e()],2)},Le=[],ln={name:"CompoundExpressionConstraint",props:{apiurl:String,branch:String,model:Object},components:{SubExpressionConstraint:se}},dn=ln;function pn(l){var K=i("5384");K.__inject__&&K.__inject__(l)}var vn=Object(y.a)(dn,st,Le,!1,pn,"29657ea2",null,!0),hn=vn.exports,mn={name:"ExpressionConstraint",props:{apiurl:String,branch:String,model:Object,allowRefinement:String},components:{SubExpressionConstraint:se,RefinedExpressionConstraint:Ot,CompoundExpressionConstraint:hn},methods:{addDisjunction(){let l=JSON.parse(JSON.stringify(this.model));this.$set(this.model,"disjunctionExpressionConstraints",[]),this.model.disjunctionExpressionConstraints.push(l),this.addDisjunctionToExisting(),this.clearConcept(this.model)},addConjunction(){let l=JSON.parse(JSON.stringify(this.model));this.$set(this.model,"conjunctionExpressionConstraints",[]),this.model.conjunctionExpressionConstraints.push(l),this.addConjunctionToExisting(),this.clearConcept(this.model)},addExclusion(){let l=JSON.parse(JSON.stringify(this.model));this.$set(this.model,"exclusionExpressionConstraints",{}),this.$set(this.model.exclusionExpressionConstraints,"first",l),this.addExclusionToExisting(),this.clearConcept(this.model)},addDisjunctionToExisting(){this.model.disjunctionExpressionConstraints.push(this.newConcept())},addConjunctionToExisting(){this.model.conjunctionExpressionConstraints.push(this.newConcept())},addExclusionToExisting(){this.$set(this.model.exclusionExpressionConstraints,"second",{wildcard:!0})},addAttribute(l){this.$set(l,"subexpressionConstraint",JSON.parse(JSON.stringify(l))),this.clearConcept(l),this.$set(l,"eclRefinement",{subRefinement:{eclAttributeSet:{subAttributeSet:{attribute:this.newAttribute()}}}})},refinedExpressionAddAttribute(){let l=this.model.eclRefinement.subRefinement.eclAttributeSet;l.conjunctionAttributeSet||this.$set(l,"conjunctionAttributeSet",[]),l.conjunctionAttributeSet.push({id:this.random(),attribute:this.newAttribute()})},compoundExpressionAddAttribute(l){console.log(l);let K=JSON.parse(JSON.stringify(l));this.$set(l,"nestedExpressionConstraint",K),this.clearConcept(l),this.addAttribute(l.nestedExpressionConstraint)},newConcept(){return{conceptId:"",operator:"descendantorselfof"}},newAttribute(){return{attributeName:{conceptId:"",operator:"descendantorselfof"},expressionComparisonOperator:"=",value:{conceptId:"",operator:"descendantorselfof"}}},clearConcept(l){this.$delete(l,"operator"),this.$delete(l,"conceptId"),this.$delete(l,"term"),this.$delete(l,"wildcard")},random:function(){return Math.floor(Math.random()*1e8)}}},_n=mn;function lr(l){var K=i("cb57");K.__inject__&&K.__inject__(l)}var Ne=Object(y.a)(_n,o,f,!1,lr,"51336bc4",null,!0),It=g.default=Ne.exports},"83b9":function(v,g,i){"use strict";var o=i("d925"),f=i("e683");v.exports=function(a,p){return a&&!o(p)?f(a,p):p}},"848b":function(v,g,i){"use strict";var o=i("5cce").version,f={};["object","boolean","number","function","string","symbol"].forEach(function(p,d){f[p]=function(_){return typeof _===p||"a"+(d<1?"n ":" ")+p}});var c={};f.transitional=function(d,h,_){function y(b,x){return"[Axios v"+o+"] Transitional option '"+b+"'"+x+(_?". "+_:"")}return function(b,x,C){if(d===!1)throw new Error(y(x," has been removed"+(h?" in "+h:"")));return h&&!c[x]&&(c[x]=!0,console.warn(y(x," has been deprecated since v"+h+" and will be removed in the near future"))),d?d(b,x,C):!0}};function a(p,d,h){if(typeof p!="object")throw new TypeError("options must be an object");for(var _=Object.keys(p),y=_.length;y-- >0;){var b=_[y],x=d[b];if(x){var C=p[b],M=C===void 0||x(C,b,p);if(M!==!0)throw new TypeError("option "+b+" must be "+M);continue}if(h!==!0)throw Error("Unknown option "+b)}}v.exports={assertOptions:a,validators:f}},"85e7":function(v,g,i){var o=i("1a14"),f=i("77e9"),c=i("9876");v.exports=i("0bad")?Object.defineProperties:function(p,d){f(p);for(var h=c(d),_=h.length,y=0,b;_>y;)o.f(p,b=h[y++],d[b]);return p}},8771:function(v,g,i){var o=i("cc15")("iterator"),f=!1;try{var c=[7][o]();c.return=function(){f=!0},Array.from(c,function(){throw 2})}catch{}v.exports=function(a,p){if(!p&&!f)return!1;var d=!1;try{var h=[7],_=h[o]();_.next=function(){return{done:d=!0}},h[o]=function(){return _},a(h)}catch{}return d}},8875:function(v,g,i){var o,f,c;(function(a,p){f=[],o=p,c=typeof o=="function"?o.apply(g,f):o,c!==void 0&&(v.exports=c)})(typeof self<"u"?self:this,function(){function a(){var p=Object.getOwnPropertyDescriptor(document,"currentScript");if(!p&&"currentScript"in document&&document.currentScript||p&&p.get!==a&&document.currentScript)return document.currentScript;try{throw new Error}catch(B){var d=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,h=/@([^@]*):(\d+):(\d+)\s*$/ig,_=d.exec(B.stack)||h.exec(B.stack),y=_&&_[1]||!1,b=_&&_[2]||!1,x=document.location.href.replace(document.location.hash,""),C,M,D,H=document.getElementsByTagName("script");y===x&&(C=document.documentElement.outerHTML,M=new RegExp("(?:[^\\n]+?\\n){0,"+(b-2)+"}[^<]* - - - - - - - - - - - - - - - diff --git a/docs/main.2e2c84a118aac886.js b/docs/main.2e2c84a118aac886.js deleted file mode 100644 index bbd3244..0000000 --- a/docs/main.2e2c84a118aac886.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunksct_implementation_demonstrator=self.webpackChunksct_implementation_demonstrator||[]).push([[792],{7652:(Wt,de,Mt)=>{"use strict";function jt(e,i){return Object.is(e,i)}let Xt=null,S=!1,P=1;const a=Symbol("SIGNAL");function y(e){const i=Xt;return Xt=e,i}const d={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function c(e){if(S)throw new Error("");if(null===Xt)return;Xt.consumerOnSignalRead(e);const i=Xt.nextProducerIndex++;R(Xt),ie.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function T(e){R(e);for(let i=0;i0}function R(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function F(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function N(e){return void 0!==e.producerNode}function V(e){const i=Object.create(H);i.computation=e;const t=()=>{if(p(i),c(i),i.value===Q)throw i.error;return i.value};return t[a]=i,t}const B=Symbol("UNSET"),G=Symbol("COMPUTING"),Q=Symbol("ERRORED"),H={...d,value:B,dirty:!0,error:null,equal:jt,producerMustRecompute:e=>e.value===B||e.value===G,producerRecomputeValue(e){if(e.value===G)throw new Error("Detected cycle in computations.");const i=e.value;e.value=G;const t=x(e);let n;try{n=e.computation()}catch(r){n=Q,e.error=r}finally{b(e,t)}i!==B&&i!==Q&&n!==Q&&e.equal(i,n)?e.value=i:(e.value=n,e.version++)}};let tt=function K(){throw new Error};function at(){tt()}let q=null;function nt(e,i){m()||at(),e.equal(e.value,i)||(e.value=i,function Et(e){e.version++,function h(){P++}(),u(e),q?.()}(e))}const bt={...d,equal:jt,value:void 0};const Kt=()=>{},Zt={...d,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:e=>{null!==e.schedule&&e.schedule(e.ref)},hasRun:!1,cleanupFn:Kt};function ae(e){return"function"==typeof e}function fe(e){const t=e(n=>{Error.call(n),n.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const ke=fe(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function Ye(e,i){if(e){const t=e.indexOf(i);0<=t&&e.splice(t,1)}}class Pe{constructor(i){this.initialTeardown=i,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let i;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const s of t)s.remove(this);else t.remove(this);const{initialTeardown:n}=this;if(ae(n))try{n()}catch(s){i=s instanceof ke?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{ei(s)}catch(o){i=i??[],o instanceof ke?i=[...i,...o.errors]:i.push(o)}}if(i)throw new ke(i)}}add(i){var t;if(i&&i!==this)if(this.closed)ei(i);else{if(i instanceof Pe){if(i.closed||i._hasParent(this))return;i._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(i)}}_hasParent(i){const{_parentage:t}=this;return t===i||Array.isArray(t)&&t.includes(i)}_addParent(i){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(i),t):t?[t,i]:i}_removeParent(i){const{_parentage:t}=this;t===i?this._parentage=null:Array.isArray(t)&&Ye(t,i)}remove(i){const{_finalizers:t}=this;t&&Ye(t,i),i instanceof Pe&&i._removeParent(this)}}Pe.EMPTY=(()=>{const e=new Pe;return e.closed=!0,e})();const Qe=Pe.EMPTY;function Se(e){return e instanceof Pe||e&&"closed"in e&&ae(e.remove)&&ae(e.add)&&ae(e.unsubscribe)}function ei(e){ae(e)?e():e.unsubscribe()}const ri={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Bi={setTimeout(e,i,...t){const{delegate:n}=Bi;return n?.setTimeout?n.setTimeout(e,i,...t):setTimeout(e,i,...t)},clearTimeout(e){const{delegate:i}=Bi;return(i?.clearTimeout||clearTimeout)(e)},delegate:void 0};function tn(e){Bi.setTimeout(()=>{const{onUnhandledError:i}=ri;if(!i)throw e;i(e)})}function on(){}const ln=Ur("C",void 0,void 0);function Ur(e,i,t){return{kind:e,value:i,error:t}}let dn=null;function or(e){if(ri.useDeprecatedSynchronousErrorHandling){const i=!dn;if(i&&(dn={errorThrown:!1,error:null}),e(),i){const{errorThrown:t,error:n}=dn;if(dn=null,t)throw n}}else e()}class Ts extends Pe{constructor(i){super(),this.isStopped=!1,i?(this.destination=i,Se(i)&&i.add(this)):this.destination=Mst}static create(i,t,n){return new qo(i,t,n)}next(i){this.isStopped?RD(function Mr(e){return Ur("N",e,void 0)}(i),this):this._next(i)}error(i){this.isStopped?RD(function hn(e){return Ur("E",void 0,e)}(i),this):(this.isStopped=!0,this._error(i))}complete(){this.isStopped?RD(ln,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(i){this.destination.next(i)}_error(i){try{this.destination.error(i)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Xl=Function.prototype.bind;function js(e,i){return Xl.call(e,i)}class Va{constructor(i){this.partialObserver=i}next(i){const{partialObserver:t}=this;if(t.next)try{t.next(i)}catch(n){Yl(n)}}error(i){const{partialObserver:t}=this;if(t.error)try{t.error(i)}catch(n){Yl(n)}else Yl(i)}complete(){const{partialObserver:i}=this;if(i.complete)try{i.complete()}catch(t){Yl(t)}}}class qo extends Ts{constructor(i,t,n){let r;if(super(),ae(i)||!i)r={next:i??void 0,error:t??void 0,complete:n??void 0};else{let s;this&&ri.useDeprecatedNextContext?(s=Object.create(i),s.unsubscribe=()=>this.unsubscribe(),r={next:i.next&&js(i.next,s),error:i.error&&js(i.error,s),complete:i.complete&&js(i.complete,s)}):r=i}this.destination=new Va(r)}}function Yl(e){ri.useDeprecatedSynchronousErrorHandling?function Fr(e){ri.useDeprecatedSynchronousErrorHandling&&dn&&(dn.errorThrown=!0,dn.error=e)}(e):tn(e)}function RD(e,i){const{onStoppedNotification:t}=ri;t&&Bi.setTimeout(()=>t(e,i))}const Mst={closed:!0,next:on,error:function Dst(e){throw e},complete:on},PD="function"==typeof Symbol&&Symbol.observable||"@@observable";function ad(e){return e}function k3(e){return 0===e.length?ad:1===e.length?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}let dr=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){const n=new e;return n.source=this,n.operator=t,n}subscribe(t,n,r){const s=function Pst(e){return e&&e instanceof Ts||function Rst(e){return e&&ae(e.next)&&ae(e.error)&&ae(e.complete)}(e)&&Se(e)}(t)?t:new qo(t,n,r);return or(()=>{const{operator:o,source:l}=this;s.add(o?o.call(s,l):l?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return new(n=F3(n))((r,s)=>{const o=new qo({next:l=>{try{t(l)}catch(w){s(w),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(t){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(t)}[PD](){return this}pipe(...t){return k3(t)(this)}toPromise(t){return new(t=F3(t))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return e.create=i=>new e(i),e})();function F3(e){var i;return null!==(i=e??ri.Promise)&&void 0!==i?i:Promise}const kst=fe(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Fe=(()=>{class e extends dr{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const n=new O3(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new kst}next(t){or(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(t)}})}error(t){or(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){or(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:n,isStopped:r,observers:s}=this;return n||r?Qe:(this.currentObservers=null,s.push(t),new Pe(()=>{this.currentObservers=null,Ye(s,t)}))}_checkFinalizedStatuses(t){const{hasError:n,thrownError:r,isStopped:s}=this;n?t.error(r):s&&t.complete()}asObservable(){const t=new dr;return t.source=this,t}}return e.create=(i,t)=>new O3(i,t),e})();class O3 extends Fe{constructor(i,t){super(),this.destination=i,this.source=t}next(i){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,i)}error(i){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,i)}complete(){var i,t;null===(t=null===(i=this.destination)||void 0===i?void 0:i.complete)||void 0===t||t.call(i)}_subscribe(i){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(i))&&void 0!==n?n:Qe}}class Kr extends Fe{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){const t=super._subscribe(i);return!t.closed&&i.next(this._value),t}getValue(){const{hasError:i,thrownError:t,_value:n}=this;if(i)throw t;return this._throwIfClosed(),n}next(i){super.next(this._value=i)}}function L3(e){return ae(e?.lift)}function gs(e){return i=>{if(L3(i))return i.lift(function(t){try{return e(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Zr(e,i,t,n,r){return new Fst(e,i,t,n,r)}class Fst extends Ts{constructor(i,t,n,r,s,o){super(i),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=t?function(l){try{t(l)}catch(w){i.error(w)}}:super._next,this._error=r?function(l){try{r(l)}catch(w){i.error(w)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(l){i.error(l)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(i=this.onFinalize)||void 0===i||i.call(this))}}}function Ri(e,i){return gs((t,n)=>{let r=0;t.subscribe(Zr(n,s=>{n.next(e.call(i,s,r++))}))})}const N3="https://g.co/ng/security#xss";class pe extends Error{constructor(i,t){super(function Xm(e,i){return`NG0${Math.abs(e)}${i?": "+i:""}`}(i,t)),this.code=i}}function Wu(e){return{toString:e}.toString()}const $m="__parameters__";function Km(e,i,t){return Wu(()=>{const n=function kD(e){return function(...t){if(e){const n=e(...t);for(const r in n)this[r]=n[r]}}}(i);function r(...s){if(this instanceof r)return n.apply(this,s),this;const o=new r(...s);return l.annotation=o,l;function l(w,E,D){const k=w.hasOwnProperty($m)?w[$m]:Object.defineProperty(w,$m,{value:[]})[$m];for(;k.length<=D;)k.push(null);return(k[D]=k[D]||[]).push(o),w}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r})}const Jr=globalThis;function Cr(e){for(let i in e)if(e[i]===Cr)return i;throw Error("Could not find renamed property on target object.")}function Ost(e,i){for(const t in i)i.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=i[t])}function aa(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(aa).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const i=e.toString();if(null==i)return""+i;const t=i.indexOf("\n");return-1===t?i:i.substring(0,t)}function FD(e,i){return null==e||""===e?null===i?"":i:null==i||""===i?e:e+" "+i}const Lst=Cr({__forward_ref__:Cr});function kn(e){return e.__forward_ref__=kn,e.toString=function(){return aa(this())},e}function $i(e){return kw(e)?e():e}function kw(e){return"function"==typeof e&&e.hasOwnProperty(Lst)&&e.__forward_ref__===kn}function Ie(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Ui(e){return{providers:e.providers||[],imports:e.imports||[]}}function Fw(e){return z3(e,Lw)||z3(e,G3)}function z3(e,i){return e.hasOwnProperty(i)?e[i]:null}function Ow(e){return e&&(e.hasOwnProperty(OD)||e.hasOwnProperty(Gst))?e[OD]:null}const Lw=Cr({\u0275prov:Cr}),OD=Cr({\u0275inj:Cr}),G3=Cr({ngInjectableDef:Cr}),Gst=Cr({ngInjectorDef:Cr});class te{constructor(i,t){this._desc=i,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=Ie({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function UD(e){return e&&!!e.\u0275providers}const q0=Cr({\u0275cmp:Cr}),zD=Cr({\u0275dir:Cr}),GD=Cr({\u0275pipe:Cr}),W3=Cr({\u0275mod:Cr}),ju=Cr({\u0275fac:Cr}),ty=Cr({__NG_ELEMENT_ID__:Cr}),j3=Cr({__NG_ENV_ID__:Cr});function fn(e){return"string"==typeof e?e:null==e?"":String(e)}function HD(e,i){throw new pe(-201,!1)}var Nn=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Nn||{});let WD;function X3(){return WD}function tl(e){const i=WD;return WD=e,i}function Y3(e,i,t){const n=Fw(e);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:t&Nn.Optional?null:void 0!==i?i:void HD()}const ey={},jD="__NG_DI_FLAG__",Nw="ngTempTokenPath",$st=/\n/gm,$3="__source";let Zm;function ld(e){const i=Zm;return Zm=e,i}function Zst(e,i=Nn.Default){if(void 0===Zm)throw new pe(-203,!1);return null===Zm?Y3(e,void 0,i):Zm.get(e,i&Nn.Optional?null:void 0,i)}function re(e,i=Nn.Default){return(X3()||Zst)($i(e),i)}function Jt(e,i=Nn.Default){return re(e,Bw(i))}function Bw(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function XD(e){const i=[];for(let t=0;tArray.isArray(t)?Jm(t,i):i(t))}function K3(e,i,t){i>=e.length?e.push(t):e.splice(i,0,t)}function Vw(e,i){return i>=e.length-1?e.pop():e.splice(i,1)[0]}function yl(e,i,t){let n=qm(e,i);return n>=0?e[1|n]=t:(n=~n,function Z3(e,i,t,n){let r=e.length;if(r==i)e.push(t,n);else if(1===r)e.push(n,e[0]),e[0]=t;else{for(r--,e.push(e[r-1],e[r]);r>i;)e[r]=e[r-2],r--;e[i]=t,e[i+1]=n}}(e,n,i,t)),n}function $D(e,i){const t=qm(e,i);if(t>=0)return e[1|t]}function qm(e,i){return function J3(e,i,t){let n=0,r=e.length>>t;for(;r!==n;){const s=n+(r-n>>1),o=e[s<i?r=s:n=s+1}return~(r<i){o=s-1;break}}}for(;s-1){let s;for(;++rs?"":r[D+1].toLowerCase(),2&n&&E!==k){if(Ec(n))return!1;o=!0}}}}else{if(!o&&!Ec(n)&&!Ec(w))return!1;if(o&&Ec(w))continue;o=!1,n=w|1&n}}return Ec(n)||o}function Ec(e){return!(1&e)}function cat(e,i,t,n){if(null===i)return-1;let r=0;if(n||!t){let s=!1;for(;r-1)for(t++;t0?'="'+l+'"':"")+"]"}else 8&n?r+="."+o:4&n&&(r+=" "+o);else""!==r&&!Ec(o)&&(i+=sB(s,r),r=""),n=o,s=s||!Ec(n);t++}return""!==r&&(i+=sB(s,r)),i}function Ge(e){return Wu(()=>{const i=oB(e),t={...i,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===Gw.OnPush,directiveDefs:null,pipeDefs:null,dependencies:i.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Sc.Emulated,styles:e.styles||er,_:null,schemas:e.schemas||null,tView:null,id:""};lB(t);const n=e.dependencies;return t.directiveDefs=Hw(n,!1),t.pipeDefs=Hw(n,!0),t.id=function bat(e){let i=0;const t=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const r of t)i=Math.imul(31,i)+r.charCodeAt(0)|0;return i+=2147483648,"c"+i}(t),t})}function vat(e){return Fn(e)||oa(e)}function yat(e){return null!==e}function Hi(e){return Wu(()=>({type:e.type,bootstrap:e.bootstrap||er,declarations:e.declarations||er,imports:e.imports||er,exports:e.exports||er,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function aB(e,i){if(null==e)return Qc;const t={};for(const n in e)if(e.hasOwnProperty(n)){const r=e[n];let s,o,l=cd.None;Array.isArray(r)?(l=r[0],s=r[1],o=r[2]??s):(s=r,o=r),i?(t[s]=l!==cd.None?[n,l]:n,i[s]=o):t[s]=n}return t}function me(e){return Wu(()=>{const i=oB(e);return lB(i),i})}function io(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function Fn(e){return e[q0]||null}function oa(e){return e[zD]||null}function Ua(e){return e[GD]||null}function no(e,i){const t=e[W3]||null;if(!t&&!0===i)throw new Error(`Type ${aa(e)} does not have '\u0275mod' property.`);return t}function oB(e){const i={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:i,inputTransforms:null,inputConfig:e.inputs||Qc,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||er,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:aB(e.inputs,i),outputs:aB(e.outputs),debugInfo:null}}function lB(e){e.features?.forEach(i=>i(e))}function Hw(e,i){if(!e)return null;const t=i?Ua:vat;return()=>("function"==typeof e?e():e).map(n=>t(n)).filter(yat)}function wat(...e){return{\u0275providers:JD(0,e),\u0275fromNgModule:!0}}function JD(e,...i){const t=[],n=new Set;let r;const s=o=>{t.push(o)};return Jm(i,o=>{const l=o;Ww(l,s,[],n)&&(r||=[],r.push(l))}),void 0!==r&&cB(r,s),t}function cB(e,i){for(let t=0;t{i(s,n)})}}function Ww(e,i,t,n){if(!(e=$i(e)))return!1;let r=null,s=Ow(e);const o=!s&&Fn(e);if(s||o){if(o&&!o.standalone)return!1;r=e}else{const w=e.ngModule;if(s=Ow(w),!s)return!1;r=w}const l=n.has(r);if(o){if(l)return!1;if(n.add(r),o.dependencies){const w="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const E of w)Ww(E,i,t,n)}}else{if(!s)return!1;{if(null!=s.imports&&!l){let E;n.add(r);try{Jm(s.imports,D=>{Ww(D,i,t,n)&&(E||=[],E.push(D))})}finally{}void 0!==E&&cB(E,i)}if(!l){const E=If(r)||(()=>new r);i({provide:r,useFactory:E,deps:er},r),i({provide:QD,useValue:r,multi:!0},r),i({provide:Kc,useValue:()=>re(r),multi:!0},r)}const w=s.providers;if(null!=w&&!l){const E=e;qD(w,D=>{i(D,E)})}}}return r!==e&&void 0!==e.providers}function qD(e,i){for(let t of e)UD(t)&&(t=t.\u0275providers),Array.isArray(t)?qD(t,i):i(t)}const Tat=Cr({provide:String,useValue:Cr});function tM(e){return null!==e&&"object"==typeof e&&Tat in e}function Rf(e){return"function"==typeof e}const eM=new te(""),jw={},Sat={};let iM;function Xw(){return void 0===iM&&(iM=new zw),iM}class za{}class tg extends za{get destroyed(){return this._destroyed}constructor(i,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,rM(i,o=>this.processProvider(o)),this.records.set(q3,eg(void 0,this)),r.has("environment")&&this.records.set(za,eg(void 0,this));const s=this.records.get(eM);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(QD,er,Nn.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const i=y(null);try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();const t=this._onDestroyHooks;this._onDestroyHooks=[];for(const n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),y(i)}}onDestroy(i){return this.assertNotDestroyed(),this._onDestroyHooks.push(i),()=>this.removeOnDestroy(i)}runInContext(i){this.assertNotDestroyed();const t=ld(this),n=tl(void 0);try{return i()}finally{ld(t),tl(n)}}get(i,t=ey,n=Nn.Default){if(this.assertNotDestroyed(),i.hasOwnProperty(j3))return i[j3](this);n=Bw(n);const s=ld(this),o=tl(void 0);try{if(!(n&Nn.SkipSelf)){let w=this.records.get(i);if(void 0===w){const E=function Mat(e){return"function"==typeof e||"object"==typeof e&&e instanceof te}(i)&&Fw(i);w=E&&this.injectableDefInScope(E)?eg(nM(i),jw):null,this.records.set(i,w)}if(null!=w)return this.hydrate(i,w)}return(n&Nn.Self?Xw():this.parent).get(i,t=n&Nn.Optional&&t===ey?null:t)}catch(l){if("NullInjectorError"===l.name){if((l[Nw]=l[Nw]||[]).unshift(aa(i)),s)throw l;return function qst(e,i,t,n){const r=e[Nw];throw i[$3]&&r.unshift(i[$3]),e.message=function tat(e,i,t,n=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let r=aa(i);if(Array.isArray(i))r=i.map(aa).join(" -> ");else if("object"==typeof i){let s=[];for(let o in i)if(i.hasOwnProperty(o)){let l=i[o];s.push(o+":"+("string"==typeof l?JSON.stringify(l):aa(l)))}r=`{${s.join(", ")}}`}return`${t}${n?"("+n+")":""}[${r}]: ${e.replace($st,"\n ")}`}("\n"+e.message,r,t,n),e.ngTokenPath=r,e[Nw]=null,e}(l,i,"R3InjectorError",this.source)}throw l}finally{tl(o),ld(s)}}resolveInjectorInitializers(){const i=y(null),t=ld(this),n=tl(void 0);try{const s=this.get(Kc,er,Nn.Self);for(const o of s)o()}finally{ld(t),tl(n),y(i)}}toString(){const i=[],t=this.records;for(const n of t.keys())i.push(aa(n));return`R3Injector[${i.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(i){let t=Rf(i=$i(i))?i:$i(i&&i.provide);const n=function _at(e){return tM(e)?eg(void 0,e.useValue):eg(dB(e),jw)}(i);if(!Rf(i)&&!0===i.multi){let r=this.records.get(t);r||(r=eg(void 0,jw,!0),r.factory=()=>XD(r.multi),this.records.set(t,r)),t=i,r.multi.push(i)}this.records.set(t,n)}hydrate(i,t){const n=y(null);try{return t.value===jw&&(t.value=Sat,t.value=t.factory()),"object"==typeof t.value&&t.value&&function Dat(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{y(n)}}injectableDefInScope(i){if(!i.providedIn)return!1;const t=$i(i.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(i){const t=this._onDestroyHooks.indexOf(i);-1!==t&&this._onDestroyHooks.splice(t,1)}}function nM(e){const i=Fw(e),t=null!==i?i.factory:If(e);if(null!==t)return t;if(e instanceof te)throw new pe(204,!1);if(e instanceof Function)return function Eat(e){if(e.length>0)throw new pe(204,!1);const t=function zst(e){return e&&(e[Lw]||e[G3])||null}(e);return null!==t?()=>t.factory(e):()=>new e}(e);throw new pe(204,!1)}function dB(e,i,t){let n;if(Rf(e)){const r=$i(e);return If(r)||nM(r)}if(tM(e))n=()=>$i(e.useValue);else if(function hB(e){return!(!e||!e.useFactory)}(e))n=()=>e.useFactory(...XD(e.deps||[]));else if(function uB(e){return!(!e||!e.useExisting)}(e))n=()=>re($i(e.useExisting));else{const r=$i(e&&(e.useClass||e.provide));if(!function Aat(e){return!!e.deps}(e))return If(r)||nM(r);n=()=>new r(...XD(e.deps))}return n}function eg(e,i,t=!1){return{factory:e,value:i,multi:t?[]:void 0}}function rM(e,i){for(const t of e)Array.isArray(t)?rM(t,i):t&&UD(t)?rM(t.\u0275providers,i):i(t)}function Zc(e,i){e instanceof tg&&e.assertNotDestroyed();const n=ld(e),r=tl(void 0);try{return i()}finally{ld(n),tl(r)}}function fB(){return void 0!==X3()||null!=function Kst(){return Zm}()}function sM(e){if(!fB())throw new pe(-203,!1)}const as=0,Ze=1,zi=2,Xs=3,_c=4,Ga=5,Lo=6,ng=7,zr=8,Ys=9,Jc=10,en=11,ay=12,mB=13,rg=14,os=15,Pf=16,sg=17,Yu=18,ag=19,gB=20,hd=21,$w=22,$l=23,Pi=25,oM=1,qc=7,og=9,Ms=10;var Kw=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(Kw||{});function ca(e){return Array.isArray(e)&&"object"==typeof e[oM]}function ro(e){return Array.isArray(e)&&!0===e[oM]}function lM(e){return!!(4&e.flags)}function kf(e){return e.componentOffset>-1}function Zw(e){return!(1&~e.flags)}function Ac(e){return!!e.template}function ly(e){return!!(512&e[zi])}class zat{constructor(i,t,n){this.previousValue=i,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}}function wB(e,i,t,n){null!==i?i.applyValueToInputSignal(i,n):e[t]=n}function lr(){return TB}function TB(e){return e.type.prototype.ngOnChanges&&(e.setInput=Hat),Gat}function Gat(){const e=SB(this),i=e?.current;if(i){const t=e.previous;if(t===Qc)e.previous=i;else for(let n in i)t[n]=i[n];e.current=null,this.ngOnChanges(i)}}function Hat(e,i,t,n,r){const s=this.declaredInputs[n],o=SB(e)||function Wat(e,i){return e[CB]=i}(e,{previous:Qc,current:null}),l=o.current||(o.current={}),w=o.previous,E=w[s];l[s]=new zat(E&&E.currentValue,t,w===Qc),wB(e,i,r,t)}lr.ngInherit=!0;const CB="__ngSimpleChanges__";function SB(e){return e[CB]||null}const tu=function(e,i,t){},EB="svg";function ir(e){for(;Array.isArray(e);)e=e[as];return e}function cy(e,i){return ir(i[e])}function No(e,i){return ir(i[e.index])}function uy(e,i){return e.data[i]}function Ff(e,i){return e[i]}function xl(e,i){const t=i[e];return ca(t)?t:t[as]}function fM(e){return!(128&~e[zi])}function Ql(e,i){return null==i?null:e[i]}function AB(e){e[sg]=0}function DB(e){1024&e[zi]||(e[zi]|=1024,fM(e)&&qw(e))}function Jw(e){return!!(9216&e[zi]||e[$l]?.dirty)}function pM(e){e[Jc].changeDetectionScheduler?.notify(8),64&e[zi]&&(e[zi]|=1024),Jw(e)&&qw(e)}function qw(e){e[Jc].changeDetectionScheduler?.notify(0);let i=$u(e);for(;null!==i&&!(8192&i[zi])&&(i[zi]|=8192,fM(i));)i=$u(i)}function tT(e,i){if(!(256&~e[zi]))throw new pe(911,!1);null===e[hd]&&(e[hd]=[]),e[hd].push(i)}function $u(e){const i=e[Xs];return ro(i)?i[Xs]:i}const nn={lFrame:zB(null),bindingsEnabled:!0,skipHydrationRootTNode:null};let IB=!1;function RB(){return nn.bindingsEnabled}function Of(){return null!==nn.skipHydrationRootTNode}function Ee(){return nn.lFrame.lView}function Dn(){return nn.lFrame.tView}function zt(e){return nn.lFrame.contextLView=e,e[zr]}function Gt(e){return nn.lFrame.contextLView=null,e}function Sr(){let e=PB();for(;null!==e&&64===e.type;)e=e.parent;return e}function PB(){return nn.lFrame.currentTNode}function Dc(e,i){const t=nn.lFrame;t.currentTNode=e,t.isParent=i}function vM(){return nn.lFrame.isParent}function yM(){nn.lFrame.isParent=!1}function OB(){return IB}function LB(e){IB=e}function Bo(){const e=nn.lFrame;let i=e.bindingRootIndex;return-1===i&&(i=e.bindingRootIndex=e.tView.bindingStartIndex),i}function Qu(){return nn.lFrame.bindingIndex}function Mc(){return nn.lFrame.bindingIndex++}function Ku(e){const i=nn.lFrame,t=i.bindingIndex;return i.bindingIndex=i.bindingIndex+e,t}function rot(e,i){const t=nn.lFrame;t.bindingIndex=t.bindingRootIndex=e,xM(i)}function xM(e){nn.lFrame.currentDirectiveIndex=e}function bM(e){const i=nn.lFrame.currentDirectiveIndex;return-1===i?null:e[i]}function wM(){return nn.lFrame.currentQueryIndex}function iT(e){nn.lFrame.currentQueryIndex=e}function aot(e){const i=e[Ze];return 2===i.type?i.declTNode:1===i.type?e[Ga]:null}function VB(e,i,t){if(t&Nn.SkipSelf){let r=i,s=e;for(;!(r=r.parent,null!==r||t&Nn.Host||(r=aot(s),null===r||(s=s[rg],10&r.type))););if(null===r)return!1;i=r,e=s}const n=nn.lFrame=UB();return n.currentTNode=i,n.lView=e,!0}function TM(e){const i=UB(),t=e[Ze];nn.lFrame=i,i.currentTNode=t.firstChild,i.lView=e,i.tView=t,i.contextLView=e,i.bindingIndex=t.bindingStartIndex,i.inI18n=!1}function UB(){const e=nn.lFrame,i=null===e?null:e.child;return null===i?zB(e):i}function zB(e){const i={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:e,child:null,inI18n:!1};return null!==e&&(e.child=i),i}function GB(){const e=nn.lFrame;return nn.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const HB=GB;function CM(){const e=GB();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Ha(){return nn.lFrame.selectedIndex}function Lf(e){nn.lFrame.selectedIndex=e}function Gr(){const e=nn.lFrame;return uy(e.tView,e.selectedIndex)}function bl(){nn.lFrame.currentNamespace=EB}function dy(){!function cot(){nn.lFrame.currentNamespace=null}()}let jB=!0;function fy(){return jB}function eu(e){jB=e}function nT(e,i){for(let t=i.directiveStart,n=i.directiveEnd;t=n)break}else i[w]<0&&(e[sg]+=65536),(l>14>16&&(3&e[zi])===i&&(e[zi]+=16384,YB(l,s)):YB(l,s)}const lg=-1;class py{constructor(i,t,n){this.factory=i,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=n}}const _M={};class Nf{constructor(i,t){this.injector=i,this.parentInjector=t}get(i,t,n){n=Bw(n);const r=this.injector.get(i,_M,n);return r!==_M||t===_M?r:this.parentInjector.get(i,t,n)}}function AM(e){return e!==lg}function my(e){return 32767&e}function gy(e,i){let t=function got(e){return e>>16}(e),n=i;for(;t>0;)n=n[rg],t--;return n}let DM=!0;function aT(e){const i=DM;return DM=e,i}const QB=255,KB=5;let yot=0;const iu={};function oT(e,i){const t=ZB(e,i);if(-1!==t)return t;const n=i[Ze];n.firstCreatePass&&(e.injectorIndex=i.length,MM(n.data,e),MM(i,null),MM(n.blueprint,null));const r=lT(e,i),s=e.injectorIndex;if(AM(r)){const o=my(r),l=gy(r,i),w=l[Ze].data;for(let E=0;E<8;E++)i[s+E]=l[o+E]|w[o+E]}return i[s+8]=r,s}function MM(e,i){e.push(0,0,0,0,0,0,0,0,i)}function ZB(e,i){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===i[e.injectorIndex+8]?-1:e.injectorIndex}function lT(e,i){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let t=0,n=null,r=i;for(;null!==r;){if(n=rV(r),null===n)return lg;if(t++,r=r[rg],-1!==n.injectorIndex)return n.injectorIndex|t<<16}return lg}function IM(e,i,t){!function xot(e,i,t){let n;"string"==typeof t?n=t.charCodeAt(0)||0:t.hasOwnProperty(ty)&&(n=t[ty]),null==n&&(n=t[ty]=yot++);const r=n&QB;i.data[e+(r>>KB)]|=1<=0?i&QB:Cot:i}(t);if("function"==typeof s){if(!VB(i,e,n))return n&Nn.Host?JB(r,0,n):qB(i,t,n,r);try{let o;if(o=s(n),null!=o||n&Nn.Optional)return o;HD()}finally{HB()}}else if("number"==typeof s){let o=null,l=ZB(e,i),w=lg,E=n&Nn.Host?i[os][Ga]:null;for((-1===l||n&Nn.SkipSelf)&&(w=-1===l?lT(e,i):i[l+8],w!==lg&&nV(n,!1)?(o=i[Ze],l=my(w),i=gy(w,i)):l=-1);-1!==l;){const D=i[Ze];if(iV(s,l,D.data)){const k=wot(l,i,t,o,n,E);if(k!==iu)return k}w=i[l+8],w!==lg&&nV(n,i[Ze].data[l+8]===E)&&iV(s,l,i)?(o=D,l=my(w),i=gy(w,i)):l=-1}}return r}function wot(e,i,t,n,r,s){const o=i[Ze],l=o.data[e+8],D=cT(l,o,t,null==n?kf(l)&&DM:n!=o&&!!(3&l.type),r&Nn.Host&&s===l);return null!==D?Bf(i,o,D,l):iu}function cT(e,i,t,n,r){const s=e.providerIndexes,o=i.data,l=1048575&s,w=e.directiveStart,D=s>>20,O=r?l+D:e.directiveEnd;for(let L=n?l:l+D;L=w&&U.type===t)return L}if(r){const L=o[w];if(L&&Ac(L)&&L.type===t)return w}return null}function Bf(e,i,t,n){let r=e[t];const s=i.data;if(function dot(e){return e instanceof py}(r)){const o=r;o.resolving&&function jst(e,i){throw i&&i.join(" > "),new pe(-200,e)}(function fr(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():fn(e)}(s[t]));const l=aT(o.canSeeViewProviders);o.resolving=!0;const E=o.injectImpl?tl(o.injectImpl):null;VB(e,n,Nn.Default);try{r=e[t]=o.factory(void 0,s,e,n),i.firstCreatePass&&t>=n.directiveStart&&function uot(e,i,t){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=i.type.prototype;if(n){const o=TB(i);(t.preOrderHooks??=[]).push(e,o),(t.preOrderCheckHooks??=[]).push(e,o)}r&&(t.preOrderHooks??=[]).push(0-e,r),s&&((t.preOrderHooks??=[]).push(e,s),(t.preOrderCheckHooks??=[]).push(e,s))}(t,s[t],i)}finally{null!==E&&tl(E),aT(l),o.resolving=!1,HB()}}return r}function iV(e,i,t){return!!(t[i+(e>>KB)]&1<{const i=e.prototype.constructor,t=i[ju]||RM(i),n=Object.prototype;let r=Object.getPrototypeOf(e.prototype).constructor;for(;r&&r!==n;){const s=r[ju]||RM(r);if(s&&s!==t)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function RM(e){return kw(e)?()=>{const i=RM($i(e));return i&&i()}:If(e)}function rV(e){const i=e[Ze],t=i.type;return 2===t?i.declTNode:1===t?e[Ga]:null}function wl(e){return function bot(e,i){if("class"===i)return e.classes;if("style"===i)return e.styles;const t=e.attrs;if(t){const n=t.length;let r=0;for(;rre(q3)})}static{this.__NG_ELEMENT_ID__=-1}}new te("").__NG_ELEMENT_ID__=e=>{const i=Sr();if(null===i)throw new pe(204,!1);if(2&i.type)return i.value;if(e&Nn.Optional)return null;throw new pe(204,!1)};function kM(e){return e.ngOriginalError}const dV=!0;let vy=(()=>{class e{static{this.__NG_ELEMENT_ID__=Fot}static{this.__NG_ENV_ID__=t=>t}}return e})();class kot extends vy{constructor(i){super(),this._lView=i}onDestroy(i){return tT(this._lView,i),()=>function mM(e,i){if(null===e[hd])return;const t=e[hd].indexOf(i);-1!==t&&e[hd].splice(t,1)}(this._lView,i)}}function Fot(){return new kot(Ee())}let Zu=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Kr(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const t=this.taskId++;return this.pendingTasks.add(t),t}remove(t){this.pendingTasks.delete(t),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275prov=Ie({token:e,providedIn:"root",factory:()=>new e})}}return e})();const Oe=class Oot extends Fe{constructor(i=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=i,fB()&&(this.destroyRef=Jt(vy,{optional:!0})??void 0,this.pendingTasks=Jt(Zu,{optional:!0})??void 0)}emit(i){const t=y(null);try{super.next(i)}finally{y(t)}}subscribe(i,t,n){let r=i,s=t||(()=>null),o=n;if(i&&"object"==typeof i){const w=i;r=w.next?.bind(w),s=w.error?.bind(w),o=w.complete?.bind(w)}this.__isAsync&&(s=this.wrapInTimeout(s),r&&(r=this.wrapInTimeout(r)),o&&(o=this.wrapInTimeout(o)));const l=super.subscribe({next:r,error:s,complete:o});return i instanceof Pe&&i.add(l),l}wrapInTimeout(i){return t=>{const n=this.pendingTasks?.add();setTimeout(()=>{i(t),void 0!==n&&this.pendingTasks?.remove(n)})}}};function hT(...e){}function fV(e){let i,t;function n(){e=hT;try{void 0!==t&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(t),void 0!==i&&clearTimeout(i)}catch{}}return i=setTimeout(()=>{e(),n()}),"function"==typeof requestAnimationFrame&&(t=requestAnimationFrame(()=>{e(),n()})),()=>n()}function pV(e){return queueMicrotask(()=>e()),()=>{e=hT}}const FM="isAngularZone",dT=FM+"_ID";let Lot=0;class li{constructor(i){this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Oe(!1),this.onMicrotaskEmpty=new Oe(!1),this.onStable=new Oe(!1),this.onError=new Oe(!1);const{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:s=dV}=i;if(typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!r&&n,o.shouldCoalesceRunChangeDetection=r,o.callbackScheduled=!1,o.scheduleInRootZone=s,function Vot(e){const i=()=>{!function Bot(e){function i(){fV(()=>{e.callbackScheduled=!1,LM(e),e.isCheckStableRunning=!0,OM(e),e.isCheckStableRunning=!1})}e.isCheckStableRunning||e.callbackScheduled||(e.callbackScheduled=!0,e.scheduleInRootZone?Zone.root.run(()=>{i()}):e._outer.run(()=>{i()}),LM(e))}(e)},t=Lot++;e._inner=e._inner.fork({name:"angular",properties:{[FM]:!0,[dT]:t,[dT+t]:!0},onInvokeTask:(n,r,s,o,l,w)=>{if(function Uot(e){return vV(e,"__ignore_ng_zone__")}(w))return n.invokeTask(s,o,l,w);try{return mV(e),n.invokeTask(s,o,l,w)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||e.shouldCoalesceRunChangeDetection)&&i(),gV(e)}},onInvoke:(n,r,s,o,l,w,E)=>{try{return mV(e),n.invoke(s,o,l,w,E)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!function zot(e){return vV(e,"__scheduler_tick__")}(w)&&i(),gV(e)}},onHasTask:(n,r,s,o)=>{n.hasTask(s,o),r===s&&("microTask"==o.change?(e._hasPendingMicrotasks=o.microTask,LM(e),OM(e)):"macroTask"==o.change&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(n,r,s,o)=>(n.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}(o)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get(FM)}static assertInAngularZone(){if(!li.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(li.isInAngularZone())throw new pe(909,!1)}run(i,t,n){return this._inner.run(i,t,n)}runTask(i,t,n,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,i,Not,hT,hT);try{return s.runTask(o,t,n)}finally{s.cancelTask(o)}}runGuarded(i,t,n){return this._inner.runGuarded(i,t,n)}runOutsideAngular(i){return this._outer.run(i)}}const Not={};function OM(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function LM(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&!0===e.callbackScheduled)}function mV(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function gV(e){e._nesting--,OM(e)}class NM{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Oe,this.onMicrotaskEmpty=new Oe,this.onStable=new Oe,this.onError=new Oe}run(i,t,n){return i.apply(t,n)}runGuarded(i,t,n){return i.apply(t,n)}runOutsideAngular(i){return i()}runTask(i,t,n,r){return i.apply(t,n)}}function vV(e,i){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0]?.data?.[i]}class Tl{constructor(){this._console=console}handleError(i){const t=this._findOriginalError(i);this._console.error("ERROR",i),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(i){let t=i&&kM(i);for(;t&&kM(t);)t=kM(t);return t||null}}const Hot=new te("",{providedIn:"root",factory:()=>{const e=Jt(li),i=Jt(Tl);return t=>e.runOutsideAngular(()=>i.handleError(t))}});function Wot(){return hg(Sr(),Ee())}function hg(e,i){return new ai(No(e,i))}let ai=(()=>{class e{constructor(t){this.nativeElement=t}static{this.__NG_ELEMENT_ID__=Wot}}return e})();function xV(e){return e instanceof ai?e.nativeElement:e}function jot(){return this._results[Symbol.iterator]()}class Ju{get changes(){return this._changes??=new Oe}constructor(i=!1){this._emitDistinctChangesOnly=i,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const t=Ju.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=jot)}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,t){return this._results.reduce(i,t)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,t){this.dirty=!1;const n=function el(e){return e.flat(Number.POSITIVE_INFINITY)}(i);(this._changesDetected=!function rat(e,i,t){if(e.length!==i.length)return!1;for(let n=0;ndlt}),dlt="ng",VV=new te(""),nu=new te("",{providedIn:"platform",factory:()=>"unknown"}),Hr=new te(""),HM=new te("",{providedIn:"root",factory:()=>dd().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let UV=()=>null;function KM(e,i,t=!1){return UV(e,i,t)}const $V=new te("",{providedIn:"root",factory:()=>!1});let wT,TT;function mg(e){return function eI(){if(void 0===wT&&(wT=null,Jr.trustedTypes))try{wT=Jr.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return wT}()?.createHTML(e)||e}function iI(){if(void 0===TT&&(TT=null,Jr.trustedTypes))try{TT=Jr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return TT}function ZV(e){return iI()?.createHTML(e)||e}function qV(e){return iI()?.createScriptURL(e)||e}class zf{constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${N3})`}}class _lt extends zf{getTypeName(){return"HTML"}}class Alt extends zf{getTypeName(){return"Style"}}class Dlt extends zf{getTypeName(){return"Script"}}class Mlt extends zf{getTypeName(){return"URL"}}class Ilt extends zf{getTypeName(){return"ResourceURL"}}function Cl(e){return e instanceof zf?e.changingThisBreaksApplicationSecurity:e}function ru(e,i){const t=function Rlt(e){return e instanceof zf&&e.getTypeName()||null}(e);if(null!=t&&t!==i){if("ResourceURL"===t&&"URL"===i)return!0;throw new Error(`Required a safe ${i}, got a ${t} (see ${N3})`)}return t===i}class Nlt{constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{const t=(new window.DOMParser).parseFromString(mg(i),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(i):(t.firstChild?.remove(),t)}catch{return null}}}class Blt{constructor(i){this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(i){const t=this.inertDocument.createElement("template");return t.innerHTML=mg(i),t}}const Ult=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function CT(e){return(e=String(e)).match(Ult)?e:"unsafe:"+e}function qu(e){const i={};for(const t of e.split(","))i[t]=!0;return i}function _y(...e){const i={};for(const t of e)for(const n in t)t.hasOwnProperty(n)&&(i[n]=!0);return i}const e5=qu("area,br,col,hr,img,wbr"),i5=qu("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),n5=qu("rp,rt"),nI=_y(e5,_y(i5,qu("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),_y(n5,qu("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),_y(n5,i5)),rI=qu("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),r5=_y(rI,qu("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),qu("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),zlt=qu("script,style,template");class Glt{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(i){let t=i.firstChild,n=!0,r=[];for(;t;)if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild)r.push(t),t=jlt(t);else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let s=Wlt(t);if(s){t=s;break}t=r.pop()}return this.buf.join("")}startElement(i){const t=s5(i).toLowerCase();if(!nI.hasOwnProperty(t))return this.sanitizedSomething=!0,!zlt.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const n=i.attributes;for(let r=0;r"),!0}endElement(i){const t=s5(i).toLowerCase();nI.hasOwnProperty(t)&&!e5.hasOwnProperty(t)&&(this.buf.push(""))}chars(i){this.buf.push(o5(i))}}function Wlt(e){const i=e.nextSibling;if(i&&e!==i.previousSibling)throw a5(i);return i}function jlt(e){const i=e.firstChild;if(i&&function Hlt(e,i){return(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(e,i))throw a5(i);return i}function s5(e){const i=e.nodeName;return"string"==typeof i?i:"FORM"}function a5(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}const Xlt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ylt=/([^\#-~ |!])/g;function o5(e){return e.replace(/&/g,"&").replace(Xlt,function(i){return"&#"+(1024*(i.charCodeAt(0)-55296)+(i.charCodeAt(1)-56320)+65536)+";"}).replace(Ylt,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}let ST;function l5(e,i){let t=null;try{ST=ST||function t5(e){const i=new Blt(e);return function Vlt(){try{return!!(new window.DOMParser).parseFromString(mg(""),"text/html")}catch{return!1}}()?new Nlt(i):i}(e);let n=i?String(i):"";t=ST.getInertBodyElement(n);let r=5,s=n;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,n=s,s=t.innerHTML,t=ST.getInertBodyElement(n)}while(n!==s);return mg((new Glt).sanitizeChildren(sI(t)||t))}finally{if(t){const n=sI(t)||t;for(;n.firstChild;)n.firstChild.remove()}}}function sI(e){return"content"in e&&function $lt(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Wa=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(Wa||{});function Gf(e){const i=Dy();return i?ZV(i.sanitize(Wa.HTML,e)||""):ru(e,"HTML")?ZV(Cl(e)):l5(dd(),fn(e))}function Ay(e){const i=Dy();return i?i.sanitize(Wa.URL,e)||"":ru(e,"URL")?Cl(e):CT(fn(e))}function c5(e){const i=Dy();if(i)return qV(i.sanitize(Wa.RESOURCE_URL,e)||"");if(ru(e,"ResourceURL"))return qV(Cl(e));throw new pe(904,!1)}function Dy(){const e=Ee();return e&&e[Jc].sanitizer}const tct=/^>|^->||--!>|)/g,ict="\u200b$1\u200b";function Sl(e){return e instanceof Function?e():e}function El(e){return"browser"===(e??Jt(On)).get(nu)}var fd=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(fd||{});let lI;function cI(e,i){return lI(e,i)}function vg(e,i,t,n,r){if(null!=n){let s,o=!1;ro(n)?s=n:ca(n)&&(o=!0,n=n[as]);const l=ir(n);0===e&&null!==t?null==r?C5(i,t,l):Hf(i,t,l,r||null,!0):1===e&&null!==t?Hf(i,t,l,r||null,!0):2===e?function Iy(e,i,t){e.removeChild(null,i,t)}(i,l,o):3===e&&i.destroyNode(l),null!=s&&function Tct(e,i,t,n,r){const s=t[qc];s!==ir(t)&&vg(i,e,n,s,r);for(let l=Ms;li.replace(ect,ict))}(i))}function AT(e,i,t){return e.createElement(i,t)}function b5(e,i){i[Jc].changeDetectionScheduler?.notify(9),IT(e,i,i[en],2,null,null)}function w5(e,i){const t=e[og],n=i[Xs];(ca(n)||i[os]!==n[Xs][os])&&(e[zi]|=Kw.HasTransplantedViews),null===t?e[og]=[i]:t.push(i)}function dI(e,i){const t=e[og],n=t.indexOf(i);t.splice(n,1)}function My(e,i){if(e.length<=Ms)return;const t=Ms+i,n=e[t];if(n){const r=n[Pf];null!==r&&r!==e&&dI(r,n),i>0&&(e[t-1][_c]=n[_c]);const s=Vw(e,Ms+i);!function pct(e,i){b5(e,i),i[as]=null,i[Ga]=null}(n[Ze],n);const o=s[Yu];null!==o&&o.detachView(s[Ze]),n[Xs]=null,n[_c]=null,n[zi]&=-129}return n}function DT(e,i){if(!(256&i[zi])){const t=i[en];t.destroyNode&&IT(e,i,t,3,null,null),function gct(e){let i=e[ay];if(!i)return fI(e[Ze],e);for(;i;){let t=null;if(ca(i))t=i[ay];else{const n=i[Ms];n&&(t=n)}if(!t){for(;i&&!i[_c]&&i!==e;)ca(i)&&fI(i[Ze],i),i=i[Xs];null===i&&(i=e),ca(i)&&fI(i[Ze],i),t=i&&i[_c]}i=t}}(i)}}function fI(e,i){if(256&i[zi])return;const t=y(null);try{i[zi]&=-129,i[zi]|=256,i[$l]&&_(i[$l]),function xct(e,i){let t;if(null!=e&&null!=(t=e.destroyHooks))for(let n=0;n=0?n[o]():n[-o].unsubscribe(),s+=2}else t[s].call(n[t[s+1]]);null!==n&&(i[ng]=null);const r=i[hd];if(null!==r){i[hd]=null;for(let s=0;s-1){const{encapsulation:s}=e.data[n.directiveStart+r];if(s===Sc.None||s===Sc.Emulated)return null}return No(n,t)}}(e,i.parent,t)}function Hf(e,i,t,n,r){e.insertBefore(i,t,n,r)}function C5(e,i,t){e.appendChild(i,t)}function S5(e,i,t,n,r){null!==n?Hf(e,i,t,n,r):C5(e,i,t)}function mI(e,i){return e.parentNode(i)}function E5(e,i,t){return A5(e,i,t)}let gI,A5=function _5(e,i,t){return 40&e.type?No(e,t):null};function MT(e,i,t,n){const r=pI(e,n,i),s=i[en],l=E5(n.parent||i[Ga],n,i);if(null!=r)if(Array.isArray(t))for(let w=0;wPi&&F5(e,i,Pi,!1),tu(o?2:0,r),t(n,r)}finally{Lf(s),tu(o?3:1,r)}}function bI(e,i,t){if(lM(i)){const n=y(null);try{const s=i.directiveEnd;for(let o=i.directiveStart;onull;function V5(e,i,t,n,r){for(let s in i){if(!i.hasOwnProperty(s))continue;const o=i[s];if(void 0===o)continue;n??={};let l,w=cd.None;Array.isArray(o)?(l=o[0],w=o[1]):l=o;let E=s;if(null!==r){if(!r.hasOwnProperty(s))continue;E=r[s]}0===e?U5(n,t,E,l,w):U5(n,t,E,l)}return n}function U5(e,i,t,n,r){let s;e.hasOwnProperty(t)?(s=e[t]).push(i,n):s=e[t]=[i,n],void 0!==r&&s.push(r)}function nl(e,i,t,n,r,s,o,l){const w=No(i,t);let D,E=i.inputs;!l&&null!=E&&(D=E[n])?(DI(e,t,D,n,r),kf(i)&&function Oct(e,i){const t=xl(i,e);16&t[zi]||(t[zi]|=64)}(t,i.index)):3&i.type&&(n=function Fct(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(n),r=null!=o?o(r,i.value||"",n):r,s.setProperty(w,n,r))}function SI(e,i,t,n){if(RB()){const r=null===n?null:{"":-1},s=function zct(e,i){const t=e.directiveRegistry;let n=null,r=null;if(t)for(let s=0;s0;){const t=e[--i];if("number"==typeof t&&t<0)return t}return 0})(o)!=l&&o.push(l),o.push(t,n,s)}}(e,i,n,Ry(e,t,r.hostVars,pn),r)}function su(e,i,t,n,r,s){const o=No(e,i);!function _I(e,i,t,n,r,s,o){if(null==s)e.removeAttribute(i,r,t);else{const l=null==o?fn(s):o(s,n||"",r);e.setAttribute(i,r,l,t)}}(i[en],o,s,e.value,t,n,r)}function Yct(e,i,t,n,r,s){const o=s[i];if(null!==o)for(let l=0;l0&&(t[r-1][_c]=i),n{qw(e.lView)},consumerOnSignalRead(){this.lView[$l]=this}},nut={...d,consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{let i=$u(e.lView);for(;i&&!Z5(i[Ze]);)i=$u(i);i&&DB(i)},consumerOnSignalRead(){this.lView[$l]=this}};function Z5(e){return 2!==e.type}const rut=100;function OT(e,i=!0,t=0){const n=e[Jc],r=n.rendererFactory;r.begin?.();try{!function sut(e,i){const t=OB();try{LB(!0),RI(e,i);let n=0;for(;Jw(e);){if(n===rut)throw new pe(103,!1);n++,RI(e,1)}}finally{LB(t)}}(e,t)}catch(o){throw i&&FT(e,o),o}finally{r.end?.(),n.inlineEffectRunner?.flush()}}function aut(e,i,t,n){const r=i[zi];if(!(256&~r))return;i[Jc].inlineEffectRunner?.flush(),TM(i);let l=!0,w=null,E=null;Z5(e)?(E=function Jct(e){return e[$l]??function qct(e){const i=K5.pop()??Object.create(eut);return i.lView=e,i}(e)}(i),w=x(E)):null===function C(){return Xt}()?(l=!1,E=function iut(e){const i=e[$l]??Object.create(nut);return i.lView=e,i}(i),w=x(E)):i[$l]&&(_(i[$l]),i[$l]=null);try{AB(i),function NB(e){return nn.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==t&&L5(e,i,t,2,n);const D=!(3&~r);if(D){const L=e.preOrderCheckHooks;null!==L&&rT(i,L,null)}else{const L=e.preOrderHooks;null!==L&&sT(i,L,0,null),SM(i,0)}if(function out(e){for(let i=MV(e);null!==i;i=IV(i)){if(!(i[zi]&Kw.HasTransplantedViews))continue;const t=i[og];for(let n=0;n-1&&(My(i,n),Vw(t,n))}this._attachedToViewContainer=!1}DT(this._lView[Ze],this._lView)}onDestroy(i){tT(this._lView,i)}markForCheck(){ky(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[zi]&=-129}reattach(){pM(this._lView),this._lView[zi]|=128}detectChanges(){this._lView[zi]|=1024,OT(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;const i=ly(this._lView),t=this._lView[Pf];null!==t&&!i&&dI(t,this._lView),b5(this._lView[Ze],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=i;const t=ly(this._lView),n=this._lView[Pf];null!==n&&!t&&w5(n,this._lView),pM(this._lView)}}let yr=(()=>{class e{static{this.__NG_ELEMENT_ID__=hut}}return e})();const cut=yr,uut=class extends cut{constructor(i,t,n){super(),this._declarationLView=i,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(i,t){return this.createEmbeddedViewImpl(i,t)}createEmbeddedViewImpl(i,t,n){const r=yg(this._declarationLView,this._declarationTContainer,i,{embeddedViewInjector:t,dehydratedView:n});return new Fy(r)}};function hut(){return LT(Sr(),Ee())}function LT(e,i){return 4&e.type?new uut(i,e,hg(e,i)):null}let T8=()=>null;function $f(e,i){return T8(e,i)}class wg{}const Gy=new te("",{providedIn:"root",factory:()=>!1}),C8=new te(""),GI=new te("");class nht{}class S8{}class sht{resolveComponentFactory(i){throw function rht(e){const i=Error(`No component factory found for ${aa(e)}.`);return i.ngComponent=e,i}(i)}}class Qf{static{this.NULL=new sht}}class GT{}let Kl=(()=>{class e{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>function aht(){const e=Ee(),t=xl(Sr().index,e);return(ca(t)?t:e)[en]}()}}return e})(),oht=(()=>{class e{static{this.\u0275prov=Ie({token:e,providedIn:"root",factory:()=>null})}}return e})();function WT(e,i,t){let n=t?e.styles:null,r=t?e.classes:null,s=0;if(null!==i)for(let o=0;o0&&P5(e,t,s.join(" "))}}(O,It,U,n),void 0!==t&&function vht(e,i,t){const n=e.projection=[];for(let r=0;r{class e{static{this.__NG_ELEMENT_ID__=xht}}return e})();function xht(){return P8(Sr(),Ee())}const bht=Or,I8=class extends bht{constructor(i,t,n){super(),this._lContainer=i,this._hostTNode=t,this._hostLView=n}get element(){return hg(this._hostTNode,this._hostLView)}get injector(){return new ua(this._hostTNode,this._hostLView)}get parentInjector(){const i=lT(this._hostTNode,this._hostLView);if(AM(i)){const t=gy(i,this._hostLView),n=my(i);return new ua(t[Ze].data[n+8],t)}return new ua(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){const t=R8(this._lContainer);return null!==t&&t[i]||null}get length(){return this._lContainer.length-Ms}createEmbeddedView(i,t,n){let r,s;"number"==typeof n?r=n:null!=n&&(r=n.index,s=n.injector);const o=$f(this._lContainer,i.ssrId),l=i.createEmbeddedViewImpl(t||{},s,o);return this.insertImpl(l,r,Xf(this._hostTNode,o)),l}createComponent(i,t,n,r,s){const o=i&&!function sy(e){return"function"==typeof e}(i);let l;if(o)l=t;else{const U=t||{};l=U.index,n=U.injector,r=U.projectableNodes,s=U.environmentInjector||U.ngModuleRef}const w=o?i:new jy(Fn(i)),E=n||this.parentInjector;if(!s&&null==w.ngModule){const j=(o?E:this.parentInjector).get(za,null);j&&(s=j)}const D=Fn(w.componentType??{}),k=$f(this._lContainer,D?.id??null),L=w.create(E,r,k?.firstChild??null,s);return this.insertImpl(L.hostView,l,Xf(this._hostTNode,k)),L}insert(i,t){return this.insertImpl(i,t,!0)}insertImpl(i,t,n){const r=i._lView;if(function $at(e){return ro(e[Xs])}(r)){const l=this.indexOf(i);if(-1!==l)this.detach(l);else{const w=r[Xs],E=new I8(w,w[Ga],w[Xs]);E.detach(E.indexOf(i))}}const s=this._adjustIndex(t),o=this._lContainer;return xg(o,r,s,n),i.attachToViewContainerRef(),K3(jI(o),s,i),i}move(i,t){return this.insert(i,t)}indexOf(i){const t=R8(this._lContainer);return null!==t?t.indexOf(i):-1}remove(i){const t=this._adjustIndex(i,-1),n=My(this._lContainer,t);n&&(Vw(jI(this._lContainer),t),DT(n[Ze],n))}detach(i){const t=this._adjustIndex(i,-1),n=My(this._lContainer,t);return n&&null!=Vw(jI(this._lContainer),t)?new Fy(n):null}_adjustIndex(i,t=0){return i??this.length+t}};function R8(e){return e[8]}function jI(e){return e[8]||(e[8]=[])}function P8(e,i){let t;const n=i[e.index];return ro(n)?t=n:(t=H5(n,i,null,e),i[e.index]=t,kT(i,t)),k8(t,i,e,n),new I8(t,e,i)}let k8=function O8(e,i,t,n){if(e[qc])return;let r;r=8&t.type?ir(n):function wht(e,i){const t=e[en],n=t.createComment(""),r=No(i,e);return Hf(t,mI(t,r),n,function bct(e,i){return e.nextSibling(i)}(t,r),!1),n}(i,t),e[qc]=r},XI=()=>!1;class YI{constructor(i){this.queryList=i,this.matches=null}clone(){return new YI(this.queryList)}setDirty(){this.queryList.setDirty()}}class $I{constructor(i=[]){this.queries=i}createEmbeddedView(i){const t=i.queries;if(null!==t){const n=null!==i.contentQueries?i.contentQueries[0]:t.length,r=[];for(let s=0;si.trim())}(i):i}}class QI{constructor(i=[]){this.queries=i}elementStart(i,t){for(let n=0;n0)n.push(o[l/2]);else{const E=s[l+1],D=i[-w];for(let k=Ms;k(c(i),i.value);return t[a]=i,t}(e),n=t[a];return i?.equal&&(n.equal=i.equal),t.set=r=>nt(n,r),t.update=r=>function dt(e,i){m()||at(),nt(e,i(e.value))}(n,r),t.asReadonly=W8.bind(t),t}function W8(){const e=this[a];if(void 0===e.readonlyFn){const i=()=>this();i[a]=e,e.readonlyFn=i}return e.readonlyFn}function j8(e){return jT(e)&&"function"==typeof e.set}function t2(e,i){let t;const n=V(()=>{t._dirtyCounter();const r=function Rht(e,i){const t=e._lView,n=e._queryIndex;if(void 0===t||void 0===n||4&t[zi])return i?void 0:er;const r=JI(t,n),s=G8(t,n);return r.reset(s,xV),i?r.first:r._changesDetected||void 0===e._flatValue?e._flatValue=r.toArray():e._flatValue}(t,e);if(i&&void 0===r)throw new pe(-951,!1);return r});return t=n[a],t._dirtyCounter=au(0),t._flatValue=void 0,n}function K8(e,i){return function X8(){return t2(!0,!1)}()}const kht=(K8.required=function Pht(e,i){return function Y8(){return t2(!0,!0)}()},K8);function yi(e){let i=function n9(e){return Object.getPrototypeOf(e.prototype).constructor}(e.type),t=!0;const n=[e];for(;i;){let r;if(Ac(e))r=i.\u0275cmp||i.\u0275dir;else{if(i.\u0275cmp)throw new pe(903,!1);r=i.\u0275dir}if(r){if(t){n.push(r);const o=e;o.inputs=YT(e.inputs),o.inputTransforms=YT(e.inputTransforms),o.declaredInputs=YT(e.declaredInputs),o.outputs=YT(e.outputs);const l=r.hostBindings;l&&Xht(e,l);const w=r.viewQuery,E=r.contentQueries;if(w&&Wht(e,w),E&&jht(e,E),Ght(e,r),Ost(e.outputs,r.outputs),Ac(r)&&r.data.animation){const D=e.data;D.animation=(D.animation||[]).concat(r.data.animation)}}const s=r.features;if(s)for(let o=0;o=0;n--){const r=e[n];r.hostVars=i+=r.hostVars,r.hostAttrs=ny(r.hostAttrs,t=ny(t,r.hostAttrs))}}(n)}function Ght(e,i){for(const t in i.inputs){if(!i.inputs.hasOwnProperty(t)||e.inputs.hasOwnProperty(t))continue;const n=i.inputs[t];if(void 0!==n&&(e.inputs[t]=n,e.declaredInputs[t]=i.declaredInputs[t],null!==i.inputTransforms)){const r=Array.isArray(n)?n[0]:n;if(!i.inputTransforms.hasOwnProperty(r))continue;e.inputTransforms??={},e.inputTransforms[r]=i.inputTransforms[r]}}}function YT(e){return e===Qc?{}:e===er?[]:e}function Wht(e,i){const t=e.viewQuery;e.viewQuery=t?(n,r)=>{i(n,r),t(n,r)}:i}function jht(e,i){const t=e.contentQueries;e.contentQueries=t?(n,r,s)=>{i(n,r,s),t(n,r,s)}:i}function Xht(e,i){const t=e.hostBindings;e.hostBindings=t?(n,r)=>{i(n,r),t(n,r)}:i}function r9(e){const i=t=>{const n=Array.isArray(e);null===t.hostDirectives?(t.findHostDirectiveDefs=s9,t.hostDirectives=n?e.map(e2):[e]):n?t.hostDirectives.unshift(...e.map(e2)):t.hostDirectives.unshift(e)};return i.ngInherit=!0,i}function s9(e,i,t){if(null!==e.hostDirectives)for(const n of e.hostDirectives)if("function"==typeof n){const r=n();for(const s of r)a9(e2(s),i,t)}else a9(n,i,t)}function a9(e,i,t){const n=oa(e.directive);(function Kht(e,i){for(const t in i)i.hasOwnProperty(t)&&(e[i[t]]=e[t])})(n.declaredInputs,e.inputs),s9(n,i,t),t.set(n,e),i.push(n)}function e2(e){return"function"==typeof e?{directive:$i(e),inputs:Qc,outputs:Qc}:{directive:$i(e.directive),inputs:o9(e.inputs),outputs:o9(e.outputs)}}function o9(e){if(void 0===e||0===e.length)return Qc;const i={};for(let t=0;tt()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}}class r2 extends c9{constructor(i){super(),this.moduleType=i}create(i){return new n2(this.moduleType,i,[])}}class u9 extends Kf{constructor(i){super(),this.componentFactoryResolver=new D8(this),this.instance=null;const t=new tg([...i.providers,{provide:Kf,useValue:this},{provide:Qf,useValue:this.componentFactoryResolver}],i.parent||Xw(),i.debugName,new Set(["environment"]));this.injector=t,i.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}}function $T(e,i,t=null){return new u9({providers:e,parent:i,debugName:t,runEnvironmentInitializers:!0}).injector}function QT(e){return!!s2(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function s2(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function ou(e,i,t){return e[i]=t}function Is(e,i,t){return!Object.is(e[i],t)&&(e[i]=t,!0)}function Zf(e,i,t,n){const r=Is(e,i,t);return Is(e,i+1,n)||r}function KT(e,i,t,n,r){const s=Zf(e,i,t,n);return Is(e,i+2,r)||s}function $y(e,i,t,n,r,s,o,l,w,E){const D=t+Pi,k=i.firstCreatePass?function ndt(e,i,t,n,r,s,o,l,w){const E=i.consts,D=jf(i,e,4,o||null,l||null);SI(i,t,D,Ql(E,w)),nT(i,D);const k=D.tView=CI(2,D,n,r,s,i.directiveRegistry,i.pipeRegistry,null,i.schemas,E,null);return null!==i.queries&&(i.queries.template(i,D),k.queries=i.queries.embeddedTView(D)),D}(D,i,e,n,r,s,o,l,w):i.data[D];Dc(k,!1);const O=h9(i,e,k,t);fy()&&MT(i,e,O,k),so(O,e);const L=H5(O,e,O,k);return e[D]=L,kT(e,L),function F8(e,i,t){return XI(e,i,t)}(L,k,e),Zw(k)&&wI(i,e,k),null!=w&&TI(e,k,E),k}function Ht(e,i,t,n,r,s,o,l){const w=Ee(),E=Dn();return $y(w,E,e,i,t,n,r,Ql(E.consts,s),o,l),Ht}let h9=function d9(e,i,t,n){return eu(!0),i[en].createComment("")};var Jf=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Jf||{});let y9=(()=>{class e{constructor(){this.impl=null}execute(){this.impl?.execute()}static{this.\u0275prov=Ie({token:e,providedIn:"root",factory:()=>new e})}}return e})();class Zy{constructor(){this.ngZone=Jt(li),this.scheduler=Jt(wg),this.errorHandler=Jt(Tl,{optional:!0}),this.sequences=new Set,this.deferredRegistrations=new Set,this.executing=!1}static{this.PHASES=[Jf.EarlyRead,Jf.Write,Jf.MixedReadWrite,Jf.Read]}execute(){this.executing=!0;for(const i of Zy.PHASES)for(const t of this.sequences)if(!t.erroredOrDestroyed&&t.hooks[i])try{t.pipelinedValue=this.ngZone.runOutsideAngular(()=>t.hooks[i](t.pipelinedValue))}catch(n){t.erroredOrDestroyed=!0,this.errorHandler?.handleError(n)}this.executing=!1;for(const i of this.sequences)i.afterRun(),i.once&&(this.sequences.delete(i),i.destroy());for(const i of this.deferredRegistrations)this.sequences.add(i);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear()}register(i){this.executing?this.deferredRegistrations.add(i):(this.sequences.add(i),this.scheduler.notify(6))}unregister(i){this.executing&&this.sequences.has(i)?(i.erroredOrDestroyed=!0,i.pipelinedValue=void 0,i.once=!0):(this.sequences.delete(i),this.deferredRegistrations.delete(i))}static{this.\u0275prov=Ie({token:Zy,providedIn:"root",factory:()=>new Zy})}}class odt{constructor(i,t,n,r){this.impl=i,this.hooks=t,this.once=n,this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}}function o2(e,i){!i?.injector&&sM();const t=i?.injector??Jt(On);return El(t)?(Vo("NgAfterRender"),x9(e,t,i,!1)):b9}function ao(e,i){!i?.injector&&sM();const t=i?.injector??Jt(On);return El(t)?(Vo("NgAfterNextRender"),x9(e,t,i,!0)):b9}function x9(e,i,t,n){const r=i.get(y9);r.impl??=i.get(Zy);const s=t?.phase??Jf.MixedReadWrite,o=!0!==t?.manualCleanup?i.get(vy):null,l=new odt(r.impl,function ldt(e,i){if(e instanceof Function){const t=[void 0,void 0,void 0,void 0];return t[i]=e,t}return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}(e,s),n,o);return r.impl.register(l),l}const b9={destroy(){}};function _i(e,i,t,n){const r=Ee();return Is(r,Mc(),i)&&(Dn(),su(Gr(),r,e,i,t,n)),_i}function Rg(e,i,t,n){return Is(e,Mc(),t)?i+fn(t)+n:pn}function iC(e,i){return e<<17|i<<2}function vd(e){return e>>17&32767}function v2(e){return 2|e}function tp(e){return(131068&e)>>2}function y2(e,i){return-131069&e|i<<2}function x2(e){return 1|e}function X9(e,i,t,n){const r=e[t+1],s=null===i;let o=n?vd(r):tp(r),l=!1;for(;0!==o&&(!1===l||s);){const E=e[o+1];Wdt(e[o],i)&&(l=!0,e[o+1]=n?x2(E):v2(E)),o=n?vd(E):tp(E)}l&&(e[t+1]=n?v2(r):x2(r))}function Wdt(e,i){return null===e||null==i||(Array.isArray(e)?e[1]:e)===i||!(!Array.isArray(e)||"string"!=typeof i)&&qm(e,i)>=0}const ha={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Y9(e){return e.substring(ha.key,ha.keyEnd)}function $9(e,i){const t=ha.textEnd;return t===i?-1:(i=ha.keyEnd=function $dt(e,i,t){for(;i32;)i++;return i}(e,ha.key=i,t),Vg(e,i,t))}function Vg(e,i,t){for(;i=0;t=$9(i,t))yl(e,Y9(i),!0)}function Ic(e,i,t,n){const r=Ee(),s=Dn(),o=Ku(2);s.firstUpdatePass&&t6(s,e,o,n),i!==pn&&Is(r,o,i)&&i6(s,s.data[Ha()],r,r[en],e,r[o+1]=function sft(e,i){return null==e||""===e||("string"==typeof i?e+=i:"object"==typeof e&&(e=aa(Cl(e)))),e}(i,t),n,o)}function Rc(e,i,t,n){const r=Dn(),s=Ku(2);r.firstUpdatePass&&t6(r,null,s,n);const o=Ee();if(t!==pn&&Is(o,s,t)){const l=r.data[Ha()];if(r6(l,n)&&!q9(r,s)){let w=n?l.classesWithoutHost:l.stylesWithoutHost;null!==w&&(t=FD(w,t||"")),b2(r,l,o,t,n)}else!function rft(e,i,t,n,r,s,o,l){r===pn&&(r=er);let w=0,E=0,D=0=e.expandoStartIndex}function t6(e,i,t,n){const r=e.data;if(null===r[t+1]){const s=r[Ha()],o=q9(e,t);r6(s,n)&&null===i&&!o&&(i=!1),i=function Jdt(e,i,t,n){const r=bM(e);let s=n?i.residualClasses:i.residualStyles;if(null===r)0===(n?i.classBindings:i.styleBindings)&&(t=qy(t=w2(null,e,i,t,n),i.attrs,n),s=null);else{const o=i.directiveStylingLast;if(-1===o||e[o]!==r)if(t=w2(r,e,i,t,n),null===s){let w=function qdt(e,i,t){const n=t?i.classBindings:i.styleBindings;if(0!==tp(n))return e[vd(n)]}(e,i,n);void 0!==w&&Array.isArray(w)&&(w=w2(null,e,i,w[1],n),w=qy(w,i.attrs,n),function tft(e,i,t,n){e[vd(t?i.classBindings:i.styleBindings)]=n}(e,i,n,w))}else s=function eft(e,i,t){let n;const r=i.directiveEnd;for(let s=1+i.directiveStylingLast;s0)&&(E=!0)):D=t,r)if(0!==w){const O=vd(e[l+1]);e[n+1]=iC(O,l),0!==O&&(e[O+1]=y2(e[O+1],n)),e[l+1]=function Udt(e,i){return 131071&e|i<<17}(e[l+1],n)}else e[n+1]=iC(l,0),0!==l&&(e[l+1]=y2(e[l+1],n)),l=n;else e[n+1]=iC(w,0),0===l?l=n:e[w+1]=y2(e[w+1],n),w=n;E&&(e[n+1]=v2(e[n+1])),X9(e,D,n,!0),X9(e,D,n,!1),function Hdt(e,i,t,n,r){const s=r?e.residualClasses:e.residualStyles;null!=s&&"string"==typeof i&&qm(s,i)>=0&&(t[n+1]=x2(t[n+1]))}(i,D,e,n,s),o=iC(l,w),s?i.classBindings=o:i.styleBindings=o}(r,s,i,t,o,n)}}function w2(e,i,t,n,r){let s=null;const o=t.directiveEnd;let l=t.directiveStylingLast;for(-1===l?l=t.directiveStart:l++;l0;){const w=e[r],E=Array.isArray(w),D=E?w[1]:w,k=null===D;let O=t[r+1];O===pn&&(O=k?er:void 0);let L=k?$D(O,n):D===n?O:void 0;if(E&&!nC(L)&&(L=$D(w,n)),nC(L)&&(l=L,o))return l;const U=e[r+1];r=o?vd(U):tp(U)}if(null!==i){let w=s?i.residualClasses:i.residualStyles;null!=w&&(l=$D(w,n))}return l}function nC(e){return void 0!==e}function r6(e,i){return!!(e.flags&(i?8:16))}class mft{destroy(i){}updateValue(i,t){}swap(i,t){const n=Math.min(i,t),r=Math.max(i,t),s=this.detach(r);if(r-n>1){const o=this.detach(n);this.attach(n,s),this.attach(r,o)}else this.attach(n,s)}move(i,t){this.attach(t,this.detach(i))}}function T2(e,i,t,n,r){return e===t&&Object.is(i,n)?1:Object.is(r(e,i),r(t,n))?-1:0}function C2(e,i,t,n){return!(void 0===i||!i.has(n)||(e.attach(t,i.get(n)),i.delete(n),0))}function a6(e,i,t,n,r){if(C2(e,i,n,t(n,r)))e.updateValue(n,r);else{const s=e.create(n,r);e.attach(n,s)}}function o6(e,i,t,n){const r=new Set;for(let s=i;s<=t;s++)r.add(n(s,e.at(s)));return r}class l6{constructor(){this.kvMap=new Map,this._vMap=void 0}has(i){return this.kvMap.has(i)}delete(i){if(!this.has(i))return!1;const t=this.kvMap.get(i);return void 0!==this._vMap&&this._vMap.has(t)?(this.kvMap.set(i,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(i),!0}get(i){return this.kvMap.get(i)}set(i,t){if(this.kvMap.has(i)){let n=this.kvMap.get(i);void 0===this._vMap&&(this._vMap=new Map);const r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(i,t)}forEach(i){for(let[t,n]of this.kvMap)if(i(n,t),void 0!==this._vMap){const r=this._vMap;for(;r.has(n);)n=r.get(n),i(n,t)}}}function Tn(e,i){Vo("NgControlFlow");const t=Ee(),n=Mc(),r=t[n]!==pn?t[n]:-1,s=-1!==r?oC(t,Pi+r):void 0;if(Is(t,n,e)){const l=y(null);try{if(void 0!==s&&II(s,0),-1!==e){const w=Pi+e,E=oC(t,w),D=S2(t[Ze],w),k=$f(E,D.tView.ssrId);xg(E,yg(t,D,i,{dehydratedView:k}),0,Xf(D,k))}}finally{y(l)}}else if(void 0!==s){const l=$5(s,0);void 0!==l&&(l[zr]=i)}}class vft{constructor(i,t,n){this.lContainer=i,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Ms}}function rC(e,i){return i}class xft{constructor(i,t,n){this.hasEmptyBlock=i,this.trackByFn=t,this.liveCollection=n}}function sC(e,i,t,n,r,s,o,l,w,E,D,k,O){Vo("NgControlFlow");const L=Ee(),U=Dn(),j=void 0!==w,W=Ee(),Z=l?o.bind(W[os][zr]):o,rt=new xft(j,Z);W[Pi+e]=rt,$y(L,U,e+1,i,t,n,r,Ql(U.consts,s)),j&&$y(L,U,e+2,w,E,D,k,Ql(U.consts,O))}class bft extends mft{constructor(i,t,n){super(),this.lContainer=i,this.hostLView=t,this.templateTNode=n,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-Ms}at(i){return this.getLView(i)[zr].$implicit}attach(i,t){const n=t[Lo];this.needsIndexUpdate||=i!==this.length,xg(this.lContainer,t,i,Xf(this.templateTNode,n))}detach(i){return this.needsIndexUpdate||=i!==this.length-1,function wft(e,i){return My(e,i)}(this.lContainer,i)}create(i,t){const n=$f(this.lContainer,this.templateTNode.tView.ssrId),r=yg(this.hostLView,this.templateTNode,new vft(this.lContainer,t,i),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(i){DT(i[Ze],i),this.operationsCounter?.recordDestroy()}updateValue(i,t){this.getLView(i)[zr].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let i=0;i{e.destroy(w)})}(w,e,s.trackByFn),w.updateIndexes(),s.hasEmptyBlock){const E=Mc(),D=0===w.length;if(Is(n,E,D)){const k=t+2,O=oC(n,k);if(D){const L=S2(r,k),U=$f(O,L.tView.ssrId);xg(O,yg(n,L,void 0,{dehydratedView:U}),0,Xf(L,U))}else II(O,0)}}}finally{y(i)}}function oC(e,i){return e[i]}function S2(e,i){return uy(e,i)}function J(e,i,t,n){const r=Ee(),s=Dn(),o=Pi+e,l=r[en],w=s.firstCreatePass?function Cft(e,i,t,n,r,s){const o=i.consts,w=jf(i,e,2,n,Ql(o,r));return SI(i,t,w,Ql(o,s)),null!==w.attrs&&WT(w,w.attrs,!1),null!==w.mergedAttrs&&WT(w,w.mergedAttrs,!0),null!==i.queries&&i.queries.elementStart(i,w),w}(o,s,r,i,t,n):s.data[o],E=c6(s,r,w,l,i,e);r[o]=E;const D=Zw(w);return Dc(w,!0),k5(l,E,w),!function Cg(e){return!(32&~e.flags)}(w)&&fy()&&MT(s,r,E,w),0===function Qat(){return nn.lFrame.elementDepthCount}()&&so(E,r),function Kat(){nn.lFrame.elementDepthCount++}(),D&&(wI(s,r,w),bI(s,w,r)),null!==n&&TI(r,w),J}function et(){let e=Sr();vM()?yM():(e=e.parent,Dc(e,!1));const i=e;(function Jat(e){return nn.skipHydrationRootTNode===e})(i)&&function iot(){nn.skipHydrationRootTNode=null}(),function Zat(){nn.lFrame.elementDepthCount--}();const t=Dn();return t.firstCreatePass&&(nT(t,e),lM(e)&&t.queries.elementEnd(e)),null!=i.classesWithoutHost&&function pot(e){return!!(8&e.flags)}(i)&&b2(t,i,Ee(),i.classesWithoutHost,!0),null!=i.stylesWithoutHost&&function mot(e){return!!(16&e.flags)}(i)&&b2(t,i,Ee(),i.stylesWithoutHost,!1),et}function ye(e,i,t,n){return J(e,i,t,n),et(),ye}let c6=(e,i,t,n,r,s)=>(eu(!0),AT(n,r,function WB(){return nn.lFrame.currentNamespace}()));function Qi(e,i,t){const n=Ee(),r=Dn(),s=e+Pi,o=r.firstCreatePass?function _ft(e,i,t,n,r){const s=i.consts,o=Ql(s,n),l=jf(i,e,8,"ng-container",o);return null!==o&&WT(l,o,!0),SI(i,t,l,Ql(s,r)),null!==i.queries&&i.queries.elementStart(i,l),l}(s,r,n,i,t):r.data[s];Dc(o,!0);const l=u6(r,n,o,e);return n[s]=l,fy()&&MT(r,n,l,o),so(l,n),Zw(o)&&(wI(r,n,o),bI(r,o,n)),null!=t&&TI(n,o),Qi}function Ki(){let e=Sr();const i=Dn();return vM()?yM():(e=e.parent,Dc(e,!1)),i.firstCreatePass&&(nT(i,e),lM(e)&&i.queries.elementEnd(e)),Ki}function da(e,i,t){return Qi(e,i,t),Ki(),da}let u6=(e,i,t,n)=>(eu(!0),hI(i[en],""));function xe(){return Ee()}function uu(e,i,t){const n=Ee();return Is(n,Mc(),i)&&nl(Dn(),Gr(),n,e,i,n[en],t,!0),uu}function lC(e,i,t){const n=Ee();if(Is(n,Mc(),i)){const s=Dn(),o=Gr();nl(s,o,n,e,i,Y5(bM(s.data),o,n),t,!0)}return lC}const ep=void 0;var Ift=["en",[["a","p"],["AM","PM"],ep],[["AM","PM"],ep,ep],[["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"]],ep,[["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"]],ep,[["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}",ep,"{1} 'at' {0}",ep],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function Mft(e){const t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}];let Ug={};function Uo(e){const i=function Rft(e){return e.toLowerCase().replace(/_/g,"-")}(e);let t=d6(i);if(t)return t;const n=i.split("-")[0];if(t=d6(n),t)return t;if("en"===n)return Ift;throw new pe(701,!1)}function d6(e){return e in Ug||(Ug[e]=Jr.ng&&Jr.ng.common&&Jr.ng.common.locales&&Jr.ng.common.locales[e]),Ug[e]}var Wr=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(Wr||{});const cC="en-US";let f6=cC,R6=(e,i,t)=>{};function Ut(e,i,t,n){const r=Ee(),s=Dn(),o=Sr();return A2(s,r,r[en],o,e,i,n),Ut}function fC(e,i){const t=Sr(),n=Ee(),r=Dn();return A2(r,n,Y5(bM(r.data),t,n),t,e,i),fC}function A2(e,i,t,n,r,s,o){const l=Zw(n),E=e.firstCreatePass&&X5(e),D=i[zr],k=j5(i);let O=!0;if(3&n.type||o){const j=No(n,i),W=o?o(j):j,Z=k.length,rt=o?yt=>o(ir(yt[n.index])):n.index;let st=null;if(!o&&l&&(st=function xpt(e,i,t,n){const r=e.cleanup;if(null!=r)for(let s=0;sw?l[w]:null}"string"==typeof o&&(s+=2)}return null}(e,i,r,n.index)),null!==st)(st.__ngLastListenerFn__||st).__ngNextListenerFn__=s,st.__ngLastListenerFn__=s,O=!1;else{s=F6(n,i,D,s),R6(j,r,s);const yt=t.listen(W,r,s);k.push(s,yt),E&&E.push(r,rt,Z,Z+1)}}else s=F6(n,i,D,s);const L=n.outputs;let U;if(O&&null!==L&&(U=L[r])){const j=U.length;if(j)for(let W=0;W-1?xl(e.index,i):i,5);let l=k6(i,t,n,s),w=r.__ngNextListenerFn__;for(;w;)l=k6(i,t,w,s)&&l,w=w.__ngNextListenerFn__;return l}}function St(e=1){return function oot(e){return(nn.lFrame.contextLView=function MB(e,i){for(;e>0;)i=i[rg],e--;return i}(e,nn.lFrame.contextLView))[zr]}(e)}function bpt(e,i){let t=null;const n=function uat(e){const i=e.attrs;if(null!=i){const t=i.indexOf(5);if(!(1&t))return i[t+1]}return null}(e);for(let r=0;rt._dirtyCounter.update(n=>n+1))}(i,U8(e,t,n,r))}function Zi(e){return Ff(function kB(){return nn.lFrame.contextLView}(),Pi+e)}function ut(e,i=""){const t=Ee(),n=Dn(),r=e+Pi,s=n.firstCreatePass?jf(n,r,1,i,null):n.data[r],o=tU(n,t,s,i,e);t[r]=o,fy()&&MT(n,t,o,s),Dc(s,!1)}let tU=(e,i,t,n,r)=>(eu(!0),function uI(e,i){return e.createText(i)}(i[en],n));function Ke(e){return Je("",e,""),Ke}function Je(e,i,t){const n=Ee(),r=Rg(n,e,i,t);return r!==pn&&th(n,Ha(),r),Je}function sl(e,i,t,n,r){const s=Ee(),o=function Pg(e,i,t,n,r,s){const l=Zf(e,Qu(),t,r);return Ku(2),l?i+fn(t)+n+fn(r)+s:pn}(s,e,i,t,n,r);return o!==pn&&th(s,Ha(),o),sl}function sx(e,i,t,n,r,s,o){const l=Ee(),w=function kg(e,i,t,n,r,s,o,l){const E=KT(e,Qu(),t,r,o);return Ku(3),E?i+fn(t)+n+fn(r)+s+fn(o)+l:pn}(l,e,i,t,n,r,s,o);return w!==pn&&th(l,Ha(),w),sx}function _a(e,i,t){j8(i)&&(i=i());const n=Ee();return Is(n,Mc(),i)&&nl(Dn(),Gr(),n,e,i,n[en],t,!1),_a}function ja(e,i){const t=j8(e);return t&&e.set(i),t}function Aa(e,i){const t=Ee(),n=Dn(),r=Sr();return A2(n,t,t[en],r,e,i),Aa}function M2(e,i,t,n,r){if(e=$i(e),Array.isArray(e))for(let s=0;s>20;if(Rf(e)||!e.multi){const L=new py(E,r,pt),U=R2(w,i,r?D:D+O,k);-1===U?(IM(oT(l,o),s,w),I2(s,e,i.length),i.push(w),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),t.push(L),o.push(L)):(t[U]=L,o[U]=L)}else{const L=R2(w,i,D+O,k),U=R2(w,i,D,D+O),W=U>=0&&t[U];if(r&&!W||!r&&!(L>=0&&t[L])){IM(oT(l,o),s,w);const Z=function Vpt(e,i,t,n,r){const s=new py(e,t,pt);return s.multi=[],s.index=i,s.componentProviders=0,cU(s,r,n&&!t),s}(r?Bpt:Npt,t.length,r,n,E);!r&&W&&(t[U].providerFactory=Z),I2(s,e,i.length,0),i.push(w),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),t.push(Z),o.push(Z)}else I2(s,e,L>-1?L:U,cU(t[r?U:L],E,!r&&n));!r&&n&&W&&t[U].componentProviders++}}}function I2(e,i,t,n){const r=Rf(i),s=function Cat(e){return!!e.useClass}(i);if(r||s){const w=(s?$i(i.useClass):i).prototype.ngOnDestroy;if(w){const E=e.destroyHooks||(e.destroyHooks=[]);if(!r&&i.multi){const D=E.indexOf(t);-1===D?E.push(t,[n,w]):E[D+1].push(n,w)}else E.push(t,w)}}}function cU(e,i,t){return t&&e.componentProviders++,e.multi.push(i)-1}function R2(e,i,t,n){for(let r=t;r{t.providersResolver=(n,r)=>function Lpt(e,i,t){const n=Dn();if(n.firstCreatePass){const r=Ac(e);M2(t,n.data,n.blueprint,r,!0),M2(i,n.data,n.blueprint,r,!1)}}(n,r?r(e):e,i)}}let Upt=(()=>{class e{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){const n=JD(0,t.type),r=n.length>0?$T([n],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}static{this.\u0275prov=Ie({token:e,providedIn:"environment",factory:()=>new e(re(za))})}}return e})();function Wi(e){Vo("NgStandalone"),e.getStandaloneInjector=i=>i.get(Upt).getOrCreateStandaloneInjector(e)}function Xa(e,i,t){const n=Bo()+e,r=Ee();return r[n]===pn?ou(r,n,t?i.call(t):i()):function Yy(e,i){return e[i]}(r,n)}function Al(e,i,t,n){return dU(Ee(),Bo(),e,i,t,n)}function k2(e,i,t,n,r){return fU(Ee(),Bo(),e,i,t,n,r)}function ax(e,i){const t=e[i];return t===pn?void 0:t}function dU(e,i,t,n,r,s){const o=i+t;return Is(e,o,r)?ou(e,o+1,s?n.call(s,r):n(r)):ax(e,o+1)}function fU(e,i,t,n,r,s,o){const l=i+t;return Zf(e,l,r,s)?ou(e,l+2,o?n.call(o,r,s):n(r,s)):ax(e,l+2)}function vs(e,i){const t=Dn();let n;const r=e+Pi;t.firstCreatePass?(n=function Zpt(e,i){if(i)for(let t=i.length-1;t>=0;t--){const n=i[t];if(e===n.name)return n}}(i,t.pipeRegistry),t.data[r]=n,n.onDestroy&&(t.destroyHooks??=[]).push(r,n.onDestroy)):n=t.data[r];const s=n.factory||(n.factory=If(n.type)),l=tl(pt);try{const w=aT(!1),E=s();return aT(w),function D2(e,i,t,n){t>=e.data.length&&(e.data[t]=null,e.blueprint[t]=null),i[t]=n}(t,Ee(),r,E),E}finally{tl(l)}}function Jl(e,i,t){const n=e+Pi,r=Ee(),s=Ff(r,n);return ox(r,n)?dU(r,Bo(),i,s.transform,t,s):s.transform(t)}function Pc(e,i,t,n){const r=e+Pi,s=Ee(),o=Ff(s,r);return ox(s,r)?fU(s,Bo(),i,o.transform,t,n,o):o.transform(t,n)}function vU(e,i,t,n,r){const s=e+Pi,o=Ee(),l=Ff(o,s);return ox(o,s)?function pU(e,i,t,n,r,s,o,l){const w=i+t;return KT(e,w,r,s,o)?ou(e,w+3,l?n.call(l,r,s,o):n(r,s,o)):ax(e,w+3)}(o,Bo(),i,l.transform,t,n,r,l):l.transform(t,n,r)}function ox(e,i){return e[Ze].data[i].pure}function zg(e,i){return LT(e,i)}let kU=(()=>{class e{log(t){console.log(t)}warn(t){console.warn(t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();const BU=new te(""),xC=new te("");let z2,V2=(()=>{class e{constructor(t,n,r){this._ngZone=t,this.registry=n,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,z2||(function Xmt(e){z2=e}(r),r.addToWindow(n)),this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{li.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb()}});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>!n.updateCb||!n.updateCb(t)||(clearTimeout(n.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,n,r){let s=-1;n&&n>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),t()},n)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:r})}whenStable(t,n,r){if(r&&!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(t,n,r),this._runCallbacksIfReady()}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,n,r){return[]}static{this.\u0275fac=function(n){return new(n||e)(re(li),re(U2),re(xC))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})(),U2=(()=>{class e{constructor(){this._applications=new Map}registerApplication(t,n){this._applications.set(t,n)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,n=!0){return z2?.findTestabilityInTree(this,t,n)??null}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();function ux(e){return!!e&&"function"==typeof e.then}function VU(e){return!!e&&"function"==typeof e.subscribe}const G2=new te("");let UU=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n}),this.appInits=Jt(G2,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const t=[];for(const r of this.appInits){const s=r();if(ux(s))t.push(s);else if(VU(s)){const o=new Promise((l,w)=>{s.subscribe({complete:l,error:w})});t.push(o)}}const n=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{n()}).catch(r=>{this.reject(r)}),0===t.length&&n(),this.initialized=!0}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const bC=new te("");function GU(e,i){return Array.isArray(i)?i.reduce(GU,e):{...e,...i}}let ql=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=Jt(Hot),this.afterRenderManager=Jt(y9),this.zonelessEnabled=Jt(Gy),this.dirtyFlags=0,this.deferredDirtyFlags=0,this.externalTestViews=new Set,this.beforeRender=new Fe,this.afterTick=new Fe,this.componentTypes=[],this.components=[],this.isStable=Jt(Zu).hasPendingTasks.pipe(Ri(t=>!t)),this._injector=Jt(za)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}whenStable(){let t;return new Promise(n=>{t=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{t.unsubscribe()})}get injector(){return this._injector}bootstrap(t,n){const r=t instanceof S8;if(!this._injector.get(UU).done)throw!r&&function ud(e){const i=Fn(e)||oa(e)||Ua(e);return null!==i&&i.standalone}(t),new pe(405,!1);let o;o=r?t:this._injector.get(Qf).resolveComponentFactory(t),this.componentTypes.push(o.componentType);const l=function Ymt(e){return e.isBoundToModule}(o)?void 0:this._injector.get(Kf),E=o.create(On.NULL,[],n||o.selector,l),D=E.location.nativeElement,k=E.injector.get(BU,null);return k?.registerApplication(D),E.onDestroy(()=>{this.detachView(E.hostView),wC(this.components,E),k?.unregisterApplication(D)}),this._loadComponent(E),E}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){if(this._runningTick)throw new pe(101,!1);const t=y(null);try{this._runningTick=!0,this.synchronize()}catch(n){this.internalErrorHandler(n)}finally{this._runningTick=!1,y(t),this.afterTick.next()}}synchronize(){let t=null;this._injector.destroyed||(t=this._injector.get(GT,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let n=0;for(;0!==this.dirtyFlags&&n++<10;)this.synchronizeOnce(t)}synchronizeOnce(t){if(this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0,7&this.dirtyFlags){const n=!!(1&this.dirtyFlags);this.dirtyFlags&=-8,this.dirtyFlags|=8,this.beforeRender.next(n);for(let{_lView:r,notifyErrorHandler:s}of this._views)Kmt(r,s,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),7&this.dirtyFlags)return}else t?.begin?.(),t?.end?.();8&this.dirtyFlags&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){this.allViews.some(({_lView:t})=>Jw(t))?this.dirtyFlags|=2:this.dirtyFlags&=-8}attachView(t){const n=t;this._views.push(n),n.attachToAppRef(this)}detachView(t){const n=t;wC(this._views,n),n.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const n=this._injector.get(bC,[]);[...this._bootstrapListeners,...n].forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>wC(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new pe(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function wC(e,i){const t=e.indexOf(i);t>-1&&e.splice(t,1)}function Kmt(e,i,t,n){(t||Jw(e))&&OT(e,i,t&&!n?0:1)}class Zmt{constructor(i,t){this.ngModuleFactory=i,this.componentFactories=t}}let WU=(()=>{class e{compileModuleSync(t){return new r2(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const n=this.compileModuleSync(t),s=Sl(no(t).declarations).reduce((o,l)=>{const w=Fn(l);return w&&o.push(new jy(w)),o},[]);return new Zmt(n,s)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),tgt=(()=>{class e{constructor(){this.zone=Jt(li),this.changeDetectionScheduler=Jt(wg),this.applicationRef=Jt(ql)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function H2({ngZoneFactory:e,ignoreChangesOutsideZone:i,scheduleInRootZone:t}){return e??=()=>new li({...W2(),scheduleInRootZone:t}),[{provide:li,useFactory:e},{provide:Kc,multi:!0,useFactory:()=>{const n=Jt(tgt,{optional:!0});return()=>n.initialize()}},{provide:Kc,multi:!0,useFactory:()=>{const n=Jt(igt);return()=>{n.initialize()}}},!0===i?{provide:C8,useValue:!0}:[],{provide:GI,useValue:t??dV}]}function W2(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}let igt=(()=>{class e{constructor(){this.subscription=new Pe,this.initialized=!1,this.zone=Jt(li),this.pendingTasks=Jt(Zu)}initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{li.assertNotInAngularZone(),queueMicrotask(()=>{null!==t&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{li.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),hx=(()=>{class e{constructor(){this.appRef=Jt(ql),this.taskService=Jt(Zu),this.ngZone=Jt(li),this.zonelessEnabled=Jt(Gy),this.disableScheduling=Jt(C8,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new Pe,this.angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(dT):null,this.scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Jt(GI,{optional:!0})??!1),this.cancelScheduledCallback=null,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof NM||!this.zoneIsDefined)}notify(t){if(!this.zonelessEnabled&&5===t)return;switch(t){case 0:this.appRef.dirtyFlags|=2;break;case 3:case 2:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 7:this.appRef.deferredDirtyFlags|=8;break;default:this.appRef.dirtyFlags|=8}if(!this.shouldScheduleTick())return;const n=this.useMicrotaskScheduler?pV:fV;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>n(()=>this.tick())):this.ngZone.runOutsideAngular(()=>n(()=>this.tick()))}shouldScheduleTick(){return!(this.disableScheduling||null!==this.pendingRenderTaskId||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(dT+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;!this.zonelessEnabled&&7&this.appRef.dirtyFlags&&(this.appRef.dirtyFlags|=1);const t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){throw this.taskService.remove(t),n}finally{this.cleanup()}this.useMicrotaskScheduler=!0,pV(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,null!==this.pendingRenderTaskId){const t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const eh=new te("",{providedIn:"root",factory:()=>Jt(eh,Nn.Optional|Nn.SkipSelf)||function ngt(){return typeof $localize<"u"&&$localize.locale||cC}()}),CC=new te("");function SC(e){return!e.moduleRef}let KU=(()=>{class e{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,n){const r=n?.scheduleInRootZone,o=n?.ignoreChangesOutsideZone,l=[H2({ngZoneFactory:()=>function Got(e="zone.js",i){return"noop"===e?new NM:"zone.js"===e?new li(i):e}(n?.ngZone,{...W2({eventCoalescing:n?.ngZoneEventCoalescing,runCoalescing:n?.ngZoneRunCoalescing}),scheduleInRootZone:r}),ignoreChangesOutsideZone:o}),{provide:wg,useExisting:hx}],w=function Jht(e,i,t){return new n2(e,i,t,!1)}(t.moduleType,this.injector,l);return function QU(e){const i=SC(e)?e.r3Injector:e.moduleRef.injector,t=i.get(li);return t.run(()=>{SC(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();const n=i.get(Tl,null);let r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:s=>{n.handleError(s)}})}),SC(e)){const s=()=>i.destroy(),o=e.platformInjector.get(CC);o.add(s),i.onDestroy(()=>{r.unsubscribe(),o.delete(s)})}else{const s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(CC);o.add(s),e.moduleRef.onDestroy(()=>{wC(e.allPlatformModules,e.moduleRef),r.unsubscribe(),o.delete(s)})}return function Qmt(e,i,t){try{const n=t();return ux(n)?n.catch(r=>{throw i.runOutsideAngular(()=>e.handleError(r)),r}):n}catch(n){throw i.runOutsideAngular(()=>e.handleError(n)),n}}(n,t,()=>{const s=i.get(UU);return s.runInitializers(),s.donePromise.then(()=>{if(function Oft(e){"string"==typeof e&&(f6=e.toLowerCase().replace(/_/g,"-"))}(i.get(eh,cC)||cC),SC(e)){const l=i.get(ql);return void 0!==e.rootComponent&&l.bootstrap(e.rootComponent),l}return function cgt(e,i){const t=e.injector.get(ql);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(n=>t.bootstrap(n));else{if(!e.instance.ngDoBootstrap)throw new pe(-403,!1);e.instance.ngDoBootstrap(t)}i.push(e)}(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}({moduleRef:w,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(t,n=[]){const r=GU({},n);return function qmt(e,i,t){const n=new r2(t);return Promise.resolve(n)}(0,0,t).then(s=>this.bootstrapModuleFactory(s,r))}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const t=this._injector.get(CC,null);t&&(t.forEach(n=>n()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static{this.\u0275fac=function(n){return new(n||e)(re(On))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})(),xd=null;const ZU=new te("");function JU(e,i,t=[]){const n=`Platform: ${i}`,r=new te(n);return(s=[])=>{let o=X2();if(!o||o.injector.get(ZU,!1)){const l=[...t,...s,{provide:r,useValue:!0}];e?e(l):function ugt(e){if(xd&&!xd.get(ZU,!1))throw new pe(400,!1);(function zU(){!function lt(e){tt=e}(()=>{throw new pe(600,!1)})})(),xd=e;const i=e.get(KU);(function tz(e){e.get(VV,null)?.forEach(t=>t())})(e)}(function qU(e=[],i){return On.create({name:i,providers:[{provide:eM,useValue:"platform"},{provide:CC,useValue:new Set([()=>xd=null])},...e]})}(l,n))}return function hgt(){const i=X2();if(!i)throw new pe(401,!1);return i}()}}function X2(){return xd?.get(KU)??null}let In=(()=>{class e{static{this.__NG_ELEMENT_ID__=fgt}}return e})();function fgt(e){return function pgt(e,i,t){if(kf(e)&&!t){const n=xl(e.index,i);return new Fy(n,n)}return 175&e.type?new Fy(i[os],i):null}(Sr(),Ee(),!(16&~e))}class sz{constructor(){}supports(i){return QT(i)}create(i){return new xgt(i)}}const ygt=(e,i)=>i;class xgt{constructor(i){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=i||ygt}forEachItem(i){let t;for(t=this._itHead;null!==t;t=t._next)i(t)}forEachOperation(i){let t=this._itHead,n=this._removalsHead,r=0,s=null;for(;t||n;){const o=!n||t&&t.currentIndex{o=this._trackByFn(r,l),null!==t&&Object.is(t.trackById,o)?(n&&(t=this._verifyReinsertion(t,l,o,r)),Object.is(t.item,l)||this._addIdentityChange(t,l)):(t=this._mismatch(t,l,o,r),n=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=i,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;null!==i;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;null!==i;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,t,n,r){let s;return null===i?s=this._itTail:(s=i._prev,this._remove(i)),null!==(i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(i.item,t)||this._addIdentityChange(i,t),this._reinsertAfter(i,s,r)):null!==(i=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Object.is(i.item,t)||this._addIdentityChange(i,t),this._moveAfter(i,s,r)):i=this._addAfter(new bgt(t,n),s,r),i}_verifyReinsertion(i,t,n,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?i=this._reinsertAfter(s,i._prev,r):i.currentIndex!=r&&(i.currentIndex=r,this._addToMoves(i,r)),i}_truncate(i){for(;null!==i;){const t=i._next;this._addToRemovals(this._unlink(i)),i=t}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(i,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(i);const r=i._prevRemoved,s=i._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(i,t,n),this._addToMoves(i,n),i}_moveAfter(i,t,n){return this._unlink(i),this._insertAfter(i,t,n),this._addToMoves(i,n),i}_addAfter(i,t,n){return this._insertAfter(i,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=i:this._additionsTail._nextAdded=i,i}_insertAfter(i,t,n){const r=null===t?this._itHead:t._next;return i._next=r,i._prev=t,null===r?this._itTail=i:r._prev=i,null===t?this._itHead=i:t._next=i,null===this._linkedRecords&&(this._linkedRecords=new az),this._linkedRecords.put(i),i.currentIndex=n,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){null!==this._linkedRecords&&this._linkedRecords.remove(i);const t=i._prev,n=i._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,i}_addToMoves(i,t){return i.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=i:this._movesTail._nextMoved=i),i}_addToRemovals(i){return null===this._unlinkedRecords&&(this._unlinkedRecords=new az),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,t){return i.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=i:this._identityChangesTail._nextIdentityChange=i,i}}class bgt{constructor(i,t){this.item=i,this.trackById=t,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 wgt{constructor(){this._head=null,this._tail=null}add(i){null===this._head?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,t){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&Object.is(n.trackById,i))return n;return null}remove(i){const t=i._prevDup,n=i._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}class az{constructor(){this.map=new Map}put(i){const t=i.trackById;let n=this.map.get(t);n||(n=new wgt,this.map.set(t,n)),n.add(i)}get(i,t){const r=this.map.get(i);return r?r.get(i,t):null}remove(i){const t=i.trackById;return this.map.get(t).remove(i)&&this.map.delete(t),i}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function oz(e,i,t){const n=e.previousIndex;if(null===n)return n;let r=0;return t&&n{if(t&&t.key===r)this._maybeAddToChanges(t,n),this._appendAfter=t,t=t._next;else{const s=this._getOrCreateRecordForKey(r,n);t=this._insertBeforeOrAppend(t,s)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let n=t;null!==n;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,t){if(i){const n=i._prev;return t._next=i,t._prev=n,i._prev=t,n&&(n._next=t),i===this._mapHead&&(this._mapHead=t),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(i,t){if(this._records.has(i)){const r=this._records.get(i);this._maybeAddToChanges(r,t);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const n=new Cgt(i);return this._records.set(i,n),n.currentValue=t,this._addToAdditions(n),n}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;null!==i;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;null!=i;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,t){Object.is(t,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=t,this._addToChanges(i))}_addToAdditions(i){null===this._additionsHead?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){null===this._changesHead?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,t){i instanceof Map?i.forEach(t):Object.keys(i).forEach(n=>t(i[n],n))}}class Cgt{constructor(i){this.key=i,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 cz(){return new bd([new sz])}let bd=(()=>{class e{static{this.\u0275prov=Ie({token:e,providedIn:"root",factory:cz})}constructor(t){this.factories=t}static create(t,n){if(null!=n){const r=n.factories.slice();t=t.concat(r)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>e.create(t,n||cz()),deps:[[e,new Mf,new Xu]]}}find(t){const n=this.factories.find(r=>r.supports(t));if(null!=n)return n;throw new pe(901,!1)}}return e})();function uz(){return new AC([new lz])}let AC=(()=>{class e{static{this.\u0275prov=Ie({token:e,providedIn:"root",factory:uz})}constructor(t){this.factories=t}static create(t,n){if(n){const r=n.factories.slice();t=t.concat(r)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>e.create(t,n||uz()),deps:[[e,new Mf,new Xu]]}}find(t){const n=this.factories.find(r=>r.supports(t));if(n)return n;throw new pe(901,!1)}}return e})();const _gt=JU(null,"core",[]);let Agt=(()=>{class e{constructor(t){}static{this.\u0275fac=function(n){return new(n||e)(re(ql))}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({})}}return e})();function qe(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}function jr(e,i=NaN){return isNaN(parseFloat(e))||isNaN(Number(e))?i:Number(e)}function rp(e,i){Vo("NgSignals");const t=V(e);return i?.equal&&(t[a].equal=i.equal),t}function kc(e){const i=y(null);try{return e()}finally{y(i)}}const svt=new te("",{providedIn:"root",factory:()=>Jt(avt)});let avt=(()=>{class e{static{this.\u0275prov=Ie({token:e,providedIn:"root",factory:()=>new ovt})}}return e})();class ovt{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=Jt(Zu),this.taskId=null}scheduleEffect(i){if(this.enqueue(i),null===this.taskId){const t=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(t),this.taskId=null})}}enqueue(i){const t=i.creationZone;this.queues.has(t)||this.queues.set(t,new Set);const n=this.queues.get(t);n.has(i)||(this.queuedEffectCount++,n.add(i))}flush(){for(;this.queuedEffectCount>0;)for(const[i,t]of this.queues)null===i?this.flushQueue(t):i.run(()=>this.flushQueue(t))}flushQueue(i){for(const t of i)i.delete(t),this.queuedEffectCount--,t.run()}}class lvt{constructor(i,t,n,r,s,o){this.scheduler=i,this.effectFn=t,this.creationZone=n,this.injector=s,this.watcher=function Bt(e,i,t){const n=Object.create(Zt);t&&(n.consumerAllowSignalWrites=!0),n.fn=e,n.schedule=i;const r=w=>{n.cleanupFn=w};return n.ref={notify:()=>v(n),run:()=>{if(null===n.fn)return;if(function g(){return S}())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(n.dirty=!1,n.hasRun&&!T(n))return;n.hasRun=!0;const w=x(n);try{n.cleanupFn(),n.cleanupFn=Kt,n.fn(r)}finally{b(n,w)}},cleanup:()=>n.cleanupFn(),destroy:()=>function o(w){(function s(w){return null===w.fn&&null===w.schedule})(w)||(_(w),w.cleanupFn(),w.fn=null,w.schedule=null,w.cleanupFn=Kt)}(n),[a]:n},n.ref}(l=>this.runEffect(l),()=>this.schedule(),o),this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}runEffect(i){try{this.effectFn(i)}catch(t){this.injector.get(Tl,null,{optional:!0})?.handleError(t)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}}let Fz=null;function wd(){return Fz}class dvt{}const Gi=new te("");let q2=(()=>{class e{historyGo(t){throw new Error("")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:()=>Jt(pvt),providedIn:"platform"})}}return e})();const fvt=new te("");let pvt=(()=>{class e extends q2{constructor(){super(),this._doc=Jt(Gi),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return wd().getBaseHref(this._doc)}onPopState(t){const n=wd().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){const n=wd().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",t,!1),()=>n.removeEventListener("hashchange",t)}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(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:()=>new e,providedIn:"platform"})}}return e})();function tR(e,i){if(0==e.length)return i;if(0==i.length)return e;let t=0;return e.endsWith("/")&&t++,i.startsWith("/")&&t++,2==t?e+i.substring(1):1==t?e+i:e+"/"+i}function Oz(e){const i=e.match(/#|\?|$/),t=i&&i.index||e.length;return e.slice(0,t-("/"===e[t-1]?1:0))+e.slice(t)}function ih(e){return e&&"?"!==e[0]?"?"+e:e}let sp=(()=>{class e{historyGo(t){throw new Error("")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:()=>Jt(Nz),providedIn:"root"})}}return e})();const Lz=new te("");let Nz=(()=>{class e extends sp{constructor(t,n){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Jt(Gi).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return tR(this._baseHref,t)}path(t=!1){const n=this._platformLocation.pathname+ih(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${n}${r}`:n}pushState(t,n,r,s){const o=this.prepareExternalUrl(r+ih(s));this._platformLocation.pushState(t,n,o)}replaceState(t,n,r,s){const o=this.prepareExternalUrl(r+ih(s));this._platformLocation.replaceState(t,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static{this.\u0275fac=function(n){return new(n||e)(re(q2),re(Lz,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),mvt=(()=>{class e extends sp{constructor(t,n){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){const n=this._platformLocation.hash??"#";return n.length>0?n.substring(1):n}prepareExternalUrl(t){const n=tR(this._baseHref,t);return n.length>0?"#"+n:n}pushState(t,n,r,s){let o=this.prepareExternalUrl(r+ih(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,n,o)}replaceState(t,n,r,s){let o=this.prepareExternalUrl(r+ih(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static{this.\u0275fac=function(n){return new(n||e)(re(q2),re(Lz,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})(),ap=(()=>{class e{constructor(t){this._subject=new Oe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const n=this._locationStrategy.getBaseHref();this._basePath=function yvt(e){if(new RegExp("^(https?:)?//").test(e)){const[,t]=e.split(/\/\/[^\/]+/);return t}return e}(Oz(Bz(n))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,n=""){return this.path()==this.normalize(t+ih(n))}normalize(t){return e.stripTrailingSlash(function vvt(e,i){if(!e||!i.startsWith(e))return i;const t=i.substring(e.length);return""===t||["/",";","?","#"].includes(t[0])?t:i}(this._basePath,Bz(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,n="",r=null){this._locationStrategy.pushState(r,"",t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+ih(n)),r)}replaceState(t,n="",r=null){this._locationStrategy.replaceState(r,"",t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+ih(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{const n=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(n,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",n){this._urlChangeListeners.forEach(r=>r(t,n))}subscribe(t,n,r){return this._subject.subscribe({next:t,error:n,complete:r})}static{this.normalizeQueryParams=ih}static{this.joinWithSlash=tR}static{this.stripTrailingSlash=Oz}static{this.\u0275fac=function(n){return new(n||e)(re(sp))}}static{this.\u0275prov=Ie({token:e,factory:()=>function gvt(){return new ap(re(sp))}(),providedIn:"root"})}}return e})();function Bz(e){return e.replace(/\/index.html$/,"")}var FC=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(FC||{}),Go=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(Go||{}),Lr=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(Lr||{}),Dl=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(Dl||{});const Qs={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function OC(e,i){return ec(Uo(e)[Wr.DateFormat],i)}function LC(e,i){return ec(Uo(e)[Wr.TimeFormat],i)}function NC(e,i){return ec(Uo(e)[Wr.DateTimeFormat],i)}function tc(e,i){const t=Uo(e),n=t[Wr.NumberSymbols][i];if(typeof n>"u"){if(i===Qs.CurrencyDecimal)return t[Wr.NumberSymbols][Qs.Decimal];if(i===Qs.CurrencyGroup)return t[Wr.NumberSymbols][Qs.Group]}return n}function Uz(e){if(!e[Wr.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[Wr.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function ec(e,i){for(let t=i;t>-1;t--)if(typeof e[t]<"u")return e[t];throw new Error("Locale data API: locale data undefined")}function iR(e){const[i,t]=e.split(":");return{hours:+i,minutes:+t}}const Pvt=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,BC={},kvt=/((?:[^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 nh=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}(nh||{}),pr=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}(pr||{}),mr=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(mr||{});function Fvt(e,i,t,n){let r=function Hvt(e){if(Hz(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){const[r,s=1,o=1]=e.split("-").map(l=>+l);return VC(r,s-1,o)}const t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Pvt))return function Wvt(e){const i=new Date(0);let t=0,n=0;const r=e[8]?i.setUTCFullYear:i.setFullYear,s=e[8]?i.setUTCHours:i.setHours;e[9]&&(t=Number(e[9]+e[10]),n=Number(e[9]+e[11])),r.call(i,Number(e[1]),Number(e[2])-1,Number(e[3]));const o=Number(e[4]||0)-t,l=Number(e[5]||0)-n,w=Number(e[6]||0),E=Math.floor(1e3*parseFloat("0."+(e[7]||0)));return s.call(i,o,l,w,E),i}(n)}const i=new Date(e);if(!Hz(i))throw new Error(`Unable to convert "${e}" into a date`);return i}(e);i=rh(t,i)||i;let l,o=[];for(;i;){if(l=kvt.exec(i),!l){o.push(i);break}{o=o.concat(l.slice(1));const D=o.pop();if(!D)break;i=D}}let w=r.getTimezoneOffset();n&&(w=Gz(n,w),r=function Gvt(e,i,t){const n=t?-1:1,r=e.getTimezoneOffset();return function zvt(e,i){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+i),e}(e,n*(Gz(i,r)-r))}(r,n,!0));let E="";return o.forEach(D=>{const k=function Uvt(e){if(rR[e])return rR[e];let i;switch(e){case"G":case"GG":case"GGG":i=Xr(mr.Eras,Lr.Abbreviated);break;case"GGGG":i=Xr(mr.Eras,Lr.Wide);break;case"GGGGG":i=Xr(mr.Eras,Lr.Narrow);break;case"y":i=Ks(pr.FullYear,1,0,!1,!0);break;case"yy":i=Ks(pr.FullYear,2,0,!0,!0);break;case"yyy":i=Ks(pr.FullYear,3,0,!1,!0);break;case"yyyy":i=Ks(pr.FullYear,4,0,!1,!0);break;case"Y":i=HC(1);break;case"YY":i=HC(2,!0);break;case"YYY":i=HC(3);break;case"YYYY":i=HC(4);break;case"M":case"L":i=Ks(pr.Month,1,1);break;case"MM":case"LL":i=Ks(pr.Month,2,1);break;case"MMM":i=Xr(mr.Months,Lr.Abbreviated);break;case"MMMM":i=Xr(mr.Months,Lr.Wide);break;case"MMMMM":i=Xr(mr.Months,Lr.Narrow);break;case"LLL":i=Xr(mr.Months,Lr.Abbreviated,Go.Standalone);break;case"LLLL":i=Xr(mr.Months,Lr.Wide,Go.Standalone);break;case"LLLLL":i=Xr(mr.Months,Lr.Narrow,Go.Standalone);break;case"w":i=nR(1);break;case"ww":i=nR(2);break;case"W":i=nR(1,!0);break;case"d":i=Ks(pr.Date,1);break;case"dd":i=Ks(pr.Date,2);break;case"c":case"cc":i=Ks(pr.Day,1);break;case"ccc":i=Xr(mr.Days,Lr.Abbreviated,Go.Standalone);break;case"cccc":i=Xr(mr.Days,Lr.Wide,Go.Standalone);break;case"ccccc":i=Xr(mr.Days,Lr.Narrow,Go.Standalone);break;case"cccccc":i=Xr(mr.Days,Lr.Short,Go.Standalone);break;case"E":case"EE":case"EEE":i=Xr(mr.Days,Lr.Abbreviated);break;case"EEEE":i=Xr(mr.Days,Lr.Wide);break;case"EEEEE":i=Xr(mr.Days,Lr.Narrow);break;case"EEEEEE":i=Xr(mr.Days,Lr.Short);break;case"a":case"aa":case"aaa":i=Xr(mr.DayPeriods,Lr.Abbreviated);break;case"aaaa":i=Xr(mr.DayPeriods,Lr.Wide);break;case"aaaaa":i=Xr(mr.DayPeriods,Lr.Narrow);break;case"b":case"bb":case"bbb":i=Xr(mr.DayPeriods,Lr.Abbreviated,Go.Standalone,!0);break;case"bbbb":i=Xr(mr.DayPeriods,Lr.Wide,Go.Standalone,!0);break;case"bbbbb":i=Xr(mr.DayPeriods,Lr.Narrow,Go.Standalone,!0);break;case"B":case"BB":case"BBB":i=Xr(mr.DayPeriods,Lr.Abbreviated,Go.Format,!0);break;case"BBBB":i=Xr(mr.DayPeriods,Lr.Wide,Go.Format,!0);break;case"BBBBB":i=Xr(mr.DayPeriods,Lr.Narrow,Go.Format,!0);break;case"h":i=Ks(pr.Hours,1,-12);break;case"hh":i=Ks(pr.Hours,2,-12);break;case"H":i=Ks(pr.Hours,1);break;case"HH":i=Ks(pr.Hours,2);break;case"m":i=Ks(pr.Minutes,1);break;case"mm":i=Ks(pr.Minutes,2);break;case"s":i=Ks(pr.Seconds,1);break;case"ss":i=Ks(pr.Seconds,2);break;case"S":i=Ks(pr.FractionalSeconds,1);break;case"SS":i=Ks(pr.FractionalSeconds,2);break;case"SSS":i=Ks(pr.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":i=zC(nh.Short);break;case"ZZZZZ":i=zC(nh.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":i=zC(nh.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":i=zC(nh.Long);break;default:return null}return rR[e]=i,i}(D);E+=k?k(r,t,w):"''"===D?"'":D.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),E}function VC(e,i,t){const n=new Date(0);return n.setFullYear(e,i,t),n.setHours(0,0,0),n}function rh(e,i){const t=function bvt(e){return Uo(e)[Wr.LocaleId]}(e);if(BC[t]??={},BC[t][i])return BC[t][i];let n="";switch(i){case"shortDate":n=OC(e,Dl.Short);break;case"mediumDate":n=OC(e,Dl.Medium);break;case"longDate":n=OC(e,Dl.Long);break;case"fullDate":n=OC(e,Dl.Full);break;case"shortTime":n=LC(e,Dl.Short);break;case"mediumTime":n=LC(e,Dl.Medium);break;case"longTime":n=LC(e,Dl.Long);break;case"fullTime":n=LC(e,Dl.Full);break;case"short":const r=rh(e,"shortTime"),s=rh(e,"shortDate");n=UC(NC(e,Dl.Short),[r,s]);break;case"medium":const o=rh(e,"mediumTime"),l=rh(e,"mediumDate");n=UC(NC(e,Dl.Medium),[o,l]);break;case"long":const w=rh(e,"longTime"),E=rh(e,"longDate");n=UC(NC(e,Dl.Long),[w,E]);break;case"full":const D=rh(e,"fullTime"),k=rh(e,"fullDate");n=UC(NC(e,Dl.Full),[D,k])}return n&&(BC[t][i]=n),n}function UC(e,i){return i&&(e=e.replace(/\{([^}]+)}/g,function(t,n){return null!=i&&n in i?i[n]:t})),e}function Fc(e,i,t="-",n,r){let s="";(e<0||r&&e<=0)&&(r?e=1-e:(e=-e,s=t));let o=String(e);for(;o.length0||l>-t)&&(l+=t),e===pr.Hours)0===l&&-12===t&&(l=12);else if(e===pr.FractionalSeconds)return function Ovt(e,i){return Fc(e,3).substring(0,i)}(l,i);const w=tc(o,Qs.MinusSign);return Fc(l,i,w,n,r)}}function Xr(e,i,t=Go.Format,n=!1){return function(r,s){return function Nvt(e,i,t,n,r,s){switch(t){case mr.Months:return function Cvt(e,i,t){const n=Uo(e),s=ec([n[Wr.MonthsFormat],n[Wr.MonthsStandalone]],i);return ec(s,t)}(i,r,n)[e.getMonth()];case mr.Days:return function Tvt(e,i,t){const n=Uo(e),s=ec([n[Wr.DaysFormat],n[Wr.DaysStandalone]],i);return ec(s,t)}(i,r,n)[e.getDay()];case mr.DayPeriods:const o=e.getHours(),l=e.getMinutes();if(s){const E=function Avt(e){const i=Uo(e);return Uz(i),(i[Wr.ExtraData][2]||[]).map(n=>"string"==typeof n?iR(n):[iR(n[0]),iR(n[1])])}(i),D=function Dvt(e,i,t){const n=Uo(e);Uz(n);const s=ec([n[Wr.ExtraData][0],n[Wr.ExtraData][1]],i)||[];return ec(s,t)||[]}(i,r,n),k=E.findIndex(O=>{if(Array.isArray(O)){const[L,U]=O,j=o>=L.hours&&l>=L.minutes,W=o0?Math.floor(r/60):Math.ceil(r/60);switch(e){case nh.Short:return(r>=0?"+":"")+Fc(o,2,s)+Fc(Math.abs(r%60),2,s);case nh.ShortGMT:return"GMT"+(r>=0?"+":"")+Fc(o,1,s);case nh.Long:return"GMT"+(r>=0?"+":"")+Fc(o,2,s)+":"+Fc(Math.abs(r%60),2,s);case nh.Extended:return 0===n?"Z":(r>=0?"+":"")+Fc(o,2,s)+":"+Fc(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${e}"`)}}}const Bvt=0,GC=4;function zz(e){const i=e.getDay(),t=0===i?-3:GC-i;return VC(e.getFullYear(),e.getMonth(),e.getDate()+t)}function nR(e,i=!1){return function(t,n){let r;if(i){const s=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,o=t.getDate();r=1+Math.floor((o+s)/7)}else{const s=zz(t),o=function Vvt(e){const i=VC(e,Bvt,1).getDay();return VC(e,0,1+(i<=GC?GC:GC+7)-i)}(s.getFullYear()),l=s.getTime()-o.getTime();r=1+Math.round(l/6048e5)}return Fc(r,e,tc(n,Qs.MinusSign))}}function HC(e,i=!1){return function(t,n){return Fc(zz(t).getFullYear(),e,tc(n,Qs.MinusSign),i)}}const rR={};function Gz(e,i){e=e.replace(/:/g,"");const t=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(t)?i:t}function Hz(e){return e instanceof Date&&!isNaN(e.valueOf())}const jvt=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function lR(e){const i=parseInt(e);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+e);return i}function Yz(e,i){i=encodeURIComponent(i);for(const t of e.split(";")){const n=t.indexOf("="),[r,s]=-1==n?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===i)return decodeURIComponent(s)}return null}const uR=/\s+/,$z=[];let Td=(()=>{class e{constructor(t,n){this._ngEl=t,this._renderer=n,this.initialClasses=$z,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(uR):$z}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(uR):t}ngDoCheck(){for(const n of this.initialClasses)this._updateState(n,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const n of t)this._updateState(n,!0);else if(null!=t)for(const n of Object.keys(t))this._updateState(n,!!t[n]);this._applyStateDiff()}_updateState(t,n){const r=this.stateMap.get(t);void 0!==r?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(t,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const n=t[0],r=t[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(t,n){(t=t.trim()).length>0&&t.split(uR).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(Kl))}}static{this.\u0275dir=me({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0})}}return e})();class n0t{constructor(i,t,n,r){this.$implicit=i,this.ngForOf=t,this.index=n,this.count=r}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 ys=(()=>{class e{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,n,r){this._viewContainer=t,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const n=this._viewContainer;t.forEachOperation((r,s,o)=>{if(null==r.previousIndex)n.createEmbeddedView(this._template,new n0t(r.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)n.remove(null===s?void 0:s);else if(null!==s){const l=n.get(s);n.move(l,o),Kz(l,r)}});for(let r=0,s=n.length;r{Kz(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(t,n){return!0}static{this.\u0275fac=function(n){return new(n||e)(pt(Or),pt(yr),pt(bd))}}static{this.\u0275dir=me({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}}return e})();function Kz(e,i){e.context.$implicit=i.item}let ls=(()=>{class e{constructor(t,n){this._viewContainer=t,this._context=new r0t,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Zz("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Zz("ngIfElse",t),this._elseTemplateRef=t,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(t,n){return!0}static{this.\u0275fac=function(n){return new(n||e)(pt(Or),pt(yr))}}static{this.\u0275dir=me({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return e})();class r0t{constructor(){this.$implicit=null,this.ngIf=null}}function Zz(e,i){if(i&&!i.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${aa(i)}'.`)}let qz=(()=>{class e{constructor(t,n,r){this._ngEl=t,this._differs=n,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,n){const[r,s]=t.split("."),o=-1===r.indexOf("-")?void 0:fd.DashCase;null!=n?this._renderer.setStyle(this._ngEl.nativeElement,r,s?`${n}${s}`:n,o):this._renderer.removeStyle(this._ngEl.nativeElement,r,o)}_applyChanges(t){t.forEachRemovedItem(n=>this._setStyle(n.key,null)),t.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),t.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(AC),pt(Kl))}}static{this.\u0275dir=me({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0})}}return e})(),jC=(()=>{class e{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,n,r),get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static{this.\u0275fac=function(n){return new(n||e)(pt(Or))}}static{this.\u0275dir=me({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[lr]})}}return e})();function Oc(e,i){return new pe(2100,!1)}class l0t{createSubscription(i,t){return kc(()=>i.subscribe({next:t,error:n=>{throw n}}))}dispose(i){kc(()=>i.unsubscribe())}}class c0t{createSubscription(i,t){return i.then(t,n=>{throw n})}dispose(i){}}const u0t=new c0t,h0t=new l0t;let fR=(()=>{class e{constructor(t){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){if(!this._obj){if(t)try{this.markForCheckOnValueUpdate=!1,this._subscribe(t)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,n=>this._updateLatestValue(t,n))}_selectStrategy(t){if(ux(t))return u0t;if(VU(t))return h0t;throw Oc()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,n){t===this._obj&&(this._latestValue=n,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static{this.\u0275fac=function(n){return new(n||e)(pt(In,16))}}static{this.\u0275pipe=io({name:"async",type:e,pure:!1,standalone:!0})}}return e})();const f0t=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;let pR=(()=>{class e{transform(t){if(null==t)return null;if("string"!=typeof t)throw Oc();return t.replace(f0t,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275pipe=io({name:"titlecase",type:e,pure:!0,standalone:!0})}}return e})(),mR=(()=>{class e{transform(t){if(null==t)return null;if("string"!=typeof t)throw Oc();return t.toUpperCase()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275pipe=io({name:"uppercase",type:e,pure:!0,standalone:!0})}}return e})();const m0t=new te(""),g0t=new te("");let sh=(()=>{class e{constructor(t,n,r){this.locale=t,this.defaultTimezone=n,this.defaultOptions=r}transform(t,n,r,s){if(null==t||""===t||t!=t)return null;try{return Fvt(t,n??this.defaultOptions?.dateFormat??"mediumDate",s||this.locale,r??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(o){throw Oc()}}static{this.\u0275fac=function(n){return new(n||e)(pt(eh,16),pt(m0t,24),pt(g0t,24))}}static{this.\u0275pipe=io({name:"date",type:e,pure:!0,standalone:!0})}}return e})(),tG=(()=>{class e{constructor(t){this.differs=t,this.keyValues=[],this.compareFn=eG}transform(t,n=eG){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ??=this.differs.find(t).create();const r=this.differ.diff(t),s=n!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(o=>{this.keyValues.push(function w0t(e,i){return{key:e,value:i}}(o.key,o.currentValue))})),(r||s)&&(this.keyValues.sort(n),this.compareFn=n),this.keyValues}static{this.\u0275fac=function(n){return new(n||e)(pt(AC,16))}}static{this.\u0275pipe=io({name:"keyvalue",type:e,pure:!1,standalone:!0})}}return e})();function eG(e,i){const t=e.key,n=i.key;if(t===n)return 0;if(void 0===t)return 1;if(void 0===n)return-1;if(null===t)return 1;if(null===n)return-1;if("string"==typeof t&&"string"==typeof n)return t{class e{constructor(t){this._locale=t}transform(t,n,r){if(!function gR(e){return!(null==e||""===e||e!=e)}(t))return null;r||=this._locale;try{return function Zvt(e,i,t){return function aR(e,i,t,n,r,s,o=!1){let l="",w=!1;if(isFinite(e)){let E=function qvt(e){let n,r,s,o,l,i=Math.abs(e)+"",t=0;for((r=i.indexOf("."))>-1&&(i=i.replace(".","")),(s=i.search(/e/i))>0?(r<0&&(r=s),r+=+i.slice(s+1),i=i.substring(0,s)):r<0&&(r=i.length),s=0;"0"===i.charAt(s);s++);if(s===(l=i.length))n=[0],r=1;else{for(l--;"0"===i.charAt(l);)l--;for(r-=s,n=[],o=0;s<=l;s++,o++)n[o]=Number(i.charAt(s))}return r>22&&(n=n.splice(0,21),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}(e);o&&(E=function Jvt(e){if(0===e.digits[0])return e;const i=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(0===i?e.digits.push(0,0):1===i&&e.digits.push(0),e.integerLen+=2),e}(E));let D=i.minInt,k=i.minFrac,O=i.maxFrac;if(s){const rt=s.match(jvt);if(null===rt)throw new Error(`${s} is not a valid digit info`);const st=rt[1],yt=rt[3],Tt=rt[5];null!=st&&(D=lR(st)),null!=yt&&(k=lR(yt)),null!=Tt?O=lR(Tt):null!=yt&&k>O&&(O=k)}!function t0t(e,i,t){if(i>t)throw new Error(`The minimum number of digits after fraction (${i}) is higher than the maximum (${t}).`);let n=e.digits,r=n.length-e.integerLen;const s=Math.min(Math.max(i,r),t);let o=s+e.integerLen,l=n[o];if(o>0){n.splice(Math.max(e.integerLen,o));for(let k=o;k=5)if(o-1<0){for(let k=0;k>o;k--)n.unshift(0),e.integerLen++;n.unshift(1),e.integerLen++}else n[o-1]++;for(;r=E?U.pop():w=!1),O>=10?1:0},0);D&&(n.unshift(D),e.integerLen++)}(E,k,O);let L=E.digits,U=E.integerLen;const j=E.exponent;let W=[];for(w=L.every(rt=>!rt);U0?W=L.splice(U,L.length):(W=L,L=[0]);const Z=[];for(L.length>=i.lgSize&&Z.unshift(L.splice(-i.lgSize,L.length).join(""));L.length>i.gSize;)Z.unshift(L.splice(-i.gSize,L.length).join(""));L.length&&Z.unshift(L.join("")),l=Z.join(tc(t,n)),W.length&&(l+=tc(t,r)+W.join("")),j&&(l+=tc(t,Qs.Exponential)+"+"+j)}else l=tc(t,Qs.Infinity);return l=e<0&&!w?i.negPre+l+i.negSuf:i.posPre+l+i.posSuf,l}(e,function oR(e,i="-"){const t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=e.split(";"),r=n[0],s=n[1],o=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],l=o[0],w=o[1]||"";t.posPre=l.substring(0,l.indexOf("#"));for(let D=0;D{class e{transform(t,n,r){if(null==t)return null;if(!this.supports(t))throw Oc();return t.slice(n,r)}supports(t){return"string"==typeof t||Array.isArray(t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275pipe=io({name:"slice",type:e,pure:!1,standalone:!0})}}return e})(),hu=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({})}}return e})();const rG="browser";function sG(e){return e===rG}function aG(e){return"server"===e}let E0t=(()=>{class e{static{this.\u0275prov=Ie({token:e,providedIn:"root",factory:()=>sG(Jt(nu))?new _0t(Jt(Gi),window):new D0t})}}return e})();class _0t{constructor(i,t){this.document=i,this.window=t,this.offset=()=>[0,0]}setOffset(i){this.offset=Array.isArray(i)?()=>i:i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i){this.window.scrollTo(i[0],i[1])}scrollToAnchor(i){const t=function A0t(e,i){const t=e.getElementById(i)||e.getElementsByName(i)[0];if(t)return t;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const n=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let r=n.currentNode;for(;r;){const s=r.shadowRoot;if(s){const o=s.getElementById(i)||s.querySelector(`[name="${i}"]`);if(o)return o}r=n.nextNode()}}return null}(this.document,i);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(i){this.window.history.scrollRestoration=i}scrollToElement(i){const t=i.getBoundingClientRect(),n=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],r-s[1])}}class D0t{setOffset(i){}getScrollPosition(){return[0,0]}scrollToPosition(i){}scrollToAnchor(i){}setHistoryScrollRestoration(i){}}class oG{}class iyt extends dvt{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class wR extends iyt{static makeCurrent(){!function hvt(e){Fz??=e}(new wR)}onAndCancel(i,t,n){return i.addEventListener(t,n),()=>{i.removeEventListener(t,n)}}dispatchEvent(i,t){i.dispatchEvent(t)}remove(i){i.remove()}createElement(i,t){return(t=t||this.getDefaultDocument()).createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,t){return"window"===t?window:"document"===t?i:"body"===t?i.body:null}getBaseHref(i){const t=function nyt(){return yx=yx||document.querySelector("base"),yx?yx.getAttribute("href"):null}();return null==t?null:function ryt(e){return new URL(e,document.baseURI).pathname}(t)}resetBaseElement(){yx=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return Yz(document.cookie,i)}}let yx=null,ayt=(()=>{class e{build(){return new XMLHttpRequest}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();const TR=new te("");let yG=(()=>{class e{constructor(t,n){this._zone=n,this._eventNameToPlugin=new Map,t.forEach(r=>{r.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,n,r){return this._findPluginFor(n).addEventListener(t,n,r)}getZone(){return this._zone}_findPluginFor(t){let n=this._eventNameToPlugin.get(t);if(n)return n;if(n=this._plugins.find(s=>s.supports(t)),!n)throw new pe(5101,!1);return this._eventNameToPlugin.set(t,n),n}static{this.\u0275fac=function(n){return new(n||e)(re(TR),re(li))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();class xG{constructor(i){this._doc=i}}const CR="ng-app-id";let bG=(()=>{class e{constructor(t,n,r,s={}){this.doc=t,this.appId=n,this.nonce=r,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=aG(s),this.resetHostNodes()}addStyles(t){for(const n of t)1===this.changeUsageCount(n,1)&&this.onStyleAdded(n)}removeStyles(t){for(const n of t)this.changeUsageCount(n,-1)<=0&&this.onStyleRemoved(n)}ngOnDestroy(){const t=this.styleNodesInDOM;t&&(t.forEach(n=>n.remove()),t.clear());for(const n of this.getAllStyles())this.onStyleRemoved(n);this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const n of this.getAllStyles())this.addStyleToHost(t,n)}removeHost(t){this.hostNodes.delete(t)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(t){for(const n of this.hostNodes)this.addStyleToHost(n,t)}onStyleRemoved(t){const n=this.styleRef;n.get(t)?.elements?.forEach(r=>r.remove()),n.delete(t)}collectServerRenderedStyles(){const t=this.doc.head?.querySelectorAll(`style[${CR}="${this.appId}"]`);if(t?.length){const n=new Map;return t.forEach(r=>{null!=r.textContent&&n.set(r.textContent,r)}),n}return null}changeUsageCount(t,n){const r=this.styleRef;if(r.has(t)){const s=r.get(t);return s.usage+=n,s.usage}return r.set(t,{usage:n,elements:[]}),n}getStyleElement(t,n){const r=this.styleNodesInDOM,s=r?.get(n);if(s?.parentNode===t)return r.delete(n),s.removeAttribute(CR),s;{const o=this.doc.createElement("style");return this.nonce&&o.setAttribute("nonce",this.nonce),o.textContent=n,this.platformIsServer&&o.setAttribute(CR,this.appId),t.appendChild(o),o}}addStyleToHost(t,n){const r=this.getStyleElement(t,n),s=this.styleRef,o=s.get(n)?.elements;o?o.push(r):s.set(n,{elements:[r],usage:1})}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}static{this.\u0275fac=function(n){return new(n||e)(re(Gi),re(Vf),re(HM,8),re(nu))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();const SR={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/Math/MathML"},ER=/%COMP%/g,uyt=new te("",{providedIn:"root",factory:()=>!0});function TG(e,i){return i.map(t=>t.replace(ER,e))}let _R=(()=>{class e{constructor(t,n,r,s,o,l,w,E=null){this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=l,this.ngZone=w,this.nonce=E,this.rendererByCompId=new Map,this.platformIsServer=aG(l),this.defaultRenderer=new AR(t,o,w,this.platformIsServer)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===Sc.ShadowDom&&(n={...n,encapsulation:Sc.Emulated});const r=this.getOrCreateRenderer(t,n);return r instanceof SG?r.applyToHost(t):r instanceof DR&&r.applyStyles(),r}getOrCreateRenderer(t,n){const r=this.rendererByCompId;let s=r.get(n.id);if(!s){const o=this.doc,l=this.ngZone,w=this.eventManager,E=this.sharedStylesHost,D=this.removeStylesOnCompDestroy,k=this.platformIsServer;switch(n.encapsulation){case Sc.Emulated:s=new SG(w,E,n,this.appId,D,o,l,k);break;case Sc.ShadowDom:return new pyt(w,E,t,n,o,l,this.nonce,k);default:s=new DR(w,E,n,D,o,l,k)}r.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(n){return new(n||e)(re(yG),re(bG),re(Vf),re(uyt),re(Gi),re(nu),re(li),re(HM))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();class AR{constructor(i,t,n,r){this.eventManager=i,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(i,t){return t?this.doc.createElementNS(SR[t]||t,i):this.doc.createElement(i)}createComment(i){return this.doc.createComment(i)}createText(i){return this.doc.createTextNode(i)}appendChild(i,t){(CG(i)?i.content:i).appendChild(t)}insertBefore(i,t,n){i&&(CG(i)?i.content:i).insertBefore(t,n)}removeChild(i,t){t.remove()}selectRootElement(i,t){let n="string"==typeof i?this.doc.querySelector(i):i;if(!n)throw new pe(-5104,!1);return t||(n.textContent=""),n}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,t,n,r){if(r){t=r+":"+t;const s=SR[r];s?i.setAttributeNS(s,t,n):i.setAttribute(t,n)}else i.setAttribute(t,n)}removeAttribute(i,t,n){if(n){const r=SR[n];r?i.removeAttributeNS(r,t):i.removeAttribute(`${n}:${t}`)}else i.removeAttribute(t)}addClass(i,t){i.classList.add(t)}removeClass(i,t){i.classList.remove(t)}setStyle(i,t,n,r){r&(fd.DashCase|fd.Important)?i.style.setProperty(t,n,r&fd.Important?"important":""):i.style[t]=n}removeStyle(i,t,n){n&fd.DashCase?i.style.removeProperty(t):i.style[t]=""}setProperty(i,t,n){null!=i&&(i[t]=n)}setValue(i,t){i.nodeValue=t}listen(i,t,n){if("string"==typeof i&&!(i=wd().getGlobalEventTarget(this.doc,i)))throw new Error(`Unsupported event target ${i} for event ${t}`);return this.eventManager.addEventListener(i,t,this.decoratePreventDefault(n))}decoratePreventDefault(i){return t=>{if("__ngUnwrap__"===t)return i;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>i(t)):i(t))&&t.preventDefault()}}}function CG(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class pyt extends AR{constructor(i,t,n,r,s,o,l,w){super(i,s,o,w),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const E=TG(r.id,r.styles);for(const D of E){const k=document.createElement("style");l&&k.setAttribute("nonce",l),k.textContent=D,this.shadowRoot.appendChild(k)}}nodeOrShadowRoot(i){return i===this.hostEl?this.shadowRoot:i}appendChild(i,t){return super.appendChild(this.nodeOrShadowRoot(i),t)}insertBefore(i,t,n){return super.insertBefore(this.nodeOrShadowRoot(i),t,n)}removeChild(i,t){return super.removeChild(null,t)}parentNode(i){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(i)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class DR extends AR{constructor(i,t,n,r,s,o,l,w){super(i,s,o,l),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r,this.styles=w?TG(w,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class SG extends DR{constructor(i,t,n,r,s,o,l,w){const E=r+"-"+n.id;super(i,t,n,s,o,l,w,E),this.contentAttr=function hyt(e){return"_ngcontent-%COMP%".replace(ER,e)}(E),this.hostAttr=function dyt(e){return"_nghost-%COMP%".replace(ER,e)}(E)}applyToHost(i){this.applyStyles(),this.setAttribute(i,this.hostAttr,"")}createElement(i,t){const n=super.createElement(i,t);return super.setAttribute(n,this.contentAttr,""),n}}let myt=(()=>{class e extends xG{constructor(t){super(t)}supports(t){return!0}addEventListener(t,n,r){return t.addEventListener(n,r,!1),()=>this.removeEventListener(t,n,r)}removeEventListener(t,n,r){return t.removeEventListener(n,r)}static{this.\u0275fac=function(n){return new(n||e)(re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();const EG=["alt","control","meta","shift"],gyt={"\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"},vyt={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let yyt=(()=>{class e extends xG{constructor(t){super(t)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,n,r){const s=e.parseEventName(n),o=e.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>wd().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const n=t.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const s=e._normalizeKey(n.pop());let o="",l=n.indexOf("code");if(l>-1&&(n.splice(l,1),o="code."),EG.forEach(E=>{const D=n.indexOf(E);D>-1&&(n.splice(D,1),o+=E+".")}),o+=s,0!=n.length||0===s.length)return null;const w={};return w.domEventName=r,w.fullKey=o,w}static matchEventFullKeyCode(t,n){let r=gyt[t.key]||t.key,s="";return n.indexOf("code.")>-1&&(r=t.code,s="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),EG.forEach(o=>{o!==r&&(0,vyt[o])(t)&&(s+=o+".")}),s+=r,s===n)}static eventCallback(t,n,r){return s=>{e.matchEventFullKeyCode(s,t)&&r.runGuarded(()=>n(s))}}static _normalizeKey(t){return"esc"===t?"escape":t}static{this.\u0275fac=function(n){return new(n||e)(re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();const Tyt=JU(_gt,"browser",[{provide:nu,useValue:rG},{provide:VV,useValue:function xyt(){wR.makeCurrent()},multi:!0},{provide:Gi,useFactory:function wyt(){return function hlt(e){GM=e}(document),document},deps:[]}]),Cyt=new te(""),DG=[{provide:xC,useClass:class syt{addToWindow(i){Jr.getAngularTestability=(n,r=!0)=>{const s=i.findTestabilityInTree(n,r);if(null==s)throw new pe(5103,!1);return s},Jr.getAllAngularTestabilities=()=>i.getAllTestabilities(),Jr.getAllAngularRootElements=()=>i.getAllRootElements(),Jr.frameworkStabilizers||(Jr.frameworkStabilizers=[]),Jr.frameworkStabilizers.push(n=>{const r=Jr.getAllAngularTestabilities();let s=r.length;const o=function(){s--,0==s&&n()};r.forEach(l=>{l.whenStable(o)})})}findTestabilityInTree(i,t,n){return null==t?null:i.getTestability(t)??(n?wd().isShadowRoot(t)?this.findTestabilityInTree(i,t.host,!0):this.findTestabilityInTree(i,t.parentElement,!0):null)}},deps:[]},{provide:BU,useClass:V2,deps:[li,U2,xC]},{provide:V2,useClass:V2,deps:[li,U2,xC]}],MG=[{provide:eM,useValue:"root"},{provide:Tl,useFactory:function byt(){return new Tl},deps:[]},{provide:TR,useClass:myt,multi:!0,deps:[Gi,li,nu]},{provide:TR,useClass:yyt,multi:!0,deps:[Gi]},_R,bG,yG,{provide:GT,useExisting:_R},{provide:oG,useClass:ayt,deps:[]},[]];let IG=(()=>{class e{constructor(t){}static withServerTransition(t){return{ngModule:e,providers:[{provide:Vf,useValue:t.appId}]}}static{this.\u0275fac=function(n){return new(n||e)(re(Cyt,12))}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[...MG,...DG],imports:[hu,Agt]})}}return e})(),Syt=(()=>{class e{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}static{this.\u0275fac=function(n){return new(n||e)(re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),MR=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:function(n){let r=null;return r=n?new(n||e):re(Dyt),r},providedIn:"root"})}}return e})(),Dyt=(()=>{class e extends MR{constructor(t){super(),this._doc=t}sanitize(t,n){if(null==n)return null;switch(t){case Wa.NONE:return n;case Wa.HTML:return ru(n,"HTML")?Cl(n):l5(this._doc,String(n)).toString();case Wa.STYLE:return ru(n,"Style")?Cl(n):n;case Wa.SCRIPT:if(ru(n,"Script"))return Cl(n);throw new pe(5200,!1);case Wa.URL:return ru(n,"URL")?Cl(n):CT(String(n));case Wa.RESOURCE_URL:if(ru(n,"ResourceURL"))return Cl(n);throw new pe(5201,!1);default:throw new pe(5202,!1)}}bypassSecurityTrustHtml(t){return function Plt(e){return new _lt(e)}(t)}bypassSecurityTrustStyle(t){return function klt(e){return new Alt(e)}(t)}bypassSecurityTrustScript(t){return function Flt(e){return new Dlt(e)}(t)}bypassSecurityTrustUrl(t){return function Olt(e){return new Mlt(e)}(t)}bypassSecurityTrustResourceUrl(t){return function Llt(e){return new Ilt(e)}(t)}static{this.\u0275fac=function(n){return new(n||e)(re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function xx(e){return!!e&&(e instanceof dr||ae(e.lift)&&ae(e.subscribe))}function Cd(e){return this instanceof Cd?(this.v=e,this):new Cd(e)}function LG(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=function kR(e){var i="function"==typeof Symbol&&Symbol.iterator,t=i&&e[i],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=e[s]&&function(o){return new Promise(function(l,w){!function r(s,o,l,w){Promise.resolve(w).then(function(E){s({value:E,done:l})},o)}(l,w,(o=e[s](o)).done,o.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const FR=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function NG(e){return ae(e?.then)}function BG(e){return ae(e[PD])}function VG(e){return Symbol.asyncIterator&&ae(e?.[Symbol.asyncIterator])}function UG(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const zG=function Kyt(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function GG(e){return ae(e?.[zG])}function HG(e){return function OG(e,i,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=t.apply(e,i||[]),s=[];return r={},l("next"),l("throw"),l("return",function o(L){return function(U){return Promise.resolve(U).then(L,k)}}),r[Symbol.asyncIterator]=function(){return this},r;function l(L,U){n[L]&&(r[L]=function(j){return new Promise(function(W,Z){s.push([L,j,W,Z])>1||w(L,j)})},U&&(r[L]=U(r[L])))}function w(L,U){try{!function E(L){L.value instanceof Cd?Promise.resolve(L.value.v).then(D,k):O(s[0][2],L)}(n[L](U))}catch(j){O(s[0][3],j)}}function D(L){w("next",L)}function k(L){w("throw",L)}function O(L,U){L(U),s.shift(),s.length&&w(s[0][0],s[0][1])}}(this,arguments,function*(){const t=e.getReader();try{for(;;){const{value:n,done:r}=yield Cd(t.read());if(r)return yield Cd(void 0);yield yield Cd(n)}}finally{t.releaseLock()}})}function WG(e){return ae(e?.getReader)}function lo(e){if(e instanceof dr)return e;if(null!=e){if(BG(e))return function Zyt(e){return new dr(i=>{const t=e[PD]();if(ae(t.subscribe))return t.subscribe(i);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(FR(e))return function Jyt(e){return new dr(i=>{for(let t=0;t{e.then(t=>{i.closed||(i.next(t),i.complete())},t=>i.error(t)).then(null,tn)})}(e);if(VG(e))return jG(e);if(GG(e))return function txt(e){return new dr(i=>{for(const t of e)if(i.next(t),i.closed)return;i.complete()})}(e);if(WG(e))return function ext(e){return jG(HG(e))}(e)}throw UG(e)}function jG(e){return new dr(i=>{(function ixt(e,i){var t,n,r,s;return function kG(e,i,t,n){return new(t||(t=Promise))(function(s,o){function l(D){try{E(n.next(D))}catch(k){o(k)}}function w(D){try{E(n.throw(D))}catch(k){o(k)}}function E(D){D.done?s(D.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(D.value).then(l,w)}E((n=n.apply(e,i||[])).next())})}(this,void 0,void 0,function*(){try{for(t=LG(e);!(n=yield t.next()).done;)if(i.next(n.value),i.closed)return}catch(o){r={error:o}}finally{try{n&&!n.done&&(s=t.return)&&(yield s.call(t))}finally{if(r)throw r.error}}i.complete()})})(e,i).catch(t=>i.error(t))})}function ah(e,i,t,n=0,r=!1){const s=i.schedule(function(){t(),r?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!r)return s}function XG(e,i=0){return gs((t,n)=>{t.subscribe(Zr(n,r=>ah(n,e,()=>n.next(r),i),()=>ah(n,e,()=>n.complete(),i),r=>ah(n,e,()=>n.error(r),i)))})}function YG(e,i=0){return gs((t,n)=>{n.add(e.schedule(()=>t.subscribe(n),i))})}function $G(e,i){if(!e)throw new Error("Iterable cannot be null");return new dr(t=>{ah(t,i,()=>{const n=e[Symbol.asyncIterator]();ah(t,i,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function Zs(e,i){return i?function lxt(e,i){if(null!=e){if(BG(e))return function nxt(e,i){return lo(e).pipe(YG(i),XG(i))}(e,i);if(FR(e))return function sxt(e,i){return new dr(t=>{let n=0;return i.schedule(function(){n===e.length?t.complete():(t.next(e[n++]),t.closed||this.schedule())})})}(e,i);if(NG(e))return function rxt(e,i){return lo(e).pipe(YG(i),XG(i))}(e,i);if(VG(e))return $G(e,i);if(GG(e))return function axt(e,i){return new dr(t=>{let n;return ah(t,i,()=>{n=e[zG](),ah(t,i,()=>{let r,s;try{({value:r,done:s}=n.next())}catch(o){return void t.error(o)}s?t.complete():t.next(r)},0,!0)}),()=>ae(n?.return)&&n.return()})}(e,i);if(WG(e))return function oxt(e,i){return $G(HG(e),i)}(e,i)}throw UG(e)}(e,i):lo(e)}function QG(e){return e&&ae(e.schedule)}function OR(e){return e[e.length-1]}function KG(e){return ae(OR(e))?e.pop():void 0}function bx(e){return QG(OR(e))?e.pop():void 0}function wi(...e){return Zs(e,bx(e))}const{isArray:uxt}=Array,{getPrototypeOf:hxt,prototype:dxt,keys:fxt}=Object;function ZG(e){if(1===e.length){const i=e[0];if(uxt(i))return{args:i,keys:null};if(function pxt(e){return e&&"object"==typeof e&&hxt(e)===dxt}(i)){const t=fxt(i);return{args:t.map(n=>i[n]),keys:t}}}return{args:e,keys:null}}const{isArray:mxt}=Array;function LR(e){return Ri(i=>function gxt(e,i){return mxt(i)?e(...i):e(i)}(e,i))}function JG(e,i){return e.reduce((t,n,r)=>(t[n]=i[r],t),{})}function oh(...e){const i=bx(e),t=KG(e),{args:n,keys:r}=ZG(e);if(0===n.length)return Zs([],i);const s=new dr(function vxt(e,i,t=ad){return n=>{qG(i,()=>{const{length:r}=e,s=new Array(r);let o=r,l=r;for(let w=0;w{const E=Zs(e[w],i);let D=!1;E.subscribe(Zr(n,k=>{s[w]=k,D||(D=!0,l--),l||n.next(t(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,i,r?o=>JG(r,o):ad));return t?s.pipe(LR(t)):s}function qG(e,i,t){e?ah(t,e,i):i()}const Xg=fe(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Da(e,i,t=1/0){return ae(i)?Da((n,r)=>Ri((s,o)=>i(n,s,r,o))(lo(e(n,r))),t):("number"==typeof i&&(t=i),gs((n,r)=>function yxt(e,i,t,n,r,s,o,l){const w=[];let E=0,D=0,k=!1;const O=()=>{k&&!w.length&&!E&&i.complete()},L=j=>E{s&&i.next(j),E++;let W=!1;lo(t(j,D++)).subscribe(Zr(i,Z=>{r?.(Z),s?L(Z):i.next(Z)},()=>{W=!0},void 0,()=>{if(W)try{for(E--;w.length&&EU(Z)):U(Z)}O()}catch(Z){i.error(Z)}}))};return e.subscribe(Zr(i,L,()=>{k=!0,O()})),()=>{l?.()}}(n,r,e,t)))}function Yg(e=1/0){return Da(ad,e)}function wx(...e){return function xxt(){return Yg(1)}()(Zs(e,bx(e)))}function $g(e){return new dr(i=>{lo(e()).subscribe(i)})}function Qg(e,i){const t=ae(e)?e:()=>e,n=r=>r.error(t());return new dr(i?r=>i.schedule(n,0,r):n)}const al=new dr(e=>e.complete());function NR(){return gs((e,i)=>{let t=null;e._refCount++;const n=Zr(i,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(t=null);const r=e._connection,s=t;t=null,r&&(!s||r===s)&&r.unsubscribe(),i.unsubscribe()});e.subscribe(n),n.closed||(t=e.connect())})}class BR extends dr{constructor(i,t){super(),this.source=i,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,L3(i)&&(this.lift=i.lift)}_subscribe(i){return this.getSubject().subscribe(i)}getSubject(){const i=this._subject;return(!i||i.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:i}=this;this._subject=this._connection=null,i?.unsubscribe()}connect(){let i=this._connection;if(!i){i=this._connection=new Pe;const t=this.getSubject();i.add(this.source.subscribe(Zr(t,void 0,()=>{this._teardown(),t.complete()},n=>{this._teardown(),t.error(n)},()=>this._teardown()))),i.closed&&(this._connection=null,i=Pe.EMPTY)}return i}refCount(){return NR()(this)}}function ks(e,i){return gs((t,n)=>{let r=null,s=0,o=!1;const l=()=>o&&!r&&n.complete();t.subscribe(Zr(n,w=>{r?.unsubscribe();let E=0;const D=s++;lo(e(w,D)).subscribe(r=Zr(n,k=>n.next(i?i(w,k,D,E++):k),()=>{r=null,l()}))},()=>{o=!0,l()}))})}function xs(e){return e<=0?()=>al:gs((i,t)=>{let n=0;i.subscribe(Zr(t,r=>{++n<=e&&(t.next(r),e<=n&&t.complete())}))})}function Ma(...e){const i=bx(e);return gs((t,n)=>{(i?wx(e,t,i):wx(e,t)).subscribe(n)})}function Ln(e,i){return gs((t,n)=>{let r=0;t.subscribe(Zr(n,s=>e.call(i,s,r++)&&n.next(s)))})}function KC(e){return gs((i,t)=>{let n=!1;i.subscribe(Zr(t,r=>{n=!0,t.next(r)},()=>{n||t.next(e),t.complete()}))})}function tH(e=wxt){return gs((i,t)=>{let n=!1;i.subscribe(Zr(t,r=>{n=!0,t.next(r)},()=>n?t.complete():t.error(e())))})}function wxt(){return new Xg}function ic(e,i){const t=arguments.length>=2;return n=>n.pipe(e?Ln((r,s)=>e(r,s,n)):ad,xs(1),t?KC(i):tH(()=>new Xg))}function Kg(e,i){return ae(i)?Da(e,i,1):Da(e,1)}function cs(e,i,t){const n=ae(e)||i||t?{next:e,error:i,complete:t}:e;return n?gs((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let l=!0;r.subscribe(Zr(s,w=>{var E;null===(E=n.next)||void 0===E||E.call(n,w),s.next(w)},()=>{var w;l=!1,null===(w=n.complete)||void 0===w||w.call(n),s.complete()},w=>{var E;l=!1,null===(E=n.error)||void 0===E||E.call(n,w),s.error(w)},()=>{var w,E;l&&(null===(w=n.unsubscribe)||void 0===w||w.call(n)),null===(E=n.finalize)||void 0===E||E.call(n)}))}):ad}function Js(e){return gs((i,t)=>{let s,n=null,r=!1;n=i.subscribe(Zr(t,void 0,void 0,o=>{s=lo(e(o,Js(e)(i))),n?(n.unsubscribe(),n=null,s.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(t))})}function VR(e){return e<=0?()=>al:gs((i,t)=>{let n=[];i.subscribe(Zr(t,r=>{n.push(r),e{for(const r of n)t.next(r);t.complete()},void 0,()=>{n=null}))})}function ZC(e){return Ri(()=>e)}function Zg(e){return gs((i,t)=>{try{i.subscribe(t)}finally{t.add(e)}})}function Yi(e){return gs((i,t)=>{lo(e).subscribe(Zr(t,()=>t.complete(),on)),!t.closed&&i.subscribe(t)})}const An="primary",Tx=Symbol("RouteTitle");class Ext{constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){const t=this.params[i];return Array.isArray(t)?t[0]:t}return null}getAll(i){if(this.has(i)){const t=this.params[i];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function Jg(e){return new Ext(e)}function _xt(e,i,t){const n=t.path.split("/");if(n.length>e.length||"full"===t.pathMatch&&(i.hasChildren()||n.lengthn[s]===r)}return e===i}function iH(e){return e.length>0?e[e.length-1]:null}function Sd(e){return xx(e)?e:ux(e)?Zs(Promise.resolve(e)):wi(e)}const Dxt={exact:function sH(e,i,t){if(!cp(e.segments,i.segments)||!JC(e.segments,i.segments,t)||e.numberOfChildren!==i.numberOfChildren)return!1;for(const n in i.children)if(!e.children[n]||!sH(e.children[n],i.children[n],t))return!1;return!0},subset:aH},nH={exact:function Mxt(e,i){return du(e,i)},subset:function Ixt(e,i){return Object.keys(i).length<=Object.keys(e).length&&Object.keys(i).every(t=>eH(e[t],i[t]))},ignored:()=>!0};function rH(e,i,t){return Dxt[t.paths](e.root,i.root,t.matrixParams)&&nH[t.queryParams](e.queryParams,i.queryParams)&&!("exact"===t.fragment&&e.fragment!==i.fragment)}function aH(e,i,t){return oH(e,i,i.segments,t)}function oH(e,i,t,n){if(e.segments.length>t.length){const r=e.segments.slice(0,t.length);return!(!cp(r,t)||i.hasChildren()||!JC(r,t,n))}if(e.segments.length===t.length){if(!cp(e.segments,t)||!JC(e.segments,t,n))return!1;for(const r in i.children)if(!e.children[r]||!aH(e.children[r],i.children[r],n))return!1;return!0}{const r=t.slice(0,e.segments.length),s=t.slice(e.segments.length);return!!(cp(e.segments,r)&&JC(e.segments,r,n)&&e.children[An])&&oH(e.children[An],i,s,n)}}function JC(e,i,t){return i.every((n,r)=>nH[t](e[r].parameters,n.parameters))}class lp{constructor(i=new Ir([],{}),t={},n=null){this.root=i,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Jg(this.queryParams),this._queryParamMap}toString(){return kxt.serialize(this)}}class Ir{constructor(i,t){this.segments=i,this.children=t,this.parent=null,Object.values(t).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return tS(this)}}class Cx{constructor(i,t){this.path=i,this.parameters=t}get parameterMap(){return this._parameterMap??=Jg(this.parameters),this._parameterMap}toString(){return uH(this)}}function cp(e,i){return e.length===i.length&&e.every((t,n)=>t.path===i[n].path)}let qg=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:()=>new qC,providedIn:"root"})}}return e})();class qC{parse(i){const t=new Wxt(i);return new lp(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(i){const t=`/${Sx(i.root,!0)}`,n=function Lxt(e){const i=Object.entries(e).map(([t,n])=>Array.isArray(n)?n.map(r=>`${eS(t)}=${eS(r)}`).join("&"):`${eS(t)}=${eS(n)}`).filter(t=>t);return i.length?`?${i.join("&")}`:""}(i.queryParams);return`${t}${n}${"string"==typeof i.fragment?`#${function Fxt(e){return encodeURI(e)}(i.fragment)}`:""}`}}const kxt=new qC;function tS(e){return e.segments.map(i=>uH(i)).join("/")}function Sx(e,i){if(!e.hasChildren())return tS(e);if(i){const t=e.children[An]?Sx(e.children[An],!1):"",n=[];return Object.entries(e.children).forEach(([r,s])=>{r!==An&&n.push(`${r}:${Sx(s,!1)}`)}),n.length>0?`${t}(${n.join("//")})`:t}{const t=function Pxt(e,i){let t=[];return Object.entries(e.children).forEach(([n,r])=>{n===An&&(t=t.concat(i(r,n)))}),Object.entries(e.children).forEach(([n,r])=>{n!==An&&(t=t.concat(i(r,n)))}),t}(e,(n,r)=>r===An?[Sx(e.children[An],!1)]:[`${r}:${Sx(n,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[An]?`${tS(e)}/${t[0]}`:`${tS(e)}/(${t.join("//")})`}}function lH(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function eS(e){return lH(e).replace(/%3B/gi,";")}function zR(e){return lH(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function iS(e){return decodeURIComponent(e)}function cH(e){return iS(e.replace(/\+/g,"%20"))}function uH(e){return`${zR(e.path)}${function Oxt(e){return Object.entries(e).map(([i,t])=>`;${zR(i)}=${zR(t)}`).join("")}(e.parameters)}`}const Nxt=/^[^\/()?;#]+/;function GR(e){const i=e.match(Nxt);return i?i[0]:""}const Bxt=/^[^\/()?;=#]+/,Uxt=/^[^=?&#]+/,Gxt=/^[^&#]+/;class Wxt{constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ir([],{}):new Ir([],this.parseChildren())}parseQueryParams(){const i={};if(this.consumeOptional("?"))do{this.parseQueryParam(i)}while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const i=[];for(this.peekStartsWith("(")||i.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),i.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(i.length>0||Object.keys(t).length>0)&&(n[An]=new Ir(i,t)),n}parseSegment(){const i=GR(this.remaining);if(""===i&&this.peekStartsWith(";"))throw new pe(4009,!1);return this.capture(i),new Cx(iS(i),this.parseMatrixParams())}parseMatrixParams(){const i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){const t=function Vxt(e){const i=e.match(Bxt);return i?i[0]:""}(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const r=GR(this.remaining);r&&(n=r,this.capture(n))}i[iS(t)]=iS(n)}parseQueryParam(i){const t=function zxt(e){const i=e.match(Uxt);return i?i[0]:""}(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const o=function Hxt(e){const i=e.match(Gxt);return i?i[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=cH(t),s=cH(n);if(i.hasOwnProperty(r)){let o=i[r];Array.isArray(o)||(o=[o],i[r]=o),o.push(s)}else i[r]=s}parseParens(i){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=GR(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,!1);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):i&&(s=An);const o=this.parseChildren();t[s]=1===Object.keys(o).length?o[An]:new Ir([],o),this.consumeOptional("//")}return t}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return!!this.peekStartsWith(i)&&(this.remaining=this.remaining.substring(i.length),!0)}capture(i){if(!this.consumeOptional(i))throw new pe(4011,!1)}}function hH(e){return e.segments.length>0?new Ir([],{[An]:e}):e}function dH(e){const i={};for(const[n,r]of Object.entries(e.children)){const s=dH(r);if(n===An&&0===s.segments.length&&s.hasChildren())for(const[o,l]of Object.entries(s.children))i[o]=l;else(s.segments.length>0||s.hasChildren())&&(i[n]=s)}return function jxt(e){if(1===e.numberOfChildren&&e.children[An]){const i=e.children[An];return new Ir(e.segments.concat(i.segments),i.children)}return e}(new Ir(e.segments,i))}function up(e){return e instanceof lp}function fH(e){let i;const r=hH(function t(s){const o={};for(const w of s.children){const E=t(w);o[w.outlet]=E}const l=new Ir(s.url,o);return s===e&&(i=l),l}(e.root));return i??r}function pH(e,i,t,n){let r=e;for(;r.parent;)r=r.parent;if(0===i.length)return HR(r,r,r,t,n);const s=function Yxt(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new gH(!0,0,e);let i=0,t=!1;const n=e.reduce((r,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const l={};return Object.entries(s.outlets).forEach(([w,E])=>{l[w]="string"==typeof E?E.split("/"):E}),[...r,{outlets:l}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===o?(s.split("/").forEach((l,w)=>{0==w&&"."===l||(0==w&&""===l?t=!0:".."===l?i++:""!=l&&r.push(l))}),r):[...r,s]},[]);return new gH(t,i,n)}(i);if(s.toRoot())return HR(r,r,new Ir([],{}),t,n);const o=function $xt(e,i,t){if(e.isAbsolute)return new rS(i,!0,0);if(!t)return new rS(i,!1,NaN);if(null===t.parent)return new rS(t,!0,0);const n=nS(e.commands[0])?0:1;return function Qxt(e,i,t){let n=e,r=i,s=t;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,!1);r=n.segments.length}return new rS(n,!1,r-s)}(t,t.segments.length-1+n,e.numberOfDoubleDots)}(s,r,e),l=o.processChildren?_x(o.segmentGroup,o.index,s.commands):vH(o.segmentGroup,o.index,s.commands);return HR(r,o.segmentGroup,l,t,n)}function nS(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function Ex(e){return"object"==typeof e&&null!=e&&e.outlets}function HR(e,i,t,n,r){let o,s={};n&&Object.entries(n).forEach(([w,E])=>{s[w]=Array.isArray(E)?E.map(D=>`${D}`):`${E}`}),o=e===i?t:mH(e,i,t);const l=hH(dH(o));return new lp(l,s,r)}function mH(e,i,t){const n={};return Object.entries(e.children).forEach(([r,s])=>{n[r]=s===i?t:mH(s,i,t)}),new Ir(e.segments,n)}class gH{constructor(i,t,n){if(this.isAbsolute=i,this.numberOfDoubleDots=t,this.commands=n,i&&n.length>0&&nS(n[0]))throw new pe(4003,!1);const r=n.find(Ex);if(r&&r!==iH(n))throw new pe(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class rS{constructor(i,t,n){this.segmentGroup=i,this.processChildren=t,this.index=n}}function vH(e,i,t){if(e??=new Ir([],{}),0===e.segments.length&&e.hasChildren())return _x(e,i,t);const n=function Zxt(e,i,t){let n=0,r=i;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return s;const o=e.segments[r],l=t[n];if(Ex(l))break;const w=`${l}`,E=n0&&void 0===w)break;if(w&&E&&"object"==typeof E&&void 0===E.outlets){if(!xH(w,E,o))return s;n+=2}else{if(!xH(w,{},o))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}(e,i,t),r=t.slice(n.commandIndex);if(n.match&&n.pathIndexs!==An)&&e.children[An]&&1===e.numberOfChildren&&0===e.children[An].segments.length){const s=_x(e.children[An],i,t);return new Ir(e.segments,s.children)}return Object.entries(n).forEach(([s,o])=>{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=vH(e.children[s],i,o))}),Object.entries(e.children).forEach(([s,o])=>{void 0===n[s]&&(r[s]=o)}),new Ir(e.segments,r)}}function WR(e,i,t){const n=e.segments.slice(0,i);let r=0;for(;r{"string"==typeof n&&(n=[n]),null!==n&&(i[t]=WR(new Ir([],{}),0,n))}),i}function yH(e){const i={};return Object.entries(e).forEach(([t,n])=>i[t]=`${n}`),i}function xH(e,i,t){return e==t.path&&du(i,t.parameters)}const Ax="imperative";var Kn=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(Kn||{});class fu{constructor(i,t){this.id=i,this.url=t}}class sS extends fu{constructor(i,t,n="imperative",r=null){super(i,t),this.type=Kn.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class pu extends fu{constructor(i,t,n){super(i,t),this.urlAfterRedirects=n,this.type=Kn.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var Ml=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(Ml||{}),aS=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(aS||{});class hp extends fu{constructor(i,t,n,r){super(i,t),this.reason=n,this.code=r,this.type=Kn.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class tv extends fu{constructor(i,t,n,r){super(i,t),this.reason=n,this.code=r,this.type=Kn.NavigationSkipped}}class jR extends fu{constructor(i,t,n,r){super(i,t),this.error=n,this.target=r,this.type=Kn.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class bH extends fu{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Kn.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class qxt extends fu{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Kn.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class tbt extends fu{constructor(i,t,n,r,s){super(i,t),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=s,this.type=Kn.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class ebt extends fu{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Kn.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ibt extends fu{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Kn.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class nbt{constructor(i){this.route=i,this.type=Kn.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class rbt{constructor(i){this.route=i,this.type=Kn.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class sbt{constructor(i){this.snapshot=i,this.type=Kn.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class abt{constructor(i){this.snapshot=i,this.type=Kn.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class obt{constructor(i){this.snapshot=i,this.type=Kn.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class lbt{constructor(i){this.snapshot=i,this.type=Kn.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class wH{constructor(i,t,n){this.routerEvent=i,this.position=t,this.anchor=n,this.type=Kn.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class XR{}class oS{constructor(i,t){this.url=i,this.navigationBehaviorOptions=t}}function Lc(e){return e.outlet||An}function Dx(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let i=e.parent;i;i=i.parent){const t=i.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}class pbt{get injector(){return Dx(this.route?.snapshot)??this.rootInjector}set injector(i){}constructor(i){this.rootInjector=i,this.outlet=null,this.route=null,this.children=new Mx(this.rootInjector),this.attachRef=null}}let Mx=(()=>{class e{constructor(t){this.rootInjector=t,this.contexts=new Map}onChildOutletCreated(t,n){const r=this.getOrCreateContext(t);r.outlet=n,this.contexts.set(t,r)}onChildOutletDestroyed(t){const n=this.getContext(t);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let n=this.getContext(t);return n||(n=new pbt(this.rootInjector),this.contexts.set(t,n)),n}getContext(t){return this.contexts.get(t)||null}static{this.\u0275fac=function(n){return new(n||e)(re(za))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();class TH{constructor(i){this._root=i}get root(){return this._root.value}parent(i){const t=this.pathFromRoot(i);return t.length>1?t[t.length-2]:null}children(i){const t=YR(i,this._root);return t?t.children.map(n=>n.value):[]}firstChild(i){const t=YR(i,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(i){const t=$R(i,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==i)}pathFromRoot(i){return $R(i,this._root).map(t=>t.value)}}function YR(e,i){if(e===i.value)return i;for(const t of i.children){const n=YR(e,t);if(n)return n}return null}function $R(e,i){if(e===i.value)return[i];for(const t of i.children){const n=$R(e,t);if(n.length)return n.unshift(i),n}return[]}class Nc{constructor(i,t){this.value=i,this.children=t}toString(){return`TreeNode(${this.value})`}}function ev(e){const i={};return e&&e.children.forEach(t=>i[t.value.outlet]=t),i}class CH extends TH{constructor(i,t){super(i),this.snapshot=t,QR(this,i)}toString(){return this.snapshot.toString()}}function SH(e){const i=function mbt(e){const s=new cS([],{},{},"",{},An,e,null,{});return new EH("",new Nc(s,[]))}(e),t=new Kr([new Cx("",{})]),n=new Kr({}),r=new Kr({}),s=new Kr({}),o=new Kr(""),l=new nc(t,n,s,o,r,An,e,i.root);return l.snapshot=i.root,new CH(new Nc(l,[]),i)}class nc{constructor(i,t,n,r,s,o,l,w){this.urlSubject=i,this.paramsSubject=t,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=s,this.outlet=o,this.component=l,this._futureSnapshot=w,this.title=this.dataSubject?.pipe(Ri(E=>E[Tx]))??wi(void 0),this.url=i,this.params=t,this.queryParams=n,this.fragment=r,this.data=s}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.params.pipe(Ri(i=>Jg(i))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Ri(i=>Jg(i))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function lS(e,i,t="emptyOnly"){let n;const{routeConfig:r}=e;return n=null===i||"always"!==t&&""!==r?.path&&(i.component||i.routeConfig?.loadComponent)?{params:{...e.params},data:{...e.data},resolve:{...e.data,...e._resolvedData??{}}}:{params:{...i.params,...e.params},data:{...i.data,...e.data},resolve:{...e.data,...i.data,...r?.data,...e._resolvedData}},r&&AH(r)&&(n.resolve[Tx]=r.title),n}class cS{get title(){return this.data?.[Tx]}constructor(i,t,n,r,s,o,l,w,E){this.url=i,this.params=t,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=o,this.component=l,this.routeConfig=w,this._resolve=E}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??=Jg(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Jg(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class EH extends TH{constructor(i,t){super(t),this.url=i,QR(this,t)}toString(){return _H(this._root)}}function QR(e,i){i.value._routerState=e,i.children.forEach(t=>QR(e,t))}function _H(e){const i=e.children.length>0?` { ${e.children.map(_H).join(", ")} } `:"";return`${e.value}${i}`}function KR(e){if(e.snapshot){const i=e.snapshot,t=e._futureSnapshot;e.snapshot=t,du(i.queryParams,t.queryParams)||e.queryParamsSubject.next(t.queryParams),i.fragment!==t.fragment&&e.fragmentSubject.next(t.fragment),du(i.params,t.params)||e.paramsSubject.next(t.params),function Axt(e,i){if(e.length!==i.length)return!1;for(let t=0;tdu(t.parameters,i[n].parameters))}(e.url,i.url);return t&&!(!e.parent!=!i.parent)&&(!e.parent||ZR(e.parent,i.parent))}function AH(e){return"string"==typeof e.title||null===e.title}let JR=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=An,this.activateEvents=new Oe,this.deactivateEvents=new Oe,this.attachEvents=new Oe,this.detachEvents=new Oe,this.parentContexts=Jt(Mx),this.location=Jt(Or),this.changeDetector=Jt(In),this.inputBinder=Jt(uS,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(t){if(t.name){const{firstChange:n,previousValue:r}=t.name;if(n)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new pe(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,!1);this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,n){this.activated=t,this._activatedRoute=n,this.location.insert(t.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,n){if(this.isActivated)throw new pe(4013,!1);this._activatedRoute=t;const r=this.location,o=t.snapshot.component,l=this.parentContexts.getOrCreateContext(this.name).children,w=new qR(t,l,r.injector);this.activated=r.createComponent(o,{index:r.length,injector:w,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[lr]})}}return e})();class qR{__ngOutletInjector(i){return new qR(this.route,this.childContexts,i)}constructor(i,t,n){this.route=i,this.childContexts=t,this.parent=n}get(i,t){return i===nc?this.route:i===Mx?this.childContexts:this.parent.get(i,t)}}const uS=new te("");let DH=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(t){this.unsubscribeFromRouteData(t),this.subscribeToRouteData(t)}unsubscribeFromRouteData(t){this.outletDataSubscriptions.get(t)?.unsubscribe(),this.outletDataSubscriptions.delete(t)}subscribeToRouteData(t){const{activatedRoute:n}=t,r=oh([n.queryParams,n.params,n.data]).pipe(ks(([s,o,l],w)=>(l={...s,...o,...l},0===w?wi(l):Promise.resolve(l)))).subscribe(s=>{if(!t.isActivated||!t.activatedComponentRef||t.activatedRoute!==n||null===n.component)return void this.unsubscribeFromRouteData(t);const o=function uvt(e){const i=Fn(e);if(!i)return null;const t=new jy(i);return{get selector(){return t.selector},get type(){return t.componentType},get inputs(){return t.inputs},get outputs(){return t.outputs},get ngContentSelectors(){return t.ngContentSelectors},get isStandalone(){return i.standalone},get isSignal(){return i.signals}}}(n.component);if(o)for(const{templateName:l}of o.inputs)t.activatedComponentRef.setInput(l,s[l]);else this.unsubscribeFromRouteData(t)});this.outletDataSubscriptions.set(t,r)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();function Ix(e,i,t){if(t&&e.shouldReuseRoute(i.value,t.value.snapshot)){const n=t.value;n._futureSnapshot=i.value;const r=function vbt(e,i,t){return i.children.map(n=>{for(const r of t.children)if(e.shouldReuseRoute(n.value,r.value.snapshot))return Ix(e,n,r);return Ix(e,n)})}(e,i,t);return new Nc(n,r)}{if(e.shouldAttach(i.value)){const s=e.retrieve(i.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=i.value,o.children=i.children.map(l=>Ix(e,l)),o}}const n=function ybt(e){return new nc(new Kr(e.url),new Kr(e.params),new Kr(e.queryParams),new Kr(e.fragment),new Kr(e.data),e.outlet,e.component,e)}(i.value),r=i.children.map(s=>Ix(e,s));return new Nc(n,r)}}class tP{constructor(i,t){this.redirectTo=i,this.navigationBehaviorOptions=t}}const MH="ngNavigationCancelingError";function hS(e,i){const{redirectTo:t,navigationBehaviorOptions:n}=up(i)?{redirectTo:i,navigationBehaviorOptions:void 0}:i,r=IH(!1,Ml.Redirect);return r.url=t,r.navigationBehaviorOptions=n,r}function IH(e,i){const t=new Error(`NavigationCancelingError: ${e||""}`);return t[MH]=!0,t.cancellationCode=i,t}function RH(e){return!!e&&e[MH]}class wbt{constructor(i,t,n,r,s){this.routeReuseStrategy=i,this.futureState=t,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=s}activate(i){const t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,i),KR(this.futureState.root),this.activateChildRoutes(t,n,i)}deactivateChildRoutes(i,t,n){const r=ev(t);i.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,n)})}deactivateRoutes(i,t,n){const r=i.value,s=t?t.value:null;if(r===s)if(r.component){const o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(i,t,o.children)}else this.deactivateChildRoutes(i,t,n);else s&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(i,t){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,t):this.deactivateRouteAndOutlet(i,t)}detachAndStoreRouteSubtree(i,t){const n=t.getContext(i.value.outlet),r=n&&i.value.component?n.children:t,s=ev(i);for(const o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);if(n&&n.outlet){const o=n.outlet.detach(),l=n.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:o,route:i,contexts:l})}}deactivateRouteAndOutlet(i,t){const n=t.getContext(i.value.outlet),r=n&&i.value.component?n.children:t,s=ev(i);for(const o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(i,t,n){const r=ev(t);i.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new lbt(s.value.snapshot))}),i.children.length&&this.forwardEvent(new abt(i.value.snapshot))}activateRoutes(i,t,n){const r=i.value,s=t?t.value:null;if(KR(r),r===s)if(r.component){const o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(i,t,o.children)}else this.activateChildRoutes(i,t,n);else if(r.component){const o=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const l=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(l.contexts),o.attachRef=l.componentRef,o.route=l.route.value,o.outlet&&o.outlet.attach(l.componentRef,l.route.value),KR(l.route.value),this.activateChildRoutes(i,null,o.children)}else o.attachRef=null,o.route=r,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(i,null,o.children)}else this.activateChildRoutes(i,null,n)}}class PH{constructor(i){this.path=i,this.route=this.path[this.path.length-1]}}class dS{constructor(i,t){this.component=i,this.route=t}}function Tbt(e,i,t){const n=e._root;return Rx(n,i?i._root:null,t,[n.value])}function iv(e,i){const t=Symbol(),n=i.get(e,t);return n===t?"function"!=typeof e||function Ust(e){return null!==Fw(e)}(e)?i.get(e):e:n}function Rx(e,i,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ev(i);return e.children.forEach(o=>{(function Sbt(e,i,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=e.value,o=i?i.value:null,l=t?t.getContext(e.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const w=function Ebt(e,i,t){if("function"==typeof t)return t(e,i);switch(t){case"pathParamsChange":return!cp(e.url,i.url);case"pathParamsOrQueryParamsChange":return!cp(e.url,i.url)||!du(e.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ZR(e,i)||!du(e.queryParams,i.queryParams);default:return!ZR(e,i)}}(o,s,s.routeConfig.runGuardsAndResolvers);w?r.canActivateChecks.push(new PH(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Rx(e,i,s.component?l?l.children:null:t,n,r),w&&l&&l.outlet&&l.outlet.isActivated&&r.canDeactivateChecks.push(new dS(l.outlet.component,o))}else o&&Px(i,l,r),r.canActivateChecks.push(new PH(n)),Rx(e,null,s.component?l?l.children:null:t,n,r)})(o,s[o.value.outlet],t,n.concat([o.value]),r),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,l])=>Px(l,t.getContext(o),r)),r}function Px(e,i,t){const n=ev(e),r=e.value;Object.entries(n).forEach(([s,o])=>{Px(o,r.component?i?i.children.getContext(s):null:i,t)}),t.canDeactivateChecks.push(new dS(r.component&&i&&i.outlet&&i.outlet.isActivated?i.outlet.component:null,r))}function kx(e){return"function"==typeof e}function kH(e){return e instanceof Xg||"EmptyError"===e?.name}const fS=Symbol("INITIAL_VALUE");function nv(){return ks(e=>oh(e.map(i=>i.pipe(xs(1),Ma(fS)))).pipe(Ri(i=>{for(const t of i)if(!0!==t){if(t===fS)return fS;if(!1===t||Pbt(t))return t}return!0}),Ln(i=>i!==fS),xs(1)))}function Pbt(e){return up(e)||e instanceof tP}function FH(e){return function Ist(...e){return k3(e)}(cs(i=>{if("boolean"!=typeof i)throw hS(0,i)}),Ri(i=>!0===i))}class eP{constructor(i){this.segmentGroup=i||null}}class pS extends Error{constructor(i){super(),this.urlTree=i}}function rv(e){return Qg(new eP(e))}class jbt{constructor(i,t){this.urlSerializer=i,this.urlTree=t}lineralizeSegments(i,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return wi(n);if(r.numberOfChildren>1||!r.children[An])return Qg(new pe(4e3,!1));r=r.children[An]}}applyRedirectCommands(i,t,n,r,s){if("string"!=typeof t){const l=t,{queryParams:w,fragment:E,routeConfig:D,url:k,outlet:O,params:L,data:U,title:j}=r,W=Zc(s,()=>l({params:L,data:U,queryParams:w,fragment:E,routeConfig:D,url:k,outlet:O,title:j}));if(W instanceof lp)throw new pS(W);t=W}const o=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),i,n);if("/"===t[0])throw new pS(o);return o}applyRedirectCreateUrlTree(i,t,n,r){const s=this.createSegmentGroup(i,t.root,n,r);return new lp(s,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(i,t){const n={};return Object.entries(i).forEach(([r,s])=>{if("string"==typeof s&&":"===s[0]){const l=s.substring(1);n[r]=t[l]}else n[r]=s}),n}createSegmentGroup(i,t,n,r){const s=this.createSegments(i,t.segments,n,r);let o={};return Object.entries(t.children).forEach(([l,w])=>{o[l]=this.createSegmentGroup(i,w,n,r)}),new Ir(s,o)}createSegments(i,t,n,r){return t.map(s=>":"===s.path[0]?this.findPosParam(i,s,r):this.findOrReturn(s,n))}findPosParam(i,t,n){const r=n[t.path.substring(1)];if(!r)throw new pe(4001,!1);return r}findOrReturn(i,t){let n=0;for(const r of t){if(r.path===i.path)return t.splice(n),r;n++}return i}}const iP={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Xbt(e,i,t,n,r){const s=OH(e,i,t);return s.matched?(n=function cbt(e,i){return e.providers&&!e._injector&&(e._injector=$T(e.providers,i,`Route: ${e.path}`)),e._injector??i}(i,n),function Gbt(e,i,t,n){const r=i.canMatch;return r&&0!==r.length?wi(r.map(o=>{const l=iv(o,e);return Sd(function Rbt(e){return e&&kx(e.canMatch)}(l)?l.canMatch(i,t):Zc(e,()=>l(i,t)))})).pipe(nv(),FH()):wi(!0)}(n,i,t).pipe(Ri(o=>!0===o?s:{...iP}))):wi(s)}function OH(e,i,t){if("**"===i.path)return function Ybt(e){return{matched:!0,parameters:e.length>0?iH(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(t);if(""===i.path)return"full"===i.pathMatch&&(e.hasChildren()||t.length>0)?{...iP}:{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const r=(i.matcher||_xt)(t,e,i);if(!r)return{...iP};const s={};Object.entries(r.posParams??{}).forEach(([l,w])=>{s[l]=w.path});const o=r.consumed.length>0?{...s,...r.consumed[r.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function LH(e,i,t,n){return t.length>0&&function Kbt(e,i,t){return t.some(n=>mS(e,i,n)&&Lc(n)!==An)}(e,t,n)?{segmentGroup:new Ir(i,Qbt(n,new Ir(t,e.children))),slicedSegments:[]}:0===t.length&&function Zbt(e,i,t){return t.some(n=>mS(e,i,n))}(e,t,n)?{segmentGroup:new Ir(e.segments,$bt(e,t,n,e.children)),slicedSegments:t}:{segmentGroup:new Ir(e.segments,e.children),slicedSegments:t}}function $bt(e,i,t,n){const r={};for(const s of t)if(mS(e,i,s)&&!n[Lc(s)]){const o=new Ir([],{});r[Lc(s)]=o}return{...n,...r}}function Qbt(e,i){const t={};t[An]=i;for(const n of e)if(""===n.path&&Lc(n)!==An){const r=new Ir([],{});t[Lc(n)]=r}return t}function mS(e,i,t){return(!(e.hasChildren()||i.length>0)||"full"!==t.pathMatch)&&""===t.path}class qbt{}class i1t{constructor(i,t,n,r,s,o,l){this.injector=i,this.configLoader=t,this.rootComponentType=n,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=l,this.applyRedirects=new jbt(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(i){return new pe(4002,`'${i.segmentGroup}'`)}recognize(){const i=LH(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(i).pipe(Ri(({children:t,rootSnapshot:n})=>{const r=new Nc(n,t),s=new EH("",r),o=function Xxt(e,i,t=null,n=null){return pH(fH(e),i,t,n)}(n,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),{state:s,tree:o}}))}match(i){const t=new cS([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Object.freeze({}),An,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,i,An,t).pipe(Ri(n=>({children:n,rootSnapshot:t})),Js(n=>{if(n instanceof pS)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof eP?this.noMatchError(n):n}))}processSegmentGroup(i,t,n,r,s){return 0===n.segments.length&&n.hasChildren()?this.processChildren(i,t,n,s):this.processSegment(i,t,n,n.segments,r,!0,s).pipe(Ri(o=>o instanceof Nc?[o]:[]))}processChildren(i,t,n,r){const s=[];for(const o of Object.keys(n.children))"primary"===o?s.unshift(o):s.push(o);return Zs(s).pipe(Kg(o=>{const l=n.children[o],w=function fbt(e,i){const t=e.filter(n=>Lc(n)===i);return t.push(...e.filter(n=>Lc(n)!==i)),t}(t,o);return this.processSegmentGroup(i,w,l,o,r)}),function Cxt(e,i){return gs(function Txt(e,i,t,n,r){return(s,o)=>{let l=t,w=i,E=0;s.subscribe(Zr(o,D=>{const k=E++;w=l?e(w,D,k):(l=!0,D),n&&o.next(w)},r&&(()=>{l&&o.next(w),o.complete()})))}}(e,i,arguments.length>=2,!0))}((o,l)=>(o.push(...l),o)),KC(null),function Sxt(e,i){const t=arguments.length>=2;return n=>n.pipe(e?Ln((r,s)=>e(r,s,n)):ad,VR(1),t?KC(i):tH(()=>new Xg))}(),Da(o=>{if(null===o)return rv(n);const l=NH(o);return function n1t(e){e.sort((i,t)=>i.value.outlet===An?-1:t.value.outlet===An?1:i.value.outlet.localeCompare(t.value.outlet))}(l),wi(l)}))}processSegment(i,t,n,r,s,o,l){return Zs(t).pipe(Kg(w=>this.processSegmentAgainstRoute(w._injector??i,t,w,n,r,s,o,l).pipe(Js(E=>{if(E instanceof eP)return wi(null);throw E}))),ic(w=>!!w),Js(w=>{if(kH(w))return function Jbt(e,i,t){return 0===i.length&&!e.children[t]}(n,r,s)?wi(new qbt):rv(n);throw w}))}processSegmentAgainstRoute(i,t,n,r,s,o,l,w){return Lc(n)===o||o!==An&&mS(r,s,n)?void 0===n.redirectTo?this.matchSegmentAgainstRoute(i,r,n,s,o,w):this.allowRedirects&&l?this.expandSegmentAgainstRouteUsingRedirect(i,r,t,n,s,o,w):rv(r):rv(r)}expandSegmentAgainstRouteUsingRedirect(i,t,n,r,s,o,l){const{matched:w,parameters:E,consumedSegments:D,positionalParamSegments:k,remainingSegments:O}=OH(t,r,s);if(!w)return rv(t);"string"==typeof r.redirectTo&&"/"===r.redirectTo[0]&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const L=new cS(s,E,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,BH(r),Lc(r),r.component??r._loadedComponent??null,r,VH(r)),U=lS(L,l,this.paramsInheritanceStrategy);L.params=Object.freeze(U.params),L.data=Object.freeze(U.data);const j=this.applyRedirects.applyRedirectCommands(D,r.redirectTo,k,L,i);return this.applyRedirects.lineralizeSegments(r,j).pipe(Da(W=>this.processSegment(i,n,t,W.concat(O),o,!1,l)))}matchSegmentAgainstRoute(i,t,n,r,s,o){const l=Xbt(t,n,r,i);return"**"===n.path&&(t.children={}),l.pipe(ks(w=>w.matched?this.getChildConfig(i=n._injector??i,n,r).pipe(ks(({routes:E})=>{const D=n._loadedInjector??i,{parameters:k,consumedSegments:O,remainingSegments:L}=w,U=new cS(O,k,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,BH(n),Lc(n),n.component??n._loadedComponent??null,n,VH(n)),j=lS(U,o,this.paramsInheritanceStrategy);U.params=Object.freeze(j.params),U.data=Object.freeze(j.data);const{segmentGroup:W,slicedSegments:Z}=LH(t,O,L,E);if(0===Z.length&&W.hasChildren())return this.processChildren(D,E,W,U).pipe(Ri(st=>new Nc(U,st)));if(0===E.length&&0===Z.length)return wi(new Nc(U,[]));const rt=Lc(n)===s;return this.processSegment(D,E,W,Z,rt?An:s,!0,U).pipe(Ri(st=>new Nc(U,st instanceof Nc?[st]:[])))})):rv(t)))}getChildConfig(i,t,n){return t.children?wi({routes:t.children,injector:i}):t.loadChildren?void 0!==t._loadedRoutes?wi({routes:t._loadedRoutes,injector:t._loadedInjector}):function zbt(e,i,t,n){const r=i.canLoad;return void 0===r||0===r.length?wi(!0):wi(r.map(o=>{const l=iv(o,e);return Sd(function Abt(e){return e&&kx(e.canLoad)}(l)?l.canLoad(i,t):Zc(e,()=>l(i,t)))})).pipe(nv(),FH())}(i,t,n).pipe(Da(r=>r?this.configLoader.loadChildren(i,t).pipe(cs(s=>{t._loadedRoutes=s.routes,t._loadedInjector=s.injector})):function Wbt(){return Qg(IH(!1,Ml.GuardRejected))}())):wi({routes:[],injector:i})}}function r1t(e){const i=e.value.routeConfig;return i&&""===i.path}function NH(e){const i=[],t=new Set;for(const n of e){if(!r1t(n)){i.push(n);continue}const r=i.find(s=>n.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...n.children),t.add(r)):i.push(n)}for(const n of t){const r=NH(n.children);i.push(new Nc(n.value,r))}return i.filter(n=>!t.has(n))}function BH(e){return e.data||{}}function VH(e){return e.resolve||{}}function UH(e){const i=e.children.map(t=>UH(t)).flat();return[e,...i]}function nP(e){return ks(i=>{const t=e(i);return t?Zs(t).pipe(Ri(()=>i)):wi(i)})}let zH=(()=>{class e{buildTitle(t){let n,r=t.root;for(;void 0!==r;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(s=>s.outlet===An);return n}getResolvedTitleForRoute(t){return t.data[Tx]}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:()=>Jt(u1t),providedIn:"root"})}}return e})(),u1t=(()=>{class e extends zH{constructor(t){super(),this.title=t}updateTitle(t){const n=this.buildTitle(t);void 0!==n&&this.title.setTitle(n)}static{this.\u0275fac=function(n){return new(n||e)(re(Syt))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const sv=new te("",{providedIn:"root",factory:()=>({})});let GH=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["ng-component"]],standalone:!0,features:[Wi],decls:1,vars:0,template:function(n,r){1&n&&ye(0,"router-outlet")},dependencies:[JR],encapsulation:2})}}return e})();function rP(e){const i=e.children&&e.children.map(rP),t=i?{...e,children:i}:{...e};return!t.component&&!t.loadComponent&&(i||t.loadChildren)&&t.outlet&&t.outlet!==An&&(t.component=GH),t}const av=new te("");let sP=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Jt(WU)}loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return wi(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);const n=Sd(t.loadComponent()).pipe(Ri(HH),cs(s=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=s}),Zg(()=>{this.componentLoaders.delete(t)})),r=new BR(n,()=>new Fe).pipe(NR());return this.componentLoaders.set(t,r),r}loadChildren(t,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return wi({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=function h1t(e,i,t,n){return Sd(e.loadChildren()).pipe(Ri(HH),Da(r=>r instanceof c9||Array.isArray(r)?wi(r):Zs(i.compileModuleAsync(r))),Ri(r=>{n&&n(e);let s,o,l=!1;return Array.isArray(r)?(o=r,!0):(s=r.create(t).injector,o=s.get(av,[],{optional:!0,self:!0}).flat()),{routes:o.map(rP),injector:s}}))}(n,this.compiler,t,this.onLoadEndListener).pipe(Zg(()=>{this.childrenLoaders.delete(n)})),o=new BR(s,()=>new Fe).pipe(NR());return this.childrenLoaders.set(n,o),o}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function HH(e){return function d1t(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let aP=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:()=>Jt(f1t),providedIn:"root"})}}return e})(),f1t=(()=>{class e{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,n){return t}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const WH=new te(""),jH=new te("");function p1t(e,i,t){const n=e.get(jH),r=e.get(Gi);return e.get(li).runOutsideAngular(()=>{if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,new Promise(E=>setTimeout(E));let s;const o=new Promise(E=>{s=E}),l=r.startViewTransition(()=>(s(),function m1t(e){return new Promise(i=>{ao({read:()=>setTimeout(i)},{injector:e})})}(e))),{onViewTransitionCreated:w}=n;return w&&Zc(e,()=>w({transition:l,from:i,to:t})),o})}const XH=new te("");let gS=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Fe,this.transitionAbortSubject=new Fe,this.configLoader=Jt(sP),this.environmentInjector=Jt(za),this.urlSerializer=Jt(qg),this.rootContexts=Jt(Mx),this.location=Jt(ap),this.inputBindingEnabled=null!==Jt(uS,{optional:!0}),this.titleStrategy=Jt(zH),this.options=Jt(sv,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=Jt(aP),this.createViewTransition=Jt(WH,{optional:!0}),this.navigationErrorHandler=Jt(XH,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>wi(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new rbt(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new nbt(r))}complete(){this.transitions?.complete()}handleNavigationRequest(t){const n=++this.navigationId;this.transitions?.next({...this.transitions.value,...t,id:n})}setupNavigations(t,n,r){return this.transitions=new Kr({id:0,currentUrlTree:n,currentRawUrl:n,extractedUrl:this.urlHandlingStrategy.extract(n),urlAfterRedirects:this.urlHandlingStrategy.extract(n),rawUrl:n,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:Ax,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Ln(s=>0!==s.id),Ri(s=>({...s,extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),ks(s=>{let o=!1,l=!1;return wi(s).pipe(ks(w=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",Ml.SupersededByNewNavigation),al;this.currentTransition=s,this.currentNavigation={id:w.id,initialUrl:w.rawUrl,extractedUrl:w.extractedUrl,targetBrowserUrl:"string"==typeof w.extras.browserUrl?this.urlSerializer.parse(w.extras.browserUrl):w.extras.browserUrl,trigger:w.source,extras:w.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null};const E=!t.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!E&&"reload"!==(w.extras.onSameUrlNavigation??t.onSameUrlNavigation)){const k="";return this.events.next(new tv(w.id,this.urlSerializer.serialize(w.rawUrl),k,aS.IgnoredSameUrlNavigation)),w.resolve(!1),al}if(this.urlHandlingStrategy.shouldProcessUrl(w.rawUrl))return wi(w).pipe(ks(k=>{const O=this.transitions?.getValue();return this.events.next(new sS(k.id,this.urlSerializer.serialize(k.extractedUrl),k.source,k.restoredState)),O!==this.transitions?.getValue()?al:Promise.resolve(k)}),function s1t(e,i,t,n,r,s){return Da(o=>function t1t(e,i,t,n,r,s,o="emptyOnly"){return new i1t(e,i,t,n,r,o,s).recognize()}(e,i,t,n,o.extractedUrl,r,s).pipe(Ri(({state:l,tree:w})=>({...o,targetSnapshot:l,urlAfterRedirects:w}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,t.config,this.urlSerializer,this.paramsInheritanceStrategy),cs(k=>{s.targetSnapshot=k.targetSnapshot,s.urlAfterRedirects=k.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:k.urlAfterRedirects};const O=new bH(k.id,this.urlSerializer.serialize(k.extractedUrl),this.urlSerializer.serialize(k.urlAfterRedirects),k.targetSnapshot);this.events.next(O)}));if(E&&this.urlHandlingStrategy.shouldProcessUrl(w.currentRawUrl)){const{id:k,extractedUrl:O,source:L,restoredState:U,extras:j}=w,W=new sS(k,this.urlSerializer.serialize(O),L,U);this.events.next(W);const Z=SH(this.rootComponentType).snapshot;return this.currentTransition=s={...w,targetSnapshot:Z,urlAfterRedirects:O,extras:{...j,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=O,wi(s)}{const k="";return this.events.next(new tv(w.id,this.urlSerializer.serialize(w.extractedUrl),k,aS.IgnoredByUrlHandlingStrategy)),w.resolve(!1),al}}),cs(w=>{const E=new qxt(w.id,this.urlSerializer.serialize(w.extractedUrl),this.urlSerializer.serialize(w.urlAfterRedirects),w.targetSnapshot);this.events.next(E)}),Ri(w=>(this.currentTransition=s={...w,guards:Tbt(w.targetSnapshot,w.currentSnapshot,this.rootContexts)},s)),function kbt(e,i){return Da(t=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=t;return 0===o.length&&0===s.length?wi({...t,guardsResult:!0}):function Fbt(e,i,t,n){return Zs(e).pipe(Da(r=>function Ubt(e,i,t,n,r){const s=i&&i.routeConfig?i.routeConfig.canDeactivate:null;return s&&0!==s.length?wi(s.map(l=>{const w=Dx(i)??r,E=iv(l,w);return Sd(function Ibt(e){return e&&kx(e.canDeactivate)}(E)?E.canDeactivate(e,i,t,n):Zc(w,()=>E(e,i,t,n))).pipe(ic())})).pipe(nv()):wi(!0)}(r.component,r.route,t,i,n)),ic(r=>!0!==r,!0))}(o,n,r,e).pipe(Da(l=>l&&function _bt(e){return"boolean"==typeof e}(l)?function Obt(e,i,t,n){return Zs(i).pipe(Kg(r=>wx(function Nbt(e,i){return null!==e&&i&&i(new sbt(e)),wi(!0)}(r.route.parent,n),function Lbt(e,i){return null!==e&&i&&i(new obt(e)),wi(!0)}(r.route,n),function Vbt(e,i,t){const n=i[i.length-1],s=i.slice(0,i.length-1).reverse().map(o=>function Cbt(e){const i=e.routeConfig?e.routeConfig.canActivateChild:null;return i&&0!==i.length?{node:e,guards:i}:null}(o)).filter(o=>null!==o).map(o=>$g(()=>wi(o.guards.map(w=>{const E=Dx(o.node)??t,D=iv(w,E);return Sd(function Mbt(e){return e&&kx(e.canActivateChild)}(D)?D.canActivateChild(n,e):Zc(E,()=>D(n,e))).pipe(ic())})).pipe(nv())));return wi(s).pipe(nv())}(e,r.path,t),function Bbt(e,i,t){const n=i.routeConfig?i.routeConfig.canActivate:null;if(!n||0===n.length)return wi(!0);const r=n.map(s=>$g(()=>{const o=Dx(i)??t,l=iv(s,o);return Sd(function Dbt(e){return e&&kx(e.canActivate)}(l)?l.canActivate(i,e):Zc(o,()=>l(i,e))).pipe(ic())}));return wi(r).pipe(nv())}(e,r.route,t))),ic(r=>!0!==r,!0))}(n,s,e,i):wi(l)),Ri(l=>({...t,guardsResult:l})))})}(this.environmentInjector,w=>this.events.next(w)),cs(w=>{if(s.guardsResult=w.guardsResult,w.guardsResult&&"boolean"!=typeof w.guardsResult)throw hS(0,w.guardsResult);const E=new tbt(w.id,this.urlSerializer.serialize(w.extractedUrl),this.urlSerializer.serialize(w.urlAfterRedirects),w.targetSnapshot,!!w.guardsResult);this.events.next(E)}),Ln(w=>!!w.guardsResult||(this.cancelNavigationTransition(w,"",Ml.GuardRejected),!1)),nP(w=>{if(w.guards.canActivateChecks.length)return wi(w).pipe(cs(E=>{const D=new ebt(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot);this.events.next(D)}),ks(E=>{let D=!1;return wi(E).pipe(function a1t(e,i){return Da(t=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return wi(t);const s=new Set(r.map(w=>w.route)),o=new Set;for(const w of s)if(!o.has(w))for(const E of UH(w))o.add(E);let l=0;return Zs(o).pipe(Kg(w=>s.has(w)?function o1t(e,i,t,n){const r=e.routeConfig,s=e._resolve;return void 0!==r?.title&&!AH(r)&&(s[Tx]=r.title),function l1t(e,i,t,n){const r=UR(e);if(0===r.length)return wi({});const s={};return Zs(r).pipe(Da(o=>function c1t(e,i,t,n){const r=Dx(i)??n,s=iv(e,r);return Sd(s.resolve?s.resolve(i,t):Zc(r,()=>s(i,t)))}(e[o],i,t,n).pipe(ic(),cs(l=>{if(l instanceof tP)throw hS(new qC,l);s[o]=l}))),VR(1),ZC(s),Js(o=>kH(o)?al:Qg(o)))}(s,e,i,n).pipe(Ri(o=>(e._resolvedData=o,e.data=lS(e,e.parent,t).resolve,null)))}(w,n,e,i):(w.data=lS(w,w.parent,e).resolve,wi(void 0))),cs(()=>l++),VR(1),Da(w=>l===o.size?wi(t):al))})}(this.paramsInheritanceStrategy,this.environmentInjector),cs({next:()=>D=!0,complete:()=>{D||this.cancelNavigationTransition(E,"",Ml.NoDataFromResolver)}}))}),cs(E=>{const D=new ibt(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot);this.events.next(D)}))}),nP(w=>{const E=D=>{const k=[];D.routeConfig?.loadComponent&&!D.routeConfig._loadedComponent&&k.push(this.configLoader.loadComponent(D.routeConfig).pipe(cs(O=>{D.component=O}),Ri(()=>{})));for(const O of D.children)k.push(...E(O));return k};return oh(E(w.targetSnapshot.root)).pipe(KC(null),xs(1))}),nP(()=>this.afterPreactivation()),ks(()=>{const{currentSnapshot:w,targetSnapshot:E}=s,D=this.createViewTransition?.(this.environmentInjector,w.root,E.root);return D?Zs(D).pipe(Ri(()=>s)):wi(s)}),Ri(w=>{const E=function gbt(e,i,t){const n=Ix(e,i._root,t?t._root:void 0);return new CH(n,i)}(t.routeReuseStrategy,w.targetSnapshot,w.currentRouterState);return this.currentTransition=s={...w,targetRouterState:E},this.currentNavigation.targetRouterState=E,s}),cs(()=>{this.events.next(new XR)}),((e,i,t,n)=>Ri(r=>(new wbt(i,r.targetRouterState,r.currentRouterState,t,n).activate(e),r)))(this.rootContexts,t.routeReuseStrategy,w=>this.events.next(w),this.inputBindingEnabled),xs(1),cs({next:w=>{o=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new pu(w.id,this.urlSerializer.serialize(w.extractedUrl),this.urlSerializer.serialize(w.urlAfterRedirects))),this.titleStrategy?.updateTitle(w.targetRouterState.snapshot),w.resolve(!0)},complete:()=>{o=!0}}),Yi(this.transitionAbortSubject.pipe(cs(w=>{throw w}))),Zg(()=>{!o&&!l&&this.cancelNavigationTransition(s,"",Ml.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),Js(w=>{if(l=!0,RH(w))this.events.next(new hp(s.id,this.urlSerializer.serialize(s.extractedUrl),w.message,w.cancellationCode)),function xbt(e){return RH(e)&&up(e.url)}(w)?this.events.next(new oS(w.url,w.navigationBehaviorOptions)):s.resolve(!1);else{const E=new jR(s.id,this.urlSerializer.serialize(s.extractedUrl),w,s.targetSnapshot??void 0);try{const D=Zc(this.environmentInjector,()=>this.navigationErrorHandler?.(E));if(D instanceof tP){const{message:k,cancellationCode:O}=hS(0,D);this.events.next(new hp(s.id,this.urlSerializer.serialize(s.extractedUrl),k,O)),this.events.next(new oS(D.redirectTo,D.navigationBehaviorOptions))}else{this.events.next(E);const k=t.errorHandler(w);s.resolve(!!k)}}catch(D){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(D)}}return al}))}))}cancelNavigationTransition(t,n,r){const s=new hp(t.id,this.urlSerializer.serialize(t.extractedUrl),n,r);this.events.next(s),t.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){const t=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),n=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return t.toString()!==n?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function g1t(e){return e!==Ax}let v1t=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:()=>Jt(x1t),providedIn:"root"})}}return e})();class y1t{shouldDetach(i){return!1}store(i,t){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,t){return i.routeConfig===t.routeConfig}}let x1t=(()=>{class e extends y1t{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),YH=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:()=>Jt(b1t),providedIn:"root"})}}return e})(),b1t=(()=>{class e extends YH{constructor(){super(...arguments),this.location=Jt(ap),this.urlSerializer=Jt(qg),this.options=Jt(sv,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=Jt(aP),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new lp,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=SH(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(t){return this.location.subscribe(n=>{"popstate"===n.type&&t(n.url,n.state)})}handleRouterEvent(t,n){if(t instanceof sS)this.stateMemento=this.createStateMemento();else if(t instanceof tv)this.rawUrlTree=n.initialUrl;else if(t instanceof bH){if("eager"===this.urlUpdateStrategy&&!n.extras.skipLocationChange){const r=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl);this.setBrowserUrl(n.targetBrowserUrl??r,n)}}else t instanceof XR?(this.currentUrlTree=n.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl),this.routerState=n.targetRouterState,"deferred"===this.urlUpdateStrategy&&!n.extras.skipLocationChange&&this.setBrowserUrl(n.targetBrowserUrl??this.rawUrlTree,n)):t instanceof hp&&(t.code===Ml.GuardRejected||t.code===Ml.NoDataFromResolver)?this.restoreHistory(n):t instanceof jR?this.restoreHistory(n,!0):t instanceof pu&&(this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId)}setBrowserUrl(t,n){const r=t instanceof lp?this.urlSerializer.serialize(t):t;if(this.location.isCurrentPathEqualTo(r)||n.extras.replaceUrl){const o={...n.extras.state,...this.generateNgRouterState(n.id,this.browserPageId)};this.location.replaceState(r,"",o)}else{const s={...n.extras.state,...this.generateNgRouterState(n.id,this.browserPageId+1)};this.location.go(r,"",s)}}restoreHistory(t,n=!1){if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-this.browserPageId;0!==s?this.location.historyGo(s):this.currentUrlTree===t.finalUrl&&0===s&&(this.resetState(t),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(n&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,n){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:n}:{navigationId:t}}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Fx=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(Fx||{});function $H(e,i){e.events.pipe(Ln(t=>t instanceof pu||t instanceof hp||t instanceof jR||t instanceof tv),Ri(t=>t instanceof pu||t instanceof tv?Fx.COMPLETE:t instanceof hp&&(t.code===Ml.Redirect||t.code===Ml.SupersededByNewNavigation)?Fx.REDIRECTING:Fx.FAILED),Ln(t=>t!==Fx.REDIRECTING),xs(1)).subscribe(()=>{i()})}function w1t(e){throw e}const T1t={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},C1t={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ho=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=Jt(kU),this.stateManager=Jt(YH),this.options=Jt(sv,{optional:!0})||{},this.pendingTasks=Jt(Zu),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=Jt(gS),this.urlSerializer=Jt(qg),this.location=Jt(ap),this.urlHandlingStrategy=Jt(aP),this._events=new Fe,this.errorHandler=this.options.errorHandler||w1t,this.navigated=!1,this.routeReuseStrategy=Jt(v1t),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=Jt(av,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!Jt(uS,{optional:!0}),this.eventsSubscription=new Pe,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:t=>{this.console.warn(t)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const t=this.navigationTransitions.events.subscribe(n=>{try{const r=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(null!==r&&null!==s)if(this.stateManager.handleRouterEvent(n,s),n instanceof hp&&n.code!==Ml.Redirect&&n.code!==Ml.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof pu)this.navigated=!0;else if(n instanceof oS){const o=n.navigationBehaviorOptions,l=this.urlHandlingStrategy.merge(n.url,r.currentRawUrl),w={browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||"eager"===this.urlUpdateStrategy||g1t(r.source),...o};this.scheduleNavigation(l,Ax,null,w,{resolve:r.resolve,reject:r.reject,promise:r.promise})}(function E1t(e){return!(e instanceof XR||e instanceof oS)})(n)&&this._events.next(n)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(t)}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Ax,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((t,n)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(t,"popstate",n)},0)})}navigateToSyncWithBrowser(t,n,r){const s={replaceUrl:!0},o=r?.navigationId?r:null;if(r){const w={...r};delete w.navigationId,delete w.\u0275routerPageId,0!==Object.keys(w).length&&(s.state=w)}const l=this.parseUrl(t);this.scheduleNavigation(l,n,o,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(t){this.config=t.map(rP),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(t,n={}){const{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:l,preserveFragment:w}=n,E=w?this.currentUrlTree.fragment:o;let k,D=null;switch(l??this.options.defaultQueryParamsHandling){case"merge":D={...this.currentUrlTree.queryParams,...s};break;case"preserve":D=this.currentUrlTree.queryParams;break;default:D=s||null}null!==D&&(D=this.removeEmptyProps(D));try{k=fH(r?r.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof t[0]||"/"!==t[0][0])&&(t=[]),k=this.currentUrlTree.root}return pH(k,t,D,E??null)}navigateByUrl(t,n={skipLocationChange:!1}){const r=up(t)?t:this.parseUrl(t),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Ax,null,n)}navigate(t,n={skipLocationChange:!1}){return function S1t(e){for(let i=0;i(null!=s&&(n[r]=s),n),{})}scheduleNavigation(t,n,r,s,o){if(this.disposed)return Promise.resolve(!1);let l,w,E;o?(l=o.resolve,w=o.reject,E=o.promise):E=new Promise((k,O)=>{l=k,w=O});const D=this.pendingTasks.add();return $H(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(D))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:s,resolve:l,reject:w,promise:E,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),E.catch(k=>Promise.reject(k))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),ov=(()=>{class e{constructor(t,n,r,s,o,l){this.router=t,this.route=n,this.tabIndexAttribute=r,this.renderer=s,this.el=o,this.locationStrategy=l,this.href=null,this.onChanges=new Fe,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1,this.routerLinkInput=null;const w=o.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===w||"area"===w,this.isAnchorElement?this.subscription=t.events.subscribe(E=>{E instanceof pu&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(t){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",t)}ngOnChanges(t){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(t){null==t?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(this.routerLinkInput=up(t)||Array.isArray(t)?t:[t],this.setTabIndexIfNotOnNativeEl("0"))}onClick(t,n,r,s,o){const l=this.urlTree;return!!(null===l||this.isAnchorElement&&(0!==t||n||r||s||o||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(l,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){const t=this.urlTree;this.href=null!==t&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(t)):null;const n=null===this.href?null:function u5(e,i,t){return function qlt(e,i){return"src"===i&&("embed"===e||"frame"===e||"iframe"===e||"media"===e||"script"===e)||"href"===i&&("base"===e||"link"===e)?c5:Ay}(i,t)(e)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",n)}applyAttributeValue(t,n){const r=this.renderer,s=this.el.nativeElement;null!==n?r.setAttribute(s,t,n):r.removeAttribute(s,t)}get urlTree(){return null===this.routerLinkInput?null:up(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static{this.\u0275fac=function(n){return new(n||e)(pt(Ho),pt(nc),wl("tabindex"),pt(Kl),pt(ai),pt(sp))}}static{this.\u0275dir=me({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(n,r){1&n&&Ut("click",function(o){return r.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&n&&_i("target",r.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",qe],skipLocationChange:[2,"skipLocationChange","skipLocationChange",qe],replaceUrl:[2,"replaceUrl","replaceUrl",qe],routerLink:"routerLink"},standalone:!0,features:[vn,lr]})}}return e})();class QH{}let D1t=(()=>{class e{constructor(t,n,r,s,o){this.router=t,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(Ln(t=>t instanceof pu),Kg(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,n){const r=[];for(const s of n){s.providers&&!s._injector&&(s._injector=$T(s.providers,t,`Route: ${s.path}`));const o=s._injector??t,l=s._loadedInjector??o;(s.loadChildren&&!s._loadedRoutes&&void 0===s.canLoad||s.loadComponent&&!s._loadedComponent)&&r.push(this.preloadConfig(o,s)),(s.children||s._loadedRoutes)&&r.push(this.processRoutes(l,s.children??s._loadedRoutes))}return Zs(r).pipe(Yg())}preloadConfig(t,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(t,n):wi(null);const s=r.pipe(Da(o=>null===o?wi(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??t,o.routes))));return n.loadComponent&&!n._loadedComponent?Zs([s,this.loader.loadComponent(n)]).pipe(Yg()):s})}static{this.\u0275fac=function(n){return new(n||e)(re(Ho),re(WU),re(za),re(QH),re(sP))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const oP=new te("");let KH=(()=>{class e{constructor(t,n,r,s,o={}){this.urlSerializer=t,this.transitions=n,this.viewportScroller=r,this.zone=s,this.options=o,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},o.scrollPositionRestoration||="disabled",o.anchorScrolling||="disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof sS?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof pu?(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment)):t instanceof tv&&t.code===aS.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof wH&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,n){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new wH(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static{this.\u0275fac=function(n){RT()}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();function mu(e,i){return{\u0275kind:e,\u0275providers:i}}function JH(){const e=Jt(On);return i=>{const t=e.get(ql);if(i!==t.components[0])return;const n=e.get(Ho),r=e.get(qH);1===e.get(lP)&&n.initialNavigation(),e.get(t7,null,Nn.Optional)?.setUpPreloading(),e.get(oP,null,Nn.Optional)?.init(),n.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const qH=new te("",{factory:()=>new Fe}),lP=new te("",{providedIn:"root",factory:()=>1}),t7=new te("");function P1t(e){return mu(0,[{provide:t7,useExisting:D1t},{provide:QH,useExisting:e}])}function F1t(e){return mu(9,[{provide:WH,useValue:p1t},{provide:jH,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const e7=new te("ROUTER_FORROOT_GUARD"),O1t=[ap,{provide:qg,useClass:qC},Ho,Mx,{provide:nc,useFactory:function ZH(e){return e.routerState.root},deps:[Ho]},sP,[]];let i7=(()=>{class e{constructor(t){}static forRoot(t,n){return{ngModule:e,providers:[O1t,[],{provide:av,multi:!0,useValue:t},{provide:e7,useFactory:V1t,deps:[[Ho,new Xu,new Mf]]},{provide:sv,useValue:n||{}},n?.useHash?{provide:sp,useClass:mvt}:{provide:sp,useClass:Nz},{provide:oP,useFactory:()=>{const e=Jt(E0t),i=Jt(li),t=Jt(sv),n=Jt(gS),r=Jt(qg);return t.scrollOffset&&e.setOffset(t.scrollOffset),new KH(r,n,e,i,t)}},n?.preloadingStrategy?P1t(n.preloadingStrategy).\u0275providers:[],n?.initialNavigation?U1t(n):[],n?.bindToComponentInputs?mu(8,[DH,{provide:uS,useExisting:DH}]).\u0275providers:[],n?.enableViewTransitions?F1t().\u0275providers:[],[{provide:n7,useFactory:JH},{provide:bC,multi:!0,useExisting:n7}]]}}static forChild(t){return{ngModule:e,providers:[{provide:av,multi:!0,useValue:t}]}}static{this.\u0275fac=function(n){return new(n||e)(re(e7,8))}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({})}}return e})();function V1t(e){return"guarded"}function U1t(e){return["disabled"===e.initialNavigation?mu(3,[{provide:G2,multi:!0,useFactory:()=>{const i=Jt(Ho);return()=>{i.setUpLocationChangeListener()}}},{provide:lP,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?mu(2,[{provide:lP,useValue:0},{provide:G2,multi:!0,deps:[On],useFactory:i=>{const t=i.get(fvt,Promise.resolve());return()=>t.then(()=>new Promise(n=>{const r=i.get(Ho),s=i.get(qH);$H(r,()=>{n(!0)}),i.get(gS).afterPreactivation=()=>(n(!0),s.closed?wi(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const n7=new te("");function r7(e,i,t,n,r,s,o){try{var l=e[s](o),w=l.value}catch(E){return void t(E)}l.done?i(w):Promise.resolve(w).then(n,r)}function we(e){return function(){var i=this,t=arguments;return new Promise(function(n,r){var s=e.apply(i,t);function o(w){r7(s,n,r,o,l,"next",w)}function l(w){r7(s,n,r,o,l,"throw",w)}o(void 0)})}}class vS{}function cP(e){return e&&"function"==typeof e.connect&&!(e instanceof BR)}var lh=function(e){return e[e.REPLACED=0]="REPLACED",e[e.INSERTED=1]="INSERTED",e[e.MOVED=2]="MOVED",e[e.REMOVED=3]="REMOVED",e}(lh||{});const Ox=new te("_ViewRepeater");class s7{applyChanges(i,t,n,r,s){i.forEachOperation((o,l,w)=>{let E,D;if(null==o.previousIndex){const k=n(o,l,w);E=t.createEmbeddedView(k.templateRef,k.context,k.index),D=lh.INSERTED}else null==w?(t.remove(l),D=lh.REMOVED):(E=t.get(l),t.move(E,w),D=lh.MOVED);s&&s({context:E?.context,operation:D,record:o})})}detach(){}}class uP{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(i=!1,t,n=!0,r){this._multiple=i,this._emitChanges=n,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Fe,t&&t.length&&(i?t.forEach(s=>this._markSelected(s)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...i){this._verifyValueAssignment(i),i.forEach(n=>this._markSelected(n));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...i){this._verifyValueAssignment(i),i.forEach(n=>this._unmarkSelected(n));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...i){this._verifyValueAssignment(i);const t=this.selected,n=new Set(i);i.forEach(s=>this._markSelected(s)),t.filter(s=>!n.has(this._getConcreteValue(s,n))).forEach(s=>this._unmarkSelected(s));const r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(i){return this.isSelected(i)?this.deselect(i):this.select(i)}clear(i=!0){this._unmarkAll();const t=this._hasQueuedChanges();return i&&this._emitChangeEvent(),t}isSelected(i){return this._selection.has(this._getConcreteValue(i))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(i){this._multiple&&this.selected&&this._selected.sort(i)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(i){i=this._getConcreteValue(i),this.isSelected(i)||(this._multiple||this._unmarkAll(),this.isSelected(i)||this._selection.add(i),this._emitChanges&&this._selectedToEmit.push(i))}_unmarkSelected(i){i=this._getConcreteValue(i),this.isSelected(i)&&(this._selection.delete(i),this._emitChanges&&this._deselectedToEmit.push(i))}_unmarkAll(){this.isEmpty()||this._selection.forEach(i=>this._unmarkSelected(i))}_verifyValueAssignment(i){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(i,t){if(this.compareWith){t=t??this._selection;for(let n of t)if(this.compareWith(i,n))return n;return i}return i}}let hP=(()=>{class e{constructor(){this._listeners=[]}notify(t,n){for(let r of this._listeners)r(t,n)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(n=>t!==n)}}ngOnDestroy(){this._listeners=[]}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Ia(e,i){const t="object"==typeof i;return new Promise((n,r)=>{let o,s=!1;e.subscribe({next:l=>{o=l,s=!0},error:r,complete:()=>{s?n(o):t?n(i.defaultValue):r(new Xg)}})})}const dP={now:()=>(dP.delegate||Date).now(),delegate:void 0};class Lx extends Fe{constructor(i=1/0,t=1/0,n=dP){super(),this._bufferSize=i,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,i),this._windowTime=Math.max(1,t)}next(i){const{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:s,_windowTime:o}=this;t||(n.push(i),!r&&n.push(s.now()+o)),this._trimBuffer(),super.next(i)}_subscribe(i){this._throwIfClosed(),this._trimBuffer();const t=this._innerSubscribe(i),{_infiniteTimeWindow:n,_buffer:r}=this,s=r.slice();for(let o=0;o{this.headers=new Map,i.split("\n").forEach(t=>{const n=t.indexOf(":");if(n>0){const r=t.slice(0,n),s=r.toLowerCase(),o=t.slice(n+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((t,n)=>{this.setHeaderEntries(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();const t=this.headers.get(i.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,t){return this.clone({name:i,value:t,op:"a"})}set(i,t){return this.clone({name:i,value:t,op:"s"})}delete(i,t){return this.clone({name:i,value:t,op:"d"})}maybeSetNormalizedName(i,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,i)}init(){this.lazyInit&&(this.lazyInit instanceof ol?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(t=>{this.headers.set(t,i.headers.get(t)),this.normalizedNames.set(t,i.normalizedNames.get(t))})}clone(i){const t=new ol;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof ol?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([i]),t}applyUpdate(i){const t=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(i.name,t);const r=("a"===i.op?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":const s=i.value;if(s){let o=this.headers.get(t);if(!o)return;o=o.filter(l=>-1===s.indexOf(l)),0===o.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}}setHeaderEntries(i,t){const n=(Array.isArray(t)?t:[t]).map(s=>s.toString()),r=i.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(i,r)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>i(this.normalizedNames.get(t),this.headers.get(t)))}}class G1t{encodeKey(i){return o7(i)}encodeValue(i){return o7(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}}const W1t=/%(\d[a-f0-9])/gi,j1t={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function o7(e){return encodeURIComponent(e).replace(W1t,(i,t)=>j1t[t]??i)}function bS(e){return`${e}`}class Ed{constructor(i={}){if(this.updates=null,this.cloneFrom=null,this.encoder=i.encoder||new G1t,i.fromString){if(i.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function H1t(e,i){const t=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[o,l]=-1==s?[i.decodeKey(r),""]:[i.decodeKey(r.slice(0,s)),i.decodeValue(r.slice(s+1))],w=t.get(o)||[];w.push(l),t.set(o,w)}),t}(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(t=>{const n=i.fromObject[t],r=Array.isArray(n)?n.map(bS):[bS(n)];this.map.set(t,r)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();const t=this.map.get(i);return t?t[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,t){return this.clone({param:i,value:t,op:"a"})}appendAll(i){const t=[];return Object.keys(i).forEach(n=>{const r=i[n];Array.isArray(r)?r.forEach(s=>{t.push({param:n,value:s,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(i,t){return this.clone({param:i,value:t,op:"s"})}delete(i,t){return this.clone({param:i,value:t,op:"d"})}toString(){return this.init(),this.keys().map(i=>{const t=this.encoder.encodeKey(i);return this.map.get(i).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>""!==i).join("&")}clone(i){const t=new Ed({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(i),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":const t=("a"===i.op?this.map.get(i.param):void 0)||[];t.push(bS(i.value)),this.map.set(i.param,t);break;case"d":if(void 0===i.value){this.map.delete(i.param);break}{let n=this.map.get(i.param)||[];const r=n.indexOf(bS(i.value));-1!==r&&n.splice(r,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}}}),this.cloneFrom=this.updates=null)}}class X1t{constructor(){this.map=new Map}set(i,t){return this.map.set(i,t),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}}function l7(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function c7(e){return typeof Blob<"u"&&e instanceof Blob}function u7(e){return typeof FormData<"u"&&e instanceof FormData}class Nx{constructor(i,t,n,r){let s;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=i.toUpperCase(),function Y1t(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==n?n:null,s=r):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),this.transferCache=s.transferCache),this.headers??=new ol,this.context??=new X1t,this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{const l=t.indexOf("?");this.urlWithParams=t+(-1===l?"?":lO.set(L,i.setHeaders[L]),E)),i.setParams&&(D=Object.keys(i.setParams).reduce((O,L)=>O.set(L,i.setParams[L]),D)),new Nx(t,n,o,{params:D,headers:E,context:k,reportProgress:w,responseType:r,withCredentials:l,transferCache:s})}}var _d=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(_d||{});class fP{constructor(i,t=200,n="OK"){this.headers=i.headers||new ol,this.status=void 0!==i.status?i.status:t,this.statusText=i.statusText||n,this.url=i.url||null,this.ok=this.status>=200&&this.status<300}}class wS extends fP{constructor(i={}){super(i),this.type=_d.ResponseHeader}clone(i={}){return new wS({headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class dp extends fP{constructor(i={}){super(i),this.type=_d.Response,this.body=void 0!==i.body?i.body:null}clone(i={}){return new dp({body:void 0!==i.body?i.body:this.body,headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class lv extends fP{constructor(i){super(i,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${i.url||"(unknown url)"}`:`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}}function pP(e,i){return{body:i,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}let Il=(()=>{class e{constructor(t){this.handler=t}request(t,n,r={}){let s;if(t instanceof Nx)s=t;else{let w,E;w=r.headers instanceof ol?r.headers:new ol(r.headers),r.params&&(E=r.params instanceof Ed?r.params:new Ed({fromObject:r.params})),s=new Nx(t,n,void 0!==r.body?r.body:null,{headers:w,context:r.context,params:E,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}const o=wi(s).pipe(Kg(w=>this.handler.handle(w)));if(t instanceof Nx||"events"===r.observe)return o;const l=o.pipe(Ln(w=>w instanceof dp));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return l.pipe(Ri(w=>{if(null!==w.body&&!(w.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return w.body}));case"blob":return l.pipe(Ri(w=>{if(null!==w.body&&!(w.body instanceof Blob))throw new Error("Response is not a Blob.");return w.body}));case"text":return l.pipe(Ri(w=>{if(null!==w.body&&"string"!=typeof w.body)throw new Error("Response is not a string.");return w.body}));default:return l.pipe(Ri(w=>w.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:(new Ed).append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,pP(r,n))}post(t,n,r={}){return this.request("POST",t,pP(r,n))}put(t,n,r={}){return this.request("PUT",t,pP(r,n))}static{this.\u0275fac=function(n){return new(n||e)(re(yS))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();const Z1t=/^\)\]\}',?\n/;function d7(e){if(e.url)return e.url;const i="X-Request-URL".toLocaleLowerCase();return e.headers.get(i)}let mP=(()=>{class e{constructor(){this.fetchImpl=Jt(q1t,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t)),this.ngZone=Jt(li)}handle(t){return new dr(n=>{const r=new AbortController;return this.doRequest(t,r.signal,n).then(gP,s=>n.error(new lv({error:s}))),()=>r.abort()})}doRequest(t,n,r){var s=this;return we(function*(){const o=s.createRequestInit(t);let l;try{const U=s.ngZone.runOutsideAngular(()=>s.fetchImpl(t.urlWithParams,{signal:n,...o}));(function twt(e){e.then(gP,gP)})(U),r.next({type:_d.Sent}),l=yield U}catch(U){return void r.error(new lv({error:U,status:U.status??0,statusText:U.statusText,url:t.urlWithParams,headers:U.headers}))}const w=new ol(l.headers),E=l.statusText,D=d7(l)??t.urlWithParams;let k=l.status,O=null;if(t.reportProgress&&r.next(new wS({headers:w,status:k,statusText:E,url:D})),l.body){const U=l.headers.get("content-length"),j=[],W=l.body.getReader();let rt,st,Z=0;const yt=typeof Zone<"u"&&Zone.current;yield s.ngZone.runOutsideAngular(we(function*(){for(;;){const{done:It,value:ft}=yield W.read();if(It)break;if(j.push(ft),Z+=ft.length,t.reportProgress){st="text"===t.responseType?(st??"")+(rt??=new TextDecoder).decode(ft,{stream:!0}):void 0;const ht=()=>r.next({type:_d.DownloadProgress,total:U?+U:void 0,loaded:Z,partialText:st});yt?yt.run(ht):ht()}}}));const Tt=s.concatChunks(j,Z);try{const It=l.headers.get("Content-Type")??"";O=s.parseBody(t,Tt,It)}catch(It){return void r.error(new lv({error:It,headers:new ol(l.headers),status:l.status,statusText:l.statusText,url:d7(l)??t.urlWithParams}))}}0===k&&(k=O?200:0),k>=200&&k<300?(r.next(new dp({body:O,headers:w,status:k,statusText:E,url:D})),r.complete()):r.error(new lv({error:O,headers:w,status:k,statusText:E,url:D}))})()}parseBody(t,n,r){switch(t.responseType){case"json":const s=(new TextDecoder).decode(n).replace(Z1t,"");return""===s?null:JSON.parse(s);case"text":return(new TextDecoder).decode(n);case"blob":return new Blob([n],{type:r});case"arraybuffer":return n.buffer}}createRequestInit(t){const n={},r=t.withCredentials?"include":void 0;if(t.headers.forEach((s,o)=>n[s]=o.join(",")),t.headers.has("Accept")||(n.Accept="application/json, text/plain, */*"),!t.headers.has("Content-Type")){const s=t.detectContentTypeHeader();null!==s&&(n["Content-Type"]=s)}return{body:t.serializeBody(),method:t.method,headers:n,credentials:r}}concatChunks(t,n){const r=new Uint8Array(n);let s=0;for(const o of t)r.set(o,s),s+=o.length;return r}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();class q1t{}function gP(){}function f7(e,i){return i(e)}function ewt(e,i){return(t,n)=>i.intercept(t,{handle:r=>e(r,n)})}const nwt=new te(""),Bx=new te(""),p7=new te(""),m7=new te("",{providedIn:"root",factory:()=>!0});function rwt(){let e=null;return(i,t)=>{null===e&&(e=(Jt(nwt,{optional:!0})??[]).reduceRight(ewt,f7));const n=Jt(Zu);if(Jt(m7)){const s=n.add();return e(i,t).pipe(Zg(()=>n.remove(s)))}return e(i,t)}}let g7=(()=>{class e extends yS{constructor(t,n){super(),this.backend=t,this.injector=n,this.chain=null,this.pendingTasks=Jt(Zu),this.contributeToStability=Jt(m7)}handle(t){if(null===this.chain){const n=Array.from(new Set([...this.injector.get(Bx),...this.injector.get(p7,[])]));this.chain=n.reduceRight((r,s)=>function iwt(e,i,t){return(n,r)=>Zc(t,()=>i(n,s=>e(s,r)))}(r,s,this.injector),f7)}if(this.contributeToStability){const n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Zg(()=>this.pendingTasks.remove(n)))}return this.chain(t,n=>this.backend.handle(n))}static{this.\u0275fac=function(n){return new(n||e)(re(xS),re(za))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();const cwt=/^\)\]\}',?\n/;let y7=(()=>{class e{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new pe(-2800,!1);const n=this.xhrFactory;return(n.\u0275loadImpl?Zs(n.\u0275loadImpl()):wi(null)).pipe(ks(()=>new dr(s=>{const o=n.build();if(o.open(t.method,t.urlWithParams),t.withCredentials&&(o.withCredentials=!0),t.headers.forEach((j,W)=>o.setRequestHeader(j,W.join(","))),t.headers.has("Accept")||o.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const j=t.detectContentTypeHeader();null!==j&&o.setRequestHeader("Content-Type",j)}if(t.responseType){const j=t.responseType.toLowerCase();o.responseType="json"!==j?j:"text"}const l=t.serializeBody();let w=null;const E=()=>{if(null!==w)return w;const j=o.statusText||"OK",W=new ol(o.getAllResponseHeaders()),Z=function uwt(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(o)||t.url;return w=new wS({headers:W,status:o.status,statusText:j,url:Z}),w},D=()=>{let{headers:j,status:W,statusText:Z,url:rt}=E(),st=null;204!==W&&(st=typeof o.response>"u"?o.responseText:o.response),0===W&&(W=st?200:0);let yt=W>=200&&W<300;if("json"===t.responseType&&"string"==typeof st){const Tt=st;st=st.replace(cwt,"");try{st=""!==st?JSON.parse(st):null}catch(It){st=Tt,yt&&(yt=!1,st={error:It,text:st})}}yt?(s.next(new dp({body:st,headers:j,status:W,statusText:Z,url:rt||void 0})),s.complete()):s.error(new lv({error:st,headers:j,status:W,statusText:Z,url:rt||void 0}))},k=j=>{const{url:W}=E(),Z=new lv({error:j,status:o.status||0,statusText:o.statusText||"Unknown Error",url:W||void 0});s.error(Z)};let O=!1;const L=j=>{O||(s.next(E()),O=!0);let W={type:_d.DownloadProgress,loaded:j.loaded};j.lengthComputable&&(W.total=j.total),"text"===t.responseType&&o.responseText&&(W.partialText=o.responseText),s.next(W)},U=j=>{let W={type:_d.UploadProgress,loaded:j.loaded};j.lengthComputable&&(W.total=j.total),s.next(W)};return o.addEventListener("load",D),o.addEventListener("error",k),o.addEventListener("timeout",k),o.addEventListener("abort",k),t.reportProgress&&(o.addEventListener("progress",L),null!==l&&o.upload&&o.upload.addEventListener("progress",U)),o.send(l),s.next({type:_d.Sent}),()=>{o.removeEventListener("error",k),o.removeEventListener("abort",k),o.removeEventListener("load",D),o.removeEventListener("timeout",k),t.reportProgress&&(o.removeEventListener("progress",L),null!==l&&o.upload&&o.upload.removeEventListener("progress",U)),o.readyState!==o.DONE&&o.abort()}})))}static{this.\u0275fac=function(n){return new(n||e)(re(oG))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();const vP=new te(""),x7=new te("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),b7=new te("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class w7{}let fwt=(()=>{class e{constructor(t,n,r){this.doc=t,this.platform=n,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Yz(t,this.cookieName),this.lastCookieString=t),this.lastToken}static{this.\u0275fac=function(n){return new(n||e)(re(Gi),re(nu),re(x7))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();function pwt(e,i){const t=e.url.toLowerCase();if(!Jt(vP)||"GET"===e.method||"HEAD"===e.method||t.startsWith("http://")||t.startsWith("https://"))return i(e);const n=Jt(w7).getToken(),r=Jt(b7);return null!=n&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,n)})),i(e)}var Ad=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(Ad||{});function fp(e,i){return{\u0275kind:e,\u0275providers:i}}function mwt(...e){const i=[Il,y7,g7,{provide:yS,useExisting:g7},{provide:xS,useFactory:()=>Jt(mP,{optional:!0})??Jt(y7)},{provide:Bx,useValue:pwt,multi:!0},{provide:vP,useValue:!0},{provide:w7,useClass:fwt}];for(const t of e)i.push(...t.\u0275providers);return function ry(e){return{\u0275providers:e}}(i)}const T7=new te("");let yP;try{yP=typeof Intl<"u"&&Intl.v8BreakIterator}catch{yP=!1}let cv,cr=(()=>{class e{constructor(t){this._platformId=t,this.isBrowser=this._platformId?sG(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!yP)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static{this.\u0275fac=function(n){return new(n||e)(re(nu))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const I7=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function R7(){if(cv)return cv;if("object"!=typeof document||!document)return cv=new Set(I7),cv;let e=document.createElement("input");return cv=new Set(I7.filter(i=>(e.setAttribute("type",i),e.type===i))),cv}let Vx;function rc(e){return function Ewt(){if(null==Vx&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Vx=!0}))}finally{Vx=Vx||!1}return Vx}()?e:!!e.capture}var gu=function(e){return e[e.NORMAL=0]="NORMAL",e[e.NEGATED=1]="NEGATED",e[e.INVERTED=2]="INVERTED",e}(gu||{});let CS,pp,xP;function P7(){if(null==pp){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return pp=!1,pp;if("scrollBehavior"in document.documentElement.style)pp=!0;else{const e=Element.prototype.scrollTo;pp=!!e&&!/\{\s*\[native code\]\s*\}/.test(e.toString())}}return pp}function Ux(){if("object"!=typeof document||!document)return gu.NORMAL;if(null==CS){const e=document.createElement("div"),i=e.style;e.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";const t=document.createElement("div"),n=t.style;n.width="2px",n.height="1px",e.appendChild(t),document.body.appendChild(e),CS=gu.NORMAL,0===e.scrollLeft&&(e.scrollLeft=1,CS=0===e.scrollLeft?gu.NEGATED:gu.INVERTED),e.remove()}return CS}function SS(e){if(function _wt(){if(null==xP){const e=typeof document<"u"?document.head:null;xP=!(!e||!e.createShadowRoot&&!e.attachShadow)}return xP}()){const i=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function ES(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){const i=e.shadowRoot.activeElement;if(i===e)break;e=i}return e}function Wo(e){return e.composedPath?e.composedPath()[0]:e.target}function bP(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function co(e,...i){return i.length?i.some(t=>e[t]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}class Vwt extends Pe{constructor(i,t){super()}schedule(i,t=0){return this}}const DS={setInterval(e,i,...t){const{delegate:n}=DS;return n?.setInterval?n.setInterval(e,i,...t):setInterval(e,i,...t)},clearInterval(e){const{delegate:i}=DS;return(i?.clearInterval||clearInterval)(e)},delegate:void 0};class TP extends Vwt{constructor(i,t){super(i,t),this.scheduler=i,this.work=t,this.pending=!1}schedule(i,t=0){var n;if(this.closed)return this;this.state=i;const r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(s,this.id,t),this}requestAsyncId(i,t,n=0){return DS.setInterval(i.flush.bind(i,this),n)}recycleAsyncId(i,t,n=0){if(null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&DS.clearInterval(t)}execute(i,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(i,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(i,t){let r,n=!1;try{this.work(i)}catch(s){n=!0,r=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:i,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Ye(n,this),null!=i&&(this.id=this.recycleAsyncId(t,i,null)),this.delay=null,super.unsubscribe()}}}class Gx{constructor(i,t=Gx.now){this.schedulerActionCtor=i,this.now=t}schedule(i,t=0,n){return new this.schedulerActionCtor(this,i).schedule(n,t)}}Gx.now=dP.now;class CP extends Gx{constructor(i,t=Gx.now){super(i,t),this.actions=[],this._active=!1}flush(i){const{actions:t}=this;if(this._active)return void t.push(i);let n;this._active=!0;do{if(n=i.execute(i.state,i.delay))break}while(i=t.shift());if(this._active=!1,n){for(;i=t.shift();)i.unsubscribe();throw n}}}const Hx=new CP(TP),Uwt=Hx;function vu(e,i=Hx){return gs((t,n)=>{let r=null,s=null,o=null;const l=()=>{if(r){r.unsubscribe(),r=null;const E=s;s=null,n.next(E)}};function w(){const E=o+e,D=i.now();if(D{s=E,o=i.now(),r||(r=i.schedule(w,e),n.add(r))},()=>{l(),n.complete()},void 0,()=>{s=r=null}))})}function SP(e){return Ln((i,t)=>e<=t)}function mp(e,i=ad){return e=e??zwt,gs((t,n)=>{let r,s=!0;t.subscribe(Zr(n,o=>{const l=i(o);(s||!e(r,l))&&(s=!1,r=l,n.next(o))}))})}function zwt(e,i){return e===i}function pa(e){return null!=e&&"false"!=`${e}`}function Id(e,i=0){return O7(e)?Number(e):2===arguments.length?i:0}function O7(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Wx(e){return Array.isArray(e)?e:[e]}function qs(e){return null==e?"":"string"==typeof e?e:`${e}px`}function uo(e){return e instanceof ai?e.nativeElement:e}let L7=(()=>{class e{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Hwt=(()=>{class e{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map,this._ngZone=Jt(li)}ngOnDestroy(){this._observedElements.forEach((t,n)=>this._cleanupObserver(n))}observe(t){const n=uo(t);return new dr(r=>{const o=this._observeElement(n).pipe(Ri(l=>l.filter(w=>!function Gwt(e){if("characterData"===e.type&&e.target instanceof Comment)return!0;if("childList"===e.type){for(let i=0;i!!l.length)).subscribe(l=>{this._ngZone.run(()=>{r.next(l)})});return()=>{o.unsubscribe(),this._unobserveElement(n)}})}_observeElement(t){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const n=new Fe,r=this._mutationObserverFactory.create(s=>n.next(s));r&&r.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:r,stream:n,count:1})}return this._observedElements.get(t).stream})}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:n,stream:r}=this._observedElements.get(t);n&&n.disconnect(),r.complete(),this._observedElements.delete(t)}}static{this.\u0275fac=function(n){return new(n||e)(re(L7))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),N7=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=Id(t),this._subscribe()}constructor(t,n){this._contentObserver=t,this._elementRef=n,this.event=new Oe,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?t.pipe(vu(this.debounce)):t).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||e)(pt(Hwt),pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",qe],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"],standalone:!0,features:[vn]})}}return e})(),EP=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[L7]})}}return e})();const B7=new Set;let gp,Wwt=(()=>{class e{constructor(t,n){this._platform=t,this._nonce=n,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Xwt}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function jwt(e,i){if(!B7.has(e))try{gp||(gp=document.createElement("style"),i&&gp.setAttribute("nonce",i),gp.setAttribute("type","text/css"),document.head.appendChild(gp)),gp.sheet&&(gp.sheet.insertRule(`@media ${e} {body{ }}`,0),B7.add(e))}catch(t){console.error(t)}}(t,this._nonce),this._matchMedia(t)}static{this.\u0275fac=function(n){return new(n||e)(re(cr),re(HM,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Xwt(e){return{matches:"all"===e||""===e,media:e,addListener:()=>{},removeListener:()=>{}}}let _P=(()=>{class e{constructor(t,n){this._mediaMatcher=t,this._zone=n,this._queries=new Map,this._destroySubject=new Fe}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return V7(Wx(t)).some(r=>this._registerQuery(r).mql.matches)}observe(t){let s=oh(V7(Wx(t)).map(o=>this._registerQuery(o).observable));return s=wx(s.pipe(xs(1)),s.pipe(SP(1),vu(0))),s.pipe(Ri(o=>{const l={matches:!1,breakpoints:{}};return o.forEach(({matches:w,query:E})=>{l.matches=l.matches||w,l.breakpoints[E]=w}),l}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const n=this._mediaMatcher.matchMedia(t),s={observable:new dr(o=>{const l=w=>this._zone.run(()=>o.next(w));return n.addListener(l),()=>{n.removeListener(l)}}).pipe(Ma(n),Ri(({matches:o})=>({query:t,matches:o})),Yi(this._destroySubject)),mql:n};return this._queries.set(t,s),s}static{this.\u0275fac=function(n){return new(n||e)(re(Wwt),re(li))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function V7(e){return e.map(i=>i.split(",")).reduce((i,t)=>i.concat(t)).map(i=>i.trim())}function MS(e,i,t){const n=IS(e,i);t=t.trim(),!n.some(r=>r.trim()===t)&&(n.push(t),e.setAttribute(i,n.join(" ")))}function hv(e,i,t){const n=IS(e,i);t=t.trim();const r=n.filter(s=>s!==t);r.length?e.setAttribute(i,r.join(" ")):e.removeAttribute(i)}function IS(e,i){return e.getAttribute(i)?.match(/\S+/g)??[]}const G7="cdk-describedby-message",RS="cdk-describedby-host";let AP=0,H7=(()=>{class e{constructor(t,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+AP++,this._document=t,this._id=Jt(Vf)+"-"+AP++}describe(t,n,r){if(!this._canBeDescribed(t,n))return;const s=DP(n,r);"string"!=typeof n?(W7(n,this._id),this._messageRegistry.set(s,{messageElement:n,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(n,r),this._isElementDescribedByMessage(t,s)||this._addMessageReference(t,s)}removeDescription(t,n,r){if(!n||!this._isElementNode(t))return;const s=DP(n,r);if(this._isElementDescribedByMessage(t,s)&&this._removeMessageReference(t,s),"string"==typeof n){const o=this._messageRegistry.get(s);o&&0===o.referenceCount&&this._deleteMessageElement(s)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const t=this._document.querySelectorAll(`[${RS}="${this._id}"]`);for(let n=0;n0!=r.indexOf(G7));t.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(t,n){const r=this._messageRegistry.get(n);MS(t,"aria-describedby",r.messageElement.id),t.setAttribute(RS,this._id),r.referenceCount++}_removeMessageReference(t,n){const r=this._messageRegistry.get(n);r.referenceCount--,hv(t,"aria-describedby",r.messageElement.id),t.removeAttribute(RS)}_isElementDescribedByMessage(t,n){const r=IS(t,"aria-describedby"),s=this._messageRegistry.get(n),o=s&&s.messageElement.id;return!!o&&-1!=r.indexOf(o)}_canBeDescribed(t,n){if(!this._isElementNode(t))return!1;if(n&&"object"==typeof n)return!0;const r=null==n?"":`${n}`.trim(),s=t.getAttribute("aria-label");return!(!r||s&&s.trim()===r)}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}static{this.\u0275fac=function(n){return new(n||e)(re(Gi),re(cr))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function DP(e,i){return"string"==typeof e?`${i||""}/${e}`:e}function W7(e,i){e.id||(e.id=`${G7}-${i}-${AP++}`)}class j7{constructor(i,t){this._letterKeyStream=new Fe,this._items=[],this._selectedItemIndex=-1,this._pressedLetters=[],this._selectedItem=new Fe,this.selectedItem=this._selectedItem;const n="number"==typeof t?.debounceInterval?t.debounceInterval:200;t?.skipPredicate&&(this._skipPredicateFn=t.skipPredicate),this.setItems(i),this._setupKeyHandler(n)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(i){this._selectedItemIndex=i}setItems(i){this._items=i}handleKey(i){const t=i.keyCode;i.key&&1===i.key.length?this._letterKeyStream.next(i.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(i){this._letterKeyStream.pipe(cs(t=>this._pressedLetters.push(t)),vu(i),Ln(()=>this._pressedLetters.length>0),Ri(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(t=>{for(let n=1;nn.disabled,this.tabOut=new Fe,this.change=new Fe,i instanceof Ju?this._itemChangesSubscription=i.changes.subscribe(n=>this._itemsChanged(n.toArray())):jT(i)&&(this._effectRef=function kz(e,i){Vo("NgSignals"),!i?.injector&&sM();const t=i?.injector??Jt(On),n=!0!==i?.manualCleanup?t.get(vy):null,r=new lvt(t.get(svt),e,typeof Zone>"u"?null:Zone.current,n,t,i?.allowSignalWrites??!1),s=t.get(In,null,{optional:!0});return s&&8&s._lView[zi]?(s._lView[$w]??=[]).push(r.watcher.notify):r.watcher.notify(),r}(()=>this._itemsChanged(i()),{injector:t}))}skipPredicate(i){return this._skipPredicateFn=i,this}withWrap(i=!0){return this._wrap=i,this}withVerticalOrientation(i=!0){return this._vertical=i,this}withHorizontalOrientation(i){return this._horizontal=i,this}withAllowedModifierKeys(i){return this._allowedModifierKeys=i,this}withTypeAhead(i=200){this._typeaheadSubscription.unsubscribe();const t=this._getItemsArray();return this._typeahead=new j7(t,{debounceInterval:"number"==typeof i?i:void 0,skipPredicate:n=>this._skipPredicateFn(n)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(n=>{this.setActiveItem(n)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(i=!0){return this._homeAndEnd=i,this}withPageUpDown(i=!0,t=10){return this._pageUpAndDown={enabled:i,delta:t},this}setActiveItem(i){const t=this._activeItem();this.updateActiveItem(i),this._activeItem()!==t&&this.change.next(this._activeItemIndex)}onKeydown(i){const t=i.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every(s=>!i[s]||this._allowedModifierKeys.indexOf(s)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(s>0?s:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex+this._pageUpAndDown.delta,o=this._getItemsArray().length;this._setActiveItemByIndex(s-1&&n!==this._activeItemIndex&&(this._activeItemIndex=n,this._typeahead?.setCurrentSelectedItemIndex(n))}}}class Y7 extends X7{setActiveItem(i){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(i),this.activeItem&&this.activeItem.setActiveStyles()}}class MP extends X7{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(i){return this._origin=i,this}setActiveItem(i){super.setActiveItem(i),this.activeItem&&this.activeItem.focus(this._origin)}}let PS=(()=>{class e{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function Jwt(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const n=function Zwt(e){try{return e.frameElement}catch{return null}}(function aTt(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}(t));if(n&&(-1===Z7(n)||!this.isVisible(n)))return!1;let r=t.nodeName.toLowerCase(),s=Z7(t);return t.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function rTt(e){let i=e.nodeName.toLowerCase(),t="input"===i&&e.type;return"text"===t||"password"===t||"select"===i||"textarea"===i}(t))&&("audio"===r?!!t.hasAttribute("controls")&&-1!==s:"video"===r?-1!==s&&(null!==s||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,n){return function sTt(e){return!function tTt(e){return function iTt(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function qwt(e){let i=e.nodeName.toLowerCase();return"input"===i||"select"===i||"button"===i||"textarea"===i}(e)||function eTt(e){return function nTt(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||K7(e))}(t)&&!this.isDisabled(t)&&(n?.ignoreVisibility||this.isVisible(t))}static{this.\u0275fac=function(n){return new(n||e)(re(cr))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function K7(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;let i=e.getAttribute("tabindex");return!(!i||isNaN(parseInt(i,10)))}function Z7(e){if(!K7(e))return null;const i=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}class J7{get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}constructor(i,t,n,r,s=!1,o){this._element=i,this._checker=t,this._ngZone=n,this._document=r,this._injector=o,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||this.attachAnchors()}destroy(){const i=this._startAnchor,t=this._endAnchor;i&&(i.removeEventListener("focus",this.startAnchorListener),i.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(i){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(i)))})}focusFirstTabbableElementWhenReady(i){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(i)))})}focusLastTabbableElementWhenReady(i){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(i)))})}_getRegionBoundary(i){const t=this._element.querySelectorAll(`[cdk-focus-region-${i}], [cdkFocusRegion${i}], [cdk-focus-${i}]`);return"start"==i?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(i){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){const n=this._getFirstTabbableElement(t);return n?.focus(i),!!n}return t.focus(i),!0}return this.focusFirstTabbableElement(i)}focusFirstTabbableElement(i){const t=this._getRegionBoundary("start");return t&&t.focus(i),!!t}focusLastTabbableElement(i){const t=this._getRegionBoundary("end");return t&&t.focus(i),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;const t=i.children;for(let n=0;n=0;n--){const r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){const i=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,i),i.classList.add("cdk-visually-hidden"),i.classList.add("cdk-focus-trap-anchor"),i.setAttribute("aria-hidden","true"),i}_toggleAnchorTabIndex(i,t){i?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(i){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_executeOnStable(i){this._injector?ao(i,{injector:this._injector}):setTimeout(i)}}let IP=(()=>{class e{constructor(t,n,r){this._checker=t,this._ngZone=n,this._injector=Jt(On),this._document=r}create(t,n=!1){return new J7(t,this._checker,this._ngZone,this._document,n,this._injector)}static{this.\u0275fac=function(n){return new(n||e)(re(PS),re(li),re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function kS(e){return 0===e.buttons||0===e.detail}function FS(e){const i=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!(!i||-1!==i.identifier||null!=i.radiusX&&1!==i.radiusX||null!=i.radiusY&&1!==i.radiusY)}const oTt=new te("cdk-input-modality-detector-options"),lTt={ignoreKeys:[18,17,224,91,16]},dv=rc({passive:!0,capture:!0});let cTt=(()=>{class e{get mostRecentModality(){return this._modality.value}constructor(t,n,r,s){this._platform=t,this._mostRecentTarget=null,this._modality=new Kr(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(l=>l===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Wo(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(kS(o)?"keyboard":"mouse"),this._mostRecentTarget=Wo(o))},this._onTouchstart=o=>{FS(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Wo(o))},this._options={...lTt,...s},this.modalityDetected=this._modality.pipe(SP(1)),this.modalityChanged=this.modalityDetected.pipe(mp()),t.isBrowser&&n.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,dv),r.addEventListener("mousedown",this._onMousedown,dv),r.addEventListener("touchstart",this._onTouchstart,dv)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,dv),document.removeEventListener("mousedown",this._onMousedown,dv),document.removeEventListener("touchstart",this._onTouchstart,dv))}static{this.\u0275fac=function(n){return new(n||e)(re(cr),re(li),re(Gi),re(oTt,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const uTt=new te("liveAnnouncerElement",{providedIn:"root",factory:function hTt(){return null}}),dTt=new te("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let fTt=0,tW=(()=>{class e{constructor(t,n,r,s){this._ngZone=n,this._defaultOptions=s,this._document=r,this._liveElement=t||this._createLiveElement()}announce(t,...n){const r=this._defaultOptions;let s,o;return 1===n.length&&"number"==typeof n[0]?o=n[0]:[s,o]=n,this.clear(),clearTimeout(this._previousTimeout),s||(s=r&&r.politeness?r.politeness:"polite"),null==o&&r&&(o=r.duration),this._liveElement.setAttribute("aria-live",s),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(l=>this._currentResolve=l)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,"number"==typeof o&&(this._previousTimeout=setTimeout(()=>this.clear(),o)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const t="cdk-live-announcer-element",n=this._document.getElementsByClassName(t),r=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class e{constructor(t,n,r,s,o){this._ngZone=t,this._platform=n,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Fe,this._rootNodeFocusAndBlurListener=l=>{for(let E=Wo(l);E;E=E.parentElement)"focus"===l.type?this._onFocus(l,E):this._onBlur(l,E)},this._document=s,this._detectionMode=o?.detectionMode||OS.IMMEDIATE}monitor(t,n=!1){const r=uo(t);if(!this._platform.isBrowser||1!==r.nodeType)return wi();const s=SS(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return n&&(o.checkChildren=!0),o.subject;const l={checkChildren:n,subject:new Fe,rootNode:s};return this._elementInfo.set(r,l),this._registerGlobalListeners(l),l.subject}stopMonitoring(t){const n=uo(t),r=this._elementInfo.get(n);r&&(r.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(r))}focusVia(t,n,r){const s=uo(t);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([l,w])=>this._originChanged(l,n,w)):(this._setOrigin(n),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((t,n)=>this.stopMonitoring(n))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===OS.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,n){t.classList.toggle("cdk-focused",!!n),t.classList.toggle("cdk-touch-focused","touch"===n),t.classList.toggle("cdk-keyboard-focused","keyboard"===n),t.classList.toggle("cdk-mouse-focused","mouse"===n),t.classList.toggle("cdk-program-focused","program"===n)}_setOrigin(t,n=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&n,this._detectionMode===OS.IMMEDIATE&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,n){const r=this._elementInfo.get(n),s=Wo(t);!r||!r.checkChildren&&n!==s||this._originChanged(n,this._getFocusOrigin(s),r)}_onBlur(t,n){const r=this._elementInfo.get(n);!r||r.checkChildren&&t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(this._setClasses(n),this._emitOrigin(r,null))}_emitOrigin(t,n){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(n))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const n=t.rootNode,r=this._rootNodeFocusListenerCount.get(n)||0;r||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,LS),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,LS)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Yi(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(t){const n=t.rootNode;if(this._rootNodeFocusListenerCount.has(n)){const r=this._rootNodeFocusListenerCount.get(n);r>1?this._rootNodeFocusListenerCount.set(n,r-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,LS),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,LS),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,n,r){this._setClasses(t,n),this._emitOrigin(r,n),this._lastFocusOrigin=n}_getClosestElementsInfo(t){const n=[];return this._elementInfo.forEach((r,s)=>{(s===t||r.checkChildren&&s.contains(t))&&n.push([s,r])}),n}_isLastInteractionFromInputLabel(t){const{_mostRecentTarget:n,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!n||n===t||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName||t.disabled)return!1;const s=t.labels;if(s)for(let o=0;o{class e{constructor(t,n){this._elementRef=t,this._focusMonitor=n,this._focusOrigin=null,this.cdkFocusChange=new Oe}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){const t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(n=>{this._focusOrigin=n,this.cdkFocusChange.emit(n)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(sc))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"],standalone:!0})}}return e})();var vp=function(e){return e[e.NONE=0]="NONE",e[e.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",e[e.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",e}(vp||{});const eW="cdk-high-contrast-black-on-white",iW="cdk-high-contrast-white-on-black",RP="cdk-high-contrast-active";let nW=(()=>{class e{constructor(t,n){this._platform=t,this._document=n,this._breakpointSubscription=Jt(_P).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return vp.NONE;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const n=this._document.defaultView||window,r=n&&n.getComputedStyle?n.getComputedStyle(t):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(t.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return vp.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return vp.BLACK_ON_WHITE}return vp.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(RP,eW,iW),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();n===vp.BLACK_ON_WHITE?t.add(RP,eW):n===vp.WHITE_ON_BLACK&&t.add(RP,iW)}}static{this.\u0275fac=function(n){return new(n||e)(re(cr),re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),rW=(()=>{class e{constructor(t){t._applyBodyHighContrastModeCssClasses()}static{this.\u0275fac=function(n){return new(n||e)(re(nW))}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[EP]})}}return e})();const gTt=new te("cdk-dir-doc",{providedIn:"root",factory:function vTt(){return Jt(Gi)}}),yTt=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ya=(()=>{class e{constructor(t){this.value="ltr",this.change=new Oe,t&&(this.value=function xTt(e){const i=e?.toLowerCase()||"";return"auto"===i&&typeof navigator<"u"&&navigator?.language?yTt.test(navigator.language)?"rtl":"ltr":"rtl"===i?"rtl":"ltr"}((t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static{this.\u0275fac=function(n){return new(n||e)(re(gTt,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),jx=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({})}}return e})();const bTt=["text"],wTt=[[["mat-icon"]],"*"],TTt=["mat-icon","*"];function CTt(e,i){if(1&e&&ye(0,"mat-pseudo-checkbox",1),2&e){const t=St();vt("disabled",t.disabled)("state",t.selected?"checked":"unchecked")}}function STt(e,i){1&e&&ye(0,"mat-pseudo-checkbox",3),2&e&&vt("disabled",St().disabled)}function ETt(e,i){if(1&e&&(J(0,"span",4),ut(1),et()),2&e){const t=St();ot(),Je("(",t.group.label,")")}}const _Tt=["mat-internal-form-field",""],ATt=["*"];let DTt=(()=>{class e{static{this.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)"}static{this.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)"}static{this.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)"}static{this.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)"}}return e})(),MTt=(()=>{class e{static{this.COMPLEX="375ms"}static{this.ENTERING="225ms"}static{this.EXITING="195ms"}}return e})();const RTt=new te("mat-sanity-checks",{providedIn:"root",factory:function ITt(){return!0}});let rn=(()=>{class e{constructor(t,n,r){this._sanityChecks=n,this._document=r,this._hasDoneGlobalChecks=!1,t._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!bP()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}static{this.\u0275fac=function(n){return new(n||e)(re(nW),re(RTt,8),re(Gi))}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[jx,jx]})}}return e})();class PP{constructor(i,t,n,r,s){this._defaultMatcher=i,this.ngControl=t,this._parentFormGroup=n,this._parentForm=r,this._stateChanges=s,this.errorState=!1}updateErrorState(){const i=this.errorState,t=this._parentFormGroup||this._parentForm,n=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,s=n?.isErrorState(r,t)??!1;s!==i&&(this.errorState=s,this._stateChanges.next())}}let oW=(()=>{class e{isErrorState(t,n){return!!(t&&t.invalid&&(t.touched||n&&n.submitted))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ac=function(e){return e[e.FADING_IN=0]="FADING_IN",e[e.VISIBLE=1]="VISIBLE",e[e.FADING_OUT=2]="FADING_OUT",e[e.HIDDEN=3]="HIDDEN",e}(ac||{});class NTt{constructor(i,t,n,r=!1){this._renderer=i,this.element=t,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=ac.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}}const lW=rc({passive:!0,capture:!0});class BTt{constructor(){this._events=new Map,this._delegateEventHandler=i=>{const t=Wo(i);t&&this._events.get(i.type)?.forEach((n,r)=>{(r===t||r.contains(t))&&n.forEach(s=>s.handleEvent(i))})}}addHandler(i,t,n,r){const s=this._events.get(t);if(s){const o=s.get(n);o?o.add(r):s.set(n,new Set([r]))}else this._events.set(t,new Map([[n,new Set([r])]])),i.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,lW)})}removeHandler(i,t,n){const r=this._events.get(i);if(!r)return;const s=r.get(t);s&&(s.delete(n),0===s.size&&r.delete(t),0===r.size&&(this._events.delete(i),document.removeEventListener(i,this._delegateEventHandler,lW)))}}const cW={enterDuration:225,exitDuration:150},uW=rc({passive:!0,capture:!0}),hW=["mousedown","touchstart"],dW=["mouseup","mouseleave","touchend","touchcancel"];class Yx{static{this._eventManager=new BTt}constructor(i,t,n,r){this._target=i,this._ngZone=t,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=uo(n))}fadeInRipple(i,t,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...cW,...n.animation};n.centered&&(i=r.left+r.width/2,t=r.top+r.height/2);const o=n.radius||function UTt(e,i,t){const n=Math.max(Math.abs(e-t.left),Math.abs(e-t.right)),r=Math.max(Math.abs(i-t.top),Math.abs(i-t.bottom));return Math.sqrt(n*n+r*r)}(i,t,r),l=i-r.left,w=t-r.top,E=s.enterDuration,D=document.createElement("div");D.classList.add("mat-ripple-element"),D.style.left=l-o+"px",D.style.top=w-o+"px",D.style.height=2*o+"px",D.style.width=2*o+"px",null!=n.color&&(D.style.backgroundColor=n.color),D.style.transitionDuration=`${E}ms`,this._containerElement.appendChild(D);const k=window.getComputedStyle(D),L=k.transitionDuration,U="none"===k.transitionProperty||"0s"===L||"0s, 0s"===L||0===r.width&&0===r.height,j=new NTt(this,D,n,U);D.style.transform="scale3d(1, 1, 1)",j.state=ac.FADING_IN,n.persistent||(this._mostRecentTransientRipple=j);let W=null;return!U&&(E||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const Z=()=>{W&&(W.fallbackTimer=null),clearTimeout(st),this._finishRippleTransition(j)},rt=()=>this._destroyRipple(j),st=setTimeout(rt,E+100);D.addEventListener("transitionend",Z),D.addEventListener("transitioncancel",rt),W={onTransitionEnd:Z,onTransitionCancel:rt,fallbackTimer:st}}),this._activeRipples.set(j,W),(U||!E)&&this._finishRippleTransition(j),j}fadeOutRipple(i){if(i.state===ac.FADING_OUT||i.state===ac.HIDDEN)return;const t=i.element,n={...cW,...i.config.animation};t.style.transitionDuration=`${n.exitDuration}ms`,t.style.opacity="0",i.state=ac.FADING_OUT,(i._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(i)}fadeOutAll(){this._getActiveRipples().forEach(i=>i.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(i=>{i.config.persistent||i.fadeOut()})}setupTriggerEvents(i){const t=uo(i);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,hW.forEach(n=>{Yx._eventManager.addHandler(this._ngZone,n,t,this)}))}handleEvent(i){"mousedown"===i.type?this._onMousedown(i):"touchstart"===i.type?this._onTouchStart(i):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{dW.forEach(t=>{this._triggerElement.addEventListener(t,this,uW)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(i){i.state===ac.FADING_IN?this._startFadeOutTransition(i):i.state===ac.FADING_OUT&&this._destroyRipple(i)}_startFadeOutTransition(i){const t=i===this._mostRecentTransientRipple,{persistent:n}=i.config;i.state=ac.VISIBLE,!n&&(!t||!this._isPointerDown)&&i.fadeOut()}_destroyRipple(i){const t=this._activeRipples.get(i)??null;this._activeRipples.delete(i),this._activeRipples.size||(this._containerRect=null),i===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),i.state=ac.HIDDEN,null!==t&&(i.element.removeEventListener("transitionend",t.onTransitionEnd),i.element.removeEventListener("transitioncancel",t.onTransitionCancel),null!==t.fallbackTimer&&clearTimeout(t.fallbackTimer)),i.element.remove()}_onMousedown(i){const t=kS(i),n=this._lastTouchStartEvent&&Date.now(){!i.config.persistent&&(i.state===ac.VISIBLE||i.config.terminateOnPointerUp&&i.state===ac.FADING_IN)&&i.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const i=this._triggerElement;i&&(hW.forEach(t=>Yx._eventManager.removeHandler(t,i,this)),this._pointerUpEventsRegistered&&(dW.forEach(t=>i.removeEventListener(t,this,uW)),this._pointerUpEventsRegistered=!1))}}const NS=new te("mat-ripple-global-options");let uh=(()=>{class e{get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}constructor(t,n,r,s,o){this._elementRef=t,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new Yx(this,n,t,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,n=0,r){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,n,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...t})}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(li),pt(cr),pt(NS,8),pt(Hr,8))}}static{this.\u0275dir=me({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(n,r){2&n&&Ci("mat-ripple-unbounded",r.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0})}}return e})(),fv=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,rn]})}}return e})(),zTt=(()=>{class e{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1,this.appearance="full"}static{this.\u0275fac=function(n){return new(n||e)(pt(Hr,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(n,r){2&n&&Ci("mat-pseudo-checkbox-indeterminate","indeterminate"===r.state)("mat-pseudo-checkbox-checked","checked"===r.state)("mat-pseudo-checkbox-disabled",r.disabled)("mat-pseudo-checkbox-minimal","minimal"===r.appearance)("mat-pseudo-checkbox-full","full"===r.appearance)("_mat-animation-noopable","NoopAnimations"===r._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[Wi],decls:0,vars:0,template:function(n,r){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color, var(--mat-app-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color, var(--mat-app-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color, var(--mat-app-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0})}}return e})(),fW=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn]})}}return e})();const kP=new te("MAT_OPTION_PARENT_COMPONENT"),FP=new te("MatOptgroup");let GTt=0;class pW{constructor(i,t=!1){this.source=i,this.isUserInput=t}}let hh=(()=>{class e{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=t}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(t,n,r,s){this._element=t,this._changeDetectorRef=n,this._parent=r,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+GTt++,this.onSelectionChange=new Oe,this._stateChanges=new Fe}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(t=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}deselect(t=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}focus(t,n){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(n)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){(13===t.keyCode||32===t.keyCode)&&!co(t)&&(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=t)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new pW(this,t))}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(In),pt(kP,8),pt(FP,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-option"]],viewQuery:function(n,r){if(1&n&&ki(bTt,7),2&n){let s;He(s=We())&&(r._text=s.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(n,r){1&n&&Ut("click",function(){return r._selectViaInteraction()})("keydown",function(o){return r._handleKeydown(o)}),2&n&&(uu("id",r.id),_i("aria-selected",r.selected)("aria-disabled",r.disabled.toString()),Ci("mdc-list-item--selected",r.selected)("mat-mdc-option-multiple",r.multiple)("mat-mdc-option-active",r.active)("mdc-list-item--disabled",r.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",qe]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[vn,Wi],ngContentSelectors:TTt,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(n,r){1&n&&(nr(wTt),Ht(0,CTt,1,2,"mat-pseudo-checkbox",1),Si(1),J(2,"span",2,0),Si(4,1),et(),Ht(5,STt,1,1,"mat-pseudo-checkbox",3)(6,ETt,2,1,"span",4),ye(7,"div",5)),2&n&&(Tn(r.multiple?0:-1),ot(5),Tn(r.multiple||!r.selected||r.hideSingleSelectionIndicator?-1:5),ot(),Tn(r.group&&r.group._inert?6:-1),ot(),vt("matRippleTrigger",r._getHostElement())("matRippleDisabled",r.disabled||r.disableRipple))},dependencies:[zTt,uh],styles:['.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-app-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-app-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-app-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-app-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color)}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color);outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-app-on-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-app-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-app-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}}return e})();function mW(e,i,t){if(t.length){let n=i.toArray(),r=t.toArray(),s=0;for(let o=0;ot+n?Math.max(0,e-n+i):t}let BS=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[fv,rn,fW]})}}return e})();const vW={capture:!0},yW=["focus","mousedown","mouseenter","touchstart"],OP="mat-ripple-loader-uninitialized",LP="mat-ripple-loader-class-name",xW="mat-ripple-loader-centered",VS="mat-ripple-loader-disabled";let HTt=(()=>{class e{constructor(){this._document=Jt(Gi,{optional:!0}),this._animationMode=Jt(Hr,{optional:!0}),this._globalRippleOptions=Jt(NS,{optional:!0}),this._platform=Jt(cr),this._ngZone=Jt(li),this._hosts=new Map,this._onInteraction=t=>{const n=Wo(t);if(n instanceof HTMLElement){const r=n.closest(`[${OP}="${this._globalRippleOptions?.namespace??""}"]`);r&&this._createRipple(r)}},this._ngZone.runOutsideAngular(()=>{for(const t of yW)this._document?.addEventListener(t,this._onInteraction,vW)})}ngOnDestroy(){const t=this._hosts.keys();for(const n of t)this.destroyRipple(n);for(const n of yW)this._document?.removeEventListener(n,this._onInteraction,vW)}configureRipple(t,n){t.setAttribute(OP,this._globalRippleOptions?.namespace??""),(n.className||!t.hasAttribute(LP))&&t.setAttribute(LP,n.className||""),n.centered&&t.setAttribute(xW,""),n.disabled&&t.setAttribute(VS,"")}getRipple(t){return this._hosts.get(t)||this._createRipple(t)}setDisabled(t,n){const r=this._hosts.get(t);r?r.disabled=n:n?t.setAttribute(VS,""):t.removeAttribute(VS)}_createRipple(t){if(!this._document)return;const n=this._hosts.get(t);if(n)return n;t.querySelector(".mat-ripple")?.remove();const r=this._document.createElement("span");r.classList.add("mat-ripple",t.getAttribute(LP)),t.append(r);const s=new uh(new ai(r),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return s._isInitialized=!0,s.trigger=t,s.centered=t.hasAttribute(xW),s.disabled=t.hasAttribute(VS),this.attachRipple(t,s),s}attachRipple(t,n){t.removeAttribute(OP),this._hosts.set(t,n)}destroyRipple(t){const n=this._hosts.get(t);n&&(n.ngOnDestroy(),this._hosts.delete(t))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),NP=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(n,r){2&n&&Ci("mdc-form-field--align-end","before"===r.labelPosition)},inputs:{labelPosition:"labelPosition"},standalone:!0,features:[Wi],attrs:_Tt,ngContentSelectors:ATt,decls:1,vars:0,template:function(n,r){1&n&&(nr(),Si(0))},styles:[".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}"],encapsulation:2,changeDetection:0})}}return e})();const bW=["mat-button",""],wW=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],TW=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],CW=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}",jTt=["mat-icon-button",""],XTt=["*"],YTt=new te("MAT_BUTTON_CONFIG"),$Tt=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}];let BP=(()=>{class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(t){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,t)}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=t,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._updateRippleDisabled()}constructor(t,n,r,s){this._elementRef=t,this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Jt(sc),this._rippleLoader=Jt(HTt),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;const o=Jt(YTt,{optional:!0}),l=t.nativeElement,w=l.classList;this.disabledInteractive=o?.disabledInteractive??!1,this.color=o?.color??null,this._rippleLoader?.configureRipple(l,{className:"mat-mdc-button-ripple"});for(const{attribute:E,mdcClasses:D}of $Tt)l.hasAttribute(E)&&w.add(...D)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(t="program",n){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,n):this._elementRef.nativeElement.focus(n)}_getAriaDisabled(){return null!=this.ariaDisabled?this.ariaDisabled:!(!this.disabled||!this.disabledInteractive)||null}_getDisabledAttribute(){return!(this.disabledInteractive||!this.disabled)||null}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}static{this.\u0275fac=function(n){RT()}}static{this.\u0275dir=me({type:e,inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",qe],disabled:[2,"disabled","disabled",qe],ariaDisabled:[2,"aria-disabled","ariaDisabled",qe],disabledInteractive:[2,"disabledInteractive","disabledInteractive",qe]},features:[vn]})}}return e})(),QTt=(()=>{class e extends BP{constructor(t,n,r,s){super(t,n,r,s),this._haltDisabledEvents=o=>{this.disabled&&(o.preventDefault(),o.stopImmediatePropagation())}}ngOnInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)})}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}_getAriaDisabled(){return null!=this.ariaDisabled?this.ariaDisabled:this.disabled||null}static{this.\u0275fac=function(n){RT()}}static{this.\u0275dir=me({type:e,inputs:{tabIndex:[2,"tabIndex","tabIndex",t=>null==t?void 0:jr(t)]},features:[vn,yi]})}}return e})(),Cs=(()=>{class e extends BP{constructor(t,n,r,s){super(t,n,r,s)}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(cr),pt(li),pt(Hr,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(n,r){2&n&&(_i("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),oo(r.color?"mat-"+r.color:""),Ci("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[yi,Wi],attrs:bW,ngContentSelectors:TW,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){1&n&&(nr(wW),ye(0,"span",0),Si(1),J(2,"span",1),Si(3,1),et(),Si(4,2),ye(5,"span",2)(6,"span",3)),2&n&&Ci("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:['.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 8px);height:var(--mdc-text-button-container-height);font-family:var(--mdc-text-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-app-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-filled-button-horizontal-padding, 16px);height:var(--mdc-filled-button-container-height);font-family:var(--mdc-filled-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-app-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-app-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-app-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-app-level1));height:var(--mdc-protected-button-container-height);font-family:var(--mdc-protected-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-app-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-app-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-app-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-app-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-app-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-app-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-outlined-button-horizontal-padding, 15px);height:var(--mdc-outlined-button-container-height);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-app-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-app-corner-full));border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-app-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-app-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}}return e})(),KTt=(()=>{class e extends QTt{constructor(t,n,r,s){super(t,n,r,s)}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(cr),pt(li),pt(Hr,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostVars:15,hostBindings:function(n,r){2&n&&(_i("disabled",r._getDisabledAttribute())("tabindex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex)("aria-disabled",r._getAriaDisabled()),oo(r.color?"mat-"+r.color:""),Ci("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton","matAnchor"],standalone:!0,features:[yi,Wi],attrs:bW,ngContentSelectors:TW,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){1&n&&(nr(wW),ye(0,"span",0),Si(1),J(2,"span",1),Si(3,1),et(),Si(4,2),ye(5,"span",2)(6,"span",3)),2&n&&Ci("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:['.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 8px);height:var(--mdc-text-button-container-height);font-family:var(--mdc-text-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-app-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-filled-button-horizontal-padding, 16px);height:var(--mdc-filled-button-container-height);font-family:var(--mdc-filled-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-app-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-app-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-app-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-app-level1));height:var(--mdc-protected-button-container-height);font-family:var(--mdc-protected-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-app-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-app-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-app-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-app-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-app-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-app-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-outlined-button-horizontal-padding, 15px);height:var(--mdc-outlined-button-container-height);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-app-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-app-corner-full));border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-app-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-app-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',CW],encapsulation:2,changeDetection:0})}}return e})(),jo=(()=>{class e extends BP{constructor(t,n,r,s){super(t,n,r,s),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(cr),pt(li),pt(Hr,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(n,r){2&n&&(_i("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),oo(r.color?"mat-"+r.color:""),Ci("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[yi,Wi],attrs:jTt,ngContentSelectors:XTt,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){1&n&&(nr(),ye(0,"span",0),Si(1),ye(2,"span",1)(3,"span",2))},styles:['.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 48px);height:var(--mdc-icon-button-state-layer-size, 48px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 48px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size);color:var(--mdc-icon-button-icon-color, var(--mat-app-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',CW],encapsulation:2,changeDetection:0})}}return e})(),VP=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,fv,rn]})}}return e})();var sn=function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e}(sn||{});const dh="*";function xr(e,i){return{type:sn.Trigger,name:e,definitions:i,options:{}}}function mn(e,i=null){return{type:sn.Animate,styles:i,timings:e}}function UP(e,i=null){return{type:sn.Group,steps:e,options:i}}function oi(e){return{type:sn.Style,styles:e,offset:null}}function Bn(e,i,t){return{type:sn.State,name:e,styles:i,options:t}}function pv(e){return{type:sn.Keyframes,steps:e}}function gn(e,i,t=null){return{type:sn.Transition,expr:e,animation:i,options:t}}function US(e=null){return{type:sn.AnimateChild,options:e}}function zS(e,i,t=null){return{type:sn.Query,selector:e,animation:i,options:t}}class $x{constructor(i=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=i+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){const t="start"==i?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}}class SW{constructor(i){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=i;let t=0,n=0,r=0;const s=this.players.length;0==s?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==s&&this._onFinish()}),o.onDestroy(()=>{++n==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,l)=>Math.max(o,l.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){const t=i*this.totalTime;this.players.forEach(n=>{const r=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(r)})}getPosition(){const i=this.players.reduce((t,n)=>null===t||n.totalTime>t.totalTime?n:t,null);return null!=i?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){const t="start"==i?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}}class GP{attach(i){return this._attachedHost=i,i.attach(this)}detach(){let i=this._attachedHost;null!=i&&(this._attachedHost=null,i.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(i){this._attachedHost=i}}class mv extends GP{constructor(i,t,n,r,s){super(),this.component=i,this.viewContainerRef=t,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=s}}class fh extends GP{constructor(i,t,n,r){super(),this.templateRef=i,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(i,t=this.context){return this.context=t,super.attach(i)}detach(){return this.context=void 0,super.detach()}}class nCt extends GP{constructor(i){super(),this.element=i instanceof ai?i.nativeElement:i}}class GS{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(i){return i instanceof mv?(this._attachedPortal=i,this.attachComponentPortal(i)):i instanceof fh?(this._attachedPortal=i,this.attachTemplatePortal(i)):this.attachDomPortal&&i instanceof nCt?(this._attachedPortal=i,this.attachDomPortal(i)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(i){this._disposeFn=i}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class rCt extends GS{constructor(i,t,n,r,s){super(),this.outletElement=i,this._componentFactoryResolver=t,this._appRef=n,this._defaultInjector=r,this.attachDomPortal=o=>{const l=o.element,w=this._document.createComment("dom-portal");l.parentNode.insertBefore(w,l),this.outletElement.appendChild(l),this._attachedPortal=o,super.setDisposeFn(()=>{w.parentNode&&w.parentNode.replaceChild(l,w)})},this._document=s}attachComponentPortal(i){const n=(i.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(i.component);let r;return i.viewContainerRef?(r=i.viewContainerRef.createComponent(n,i.viewContainerRef.length,i.injector||i.viewContainerRef.injector,i.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=n.create(i.injector||this._defaultInjector||On.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=i,r}attachTemplatePortal(i){let t=i.viewContainerRef,n=t.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);-1!==r&&t.remove(r)}),this._attachedPortal=i,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(i){return i.hostView.rootNodes[0]}}let sCt=(()=>{class e extends fh{constructor(t,n){super(t,n)}static{this.\u0275fac=function(n){return new(n||e)(pt(yr),pt(Or))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],standalone:!0,features:[yi]})}}return e})(),ph=(()=>{class e extends GS{constructor(t,n,r){super(),this._componentFactoryResolver=t,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new Oe,this.attachDomPortal=s=>{const o=s.element,l=this._document.createComment("dom-portal");s.setAttachedHost(this),o.parentNode.insertBefore(l,o),this._getRootNode().appendChild(o),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(o,l)})},this._document=r}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);const n=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,s=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),o=n.createComponent(s,n.length,t.injector||n.injector,t.projectableNodes||void 0);return n!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(t){t.setAttachedHost(this);const n=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=n,this.attached.emit(n),n}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}static{this.\u0275fac=function(n){return new(n||e)(pt(Qf),pt(Or),pt(Gi))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[yi]})}}return e})(),gv=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({})}}return e})();const aCt=["addListener","removeListener"],oCt=["addEventListener","removeEventListener"],lCt=["on","off"];function Bc(e,i,t,n){if(ae(t)&&(n=t,t=void 0),n)return Bc(e,i,t).pipe(LR(n));const[r,s]=function hCt(e){return ae(e.addEventListener)&&ae(e.removeEventListener)}(e)?oCt.map(o=>l=>e[o](i,l,t)):function cCt(e){return ae(e.addListener)&&ae(e.removeListener)}(e)?aCt.map(EW(e,i)):function uCt(e){return ae(e.on)&&ae(e.off)}(e)?lCt.map(EW(e,i)):[];if(!r&&FR(e))return Da(o=>Bc(o,i,t))(lo(e));if(!r)throw new TypeError("Invalid event target");return new dr(o=>{const l=(...w)=>o.next(1s(l)})}function EW(e,i){return t=>n=>e[t](i,n)}const Qx={schedule(e){let i=requestAnimationFrame,t=cancelAnimationFrame;const{delegate:n}=Qx;n&&(i=n.requestAnimationFrame,t=n.cancelAnimationFrame);const r=i(s=>{t=void 0,e(s)});return new Pe(()=>t?.(r))},requestAnimationFrame(...e){const{delegate:i}=Qx;return(i?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){const{delegate:i}=Qx;return(i?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},_W=new class fCt extends CP{flush(i){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let r;i=i||n.shift();do{if(r=i.execute(i.state,i.delay))break}while((i=n[0])&&i.id===t&&n.shift());if(this._active=!1,r){for(;(i=n[0])&&i.id===t&&n.shift();)i.unsubscribe();throw r}}}(class dCt extends TP{constructor(i,t){super(i,t),this.scheduler=i,this.work=t}requestAsyncId(i,t,n=0){return null!==n&&n>0?super.requestAsyncId(i,t,n):(i.actions.push(this),i._scheduled||(i._scheduled=Qx.requestAnimationFrame(()=>i.flush(void 0))))}recycleAsyncId(i,t,n=0){var r;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(i,t,n);const{actions:s}=i;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(Qx.cancelAnimationFrame(t),i._scheduled=void 0)}});let HP,pCt=1;const HS={};function AW(e){return e in HS&&(delete HS[e],!0)}const mCt={setImmediate(e){const i=pCt++;return HS[i]=!0,HP||(HP=Promise.resolve()),HP.then(()=>AW(i)&&e()),i},clearImmediate(e){AW(e)}},{setImmediate:gCt,clearImmediate:vCt}=mCt,WS={setImmediate(...e){const{delegate:i}=WS;return(i?.setImmediate||gCt)(...e)},clearImmediate(e){const{delegate:i}=WS;return(i?.clearImmediate||vCt)(e)},delegate:void 0},WP=new class xCt extends CP{flush(i){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let r;i=i||n.shift();do{if(r=i.execute(i.state,i.delay))break}while((i=n[0])&&i.id===t&&n.shift());if(this._active=!1,r){for(;(i=n[0])&&i.id===t&&n.shift();)i.unsubscribe();throw r}}}(class yCt extends TP{constructor(i,t){super(i,t),this.scheduler=i,this.work=t}requestAsyncId(i,t,n=0){return null!==n&&n>0?super.requestAsyncId(i,t,n):(i.actions.push(this),i._scheduled||(i._scheduled=WS.setImmediate(i.flush.bind(i,void 0))))}recycleAsyncId(i,t,n=0){var r;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(i,t,n);const{actions:s}=i;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(WS.clearImmediate(t),i._scheduled===t&&(i._scheduled=void 0))}});function Kx(e=0,i,t=Uwt){let n=-1;return null!=i&&(QG(i)?t=i:n=i),new dr(r=>{let s=function wCt(e){return e instanceof Date&&!isNaN(e)}(e)?+e-t.now():e;s<0&&(s=0);let o=0;return t.schedule(function(){r.closed||(r.next(o++),0<=n?this.schedule(void 0,n):r.complete())},s)})}function DW(e,i=Hx){return function bCt(e){return gs((i,t)=>{let n=!1,r=null,s=null,o=!1;const l=()=>{if(s?.unsubscribe(),s=null,n){n=!1;const E=r;r=null,t.next(E)}o&&t.complete()},w=()=>{s=null,o&&t.complete()};i.subscribe(Zr(t,E=>{n=!0,r=E,s||lo(e(E)).subscribe(s=Zr(t,l,w))},()=>{o=!0,(!n||!s||s.closed)&&t.complete()}))})}(()=>Kx(e,i))}let Zx=(()=>{class e{constructor(t,n,r){this._ngZone=t,this._platform=n,this._scrolled=new Fe,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const n=this.scrollContainers.get(t);n&&(n.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new dr(n=>{this._globalSubscription||this._addGlobalListener();const r=t>0?this._scrolled.pipe(DW(t)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):wi()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(t,n){const r=this.getAncestorScrollContainers(t);return this.scrolled(n).pipe(Ln(s=>!s||r.indexOf(s)>-1))}getAncestorScrollContainers(t){const n=[];return this.scrollContainers.forEach((r,s)=>{this._scrollableContainsElement(s,t)&&n.push(s)}),n}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,n){let r=uo(n),s=t.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Bc(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static{this.\u0275fac=function(n){return new(n||e)(re(li),re(cr),re(Gi,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Jx=(()=>{class e{constructor(t,n,r,s){this.elementRef=t,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Fe,this._elementScrolled=new dr(o=>this.ngZone.runOutsideAngular(()=>Bc(this.elementRef.nativeElement,"scroll").pipe(Yi(this._destroyed)).subscribe(o)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){const n=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=r?t.end:t.start),null==t.right&&(t.right=r?t.start:t.end),null!=t.bottom&&(t.top=n.scrollHeight-n.clientHeight-t.bottom),r&&Ux()!=gu.NORMAL?(null!=t.left&&(t.right=n.scrollWidth-n.clientWidth-t.left),Ux()==gu.INVERTED?t.left=t.right:Ux()==gu.NEGATED&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=n.scrollWidth-n.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const n=this.elementRef.nativeElement;P7()?n.scrollTo(t):(null!=t.top&&(n.scrollTop=t.top),null!=t.left&&(n.scrollLeft=t.left))}measureScrollOffset(t){const n="left",r="right",s=this.elementRef.nativeElement;if("top"==t)return s.scrollTop;if("bottom"==t)return s.scrollHeight-s.clientHeight-s.scrollTop;const o=this.dir&&"rtl"==this.dir.value;return"start"==t?t=o?r:n:"end"==t&&(t=o?n:r),o&&Ux()==gu.INVERTED?t==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&Ux()==gu.NEGATED?t==n?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:t==n?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(Zx),pt(li),pt(Ya,8))}}static{this.\u0275dir=me({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0})}}return e})(),mh=(()=>{class e{constructor(t,n,r){this._platform=t,this._change=new Fe,this._changeListener=s=>{this._change.next(s)},this._document=r,n.runOutsideAngular(()=>{if(t.isBrowser){const s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:n,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+n,height:r,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,n=this._getWindow(),r=t.documentElement,s=r.getBoundingClientRect();return{top:-s.top||t.body.scrollTop||n.scrollY||r.scrollTop||0,left:-s.left||t.body.scrollLeft||n.scrollX||r.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(DW(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static{this.\u0275fac=function(n){return new(n||e)(re(cr),re(li),re(Gi,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),gh=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({})}}return e})(),jP=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[jx,gh,jx,gh]})}}return e})();function MW(e,i=!1){return gs((t,n)=>{let r=0;t.subscribe(Zr(n,s=>{const o=e(s,r++);(o||i)&&n.next(s),!o&&n.complete()}))})}function qr(...e){const i=bx(e),t=function cxt(e,i){return"number"==typeof OR(e)?e.pop():i}(e,1/0),n=e;return n.length?1===n.length?lo(n[0]):Yg(t)(Zs(n,i)):al}const IW=P7();class SCt{constructor(i,t){this._viewportRuler=i,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){const i=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=i.style.left||"",this._previousHTMLStyles.top=i.style.top||"",i.style.left=qs(-this._previousScrollPosition.left),i.style.top=qs(-this._previousScrollPosition.top),i.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const i=this._document.documentElement,n=i.style,r=this._document.body.style,s=n.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,i.classList.remove("cdk-global-scrollblock"),IW&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),IW&&(n.scrollBehavior=s,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,n=this._viewportRuler.getViewportSize();return t.scrollHeight>n.height||t.scrollWidth>n.width}}class ECt{constructor(i,t,n,r){this._scrollDispatcher=i,this._ngZone=t,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(i){this._overlayRef=i}enable(){if(this._scrollSubscription)return;const i=this._scrollDispatcher.scrolled(0).pipe(Ln(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=i.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=i.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class RW{enable(){}disable(){}attach(){}}function XP(e,i){return i.some(t=>e.bottomt.bottom||e.rightt.right)}function PW(e,i){return i.some(t=>e.topt.bottom||e.leftt.right)}class _Ct{constructor(i,t,n,r){this._scrollDispatcher=i,this._viewportRuler=t,this._ngZone=n,this._config=r,this._scrollSubscription=null}attach(i){this._overlayRef=i}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();XP(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let ACt=(()=>{class e{constructor(t,n,r,s){this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new RW,this.close=o=>new ECt(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new SCt(this._viewportRuler,this._document),this.reposition=o=>new _Ct(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}static{this.\u0275fac=function(n){return new(n||e)(re(Zx),re(mh),re(li),re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();class vv{constructor(i){if(this.scrollStrategy=new RW,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,i){const t=Object.keys(i);for(const n of t)void 0!==i[n]&&(this[n]=i[n])}}}class DCt{constructor(i,t){this.connectionPair=i,this.scrollableViewProperties=t}}let kW=(()=>{class e{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const n=this._attachedOverlays.indexOf(t);n>-1&&this._attachedOverlays.splice(n,1),0===this._attachedOverlays.length&&this.detach()}static{this.\u0275fac=function(n){return new(n||e)(re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),MCt=(()=>{class e extends kW{constructor(t,n){super(t),this._ngZone=n,this._keydownListener=r=>{const s=this._attachedOverlays;for(let o=s.length-1;o>-1;o--)if(s[o]._keydownEvents.observers.length>0){const l=s[o]._keydownEvents;this._ngZone?this._ngZone.run(()=>l.next(r)):l.next(r);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static{this.\u0275fac=function(n){return new(n||e)(re(Gi),re(li,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),ICt=(()=>{class e extends kW{constructor(t,n,r){super(t),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=Wo(s)},this._clickListener=s=>{const o=Wo(s),l="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:o;this._pointerDownEventTarget=null;const w=this._attachedOverlays.slice();for(let E=w.length-1;E>-1;E--){const D=w[E];if(D._outsidePointerEvents.observers.length<1||!D.hasAttached())continue;if(FW(D.overlayElement,o)||FW(D.overlayElement,l))break;const k=D._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>k.next(s)):k.next(s)}}}add(t){if(super.add(t),!this._isAttached){const n=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(n)):this._addEventListeners(n),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}static{this.\u0275fac=function(n){return new(n||e)(re(Gi),re(cr),re(li,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function FW(e,i){const t=typeof ShadowRoot<"u"&&ShadowRoot;let n=i;for(;n;){if(n===e)return!0;n=t&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}let jS=(()=>{class e{constructor(t,n){this._platform=n,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||bP()){const r=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let s=0;sthis._backdropClick.next(O),this._backdropTransitionendHandler=O=>{this._disposeBackdrop(O.target)},this._keydownEvents=new Fe,this._outsidePointerEvents=new Fe,this._renders=new Fe,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=kc(()=>o2(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(i){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const t=this._portalOutlet.attach(i);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=ao(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof t?.onDestroy&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const i=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),i}dispose(){const i=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=null,i&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(i){i!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=i,this.hasAttached()&&(i.attach(this),this.updatePosition()))}updateSize(i){this._config={...this._config,...i},this._updateElementSize()}setDirection(i){this._config={...this._config,direction:i},this._updateElementDirection()}addPanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!0)}removePanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!1)}getDirection(){const i=this._config.direction;return i?"string"==typeof i?i:i.value:"ltr"}updateScrollStrategy(i){i!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=i,this.hasAttached()&&(i.attach(this),i.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const i=this._pane.style;i.width=qs(this._config.width),i.height=qs(this._config.height),i.minWidth=qs(this._config.minWidth),i.minHeight=qs(this._config.minHeight),i.maxWidth=qs(this._config.maxWidth),i.maxHeight=qs(this._config.maxHeight)}_togglePointerEvents(i){this._pane.style.pointerEvents=i?"":"none"}_attachBackdrop(){const i="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(i)})}):this._backdropElement.classList.add(i)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const i=this._backdropElement;if(i){if(this._animationsDisabled)return void this._disposeBackdrop(i);i.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{i.addEventListener("transitionend",this._backdropTransitionendHandler)}),i.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(i)},500))}}_toggleClasses(i,t,n){const r=Wx(t||[]).filter(s=>!!s);r.length&&(n?i.classList.add(...r):i.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{const i=this._renders.pipe(Yi(qr(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),i.unsubscribe())})})}_disposeScrollStrategy(){const i=this._scrollStrategy;i&&(i.disable(),i.detach&&i.detach())}_disposeBackdrop(i){i&&(i.removeEventListener("click",this._backdropClickHandler),i.removeEventListener("transitionend",this._backdropTransitionendHandler),i.remove(),this._backdropElement===i&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const OW="cdk-overlay-connected-position-bounding-box",RCt=/([A-Za-z%]+)$/;class PCt{get positions(){return this._preferredPositions}constructor(i,t,n,r,s){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=s,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Fe,this._resizeSubscription=Pe.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(i)}attach(i){this._validatePositions(),i.hostElement.classList.add(OW),this._overlayRef=i,this._boundingBox=i.hostElement,this._pane=i.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const i=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,s=[];let o;for(let l of this._preferredPositions){let w=this._getOriginPoint(i,r,l),E=this._getOverlayPoint(w,t,l),D=this._getOverlayFit(E,t,n,l);if(D.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(l,w);this._canFitWithFlexibleDimensions(D,E,n)?s.push({position:l,origin:w,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(w,l)}):(!o||o.overlayFit.visibleAreaw&&(w=D,l=E)}return this._isPushed=!1,void this._applyPosition(l.position,l.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(o.position,o.originPoint);this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&yp(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(OW),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const i=this._lastPosition;if(i){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._getOriginPoint(this._originRect,this._containerRect,i);this._applyPosition(i,t)}else this.apply()}withScrollableContainers(i){return this._scrollables=i,this}withPositions(i){return this._preferredPositions=i,-1===i.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(i){return this._viewportMargin=i,this}withFlexibleDimensions(i=!0){return this._hasFlexibleDimensions=i,this}withGrowAfterOpen(i=!0){return this._growAfterOpen=i,this}withPush(i=!0){return this._canPush=i,this}withLockedPosition(i=!0){return this._positionLocked=i,this}setOrigin(i){return this._origin=i,this}withDefaultOffsetX(i){return this._offsetX=i,this}withDefaultOffsetY(i){return this._offsetY=i,this}withTransformOriginOn(i){return this._transformOriginSelector=i,this}_getOriginPoint(i,t,n){let r,s;if("center"==n.originX)r=i.left+i.width/2;else{const o=this._isRtl()?i.right:i.left,l=this._isRtl()?i.left:i.right;r="start"==n.originX?o:l}return t.left<0&&(r-=t.left),s="center"==n.originY?i.top+i.height/2:"top"==n.originY?i.top:i.bottom,t.top<0&&(s-=t.top),{x:r,y:s}}_getOverlayPoint(i,t,n){let r,s;return r="center"==n.overlayX?-t.width/2:"start"===n.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,s="center"==n.overlayY?-t.height/2:"top"==n.overlayY?0:-t.height,{x:i.x+r,y:i.y+s}}_getOverlayFit(i,t,n,r){const s=NW(t);let{x:o,y:l}=i,w=this._getOffset(r,"x"),E=this._getOffset(r,"y");w&&(o+=w),E&&(l+=E);let O=0-l,L=l+s.height-n.height,U=this._subtractOverflows(s.width,0-o,o+s.width-n.width),j=this._subtractOverflows(s.height,O,L),W=U*j;return{visibleArea:W,isCompletelyWithinViewport:s.width*s.height===W,fitsInViewportVertically:j===s.height,fitsInViewportHorizontally:U==s.width}}_canFitWithFlexibleDimensions(i,t,n){if(this._hasFlexibleDimensions){const r=n.bottom-t.y,s=n.right-t.x,o=LW(this._overlayRef.getConfig().minHeight),l=LW(this._overlayRef.getConfig().minWidth);return(i.fitsInViewportVertically||null!=o&&o<=r)&&(i.fitsInViewportHorizontally||null!=l&&l<=s)}return!1}_pushOverlayOnScreen(i,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:i.x+this._previousPushAmount.x,y:i.y+this._previousPushAmount.y};const r=NW(t),s=this._viewportRect,o=Math.max(i.x+r.width-s.width,0),l=Math.max(i.y+r.height-s.height,0),w=Math.max(s.top-n.top-i.y,0),E=Math.max(s.left-n.left-i.x,0);let D=0,k=0;return D=r.width<=s.width?E||-o:i.xU&&!this._isInitialRender&&!this._growAfterOpen&&(o=i.y-U/2)}if("end"===t.overlayX&&!r||"start"===t.overlayX&&r)O=n.width-i.x+2*this._viewportMargin,D=i.x-this._viewportMargin;else if("start"===t.overlayX&&!r||"end"===t.overlayX&&r)k=i.x,D=n.right-i.x;else{const L=Math.min(n.right-i.x+n.left,i.x),U=this._lastBoundingBoxSize.width;D=2*L,k=i.x-L,D>U&&!this._isInitialRender&&!this._growAfterOpen&&(k=i.x-U/2)}return{top:o,left:k,bottom:l,right:O,width:D,height:s}}_setBoundingBoxStyles(i,t){const n=this._calculateBoundingBoxRect(i,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=qs(n.height),r.top=qs(n.top),r.bottom=qs(n.bottom),r.width=qs(n.width),r.left=qs(n.left),r.right=qs(n.right),r.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",r.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",s&&(r.maxHeight=qs(s)),o&&(r.maxWidth=qs(o))}this._lastBoundingBoxSize=n,yp(this._boundingBox.style,r)}_resetBoundingBoxStyles(){yp(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){yp(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(i,t){const n={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){const D=this._viewportRuler.getViewportScrollPosition();yp(n,this._getExactOverlayY(t,i,D)),yp(n,this._getExactOverlayX(t,i,D))}else n.position="static";let l="",w=this._getOffset(t,"x"),E=this._getOffset(t,"y");w&&(l+=`translateX(${w}px) `),E&&(l+=`translateY(${E}px)`),n.transform=l.trim(),o.maxHeight&&(r?n.maxHeight=qs(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=qs(o.maxWidth):s&&(n.maxWidth="")),yp(this._pane.style,n)}_getExactOverlayY(i,t,n){let r={top:"",bottom:""},s=this._getOverlayPoint(t,this._overlayRect,i);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,n)),"bottom"===i.overlayY?r.bottom=this._document.documentElement.clientHeight-(s.y+this._overlayRect.height)+"px":r.top=qs(s.y),r}_getExactOverlayX(i,t,n){let o,r={left:"",right:""},s=this._getOverlayPoint(t,this._overlayRect,i);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,n)),o=this._isRtl()?"end"===i.overlayX?"left":"right":"end"===i.overlayX?"right":"left","right"===o?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=qs(s.x),r}_getScrollVisibility(){const i=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:PW(i,n),isOriginOutsideView:XP(i,n),isOverlayClipped:PW(t,n),isOverlayOutsideView:XP(t,n)}}_subtractOverflows(i,...t){return t.reduce((n,r)=>n-Math.max(r,0),i)}_getNarrowedViewportRect(){const i=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+i-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:i-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(i,t){return"x"===t?null==i.offsetX?this._offsetX:i.offsetX:null==i.offsetY?this._offsetY:i.offsetY}_validatePositions(){}_addPanelClasses(i){this._pane&&Wx(i).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(i=>{this._pane.classList.remove(i)}),this._appliedPanelClasses=[])}_getOriginRect(){const i=this._origin;if(i instanceof ai)return i.nativeElement.getBoundingClientRect();if(i instanceof Element)return i.getBoundingClientRect();const t=i.width||0,n=i.height||0;return{top:i.y,bottom:i.y+n,left:i.x,right:i.x+t,height:n,width:t}}}function yp(e,i){for(let t in i)i.hasOwnProperty(t)&&(e[t]=i[t]);return e}function LW(e){if("number"!=typeof e&&null!=e){const[i,t]=e.split(RCt);return t&&"px"!==t?null:parseFloat(i)}return e||null}function NW(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}const BW="cdk-global-overlay-wrapper";class FCt{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(i){const t=i.getConfig();this._overlayRef=i,this._width&&!t.width&&i.updateSize({width:this._width}),this._height&&!t.height&&i.updateSize({height:this._height}),i.hostElement.classList.add(BW),this._isDisposed=!1}top(i=""){return this._bottomOffset="",this._topOffset=i,this._alignItems="flex-start",this}left(i=""){return this._xOffset=i,this._xPosition="left",this}bottom(i=""){return this._topOffset="",this._bottomOffset=i,this._alignItems="flex-end",this}right(i=""){return this._xOffset=i,this._xPosition="right",this}start(i=""){return this._xOffset=i,this._xPosition="start",this}end(i=""){return this._xOffset=i,this._xPosition="end",this}width(i=""){return this._overlayRef?this._overlayRef.updateSize({width:i}):this._width=i,this}height(i=""){return this._overlayRef?this._overlayRef.updateSize({height:i}):this._height=i,this}centerHorizontally(i=""){return this.left(i),this._xPosition="center",this}centerVertically(i=""){return this.top(i),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const i=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:o,maxHeight:l}=n,w=!("100%"!==r&&"100vw"!==r||o&&"100%"!==o&&"100vw"!==o),E=!("100%"!==s&&"100vh"!==s||l&&"100%"!==l&&"100vh"!==l),D=this._xPosition,k=this._xOffset,O="rtl"===this._overlayRef.getConfig().direction;let L="",U="",j="";w?j="flex-start":"center"===D?(j="center",O?U=k:L=k):O?"left"===D||"end"===D?(j="flex-end",L=k):("right"===D||"start"===D)&&(j="flex-start",U=k):"left"===D||"start"===D?(j="flex-start",L=k):("right"===D||"end"===D)&&(j="flex-end",U=k),i.position=this._cssPosition,i.marginLeft=w?"0":L,i.marginTop=E?"0":this._topOffset,i.marginBottom=this._bottomOffset,i.marginRight=w?"0":U,t.justifyContent=j,t.alignItems=E?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const i=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(BW),n.justifyContent=n.alignItems=i.marginTop=i.marginBottom=i.marginLeft=i.marginRight=i.position="",this._overlayRef=null,this._isDisposed=!0}}let OCt=(()=>{class e{constructor(t,n,r,s){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new FCt}flexibleConnectedTo(t){return new PCt(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static{this.\u0275fac=function(n){return new(n||e)(re(mh),re(Gi),re(cr),re(jS))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),LCt=0,Ss=(()=>{class e{constructor(t,n,r,s,o,l,w,E,D,k,O,L){this.scrollStrategies=t,this._overlayContainer=n,this._componentFactoryResolver=r,this._positionBuilder=s,this._keyboardDispatcher=o,this._injector=l,this._ngZone=w,this._document=E,this._directionality=D,this._location=k,this._outsideClickDispatcher=O,this._animationsModuleType=L}create(t){const n=this._createHostElement(),r=this._createPaneElement(n),s=this._createPortalOutlet(r),o=new vv(t);return o.direction=o.direction||this._directionality.value,new XS(s,n,r,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType,this._injector.get(za))}position(){return this._positionBuilder}_createPaneElement(t){const n=this._document.createElement("div");return n.id="cdk-overlay-"+LCt++,n.classList.add("cdk-overlay-pane"),t.appendChild(n),n}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(ql)),new rCt(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static{this.\u0275fac=function(n){return new(n||e)(re(ACt),re(jS),re(Qf),re(OCt),re(MCt),re(On),re(li),re(Gi),re(Ya),re(ap),re(ICt),re(Hr,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const NCt=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],VW=new te("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{const e=Jt(Ss);return()=>e.scrollStrategies.reposition()}});let YS=(()=>{class e{constructor(t){this.elementRef=t}static{this.\u0275fac=function(n){return new(n||e)(pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0})}}return e})(),UW=(()=>{class e{get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(t){this._disposeOnNavigation=t}constructor(t,n,r,s,o){this._overlay=t,this._dir=o,this._backdropSubscription=Pe.EMPTY,this._attachSubscription=Pe.EMPTY,this._detachSubscription=Pe.EMPTY,this._positionSubscription=Pe.EMPTY,this._disposeOnNavigation=!1,this._ngZone=Jt(li),this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new Oe,this.positionChange=new Oe,this.attach=new Oe,this.detach=new Oe,this.overlayKeydown=new Oe,this.overlayOutsideClick=new Oe,this._templatePortal=new fh(n,r),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=NCt);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(n=>{this.overlayKeydown.next(n),27===n.keyCode&&!this.disableClose&&!co(n)&&(n.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(n=>{const r=this._getOriginElement(),s=Wo(n);(!r||r!==s&&!r.contains(s))&&this.overlayOutsideClick.next(n)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),n=new vv({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||0===this.width)&&(n.width=this.width),(this.height||0===this.height)&&(n.height=this.height),(this.minWidth||0===this.minWidth)&&(n.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(n.minHeight=this.minHeight),this.backdropClass&&(n.backdropClass=this.backdropClass),this.panelClass&&(n.panelClass=this.panelClass),n}_updatePositionStrategy(t){const n=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return t.setOrigin(this._getOrigin()).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this._getOrigin());return this._updatePositionStrategy(t),t}_getOrigin(){return this.origin instanceof YS?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof YS?this.origin.elementRef.nativeElement:this.origin instanceof ai?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(MW(()=>this.positionChange.observers.length>0)).subscribe(t=>{this._ngZone.run(()=>this.positionChange.emit(t)),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}static{this.\u0275fac=function(n){return new(n||e)(pt(Ss),pt(yr),pt(Or),pt(VW),pt(Ya,8))}}static{this.\u0275dir=me({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",qe],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",qe],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",qe],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",qe],push:[2,"cdkConnectedOverlayPush","push",qe],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",qe]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[vn,lr]})}}return e})();const VCt={provide:VW,deps:[Ss],useFactory:function BCt(e){return()=>e.scrollStrategies.reposition()}};let xp=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[Ss,VCt],imports:[jx,gv,jP,jP]})}}return e})();function UCt(e,i){if(1&e){const t=xe();J(0,"div",1)(1,"button",2),Ut("click",function(){return zt(t),Gt(St().action())}),ut(2),et()()}if(2&e){const t=St();ot(2),Je(" ",t.data.action," ")}}const zCt=["label"];function GCt(e,i){}const HCt=Math.pow(2,31)-1;class $S{constructor(i,t){this._overlayRef=t,this._afterDismissed=new Fe,this._afterOpened=new Fe,this._onAction=new Fe,this._dismissedByAction=!1,this.containerInstance=i,i._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(i){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(i,HCt))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}const YP=new te("MatSnackBarData");class QS{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let zW=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0})}}return e})(),GW=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0})}}return e})(),HW=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0})}}return e})(),WW=(()=>{class e{constructor(t,n){this.snackBarRef=t,this.data=n}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static{this.\u0275fac=function(n){return new(n||e)(pt($S),pt(YP))}}static{this.\u0275cmp=Ge({type:e,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[Wi],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(n,r){1&n&&(J(0,"div",0),ut(1),et(),Ht(2,UCt,3,1,"div",1)),2&n&&(ot(),Je(" ",r.data.message,"\n"),ot(),Tn(r.hasAction?2:-1))},dependencies:[Cs,zW,GW,HW],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0})}}return e})();const WCt={snackBarState:xr("state",[Bn("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Bn("visible",oi({transform:"scale(1)",opacity:1})),gn("* => visible",mn("150ms cubic-bezier(0, 0, 0.2, 1)")),gn("* => void, * => hidden",mn("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let jCt=0,jW=(()=>{class e extends GS{constructor(t,n,r,s,o){super(),this._ngZone=t,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Jt(Gi),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Fe,this._onExit=new Fe,this._onEnter=new Fe,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+jCt++,this.attachDomPortal=l=>{this._assertNotAttached();const w=this._portalOutlet.attachDomPortal(l);return this._afterPortalAttached(),w},this._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){this._assertNotAttached();const n=this._portalOutlet.attachComponentPortal(t);return this._afterPortalAttached(),n}attachTemplatePortal(t){this._assertNotAttached();const n=this._portalOutlet.attachTemplatePortal(t);return this._afterPortalAttached(),n}onAnimationEnd(t){const{fromState:n,toState:r}=t;if(("void"===r&&"void"!==n||"hidden"===r)&&this._completeExit(),"visible"===r){const s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){const t=this._elementRef.nativeElement,n=this.snackBarConfig.panelClass;n&&(Array.isArray(n)?n.forEach(o=>t.classList.add(o)):t.classList.add(n)),this._exposeToModals();const r=this._label.nativeElement,s="mdc-snackbar__label";r.classList.toggle(s,!r.querySelector(`.${s}`))}_exposeToModals(){const t=this._liveElementId,n=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{const n=t.getAttribute("aria-owns");if(n){const r=n.replace(this._liveElementId,"").trim();r.length>0?t.setAttribute("aria-owns",r):t.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),n=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&n){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(r=document.activeElement),t.removeAttribute("aria-hidden"),n.appendChild(t),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static{this.\u0275fac=function(n){return new(n||e)(pt(li),pt(ai),pt(In),pt(cr),pt(QS))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-snack-bar-container"]],viewQuery:function(n,r){if(1&n&&(ki(ph,7),ki(zCt,7)),2&n){let s;He(s=We())&&(r._portalOutlet=s.first),He(s=We())&&(r._label=s.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:1,hostBindings:function(n,r){1&n&&fC("@state.done",function(o){return r.onAnimationEnd(o)}),2&n&&lC("@state",r._animationState)},standalone:!0,features:[yi,Wi],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(n,r){1&n&&(J(0,"div",1)(1,"div",2,0)(3,"div",3),Ht(4,GCt,0,0,"ng-template",4),et(),ye(5,"div"),et()()),2&n&&(ot(5),_i("aria-live",r._live)("role",r._role)("id",r._liveElementId))},dependencies:[ph],styles:[".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}.cdk-high-contrast-active .mat-mdc-snackbar-surface{outline:solid 1px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color, var(--mat-app-inverse-on-surface));border-radius:var(--mdc-snackbar-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mdc-snackbar-container-color, var(--mat-app-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font, var(--mat-app-body-medium-font));font-size:var(--mdc-snackbar-supporting-text-size, var(--mat-app-body-medium-size));font-weight:var(--mdc-snackbar-supporting-text-weight, var(--mat-app-body-medium-weight));line-height:var(--mdc-snackbar-supporting-text-line-height, var(--mat-app-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-app-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"],encapsulation:2,data:{animation:[WCt.snackBarState]}})}}return e})();const YCt=new te("mat-snack-bar-default-options",{providedIn:"root",factory:function XCt(){return new QS}});let Rd=(()=>{class e{get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}constructor(t,n,r,s,o,l){this._overlay=t,this._live=n,this._injector=r,this._breakpointObserver=s,this._parentSnackBar=o,this._defaultConfig=l,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=WW,this.snackBarContainerComponent=jW,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(t,n){return this._attach(t,n)}openFromTemplate(t,n){return this._attach(t,n)}open(t,n="",r){const s={...this._defaultConfig,...r};return s.data={message:t,action:n},s.announcementMessage===t&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,n){const s=On.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:QS,useValue:n}]}),o=new mv(this.snackBarContainerComponent,n.viewContainerRef,s),l=t.attach(o);return l.instance.snackBarConfig=n,l.instance}_attach(t,n){const r={...new QS,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),l=new $S(o,s);if(t instanceof yr){const w=new fh(t,null,{$implicit:r.data,snackBarRef:l});l.instance=o.attachTemplatePortal(w)}else{const w=this._createInjector(r,l),E=new mv(t,void 0,w),D=o.attachComponentPortal(E);l.instance=D.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Yi(s.detachments())).subscribe(w=>{s.overlayElement.classList.toggle(this.handsetCssClass,w.matches)}),r.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(l,r),this._openedSnackBarRef=l,this._openedSnackBarRef}_animateSnackBar(t,n){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),n.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),n.duration&&n.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(n.duration))}_createOverlay(t){const n=new vv;n.direction=t.direction;let r=this._overlay.position().global();const s="rtl"===t.direction,o="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!s||"end"===t.horizontalPosition&&s,l=!o&&"center"!==t.horizontalPosition;return o?r.left("0"):l?r.right("0"):r.centerHorizontally(),"top"===t.verticalPosition?r.top("0"):r.bottom("0"),n.positionStrategy=r,this._overlay.create(n)}_createInjector(t,n){return On.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:$S,useValue:n},{provide:YP,useValue:t.data}]})}static{this.\u0275fac=function(n){return new(n||e)(re(Ss),re(tW),re(On),re(_P),re(e,12),re(YCt))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),$Ct=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[Rd],imports:[xp,gv,VP,rn,WW,rn]})}}return e})(),Rr=(()=>{class e{constructor(t,n){this.sbRef=t,this.data=n}static{this.\u0275fac=function(n){return new(n||e)(pt($S),pt(YP))}}static{this.\u0275cmp=Ge({type:e,selectors:[["snack-alert"]],decls:2,vars:1,consts:[[1,"example-alert"]],template:function(n,r){1&n&&(J(0,"span",0),ut(1),et()),2&n&&(ot(),Ke(r.data))},styles:[".example-alert[_ngcontent-%COMP%]{color:#fff}"]})}}return e})(),ma=(()=>{class e{constructor(t,n){this.http=t,this._snackBar=n,this.snowstormFhirBase="https://snowstorm.ihtsdotools.org/fhir",this.defaultFhirUrlParam="http://snomed.info/sct",this.fhirUrlParam=this.defaultFhirUrlParam,this.lang="en",this.snowstormFhirBaseSubject=new Kr(this.snowstormFhirBase),this.fhirUrlParamSubject=new Kr(this.fhirUrlParam),this.langSubject=new Kr(this.lang),this.expandValuesetCache=new Map,this.CACHE_LIMIT=100,this.CACHE_DURATION=72e6,this.CACHE_KEY="valueSetCache",this.snowstormFhirBase$=this.snowstormFhirBaseSubject.asObservable(),this.fhirUrlParam$=this.fhirUrlParamSubject.asObservable(),this.lang$=this.langSubject.asObservable(),this.conceptCache=new Map,this.loadCache()}setSnowstormFhirBase(t){this.snowstormFhirBase=t,this.snowstormFhirBaseSubject.next(t)}setFhirUrlParam(t){this.fhirUrlParam=t,this.fhirUrlParamSubject.next(t)}setLang(t){this.lang=t,this.langSubject.next(t)}getSnowstormFhirBase(){return this.snowstormFhirBase}getFhirUrlParam(){return this.fhirUrlParam}getLang(){return this.lang}getCodeSystems(){return this.http.get(`${this.snowstormFhirBase}/CodeSystem`).pipe(Js(this.handleError("getCodeSystems",{})))}getCodeSystem(t){return this.http.get(`${this.snowstormFhirBase}/CodeSystem?version=${t}`).pipe(Js(this.handleError("getCodeSystem",{})))}getValueSetExpansionUrl(t,n,r,s){return r||(r=0),s||(s=20),"string"!=typeof n&&(n=""),`${this.snowstormFhirBase}/ValueSet/$expand?url=${this.fhirUrlParam}?fhir_vs=ecl/${encodeURIComponent(t)}&count=${s}&offset=${r}&filter=${n}&language=${this.lang}&displayLanguage=${this.lang}`}expandValueSet(t,n,r,s){let o=this.getValueSetExpansionUrl(t,n,r,s);return this.http.get(o).pipe(Js(this.handleError("expandValueSet",{})))}expandValueSetUsingCache(t,n,r,s){const o=this.getValueSetExpansionUrl(t,n,r,s),l=this.expandValuesetCache.get(o);return l&&Date.now()-l.timestamp{this.manageCacheLimit(),this.expandValuesetCache.set(o,{timestamp:Date.now(),data:w}),this.saveCache()}),Js(this.handleError("expandValueSet",{})))}manageCacheLimit(){if(this.expandValuesetCache.size>=this.CACHE_LIMIT){const t=this.expandValuesetCache.keys().next().value;t&&this.expandValuesetCache.delete(t)}}saveCache(){try{const t=Array.from(this.expandValuesetCache.entries());localStorage.setItem(this.CACHE_KEY,JSON.stringify(t))}catch(t){console.error("Failed to save cache:",t)}}loadCache(){try{const t=localStorage.getItem(this.CACHE_KEY);if(t){const n=JSON.parse(t);this.expandValuesetCache=new Map(n)}}catch(t){console.error("Failed to load cache:",t)}}translate(t,n,r){return r||(r=this.defaultFhirUrlParam),this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?url=http://snomed.info/sct?fhir_cm=${t}&code=${n}&system=${r}`).pipe(Js(this.handleError("translate",{})))}expandValueSetFromServer(t,n,r,s,o,l){o||(o=0),l||(l=20),t||(t=this.snowstormFhirBase),n||(n=this.fhirUrlParam),"string"!=typeof s&&(s="");let w=`${t}/ValueSet/$expand?url=${n}?fhir_vs=ecl/${encodeURIComponent(r)}&count=${l}&offset=${o}&filter=${s}&language=${this.lang}&displayLanguage=${this.lang}`;return this.http.get(w).pipe(Js(this.handleError("expandValueSet",{})))}handleError(t="operation",n){return r=>(console.error("There was an error!"),console.error(r),this._snackBar.openFromComponent(Rr,{duration:5e3,data:r.message,panelClass:["red-snackbar"]}),wi(n))}lookupConcept(t,n){n||(n=this.fhirUrlParam);const r=`${n}:${t}`,s=this.conceptCache.get(r);if(s)return wi(s);let o=`${this.snowstormFhirBase}/CodeSystem/$lookup?system=http://snomed.info/sct&code=${t}&property=normalForm`;"http://snomed.info/sct"!=n&&(o+=`&version=${n}`);const l={headers:new ol({"Accept-Language":"en"})};return this.http.get(o,l).pipe(cs(w=>{this.conceptCache.set(r,w)}),Js(this.handleError("lookupConcept",{})))}getMRCMAttributes(t){let n=`${this.snowstormFhirBase.replace("fhir","snowstorm/snomed-ct")}mrcm/MAIN/domain-attributes?parentIds=${t}&proximalPrimitiveModeling=false&contentType=POSTCOORDINATED`;return this.http.get(n).pipe(Js(this.handleError("getMRCMAttributes",{})))}addPostcoordinatedExpression(t){let n=`${this.snowstormFhirBase}/CodeSystem/sct_11000003104_EXP`;const r={headers:new ol({"Content-Type":"application/fhir+json"})};return this.http.patch(n,{resourceType:"CodeSystem",concept:[{code:t}]},r).pipe(Js(this.handleError("addPostcoordinatedExpression",{})))}runEclLegacy(t){let n=`https://browser.ihtsdotools.org/snowstorm/snomed-ct/MAIN/SNOMEDCT-ES/2022-10-31/concepts?offset=0&limit=100&termActive=true&ecl=${encodeURIComponent(t)}`;return this.http.get(n).pipe(Js(this.handleError("expandValueSet",{})))}getIcd10MapTargets(t){return this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?code=${t}&system=http://snomed.info/sct&source=http://snomed.info/sct?fhir_vs&target=http://hl7.org/fhir/sid/icd-10&url=http://snomed.info/sct/900000000000207008/version/20200131?fhir_cm=447562003`).pipe(Js(this.handleError("translate",{})))}lookupOtherCodeSystems(t,n){return this.http.get(`${this.snowstormFhirBase}/CodeSystem/$lookup?system=${t}&code=${n}`).pipe(Js(this.handleError("lookup",{})))}getNormalForm(t){if(t.parameter)for(let n of t.parameter){let r=!1;if("property"==n.name){for(let s of n.part)"code"==s.name&&"normalForm"==s.valueString&&(r=!0);if(r)for(let s of n.part)if("valueString"==s.name)return s.valueString}}return""}parseNormmalForm(t){const n=[];return t.split("} {").forEach(s=>{const o=s.match(/\d+\|[^\|]+\|\s*=\s*\d+\|[^\|]+\|/g);if(!o)return;const l=o.map(w=>{const[E,D]=w.split("=").map(j=>j.trim()),[k,O]=E.split("|").map(j=>j.trim()),[L,U]=D.split("|").map(j=>j.trim());return{type:{code:k,display:O.replace(/\(.*\)/,"").trim()},target:{code:L,display:U}}});n.push(l)}),{groups:n}}static{this.\u0275fac=function(n){return new(n||e)(re(Il),re(Rd))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function XW(...e){const i=KG(e),{args:t,keys:n}=ZG(e),r=new dr(s=>{const{length:o}=t;if(!o)return void s.complete();const l=new Array(o);let w=o,E=o;for(let D=0;D{k||(k=!0,E--),l[D]=O},()=>w--,void 0,()=>{(!w||!k)&&(E||s.next(n?JG(n,l):l),s.complete())}))}});return i?r.pipe(LR(i)):r}function YW(e={}){const{connector:i=()=>new Fe,resetOnError:t=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=e;return s=>{let o,l,w,E=0,D=!1,k=!1;const O=()=>{l?.unsubscribe(),l=void 0},L=()=>{O(),o=w=void 0,D=k=!1},U=()=>{const j=o;L(),j?.unsubscribe()};return gs((j,W)=>{E++,!k&&!D&&O();const Z=w=w??i();W.add(()=>{E--,0===E&&!k&&!D&&(l=$P(U,r))}),Z.subscribe(W),!o&&E>0&&(o=new qo({next:rt=>Z.next(rt),error:rt=>{k=!0,O(),l=$P(L,t,rt),Z.error(rt)},complete:()=>{D=!0,O(),l=$P(L,n),Z.complete()}}),lo(j).subscribe(o))})(s)}}function $P(e,i,...t){if(!0===i)return void e();if(!1===i)return;const n=new qo({next:()=>{n.unsubscribe(),e()}});return lo(i(...t)).subscribe(n)}const QCt=["*"];let KS;function qx(e){return function KCt(){if(void 0===KS&&(KS=null,typeof window<"u")){const e=window;void 0!==e.trustedTypes&&(KS=e.trustedTypes.createPolicy("angular#components",{createHTML:i=>i}))}return KS}()?.createHTML(e)||e}function $W(e){return Error(`Unable to find icon with the name "${e}"`)}function QW(e){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${e}".`)}function KW(e){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${e}".`)}class bp{constructor(i,t,n){this.url=i,this.svgText=t,this.options=n}}let ZS=(()=>{class e{constructor(t,n,r,s){this._httpClient=t,this._sanitizer=n,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(t,n,r){return this.addSvgIconInNamespace("",t,n,r)}addSvgIconLiteral(t,n,r){return this.addSvgIconLiteralInNamespace("",t,n,r)}addSvgIconInNamespace(t,n,r,s){return this._addSvgIconConfig(t,n,new bp(r,null,s))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,n,r,s){const o=this._sanitizer.sanitize(Wa.HTML,r);if(!o)throw KW(r);const l=qx(o);return this._addSvgIconConfig(t,n,new bp("",l,s))}addSvgIconSet(t,n){return this.addSvgIconSetInNamespace("",t,n)}addSvgIconSetLiteral(t,n){return this.addSvgIconSetLiteralInNamespace("",t,n)}addSvgIconSetInNamespace(t,n,r){return this._addSvgIconSetConfig(t,new bp(n,null,r))}addSvgIconSetLiteralInNamespace(t,n,r){const s=this._sanitizer.sanitize(Wa.HTML,n);if(!s)throw KW(n);const o=qx(s);return this._addSvgIconSetConfig(t,new bp("",o,r))}registerFontClassAlias(t,n=t){return this._fontCssClassesByAlias.set(t,n),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const n=this._sanitizer.sanitize(Wa.RESOURCE_URL,t);if(!n)throw QW(t);const r=this._cachedIconsByUrl.get(n);return r?wi(JS(r)):this._loadSvgIconFromConfig(new bp(t,null)).pipe(cs(s=>this._cachedIconsByUrl.set(n,s)),Ri(s=>JS(s)))}getNamedSvgIcon(t,n=""){const r=ZW(n,t);let s=this._svgIconConfigs.get(r);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(n,t),s)return this._svgIconConfigs.set(r,s),this._getSvgFromConfig(s);const o=this._iconSetConfigs.get(n);return o?this._getSvgFromIconSetConfigs(t,o):Qg($W(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?wi(JS(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Ri(n=>JS(n)))}_getSvgFromIconSetConfigs(t,n){const r=this._extractIconWithNameFromAnySet(t,n);return r?wi(r):XW(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Js(l=>{const E=`Loading icon set URL: ${this._sanitizer.sanitize(Wa.RESOURCE_URL,o.url)} failed: ${l.message}`;return this._errorHandler.handleError(new Error(E)),wi(null)})))).pipe(Ri(()=>{const o=this._extractIconWithNameFromAnySet(t,n);if(!o)throw $W(t);return o}))}_extractIconWithNameFromAnySet(t,n){for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.svgText&&s.svgText.toString().indexOf(t)>-1){const o=this._svgElementFromConfig(s),l=this._extractSvgIconFromSet(o,t,s.options);if(l)return l}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(cs(n=>t.svgText=n),Ri(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?wi(null):this._fetchIcon(t).pipe(cs(n=>t.svgText=n))}_extractSvgIconFromSet(t,n,r){const s=t.querySelector(`[id="${n}"]`);if(!s)return null;const o=s.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,r);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),r);const l=this._svgElementFromString(qx(""));return l.appendChild(o),this._setSvgAttributes(l,r)}_svgElementFromString(t){const n=this._document.createElement("DIV");n.innerHTML=t;const r=n.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(t){const n=this._svgElementFromString(qx("")),r=t.attributes;for(let s=0;sqx(E)),Zg(()=>this._inProgressUrlFetches.delete(o)),YW());return this._inProgressUrlFetches.set(o,w),w}_addSvgIconConfig(t,n,r){return this._svgIconConfigs.set(ZW(t,n),r),this}_addSvgIconSetConfig(t,n){const r=this._iconSetConfigs.get(t);return r?r.push(n):this._iconSetConfigs.set(t,[n]),this}_svgElementFromConfig(t){if(!t.svgElement){const n=this._svgElementFromString(t.svgText);this._setSvgAttributes(n,t.options),t.svgElement=n}return t.svgElement}_getIconConfigFromResolvers(t,n){for(let r=0;ri?i.pathname+i.search:""}}}),JW=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],nSt=JW.map(e=>`[${e}]`).join(", "),rSt=/^url\(['"]?#(.*?)['"]?\)$/;let ga=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const n=this._cleanupFontValue(t);n!==this._fontSet&&(this._fontSet=n,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const n=this._cleanupFontValue(t);n!==this._fontIcon&&(this._fontIcon=n,this._updateFontIconClasses())}constructor(t,n,r,s,o,l){this._elementRef=t,this._iconRegistry=n,this._location=s,this._errorHandler=o,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=Pe.EMPTY,l&&(l.color&&(this.color=this._defaultColor=l.color),l.fontSet&&(this.fontSet=l.fontSet)),r||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];const n=t.split(":");switch(n.length){case 1:return["",n[0]];case 2:return n;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const n=this._location.getPathname();n!==this._previousPath&&(this._previousPath=n,this._prependPathToReferences(n))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const n=this._location.getPathname();this._previousPath=n,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(n),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let n=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();n--;){const r=t.childNodes[n];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,n=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>t.classList.remove(r)),n.forEach(r=>t.classList.add(r)),this._previousFontSetClass=n,this.fontIcon!==this._previousFontIconClass&&!n.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const n=this._elementsWithExternalReferences;n&&n.forEach((r,s)=>{r.forEach(o=>{s.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){const n=t.querySelectorAll(nSt),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const l=n[s],w=l.getAttribute(o),E=w?w.match(rSt):null;if(E){let D=r.get(l);D||(D=[],r.set(l,D)),D.push({name:o,value:E[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[n,r]=this._splitIconName(t);n&&(this._svgNamespace=n),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,n).pipe(xs(1)).subscribe(s=>this._setSvgElement(s),s=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${n}:${r}! ${s.message}`))})}}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(ZS),wl("aria-hidden"),pt(eSt),pt(Tl),pt(tSt,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(n,r){2&n&&(_i("data-mat-icon-type",r._usingFontIcon()?"font":"svg")("data-mat-icon-name",r._svgName||r.fontIcon)("data-mat-icon-namespace",r._svgNamespace||r.fontSet)("fontIcon",r._usingFontIcon()?r.fontIcon:null),oo(r.color?"mat-"+r.color:""),Ci("mat-icon-inline",r.inline)("mat-icon-no-color","primary"!==r.color&&"accent"!==r.color&&"warn"!==r.color))},inputs:{color:"color",inline:[2,"inline","inline",qe],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[vn,Wi],ngContentSelectors:QCt,decls:1,vars:0,template:function(n,r){1&n&&(nr(),Si(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0})}}return e})(),sSt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,rn]})}}return e})();function qW(e,i){return i?t=>wx(i.pipe(xs(1),function aSt(){return gs((e,i)=>{e.subscribe(Zr(i,on))})}()),t.pipe(qW(e))):Da((t,n)=>lo(e(t,n)).pipe(xs(1),ZC(t)))}function QP(e,i=Hx){const t=Kx(e,i);return qW(()=>t)}const oSt=["mat-menu-item",""],lSt=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],cSt=["mat-icon, [matMenuItemIcon]","*"];function uSt(e,i){1&e&&(bl(),J(0,"svg",2),ye(1,"polygon",3),et())}const hSt=["*"];function dSt(e,i){if(1&e){const t=xe();J(0,"div",0),Ut("keydown",function(r){return zt(t),Gt(St()._handleKeydown(r))})("click",function(){return zt(t),Gt(St().closed.emit("click"))})("@transformMenu.start",function(r){return zt(t),Gt(St()._onAnimationStart(r))})("@transformMenu.done",function(r){return zt(t),Gt(St()._onAnimationDone(r))}),J(1,"div",1),Si(2),et()()}if(2&e){const t=St();oo(t._classList),vt("id",t.panelId)("@transformMenu",t._panelAnimationState),_i("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const KP=new te("MAT_MENU_PANEL");let oc=(()=>{class e{constructor(t,n,r,s,o){this._elementRef=t,this._document=n,this._focusMonitor=r,this._parentMenu=s,this._changeDetectorRef=o,this.role="menuitem",this.disabled=!1,this.disableRipple=!1,this._hovered=new Fe,this._focused=new Fe,this._highlighted=!1,this._triggersSubmenu=!1,s?.addItem?.(this)}focus(t,n){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,n):this._getHostElement().focus(n),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const t=this._elementRef.nativeElement.cloneNode(!0),n=t.querySelectorAll("mat-icon, .material-icons");for(let r=0;r enter",mn("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),gn("* => void",mn("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:xr("fadeInItems",[Bn("showing",oi({opacity:1})),gn("void => *",[oi({opacity:0}),mn("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let pSt=0;const mSt=new te("mat-menu-default-options",{providedIn:"root",factory:function gSt(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let Rl=(()=>{class e{get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}set panelClass(t){const n=this._previousPanelClass,r={...this._classList};n&&n.length&&n.split(" ").forEach(s=>{r[s]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(s=>{r[s]=!0}),this._elementRef.nativeElement.className=""),this._classList=r}get classList(){return this.panelClass}set classList(t){this.panelClass=t}constructor(t,n,r,s){this._elementRef=t,this._changeDetectorRef=s,this._elevationPrefix="mat-elevation-z",this._baseElevation=null,this._directDescendantItems=new Ju,this._classList={},this._panelAnimationState="void",this._animationDone=new Fe,this.closed=new Oe,this.close=this.closed,this.panelId="mat-menu-panel-"+pSt++,this._injector=Jt(On),this.overlayPanelClass=r.overlayPanelClass||"",this._xPosition=r.xPosition,this._yPosition=r.yPosition,this.backdropClass=r.backdropClass,this.overlapTrigger=r.overlapTrigger,this.hasBackdrop=r.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new MP(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ma(this._directDescendantItems),ks(t=>qr(...t.map(n=>n._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t)),this._directDescendantItems.changes.subscribe(t=>{const n=this._keyManager;if("enter"===this._panelAnimationState&&n.activeItem?._hasFocus()){const r=t.toArray(),s=Math.max(0,Math.min(r.length-1,n.activeItemIndex||0));r[s]&&!r[s].disabled?n.setActiveItem(s):n.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy()}_hovered(){return this._directDescendantItems.changes.pipe(Ma(this._directDescendantItems),ks(n=>qr(...n.map(r=>r._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const n=t.keyCode,r=this._keyManager;switch(n){case 27:co(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(38===n||40===n)&&r.setFocusOrigin("keyboard"),void r.onKeydown(t)}t.stopPropagation()}focusFirstItem(t="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=ao(()=>{let n=null;if(this._directDescendantItems.length&&(n=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!n||!n.contains(document.activeElement)){const r=this._keyManager;r.setFocusOrigin(t).setFirstItemActive(),!r.activeItem&&n&&n.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){if(null===this._baseElevation){const l=("function"==typeof getComputedStyle?getComputedStyle(this._elementRef.nativeElement):null)?.getPropertyValue("--mat-menu-base-elevation-level")||"8";this._baseElevation=parseInt(l)}const n=Math.min(this._baseElevation+t,24),r=`${this._elevationPrefix}${n}`,s=Object.keys(this._classList).find(o=>o.startsWith(this._elevationPrefix));if(!s||s===this._previousElevation){const o={...this._classList};this._previousElevation&&(o[this._previousElevation]=!1),o[r]=!0,this._previousElevation=r,this._classList=o}}setPositionClasses(t=this.xPosition,n=this.yPosition){this._classList={...this._classList,"mat-menu-before":"before"===t,"mat-menu-after":"after"===t,"mat-menu-above":"above"===n,"mat-menu-below":"below"===n},this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1}_onAnimationStart(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(Ma(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(n=>n._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(li),pt(mSt),pt(In))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-menu"]],contentQueries:function(n,r,s){if(1&n&&(Hn(s,fSt,5),Hn(s,oc,5),Hn(s,oc,4)),2&n){let o;He(o=We())&&(r.lazyContent=o.first),He(o=We())&&(r._allItems=o),He(o=We())&&(r.items=o)}},viewQuery:function(n,r){if(1&n&&ki(yr,5),2&n){let s;He(s=We())&&(r.templateRef=s.first)}},hostVars:3,hostBindings:function(n,r){2&n&&_i("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",qe],hasBackdrop:[2,"hasBackdrop","hasBackdrop",t=>null==t?null:qe(t)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],standalone:!0,features:[xi([{provide:KP,useExisting:e}]),vn,Wi],ngContentSelectors:hSt,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mat-mdc-elevation-specific",3,"keydown","click","id"],[1,"mat-mdc-menu-content"]],template:function(n,r){1&n&&(nr(),Ht(0,dSt,3,7,"ng-template"))},styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-app-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-app-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-app-surface-container));will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-app-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing);margin-top:var(--mat-menu-divider-top-spacing)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mat-menu-item-leading-spacing);padding-right:var(--mat-menu-item-trailing-spacing);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}[dir=rtl] .mat-mdc-menu-item{padding-right:var(--mat-menu-item-leading-spacing);padding-left:var(--mat-menu-item-trailing-spacing)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing);padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-right:var(--mat-menu-item-with-icon-leading-spacing);padding-left:var(--mat-menu-item-with-icon-trailing-spacing)}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-app-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing);height:var(--mat-menu-item-icon-size);width:var(--mat-menu-item-icon-size)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color)}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color)}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[qS.transformMenu,qS.fadeInItems]},changeDetection:0})}}return e})();const tj=new te("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{const e=Jt(Ss);return()=>e.scrollStrategies.reposition()}}),ySt={provide:tj,deps:[Ss],useFactory:function vSt(e){return()=>e.scrollStrategies.reposition()}},ej=rc({passive:!0});let vh=(()=>{class e{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(n=>{this._destroyMenu(n),("click"===n||"tab"===n)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(n)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(t,n,r,s,o,l,w,E,D){this._overlay=t,this._element=n,this._viewContainerRef=r,this._menuItemInstance=l,this._dir=w,this._focusMonitor=E,this._ngZone=D,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Pe.EMPTY,this._hoverSubscription=Pe.EMPTY,this._menuCloseSubscription=Pe.EMPTY,this._changeDetectorRef=Jt(In),this._handleTouchStart=k=>{FS(k)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new Oe,this.onMenuOpen=this.menuOpened,this.menuClosed=new Oe,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof Rl?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,ej)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,ej),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){const t=this.menu;if(this._menuOpen||!t)return;const n=this._createOverlay(t),r=n.getConfig(),s=r.positionStrategy;this._setPosition(t,s),r.hasBackdrop=null==t.hasBackdrop?!this.triggersSubmenu():t.hasBackdrop,n.attach(this._getPortal(t)),t.lazyContent&&t.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(t),t instanceof Rl&&(t._startAnimation(),t._directDescendantItems.changes.pipe(Yi(t.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(t,n){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,n):this._element.nativeElement.focus(n)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(t){if(!this._overlayRef||!this.menuOpen)return;const n=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===t||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,n instanceof Rl?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(Ln(r=>"void"===r.toState),xs(1),Yi(n.lazyContent._attached)).subscribe({next:()=>n.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),n?.lazyContent?.detach())}_initMenu(t){t.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,this._setMenuElevation(t),t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(t){if(t.setElevation){let n=0,r=t.parentMenu;for(;r;)n++,r=r.parentMenu;t.setElevation(n)}}_setIsMenuOpen(t){t!==this._menuOpen&&(this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(t),this._changeDetectorRef.markForCheck())}_createOverlay(t){if(!this._overlayRef){const n=this._getOverlayConfig(t);this._subscribeToPositions(t,n.positionStrategy),this._overlayRef=this._overlay.create(n),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(t){return new vv({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:t.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:t.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t,n){t.setPositionClasses&&n.positionChanges.subscribe(r=>{const s="start"===r.connectionPair.overlayX?"after":"before",o="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>t.setPositionClasses(s,o)):t.setPositionClasses(s,o)})}_setPosition(t,n){let[r,s]="before"===t.xPosition?["end","start"]:["start","end"],[o,l]="above"===t.yPosition?["bottom","top"]:["top","bottom"],[w,E]=[o,l],[D,k]=[r,s],O=0;if(this.triggersSubmenu()){if(k=r="before"===t.xPosition?"start":"end",s=D="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const L=this._parentMaterialMenu.items.first;this._parentInnerPadding=L?L._getHostElement().offsetTop:0}O="bottom"===o?this._parentInnerPadding:-this._parentInnerPadding}}else t.overlapTrigger||(w="top"===o?"bottom":"top",E="top"===l?"bottom":"top");n.withPositions([{originX:r,originY:w,overlayX:D,overlayY:o,offsetY:O},{originX:s,originY:w,overlayX:k,overlayY:o,offsetY:O},{originX:r,originY:E,overlayX:D,overlayY:l,offsetY:-O},{originX:s,originY:E,overlayX:k,overlayY:l,offsetY:-O}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return qr(t,this._parentMaterialMenu?this._parentMaterialMenu.closed:wi(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Ln(o=>o!==this._menuItemInstance),Ln(()=>this._menuOpen)):wi(),n)}_handleMousedown(t){kS(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const n=t.keyCode;(13===n||32===n)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===n&&"ltr"===this.dir||37===n&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(Ln(t=>t===this._menuItemInstance&&!t.disabled),QP(0,WP)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Rl&&this.menu._isAnimating?this.menu._animationDone.pipe(xs(1),QP(0,WP),Yi(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(t){return(!this._portal||this._portal.templateRef!==t.templateRef)&&(this._portal=new fh(t.templateRef,this._viewContainerRef)),this._portal}static{this.\u0275fac=function(n){return new(n||e)(pt(Ss),pt(ai),pt(Or),pt(tj),pt(KP,8),pt(oc,10),pt(Ya,8),pt(sc),pt(li))}}static{this.\u0275dir=me({type:e,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(n,r){1&n&&Ut("click",function(o){return r._handleClick(o)})("mousedown",function(o){return r._handleMousedown(o)})("keydown",function(o){return r._handleKeydown(o)}),2&n&&_i("aria-haspopup",r.menu?"menu":null)("aria-expanded",r.menuOpen)("aria-controls",r.menuOpen?r.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],standalone:!0})}}return e})(),xSt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[ySt],imports:[hu,fv,rn,xp,gh,rn]})}}return e})();const bSt=["determinateSpinner"];function wSt(e,i){if(1&e&&(bl(),J(0,"svg",11),ye(1,"circle",12),et()),2&e){const t=St();_i("viewBox",t._viewBox()),ot(),$s("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),_i("r",t._circleRadius())}}const TSt=new te("mat-progress-spinner-default-options",{providedIn:"root",factory:function CSt(){return{diameter:ij}}}),ij=100;let Pd=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}constructor(t,n,r){this._elementRef=t,this._defaultColor="primary",this._value=0,this._diameter=ij,this._noopAnimations="NoopAnimations"===n&&!!r&&!r._forceAnimations,this.mode="mat-spinner"===t.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",r&&(r.color&&(this.color=this._defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0))}get diameter(){return this._diameter}set diameter(t){this._diameter=t||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const t=2*this._circleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(Hr,8),pt(TSt))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,r){if(1&n&&ki(bSt,5),2&n){let s;He(s=We())&&(r._determinateCircle=s.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,r){2&n&&(_i("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===r.mode?r.value:null)("mode",r.mode),oo("mat-"+r.color),$s("width",r.diameter,"px")("height",r.diameter,"px")("--mdc-circular-progress-size",r.diameter+"px")("--mdc-circular-progress-active-indicator-width",r.diameter+"px"),Ci("_mat-animation-noopable",r._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===r.mode))},inputs:{color:"color",mode:"mode",value:[2,"value","value",jr],diameter:[2,"diameter","diameter",jr],strokeWidth:[2,"strokeWidth","strokeWidth",jr]},exportAs:["matProgressSpinner"],standalone:!0,features:[vn,Wi],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,r){if(1&n&&(Ht(0,wSt,2,8,"ng-template",null,0,zg),J(2,"div",2,1),bl(),J(4,"svg",3),ye(5,"circle",4),et()(),dy(),J(6,"div",5)(7,"div",6)(8,"div",7),da(9,8),et(),J(10,"div",9),da(11,8),et(),J(12,"div",10),da(13,8),et()()()),2&n){const s=Zi(1);ot(4),_i("viewBox",r._viewBox()),ot(),$s("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeDashOffset(),"px")("stroke-width",r._circleStrokeWidth(),"%"),_i("r",r._circleRadius()),ot(4),vt("ngTemplateOutlet",s),ot(2),vt("ngTemplateOutlet",s),ot(2),vt("ngTemplateOutlet",s)}},dependencies:[jC],styles:[".mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, var(--mat-app-primary))}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}"],encapsulation:2,changeDetection:0})}}return e})(),ESt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[hu,rn]})}}return e})();const _St=["*"],MSt=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],ISt=["[mat-card-avatar], [matCardAvatar]","mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","*"],RSt=new te("MAT_CARD_CONFIG");let tb=(()=>{class e{constructor(t){this.appearance=t?.appearance||"raised"}static{this.\u0275fac=function(n){return new(n||e)(pt(RSt,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(n,r){2&n&&Ci("mat-mdc-card-outlined","outlined"===r.appearance)("mdc-card--outlined","outlined"===r.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],standalone:!0,features:[Wi],ngContentSelectors:_St,decls:1,vars:0,template:function(n,r){1&n&&(nr(),Si(0))},styles:['.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-color:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-radius:var(--mdc-elevated-card-container-shape, var(--mat-app-corner-medium));box-shadow:var(--mdc-elevated-card-container-elevation, var(--mat-app-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mdc-elevated-card-container-shape, var(--mat-app-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mdc-outlined-card-container-color, var(--mat-app-surface));border-radius:var(--mdc-outlined-card-container-shape, var(--mat-app-corner-medium));border-width:var(--mdc-outlined-card-outline-width);border-color:var(--mdc-outlined-card-outline-color, var(--mat-app-outline-variant));box-shadow:var(--mdc-outlined-card-container-elevation, var(--mat-app-level0))}.mat-mdc-card-outlined::after{border:none}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-app-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-app-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-app-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-app-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-app-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-app-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-app-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-app-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-app-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-app-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-app-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0})}}return e})(),ZP=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"],standalone:!0})}}return e})(),JP=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"],standalone:!0})}}return e})(),qP=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-mdc-card-subtitle"],standalone:!0})}}return e})(),tk=(()=>{class e{constructor(){this.align="start"}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(n,r){2&n&&Ci("mat-mdc-card-actions-align-end","end"===r.align)},inputs:{align:"align"},exportAs:["matCardActions"],standalone:!0})}}return e})(),ek=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],standalone:!0,features:[Wi],ngContentSelectors:ISt,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(n,r){1&n&&(nr(MSt),Si(0),J(1,"div",0),Si(2,1),et(),Si(3,2))},encapsulation:2,changeDetection:0})}}return e})(),kSt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,hu,rn]})}}return e})();const FSt=[[["caption"]],[["colgroup"],["col"]],"*"],OSt=["caption","colgroup, col","*"];function LSt(e,i){1&e&&Si(0,2)}function NSt(e,i){1&e&&(J(0,"thead",0),da(1,1),et(),J(2,"tbody",0),da(3,2)(4,3),et(),J(5,"tfoot",0),da(6,4),et())}function BSt(e,i){1&e&&da(0,1)(1,2)(2,3)(3,4)}const yu=new te("CDK_TABLE");let yv=(()=>{class e{constructor(t){this.template=t}static{this.\u0275fac=function(n){return new(n||e)(pt(yr))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkCellDef",""]],standalone:!0})}}return e})(),xv=(()=>{class e{constructor(t){this.template=t}static{this.\u0275fac=function(n){return new(n||e)(pt(yr))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkHeaderCellDef",""]],standalone:!0})}}return e})(),tE=(()=>{class e{constructor(t){this.template=t}static{this.\u0275fac=function(n){return new(n||e)(pt(yr))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkFooterCellDef",""]],standalone:!0})}}return e})(),yh=(()=>{class e{get name(){return this._name}set name(t){this._setNameInput(t)}get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}get stickyEnd(){return this._stickyEnd}set stickyEnd(t){t!==this._stickyEnd&&(this._stickyEnd=t,this._hasStickyChanged=!0)}constructor(t){this._table=t,this._hasStickyChanged=!1,this._sticky=!1,this._stickyEnd=!1}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static{this.\u0275fac=function(n){return new(n||e)(pt(yu,8))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkColumnDef",""]],contentQueries:function(n,r,s){if(1&n&&(Hn(s,yv,5),Hn(s,xv,5),Hn(s,tE,5)),2&n){let o;He(o=We())&&(r.cell=o.first),He(o=We())&&(r.headerCell=o.first),He(o=We())&&(r.footerCell=o.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",qe],stickyEnd:[2,"stickyEnd","stickyEnd",qe]},standalone:!0,features:[xi([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:e}]),vn]})}}return e})();class ik{constructor(i,t){t.nativeElement.classList.add(...i._columnCssClassName)}}let nk=(()=>{class e extends ik{constructor(t,n){super(t,n)}static{this.\u0275fac=function(n){return new(n||e)(pt(yh),pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],standalone:!0,features:[yi]})}}return e})(),rk=(()=>{class e extends ik{constructor(t,n){super(t,n);const r=t._table?._getCellRole();r&&n.nativeElement.setAttribute("role",r)}static{this.\u0275fac=function(n){return new(n||e)(pt(yh),pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],standalone:!0,features:[yi]})}}return e})();class rj{constructor(){this.tasks=[],this.endTasks=[]}}const sk=new te("_COALESCED_STYLE_SCHEDULER");let sj=(()=>{class e{constructor(t){this._currentSchedule=null,this._ngZone=Jt(li)}schedule(t){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(t)}scheduleEnd(t){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(t)}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new rj,this._ngZone.runOutsideAngular(()=>queueMicrotask(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const t=this._currentSchedule;this._currentSchedule=new rj;for(const n of t.tasks)n();for(const n of t.endTasks)n()}this._currentSchedule=null})))}static{this.\u0275fac=function(n){return new(n||e)(re(li))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})(),ak=(()=>{class e{constructor(t,n){this.template=t,this._differs=n}ngOnChanges(t){if(!this._columnsDiffer){const n=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(n).create(),this._columnsDiffer.diff(n)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(t){return this instanceof eb?t.headerCell.template:this instanceof ib?t.footerCell.template:t.cell.template}static{this.\u0275fac=function(n){return new(n||e)(pt(yr),pt(bd))}}static{this.\u0275dir=me({type:e,features:[lr]})}}return e})(),eb=(()=>{class e extends ak{get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}constructor(t,n,r){super(t,n),this._table=r,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(t){super.ngOnChanges(t)}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}static{this.\u0275fac=function(n){return new(n||e)(pt(yr),pt(bd),pt(yu,8))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",qe]},standalone:!0,features:[vn,yi,lr]})}}return e})(),ib=(()=>{class e extends ak{get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}constructor(t,n,r){super(t,n),this._table=r,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(t){super.ngOnChanges(t)}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}static{this.\u0275fac=function(n){return new(n||e)(pt(yr),pt(bd),pt(yu,8))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",qe]},standalone:!0,features:[vn,yi,lr]})}}return e})(),eE=(()=>{class e extends ak{constructor(t,n,r){super(t,n),this._table=r}static{this.\u0275fac=function(n){return new(n||e)(pt(yr),pt(bd),pt(yu,8))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},standalone:!0,features:[yi]})}}return e})(),xh=(()=>{class e{static{this.mostRecentCellOutlet=null}constructor(t){this._viewContainer=t,e.mostRecentCellOutlet=this}ngOnDestroy(){e.mostRecentCellOutlet===this&&(e.mostRecentCellOutlet=null)}static{this.\u0275fac=function(n){return new(n||e)(pt(Or))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkCellOutlet",""]],standalone:!0})}}return e})(),ok=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],standalone:!0,features:[Wi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&da(0,0)},dependencies:[xh],encapsulation:2})}}return e})(),ck=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],standalone:!0,features:[Wi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&da(0,0)},dependencies:[xh],encapsulation:2})}}return e})(),iE=(()=>{class e{constructor(t){this.templateRef=t,this._contentClassName="cdk-no-data-row"}static{this.\u0275fac=function(n){return new(n||e)(pt(yr))}}static{this.\u0275dir=me({type:e,selectors:[["ng-template","cdkNoDataRow",""]],standalone:!0})}}return e})();const aj=["top","bottom","left","right"];class GSt{constructor(i,t,n,r,s=!0,o=!0,l){this._isNativeHtmlTable=i,this._stickCellCss=t,this.direction=n,this._coalescedStyleScheduler=r,this._isBrowser=s,this._needsPositionStickyOnElement=o,this._positionListener=l,this._elemSizeCache=new WeakMap,this._resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(w=>this._updateCachedSizes(w)):null,this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null,this._cachedCellWidths=[],this._borderCellCss={top:`${t}-border-elem-top`,bottom:`${t}-border-elem-bottom`,left:`${t}-border-elem-left`,right:`${t}-border-elem-right`}}clearStickyPositioning(i,t){(t.includes("left")||t.includes("right"))&&this._removeFromStickyColumnReplayQueue(i);const n=[];for(const r of i)if(r.nodeType===r.ELEMENT_NODE){n.push(r);for(let s=0;s{for(const r of n)this._removeStickyStyle(r,t)})}updateStickyColumns(i,t,n,r=!0,s=!0){s&&this._updateStickyColumnReplayQueue({rows:[...i],stickyStartStates:[...t],stickyEndStates:[...n]}),i.length&&this._isBrowser&&(t.some(o=>o)||n.some(o=>o))?this._coalescedStyleScheduler.schedule(()=>{const o=i[0],l=o.children.length,w=this._getCellWidths(o,r),E=this._getStickyStartColumnPositions(w,t),D=this._getStickyEndColumnPositions(w,n),k=t.lastIndexOf(!0),O=n.indexOf(!0),L="rtl"===this.direction,U=L?"right":"left",j=L?"left":"right";for(const W of i)for(let Z=0;Zt[Z]?W:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===O?[]:w.slice(O).map((W,Z)=>n[Z+O]?W:null).reverse()}))}):this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]}))}stickRows(i,t,n){this._isBrowser&&this._coalescedStyleScheduler.schedule(()=>{const r="bottom"===n?i.slice().reverse():i,s="bottom"===n?t.slice().reverse():t,o=[],l=[],w=[];for(let D=0,k=0;D{const n=i.querySelector("tfoot");n&&(t.some(r=>!r)?this._removeStickyStyle(n,["bottom"]):this._addStickyStyle(n,"bottom",0,!1))})}_removeStickyStyle(i,t){for(const r of t)i.style[r]="",i.classList.remove(this._borderCellCss[r]);aj.some(r=>-1===t.indexOf(r)&&i.style[r])?i.style.zIndex=this._getCalculatedZIndex(i):(i.style.zIndex="",this._needsPositionStickyOnElement&&(i.style.position=""),i.classList.remove(this._stickCellCss))}_addStickyStyle(i,t,n,r){i.classList.add(this._stickCellCss),r&&i.classList.add(this._borderCellCss[t]),i.style[t]=`${n}px`,i.style.zIndex=this._getCalculatedZIndex(i),this._needsPositionStickyOnElement&&(i.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(i){const t={top:100,bottom:10,left:1,right:1};let n=0;for(const r of aj)i.style[r]&&(n+=t[r]);return n?`${n}`:""}_getCellWidths(i,t=!0){if(!t&&this._cachedCellWidths.length)return this._cachedCellWidths;const n=[],r=i.children;for(let s=0;s0;s--)t[s]&&(n[s]=r,r+=i[s]);return n}_retrieveElementSize(i){const t=this._elemSizeCache.get(i);if(t)return t;const n=i.getBoundingClientRect(),r={width:n.width,height:n.height};return this._resizeObserver&&(this._elemSizeCache.set(i,r),this._resizeObserver.observe(i,{box:"border-box"})),r}_updateStickyColumnReplayQueue(i){this._removeFromStickyColumnReplayQueue(i.rows),!this._stickyColumnsReplayTimeout&&this._updatedStickyColumnsParamsToReplay.push(i)}_removeFromStickyColumnReplayQueue(i){const t=new Set(i);for(const n of this._updatedStickyColumnsParamsToReplay)n.rows=n.rows.filter(r=>!t.has(r));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(n=>!!n.rows.length)}_updateCachedSizes(i){let t=!1;for(const n of i){const r=n.borderBoxSize?.length?{width:n.borderBoxSize[0].inlineSize,height:n.borderBoxSize[0].blockSize}:{width:n.contentRect.width,height:n.contentRect.height};r.width!==this._elemSizeCache.get(n.target)?.width&&HSt(n.target)&&(t=!0),this._elemSizeCache.set(n.target,r)}t&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{for(const n of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(n.rows,n.stickyStartStates,n.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null},0))}}function HSt(e){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(i=>e.classList.contains(i))}const uk=new te("CDK_SPL");let hk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=Jt(yu);r._rowOutlet=this,r._outletAssigned()}static{this.\u0275fac=function(n){return new(n||e)(pt(Or),pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["","rowOutlet",""]],standalone:!0})}}return e})(),dk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=Jt(yu);r._headerRowOutlet=this,r._outletAssigned()}static{this.\u0275fac=function(n){return new(n||e)(pt(Or),pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["","headerRowOutlet",""]],standalone:!0})}}return e})(),fk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=Jt(yu);r._footerRowOutlet=this,r._outletAssigned()}static{this.\u0275fac=function(n){return new(n||e)(pt(Or),pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["","footerRowOutlet",""]],standalone:!0})}}return e})(),pk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=Jt(yu);r._noDataRowOutlet=this,r._outletAssigned()}static{this.\u0275fac=function(n){return new(n||e)(pt(Or),pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["","noDataRowOutlet",""]],standalone:!0})}}return e})(),nE=(()=>{class e{_getCellRole(){if(void 0===this._cellRoleInternal){const t=this._elementRef.nativeElement.getAttribute("role");return"grid"===t||"treegrid"===t?"gridcell":"cell"}return this._cellRoleInternal}get trackBy(){return this._trackByFn}set trackBy(t){this._trackByFn=t}get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(t){this._multiTemplateDataRows=t,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(t){this._fixedLayout=t,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(t,n,r,s,o,l,w,E,D,k,O,L){this._differs=t,this._changeDetectorRef=n,this._elementRef=r,this._dir=o,this._platform=w,this._viewRepeater=E,this._coalescedStyleScheduler=D,this._viewportRuler=k,this._stickyPositioningListener=O,this._onDestroy=new Fe,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._hasAllOutlets=!1,this._hasInitialized=!1,this._cellRoleInternal=void 0,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new Oe,this.viewChange=new Kr({start:0,end:Number.MAX_VALUE}),this._injector=Jt(On),s||r.nativeElement.setAttribute("role","table"),this._document=l,this._isServer=!w.isBrowser,this._isNativeHtmlTable="TABLE"===r.nativeElement.nodeName}ngOnInit(){this._setupStickyStyler(),this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n),this._viewportRuler.change().pipe(Yi(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(t=>{t?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),cP(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const t=this._dataDiffer.diff(this._renderRows);if(!t)return this._updateNoDataRow(),void this.contentChanged.next();const n=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(t,n,(r,s,o)=>this._getEmbeddedViewArgs(r.item,o),r=>r.item.data,r=>{r.operation===lh.INSERTED&&r.context&&this._renderCellTemplateForItem(r.record.item.rowDef,r.context)}),this._updateRowIndexContext(),t.forEachIdentityChange(r=>{n.get(r.currentIndex).context.$implicit=r.item.data}),this._updateNoDataRow(),ao(()=>{this.updateStickyColumnStyles()},{injector:this._injector}),this.contentChanged.next()}addColumnDef(t){this._customColumnDefs.add(t)}removeColumnDef(t){this._customColumnDefs.delete(t)}addRowDef(t){this._customRowDefs.add(t)}removeRowDef(t){this._customRowDefs.delete(t)}addHeaderRowDef(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}removeHeaderRowDef(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}addFooterRowDef(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}removeFooterRowDef(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}setNoDataRow(t){this._customNoDataRow=t}updateStickyHeaderRowStyles(){const t=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){const r=oj(this._headerRowOutlet,"thead");r&&(r.style.display=t.length?"":"none")}const n=this._headerRowDefs.map(r=>r.sticky);this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,n,"top"),this._headerRowDefs.forEach(r=>r.resetStickyChanged())}updateStickyFooterRowStyles(){const t=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){const r=oj(this._footerRowOutlet,"tfoot");r&&(r.style.display=t.length?"":"none")}const n=this._footerRowDefs.map(r=>r.sticky);this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach(r=>r.resetStickyChanged())}updateStickyColumnStyles(){const t=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),r=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...t,...n,...r],["left","right"]),this._stickyColumnStylesNeedReset=!1),t.forEach((s,o)=>{this._addStickyColumnStyles([s],this._headerRowDefs[o])}),this._rowDefs.forEach(s=>{const o=[];for(let l=0;l{this._addStickyColumnStyles([s],this._footerRowDefs[o])}),Array.from(this._columnDefsByName.values()).forEach(s=>s.resetStickyChanged())}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs();const n=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||n,this._forceRecalculateCellWidths=n,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){const t=[],n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=0;r{const l=r&&r.has(o)?r.get(o):[];if(l.length){const w=l.shift();return w.dataIndex=n,w}return{data:t,rowDef:o,dataIndex:n}})}_cacheColumnDefs(){this._columnDefsByName.clear(),rE(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(n=>{this._columnDefsByName.has(n.name),this._columnDefsByName.set(n.name,n)})}_cacheRowDefs(){this._headerRowDefs=rE(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=rE(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=rE(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const t=this._rowDefs.filter(n=>!n.when);this._defaultRowDef=t[0]}_renderUpdatedColumns(){const t=(o,l)=>{const w=!!l.getColumnsDiff();return o||w},n=this._rowDefs.reduce(t,!1);n&&this._forceRenderDataRows();const r=this._headerRowDefs.reduce(t,!1);r&&this._forceRenderHeaderRows();const s=this._footerRowDefs.reduce(t,!1);return s&&this._forceRenderFooterRows(),n||r||s}_switchDataSource(t){this._data=[],cP(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=t}_observeRenderChanges(){if(!this.dataSource)return;let t;cP(this.dataSource)?t=this.dataSource.connect(this):xx(this.dataSource)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=wi(this.dataSource)),this._renderChangeSubscription=t.pipe(Yi(this._onDestroy)).subscribe(n=>{this._data=n||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((t,n)=>this._renderRow(this._headerRowOutlet,t,n)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((t,n)=>this._renderRow(this._footerRowOutlet,t,n)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(t,n){const r=Array.from(n.columns||[]).map(l=>this._columnDefsByName.get(l)),s=r.map(l=>l.sticky),o=r.map(l=>l.stickyEnd);this._stickyStyler.updateStickyColumns(t,s,o,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(t){const n=[];for(let r=0;r!s.when||s.when(n,t));else{let s=this._rowDefs.find(o=>o.when&&o.when(n,t))||this._defaultRowDef;s&&r.push(s)}return r}_getEmbeddedViewArgs(t,n){return{templateRef:t.rowDef.template,context:{$implicit:t.data},index:n}}_renderRow(t,n,r,s={}){const o=t.viewContainer.createEmbeddedView(n.template,s,r);return this._renderCellTemplateForItem(n,s),o}_renderCellTemplateForItem(t,n){for(let r of this._getCellTemplates(t))xh.mostRecentCellOutlet&&xh.mostRecentCellOutlet._viewContainer.createEmbeddedView(r,n);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const t=this._rowOutlet.viewContainer;for(let n=0,r=t.length;n{const r=this._columnDefsByName.get(n);return t.extractCellTemplate(r)}):[]}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const t=(n,r)=>n||r.hasStickyChanged();this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new GSt(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:wi()).pipe(Yi(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles()})}_getOwnDefs(t){return t.filter(n=>!n._table||n._table===this)}_updateNoDataRow(){const t=this._customNoDataRow||this._noDataRow;if(!t)return;const n=0===this._rowOutlet.viewContainer.length;if(n===this._isShowingNoDataRow)return;const r=this._noDataRowOutlet.viewContainer;if(n){const s=r.createEmbeddedView(t.templateRef),o=s.rootNodes[0];1===s.rootNodes.length&&o?.nodeType===this._document.ELEMENT_NODE&&(o.setAttribute("role","row"),o.classList.add(t._contentClassName))}else r.clear();this._isShowingNoDataRow=n,this._changeDetectorRef.markForCheck()}static{this.\u0275fac=function(n){return new(n||e)(pt(bd),pt(In),pt(ai),wl("role"),pt(Ya,8),pt(Gi),pt(cr),pt(Ox),pt(sk),pt(mh),pt(uk,12),pt(li,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(n,r,s){if(1&n&&(Hn(s,iE,5),Hn(s,yh,5),Hn(s,eE,5),Hn(s,eb,5),Hn(s,ib,5)),2&n){let o;He(o=We())&&(r._noDataRow=o.first),He(o=We())&&(r._contentColumnDefs=o),He(o=We())&&(r._contentRowDefs=o),He(o=We())&&(r._contentHeaderRowDefs=o),He(o=We())&&(r._contentFooterRowDefs=o)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(n,r){2&n&&Ci("cdk-table-fixed-layout",r.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",qe],fixedLayout:[2,"fixedLayout","fixedLayout",qe]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],standalone:!0,features:[xi([{provide:yu,useExisting:e},{provide:Ox,useClass:s7},{provide:sk,useClass:sj},{provide:uk,useValue:null}]),vn,Wi],ngContentSelectors:OSt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,r){1&n&&(nr(FSt),Si(0),Si(1,1),Ht(2,LSt,1,0)(3,NSt,7,0)(4,BSt,4,0)),2&n&&(ot(2),Tn(r._isServer?2:-1),ot(),Tn(r._isNativeHtmlTable?3:4))},dependencies:[dk,hk,pk,fk],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2})}}return e})();function rE(e,i){return e.concat(Array.from(i))}function oj(e,i){const t=i.toUpperCase();let n=e.viewContainer.element.nativeElement;for(;n;){const r=1===n.nodeType?n.nodeName:null;if(r===t)return n;if("TABLE"===r)break;n=n.parentNode}return null}let jSt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[jP]})}}return e})();const XSt=[[["caption"]],[["colgroup"],["col"]],"*"],YSt=["caption","colgroup, col","*"];function $St(e,i){1&e&&Si(0,2)}function QSt(e,i){1&e&&(J(0,"thead",0),da(1,1),et(),J(2,"tbody",2),da(3,3)(4,4),et(),J(5,"tfoot",0),da(6,5),et())}function KSt(e,i){1&e&&da(0,1)(1,3)(2,4)(3,5)}let kd=(()=>{class e extends nE{constructor(){super(...arguments),this.stickyCssClass="mat-mdc-table-sticky",this.needsPositionStickyOnElement=!1}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(n,r){2&n&&Ci("mdc-table-fixed-layout",r.fixedLayout)},exportAs:["matTable"],standalone:!0,features:[xi([{provide:nE,useExisting:e},{provide:yu,useExisting:e},{provide:sk,useClass:sj},{provide:Ox,useClass:s7},{provide:uk,useValue:null}]),yi,Wi],ngContentSelectors:YSt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,r){1&n&&(nr(XSt),Si(0),Si(1,1),Ht(2,$St,1,0)(3,QSt,7,0)(4,KSt,4,0)),2&n&&(ot(2),Tn(r._isServer?2:-1),ot(),Tn(r._isNativeHtmlTable?3:4))},dependencies:[dk,hk,pk,fk],styles:[".mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-app-surface))}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell{text-align:right}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-app-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-app-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-app-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-app-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-app-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-app-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-app-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-app-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-app-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-app-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-app-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-app-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mat-mdc-header-cell{text-align:right}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-app-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-app-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-app-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2})}}return e})(),bh=(()=>{class e extends yv{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","matCellDef",""]],standalone:!0,features:[xi([{provide:yv,useExisting:e}]),yi]})}}return e})(),wh=(()=>{class e extends xv{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","matHeaderCellDef",""]],standalone:!0,features:[xi([{provide:xv,useExisting:e}]),yi]})}}return e})(),Th=(()=>{class e extends yh{get name(){return this._name}set name(t){this._setNameInput(t)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},standalone:!0,features:[xi([{provide:yh,useExisting:e},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:e}]),yi]})}}return e})(),Ch=(()=>{class e extends nk{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],standalone:!0,features:[yi]})}}return e})(),Sh=(()=>{class e extends rk{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],standalone:!0,features:[yi]})}}return e})(),Fd=(()=>{class e extends eb{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",qe]},standalone:!0,features:[xi([{provide:eb,useExisting:e}]),vn,yi]})}}return e})(),Od=(()=>{class e extends eE{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},standalone:!0,features:[xi([{provide:eE,useExisting:e}]),yi]})}}return e})(),Ld=(()=>{class e extends ok{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],standalone:!0,features:[xi([{provide:ok,useExisting:e}]),yi,Wi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&da(0,0)},dependencies:[xh],encapsulation:2})}}return e})(),Nd=(()=>{class e extends ck{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],standalone:!0,features:[xi([{provide:ck,useExisting:e}]),yi,Wi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&da(0,0)},dependencies:[xh],encapsulation:2})}}return e})(),rEt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,jSt,rn]})}}return e})();class wp extends vS{get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i),this._renderChangesSubscription||this._filterData(i)}get filter(){return this._filter.value}set filter(i){this._filter.next(i),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(i){this._sort=i,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(i){this._paginator=i,this._updateChangeSubscription()}constructor(i=[]){super(),this._renderData=new Kr([]),this._filter=new Kr(""),this._internalPageChanges=new Fe,this._renderChangesSubscription=null,this.sortingDataAccessor=(t,n)=>{const r=t[n];if(O7(r)){const s=Number(r);return s<9007199254740991?s:r}return r},this.sortData=(t,n)=>{const r=n.active,s=n.direction;return r&&""!=s?t.sort((o,l)=>{let w=this.sortingDataAccessor(o,r),E=this.sortingDataAccessor(l,r);const D=typeof w,k=typeof E;D!==k&&("number"===D&&(w+=""),"number"===k&&(E+=""));let O=0;return null!=w&&null!=E?w>E?O=1:w{const r=Object.keys(t).reduce((o,l)=>o+t[l]+"\u25ec","").toLowerCase(),s=n.trim().toLowerCase();return-1!=r.indexOf(s)},this._data=new Kr(i),this._updateChangeSubscription()}_updateChangeSubscription(){const i=this._sort?qr(this._sort.sortChange,this._sort.initialized):wi(null),t=this._paginator?qr(this._paginator.page,this._internalPageChanges,this._paginator.initialized):wi(null),r=oh([this._data,this._filter]).pipe(Ri(([l])=>this._filterData(l))),s=oh([r,i]).pipe(Ri(([l])=>this._orderData(l))),o=oh([s,t]).pipe(Ri(([l])=>this._pageData(l)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=o.subscribe(l=>this._renderData.next(l))}_filterData(i){return this.filteredData=null==this.filter||""===this.filter?i:i.filter(t=>this.filterPredicate(t,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(i){return this.sort?this.sortData(i.slice(),this.sort):i}_pageData(i){if(!this.paginator)return i;const t=this.paginator.pageIndex*this.paginator.pageSize;return i.slice(t,t+this.paginator.pageSize)}_updatePaginator(i){Promise.resolve().then(()=>{const t=this.paginator;if(t&&(t.length=i,t.pageIndex>0)){const n=Math.ceil(t.length/t.pageSize)-1||0,r=Math.min(t.pageIndex,n);r!==t.pageIndex&&(t.pageIndex=r,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}}let cj=(()=>{class e{constructor(t,n){this._renderer=t,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static{this.\u0275fac=function(n){return new(n||e)(pt(Kl),pt(ai))}}static{this.\u0275dir=me({type:e})}}return e})(),Tp=(()=>{class e extends cj{static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,features:[yi]})}}return e})();const va=new te(""),oEt={provide:va,useExisting:kn(()=>Pl),multi:!0},cEt=new te("");let Pl=(()=>{class e extends cj{constructor(t,n,r){super(t,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function lEt(){const e=wd()?wd().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(Kl),pt(ai),pt(cEt,8))}}static{this.\u0275dir=me({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){1&n&&Ut("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},features:[xi([oEt]),yi]})}}return e})();function Bd(e){return null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}function hj(e){return null!=e&&"number"==typeof e.length}const ta=new te(""),Vd=new te(""),uEt=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class xu{static min(i){return function dj(e){return i=>{if(Bd(i.value)||Bd(e))return null;const t=parseFloat(i.value);return!isNaN(t)&&t{if(Bd(i.value)||Bd(e))return null;const t=parseFloat(i.value);return!isNaN(t)&&t>e?{max:{max:e,actual:i.value}}:null}}(i)}static required(i){return pj(i)}static requiredTrue(i){return function mj(e){return!0===e.value?null:{required:!0}}(i)}static email(i){return function gj(e){return Bd(e.value)||uEt.test(e.value)?null:{email:!0}}(i)}static minLength(i){return vj(i)}static maxLength(i){return function yj(e){return i=>hj(i.value)&&i.value.length>e?{maxlength:{requiredLength:e,actualLength:i.value.length}}:null}(i)}static pattern(i){return xj(i)}static nullValidator(i){return null}static compose(i){return Ej(i)}static composeAsync(i){return _j(i)}}function pj(e){return Bd(e.value)?{required:!0}:null}function vj(e){return i=>Bd(i.value)||!hj(i.value)?null:i.value.length{if(Bd(n.value))return null;const r=n.value;return i.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function sE(e){return null}function bj(e){return null!=e}function wj(e){return ux(e)?Zs(e):e}function Tj(e){let i={};return e.forEach(t=>{i=null!=t?{...i,...t}:i}),0===Object.keys(i).length?null:i}function Cj(e,i){return i.map(t=>t(e))}function Sj(e){return e.map(i=>function hEt(e){return!e.validate}(i)?i:t=>i.validate(t))}function Ej(e){if(!e)return null;const i=e.filter(bj);return 0==i.length?null:function(t){return Tj(Cj(t,i))}}function mk(e){return null!=e?Ej(Sj(e)):null}function _j(e){if(!e)return null;const i=e.filter(bj);return 0==i.length?null:function(t){return XW(Cj(t,i).map(wj)).pipe(Ri(Tj))}}function gk(e){return null!=e?_j(Sj(e)):null}function Aj(e,i){return null===e?[i]:Array.isArray(e)?[...e,i]:[e,i]}function Dj(e){return e._rawValidators}function Mj(e){return e._rawAsyncValidators}function vk(e){return e?Array.isArray(e)?e:[e]:[]}function aE(e,i){return Array.isArray(e)?e.includes(i):e===i}function Ij(e,i){const t=vk(i);return vk(e).forEach(r=>{aE(t,r)||t.push(r)}),t}function Rj(e,i){return vk(i).filter(t=>!aE(e,t))}class Pj{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=mk(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=gk(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,t){return!!this.control&&this.control.hasError(i,t)}getError(i,t){return this.control?this.control.getError(i,t):null}}class Xo extends Pj{get formDirective(){return null}get path(){return null}}class bu extends Pj{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class kj{constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}}let Yo=(()=>{class e extends kj{constructor(t){super(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(bu,2))}}static{this.\u0275dir=me({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){2&n&&Ci("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[yi]})}}return e})(),Cp=(()=>{class e extends kj{constructor(t){super(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(Xo,10))}}static{this.\u0275dir=me({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){2&n&&Ci("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[yi]})}}return e})();const nb="VALID",lE="INVALID",bv="PENDING",rb="DISABLED";class wv{}class Oj extends wv{constructor(i,t){super(),this.value=i,this.source=t}}class bk extends wv{constructor(i,t){super(),this.pristine=i,this.source=t}}class wk extends wv{constructor(i,t){super(),this.touched=i,this.source=t}}class cE extends wv{constructor(i,t){super(),this.status=i,this.source=t}}class gEt extends wv{constructor(i){super(),this.source=i}}class vEt extends wv{constructor(i){super(),this.source=i}}function Tk(e){return(uE(e)?e.validators:e)||null}function Ck(e,i){return(uE(i)?i.asyncValidators:e)||null}function uE(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Lj(e,i,t){const n=e.controls;if(!(i?Object.keys(n):n).length)throw new pe(1e3,"");if(!n[t])throw new pe(1001,"")}function Nj(e,i,t){e._forEachChild((n,r)=>{if(void 0===t[r])throw new pe(1002,"")})}class hE{constructor(i,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=rp(()=>this.statusReactive()),this.statusReactive=au(void 0),this._pristine=rp(()=>this.pristineReactive()),this.pristineReactive=au(!0),this._touched=rp(()=>this.touchedReactive()),this.touchedReactive=au(!1),this._events=new Fe,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(i),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return kc(this.statusReactive)}set status(i){kc(()=>this.statusReactive.set(i))}get valid(){return this.status===nb}get invalid(){return this.status===lE}get pending(){return this.status==bv}get disabled(){return this.status===rb}get enabled(){return this.status!==rb}get pristine(){return kc(this.pristineReactive)}set pristine(i){kc(()=>this.pristineReactive.set(i))}get dirty(){return!this.pristine}get touched(){return kc(this.touchedReactive)}set touched(i){kc(()=>this.touchedReactive.set(i))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(Ij(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(Ij(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(Rj(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(Rj(i,this._rawAsyncValidators))}hasValidator(i){return aE(this._rawValidators,i)}hasAsyncValidator(i){return aE(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){const t=!1===this.touched;this.touched=!0;const n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched({...i,sourceControl:n}),t&&!1!==i.emitEvent&&this._events.next(new wk(!0,n))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(i))}markAsUntouched(i={}){const t=!0===this.touched;this.touched=!1,this._pendingTouched=!1;const n=i.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:n})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,n),t&&!1!==i.emitEvent&&this._events.next(new wk(!1,n))}markAsDirty(i={}){const t=!0===this.pristine;this.pristine=!1;const n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty({...i,sourceControl:n}),t&&!1!==i.emitEvent&&this._events.next(new bk(!1,n))}markAsPristine(i={}){const t=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;const n=i.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,n),t&&!1!==i.emitEvent&&this._events.next(new bk(!0,n))}markAsPending(i={}){this.status=bv;const t=i.sourceControl??this;!1!==i.emitEvent&&(this._events.next(new cE(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending({...i,sourceControl:t})}disable(i={}){const t=this._parentMarkedDirty(i.onlySelf);this.status=rb,this.errors=null,this._forEachChild(r=>{r.disable({...i,onlySelf:!0})}),this._updateValue();const n=i.sourceControl??this;!1!==i.emitEvent&&(this._events.next(new Oj(this.value,n)),this._events.next(new cE(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...i,skipPristineCheck:t},this),this._onDisabledChange.forEach(r=>r(!0))}enable(i={}){const t=this._parentMarkedDirty(i.onlySelf);this.status=nb,this._forEachChild(n=>{n.enable({...i,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors({...i,skipPristineCheck:t},this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i,t){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){const n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===nb||this.status===bv)&&this._runAsyncValidator(n,i.emitEvent)}const t=i.sourceControl??this;!1!==i.emitEvent&&(this._events.next(new Oj(this.value,t)),this._events.next(new cE(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity({...i,sourceControl:t})}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?rb:nb}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,t){if(this.asyncValidator){this.status=bv,this._hasOwnPendingAsyncValidator={emitEvent:!1!==t};const n=wj(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();const i=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,t={}){this.errors=i,this._updateControlsErrors(!1!==t.emitEvent,this,t.shouldHaveEmitted)}get(i){let t=i;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(i,t){const n=t?this.get(t):this;return n&&n.errors?n.errors[i]:null}hasError(i,t){return!!this.getError(i,t)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,t,n){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||n)&&this._events.next(new cE(this.status,t)),this._parent&&this._parent._updateControlsErrors(i,t,n)}_initObservables(){this.valueChanges=new Oe,this.statusChanges=new Oe}_calculateStatus(){return this._allControlsDisabled()?rb:this.errors?lE:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(bv)?bv:this._anyControlsHaveStatus(lE)?lE:nb}_anyControlsHaveStatus(i){return this._anyControls(t=>t.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,t){const n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,t),r&&this._events.next(new bk(this.pristine,t))}_updateTouched(i={},t){this.touched=this._anyControlsTouched(),this._events.next(new wk(this.touched,t)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,t)}_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){uE(i)&&null!=i.updateOn&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){return!i&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=function yEt(e){return Array.isArray(e)?mk(e):e||null}(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=function xEt(e){return Array.isArray(e)?gk(e):e||null}(this._rawAsyncValidators)}}class Tv extends hE{constructor(i,t,n){super(Tk(t),Ck(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(i,t){return this.controls[i]?this.controls[i]:(this.controls[i]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(i,t,n={}){this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,t={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(i,t,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],t&&this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,t={}){Nj(this,0,i),Object.keys(i).forEach(n=>{Lj(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){null!=i&&(Object.keys(i).forEach(n=>{const r=this.controls[n];r&&r.patchValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i={},t={}){this._forEachChild((n,r)=>{n.reset(i?i[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(i,t,n)=>(i[n]=t.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(t,n)=>!!n._syncPendingControls()||t);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(t=>{const n=this.controls[t];n&&i(n,t)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(const[t,n]of Object.entries(this.controls))if(this.contains(t)&&i(n))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,n,r)=>((n.enabled||this.disabled)&&(t[r]=n.value),t))}_reduceChildren(i,t){let n=i;return this._forEachChild((r,s)=>{n=t(n,r,s)}),n}_allControlsDisabled(){for(const i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}}class Bj extends Tv{}const Sp=new te("CallSetDisabledState",{providedIn:"root",factory:()=>sb}),sb="always";function dE(e,i){return[...i.path,e]}function ab(e,i,t=sb){Sk(e,i),i.valueAccessor.writeValue(e.value),(e.disabled||"always"===t)&&i.valueAccessor.setDisabledState?.(e.disabled),function wEt(e,i){i.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&Vj(e,i)})}(e,i),function CEt(e,i){const t=(n,r)=>{i.valueAccessor.writeValue(n),r&&i.viewToModelUpdate(n)};e.registerOnChange(t),i._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,i),function TEt(e,i){i.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&Vj(e,i),"submit"!==e.updateOn&&e.markAsTouched()})}(e,i),function bEt(e,i){if(i.valueAccessor.setDisabledState){const t=n=>{i.valueAccessor.setDisabledState(n)};e.registerOnDisabledChange(t),i._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,i)}function fE(e,i,t=!0){const n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),mE(e,i),e&&(i._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function pE(e,i){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(i)})}function Sk(e,i){const t=Dj(e);null!==i.validator?e.setValidators(Aj(t,i.validator)):"function"==typeof t&&e.setValidators([t]);const n=Mj(e);null!==i.asyncValidator?e.setAsyncValidators(Aj(n,i.asyncValidator)):"function"==typeof n&&e.setAsyncValidators([n]);const r=()=>e.updateValueAndValidity();pE(i._rawValidators,r),pE(i._rawAsyncValidators,r)}function mE(e,i){let t=!1;if(null!==e){if(null!==i.validator){const r=Dj(e);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==i.validator);s.length!==r.length&&(t=!0,e.setValidators(s))}}if(null!==i.asyncValidator){const r=Mj(e);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==i.asyncValidator);s.length!==r.length&&(t=!0,e.setAsyncValidators(s))}}}const n=()=>{};return pE(i._rawValidators,n),pE(i._rawAsyncValidators,n),t}function Vj(e,i){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Uj(e,i){Sk(e,i)}function _k(e,i){if(!e.hasOwnProperty("model"))return!1;const t=e.model;return!!t.isFirstChange()||!Object.is(i,t.currentValue)}function zj(e,i){e._syncPendingControls(),i.forEach(t=>{const n=t.control;"submit"===n.updateOn&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Ak(e,i){if(!i)return null;let t,n,r;return Array.isArray(i),i.forEach(s=>{s.constructor===Pl?t=s:function _Et(e){return Object.getPrototypeOf(e.constructor)===Tp}(s)?n=s:r=s}),r||n||t||null}const DEt={provide:Xo,useExisting:kn(()=>Ep)},ob=Promise.resolve();let Ep=(()=>{class e extends Xo{get submitted(){return kc(this.submittedReactive)}constructor(t,n,r){super(),this.callSetDisabledState=r,this._submitted=rp(()=>this.submittedReactive()),this.submittedReactive=au(!1),this._directives=new Set,this.ngSubmit=new Oe,this.form=new Tv({},mk(t),gk(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){ob.then(()=>{const n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),ab(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){ob.then(()=>{const n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){ob.then(()=>{const n=this._findContainer(t.path),r=new Tv({});Uj(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){ob.then(()=>{const n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){ob.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submittedReactive.set(!0),zj(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static{this.\u0275fac=function(n){return new(n||e)(pt(ta,10),pt(Vd,10),pt(Sp,8))}}static{this.\u0275dir=me({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){1&n&&Ut("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[xi([DEt]),yi]})}}return e})();function Gj(e,i){const t=e.indexOf(i);t>-1&&e.splice(t,1)}function Hj(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}const Fs=class extends hE{constructor(i=null,t,n){super(Tk(t),Ck(n,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(i),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),uE(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=Hj(i)?i.value:i)}setValue(i,t={}){this.value=this._pendingValue=i,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(n=>n(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(i,t={}){this.setValue(i,t)}reset(i=this.defaultValue,t={}){this._applyFormState(i),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){Gj(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){Gj(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(i){Hj(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},MEt=Fs,PEt={provide:bu,useExisting:kn(()=>lc)},Xj=Promise.resolve();let lc=(()=>{class e extends bu{constructor(t,n,r,s,o,l){super(),this._changeDetectorRef=o,this.callSetDisabledState=l,this.control=new Fs,this._registered=!1,this.name="",this.update=new Oe,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Ak(0,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),_k(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){ab(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){Xj.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const n=t.isDisabled.currentValue,r=0!==n&&qe(n);Xj.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?dE(t,this._parent):[t]}static{this.\u0275fac=function(n){return new(n||e)(pt(Xo,9),pt(ta,10),pt(Vd,10),pt(va,10),pt(In,8),pt(Sp,8))}}static{this.\u0275dir=me({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[xi([PEt]),yi,lr]})}}return e})(),Cv=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return e})();const kEt={provide:va,useExisting:kn(()=>gE),multi:!0};let gE=(()=>{class e extends Tp{writeValue(t){this.setProperty("value",t??"")}registerOnChange(t){this.onChange=n=>{t(""==n?null:parseFloat(n))}}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){1&n&&Ut("input",function(o){return r.onChange(o.target.value)})("blur",function(){return r.onTouched()})},features:[xi([kEt]),yi]})}}return e})();const Dk=new te(""),NEt={provide:bu,useExisting:kn(()=>lb)};let lb=(()=>{class e extends bu{set isDisabled(t){}static{this._ngModelWarningSentOnce=!1}constructor(t,n,r,s,o){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=o,this.update=new Oe,this._ngModelWarningSent=!1,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=Ak(0,r)}ngOnChanges(t){if(this._isControlChanged(t)){const n=t.form.previousValue;n&&fE(n,this,!1),ab(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}_k(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&fE(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}static{this.\u0275fac=function(n){return new(n||e)(pt(ta,10),pt(Vd,10),pt(va,10),pt(Dk,8),pt(Sp,8))}}static{this.\u0275dir=me({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[xi([NEt]),yi,lr]})}}return e})();const BEt={provide:Xo,useExisting:kn(()=>wu)};let wu=(()=>{class e extends Xo{get submitted(){return kc(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}constructor(t,n,r){super(),this.callSetDisabledState=r,this._submitted=rp(()=>this._submittedReactive()),this._submittedReactive=au(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Oe,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(mE(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const n=this.form.get(t.path);return ab(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){fE(t.control||null,t,!1),function AEt(e,i){const t=e.indexOf(i);t>-1&&e.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this._submittedReactive.set(!0),zj(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new gEt(this.control)),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this._submittedReactive.set(!1),this.form._events.next(new vEt(this.form))}_updateDomValue(){this.directives.forEach(t=>{const n=t.control,r=this.form.get(t.path);n!==r&&(fE(n||null,t),(e=>e instanceof Fs)(r)&&(ab(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const n=this.form.get(t.path);Uj(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const n=this.form.get(t.path);n&&function SEt(e,i){return mE(e,i)}(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Sk(this.form,this),this._oldForm&&mE(this._oldForm,this)}_checkFormPresent(){}static{this.\u0275fac=function(n){return new(n||e)(pt(ta,10),pt(Vd,10),pt(Sp,8))}}static{this.\u0275dir=me({type:e,selectors:[["","formGroup",""]],hostBindings:function(n,r){1&n&&Ut("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[xi([BEt]),yi,lr]})}}return e})();const zEt={provide:bu,useExisting:kn(()=>Sv)};let Sv=(()=>{class e extends bu{set isDisabled(t){}static{this._ngModelWarningSentOnce=!1}constructor(t,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.name=null,this.update=new Oe,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Ak(0,s)}ngOnChanges(t){this._added||this._setUpControl(),_k(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return dE(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.\u0275fac=function(n){return new(n||e)(pt(Xo,13),pt(ta,10),pt(Vd,10),pt(va,10),pt(Dk,8))}}static{this.\u0275dir=me({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[xi([zEt]),yi,lr]})}}return e})();let _p=(()=>{class e{constructor(){this._validator=sE}ngOnChanges(t){if(this.inputName in t){const n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):sE,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,features:[lr]})}}return e})();const KEt={provide:ta,useExisting:kn(()=>vE),multi:!0};let vE=(()=>{class e extends _p{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=qe,this.createValidator=t=>pj}enabled(t){return t}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,r){2&n&&_i("required",r._enabled?"":null)},inputs:{required:"required"},features:[xi([KEt]),yi]})}}return e})();const qEt={provide:ta,useExisting:kn(()=>kk),multi:!0};let kk=(()=>{class e extends _p{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=t=>function Jj(e){return"number"==typeof e?e:parseInt(e,10)}(t),this.createValidator=t=>vj(t)}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(n,r){2&n&&_i("minlength",r._enabled?r.minlength:null)},inputs:{minlength:"minlength"},features:[xi([qEt]),yi]})}}return e})();const e_t={provide:ta,useExisting:kn(()=>xE),multi:!0};let xE=(()=>{class e extends _p{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>xj(t)}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(n,r){2&n&&_i("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},features:[xi([e_t]),yi]})}}return e})(),rX=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({})}}return e})();class sX extends hE{constructor(i,t,n){super(Tk(t),Ck(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(i){return this.controls[this._adjustIndex(i)]}push(i,t={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(i,t,n={}){this.controls.splice(i,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,t={}){let n=this._adjustIndex(i);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(i,t,n={}){let r=this._adjustIndex(i);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,t={}){Nj(this,0,i),i.forEach((n,r)=>{Lj(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){null!=i&&(i.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i=[],t={}){this._forEachChild((n,r)=>{n.reset(i[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((t,n)=>!!n._syncPendingControls()||t,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((t,n)=>{i(t,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(t=>t.enabled&&i(t))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(const i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}}function aX(e){return!!e&&(void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn)}let bE=(()=>{class e{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new e;return t.useNonNullable=!0,t}group(t,n=null){const r=this._reduceControls(t);let s={};return aX(n)?s=n:null!==n&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new Tv(r,s)}record(t,n=null){const r=this._reduceControls(t);return new Bj(r,n)}control(t,n,r){let s={};return this.useNonNullable?(aX(n)?s=n:(s.validators=n,s.asyncValidators=r),new Fs(t,{...s,nonNullable:!0})):new Fs(t,n,r)}array(t,n,r){const s=t.map(o=>this._createControl(o));return new sX(s,n,r)}_reduceControls(t){const n={};return Object.keys(t).forEach(r=>{n[r]=this._createControl(t[r])}),n}_createControl(t){return t instanceof Fs||t instanceof hE?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Fk=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:Sp,useValue:t.callSetDisabledState??sb}]}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rX]})}}return e})(),i_t=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:Dk,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Sp,useValue:t.callSetDisabledState??sb}]}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rX]})}}return e})();class r_t{constructor(i){this._box=i,this._destroyed=new Fe,this._resizeSubject=new Fe,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(i){return this._elementObservables.has(i)||this._elementObservables.set(i,new dr(t=>{const n=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(i,{box:this._box}),()=>{this._resizeObserver?.unobserve(i),n.unsubscribe(),this._elementObservables.delete(i)}}).pipe(Ln(t=>t.some(n=>n.target===i)),function n_t(e,i,t){let n,r=!1;return e&&"object"==typeof e?({bufferSize:n=1/0,windowTime:i=1/0,refCount:r=!1,scheduler:t}=e):n=e??1/0,YW({connector:()=>new Lx(n,i,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}({bufferSize:1,refCount:!0}),Yi(this._destroyed))),this._elementObservables.get(i)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}}let oX=(()=>{class e{constructor(){this._observers=new Map,this._ngZone=Jt(li)}ngOnDestroy(){for(const[,t]of this._observers)t.destroy();this._observers.clear()}observe(t,n){const r=n?.box||"content-box";return this._observers.has(r)||this._observers.set(r,new r_t(r)),this._observers.get(r).observe(t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const s_t=["notch"],a_t=["matFormFieldNotchedOutline",""],o_t=["*"],l_t=["textField"],c_t=["iconPrefixContainer"],u_t=["textPrefixContainer"],h_t=["iconSuffixContainer"],d_t=["textSuffixContainer"],f_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],p_t=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function m_t(e,i){1&e&&ye(0,"span",21)}function g_t(e,i){if(1&e&&(J(0,"label",20),Si(1,1),Ht(2,m_t,1,0,"span",21),et()),2&e){const t=St(2);vt("floating",t._shouldLabelFloat())("monitorResize",t._hasOutline())("id",t._labelId),_i("for",t._control.disableAutomaticLabeling?null:t._control.id),ot(2),Tn(!t.hideRequiredMarker&&t._control.required?2:-1)}}function v_t(e,i){1&e&&Ht(0,g_t,3,5,"label",20),2&e&&Tn(St()._hasFloatingLabel()?0:-1)}function y_t(e,i){1&e&&ye(0,"div",7)}function x_t(e,i){}function b_t(e,i){1&e&&Ht(0,x_t,0,0,"ng-template",13),2&e&&(St(2),vt("ngTemplateOutlet",Zi(1)))}function w_t(e,i){if(1&e&&(J(0,"div",9),Ht(1,b_t,1,1,null,13),et()),2&e){const t=St();vt("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat()),ot(),Tn(t._forceDisplayInfixLabel()?-1:1)}}function T_t(e,i){1&e&&(J(0,"div",10,2),Si(2,2),et())}function C_t(e,i){1&e&&(J(0,"div",11,3),Si(2,3),et())}function S_t(e,i){}function E_t(e,i){1&e&&Ht(0,S_t,0,0,"ng-template",13),2&e&&(St(),vt("ngTemplateOutlet",Zi(1)))}function __t(e,i){1&e&&(J(0,"div",14,4),Si(2,4),et())}function A_t(e,i){1&e&&(J(0,"div",15,5),Si(2,5),et())}function D_t(e,i){1&e&&ye(0,"div",16)}function M_t(e,i){1&e&&(J(0,"div",18),Si(1,6),et()),2&e&&vt("@transitionMessages",St()._subscriptAnimationState)}function I_t(e,i){if(1&e&&(J(0,"mat-hint",22),ut(1),et()),2&e){const t=St(2);vt("id",t._hintLabelId),ot(),Ke(t.hintLabel)}}function R_t(e,i){if(1&e&&(J(0,"div",19),Ht(1,I_t,2,2,"mat-hint",22),Si(2,7),ye(3,"div",23),Si(4,8),et()),2&e){const t=St();vt("@transitionMessages",t._subscriptAnimationState),ot(),Tn(t.hintLabel?1:-1)}}let ll=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["mat-label"]],standalone:!0})}}return e})(),P_t=0;const lX=new te("MatError");let cX=(()=>{class e{constructor(t,n){this.id="mat-mdc-error-"+P_t++,t||n.nativeElement.setAttribute("aria-live","polite")}static{this.\u0275fac=function(n){return new(n||e)(wl("aria-live"),pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(n,r){2&n&&uu("id",r.id)},inputs:{id:"id"},standalone:!0,features:[xi([{provide:lX,useExisting:e}])]})}}return e})(),k_t=0,Ud=(()=>{class e{constructor(){this.align="start",this.id="mat-mdc-hint-"+k_t++}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(n,r){2&n&&(uu("id",r.id),_i("align",null),Ci("mat-mdc-form-field-hint-end","end"===r.align))},inputs:{align:"align",id:"id"},standalone:!0})}}return e})();const F_t=new te("MatPrefix"),uX=new te("MatSuffix");let hX=(()=>{class e{constructor(){this._isText=!1}set _isTextSelector(t){this._isText=!0}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},standalone:!0,features:[xi([{provide:uX,useExisting:e}])]})}}return e})();const dX=new te("FloatingLabelParent");let fX=(()=>{class e{get floating(){return this._floating}set floating(t){this._floating=t,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(t){this._monitorResize=t,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(t){this._elementRef=t,this._floating=!1,this._monitorResize=!1,this._resizeObserver=Jt(oX),this._ngZone=Jt(li),this._parent=Jt(dX),this._resizeSubscription=new Pe}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return function O_t(e){if(null!==e.offsetParent)return e.scrollWidth;const t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);const n=t.scrollWidth;return t.remove(),n}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static{this.\u0275fac=function(n){return new(n||e)(pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(n,r){2&n&&Ci("mdc-floating-label--float-above",r.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0})}}return e})();const pX="mdc-line-ripple--active",wE="mdc-line-ripple--deactivating";let mX=(()=>{class e{constructor(t,n){this._elementRef=t,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(wE);"opacity"===r.propertyName&&o&&s.remove(pX,wE)},n.runOutsideAngular(()=>{t.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const t=this._elementRef.nativeElement.classList;t.remove(wE),t.add(pX)}deactivate(){this._elementRef.nativeElement.classList.add(wE)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(li))}}static{this.\u0275dir=me({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0})}}return e})(),gX=(()=>{class e{constructor(t,n){this._elementRef=t,this._ngZone=n,this.open=!1}ngAfterViewInit(){const t=this._elementRef.nativeElement.querySelector(".mdc-floating-label");t?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(t){this._notch.nativeElement.style.width=this.open&&t?`calc(${t}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:""}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(li))}}static{this.\u0275cmp=Ge({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(n,r){if(1&n&&ki(s_t,5),2&n){let s;He(s=We())&&(r._notch=s.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(n,r){2&n&&Ci("mdc-notched-outline--notched",r.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[Wi],attrs:a_t,ngContentSelectors:o_t,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(n,r){1&n&&(nr(),ye(0,"div",1),J(1,"div",2,0),Si(3),et(),ye(4,"div",3))},encapsulation:2,changeDetection:0})}}return e})();const L_t={transitionMessages:xr("transitionMessages",[Bn("enter",oi({opacity:1,transform:"translateY(0%)"})),gn("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),mn("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let TE=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e})}}return e})();const CE=new te("MatFormField"),N_t=new te("MAT_FORM_FIELD_DEFAULT_OPTIONS");let vX=0,kl=(()=>{class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=pa(t)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(t){const n=this._appearance;this._appearance=t||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==n&&(this._needsOutlineLabelOffsetUpdate=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(t){this._subscriptSizing=t||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(t){this._explicitFormFieldControl=t}constructor(t,n,r,s,o,l,w,E){this._elementRef=t,this._changeDetectorRef=n,this._dir=s,this._platform=o,this._defaults=l,this._animationMode=w,this._labelChild=kht(ll),this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+vX++,this._hintLabelId="mat-mdc-hint-"+vX++,this._subscriptAnimationState="",this._destroyed=new Fe,this._isFocused=null,this._needsOutlineLabelOffsetUpdate=!1,this._previousControl=null,this._injector=Jt(On),this.getLabelId=rp(()=>this._hasFloatingLabel()?this._labelId:null),this._hasFloatingLabel=rp(()=>!!this._labelChild()),l&&(l.appearance&&(this.appearance=l.appearance),this._hideRequiredMarker=!!l?.hideRequiredMarker,l.color&&(this.color=l.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._previousControl=this._control)}ngOnDestroy(){this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(t){const n=this._control,r="mat-mdc-form-field-type-";t&&this._elementRef.nativeElement.classList.remove(r+t.controlType),n.controlType&&this._elementRef.nativeElement.classList.add(r+n.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=n.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._valueChanges?.unsubscribe(),n.ngControl&&n.ngControl.valueChanges&&(this._valueChanges=n.ngControl.valueChanges.pipe(Yi(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(t=>!t._isText),this._hasTextPrefix=!!this._prefixChildren.find(t=>t._isText),this._hasIconSuffix=!!this._suffixChildren.find(t=>!t._isText),this._hasTextSuffix=!!this._suffixChildren.find(t=>t._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),qr(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),o2(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(Yi(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_shouldLabelFloat(){return!!this._hasFloatingLabel()&&(this._control.shouldLabelFloat||this._shouldAlwaysFloat())}_shouldForward(t){const n=this._control?this._control.ngControl:null;return n&&n[t]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){this._hasOutline()&&this._floatingLabel&&this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth()):this._notchedOutline?._setNotchWidth(0)}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const n=this._hintChildren?this._hintChildren.find(s=>"start"===s.align):null,r=this._hintChildren?this._hintChildren.find(s=>"end"===s.align):null;n?t.push(n.id):this._hintLabel&&t.push(this._hintLabelId),r&&t.push(r.id)}else this._errorChildren&&t.push(...this._errorChildren.map(n=>n.id));this._control.setDescribedByIds(t)}}_updateOutlineLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return;const t=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(t.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdate=!0);const n=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,s=this._iconSuffixContainer?.nativeElement,o=this._textSuffixContainer?.nativeElement,l=n?.getBoundingClientRect().width??0,w=r?.getBoundingClientRect().width??0,E=s?.getBoundingClientRect().width??0,D=o?.getBoundingClientRect().width??0;t.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${l+w}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`,this._elementRef.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${l+w+E+D}px)`)}_isAttachedToDom(){const t=this._elementRef.nativeElement;if(t.getRootNode){const n=t.getRootNode();return n&&n!==t}return document.documentElement.contains(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(In),pt(li),pt(Ya),pt(cr),pt(N_t,8),pt(Hr,8),pt(Gi))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-form-field"]],contentQueries:function(n,r,s){if(1&n&&(H6(s,r._labelChild,ll,5),Hn(s,TE,5),Hn(s,F_t,5),Hn(s,uX,5),Hn(s,lX,5),Hn(s,Ud,5)),2&n){let o;(function W6(e=1){iT(wM()+e)})(),He(o=We())&&(r._formFieldControl=o.first),He(o=We())&&(r._prefixChildren=o),He(o=We())&&(r._suffixChildren=o),He(o=We())&&(r._errorChildren=o),He(o=We())&&(r._hintChildren=o)}},viewQuery:function(n,r){if(1&n&&(ki(l_t,5),ki(c_t,5),ki(u_t,5),ki(h_t,5),ki(d_t,5),ki(fX,5),ki(gX,5),ki(mX,5)),2&n){let s;He(s=We())&&(r._textField=s.first),He(s=We())&&(r._iconPrefixContainer=s.first),He(s=We())&&(r._textPrefixContainer=s.first),He(s=We())&&(r._iconSuffixContainer=s.first),He(s=We())&&(r._textSuffixContainer=s.first),He(s=We())&&(r._floatingLabel=s.first),He(s=We())&&(r._notchedOutline=s.first),He(s=We())&&(r._lineRipple=s.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(n,r){2&n&&Ci("mat-mdc-form-field-label-always-float",r._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",r._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",r._hasIconSuffix)("mat-form-field-invalid",r._control.errorState)("mat-form-field-disabled",r._control.disabled)("mat-form-field-autofilled",r._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===r._animationMode)("mat-form-field-appearance-fill","fill"==r.appearance)("mat-form-field-appearance-outline","outline"==r.appearance)("mat-form-field-hide-placeholder",r._hasFloatingLabel()&&!r._shouldLabelFloat())("mat-focused",r._control.focused)("mat-primary","accent"!==r.color&&"warn"!==r.color)("mat-accent","accent"===r.color)("mat-warn","warn"===r.color)("ng-untouched",r._shouldForward("untouched"))("ng-touched",r._shouldForward("touched"))("ng-pristine",r._shouldForward("pristine"))("ng-dirty",r._shouldForward("dirty"))("ng-valid",r._shouldForward("valid"))("ng-invalid",r._shouldForward("invalid"))("ng-pending",r._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[xi([{provide:CE,useExisting:e},{provide:dX,useExisting:e}]),Wi],ngContentSelectors:p_t,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(n,r){if(1&n){const s=xe();nr(f_t),Ht(0,v_t,1,1,"ng-template",null,0,zg),J(2,"div",6,1),Ut("click",function(l){return zt(s),Gt(r._control.onContainerClick(l))}),Ht(4,y_t,1,0,"div",7),J(5,"div",8),Ht(6,w_t,2,2,"div",9)(7,T_t,3,0,"div",10)(8,C_t,3,0,"div",11),J(9,"div",12),Ht(10,E_t,1,1,null,13),Si(11),et(),Ht(12,__t,3,0,"div",14)(13,A_t,3,0,"div",15),et(),Ht(14,D_t,1,0,"div",16),et(),J(15,"div",17),Ht(16,M_t,2,1,"div",18)(17,R_t,5,2,"div",19),et()}if(2&n){let s;ot(2),Ci("mdc-text-field--filled",!r._hasOutline())("mdc-text-field--outlined",r._hasOutline())("mdc-text-field--no-label",!r._hasFloatingLabel())("mdc-text-field--disabled",r._control.disabled)("mdc-text-field--invalid",r._control.errorState),ot(2),Tn(r._hasOutline()||r._control.disabled?-1:4),ot(2),Tn(r._hasOutline()?6:-1),ot(),Tn(r._hasIconPrefix?7:-1),ot(),Tn(r._hasTextPrefix?8:-1),ot(2),Tn(!r._hasOutline()||r._forceDisplayInfixLabel()?10:-1),ot(2),Tn(r._hasTextSuffix?12:-1),ot(),Tn(r._hasIconSuffix?13:-1),ot(),Tn(r._hasOutline()?-1:14),ot(),Ci("mat-mdc-form-field-subscript-dynamic-size","dynamic"===r.subscriptSizing),ot(),Tn("error"===(s=r._getDisplayedMessages())?16:"hint"===s?17:-1)}},dependencies:[fX,gX,jC,mX,Ud],styles:['.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color, var(--mat-app-on-surface));caret-color:var(--mdc-filled-text-field-caret-color, var(--mat-app-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color, var(--mat-app-on-surface));caret-color:var(--mdc-outlined-text-field-caret-color, var(--mat-app-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--disabled .cdk-high-contrast-active .mdc-text-field__input{background-color:Window}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape, var(--mat-app-corner-extra-small-top));border-top-right-radius:var(--mdc-filled-text-field-container-shape, var(--mat-app-corner-extra-small-top))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color, var(--mat-app-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.cdk-high-contrast-active .mdc-text-field--disabled .mdc-floating-label{z-index:1}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-app-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color, var(--mat-app-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color, var(--mat-app-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font, var(--mat-app-body-large-font));font-size:var(--mdc-filled-text-field-label-text-size, var(--mat-app-body-large-size));font-weight:var(--mdc-filled-text-field-label-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mdc-filled-text-field-label-text-tracking, var(--mat-app-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color, var(--mat-app-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color, var(--mat-app-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color, var(--mat-app-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color, var(--mat-app-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color, var(--mat-app-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font, var(--mat-app-body-large-font));font-size:var(--mdc-outlined-text-field-label-text-size, var(--mat-app-body-large-size));font-weight:var(--mdc-outlined-text-field-label-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, var(--mat-app-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color, var(--mat-app-outline));border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color, var(--mat-app-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color, var(--mat-app-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color, var(--mat-app-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-app-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-app-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),100% - max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)))*2)}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none;--mat-form-field-notch-max-width: 100%}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color, var(--mat-app-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color, var(--mat-app-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color, var(--mat-app-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color, var(--mat-app-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color, var(--mat-app-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-app-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-app-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-app-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-app-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-app-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-app-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-app-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-app-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-app-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-app-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-app-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-app-body-large-weight))}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-app-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-app-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-app-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-app-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-app-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[L_t.transitionMessages]},changeDetection:0})}}return e})(),SE=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,hu,EP,rn]})}}return e})();const U_t=["panel"],z_t=["*"];function G_t(e,i){if(1&e){const t=xe();J(0,"div",1,0),Ut("@panelAnimation.done",function(r){return zt(t),Gt(St()._animationDone.next(r))}),Si(2),et()}if(2&e){const t=i.id,n=St();oo(n._classList),Ci("mat-mdc-autocomplete-visible",n.showPanel)("mat-mdc-autocomplete-hidden",!n.showPanel)("mat-primary","primary"===n._color)("mat-accent","accent"===n._color)("mat-warn","warn"===n._color),vt("id",n.id)("@panelAnimation",n.isOpen?"visible":"hidden"),_i("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(t))}}const H_t=xr("panelAnimation",[Bn("void, hidden",oi({opacity:0,transform:"scaleY(0.8)"})),gn(":enter, hidden => visible",[UP([mn("0.03s linear",oi({opacity:1})),mn("0.12s cubic-bezier(0, 0, 0.2, 1)",oi({transform:"scaleY(1)"}))])]),gn(":leave, visible => hidden",[mn("0.075s linear",oi({opacity:0}))])]);let W_t=0;class j_t{constructor(i,t){this.source=i,this.option=t}}const bX=new te("mat-autocomplete-default-options",{providedIn:"root",factory:function X_t(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}});let Y_t=(()=>{class e{get isOpen(){return this._isOpen&&this.showPanel}_setColor(t){this._color=t,this._changeDetectorRef.markForCheck()}set classList(t){this._classList=t,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}constructor(t,n,r,s){this._changeDetectorRef=t,this._elementRef=n,this._defaults=r,this._activeOptionChanges=Pe.EMPTY,this._animationDone=new Oe,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new Oe,this.opened=new Oe,this.closed=new Oe,this.optionActivated=new Oe,this.id="mat-autocomplete-"+W_t++,this.inertGroups=s?.SAFARI||!1,this.autoActiveFirstOption=!!r.autoActiveFirstOption,this.autoSelectActiveOption=!!r.autoSelectActiveOption,this.requireSelection=!!r.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new Y7(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){const n=new j_t(this,t);this.optionSelected.emit(n)}_getPanelAriaLabelledby(t){return this.ariaLabel?null:this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_skipPredicate(){return!1}static{this.\u0275fac=function(n){return new(n||e)(pt(In),pt(ai),pt(bX),pt(cr))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(n,r,s){if(1&n&&(Hn(s,hh,5),Hn(s,FP,5)),2&n){let o;He(o=We())&&(r.options=o),He(o=We())&&(r.optionGroups=o)}},viewQuery:function(n,r){if(1&n&&(ki(yr,7),ki(U_t,5)),2&n){let s;He(s=We())&&(r.template=s.first),He(s=We())&&(r.panel=s.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",qe],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",qe],requireSelection:[2,"requireSelection","requireSelection",qe],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",qe],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",qe]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[xi([{provide:kP,useExisting:e}]),vn,Wi],ngContentSelectors:z_t,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(n,r){1&n&&(nr(),Ht(0,G_t,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-app-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color, var(--mat-app-surface-container))}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[H_t]},changeDetection:0})}}return e})();const $_t={provide:va,useExisting:kn(()=>TX),multi:!0},wX=new te("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{const e=Jt(Ss);return()=>e.scrollStrategies.reposition()}}),K_t={provide:wX,deps:[Ss],useFactory:function Q_t(e){return()=>e.scrollStrategies.reposition()}};let TX=(()=>{class e{constructor(t,n,r,s,o,l,w,E,D,k,O){this._element=t,this._overlay=n,this._viewContainerRef=r,this._zone=s,this._changeDetectorRef=o,this._dir=w,this._formField=E,this._document=D,this._viewportRuler=k,this._defaults=O,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=Pe.EMPTY,this._breakpointObserver=Jt(_P),this._handsetLandscapeSubscription=Pe.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Fe,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new Fe,this._injector=Jt(On),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=$g(()=>{const L=this.autocomplete?this.autocomplete.options:null;return L?L.changes.pipe(Ma(L),ks(()=>qr(...L.map(U=>U.onSelectionChange)))):this._initialized.pipe(ks(()=>this.optionSelections))}),this._handlePanelKeydown=L=>{(27===L.keyCode&&!co(L)||38===L.keyCode&&co(L,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),L.stopPropagation(),L.preventDefault())},this._trackedModal=null,this._scrollStrategy=l}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();const t=this._getWindow();typeof t<"u"&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const t=this._getWindow();typeof t<"u"&&t.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&hv(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return qr(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Ln(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Ln(()=>this._overlayAttached)):wi()).pipe(Ri(t=>t instanceof pW?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return qr(Bc(this._document,"click"),Bc(this._document,"auxclick"),Bc(this._document,"touchend")).pipe(Ln(t=>{const n=Wo(t),r=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,s=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&n!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(n))&&(!s||!s.contains(n))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(n)}))}writeValue(t){Promise.resolve(null).then(()=>this._assignOptionValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){const n=t.keyCode,r=co(t);if(27===n&&!r&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&13===n&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){const s=this.autocomplete._keyManager.activeItem,o=38===n||40===n;9===n||o&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):o&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(o||this.autocomplete._keyManager.activeItem!==s)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(t){let n=t.target,r=n.value;if("number"===n.type&&(r=""==r?null:parseFloat(r)),this._previousValue!==r){if(this._previousValue=r,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(r),r){if(this.panelOpen&&!this.autocomplete.requireSelection){const s=this.autocomplete.options?.find(o=>o.selected);s&&r!==this._getDisplayValue(s.value)&&s.deselect(!1)}}else this._clearPreviousSelectedOption(null,!1);if(this._canOpen()&&this._document.activeElement===t.target){const s=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(s)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(t=!1){this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){return qr(new dr(r=>{ao(()=>{r.next()},{injector:this._injector})}),this.autocomplete.options.changes.pipe(cs(()=>this._positionStrategy.reapplyLastPosition()),QP(0))).pipe(ks(()=>this._zone.run(()=>{const r=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),xs(1)).subscribe(r=>this._setValueAndClose(r))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(t){const n=this.autocomplete;return n&&n.displayWith?n.displayWith(t):t}_assignOptionValue(t){const n=this._getDisplayValue(t);null==t&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(n??"")}_updateNativeInputValue(t){this._formField?this._formField._control.value=t:this._element.nativeElement.value=t,this._previousValue=t}_setValueAndClose(t){const n=this.autocomplete,r=t?t.source:this._pendingAutoselectedOption;r?(this._clearPreviousSelectedOption(r),this._assignOptionValue(r.value),this._onChange(r.value),n._emitSelectEvent(r),this._element.nativeElement.focus()):n.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),n._animationDone?n._animationDone.pipe(xs(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(t,n){this.autocomplete?.options?.forEach(r=>{r!==t&&r.selected&&r.deselect(n)})}_openPanelInternal(t=this._element.nativeElement.value){this._attachOverlay(t),this._floatLabel(),this._trackedModal&&MS(this._trackedModal,"aria-owns",this.autocomplete.id)}_attachOverlay(t){let n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new fh(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&n&&n.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe("(max-width: 959.98px) and (orientation: landscape)").subscribe(s=>{s.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),n&&!n.hasAttached()&&(n.attach(this._portal),this._valueOnAttach=t,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());const r=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&r!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){const t=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=t.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=t.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new vv({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){const t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){const n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,s=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}];let o;o="above"===this.position?s:"below"===this.position?n:[...n,...s],t.withPositions(o)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const t=this.autocomplete;if(t.autoActiveFirstOption){let n=-1;for(let r=0;r .cdk-overlay-container [aria-modal="true"]');if(!t)return;const n=this.autocomplete.id;this._trackedModal&&hv(this._trackedModal,"aria-owns",n),MS(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){this._trackedModal&&(hv(this._trackedModal,"aria-owns",this.autocomplete.id),this._trackedModal=null)}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(Ss),pt(Or),pt(li),pt(In),pt(wX),pt(Ya,8),pt(CE,9),pt(Gi,8),pt(mh),pt(bX,8))}}static{this.\u0275dir=me({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(n,r){1&n&&Ut("focusin",function(){return r._handleFocus()})("blur",function(){return r._onTouched()})("input",function(o){return r._handleInput(o)})("keydown",function(o){return r._handleKeydown(o)})("click",function(){return r._handleClick()}),2&n&&_i("autocomplete",r.autocompleteAttribute)("role",r.autocompleteDisabled?null:"combobox")("aria-autocomplete",r.autocompleteDisabled?null:"list")("aria-activedescendant",r.panelOpen&&r.activeOption?r.activeOption.id:null)("aria-expanded",r.autocompleteDisabled?null:r.panelOpen.toString())("aria-controls",r.autocompleteDisabled||!r.panelOpen||null==r.autocomplete?null:r.autocomplete.id)("aria-haspopup",r.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",qe]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[xi([$_t]),vn,lr]})}}return e})(),Z_t=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[K_t],imports:[xp,BS,rn,hu,gh,BS,rn]})}}return e})();const CX=rc({passive:!0});let J_t=(()=>{class e{constructor(t,n){this._platform=t,this._ngZone=n,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return al;const n=uo(t),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Fe,o="cdk-text-field-autofilled",l=w=>{"cdk-text-field-autofill-start"!==w.animationName||n.classList.contains(o)?"cdk-text-field-autofill-end"===w.animationName&&n.classList.contains(o)&&(n.classList.remove(o),this._ngZone.run(()=>s.next({target:w.target,isAutofilled:!1}))):(n.classList.add(o),this._ngZone.run(()=>s.next({target:w.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{n.addEventListener("animationstart",l,CX),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",l,CX)}}),s}stopMonitoring(t){const n=uo(t),r=this._monitoredElements.get(n);r&&(r.unlisten(),r.subject.complete(),n.classList.remove("cdk-text-field-autofill-monitored"),n.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(n))}ngOnDestroy(){this._monitoredElements.forEach((t,n)=>this.stopMonitoring(n))}static{this.\u0275fac=function(n){return new(n||e)(re(cr),re(li))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),q_t=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({})}}return e})();const tAt=new te("MAT_INPUT_VALUE_ACCESSOR"),eAt=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let iAt=0,Eh=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=pa(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(xu.required)??!1}set required(t){this._required=pa(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&R7().has(this._type)&&(this._elementRef.nativeElement.type=this._type),this._ensureWheelDefaultBehavior()}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=pa(t)}get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}constructor(t,n,r,s,o,l,w,E,D,k){this._elementRef=t,this._platform=n,this.ngControl=r,this._autofillMonitor=E,this._ngZone=D,this._formField=k,this._uid="mat-input-"+iAt++,this._webkitBlinkWheelListenerAttached=!1,this.focused=!1,this.stateChanges=new Fe,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(U=>R7().has(U)),this._iOSKeyupListener=U=>{const j=U.target;!j.value&&0===j.selectionStart&&0===j.selectionEnd&&(j.setSelectionRange(1,1),j.setSelectionRange(0,0))},this._webkitBlinkWheelListener=()=>{};const O=this._elementRef.nativeElement,L=O.nodeName.toLowerCase();this._inputValueAccessor=w||O,this._previousNativeValue=this.value,this.id=this.id,n.IOS&&D.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._errorStateTracker=new PP(l,r,o,s,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===L,this._isTextarea="textarea"===L,this._isInFormField=!!k,this._isNativeSelect&&(this.controlType=O.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener),this._webkitBlinkWheelListenerAttached&&this._elementRef.nativeElement.removeEventListener("wheel",this._webkitBlinkWheelListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(t){t!==this.focused&&(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_dirtyCheckPlaceholder(){const t=this._getPlaceholder();if(t!==this._previousPlaceholder){const n=this._elementRef.nativeElement;this._previousPlaceholder=t,t?n.setAttribute("placeholder",t):n.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){eAt.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,n=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&n&&n.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const t=this._elementRef.nativeElement;return this._isNativeSelect&&(t.multiple||t.size>1)}_ensureWheelDefaultBehavior(){!this._webkitBlinkWheelListenerAttached&&"number"===this._type&&(this._platform.BLINK||this._platform.WEBKIT)&&(this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("wheel",this._webkitBlinkWheelListener)}),this._webkitBlinkWheelListenerAttached=!0),this._webkitBlinkWheelListenerAttached&&"number"!==this._type&&(this._elementRef.nativeElement.removeEventListener("wheel",this._webkitBlinkWheelListener),this._webkitBlinkWheelListenerAttached=!0)}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(cr),pt(bu,10),pt(Ep,8),pt(wu,8),pt(oW),pt(tAt,10),pt(J_t),pt(li),pt(CE,8))}}static{this.\u0275dir=me({type:e,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(n,r){1&n&&Ut("focus",function(){return r._focusChanged(!0)})("blur",function(){return r._focusChanged(!1)})("input",function(){return r._onInput()}),2&n&&(uu("id",r.id)("disabled",r.disabled)("required",r.required),_i("name",r.name||null)("readonly",r.readonly&&!r._isNativeSelect||null)("aria-invalid",r.empty&&r.required?null:r.errorState)("aria-required",r.required)("id",r.id),Ci("mat-input-server",r._isServer)("mat-mdc-form-field-textarea-control",r._isInFormField&&r._isTextarea)("mat-mdc-form-field-input-control",r._isInFormField)("mdc-text-field__input",r._isInFormField)("mat-mdc-native-select-inline",r._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],standalone:!0,features:[xi([{provide:TE,useExisting:e}]),lr]})}}return e})(),nAt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,SE,SE,q_t,rn]})}}return e})();function rAt(e,i){if(1&e&&(J(0,"mat-label"),ut(1),et()),2&e){const t=St();ot(),Ke(t.binding.title)}}function sAt(e,i){if(1&e){const t=xe();J(0,"button",7),Ut("click",function(){return zt(t),Gt(St().clearInput())}),J(1,"mat-icon"),ut(2,"close"),et()()}}function aAt(e,i){1&e&&(J(0,"mat-option",8),ye(1,"mat-spinner",9),et())}function oAt(e,i){if(1&e&&(J(0,"mat-option",10)(1,"span",11),ut(2),et(),ut(3),et()),2&e){const t=i.$implicit;vt("value",t),ot(2),Ke(t.code),ot(),Je("",t.display," ")}}let Ev=(()=>{class e{static{this.nextId=0}constructor(t){this.terminologyService=t,this.term="",this.selectionChange=new Oe,this.formControl=new MEt,this.loading=!1,this.selectedConcept={},this.stateChanges=new Fe,this.focused=!1,this.ngControl=null,this.errorState=!1,this.controlType="app-autocomplete-binding",this.id="app-autocomplete-binding-"+e.nextId++,this.describedBy="",this.onChange=()=>{},this.onTouched=()=>{}}get empty(){return!this.formControl.value}setDescribedByIds(t){this.describedBy=t.join(" ")}onContainerClick(t){}writeValue(t){this.formControl.setValue(t&&"object"==typeof t&&t.display?t.display:t,{emitEvent:!1})}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}ngOnChanges(t){t.term&&(this.term=t.term.currentValue,this.formControl.setValue(this.term&&"object"==typeof this.term&&this.term.display?this.term.display:this.term))}ngOnInit(){this.autoFilter=this.formControl.valueChanges.pipe(vu(300),mp(),ks(t=>t?.length>=3?(this.loading=!0,this.terminologyService.expandValueSet(this.binding.ecl,t,0,50)):wi([])),cs(t=>{this.loading=!1}))}onTermChange(){this.formControl.setValue(this.term)}optionSelected(t){this.selectedConcept=t,this.selectionChange.emit(t),this.onChange(t)}clearInput(){this.formControl.reset(),this.selectedConcept={code:"",display:""},this.selectionChange.emit(this.selectedConcept)}change(t){const n=t?.option?.value;n&&(this.optionSelected({code:n.code,display:n.display}),this.formControl.setValue(n.display))}static{this.\u0275fac=function(n){return new(n||e)(pt(ma))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-autocomplete-binding"]],inputs:{binding:"binding",term:"term"},outputs:{selectionChange:"selectionChange"},features:[xi([{provide:va,useExisting:kn(()=>e),multi:!0},{provide:TE,useExisting:e}]),lr],decls:11,vars:10,consts:[["auto","matAutocomplete"],[4,"ngIf"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["autoActiveFirstOption","",3,"optionSelected"],["disabled","","class","loading",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["disabled","",1,"loading"],["diameter","35"],[3,"value"],[1,"code"]],template:function(n,r){if(1&n){const s=xe();J(0,"mat-form-field"),Ht(1,rAt,2,1,"mat-label",1),ye(2,"input",2),J(3,"mat-hint"),ut(4),et(),Ht(5,sAt,3,0,"button",3),J(6,"mat-autocomplete",4,0),Ut("optionSelected",function(l){return zt(s),Gt(r.change(l))}),Ht(8,aAt,2,0,"mat-option",5)(9,oAt,4,3,"mat-option",6),vs(10,"async"),et()()}if(2&n){let s;const o=Zi(7);ot(),vt("ngIf",r.binding.title),ot(),yd("placeholder",(null==r.formControl.value?null:r.formControl.value.display)||r.binding.title||"Search..."),vt("formControl",r.formControl)("matAutocomplete",o),ot(2),Ke(r.binding.note),ot(),vt("ngIf",r.formControl.value),ot(3),vt("ngIf",r.loading),ot(),vt("ngForOf",null==(s=Jl(10,8,r.autoFilter))||null==s.expansion?null:s.expansion.contains)}},dependencies:[ys,ls,jo,ga,kl,ll,Ud,hX,Y_t,hh,TX,Pd,Eh,Pl,Yo,lb,fR],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}.id-icon[_ngcontent-%COMP%]{margin-left:10px;color:#2e8b57}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return e})();function lAt(e,i){1&e&&ye(0,"mat-spinner",20)}function cAt(e,i){1&e&&(J(0,"th",21),ut(1," Date "),et())}function uAt(e,i){if(1&e&&(J(0,"td",22),ut(1),vs(2,"date"),et()),2&e){const t=i.$implicit;ot(),Je(" ",Pc(2,1,t.date,"yyyy-MM-dd")," ")}}function hAt(e,i){1&e&&(J(0,"th",21),ut(1," ConceptId "),et())}function dAt(e,i){if(1&e&&(J(0,"td",22),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.code," ")}}function fAt(e,i){1&e&&(J(0,"th",21),ut(1," Term "),et())}function pAt(e,i){1&e&&(J(0,"span",24),ut(1,"Allergy / Intolerance condition"),et())}function mAt(e,i){if(1&e&&(J(0,"td",22),Ht(1,pAt,2,0,"span",23),ut(2),et()),2&e){const t=i.$implicit;ot(),vt("ngIf",t.allergy),ot(),Je(" ",t.display," ")}}function gAt(e,i){1&e&&ye(0,"tr",25)}function vAt(e,i){1&e&&ye(0,"tr",26)}function yAt(e,i){1&e&&(J(0,"th",21),ut(1," ConceptId "),et())}function xAt(e,i){if(1&e&&(J(0,"td",22),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.code," ")}}function bAt(e,i){1&e&&(J(0,"th",21),ut(1," Term "),et())}function wAt(e,i){if(1&e&&(J(0,"td",22),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.display," ")}}function TAt(e,i){1&e&&ye(0,"tr",25)}function CAt(e,i){1&e&&ye(0,"tr",26)}const SAt=[],EAt=[];let SX=(()=>{class e{constructor(t){this.terminologyService=t,this.problemBinding={ecl:"< 404684003 |Clinical finding|",title:"Search..."},this.eclProblem="< 404684003 |Clinical finding|",this.term="",this.displayedColumns=["date","code","display"],this.dataToDisplay=[...SAt],this.dataSource=new _At(this.dataToDisplay),this.loading=!1,this.displayedColumns2=["code","display"],this.dataToDisplay2=[...EAt],this.dataSource2=new AAt(this.dataToDisplay2)}updateProblem(t){var n=this;return we(function*(){n.selectedProblemSct=t})()}addProblem(t){var n=this;return we(function*(){if(n.selectedProblemSct||t){let r=t||n.selectedProblemSct;if(n.loading=!0,n.term=r.display,r.date=new Date,r.code.indexOf(":")>-1){r.allergy=!0;let s=r.substance;n.dataToDisplay2.find(o=>o.code===s.code)||(n.dataToDisplay2=[...n.dataToDisplay2,s],n.dataSource2.setData(n.dataToDisplay2))}else(yield n.getAllergyData(r))?.expansion?.contains?.length>0&&(r.allergy=!0,n.addAllergySubstanceToList(r));n.dataToDisplay.find(s=>s.code===r.code)||(n.dataToDisplay=[...n.dataToDisplay,r],n.dataSource.setData(n.dataToDisplay)),n.loading=!1,n.term=""}})()}addAllergySubstanceToList(t){var n=this;return we(function*(){(yield n.getAllergySubstance(t))?.expansion?.contains?.forEach(s=>{n.dataToDisplay2.find(o=>o.code===s.code)||(n.dataToDisplay2=[...n.dataToDisplay2,s],n.dataSource2.setData(n.dataToDisplay2))})})()}getAllergyData(t){var n=this;return we(function*(){return Ia((yield n.terminologyService.expandValueSet("<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",t.code,0,1)).pipe(Ri(s=>s)))})()}getAllergySubstance(t){var n=this;return we(function*(){return Ia((yield n.terminologyService.expandValueSet(`${t.code} |${t.display}| . (246075003 |Causative agent (attribute)| OR 47429007 |Associated with (attribute)|)`,"")).pipe(Ri(s=>s)))})()}static{this.\u0275fac=function(n){return new(n||e)(pt(ma))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-allergies-problem-list"]],decls:60,vars:11,consts:[["substancePopoverMenu","matMenu"],["id","main-card"],[1,"container-space"],[1,"problem-list"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],[1,"container"],[1,"item"],[3,"selectionChange","binding","term"],["mat-flat-button","","color","primary",3,"click"],["diameter","35",4,"ngIf"],["mat-table","",3,"dataSource"],["matColumnDef","date"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","code"],["matColumnDef","display"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35"],["mat-header-cell",""],["mat-cell",""],["class","tag pill",4,"ngIf"],[1,"tag","pill"],["mat-header-row",""],["mat-row",""]],template:function(n,r){if(1&n){const s=xe();J(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"h4"),ut(4,"Problem List "),J(5,"button",4)(6,"mat-icon"),ut(7,"info"),et()(),J(8,"mat-menu",null,0)(10,"span",5),Ut("click",function(l){return zt(s),Gt(l.stopPropagation())}),J(11,"h4"),ut(12,"Problem list"),et(),J(13,"p"),ut(14,"Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),et(),J(15,"p"),ut(16,"For practical guidance using SNOMED CT to document hypersensitivity to specific substances in a problem list, it is suggested to map to the appropriate concepts under the 473011001 |Allergic condition (finding)|hierarchies. This is due to the lack of sufficient content under 609433001 |Hypersensitivity disposition (finding)|and 421961002 |Hypersensitivity reaction (disorder)| and that many of the concepts under 609328004 |Allergic disposition (finding)|and 419076005 |Allergic reaction (disorder)| have unclear mechanisms which may actually represent non-allergic hypersensitivity. Please note that SNOMED international does not plan to create new children concepts of hypersensitivity disposition to specific substances unless more than one Member country would submit a request for them to answer to an active use-case."),et(),J(17,"p"),ut(18,"Almost all allergy concepts are modeled by substances in SNOMED CT. A very small number of allergy concepts are modeled by products but with explicit description for the specific intended meaning. Records of allergy to multiple substances or to multi-ingredient products should be recoded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),et(),J(19,"p"),ut(20,"Vaccine allergy is an example where allergy concepts are modeled using a product concept. For example, \u2018Allergy to component of vaccine product (finding)\u2019 with a synonym \u2018vaccine allergy\u2019 has been modeled by vaccine product. The concept represents that allergy is caused by any substance in a vaccine product."),et(),J(21,"p"),ut(22,"To record the level of certainty or verification status, it is recommended to use additional data elements in the EHR information model. Even though it is possible to utilize the SNOMED CT model for \u2018situation with explicit context\u2019 to express certainty, this is not recommended due to potential ambiguity. For example, \u201csuspected penicillin allergy\u201d can mean uncertainty with the condition (is it real allergy?) or with the causative agent (is it penicillin?). Even though SNOMED CT editorial guideline is clear that the first interpretation is correct, it is better to use other methods to represent the uncertainty to avoid confusion."),et(),J(23,"p"),ut(24,"For more information check the "),J(25,"a",6),ut(26,"Implementation Guide"),et(),ut(27," developed by the SNOMED International Allergy Clinical Reference Group."),et()()()(),J(28,"div",7)(29,"div",8)(30,"app-autocomplete-binding",9),Ut("selectionChange",function(l){return zt(s),Gt(r.updateProblem(l))}),et()(),J(31,"div",8)(32,"button",10),Ut("click",function(){return zt(s),Gt(r.addProblem())}),ut(33,"Add problem"),et()(),J(34,"div",8),Ht(35,lAt,1,0,"mat-spinner",11),et()(),J(36,"table",12),Qi(37,13),Ht(38,cAt,2,0,"th",14)(39,uAt,3,4,"td",15),Ki(),Qi(40,16),Ht(41,hAt,2,0,"th",14)(42,dAt,2,1,"td",15),Ki(),Qi(43,17),Ht(44,fAt,2,0,"th",14)(45,mAt,3,2,"td",15),Ki(),Ht(46,gAt,1,0,"tr",18)(47,vAt,1,0,"tr",19),et()(),J(48,"div",3)(49,"h4"),ut(50,"Substances the patient is allergic to:"),et(),J(51,"table",12),Qi(52,16),Ht(53,yAt,2,0,"th",14)(54,xAt,2,1,"td",15),Ki(),Qi(55,17),Ht(56,bAt,2,0,"th",14)(57,wAt,2,1,"td",15),Ki(),Ht(58,TAt,1,0,"tr",18)(59,CAt,1,0,"tr",19),et()()()()}if(2&n){const s=Zi(9);ot(5),vt("matMenuTriggerFor",s),ot(5),vt("disableRipple",!0),ot(20),vt("binding",r.problemBinding)("term",r.term),ot(5),vt("ngIf",r.loading),ot(),vt("dataSource",r.dataSource),ot(10),vt("matHeaderRowDef",r.displayedColumns),ot(),vt("matRowDefColumns",r.displayedColumns),ot(4),vt("dataSource",r.dataSource2),ot(7),vt("matHeaderRowDef",r.displayedColumns2),ot(),vt("matRowDefColumns",r.displayedColumns2)}},dependencies:[ls,Cs,jo,ga,Rl,oc,vh,Pd,tb,kd,wh,Fd,Th,bh,Od,Ch,Sh,Ld,Nd,Ev,sh],styles:["#main-card[_ngcontent-%COMP%]{padding:10px}app-autocomplete-binding[_ngcontent-%COMP%]{display:block;min-width:500px}.container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;margin:10px 0;gap:10px}.container-space[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;margin:10px 0;gap:10px}.problem-list[_ngcontent-%COMP%]{width:60%}.tag[_ngcontent-%COMP%]{position:absolute;top:0;right:0;padding-left:10px;padding-right:10px;margin-top:5px}td[_ngcontent-%COMP%]{position:relative}.pill[_ngcontent-%COMP%]{display:inline-block;font-size:10px;background-color:orange;color:#fff;padding:4px 8px;border-radius:20px;position:absolute;top:0;right:0;margin-top:1rem}.mat-column-display[_ngcontent-%COMP%]{min-width:350px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}}return e})();class _At extends vS{constructor(i){super(),this._dataStream=new Lx,this.setData(i)}connect(){return this._dataStream}disconnect(){}setData(i){this._dataStream.next(i)}}class AAt extends vS{constructor(i){super(),this._dataStream=new Lx,this.setData(i)}connect(){return this._dataStream}disconnect(){}setData(i){this._dataStream.next(i)}}const Ok=["*"];function DAt(e,i){1&e&&Si(0)}const MAt=["tabListContainer"],IAt=["tabList"],RAt=["tabListInner"],PAt=["nextPaginator"],kAt=["previousPaginator"],FAt=e=>({animationDuration:e}),OAt=(e,i)=>({value:e,params:i});function LAt(e,i){}const NAt=["tabBodyWrapper"],BAt=["tabHeader"];function VAt(e,i){}function UAt(e,i){1&e&&Ht(0,VAt,0,0,"ng-template",12),2&e&&vt("cdkPortalOutlet",St().$implicit.templateLabel)}function zAt(e,i){1&e&&ut(0),2&e&&Ke(St().$implicit.textLabel)}function GAt(e,i){if(1&e){const t=xe();J(0,"div",7,2),Ut("click",function(){const r=zt(t),s=r.$implicit,o=r.$index,l=St(),w=Zi(1);return Gt(l._handleClick(s,w,o))})("cdkFocusChange",function(r){const s=zt(t).$index;return Gt(St()._tabFocusChanged(r,s))}),ye(2,"span",8)(3,"div",9),J(4,"span",10)(5,"span",11),Ht(6,UAt,1,1,null,12)(7,zAt,1,1),et()()()}if(2&e){const t=i.$implicit,n=i.$index,r=Zi(1),s=St();oo(t.labelClass),Ci("mdc-tab--active",s.selectedIndex===n),vt("id",s._getTabLabelId(n))("disabled",t.disabled)("fitInkBarToContent",s.fitInkBarToContent),_i("tabIndex",s._getTabIndex(n))("aria-posinset",n+1)("aria-setsize",s._tabs.length)("aria-controls",s._getTabContentId(n))("aria-selected",s.selectedIndex===n)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),ot(3),vt("matRippleTrigger",r)("matRippleDisabled",t.disabled||s.disableRipple),ot(3),Tn(t.templateLabel?6:7)}}function HAt(e,i){1&e&&Si(0)}function WAt(e,i){if(1&e){const t=xe();J(0,"mat-tab-body",13),Ut("_onCentered",function(){return zt(t),Gt(St()._removeTabBodyWrapperHeight())})("_onCentering",function(r){return zt(t),Gt(St()._setTabBodyWrapperHeight(r))}),et()}if(2&e){const t=i.$implicit,n=i.$index,r=St();oo(t.bodyClass),Ci("mat-mdc-tab-body-active",r.selectedIndex===n),vt("id",r._getTabContentId(n))("content",t.content)("position",t.position)("origin",t.origin)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),_i("tabindex",null!=r.contentTabIndex&&r.selectedIndex===n?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(n))("aria-hidden",r.selectedIndex!==n)}}const jAt=new te("MatTabContent");let XAt=(()=>{class e{constructor(t){this.template=t}static{this.\u0275fac=function(n){return new(n||e)(pt(yr))}}static{this.\u0275dir=me({type:e,selectors:[["","matTabContent",""]],standalone:!0,features:[xi([{provide:jAt,useExisting:e}])]})}}return e})();const YAt=new te("MatTabLabel"),EX=new te("MAT_TAB");let $At=(()=>{class e extends sCt{constructor(t,n,r){super(t,n),this._closestTab=r}static{this.\u0275fac=function(n){return new(n||e)(pt(yr),pt(Or),pt(EX,8))}}static{this.\u0275dir=me({type:e,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],standalone:!0,features:[xi([{provide:YAt,useExisting:e}]),yi]})}}return e})();const _X=new te("MAT_TAB_GROUP");let _v=(()=>{class e{get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}get content(){return this._contentPortal}constructor(t,n){this._viewContainerRef=t,this._closestTabGroup=n,this.disabled=!1,this._explicitContent=void 0,this.textLabel="",this._contentPortal=null,this._stateChanges=new Fe,this.position=null,this.origin=null,this.isActive=!1}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new fh(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&t._closestTab===this&&(this._templateLabel=t)}static{this.\u0275fac=function(n){return new(n||e)(pt(Or),pt(_X,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-tab"]],contentQueries:function(n,r,s){if(1&n&&(Hn(s,$At,5),Hn(s,XAt,7,yr)),2&n){let o;He(o=We())&&(r.templateLabel=o.first),He(o=We())&&(r._explicitContent=o.first)}},viewQuery:function(n,r){if(1&n&&ki(yr,7),2&n){let s;He(s=We())&&(r._implicitContent=s.first)}},hostAttrs:["hidden",""],inputs:{disabled:[2,"disabled","disabled",qe],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},exportAs:["matTab"],standalone:!0,features:[xi([{provide:EX,useExisting:e}]),vn,lr,Wi],ngContentSelectors:Ok,decls:1,vars:0,template:function(n,r){1&n&&(nr(),Ht(0,DAt,1,0,"ng-template"))},encapsulation:2})}}return e})();const Lk="mdc-tab-indicator--active",AX="mdc-tab-indicator--no-transition";class QAt{constructor(i){this._items=i}hide(){this._items.forEach(i=>i.deactivateInkBar())}alignToElement(i){const t=this._items.find(r=>r.elementRef.nativeElement===i),n=this._currentItem;if(t!==n&&(n?.deactivateInkBar(),t)){const r=n?.elementRef.nativeElement.getBoundingClientRect?.();t.activateInkBar(r),this._currentItem=t}}}let KAt=(()=>{class e{constructor(){this._elementRef=Jt(ai),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){this._fitToContent!==t&&(this._fitToContent=t,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){const n=this._elementRef.nativeElement;if(!t||!n.getBoundingClientRect||!this._inkBarContentElement)return void n.classList.add(Lk);const r=n.getBoundingClientRect(),s=t.width/r.width,o=t.left-r.left;n.classList.add(AX),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${s})`),n.getBoundingClientRect(),n.classList.remove(AX),n.classList.add(Lk),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(Lk)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){const t=this._elementRef.nativeElement.ownerDocument||document,n=this._inkBarElement=t.createElement("span"),r=this._inkBarContentElement=t.createElement("span");n.className="mdc-tab-indicator",r.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",n.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){(this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement).appendChild(this._inkBarElement)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",qe]},features:[vn]})}}return e})(),DX=(()=>{class e extends KAt{constructor(t){super(),this.elementRef=t,this.disabled=!1}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static{this.\u0275fac=function(n){return new(n||e)(pt(ai))}}static{this.\u0275dir=me({type:e,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(n,r){2&n&&(_i("aria-disabled",!!r.disabled),Ci("mat-mdc-tab-disabled",r.disabled))},inputs:{disabled:[2,"disabled","disabled",qe]},standalone:!0,features:[vn,yi]})}}return e})();const MX=rc({passive:!0});let tDt=(()=>{class e{get selectedIndex(){return this._selectedIndex}set selectedIndex(t){const n=isNaN(t)?0:t;this._selectedIndex!=n&&(this._selectedIndexChanged=!0,this._selectedIndex=n,this._keyManager&&this._keyManager.updateActiveItem(n))}constructor(t,n,r,s,o,l,w){this._elementRef=t,this._changeDetectorRef=n,this._viewportRuler=r,this._dir=s,this._ngZone=o,this._platform=l,this._animationMode=w,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new Fe,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new Fe,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new Oe,this.indexFocused=new Oe,this._sharedResizeObserver=Jt(oX),this._injector=Jt(On),o.runOutsideAngular(()=>{Bc(t.nativeElement,"mouseleave").pipe(Yi(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){Bc(this._previousPaginator.nativeElement,"touchstart",MX).pipe(Yi(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),Bc(this._nextPaginator.nativeElement,"touchstart",MX).pipe(Yi(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const t=this._dir?this._dir.change:wi("ltr"),n=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(vu(32),Yi(this._destroyed)),r=this._viewportRuler.change(150).pipe(Yi(this._destroyed)),s=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new MP(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),ao(s,{injector:this._injector}),qr(t,r,n,this._items.changes,this._itemsResized()).pipe(Yi(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),s()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return"function"!=typeof ResizeObserver?al:this._items.changes.pipe(Ma(this._items),ks(t=>new dr(n=>this._ngZone.runOutsideAngular(()=>{const r=new ResizeObserver(s=>n.next(s));return t.forEach(s=>r.observe(s.elementRef.nativeElement)),()=>{r.disconnect()}}))),SP(1),Ln(t=>t.some(n=>n.contentRect.width>0&&n.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!co(t))switch(t.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){const n=this._items.get(this.focusIndex);n&&!n.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t))}break;default:this._keyManager.onKeydown(t)}}_onContentChanges(){const t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){!this._isValidIndex(t)||this.focusIndex===t||!this._keyManager||this._keyManager.setActiveItem(t)}_isValidIndex(t){return!this._items||!!this._items.toArray()[t]}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();const n=this._tabListContainer.nativeElement;n.scrollLeft="ltr"==this._getLayoutDirection()?0:n.scrollWidth-n.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const t=this.scrollDistance,n="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(n)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;const n=this._items?this._items.toArray()[t]:null;if(!n)return;const r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:s,offsetWidth:o}=n.elementRef.nativeElement;let l,w;"ltr"==this._getLayoutDirection()?(l=s,w=l+o):(w=this._tabListInner.nativeElement.offsetWidth-s,l=w-o);const E=this.scrollDistance,D=this.scrollDistance+r;lD&&(this.scrollDistance+=Math.min(w-D,l-E))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const r=this._tabListInner.nativeElement.scrollWidth-this._elementRef.nativeElement.offsetWidth>=5;r||(this.scrollDistance=0),r!==this._showPaginationControls&&(this._showPaginationControls=r,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabListInner.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,n=t?t.elementRef.nativeElement:null;n?this._inkBar.alignToElement(n):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,n){n&&null!=n.button&&0!==n.button||(this._stopInterval(),Kx(650,100).pipe(Yi(qr(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:r,distance:s}=this._scrollHeader(t);(0===s||s>=r)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const n=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(n,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:n,distance:this._scrollDistance}}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(In),pt(mh),pt(Ya,8),pt(li),pt(cr),pt(Hr,8))}}static{this.\u0275dir=me({type:e,inputs:{disablePagination:[2,"disablePagination","disablePagination",qe],selectedIndex:[2,"selectedIndex","selectedIndex",jr]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[vn]})}}return e})(),eDt=(()=>{class e extends tDt{constructor(t,n,r,s,o,l,w){super(t,n,r,s,o,l,w),this.disableRipple=!1}ngAfterContentInit(){this._inkBar=new QAt(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(In),pt(mh),pt(Ya,8),pt(li),pt(cr),pt(Hr,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-tab-header"]],contentQueries:function(n,r,s){if(1&n&&Hn(s,DX,4),2&n){let o;He(o=We())&&(r._items=o)}},viewQuery:function(n,r){if(1&n&&(ki(MAt,7),ki(IAt,7),ki(RAt,7),ki(PAt,5),ki(kAt,5)),2&n){let s;He(s=We())&&(r._tabListContainer=s.first),He(s=We())&&(r._tabList=s.first),He(s=We())&&(r._tabListInner=s.first),He(s=We())&&(r._nextPaginator=s.first),He(s=We())&&(r._previousPaginator=s.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(n,r){2&n&&Ci("mat-mdc-tab-header-pagination-controls-enabled",r._showPaginationControls)("mat-mdc-tab-header-rtl","rtl"==r._getLayoutDirection())},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",qe]},standalone:!0,features:[vn,yi,Wi],ngContentSelectors:Ok,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(n,r){if(1&n){const s=xe();nr(),J(0,"div",5,0),Ut("click",function(){return zt(s),Gt(r._handlePaginatorClick("before"))})("mousedown",function(l){return zt(s),Gt(r._handlePaginatorPress("before",l))})("touchend",function(){return zt(s),Gt(r._stopInterval())}),ye(2,"div",6),et(),J(3,"div",7,1),Ut("keydown",function(l){return zt(s),Gt(r._handleKeydown(l))}),J(5,"div",8,2),Ut("cdkObserveContent",function(){return zt(s),Gt(r._onContentChanges())}),J(7,"div",9,3),Si(9),et()()(),J(10,"div",10,4),Ut("mousedown",function(l){return zt(s),Gt(r._handlePaginatorPress("after",l))})("click",function(){return zt(s),Gt(r._handlePaginatorClick("after"))})("touchend",function(){return zt(s),Gt(r._stopInterval())}),ye(12,"div",6),et()}2&n&&(Ci("mat-mdc-tab-header-pagination-disabled",r._disableScrollBefore),vt("matRippleDisabled",r._disableScrollBefore||r.disableRipple),ot(3),Ci("_mat-animation-noopable","NoopAnimations"===r._animationMode),ot(2),_i("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby||null),ot(5),Ci("mat-mdc-tab-header-pagination-disabled",r._disableScrollAfter),vt("matRippleDisabled",r._disableScrollAfter||r.disableRipple))},dependencies:[uh,N7],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height);border-bottom-color:var(--mat-tab-header-divider-color, var(--mat-app-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-header-divider-height);border-top-color:var(--mat-tab-header-divider-color, var(--mat-app-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}"],encapsulation:2})}}return e})();const iDt=new te("MAT_TABS_CONFIG"),nDt={translateTab:xr("translateTab",[Bn("center, void, left-origin-center, right-origin-center",oi({transform:"none",visibility:"visible"})),Bn("left",oi({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),Bn("right",oi({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),gn("* => left, * => right, left => center, right => center",mn("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),gn("void => left-origin-center",[oi({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),mn("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),gn("void => right-origin-center",[oi({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),mn("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])};let rDt=(()=>{class e extends ph{constructor(t,n,r,s){super(t,n,s),this._host=r,this._centeringSub=Pe.EMPTY,this._leavingSub=Pe.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(Ma(this._host._isCenterPosition(this._host._position))).subscribe(t=>{this._host._content&&t&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}static{this.\u0275fac=function(n){return new(n||e)(pt(Qf),pt(Or),pt(kn(()=>IX)),pt(Gi))}}static{this.\u0275dir=me({type:e,selectors:[["","matTabBodyHost",""]],standalone:!0,features:[yi]})}}return e})(),IX=(()=>{class e{set position(t){this._positionIndex=t,this._computePositionAnimationState()}constructor(t,n,r){this._elementRef=t,this._dir=n,this._dirChangeSubscription=Pe.EMPTY,this._translateTabComplete=new Fe,this._onCentering=new Oe,this._beforeCentering=new Oe,this._afterLeavingCenter=new Oe,this._onCentered=new Oe(!0),this.animationDuration="500ms",this.preserveContent=!1,n&&(this._dirChangeSubscription=n.change.subscribe(s=>{this._computePositionAnimationState(s),r.markForCheck()})),this._translateTabComplete.subscribe(s=>{this._isCenterPosition(s.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(s.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(t){const n=this._isCenterPosition(t.toState);this._beforeCentering.emit(n),n&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_isCenterPosition(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}_computePositionAnimationState(t=this._getLayoutDirection()){this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}_computePositionFromOrigin(t){const n=this._getLayoutDirection();return"ltr"==n&&t<=0||"rtl"==n&&t>0?"left-origin-center":"right-origin-center"}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(Ya,8),pt(In))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-tab-body"]],viewQuery:function(n,r){if(1&n&&ki(ph,5),2&n){let s;He(s=We())&&(r._portalHost=s.first)}},hostAttrs:[1,"mat-mdc-tab-body"],inputs:{_content:[0,"content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"},standalone:!0,features:[Wi],decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(n,r){if(1&n){const s=xe();J(0,"div",1,0),Ut("@translateTab.start",function(l){return zt(s),Gt(r._onTranslateTabStarted(l))})("@translateTab.done",function(l){return zt(s),Gt(r._translateTabComplete.next(l))}),Ht(2,LAt,0,0,"ng-template",2),et()}2&n&&vt("@translateTab",k2(3,OAt,r._position,Al(1,FAt,r.animationDuration)))},dependencies:[rDt,Jx],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[nDt.translateTab]}})}}return e})(),sDt=0,Ap=(()=>{class e{get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(t){this._fitInkBarToContent=t,this._changeDetectorRef.markForCheck()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._indexToSelect=isNaN(t)?null:t}get animationDuration(){return this._animationDuration}set animationDuration(t){const n=t+"";this._animationDuration=/^\d+$/.test(n)?t+"ms":n}get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(t){this._contentTabIndex=isNaN(t)?null:t}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){const n=this._elementRef.nativeElement.classList;n.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),t&&n.add("mat-tabs-with-background",`mat-background-${t}`),this._backgroundColor=t}constructor(t,n,r,s){this._elementRef=t,this._changeDetectorRef=n,this._animationMode=s,this._tabs=new Ju,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=Pe.EMPTY,this._tabLabelSubscription=Pe.EMPTY,this._fitInkBarToContent=!1,this.stretchTabs=!0,this.dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this.disablePagination=!1,this.disableRipple=!1,this.preserveContent=!1,this.selectedIndexChange=new Oe,this.focusChange=new Oe,this.animationDone=new Oe,this.selectedTabChange=new Oe(!0),this._isServer=!Jt(cr).isBrowser,this._groupId=sDt++,this.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",this.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,this.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,null!=r?.contentTabIndex&&(this.contentTabIndex=r.contentTabIndex),this.preserveContent=!!r?.preserveContent,this.fitInkBarToContent=!(!r||null==r.fitInkBarToContent)&&r.fitInkBarToContent,this.stretchTabs=!r||null==r.stretchTabs||r.stretchTabs}ngAfterContentChecked(){const t=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=t){const n=null==this._selectedIndex;if(!n){this.selectedTabChange.emit(this._createChangeEvent(t));const r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,s)=>r.isActive=s===t),n||(this.selectedIndexChange.emit(t),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((n,r)=>{n.position=r-t,null!=this._selectedIndex&&0==n.position&&!n.origin&&(n.origin=t-this._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{const t=this._clampTabIndex(this._indexToSelect);if(t===this._selectedIndex){const n=this._tabs.toArray();let r;for(let s=0;s{n[t].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(t))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(Ma(this._allTabs)).subscribe(t=>{this._tabs.reset(t.filter(n=>n._closestTabGroup===this||!n._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(t){const n=this._tabHeader;n&&(n.focusIndex=t)}_focusChanged(t){this._lastFocusedTabIndex=t,this.focusChange.emit(this._createChangeEvent(t))}_createChangeEvent(t){const n=new oDt;return n.index=t,this._tabs&&this._tabs.length&&(n.tab=this._tabs.toArray()[t]),n}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=qr(...this._tabs.map(t=>t._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))}_getTabLabelId(t){return`mat-tab-label-${this._groupId}-${t}`}_getTabContentId(t){return`mat-tab-content-${this._groupId}-${t}`}_setTabBodyWrapperHeight(t){if(!this.dynamicHeight||!this._tabBodyWrapperHeight)return;const n=this._tabBodyWrapper.nativeElement;n.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(n.style.height=t+"px")}_removeTabBodyWrapperHeight(){const t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this.animationDone.emit()}_handleClick(t,n,r){n.focusIndex=r,t.disabled||(this.selectedIndex=r)}_getTabIndex(t){return t===(this._lastFocusedTabIndex??this.selectedIndex)?0:-1}_tabFocusChanged(t,n){t&&"mouse"!==t&&"touch"!==t&&(this._tabHeader.focusIndex=n)}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(In),pt(iDt,8),pt(Hr,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-tab-group"]],contentQueries:function(n,r,s){if(1&n&&Hn(s,_v,5),2&n){let o;He(o=We())&&(r._allTabs=o)}},viewQuery:function(n,r){if(1&n&&(ki(NAt,5),ki(BAt,5)),2&n){let s;He(s=We())&&(r._tabBodyWrapper=s.first),He(s=We())&&(r._tabHeader=s.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:10,hostBindings:function(n,r){2&n&&(oo("mat-"+(r.color||"primary")),$s("--mat-tab-animation-duration",r.animationDuration),Ci("mat-mdc-tab-group-dynamic-height",r.dynamicHeight)("mat-mdc-tab-group-inverted-header","below"===r.headerPosition)("mat-mdc-tab-group-stretch-tabs",r.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",qe],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",qe],dynamicHeight:[2,"dynamicHeight","dynamicHeight",qe],selectedIndex:[2,"selectedIndex","selectedIndex",jr],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",jr],disablePagination:[2,"disablePagination","disablePagination",qe],disableRipple:[2,"disableRipple","disableRipple",qe],preserveContent:[2,"preserveContent","preserveContent",qe],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],standalone:!0,features:[xi([{provide:_X,useExisting:e}]),vn,Wi],ngContentSelectors:Ok,decls:9,vars:8,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination","aria-label","aria-labelledby"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"id","mdc-tab--active","class","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","mat-mdc-tab-body-active","class","content","position","origin","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"click","cdkFocusChange","id","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","id","content","position","origin","animationDuration","preserveContent"]],template:function(n,r){if(1&n){const s=xe();nr(),J(0,"mat-tab-header",3,0),Ut("indexFocused",function(l){return zt(s),Gt(r._focusChanged(l))})("selectFocusedIndex",function(l){return zt(s),Gt(r.selectedIndex=l)}),sC(2,GAt,8,17,"div",4,rC),et(),Ht(4,HAt,1,0),J(5,"div",5,1),sC(7,WAt,1,13,"mat-tab-body",6,rC),et()}2&n&&(vt("selectedIndex",r.selectedIndex||0)("disableRipple",r.disableRipple)("disablePagination",r.disablePagination)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby),ot(2),aC(r._tabs),ot(2),Tn(r._isServer?4:-1),ot(),Ci("_mat-animation-noopable","NoopAnimations"===r._animationMode),ot(2),aC(r._tabs))},dependencies:[eDt,DX,mTt,uh,ph,IX],styles:['.mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mdc-secondary-navigation-tab-container-height);font-family:var(--mat-tab-header-label-text-font, var(--mat-app-title-small-font));font-size:var(--mat-tab-header-label-text-size, var(--mat-app-title-small-size));letter-spacing:var(--mat-tab-header-label-text-tracking, var(--mat-app-title-small-tracking));line-height:var(--mat-tab-header-label-text-line-height, var(--mat-app-title-small-line-height));font-weight:var(--mat-tab-header-label-text-weight, var(--mat-app-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, var(--mat-app-primary));border-top-width:var(--mdc-tab-indicator-active-indicator-height);border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color, var(--mat-app-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color, var(--mat-app-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color, var(--mat-app-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2})}}return e})();class oDt{}let lDt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,rn]})}}return e})();var Tu=Mt(2578);class cDt{constructor(i,t){this._document=t;const n=this._textarea=this._document.createElement("textarea"),r=n.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",n.setAttribute("aria-hidden","true"),n.value=i,n.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(n)}copy(){const i=this._textarea;let t=!1;try{if(i){const n=this._document.activeElement;i.select(),i.setSelectionRange(0,i.value.length),t=this._document.execCommand("copy"),n&&n.focus()}}catch{}return t}destroy(){const i=this._textarea;i&&(i.remove(),this._textarea=void 0)}}let Nk=(()=>{class e{constructor(t){this._document=t}copy(t){const n=this.beginCopy(t),r=n.copy();return n.destroy(),r}beginCopy(t){return new cDt(t,this._document)}static{this.\u0275fac=function(n){return new(n||e)(re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const uDt=new te("HighlightJs-Config");let EE=(()=>{class e{constructor(t,n,r,s,o){this.el=t,this.ngModel=n,this.doc=r,this.ngZone=o,this.lang="html",this.mode="simple",Object.assign(this,s)}escapeHTML(t){return(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}init(){this.ngZone.runOutsideAngular(()=>{this.destroy();const t=this.el.nativeElement,n=this.code||""+t.innerHTML.trim();if(this.codeEl=this.doc.createElement("default"===this.mode?"div":"pre"),null==this.codeEl)return;const r="simple"===this.mode;r?(this.lang&&(this.codeEl.className=this.lang),this.parentEl=t.parentNode,this.parentEl.insertBefore(this.codeEl,t.nextSibling)):(this.parentEl=t,this.parentEl.innerHTML="",this.parentEl.appendChild(this.codeEl)),this.codeEl.innerHTML=n,hljs.configure({...this.options}),r?hljs.highlightElement(this.codeEl):this.codeEl.querySelectorAll("pre code").forEach(s=>{hljs.highlightElement(s)})})}destroy(){this.codeEl&&this.parentEl&&(this.parentEl.removeChild(this.codeEl),this.codeEl=void 0)}ngAfterViewInit(){this.init(),this.ngModel?this.modelValue$=this.ngModel.valueChanges?.subscribe(t=>{this.code=this.escapeHTML(t),this.init()}):this.initMutation()}ngOnDestroy(){this.destroy(),this.destroyMutation(),this.modelValue$&&this.modelValue$.unsubscribe()}initMutation(){typeof MutationObserver>"u"||this.ngZone.runOutsideAngular(()=>{this.observer=new MutationObserver(this.init.bind(this)),this.observer.observe(this.el.nativeElement,{characterData:!0,childList:!0,subtree:!0})})}destroyMutation(){this.observer&&this.observer.disconnect()}}return e.\u0275fac=function(t){return new(t||e)(pt(ai),pt(lc,8),pt(Gi),pt(uDt,8),pt(li))},e.\u0275dir=me({type:e,selectors:[["","highlight-js",""]],hostVars:2,hostBindings:function(t,n){2&t&&$s("display","simple"===n.mode?"none":null)},inputs:{options:"options",lang:"lang",code:"code",mode:"mode"},exportAs:["highlightJs"],standalone:!0}),e})(),hDt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Hi({type:e}),e.\u0275inj=Ui({imports:[Fk]}),e})();const dDt=["trigger"],fDt=["panel"],pDt=[[["mat-select-trigger"]],"*"],mDt=["mat-select-trigger","*"];function gDt(e,i){if(1&e&&(J(0,"span",4),ut(1),et()),2&e){const t=St();ot(),Ke(t.placeholder)}}function vDt(e,i){1&e&&Si(0)}function yDt(e,i){if(1&e&&(J(0,"span",11),ut(1),et()),2&e){const t=St(2);ot(),Ke(t.triggerValue)}}function xDt(e,i){if(1&e&&(J(0,"span",5),Ht(1,vDt,1,0)(2,yDt,2,1,"span",11),et()),2&e){const t=St();ot(),Tn(t.customTrigger?1:2)}}function bDt(e,i){if(1&e){const t=xe();J(0,"div",12,1),Ut("@transformPanel.done",function(r){return zt(t),Gt(St()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return zt(t),Gt(St()._handleKeydown(r))}),Si(2,1),et()}if(2&e){const t=St();(function s6(e,i,t){Rc(yl,cu,Rg(Ee(),e,i,t),!0)})("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),vt("ngClass",t.panelClass)("@transformPanel","showing"),_i("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const wDt={transformPanelWrap:xr("transformPanelWrap",[gn("* => void",zS("@transformPanel",[US()],{optional:!0}))]),transformPanel:xr("transformPanel",[Bn("void",oi({opacity:0,transform:"scale(1, 0.8)"})),gn("void => showing",mn("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),gn("* => void",mn("100ms linear",oi({opacity:0})))])};let RX=0;const PX=new te("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{const e=Jt(Ss);return()=>e.scrollStrategies.reposition()}}),CDt=new te("MAT_SELECT_CONFIG"),SDt={provide:PX,deps:[Ss],useFactory:function TDt(e){return()=>e.scrollStrategies.reposition()}},EDt=new te("MatSelectTrigger");class _Dt{constructor(i,t){this.source=i,this.value=t}}let Av=(()=>{class e{_scrollOptionIntoView(t){const n=this.options.toArray()[t];if(n){const r=this.panel.nativeElement,s=mW(t,this.options,this.optionGroups),o=n._getHostElement();r.scrollTop=0===t&&1===s?0:gW(o.offsetTop,o.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(t){return new _Dt(this,t)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(xu.required)??!1}set required(t){this._required=t,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=t}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this._assignValue(t)&&this._onChange(t)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}constructor(t,n,r,s,o,l,w,E,D,k,O,L,U,j){this._viewportRuler=t,this._changeDetectorRef=n,this._elementRef=o,this._dir=l,this._parentFormField=D,this.ngControl=k,this._liveAnnouncer=U,this._defaultOptions=j,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(W,Z)=>W===Z,this._uid="mat-select-"+RX++,this._triggerAriaLabelledBy=null,this._destroy=new Fe,this.stateChanges=new Fe,this.disableAutomaticLabeling=!0,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+RX++,this._panelDoneAnimatingStream=new Fe,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._initialized=new Fe,this.optionSelectionChanges=$g(()=>{const W=this.options;return W?W.changes.pipe(Ma(W),ks(()=>qr(...W.map(Z=>Z.onSelectionChange)))):this._initialized.pipe(ks(()=>this.optionSelectionChanges))}),this.openedChange=new Oe,this._openedStream=this.openedChange.pipe(Ln(W=>W),Ri(()=>{})),this._closedStream=this.openedChange.pipe(Ln(W=>!W),Ri(()=>{})),this.selectionChange=new Oe,this.valueChange=new Oe,this._trackedModal=null,this._skipPredicate=W=>!this.panelOpen&&W.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),null!=j?.typeaheadDebounceInterval&&(this.typeaheadDebounceInterval=j.typeaheadDebounceInterval),this._errorStateTracker=new PP(s,k,E,w,this.stateChanges),this._scrollStrategyFactory=L,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(O)||0,this.id=this.id}ngOnInit(){this._selectionModel=new uP(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(mp(),Yi(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Yi(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Yi(this._destroy)).subscribe(t=>{t.added.forEach(n=>n.select()),t.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ma(null),Yi(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby(),n=this.ngControl;if(t!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?r.setAttribute("aria-labelledby",t):r.removeAttribute("aria-labelledby")}n&&(this._previousControl!==n.control&&(void 0!==this._previousControl&&null!==n.disabled&&n.disabled!==this.disabled&&(this.disabled=n.disabled),this._previousControl=n.control),this.updateErrorState())}ngOnChanges(t){(t.disabled||t.userAriaDescribedBy)&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){const t=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!t)return;const n=`${this.id}-panel`;this._trackedModal&&hv(this._trackedModal,"aria-owns",n),MS(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){this._trackedModal&&(hv(this._trackedModal,"aria-owns",`${this.id}-panel`),this._trackedModal=null)}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(t){this._assignValue(t)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(n=>n.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const n=t.keyCode,r=40===n||38===n||37===n||39===n,s=13===n||32===n,o=this._keyManager;if(!o.isTyping()&&s&&!co(t)||(this.multiple||t.altKey)&&r)t.preventDefault(),this.open();else if(!this.multiple){const l=this.selected;o.onKeydown(t);const w=this.selected;w&&l!==w&&this._liveAnnouncer.announce(w.viewValue,1e4)}}_handleOpenKeydown(t){const n=this._keyManager,r=t.keyCode,s=40===r||38===r,o=n.isTyping();if(s&&t.altKey)t.preventDefault(),this.close();else if(o||13!==r&&32!==r||!n.activeItem||co(t))if(!o&&this._multiple&&65===r&&t.ctrlKey){t.preventDefault();const l=this.options.some(w=>!w.disabled&&!w.selected);this.options.forEach(w=>{w.disabled||(l?w.select():w.deselect())})}else{const l=n.activeItemIndex;n.onKeydown(t),this._multiple&&s&&t.shiftKey&&n.activeItem&&n.activeItemIndex!==l&&n.activeItem._selectViaInteraction()}else t.preventDefault(),n.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(xs(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.options.forEach(n=>n.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(n=>this._selectOptionByValue(n)),this._sortValues();else{const n=this._selectOptionByValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(t){const n=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,t)}catch{return!1}});return n&&this._selectionModel.select(n),n}_assignValue(t){return!!(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t,!0)}_getOverlayWidth(t){return"auto"===this.panelWidth?(t instanceof YS?t.elementRef:t||this._elementRef).nativeElement.getBoundingClientRect().width:null===this.panelWidth?"":this.panelWidth}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Y7(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=qr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Yi(t)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),qr(...this.options.map(n=>n._stateChanges)).pipe(Yi(t)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(t,n){const r=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(r!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),n&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),n&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),r!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((n,r)=>this.sortComparator?this.sortComparator(n,r,t):t.indexOf(n)-t.indexOf(r)),this.stateChanges.next()}}_propagateChanges(t){let n;n=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:t,this._value=n,this.valueChange.emit(n),this._onChange(n),this.selectionChange.emit(this._getChangeEvent(n)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let t=-1;for(let n=0;n0}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();return this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();let n=(t?t+" ":"")+this._valueId;return this.ariaLabelledby&&(n+=" "+this.ariaLabelledby),n}_panelDoneAnimating(t){this.openedChange.emit(t)}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static{this.\u0275fac=function(n){return new(n||e)(pt(mh),pt(In),pt(li),pt(oW),pt(ai),pt(Ya,8),pt(Ep,8),pt(wu,8),pt(CE,8),pt(bu,10),wl("tabindex"),pt(PX),pt(tW),pt(CDt,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-select"]],contentQueries:function(n,r,s){if(1&n&&(Hn(s,EDt,5),Hn(s,hh,5),Hn(s,FP,5)),2&n){let o;He(o=We())&&(r.customTrigger=o.first),He(o=We())&&(r.options=o),He(o=We())&&(r.optionGroups=o)}},viewQuery:function(n,r){if(1&n&&(ki(dDt,5),ki(fDt,5),ki(UW,5)),2&n){let s;He(s=We())&&(r.trigger=s.first),He(s=We())&&(r.panel=s.first),He(s=We())&&(r._overlayDir=s.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(n,r){1&n&&Ut("keydown",function(o){return r._handleKeydown(o)})("focus",function(){return r._onFocus()})("blur",function(){return r._onBlur()}),2&n&&(_i("id",r.id)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r.panelOpen?r.id+"-panel":null)("aria-expanded",r.panelOpen)("aria-label",r.ariaLabel||null)("aria-required",r.required.toString())("aria-disabled",r.disabled.toString())("aria-invalid",r.errorState)("aria-activedescendant",r._getAriaActiveDescendant()),Ci("mat-mdc-select-disabled",r.disabled)("mat-mdc-select-invalid",r.errorState)("mat-mdc-select-required",r.required)("mat-mdc-select-empty",r.empty)("mat-mdc-select-multiple",r.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",qe],disableRipple:[2,"disableRipple","disableRipple",qe],tabIndex:[2,"tabIndex","tabIndex",t=>null==t?0:jr(t)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",qe],placeholder:"placeholder",required:[2,"required","required",qe],multiple:[2,"multiple","multiple",qe],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",qe],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",jr],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[xi([{provide:TE,useExisting:e},{provide:kP,useExisting:e}]),vn,lr,Wi],ngContentSelectors:mDt,decls:11,vars:8,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"backdropClick","attach","detach","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(n,r){if(1&n){const s=xe();nr(pDt),J(0,"div",2,0),Ut("click",function(){return zt(s),Gt(r.open())}),J(3,"div",3),Ht(4,gDt,2,1,"span",4)(5,xDt,3,1,"span",5),et(),J(6,"div",6)(7,"div",7),bl(),J(8,"svg",8),ye(9,"path",9),et()()()(),Ht(10,bDt,3,9,"ng-template",10),Ut("backdropClick",function(){return zt(s),Gt(r.close())})("attach",function(){return zt(s),Gt(r._onAttached())})("detach",function(){return zt(s),Gt(r.close())})}if(2&n){const s=Zi(1);ot(3),_i("id",r._valueId),ot(),Tn(r.empty?4:5),ot(6),vt("cdkConnectedOverlayPanelClass",r._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",r._scrollStrategy)("cdkConnectedOverlayOrigin",r._preferredOverlayOrigin||s)("cdkConnectedOverlayOpen",r.panelOpen)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayWidth",r._overlayWidth)}},dependencies:[YS,UW,Td],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-app-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-app-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-app-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-app-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform)}'],encapsulation:2,data:{animation:[wDt.transformPanel]},changeDetection:0})}}return e})(),kX=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[SDt],imports:[hu,xp,BS,rn,gh,SE,BS,rn]})}}return e})();const ADt=["tooltip"],OX=new te("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{const e=Jt(Ss);return()=>e.scrollStrategies.reposition({scrollThrottle:20})}}),MDt={provide:OX,deps:[Ss],useFactory:function DDt(e){return()=>e.scrollStrategies.reposition({scrollThrottle:20})}},RDt=new te("mat-tooltip-default-options",{providedIn:"root",factory:function IDt(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),LX="tooltip-panel",NX=rc({passive:!0});let _h=(()=>{class e{get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=pa(t),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(t){const n=pa(t);this._disabled!==n&&(this._disabled=n,n?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=Id(t)}get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=Id(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(t){const n=this._message;this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(n)}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(t,n,r,s,o,l,w,E,D,k,O,L){this._overlay=t,this._elementRef=n,this._scrollDispatcher=r,this._viewContainerRef=s,this._ngZone=o,this._platform=l,this._ariaDescriber=w,this._focusMonitor=E,this._dir=k,this._defaultOptions=O,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=LDt,this._viewportMargin=8,this._cssClassPrefix="mat-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._touchstartTimeout=null,this._destroyed=new Fe,this._injector=Jt(On),this._scrollStrategy=D,this._document=L,O&&(this._showDelay=O.showDelay,this._hideDelay=O.hideDelay,O.position&&(this.position=O.position),O.positionAtOrigin&&(this.positionAtOrigin=O.positionAtOrigin),O.touchGestures&&(this.touchGestures=O.touchGestures),O.tooltipClass&&(this.tooltipClass=O.tooltipClass)),k.change.pipe(Yi(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=8}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Yi(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const t=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([n,r])=>{t.removeEventListener(n,r,NX)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay,n){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const r=this._createOverlay(n);this._detach(),this._portal=this._portal||new mv(this._tooltipComponent,this._viewContainerRef);const s=this._tooltipInstance=r.attach(this._portal).instance;s._triggerElement=this._elementRef.nativeElement,s._mouseLeaveHideDelay=this._hideDelay,s.afterHidden().pipe(Yi(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),s.show(t)}hide(t=this.hideDelay){const n=this._tooltipInstance;n&&(n.isVisible()?n.hide(t):(n._cancelPendingAnimations(),this._detach()))}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){const s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&s._origin instanceof ai)return this._overlayRef;this._detach()}const n=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&t||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(n);return r.positionChanges.pipe(Yi(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${LX}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Yi(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Yi(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Yi(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!co(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(t){const n=t.getConfig().positionStrategy,r=this._getOrigin(),s=this._getOverlayPosition();n.withPositions([this._addOffset({...r.main,...s.main}),this._addOffset({...r.fallback,...s.fallback})])}_addOffset(t){const r=!this._dir||"ltr"==this._dir.value;return"top"===t.originY?t.offsetY=-8:"bottom"===t.originY?t.offsetY=8:"start"===t.originX?t.offsetX=r?-8:8:"end"===t.originX&&(t.offsetX=r?8:-8),t}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,n=this.position;let r;"above"==n||"below"==n?r={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&t||"right"==n&&!t?r={originX:"start",originY:"center"}:("after"==n||"right"==n&&t||"left"==n&&!t)&&(r={originX:"end",originY:"center"});const{x:s,y:o}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:s,originY:o}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,n=this.position;let r;"above"==n?r={overlayX:"center",overlayY:"bottom"}:"below"==n?r={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&t||"right"==n&&!t?r={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&t||"left"==n&&!t)&&(r={overlayX:"start",overlayY:"center"});const{x:s,y:o}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:s,overlayY:o}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),ao(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,n){return"above"===this.position||"below"===this.position?"top"===n?n="bottom":"bottom"===n&&(n="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:n}}_updateCurrentPositionClass(t){const{overlayY:n,originX:r,originY:s}=t;let o;if(o="center"===n?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===n&&"top"===s?"above":"below",o!==this._currentPosition){const l=this._overlayRef;if(l){const w=`${this._cssClassPrefix}-${LX}-`;l.removePanelClass(w+this._currentPosition),l.addPanelClass(w+o)}this._currentPosition=o}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",t=>{let n;this._setupPointerExitEventsIfNeeded(),void 0!==t.x&&void 0!==t.y&&(n=t),this.show(void 0,n)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",t=>{const n=t.targetTouches?.[0],r=n?{x:n.clientX,y:n.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,r)},this._defaultOptions.touchLongPressShowDelay??500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",n=>{const r=n.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",n=>this._wheelListener(n)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const n=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};t.push(["touchend",n],["touchcancel",n])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([n,r])=>{this._elementRef.nativeElement.addEventListener(n,r,NX)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(t){if(this._isTooltipVisible()){const n=this._document.elementFromPoint(t.clientX,t.clientY),r=this._elementRef.nativeElement;n!==r&&!r.contains(n)&&this.hide()}}_disableNativeGesturesIfNecessary(){const t=this.touchGestures;if("off"!==t){const n=this._elementRef.nativeElement,r=n.style;("on"===t||"INPUT"!==n.nodeName&&"TEXTAREA"!==n.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===t||!n.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}_syncAriaDescription(t){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,t,"tooltip"),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}static{this.\u0275fac=function(n){return new(n||e)(pt(Ss),pt(ai),pt(Zx),pt(Or),pt(li),pt(cr),pt(H7),pt(sc),pt(OX),pt(Ya),pt(RDt,8),pt(Gi))}}static{this.\u0275dir=me({type:e,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(n,r){2&n&&Ci("mat-mdc-tooltip-disabled",r.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"],standalone:!0})}}return e})(),LDt=(()=>{class e{constructor(t,n,r){this._changeDetectorRef=t,this._elementRef=n,this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Fe,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide",this._animationsDisabled="NoopAnimations"===r}show(t){null!=this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},t)}hide(t){null!=this._showTimeoutId&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},t)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){const t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>24&&t.width>=200}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation)}_cancelPendingAnimations(){null!=this._showTimeoutId&&clearTimeout(this._showTimeoutId),null!=this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(t){t?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(t){const n=this._tooltip.nativeElement,r=this._showAnimation,s=this._hideAnimation;if(n.classList.remove(t?s:r),n.classList.add(t?r:s),this._isVisible!==t&&(this._isVisible=t,this._changeDetectorRef.markForCheck()),t&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const o=getComputedStyle(n);("0s"===o.getPropertyValue("animation-duration")||"none"===o.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}t&&this._onShow(),this._animationsDisabled&&(n.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t))}static{this.\u0275fac=function(n){return new(n||e)(pt(In),pt(ai),pt(Hr,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-tooltip-component"]],viewQuery:function(n,r){if(1&n&&ki(ADt,7),2&n){let s;He(s=We())&&(r._tooltip=s.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(n,r){1&n&&Ut("mouseleave",function(o){return r._handleMouseLeave(o)})},standalone:!0,features:[Wi],decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(n,r){if(1&n){const s=xe();J(0,"div",1,0),Ut("animationend",function(l){return zt(s),Gt(r._handleAnimationEnd(l))}),J(2,"div",2),ut(3),et()()}2&n&&(Ci("mdc-tooltip--multiline",r._isMultiline),vt("ngClass",r.tooltipClass),ot(3),Ke(r.message))},dependencies:[Td],styles:['.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color, var(--mat-app-inverse-surface));color:var(--mdc-plain-tooltip-supporting-text-color, var(--mat-app-inverse-on-surface));border-radius:var(--mdc-plain-tooltip-container-shape, var(--mat-app-corner-extra-small));font-family:var(--mdc-plain-tooltip-supporting-text-font, var(--mat-app-body-small-font));font-size:var(--mdc-plain-tooltip-supporting-text-size, var(--mat-app-body-small-size));font-weight:var(--mdc-plain-tooltip-supporting-text-weight, var(--mat-app-body-small-weight));line-height:var(--mdc-plain-tooltip-supporting-text-line-height, var(--mat-app-body-small-line-height));letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, var(--mat-app-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0})}}return e})(),BX=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[MDt],imports:[rW,hu,xp,rn,rn,gh]})}}return e})();const NDt=["switch"],BDt=["*"];function VDt(e,i){1&e&&(J(0,"span",10),bl(),J(1,"svg",12),ye(2,"path",13),et(),J(3,"svg",14),ye(4,"path",15),et()())}const UDt=new te("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),zDt={provide:va,useExisting:kn(()=>Bk),multi:!0};class VX{constructor(i,t){this.source=i,this.checked=t}}let GDt=0,Bk=(()=>{class e{_createChangeEvent(t){return new VX(this,t)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(t){this._checked=t,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,n,r,s,o,l){this._elementRef=t,this._focusMonitor=n,this._changeDetectorRef=r,this.defaults=o,this._onChange=w=>{},this._onTouched=()=>{},this._validatorOnChange=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new Oe,this.toggleChange=new Oe,this.tabIndex=parseInt(s)||0,this.color=o.color||"accent",this._noopAnimations="NoopAnimations"===l,this.id=this._uniqueId="mat-mdc-slide-toggle-"+ ++GDt,this.hideIcon=o.hideIcon??!1,this.disabledInteractive=o.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?(this._focused=!0,this._changeDetectorRef.markForCheck()):t||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(t){t.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}validate(t){return this.required&&!0!==t.value?{required:!0}:null}registerOnValidatorChange(t){this._validatorOnChange=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new VX(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(sc),pt(In),wl("tabindex"),pt(UDt),pt(Hr,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(n,r){if(1&n&&ki(NDt,5),2&n){let s;He(s=We())&&(r._switchElement=s.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(n,r){2&n&&(uu("id",r.id),_i("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),oo(r.color?"mat-"+r.color:""),Ci("mat-mdc-slide-toggle-focused",r._focused)("mat-mdc-slide-toggle-checked",r.checked)("_mat-animation-noopable",r._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",qe],color:"color",disabled:[2,"disabled","disabled",qe],disableRipple:[2,"disableRipple","disableRipple",qe],tabIndex:[2,"tabIndex","tabIndex",t=>null==t?0:jr(t)],checked:[2,"checked","checked",qe],hideIcon:[2,"hideIcon","hideIcon",qe],disabledInteractive:[2,"disabledInteractive","disabledInteractive",qe]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],standalone:!0,features:[xi([zDt,{provide:ta,useExisting:e,multi:!0}]),vn,lr,Wi],ngContentSelectors:BDt,decls:13,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(n,r){if(1&n){const s=xe();nr(),J(0,"div",1)(1,"button",2,0),Ut("click",function(){return zt(s),Gt(r._handleClick())}),ye(3,"span",3),J(4,"span",4)(5,"span",5)(6,"span",6),ye(7,"span",7),et(),J(8,"span",8),ye(9,"span",9),et(),Ht(10,VDt,5,0,"span",10),et()()(),J(11,"label",11),Ut("click",function(l){return zt(s),Gt(l.stopPropagation())}),Si(12),et()()}if(2&n){const s=Zi(2);vt("labelPosition",r.labelPosition),ot(),Ci("mdc-switch--selected",r.checked)("mdc-switch--unselected",!r.checked)("mdc-switch--checked",r.checked)("mdc-switch--disabled",r.disabled)("mat-mdc-slide-toggle-disabled-interactive",r.disabledInteractive),vt("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex)("disabled",r.disabled&&!r.disabledInteractive),_i("id",r.buttonId)("name",r.name)("aria-label",r.ariaLabel)("aria-labelledby",r._getAriaLabelledBy())("aria-describedby",r.ariaDescribedby)("aria-required",r.required||null)("aria-checked",r.checked)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),ot(8),vt("matRippleTrigger",s)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),ot(),Tn(r.hideIcon?-1:10),ot(),vt("for",r.buttonId),_i("id",r._labelId)}},dependencies:[uh,NP],styles:['.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mdc-switch-track-width)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mdc-switch-track-height);border-radius:var(--mdc-switch-track-shape, var(--mat-app-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-switch-track-outline-width);border-color:var(--mat-switch-track-outline-color, var(--mat-app-outline))}.cdk-high-contrast-active .mdc-switch__track::before,.cdk-high-contrast-active .mdc-switch__track::after{border-color:currentColor}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-switch-selected-track-outline-width);border-color:var(--mat-switch-selected-track-outline-color)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-switch-disabled-unselected-track-outline-width);border-color:var(--mat-switch-disabled-unselected-track-outline-color, var(--mat-app-on-surface))}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mdc-switch-unselected-track-color, var(--mat-app-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, var(--mat-app-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, var(--mat-app-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, var(--mat-app-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, var(--mat-app-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mdc-switch-selected-track-color, var(--mat-app-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, var(--mat-app-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, var(--mat-app-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, var(--mat-app-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, var(--mat-app-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mdc-switch-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mdc-switch-handle-width);height:var(--mdc-switch-handle-height);border-radius:var(--mdc-switch-handle-shape, var(--mat-app-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size);height:var(--mat-switch-unselected-handle-size);margin:var(--mat-switch-unselected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size);height:var(--mat-switch-selected-handle-size);margin:var(--mat-switch-selected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size);height:var(--mat-switch-with-icon-handle-size)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size);height:var(--mat-switch-pressed-handle-size)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}.cdk-high-contrast-active .mdc-switch__handle::before,.cdk-high-contrast-active .mdc-switch__handle::after{border-color:currentColor}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mat-app-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, var(--mat-app-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, var(--mat-app-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, var(--mat-app-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, var(--mat-app-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, var(--mat-app-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, var(--mat-app-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, var(--mat-app-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, var(--mat-app-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, var(--mat-app-on-surface))}.mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mdc-switch-state-layer-size);height:var(--mdc-switch-state-layer-size)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-focus-state-layer-color, var(--mat-app-on-surface))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-pressed-state-layer-color, var(--mat-app-on-surface));opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-selected-hover-state-layer-color, var(--mat-app-primary))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-selected-focus-state-layer-color, var(--mat-app-primary))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-selected-pressed-state-layer-color, var(--mat-app-primary));opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size);fill:var(--mdc-switch-unselected-icon-color, var(--mat-app-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mat-app-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size);fill:var(--mdc-switch-selected-icon-color, var(--mat-app-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mat-app-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-switch-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-switch-label-text-font, var(--mat-app-body-medium-font));line-height:var(--mat-switch-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-switch-label-text-size, var(--mat-app-body-medium-size));letter-spacing:var(--mat-switch-label-text-tracking, var(--mat-app-body-medium-tracking));font-weight:var(--mat-switch-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}'],encapsulation:2,changeDetection:0})}}return e})(),jDt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[Bk,rn,rn]})}}return e})();function XDt(e,i){if(1&e){const t=xe();J(0,"button",14),Ut("click",function(){zt(t);const r=St().index;return Gt(St().removeReaction(r))}),J(1,"mat-icon"),ut(2,"close"),et()()}}function YDt(e,i){if(1&e){const t=xe();J(0,"mat-option",15),Ut("click",function(){const r=zt(t).$implicit,s=St().$implicit;return Gt(St().reactionSeveritySelected(s,r))}),ut(1),et()}if(2&e){const t=i.$implicit;vt("value",t),ot(),Ke(t.display)}}function $Dt(e,i){if(1&e){const t=xe();J(0,"div",4)(1,"div",5),Ht(2,XDt,3,0,"button",6),et(),J(3,"div",7)(4,"div",8)(5,"app-autocomplete-binding",9),Ut("selectionChange",function(r){const s=zt(t).$implicit;return Gt(St().reactionManifestationSelected(s,r))}),et()(),J(6,"button",10)(7,"mat-icon"),ut(8,"info"),et()(),J(9,"mat-menu",null,0)(11,"span",11),Ut("click",function(r){return zt(t),Gt(r.stopPropagation())}),J(12,"p"),ut(13,"Terminology binding:"),et(),J(14,"pre"),ut(15),et()()()(),J(16,"mat-form-field",12)(17,"mat-label"),ut(18,"Reaction Severity"),et(),J(19,"mat-select"),Ht(20,YDt,2,2,"mat-option",13),et()(),J(21,"div",7)(22,"div",8)(23,"app-autocomplete-binding",9),Ut("selectionChange",function(r){const s=zt(t).$implicit;return Gt(St().reactionRouteSelected(s,r))}),et()(),J(24,"button",10)(25,"mat-icon"),ut(26,"info"),et()(),J(27,"mat-menu",null,1)(29,"span",11),Ut("click",function(r){return zt(t),Gt(r.stopPropagation())}),J(30,"p"),ut(31,"Terminology binding:"),et(),J(32,"pre"),ut(33),et()()()()()}if(2&e){const t=i.index,n=Zi(10),r=Zi(28),s=St();ot(2),vt("ngIf",t>0),ot(3),vt("binding",s.reactionManifestationBinding),ot(),vt("matMenuTriggerFor",n),ot(5),vt("disableRipple",!0),ot(4),Ke(s.reactionManifestationBinding.ecl),ot(5),vt("ngForOf",s.severityOptions),ot(3),vt("binding",s.routeBinding),ot(),vt("matMenuTriggerFor",r),ot(5),vt("disableRipple",!0),ot(4),Ke(s.routeBinding.ecl)}}let QDt=(()=>{class e{constructor(){this.reactions=[],this.newManifestation=new Oe,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.reaction={},this.onChangeCallback=()=>{},this.onTouchedCallback=()=>{}}writeValue(t){void 0!==t&&(this.reactions=t)}setDisabledState(t){}addNewReaction(){this.reactions.push(this.reaction),this.reaction={},this.onChangeCallback(this.reactions)}removeReaction(t){this.reactions.splice(t,1),this.onChangeCallback(this.reactions)}reactionManifestationSelected(t,n){t.manifestation=n,this.newManifestation.emit(n),this.onChangeCallback(this.reactions)}reactionSeveritySelected(t,n){t.severity=n,this.onChangeCallback(this.reactions)}reactionRouteSelected(t,n){t.route=n,this.onChangeCallback(this.reactions)}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-allergies-allergy-list-reaction"]],inputs:{reactions:"reactions"},outputs:{newManifestation:"newManifestation"},features:[xi([{provide:va,useExisting:kn(()=>e),multi:!0}])],decls:5,vars:1,consts:[["reactionPopoverMenu","matMenu"],["routePopoverMenu","matMenu"],["class","reaction",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Add reaction",3,"click"],[1,"reaction"],[1,"button-container"],["mat-icon-button","","color","primary","class","remove","matTooltip","Remove reaction",3,"click",4,"ngIf"],[1,"row-centered"],[1,"small-form-field"],[3,"selectionChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disableRipple"],[1,"form-field"],[3,"value","click",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Remove reaction",1,"remove",3,"click"],[3,"click","value"]],template:function(n,r){1&n&&(Ht(0,$Dt,34,10,"div",2),J(1,"div")(2,"button",3),Ut("click",function(){return r.addNewReaction()}),J(3,"mat-icon"),ut(4,"add"),et()()()),2&n&&vt("ngForOf",r.reactions)},dependencies:[ys,ls,jo,ga,Rl,oc,vh,kl,ll,hh,Av,_h,Ev],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px;margin-bottom:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;width:100%}"]})}}return e})();const KDt=()=>({});function ZDt(e,i){if(1&e){const t=xe();J(0,"mat-option",31),Ut("click",function(){return zt(t),Gt(St().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;vt("value",t),ot(),Ke(t.display)}}function JDt(e,i){if(1&e){const t=xe();J(0,"mat-option",31),Ut("click",function(){return zt(t),Gt(St().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;vt("value",t),ot(),Ke(t.display)}}function qDt(e,i){if(1&e){const t=xe();J(0,"mat-option",31),Ut("click",function(){return zt(t),Gt(St().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;vt("value",t),ot(),Ke(t.display)}}function tMt(e,i){if(1&e){const t=xe();J(0,"app-autocomplete-binding",11),Ut("selectionChange",function(r){return zt(t),Gt(St().substanceSelected(r,!0))}),et()}if(2&e){const t=St();vt("binding",t.substanceBinding)("term",t.selectedSubstanceTerm)}}function eMt(e,i){if(1&e){const t=xe();J(0,"app-autocomplete-binding",11),Ut("selectionChange",function(r){return zt(t),Gt(St().substanceSelected(r))}),et()}if(2&e){const t=St();vt("binding",t.refinedSubstanceBinding)("term",t.selectedSubstanceTerm)}}function iMt(e,i){if(1&e&&(J(0,"pre"),ut(1),et()),2&e){const t=St();ot(),Ke(t.substanceBinding.ecl)}}function nMt(e,i){if(1&e&&(J(0,"pre"),ut(1),et()),2&e){const t=St();ot(),Ke(t.refinedSubstanceBinding.ecl)}}function rMt(e,i){if(1&e){const t=xe();J(0,"mat-option",31),Ut("click",function(){return zt(t),Gt(St().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;vt("value",t),ot(),Ke(t.display)}}function sMt(e,i){if(1&e){const t=xe();J(0,"mat-option",31),Ut("click",function(){return zt(t),Gt(St().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;vt("value",t),ot(),Ke(t.display)}}let aMt=(()=>{class e{constructor(t,n,r){this.terminologyService=t,this.clipboard=n,this._snackBar=r,this.newProblem=new Oe,this.clinicalStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"active",display:"Active"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"inactive",display:"Inactive"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"resolved",display:"Resolved"}],this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.verificationStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"unconfirmed",display:"Unconfirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"presumed",display:"Presumed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"confirmed",display:"Confirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"refuted",display:"Refuted"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"entered-in-error",display:"Entered in Error"}],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.intoleranceTypeOptions=[{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"609433001",display:"Hypersensitivity disposition (finding)",fhirCode:"allergy",fhirDisplay:"Allergy"},{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"782197009",display:"Intolerance to substance (finding)",fhirCode:"intolerance",fhirDisplay:"Intolerance"}],this.selectedIntoleranceType=null,this.intoleranceCategoryOptions=[{code:"food",display:"Food"},{code:"medication",display:"Medication"},{code:"environment",display:"Environment"},{code:"biologic",display:"Biologic"}],this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Fs(this.selectedIntoleranceCategories),this.criticalityOptions=[{code:"low",display:"Low Risk"},{code:"high",display:"High Risk"},{code:"unable-to-assess",display:"Unable to Assess Risk"}],this.selectedCriticality=null,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.codeBinding={ecl:"<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",title:"Allergy/Intolerance by propensity"},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.substanceBinding={ecl:"<<105590001 | Substance (substance) | OR <<373873005 | Pharmaceutical / biologic product (product) |",title:"Allergy/Intolerance substance or product"},this.refinedSubstanceBinding={ecl:"<<105590001 | Substance (substance) |",title:"Allergy/Intolerance substance based on propensity"},this.selectedSubstanceTerm="",this.selectedSubstance=null,this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm="",this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.selectedRoute=null,this.selectedRouteTerm="",this.outputAllergyBase={resourceType:"AllergyIntolerance",id:"medication",text:{},clinicalStatus:{coding:[]},verificationStatus:{coding:[]},type:"",category:[],criticality:"high",code:{coding:[]},reaction:[{substance:[{coding:[]}],manifestation:[{coding:[]}],exposureRoute:{coding:[]},severity:""}],patient:{reference:"Patient/example"},recordedDate:"2010-03-01",participant:[{function:{coding:[{system:"http://terminology.hl7.org/CodeSystem/provenance-participant-type",code:"author",display:"Author"}]},actor:{reference:"Practitioner/example"}}]},this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.outputAllergyStr=""}ngOnInit(){this.updateAllergyStr()}onReactionsChange(t){this.updateAllergyStr()}clear(){this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.selectedIntoleranceType=null,this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Fs(this.selectedIntoleranceCategories),this.selectedCriticality=null,this.selectedSeverity={},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.selectedSubstanceTerm="",this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm=" ",this.selectedRoute=null,this.selectedRouteTerm=" ",this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.updateAllergyStr(),setTimeout(()=>{this.selectedReactionManifestationTerm="",this.selectedRouteTerm=""},100)}updateAllergyStr(){this.outputAllergy.clinicalStatus.coding=[this.selectedClinicalStatus],this.outputAllergy.verificationStatus.coding=[this.selectedVerificationStatus],this.outputAllergy.type=this.selectedIntoleranceType?this.selectedIntoleranceType.fhirCode:"",this.outputAllergy.category=this.selectedIntoleranceCategories.length?this.selectedIntoleranceCategories.map(t=>t.display):[],this.outputAllergy.criticality=this.selectedCriticality?.code?[this.selectedCriticality.code]:{},this.outputAllergy.reaction=[],this.selectedReactions.forEach(t=>{t.manifestation.code&&(t.manifestation.system="http://snomed.info/sct"),t.route.code&&(t.route.system="http://snomed.info/sct"),this.outputAllergy.reaction.push({substance:[{coding:[this.selectedSubstance]}],manifestation:[{coding:t.manifestation?[t.manifestation]:[{}]}],exposureRoute:{coding:t.route?[t.route]:[{}]},severity:t.severity?t.severity.code:""})}),setTimeout(()=>{this.outputAllergyStr=JSON.stringify(this.outputAllergy,null,2)},100)}substanceSelected(t,n){var r=this;return we(function*(){n&&(r.selectedCodeTerm=""),r.selectedSubstance=t,r.selectedIntoleranceCategories=[],t=Object.assign({system:"http://snomed.info/sct"},t),r.recordPropensity||(r.outputAllergy.code.coding=[t]),r.outputAllergy.reaction[0].substance[0].coding=[t],(yield r.getSubstanceCategories(t))?.expansion?.contains?.forEach(o=>{"762766007"==o.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[0]):"115668003"==o.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[3]):"410942007"==o.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[1]):"57795002"==o.code&&r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[2])}),r.selectedIntoleranceCategoriesControl.setValue(r.selectedIntoleranceCategories),r.updateAllergyStr()})()}propensityRecordChanged(){this.outputAllergy.code.coding=[],this.selectedCode&&this.codeSelected(this.selectedCode)}codeSelected(t){var n=this;return we(function*(){if(t=Object.assign({system:"http://snomed.info/sct"},t)){n.selectedCodeTerm=t.display,n.selectedCode=t,n.recordPropensity&&(n.outputAllergy.code.coding=[t]);let r=yield n.getTypes(t);if(r.expansion?.contains){const o=r.expansion?.contains[0];n.selectedIntoleranceType=n.intoleranceTypeOptions.find(l=>l.code===o.code)}let s=yield n.getAllergySubstance(t);if(s.expansion.contains||(s=yield n.getIntoleranceSubstance(t)),s.expansion?.contains){const o=s.expansion?.contains[0];n.refinedSubstanceBinding.ecl=`<<${o.code} | ${o.display} |`,n.substanceSelected(o),n.selectedSubstanceTerm=o.display}else n.refinedSubstanceBinding.ecl="<<105590001 | Substance (substance) |"}})()}getIntoleranceSubstance(t){var n=this;return we(function*(){return Ia((yield n.terminologyService.expandValueSet(`${t.code} |${t.display}| . 47429007 |Associated with (attribute)|`,"")).pipe(Ri(s=>s)))})()}getAllergySubstance(t){var n=this;return we(function*(){return Ia((yield n.terminologyService.expandValueSet(`${t.code} |${t.display}| . 246075003 |Causative agent (attribute)|`,"")).pipe(Ri(s=>s)))})()}getSubstanceCategories(t){var n=this;return we(function*(){return Ia((yield n.terminologyService.expandValueSet(`> ${t.code} |${t.display}| AND (762766007 |Edible substance| OR 115668003 |Biological substance (substance)| OR 410942007 |Drug or medicament (substance)| OR 57795002 |Chemical element|)`,"")).pipe(Ri(s=>s)))})()}getTypes(t){var n=this;return we(function*(){return Ia((yield n.terminologyService.expandValueSet(`> ${t.code} |${t.display}| AND (609433001 |Hypersensitivity disposition| OR 782197009 |Intolerance to substance|)`,"")).pipe(Ri(s=>s)))})()}saveFhirResource(){var t=new Blob([this.outputAllergyStr],{type:"text/plain;charset=utf-8"});(0,Tu.saveAs)(t,"AllergyIntolerance.json")}copyToClipboard(t){this.clipboard.copy(t)}addToProblemsList(){if(this.selectedCode)this.newProblem.emit(this.selectedCode);else if(this.selectedSubstance&&this.selectedIntoleranceType){let t="";"609433001"===this.selectedIntoleranceType.code?t="Allergy to ":"782197009"===this.selectedIntoleranceType.code&&(t="Intolerance to "),t+=this.selectedSubstance.display,this.newProblem.emit({code:`${this.selectedIntoleranceType.code}:246075003=${this.selectedSubstance.code}`,display:t,substance:this.selectedSubstance})}else this._snackBar.openFromComponent(Rr,{duration:1e3,data:"Nothing to add to problem list",panelClass:["yellow-snackbar"]});this.clear()}static{this.\u0275fac=function(n){return new(n||e)(pt(ma),pt(Nk),pt(Rd))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-allergies-allergy-list"]],outputs:{newProblem:"newProblem"},decls:105,vars:30,consts:[["substancePopoverMenu","matMenu"],["codePopoverMenu","matMenu"],["id","main-card"],[1,"row"],[1,"column"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-flat-button","","color","accent","id","clear",3,"click"],[1,"row-centered"],[1,"smallest-form-field"],[3,"selectionChange","binding","term"],["mat-menu-item","",3,"click","disableRipple"],["matTooltip","Defines wether to use a propensity based model or a substance based model. Defines which one is recorded in the code element of the AllergyIntolerance resource.",3,"ngModelChange","click","ngModel"],[1,"form-field"],[3,"ngModelChange","ngModel"],[3,"value","click",4,"ngFor","ngForOf"],[1,"small-form-field"],[3,"binding","term","selectionChange",4,"ngIf"],[4,"ngIf"],[3,"formControl","multiple"],[3,"ngModelChange","newManifestation","ngModel"],["mat-flat-button","","color","accent",3,"click"],["href","https://hl7.org/FHIR/allergyintolerance.html","target","_blank"],["id","output"],["id","save"],["mat-icon-button","","matTooltip","Download FHIR Resource",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy FHIR Resource",3,"click"],["fontIcon","content_copy"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],[3,"click","value"]],template:function(n,r){if(1&n){const s=xe();J(0,"mat-card",2)(1,"div",3)(2,"div",4)(3,"h4"),ut(4,"Allergy Intolerance Form "),J(5,"button",5)(6,"mat-icon"),ut(7,"info"),et()(),J(8,"mat-menu",null,0)(10,"span",6),Ut("click",function(l){return zt(s),Gt(l.stopPropagation())}),J(11,"h4"),ut(12,"Allergy list"),et(),J(13,"p"),ut(14,"Allergy or intolerance can be recorded in a specific section (e.g., \u201cDrug Allergy and Intolerance\u201d) of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),et(),J(15,"p"),ut(16,"In terms of documenting sensitivity type in the allergy list there is the option to map to 609433001 |Hypersensitivity disposition which in SNOMED CT represents both immune-mediated and non-immune mediated hypersensitivity or to map to 609328004 |Allergic disposition (finding)|which is common clinical parlance for what many clinicians would mean by allergic or non-allergic hypersensitivity. In addition, as recommended in the FHIR documentation if one is unclear as to whether a condition represents hypersensitivity or intolerance, one can just omit the type element from the resource."),et(),J(17,"p"),ut(18,"If SNOMED CT concepts are used to document the causative agent, it is preferable to use concepts from the Substance rather than Pharmaceutical/biologic product hierarchy since this will facilitate the downstream use of data, e.g., clinical decision support, data exchange."),et(),J(19,"p"),ut(20,"Almost all allergy and intolerance finding concepts are modeled using substance concepts in SNOMED CT. The SNOMED CT substance hierarchy has grouper concepts that are based on structure (e.g., Macrolide) or disposition (e.g., substance with histamine receptor antagonist mechanism of action). Clinical decision support systems can utilize these grouper concepts to access information at the desired level of granularity. Clinicians can also record a class of substance instead of a specific drug or substance (e.g., angiotensin II receptor antagonist). Note that substance grouper concepts based on therapeutic role (e.g., anticonvulsant) is not recommended for use because they are currently under review and may be retired in future."),et(),J(21,"p"),ut(22,"There are situations in which it is difficult to determine the specific substance as a true cause or most likely cause of a condition. This is the case for allergy/intolerance to a product containing multiple substances."),et(),J(23,"p"),ut(24,"Records of allergy to multiple substances or to multi-ingredient products should be recorded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),et(),J(25,"p"),ut(26,"For more information check the "),J(27,"a",7),ut(28,"Implementation Guide"),et(),ut(29," developed by the SNOMED International Allergy Clinical Reference Group."),et()()()(),J(30,"button",8),Ut("click",function(){return zt(s),Gt(r.clear())}),ut(31,"Clear"),et(),J(32,"div",9)(33,"div",10)(34,"app-autocomplete-binding",11),Ut("selectionChange",function(l){return zt(s),Gt(r.codeSelected(l))}),et()(),J(35,"button",5)(36,"mat-icon"),ut(37,"info"),et()(),J(38,"mat-menu",null,1)(40,"span",12),Ut("click",function(l){return zt(s),Gt(l.stopPropagation())}),J(41,"p"),ut(42,"Terminology binding:"),et(),J(43,"pre"),ut(44),et()()(),J(45,"mat-slide-toggle",13),Aa("ngModelChange",function(l){return zt(s),ja(r.recordPropensity,l)||(r.recordPropensity=l),Gt(l)}),Ut("click",function(){return zt(s),Gt(r.propensityRecordChanged())}),ut(46," Propensity based model "),et()(),J(47,"mat-form-field",14)(48,"mat-label"),ut(49,"Allergy Intolerance Type"),et(),J(50,"mat-select",15),Aa("ngModelChange",function(l){return zt(s),ja(r.selectedIntoleranceType,l)||(r.selectedIntoleranceType=l),Gt(l)}),Ht(51,ZDt,2,2,"mat-option",16),et()(),J(52,"div",9)(53,"mat-form-field",4)(54,"mat-label"),ut(55,"Clinical Status"),et(),J(56,"mat-select",15),Aa("ngModelChange",function(l){return zt(s),ja(r.selectedClinicalStatus,l)||(r.selectedClinicalStatus=l),Gt(l)}),Ht(57,JDt,2,2,"mat-option",16),et()(),J(58,"mat-form-field",4)(59,"mat-label"),ut(60,"Verification Status"),et(),J(61,"mat-select",15),Aa("ngModelChange",function(l){return zt(s),ja(r.selectedVerificationStatus,l)||(r.selectedVerificationStatus=l),Gt(l)}),Ht(62,qDt,2,2,"mat-option",16),et()()(),J(63,"div",9)(64,"div",17),Ht(65,tMt,1,2,"app-autocomplete-binding",18)(66,eMt,1,2,"app-autocomplete-binding",18),et(),J(67,"button",5)(68,"mat-icon"),ut(69,"info"),et()(),J(70,"mat-menu",null,0)(72,"span",12),Ut("click",function(l){return zt(s),Gt(l.stopPropagation())}),J(73,"p"),ut(74,"Terminology binding:"),et(),Ht(75,iMt,2,1,"pre",19)(76,nMt,2,1,"pre",19),et()()(),J(77,"div",9)(78,"mat-form-field",4)(79,"mat-label"),ut(80,"Substance Category"),et(),J(81,"mat-select",20),Ht(82,rMt,2,2,"mat-option",16),et()(),J(83,"mat-form-field",4)(84,"mat-label"),ut(85,"Allergy Criticality"),et(),J(86,"mat-select",15),Aa("ngModelChange",function(l){return zt(s),ja(r.selectedCriticality,l)||(r.selectedCriticality=l),Gt(l)}),Ht(87,sMt,2,2,"mat-option",16),et()()(),J(88,"app-allergies-allergy-list-reaction",21),Aa("ngModelChange",function(l){return zt(s),ja(r.selectedReactions,l)||(r.selectedReactions=l),Gt(l)}),Ut("ngModelChange",function(l){return zt(s),Gt(r.onReactionsChange(l))})("newManifestation",function(l){return zt(s),Gt(r.newProblem.emit(l))}),et(),J(89,"button",22),Ut("click",function(){return zt(s),Gt(r.addToProblemsList())}),ut(90,"Save"),et()(),J(91,"div",4)(92,"h4"),ut(93,"AllergyIntolerance HL7 FHIR Resource ("),J(94,"a",23),ut(95,"link"),et(),ut(96,")"),et(),J(97,"div",24)(98,"div",25)(99,"button",26),Ut("click",function(){return zt(s),Gt(r.saveFhirResource())}),ye(100,"mat-icon",27),et(),J(101,"button",28),Ut("click",function(){return zt(s),Gt(r.copyToClipboard(r.outputAllergyStr))}),ye(102,"mat-icon",29),et()(),J(103,"textarea",30),ut(104," "),et()()()()()}if(2&n){const s=Zi(9),o=Zi(39);ot(5),vt("matMenuTriggerFor",s),ot(5),vt("disableRipple",!0),ot(24),vt("binding",r.codeBinding)("term",r.selectedCodeTerm),ot(),vt("matMenuTriggerFor",o),ot(5),vt("disableRipple",!0),ot(4),Ke(r.codeBinding.ecl),ot(),_a("ngModel",r.recordPropensity),ot(5),_a("ngModel",r.selectedIntoleranceType),ot(),vt("ngForOf",r.intoleranceTypeOptions),ot(5),_a("ngModel",r.selectedClinicalStatus),ot(),vt("ngForOf",r.clinicalStatusOptions),ot(4),_a("ngModel",r.selectedVerificationStatus),ot(),vt("ngForOf",r.verificationStatusOptions),ot(3),vt("ngIf",!r.recordPropensity),ot(),vt("ngIf",r.recordPropensity),ot(),vt("matMenuTriggerFor",s),ot(5),vt("disableRipple",!0),ot(3),vt("ngIf",!r.recordPropensity),ot(),vt("ngIf",r.recordPropensity),ot(5),vt("formControl",r.selectedIntoleranceCategoriesControl)("multiple",!0),ot(),vt("ngForOf",r.intoleranceCategoryOptions),ot(4),_a("ngModel",r.selectedCriticality),ot(),vt("ngForOf",r.criticalityOptions),ot(),_a("ngModel",r.selectedReactions),ot(15),vt("options",Xa(29,KDt))("lang","json")("innerHTML",r.outputAllergyStr,Gf)}},dependencies:[ys,ls,EE,Cs,jo,ga,Rl,oc,vh,kl,ll,hh,Yo,lb,tb,Av,lc,_h,Bk,Ev,QDt],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{position:relative;flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}#clear[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}}return e})(),oMt=(()=>{class e{constructor(t){this._snackBar=t}addProblem(t){var n=this;return we(function*(){n.allergiesProblemListComponent.addProblem(t),n._snackBar.openFromComponent(Rr,{duration:1e3,data:"Problem list updated",panelClass:["green-snackbar"]})})()}static{this.\u0275fac=function(n){return new(n||e)(pt(Rd))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-allergies"]],viewQuery:function(n,r){if(1&n&&ki(SX,5),2&n){let s;He(s=We())&&(r.allergiesProblemListComponent=s.first)}},decls:31,vars:2,consts:[["substancePopoverMenu","matMenu"],["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Allergy List Approach (AllergyIntolerance FHIR resource)"],[3,"newProblem"],["label","Problem List Approach (Condition FHIR resource)"]],template:function(n,r){if(1&n){const s=xe();J(0,"div",1)(1,"h3"),ut(2,"Allergy, Hypersensitivity and Intolerance "),J(3,"button",2)(4,"mat-icon"),ut(5,"info"),et()(),J(6,"mat-menu",null,0)(8,"span",3),Ut("click",function(l){return zt(s),Gt(l.stopPropagation())}),J(9,"h4"),ut(10,"Allergy, Hypersensitivity and Intolerance Implementation Demo"),et(),J(11,"p"),ut(12,"This is a demonstration of different implementation approaches for recording Allergies, Hypersensitivity and Intolerance."),et(),J(13,"p")(14,"b"),ut(15,"Allergy list:"),et(),ut(16," allergy or intolerance can be recorded in a specific section of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),et(),J(17,"p")(18,"b"),ut(19,"Problem list:"),et(),ut(20," Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),et(),J(21,"p"),ut(22,"For more information check the "),J(23,"a",4),ut(24,"Implementation Guide"),et(),ut(25," developed by the SNOMED International Allergy Clinical Reference Group."),et()()()(),J(26,"mat-tab-group",5)(27,"mat-tab",6)(28,"app-allergies-allergy-list",7),Ut("newProblem",function(l){return zt(s),Gt(r.addProblem(l))}),et()(),J(29,"mat-tab",8),ye(30,"app-allergies-problem-list"),et()()()}if(2&n){const s=Zi(7);ot(3),vt("matMenuTriggerFor",s),ot(5),vt("disableRipple",!0)}},dependencies:[jo,ga,Rl,oc,vh,_v,Ap,SX,aMt],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}#guideLink[_ngcontent-%COMP%]{font-size:smaller}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}}return e})();function UX(e){const i=e.cloneNode(!0),t=i.querySelectorAll("[id]"),n=e.nodeName.toLowerCase();i.removeAttribute("id");for(let r=0;r=n&&t<=r&&i>=s&&i<=o}function cb(e,i,t){e.top+=i,e.bottom=e.top+e.height,e.left+=t,e.right=e.left+e.width}function WX(e,i,t,n){const{top:r,right:s,bottom:o,left:l,width:w,height:E}=e,D=w*i,k=E*i;return n>r-k&&nl-D&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:Vk(t)})})}handleScroll(i){const t=Wo(i),n=this.positions.get(t);if(!n)return null;const r=n.scrollPosition;let s,o;if(t===this._document){const E=this.getViewportScrollPosition();s=E.top,o=E.left}else s=t.scrollTop,o=t.scrollLeft;const l=r.top-s,w=r.left-o;return this.positions.forEach((E,D)=>{E.clientRect&&t!==D&&t.contains(D)&&cb(E.clientRect,l,w)}),r.top=s,r.left=o,{top:l,left:w}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function XX(e,i){const t=e.rootNodes;if(1===t.length&&t[0].nodeType===i.ELEMENT_NODE)return t[0];const n=i.createElement("div");return t.forEach(r=>n.appendChild(r)),n}function zk(e,i,t){for(let n in i)if(i.hasOwnProperty(n)){const r=i[n];r?e.setProperty(n,r,t?.has(n)?"important":""):e.removeProperty(n)}return e}function Dv(e,i){const t=i?"":"none";zk(e.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function YX(e,i,t){zk(e.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},t)}function _E(e,i){return i&&"none"!=i?e+" "+i:e}function $X(e,i){e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.transform=AE(i.left,i.top)}function AE(e,i){return`translate3d(${Math.round(e)}px, ${Math.round(i)}px, 0)`}function QX(e){const i=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*i}function Gk(e,i){return e.getPropertyValue(i).split(",").map(n=>n.trim())}const hMt=new Set(["position"]);class dMt{get element(){return this._preview}constructor(i,t,n,r,s,o,l,w,E){this._document=i,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=s,this._previewClass=o,this._pickupPositionOnPage=l,this._initialTransform=w,this._zIndex=E}attach(i){this._preview=this._createPreview(),i.appendChild(this._preview),KX(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(i){this._preview.style.transform=i}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(i){this._preview.classList.add(i)}getTransitionDuration(){return function uMt(e){const i=getComputedStyle(e),t=Gk(i,"transition-property"),n=t.find(l=>"transform"===l||"all"===l);if(!n)return 0;const r=t.indexOf(n),s=Gk(i,"transition-duration"),o=Gk(i,"transition-delay");return QX(s[r])+QX(o[r])}(this._preview)}addEventListener(i,t){this._preview.addEventListener(i,t)}removeEventListener(i,t){this._preview.removeEventListener(i,t)}_createPreview(){const i=this._previewTemplate,t=this._previewClass,n=i?i.template:null;let r;if(n&&i){const s=i.matchSize?this._initialDomRect:null,o=i.viewContainer.createEmbeddedView(n,i.context);o.detectChanges(),r=XX(o,this._document),this._previewEmbeddedView=o,i.matchSize?$X(r,s):r.style.transform=AE(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=UX(this._rootElement),$X(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return zk(r.style,{"pointer-events":"none",margin:KX(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},hMt),Dv(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(s=>r.classList.add(s)):r.classList.add(t)),r}}function KX(e){return"showPopover"in e}const ZX=rc({passive:!0}),DE=rc({passive:!1}),JX=rc({passive:!1,capture:!0}),qX=new Set(["position"]);class pMt{get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(i){i!==this._disabled&&(this._disabled=i,this._toggleNativeDragInteractions(),this._handles.forEach(t=>Dv(t,i)))}constructor(i,t,n,r,s,o){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=s,this._dragDropRegistry=o,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=au(!1),this._moveEvents=new Fe,this._pointerMoveSubscription=Pe.EMPTY,this._pointerUpSubscription=Pe.EMPTY,this._scrollSubscription=Pe.EMPTY,this._resizeSubscription=Pe.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this.scale=1,this._disabled=!1,this.beforeStarted=new Fe,this.started=new Fe,this.released=new Fe,this.ended=new Fe,this.entered=new Fe,this.exited=new Fe,this.dropped=new Fe,this.moved=this._moveEvents,this._pointerDown=l=>{if(this.beforeStarted.next(),this._handles.length){const w=this._getTargetHandle(l);w&&!this._disabledHandles.has(w)&&!this.disabled&&this._initializeDragSequence(w,l)}else this.disabled||this._initializeDragSequence(this._rootElement,l)},this._pointerMove=l=>{const w=this._getPointerPositionOnPage(l);if(!this._hasStartedDragging()){if(Math.abs(w.x-this._pickupPositionOnPage.x)+Math.abs(w.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const L=Date.now()>=this._dragStartTime+this._getDragStartDelay(l),U=this._dropContainer;if(!L)return void this._endDragSequence(l);(!U||!U.isDragging()&&!U.isReceiving())&&(l.cancelable&&l.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(l)))}return}l.cancelable&&l.preventDefault();const E=this._getConstrainedPointerPosition(w);if(this._hasMoved=!0,this._lastKnownPointerPosition=w,this._updatePointerDirectionDelta(E),this._dropContainer)this._updateActiveDropContainer(E,w);else{const D=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,k=this._activeTransform;k.x=E.x-D.x+this._passiveTransform.x,k.y=E.y-D.y+this._passiveTransform.y,this._applyRootElementTransform(k.x,k.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:E,event:l,distance:this._getDragDistance(E),delta:this._pointerDirectionDelta})})},this._pointerUp=l=>{this._endDragSequence(l)},this._nativeDragStart=l=>{if(this._handles.length){const w=this._getTargetHandle(l);w&&!this._disabledHandles.has(w)&&!this.disabled&&l.preventDefault()}else this.disabled||l.preventDefault()},this.withRootElement(i).withParent(t.parentDragRef||null),this._parentPositions=new jX(n),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(n=>uo(n)),this._handles.forEach(n=>Dv(n,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){const t=uo(i);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,DE),t.addEventListener("touchstart",this._pointerDown,ZX),t.addEventListener("dragstart",this._nativeDragStart,DE)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?uo(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),Dv(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),Dv(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){const i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){const i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",eY,JX)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging()))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){ub(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{t.addEventListener("selectstart",eY,JX)}),n){const r=this._rootElement,s=r.parentNode,o=this._placeholder=this._createPlaceholderElement(),l=this._anchor=this._anchor||this._document.createComment("");s.insertBefore(l,r),this._initialTransform=r.style.transform||"",this._preview=new dMt(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(s,t)),YX(r,!1,qX),this._document.body.appendChild(s.replaceChild(o,r)),this.started.next({source:this,event:i}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(i,t){this._parentDragRef&&t.stopPropagation();const n=this.isDragging(),r=ub(t),s=!r&&0!==t.button,o=this._rootElement,l=Wo(t),w=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),E=r?FS(t):kS(t);if(l&&l.draggable&&"mousedown"===t.type&&t.preventDefault(),n||s||w||E)return;if(this._handles.length){const O=o.style;this._rootElementTapHighlight=O.webkitTapHighlightColor||"",O.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(O=>this._updateOnScroll(O)),this._boundaryElement&&(this._boundaryRect=Vk(this._boundaryElement));const D=this._previewTemplate;this._pickupPositionInElement=D&&D.template&&!D.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,t);const k=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:k.x,y:k.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(i){YX(this._rootElement,!0,qX),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(i),s=this._getDragDistance(r),o=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:s,dropPoint:r,event:i}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:s,dropPoint:r,event:i}),t.drop(this,n,this._initialIndex,this._initialContainer,o,s,r,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:t},{x:n,y:r}){let s=this._initialContainer._getSiblingContainerFromPosition(this,i,t);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,t)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,i,t,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,i,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,t):this._applyPreviewTransform(i-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const i=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);const t=this._preview.getTransitionDuration();return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{const r=o=>{(!o||this._preview&&Wo(o)===this._preview.element&&"transform"===o.propertyName)&&(this._preview?.removeEventListener("transitionend",r),n(),clearTimeout(s))},s=setTimeout(r,1.5*t);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const i=this._placeholderTemplate,t=i?i.template:null;let n;return t?(this._placeholderRef=i.viewContainer.createEmbeddedView(t,i.context),this._placeholderRef.detectChanges(),n=XX(this._placeholderRef,this._document)):n=UX(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(i,t,n){const r=t===this._rootElement?null:t,s=r?r.getBoundingClientRect():i,o=ub(n)?n.targetTouches[0]:n,l=this._getViewportScrollPosition();return{x:s.left-i.left+(o.pageX-s.left-l.left),y:s.top-i.top+(o.pageY-s.top-l.top)}}_getPointerPositionOnPage(i){const t=this._getViewportScrollPosition(),n=ub(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,r=n.pageX-t.left,s=n.pageY-t.top;if(this._ownerSVGElement){const o=this._ownerSVGElement.getScreenCTM();if(o){const l=this._ownerSVGElement.createSVGPoint();return l.x=r,l.y=s,l.matrixTransform(o.inverse())}}return{x:r,y:s}}_getConstrainedPointerPosition(i){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:n,y:r}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if("x"===this.lockAxis||"x"===t?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):("y"===this.lockAxis||"y"===t)&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){const{x:s,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,l=this._boundaryRect,{width:w,height:E}=this._getPreviewRect(),D=l.top+o,k=l.bottom-(E-o);n=tY(n,l.left+s,l.right-(w-s)),r=tY(r,D,k)}return{x:n,y:r}}_updatePointerDirectionDelta(i){const{x:t,y:n}=i,r=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-s.x),l=Math.abs(n-s.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=t>s.x?1:-1,s.x=t),l>this._config.pointerDirectionChangeThreshold&&(r.y=n>s.y?1:-1,s.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,Dv(this._rootElement,i))}_removeRootElementListeners(i){i.removeEventListener("mousedown",this._pointerDown,DE),i.removeEventListener("touchstart",this._pointerDown,ZX),i.removeEventListener("dragstart",this._nativeDragStart,DE)}_applyRootElementTransform(i,t){const n=1/this.scale,r=AE(i*n,t*n),s=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=s.transform&&"none"!=s.transform?s.transform:""),s.transform=_E(r,this._initialTransform)}_applyPreviewTransform(i,t){const n=this._previewTemplate?.template?void 0:this._initialTransform,r=AE(i,t);this._preview.setTransform(_E(r,n))}_getDragDistance(i){const t=this._pickupPositionOnPage;return t?{x:i.x-t.x,y:i.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:t}=this._passiveTransform;if(0===i&&0===t||this.isDragging()||!this._boundaryElement)return;const n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===n.width&&0===n.height)return;const s=r.left-n.left,o=n.right-r.right,l=r.top-n.top,w=n.bottom-r.bottom;r.width>n.width?(s>0&&(i+=s),o>0&&(i-=o)):i=0,r.height>n.height?(l>0&&(t+=l),w>0&&(t-=w)):t=0,(i!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:i})}_getDragStartDelay(i){const t=this.dragStartDelay;return"number"==typeof t?t:ub(i)?t.touch:t?t.mouse:0}_updateOnScroll(i){const t=this._parentPositions.handleScroll(i);if(t){const n=Wo(i);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&cb(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=SS(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,t){const n=this._previewContainer||"global";if("parent"===n)return i;if("global"===n){const r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return uo(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(i){return this._handles.find(t=>i.target&&(i.target===t||t.contains(i.target)))}}function tY(e,i,t){return Math.max(i,Math.min(t,e))}function ub(e){return"t"===e.type[0]}function eY(e){e.preventDefault()}function ME(e,i,t){const n=hb(i,e.length-1),r=hb(t,e.length-1);if(n===r)return;const s=e[n],o=r0)return null;const l="horizontal"===this.orientation,w=s.findIndex(W=>W.drag===i),E=s[o],k=E.clientRect,O=w>o?1:-1,L=this._getItemOffsetPx(s[w].clientRect,k,O),U=this._getSiblingOffsetPx(w,s,O),j=s.slice();return ME(s,w,o),s.forEach((W,Z)=>{if(j[Z]===W)return;const rt=W.drag===i,st=rt?L:U,yt=rt?i.getPlaceholderElement():W.drag.getRootElement();W.offset+=st;const Tt=Math.round(W.offset*(1/W.drag.scale));l?(yt.style.transform=_E(`translate3d(${Tt}px, 0, 0)`,W.initialTransform),cb(W.clientRect,0,st)):(yt.style.transform=_E(`translate3d(0, ${Tt}px, 0)`,W.initialTransform),cb(W.clientRect,st,0))}),this._previousSwap.overlaps=Uk(k,t,n),this._previousSwap.drag=E.drag,this._previousSwap.delta=l?r.x:r.y,{previousIndex:w,currentIndex:o}}enter(i,t,n,r){const s=null==r||r<0?this._getItemIndexFromPointerPosition(i,t,n):r,o=this._activeDraggables,l=o.indexOf(i),w=i.getPlaceholderElement();let E=o[s];if(E===i&&(E=o[s+1]),!E&&(null==s||-1===s||s-1&&o.splice(l,1),E&&!this._dragDropRegistry.isDragging(E)){const D=E.getRootElement();D.parentElement.insertBefore(w,D),o.splice(s,0,i)}else this._element.appendChild(w),o.push(i);w.style.transform="",this._cacheItemPositions()}withItems(i){this._activeDraggables=i.slice(),this._cacheItemPositions()}withSortPredicate(i){this._sortPredicate=i}reset(){this._activeDraggables?.forEach(i=>{const t=i.getRootElement();if(t){const n=this._itemPositions.find(r=>r.drag===i)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===i)}updateOnScroll(i,t){this._itemPositions.forEach(({clientRect:n})=>{cb(n,i,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(i){this._element=i}_cacheItemPositions(){const i="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:Vk(n)}}).sort((t,n)=>i?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(i,t,n){const r="horizontal"===this.orientation;let s=r?t.left-i.left:t.top-i.top;return-1===n&&(s+=r?t.width-i.width:t.height-i.height),s}_getSiblingOffsetPx(i,t,n){const r="horizontal"===this.orientation,s=t[i].clientRect,o=t[i+-1*n];let l=s[r?"width":"height"]*n;if(o){const w=r?"left":"top",E=r?"right":"bottom";-1===n?l-=o.clientRect[w]-s[E]:l+=s[w]-o.clientRect[E]}return l}_shouldEnterAsFirstChild(i,t){if(!this._activeDraggables.length)return!1;const n=this._itemPositions,r="horizontal"===this.orientation;if(n[0].drag!==this._activeDraggables[0]){const o=n[n.length-1].clientRect;return r?i>=o.right:t>=o.bottom}{const o=n[0].clientRect;return r?i<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(i,t,n,r){const s="horizontal"===this.orientation,o=this._itemPositions.findIndex(({drag:l,clientRect:w})=>l!==i&&((!r||l!==this._previousSwap.drag||!this._previousSwap.overlaps||(s?r.x:r.y)!==this._previousSwap.delta)&&(s?t>=Math.floor(w.left)&&t=Math.floor(w.top)&&nw?D.after(E):D.before(E),ME(this._activeItems,w,s);const k=this._getRootNode().elementFromPoint(t,n);return o.deltaX=r.x,o.deltaY=r.y,o.drag=l,o.overlaps=D===k||D.contains(k),{previousIndex:w,currentIndex:s}}enter(i,t,n,r){let s=null==r||r<0?this._getItemIndexFromPointerPosition(i,t,n):r;-1===s&&(s=this._getClosestItemIndexToPointer(i,t,n));const o=this._activeItems[s],l=this._activeItems.indexOf(i);l>-1&&this._activeItems.splice(l,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(s,0,i),o.getRootElement().before(i.getPlaceholderElement())):(this._activeItems.push(i),this._element.appendChild(i.getPlaceholderElement()))}withItems(i){this._activeItems=i.slice()}withSortPredicate(i){this._sortPredicate=i}reset(){const i=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){const[r,s]=this._relatedNodes[n];r.parentNode===i&&r.nextSibling!==s&&(null===s?i.appendChild(r):s.parentNode===i&&i.insertBefore(r,s))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(i){return this._activeItems.indexOf(i)}updateOnScroll(){this._activeItems.forEach(i=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(i){i!==this._element&&(this._element=i,this._rootNode=void 0)}_getItemIndexFromPointerPosition(i,t,n){const r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),s=r?this._activeItems.findIndex(o=>{const l=o.getRootElement();return r===l||l.contains(r)}):-1;return-1!==s&&this._sortPredicate(s,i)?s:-1}_getRootNode(){return this._rootNode||(this._rootNode=SS(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(i,t,n){if(0===this._activeItems.length)return-1;if(1===this._activeItems.length)return 0;let r=1/0,s=-1;for(let o=0;o!0,this.sortPredicate=()=>!0,this.beforeStarted=new Fe,this.entered=new Fe,this.exited=new Fe,this.dropped=new Fe,this.sorted=new Fe,this.receivingStarted=new Fe,this.receivingStopped=new Fe,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=Pe.EMPTY,this._verticalScrollDirection=cc.NONE,this._horizontalScrollDirection=$o.NONE,this._stopScrollTimers=new Fe,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),function lMt(e=0,i=Hx){return e<0&&(e=0),Kx(e,e,i)}(0,_W).pipe(Yi(this._stopScrollTimers)).subscribe(()=>{const l=this._scrollNode,w=this.autoScrollStep;this._verticalScrollDirection===cc.UP?l.scrollBy(0,-w):this._verticalScrollDirection===cc.DOWN&&l.scrollBy(0,w),this._horizontalScrollDirection===$o.LEFT?l.scrollBy(-w,0):this._horizontalScrollDirection===$o.RIGHT&&l.scrollBy(w,0)})};const o=this.element=uo(i);this._document=n,this.withOrientation("vertical").withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new jX(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,t,n,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(i)),this._sortStrategy.enter(i,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,t,n,r,s,o,l,w={}){this._reset(),this.dropped.next({item:i,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:s,distance:o,dropPoint:l,event:w})}withItems(i){const t=this._draggables;return this._draggables=i,i.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>-1===i.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._direction=i,this._sortStrategy instanceof iY&&(this._sortStrategy.direction=i),this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){if("mixed"===i)this._sortStrategy=new mMt(this._document,this._dragDropRegistry);else{const t=new iY(this._dragDropRegistry);t.direction=this._direction,t.orientation=i,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(i){const t=this._container;return this._scrollableElements=-1===i.indexOf(t)?[t,...i]:i.slice(),this}withElementContainer(i){if(i===this._container)return this;uo(this.element);const n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(i);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(i),this._cachedShadowRoot=null,this._scrollableElements.unshift(i),this._container=i,this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,t,n,r){if(this.sortingDisabled||!this._domRect||!WX(this._domRect,.05,t,n))return;const s=this._sortStrategy.sort(i,t,n,r);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,t){if(this.autoScrollDisabled)return;let n,r=cc.NONE,s=$o.NONE;if(this._parentPositions.positions.forEach((o,l)=>{l===this._document||!o.clientRect||n||WX(o.clientRect,.05,i,t)&&([r,s]=function vMt(e,i,t,n,r){const s=sY(i,r),o=aY(i,n);let l=cc.NONE,w=$o.NONE;if(s){const E=e.scrollTop;s===cc.UP?E>0&&(l=cc.UP):e.scrollHeight-E>e.clientHeight&&(l=cc.DOWN)}if(o){const E=e.scrollLeft;"rtl"===t?o===$o.RIGHT?E<0&&(w=$o.RIGHT):e.scrollWidth+E>e.clientWidth&&(w=$o.LEFT):o===$o.LEFT?E>0&&(w=$o.LEFT):e.scrollWidth-E>e.clientWidth&&(w=$o.RIGHT)}return[l,w]}(l,o.clientRect,this._direction,i,t),(r||s)&&(n=l))}),!r&&!s){const{width:o,height:l}=this._viewportRuler.getViewportSize(),w={width:o,height:l,top:0,right:o,bottom:l,left:0};r=sY(w,t),s=aY(w,i),n=window}n&&(r!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=s,this._scrollNode=n,(r||s)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const i=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;const i=this._container.style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(i,t){return null!=this._domRect&&Uk(this._domRect,i,t)}_getSiblingContainerFromPosition(i,t,n){return this._siblings.find(r=>r._canReceive(i,t,n))}_canReceive(i,t,n){if(!this._domRect||!Uk(this._domRect,t,n)||!this.enterPredicate(i,this))return!1;const r=this._getShadowRoot().elementFromPoint(t,n);return!!r&&(r===this._container||this._container.contains(r))}_startReceiving(i,t){const n=this._activeSiblings;!n.has(i)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:t}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(i);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const i=SS(this._container);this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const i=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,i))}}function sY(e,i){const{top:t,bottom:n,height:r}=e,s=.05*r;return i>=t-s&&i<=t+s?cc.UP:i>=n-s&&i<=n+s?cc.DOWN:cc.NONE}function aY(e,i){const{left:t,right:n,width:r}=e,s=.05*r;return i>=t-s&&i<=t+s?$o.LEFT:i>=n-s&&i<=n+s?$o.RIGHT:$o.NONE}const IE=rc({passive:!1,capture:!0}),RE=new Set;let yMt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],standalone:!0,features:[Wi],decls:0,vars:0,template:function(n,r){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0})}}return e})(),xMt=(()=>{class e{constructor(t,n){this._ngZone=t,this._appRef=Jt(ql),this._environmentInjector=Jt(za),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=au([]),this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new Fe,this.pointerUp=new Fe,this.scroll=new Fe,this._preventDefaultWhileDragging=r=>{this._activeDragInstances().length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=n}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,IE)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,IE)}startDragging(t,n){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._loadResets(),this._activeDragInstances.update(r=>[...r,t]),1===this._activeDragInstances().length)){const r=n.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:IE}),r||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:IE}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,o)=>{this._document.addEventListener(o,s.handler,s.options)})})}}stopDragging(t){this._activeDragInstances.update(n=>{const r=n.indexOf(t);return r>-1?(n.splice(r,1),[...n]):n}),0===this._activeDragInstances().length&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){const n=[this.scroll];return t&&t!==this._document&&n.push(new dr(r=>this._ngZone.runOutsideAngular(()=>{const o=l=>{this._activeDragInstances().length&&r.next(l)};return t.addEventListener("scroll",o,!0),()=>{t.removeEventListener("scroll",o,!0)}}))),qr(...n)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,n)=>{this._document.removeEventListener(n,t.handler,t.options)}),this._globalListeners.clear()}_loadResets(){if(!RE.has(this._appRef)){RE.add(this._appRef);const t=function cvt(e,i){const t=Fn(e),n=i.elementInjector||Xw();return new jy(t).create(n,i.projectableNodes,i.hostElement,i.environmentInjector)}(yMt,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{RE.delete(this._appRef),0===RE.size&&t.destroy()})}}static{this.\u0275fac=function(n){return new(n||e)(re(li),re(Gi))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const bMt={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let Hk=(()=>{class e{constructor(t,n,r,s){this._document=t,this._ngZone=n,this._viewportRuler=r,this._dragDropRegistry=s}createDrag(t,n=bMt){return new pMt(t,n,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new gMt(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static{this.\u0275fac=function(n){return new(n||e)(re(Gi),re(li),re(mh),re(xMt))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const db=new te("CDK_DRAG_PARENT"),oY=new te("CdkDragHandle");let lY=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._stateChanges.next(this)}constructor(t,n){this.element=t,this._parentDrag=n,this._stateChanges=new Fe,this._disabled=!1,n?._addHandle(this)}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(db,12))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",qe]},standalone:!0,features:[xi([{provide:oY,useExisting:e}]),vn]})}}return e})();const cY=new te("CDK_DRAG_CONFIG"),uY=new te("CdkDropList");let Wk=(()=>{class e{static{this._dragInstances=[]}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}constructor(t,n,r,s,o,l,w,E,D,k,O){this.element=t,this.dropContainer=n,this._ngZone=s,this._viewContainerRef=o,this._dir=w,this._changeDetectorRef=D,this._selfHandle=k,this._parentDrag=O,this._destroyed=new Fe,this._handles=new Kr([]),this.scale=1,this.started=new Oe,this.released=new Oe,this.ended=new Oe,this.entered=new Oe,this.exited=new Oe,this.dropped=new Oe,this.moved=new dr(L=>{const U=this._dragRef.moved.pipe(Ri(j=>({source:this,pointerPosition:j.pointerPosition,event:j.event,delta:j.delta,distance:j.distance}))).subscribe(L);return()=>{U.unsubscribe()}}),this._injector=Jt(On),this._dragRef=E.createDrag(t,{dragStartThreshold:l&&null!=l.dragStartThreshold?l.dragStartThreshold:5,pointerDirectionChangeThreshold:l&&null!=l.pointerDirectionChangeThreshold?l.pointerDirectionChangeThreshold:5,zIndex:l?.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),l&&this._assignDefaults(l),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(Yi(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){ao(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){const n=t.rootElementSelector,r=t.freeDragPosition;n&&!n.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,r&&!r.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const t=e._dragInstances.indexOf(this);t>-1&&e._dragInstances.splice(t,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){const n=this._handles.getValue();n.push(t),this._handles.next(n)}_removeHandle(t){const n=this._handles.getValue(),r=n.indexOf(t);r>-1&&(n.splice(r,1),this._handles.next(n))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){const t=this.element.nativeElement;let n=t;this.rootElementSelector&&(n=void 0!==t.closest?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(n||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?this.element.nativeElement.closest(t):uo(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const n=this._dir,r=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay="object"==typeof r&&r?r:Id(r),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),n&&t.withDirection(n.value)}}),t.beforeStarted.pipe(xs(1)).subscribe(()=>{if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let n=this.element.nativeElement.parentElement;for(;n;){if(n.classList.contains("cdk-drag")){t.withParent(e._dragInstances.find(r=>r.element.nativeElement===n)?._dragRef||null);break}n=n.parentElement}})}_handleEvents(t){t.started.subscribe(n=>{this.started.emit({source:this,event:n.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(n=>{this.released.emit({source:this,event:n.event})}),t.ended.subscribe(n=>{this.ended.emit({source:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(n=>{this.entered.emit({container:n.container.data,item:this,currentIndex:n.currentIndex})}),t.exited.subscribe(n=>{this.exited.emit({container:n.container.data,item:this})}),t.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,isPointerOverContainer:n.isPointerOverContainer,item:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event})})}_assignDefaults(t){const{lockAxis:n,dragStartDelay:r,constrainPosition:s,previewClass:o,boundaryElement:l,draggingDisabled:w,rootElementSelector:E,previewContainer:D}=t;this.disabled=w??!1,this.dragStartDelay=r||0,n&&(this.lockAxis=n),s&&(this.constrainPosition=s),o&&(this.previewClass=o),l&&(this.boundaryElement=l),E&&(this.rootElementSelector=E),D&&(this.previewContainer=D)}_setupHandlesListener(){this._handles.pipe(cs(t=>{const n=t.map(r=>r.element);this._selfHandle&&this.rootElementSelector&&n.push(this.element),this._dragRef.withHandles(n)}),ks(t=>qr(...t.map(n=>n._stateChanges.pipe(Ma(n))))),Yi(this._destroyed)).subscribe(t=>{const n=this._dragRef,r=t.element.nativeElement;t.disabled?n.disableHandle(r):n.enableHandle(r)})}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(uY,12),pt(Gi),pt(li),pt(Or),pt(cY,8),pt(Ya,8),pt(Hk),pt(In),pt(oY,10),pt(db,12))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){2&n&&Ci("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",qe],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",jr]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[xi([{provide:db,useExisting:e}]),vn,lr]})}}return e})();const jk=new te("CdkDropListGroup");let CMt=0,Xk=(()=>{class e{static{this._dropLists=[]}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}constructor(t,n,r,s,o,l,w){this.element=t,this._changeDetectorRef=r,this._scrollDispatcher=s,this._dir=o,this._group=l,this._destroyed=new Fe,this.connectedTo=[],this.id="cdk-drop-list-"+CMt++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new Oe,this.entered=new Oe,this.exited=new Oe,this.sorted=new Oe,this._unsortedItems=new Set,this._dropListRef=n.createDropList(t),this._dropListRef.data=this,w&&this._assignDefaults(w),this._dropListRef.enterPredicate=(E,D)=>this.enterPredicate(E.data,D.data),this._dropListRef.sortPredicate=(E,D,k)=>this.sortPredicate(E,D.data,k.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),e._dropLists.push(this),l&&l._items.add(this)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,n)=>t._dragRef.getVisibleElement().compareDocumentPosition(n._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const t=e._dropLists.indexOf(this);t>-1&&e._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe(Ma(this._dir.value),Yi(this._destroyed)).subscribe(n=>t.withDirection(n)),t.beforeStarted.subscribe(()=>{const n=Wx(this.connectedTo).map(r=>"string"==typeof r?e._dropLists.find(o=>o.id===r):r);if(this._group&&this._group._items.forEach(r=>{-1===n.indexOf(r)&&n.push(r)}),!this._scrollableParentsResolved){const r=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(r),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){const r=this.element.nativeElement.querySelector(this.elementContainerSelector);t.withElementContainer(r)}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=Id(this.autoScrollStep,2),t.connectedTo(n.filter(r=>r&&r!==this).map(r=>r._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(n=>{this.entered.emit({container:this,item:n.item.data,currentIndex:n.currentIndex})}),t.exited.subscribe(n=>{this.exited.emit({container:this,item:n.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(n=>{this.sorted.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:n.item.data})}),t.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,item:n.item.data,isPointerOverContainer:n.isPointerOverContainer,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),qr(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){const{lockAxis:n,draggingDisabled:r,sortingDisabled:s,listAutoScrollDisabled:o,listOrientation:l}=t;this.disabled=r??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=o??!1,this.orientation=l||"vertical",n&&(this.lockAxis=n)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(Hk),pt(In),pt(Zx),pt(Ya,8),pt(jk,12),pt(cY,8))}}static{this.\u0275dir=me({type:e,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(n,r){2&n&&(_i("id",r.id),Ci("cdk-drop-list-disabled",r.disabled)("cdk-drop-list-dragging",r._dropListRef.isDragging())("cdk-drop-list-receiving",r._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",qe],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",qe],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",qe],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],standalone:!0,features:[xi([{provide:jk,useValue:void 0},{provide:uY,useExisting:e}]),vn]})}}return e})(),AMt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[Hk],imports:[gh]})}}return e})();function DMt(e,i){}class PE{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let hY=(()=>{class e extends GS{constructor(t,n,r,s,o,l,w,E){super(),this._elementRef=t,this._focusTrapFactory=n,this._config=s,this._interactivityChecker=o,this._ngZone=l,this._overlayRef=w,this._focusMonitor=E,this._platform=Jt(cr),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=Jt(In),this._injector=Jt(On),this._isDestroyed=!1,this.attachDomPortal=D=>{this._portalOutlet.hasAttached();const k=this._portalOutlet.attachDomPortal(D);return this._contentAttached(),k},this._document=r,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){const n=this._ariaLabelledByQueue.indexOf(t);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();const n=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),n}attachTemplatePortal(t){this._portalOutlet.hasAttached();const n=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),n}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,n){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{t.removeEventListener("blur",r),t.removeEventListener("mousedown",r),t.removeAttribute("tabindex")};t.addEventListener("blur",r),t.addEventListener("mousedown",r)})),t.focus(n)}_focusByCssSelector(t,n){let r=this._elementRef.nativeElement.querySelector(t);r&&this._forceFocus(r,n)}_trapFocus(){this._isDestroyed||ao(()=>{const t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}},{injector:this._injector})}_restoreFocus(){const t=this._config.restoreFocus;let n=null;if("string"==typeof t?n=this._document.querySelector(t):"boolean"==typeof t?n=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(n=t),this._config.restoreFocus&&n&&"function"==typeof n.focus){const r=ES(),s=this._elementRef.nativeElement;(!r||r===this._document.body||r===s||s.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,n=ES();return t===n||t.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=ES()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(IP),pt(Gi,8),pt(PE),pt(PS),pt(li),pt(XS),pt(sc))}}static{this.\u0275cmp=Ge({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(1&n&&ki(ph,7),2&n){let s;He(s=We())&&(r._portalOutlet=s.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){2&n&&_i("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},standalone:!0,features:[yi,Wi],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){1&n&&Ht(0,DMt,0,0,"ng-template",0)},dependencies:[ph],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}}return e})();class Yk{constructor(i,t){this.overlayRef=i,this.config=t,this.closed=new Fe,this.disableClose=t.disableClose,this.backdropClick=i.backdropClick(),this.keydownEvents=i.keydownEvents(),this.outsidePointerEvents=i.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{27===n.keyCode&&!this.disableClose&&!co(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=i.detachments().subscribe(()=>{!1!==t.closeOnOverlayDetachments&&this.close()})}close(i,t){if(this.containerInstance){const n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(i),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(i="",t=""){return this.overlayRef.updateSize({width:i,height:t}),this}addPanelClass(i){return this.overlayRef.addPanelClass(i),this}removePanelClass(i){return this.overlayRef.removePanelClass(i),this}}const dY=new te("DialogScrollStrategy",{providedIn:"root",factory:()=>{const e=Jt(Ss);return()=>e.scrollStrategies.block()}}),MMt=new te("DialogData"),IMt=new te("DefaultDialogConfig");let PMt=0,fY=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,n,r,s,o,l){this._overlay=t,this._injector=n,this._defaultOptions=r,this._parentDialog=s,this._overlayContainer=o,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Fe,this._afterOpenedAtThisLevel=new Fe,this._ariaHiddenElements=new Map,this.afterAllClosed=$g(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ma(void 0))),this._scrollStrategy=l}open(t,n){(n={...this._defaultOptions||new PE,...n}).id=n.id||"cdk-dialog-"+PMt++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),l=new Yk(o,n),w=this._attachContainer(o,l,n);return l.containerInstance=w,this._attachDialogContent(t,l,w,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(l),l.closed.subscribe(()=>this._removeOpenDialog(l,!0)),this.afterOpened.next(l),l}closeAll(){$k(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){$k(this._openDialogsAtThisLevel,t=>{!1===t.config.closeOnDestroy&&this._removeOpenDialog(t,!1)}),$k(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){const n=new vv({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(n.backdropClass=t.backdropClass),n}_attachContainer(t,n,r){const s=r.injector||r.viewContainerRef?.injector,o=[{provide:PE,useValue:r},{provide:Yk,useValue:n},{provide:XS,useValue:t}];let l;r.container?"function"==typeof r.container?l=r.container:(l=r.container.type,o.push(...r.container.providers(r))):l=hY;const w=new mv(l,r.viewContainerRef,On.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return t.attach(w).instance}_attachDialogContent(t,n,r,s){if(t instanceof yr){const o=this._createInjector(s,n,r,void 0);let l={$implicit:s.data,dialogRef:n};s.templateContext&&(l={...l,..."function"==typeof s.templateContext?s.templateContext():s.templateContext}),r.attachTemplatePortal(new fh(t,null,l,o))}else{const o=this._createInjector(s,n,r,this._injector),l=r.attachComponentPortal(new mv(t,s.viewContainerRef,o,s.componentFactoryResolver));n.componentRef=l,n.componentInstance=l.instance}}_createInjector(t,n,r,s){const o=t.injector||t.viewContainerRef?.injector,l=[{provide:MMt,useValue:t.data},{provide:Yk,useValue:n}];return t.providers&&("function"==typeof t.providers?l.push(...t.providers(n,t,r)):l.push(...t.providers)),t.direction&&(!o||!o.get(Ya,null,{optional:!0}))&&l.push({provide:Ya,useValue:{value:t.direction,change:wi()}}),On.create({parent:o||s,providers:l})}_removeOpenDialog(t,n){const r=this.openDialogs.indexOf(t);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const n=t.parentElement.children;for(let r=n.length-1;r>-1;r--){const s=n[r];s!==t&&"SCRIPT"!==s.nodeName&&"STYLE"!==s.nodeName&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}static{this.\u0275fac=function(n){return new(n||e)(re(Ss),re(On),re(IMt,8),re(e,12),re(jS),re(dY))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function $k(e,i){let t=e.length;for(;t--;)i(e[t])}let kMt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[fY],imports:[xp,gv,rW,gv]})}}return e})();function FMt(e,i){}class Qk{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const Kk="mdc-dialog--open",pY="mdc-dialog--opening",mY="mdc-dialog--closing";let gY=(()=>{class e extends hY{constructor(t,n,r,s,o,l,w,E,D){super(t,n,r,s,o,l,w,D),this._animationMode=E,this._animationStateChanged=new Oe,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?yY(this._config.enterAnimationDuration)??150:0,this._exitAnimationDuration=this._animationsEnabled?yY(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(vY,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(pY,Kk)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Kk),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Kk),this._animationsEnabled?(this._hostElement.style.setProperty(vY,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(mY)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(t){this._actionSectionCount+=t,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(pY,mY)}_waitForAnimationToComplete(t,n){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}attachComponentPortal(t){const n=super.attachComponentPortal(t);return n.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),n}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(IP),pt(Gi,8),pt(Qk),pt(PS),pt(li),pt(XS),pt(Hr,8),pt(sc))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(n,r){2&n&&(uu("id",r._config.id),_i("aria-modal",r._config.ariaModal)("role",r._config.role)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null),Ci("_mat-animation-noopable",!r._animationsEnabled)("mat-mdc-dialog-container-with-actions",r._actionSectionCount>0))},standalone:!0,features:[yi,Wi],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(n,r){1&n&&(J(0,"div",0)(1,"div",1),Ht(2,FMt,0,0,"ng-template",2),et()())},dependencies:[ph],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, var(--mat-app-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-app-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-app-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-app-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-app-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-app-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-app-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-app-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-app-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-app-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-app-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-app-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-app-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-active .mat-mdc-dialog-actions{border-top-color:CanvasText}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2})}}return e})();const vY="--mat-dialog-transition-duration";function yY(e){return null==e?null:"number"==typeof e?e:e.endsWith("ms")?Id(e.substring(0,e.length-2)):e.endsWith("s")?1e3*Id(e.substring(0,e.length-1)):"0"===e?0:null}var kE=function(e){return e[e.OPEN=0]="OPEN",e[e.CLOSING=1]="CLOSING",e[e.CLOSED=2]="CLOSED",e}(kE||{});class zd{constructor(i,t,n){this._ref=i,this._containerInstance=n,this._afterOpened=new Fe,this._beforeClosed=new Fe,this._state=kE.OPEN,this.disableClose=t.disableClose,this.id=i.id,i.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(Ln(r=>"opened"===r.state),xs(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(Ln(r=>"closed"===r.state),xs(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),i.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),qr(this.backdropClick(),this.keydownEvents().pipe(Ln(r=>27===r.keyCode&&!this.disableClose&&!co(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),xY(this,"keydown"===r.type?"keyboard":"mouse"))})}close(i){this._result=i,this._containerInstance._animationStateChanged.pipe(Ln(t=>"closing"===t.state),xs(1)).subscribe(t=>{this._beforeClosed.next(i),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=kE.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(i){let t=this._ref.config.positionStrategy;return i&&(i.left||i.right)?i.left?t.left(i.left):t.right(i.right):t.centerHorizontally(),i&&(i.top||i.bottom)?i.top?t.top(i.top):t.bottom(i.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(i="",t=""){return this._ref.updateSize(i,t),this}addPanelClass(i){return this._ref.addPanelClass(i),this}removePanelClass(i){return this._ref.removePanelClass(i),this}getState(){return this._state}_finishDialogClose(){this._state=kE.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function xY(e,i,t){return e._closeInteractionType=i,e.close(t)}const FE=new te("MatMdcDialogData"),NMt=new te("mat-mdc-dialog-default-options"),bY=new te("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{const e=Jt(Ss);return()=>e.scrollStrategies.block()}});let VMt=0,Dp=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,n,r,s,o,l,w,E){this._overlay=t,this._defaultOptions=s,this._scrollStrategy=o,this._parentDialog=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Fe,this._afterOpenedAtThisLevel=new Fe,this.dialogConfigClass=Qk,this.afterAllClosed=$g(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ma(void 0))),this._dialog=n.get(fY),this._dialogRefConstructor=zd,this._dialogContainerType=gY,this._dialogDataToken=FE}open(t,n){let r;(n={...this._defaultOptions||new Qk,...n}).id=n.id||"mat-mdc-dialog-"+VMt++,n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();const s=this._dialog.open(t,{...n,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:PE,useValue:n}]},templateContext:()=>({dialogRef:r}),providers:(o,l,w)=>(r=new this._dialogRefConstructor(o,n,w),r.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:w},{provide:this._dialogDataToken,useValue:l.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentRef=s.componentRef,r.componentInstance=s.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const o=this.openDialogs.indexOf(r);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let n=t.length;for(;n--;)t[n].close()}static{this.\u0275fac=function(n){return new(n||e)(re(Ss),re(On),re(ap,8),re(NMt,8),re(bY),re(e,12),re(jS),re(Hr,8))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),UMt=0,Mv=(()=>{class e{constructor(t,n,r){this.dialogRef=t,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=TY(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const n=t._matDialogClose||t._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(t){xY(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}static{this.\u0275fac=function(n){return new(n||e)(pt(zd,8),pt(ai),pt(Dp))}}static{this.\u0275dir=me({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(n,r){1&n&&Ut("click",function(o){return r._onButtonClick(o)}),2&n&&_i("aria-label",r.ariaLabel||null)("type",r.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[lr]})}}return e})(),wY=(()=>{class e{constructor(t,n,r){this._dialogRef=t,this._elementRef=n,this._dialog=r}ngOnInit(){this._dialogRef||(this._dialogRef=TY(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static{this.\u0275fac=function(n){return new(n||e)(pt(zd,8),pt(ai),pt(Dp))}}static{this.\u0275dir=me({type:e,standalone:!0})}}return e})(),Zk=(()=>{class e extends wY{constructor(){super(...arguments),this.id="mat-mdc-dialog-title-"+UMt++}_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(n,r){2&n&&uu("id",r.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0,features:[yi]})}}return e})(),fb=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0,features:[r9([Jx])]})}}return e})(),pb=(()=>{class e extends wY{_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(e)))(r||e)}})()}static{this.\u0275dir=me({type:e,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(n,r){2&n&&Ci("mat-mdc-dialog-actions-align-start","start"===r.align)("mat-mdc-dialog-actions-align-center","center"===r.align)("mat-mdc-dialog-actions-align-end","end"===r.align)},inputs:{align:"align"},standalone:!0,features:[yi]})}}return e})();function TY(e,i){let t=e.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?i.find(n=>n.id===t.id):null}let zMt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[Dp],imports:[kMt,xp,gv,rn,rn]})}}return e})(),GMt=(()=>{class e{constructor(t,n){this.dialogRef=t,this.data=n,this.localEcl="",this.localEcl=n.ecl}onNoClick(){this.dialogRef.close()}eclChanged(t){this.data.ecl=t?.detail[0]}static{this.\u0275fac=function(n){return new(n||e)(pt(zd),pt(FE))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-ecl-builder-dialog"]],decls:7,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"full-height"],["apiurl","https://snowstorm.ihtsdotools.org/snowstorm/snomed-ct","branch","MAIN/2023-01-31","v-on:eclOutput","eclChange",3,"eclOutput","eclstring"],["mat-dialog-actions","",1,"actions"],["mat-flat-button","","color","accent","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(n,r){1&n&&(J(0,"h1",0),ut(1,"ECL Builder"),et(),J(2,"div",1)(3,"snomed-ecl-builder",2),Ut("eclOutput",function(o){return r.eclChanged(o)}),et()(),J(4,"div",3)(5,"button",4),ut(6,"Ok"),et()()),2&n&&(ot(3),yd("eclstring",r.localEcl),ot(2),vt("mat-dialog-close",r.data))},dependencies:[Cs,Mv,Zk,pb,fb],styles:[".full-height[_ngcontent-%COMP%]{height:78%}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"]})}}return e})();const SY=new te("CdkAccordion");let HMt=0,WMt=(()=>{class e{get expanded(){return this._expanded}set expanded(t){this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}constructor(t,n,r){this.accordion=t,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Pe.EMPTY,this.closed=new Oe,this.opened=new Oe,this.destroyed=new Oe,this.expandedChange=new Oe,this.id="cdk-accordion-child-"+HMt++,this._expanded=!1,this.disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((s,o)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===o&&this.id!==s&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}static{this.\u0275fac=function(n){return new(n||e)(pt(SY,12),pt(In),pt(hP))}}static{this.\u0275dir=me({type:e,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",qe],disabled:[2,"disabled","disabled",qe]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],standalone:!0,features:[xi([{provide:SY,useValue:void 0}]),vn]})}}return e})(),jMt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({})}}return e})();const XMt=["body"],YMt=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],$Mt=["mat-expansion-panel-header","*","mat-action-row"];function QMt(e,i){}const KMt=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],ZMt=["mat-panel-title","mat-panel-description","*"];function JMt(e,i){1&e&&(J(0,"span",1),bl(),J(1,"svg",2),ye(2,"path",3),et()()),2&e&&vt("@indicatorRotate",St()._getExpandedState())}const EY=new te("MAT_ACCORDION"),_Y="225ms cubic-bezier(0.4,0.0,0.2,1)",AY={indicatorRotate:xr("indicatorRotate",[Bn("collapsed, void",oi({transform:"rotate(0deg)"})),Bn("expanded",oi({transform:"rotate(180deg)"})),gn("expanded <=> collapsed, void => collapsed",mn(_Y))]),bodyExpansion:xr("bodyExpansion",[Bn("collapsed, void",oi({height:"0px",visibility:"hidden"})),Bn("expanded",oi({height:"*",visibility:""})),gn("expanded <=> collapsed, void => collapsed",mn(_Y))])},DY=new te("MAT_EXPANSION_PANEL");let qMt=(()=>{class e{constructor(t,n){this._template=t,this._expansionPanel=n}static{this.\u0275fac=function(n){return new(n||e)(pt(yr),pt(DY,8))}}static{this.\u0275dir=me({type:e,selectors:[["ng-template","matExpansionPanelContent",""]],standalone:!0})}}return e})(),tIt=0;const MY=new te("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let IY=(()=>{class e extends WMt{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=t}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}constructor(t,n,r,s,o,l,w){super(t,n,r),this._viewContainerRef=s,this._animationMode=l,this._hideToggle=!1,this.afterExpand=new Oe,this.afterCollapse=new Oe,this._inputChanges=new Fe,this._headerId="mat-expansion-panel-header-"+tIt++,this.accordion=t,this._document=o,this._animationsDisabled="NoopAnimations"===l,w&&(this.hideToggle=w.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Ma(null),Ln(()=>this.expanded&&!this._portal),xs(1)).subscribe(()=>{this._portal=new fh(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,n=this._body.nativeElement;return t===n||n.contains(t)}return!1}_animationStarted(t){!RY(t)&&!this._animationsDisabled&&this._body&&this._body?.nativeElement.setAttribute("inert","")}_animationDone(t){RY(t)||("expanded"===t.toState?this.afterExpand.emit():"collapsed"===t.toState&&this.afterCollapse.emit(),!this._animationsDisabled&&this._body&&this._body.nativeElement.removeAttribute("inert"))}static{this.\u0275fac=function(n){return new(n||e)(pt(EY,12),pt(In),pt(hP),pt(Or),pt(Gi),pt(Hr,8),pt(MY,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-expansion-panel"]],contentQueries:function(n,r,s){if(1&n&&Hn(s,qMt,5),2&n){let o;He(o=We())&&(r._lazyContent=o.first)}},viewQuery:function(n,r){if(1&n&&ki(XMt,5),2&n){let s;He(s=We())&&(r._body=s.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(n,r){2&n&&Ci("mat-expanded",r.expanded)("_mat-animation-noopable",r._animationsDisabled)("mat-expansion-panel-spacing",r._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",qe],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],standalone:!0,features:[xi([{provide:EY,useValue:void 0},{provide:DY,useExisting:e}]),vn,yi,lr,Wi],ngContentSelectors:$Mt,decls:7,vars:4,consts:[["body",""],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(n,r){if(1&n){const s=xe();nr(YMt),Si(0),J(1,"div",1,0),Ut("@bodyExpansion.start",function(l){return zt(s),Gt(r._animationStarted(l))})("@bodyExpansion.done",function(l){return zt(s),Gt(r._animationDone(l))}),J(3,"div",2),Si(4,1),Ht(5,QMt,0,0,"ng-template",3),et(),Si(6,2),et()}2&n&&(ot(),vt("@bodyExpansion",r._getExpandedState())("id",r.id),_i("aria-labelledby",r._headerId),ot(4),vt("cdkPortalOutlet",r._portal))},dependencies:[ph],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative;background:var(--mat-expansion-container-background-color, var(--mat-app-surface));color:var(--mat-expansion-container-text-color, var(--mat-app-on-surface));border-radius:var(--mat-expansion-container-shape)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape);border-top-left-radius:var(--mat-expansion-container-shape)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape);border-bottom-left-radius:var(--mat-expansion-container-shape)}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;font-family:var(--mat-expansion-container-text-font, var(--mat-app-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-app-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-app-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-app-body-large-tracking))}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-app-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[AY.bodyExpansion]},changeDetection:0})}}return e})();function RY(e){return"void"===e.fromState}let eIt=(()=>{class e{constructor(t,n,r,s,o,l,w){this.panel=t,this._element=n,this._focusMonitor=r,this._changeDetectorRef=s,this._animationMode=l,this._parentChangeSubscription=Pe.EMPTY,this.tabIndex=0;const E=t.accordion?t.accordion._stateChanges.pipe(Ln(D=>!(!D.hideToggle&&!D.togglePosition))):al;this.tabIndex=parseInt(w||"")||0,this._parentChangeSubscription=qr(t.opened,t.closed,E,t._inputChanges.pipe(Ln(D=>!!(D.hideToggle||D.disabled||D.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(Ln(()=>t._containsFocus())).subscribe(()=>r.focusVia(n,"program")),o&&(this.expandedHeight=o.expandedHeight,this.collapsedHeight=o.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:co(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,n){t?this._focusMonitor.focusVia(this._element,t,n):this._element.nativeElement.focus(n)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static{this.\u0275fac=function(n){return new(n||e)(pt(IY,1),pt(ai),pt(sc),pt(In),pt(MY,8),pt(Hr,8),wl("tabindex"))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(n,r){1&n&&Ut("click",function(){return r._toggle()})("keydown",function(o){return r._keydown(o)}),2&n&&(_i("id",r.panel._headerId)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r._getPanelId())("aria-expanded",r._isExpanded())("aria-disabled",r.panel.disabled),$s("height",r._getHeaderHeight()),Ci("mat-expanded",r._isExpanded())("mat-expansion-toggle-indicator-after","after"===r._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===r._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===r._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",t=>null==t?0:jr(t)]},standalone:!0,features:[vn,Wi],ngContentSelectors:ZMt,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(n,r){1&n&&(nr(KMt),J(0,"span",0),Si(1),Si(2,1),Si(3,2),et(),Ht(4,JMt,3,1,"span",1)),2&n&&(Ci("mat-content-hide-toggle",!r._showToggle()),ot(4),Tn(r._showToggle()?4:-1))},styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-expansion-header-collapsed-state-height);font-family:var(--mat-expansion-header-text-font, var(--mat-app-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-app-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-app-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-app-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-app-title-medium-tracking))}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color)}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color)}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-app-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-app-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-app-on-surface-variant))}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-app-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, inline-block)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-app-on-surface-variant));display:var(--mat-expansion-header-indicator-display, none)}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[AY.indicatorRotate]},changeDetection:0})}}return e})(),iIt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"],standalone:!0})}}return e})(),nIt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"],standalone:!0})}}return e})(),rIt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,jMt,gv]})}}return e})();function sIt(e,i){if(1&e){const t=xe();J(0,"mat-option",2),Ut("click",function(){return zt(t),Gt(St().optionClicked())}),ut(1),et()}if(2&e){const t=i.$implicit;vt("value",t),ot(),Je(" ",t.display," ")}}let PY=(()=>{class e{constructor(t){this.terminologyService=t,this.selectionChange=new Oe}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(t=>this.options=t.expansion.contains)}optionClicked(){this.selectionChange.emit(this.selectedOptions)}static{this.\u0275fac=function(n){return new(n||e)(pt(ma))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-dropdown-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:7,vars:5,consts:[[3,"ngModelChange","multiple","ngModel"],[3,"value","click",4,"ngFor","ngForOf"],[3,"click","value"]],template:function(n,r){1&n&&(J(0,"mat-form-field")(1,"mat-label"),ut(2),et(),J(3,"mat-select",0),Aa("ngModelChange",function(o){return ja(r.selectedOptions,o)||(r.selectedOptions=o),o}),Ht(4,sIt,2,2,"mat-option",1),et(),J(5,"mat-hint"),ut(6),et()()),2&n&&(ot(2),Ke(r.binding.title),ot(),vt("multiple","Select (Multiple)"==r.binding.type),_a("ngModel",r.selectedOptions),ot(),vt("ngForOf",r.options),ot(2),Ke(r.binding.note))},dependencies:[ys,kl,ll,Ud,hh,Yo,Av,lc],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return e})();const aIt=["input"],oIt=["formField"],lIt=["*"];let kY=0;class FY{constructor(i,t){this.source=i,this.value=t}}const cIt={provide:va,useExisting:kn(()=>Jk),multi:!0},OY=new te("MatRadioGroup"),uIt=new te("mat-radio-default-options",{providedIn:"root",factory:function hIt(){return{color:"accent",disabledInteractive:!1}}});let Jk=(()=>{class e{get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=t,this._markRadiosForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markRadiosForCheck()}constructor(t){this._changeDetector=t,this._value=null,this._name="mat-radio-group-"+kY++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new Oe,this._disabledInteractive=!1}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(t=>t===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(n=>{n.checked=this.value===n.value,n.checked&&(this._selected=n)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new FY(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}static{this.\u0275fac=function(n){return new(n||e)(pt(In))}}static{this.\u0275dir=me({type:e,selectors:[["mat-radio-group"]],contentQueries:function(n,r,s){if(1&n&&Hn(s,OE,5),2&n){let o;He(o=We())&&(r._radios=o)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",qe],required:[2,"required","required",qe],disabledInteractive:[2,"disabledInteractive","disabledInteractive",qe]},outputs:{change:"change"},exportAs:["matRadioGroup"],standalone:!0,features:[xi([cIt,{provide:OY,useExisting:e}]),vn]})}}return e})(),OE=(()=>{class e{get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(t)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=t}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(t){this._color=t}get disabledInteractive(){return this._disabledInteractive||null!==this.radioGroup&&this.radioGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,n,r,s,o,l,w,E){this._elementRef=n,this._changeDetector=r,this._focusMonitor=s,this._radioDispatcher=o,this._defaultOptions=w,this._ngZone=Jt(li),this._uniqueId="mat-radio-"+ ++kY,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new Oe,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this._injector=Jt(On),this._onInputClick=D=>{this.disabled&&this.disabledInteractive&&D.preventDefault()},this.radioGroup=t,this._noopAnimations="NoopAnimations"===l,this._disabledInteractive=w?.disabledInteractive??!1,E&&(this.tabIndex=jr(E,0))}focus(t,n){n?this._focusMonitor.focusVia(this._inputElement,n,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((t,n)=>{t!==this.id&&n===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._inputElement.nativeElement.addEventListener("click",this._onInputClick)})}ngOnDestroy(){this._inputElement?.nativeElement.removeEventListener("click",this._onInputClick),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new FY(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(t){if(t.stopPropagation(),!this.checked&&!this.disabled){const n=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),n&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(t){this._onInputInteraction(t),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}_updateTabIndex(){const t=this.radioGroup;let n;if(n=t&&t.selected&&!this.disabled?t.selected===this?this.tabIndex:-1:this.tabIndex,n!==this._previousTabIndex){const r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",n+""),this._previousTabIndex=n,ao(()=>{queueMicrotask(()=>{t&&t.selected&&t.selected!==this&&document.activeElement===r&&(t.selected?._inputElement.nativeElement.focus(),document.activeElement===r&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static{this.\u0275fac=function(n){return new(n||e)(pt(OY,8),pt(ai),pt(In),pt(sc),pt(hP),pt(Hr,8),pt(uIt,8),wl("tabindex"))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-radio-button"]],viewQuery:function(n,r){if(1&n&&(ki(aIt,5),ki(oIt,7,ai)),2&n){let s;He(s=We())&&(r._inputElement=s.first),He(s=We())&&(r._rippleTrigger=s.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(n,r){1&n&&Ut("focus",function(){return r._inputElement.nativeElement.focus()}),2&n&&(_i("id",r.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),Ci("mat-primary","primary"===r.color)("mat-accent","accent"===r.color)("mat-warn","warn"===r.color)("mat-mdc-radio-checked",r.checked)("mat-mdc-radio-disabled",r.disabled)("mat-mdc-radio-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable",r._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",qe],tabIndex:[2,"tabIndex","tabIndex",t=>null==t?0:jr(t)],checked:[2,"checked","checked",qe],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",qe],required:[2,"required","required",qe],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",qe]},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[vn,Wi],ngContentSelectors:lIt,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(n,r){if(1&n){const s=xe();nr(),J(0,"div",2,0)(2,"div",3)(3,"div",4),Ut("click",function(l){return zt(s),Gt(r._onTouchTargetClick(l))}),et(),J(4,"input",5,1),Ut("change",function(l){return zt(s),Gt(r._onInputInteraction(l))}),et(),J(6,"div",6),ye(7,"div",7)(8,"div",8),et(),J(9,"div",9),ye(10,"div",10),et()(),J(11,"label",11),Si(12),et()()}2&n&&(vt("labelPosition",r.labelPosition),ot(2),Ci("mdc-radio--disabled",r.disabled),ot(2),vt("id",r.inputId)("checked",r.checked)("disabled",r.disabled&&!r.disabledInteractive)("required",r.required),_i("name",r.name)("value",r.value)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),ot(5),vt("matRippleTrigger",r._rippleTrigger.nativeElement)("matRippleDisabled",r._isRippleDisabled())("matRippleCentered",!0),ot(2),vt("for",r.inputId))},dependencies:[uh,NP],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-app-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-app-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size);top:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-app-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-app-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-app-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-app-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-app-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-app-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-app-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0})}}return e})(),dIt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,hu,fv,OE,rn]})}}return e})();function fIt(e,i){if(1&e){const t=xe();J(0,"mat-radio-button",3),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().optionSelected(r))}),ut(1),et()}if(2&e){const t=i.$implicit;vt("value",t.code),ot(),Je(" ",t.display," ")}}let LY=(()=>{class e{constructor(t){this.terminologyService=t,this.selectionChange=new Oe}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(t=>this.options=t.expansion.contains)}optionSelected(t){this.selectionChange.emit(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(ma))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-radios-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:6,vars:3,consts:[["aria-label","Select an option",1,"radio-group"],["class","radio-button",3,"value","click",4,"ngFor","ngForOf"],["id","hint"],[1,"radio-button",3,"click","value"]],template:function(n,r){1&n&&(J(0,"div"),ut(1),et(),J(2,"mat-radio-group",0),Ht(3,fIt,2,2,"mat-radio-button",1),et(),J(4,"div",2),ut(5),et()),2&n&&(ot(),Ke(r.binding.title),ot(2),vt("ngForOf",r.options),ot(2),Ke(r.binding.note))},dependencies:[ys,Jk,OE],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.radio-button[_ngcontent-%COMP%]{margin:0}"]})}}return e})(),NY=(()=>{class e{constructor(t){this.terminologyService=t,this.textChange=new Oe,this.text=""}ngOnInit(){}onTextChange(t){this.text=t,this.textChange.emit(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(ma))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-textbox-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","placeholder","Enter text...",3,"ngModelChange","ngModel"]],template:function(n,r){1&n&&(J(0,"mat-form-field",0)(1,"mat-label"),ut(2),et(),J(3,"textarea",1),Aa("ngModelChange",function(o){return ja(r.text,o)||(r.text=o),o}),Ut("ngModelChange",function(o){return r.onTextChange(o)}),et(),J(4,"mat-hint"),ut(5),et()()),2&n&&(ot(2),Ke(r.binding.title),ot(),_a("ngModel",r.text),ot(2),Ke(r.binding.note))},dependencies:[kl,ll,Ud,Eh,Pl,Yo,lc],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return e})();const pIt=["input"],mIt=["label"],gIt=["*"],vIt=new te("mat-checkbox-default-options",{providedIn:"root",factory:BY});function BY(){return{color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1}}var ho=function(e){return e[e.Init=0]="Init",e[e.Checked=1]="Checked",e[e.Unchecked=2]="Unchecked",e[e.Indeterminate=3]="Indeterminate",e}(ho||{});const yIt={provide:va,useExisting:kn(()=>mb),multi:!0};class xIt{}let bIt=0;const VY=BY();let mb=(()=>{class e{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(t){const n=new xIt;return n.source=this,n.checked=t,n}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,n,r,s,o,l){this._elementRef=t,this._changeDetectorRef=n,this._ngZone=r,this._animationMode=o,this._options=l,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new Oe,this.indeterminateChange=new Oe,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=ho.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||VY,this.color=this._options.color||VY.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId="mat-mdc-checkbox-"+ ++bIt,this.disabledInteractive=l?.disabledInteractive??!1}ngOnChanges(t){t.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){t!==this.disabled&&(this._disabled=t,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(t){const n=t!=this._indeterminate;this._indeterminate=t,n&&(this._transitionCheckState(this._indeterminate?ho.Indeterminate:this.checked?ho.Checked:ho.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}validate(t){return this.required&&!0!==t.value?{required:!0}:null}registerOnValidatorChange(t){this._validatorChangeFn=t}_transitionCheckState(t){let n=this._currentCheckState,r=this._getAnimationTargetElement();if(n!==t&&r&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(n,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);const s=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(s)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){const t=this._options?.clickAction;this.disabled||"noop"===t?(this.disabled&&this.disabledInteractive||!this.disabled&&"noop"===t)&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==t&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?ho.Checked:ho.Unchecked),this._emitChangeEvent())}_onInteractionEvent(t){t.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(t,n){if("NoopAnimations"===this._animationMode)return"";switch(t){case ho.Init:if(n===ho.Checked)return this._animationClasses.uncheckedToChecked;if(n==ho.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case ho.Unchecked:return n===ho.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case ho.Checked:return n===ho.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case ho.Indeterminate:return n===ho.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(t){const n=this._inputElement;n&&(n.nativeElement.indeterminate=t)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(t){t.target&&this._labelElement.nativeElement.contains(t.target)&&t.stopPropagation()}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(In),pt(li),wl("tabindex"),pt(Hr,8),pt(vIt,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-checkbox"]],viewQuery:function(n,r){if(1&n&&(ki(pIt,5),ki(mIt,5),ki(uh,5)),2&n){let s;He(s=We())&&(r._inputElement=s.first),He(s=We())&&(r._labelElement=s.first),He(s=We())&&(r.ripple=s.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(n,r){2&n&&(uu("id",r.id),_i("tabindex",null)("aria-label",null)("aria-labelledby",null),oo(r.color?"mat-"+r.color:"mat-accent"),Ci("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mdc-checkbox--disabled",r.disabled)("mat-mdc-checkbox-disabled",r.disabled)("mat-mdc-checkbox-checked",r.checked)("mat-mdc-checkbox-disabled-interactive",r.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],id:"id",required:[2,"required","required",qe],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",qe],tabIndex:[2,"tabIndex","tabIndex",t=>null==t?void 0:jr(t)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",qe],checked:[2,"checked","checked",qe],disabled:[2,"disabled","disabled",qe],indeterminate:[2,"indeterminate","indeterminate",qe]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[xi([yIt,{provide:ta,useExisting:e,multi:!0}]),vn,lr,Wi],ngContentSelectors:gIt,decls:15,vars:20,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(n,r){if(1&n){const s=xe();nr(),J(0,"div",3),Ut("click",function(l){return zt(s),Gt(r._preventBubblingFromLabel(l))}),J(1,"div",4,0)(3,"div",5),Ut("click",function(){return zt(s),Gt(r._onTouchTargetClick())}),et(),J(4,"input",6,1),Ut("blur",function(){return zt(s),Gt(r._onBlur())})("click",function(){return zt(s),Gt(r._onInputClick())})("change",function(l){return zt(s),Gt(r._onInteractionEvent(l))}),et(),ye(6,"div",7),J(7,"div",8),bl(),J(8,"svg",9),ye(9,"path",10),et(),dy(),ye(10,"div",11),et(),ye(11,"div",12),et(),J(12,"label",13,2),Si(14),et()()}if(2&n){const s=Zi(2);vt("labelPosition",r.labelPosition),ot(4),Ci("mdc-checkbox--selected",r.checked),vt("checked",r.checked)("indeterminate",r.indeterminate)("disabled",r.disabled&&!r.disabledInteractive)("id",r.inputId)("required",r.required)("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex),_i("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-checked",r.indeterminate?"mixed":null)("aria-disabled",!(!r.disabled||!r.disabledInteractive)||null)("name",r.name)("value",r.value),ot(7),vt("matRippleTrigger",s)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),ot(),vt("for",r.inputId)}},dependencies:[uh,NP],styles:['.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity));background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-app-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity));background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-app-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mdc-checkbox__ripple{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.cdk-high-contrast-active .mdc-checkbox--disabled{opacity:.5}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mdc-checkbox-unselected-icon-color, var(--mat-app-on-surface-variant));top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-icon-color, var(--mat-app-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mat-app-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-app-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mat-app-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-app-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover .mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.cdk-high-contrast-active .mdc-checkbox__checkmark{color:CanvasText}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.cdk-high-contrast-active .mdc-checkbox--disabled .mdc-checkbox__checkmark,.cdk-high-contrast-active .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.cdk-high-contrast-active .mdc-checkbox__mixedmark{margin:0 1px}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *,.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-app-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-app-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-app-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color)}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}}return e})(),CIt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[mb,rn,rn]})}}return e})();function SIt(e,i){if(1&e){const t=xe();J(0,"mat-checkbox",3),Ut("click",function(){return zt(t),Gt(St().optionClicked())}),ut(1),et()}if(2&e){const t=i.$implicit;yd("formControlName",t.display),ot(),Je(" ",t.display," ")}}let UY=(()=>{class e{constructor(t,n){this.terminologyService=t,this._formBuilder=n,this.selectionChange=new Oe,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.options=[{display:this.binding.title}],this.options?.forEach(t=>{this.checkboxes.addControl(t.display,this._formBuilder.control(!1))})}optionClicked(){let t=[];t.push({title:this.binding.title,code:this.binding.ecl,value:this.checkboxes.value[this.binding.title]?this.present:this.absent}),this.selectionChange.emit(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(ma),pt(bE))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-checkbox-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:4,vars:3,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","before",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","before",1,"check",3,"click","formControlName"]],template:function(n,r){1&n&&(J(0,"form",0),Ht(1,SIt,2,2,"mat-checkbox",1),J(2,"span",2),ut(3),et()()),2&n&&(vt("formGroup",r.checkboxes),ot(),vt("ngForOf",r.options),ot(2),Ke(r.binding.note))},dependencies:[ys,Cv,Yo,Cp,wu,Sv,mb],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}}return e})(),zY=(()=>{class e{constructor(t){this.terminologyService=t,this.textChange=new Oe,this.value=0}ngOnInit(){}onValueChange(t){this.value=t,this.textChange.emit(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(ma))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-integer-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter integer value...","pattern","^-?[0-9]\\d*$","title","Only integer values are allowed",3,"ngModelChange","ngModel"]],template:function(n,r){1&n&&(J(0,"mat-form-field",0)(1,"mat-label"),ut(2),et(),J(3,"input",1),Aa("ngModelChange",function(o){return ja(r.value,o)||(r.value=o),o}),Ut("ngModelChange",function(o){return r.onValueChange(o)}),et(),J(4,"mat-hint"),ut(5),et()()),2&n&&(ot(2),Ke(r.binding.title),ot(),_a("ngModel",r.value),ot(2),Ke(r.binding.note))},dependencies:[kl,ll,Ud,Eh,Pl,gE,Yo,xE,lc],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return e})(),GY=(()=>{class e{constructor(t){this.terminologyService=t,this.textChange=new Oe,this.value=0}ngOnInit(){}onValueChange(t){this.value=t,this.textChange.emit(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(ma))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-decimal-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter decimal value...","pattern","^-?[0-9]*\\.?[0-9]+$","title","Only decimal values are allowed","step","any",3,"ngModelChange","ngModel"]],template:function(n,r){1&n&&(J(0,"mat-form-field",0)(1,"mat-label"),ut(2),et(),J(3,"input",1),Aa("ngModelChange",function(o){return ja(r.value,o)||(r.value=o),o}),Ut("ngModelChange",function(o){return r.onValueChange(o)}),et(),J(4,"mat-hint"),ut(5),et()()),2&n&&(ot(2),Ke(r.binding.title),ot(),_a("ngModel",r.value),ot(2),Ke(r.binding.note))},dependencies:[kl,ll,Ud,Eh,Pl,gE,Yo,xE,lc],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}}return e})();function EIt(e,i){if(1&e){const t=xe();J(0,"mat-checkbox",3),Ut("click",function(){return zt(t),Gt(St().optionClicked())}),ut(1),et()}if(2&e){const t=i.$implicit;yd("formControlName",t.display),ot(),Je(" ",t.display," ")}}let HY=(()=>{class e{constructor(t,n){this.terminologyService=t,this._formBuilder=n,this.selectionChange=new Oe,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(t=>{this.options=t.expansion.contains,this.options?.forEach(n=>{this.checkboxes.addControl(n.display,this._formBuilder.control(!1))})})}optionClicked(){let t=[];this.options?.forEach(n=>{t.push({code:n,value:this.checkboxes.value[n.display]?this.present:this.absent})}),this.selectionChange.emit(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(ma),pt(bE))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-checkbox-multiple-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:6,vars:4,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","after",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","after",1,"check",3,"click","formControlName"]],template:function(n,r){1&n&&(J(0,"div"),ut(1),et(),J(2,"form",0),Ht(3,EIt,2,2,"mat-checkbox",1),J(4,"span",2),ut(5),et()()),2&n&&(ot(),Ke(r.binding.title),ot(),vt("formGroup",r.checkboxes),ot(),vt("ngForOf",r.options),ot(2),Ke(r.binding.note))},dependencies:[ys,Cv,Yo,Cp,wu,Sv,mb],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}}return e})();const _It=["newPanel"],AIt=()=>({standalone:!0}),qk=()=>({});function DIt(e,i){1&e&&(J(0,"mat-panel-description"),ut(1," Click to add new binding "),et())}function MIt(e,i){if(1&e){const t=xe();J(0,"button",46),Ut("click",function(){let r;return zt(t),Gt(null==(r=St().newBindingForm.get("title"))?null:r.reset())}),J(1,"mat-icon"),ut(2,"close"),et()()}}function IIt(e,i){1&e&&(J(0,"span"),ut(1,"Restrict to Observables"),et())}function RIt(e,i){1&e&&(J(0,"span"),ut(1,"Open to Observables + Findings + Procedures + Situations"),et())}function PIt(e,i){if(1&e&&(J(0,"mat-option",47),ut(1),et()),2&e){const t=i.$implicit;vt("value",t),ot(),Je(" ",t," ")}}function kIt(e,i){if(1&e){const t=xe();J(0,"button",46),Ut("click",function(){let r;return zt(t),Gt(null==(r=St(2).newBindingForm.get("ecl"))?null:r.reset())}),J(1,"mat-icon"),ut(2,"close"),et()()}}function FIt(e,i){if(1&e){const t=xe();J(0,"mat-form-field",14)(1,"mat-label"),ut(2,"Answer options: ECL Expression"),et(),ye(3,"input",48),J(4,"a",49),Ut("click",function(){let r;zt(t);const s=St();return Gt(s.openEclBuilder(null==(r=s.newBindingForm.get("ecl"))?null:r.value,"ecl"))}),ut(5,"ECL Builder"),et(),Ht(6,kIt,3,0,"button",16),J(7,"mat-error"),ut(8),et()()}if(2&e){let t;const n=St();ot(6),vt("ngIf",null==(t=n.newBindingForm.get("ecl"))?null:t.value),ot(2),Ke(n.getErrorMessage("ecl"))}}function OIt(e,i){1&e&&(J(0,"span"),ut(1,"Restrict to Observables"),et())}function LIt(e,i){1&e&&(J(0,"span"),ut(1,"Open to Observables + Findings + Procedures"),et())}function NIt(e,i){if(1&e){const t=xe();J(0,"mat-form-field",14),ye(1,"app-autocomplete-binding",50),J(2,"a",19),Ut("click",function(){return zt(t),Gt(St().toggleCheckboxBinding())}),Ht(3,OIt,2,0,"span",10)(4,LIt,2,0,"span",10),et(),J(5,"mat-error"),ut(6),et()()}if(2&e){const t=St();ot(),vt("binding",t.checkboxBinding),ot(2),vt("ngIf",t.checkboxBinding.ecl===t.codeBindingAll.ecl),ot(),vt("ngIf",t.checkboxBinding.ecl!=t.codeBindingAll.ecl),ot(2),Ke(t.getErrorMessage("ecl"))}}function BIt(e,i){if(1&e){const t=xe();J(0,"button",46),Ut("click",function(){let r;return zt(t),Gt(null==(r=St(2).newBindingForm.get("note"))?null:r.reset())}),J(1,"mat-icon"),ut(2,"close"),et()()}}function VIt(e,i){if(1&e&&(J(0,"mat-form-field",51)(1,"mat-label"),ut(2,"Note"),et(),ye(3,"input",52),Ht(4,BIt,3,0,"button",16),J(5,"mat-error"),ut(6),et()()),2&e){let t;const n=St();ot(4),vt("ngIf",null==(t=n.newBindingForm.get("note"))?null:t.value),ot(2),Ke(n.getErrorMessage("note"))}}function UIt(e,i){if(1&e){const t=xe();J(0,"button",27),Ut("click",function(){return zt(t),Gt(St().addBinding())}),ut(1,"Add binding"),et()}}function zIt(e,i){if(1&e){const t=xe();J(0,"button",27),Ut("click",function(){zt(t);const r=St();return r.addBinding(),Gt(r.clearOutput())}),ut(1,"Update binding"),et()}}function GIt(e,i){if(1&e){const t=xe();J(0,"button",35),Ut("click",function(){zt(t);const r=St();return Gt(r.showRightContainer=!r.showRightContainer)}),ut(1),et()}if(2&e){const t=St();ot(),Je(" ",t.showRightContainer?"Close data panel":"Open data panel"," ")}}function HIt(e,i){1&e&&(J(0,"button",53),ut(1," Download form "),et()),2&e&&(St(),vt("matMenuTriggerFor",Zi(69)))}function WIt(e,i){if(1&e){const t=xe();J(0,"div",54)(1,"p",55),ut(2),et(),J(3,"button",56),Ut("click",function(){return zt(t),Gt(St().titleEditMode=!0)}),J(4,"mat-icon"),ut(5,"edit"),et()()()}if(2&e){const t=St();ot(2),Ke(t.formTitle)}}function jIt(e,i){if(1&e){const t=xe();J(0,"div",54)(1,"form",57)(2,"mat-form-field")(3,"mat-label"),ut(4,"Title"),et(),J(5,"input",58),Aa("ngModelChange",function(r){zt(t);const s=St();return ja(s.formTitle,r)||(s.formTitle=r),Gt(r)}),Ut("ngModelChange",function(){return zt(t),Gt(St().refreshFhirQuestionnaire())}),et(),J(6,"button",46),Ut("click",function(){return zt(t),Gt(St().formTitle="")}),J(7,"mat-icon"),ut(8,"close"),et()()()(),J(9,"button",56),Ut("click",function(){return zt(t),Gt(St().titleEditMode=!1)}),J(10,"mat-icon"),ut(11,"save"),et()()()}if(2&e){const t=St();ot(5),_a("ngModel",t.formTitle),vt("ngModelOptions",Xa(2,AIt))}}function XIt(e,i){if(1&e){const t=xe();J(0,"app-autocomplete-binding",67),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function YIt(e,i){if(1&e){const t=xe();J(0,"app-dropdown-binding",67),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function $It(e,i){if(1&e){const t=xe();J(0,"app-radios-binding",67),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function QIt(e,i){if(1&e&&(J(0,"span",68),ut(1),et()),2&e){const t=St().$implicit;ot(),Ke(t.title)}}function KIt(e,i){if(1&e){const t=xe();J(0,"app-textbox-binding",69),Ut("textChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function ZIt(e,i){if(1&e){const t=xe();J(0,"app-integer-binding",69),Ut("textChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function JIt(e,i){if(1&e){const t=xe();J(0,"app-decimal-binding",69),Ut("textChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function qIt(e,i){if(1&e){const t=xe();J(0,"app-checkbox-binding",67),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function t2t(e,i){if(1&e){const t=xe();J(0,"app-checkbox-multiple-binding",67),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function e2t(e,i){if(1&e&&(J(0,"button",70)(1,"mat-icon"),ut(2,"info"),et()()),2&e){const t=St().$implicit;vt("matMenuTriggerFor",Zi(15))("disabled",!t.code&&!t.ecl)}}function i2t(e,i){if(1&e){const t=xe();J(0,"span",6),Ut("click",function(r){return zt(t),Gt(r.stopPropagation())}),J(1,"h4"),ut(2,"Question terminology binding"),et(),J(3,"pre"),ut(4),et()()}if(2&e){const t=St().$implicit;vt("disableRipple",!0),ot(4),sl("",null==t.code?null:t.code.code," |",null==t.code?null:t.code.display,"|")}}function n2t(e,i){if(1&e){const t=xe();J(0,"span",6),Ut("click",function(r){return zt(t),Gt(r.stopPropagation())}),J(1,"h4"),ut(2,"Answer terminology binding"),et(),J(3,"pre"),ut(4),et()()}if(2&e){const t=St().$implicit;vt("disableRipple",!0),ot(4),Ke(t.ecl)}}function r2t(e,i){if(1&e){const t=xe();J(0,"div",59)(1,"div",60)(2,"mat-icon",61),ut(3,"drag_indicator"),et(),Ht(4,XIt,1,1,"app-autocomplete-binding",62)(5,YIt,1,1,"app-dropdown-binding",62)(6,$It,1,1,"app-radios-binding",62)(7,QIt,2,1,"span",63)(8,KIt,1,1,"app-textbox-binding",64)(9,ZIt,1,1,"app-integer-binding",64)(10,JIt,1,1,"app-decimal-binding",64)(11,qIt,1,1,"app-checkbox-binding",62)(12,t2t,1,1,"app-checkbox-multiple-binding",62)(13,e2t,3,2,"button",65),J(14,"mat-menu",null,0),Ht(16,i2t,5,3,"span",66)(17,n2t,5,2,"span",66),et(),J(18,"button",56),Ut("click",function(){const r=zt(t).index;return Gt(St().bindings.splice(r,1))}),J(19,"mat-icon"),ut(20,"delete"),et()(),J(21,"button",56),Ut("click",function(){const r=zt(t).index;return Gt(St().edit(r))}),J(22,"mat-icon"),ut(23,"edit"),et()()()()}if(2&e){const t=i.$implicit;ot(4),vt("ngIf","Autocomplete"==t.type),ot(),vt("ngIf","Select (Single)"==t.type||"Select (Multiple)"==t.type),ot(),vt("ngIf","Options"==t.type),ot(),vt("ngIf","Section header"==t.type),ot(),vt("ngIf","Text box"==t.type),ot(),vt("ngIf","Integer"==t.type),ot(),vt("ngIf","Decimal"==t.type),ot(),vt("ngIf","Checkbox"==t.type),ot(),vt("ngIf","Checkbox multiple"==t.type),ot(),vt("ngIf","Section header"!=t.type),ot(3),vt("ngIf",t.code),ot(),vt("ngIf",t.ecl)}}function s2t(e,i){if(1&e){const t=xe();J(0,"div",74)(1,"button",75),Ut("click",function(){zt(t);const r=St(2);return Gt(r.saveOutput(r.outputStr))}),ye(2,"mat-icon",76),et(),J(3,"button",77),Ut("click",function(){zt(t);const r=St(2);return Gt(r.copyOutputToClipboard(r.outputStr))}),ye(4,"mat-icon",78),et()()}}function a2t(e,i){if(1&e&&(J(0,"div",71),Ht(1,s2t,5,0,"div",72),J(2,"textarea",73),ut(3," "),et()()),2&e){const t=St();ot(),vt("ngIf",t.showRightContainer),ot(),vt("options",Xa(4,qk))("lang","json")("innerHTML",t.responseStr,Gf)}}function o2t(e,i){if(1&e){const t=xe();J(0,"div",74)(1,"button",75),Ut("click",function(){zt(t);const r=St(2);return Gt(r.saveBundleOutput(r.responseBundleStr))}),ye(2,"mat-icon",76),et(),J(3,"button",77),Ut("click",function(){zt(t);const r=St(2);return Gt(r.copyOutputToClipboard(r.responseBundleStr))}),ye(4,"mat-icon",78),et()()}}function l2t(e,i){if(1&e&&(J(0,"div",71),Ht(1,o2t,5,0,"div",72),J(2,"textarea",73),ut(3," "),et()()),2&e){const t=St();ot(),vt("ngIf",t.showRightContainer),ot(),vt("options",Xa(4,qk))("lang","json")("innerHTML",t.responseBundleStr,Gf)}}function c2t(e,i){if(1&e){const t=xe();J(0,"div",74)(1,"button",75),Ut("click",function(){zt(t);const r=St(2);return Gt(r.saveOutput(r.fhirQuestionnaireStr))}),ye(2,"mat-icon",76),et(),J(3,"button",77),Ut("click",function(){zt(t);const r=St(2);return Gt(r.copyOutputToClipboard(r.fhirQuestionnaireStr))}),ye(4,"mat-icon",78),et()()}}function u2t(e,i){if(1&e&&(J(0,"div",71),Ht(1,c2t,5,0,"div",72),J(2,"textarea",73),ut(3," "),et()()),2&e){const t=St();ot(),vt("ngIf",t.showRightContainer),ot(),vt("options",Xa(4,qk))("lang","json")("innerHTML",t.fhirQuestionnaireStr,Gf)}}let h2t=(()=>{class e{constructor(t,n,r){this.terminologyService=t,this.clipboard=n,this.dialog=r,this.formTitle="My new form",this.titleEditMode=!1,this.bindings=[],this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}",this.fhirQuestionnaire={},this.fhirQuestionnaireStr="{}",this.observableBinding={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingObservables={title:"Question code (Observables)",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingAll={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)| OR << 404684003 |Clinical finding (finding)| OR << 71388002 |Procedure (procedure)| OR << 243796009 |Situation with explicit context (situation)|",value:""},this.codeBinding=this.codeBindingAll,this.checkboxBinding=JSON.parse(JSON.stringify(this.codeBindingAll)),this.example1={title:"Appendicitis data entry form (example)",bindings:[{title:"Diagnosis (type of appendicitis)",type:"Autocomplete",ecl:"<< 74400008 |Appendicitis|",value:"",note:"An autocomplete field to select between all descendants of appendicitis."},{title:"Clinical note",type:"Text box",ecl:"74400008 |Appendicitis|",value:"",note:"A text box for entering free text clinical information."},{title:"Appendicitis type",type:"Select (Single)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A single selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicitis type (M)",type:"Select (Multiple)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A multiple selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicectomy type",type:"Options",ecl:"<< 174036004 |Emergency appendectomy (procedure)|",value:"",note:"A radio buttons selector for the type of appendicectomy procedure."}]},this.newBindingForm=new Tv({title:new Fs("",[xu.required,xu.maxLength(50)]),code:new Fs("",[]),type:new Fs("",[xu.required]),ecl:new Fs("",[]),value:new Fs("",[]),note:new Fs("",[xu.maxLength(500)])}),this.indexInEdit=-1,this.panelOpenState=!1,this.maxSelectCount=50,this.maxOptionsCount=10,this.controlTypes=["Autocomplete","Select (Single)","Select (Multiple)","Options","Section header","Text box","Integer","Decimal","Checkbox","Checkbox multiple"].sort((s,o)=>s.localeCompare(o)),this.showRightContainer=!1}ngOnInit(){this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}get stateName(){return this.showRightContainer?"open":"closed"}addBinding(){var t=this;return we(function*(){if(t.newBindingForm.markAllAsTouched(),t.newBindingForm.invalid)return;const{title:n,code:r,type:s,ecl:o,value:l,note:w}=t.newBindingForm.controls;let E={title:n.value,code:r.value,type:s.value,ecl:o.value,value:l.value,note:w.value},D=!1;o.value?typeof E.type?.indexOf("Select")<"u"&&E.type?.indexOf("Select")>-1?(yield t.getEclPreview(o.value)).expansion.contains.length>t.maxSelectCount&&(D=!0,o.setErrors({selectTooManyResults:!0})):(typeof E.type?.indexOf("Options")<"u"&&E.type?.indexOf("Options")>-1||typeof E.type?.indexOf("Checkbox multiple")<"u"&&E.type?.indexOf("Checkbox multiple")>-1)&&(yield t.getEclPreview(o.value)).expansion.contains.length>t.maxOptionsCount&&(D=!0,o.setErrors({optionsTooManyResults:!0})):"Section header"!=E.type&&"Text box"!=E.type&&"Integer"!=E.type&&"Decimal"!=E.type&&(D=!0,o.setErrors({required:!0})),!D&&(t.indexInEdit>-1?t.bindings[t.indexInEdit]=E:t.bindings.push(E),t.newBindingForm.reset(),t.newPanel.close(),t.indexInEdit=-1,setTimeout(()=>{t.refreshFhirQuestionnaire(),t.refreshResponse()},100))})()}refreshFhirQuestionnaire(){this.fhirQuestionnaire={resourceType:"Questionnaire",title:this.formTitle,status:"draft",item:[]},this.bindings.forEach((t,n)=>{const r=this.createItemForBinding(t,n);r&&this.fhirQuestionnaire.item.push(r)}),this.fhirQuestionnaireStr=JSON.stringify(this.fhirQuestionnaire,null,2)}createItemForBinding(t,n){const r=this.initializeBaseItem(t,n);return["Select (Single)","Select (Multiple)","Options","Autocomplete"].includes(t.type)&&(r.extension=this.getExtensionForSelectableTypes(),r.answerValueSet=this.getAnswerValueSet(t)),"Autocomplete"===t.type&&r.extension.push(this.getAutocompleteExtension()),"Select (Multiple)"===t.type&&(r.repeats=!0),r}initializeBaseItem(t,n){const r={linkId:n+1,text:t.title,type:this.getQuestionnaireItemType(t.type)};return t.code&&(r.code=[{system:"http://snomed.info/sct",code:t.code.code,display:t.code.display}]),r}getQuestionnaireItemType(t){switch(t){case"Section header":return"display";case"Select (Single)":case"Select (Multiple)":case"Options":case"Checkbox multiple":case"Autocomplete":return"choice";case"Text box":return"text";case"Integer":return"integer";case"Decimal":return"decimal";default:return console.warn(`Unhandled binding type: ${t}`),null}}getExtensionForSelectableTypes(){return[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-preferredTerminologyServer",valueUrl:"https://snowstorm.ihtsdotools.org/fhir"}]}getAutocompleteExtension(){return{url:"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",valueCodeableConcept:{coding:[{system:"http://hl7.org/fhir/questionnaire-item-control",code:"autocomplete",display:"Auto-complete"}]}}}getAnswerValueSet(t){return`http://snomed.info/sct/900000000000207008?fhir_vs=ecl%2F${encodeURIComponent(t.ecl)}`}getEclPreview(t){var n=this;return we(function*(){return Ia((yield n.terminologyService.expandValueSet(t,"")).pipe(Ri(s=>s)))})()}edit(t){this.indexInEdit=t;const n=this.bindings[t];this.newBindingForm.setValue({title:n.title,code:n.code?n.code:"",type:n.type,ecl:n.ecl,value:n.value,note:n.note}),this.newPanel.open()}onDrop(t){ME(this.bindings,t.previousIndex,t.currentIndex)}getErrors(t){const n=this.newBindingForm.get(t);return n?n.errors:null}getErrorMessage(t){const n=this.getErrors(t);if(n){if(n.required)return"This field is required";if(n.maxlength)return`This field must be less than ${n.maxlength.requiredLength} characters`;if(n.selectTooManyResults)return`Too many results (Max = ${this.maxSelectCount})`;if(n.optionsTooManyResults)return`Too many results (Max = ${this.maxOptionsCount})`}return null}refreshResponse(){this.response={};for(let t of this.bindings)this.response[t.title]={},t.code&&(this.response[t.title].code=t.code);for(let[t,n]of Object.entries(this.output))this.output[t].code&&(this.response[t].code=this.output[t].code),this.output[t].value&&(this.response[t].value=this.output[t].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[t,n]of Object.entries(this.response)){let r=n;const s=r.code?{coding:[{system:"http://snomed.info/sct",code:r.code.code,display:r.code.display}]}:void 0,o=r.value?.code?{coding:[{system:"http://snomed.info/sct",code:r.value.code,display:r.value.display}]}:void 0;let l={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};l.code=s||{coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},o&&(l.valueCodeableConcept=o),r.value&&"string"==typeof r.value&&(l.valueString=r.value),(l.valueCodeableConcept||l.valueString)&&this.responseBundle.entry.push(l)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}optionSelected(t,n,r){this.output[t]={code:n,value:r},n||delete this.output[t].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}loadExample1(){this.formTitle=this.example1.title,this.bindings=this.example1.bindings,this.refreshFhirQuestionnaire(),this.clearOutput(),this.refreshResponse()}cancelEdit(){this.newBindingForm.reset(),this.newPanel.close(),this.indexInEdit=-1}clear(){this.bindings=[],this.clearOutput(),this.newBindingForm.reset(),this.formTitle="My new form",this.showRightContainer=!1}clearOutput(){this.output={},this.outputStr="{}";const t=JSON.parse(JSON.stringify(this.bindings));this.bindings=[],this.bindings=t}saveForm(){var t=new Blob([JSON.stringify({title:this.formTitle,bindings:this.bindings},null,2)],{type:"text/plain;charset=utf-8"});(0,Tu.saveAs)(t,`${this.formTitle}.json`)}saveOutput(t){var n=new Blob([t],{type:"text/plain;charset=utf-8"});(0,Tu.saveAs)(n,`${this.formTitle}-data.json`)}saveBundleOutput(t){var n=new Blob([t],{type:"text/plain;charset=utf-8"});(0,Tu.saveAs)(n,`${this.formTitle}-fhir-bundle.json`)}copyOutputToClipboard(t){this.clipboard.copy(t)}uploadFile(t){if(1!==t.target.files.length)console.error("No file selected");else{const n=new FileReader;n.onloadend=r=>{if(n.result){const s=JSON.parse(n.result?.toString());Array.isArray(s)?(this.bindings=s,this.formTitle="My new form"):(this.bindings=[],this.bindings=s.bindings,this.formTitle=s.title),this.clearOutput(),this.refreshResponse(),this.refreshFhirQuestionnaire()}},n.readAsText(t.target.files[0])}}openEclBuilder(t,n){this.dialog.open(GMt,{data:{ecl:t},width:"80%",height:"80%"}).afterClosed().subscribe(s=>{if(s){const o=this.newBindingForm.get(n);o&&o.setValue(s.ecl)}})}toggleCodeBinding(){this.codeBinding=this.codeBinding===this.codeBindingAll?this.codeBindingObservables:this.codeBindingAll}toggleCheckboxBinding(){this.checkboxBinding=this.checkboxBinding.ecl===this.codeBindingAll.ecl?JSON.parse(JSON.stringify(this.codeBindingObservables)):JSON.parse(JSON.stringify(this.codeBindingAll)),this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}static{this.\u0275fac=function(n){return new(n||e)(pt(ma),pt(Nk),pt(Dp))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-bindings-sandbox"]],viewQuery:function(n,r){if(1&n&&ki(_It,5),2&n){let s;He(s=We())&&(r.newPanel=s.first)}},decls:94,vars:27,consts:[["substancePopoverMenu","matMenu"],["newPanel",""],["fileInput",""],["demosMenu","matMenu"],["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disableRipple"],[1,"flex","flex-row","mb-8"],[1,"w-2/3"],[1,"editPanel","w-full","pt-4","pb-4",3,"opened","closed"],[4,"ngIf"],[1,"row",3,"formGroup"],[1,"form-row"],[1,"form-column"],[1,"input-field"],["matInput","","type","text","formControlName","title","placeholder","Enter title..."],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"input-field","autocomplete-field"],["formControlName","code",1,"grow",3,"binding"],["href","javascript:void(0)",1,"bottom-right-link",3,"click"],["formControlName","type"],[3,"value",4,"ngFor","ngForOf"],["class","input-field",4,"ngIf"],["class","input-field full-width",4,"ngIf"],[1,"row"],[1,"grow"],["mat-flat-button","","color","primary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary",3,"click"],[1,"w-1/3"],[1,"flex","flex-row","gap-4","justify-end","flex-wrap"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["hidden","","type","file","id","file",3,"change"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor",4,"ngIf"],[1,"wide-menu"],["mat-menu-item","",3,"click"],["mat-flat-button","","color","accent",3,"click"],["class","compact-row-container",4,"ngIf"],[1,"row-container"],[1,"row-container-item"],["cdkDropList","",3,"cdkDropListDropped"],["class","output-panel","cdkDrag","",4,"ngFor","ngForOf"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Data collected from form"],["class","output",4,"ngIf"],["label","Data collected (FHIR Bundle)"],["label","FHIR Questionnaire"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"value"],["matInput","","type","text","formControlName","ecl","placeholder","Enter ECL..."],["href","javascript:void(0)",1,"top-right-link",3,"click"],["formControlName","ecl",1,"grow",3,"binding"],[1,"input-field","full-width"],["matInput","","type","text","formControlName","note","placeholder","Enter a description..."],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"compact-row-container"],[1,"title"],["mat-icon-button","","color","primary",1,"tool",3,"click"],[1,"row","form-title"],["matInput","","type","text","placeholder","Enter title...",3,"ngModelChange","ngModel","ngModelOptions"],["cdkDrag","",1,"output-panel"],[1,"row","control"],["cdkDragHandle","",1,"tool","drag-handle"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"selectionChange","binding"],[1,"title","grow"],[1,"grow",3,"textChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(n,r){if(1&n){const s=xe();J(0,"div",4)(1,"h3"),ut(2,"Terminology Bindings Sandbox "),J(3,"button",5)(4,"mat-icon"),ut(5,"info"),et()(),J(6,"mat-menu",null,0)(8,"span",6),Ut("click",function(l){return zt(s),Gt(l.stopPropagation())}),J(9,"h4"),ut(10,"Terminology Bindings Sandbox"),et(),J(11,"p"),ut(12,"This is a sandbox for creating terminology bindings, designed to support education activities."),et()()()(),J(13,"div",7)(14,"div",8)(15,"mat-expansion-panel",9,1),Ut("opened",function(){return zt(s),Gt(r.panelOpenState=!0)})("closed",function(){return zt(s),Gt(r.panelOpenState=!1)}),J(17,"mat-expansion-panel-header")(18,"mat-panel-title")(19,"h4"),ut(20,"New binding:"),et()(),Ht(21,DIt,2,0,"mat-panel-description",10),et(),J(22,"div")(23,"form",11)(24,"div",12)(25,"div",13)(26,"h5"),ut(27,"Question"),et(),J(28,"mat-form-field",14)(29,"mat-label"),ut(30,"Question text"),et(),ye(31,"input",15),Ht(32,MIt,3,0,"button",16),J(33,"mat-error"),ut(34),et()(),J(35,"mat-form-field",17),ye(36,"app-autocomplete-binding",18),J(37,"a",19),Ut("click",function(){return zt(s),Gt(r.toggleCodeBinding())}),Ht(38,IIt,2,0,"span",10)(39,RIt,2,0,"span",10),et(),J(40,"mat-error"),ut(41),et()()(),J(42,"div",13)(43,"h5"),ut(44,"Answer"),et(),J(45,"mat-form-field",14)(46,"mat-label"),ut(47,"Answer Type"),et(),J(48,"mat-select",20),Ht(49,PIt,2,2,"mat-option",21),et(),J(50,"mat-error"),ut(51),et()(),Ht(52,FIt,9,2,"mat-form-field",22)(53,NIt,7,4,"mat-form-field",22),et()(),Ht(54,VIt,7,2,"mat-form-field",23),et(),ye(55,"br"),J(56,"div",24),ye(57,"span",25),Ht(58,UIt,2,0,"button",26)(59,zIt,2,0,"button",26),J(60,"button",27),Ut("click",function(){return zt(s),Gt(r.cancelEdit())}),ut(61,"Cancel"),et()()()()(),J(62,"div",28)(63,"div",29),Ht(64,GIt,2,1,"button",30),J(65,"input",31,2),Ut("change",function(l){return zt(s),Gt(r.uploadFile(l))}),et(),Ht(67,HIt,2,1,"button",32),J(68,"mat-menu",33,3)(70,"button",34),Ut("click",function(){return zt(s),Gt(r.saveForm())}),ut(71,"Download"),et(),J(72,"button",34),Ut("click",function(){return zt(s),Gt(r.saveOutput(r.fhirQuestionnaireStr))}),ut(73,"Download as FHIR Questionnaire"),et()(),J(74,"button",35),Ut("click",function(){return zt(s),Gt(Zi(66).click())}),ut(75,"Upload form"),et(),J(76,"button",35),Ut("click",function(){return zt(s),Gt(r.loadExample1())}),ut(77,"Example"),et(),J(78,"button",35),Ut("click",function(){return zt(s),Gt(r.clear())}),ut(79,"Clear"),et()()()(),Ht(80,WIt,6,1,"div",36)(81,jIt,12,3,"div",36),J(82,"div",37)(83,"div",38)(84,"div",39),Ut("cdkDropListDropped",function(l){return zt(s),Gt(r.onDrop(l))}),Ht(85,r2t,24,12,"div",40),et()(),J(86,"div",38)(87,"mat-tab-group",41)(88,"mat-tab",42),Ht(89,a2t,4,5,"div",43),et(),J(90,"mat-tab",44),Ht(91,l2t,4,5,"div",43),et(),J(92,"mat-tab",45),Ht(93,u2t,4,5,"div",43),et()()()()()}if(2&n){let s;const o=Zi(7);ot(3),vt("matMenuTriggerFor",o),ot(5),vt("disableRipple",!0),ot(13),vt("ngIf",!r.panelOpenState),ot(2),vt("formGroup",r.newBindingForm),ot(9),vt("ngIf",null==(s=r.newBindingForm.get("title"))?null:s.value),ot(2),Ke(r.getErrorMessage("title")),ot(2),vt("binding",r.codeBinding),ot(2),vt("ngIf",r.codeBinding===r.codeBindingAll),ot(),vt("ngIf",r.codeBinding!=r.codeBindingAll),ot(2),Ke(r.getErrorMessage("code")),ot(8),vt("ngForOf",r.controlTypes),ot(2),Ke(r.getErrorMessage("type")),ot(),vt("ngIf","Section header"!=r.newBindingForm.controls.type.value&&"Text box"!=r.newBindingForm.controls.type.value&&"Checkbox"!=r.newBindingForm.controls.type.value&&"Integer"!=r.newBindingForm.controls.type.value&&"Decimal"!=r.newBindingForm.controls.type.value),ot(),vt("ngIf","Checkbox"==r.newBindingForm.controls.type.value),ot(),vt("ngIf","Section header"!=r.newBindingForm.controls.type.value),ot(4),vt("ngIf",-1==r.indexInEdit),ot(),vt("ngIf",r.indexInEdit>-1),ot(5),vt("ngIf",r.bindings.length),ot(3),vt("ngIf",r.bindings.length),ot(13),vt("ngIf",!r.titleEditMode),ot(),vt("ngIf",r.titleEditMode),ot(2),vt("@growShrink",r.stateName),ot(2),vt("ngForOf",r.bindings),ot(),vt("@openClose",r.stateName),ot(3),vt("ngIf",r.bindings.length>0),ot(2),vt("ngIf",r.bindings.length>0),ot(2),vt("ngIf",r.bindings.length>0)}},dependencies:[ys,ls,EE,Xk,Wk,lY,Cs,jo,ga,Rl,oc,vh,kl,ll,cX,hX,hh,Eh,Cv,Pl,Yo,Cp,wu,Sv,_v,Ap,Av,lc,Ep,_h,IY,eIt,nIt,iIt,Ev,PY,LY,NY,UY,zY,GY,HY],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"],data:{animation:[xr("openClose",[Bn("open",oi({opacity:1,width:"50%"})),Bn("closed",oi({opacity:0,width:"0"})),gn("open <=> closed",[mn("0.5s")])]),xr("growShrink",[Bn("open",oi({width:"50%"})),Bn("closed",oi({width:"100%"})),gn("open <=> closed",[mn("0.5s")])])]}})}}return e})(),d2t=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-prescription-main"]],decls:2,vars:0,template:function(n,r){1&n&&(J(0,"p"),ut(1,"prescription-main works!, no?"),et())}})}}return e})();const f2t=["mat-sort-header",""],p2t=["*"];function m2t(e,i){if(1&e){const t=xe();J(0,"div",2),Ut("@arrowPosition.start",function(){return zt(t),Gt(St()._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){return zt(t),Gt(St()._disableViewStateAnimation=!1)}),ye(1,"div",3),J(2,"div",4),ye(3,"div",5)(4,"div",6)(5,"div",7),et()()}if(2&e){const t=St();vt("@arrowOpacity",t._getArrowViewState())("@arrowPosition",t._getArrowViewState())("@allowChildren",t._getArrowDirectionState()),ot(2),vt("@indicator",t._getArrowDirectionState()),ot(),vt("@leftPointer",t._getArrowDirectionState()),ot(),vt("@rightPointer",t._getArrowDirectionState())}}const WY=new te("MAT_SORT_DEFAULT_OPTIONS");let Gd=(()=>{class e{get direction(){return this._direction}set direction(t){this._direction=t}constructor(t){this._defaultOptions=t,this._initializedStream=new Lx(1),this.sortables=new Map,this._stateChanges=new Fe,this.start="asc",this._direction="",this.disabled=!1,this.sortChange=new Oe,this.initialized=this._initializedStream}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){if(!t)return"";let r=function g2t(e,i){let t=["asc","desc"];return"desc"==e&&t.reverse(),i||t.push(""),t}(t.start||this.start,t?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),s=r.indexOf(this.direction)+1;return s>=r.length&&(s=0),r[s]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}static{this.\u0275fac=function(n){return new(n||e)(pt(WY,8))}}static{this.\u0275dir=me({type:e,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",qe],disabled:[2,"matSortDisabled","disabled",qe]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],standalone:!0,features:[vn,lr]})}}return e})();const Hd=MTt.ENTERING+" "+DTt.STANDARD_CURVE,Iv={indicator:xr("indicator",[Bn("active-asc, asc",oi({transform:"translateY(0px)"})),Bn("active-desc, desc",oi({transform:"translateY(10px)"})),gn("active-asc <=> active-desc",mn(Hd))]),leftPointer:xr("leftPointer",[Bn("active-asc, asc",oi({transform:"rotate(-45deg)"})),Bn("active-desc, desc",oi({transform:"rotate(45deg)"})),gn("active-asc <=> active-desc",mn(Hd))]),rightPointer:xr("rightPointer",[Bn("active-asc, asc",oi({transform:"rotate(45deg)"})),Bn("active-desc, desc",oi({transform:"rotate(-45deg)"})),gn("active-asc <=> active-desc",mn(Hd))]),arrowOpacity:xr("arrowOpacity",[Bn("desc-to-active, asc-to-active, active",oi({opacity:1})),Bn("desc-to-hint, asc-to-hint, hint",oi({opacity:.54})),Bn("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",oi({opacity:0})),gn("* => asc, * => desc, * => active, * => hint, * => void",mn("0ms")),gn("* <=> *",mn(Hd))]),arrowPosition:xr("arrowPosition",[gn("* => desc-to-hint, * => desc-to-active",mn(Hd,pv([oi({transform:"translateY(-25%)"}),oi({transform:"translateY(0)"})]))),gn("* => hint-to-desc, * => active-to-desc",mn(Hd,pv([oi({transform:"translateY(0)"}),oi({transform:"translateY(25%)"})]))),gn("* => asc-to-hint, * => asc-to-active",mn(Hd,pv([oi({transform:"translateY(25%)"}),oi({transform:"translateY(0)"})]))),gn("* => hint-to-asc, * => active-to-asc",mn(Hd,pv([oi({transform:"translateY(0)"}),oi({transform:"translateY(-25%)"})]))),Bn("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",oi({transform:"translateY(0)"})),Bn("hint-to-desc, active-to-desc, desc",oi({transform:"translateY(-25%)"})),Bn("hint-to-asc, active-to-asc, asc",oi({transform:"translateY(25%)"}))]),allowChildren:xr("allowChildren",[gn("* <=> *",[zS("@*",US(),{optional:!0})])])};let LE=(()=>{class e{constructor(){this.changes=new Fe}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const y2t={provide:LE,deps:[[new Xu,new Mf,LE]],useFactory:function v2t(e){return e||new LE}};let tF=(()=>{class e{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(t){this._updateSortActionDescription(t)}constructor(t,n,r,s,o,l,w,E){this._intl=t,this._changeDetectorRef=n,this._sort=r,this._columnDef=s,this._focusMonitor=o,this._elementRef=l,this._ariaDescriber=w,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this.disabled=!1,this._sortActionDescription="Sort",E?.arrowPosition&&(this.arrowPosition=E?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{const n=!!t;n!==this._showIndicatorHint&&(this._setIndicatorHintVisible(n),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription)}_setIndicatorHintVisible(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(t){this._viewState=t||{},this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(t){!this._isDisabled()&&(32===t.keyCode||13===t.keyCode)&&(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const t=this._viewState.fromState;return(t?`${t}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(t){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,t)),this._sortActionDescription=t}_handleStateChanges(){this._rerenderSubscription=qr(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}static{this.\u0275fac=function(n){return new(n||e)(pt(LE),pt(In),pt(Gd,8),pt("MAT_SORT_HEADER_COLUMN_DEF",8),pt(sc),pt(ai),pt(H7,8),pt(WY,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(n,r){1&n&&Ut("click",function(){return r._handleClick()})("keydown",function(o){return r._handleKeydown(o)})("mouseenter",function(){return r._setIndicatorHintVisible(!0)})("mouseleave",function(){return r._setIndicatorHintVisible(!1)}),2&n&&(_i("aria-sort",r._getAriaSortAttribute()),Ci("mat-sort-header-disabled",r._isDisabled()))},inputs:{id:[0,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[2,"disabled","disabled",qe],sortActionDescription:"sortActionDescription",disableClear:[2,"disableClear","disableClear",qe]},exportAs:["matSortHeader"],standalone:!0,features:[vn,Wi],attrs:f2t,ngContentSelectors:p2t,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(n,r){1&n&&(nr(),J(0,"div",0)(1,"div",1),Si(2),et(),Ht(3,m2t,6,6,"div",2),et()),2&n&&(Ci("mat-sort-header-sorted",r._isSorted())("mat-sort-header-position-before","before"===r.arrowPosition),_i("tabindex",r._isDisabled()?null:0)("role",r._isDisabled()?null:"button"),ot(3),Tn(r._renderArrow()?3:-1))},styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;color:var(--mat-sort-arrow-color, var(--mat-app-on-surface));opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[Iv.indicator,Iv.leftPointer,Iv.rightPointer,Iv.arrowOpacity,Iv.arrowPosition,Iv.allowChildren]},changeDetection:0})}}return e})(),x2t=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[y2t],imports:[rn]})}}return e})(),b2t=(()=>{class e{saveItem(t,n){localStorage.setItem(t,n)}getItem(t){return localStorage.getItem(t)}removeItem(t){localStorage.removeItem(t)}isLocalStorageSupported(){try{const t="__test__";return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch{return!1}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Rv=(()=>{class e{constructor(t,n){this.http=t,this.storageService=n,this.baseUrlSubject=new Kr("https://hapi.fhir.org/baseR4"),this.baseUrl$=this.baseUrlSubject.asObservable(),this.userTagSubject=new Kr(""),this.userTag$=this.userTagSubject.asObservable(),this.initialize()}initialize(){if(this.storageService.isLocalStorageSupported()){const t=this.storageService.getItem("baseUrl");t&&this.baseUrlSubject.next(t);const n=this.storageService.getItem("userTag");n&&this.userTagSubject.next(n)}}setBaseUrl(t){this.baseUrlSubject.next(t),this.storageService.saveItem("baseUrl",t)}getBaseUrl(){return this.baseUrlSubject.getValue()}setUserTag(t){this.userTagSubject.next(t),this.storageService.saveItem("userTag",t)}getUserTag(){return this.userTagSubject.getValue()}postQuestionnaire(t){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire`,t)}getQuestionnairesByTag(t,n){return n||(n=100),this.http.get(`${this.baseUrlSubject.value}/Questionnaire?_tag=${t}&_count=${n}`)}tagQuestionnaire(t,n){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire/${t}/$meta-add`,{resourceType:"Parameters",parameter:[{name:"meta",valueMeta:{tag:[{system:"http://snomed.org/tags",code:n}]}}]})}deleteQuestionnaire(t){return this.http.delete(`${this.baseUrlSubject.value}/Questionnaire/${t}`)}updateOrCreateQuestionnaire(t,n){return t.id?this.http.put(`${this.baseUrlSubject.value}/Questionnaire?_id=${t.id}&_tag=${n}`,t).pipe(Js(s=>404===s.status?this.postQuestionnaire(t):Qg(s))):this.postQuestionnaire(t)}getQuestionnaireHistory(t){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${t}/_history`)}getSpecificQuestionnaireVersion(t,n){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${t}/_history/${n}`)}static{this.\u0275fac=function(n){return new(n||e)(re(Il),re(b2t))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function w2t(e,i){if(1&e&&(J(0,"mat-option",15),ut(1),et()),2&e){const t=i.$implicit;vt("value",t),ot(),Je(" ",t.title," ")}}function T2t(e,i){1&e&&ye(0,"mat-spinner",16)}function C2t(e,i){if(1&e){const t=xe();J(0,"div",17)(1,"span",18),ut(2,"\u2261"),et(),ut(3),J(4,"button",19),Ut("click",function(){const r=zt(t).index;return Gt(St().deleteQuestionnaire(r))}),J(5,"mat-icon"),ut(6,"delete"),et()()()}if(2&e){const t=i.$implicit;ot(3),Je(" ",t.title," ")}}let jY=(()=>{class e{constructor(t,n,r,s){this.fb=t,this.fhirService=n,this.data=r,this.dialogRef=s,this.allQuestionnaires=[],this.availableQuestionnaires=[],this.addedQuestionnaires=[],this.userTag="",this.loading=!1}ngOnInit(){this.questionnaireForm=this.fb.group({selectedQuestionnaire:[{value:"",disabled:!0}],assignedName:[{value:"",disabled:!0}]}),this.data&&(this.addedQuestionnaires=this.data.questionnaires,this.questionnaireForm.get("assignedName")?.setValue(this.data.title)),this.questionnaireForm.get("selectedQuestionnaire"),this.userTag=this.fhirService.getUserTag(),this.loadAvailableQuestionnaires()}updateAvailableQuestionnaires(){this.availableQuestionnaires=this.addedQuestionnaires?this.allQuestionnaires.filter(t=>!this.addedQuestionnaires.some(n=>n.id===t.id)):this.allQuestionnaires,this.availableQuestionnaires=this.availableQuestionnaires.filter(t=>!t.extension||!t.extension.some(n=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===n.url&&"assemble-root"===n.valueCode))}loadAvailableQuestionnaires(){this.loading=!0,this.fhirService.getQuestionnairesByTag(this.userTag).subscribe(t=>{this.allQuestionnaires=t.entry.map(n=>n.resource),this.allQuestionnaires.sort((n,r)=>n.title.localeCompare(r.title)),this.updateAvailableQuestionnaires(),this.loading=!1,this.questionnaireForm?.get("selectedQuestionnaire")?.enable(),this.questionnaireForm?.get("assignedName")?.enable()})}addQuestionnaire(){const t=this.questionnaireForm.value;t.selectedQuestionnaire&&(this.addedQuestionnaires.push({...t.selectedQuestionnaire,assignedName:t.assignedName}),this.questionnaireForm.get("selectedQuestionnaire")?.reset(),this.updateAvailableQuestionnaires())}drop(t){ME(this.addedQuestionnaires,t.previousIndex,t.currentIndex)}deleteQuestionnaire(t){t>-1&&(this.addedQuestionnaires.splice(t,1),this.updateAvailableQuestionnaires())}isSaveDisabled(){return!this.questionnaireForm.get("assignedName")?.value||!this.addedQuestionnaires.length}closeModal(){this.dialogRef.close({title:this.questionnaireForm.get("assignedName")?.value,questionnaires:this.addedQuestionnaires})}static{this.\u0275fac=function(n){return new(n||e)(pt(bE),pt(Rv),pt(FE),pt(zd))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-create-root-module"]],decls:26,vars:6,consts:[[1,"form-layout",3,"formGroup"],[1,"form-row"],[1,"full-width"],["matInput","","formControlName","assignedName"],[1,"half-width"],["formControlName","selectedQuestionnaire"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary",1,"add-button",3,"click","disabled"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"questionnaire-list"],[1,"list",3,"cdkDropListDropped"],["cdkDrag","","class","cdk-drag",4,"ngFor","ngForOf"],[1,"button-container"],["mat-flat-button","","color","primary","mat-dialog-close",""],["mat-flat-button","","color","accent",3,"click","disabled"],[3,"value"],["diameter","35",1,"loading-spinner"],["cdkDrag","",1,"cdk-drag"],[1,"drag-handle"],["mat-icon-button","","aria-label","Delete questionnaire",3,"click"]],template:function(n,r){1&n&&(J(0,"mat-dialog-content")(1,"h2"),ut(2,"Create a modular Questionnaire"),et(),J(3,"form",0)(4,"div",1)(5,"mat-form-field",2)(6,"mat-label"),ut(7,"Assign Name"),et(),ye(8,"input",3),et()(),J(9,"div",1)(10,"mat-form-field",4)(11,"mat-label"),ut(12,"Select Child Questionnaire"),et(),J(13,"mat-select",5),Ht(14,w2t,2,2,"mat-option",6),et()(),J(15,"button",7),Ut("click",function(){return r.addQuestionnaire()}),ut(16,"Add questionnaire"),et(),Ht(17,T2t,1,0,"mat-spinner",8),et()(),J(18,"div",9)(19,"cdk-drop-list",10),Ut("cdkDropListDropped",function(o){return r.drop(o)}),Ht(20,C2t,7,1,"div",11),et()()(),J(21,"mat-dialog-actions",12)(22,"button",13),ut(23,"Cancel"),et(),J(24,"button",14),Ut("click",function(){return r.closeModal()}),ut(25,"Save"),et()()),2&n&&(ot(3),vt("formGroup",r.questionnaireForm),ot(11),vt("ngForOf",r.availableQuestionnaires),ot(),vt("disabled",r.loading),ot(2),vt("ngIf",r.loading),ot(3),vt("ngForOf",r.addedQuestionnaires),ot(4),vt("disabled",r.isSaveDisabled()||r.loading))},dependencies:[ys,ls,Xk,Wk,Cs,jo,ga,kl,ll,hh,Pd,Eh,Cv,Pl,Yo,Cp,wu,Sv,Av,Mv,pb,fb],styles:[".questionnaire-list[_ngcontent-%COMP%]{width:100%;max-height:400px;overflow:auto;border:1px solid #ccc;border-radius:4px;background-color:#f9f9f9;padding:10px}.list[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:4px;background-color:#fff;margin-bottom:10px;padding:10px;display:flex;align-items:center;justify-content:left;box-shadow:0 2px 4px #0000001a}.drag-handle[_ngcontent-%COMP%]{cursor:move;margin-right:15px;font-size:20px;color:#666}.cdk-drag-preview[_ngcontent-%COMP%]{background-color:#e0e0e0}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.form-layout[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:15px}.form-layout[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%}.form-layout[_ngcontent-%COMP%] .half-width[_ngcontent-%COMP%]{width:50%;margin-right:15px}"]})}}return e})();function S2t(e,i){if(1&e&&(J(0,"mat-option",17),ut(1),et()),2&e){const t=i.$implicit;vt("value",t),ot(),Je(" ",t," ")}}function E2t(e,i){if(1&e){const t=xe();J(0,"mat-form-field",14)(1,"mat-select",16,0),Ut("selectionChange",function(r){return zt(t),Gt(St(2)._changePageSize(r.value))}),sC(3,S2t,2,2,"mat-option",17,rC),et(),J(5,"div",18),Ut("click",function(){return zt(t),Gt(Zi(2).open())}),et()()}if(2&e){const t=St(2);vt("appearance",t._formFieldAppearance)("color",t.color),ot(),vt("value",t.pageSize)("disabled",t.disabled)("aria-labelledby",t._pageSizeLabelId)("panelClass",t.selectConfig.panelClass||"")("disableOptionCentering",t.selectConfig.disableOptionCentering),ot(2),aC(t._displayedPageSizeOptions)}}function _2t(e,i){if(1&e&&(J(0,"div",15),ut(1),et()),2&e){const t=St(2);ot(),Ke(t.pageSize)}}function A2t(e,i){if(1&e&&(J(0,"div",3)(1,"div",13),ut(2),et(),Ht(3,E2t,6,7,"mat-form-field",14)(4,_2t,2,1,"div",15),et()),2&e){const t=St();ot(),_i("id",t._pageSizeLabelId),ot(),Je(" ",t._intl.itemsPerPageLabel," "),ot(),Tn(t._displayedPageSizeOptions.length>1?3:-1),ot(),Tn(t._displayedPageSizeOptions.length<=1?4:-1)}}function D2t(e,i){if(1&e){const t=xe();J(0,"button",19),Ut("click",function(){return zt(t),Gt(St().firstPage())}),bl(),J(1,"svg",8),ye(2,"path",20),et()()}if(2&e){const t=St();vt("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("matTooltipPosition","above")("disabled",t._previousButtonsDisabled()),_i("aria-label",t._intl.firstPageLabel)}}function M2t(e,i){if(1&e){const t=xe();J(0,"button",21),Ut("click",function(){return zt(t),Gt(St().lastPage())}),bl(),J(1,"svg",8),ye(2,"path",22),et()()}if(2&e){const t=St();vt("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("matTooltipPosition","above")("disabled",t._nextButtonsDisabled()),_i("aria-label",t._intl.lastPageLabel)}}let NE=(()=>{class e{constructor(){this.changes=new Fe,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,n,r)=>{if(0==r||0==n)return`0 of ${r}`;const s=t*n;return`${s+1} \u2013 ${s<(r=Math.max(r,0))?Math.min(s+n,r):s+n} of ${r}`}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const R2t={provide:NE,deps:[[new Xu,new Mf,NE]],useFactory:function I2t(e){return e||new NE}},k2t=new te("MAT_PAGINATOR_DEFAULT_OPTIONS");let F2t=0,eF=(()=>{class e{get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(t||0,0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=t||0,this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(t||0,0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(n=>jr(n,0)),this._updateDisplayedPageSizeOptions()}constructor(t,n,r){if(this._intl=t,this._changeDetectorRef=n,this._pageSizeLabelId="mat-paginator-page-size-label-"+F2t++,this._isInitialized=!1,this._initializedStream=new Lx(1),this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this.hidePageSize=!1,this.showFirstLastButtons=!1,this.selectConfig={},this.disabled=!1,this.page=new Oe,this.initialized=this._initializedStream,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){const{pageSize:s,pageSizeOptions:o,hidePageSize:l,showFirstLastButtons:w}=r;null!=s&&(this._pageSize=s),null!=o&&(this._pageSizeOptions=o),null!=l&&(this.hidePageSize=l),null!=w&&(this.showFirstLastButtons=w)}this._formFieldAppearance=r?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const t=this.getNumberOfPages()-1;return this.pageIndext-n),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}static{this.\u0275fac=function(n){return new(n||e)(pt(NE),pt(In),pt(k2t,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",jr],length:[2,"length","length",jr],pageSize:[2,"pageSize","pageSize",jr],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",qe],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",qe],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",qe]},outputs:{page:"page"},exportAs:["matPaginator"],standalone:!0,features:[vn,Wi],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(n,r){1&n&&(J(0,"div",1)(1,"div",2),Ht(2,A2t,5,4,"div",3),J(3,"div",4)(4,"div",5),ut(5),et(),Ht(6,D2t,3,5,"button",6),J(7,"button",7),Ut("click",function(){return r.previousPage()}),bl(),J(8,"svg",8),ye(9,"path",9),et()(),dy(),J(10,"button",10),Ut("click",function(){return r.nextPage()}),bl(),J(11,"svg",8),ye(12,"path",11),et()(),Ht(13,M2t,3,5,"button",12),et()()()),2&n&&(ot(2),Tn(r.hidePageSize?-1:2),ot(3),Je(" ",r._intl.getRangeLabel(r.pageIndex,r.pageSize,r.length)," "),ot(),Tn(r.showFirstLastButtons?6:-1),ot(),vt("matTooltip",r._intl.previousPageLabel)("matTooltipDisabled",r._previousButtonsDisabled())("matTooltipPosition","above")("disabled",r._previousButtonsDisabled()),_i("aria-label",r._intl.previousPageLabel),ot(3),vt("matTooltip",r._intl.nextPageLabel)("matTooltipDisabled",r._nextButtonsDisabled())("matTooltipPosition","above")("disabled",r._nextButtonsDisabled()),_i("aria-label",r._intl.nextPageLabel),ot(3),Tn(r.showFirstLastButtons?13:-1))},dependencies:[kl,Av,hh,jo,_h],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-app-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-app-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-app-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-app-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-app-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-app-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-app-body-small-tracking));--mat-form-field-container-height:var(--mat-paginator-form-field-container-height);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-app-body-small-size))}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display);position:absolute;top:50%;left:50%;width:84px;height:48px;background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}"],encapsulation:2,changeDetection:0})}}return e})(),O2t=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:[R2t],imports:[VP,kX,BX,eF]})}}return e})(),XY=(()=>{class e{constructor(t,n){this.http=t,this.fhirService=n}generateRootQuestionnaire(t,n){var r=this;return we(function*(){try{let o=yield Ia(r.http.get("assets/questionnaires/root-questionnaire-template.json"));o.title=t;let l=0,w=r.fhirService.getBaseUrl();return r.fhirService.getUserTag(),n.forEach(D=>{l++,D.url=w+"/Questionnaire/"+D.id,o.item.push({linkId:l.toString(),text:D.title,type:"group",required:!1,item:[{extension:[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire",valueCanonical:D.url}],linkId:l.toString()+".1",text:"Unable to resolve sub-questionnaire",type:"display"}]})}),o}catch(s){throw console.error("Error generating root questionnaire:",s),s}})()}getRootQuestionnaireData(t){var n=this;return we(function*(){if(!t||!Array.isArray(t.item))throw new Error("Invalid root questionnaire");const r=t.title,s=t.item.filter(l=>"group"===l.type&&l.item&&Array.isArray(l.item)).flatMap(l=>l.item).map(function(){var l=we(function*(w){const E=w.extension?.find(D=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===D.url);return E?n.getQuestionnaireFromUrl(E.valueCanonical):null});return function(w){return l.apply(this,arguments)}}());return{title:r,questionnaires:(yield Promise.all(s)).filter(l=>null!==l)}})()}checkForAssembleRoot(t){return!!(t&&t.extension&&Array.isArray(t.extension))&&t.extension.some(n=>"assemble-root"===n.valueCode)}assembleQuestionnaire(t){var n=this;return we(function*(){if(t=JSON.parse(JSON.stringify(t)),!n.checkForAssembleRoot(t))return null;for(let r of t.item)if("group"==r.type){r.extension=[];for(let s of r.item)if(s.extension&&Array.isArray(s.extension))for(let o of s.extension)if("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===o.url){let l=yield n.getQuestionnaireFromUrl(o.valueCanonical);l&&(r.item=l.item),r.extension||(r.extension=[]),r.extension.push({url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",valueCanonical:o.valueCanonical})}}return t.extension=t.extension.filter(r=>"assemble-root"!==r.valueCode),t})()}disassembleQuestionnaire(t){var n=this;return we(function*(){if(!t||!t.item||!Array.isArray(t.item))throw new Error("Invalid root questionnaire");const r=t.title,s=[];for(const o of t.item)if("group"===o.type&&o.extension&&Array.isArray(o.extension)){const l=o.extension.find(w=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom"===w.url);if(l){const w=l.valueCanonical,E=yield n.getQuestionnaireFromUrl(w);E&&s.push(E)}}return{title:r,questionnaires:s}})()}getQuestionnaireFromUrl(t){var n=this;return we(function*(){try{return yield Ia(n.http.get(t))}catch(r){return console.error("Error fetching questionnaire:",r),null}})()}static{this.\u0275fac=function(n){return new(n||e)(re(Il),re(Rv))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const L2t=()=>[5,10,20],N2t=e=>["status-pill",e],B2t=()=>["status-pill","active"],V2t=()=>["status-pill","draft"];function U2t(e,i){1&e&&(J(0,"th",19),ut(1," Title "),et())}function z2t(e,i){if(1&e&&(J(0,"td",20),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.title," ")}}function G2t(e,i){1&e&&(J(0,"th",19),ut(1," Status "),et())}function H2t(e,i){if(1&e&&(J(0,"td",20)(1,"span",21),ut(2),vs(3,"uppercase"),et()()),2&e){const t=i.$implicit;ot(),vt("ngClass",Al(4,N2t,t.status)),ot(),Ke(Jl(3,2,t.status))}}function W2t(e,i){1&e&&(J(0,"th",22),ut(1," Version "),et())}function j2t(e,i){if(1&e&&(J(0,"td",20),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.meta.versionId," ")}}function X2t(e,i){1&e&&(J(0,"th",19),ut(1," Last updated "),et())}function Y2t(e,i){if(1&e&&(J(0,"td",20),ut(1),vs(2,"date"),et()),2&e){const t=i.$implicit;ot(),Je(" ",Pc(2,1,t.meta.lastUpdated,"MMMM d, y, h:mm:ss a")," ")}}function $2t(e,i){1&e&&(J(0,"th",19),ut(1," Type "),et())}function Q2t(e,i){1&e&&(J(0,"span",21),ut(1,"QUESTIONNAIRE"),et()),2&e&&vt("ngClass",Xa(1,B2t))}function K2t(e,i){1&e&&(J(0,"span",21),ut(1,"MODULAR ROOT"),et()),2&e&&vt("ngClass",Xa(1,V2t))}function Z2t(e,i){if(1&e&&(J(0,"td",20),Ht(1,Q2t,2,2,"span",23)(2,K2t,2,2,"span",23),et()),2&e){const t=i.$implicit,n=St();ot(),vt("ngIf",!n.isRootQuestionnaire(t)),ot(),vt("ngIf",n.isRootQuestionnaire(t))}}function J2t(e,i){1&e&&(J(0,"th",22),ut(1," Actions "),et())}function q2t(e,i){if(1&e){const t=xe();J(0,"button",34),Ut("click",function(){zt(t);const r=St().$implicit;return Gt(St().validate(r))}),J(1,"mat-icon"),ut(2,"done"),et()()}if(2&e){const t=St().$implicit;vt("disabled",St().isRootQuestionnaire(t))}}function tRt(e,i){if(1&e){const t=xe();J(0,"button",35),Ut("click",function(){zt(t);const r=St().$implicit;return Gt(St().assemble(r))}),J(1,"mat-icon"),ut(2,"build"),et()()}}function eRt(e,i){if(1&e){const t=xe();J(0,"button",36),Ut("click",function(){zt(t);const r=St().$implicit;return Gt(St().preview(r))}),J(1,"mat-icon"),ut(2,"visibility"),et()()}}function iRt(e,i){if(1&e){const t=xe();J(0,"button",37),Ut("click",function(){zt(t);const r=St().$implicit;return Gt(St().openInNewTab(r))}),J(1,"mat-icon"),ut(2,"open_in_new"),et()()}}function nRt(e,i){if(1&e){const t=xe();J(0,"button",38),Ut("click",function(){zt(t);const r=St().$implicit;return Gt(St().editQuestionnaire(r))}),J(1,"mat-icon"),ut(2,"edit"),et()()}}function rRt(e,i){if(1&e){const t=xe();J(0,"button",39),Ut("click",function(){zt(t);const r=St().$implicit;return Gt(St().openModularQuestionnaireModal(r))}),J(1,"mat-icon"),ut(2,"edit"),et()()}}function sRt(e,i){if(1&e){const t=xe();J(0,"td",20),Ht(1,q2t,3,1,"button",24)(2,tRt,3,0,"button",25)(3,eRt,3,0,"button",26)(4,iRt,3,0,"button",27),J(5,"button",28),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().saveQuestionnaire(r))}),J(6,"mat-icon"),ut(7,"cloud_download"),et()(),Ht(8,nRt,3,0,"button",29)(9,rRt,3,0,"button",30),J(10,"button",31),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().viewHistory(r))}),J(11,"mat-icon"),ut(12,"history"),et()(),J(13,"span",32)(14,"button",33),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().deleteQuestionnaire(r))}),J(15,"mat-icon"),ut(16,"delete"),et()()()()}if(2&e){const t=i.$implicit,n=St();ot(),vt("ngIf",n.config.validate),ot(),vt("ngIf",n.isRootQuestionnaire(t)),ot(),vt("ngIf",n.config.preview&&!n.isRootQuestionnaire(t)),ot(),vt("ngIf",n.config.preview),ot(4),vt("ngIf",!n.isRootQuestionnaire(t)),ot(),vt("ngIf",n.isRootQuestionnaire(t)),ot(),vt("disabled",1==t.meta.versionId),ot(3),yd("matTooltip",n.getDeleteTooltip(t)),ot(),vt("disabled",n.getReferencingQuestionnaires(t).length>0)}}function aRt(e,i){1&e&&ye(0,"tr",40)}function oRt(e,i){1&e&&ye(0,"tr",41)}function lRt(e,i){1&e&&(J(0,"p",42)(1,"i"),ut(2," No questionnaires found. Upload your questionnaires to start. "),et()())}function cRt(e,i){1&e&&ye(0,"mat-spinner",43)}function uRt(e,i){if(1&e){const t=xe();J(0,"button",44),Ut("click",function(){return zt(t),Gt(St().downloadAllQuestionnaires())}),ut(1," Download bundle "),et()}}let YY=(()=>{class e{constructor(t,n,r,s){this.fhirService=t,this.questionnaireService=n,this.dialog=r,this._snackBar=s,this.questionnaireSelected=new Oe,this.validateQuestionnaire=new Oe,this.previewQuestionnaire=new Oe,this.viewQuestionaireHistory=new Oe,this.config={},this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new wp,this.questionnaires=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.notFound=!1,this.baseUrlChanged=new Fe,this.userTagChanged=new Fe,this.fbUrl="https://formbuilder.nlm.nih.gov",this.blankQuestionnaire={resourceType:"Questionnaire",title:"New Form",status:"draft",item:[{type:"string",linkId:"4009522077787",text:"Item 0"}]}}ngOnInit(){}ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"type":return this.isRootQuestionnaire(t)?"Modular root":"Questionnaire";case"version":return t.meta&&t.meta.versionId?t.meta.versionId:"";case"lastUpdated":return t.meta&&t.meta.lastUpdated?new Date(t.meta.lastUpdated):"";default:return t[n]}},this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires(),oh([this.fhirService.baseUrl$.pipe(vu(1e3),mp()),this.fhirService.userTag$.pipe(vu(1e3),mp())]).subscribe(([t,n])=>{(this.selectedFhirServer!==t||this.selectedUserTag!==n)&&(this.selectedFhirServer=t,this.selectedUserTag=n,this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires())})}ngOnChanges(t){}loadQuestionnaires(){this.loading=!0,this.notFound=!1,this.questionnaires=[],this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(t=>{t.entry?(this.questionnaires=t.entry.map(n=>n.resource),this.dataSource.data=this.questionnaires,this.dataSource.sort=this.sort,this.loading=!1,this.sort.active="title",this.sort.direction="asc",this.sort.sortChange.emit()):(this.questionnaires=[],this.dataSource.data=this.questionnaires,this.loading=!1,this.notFound=!0)})}updateQuestionnairesList(t){const n=this.questionnaires.findIndex(r=>r.id===t.id);-1!==n?(this.questionnaires[n]=t,this.dataSource.data=this.questionnaires):(this.questionnaires.push(t),this.dataSource.data=this.questionnaires)}addQuestionnaire(t){this.updateQuestionnairesList(t)}deleteQuestionnaire(t){this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Deleting Questionnaire...",panelClass:["green-snackbar"]}),this.fhirService.deleteQuestionnaire(t.id).subscribe(()=>{this.questionnaires=this.questionnaires.filter(n=>n.id!==t.id),this.dataSource.data=this.questionnaires,this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Questionnaire deleted successfully",panelClass:["green-snackbar"]})})}selectQuestionnaire(t){this.questionnaireSelected.emit(t)}validate(t){this.validateQuestionnaire.emit(t)}viewHistory(t){this.viewQuestionaireHistory.emit(t)}preview(t){this.previewQuestionnaire.emit(t)}openInNewTab(t){window.open(this.selectedFhirServer+"/Questionnaire/"+t.id,"_blank")}saveQuestionnaire(t){var n=new Blob([JSON.stringify(t,null,2)],{type:"text/plain;charset=utf-8"});Tu(n,`${t.title}-v${t.meta.versionId}.json`)}isRootQuestionnaire(t){return!(!t.extension||!Array.isArray(t.extension))&&t.extension.some(n=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===n.url&&"assemble-root"===n.valueCode)}assemble(t){this._snackBar.openFromComponent(Rr,{duration:2e3,data:"Assembling Questionnaire...",panelClass:["green-snackbar"]}),this.questionnaireService.assembleQuestionnaire(t).then(n=>{n.title=t.title+" (assembled)",this.previewQuestionnaire.emit(n),this._snackBar.openFromComponent(Rr,{duration:2e3,data:"Questionnaire ready",panelClass:["green-snackbar"]})}).catch(n=>{console.error("Error assembling questionnaire:",n)})}createQuestionnaire(){let t=this.blankQuestionnaire;t.meta||(t.meta={}),t.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.editQuestionnaire(t)}editQuestionnaire(t){const n=window.open(this.fbUrl+"/window-open?referrer="+encodeURIComponent(window.location.href));window.addEventListener("message",function s(o){if(o.origin===r.fbUrl){const w=o.data.questionnaire;switch(o.data.type){case"initialized":n?.postMessage({type:"initialQuestionnaire",questionnaire:t},r.fbUrl);break;case"updateQuestionnaire":break;case"closed":r.fhirService.updateOrCreateQuestionnaire(w,r.selectedUserTag).pipe(ic()).subscribe(E=>{r._snackBar.openFromComponent(Rr,{duration:5e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),r.updateQuestionnairesList(E)},E=>{r._snackBar.openFromComponent(Rr,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})})}}},!0);let r=this}openModularQuestionnaireModal(t){var n=this;return we(function*(){let r=yield n.questionnaireService.getRootQuestionnaireData(t);n.dialog.open(jY,{data:r,width:"75%"}).afterClosed().subscribe(o=>{o&&n.handleDialogResult(o,t)})})()}handleDialogResult(t,n){var r=this;return we(function*(){r._snackBar.openFromComponent(Rr,{duration:5e3,data:"Updating questionnaire...",panelClass:["green-snackbar"]});try{let s=yield r.questionnaireService.generateRootQuestionnaire(t.title,t.questionnaires);s&&(n.title=t.title,n.item=s.item,r.addQuestionnaire(n),r.fhirService.updateOrCreateQuestionnaire(n,r.selectedUserTag).pipe(ic()).subscribe(o=>{r._snackBar.openFromComponent(Rr,{duration:5e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),r.updateQuestionnairesList(o)},o=>{r._snackBar.openFromComponent(Rr,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})}))}catch(s){console.error("Error handling dialog result:",s)}})()}downloadAllQuestionnaires(){this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Downloading Questionnaires...",panelClass:["green-snackbar"]}),this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(t=>{var n=new Blob([JSON.stringify(t,null,2)],{type:"text/plain;charset=utf-8"});Tu(n,"questionnaires-bundle.json"),this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Questionnaires downloaded successfully",panelClass:["green-snackbar"]})})}getReferencingQuestionnaires(t){let r=`${this.fhirService.getBaseUrl()}/Questionnaire/${t.id}`;return this.dataSource.data.filter(o=>o.item&&Array.isArray(o.item)&&o.item.some(l=>l.item&&Array.isArray(l.item)&&l.item.some(w=>w.extension&&Array.isArray(w.extension)&&w.extension.some(E=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===E.url&&E.valueCanonical===r))))}getDeleteTooltip(t){const n=this.getReferencingQuestionnaires(t);return 0===n.length?"Delete Questionnaire":`Cannot delete: Referenced by ${n.map(s=>`"${s.title}"`).join(", ")}`}static{this.\u0275fac=function(n){return new(n||e)(pt(Rv),pt(XY),pt(Dp),pt(Rd))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-list-questionnaires"]],viewQuery:function(n,r){if(1&n&&(ki(eF,5),ki(Gd,5)),2&n){let s;He(s=We())&&(r.paginator=s.first),He(s=We())&&(r.sort=s.first)}},inputs:{config:"config"},outputs:{questionnaireSelected:"questionnaireSelected",validateQuestionnaire:"validateQuestionnaire",previewQuestionnaire:"previewQuestionnaire",viewQuestionaireHistory:"viewQuestionaireHistory"},features:[lr],decls:28,vars:9,consts:[["id","table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",1,"mat-elevation-z8",3,"pageSizeOptions","pageSize"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["id","outer-container"],[1,"download-button-container"],["mat-flat-button","","color","accent","matTooltip","Download all Questionnaires",3,"click",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],["mat-header-cell",""],[3,"ngClass",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Validate Questionnaire",3,"disabled","click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Assemble Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Preview Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Open resource in new tab",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Modular Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","View Questionnaire History",1,"action-button",3,"click","disabled"],[3,"matTooltip"],["mat-icon-button","","color","accent",3,"click","disabled"],["mat-icon-button","","color","accent","matTooltip","Validate Questionnaire",1,"action-button",3,"click","disabled"],["mat-icon-button","","color","accent","matTooltip","Assemble Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Modular Questionnaire",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"],["mat-flat-button","","color","accent","matTooltip","Download all Questionnaires",3,"click"]],template:function(n,r){1&n&&(J(0,"div",0)(1,"table",1),Qi(2,2),Ht(3,U2t,2,0,"th",3)(4,z2t,2,1,"td",4),Ki(),Qi(5,5),Ht(6,G2t,2,0,"th",3)(7,H2t,4,6,"td",4),Ki(),Qi(8,6),Ht(9,W2t,2,0,"th",7)(10,j2t,2,1,"td",4),Ki(),Qi(11,8),Ht(12,X2t,2,0,"th",3)(13,Y2t,3,4,"td",4),Ki(),Qi(14,9),Ht(15,$2t,2,0,"th",3)(16,Z2t,3,2,"td",4),Ki(),Qi(17,10),Ht(18,J2t,2,0,"th",7)(19,sRt,17,9,"td",4),Ki(),Ht(20,aRt,1,0,"tr",11)(21,oRt,1,0,"tr",12),et(),ye(22,"mat-paginator",13),Ht(23,lRt,3,0,"p",14)(24,cRt,1,0,"mat-spinner",15),et(),J(25,"div",16)(26,"div",17),Ht(27,uRt,2,0,"button",18),et()()),2&n&&(ot(),vt("dataSource",r.dataSource),ot(19),vt("matHeaderRowDef",r.displayedColumns),ot(),vt("matRowDefColumns",r.displayedColumns),ot(),vt("pageSizeOptions",Xa(8,L2t))("pageSize",10),ot(),vt("ngIf",r.notFound&&!r.questionnaires.length),ot(),vt("ngIf",r.loading),ot(3),vt("ngIf",!r.loading&&r.questionnaires.length>0))},dependencies:[Td,ls,Cs,jo,ga,Pd,kd,wh,Fd,Th,bh,Od,Ch,Sh,Ld,Nd,_h,Gd,tF,eF,mR,sh],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}#table-container[_ngcontent-%COMP%]{padding-bottom:2rem}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:2rem}"]})}}return e})(),hRt=(()=>{class e{constructor(t){this.dialogRef=t,this.listConfig={select:!0}}selectAndDownload(t){this.dialogRef.close(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(zd))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-load-questionnaire-modal"]],decls:7,vars:1,consts:[[3,"questionnaireSelected","config"],["align","end"],["mat-flat-button","","color","accent","mat-dialog-close",""]],template:function(n,r){1&n&&(J(0,"mat-dialog-content")(1,"h2"),ut(2,"Available Questionnaires"),et(),J(3,"app-list-questionnaires",0),Ut("questionnaireSelected",function(o){return r.selectAndDownload(o)}),et()(),J(4,"mat-dialog-actions",1)(5,"button",2),ut(6,"Close"),et()()),2&n&&(ot(3),vt("config",r.listConfig))},dependencies:[Cs,Mv,pb,fb,YY]})}}return e})();const dRt=["settingsForm"];function fRt(e,i){1&e&&(J(0,"mat-error"),ut(1,"Base URL is required"),et())}function pRt(e,i){1&e&&(J(0,"mat-error"),ut(1,"User Tag is required and must be at least 3 characters"),et())}let iF=(()=>{class e{constructor(t,n){this.fhirService=t,this.dialogRef=n,this.baseUrl="",this.userTag=""}ngAfterViewInit(){this.triggerValidation()}triggerValidation(){Object.keys(this.settingsForm.controls).forEach(t=>{const n=this.settingsForm.control.get(t);n?.markAsTouched({onlySelf:!0}),n?.markAsDirty({onlySelf:!0})})}ngOnInit(){this.baseUrl=this.fhirService.getBaseUrl(),this.userTag=this.fhirService.getUserTag()}updateSettings(){this.settingsForm.valid&&(this.fhirService.setBaseUrl(this.baseUrl),this.fhirService.setUserTag(this.userTag),this.dialogRef.close("save"))}static{this.\u0275fac=function(n){return new(n||e)(pt(Rv),pt(zd))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-fhir-server-settings-modal"]],viewQuery:function(n,r){if(1&n&&ki(dRt,5),2&n){let s;He(s=We())&&(r.settingsForm=s.first)}},decls:29,vars:5,consts:[["settingsForm","ngForm"],["baseUrlField","ngModel"],["userTagField","ngModel"],[1,"form-container"],[1,"warning"],[3,"ngSubmit"],["matInput","","name","baseUrl","required","",3,"ngModelChange","ngModel"],[4,"ngIf"],["matInput","","name","userTag","required","","minlength","3",3,"ngModelChange","ngModel"],[1,"button-container"],["mat-flat-button","","color","accent","type","submit",3,"disabled"],["mat-flat-button","","color","primary","mat-dialog-close",""]],template:function(n,r){if(1&n){const s=xe();J(0,"div",3)(1,"h2"),ut(2,"FHIR Server Connection"),et(),J(3,"p"),ut(4,"Manager mode allows you to store questionnares in a FHIR Server. Enter the FHIR server URL and your "),J(5,"b"),ut(6,"User Tag"),et(),ut(7,", this value will be used to identify your questionnaires."),et(),J(8,"p",4),ut(9,"Warning: using the default public FHIR server will not ensure the persistence of your information, always save your questionnaires to your computer as a backup."),et(),J(10,"form",5,0),Ut("ngSubmit",function(){return zt(s),Gt(r.updateSettings())}),J(12,"mat-form-field")(13,"mat-label"),ut(14,"Base URL of the FHIR Server"),et(),J(15,"input",6,1),Aa("ngModelChange",function(l){return zt(s),ja(r.baseUrl,l)||(r.baseUrl=l),Gt(l)}),et(),Ht(17,fRt,2,0,"mat-error",7),et(),J(18,"mat-form-field")(19,"mat-label"),ut(20,"User Tag"),et(),J(21,"input",8,2),Aa("ngModelChange",function(l){return zt(s),ja(r.userTag,l)||(r.userTag=l),Gt(l)}),et(),Ht(23,pRt,2,0,"mat-error",7),et(),J(24,"div",9)(25,"button",10),ut(26,"Open FHIR Repository"),et(),J(27,"button",11),ut(28,"Close"),et()()()()}if(2&n){const s=Zi(11),o=Zi(16),l=Zi(22);ot(15),_a("ngModel",r.baseUrl),ot(2),vt("ngIf",o.invalid&&o.touched),ot(4),_a("ngModel",r.userTag),ot(2),vt("ngIf",l.invalid&&l.touched),ot(2),vt("disabled",!s.valid)}},dependencies:[ls,Cs,kl,ll,cX,Eh,Cv,Pl,Yo,Cp,vE,kk,lc,Ep,Mv],styles:[".form-container[_ngcontent-%COMP%]{margin:auto;padding:20px}mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.warning[_ngcontent-%COMP%]{color:#ff9500;font-weight:lighter;font-style:italic}"]})}}return e})(),nF=(()=>{class e{constructor(t,n){this.data=t,this.dialogRef=n}static{this.\u0275fac=function(n){return new(n||e)(pt(FE),pt(zd))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-confirmation-dialog"]],decls:10,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","",1,"button-container"],["mat-button","",3,"mat-dialog-close"]],template:function(n,r){1&n&&(J(0,"h1",0),ut(1),et(),J(2,"div",1)(3,"p"),ut(4),et()(),J(5,"div",2)(6,"button",3),ut(7,"Yes"),et(),J(8,"button",3),ut(9,"No"),et()()),2&n&&(ot(),Ke(r.data.title),ot(3),Ke(r.data.message),ot(2),vt("mat-dialog-close",!0),ot(2),vt("mat-dialog-close",!1))},dependencies:[Cs,Mv,Zk,pb,fb],encapsulation:2})}}return e})();function mRt(e,i){1&e&&ye(0,"div",2)}const gRt=new te("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");let rF=(()=>{class e{constructor(t,n,r,s,o){this._elementRef=t,this._ngZone=n,this._changeDetectorRef=r,this._animationMode=s,this._isNoopAnimation=!1,this._defaultColor="primary",this._value=0,this._bufferValue=0,this.animationEnd=new Oe,this._mode="determinate",this._transitionendHandler=l=>{0===this.animationEnd.observers.length||!l.target||!l.target.classList.contains("mdc-linear-progress__primary-bar")||("determinate"===this.mode||"buffer"===this.mode)&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))},this._isNoopAnimation="NoopAnimations"===s,o&&(o.color&&(this.color=this._defaultColor=o.color),this.mode=o.mode||this.mode)}get color(){return this._color||this._defaultColor}set color(t){this._color=t}get value(){return this._value}set value(t){this._value=$Y(t||0),this._changeDetectorRef.markForCheck()}get bufferValue(){return this._bufferValue||0}set bufferValue(t){this._bufferValue=$Y(t||0),this._changeDetectorRef.markForCheck()}get mode(){return this._mode}set mode(t){this._mode=t,this._changeDetectorRef.markForCheck()}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("transitionend",this._transitionendHandler)})}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._transitionendHandler)}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${"buffer"===this.mode?this.bufferValue:100}%`}_isIndeterminate(){return"indeterminate"===this.mode||"query"===this.mode}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(li),pt(In),pt(Hr,8),pt(gRt,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(n,r){2&n&&(_i("aria-valuenow",r._isIndeterminate()?null:r.value)("mode",r.mode),oo("mat-"+r.color),Ci("_mat-animation-noopable",r._isNoopAnimation)("mdc-linear-progress--animation-ready",!r._isNoopAnimation)("mdc-linear-progress--indeterminate",r._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",jr],bufferValue:[2,"bufferValue","bufferValue",jr],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],standalone:!0,features:[vn,Wi],decls:7,vars:5,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(n,r){1&n&&(J(0,"div",0),ye(1,"div",1),Ht(2,mRt,1,0,"div",2),et(),J(3,"div",3),ye(4,"span",4),et(),J(5,"div",5),ye(6,"span",4),et()),2&n&&(ot(),$s("flex-basis",r._getBufferBarFlexBasis()),ot(),Tn("buffer"===r.mode?2:-1),ot(),$s("transform",r._getPrimaryBarTransform()))},styles:[".mat-mdc-progress-bar{display:block;text-align:start}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:max(var(--mdc-linear-progress-track-height),var(--mdc-linear-progress-active-indicator-height))}.cdk-high-contrast-active .mdc-linear-progress{outline-color:CanvasText}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}[dir=rtl] .mdc-linear-progress__bar{right:0;transform-origin:center right}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid;border-color:var(--mdc-linear-progress-active-indicator-color, var(--mat-app-primary));border-top-width:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden;height:var(--mdc-linear-progress-track-height);border-radius:var(--mdc-linear-progress-track-shape, var(--mat-app-corner-none))}.mdc-linear-progress__buffer-dots{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");background-repeat:repeat-x;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering 250ms infinite linear;background-color:var(--mdc-linear-progress-track-color, var(--mat-app-surface-variant))}.cdk-high-contrast-active .mdc-linear-progress__buffer-dots{background-color:ButtonBorder}[dir=rtl] .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);background-color:var(--mdc-linear-progress-track-color, var(--mat-app-surface-variant))}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mdc-linear-progress-track-height) * -2.5))}}@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(-83.67142%)}100%{transform:translateX(-200.611057%)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(-37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(-84.386165%)}100%{transform:translateX(-160.277782%)}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}"],encapsulation:2,changeDetection:0})}}return e})();function $Y(e,i=0,t=100){return Math.max(i,Math.min(t,e))}let yRt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn]})}}return e})();const xRt=["questionnairesList"];function bRt(e,i){if(1&e&&(J(0,"div",19),ye(1,"mat-progress-bar",20),J(2,"div",21),ut(3),et()()),2&e){const t=St();ot(),vt("value",t.validatingProgress),ot(2),Je("",t.validatingProgress,"%")}}function wRt(e,i){if(1&e){const t=xe();J(0,"button",22),Ut("click",function(){return zt(t),Gt(St().saveQuestionnaire())}),ut(1," Save changes "),et()}if(2&e){const t=St();vt("disabled",t.validating||!t.questionnaire)}}function TRt(e,i){1&e&&(J(0,"span"),ut(1,"Run validation"),et())}function CRt(e,i){1&e&&ye(0,"mat-spinner",26)}function SRt(e,i){if(1&e){const t=xe();J(0,"button",23),Ut("click",function(){return zt(t),Gt(St().validate())}),Ht(1,TRt,2,0,"span",24)(2,CRt,1,0,"mat-spinner",25),et()}if(2&e){const t=St();ot(),vt("ngIf",!t.validating),ot(),vt("ngIf",t.validating)}}function ERt(e,i){if(1&e&&(J(0,"span",32),ut(1),et()),2&e){const t=St(2);ot(),Je("Error: ",t.loadResults.error,"")}}function _Rt(e,i){if(1&e&&(J(0,"span",33),ut(1),et()),2&e){const t=St(2);ot(),Je("Inactive: ",t.loadResults.inactive,"")}}function ARt(e,i){if(1&e&&(J(0,"span",34),ut(1),et()),2&e){const t=St(2);ot(),Je("Active: ",t.loadResults.active,"")}}function DRt(e,i){if(1&e&&(J(0,"p",27)(1,"b"),ut(2,"Questionnaire:"),et(),ut(3),J(4,"i"),ut(5),et(),ut(6,") - "),J(7,"span",28),ut(8),et(),ut(9),vs(10,"date"),Ht(11,ERt,2,1,"span",29)(12,_Rt,2,1,"span",30)(13,ARt,2,1,"span",31),et()),2&e){const t=St();ot(3),Je(" ",t.questionnaire.title," ("),ot(2),Ke(t.questionnaire.url),ot(3),Je("",t.dataSource.data.length," bindings"),ot(),sl(" - - Version: ",t.questionnaire.meta.versionId," (",Pc(10,8,t.questionnaire.meta.lastUpdated,"fullDate"),") "),ot(2),vt("ngIf",t.loadResults.total>0),ot(),vt("ngIf",t.loadResults.total>0),ot(),vt("ngIf",t.loadResults.total>0)}}function MRt(e,i){1&e&&(J(0,"th",35),ut(1," # "),et())}function IRt(e,i){if(1&e&&(J(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.order," ")}}function RRt(e,i){1&e&&(J(0,"th",35),ut(1," FHIRPath "),et())}function PRt(e,i){if(1&e&&(J(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.path," ")}}function kRt(e,i){1&e&&(J(0,"th",35),ut(1," Path "),et())}function FRt(e,i){if(1&e&&(J(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.readablePath," ")}}function ORt(e,i){1&e&&(J(0,"th",35),ut(1,"Code "),et())}function LRt(e,i){if(1&e&&(J(0,"td",36)(1,"a",37),ut(2),et()()),2&e){const t=i.$implicit;ot(),pC("href","http://snomed.info/id/",t.code,"",Ay),ot(),Ke(t.code)}}function NRt(e,i){1&e&&(J(0,"th",35),ut(1," Display "),et())}function BRt(e,i){if(1&e&&(J(0,"p",41),ut(1),et()),2&e){const t=St().$implicit;ot(),Je("Concept FSN: ",t.serverDisplay,"")}}function VRt(e,i){1&e&&(J(0,"p",42),ut(1,"Concept is inactive"),et())}function URt(e,i){if(1&e){const t=xe();J(0,"p",43),ut(1),J(2,"button",44),Ut("click",function(){const r=zt(t).$implicit,s=St().$implicit;return Gt(St().replaceInactiveConcept(s,r.replacement))}),J(3,"mat-icon"),ut(4,"arrow_forward"),et()()()}if(2&e){const t=i.$implicit,n=St(2);ot(),sx(" Replacement: ",t.equivalence," to ",t.replacement.code," |",t.replacement.display,"| "),ot(),vt("disabled",n.validating)}}function zRt(e,i){if(1&e&&(J(0,"td",36),ut(1),Ht(2,BRt,2,1,"p",38)(3,VRt,2,0,"p",39)(4,URt,5,4,"p",40),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.display," "),ot(),vt("ngIf",t.serverDisplay),ot(),vt("ngIf","Inactive"==t.status),ot(),vt("ngForOf",t.replacements)}}function GRt(e,i){1&e&&(J(0,"th",35),ut(1," System "),et())}function HRt(e,i){if(1&e&&(J(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.system," ")}}function WRt(e,i){1&e&&(J(0,"th",35),ut(1," Status "),et())}function jRt(e,i){1&e&&(J(0,"span"),ye(1,"mat-progress-bar",45),et())}function XRt(e,i){if(1&e&&(J(0,"span")(1,"span",46),ut(2),et()()),2&e){const t=St().$implicit;ot(),vt("ngClass",t.status),ot(),Ke(t.status)}}function YRt(e,i){if(1&e&&(J(0,"td",36),Ht(1,jRt,2,0,"span",24)(2,XRt,3,2,"span",24),et()),2&e){const t=i.$implicit;ot(),vt("ngIf","Validating"==t.status),ot(),vt("ngIf","Validating"!=t.status)}}function $Rt(e,i){1&e&&ye(0,"tr",47)}function QRt(e,i){1&e&&ye(0,"tr",48)}function KRt(e,i){1&e&&ye(0,"mat-spinner",49)}let ZRt=(()=>{class e{constructor(t,n){this.terminologyService=t,this._snackBar=n,this.questionnaireUpdated=new Oe,this.validatingQuestionnaire=new Oe,this.loading=!1,this.validating=!1,this.displayedColumns=["order","readablePath","code","display","system","status"],this.dataSource=new wp,this.validatingProgress=0,this.orderCounter=0,this.loadResults={total:0,active:0,inactive:0,error:0},this.requiresSave=!1}ngOnChanges(t){t.questionnaire&&(this.questionnaire?this.loadQuestionnaire(this.questionnaire):this.clearQuestionnaire())}clearQuestionnaire(){this.questionnaire=null,this.dataSource.data=[],this.orderCounter=0,this.validatingProgress=0,this.loadResults={total:0,active:0,inactive:0,error:0}}loadQuestionnaire(t){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=t;let n=this.extractObjects(t);this.dataSource.data=n,this.dataSource.sort=this.sort},700)}validate(){var t=this;this.loadResults={total:0,active:0,inactive:0,error:0},this.dataSource.data.forEach(s=>{s.status="Not checked"}),this.validating=!0,this.validatingQuestionnaire.emit(!0);let n=this.dataSource.data.length,r=0;this.asyncForEach(this.dataSource.data,function(){var s=we(function*(o){t.loadResults.total++,o.status="Validating",r++,t.validatingProgress=Math.round(r/n*100);try{const l=yield t.terminologyService.lookupConcept(o.code,o.system).pipe(ic()).toPromise();let w=[],E="";for(const D of l.parameter){if("designation"===D.name){let k="",O="";for(const L of D.part)"value"===L.name&&(k=L.valueString),"use"===L.name&&(O=L.valueCoding?.code);w.push(k),"900000000000003001"===O&&(E=k)}"inactive"===D.name&&(D.valueBoolean?(o.status="Inactive",t.loadResults.inactive++):(o.status="Active",t.loadResults.active++))}if((!o.display||!w.includes(o.display))&&(o.serverDisplay=E),"Inactive"==o.status){const D=yield t.getHistoricalAssociationsTarget("900000000000527005",o.code),k=yield t.getHistoricalAssociationsTarget("900000000000530003",o.code),O=yield t.getHistoricalAssociationsTarget("900000000000523009",o.code),L=yield t.getHistoricalAssociationsTarget("900000000000526001",o.code),U=D.concat(k,O,L);o.replacements=U}}catch{o.status="Error",t.loadResults.error++}});return function(o){return s.apply(this,arguments)}}()).then(()=>{this.validating=!1,this.validatingQuestionnaire.emit(!1)})}getHistoricalAssociationsTarget(t,n){var r=this;return we(function*(){let s=[];const o=r.terminologyService.translate(t,n);let l=yield Ia(o.pipe(Ri(w=>w)));if(l.parameter)for(const w of l.parameter)if("match"===w.name){let E={replacement:{},equivalence:""};for(const D of w.part)"concept"===D.name&&D.valueCoding&&(E.replacement={code:D.valueCoding.code,display:D.valueCoding.display,system:D.valueCoding.system}),"equivalence"===D.name&&D.valueCode&&(E.equivalence=D.valueCode);s.push(E)}return s})()}removeSemanticTag(t){return t.replace(/\s*\([^)]+\)\s*$/,"").trim().toLowerCase()}asyncForEach(t,n){return we(function*(){for(let r=0;r ${t.text}`:t.text),t.system&&t.system.startsWith("http://snomed.info/sct")&&t.code&&t.display){this.orderCounter++;const o={order:this.orderCounter,system:t.system,code:t.code,display:t.display,path:n,readablePath:r,status:"Not checked"};s.some(l=>l.system===o.system&&l.code===o.code&&l.display===o.display)||s.push(o)}if(Array.isArray(t))for(let o in t)s=s.concat(this.extractObjects(t[o],`${n}[${o}]`,r));else for(let o in t)t.hasOwnProperty(o)&&(s=s.concat(this.extractObjects(t[o],n?`${n}.${o}`:o,r)));if(t.answerValueSet&&t.answerValueSet.startsWith("http")){const l=new URL(t.answerValueSet).searchParams.get("fhir_vs");if(l){const w=decodeURIComponent(l),E=/(\d{5,})(?:\s*\|\s*([^|]*)\s*\|)?/g;let D;for(;null!==(D=E.exec(w));)this.orderCounter++,s.push({order:this.orderCounter,code:D[1],display:D[2]?D[2].trim():void 0,system:"http://snomed.info/sct",path:n+".answerValueSet",readablePath:r+" -> answerValueSet [ECL]",status:"Not checked"})}}return s}replaceInactiveConcept(t,n){this.searchAndReplace(this.questionnaire,t,n,!1)&&(this.requiresSave=!0,this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Inactive reference replaced successfully. Save the questionnaire to persist the changes.",panelClass:["green-snackbar"]}))}saveQuestionnaire(){this.questionnaireUpdated.emit(this.questionnaire)}searchAndReplace(t,n,r,s){if("object"!=typeof t||null===t)return s;if(t.system==n.system&&t.code==n.code&&t.display==n.display&&(t.system=r.system,t.code=r.code,t.display=r.display,s=!0),t.answerValueSet){const o=new URL(t.answerValueSet),l=o.searchParams.get("fhir_vs");if(l){const w=decodeURIComponent(l),E=new RegExp(`(\\s|^)${n.code}(\\s|$|\\|)`,"g");if(E.test(w)){const D=w.replace(E,`$1${r.code}$2`);s=!0;const k=new RegExp(`\\|\\s*${n.display}\\s*\\|`,"g");if(k.test(D)){const O=D.replace(k,`| ${r.display} |`);o.searchParams.set("fhir_vs",encodeURIComponent(O)),t.answerValueSet=o.toString()}o.searchParams.set("fhir_vs",encodeURIComponent(D)),t.answerValueSet=o.toString()}}}if(Array.isArray(t))for(let o in t)s=this.searchAndReplace(t[o],n,r,s);else for(let o in t)t.hasOwnProperty(o)&&(s=this.searchAndReplace(t[o],n,r,s));if(s&&this.dataSource.data)for(let o in this.dataSource.data)this.dataSource.data[o].system==n.system&&this.dataSource.data[o].code==n.code&&this.dataSource.data[o].display==n.display&&(this.dataSource.data[o].system=r.system,this.dataSource.data[o].code=r.code,this.dataSource.data[o].display=r.display,this.dataSource.data[o].status="Active",this.dataSource.data[o].replacements=[]);return s}static{this.\u0275fac=function(n){return new(n||e)(pt(ma),pt(Rd))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-validate-questionnaire"]],viewQuery:function(n,r){if(1&n&&(ki(Gd,5),ki(Ap,5),ki(xRt,5)),2&n){let s;He(s=We())&&(r.sort=s.first),He(s=We())&&(r.tabGroup=s.first),He(s=We())&&(r.questionnairesList=s.first)}},inputs:{questionnaire:"questionnaire"},outputs:{questionnaireUpdated:"questionnaireUpdated",validatingQuestionnaire:"validatingQuestionnaire"},features:[lr],decls:31,vars:8,consts:[[1,"button-container","bottom-spacer"],["class","progress-container",4,"ngIf"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["class","header","id","tab-header",4,"ngIf"],[1,"table-container","mt-4"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","order"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","path"],["matColumnDef","readablePath"],["matColumnDef","code"],["matColumnDef","display"],["matColumnDef","system"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"progress-container"],["mode","determinate",3,"value"],[1,"progress-label"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-flat-button","","color","accent",3,"click"],[4,"ngIf"],["diameter","20",4,"ngIf"],["diameter","20"],["id","tab-header",1,"header"],[1,"bindingsCount"],["class","mini-pill Error",4,"ngIf"],["class","mini-pill Inactive",4,"ngIf"],["class","mini-pill Active",4,"ngIf"],[1,"mini-pill","Error"],[1,"mini-pill","Inactive"],[1,"mini-pill","Active"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["target","_blank",1,"code-link",3,"href"],["class","server-name",4,"ngIf"],["class","concept-is-inactive",4,"ngIf"],["class","replacement",4,"ngFor","ngForOf"],[1,"server-name"],[1,"concept-is-inactive"],[1,"replacement"],["mat-icon-button","","color","primary","matTooltip","Replace using this concept",3,"click","disabled"],["mode","indeterminate"],[1,"pill",3,"ngClass"],["mat-header-row",""],["mat-row",""],["diameter","35",1,"loading-spinner"]],template:function(n,r){1&n&&(J(0,"div",0),Ht(1,bRt,4,2,"div",1)(2,wRt,2,1,"button",2)(3,SRt,3,2,"button",3),et(),Ht(4,DRt,14,11,"p",4),J(5,"div",5)(6,"table",6),Qi(7,7),Ht(8,MRt,2,0,"th",8)(9,IRt,2,1,"td",9),Ki(),Qi(10,10),Ht(11,RRt,2,0,"th",8)(12,PRt,2,1,"td",9),Ki(),Qi(13,11),Ht(14,kRt,2,0,"th",8)(15,FRt,2,1,"td",9),Ki(),Qi(16,12),Ht(17,ORt,2,0,"th",8)(18,LRt,3,3,"td",9),Ki(),Qi(19,13),Ht(20,NRt,2,0,"th",8)(21,zRt,5,4,"td",9),Ki(),Qi(22,14),Ht(23,GRt,2,0,"th",8)(24,HRt,2,1,"td",9),Ki(),Qi(25,15),Ht(26,WRt,2,0,"th",8)(27,YRt,3,2,"td",9),Ki(),Ht(28,$Rt,1,0,"tr",16)(29,QRt,1,0,"tr",17),et(),Ht(30,KRt,1,0,"mat-spinner",18),et()),2&n&&(ot(),vt("ngIf",r.validating),ot(),vt("ngIf",r.requiresSave),ot(),vt("ngIf",!r.validating&&r.questionnaire),ot(),vt("ngIf",r.questionnaire),ot(2),vt("dataSource",r.dataSource),ot(22),vt("matHeaderRowDef",r.displayedColumns),ot(),vt("matRowDefColumns",r.displayedColumns),ot(),vt("ngIf",r.loading))},dependencies:[Td,ys,ls,Cs,jo,ga,rF,Pd,kd,wh,Fd,Th,bh,Od,Ch,Sh,Ld,Nd,_h,Gd,tF,sh],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem;padding-bottom:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}"]})}}return e})();const JRt=e=>["status-pill",e],qRt=()=>["status-pill","active"],tPt=()=>["status-pill","draft"];function ePt(e,i){1&e&&(J(0,"th",15),ut(1," Title "),et())}function iPt(e,i){if(1&e&&(J(0,"td",16),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.title," ")}}function nPt(e,i){1&e&&(J(0,"th",15),ut(1," Status "),et())}function rPt(e,i){if(1&e&&(J(0,"td",16)(1,"span",17),ut(2),vs(3,"uppercase"),et()()),2&e){const t=i.$implicit;ot(),vt("ngClass",Al(4,JRt,t.status)),ot(),Ke(Jl(3,2,t.status))}}function sPt(e,i){1&e&&(J(0,"th",15),ut(1," Version "),et())}function aPt(e,i){if(1&e&&(J(0,"td",16),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.meta.versionId," ")}}function oPt(e,i){1&e&&(J(0,"th",15),ut(1," Date "),et())}function lPt(e,i){if(1&e&&(J(0,"td",16)(1,"i"),ut(2),vs(3,"date"),et()()),2&e){const t=i.$implicit;ot(2),Ke(Pc(3,1,t.meta.lastUpdated,"MMMM d, y, h:mm:ss a"))}}function cPt(e,i){1&e&&(J(0,"th",15),ut(1," Type "),et())}function uPt(e,i){1&e&&(J(0,"span",17),ut(1,"QUESTIONNAIRE"),et()),2&e&&vt("ngClass",Xa(1,qRt))}function hPt(e,i){1&e&&(J(0,"span",17),ut(1,"MODULAR ROOT"),et()),2&e&&vt("ngClass",Xa(1,tPt))}function dPt(e,i){if(1&e&&(J(0,"td",16),Ht(1,uPt,2,2,"span",18)(2,hPt,2,2,"span",18),et()),2&e){const t=i.$implicit,n=St();ot(),vt("ngIf",!n.isRootQuestionnaire(t)),ot(),vt("ngIf",n.isRootQuestionnaire(t))}}function fPt(e,i){1&e&&(J(0,"th",19),ut(1," Actions "),et())}function pPt(e,i){if(1&e){const t=xe();J(0,"button",24),Ut("click",function(){zt(t);const r=St().$implicit;return Gt(St().restore(r))}),J(1,"mat-icon"),ut(2,"restore_page"),et()()}}function mPt(e,i){if(1&e){const t=xe();J(0,"td",16)(1,"button",20),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().preview(r))}),J(2,"mat-icon"),ut(3,"visibility"),et()(),J(4,"button",21),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().openInNewTab(r))}),J(5,"mat-icon"),ut(6,"open_in_new"),et()(),J(7,"button",22),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().saveQuestionnaire(r))}),J(8,"mat-icon"),ut(9,"cloud_download"),et()(),Ht(10,pPt,3,0,"button",23),et()}if(2&e){const t=i.$implicit,n=St();ot(10),vt("ngIf",(null==t||null==t.meta?null:t.meta.versionId)!=(null==n.versions[0]||null==n.versions[0].meta?null:n.versions[0].meta.versionId))}}function gPt(e,i){1&e&&ye(0,"tr",25)}function vPt(e,i){1&e&&ye(0,"tr",26)}function yPt(e,i){1&e&&(J(0,"p",27)(1,"i"),ut(2," No questionnaire selected. "),et()())}function xPt(e,i){1&e&&ye(0,"mat-spinner",28)}let bPt=(()=>{class e{constructor(t){this.fhirService=t,this.previewQuestionnaire=new Oe,this.restoreQuestionnaireVersion=new Oe,this.versions=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new wp}ngOnChanges(t){t.questionnaire&&t.questionnaire.currentValue&&t.questionnaire.currentValue.id&&this.loadVersions()}ngOnInit(){oh([this.fhirService.baseUrl$.pipe(vu(1e3),mp()),this.fhirService.userTag$.pipe(vu(1e3),mp())]).subscribe(([t,n])=>{(this.selectedFhirServer!==t||this.selectedUserTag!==n)&&(this.selectedFhirServer=t,this.selectedUserTag=n,this.selectedUserTag&&this.selectedFhirServer&&this.loadVersions())})}loadVersions(t){this.versions=[],this.dataSource.data=this.versions,t&&(this.questionnaire=t),this.questionnaire&&(this.loading=!0,this.fhirService.getQuestionnaireHistory(this.questionnaire.id).subscribe(n=>{this.versions=n.entry.map(r=>r.resource),this.dataSource.data=this.versions,this.loading=!1},n=>{this.loading=!1}))}preview(t){this.previewQuestionnaire.emit(t),this.loadVersions()}openInNewTab(t){window.open(this.selectedFhirServer+"/Questionnaire/"+t.id+"/_history/"+t.meta.versionId,"_blank")}saveQuestionnaire(t){var n=new Blob([JSON.stringify(t,null,2)],{type:"text/plain;charset=utf-8"});Tu(n,`${t.title}-v${t.meta.versionId}.json`)}restore(t){this.restoreQuestionnaireVersion.emit(t)}isRootQuestionnaire(t){return!(!t.extension||!Array.isArray(t.extension))&&t.extension.some(n=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===n.url&&"assemble-root"===n.valueCode)}static{this.\u0275fac=function(n){return new(n||e)(pt(Rv))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-questionnaire-history"]],inputs:{questionnaire:"questionnaire"},outputs:{previewQuestionnaire:"previewQuestionnaire",restoreQuestionnaireVersion:"restoreQuestionnaireVersion"},features:[lr],decls:24,vars:5,consts:[[1,"table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],[3,"ngClass",4,"ngIf"],["mat-header-cell",""],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Restore Version",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Restore Version",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"]],template:function(n,r){1&n&&(J(0,"div",0)(1,"table",1),Qi(2,2),Ht(3,ePt,2,0,"th",3)(4,iPt,2,1,"td",4),Ki(),Qi(5,5),Ht(6,nPt,2,0,"th",3)(7,rPt,4,6,"td",4),Ki(),Qi(8,6),Ht(9,sPt,2,0,"th",3)(10,aPt,2,1,"td",4),Ki(),Qi(11,7),Ht(12,oPt,2,0,"th",3)(13,lPt,4,4,"td",4),Ki(),Qi(14,8),Ht(15,cPt,2,0,"th",3)(16,dPt,3,2,"td",4),Ki(),Qi(17,9),Ht(18,fPt,2,0,"th",10)(19,mPt,11,1,"td",4),Ki(),Ht(20,gPt,1,0,"tr",11)(21,vPt,1,0,"tr",12),et(),Ht(22,yPt,3,0,"p",13)(23,xPt,1,0,"mat-spinner",14),et()),2&n&&(ot(),vt("dataSource",r.dataSource),ot(19),vt("matHeaderRowDef",r.displayedColumns),ot(),vt("matRowDefColumns",r.displayedColumns),ot(),vt("ngIf",!r.questionnaire),ot(),vt("ngIf",r.loading))},dependencies:[Td,ls,jo,ga,Pd,kd,wh,Fd,Th,bh,Od,Ch,Sh,Ld,Nd,_h,Gd,tF,mR,sh],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px}.table-container[_ngcontent-%COMP%]{margin:2rem;padding-bottom:2rem}"]})}}return e})();const wPt=["questionnairesList"],TPt=["fileInput"],CPt=["questionnaireHistory"];function SPt(e,i){1&e&&(J(0,"span"),ut(1," / Validator"),et())}function EPt(e,i){1&e&&(J(0,"span"),ut(1," / Questionnaires repository"),et())}function _Pt(e,i){if(1&e){const t=xe();J(0,"span",19)(1,"a",20),Ut("click",function(){return zt(t),Gt(St(3).mode="Manager")}),J(2,"mat-icon"),ut(3,"play_arrow"),et(),J(4,"span"),ut(5,"Reconnect to last FHIR Server"),et()()()}}function APt(e,i){if(1&e&&(J(0,"span",19)(1,"span",21),ut(2),J(3,"i"),ut(4),et(),ut(5,'" )'),et()()),2&e){const t=St(3);ot(2),Je(" ( ",t.selectedFhirServer,' as "'),ot(2),Ke(t.selectedUserTag)}}function DPt(e,i){if(1&e){const t=xe();J(0,"div",14)(1,"h3",15),ut(2,"Work with the Questionnaire Manager"),et(),J(3,"p",15),ut(4,"Connect to a FHIR server to store and version your questionnaire resources. Use the integrated questionnaire manager, editor and validator."),et(),J(5,"div",16)(6,"button",17),Ut("click",function(){zt(t);const r=St(2);return r.step1Response="repository",Gt(r.advanceFromStep1())}),ut(7,"Connect to a FHIR Server and Open Repository Manager"),et(),Ht(8,_Pt,6,0,"span",18)(9,APt,6,2,"span",18),et()()}if(2&e){const t=St(2);ot(8),vt("ngIf",t.selectedFhirServer&&t.selectedUserTag),ot(),vt("ngIf",t.selectedFhirServer&&t.selectedUserTag)}}function MPt(e,i){if(1&e){const t=xe();J(0,"div",22)(1,"h3",15),ut(2,"Work with a single questionnaire"),et(),J(3,"p",15),ut(4,"Create, preview or validate a questionnaire you upload from your computer."),et(),J(5,"div",23)(6,"button",17),Ut("click",function(){zt(t);const r=St(2);return r.step1Response="edit",Gt(r.advanceFromStep1())}),ut(7,"Open NLM Form Builder"),et(),J(8,"button",17),Ut("click",function(){zt(t);const r=St(2);return r.step1Response="example",Gt(r.advanceFromStep1())}),ut(9,"Load an example questionnaire"),et(),J(10,"button",17),Ut("click",function(){zt(t);const r=St(2);return r.step1Response="validate",Gt(r.advanceFromStep1())}),ut(11,"Upload and validate a questionnaire"),et()()()}}function IPt(e,i){if(1&e&&(J(0,"div",10)(1,"div",11),Ht(2,DPt,10,2,"div",12)(3,MPt,12,0,"div",13),et()()),2&e){const t=St();ot(2),vt("ngIf","step1"==t.mode),ot(),vt("ngIf","utility"==t.mode)}}function RPt(e,i){if(1&e&&(J(0,"span"),ut(1," Connected to "),J(2,"a",37),ut(3),et(),ut(4,' as "'),J(5,"i"),ut(6),et(),ut(7,'" '),et()),2&e){const t=St(2);ot(2),vt("href",t.selectedFhirServer,Ay),ot(),Ke(t.selectedFhirServer),ot(3),Ke(t.selectedUserTag)}}function PPt(e,i){if(1&e){const t=xe();J(0,"button",26),Ut("click",function(){return zt(t),Gt(St(2).createQuestionnaire())}),ut(1," Create Questionnaire "),et()}2&e&&vt("disabled",St(2).validating)}function kPt(e,i){if(1&e){const t=xe();J(0,"button",26),Ut("click",function(){return zt(t),Gt(St(2).openModularQuestionnaireModal())}),ut(1," Create Modular Questionnaire "),et()}2&e&&vt("disabled",St(2).validating)}function FPt(e,i){if(1&e){const t=xe();J(0,"mat-tab",38)(1,"div",31)(2,"app-list-questionnaires",39,3),Ut("validateQuestionnaire",function(r){return zt(t),Gt(St(2).switchToValidateTab(r))})("previewQuestionnaire",function(r){return zt(t),Gt(St(2).switchToPreviewTab(r))})("viewQuestionaireHistory",function(r){return zt(t),Gt(St(2).switchToHistoryTab(r))}),et()()()}if(2&e){const t=St(2);ot(2),vt("config",t.listConfig)}}function OPt(e,i){if(1&e&&(J(0,"h4"),ut(1),vs(2,"date"),et()),2&e){const t=St(2);ot(),sx("",t.questionnaire.title," - Version: ",t.questionnaire.meta.versionId," (",Pc(2,3,t.questionnaire.meta.lastUpdated,"fullDate"),")")}}function LPt(e,i){if(1&e){const t=xe();J(0,"div")(1,"div",24),Ht(2,RPt,8,3,"span",8),J(3,"input",25,0),Ut("change",function(r){return zt(t),Gt(St().onFileSelected(r))}),et(),J(5,"button",26),Ut("click",function(){return zt(t),Gt(Zi(4).click())}),ut(6," Upload "),et(),J(7,"button",26),Ut("click",function(){return zt(t),Gt(St().saveQuestionnaireToDisk())}),ut(8,"Download"),et(),Ht(9,PPt,2,1,"button",27)(10,kPt,2,1,"button",27),et(),J(11,"mat-tab-group",28),Ut("selectedIndexChange",function(r){return zt(t),Gt(St().onTabChange(r))}),Ht(12,FPt,4,1,"mat-tab",29),J(13,"mat-tab",30)(14,"div",31),Ht(15,OPt,3,6,"h4",8),ye(16,"div",32),et()(),J(17,"mat-tab",33)(18,"app-validate-questionnaire",34,1),Ut("questionnaireUpdated",function(r){return zt(t),Gt(St().saveQuestionnaire(r))})("validatingQuestionnaire",function(r){return zt(t),Gt(St().validating=r)}),et()(),J(20,"mat-tab",35)(21,"app-questionnaire-history",36,2),Ut("previewQuestionnaire",function(r){return zt(t),Gt(St().switchToPreviewTab(r))})("restoreQuestionnaireVersion",function(r){return zt(t),Gt(St().saveQuestionnaire(r))}),et()()()()}if(2&e){const t=St();ot(2),vt("ngIf","Manager"==t.mode),ot(3),vt("disabled",t.validating),ot(2),vt("disabled",t.validating||!t.questionnaire),ot(2),vt("ngIf","Manager"==t.mode),ot(),vt("ngIf","Manager"==t.mode),ot(2),vt("ngIf","Manager"===t.mode),ot(3),vt("ngIf",t.questionnaire),ot(),Ci("hidden",!t.questionnaire),ot(2),vt("questionnaire",t.questionnaire),ot(3),vt("questionnaire",t.questionnaire)}}let NPt=(()=>{class e{constructor(t,n,r,s,o,l,w){this.http=t,this.terminologyService=n,this.fhirService=r,this.questionnaireService=s,this.activatedRoute=o,this.dialog=l,this._snackBar=w,this.loading=!1,this.validating=!1,this.orderCounter=0,this.savingQuestionnaire=!1,this.selectedFhirServer="",this.selectedUserTag="",this.showFhirSetupModal=!1,this.listConfig={validate:!0,preview:!0},this.mode="step1"}ngOnInit(){this.fhirService.baseUrl$.subscribe(t=>{this.selectedFhirServer=t}),this.fhirService.userTag$.subscribe(t=>{this.selectedUserTag=t}),this.activatedRoute.queryParams.subscribe(t=>{this.mode="true"===t.utility?"utility":"step1"}),this.loadScript()}loadScript(){const t=document.createElement("script");t.src="https://clinicaltables.nlm.nih.gov/lforms-versions/36.3.2/webcomponent/lhc-forms.js",t.onload=()=>{const n=document.createElement("script");n.src="https://clinicaltables.nlm.nih.gov/lforms-versions/36.3.2/fhir/R4/lformsFHIR.min.js",n.onload=()=>{},document.head.appendChild(n)},document.head.appendChild(t)}toggleMode(){"Validator"===this.mode?this.dialog.open(iF,{width:"60%",disableClose:!0}).afterClosed().subscribe(n=>{"save"===n&&(this.mode="Manager",setTimeout(()=>{this.tabGroup.selectedIndex=0},500))}):this.mode="Validator"}previewForm(){"Preview"==this.getCurrentTabName()&&(this.questionnaire?LForms.Util.addFormToPage(this.questionnaire,"myFormContainer"):LForms.Util.addFormToPage({},"myFormContainer"))}getFormData(){this.questionnaire&&LForms.Util.getFormData("myFormContainer",!0,!0,!0)}displayHistory(t){t&&this.questionnaireHistory.loadVersions(t)}loadExampleQuestionnaire(){Ia(this.http.get("assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json")).then(t=>{this.loadQuestionnaire(t),"Manager"===this.mode&&(this.tabGroup.selectedIndex=1)})}clearQuestionnaire(){this.questionnaire=null,this.orderCounter=0,this.previewForm()}createQuestionnaire(){this.questionnairesList.createQuestionnaire()}loadQuestionnaire(t){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=t,this.previewForm()},700)}saveQuestionnaireToDisk(){var t=new Blob([JSON.stringify(this.questionnaire,null,2)],{type:"text/plain;charset=utf-8"});Tu(t,`${this.questionnaire.title}.json`)}onFileSelected(t){const n=t.target.files?.[0];if(n){const r=new FileReader;r.onload=s=>{try{const o=JSON.parse(s.target?.result);"Questionnaire"===o.resourceType?(this.loadQuestionnaire(o),setTimeout(()=>{"Manager"===this.mode?this.postCurrentQuestionnaire():this.tabGroup.selectedIndex=1},1e3)):this._snackBar.openFromComponent(Rr,{duration:5e3,data:"The file is not a FHIR Questionnaire Resource",panelClass:["red-snackbar"]})}catch(o){console.error(o),this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Invalid JSON file",panelClass:["red-snackbar"]})}},r.readAsText(n),t.target.value=""}}postCurrentQuestionnaire(){this.postQuestionnaire(this.questionnaire)}postQuestionnaire(t){if(-1!==this.questionnairesList.questionnaires.findIndex(r=>r.title===t.title&&r.id!==t.id))this.dialog.open(nF,{width:"400px",data:{title:"Confirm Action",message:"A questionnaire with the same title and different ID already exists. Do you want to proceed?"}}).afterClosed().subscribe(s=>{s?this.saveQuestionnaire(t):this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]})});else{-1!==this.questionnairesList.questionnaires.findIndex(o=>o.title===t.title&&o.id===t.id&&o.meta?.versionId>=t.meta?.versionId)?this.dialog.open(nF,{width:"400px",data:{title:"Confirm Action",message:"A newer version or identical of this questionnaire already exists. Do you want to proceed?"}}).afterClosed().subscribe(l=>{l?this.saveQuestionnaire(t):this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]})}):this.saveQuestionnaire(t)}}saveQuestionnaire(t){t?(this.savingQuestionnaire=!0,this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Saving Questionnaire...",panelClass:["green-snackbar"]}),t.meta||(t.meta={}),t.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.fhirService.updateOrCreateQuestionnaire(t,this.selectedUserTag).pipe(ic()).subscribe(n=>{setTimeout(()=>{this.tabGroup.selectedIndex=0,setTimeout(()=>{this.savingQuestionnaire=!1,this.questionnairesList.addQuestionnaire(n)},300)},300),this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Questionnaire saved successfully",panelClass:["green-snackbar"]})},n=>{this.savingQuestionnaire=!1,this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]}),this.dialog.open(nF,{width:"400px",data:{title:"Save error",message:"This could be an ID conflict. Post again as a new questionnaire?"}}).afterClosed().subscribe(s=>{s?(delete t.id,this.saveQuestionnaire(t)):this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Questionnaire not saved",panelClass:["red-snackbar"]})})})):this._snackBar.openFromComponent(Rr,{duration:5e3,data:"No questionnaire to save",panelClass:["red-snackbar"]})}listQuestionnaires(){this.fhirService.getQuestionnairesByTag(this.selectedUserTag).pipe(ic()).subscribe(t=>{},t=>{console.error(t)})}openLoadQuestionnairesDialog(){this.dialog.open(hRt,{width:"70%"}).afterClosed().subscribe(n=>{this.loadQuestionnaire(n)})}setFhirServer(){this.fhirService.setBaseUrl(this.selectedFhirServer),this.fhirService.setUserTag(this.selectedUserTag)}setupFhirServer(){this.dialog.open(iF,{width:"60%"})}switchToValidateTab(t){this.loadQuestionnaire(t),this.tabGroup.selectedIndex=2}switchToPreviewTab(t){this.loadQuestionnaire(t),this.tabGroup.selectedIndex=1}switchToHistoryTab(t){this.displayHistory(t),this.tabGroup.selectedIndex=3}advanceFromStep1(){"edit"==this.step1Response?window.open("https://lhcformbuilder.nlm.nih.gov/","_blank"):"validate"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.uploadInput.nativeElement.click()},200)):"repository"==this.step1Response?this.dialog.open(iF,{width:"60%"}).afterClosed().subscribe(n=>{n&&(this.mode="Manager")}):"example"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.loadExampleQuestionnaire()},300)):"reconnect"==this.step1Response&&(this.mode="Manager"),this.step1Response=""}getCurrentTabName(){const t=this.tabGroup.selectedIndex;return null!=t?this.tabGroup._tabs.toArray()[t].textLabel:""}onTabChange(t){"Preview"===this.tabGroup._tabs.toArray()[t].textLabel&&setTimeout(()=>{this.previewForm()},300)}openModularQuestionnaireModal(){this.dialog.open(jY,{width:"75%"}).afterClosed().subscribe(n=>{n&&this.questionnaireService.generateRootQuestionnaire(n.title,n.questionnaires).then(r=>{this.postQuestionnaire(r)}).catch(r=>{console.error("Error:",r)})})}static{this.\u0275fac=function(n){return new(n||e)(pt(Il),pt(ma),pt(Rv),pt(XY),pt(nc),pt(Dp),pt(Rd))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-questionnaires-main"]],viewQuery:function(n,r){if(1&n&&(ki(Gd,5),ki(Ap,5),ki(wPt,5),ki(TPt,5),ki(CPt,5)),2&n){let s;He(s=We())&&(r.sort=s.first),He(s=We())&&(r.tabGroup=s.first),He(s=We())&&(r.questionnairesList=s.first),He(s=We())&&(r.uploadInput=s.first),He(s=We())&&(r.questionnaireHistory=s.first)}},decls:11,vars:4,consts:[["fileInput",""],["validateQuestionnaire",""],["questionnaireHistory",""],["questionnairesList",""],[1,"header-container"],[1,"header"],[1,"breadcrumb"],["href","javascript:void(0)",3,"click"],[4,"ngIf"],["id","step1",4,"ngIf"],["id","step1"],[1,"flex","justify-between","pr-4"],["class","w-full border-2 border-blue-200 bg-transparent rounded-lg p-4 m-2 min-h-[500px]",4,"ngIf"],["class","w-full border-2 border-blue-200 bg-transparent rounded-lg p-4 m-2 min-h-[500px] justify-center",4,"ngIf"],[1,"w-full","border-2","border-blue-200","bg-transparent","rounded-lg","p-4","m-2","min-h-[500px]"],[1,"text-center"],[1,"flex","justify-center","flex-col","gap-1","mt-10"],["mat-flat-button","","color","accent",1,"mx-auto","w-auto","flex-none",3,"click"],["class","mx-auto w-auto flex-none",4,"ngIf"],[1,"mx-auto","w-auto","flex-none"],["href","javascript:void(0)","id","reconnect-link",3,"click"],[1,"muted"],[1,"w-full","border-2","border-blue-200","bg-transparent","rounded-lg","p-4","m-2","min-h-[500px]","justify-center"],[1,"flex","justify-center","flex-col","gap-5","mt-10"],[1,"button-container","bottom-spacer"],["type","file","hidden","",3,"change"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-stretch-tabs","false","mat-align-tabs","start",3,"selectedIndexChange"],["label","My Questionnaires",4,"ngIf"],["label","Preview"],[1,"tab-container"],["id","myFormContainer"],["label","Validate SNOMED Bindings"],[3,"questionnaireUpdated","validatingQuestionnaire","questionnaire"],["label","History"],[3,"previewQuestionnaire","restoreQuestionnaireVersion","questionnaire"],["target","_blank",3,"href"],["label","My Questionnaires"],[3,"validateQuestionnaire","previewQuestionnaire","viewQuestionaireHistory","config"]],template:function(n,r){1&n&&(J(0,"div",4)(1,"h2",5),ut(2," SNOMED CT Terminology Bindings Validator - FHIR Questionnaire Manager "),et(),J(3,"div",6)(4,"span")(5,"a",7),Ut("click",function(){return r.mode="step1"}),ut(6,"Home"),et(),Ht(7,SPt,2,0,"span",8)(8,EPt,2,0,"span",8),et()()(),Ht(9,IPt,4,2,"div",9)(10,LPt,23,11,"div",8)),2&n&&(ot(7),vt("ngIf","Validator"==r.mode),ot(),vt("ngIf","Manager"==r.mode),ot(),vt("ngIf","step1"==r.mode||"utility"==r.mode),ot(),vt("ngIf","Manager"==r.mode||"Validator"==r.mode))},dependencies:[ls,Cs,ga,_v,Ap,YY,ZRt,bPt,sh],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding-top:1rem;padding-left:2rem;padding-right:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}#step1[_ngcontent-%COMP%]{margin-top:2rem;margin-left:2rem;font-size:large}#step1[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{margin-left:2rem;display:flex;flex-direction:column;align-items:flex-start}.step-button-container[_ngcontent-%COMP%]{margin-left:30rem;margin-top:2rem}.breadcrumb[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:2rem}.header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hidden[_ngcontent-%COMP%]{visibility:hidden}.muted[_ngcontent-%COMP%]{color:#8f9397}#reconnect[_ngcontent-%COMP%]{margin-left:5rem}#reconnect-link[_ngcontent-%COMP%]{display:flex;vertical-align:middle;flex-direction:row}"]})}}return e})();const BPt=e=>({"bg-pink":e});function VPt(e,i){if(1&e&&(J(0,"p",18),ut(1),et()),2&e){const t=St();ot(),Ke(t.studentSubsetDefinition)}}function UPt(e,i){1&e&&ye(0,"mat-spinner",19)}function zPt(e,i){if(1&e&&(J(0,"p",23),ut(1),et()),2&e){const t=St(2);ot(),Ke(t.definitionVsMembersValidationResult)}}function GPt(e,i){if(1&e&&(J(0,"p",23),ut(1),et()),2&e){const t=St(2);ot(),Ke(t.keyConceptValidationResult)}}function HPt(e,i){if(1&e&&(J(0,"div",20)(1,"h3",21),ut(2,"Validation Results"),et(),Ht(3,zPt,2,1,"p",22)(4,GPt,2,1,"p",22),J(5,"p",23),ut(6),et(),J(7,"p",23),ut(8),et()()),2&e){const t=St();ot(3),vt("ngIf",t.selectedAssignment.referenceDefinition),ot(),vt("ngIf",t.selectedAssignment.referenceDefinition),ot(2),Ke(t.membersNotInRefrenceListResult),ot(2),Ke(t.refrenceListVsStudentListResult)}}function WPt(e,i){1&e&&(J(0,"th",33),ut(1,"ID"),et())}function jPt(e,i){if(1&e&&(J(0,"td",34),ut(1),et()),2&e){const t=i.$implicit;ot(),Ke(t.referencedComponentId)}}function XPt(e,i){1&e&&(J(0,"th",33),ut(1,"Name"),et())}function YPt(e,i){if(1&e&&(J(0,"td",34),ut(1),et()),2&e){const t=i.$implicit;ot(),Ke(t.name)}}function $Pt(e,i){1&e&&(J(0,"th",33),ut(1,"Result"),et())}function QPt(e,i){1&e&&(J(0,"span"),ut(1,"OK"),et())}function KPt(e,i){if(1&e&&(J(0,"span"),ut(1),et()),2&e){const t=St(2).$implicit;ot(),Je(" ",t.customMessage.note," ")}}function ZPt(e,i){1&e&&(J(0,"span"),ut(1," Error "),et())}function JPt(e,i){if(1&e&&(J(0,"span"),Ht(1,QPt,2,0,"span",16)(2,KPt,2,1,"span",16)(3,ZPt,2,0,"span",16),et()),2&e){const t=St().$implicit;ot(),vt("ngIf",null==t||null==t.inReferenceList?null:t.inReferenceList.value),ot(),vt("ngIf",!(null!=t&&null!=t.inReferenceList&&t.inReferenceList.value)&&(null==t||null==t.customMessage?null:t.customMessage.value)),ot(),vt("ngIf",!(null!=t&&null!=t.inReferenceList&&t.inReferenceList.value||null!=t&&null!=t.customMessage&&t.customMessage.value))}}function qPt(e,i){if(1&e&&(J(0,"td",34),Ht(1,JPt,4,3,"span",16),et()),2&e){const t=St(2);ot(),vt("ngIf",t.membersValidationResult)}}function tkt(e,i){1&e&&ye(0,"tr",35)}function ekt(e,i){if(1&e&&ye(0,"tr",36),2&e){const t=i.$implicit,n=St(2);vt("ngClass",Al(1,BPt,!(null!=t.inReferenceList&&t.inReferenceList.value)&&n.membersValidationResult))}}function ikt(e,i){if(1&e&&(J(0,"div",24)(1,"table",25),Qi(2,26),Ht(3,WPt,2,0,"th",27)(4,jPt,2,1,"td",28),Ki(),Qi(5,29),Ht(6,XPt,2,0,"th",27)(7,YPt,2,1,"td",28),Ki(),Qi(8,30),Ht(9,$Pt,2,0,"th",27)(10,qPt,2,1,"td",28),Ki(),Ht(11,tkt,1,0,"tr",31)(12,ekt,1,3,"tr",32),et()()),2&e){const t=St();ot(),vt("dataSource",t.studentSubsetMembersDataSource),ot(10),vt("matHeaderRowDef",t.studentSubsetMembersDisplayedColumns),ot(),vt("matRowDefColumns",t.studentSubsetMembersDisplayedColumns)}}function nkt(e,i){if(1&e){const t=xe();J(0,"button",40),Ut("click",function(){const r=zt(t).$implicit;return Gt(St(2).setAssignment(r))}),ut(1),et()}if(2&e){const t=i.$implicit;ot(),Ke(t.name)}}function rkt(e,i){if(1&e&&(J(0,"div")(1,"h3"),ut(2,"Assignment"),et(),J(3,"button",37),ut(4),et(),J(5,"mat-menu",38,2),Ht(7,nkt,2,1,"button",39),et()()),2&e){const t=Zi(6),n=St();ot(3),vt("matMenuTriggerFor",t),ot(),Je("Selected assignment: ",null==n.selectedAssignment?null:n.selectedAssignment.name,""),ot(3),vt("ngForOf",n.assignments)}}function skt(e,i){if(1&e&&(J(0,"h3"),ut(1),et()),2&e){const t=St();ot(),Je(" Assignment: ",null==t.selectedAssignment?null:t.selectedAssignment.name," ")}}function akt(e,i){1&e&&(J(0,"ol")(1,"li"),ut(2,"1- Upload definition file"),et(),J(3,"li"),ut(4,"2- Upload members file"),et(),J(5,"li"),ut(6,"3- Click validate"),et()())}function okt(e,i){1&e&&(J(0,"ol")(1,"li"),ut(2,"1- Upload members file"),et(),J(3,"li"),ut(4,"2- Click validate"),et()())}function lkt(e,i){if(1&e){const t=xe();J(0,"div")(1,"div")(2,"h3"),ut(3,"Reference Data"),et(),J(4,"mat-form-field",41)(5,"mat-label"),ut(6,"Textarea"),et(),J(7,"textarea",42),Aa("ngModelChange",function(r){zt(t);const s=St();return ja(s.assignmentsString,r)||(s.assignmentsString=r),Gt(r)}),et()(),J(8,"button",11),Ut("click",function(){return zt(t),Gt(St().updateAssignments())}),ut(9,"Update Assignments"),et()()()}if(2&e){const t=St();ot(7),_a("ngModel",t.assignmentsString)}}let ckt=(()=>{class e{constructor(t,n,r,s){this.http=t,this.terminologyService=n,this._snackBar=r,this.activatedRoute=s,this.studentSubsetMembersDisplayedColumns=["referencedComponentId","name","result"],this.studentSubsetMembersDataSource=new wp,this.studentSubsetmembers=[],this.studentSubsetDefinition="",this.keyConceptValidationResult="",this.definitionVsMembersValidationResult="",this.membersNotInRefrenceListResult="",this.membersValidationResult=!1,this.refrenceListVsStudentListResult="",this.embeddedMode=!1,this.loading=!1,this.ok="\u2705",this.error="\u{1f7e5}",this.assignments=[{name:"Assignment X",referenceData:[{referencedComponentId:"403197009",name:"Sun-induced wrinkles"},{referencedComponentId:"279002006",name:"Lichenification of skin"},{referencedComponentId:"274672009",name:"Changes in skin texture"},{referencedComponentId:"271767006",name:"Peeling of skin"},{referencedComponentId:"271761007",name:"Scaly skin"},{referencedComponentId:"247434009",name:"Wrinkled skin"}],referenceDefinition:"< 185823004 |Finding of skin texture (finding)|",keyConceptsInECL:[{code:"185823004",display:"Finding of skin texture (finding)"}],customMessages:[{conceptId:"85345005",note:"wrong hierarchy",principle:"wrong hierarchy"},{conceptId:"403197009",note:"wrong hierarchy",principle:"wrong hierarchy"}]}],this.assignmentsString=JSON.stringify(this.assignments),this.selectedAssignment=this.assignments[0],this.referenceDataDisplayedColumns=["referencedComponentId","name"],this.referenceDataDataSource=new wp(this.selectedAssignment.referenceData)}ngOnInit(){var t=this;return we(function*(){const n=yield Ia(t.http.get("assets/definitions/assignments.json"));t.assignments=n,t.assignmentsString=JSON.stringify(t.assignments),t.setAssignment(t.assignments[0]),t.activatedRoute.queryParams.subscribe(r=>{r.assignment&&t.setAssignment(t.assignments.find(s=>s.name===r.assignment)),t.embeddedMode="true"===r.embedded})})()}setAssignment(t){t&&(this.selectedAssignment=t,this.referenceDataDataSource=new wp(this.selectedAssignment.referenceData))}checkStudentECLvsStudentList(){var t=this;return we(function*(){if(!t.studentSubsetDefinition){let r=yield t.terminologyService.expandValueSet(t.studentSubsetDefinition,"").toPromise(),o=0;t.studentSubsetmembers.forEach(l=>{r.expansion.contains.find(E=>E.code===l.referencedComponentId)?l.inStudentECL={value:!0,message:""}:(l.inStudentECL={value:!1,message:""},o++)})}return 0})()}checkStudentECLvsKeyConcept(){if(this.studentSubsetDefinition){console.log("Student ECL not defined");let t=this.studentSubsetDefinition,r=!0;return this.selectedAssignment.keyConceptsInECL.forEach(s=>{t.includes(s.code)||(r=!1)}),r}return!0}checkStudentListVsReferenceList(){let n=this.selectedAssignment.referenceData;this.studentSubsetmembers.forEach(s=>{s.inReferenceList=n.find(l=>l.referencedComponentId===s.referencedComponentId)?{value:!0,message:""}:{value:!1,message:""}})}checkReferenceListVsStudentList(){let t=this.studentSubsetmembers,r=0;return this.selectedAssignment.referenceData.forEach(s=>{t.find(l=>l.referencedComponentId===s.referencedComponentId)?s.inStudentList={value:!0,message:""}:(s.inStudentList={value:!1,message:""},r++)}),r}checkStudentListVsCustomMessages(){let n=this.selectedAssignment.customMessages;this.studentSubsetmembers.forEach(r=>{const s=n.find(o=>o.conceptId===r.referencedComponentId);r.customMessage=s?{value:!0,principle:s.principle,note:s.note}:{value:!1,principle:"",note:""}})}updateAssignments(){this.assignments=JSON.parse(this.assignmentsString),this.setAssignment(this.assignments[0])}validateAssignment(){var t=this;return we(function*(){t.loading=!0,t.keyConceptValidationResult="",t.definitionVsMembersValidationResult="",t.membersValidationResult=!1,t.loading=!0,t.studentSubsetDefinition&&(t.definitionVsMembersValidationResult=(yield t.checkStudentECLvsStudentList())>0?t.error+" The uploaded definition and members files are not in alignment":t.ok+" The uploaded definition and members files are in alignment",t.keyConceptValidationResult=t.checkStudentECLvsKeyConcept()?t.ok+" The definition of your subset includes the key subhierarchy":t.error+" The definition of your subset does not include the key subhierarchy"),t.checkStudentListVsReferenceList();let n=t.studentSubsetmembers.filter(s=>!s.inReferenceList.value).length;t.membersNotInRefrenceListResult=n>0?t.error+" There are "+n+" members in your subset that are not recommended to be included":t.ok+" All members match the recommended list of concepts for the subset",t.checkStudentListVsCustomMessages();let r=t.checkReferenceListVsStudentList();t.refrenceListVsStudentListResult=r>0?t.error+" "+r+" "+(r>1?"concepts are":"concept is")+" missing in the uploaded member list that would be recommended to be included in this subset":t.ok+" All recommended concepts are included in this subset",t.loading=!1,t.membersValidationResult=!0})()}onSubsetmembersFileSelected(t){this.studentSubsetmembers=[],this.studentSubsetMembersDataSource=new wp,this.studentSubsetMembersDataSource.sort=this.sort,this.loading=!0;const n=t.target.files?.[0];if(n){const r=new FileReader;r.onload=s=>{try{const l=r.result.split("\n"),w=l[0].split("\t");if(w.length<2)throw new Error("Invalid file format");const E=w.indexOf("referencedComponentId"),D=w.indexOf("name");if(E<0||D<0)throw new Error("Invalid file format");const k=[];for(let O=1;OO.name.localeCompare(L.name)),this.studentSubsetmembers=k,this.studentSubsetMembersDataSource.data=k,this.loading=!1}catch(o){this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Error reading file: "+o.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=s=>{this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Error reading file: "+s,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(n)}else this.loading=!1}onDefinitionFileSelected(t){this.studentSubsetDefinition="",this.loading=!0;const n=t.target.files?.[0];if(n){const r=new FileReader;r.onload=s=>{try{const w=r.result.replace(/\r/g,"").split("\n"),E=w[0].split("\t");if(E.length<2)throw new Error("Invalid file format");const D=E.indexOf("referencedComponentId"),k=E.indexOf("definition");if(D<0||k<0)throw new Error("Invalid file format");this.studentSubsetDefinition=w[1].split("\t")[k],this.loading=!1}catch(o){this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Error reading file: "+o.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=s=>{this._snackBar.openFromComponent(Rr,{duration:5e3,data:"Error reading file: "+s,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(n)}else this.loading=!1}static{this.\u0275fac=function(n){return new(n||e)(pt(Il),pt(ma),pt(Rd),pt(nc))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-subset-validator"]],viewQuery:function(n,r){if(1&n&&ki(Gd,5),2&n){let s;He(s=We())&&(r.sort=s.first)}},decls:31,vars:12,consts:[["fileInput",""],["fileInputDefinition",""],["demosMenu","matMenu"],[1,"layout-container"],[1,"left-column"],[1,"upload-controls"],[1,"mb-4"],["class","terminal-style",4,"ngIf"],["type","file",2,"display","none",3,"change"],[1,"buttons-panel"],["mat-flat-button","","color","primary",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click"],["class","spinner","diameter","30",4,"ngIf"],["class","blue-rounded-div",4,"ngIf"],["class","table-container",4,"ngIf"],[1,"right-column"],[4,"ngIf"],[1,"instructions"],[1,"terminal-style"],["diameter","30",1,"spinner"],[1,"blue-rounded-div"],[1,"text-white","mb-1"],["class","validation-result",4,"ngIf"],[1,"validation-result"],[1,"table-container"],["mat-table","",3,"dataSource"],["matColumnDef","referencedComponentId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","result"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"ngClass",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"ngClass"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"wide-menu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],["appearance","fill"],["matInput","",3,"ngModelChange","ngModel"]],template:function(n,r){if(1&n){const s=xe();J(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3"),ut(4,"Subset Members Validator"),et(),J(5,"p",6),ut(6),et(),Ht(7,VPt,2,1,"p",7),J(8,"input",8,0),Ut("change",function(l){return zt(s),Gt(r.onSubsetmembersFileSelected(l))}),et(),J(10,"input",8,1),Ut("change",function(l){return zt(s),Gt(r.onDefinitionFileSelected(l))}),et(),J(12,"div",9)(13,"button",10),Ut("click",function(){return zt(s),Gt(Zi(11).click())}),ut(14," Upload Definition File "),et(),J(15,"button",11),Ut("click",function(){return zt(s),Gt(Zi(9).click())}),ut(16,"Upload Members File"),et(),J(17,"button",10),Ut("click",function(){return zt(s),Gt(r.validateAssignment())}),ut(18,"Validate"),et(),Ht(19,UPt,1,0,"mat-spinner",12),et(),Ht(20,HPt,9,4,"div",13),et(),Ht(21,ikt,13,3,"div",14),et(),J(22,"div",15),Ht(23,rkt,8,3,"div",16)(24,skt,2,1,"h3",16),J(25,"h3"),ut(26,"Instructions"),et(),J(27,"div",17),Ht(28,akt,7,0,"ol",16)(29,okt,5,0,"ol",16),et(),Ht(30,lkt,10,1,"div",16),et()()}2&n&&(ot(6),Je("Validating against ",r.terminologyService.getFhirUrlParam(),""),ot(),vt("ngIf",r.studentSubsetDefinition),ot(6),vt("disabled",!r.selectedAssignment.referenceDefinition),ot(4),vt("disabled",!r.studentSubsetMembersDataSource.data.length),ot(2),vt("ngIf",r.loading),ot(),vt("ngIf",!r.loading&&r.membersNotInRefrenceListResult),ot(),vt("ngIf",!r.loading&&r.studentSubsetMembersDataSource.data.length),ot(2),vt("ngIf",!r.embeddedMode),ot(),vt("ngIf",r.embeddedMode),ot(4),vt("ngIf",r.selectedAssignment.referenceDefinition),ot(),vt("ngIf",!r.selectedAssignment.referenceDefinition),ot(),vt("ngIf",!r.embeddedMode))},dependencies:[Td,ys,ls,Cs,Rl,oc,vh,kl,ll,Pd,Eh,Pl,Yo,kd,wh,Fd,Th,bh,Od,Ch,Sh,Ld,Nd,lc],styles:["[_nghost-%COMP%]{display:block;height:calc(100% - 65px)}.layout-container[_ngcontent-%COMP%]{display:flex;height:100%}.left-column[_ngcontent-%COMP%]{flex:0 0 68%;display:flex;flex-direction:column;height:100%}.right-column[_ngcontent-%COMP%]{flex:0 0 28%}.buttons-panel[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-top:2rem}.upload-controls[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.table-container[_ngcontent-%COMP%]{overflow-y:auto}.upload-controls[_ngcontent-%COMP%]{margin-left:20px}table[_ngcontent-%COMP%]{width:100%}.validation-result[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.blue-rounded-div[_ngcontent-%COMP%]{border-radius:10px;background-color:#4d7fb4;padding:.5rem 3rem 1rem;width:80%;color:#f5f5f5;margin-top:20px}.terminal-style[_ngcontent-%COMP%]{font-family:monospace;font-size:.9rem;background-color:#000;color:#fff;padding:10px;border-radius:10px;margin-top:20px;width:80%}h4[_ngcontent-%COMP%]{margin-top:10px}.instructions[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px;font-weight:lighter;font-size:larger}h3[_ngcontent-%COMP%]{margin-top:10px}.bg-pink[_ngcontent-%COMP%]{background-color:pink}tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background-color:#aba9a9!important}"]})}}return e})();const QY=function(e){const i=[];let t=0;for(let n=0;n>6|192,i[t++]=63&r|128):55296==(64512&r)&&n+1>18|240,i[t++]=r>>12&63|128,i[t++]=r>>6&63|128,i[t++]=63&r|128):(i[t++]=r>>12|224,i[t++]=r>>6&63|128,i[t++]=63&r|128)}return i},KY={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,i){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const t=i?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let r=0;r>6,L=63&E;w||(L=64,o||(O=64)),n.push(t[s>>2],t[(3&s)<<4|l>>4],t[O],t[L])}return n.join("")},encodeString(e,i){return this.HAS_NATIVE_SUPPORT&&!i?btoa(e):this.encodeByteArray(QY(e),i)},decodeString(e,i){return this.HAS_NATIVE_SUPPORT&&!i?atob(e):function(e){const i=[];let t=0,n=0;for(;t191&&r<224){const s=e[t++];i[n++]=String.fromCharCode((31&r)<<6|63&s)}else if(r>239&&r<365){const w=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536;i[n++]=String.fromCharCode(55296+(w>>10)),i[n++]=String.fromCharCode(56320+(1023&w))}else{const s=e[t++],o=e[t++];i[n++]=String.fromCharCode((15&r)<<12|(63&s)<<6|63&o)}}return i.join("")}(this.decodeStringToByteArray(e,i))},decodeStringToByteArray(e,i){this.init_();const t=i?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let r=0;r>4),64!==E&&(n.push(l<<4&240|E>>2),64!==k&&n.push(E<<6&192|k))}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class pkt extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const BE=function(e){return function(e){const i=QY(e);return KY.encodeByteArray(i,!0)}(e).replace(/\./g,"")},VE=()=>{try{return function vkt(){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 e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const i=e&&function(e){try{return KY.decodeString(e,!0)}catch(i){console.error("base64Decode failed: ",i)}return null}(e[1]);return i&&JSON.parse(i)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},JY=()=>{var e;return null===(e=VE())||void 0===e?void 0:e.config};class qY{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((i,t)=>{this.resolve=i,this.reject=t})}wrapCallback(i){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof i&&(this.promise.catch(()=>{}),1===i.length?i(t):i(t,n))}}}class Pv extends Error{constructor(i,t,n){super(t),this.code=i,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,Pv.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,i$.prototype.create)}}class i${constructor(i,t,n){this.service=i,this.serviceName=t,this.errors=n}create(i,...t){const n=t[0]||{},r=`${this.service}/${i}`,s=this.errors[i],o=s?function Dkt(e,i){return e.replace(Mkt,(t,n)=>{const r=i[n];return null!=r?String(r):`<${n}?>`})}(s,n):"Error";return new Pv(r,`${this.serviceName}: ${o} (${r}).`,n)}}const Mkt=/\{\$([^}]+)}/g;function gb(e,i){if(e===i)return!0;const t=Object.keys(e),n=Object.keys(i);for(const r of t){if(!n.includes(r))return!1;const s=e[r],o=i[r];if(r$(s)&&r$(o)){if(!gb(s,o))return!1}else if(s!==o)return!1}for(const r of n)if(!t.includes(r))return!1;return!0}function r$(e){return null!==e&&"object"==typeof e}function Vc(e){return e&&e._delegate?e._delegate:e}class vb{constructor(i,t,n){this.name=i,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(i){return this.instantiationMode=i,this}setMultipleInstances(i){return this.multipleInstances=i,this}setServiceProps(i){return this.serviceProps=i,this}setInstanceCreatedCallback(i){return this.onInstanceCreated=i,this}}const Mp="[DEFAULT]";class Nkt{constructor(i,t){this.name=i,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(i){const t=this.normalizeInstanceIdentifier(i);if(!this.instancesDeferred.has(t)){const n=new qY;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(i){var t;const n=this.normalizeInstanceIdentifier(i?.identifier),r=null!==(t=i?.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(s){if(r)return null;throw s}}getComponent(){return this.component}setComponent(i){if(i.name!==this.name)throw Error(`Mismatching Component ${i.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=i,this.shouldAutoInitialize()){if(function Vkt(e){return"EAGER"===e.instantiationMode}(i))try{this.getOrInitializeService({instanceIdentifier:Mp})}catch{}for(const[t,n]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(t);try{const s=this.getOrInitializeService({instanceIdentifier:r});n.resolve(s)}catch{}}}}clearInstance(i=Mp){this.instancesDeferred.delete(i),this.instancesOptions.delete(i),this.instances.delete(i)}delete(){var i=this;return we(function*(){const t=Array.from(i.instances.values());yield Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(i=Mp){return this.instances.has(i)}getOptions(i=Mp){return this.instancesOptions.get(i)||{}}initialize(i={}){const{options:t={}}=i,n=this.normalizeInstanceIdentifier(i.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[s,o]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(s)&&o.resolve(r);return r}onInit(i,t){var n;const r=this.normalizeInstanceIdentifier(t),s=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;s.add(i),this.onInitCallbacks.set(r,s);const o=this.instances.get(r);return o&&i(o,r),()=>{s.delete(i)}}invokeOnInitCallbacks(i,t){const n=this.onInitCallbacks.get(t);if(n)for(const r of n)try{r(i,t)}catch{}}getOrInitializeService({instanceIdentifier:i,options:t={}}){let n=this.instances.get(i);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(e=i,e===Mp?void 0:e),options:t}),this.instances.set(i,n),this.instancesOptions.set(i,t),this.invokeOnInitCallbacks(n,i),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,i,n)}catch{}var e;return n||null}normalizeInstanceIdentifier(i=Mp){return this.component?this.component.multipleInstances?i:Mp:i}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class Ukt{constructor(i){this.name=i,this.providers=new Map}addComponent(i){const t=this.getProvider(i.name);if(t.isComponentSet())throw new Error(`Component ${i.name} has already been registered with ${this.name}`);t.setComponent(i)}addOrOverwriteComponent(i){this.getProvider(i.name).isComponentSet()&&this.providers.delete(i.name),this.addComponent(i)}getProvider(i){if(this.providers.has(i))return this.providers.get(i);const t=new Nkt(i,this);return this.providers.set(i,t),t}getProviders(){return Array.from(this.providers.values())}}const cF=[];var Jn=function(e){return e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT",e}(Jn||{});const s$={debug:Jn.DEBUG,verbose:Jn.VERBOSE,info:Jn.INFO,warn:Jn.WARN,error:Jn.ERROR,silent:Jn.SILENT},zkt=Jn.INFO,Gkt={[Jn.DEBUG]:"log",[Jn.VERBOSE]:"log",[Jn.INFO]:"info",[Jn.WARN]:"warn",[Jn.ERROR]:"error"},Hkt=(e,i,...t)=>{if(ii.some(t=>e instanceof t);let o$,l$;const c$=new WeakMap,uF=new WeakMap,u$=new WeakMap,hF=new WeakMap,dF=new WeakMap;let fF={get(e,i,t){if(e instanceof IDBTransaction){if("done"===i)return uF.get(e);if("objectStoreNames"===i)return e.objectStoreNames||u$.get(e);if("store"===i)return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return jd(e[i])},set:(e,i,t)=>(e[i]=t,!0),has:(e,i)=>e instanceof IDBTransaction&&("done"===i||"store"===i)||i in e};function Zkt(e){return"function"==typeof e?function Kkt(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function Xkt(){return l$||(l$=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(e)?function(...i){return e.apply(pF(this),i),jd(c$.get(this))}:function(...i){return jd(e.apply(pF(this),i))}:function(i,...t){const n=e.call(pF(this),i,...t);return u$.set(n,i.sort?i.sort():[i]),jd(n)}}(e):(e instanceof IDBTransaction&&function $kt(e){if(uF.has(e))return;const i=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",o),e.removeEventListener("abort",o)},s=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",o),e.addEventListener("abort",o)});uF.set(e,i)}(e),Wkt(e,function jkt(){return o$||(o$=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(e,fF):e)}function jd(e){if(e instanceof IDBRequest)return function Ykt(e){const i=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",o)},s=()=>{t(jd(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",o)});return i.then(t=>{t instanceof IDBCursor&&c$.set(t,e)}).catch(()=>{}),dF.set(i,e),i}(e);if(hF.has(e))return hF.get(e);const i=Zkt(e);return i!==e&&(hF.set(e,i),dF.set(i,e)),i}const pF=e=>dF.get(e),qkt=["get","getKey","getAll","getAllKeys","count"],tFt=["put","add","delete","clear"],mF=new Map;function h$(e,i){if(!(e instanceof IDBDatabase)||i in e||"string"!=typeof i)return;if(mF.get(i))return mF.get(i);const t=i.replace(/FromIndex$/,""),n=i!==t,r=tFt.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!qkt.includes(t))return;const s=function(){var o=we(function*(l,...w){const E=this.transaction(l,r?"readwrite":"readonly");let D=E.store;return n&&(D=D.index(w.shift())),(yield Promise.all([D[t](...w),r&&E.done]))[0]});return function(w){return o.apply(this,arguments)}}();return mF.set(i,s),s}!function Qkt(e){fF=e(fF)}(e=>({...e,get:(i,t,n)=>h$(i,t)||e.get(i,t,n),has:(i,t)=>!!h$(i,t)||e.has(i,t)}));class eFt{constructor(i){this.container=i}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(function iFt(e){const i=e.getComponent();return"VERSION"===i?.type}(t)){const n=t.getImmediate();return`${n.library}/${n.version}`}return null}).filter(t=>t).join(" ")}}const zE="@firebase/app",Ip=new a$("@firebase/app"),nFt="@firebase/app-compat",rFt="@firebase/analytics-compat",sFt="@firebase/analytics",aFt="@firebase/app-check-compat",oFt="@firebase/app-check",lFt="@firebase/auth",cFt="@firebase/auth-compat",uFt="@firebase/database",hFt="@firebase/database-compat",dFt="@firebase/functions",fFt="@firebase/functions-compat",pFt="@firebase/installations",mFt="@firebase/installations-compat",gFt="@firebase/messaging",vFt="@firebase/messaging-compat",yFt="@firebase/performance",xFt="@firebase/performance-compat",bFt="@firebase/remote-config",wFt="@firebase/remote-config-compat",TFt="@firebase/storage",CFt="@firebase/storage-compat",SFt="@firebase/firestore",EFt="@firebase/vertexai-preview",_Ft="@firebase/firestore-compat",AFt="firebase",GE="[DEFAULT]",MFt={[zE]:"fire-core",[nFt]:"fire-core-compat",[sFt]:"fire-analytics",[rFt]:"fire-analytics-compat",[oFt]:"fire-app-check",[aFt]:"fire-app-check-compat",[lFt]:"fire-auth",[cFt]:"fire-auth-compat",[uFt]:"fire-rtdb",[hFt]:"fire-rtdb-compat",[dFt]:"fire-fn",[fFt]:"fire-fn-compat",[pFt]:"fire-iid",[mFt]:"fire-iid-compat",[gFt]:"fire-fcm",[vFt]:"fire-fcm-compat",[yFt]:"fire-perf",[xFt]:"fire-perf-compat",[bFt]:"fire-rc",[wFt]:"fire-rc-compat",[TFt]:"fire-gcs",[CFt]:"fire-gcs-compat",[SFt]:"fire-fst",[_Ft]:"fire-fst-compat",[EFt]:"fire-vertex","fire-js":"fire-js",[AFt]:"fire-js-all"},Rp=new Map,yb=new Map,xb=new Map;function d$(e,i){try{e.container.addComponent(i)}catch(t){Ip.debug(`Component ${i.name} failed to register with FirebaseApp ${e.name}`,t)}}function HE(e){const i=e.name;if(xb.has(i))return Ip.debug(`There were multiple attempts to register component ${i}.`),!1;xb.set(i,e);for(const t of Rp.values())d$(t,e);for(const t of yb.values())d$(t,e);return!0}const uc=new i$("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class p${constructor(i,t,n){this._isDeleted=!1,this._options=Object.assign({},i),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new vb("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(i){this.checkDestroyed(),this._automaticDataCollectionEnabled=i}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(i){this._isDeleted=i}checkDestroyed(){if(this.isDeleted)throw uc.create("app-deleted",{appName:this._name})}}function m$(e,i={}){let t=e;"object"!=typeof i&&(i={name:i});const n=Object.assign({name:GE,automaticDataCollectionEnabled:!1},i),r=n.name;if("string"!=typeof r||!r)throw uc.create("bad-app-name",{appName:String(r)});if(t||(t=JY()),!t)throw uc.create("no-options");const s=Rp.get(r);if(s){if(gb(t,s.options)&&gb(n,s.config))return s;throw uc.create("duplicate-app",{appName:r})}const o=new Ukt(r);for(const w of xb.values())o.addComponent(w);const l=new p$(t,n,o);return Rp.set(r,l),l}function Pp(e,i,t){var n;let r=null!==(n=MFt[e])&&void 0!==n?n:e;t&&(r+=`-${t}`);const s=r.match(/\s|\//),o=i.match(/\s|\//);if(s||o){const l=[`Unable to register library "${r}" with version "${i}":`];return s&&l.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${i}" contains illegal characters (whitespace or "/")`),void Ip.warn(l.join(" "))}HE(new vb(`${r}-version`,()=>({library:r,version:i}),"VERSION"))}const LFt="firebase-heartbeat-database",NFt=1,bb="firebase-heartbeat-store";let yF=null;function g$(){return yF||(yF=function Jkt(e,i,{blocked:t,upgrade:n,blocking:r,terminated:s}={}){const o=indexedDB.open(e,i),l=jd(o);return n&&o.addEventListener("upgradeneeded",w=>{n(jd(o.result),w.oldVersion,w.newVersion,jd(o.transaction),w)}),t&&o.addEventListener("blocked",w=>t(w.oldVersion,w.newVersion,w)),l.then(w=>{s&&w.addEventListener("close",()=>s()),r&&w.addEventListener("versionchange",E=>r(E.oldVersion,E.newVersion,E))}).catch(()=>{}),l}(LFt,NFt,{upgrade:(e,i)=>{if(0===i)try{e.createObjectStore(bb)}catch(t){console.warn(t)}}}).catch(e=>{throw uc.create("idb-open",{originalErrorMessage:e.message})})),yF}function xF(){return(xF=we(function*(e){try{const t=(yield g$()).transaction(bb),n=yield t.objectStore(bb).get(y$(e));return yield t.done,n}catch(i){if(i instanceof Pv)Ip.warn(i.message);else{const t=uc.create("idb-get",{originalErrorMessage:i?.message});Ip.warn(t.message)}}})).apply(this,arguments)}function v$(e,i){return bF.apply(this,arguments)}function bF(){return(bF=we(function*(e,i){try{const n=(yield g$()).transaction(bb,"readwrite");yield n.objectStore(bb).put(i,y$(e)),yield n.done}catch(t){if(t instanceof Pv)Ip.warn(t.message);else{const n=uc.create("idb-set",{originalErrorMessage:t?.message});Ip.warn(n.message)}}})).apply(this,arguments)}function y$(e){return`${e.name}!${e.options.appId}`}class zFt{constructor(i){this.container=i,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new HFt(t),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}triggerHeartbeat(){var i=this;return we(function*(){var t,n;const s=i.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),o=x$();if((null!=(null===(t=i._heartbeatsCache)||void 0===t?void 0:t.heartbeats)||(i._heartbeatsCache=yield i._heartbeatsCachePromise,null!=(null===(n=i._heartbeatsCache)||void 0===n?void 0:n.heartbeats)))&&i._heartbeatsCache.lastSentHeartbeatDate!==o&&!i._heartbeatsCache.heartbeats.some(l=>l.date===o))return i._heartbeatsCache.heartbeats.push({date:o,agent:s}),i._heartbeatsCache.heartbeats=i._heartbeatsCache.heartbeats.filter(l=>{const w=new Date(l.date).valueOf();return Date.now()-w<=2592e6}),i._storage.overwrite(i._heartbeatsCache)})()}getHeartbeatsHeader(){var i=this;return we(function*(){var t;if(null===i._heartbeatsCache&&(yield i._heartbeatsCachePromise),null==(null===(t=i._heartbeatsCache)||void 0===t?void 0:t.heartbeats)||0===i._heartbeatsCache.heartbeats.length)return"";const n=x$(),{heartbeatsToSend:r,unsentEntries:s}=function GFt(e,i=1024){const t=[];let n=e.slice();for(const r of e){const s=t.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),b$(t)>i){s.dates.pop();break}}else if(t.push({agent:r.agent,dates:[r.date]}),b$(t)>i){t.pop();break}n=n.slice(1)}return{heartbeatsToSend:t,unsentEntries:n}}(i._heartbeatsCache.heartbeats),o=BE(JSON.stringify({version:2,heartbeats:r}));return i._heartbeatsCache.lastSentHeartbeatDate=n,s.length>0?(i._heartbeatsCache.heartbeats=s,yield i._storage.overwrite(i._heartbeatsCache)):(i._heartbeatsCache.heartbeats=[],i._storage.overwrite(i._heartbeatsCache)),o})()}}function x$(){return(new Date).toISOString().substring(0,10)}class HFt{constructor(i){this.app=i,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return we(function*(){return!!function e$(){try{return"object"==typeof indexedDB}catch{return!1}}()&&function _kt(){return new Promise((e,i)=>{try{let t=!0;const n="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(n);r.onsuccess=()=>{r.result.close(),t||self.indexedDB.deleteDatabase(n),e(!0)},r.onupgradeneeded=()=>{t=!1},r.onerror=()=>{var s;i((null===(s=r.error)||void 0===s?void 0:s.message)||"")}}catch(t){i(t)}})}().then(()=>!0).catch(()=>!1)})()}read(){var i=this;return we(function*(){if(yield i._canUseIndexedDBPromise){const n=yield function BFt(e){return xF.apply(this,arguments)}(i.app);return n?.heartbeats?n:{heartbeats:[]}}return{heartbeats:[]}})()}overwrite(i){var t=this;return we(function*(){var n;if(yield t._canUseIndexedDBPromise){const s=yield t.read();return v$(t.app,{lastSentHeartbeatDate:null!==(n=i.lastSentHeartbeatDate)&&void 0!==n?n:s.lastSentHeartbeatDate,heartbeats:i.heartbeats})}})()}add(i){var t=this;return we(function*(){var n;if(yield t._canUseIndexedDBPromise){const s=yield t.read();return v$(t.app,{lastSentHeartbeatDate:null!==(n=i.lastSentHeartbeatDate)&&void 0!==n?n:s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...i.heartbeats]})}})()}}function b$(e){return BE(JSON.stringify({version:2,heartbeats:e})).length}!function WFt(e){HE(new vb("platform-logger",i=>new eFt(i),"PRIVATE")),HE(new vb("heartbeat",i=>new zFt(i),"PRIVATE")),Pp(zE,"0.10.6",e),Pp(zE,"0.10.6","esm2017"),Pp("fire-js","")}("");var kp,C$,w$=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},T$={};(function(){var e;function n(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}function r(ft,ht,mt){mt||(mt=0);var wt=Array(16);if("string"==typeof ht)for(var Ct=0;16>Ct;++Ct)wt[Ct]=ht.charCodeAt(mt++)|ht.charCodeAt(mt++)<<8|ht.charCodeAt(mt++)<<16|ht.charCodeAt(mt++)<<24;else for(Ct=0;16>Ct;++Ct)wt[Ct]=ht[mt++]|ht[mt++]<<8|ht[mt++]<<16|ht[mt++]<<24;var _t=ft.g[3],Dt=(ht=ft.g[0])+(_t^(mt=ft.g[1])&((Ct=ft.g[2])^_t))+wt[0]+3614090360&4294967295;Dt=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=(mt=(Ct=(_t=(ht=mt+(Dt<<7&4294967295|Dt>>>25))+((Dt=_t+(Ct^ht&(mt^Ct))+wt[1]+3905402710&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Ct+(mt^_t&(ht^mt))+wt[2]+606105819&4294967295)<<17&4294967295|Dt>>>15))+((Dt=mt+(ht^Ct&(_t^ht))+wt[3]+3250441966&4294967295)<<22&4294967295|Dt>>>10))+((Dt=ht+(_t^mt&(Ct^_t))+wt[4]+4118548399&4294967295)<<7&4294967295|Dt>>>25))+((Dt=_t+(Ct^ht&(mt^Ct))+wt[5]+1200080426&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Ct+(mt^_t&(ht^mt))+wt[6]+2821735955&4294967295)<<17&4294967295|Dt>>>15))+((Dt=mt+(ht^Ct&(_t^ht))+wt[7]+4249261313&4294967295)<<22&4294967295|Dt>>>10))+((Dt=ht+(_t^mt&(Ct^_t))+wt[8]+1770035416&4294967295)<<7&4294967295|Dt>>>25))+((Dt=_t+(Ct^ht&(mt^Ct))+wt[9]+2336552879&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Ct+(mt^_t&(ht^mt))+wt[10]+4294925233&4294967295)<<17&4294967295|Dt>>>15))+((Dt=mt+(ht^Ct&(_t^ht))+wt[11]+2304563134&4294967295)<<22&4294967295|Dt>>>10))+((Dt=ht+(_t^mt&(Ct^_t))+wt[12]+1804603682&4294967295)<<7&4294967295|Dt>>>25))+((Dt=_t+(Ct^ht&(mt^Ct))+wt[13]+4254626195&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Ct+(mt^_t&(ht^mt))+wt[14]+2792965006&4294967295)<<17&4294967295|Dt>>>15))+((Dt=mt+(ht^Ct&(_t^ht))+wt[15]+1236535329&4294967295)<<22&4294967295|Dt>>>10))+((Dt=ht+(Ct^_t&(mt^Ct))+wt[1]+4129170786&4294967295)<<5&4294967295|Dt>>>27))+((Dt=_t+(mt^Ct&(ht^mt))+wt[6]+3225465664&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Ct+(ht^mt&(_t^ht))+wt[11]+643717713&4294967295)<<14&4294967295|Dt>>>18))+((Dt=mt+(_t^ht&(Ct^_t))+wt[0]+3921069994&4294967295)<<20&4294967295|Dt>>>12))+((Dt=ht+(Ct^_t&(mt^Ct))+wt[5]+3593408605&4294967295)<<5&4294967295|Dt>>>27))+((Dt=_t+(mt^Ct&(ht^mt))+wt[10]+38016083&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Ct+(ht^mt&(_t^ht))+wt[15]+3634488961&4294967295)<<14&4294967295|Dt>>>18))+((Dt=mt+(_t^ht&(Ct^_t))+wt[4]+3889429448&4294967295)<<20&4294967295|Dt>>>12))+((Dt=ht+(Ct^_t&(mt^Ct))+wt[9]+568446438&4294967295)<<5&4294967295|Dt>>>27))+((Dt=_t+(mt^Ct&(ht^mt))+wt[14]+3275163606&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Ct+(ht^mt&(_t^ht))+wt[3]+4107603335&4294967295)<<14&4294967295|Dt>>>18))+((Dt=mt+(_t^ht&(Ct^_t))+wt[8]+1163531501&4294967295)<<20&4294967295|Dt>>>12))+((Dt=ht+(Ct^_t&(mt^Ct))+wt[13]+2850285829&4294967295)<<5&4294967295|Dt>>>27))+((Dt=_t+(mt^Ct&(ht^mt))+wt[2]+4243563512&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Ct+(ht^mt&(_t^ht))+wt[7]+1735328473&4294967295)<<14&4294967295|Dt>>>18))+((Dt=mt+(_t^ht&(Ct^_t))+wt[12]+2368359562&4294967295)<<20&4294967295|Dt>>>12))+((Dt=ht+(mt^Ct^_t)+wt[5]+4294588738&4294967295)<<4&4294967295|Dt>>>28))+((Dt=_t+(ht^mt^Ct)+wt[8]+2272392833&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Ct+(_t^ht^mt)+wt[11]+1839030562&4294967295)<<16&4294967295|Dt>>>16))+((Dt=mt+(Ct^_t^ht)+wt[14]+4259657740&4294967295)<<23&4294967295|Dt>>>9))+((Dt=ht+(mt^Ct^_t)+wt[1]+2763975236&4294967295)<<4&4294967295|Dt>>>28))+((Dt=_t+(ht^mt^Ct)+wt[4]+1272893353&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Ct+(_t^ht^mt)+wt[7]+4139469664&4294967295)<<16&4294967295|Dt>>>16))+((Dt=mt+(Ct^_t^ht)+wt[10]+3200236656&4294967295)<<23&4294967295|Dt>>>9))+((Dt=ht+(mt^Ct^_t)+wt[13]+681279174&4294967295)<<4&4294967295|Dt>>>28))+((Dt=_t+(ht^mt^Ct)+wt[0]+3936430074&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Ct+(_t^ht^mt)+wt[3]+3572445317&4294967295)<<16&4294967295|Dt>>>16))+((Dt=mt+(Ct^_t^ht)+wt[6]+76029189&4294967295)<<23&4294967295|Dt>>>9))+((Dt=ht+(mt^Ct^_t)+wt[9]+3654602809&4294967295)<<4&4294967295|Dt>>>28))+((Dt=_t+(ht^mt^Ct)+wt[12]+3873151461&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Ct+(_t^ht^mt)+wt[15]+530742520&4294967295)<<16&4294967295|Dt>>>16))+((Dt=mt+(Ct^_t^ht)+wt[2]+3299628645&4294967295)<<23&4294967295|Dt>>>9))+((Dt=ht+(Ct^(mt|~_t))+wt[0]+4096336452&4294967295)<<6&4294967295|Dt>>>26))+((Dt=_t+(mt^(ht|~Ct))+wt[7]+1126891415&4294967295)<<10&4294967295|Dt>>>22))+((Dt=Ct+(ht^(_t|~mt))+wt[14]+2878612391&4294967295)<<15&4294967295|Dt>>>17))+((Dt=mt+(_t^(Ct|~ht))+wt[5]+4237533241&4294967295)<<21&4294967295|Dt>>>11))+((Dt=ht+(Ct^(mt|~_t))+wt[12]+1700485571&4294967295)<<6&4294967295|Dt>>>26))+((Dt=_t+(mt^(ht|~Ct))+wt[3]+2399980690&4294967295)<<10&4294967295|Dt>>>22))+((Dt=Ct+(ht^(_t|~mt))+wt[10]+4293915773&4294967295)<<15&4294967295|Dt>>>17))+((Dt=mt+(_t^(Ct|~ht))+wt[1]+2240044497&4294967295)<<21&4294967295|Dt>>>11))+((Dt=ht+(Ct^(mt|~_t))+wt[8]+1873313359&4294967295)<<6&4294967295|Dt>>>26))+((Dt=_t+(mt^(ht|~Ct))+wt[15]+4264355552&4294967295)<<10&4294967295|Dt>>>22))+((Dt=Ct+(ht^(_t|~mt))+wt[6]+2734768916&4294967295)<<15&4294967295|Dt>>>17))+((Dt=mt+(_t^(Ct|~ht))+wt[13]+1309151649&4294967295)<<21&4294967295|Dt>>>11))+((_t=(ht=mt+((Dt=ht+(Ct^(mt|~_t))+wt[4]+4149444226&4294967295)<<6&4294967295|Dt>>>26))+((Dt=_t+(mt^(ht|~Ct))+wt[11]+3174756917&4294967295)<<10&4294967295|Dt>>>22))^((Ct=_t+((Dt=Ct+(ht^(_t|~mt))+wt[2]+718787259&4294967295)<<15&4294967295|Dt>>>17))|~ht))+wt[9]+3951481745&4294967295,ft.g[0]=ft.g[0]+ht&4294967295,ft.g[1]=ft.g[1]+(Ct+(Dt<<21&4294967295|Dt>>>11))&4294967295,ft.g[2]=ft.g[2]+Ct&4294967295,ft.g[3]=ft.g[3]+_t&4294967295}function o(ft,ht){this.h=ht;for(var mt=[],wt=!0,Ct=ft.length-1;0<=Ct;Ct--){var _t=0|ft[Ct];wt&&_t==ht||(mt[Ct]=_t,wt=!1)}this.g=mt}(function i(ft,ht){function mt(){}mt.prototype=ht.prototype,ft.D=ht.prototype,ft.prototype=new mt,ft.prototype.constructor=ft,ft.C=function(wt,Ct,_t){for(var Dt=Array(arguments.length-2),Ue=2;Uethis.h?this.blockSize:2*this.blockSize)-this.h);ft[0]=128;for(var ht=1;htht;++ht)for(var wt=0;32>wt;wt+=8)ft[mt++]=this.g[ht]>>>wt&255;return ft};var l={};function w(ft){return-128<=ft&&128>ft?function s(ft,ht){var mt=l;return Object.prototype.hasOwnProperty.call(mt,ft)?mt[ft]:mt[ft]=ht(ft)}(ft,function(ht){return new o([0|ht],0>ht?-1:0)}):new o([0|ft],0>ft?-1:0)}function E(ft){if(isNaN(ft)||!isFinite(ft))return k;if(0>ft)return W(E(-ft));for(var ht=[],mt=1,wt=0;ft>=mt;wt++)ht[wt]=ft/mt|0,mt*=4294967296;return new o(ht,0)}var k=w(0),O=w(1),L=w(16777216);function U(ft){if(0!=ft.h)return!1;for(var ht=0;ht>>16,ft[ht]&=65535,ht++}function st(ft,ht){this.g=ft,this.h=ht}function yt(ft,ht){if(U(ht))throw Error("division by zero");if(U(ft))return new st(k,k);if(j(ft))return ht=yt(W(ft),ht),new st(W(ht.g),W(ht.h));if(j(ht))return ht=yt(ft,W(ht)),new st(W(ht.g),ht.h);if(30=wt.l(ft);)mt=Tt(mt),wt=Tt(wt);var Ct=It(mt,1),_t=It(wt,1);for(wt=It(wt,2),mt=It(mt,2);!U(wt);){var Dt=_t.add(wt);0>=Dt.l(ft)&&(Ct=Ct.add(mt),_t=Dt),wt=It(wt,1),mt=It(mt,1)}return ht=Z(ft,Ct.j(ht)),new st(Ct,ht)}for(Ct=k;0<=ft.l(ht);){for(mt=Math.max(1,Math.floor(ft.m()/ht.m())),wt=48>=(wt=Math.ceil(Math.log(mt)/Math.LN2))?1:Math.pow(2,wt-48),Dt=(_t=E(mt)).j(ht);j(Dt)||0>>31;return new o(mt,ft.h)}function It(ft,ht){var mt=ht>>5;ht%=32;for(var wt=ft.g.length-mt,Ct=[],_t=0;_t>>ht|ft.i(_t+mt+1)<<32-ht:ft.i(_t+mt);return new o(Ct,ft.h)}(e=o.prototype).m=function(){if(j(this))return-W(this).m();for(var ft=0,ht=1,mt=0;mt(ft=ft||10)||36>>0).toString(ft);if(U(mt=Ct))return _t+wt;for(;6>_t.length;)_t="0"+_t;wt=_t+wt}},e.i=function(ft){return 0>ft?0:ft>>16)+(this.i(Ct)>>>16)+(ft.i(Ct)>>>16);wt=Dt>>>16,mt[Ct]=(Dt&=65535)<<16|(_t&=65535)}return new o(mt,-2147483648&mt[mt.length-1]?-1:0)},e.j=function(ft){if(U(this)||U(ft))return k;if(j(this))return j(ft)?W(this).j(W(ft)):W(W(this).j(ft));if(j(ft))return W(this.j(W(ft)));if(0>this.l(L)&&0>ft.l(L))return E(this.m()*ft.m());for(var ht=this.g.length+ft.g.length,mt=[],wt=0;wt<2*ht;wt++)mt[wt]=0;for(wt=0;wt>>16,Dt=65535&this.i(wt),Ue=ft.i(Ct)>>>16,Te=65535&ft.i(Ct);mt[2*wt+2*Ct]+=Dt*Te,rt(mt,2*wt+2*Ct),mt[2*wt+2*Ct+1]+=_t*Te,rt(mt,2*wt+2*Ct+1),mt[2*wt+2*Ct+1]+=Dt*Ue,rt(mt,2*wt+2*Ct+1),mt[2*wt+2*Ct+2]+=_t*Ue,rt(mt,2*wt+2*Ct+2)}for(wt=0;wt(ht=ht||10)||36_t?(_t=E(Math.pow(ht,_t)),wt=wt.j(_t).add(E(Dt))):wt=(wt=wt.j(mt)).add(E(Dt))}return wt},kp=T$.Integer=o}).apply(typeof w$<"u"?w$:typeof self<"u"?self:typeof window<"u"?window:{});var S$,E$,wb,_$,jE,wF,A$,D$,M$,WE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ah={};(function(){var e,i="function"==typeof Object.defineProperties?Object.defineProperty:function(z,ct,xt){return z==Array.prototype||z==Object.prototype||(z[ct]=xt.value),z},n=function t(z){z=["object"==typeof globalThis&&globalThis,z,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof WE&&WE];for(var ct=0;ct{throw z},0)}function Dt(){var z=ze;let ct=null;return z.g&&(ct=z.g,z.g=z.g.next,z.g||(z.h=null),ct.next=null),ct}var Te=new class Z{constructor(ct,xt){this.i=ct,this.j=xt,this.h=0,this.g=null}get(){let ct;return 0new ve,z=>z.reset());class ve{constructor(){this.next=this.g=this.h=null}set(ct,xt){this.h=ct,this.g=xt,this.next=null}reset(){this.next=this.g=this.h=null}}let qt,_e=!1,ze=new class Ue{constructor(){this.h=this.g=null}add(ct,xt){const Rt=Te.get();Rt.set(ct,xt),this.h?this.h.next=Rt:this.g=Rt,this.h=Rt}},Me=()=>{const z=l.Promise.resolve(void 0);qt=()=>{z.then(Ii)}};var Ii=()=>{for(var z;z=Dt();){try{z.h.call(z.g)}catch(xt){_t(xt)}var ct=Te;ct.j(z),100>ct.h&&(ct.h++,z.next=ct.g,ct.g=z)}_e=!1};function ee(){this.s=this.s,this.C=this.C}function Ne(z,ct){this.type=z,this.g=this.target=ct,this.defaultPrevented=!1}ee.prototype.s=!1,ee.prototype.ma=function(){this.s||(this.s=!0,this.N())},ee.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},Ne.prototype.h=function(){this.defaultPrevented=!0};var De=function(){if(!l.addEventListener||!Object.defineProperty)return!1;var z=!1,ct=Object.defineProperty({},"passive",{get:function(){z=!0}});try{const xt=()=>{};l.addEventListener("test",xt,ct),l.removeEventListener("test",xt,ct)}catch{}return z}();function fi(z,ct){if(Ne.call(this,z?z.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,z){var xt=this.type=z.type,Rt=z.changedTouches&&z.changedTouches.length?z.changedTouches[0]:null;if(this.target=z.target||z.srcElement,this.g=ct,ct=z.relatedTarget){if(Tt){t:{try{yt(ct.nodeName);var ie=!0;break t}catch{}ie=!1}ie||(ct=null)}}else"mouseover"==xt?ct=z.fromElement:"mouseout"==xt&&(ct=z.toElement);this.relatedTarget=ct,Rt?(this.clientX=void 0!==Rt.clientX?Rt.clientX:Rt.pageX,this.clientY=void 0!==Rt.clientY?Rt.clientY:Rt.pageY,this.screenX=Rt.screenX||0,this.screenY=Rt.screenY||0):(this.clientX=void 0!==z.clientX?z.clientX:z.pageX,this.clientY=void 0!==z.clientY?z.clientY:z.pageY,this.screenX=z.screenX||0,this.screenY=z.screenY||0),this.button=z.button,this.key=z.key||"",this.ctrlKey=z.ctrlKey,this.altKey=z.altKey,this.shiftKey=z.shiftKey,this.metaKey=z.metaKey,this.pointerId=z.pointerId||0,this.pointerType="string"==typeof z.pointerType?z.pointerType:vi[z.pointerType]||"",this.state=z.state,this.i=z,z.defaultPrevented&&fi.aa.h.call(this)}}U(fi,Ne);var vi={2:"touch",3:"pen",4:"mouse"};fi.prototype.h=function(){fi.aa.h.call(this);var z=this.i;z.preventDefault?z.preventDefault():z.returnValue=!1};var hi="closure_listenable_"+(1e6*Math.random()|0),Ot=0;function Qt(z,ct,xt,Rt,ie){this.listener=z,this.proxy=null,this.src=ct,this.type=xt,this.capture=!!Rt,this.ha=ie,this.key=++Ot,this.da=this.fa=!1}function $t(z){z.da=!0,z.listener=null,z.proxy=null,z.src=null,z.ha=null}function Yt(z){this.src=z,this.g={},this.h=0}function Ae(z,ct){var xt=ct.type;if(xt in z.g){var be,Rt=z.g[xt],ie=Array.prototype.indexOf.call(Rt,ct,void 0);(be=0<=ie)&&Array.prototype.splice.call(Rt,ie,1),be&&($t(ct),0==z.g[xt].length&&(delete z.g[xt],z.h--))}}function Ft(z,ct,xt,Rt){for(var ie=0;ie>>0);function Po(z){return"function"==typeof z?z:(z[ci]||(z[ci]=function(ct){return z.handleEvent(ct)}),z[ci])}function ar(){ee.call(this),this.i=new Yt(this),this.M=this,this.F=null}function Qn(z,ct){var xt,Rt=z.F;if(Rt)for(xt=[];Rt;Rt=Rt.F)xt.push(Rt);if(z=z.M,Rt=ct.type||ct,"string"==typeof ct)ct=new Ne(ct,z);else if(ct instanceof Ne)ct.target=ct.target||z;else{var ie=ct;wt(ct=new Ne(Rt,z),ie)}if(ie=!0,xt)for(var be=xt.length-1;0<=be;be--){var pi=ct.g=xt[be];ie=sa(pi,Rt,!0,ct)&&ie}if(ie=sa(pi=ct.g=z,Rt,!0,ct)&&ie,ie=sa(pi,Rt,!1,ct)&&ie,xt)for(be=0;be{z.g=null,z.i&&(z.i=!1,an(z))},z.l);const ct=z.h;z.h=null,z.m.apply(null,ct)}U(ar,ee),ar.prototype[hi]=!0,ar.prototype.removeEventListener=function(z,ct,xt,Rt){ur(this,z,ct,xt,Rt)},ar.prototype.N=function(){if(ar.aa.N.call(this),this.i){var ct,z=this.i;for(ct in z.g){for(var xt=z.g[ct],Rt=0;RtRt.length)){var ie=Rt[1];if(Array.isArray(ie)&&!(1>ie.length)){var be=ie[0];if("noop"!=be&&"stop"!=be&&"close"!=be)for(var pi=1;pict.length?Xe:(ct=ct.slice(Rt,Rt+xt),z.C=Rt+xt,ct))}function qi(z){z.S=Date.now()+z.I,Dr(z,z.I)}function Dr(z,ct){if(null!=z.B)throw Error("WatchDog timer not null");z.B=zm(O(z.ba,z),ct)}function Ba(z){z.B&&(l.clearTimeout(z.B),z.B=null)}function Qr(z){0==z.j.G||z.J||bst(z.j,z)}function Ws(z){Ba(z);var ct=z.M;ct&&"function"==typeof ct.ma&&ct.ma(),z.M=null,Nm(z.U),z.g&&(ct=z.g,z.g=null,ct.abort(),ct.ma())}function nd(z,ct){try{var xt=z.j;if(0!=xt.G&&(xt.g==z||_3(xt.h,z)))if(!z.K&&_3(xt.h,z)&&3==xt.G){try{var Rt=xt.Da.g.parse(ct)}catch{Rt=null}if(Array.isArray(Rt)&&3==Rt.length){var ie=Rt;if(0==ie[0]){t:if(!xt.u){if(xt.g){if(!(xt.g.F+3e3ie[2]&&xt.F&&0==xt.v&&!xt.C&&(xt.C=zm(O(xt.Za,xt),6e3));if(1>=Cc(xt.h)&&xt.ca){try{xt.ca()}catch{}xt.ca=void 0}}else jm(xt,11)}else if((z.K||xt.g==z)&&DD(xt),!rt(ct))for(ie=xt.Da.g.parse(ct),ct=0;ctOo)&&(3!=Oo||this.g&&(this.h.h||this.g.oa()||fst(this.g)))){this.J||4!=Oo||7==ct||Um(),Ba(this);var xt=this.g.Z();this.X=xt;e:if(ui(this)){var Rt=fst(this.g);z="";var ie=Rt.length,be=4==sd(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){Ws(this),Qr(this);var pi="";break e}this.h.i=new l.TextDecoder}for(ct=0;ct=z.j}function Cc(z){return z.h?1:z.g?z.g.size:0}function _3(z,ct){return z.h?z.h==ct:!!z.g&&z.g.has(ct)}function A3(z,ct){z.g?z.g.add(ct):z.h=ct}function Jrt(z,ct){z.h&&z.h==ct?z.h=null:z.g&&z.g.has(ct)&&z.g.delete(ct)}function qrt(z){if(null!=z.h)return z.i.concat(z.h.D);if(null!=z.g&&0!==z.g.size){let ct=z.i;for(const xt of z.g.values())ct=ct.concat(xt.D);return ct}return j(z.i)}function tst(z,ct){if(z.forEach&&"function"==typeof z.forEach)z.forEach(ct,void 0);else if(w(z)||"string"==typeof z)Array.prototype.forEach.call(z,ct,void 0);else for(var xt=function See(z){if(z.na&&"function"==typeof z.na)return z.na();if(!z.V||"function"!=typeof z.V){if(typeof Map<"u"&&z instanceof Map)return Array.from(z.keys());if(!(typeof Set<"u"&&z instanceof Set)){if(w(z)||"string"==typeof z){var ct=[];z=z.length;for(var xt=0;xtct)throw Error("Bad port number "+ct);z.s=ct}else z.s=null}function ist(z,ct,xt){ct instanceof _w?(z.i=ct,function Ree(z,ct){ct&&!z.j&&(Af(z),z.i=null,z.g.forEach(function(xt,Rt){var ie=Rt.toLowerCase();Rt!=ie&&(rst(this,Rt),ast(this,ie,xt))},z)),z.j=ct}(z.i,z.h)):(xt||(ct=Ew(ct,Mee)),z.i=new _w(ct,z.h))}function ss(z,ct,xt){z.i.set(ct,xt)}function CD(z){return ss(z,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),z}function Sw(z,ct){return z?ct?decodeURI(z.replace(/%25/g,"%2525")):decodeURIComponent(z):""}function Ew(z,ct,xt){return"string"==typeof z?(z=encodeURI(z).replace(ct,_ee),xt&&(z=z.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),z):null}function _ee(z){return"%"+((z=z.charCodeAt(0))>>4&15).toString(16)+(15&z).toString(16)}Wm.prototype.toString=function(){var z=[],ct=this.j;ct&&z.push(Ew(ct,nst,!0),":");var xt=this.g;return(xt||"file"==ct)&&(z.push("//"),(ct=this.o)&&z.push(Ew(ct,nst,!0),"@"),z.push(encodeURIComponent(String(xt)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(xt=this.s)&&z.push(":",String(xt))),(xt=this.l)&&(this.g&&"/"!=xt.charAt(0)&&z.push("/"),z.push(Ew(xt,"/"==xt.charAt(0)?Dee:Aee,!0))),(xt=this.i.toString())&&z.push("?",xt),(xt=this.m)&&z.push("#",Ew(xt,Iee)),z.join("")};var nst=/[#\/\?@]/g,Aee=/[#\?:]/g,Dee=/[#\?]/g,Mee=/[#\?@]/g,Iee=/#/g;function _w(z,ct){this.h=this.g=null,this.i=z||null,this.j=!!ct}function Af(z){z.g||(z.g=new Map,z.h=0,z.i&&function Eee(z,ct){if(z){z=z.split("&");for(var xt=0;xt{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Dw(this)),this.readyState=0},e.Sa=function(z){if(this.g&&(this.l=z,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=z.headers,this.readyState=2,Mw(this)),this.g&&(this.readyState=3,Mw(this),this.g)))if("arraybuffer"===this.responseType)z.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in z){if(this.j=z.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;ost(this)}else z.text().then(this.Ra.bind(this),this.ga.bind(this))},e.Pa=function(z){if(this.g){if(this.o&&z.value)this.response.push(z.value);else if(!this.o){var ct=z.value?z.value:new Uint8Array(0);(ct=this.v.decode(ct,{stream:!z.done}))&&(this.response=this.responseText+=ct)}z.done?Dw(this):Mw(this),3==this.readyState&&ost(this)}},e.Ra=function(z){this.g&&(this.response=this.responseText=z,Dw(this))},e.Qa=function(z){this.g&&(this.response=z,Dw(this))},e.ga=function(){this.g&&Dw(this)},e.setRequestHeader=function(z,ct){this.u.append(z,ct)},e.getResponseHeader=function(z){return this.h&&this.h.get(z.toLowerCase())||""},e.getAllResponseHeaders=function(){if(!this.h)return"";const z=[],ct=this.h.entries();for(var xt=ct.next();!xt.done;)z.push((xt=xt.value)[0]+": "+xt[1]),xt=ct.next();return z.join("\r\n")},Object.defineProperty(SD.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(z){this.m=z?"include":"same-origin"}}),U(Ds,ar);var Lee=/^https?$/i,Nee=["POST","PUT"];function cst(z,ct){z.h=!1,z.g&&(z.j=!0,z.g.abort(),z.j=!1),z.l=ct,z.m=5,ust(z),ED(z)}function ust(z){z.A||(z.A=!0,Qn(z,"complete"),Qn(z,"error"))}function hst(z){if(z.h&&typeof o<"u"&&(!z.v[1]||4!=sd(z)||2!=z.Z()))if(z.u&&4==sd(z))ko(z.Ea,0,z);else if(Qn(z,"readystatechange"),4==sd(z)){z.h=!1;try{const pi=z.Z();t:switch(pi){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var ct=!0;break t;default:ct=!1}var xt;if(!(xt=ct)){var Rt;if(Rt=0===pi){var ie=String(z.D).match(est)[1]||null;!ie&&l.self&&l.self.location&&(ie=l.self.location.protocol.slice(0,-1)),Rt=!Lee.test(ie?ie.toLowerCase():"")}xt=Rt}if(xt)Qn(z,"complete"),Qn(z,"success");else{z.m=6;try{var be=2{}:null;z.g=null,z.v=null,ct||Qn(z,"ready");try{xt.onreadystatechange=Rt}catch{}}}function dst(z){z.I&&(l.clearTimeout(z.I),z.I=null)}function sd(z){return z.g?z.g.readyState:0}function fst(z){try{if(!z.g)return null;if("response"in z.g)return z.g.response;switch(z.H){case"":case"text":return z.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in z.g)return z.g.mozResponseArrayBuffer}return null}catch{return null}}function Iw(z,ct,xt){return xt&&xt.internalChannelParams&&xt.internalChannelParams[z]||ct}function pst(z){this.Aa=0,this.i=[],this.j=new Gm,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=Iw("failFast",!1,z),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=Iw("baseRetryDelayMs",5e3,z),this.cb=Iw("retryDelaySeedMs",1e4,z),this.Wa=Iw("forwardChannelMaxRetries",2,z),this.wa=Iw("forwardChannelRequestTimeoutMs",2e4,z),this.pa=z&&z.xmlHttpFactory||void 0,this.Xa=z&&z.Tb||void 0,this.Ca=z&&z.useFetchStreams||!1,this.L=void 0,this.J=z&&z.supportsCrossDomainXhr||!1,this.K="",this.h=new Hu(z&&z.concurrentRequestLimit),this.Da=new Fee,this.P=z&&z.fastHandshake||!1,this.O=z&&z.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=z&&z.Rb||!1,z&&z.xa&&this.j.xa(),z&&z.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&z&&z.detectBufferingProxy||!1,this.ja=void 0,z&&z.longPollingTimeout&&0hr)be=Math.max(0,ie[eo].g-100),Vr=!1;else try{Oee(Fo,pi,"req"+hr+"_")}catch{Rt&&Rt(Fo)}}if(Vr){Rt=pi.join("&");break t}}}return z=z.i.splice(0,xt),ct.D=z,Rt}function yst(z){if(!z.g&&!z.u){z.Y=1;var ct=z.Fa;qt||Me(),_e||(qt(),_e=!0),ze.add(ct,z),z.v=0}}function I3(z){return!(z.g||z.u||3<=z.v||(z.Y++,z.u=zm(O(z.Fa,z),wst(z,z.v)),z.v++,0))}function R3(z){null!=z.A&&(l.clearTimeout(z.A),z.A=null)}function xst(z){z.g=new oe(z,z.j,"rpc",z.Y),null===z.m&&(z.g.H=z.o),z.g.O=0;var ct=rd(z.qa);ss(ct,"RID","rpc"),ss(ct,"SID",z.K),ss(ct,"AID",z.T),ss(ct,"CI",z.F?"0":"1"),!z.F&&z.ja&&ss(ct,"TO",z.ja),ss(ct,"TYPE","xmlhttp"),Rw(z,ct),z.m&&z.o&&D3(ct,z.m,z.o),z.L&&(z.g.I=z.L);var xt=z.g;z=z.ia,xt.L=1,xt.v=CD(rd(ct)),xt.m=null,xt.P=!0,Ei(xt,z)}function DD(z){null!=z.C&&(l.clearTimeout(z.C),z.C=null)}function bst(z,ct){var xt=null;if(z.g==ct){DD(z),R3(z),z.g=null;var Rt=2}else{if(!_3(z.h,ct))return;xt=ct.D,Jrt(z.h,ct),Rt=1}if(0!=z.G)if(ct.o)if(1==Rt){xt=ct.m?ct.m.length:0,ct=Date.now()-ct.F;var ie=z.B;Qn(Rt=Y0(),new $0(Rt,xt)),AD(z)}else yst(z);else if(3==(ie=ct.s)||0==ie&&0=z.h.j-(z.s?1:0)||(z.s?(z.i=ct.D.concat(z.i),0):1==z.G||2==z.G||z.B>=(z.Va?0:z.Wa)||(z.s=zm(O(z.Ga,z,ct),wst(z,z.B)),z.B++,0)))}(z,ct)||2==Rt&&I3(z)))switch(xt&&0{Rt.abort(),Df(0,0,!1,ct)},1e4);fetch(z,{signal:Rt.signal}).then(be=>{clearTimeout(ie),Df(0,0,!!be.ok,ct)}).catch(()=>{clearTimeout(ie),Df(0,0,!1,ct)})}(Rt.toString(),xt)}else to(2);z.G=0,z.l&&z.l.sa(ct),Tst(z),mst(z)}function Tst(z){if(z.G=0,z.ka=[],z.l){const ct=qrt(z.h);(0!=ct.length||0!=z.i.length)&&(W(z.ka,ct),W(z.ka,z.i),z.h.i.length=0,j(z.i),z.i.length=0),z.l.ra()}}function Cst(z,ct,xt){var Rt=xt instanceof Wm?rd(xt):new Wm(xt);if(""!=Rt.g)ct&&(Rt.g=ct+"."+Rt.g),TD(Rt,Rt.s);else{var ie=l.location;Rt=ie.protocol,ct=ct?ct+"."+ie.hostname:ie.hostname,ie=+ie.port;var be=new Wm(null);Rt&&wD(be,Rt),ct&&(be.g=ct),ie&&TD(be,ie),xt&&(be.l=xt),Rt=be}return ct=z.ya,(xt=z.D)&&ct&&ss(Rt,xt,ct),ss(Rt,"VER",z.la),Rw(z,Rt),Rt}function Sst(z,ct,xt){if(ct&&!z.J)throw Error("Can't create secondary domain capable XhrIo object.");return(ct=new Ds(z.Ca&&!z.pa?new Aw({eb:xt}):z.pa)).Ha(z.J),ct}function Est(){}function MD(){}function jl(z,ct){ar.call(this),this.g=new pst(ct),this.l=z,this.h=ct&&ct.messageUrlParams||null,z=ct&&ct.messageHeaders||null,ct&&ct.clientProtocolHeaderRequired&&(z?z["X-Client-Protocol"]="webchannel":z={"X-Client-Protocol":"webchannel"}),this.g.o=z,z=ct&&ct.initMessageHeaders||null,ct&&ct.messageContentType&&(z?z["X-WebChannel-Content-Type"]=ct.messageContentType:z={"X-WebChannel-Content-Type":ct.messageContentType}),ct&&ct.va&&(z?z["X-WebChannel-Client-Profile"]=ct.va:z={"X-WebChannel-Client-Profile":ct.va}),this.g.S=z,(z=ct&&ct.Sb)&&!rt(z)&&(this.g.m=z),this.v=ct&&ct.supportsCrossDomainXhr||!1,this.u=ct&&ct.sendRawJson||!1,(ct=ct&&ct.httpSessionIdParam)&&!rt(ct)&&(this.g.D=ct,null!==(z=this.h)&&ct in z&&ct in(z=this.h)&&delete z[ct]),this.j=new Z0(this)}function _st(z){_f.call(this),z.__headers__&&(this.headers=z.__headers__,this.statusCode=z.__status__,delete z.__headers__,delete z.__status__);var ct=z.__sm__;if(ct){t:{for(const xt in ct){z=xt;break t}z=void 0}(this.i=z)&&(z=this.i,ct=null!==ct&&z in ct?ct[z]:void 0),this.data=ct}else this.data=z}function Ast(){Cw.call(this),this.status=1}function Z0(z){this.g=z}(e=Ds.prototype).Ha=function(z){this.J=z},e.ea=function(z,ct,xt,Rt){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+z);ct=ct?ct.toUpperCase():"GET",this.D=z,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():ce.g(),this.v=function Tw(z){return z.h||(z.h=z.i())}(this.o?this.o:ce),this.g.onreadystatechange=O(this.Ea,this);try{this.B=!0,this.g.open(ct,String(z),!0),this.B=!1}catch(be){return void cst(this,be)}if(z=xt||"",xt=new Map(this.headers),Rt)if(Object.getPrototypeOf(Rt)===Object.prototype)for(var ie in Rt)xt.set(ie,Rt[ie]);else{if("function"!=typeof Rt.keys||"function"!=typeof Rt.get)throw Error("Unknown input type for opt_headers: "+String(Rt));for(const be of Rt.keys())xt.set(be,Rt.get(be))}Rt=Array.from(xt.keys()).find(be=>"content-type"==be.toLowerCase()),ie=l.FormData&&z instanceof l.FormData,!(0<=Array.prototype.indexOf.call(Nee,ct,void 0))||Rt||ie||xt.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[be,pi]of xt)this.g.setRequestHeader(be,pi);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{dst(this),this.u=!0,this.g.send(z),this.u=!1}catch(be){cst(this,be)}},e.abort=function(z){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=z||7,Qn(this,"complete"),Qn(this,"abort"),ED(this))},e.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),ED(this,!0)),Ds.aa.N.call(this)},e.Ea=function(){this.s||(this.B||this.u||this.j?hst(this):this.bb())},e.bb=function(){hst(this)},e.isActive=function(){return!!this.g},e.Z=function(){try{return 2=this.R)){var z=2*this.R;this.j.info("BP detection timer enabled: "+z),this.A=zm(O(this.ab,this),z)}},e.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,to(10),_D(this),xst(this))},e.Za=function(){null!=this.C&&(this.C=null,_D(this),I3(this),to(19))},e.fb=function(z){z?(this.j.info("Successfully pinged google.com"),to(2)):(this.j.info("Failed to ping google.com"),to(1))},e.isActive=function(){return!!this.l&&this.l.isActive(this)},(e=Est.prototype).ua=function(){},e.ta=function(){},e.sa=function(){},e.ra=function(){},e.isActive=function(){return!0},e.Na=function(){},MD.prototype.g=function(z,ct){return new jl(z,ct)},U(jl,ar),jl.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},jl.prototype.close=function(){M3(this.g)},jl.prototype.o=function(z){var ct=this.g;if("string"==typeof z){var xt={};xt.__data__=z,z=xt}else this.u&&((xt={}).__data__=Tc(z),z=xt);ct.i.push(new Hm(ct.Ya++,z)),3==ct.G&&AD(ct)},jl.prototype.N=function(){this.g.l=null,delete this.j,M3(this.g),delete this.g,jl.aa.N.call(this)},U(_st,_f),U(Ast,Cw),U(Z0,Est),Z0.prototype.ua=function(){Qn(this.g,"a")},Z0.prototype.ta=function(z){Qn(this.g,new _st(z))},Z0.prototype.sa=function(z){Qn(this.g,new Ast)},Z0.prototype.ra=function(){Qn(this.g,"b")},MD.prototype.createWebChannel=MD.prototype.g,jl.prototype.send=jl.prototype.o,jl.prototype.open=jl.prototype.m,jl.prototype.close=jl.prototype.close,M$=Ah.createWebChannelTransport=function(){return new MD},D$=Ah.getStatEventTarget=function(){return Y0()},A$=Ah.Event=id,wF=Ah.Stat={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},Nt.NO_ERROR=0,Nt.TIMEOUT=8,Nt.HTTP_ERROR=6,jE=Ah.ErrorCode=Nt,Vt.COMPLETE="complete",_$=Ah.EventType=Vt,vD.EventType=Vm,Vm.OPEN="a",Vm.CLOSE="b",Vm.ERROR="c",Vm.MESSAGE="d",ar.prototype.listen=ar.prototype.K,wb=Ah.WebChannel=vD,E$=Ah.FetchXmlHttpFactory=Aw,Ds.prototype.listenOnce=Ds.prototype.L,Ds.prototype.getLastError=Ds.prototype.Ka,Ds.prototype.getLastErrorCode=Ds.prototype.Ba,Ds.prototype.getStatus=Ds.prototype.Z,Ds.prototype.getResponseJson=Ds.prototype.Oa,Ds.prototype.getResponseText=Ds.prototype.oa,Ds.prototype.send=Ds.prototype.ea,Ds.prototype.setWithCredentials=Ds.prototype.Ha,S$=Ah.XhrIo=Ds}).apply(typeof WE<"u"?WE:typeof self<"u"?self:typeof window<"u"?window:{});const I$="@firebase/firestore";class Ra{constructor(i){this.uid=i}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(i){return i.uid===this.uid}}Ra.UNAUTHENTICATED=new Ra(null),Ra.GOOGLE_CREDENTIALS=new Ra("google-credentials-uid"),Ra.FIRST_PARTY=new Ra("first-party-uid"),Ra.MOCK_USER=new Ra("mock-user");let kv="10.12.3";const Xd=new a$("@firebase/firestore");function Fv(){return Xd.logLevel}function Be(e,...i){if(Xd.logLevel<=Jn.DEBUG){const t=i.map(TF);Xd.debug(`Firestore (${kv}): ${e}`,...t)}}function Os(e,...i){if(Xd.logLevel<=Jn.ERROR){const t=i.map(TF);Xd.error(`Firestore (${kv}): ${e}`,...t)}}function Fl(e,...i){if(Xd.logLevel<=Jn.WARN){const t=i.map(TF);Xd.warn(`Firestore (${kv}): ${e}`,...t)}}function TF(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return e}}function Ti(e="Unexpected state"){const i=`FIRESTORE (${kv}) INTERNAL ASSERTION FAILED: `+e;throw Os(i),new Error(i)}function Fi(e,i){e||Ti()}function di(e,i){return e}const ge={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 Ve extends Pv{constructor(i,t){super(i,t),this.code=i,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class ya{constructor(){this.promise=new Promise((i,t)=>{this.resolve=i,this.reject=t})}}class R${constructor(i,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${i}`)}}class jFt{getToken(){return Promise.resolve(null)}invalidateToken(){}start(i,t){i.enqueueRetryable(()=>t(Ra.UNAUTHENTICATED))}shutdown(){}}class XFt{constructor(i){this.token=i,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(i,t){this.changeListener=t,i.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class YFt{constructor(i){this.t=i,this.currentUser=Ra.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(i,t){var n=this;let r=this.i;const s=E=>this.i!==r?(r=this.i,t(E)):Promise.resolve();let o=new ya;this.o=()=>{this.i++,this.currentUser=this.u(),o.resolve(),o=new ya,i.enqueueRetryable(()=>s(this.currentUser))};const l=()=>{const E=o;i.enqueueRetryable(we(function*(){yield E.promise,yield s(n.currentUser)}))},w=E=>{Be("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=E,this.auth.addAuthTokenListener(this.o),l()};this.t.onInit(E=>w(E)),setTimeout(()=>{if(!this.auth){const E=this.t.getImmediate({optional:!0});E?w(E):(Be("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new ya)}},0),l()}getToken(){const i=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(n=>this.i!==i?(Be("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):n?(Fi("string"==typeof n.accessToken),new R$(n.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const i=this.auth&&this.auth.getUid();return Fi(null===i||"string"==typeof i),new Ra(i)}}class $Ft{constructor(i,t,n){this.l=i,this.h=t,this.P=n,this.type="FirstParty",this.user=Ra.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const i=this.T();return i&&this.I.set("Authorization",i),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class QFt{constructor(i,t,n){this.l=i,this.h=t,this.P=n}getToken(){return Promise.resolve(new $Ft(this.l,this.h,this.P))}start(i,t){i.enqueueRetryable(()=>t(Ra.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class P${constructor(i){this.value=i,this.type="AppCheck",this.headers=new Map,i&&i.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class KFt{constructor(i){this.A=i,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(i,t){const n=s=>{null!=s.error&&Be("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,Be("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?t(s.token):Promise.resolve()};this.o=s=>{i.enqueueRetryable(()=>n(s))};const r=s=>{Be("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>r(s)),setTimeout(()=>{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?r(s):Be("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const i=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(i).then(t=>t?(Fi("string"==typeof t.token),this.R=t.token,new P$(t.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function ZFt(e){const i=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(e);if(i&&"function"==typeof i.getRandomValues)i.getRandomValues(t);else for(let n=0;ni?1:0}function Ov(e,i,t){return e.length===i.length&&e.every((n,r)=>t(n,i[r]))}class us{constructor(i,t){if(this.seconds=i,this.nanoseconds=t,t<0)throw new Ve(ge.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new Ve(ge.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(i<-62135596800)throw new Ve(ge.INVALID_ARGUMENT,"Timestamp seconds out of range: "+i);if(i>=253402300800)throw new Ve(ge.INVALID_ARGUMENT,"Timestamp seconds out of range: "+i)}static now(){return us.fromMillis(Date.now())}static fromDate(i){return us.fromMillis(i.getTime())}static fromMillis(i){const t=Math.floor(i/1e3),n=Math.floor(1e6*(i-1e3*t));return new us(t,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(i){return this.seconds===i.seconds?cn(this.nanoseconds,i.nanoseconds):cn(this.seconds,i.seconds)}isEqual(i){return i.seconds===this.seconds&&i.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 Oi{constructor(i){this.timestamp=i}static fromTimestamp(i){return new Oi(i)}static min(){return new Oi(new us(0,0))}static max(){return new Oi(new us(253402300799,999999999))}compareTo(i){return this.timestamp._compareTo(i.timestamp)}isEqual(i){return this.timestamp.isEqual(i.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class Tb{constructor(i,t,n){void 0===t?t=0:t>i.length&&Ti(),void 0===n?n=i.length-t:n>i.length-t&&Ti(),this.segments=i,this.offset=t,this.len=n}get length(){return this.len}isEqual(i){return 0===Tb.comparator(this,i)}child(i){const t=this.segments.slice(this.offset,this.limit());return i instanceof Tb?i.forEach(n=>{t.push(n)}):t.push(i),this.construct(t)}limit(){return this.offset+this.length}popFirst(i){return this.construct(this.segments,this.offset+(i=void 0===i?1:i),this.length-i)}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(i){return this.segments[this.offset+i]}isEmpty(){return 0===this.length}isPrefixOf(i){if(i.lengtho)return 1}return i.lengtht.length?1:0}}class Wn extends Tb{construct(i,t,n){return new Wn(i,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...i){const t=[];for(const n of i){if(n.indexOf("//")>=0)throw new Ve(ge.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter(r=>r.length>0))}return new Wn(t)}static emptyPath(){return new Wn([])}}const JFt=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class hs extends Tb{construct(i,t,n){return new hs(i,t,n)}static isValidIdentifier(i){return JFt.test(i)}canonicalString(){return this.toArray().map(i=>(i=i.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),hs.isValidIdentifier(i)||(i="`"+i+"`"),i)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new hs(["__name__"])}static fromServerFormat(i){const t=[];let n="",r=0;const s=()=>{if(0===n.length)throw new Ve(ge.INVALID_ARGUMENT,`Invalid field path (${i}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let o=!1;for(;r=2&&this.path.get(this.path.length-2)===i}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(i){return null!==i&&0===Wn.comparator(this.path,i.path)}toString(){return this.path.toString()}static comparator(i,t){return Wn.comparator(i.path,t.path)}static isDocumentKey(i){return i.length%2==0}static fromSegments(i){return new gi(new Wn(i.slice()))}}class Ol{constructor(i,t,n){this.readTime=i,this.documentKey=t,this.largestBatchId=n}static min(){return new Ol(Oi.min(),gi.empty(),-1)}static max(){return new Ol(Oi.max(),gi.empty(),-1)}}function SF(e,i){let t=e.readTime.compareTo(i.readTime);return 0!==t?t:(t=gi.comparator(e.documentKey,i.documentKey),0!==t?t:cn(e.largestBatchId,i.largestBatchId))}const N$="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class B${constructor(){this.onCommittedListeners=[]}addOnCommittedListener(i){this.onCommittedListeners.push(i)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(i=>i())}}function Yd(e){return EF.apply(this,arguments)}function EF(){return(EF=we(function*(e){if(e.code!==ge.FAILED_PRECONDITION||e.message!==N$)throw e;Be("LocalStore","Unexpectedly lost primary lease")})).apply(this,arguments)}class se{constructor(i){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,i(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(i){return this.next(void 0,i)}next(i,t){return this.callbackAttached&&Ti(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(i,this.result):new se((n,r)=>{this.nextCallback=s=>{this.wrapSuccess(i,s).next(n,r)},this.catchCallback=s=>{this.wrapFailure(t,s).next(n,r)}})}toPromise(){return new Promise((i,t)=>{this.next(i,t)})}wrapUserFunction(i){try{const t=i();return t instanceof se?t:se.resolve(t)}catch(t){return se.reject(t)}}wrapSuccess(i,t){return i?this.wrapUserFunction(()=>i(t)):se.resolve(t)}wrapFailure(i,t){return i?this.wrapUserFunction(()=>i(t)):se.reject(t)}static resolve(i){return new se((t,n)=>{t(i)})}static reject(i){return new se((t,n)=>{n(i)})}static waitFor(i){return new se((t,n)=>{let r=0,s=0,o=!1;i.forEach(l=>{++r,l.next(()=>{++s,o&&s===r&&t()},w=>n(w))}),o=!0,s===r&&t()})}static or(i){let t=se.resolve(!1);for(const n of i)t=t.next(r=>r?se.resolve(r):n());return t}static forEach(i,t){const n=[];return i.forEach((r,s)=>{n.push(t.call(this,r,s))}),this.waitFor(n)}static mapArray(i,t){return new se((n,r)=>{const s=i.length,o=new Array(s);let l=0;for(let w=0;w{o[E]=D,++l,l===s&&n(o)},D=>r(D))}})}static doWhile(i,t){return new se((n,r)=>{const s=()=>{!0===i()?t().next(()=>{s()},r):n()};s()})}}function $d(e){return"IndexedDbTransactionError"===e.name}let Ll=(()=>{class e{constructor(t,n){this.previousValue=t,n&&(n.sequenceNumberHandler=r=>this.ie(r),this.se=r=>n.writeSequenceNumber(r))}ie(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue}next(){const t=++this.previousValue;return this.se&&this.se(t),t}}return e.oe=-1,e})();function Sb(e){return null==e}function Eb(e){return 0===e&&1/e==-1/0}function Q$(e){let i=0;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&i++;return i}function Qd(e,i){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&i(t,e[t])}function Z$(e){for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i))return!1;return!0}class Yr{constructor(i,t){this.comparator=i,this.root=t||$a.EMPTY}insert(i,t){return new Yr(this.comparator,this.root.insert(i,t,this.comparator).copy(null,null,$a.BLACK,null,null))}remove(i){return new Yr(this.comparator,this.root.remove(i,this.comparator).copy(null,null,$a.BLACK,null,null))}get(i){let t=this.root;for(;!t.isEmpty();){const n=this.comparator(i,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(i){let t=0,n=this.root;for(;!n.isEmpty();){const r=this.comparator(i,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.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(i){return this.root.inorderTraversal(i)}forEach(i){this.inorderTraversal((t,n)=>(i(t,n),!1))}toString(){const i=[];return this.inorderTraversal((t,n)=>(i.push(`${t}:${n}`),!1)),`{${i.join(", ")}}`}reverseTraversal(i){return this.root.reverseTraversal(i)}getIterator(){return new $E(this.root,null,this.comparator,!1)}getIteratorFrom(i){return new $E(this.root,i,this.comparator,!1)}getReverseIterator(){return new $E(this.root,null,this.comparator,!0)}getReverseIteratorFrom(i){return new $E(this.root,i,this.comparator,!0)}}class $E{constructor(i,t,n,r){this.isReverse=r,this.nodeStack=[];let s=1;for(;!i.isEmpty();)if(s=t?n(i.key,t):1,t&&r&&(s*=-1),s<0)i=this.isReverse?i.left:i.right;else{if(0===s){this.nodeStack.push(i);break}this.nodeStack.push(i),i=this.isReverse?i.right:i.left}}getNext(){let i=this.nodeStack.pop();const t={key:i.key,value:i.value};if(this.isReverse)for(i=i.left;!i.isEmpty();)this.nodeStack.push(i),i=i.right;else for(i=i.right;!i.isEmpty();)this.nodeStack.push(i),i=i.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const i=this.nodeStack[this.nodeStack.length-1];return{key:i.key,value:i.value}}}class $a{constructor(i,t,n,r,s){this.key=i,this.value=t,this.color=n??$a.RED,this.left=r??$a.EMPTY,this.right=s??$a.EMPTY,this.size=this.left.size+1+this.right.size}copy(i,t,n,r,s){return new $a(i??this.key,t??this.value,n??this.color,r??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(i){return this.left.inorderTraversal(i)||i(this.key,this.value)||this.right.inorderTraversal(i)}reverseTraversal(i){return this.right.reverseTraversal(i)||i(this.key,this.value)||this.left.reverseTraversal(i)}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(i,t,n){let r=this;const s=n(i,r.key);return r=s<0?r.copy(null,null,null,r.left.insert(i,t,n),null):0===s?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(i,t,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return $a.EMPTY;let i=this;return i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.removeMin(),null),i.fixUp()}remove(i,t){let n,r=this;if(t(i,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(i,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(i,r.key)){if(r.right.isEmpty())return $a.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(i,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let i=this;return i.right.isRed()&&!i.left.isRed()&&(i=i.rotateLeft()),i.left.isRed()&&i.left.left.isRed()&&(i=i.rotateRight()),i.left.isRed()&&i.right.isRed()&&(i=i.colorFlip()),i}moveRedLeft(){let i=this.colorFlip();return i.right.left.isRed()&&(i=i.copy(null,null,null,null,i.right.rotateRight()),i=i.rotateLeft(),i=i.colorFlip()),i}moveRedRight(){let i=this.colorFlip();return i.left.left.isRed()&&(i=i.rotateRight(),i=i.colorFlip()),i}rotateLeft(){const i=this.copy(null,null,$a.RED,null,this.right.left);return this.right.copy(null,null,this.color,i,null)}rotateRight(){const i=this.copy(null,null,$a.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,i)}colorFlip(){const i=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,i,t)}checkMaxDepth(){const i=this.check();return Math.pow(2,i)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw Ti();const i=this.left.check();if(i!==this.right.check())throw Ti();return i+(this.isRed()?0:1)}}$a.EMPTY=null,$a.RED=!0,$a.BLACK=!1,$a.EMPTY=new class{constructor(){this.size=0}get key(){throw Ti()}get value(){throw Ti()}get color(){throw Ti()}get left(){throw Ti()}get right(){throw Ti()}copy(i,t,n,r,s){return this}insert(i,t,n){return new $a(i,t)}remove(i,t){return this}isEmpty(){return!0}inorderTraversal(i){return!1}reverseTraversal(i){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class Pr{constructor(i){this.comparator=i,this.data=new Yr(this.comparator)}has(i){return null!==this.data.get(i)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(i){return this.data.indexOf(i)}forEach(i){this.data.inorderTraversal((t,n)=>(i(t),!1))}forEachInRange(i,t){const n=this.data.getIteratorFrom(i[0]);for(;n.hasNext();){const r=n.getNext();if(this.comparator(r.key,i[1])>=0)return;t(r.key)}}forEachWhile(i,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!i(n.getNext().key))return}firstAfterOrEqual(i){const t=this.data.getIteratorFrom(i);return t.hasNext()?t.getNext().key:null}getIterator(){return new J$(this.data.getIterator())}getIteratorFrom(i){return new J$(this.data.getIteratorFrom(i))}add(i){return this.copy(this.data.remove(i).insert(i,!0))}delete(i){return this.has(i)?this.copy(this.data.remove(i)):this}isEmpty(){return this.data.isEmpty()}unionWith(i){let t=this;return t.size{t=t.add(n)}),t}isEqual(i){if(!(i instanceof Pr)||this.size!==i.size)return!1;const t=this.data.getIterator(),n=i.data.getIterator();for(;t.hasNext();){const r=t.getNext().key,s=n.getNext().key;if(0!==this.comparator(r,s))return!1}return!0}toArray(){const i=[];return this.forEach(t=>{i.push(t)}),i}toString(){const i=[];return this.forEach(t=>i.push(t)),"SortedSet("+i.toString()+")"}copy(i){const t=new Pr(this.comparator);return t.data=i,t}}class J${constructor(i){this.iter=i}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class cl{constructor(i){this.fields=i,i.sort(hs.comparator)}static empty(){return new cl([])}unionWith(i){let t=new Pr(hs.comparator);for(const n of this.fields)t=t.add(n);for(const n of i)t=t.add(n);return new cl(t.toArray())}covers(i){for(const t of this.fields)if(t.isPrefixOf(i))return!0;return!1}isEqual(i){return Ov(this.fields,i.fields,(t,n)=>t.isEqual(n))}}class q$ extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class xa{constructor(i){this.binaryString=i}static fromBase64String(i){const t=function(r){try{return atob(r)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new q$("Invalid base64 string: "+s):s}}(i);return new xa(t)}static fromUint8Array(i){const t=function(r){let s="";for(let o=0;oiEu(t,i))}function Jd(e,i){if(e===i)return 0;const t=Zd(e),n=Zd(i);if(t!==n)return cn(t,n);switch(t){case 0:case 9007199254740991:return 0;case 1:return cn(e.booleanValue,i.booleanValue);case 2:return function(s,o){const l=Es(s.integerValue||s.doubleValue),w=Es(o.integerValue||o.doubleValue);return lw?1:l===w?0:isNaN(l)?isNaN(w)?0:-1:1}(e,i);case 3:return tQ(e.timestampValue,i.timestampValue);case 4:return tQ(_b(e),_b(i));case 5:return cn(e.stringValue,i.stringValue);case 6:return function(s,o){const l=Mh(s),w=Mh(o);return l.compareTo(w)}(e.bytesValue,i.bytesValue);case 7:return function(s,o){const l=s.split("/"),w=o.split("/");for(let E=0;Ei.mapValue.fields[t]=Mb(n)),i}if(e.arrayValue){const i={arrayValue:{values:[]}};for(let t=0;t<(e.arrayValue.values||[]).length;++t)i.arrayValue.values[t]=Mb(e.arrayValue.values[t]);return i}return Object.assign({},e)}function nQ(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}class Qa{constructor(i){this.value=i}static empty(){return new Qa({mapValue:{}})}field(i){if(i.isEmpty())return this.value;{let t=this.value;for(let n=0;n{if(!t.isImmediateParentOf(l)){const w=this.getFieldsMap(t);this.applyChanges(w,n,r),n={},r=[],t=l.popLast()}o?n[l.lastSegment()]=Mb(o):r.push(l.lastSegment())});const s=this.getFieldsMap(t);this.applyChanges(s,n,r)}delete(i){const t=this.field(i.popLast());qE(t)&&t.mapValue.fields&&delete t.mapValue.fields[i.lastSegment()]}isEqual(i){return Eu(this.value,i.value)}getFieldsMap(i){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;ni[r]=s);for(const r of n)delete i[r]}clone(){return new Qa(Mb(this.value))}}function aQ(e){const i=[];return Qd(e.fields,(t,n)=>{const r=new hs([t]);if(qE(n)){const s=aQ(n.mapValue).fields;if(0===s.length)i.push(r);else for(const o of s)i.push(r.child(o))}else i.push(r)}),new cl(i)}class ts{constructor(i,t,n,r,s,o,l){this.key=i,this.documentType=t,this.version=n,this.readTime=r,this.createTime=s,this.data=o,this.documentState=l}static newInvalidDocument(i){return new ts(i,0,Oi.min(),Oi.min(),Oi.min(),Qa.empty(),0)}static newFoundDocument(i,t,n,r){return new ts(i,1,t,Oi.min(),n,r,0)}static newNoDocument(i,t){return new ts(i,2,t,Oi.min(),Oi.min(),Qa.empty(),0)}static newUnknownDocument(i,t){return new ts(i,3,t,Oi.min(),Oi.min(),Qa.empty(),2)}convertToFoundDocument(i,t){return!this.createTime.isEqual(Oi.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=i),this.version=i,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(i){return this.version=i,this.documentType=2,this.data=Qa.empty(),this.documentState=0,this}convertToUnknownDocument(i){return this.version=i,this.documentType=3,this.data=Qa.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Oi.min(),this}setReadTime(i){return this.readTime=i,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(i){return i instanceof ts&&this.key.isEqual(i.key)&&this.version.isEqual(i.version)&&this.documentType===i.documentType&&this.documentState===i.documentState&&this.data.isEqual(i.data)}mutableCopy(){return new ts(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class qd{constructor(i,t){this.position=i,this.inclusive=t}}function oQ(e,i,t){let n=0;for(let r=0;r":return i>0;case">=":return i>=0;default:return Ti()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Er extends cQ{constructor(i,t){super(),this.filters=i,this.op=t,this.ae=null}static create(i,t){return new Er(i,t)}matches(i){return Uv(this)?void 0===this.filters.find(t=>!t.matches(i)):void 0!==this.filters.find(t=>t.matches(i))}getFlattenedFilters(){return null!==this.ae||(this.ae=this.filters.reduce((i,t)=>i.concat(t.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function Uv(e){return"and"===e.op}function RF(e){return function uQ(e){for(const i of e.filters)if(i instanceof Er)return!1;return!0}(e)&&Uv(e)}function PF(e){if(e instanceof jn)return e.field.canonicalString()+e.op.toString()+Vv(e.value);if(RF(e))return e.filters.map(i=>PF(i)).join(",");{const i=e.filters.map(t=>PF(t)).join(",");return`${e.op}(${i})`}}function hQ(e,i){return e instanceof jn?(n=e,(r=i)instanceof jn&&n.op===r.op&&n.field.isEqual(r.field)&&Eu(n.value,r.value)):e instanceof Er?function(n,r){return r instanceof Er&&n.op===r.op&&n.filters.length===r.filters.length&&n.filters.reduce((s,o,l)=>s&&hQ(o,r.filters[l]),!0)}(e,i):void Ti();var n,r}function fQ(e){return e instanceof jn?`${(t=e).field.canonicalString()} ${t.op} ${Vv(t.value)}`:e instanceof Er?function(t){return t.op.toString()+" {"+t.getFilters().map(fQ).join(" ,")+"}"}(e):"Filter";var t}class DOt extends jn{constructor(i,t,n){super(i,t,n),this.key=gi.fromName(n.referenceValue)}matches(i){const t=gi.comparator(i.key,this.key);return this.matchesComparison(t)}}class MOt extends jn{constructor(i,t){super(i,"in",t),this.keys=pQ(0,t)}matches(i){return this.keys.some(t=>t.isEqual(i.key))}}class IOt extends jn{constructor(i,t){super(i,"not-in",t),this.keys=pQ(0,t)}matches(i){return!this.keys.some(t=>t.isEqual(i.key))}}function pQ(e,i){var t;return((null===(t=i.arrayValue)||void 0===t?void 0:t.values)||[]).map(n=>gi.fromName(n.referenceValue))}class ROt extends jn{constructor(i,t){super(i,"array-contains",t)}matches(i){const t=i.data.field(this.field);return Db(t)&&Ab(t.arrayValue,this.value)}}class mQ extends jn{constructor(i,t){super(i,"in",t)}matches(i){const t=i.data.field(this.field);return null!==t&&Ab(this.value.arrayValue,t)}}class POt extends jn{constructor(i,t){super(i,"not-in",t)}matches(i){if(Ab(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=i.data.field(this.field);return null!==t&&!Ab(this.value.arrayValue,t)}}class kOt extends jn{constructor(i,t){super(i,"array-contains-any",t)}matches(i){const t=i.data.field(this.field);return!(!Db(t)||!t.arrayValue.values)&&t.arrayValue.values.some(n=>Ab(this.value.arrayValue,n))}}class FOt{constructor(i,t=null,n=[],r=[],s=null,o=null,l=null){this.path=i,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=s,this.startAt=o,this.endAt=l,this.ue=null}}function kF(e,i=null,t=[],n=[],r=null,s=null,o=null){return new FOt(e,i,t,n,r,s,o)}function Vp(e){const i=di(e);if(null===i.ue){let t=i.path.canonicalString();null!==i.collectionGroup&&(t+="|cg:"+i.collectionGroup),t+="|f:",t+=i.filters.map(n=>PF(n)).join(","),t+="|ob:",t+=i.orderBy.map(n=>{return(s=n).field.canonicalString()+s.dir;var s}).join(","),Sb(i.limit)||(t+="|l:",t+=i.limit),i.startAt&&(t+="|lb:",t+=i.startAt.inclusive?"b:":"a:",t+=i.startAt.position.map(n=>Vv(n)).join(",")),i.endAt&&(t+="|ub:",t+=i.endAt.inclusive?"a:":"b:",t+=i.endAt.position.map(n=>Vv(n)).join(",")),i.ue=t}return i.ue}function Rb(e,i){if(e.limit!==i.limit||e.orderBy.length!==i.orderBy.length)return!1;for(let t=0;t0?i.explicitOrderBy[i.explicitOrderBy.length-1].dir:"asc";(function(o){let l=new Pr(hs.comparator);return o.filters.forEach(w=>{w.getFlattenedFilters().forEach(E=>{E.isInequality()&&(l=l.add(E.field))})}),l})(i).forEach(s=>{t.has(s.canonicalString())||s.isKeyField()||i.ce.push(new Ib(s,n))}),t.has(hs.keyField().canonicalString())||i.ce.push(new Ib(hs.keyField(),n))}return i.ce}function po(e){const i=di(e);return i.le||(i.le=function wQ(e,i){if("F"===e.limitType)return kF(e.path,e.collectionGroup,i,e.filters,e.limit,e.startAt,e.endAt);{i=i.map(r=>new Ib(r.field,"desc"===r.dir?"asc":"desc"));const t=e.endAt?new qd(e.endAt.position,e.endAt.inclusive):null,n=e.startAt?new qd(e.startAt.position,e.startAt.inclusive):null;return kF(e.path,e.collectionGroup,i,e.filters,e.limit,t,n)}}(i,Gv(e))),i.le}function OF(e,i){const t=e.filters.concat([i]);return new Ih(e.path,e.collectionGroup,e.explicitOrderBy.slice(),t,e.limit,e.limitType,e.startAt,e.endAt)}function i_(e,i,t){return new Ih(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),i,t,e.startAt,e.endAt)}function Pb(e,i){return Rb(po(e),po(i))&&e.limitType===i.limitType}function TQ(e){return`${Vp(po(e))}|lt:${e.limitType}`}function Hv(e){return`Query(target=${function(t){let n=t.path.canonicalString();return null!==t.collectionGroup&&(n+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(n+=`, filters: [${t.filters.map(r=>fQ(r)).join(", ")}]`),Sb(t.limit)||(n+=", limit: "+t.limit),t.orderBy.length>0&&(n+=`, orderBy: [${t.orderBy.map(r=>{return`${(o=r).field.canonicalString()} (${o.dir})`;var o}).join(", ")}]`),t.startAt&&(n+=", startAt: ",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map(r=>Vv(r)).join(",")),t.endAt&&(n+=", endAt: ",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map(r=>Vv(r)).join(",")),`Target(${n})`}(po(e))}; limitType=${e.limitType})`}function kb(e,i){return i.isFoundDocument()&&function(n,r){const s=r.key.path;return null!==n.collectionGroup?r.key.hasCollectionId(n.collectionGroup)&&n.path.isPrefixOf(s):gi.isDocumentKey(n.path)?n.path.isEqual(s):n.path.isImmediateParentOf(s)}(e,i)&&function(n,r){for(const s of Gv(n))if(!s.field.isKeyField()&&null===r.data.field(s.field))return!1;return!0}(e,i)&&function(n,r){for(const s of n.filters)if(!s.matches(r))return!1;return!0}(e,i)&&(r=i,!((n=e).startAt&&!function(o,l,w){const E=oQ(o,l,w);return o.inclusive?E<=0:E<0}(n.startAt,Gv(n),r)||n.endAt&&!function(o,l,w){const E=oQ(o,l,w);return o.inclusive?E>=0:E>0}(n.endAt,Gv(n),r)));var n,r}function SQ(e){return(i,t)=>{let n=!1;for(const r of Gv(e)){const s=OOt(r,i,t);if(0!==s)return s;n=n||r.field.isKeyField()}return 0}}function OOt(e,i,t){const n=e.field.isKeyField()?gi.comparator(i.key,t.key):function(s,o,l){const w=o.data.field(s),E=l.data.field(s);return null!==w&&null!==E?Jd(w,E):Ti()}(e.field,i,t);switch(e.dir){case"asc":return n;case"desc":return-1*n;default:return Ti()}}class Rh{constructor(i,t){this.mapKeyFn=i,this.equalsFn=t,this.inner={},this.innerSize=0}get(i){const t=this.mapKeyFn(i),n=this.inner[t];if(void 0!==n)for(const[r,s]of n)if(this.equalsFn(r,i))return s}has(i){return void 0!==this.get(i)}set(i,t){const n=this.mapKeyFn(i),r=this.inner[n];if(void 0===r)return this.inner[n]=[[i,t]],void this.innerSize++;for(let s=0;s{for(const[r,s]of n)i(r,s)})}isEmpty(){return Z$(this.inner)}size(){return this.innerSize}}const LOt=new Yr(gi.comparator);function ul(){return LOt}const EQ=new Yr(gi.comparator);function Fb(...e){let i=EQ;for(const t of e)i=i.insert(t.key,t);return i}function _Q(e){let i=EQ;return e.forEach((t,n)=>i=i.insert(t,n.overlayedDocument)),i}function _u(){return Ob()}function AQ(){return Ob()}function Ob(){return new Rh(e=>e.toString(),(e,i)=>e.isEqual(i))}const NOt=new Yr(gi.comparator),BOt=new Pr(gi.comparator);function Cn(...e){let i=BOt;for(const t of e)i=i.add(t);return i}const VOt=new Pr(cn);function DQ(e,i){if(e.useProto3Json){if(isNaN(i))return{doubleValue:"NaN"};if(i===1/0)return{doubleValue:"Infinity"};if(i===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Eb(i)?"-0":i}}function MQ(e){return{integerValue:""+e}}function IQ(e,i){return function z$(e){return"number"==typeof e&&Number.isInteger(e)&&!Eb(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}(i)?MQ(i):DQ(e,i)}class n_{constructor(){this._=void 0}}function UOt(e,i,t){return e instanceof Wv?function(r,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return s&&QE(s)&&(s=KE(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(t,i):e instanceof Up?PQ(e,i):e instanceof zp?kQ(e,i):function(r,s){const o=RQ(r,s),l=FQ(o)+FQ(r.Pe);return MF(o)&&MF(r.Pe)?MQ(l):DQ(r.serializer,l)}(e,i)}function zOt(e,i,t){return e instanceof Up?PQ(e,i):e instanceof zp?kQ(e,i):t}function RQ(e,i){return e instanceof jv?MF(n=i)||(s=n)&&"doubleValue"in s?i:{integerValue:0}:null;var n,s}class Wv extends n_{}class Up extends n_{constructor(i){super(),this.elements=i}}function PQ(e,i){const t=OQ(i);for(const n of e.elements)t.some(r=>Eu(r,n))||t.push(n);return{arrayValue:{values:t}}}class zp extends n_{constructor(i){super(),this.elements=i}}function kQ(e,i){let t=OQ(i);for(const n of e.elements)t=t.filter(r=>!Eu(r,n));return{arrayValue:{values:t}}}class jv extends n_{constructor(i,t){super(),this.serializer=i,this.Pe=t}}function FQ(e){return Es(e.integerValue||e.doubleValue)}function OQ(e){return Db(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class HOt{constructor(i,t){this.version=i,this.transformResults=t}}class ds{constructor(i,t){this.updateTime=i,this.exists=t}static none(){return new ds}static exists(i){return new ds(void 0,i)}static updateTime(i){return new ds(i)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(i){return this.exists===i.exists&&(this.updateTime?!!i.updateTime&&this.updateTime.isEqual(i.updateTime):!i.updateTime)}}function r_(e,i){return void 0!==e.updateTime?i.isFoundDocument()&&i.version.isEqual(e.updateTime):void 0===e.exists||e.exists===i.isFoundDocument()}class s_{}function LQ(e,i){if(!e.hasLocalMutations||i&&0===i.fields.length)return null;if(null===i)return e.isNoDocument()?new Yv(e.key,ds.none()):new Xv(e.key,e.data,ds.none());{const t=e.data,n=Qa.empty();let r=new Pr(hs.comparator);for(let s of i.fields)if(!r.has(s)){let o=t.field(s);null===o&&s.length>1&&(s=s.popLast(),o=t.field(s)),null===o?n.delete(s):n.set(s,o),r=r.add(s)}return new Ph(e.key,n,new cl(r.toArray()),ds.none())}}function WOt(e,i,t){e instanceof Xv?function(r,s,o){const l=r.value.clone(),w=VQ(r.fieldTransforms,s,o.transformResults);l.setAll(w),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(e,i,t):e instanceof Ph?function(r,s,o){if(!r_(r.precondition,s))return void s.convertToUnknownDocument(o.version);const l=VQ(r.fieldTransforms,s,o.transformResults),w=s.data;w.setAll(BQ(r)),w.setAll(l),s.convertToFoundDocument(o.version,w).setHasCommittedMutations()}(e,i,t):i.convertToNoDocument(t.version).setHasCommittedMutations()}function Nb(e,i,t,n){return e instanceof Xv?function(s,o,l,w){if(!r_(s.precondition,o))return l;const E=s.value.clone(),D=UQ(s.fieldTransforms,w,o);return E.setAll(D),o.convertToFoundDocument(o.version,E).setHasLocalMutations(),null}(e,i,t,n):e instanceof Ph?function(s,o,l,w){if(!r_(s.precondition,o))return l;const E=UQ(s.fieldTransforms,w,o),D=o.data;return D.setAll(BQ(s)),D.setAll(E),o.convertToFoundDocument(o.version,D).setHasLocalMutations(),null===l?null:l.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(k=>k.field))}(e,i,t,n):(l=t,r_(e.precondition,o=i)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):l);var o,l}function jOt(e,i){let t=null;for(const n of e.fieldTransforms){const r=i.data.field(n.field),s=RQ(n.transform,r||null);null!=s&&(null===t&&(t=Qa.empty()),t.set(n.field,s))}return t||null}function NQ(e,i){return e.type===i.type&&!!e.key.isEqual(i.key)&&!!e.precondition.isEqual(i.precondition)&&(r=i.fieldTransforms,!!(void 0===(n=e.fieldTransforms)&&void 0===r||n&&r&&Ov(n,r,(s,o)=>function GOt(e,i){return e.field.isEqual(i.field)&&(r=i.transform,(n=e.transform)instanceof Up&&r instanceof Up||n instanceof zp&&r instanceof zp?Ov(n.elements,r.elements,Eu):n instanceof jv&&r instanceof jv?Eu(n.Pe,r.Pe):n instanceof Wv&&r instanceof Wv);var n,r}(s,o))))&&(0===e.type?e.value.isEqual(i.value):1!==e.type||e.data.isEqual(i.data)&&e.fieldMask.isEqual(i.fieldMask));var n,r}class Xv extends s_{constructor(i,t,n,r=[]){super(),this.key=i,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class Ph extends s_{constructor(i,t,n,r,s=[]){super(),this.key=i,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function BQ(e){const i=new Map;return e.fieldMask.fields.forEach(t=>{if(!t.isEmpty()){const n=e.data.field(t);i.set(t,n)}}),i}function VQ(e,i,t){const n=new Map;Fi(e.length===t.length);for(let r=0;r{const s=i.get(r.key),o=s.overlayedDocument;let l=this.applyToLocalView(o,s.mutatedFields);l=t.has(r.key)?null:l;const w=LQ(o,l);null!==w&&n.set(r.key,w),o.isValidDocument()||o.convertToNoDocument(Oi.min())}),n}keys(){return this.mutations.reduce((i,t)=>i.add(t.key),Cn())}isEqual(i){return this.batchId===i.batchId&&Ov(this.mutations,i.mutations,(t,n)=>NQ(t,n))&&Ov(this.baseMutations,i.baseMutations,(t,n)=>NQ(t,n))}}class VF{constructor(i,t,n,r){this.batch=i,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(i,t,n){Fi(i.mutations.length===n.length);let r=function(){return NOt}();const s=i.mutations;for(let o=0;o=8)throw new Bb(`Invalid padding: ${t}`);if(n<0)throw new Bb(`Invalid hash count: ${n}`);if(i.length>0&&0===this.hashCount)throw new Bb(`Invalid hash count: ${n}`);if(0===i.length&&0!==t)throw new Bb(`Invalid padding when bitmap length is 0: ${t}`);this.Ie=8*i.length-t,this.Te=kp.fromNumber(this.Ie)}Ee(i,t,n){let r=i.add(t.multiply(kp.fromNumber(n)));return 1===r.compare(YOt)&&(r=new kp([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Te).toNumber()}de(i){return!!(this.bitmap[Math.floor(i/8)]&1<o.insert(l)),o}insert(i){if(0===this.Ie)return;const t=jQ(i),[n,r]=XQ(t);for(let s=0;s0&&(this.we=!0,this.pe=i)}Ce(){let i=Cn(),t=Cn(),n=Cn();return this.ge.forEach((r,s)=>{switch(s){case 0:i=i.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:Ti()}}),new Ub(this.pe,this.ye,i,t,n)}ve(){this.we=!1,this.ge=ZQ()}Fe(i,t){this.we=!0,this.ge=this.ge.insert(i,t)}Me(i){this.we=!0,this.ge=this.ge.remove(i)}xe(){this.fe+=1}Oe(){this.fe-=1,Fi(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class $Ot{constructor(i){this.Le=i,this.Be=new Map,this.ke=ul(),this.qe=KQ(),this.Qe=new Yr(cn)}Ke(i){for(const t of i.Re)i.Ve&&i.Ve.isFoundDocument()?this.$e(t,i.Ve):this.Ue(t,i.key,i.Ve);for(const t of i.removedTargetIds)this.Ue(t,i.key,i.Ve)}We(i){this.forEachTarget(i,t=>{const n=this.Ge(t);switch(i.state){case 0:this.ze(t)&&n.De(i.resumeToken);break;case 1:n.Oe(),n.Se||n.ve(),n.De(i.resumeToken);break;case 2:n.Oe(),n.Se||this.removeTarget(t);break;case 3:this.ze(t)&&(n.Ne(),n.De(i.resumeToken));break;case 4:this.ze(t)&&(this.je(t),n.De(i.resumeToken));break;default:Ti()}})}forEachTarget(i,t){i.targetIds.length>0?i.targetIds.forEach(t):this.Be.forEach((n,r)=>{this.ze(r)&&t(r)})}He(i){const t=i.targetId,n=i.me.count,r=this.Je(t);if(r){const s=r.target;if(t_(s))if(0===n){const o=new gi(s.path);this.Ue(t,o,ts.newNoDocument(o,Oi.min()))}else Fi(1===n);else{const o=this.Ye(t);if(o!==n){const l=this.Ze(i),w=l?this.Xe(l,i,o):1;0!==w&&(this.je(t),this.Qe=this.Qe.insert(t,2===w?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Ze(i){const t=i.me.unchangedNames;if(!t||!t.bits)return null;const{bits:{bitmap:n="",padding:r=0},hashCount:s=0}=t;let o,l;try{o=Mh(n).toUint8Array()}catch(w){if(w instanceof q$)return Fl("Decoding the base64 bloom filter in existence filter failed ("+w.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw w}try{l=new zF(o,r,s)}catch(w){return Fl(w instanceof Bb?"BloomFilter error: ":"Applying bloom filter failed: ",w),null}return 0===l.Ie?null:l}Xe(i,t,n){return t.me.count===n-this.nt(i,t.targetId)?0:2}nt(i,t){const n=this.Le.getRemoteKeysForTarget(t);let r=0;return n.forEach(s=>{const o=this.Le.tt(),l=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;i.mightContain(l)||(this.Ue(t,s,null),r++)}),r}rt(i){const t=new Map;this.Be.forEach((s,o)=>{const l=this.Je(o);if(l){if(s.current&&t_(l.target)){const w=new gi(l.target.path);null!==this.ke.get(w)||this.it(o,w)||this.Ue(o,w,ts.newNoDocument(w,i))}s.be&&(t.set(o,s.Ce()),s.ve())}});let n=Cn();this.qe.forEach((s,o)=>{let l=!0;o.forEachWhile(w=>{const E=this.Je(w);return!E||"TargetPurposeLimboResolution"===E.purpose||(l=!1,!1)}),l&&(n=n.add(s))}),this.ke.forEach((s,o)=>o.setReadTime(i));const r=new Vb(i,t,this.Qe,this.ke,n);return this.ke=ul(),this.qe=KQ(),this.Qe=new Yr(cn),r}$e(i,t){if(!this.ze(i))return;const n=this.it(i,t.key)?2:0;this.Ge(i).Fe(t.key,n),this.ke=this.ke.insert(t.key,t),this.qe=this.qe.insert(t.key,this.st(t.key).add(i))}Ue(i,t,n){if(!this.ze(i))return;const r=this.Ge(i);this.it(i,t)?r.Fe(t,1):r.Me(t),this.qe=this.qe.insert(t,this.st(t).delete(i)),n&&(this.ke=this.ke.insert(t,n))}removeTarget(i){this.Be.delete(i)}Ye(i){const t=this.Ge(i).Ce();return this.Le.getRemoteKeysForTarget(i).size+t.addedDocuments.size-t.removedDocuments.size}xe(i){this.Ge(i).xe()}Ge(i){let t=this.Be.get(i);return t||(t=new QQ,this.Be.set(i,t)),t}st(i){let t=this.qe.get(i);return t||(t=new Pr(cn),this.qe=this.qe.insert(i,t)),t}ze(i){const t=null!==this.Je(i);return t||Be("WatchChangeAggregator","Detected inactive target",i),t}Je(i){const t=this.Be.get(i);return t&&t.Se?null:this.Le.ot(i)}je(i){this.Be.set(i,new QQ),this.Le.getRemoteKeysForTarget(i).forEach(t=>{this.Ue(i,t,null)})}it(i,t){return this.Le.getRemoteKeysForTarget(i).has(t)}}function KQ(){return new Yr(gi.comparator)}function ZQ(){return new Yr(gi.comparator)}const QOt={asc:"ASCENDING",desc:"DESCENDING"},KOt={"<":"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"},ZOt={and:"AND",or:"OR"};class JOt{constructor(i,t){this.databaseId=i,this.useProto3Json=t}}function GF(e,i){return e.useProto3Json||Sb(i)?i:{value:i}}function $v(e,i){return e.useProto3Json?`${new Date(1e3*i.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+i.nanoseconds).slice(-9)}Z`:{seconds:""+i.seconds,nanos:i.nanoseconds}}function JQ(e,i){return e.useProto3Json?i.toBase64():i.toUint8Array()}function qOt(e,i){return $v(e,i.toTimestamp())}function Ls(e){return Fi(!!e),Oi.fromTimestamp(function(t){const n=Dh(t);return new us(n.seconds,n.nanos)}(e))}function HF(e,i){return WF(e,i).canonicalString()}function WF(e,i){const t=(r=e,new Wn(["projects",r.projectId,"databases",r.database])).child("documents");var r;return void 0===i?t:t.child(i)}function qQ(e){const i=Wn.fromString(e);return Fi(uK(i)),i}function zb(e,i){return HF(e.databaseId,i.path)}function Au(e,i){const t=qQ(i);if(t.get(1)!==e.databaseId.projectId)throw new Ve(ge.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+t.get(1)+" vs "+e.databaseId.projectId);if(t.get(3)!==e.databaseId.database)throw new Ve(ge.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+t.get(3)+" vs "+e.databaseId.database);return new gi(iK(t))}function tK(e,i){return HF(e.databaseId,i)}function jF(e){return new Wn(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function iK(e){return Fi(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function nK(e,i,t){return{name:zb(e,i),fields:t.value.mapValue.fields}}function sK(e,i){return{documents:[tK(e,i.path)]}}function l_(e,i){const t={structuredQuery:{}},n=i.path;let r;null!==i.collectionGroup?(r=n,t.structuredQuery.from=[{collectionId:i.collectionGroup,allDescendants:!0}]):(r=n.popLast(),t.structuredQuery.from=[{collectionId:n.lastSegment()}]),t.parent=tK(e,r);const s=function(E){if(0!==E.length)return cK(Er.create(E,"and"))}(i.filters);s&&(t.structuredQuery.where=s);const o=function(E){if(0!==E.length)return E.map(D=>{return{field:tf((O=D).field),direction:rLt(O.dir)};var O})}(i.orderBy);o&&(t.structuredQuery.orderBy=o);const l=GF(e,i.limit);return null!==l&&(t.structuredQuery.limit=l),i.startAt&&(t.structuredQuery.startAt={before:(E=i.startAt).inclusive,values:E.position}),i.endAt&&(t.structuredQuery.endAt=function(E){return{before:!E.inclusive,values:E.position}}(i.endAt)),{_t:t,parent:r};var E}function oK(e){let i=function eK(e){const i=qQ(e);return 4===i.length?Wn.emptyPath():iK(i)}(e.parent);const t=e.structuredQuery,n=t.from?t.from.length:0;let r=null;if(n>0){Fi(1===n);const D=t.from[0];D.allDescendants?r=D.collectionId:i=i.child(D.collectionId)}let s=[];t.where&&(s=function(k){const O=lK(k);return O instanceof Er&&RF(O)?O.getFilters():[O]}(t.where));let o=[];t.orderBy&&(o=t.orderBy.map(O=>{return new Ib(Qv((U=O).field),function(W){switch(W){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(U.direction));var U}));let l=null;t.limit&&(l=function(k){let O;return O="object"==typeof k?k.value:k,Sb(O)?null:O}(t.limit));let w=null;var k;t.startAt&&(w=new qd((k=t.startAt).values||[],!!k.before));let E=null;return t.endAt&&(E=function(k){return new qd(k.values||[],!k.before)}(t.endAt)),function yQ(e,i,t,n,r,s,o,l){return new Ih(e,i,t,n,r,s,o,l)}(i,r,o,s,l,"F",w,E)}function lK(e){return void 0!==e.unaryFilter?function(t){switch(t.unaryFilter.op){case"IS_NAN":const n=Qv(t.unaryFilter.field);return jn.create(n,"==",{doubleValue:NaN});case"IS_NULL":const r=Qv(t.unaryFilter.field);return jn.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=Qv(t.unaryFilter.field);return jn.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=Qv(t.unaryFilter.field);return jn.create(o,"!=",{nullValue:"NULL_VALUE"});default:return Ti()}}(e):void 0!==e.fieldFilter?jn.create(Qv((t=e).fieldFilter.field),function(r){switch(r){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 Ti()}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==e.compositeFilter?function(t){return Er.create(t.compositeFilter.filters.map(n=>lK(n)),function(r){switch(r){case"AND":return"and";case"OR":return"or";default:return Ti()}}(t.compositeFilter.op))}(e):Ti();var t}function rLt(e){return QOt[e]}function sLt(e){return KOt[e]}function aLt(e){return ZOt[e]}function tf(e){return{fieldPath:e.canonicalString()}}function Qv(e){return hs.fromServerFormat(e.fieldPath)}function cK(e){return e instanceof jn?function(t){if("=="===t.op){if(iQ(t.value))return{unaryFilter:{field:tf(t.field),op:"IS_NAN"}};if(eQ(t.value))return{unaryFilter:{field:tf(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(iQ(t.value))return{unaryFilter:{field:tf(t.field),op:"IS_NOT_NAN"}};if(eQ(t.value))return{unaryFilter:{field:tf(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:tf(t.field),op:sLt(t.op),value:t.value}}}(e):e instanceof Er?function(t){const n=t.getFilters().map(r=>cK(r));return 1===n.length?n[0]:{compositeFilter:{op:aLt(t.op),filters:n}}}(e):Ti()}function oLt(e){const i=[];return e.fields.forEach(t=>i.push(t.canonicalString())),{fieldPaths:i}}function uK(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}class kh{constructor(i,t,n,r,s=Oi.min(),o=Oi.min(),l=xa.EMPTY_BYTE_STRING,w=null){this.target=i,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=l,this.expectedCount=w}withSequenceNumber(i){return new kh(this.target,this.targetId,this.purpose,i,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(i,t){return new kh(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,i,null)}withExpectedCount(i){return new kh(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,i)}withLastLimboFreeSnapshotVersion(i){return new kh(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,i,this.resumeToken,this.expectedCount)}}class hK{constructor(i){this.ct=i}}function YF(e){const i=oK({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?i_(i,i.limit,"L"):i}class jp{constructor(){}Pt(i,t){this.It(i,t),t.Tt()}It(i,t){if("nullValue"in i)this.Et(t,5);else if("booleanValue"in i)this.Et(t,10),t.dt(i.booleanValue?1:0);else if("integerValue"in i)this.Et(t,15),t.dt(Es(i.integerValue));else if("doubleValue"in i){const n=Es(i.doubleValue);isNaN(n)?this.Et(t,13):(this.Et(t,15),Eb(n)?t.dt(0):t.dt(n))}else if("timestampValue"in i){let n=i.timestampValue;this.Et(t,20),"string"==typeof n&&(n=Dh(n)),t.At(`${n.seconds||""}`),t.dt(n.nanos||0)}else if("stringValue"in i)this.Rt(i.stringValue,t),this.Vt(t);else if("bytesValue"in i)this.Et(t,30),t.ft(Mh(i.bytesValue)),this.Vt(t);else if("referenceValue"in i)this.gt(i.referenceValue,t);else if("geoPointValue"in i){const n=i.geoPointValue;this.Et(t,45),t.dt(n.latitude||0),t.dt(n.longitude||0)}else"mapValue"in i?nQ(i)?this.Et(t,Number.MAX_SAFE_INTEGER):(this.yt(i.mapValue,t),this.Vt(t)):"arrayValue"in i?(this.wt(i.arrayValue,t),this.Vt(t)):Ti()}Rt(i,t){this.Et(t,25),this.St(i,t)}St(i,t){t.At(i)}yt(i,t){const n=i.fields||{};this.Et(t,55);for(const r of Object.keys(n))this.Rt(r,t),this.It(n[r],t)}wt(i,t){const n=i.values||[];this.Et(t,50);for(const r of n)this.It(r,t)}gt(i,t){this.Et(t,37),gi.fromName(i).path.forEach(n=>{this.Et(t,60),this.St(n,t)})}Et(i,t){i.dt(t)}Vt(i){i.dt(2)}}jp.bt=new jp;class mLt{constructor(){this._n=new qF}addToCollectionParentIndex(i,t){return this._n.add(t),se.resolve()}getCollectionParents(i,t){return se.resolve(this._n.getEntries(t))}addFieldIndex(i,t){return se.resolve()}deleteFieldIndex(i,t){return se.resolve()}deleteAllFieldIndexes(i){return se.resolve()}createTargetIndexes(i,t){return se.resolve()}getDocumentsMatchingTarget(i,t){return se.resolve(null)}getIndexType(i,t){return se.resolve(0)}getFieldIndexes(i,t){return se.resolve([])}getNextCollectionGroupToUpdate(i){return se.resolve(null)}getMinOffset(i,t){return se.resolve(Ol.min())}getMinOffsetFromCollectionGroup(i,t){return se.resolve(Ol.min())}updateCollectionGroup(i,t,n){return se.resolve()}updateIndexEntries(i,t){return se.resolve()}}class qF{constructor(){this.index={}}add(i){const t=i.lastSegment(),n=i.popLast(),r=this.index[t]||new Pr(Wn.comparator),s=!r.has(n);return this.index[t]=r.add(n),s}has(i){const t=i.lastSegment(),n=i.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(i){return(this.index[i]||new Pr(Wn.comparator)).toArray()}}new Uint8Array(0);class mo{constructor(i,t,n){this.cacheSizeCollectionThreshold=i,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(i){return new mo(i,mo.DEFAULT_COLLECTION_PERCENTILE,mo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}mo.DEFAULT_COLLECTION_PERCENTILE=10,mo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,mo.DEFAULT=new mo(41943040,mo.DEFAULT_COLLECTION_PERCENTILE,mo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),mo.DISABLED=new mo(-1,0,0);class Yp{constructor(i){this.On=i}next(){return this.On+=2,this.On}static Nn(){return new Yp(0)}static Ln(){return new Yp(-1)}}class FK{constructor(){this.changes=new Rh(i=>i.toString(),(i,t)=>i.isEqual(t)),this.changesApplied=!1}addEntry(i){this.assertNotApplied(),this.changes.set(i.key,i)}removeEntry(i,t){this.assertNotApplied(),this.changes.set(i,ts.newInvalidDocument(i).setReadTime(t))}getEntry(i,t){this.assertNotApplied();const n=this.changes.get(t);return void 0!==n?se.resolve(n):this.getFromCache(i,t)}getEntries(i,t){return this.getAllFromCache(i,t)}apply(i){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(i)}assertNotApplied(){}}class CLt{constructor(i,t){this.overlayedDocument=i,this.mutatedFields=t}}class VK{constructor(i,t,n,r){this.remoteDocumentCache=i,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(i,t){let n=null;return this.documentOverlayCache.getOverlay(i,t).next(r=>(n=r,this.remoteDocumentCache.getEntry(i,t))).next(r=>(null!==n&&Nb(n.mutation,r,cl.empty(),us.now()),r))}getDocuments(i,t){return this.remoteDocumentCache.getEntries(i,t).next(n=>this.getLocalViewOfDocuments(i,n,Cn()).next(()=>n))}getLocalViewOfDocuments(i,t,n=Cn()){const r=_u();return this.populateOverlays(i,r,t).next(()=>this.computeViews(i,t,r,n).next(s=>{let o=Fb();return s.forEach((l,w)=>{o=o.insert(l,w.overlayedDocument)}),o}))}getOverlayedDocuments(i,t){const n=_u();return this.populateOverlays(i,n,t).next(()=>this.computeViews(i,t,n,Cn()))}populateOverlays(i,t,n){const r=[];return n.forEach(s=>{t.has(s)||r.push(s)}),this.documentOverlayCache.getOverlays(i,r).next(s=>{s.forEach((o,l)=>{t.set(o,l)})})}computeViews(i,t,n,r){let s=ul();const o=Ob(),l=Ob();return t.forEach((w,E)=>{const D=n.get(E.key);r.has(E.key)&&(void 0===D||D.mutation instanceof Ph)?s=s.insert(E.key,E):void 0!==D?(o.set(E.key,D.mutation.getFieldMask()),Nb(D.mutation,E,D.mutation.getFieldMask(),us.now())):o.set(E.key,cl.empty())}),this.recalculateAndSaveOverlays(i,s).next(w=>(w.forEach((E,D)=>o.set(E,D)),t.forEach((E,D)=>{var k;return l.set(E,new CLt(D,null!==(k=o.get(E))&&void 0!==k?k:null))}),l))}recalculateAndSaveOverlays(i,t){const n=Ob();let r=new Yr((o,l)=>o-l),s=Cn();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(i,t).next(o=>{for(const l of o)l.keys().forEach(w=>{const E=t.get(w);if(null===E)return;let D=n.get(w)||cl.empty();D=l.applyToLocalView(E,D),n.set(w,D);const k=(r.get(l.batchId)||Cn()).add(w);r=r.insert(l.batchId,k)})}).next(()=>{const o=[],l=r.getReverseIterator();for(;l.hasNext();){const w=l.getNext(),E=w.key,D=w.value,k=AQ();D.forEach(O=>{if(!s.has(O)){const L=LQ(t.get(O),n.get(O));null!==L&&k.set(O,L),s=s.add(O)}}),o.push(this.documentOverlayCache.saveOverlays(i,E,k))}return se.waitFor(o)}).next(()=>n)}recalculateAndSaveOverlaysForDocumentKeys(i,t){return this.remoteDocumentCache.getEntries(i,t).next(n=>this.recalculateAndSaveOverlays(i,n))}getDocumentsMatchingQuery(i,t,n,r){return gi.isDocumentKey((o=t).path)&&null===o.collectionGroup&&0===o.filters.length?this.getDocumentsMatchingDocumentQuery(i,t.path):FF(t)?this.getDocumentsMatchingCollectionGroupQuery(i,t,n,r):this.getDocumentsMatchingCollectionQuery(i,t,n,r);var o}getNextDocuments(i,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(i,t,n,r).next(s=>{const o=r-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(i,t,n.largestBatchId,r-s.size):se.resolve(_u());let l=-1,w=s;return o.next(E=>se.forEach(E,(D,k)=>(l{w=w.insert(D,O)}))).next(()=>this.populateOverlays(i,E,s)).next(()=>this.computeViews(i,w,E,Cn())).next(D=>({batchId:l,changes:_Q(D)})))})}getDocumentsMatchingDocumentQuery(i,t){return this.getDocument(i,new gi(t)).next(n=>{let r=Fb();return n.isFoundDocument()&&(r=r.insert(n.key,n)),r})}getDocumentsMatchingCollectionGroupQuery(i,t,n,r){const s=t.collectionGroup;let o=Fb();return this.indexManager.getCollectionParents(i,s).next(l=>se.forEach(l,w=>{const E=(k=t,O=w.child(s),new Ih(O,null,k.explicitOrderBy.slice(),k.filters.slice(),k.limit,k.limitType,k.startAt,k.endAt));var k,O;return this.getDocumentsMatchingCollectionQuery(i,E,n,r).next(D=>{D.forEach((k,O)=>{o=o.insert(k,O)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(i,t,n,r){let s;return this.documentOverlayCache.getOverlaysForCollection(i,t.path,n.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(i,t,n,s,r))).next(o=>{s.forEach((w,E)=>{const D=E.getKey();null===o.get(D)&&(o=o.insert(D,ts.newInvalidDocument(D)))});let l=Fb();return o.forEach((w,E)=>{const D=s.get(w);void 0!==D&&Nb(D.mutation,E,cl.empty(),us.now()),kb(t,E)&&(l=l.insert(w,E))}),l})}}class SLt{constructor(i){this.serializer=i,this.cr=new Map,this.lr=new Map}getBundleMetadata(i,t){return se.resolve(this.cr.get(t))}saveBundleMetadata(i,t){return this.cr.set(t.id,{id:(r=t).id,version:r.version,createTime:Ls(r.createTime)}),se.resolve();var r}getNamedQuery(i,t){return se.resolve(this.lr.get(t))}saveNamedQuery(i,t){return this.lr.set(t.name,{name:(r=t).name,query:YF(r.bundledQuery),readTime:Ls(r.readTime)}),se.resolve();var r}}class ELt{constructor(){this.overlays=new Yr(gi.comparator),this.hr=new Map}getOverlay(i,t){return se.resolve(this.overlays.get(t))}getOverlays(i,t){const n=_u();return se.forEach(t,r=>this.getOverlay(i,r).next(s=>{null!==s&&n.set(r,s)})).next(()=>n)}saveOverlays(i,t,n){return n.forEach((r,s)=>{this.ht(i,t,s)}),se.resolve()}removeOverlaysForBatchId(i,t,n){const r=this.hr.get(n);return void 0!==r&&(r.forEach(s=>this.overlays=this.overlays.remove(s)),this.hr.delete(n)),se.resolve()}getOverlaysForCollection(i,t,n){const r=_u(),s=t.length+1,o=new gi(t.child("")),l=this.overlays.getIteratorFrom(o);for(;l.hasNext();){const w=l.getNext().value,E=w.getKey();if(!t.isPrefixOf(E.path))break;E.path.length===s&&w.largestBatchId>n&&r.set(w.getKey(),w)}return se.resolve(r)}getOverlaysForCollectionGroup(i,t,n,r){let s=new Yr((E,D)=>E-D);const o=this.overlays.getIterator();for(;o.hasNext();){const E=o.getNext().value;if(E.getKey().getCollectionGroup()===t&&E.largestBatchId>n){let D=s.get(E.largestBatchId);null===D&&(D=_u(),s=s.insert(E.largestBatchId,D)),D.set(E.getKey(),E)}}const l=_u(),w=s.getIterator();for(;w.hasNext()&&(w.getNext().value.forEach((E,D)=>l.set(E,D)),!(l.size()>=r)););return se.resolve(l)}ht(i,t,n){const r=this.overlays.get(n.key);if(null!==r){const o=this.hr.get(r.largestBatchId).delete(n.key);this.hr.set(r.largestBatchId,o)}this.overlays=this.overlays.insert(n.key,new UF(t,n));let s=this.hr.get(t);void 0===s&&(s=Cn(),this.hr.set(t,s)),this.hr.set(t,s.add(n.key))}}class tO{constructor(){this.Pr=new Pr(ka.Ir),this.Tr=new Pr(ka.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(i,t){const n=new ka(i,t);this.Pr=this.Pr.add(n),this.Tr=this.Tr.add(n)}dr(i,t){i.forEach(n=>this.addReference(n,t))}removeReference(i,t){this.Ar(new ka(i,t))}Rr(i,t){i.forEach(n=>this.removeReference(n,t))}Vr(i){const t=new gi(new Wn([])),n=new ka(t,i),r=new ka(t,i+1),s=[];return this.Tr.forEachInRange([n,r],o=>{this.Ar(o),s.push(o.key)}),s}mr(){this.Pr.forEach(i=>this.Ar(i))}Ar(i){this.Pr=this.Pr.delete(i),this.Tr=this.Tr.delete(i)}gr(i){const t=new gi(new Wn([])),n=new ka(t,i),r=new ka(t,i+1);let s=Cn();return this.Tr.forEachInRange([n,r],o=>{s=s.add(o.key)}),s}containsKey(i){const t=new ka(i,0),n=this.Pr.firstAfterOrEqual(t);return null!==n&&i.isEqual(n.key)}}class ka{constructor(i,t){this.key=i,this.pr=t}static Ir(i,t){return gi.comparator(i.key,t.key)||cn(i.pr,t.pr)}static Er(i,t){return cn(i.pr,t.pr)||gi.comparator(i.key,t.key)}}class _Lt{constructor(i,t){this.indexManager=i,this.referenceDelegate=t,this.mutationQueue=[],this.yr=1,this.wr=new Pr(ka.Ir)}checkEmpty(i){return se.resolve(0===this.mutationQueue.length)}addMutationBatch(i,t,n,r){const s=this.yr;this.yr++;const o=new BF(s,t,n,r);this.mutationQueue.push(o);for(const l of r)this.wr=this.wr.add(new ka(l.key,s)),this.indexManager.addToCollectionParentIndex(i,l.key.path.popLast());return se.resolve(o)}lookupMutationBatch(i,t){return se.resolve(this.Sr(t))}getNextMutationBatchAfterBatchId(i,t){const r=this.br(t+1),s=r<0?0:r;return se.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return se.resolve(0===this.mutationQueue.length?-1:this.yr-1)}getAllMutationBatches(i){return se.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(i,t){const n=new ka(t,0),r=new ka(t,Number.POSITIVE_INFINITY),s=[];return this.wr.forEachInRange([n,r],o=>{const l=this.Sr(o.pr);s.push(l)}),se.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(i,t){let n=new Pr(cn);return t.forEach(r=>{const s=new ka(r,0),o=new ka(r,Number.POSITIVE_INFINITY);this.wr.forEachInRange([s,o],l=>{n=n.add(l.pr)})}),se.resolve(this.Dr(n))}getAllMutationBatchesAffectingQuery(i,t){const n=t.path,r=n.length+1;let s=n;gi.isDocumentKey(s)||(s=s.child(""));const o=new ka(new gi(s),0);let l=new Pr(cn);return this.wr.forEachWhile(w=>{const E=w.key.path;return!!n.isPrefixOf(E)&&(E.length===r&&(l=l.add(w.pr)),!0)},o),se.resolve(this.Dr(l))}Dr(i){const t=[];return i.forEach(n=>{const r=this.Sr(n);null!==r&&t.push(r)}),t}removeMutationBatch(i,t){Fi(0===this.Cr(t.batchId,"removed")),this.mutationQueue.shift();let n=this.wr;return se.forEach(t.mutations,r=>{const s=new ka(r.key,t.batchId);return n=n.delete(s),this.referenceDelegate.markPotentiallyOrphaned(i,r.key)}).next(()=>{this.wr=n})}Mn(i){}containsKey(i,t){const n=new ka(t,0),r=this.wr.firstAfterOrEqual(n);return se.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(i){return se.resolve()}Cr(i,t){return this.br(i)}br(i){return 0===this.mutationQueue.length?0:i-this.mutationQueue[0].batchId}Sr(i){const t=this.br(i);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class ALt{constructor(i){this.vr=i,this.docs=new Yr(gi.comparator),this.size=0}setIndexManager(i){this.indexManager=i}addEntry(i,t){const n=t.key,r=this.docs.get(n),s=r?r.size:0,o=this.vr(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(i,n.path.popLast())}removeEntry(i){const t=this.docs.get(i);t&&(this.docs=this.docs.remove(i),this.size-=t.size)}getEntry(i,t){const n=this.docs.get(t);return se.resolve(n?n.document.mutableCopy():ts.newInvalidDocument(t))}getEntries(i,t){let n=ul();return t.forEach(r=>{const s=this.docs.get(r);n=n.insert(r,s?s.document.mutableCopy():ts.newInvalidDocument(r))}),se.resolve(n)}getDocumentsMatchingQuery(i,t,n,r){let s=ul();const o=t.path,l=new gi(o.child("")),w=this.docs.getIteratorFrom(l);for(;w.hasNext();){const{key:E,value:{document:D}}=w.getNext();if(!o.isPrefixOf(E.path))break;E.path.length>o.length+1||SF(new Ol((e=D).readTime,e.key,-1),n)<=0||(r.has(D.key)||kb(t,D))&&(s=s.insert(D.key,D.mutableCopy()))}var e;return se.resolve(s)}getAllFromCollectionGroup(i,t,n,r){Ti()}Fr(i,t){return se.forEach(this.docs,n=>t(n))}newChangeBuffer(i){return new DLt(this)}getSize(i){return se.resolve(this.size)}}class DLt extends FK{constructor(i){super(),this.ar=i}applyChanges(i){const t=[];return this.changes.forEach((n,r)=>{r.isValidDocument()?t.push(this.ar.addEntry(i,r)):this.ar.removeEntry(n)}),se.waitFor(t)}getFromCache(i,t){return this.ar.getEntry(i,t)}getAllFromCache(i,t){return this.ar.getEntries(i,t)}}class MLt{constructor(i){this.persistence=i,this.Mr=new Rh(t=>Vp(t),Rb),this.lastRemoteSnapshotVersion=Oi.min(),this.highestTargetId=0,this.Or=0,this.Nr=new tO,this.targetCount=0,this.Lr=Yp.Nn()}forEachTarget(i,t){return this.Mr.forEach((n,r)=>t(r)),se.resolve()}getLastRemoteSnapshotVersion(i){return se.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(i){return se.resolve(this.Or)}allocateTargetId(i){return this.highestTargetId=this.Lr.next(),se.resolve(this.highestTargetId)}setTargetsMetadata(i,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Or&&(this.Or=t),se.resolve()}qn(i){this.Mr.set(i.target,i);const t=i.targetId;t>this.highestTargetId&&(this.Lr=new Yp(t),this.highestTargetId=t),i.sequenceNumber>this.Or&&(this.Or=i.sequenceNumber)}addTargetData(i,t){return this.qn(t),this.targetCount+=1,se.resolve()}updateTargetData(i,t){return this.qn(t),se.resolve()}removeTargetData(i,t){return this.Mr.delete(t.target),this.Nr.Vr(t.targetId),this.targetCount-=1,se.resolve()}removeTargets(i,t,n){let r=0;const s=[];return this.Mr.forEach((o,l)=>{l.sequenceNumber<=t&&null===n.get(l.targetId)&&(this.Mr.delete(o),s.push(this.removeMatchingKeysForTargetId(i,l.targetId)),r++)}),se.waitFor(s).next(()=>r)}getTargetCount(i){return se.resolve(this.targetCount)}getTargetData(i,t){const n=this.Mr.get(t)||null;return se.resolve(n)}addMatchingKeys(i,t,n){return this.Nr.dr(t,n),se.resolve()}removeMatchingKeys(i,t,n){this.Nr.Rr(t,n);const r=this.persistence.referenceDelegate,s=[];return r&&t.forEach(o=>{s.push(r.markPotentiallyOrphaned(i,o))}),se.waitFor(s)}removeMatchingKeysForTargetId(i,t){return this.Nr.Vr(t),se.resolve()}getMatchingKeysForTargetId(i,t){const n=this.Nr.gr(t);return se.resolve(n)}containsKey(i,t){return se.resolve(this.Nr.containsKey(t))}}class eO{constructor(i,t){this.Br={},this.overlays={},this.kr=new Ll(0),this.qr=!1,this.qr=!0,this.referenceDelegate=i(this),this.Qr=new MLt(this),this.indexManager=new mLt,this.remoteDocumentCache=new ALt(n=>this.referenceDelegate.Kr(n)),this.serializer=new hK(t),this.$r=new SLt(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(i){return this.indexManager}getDocumentOverlayCache(i){let t=this.overlays[i.toKey()];return t||(t=new ELt,this.overlays[i.toKey()]=t),t}getMutationQueue(i,t){let n=this.Br[i.toKey()];return n||(n=new _Lt(t,this.referenceDelegate),this.Br[i.toKey()]=n),n}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(i,t,n){Be("MemoryPersistence","Starting transaction:",i);const r=new ILt(this.kr.next());return this.referenceDelegate.Ur(),n(r).next(s=>this.referenceDelegate.Wr(r).next(()=>s)).toPromise().then(s=>(r.raiseOnCommittedEvent(),s))}Gr(i,t){return se.or(Object.values(this.Br).map(n=>()=>n.containsKey(i,t)))}}class ILt extends B${constructor(i){super(),this.currentSequenceNumber=i}}class g_{constructor(i){this.persistence=i,this.zr=new tO,this.jr=null}static Hr(i){return new g_(i)}get Jr(){if(this.jr)return this.jr;throw Ti()}addReference(i,t,n){return this.zr.addReference(n,t),this.Jr.delete(n.toString()),se.resolve()}removeReference(i,t,n){return this.zr.removeReference(n,t),this.Jr.add(n.toString()),se.resolve()}markPotentiallyOrphaned(i,t){return this.Jr.add(t.toString()),se.resolve()}removeTarget(i,t){this.zr.Vr(t.targetId).forEach(r=>this.Jr.add(r.toString()));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(i,t.targetId).next(r=>{r.forEach(s=>this.Jr.add(s.toString()))}).next(()=>n.removeTargetData(i,t))}Ur(){this.jr=new Set}Wr(i){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return se.forEach(this.Jr,n=>{const r=gi.fromPath(n);return this.Yr(i,r).next(s=>{s||t.removeEntry(r,Oi.min())})}).next(()=>(this.jr=null,t.apply(i)))}updateLimboDocument(i,t){return this.Yr(i,t).next(n=>{n?this.Jr.delete(t.toString()):this.Jr.add(t.toString())})}Kr(i){return 0}Yr(i,t){return se.or([()=>se.resolve(this.zr.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(i,t),()=>this.persistence.Gr(i,t)])}}class sO{constructor(i,t,n,r){this.targetId=i,this.fromCache=t,this.qi=n,this.Qi=r}static Ki(i,t){let n=Cn(),r=Cn();for(const s of t.docChanges)switch(s.type){case 0:n=n.add(s.doc.key);break;case 1:r=r.add(s.doc.key)}return new sO(i,t.fromCache,n,r)}}class PLt{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(i){this._documentReadCount+=i}}class zK{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function t$(){return!function Skt(){var e;const i=null===(e=VE())||void 0===e?void 0:e.forceEnvironment;if("node"===i)return!0;if("browser"===i)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch{return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}()?8:function V$(e){const i=e.match(/Android ([\d.]+)/i),t=i?i[1].split(".").slice(0,2).join("."):"-1";return Number(t)}(function Wd(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}())>0?6:4}initialize(i,t){this.zi=i,this.indexManager=t,this.$i=!0}getDocumentsMatchingQuery(i,t,n,r){const s={result:null};return this.ji(i,t).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.Hi(i,t,r,n).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new PLt;return this.Ji(i,t,o).next(l=>{if(s.result=l,this.Ui)return this.Yi(i,t,o,l.size)})}).next(()=>s.result)}Yi(i,t,n,r){return n.documentReadCountthis.Gi*r?(Fv()<=Jn.DEBUG&&Be("QueryEngine","The SDK decides to create cache indexes for query:",Hv(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(i,po(t))):se.resolve())}ji(i,t){if(xQ(t))return se.resolve(null);let n=po(t);return this.indexManager.getIndexType(i,n).next(r=>0===r?null:(null!==t.limit&&1===r&&(t=i_(t,null,"F"),n=po(t)),this.indexManager.getDocumentsMatchingTarget(i,n).next(s=>{const o=Cn(...s);return this.zi.getDocuments(i,o).next(l=>this.indexManager.getMinOffset(i,n).next(w=>{const E=this.Zi(t,l);return this.Xi(t,E,o,w.readTime)?this.ji(i,i_(t,null,"F")):this.es(i,E,t,w)}))})))}Hi(i,t,n,r){return xQ(t)||r.isEqual(Oi.min())?se.resolve(null):this.zi.getDocuments(i,n).next(s=>{const o=this.Zi(t,s);return this.Xi(t,o,n,r)?se.resolve(null):(Fv()<=Jn.DEBUG&&Be("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),Hv(t)),this.es(i,o,t,function O$(e,i){const t=e.toTimestamp().seconds,n=e.toTimestamp().nanoseconds+1,r=Oi.fromTimestamp(1e9===n?new us(t+1,0):new us(t,n));return new Ol(r,gi.empty(),i)}(r,-1)).next(l=>l))})}Zi(i,t){let n=new Pr(SQ(i));return t.forEach((r,s)=>{kb(i,s)&&(n=n.add(s))}),n}Xi(i,t,n,r){if(null===i.limit)return!1;if(n.size!==t.size)return!0;const s="F"===i.limitType?t.last():t.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(r)>0)}Ji(i,t,n){return Fv()<=Jn.DEBUG&&Be("QueryEngine","Using full collection scan to execute query:",Hv(t)),this.zi.getDocumentsMatchingQuery(i,t,Ol.min(),n)}es(i,t,n,r){return this.zi.getDocumentsMatchingQuery(i,n,r).next(s=>(t.forEach(o=>{s=s.insert(o.key,o)}),s))}}class kLt{constructor(i,t,n,r){this.persistence=i,this.ts=t,this.serializer=r,this.ns=new Yr(cn),this.rs=new Rh(s=>Vp(s),Rb),this.ss=new Map,this.os=i.getRemoteDocumentCache(),this.Qr=i.getTargetCache(),this.$r=i.getBundleCache(),this._s(n)}_s(i){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(i),this.indexManager=this.persistence.getIndexManager(i),this.mutationQueue=this.persistence.getMutationQueue(i,this.indexManager),this.localDocuments=new VK(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(i){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>i.collect(t,this.ns))}}function HK(e,i){return aO.apply(this,arguments)}function aO(){return(aO=we(function*(e,i){const t=di(e);return yield t.persistence.runTransaction("Handle user change","readonly",n=>{let r;return t.mutationQueue.getAllMutationBatches(n).next(s=>(r=s,t._s(i),t.mutationQueue.getAllMutationBatches(n))).next(s=>{const o=[],l=[];let w=Cn();for(const E of r){o.push(E.batchId);for(const D of E.mutations)w=w.add(D.key)}for(const E of s){l.push(E.batchId);for(const D of E.mutations)w=w.add(D.key)}return t.localDocuments.getDocuments(n,w).next(E=>({us:E,removedBatchIds:o,addedBatchIds:l}))})})})).apply(this,arguments)}function WK(e){const i=di(e);return i.persistence.runTransaction("Get last remote snapshot version","readonly",t=>i.Qr.getLastRemoteSnapshotVersion(t))}function LLt(e,i){const t=di(e);return t.persistence.runTransaction("Get next mutation batch","readonly",n=>(void 0===i&&(i=-1),t.mutationQueue.getNextMutationBatchAfterBatchId(n,i)))}function e0(e,i,t){return oO.apply(this,arguments)}function oO(){return(oO=we(function*(e,i,t){const n=di(e),r=n.ns.get(i),s=t?"readwrite":"readwrite-primary";try{t||(yield n.persistence.runTransaction("Release target",s,o=>n.persistence.referenceDelegate.removeTarget(o,r)))}catch(o){if(!$d(o))throw o;Be("LocalStore",`Failed to update sequence numbers for target ${i}: ${o}`)}n.ns=n.ns.remove(i),n.rs.delete(r.target)})).apply(this,arguments)}function x_(e,i,t){const n=di(e);let r=Oi.min(),s=Cn();return n.persistence.runTransaction("Execute query","readwrite",o=>function(w,E,D){const k=di(w),O=k.rs.get(D);return void 0!==O?se.resolve(k.ns.get(O)):k.Qr.getTargetData(E,D)}(n,o,po(i)).next(l=>{if(l)return r=l.lastLimboFreeSnapshotVersion,n.Qr.getMatchingKeysForTargetId(o,l.targetId).next(w=>{s=w})}).next(()=>n.ts.getDocumentsMatchingQuery(o,i,t?r:Oi.min(),t?s:Cn())).next(l=>(function $K(e,i,t){let n=e.ss.get(i)||Oi.min();t.forEach((r,s)=>{s.readTime.compareTo(n)>0&&(n=s.readTime)}),e.ss.set(i,n)}(n,function CQ(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}(i),l),{documents:l,hs:s})))}class dO{constructor(){this.activeTargetIds=function LF(){return VOt}()}As(i){this.activeTargetIds=this.activeTargetIds.add(i)}Rs(i){this.activeTargetIds=this.activeTargetIds.delete(i)}ds(){const i={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(i)}}class ZK{constructor(){this.no=new dO,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(i){}updateMutationState(i,t,n){}addLocalQueryTarget(i){return this.no.As(i),this.ro[i]||"not-current"}updateQueryState(i,t,n){this.ro[i]=t}removeLocalQueryTarget(i){this.no.Rs(i)}isLocalQueryTarget(i){return this.no.activeTargetIds.has(i)}clearQueryState(i){delete this.ro[i]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(i){return this.no.activeTargetIds.has(i)}start(){return this.no=new dO,Promise.resolve()}handleUserChange(i,t,n){}setOnlineState(i){}shutdown(){}writeSequenceNumber(i){}notifyBundleLoaded(i){}}class VLt{io(i){}shutdown(){}}class JK{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(i){this.uo.push(i)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){Be("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const i of this.uo)i(0)}ao(){Be("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const i of this.uo)i(1)}static D(){return typeof window<"u"&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let T_=null;function pO(){return null===T_?T_=268435456+Math.round(2147483648*Math.random()):T_++,"0x"+T_.toString(16)}const ULt={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class zLt{constructor(i){this.lo=i.lo,this.ho=i.ho}Po(i){this.Io=i}To(i){this.Eo=i}Ao(i){this.Ro=i}onMessage(i){this.Vo=i}close(){this.ho()}send(i){this.lo(i)}mo(){this.Io()}fo(){this.Eo()}po(i){this.Ro(i)}yo(i){this.Vo(i)}}const go="WebChannelConnection";class GLt extends class{constructor(t){this.databaseInfo=t,this.databaseId=t.databaseId;const n=t.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.wo=n+"://"+t.host,this.So=`projects/${r}/databases/${s}`,this.bo="(default)"===this.databaseId.database?`project_id=${r}`:`project_id=${r}&database_id=${s}`}get Do(){return!1}Co(t,n,r,s,o){const l=pO(),w=this.vo(t,n.toUriEncodedString());Be("RestConnection",`Sending RPC '${t}' ${l}:`,w,r);const E={"google-cloud-resource-prefix":this.So,"x-goog-request-params":this.bo};return this.Fo(E,s,o),this.Mo(t,w,E,r).then(D=>(Be("RestConnection",`Received RPC '${t}' ${l}: `,D),D),D=>{throw Fl("RestConnection",`RPC '${t}' ${l} failed with error: `,D,"url: ",w,"request:",r),D})}xo(t,n,r,s,o,l){return this.Co(t,n,r,s,o)}Fo(t,n,r){t["X-Goog-Api-Client"]="gl-js/ fire/"+kv,t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEach((s,o)=>t[o]=s),r&&r.headers.forEach((s,o)=>t[o]=s)}vo(t,n){return`${this.wo}/v1/${n}:${ULt[t]}`}terminate(){}}{constructor(i){super(i),this.forceLongPolling=i.forceLongPolling,this.autoDetectLongPolling=i.autoDetectLongPolling,this.useFetchStreams=i.useFetchStreams,this.longPollingOptions=i.longPollingOptions}Mo(i,t,n,r){const s=pO();return new Promise((o,l)=>{const w=new S$;w.setWithCredentials(!0),w.listenOnce(_$.COMPLETE,()=>{try{switch(w.getLastErrorCode()){case jE.NO_ERROR:const D=w.getResponseJson();Be(go,`XHR for RPC '${i}' ${s} received:`,JSON.stringify(D)),o(D);break;case jE.TIMEOUT:Be(go,`RPC '${i}' ${s} timed out`),l(new Ve(ge.DEADLINE_EXCEEDED,"Request time out"));break;case jE.HTTP_ERROR:const k=w.getStatus();if(Be(go,`RPC '${i}' ${s} failed with status:`,k,"response text:",w.getResponseText()),k>0){let O=w.getResponseJson();Array.isArray(O)&&(O=O[0]);const L=O?.error;if(L&&L.status&&L.message){const U=function(W){const Z=W.toLowerCase().replace(/_/g,"-");return Object.values(ge).indexOf(Z)>=0?Z:ge.UNKNOWN}(L.status);l(new Ve(U,L.message))}else l(new Ve(ge.UNKNOWN,"Server responded with status "+w.getStatus()))}else l(new Ve(ge.UNAVAILABLE,"Connection failed."));break;default:Ti()}}finally{Be(go,`RPC '${i}' ${s} completed.`)}});const E=JSON.stringify(r);Be(go,`RPC '${i}' ${s} sending request:`,r),w.send(t,"POST",E,n,15)})}Oo(i,t,n){const r=pO(),s=[this.wo,"/","google.firestore.v1.Firestore","/",i,"/channel"],o=M$(),l=D$(),w={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},E=this.longPollingOptions.timeoutSeconds;void 0!==E&&(w.longPollingTimeout=Math.round(1e3*E)),this.useFetchStreams&&(w.xmlHttpFactory=new E$({})),this.Fo(w.initMessageHeaders,t,n),w.encodeInitMessageHeaders=!0;const D=s.join("");Be(go,`Creating RPC '${i}' stream ${r}: ${D}`,w);const k=o.createWebChannel(D,w);let O=!1,L=!1;const U=new zLt({lo:W=>{L?Be(go,`Not sending because RPC '${i}' stream ${r} is closed:`,W):(O||(Be(go,`Opening RPC '${i}' stream ${r} transport.`),k.open(),O=!0),Be(go,`RPC '${i}' stream ${r} sending:`,W),k.send(W))},ho:()=>k.close()}),j=(W,Z,rt)=>{W.listen(Z,st=>{try{rt(st)}catch(yt){setTimeout(()=>{throw yt},0)}})};return j(k,wb.EventType.OPEN,()=>{L||(Be(go,`RPC '${i}' stream ${r} transport opened.`),U.mo())}),j(k,wb.EventType.CLOSE,()=>{L||(L=!0,Be(go,`RPC '${i}' stream ${r} transport closed`),U.po())}),j(k,wb.EventType.ERROR,W=>{L||(L=!0,Fl(go,`RPC '${i}' stream ${r} transport errored:`,W),U.po(new Ve(ge.UNAVAILABLE,"The operation could not be completed")))}),j(k,wb.EventType.MESSAGE,W=>{var Z;if(!L){const rt=W.data[0];Fi(!!rt);const yt=rt.error||(null===(Z=rt[0])||void 0===Z?void 0:Z.error);if(yt){Be(go,`RPC '${i}' stream ${r} received error:`,yt);const Tt=yt.status;let It=function(mt){const wt=ea[mt];if(void 0!==wt)return HQ(wt)}(Tt),ft=yt.message;void 0===It&&(It=ge.INTERNAL,ft="Unknown error status: "+Tt+" with message "+yt.message),L=!0,U.po(new Ve(It,ft)),k.close()}else Be(go,`RPC '${i}' stream ${r} received:`,rt),U.yo(rt)}}),j(l,A$.STAT_EVENT,W=>{W.stat===wF.PROXY?Be(go,`RPC '${i}' stream ${r} detected buffering proxy`):W.stat===wF.NOPROXY&&Be(go,`RPC '${i}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{U.fo()},0),U}}function C_(){return typeof document<"u"?document:null}function Kb(e){return new JOt(e,!0)}class mO{constructor(i,t,n=1e3,r=1.5,s=6e4){this.oi=i,this.timerId=t,this.No=n,this.Lo=r,this.Bo=s,this.ko=0,this.qo=null,this.Qo=Date.now(),this.reset()}reset(){this.ko=0}Ko(){this.ko=this.Bo}$o(i){this.cancel();const t=Math.floor(this.ko+this.Uo()),n=Math.max(0,Date.now()-this.Qo),r=Math.max(0,t-n);r>0&&Be("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.ko} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.qo=this.oi.enqueueAfterDelay(this.timerId,r,()=>(this.Qo=Date.now(),i())),this.ko*=this.Lo,this.kothis.Bo&&(this.ko=this.Bo)}Wo(){null!==this.qo&&(this.qo.skipDelay(),this.qo=null)}cancel(){null!==this.qo&&(this.qo.cancel(),this.qo=null)}Uo(){return(Math.random()-.5)*this.ko}}class tZ{constructor(i,t,n,r,s,o,l,w){this.oi=i,this.Go=n,this.zo=r,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=l,this.listener=w,this.state=0,this.jo=0,this.Ho=null,this.Jo=null,this.stream=null,this.Yo=new mO(i,t)}Zo(){return 1===this.state||5===this.state||this.Xo()}Xo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.e_()}stop(){var i=this;return we(function*(){i.Zo()&&(yield i.close(0))})()}t_(){this.state=0,this.Yo.reset()}n_(){this.Xo()&&null===this.Ho&&(this.Ho=this.oi.enqueueAfterDelay(this.Go,6e4,()=>this.r_()))}i_(i){this.s_(),this.stream.send(i)}r_(){var i=this;return we(function*(){if(i.Xo())return i.close(0)})()}s_(){this.Ho&&(this.Ho.cancel(),this.Ho=null)}o_(){this.Jo&&(this.Jo.cancel(),this.Jo=null)}close(i,t){var n=this;return we(function*(){n.s_(),n.o_(),n.Yo.cancel(),n.jo++,4!==i?n.Yo.reset():t&&t.code===ge.RESOURCE_EXHAUSTED?(Os(t.toString()),Os("Using maximum backoff delay to prevent overloading the backend."),n.Yo.Ko()):t&&t.code===ge.UNAUTHENTICATED&&3!==n.state&&(n.authCredentialsProvider.invalidateToken(),n.appCheckCredentialsProvider.invalidateToken()),null!==n.stream&&(n.__(),n.stream.close(),n.stream=null),n.state=i,yield n.listener.Ao(t)})()}__(){}auth(){this.state=1;const i=this.a_(this.jo),t=this.jo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([n,r])=>{this.jo===t&&this.u_(n,r)},n=>{i(()=>{const r=new Ve(ge.UNKNOWN,"Fetching auth token failed: "+n.message);return this.c_(r)})})}u_(i,t){const n=this.a_(this.jo);this.stream=this.l_(i,t),this.stream.Po(()=>{n(()=>this.listener.Po())}),this.stream.To(()=>{n(()=>(this.state=2,this.Jo=this.oi.enqueueAfterDelay(this.zo,1e4,()=>(this.Xo()&&(this.state=3),Promise.resolve())),this.listener.To()))}),this.stream.Ao(r=>{n(()=>this.c_(r))}),this.stream.onMessage(r=>{n(()=>this.onMessage(r))})}e_(){var i=this;this.state=5,this.Yo.$o(we(function*(){i.state=0,i.start()}))}c_(i){return Be("PersistentStream",`close with error: ${i}`),this.stream=null,this.close(4,i)}a_(i){return t=>{this.oi.enqueueAndForget(()=>this.jo===i?t():(Be("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class HLt extends tZ{constructor(i,t,n,r,s,o){super(i,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,o),this.serializer=s}l_(i,t){return this.connection.Oo("Listen",i,t)}onMessage(i){this.Yo.reset();const t=function eLt(e,i){let t;if("targetChange"in i){const n="NO_CHANGE"===(E=i.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===E?1:"REMOVE"===E?2:"CURRENT"===E?3:"RESET"===E?4:Ti(),r=i.targetChange.targetIds||[],s=function(E,D){return E.useProto3Json?(Fi(void 0===D||"string"==typeof D),xa.fromBase64String(D||"")):(Fi(void 0===D||D instanceof Buffer||D instanceof Uint8Array),xa.fromUint8Array(D||new Uint8Array))}(e,i.targetChange.resumeToken),o=i.targetChange.cause,l=o&&function(E){const D=void 0===E.code?ge.UNKNOWN:HQ(E.code);return new Ve(D,E.message||"")}(o);t=new $Q(n,r,s,l||null)}else if("documentChange"in i){const n=i.documentChange,r=Au(e,n.document.name),s=Ls(n.document.updateTime),o=n.document.createTime?Ls(n.document.createTime):Oi.min(),l=new Qa({mapValue:{fields:n.document.fields}}),w=ts.newFoundDocument(r,s,o,l);t=new o_(n.targetIds||[],n.removedTargetIds||[],w.key,w)}else if("documentDelete"in i){const n=i.documentDelete,r=Au(e,n.document),s=n.readTime?Ls(n.readTime):Oi.min(),o=ts.newNoDocument(r,s);t=new o_([],n.removedTargetIds||[],o.key,o)}else if("documentRemove"in i){const n=i.documentRemove,r=Au(e,n.document);t=new o_([],n.removedTargetIds||[],r,null)}else{if(!("filter"in i))return Ti();{const n=i.filter,{count:r=0,unchangedNames:s}=n,o=new XOt(r,s);t=new YQ(n.targetId,o)}}var E;return t}(this.serializer,i),n=function(s){if(!("targetChange"in s))return Oi.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?Oi.min():o.readTime?Ls(o.readTime):Oi.min()}(i);return this.listener.h_(t,n)}P_(i){const t={};t.database=jF(this.serializer),t.addTarget=function(s,o){let l;const w=o.target;if(l=t_(w)?{documents:sK(s,w)}:{query:l_(s,w)._t},l.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){l.resumeToken=JQ(s,o.resumeToken);const E=GF(s,o.expectedCount);null!==E&&(l.expectedCount=E)}else if(o.snapshotVersion.compareTo(Oi.min())>0){l.readTime=$v(s,o.snapshotVersion.toTimestamp());const E=GF(s,o.expectedCount);null!==E&&(l.expectedCount=E)}return l}(this.serializer,i);const n=function nLt(e,i){const t=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return Ti()}}(i.purpose);return null==t?null:{"goog-listen-tags":t}}(0,i);n&&(t.labels=n),this.i_(t)}I_(i){const t={};t.database=jF(this.serializer),t.removeTarget=i,this.i_(t)}}class WLt extends tZ{constructor(i,t,n,r,s,o){super(i,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,n,r,o),this.serializer=s,this.T_=!1}get E_(){return this.T_}start(){this.T_=!1,this.lastStreamToken=void 0,super.start()}__(){this.T_&&this.d_([])}l_(i,t){return this.connection.Oo("Write",i,t)}onMessage(i){if(Fi(!!i.streamToken),this.lastStreamToken=i.streamToken,this.T_){this.Yo.reset();const t=function iLt(e,i){return e&&e.length>0?(Fi(void 0!==i),e.map(t=>function(r,s){let o=Ls(r.updateTime?r.updateTime:s);return o.isEqual(Oi.min())&&(o=Ls(s)),new HOt(o,r.transformResults||[])}(t,i))):[]}(i.writeResults,i.commitTime),n=Ls(i.commitTime);return this.listener.A_(n,t)}return Fi(!i.writeResults||0===i.writeResults.length),this.T_=!0,this.listener.R_()}V_(){const i={};i.database=jF(this.serializer),this.i_(i)}d_(i){const t={streamToken:this.lastStreamToken,writes:i.map(n=>function Gb(e,i){let t;if(i instanceof Xv)t={update:nK(e,i.key,i.value)};else if(i instanceof Yv)t={delete:zb(e,i.key)};else if(i instanceof Ph)t={update:nK(e,i.key,i.data),updateMask:oLt(i.fieldMask)};else{if(!(i instanceof NF))return Ti();t={verify:zb(e,i.key)}}return i.fieldTransforms.length>0&&(t.updateTransforms=i.fieldTransforms.map(n=>function(s,o){const l=o.transform;if(l instanceof Wv)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(l instanceof Up)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:l.elements}};if(l instanceof zp)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:l.elements}};if(l instanceof jv)return{fieldPath:o.field.canonicalString(),increment:l.Pe};throw Ti()}(0,n))),i.precondition.isNone||(t.currentDocument=void 0!==(s=i.precondition).updateTime?{updateTime:qOt(e,s.updateTime)}:void 0!==s.exists?{exists:s.exists}:Ti()),t;var s}(this.serializer,n))};this.i_(t)}}class jLt extends class{}{constructor(i,t,n,r){super(),this.authCredentials=i,this.appCheckCredentials=t,this.connection=n,this.serializer=r,this.m_=!1}f_(){if(this.m_)throw new Ve(ge.FAILED_PRECONDITION,"The client has already been terminated.")}Co(i,t,n,r){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Co(i,WF(t,n),r,s,o)).catch(s=>{throw"FirebaseError"===s.name?(s.code===ge.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Ve(ge.UNKNOWN,s.toString())})}xo(i,t,n,r,s){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,l])=>this.connection.xo(i,WF(t,n),r,o,l,s)).catch(o=>{throw"FirebaseError"===o.name?(o.code===ge.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Ve(ge.UNKNOWN,o.toString())})}terminate(){this.m_=!0,this.connection.terminate()}}class XLt{constructor(i,t){this.asyncQueue=i,this.onlineStateHandler=t,this.state="Unknown",this.g_=0,this.p_=null,this.y_=!0}w_(){0===this.g_&&(this.S_("Unknown"),this.p_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.p_=null,this.b_("Backend didn't respond within 10 seconds."),this.S_("Offline"),Promise.resolve())))}D_(i){"Online"===this.state?this.S_("Unknown"):(this.g_++,this.g_>=1&&(this.C_(),this.b_(`Connection failed 1 times. Most recent error: ${i.toString()}`),this.S_("Offline")))}set(i){this.C_(),this.g_=0,"Online"===i&&(this.y_=!1),this.S_(i)}S_(i){i!==this.state&&(this.state=i,this.onlineStateHandler(i))}b_(i){const t=`Could not reach Cloud Firestore backend. ${i}\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.y_?(Os(t),this.y_=!1):Be("OnlineStateTracker",t)}C_(){null!==this.p_&&(this.p_.cancel(),this.p_=null)}}class YLt{constructor(i,t,n,r,s){var o=this;this.localStore=i,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.v_=[],this.F_=new Map,this.M_=new Set,this.x_=[],this.O_=s,this.O_.io(l=>{n.enqueueAndForget(we(function*(){var w;sf(o)&&(Be("RemoteStore","Restarting streams for network reachability change."),yield(w=we(function*(D){const k=di(D);k.M_.add(4),yield n0(k),k.N_.set("Unknown"),k.M_.delete(4),yield Zb(k)}),function E(D){return w.apply(this,arguments)})(o))}))}),this.N_=new XLt(n,r)}}function Zb(e){return gO.apply(this,arguments)}function gO(){return(gO=we(function*(e){if(sf(e))for(const i of e.x_)yield i(!0)})).apply(this,arguments)}function n0(e){return vO.apply(this,arguments)}function vO(){return(vO=we(function*(e){for(const i of e.x_)yield i(!1)})).apply(this,arguments)}function S_(e,i){const t=di(e);t.F_.has(i.targetId)||(t.F_.set(i.targetId,i),bO(t)?xO(t):a0(t).Xo()&&yO(t,i))}function r0(e,i){const t=di(e),n=a0(t);t.F_.delete(i),n.Xo()&&eZ(t,i),0===t.F_.size&&(n.Xo()?n.n_():sf(t)&&t.N_.set("Unknown"))}function yO(e,i){if(e.L_.xe(i.targetId),i.resumeToken.approximateByteSize()>0||i.snapshotVersion.compareTo(Oi.min())>0){const t=e.remoteSyncer.getRemoteKeysForTarget(i.targetId).size;i=i.withExpectedCount(t)}a0(e).P_(i)}function eZ(e,i){e.L_.xe(i),a0(e).I_(i)}function xO(e){e.L_=new $Ot({getRemoteKeysForTarget:i=>e.remoteSyncer.getRemoteKeysForTarget(i),ot:i=>e.F_.get(i)||null,tt:()=>e.datastore.serializer.databaseId}),a0(e).start(),e.N_.w_()}function bO(e){return sf(e)&&!a0(e).Zo()&&e.F_.size>0}function sf(e){return 0===di(e).M_.size}function iZ(e){e.L_=void 0}function $Lt(e){return wO.apply(this,arguments)}function wO(){return(wO=we(function*(e){e.N_.set("Online")})).apply(this,arguments)}function QLt(e){return TO.apply(this,arguments)}function TO(){return(TO=we(function*(e){e.F_.forEach((i,t)=>{yO(e,i)})})).apply(this,arguments)}function KLt(e,i){return CO.apply(this,arguments)}function CO(){return(CO=we(function*(e,i){iZ(e),bO(e)?(e.N_.D_(i),xO(e)):e.N_.set("Unknown")})).apply(this,arguments)}function ZLt(e,i,t){return SO.apply(this,arguments)}function SO(){return SO=we(function*(e,i,t){if(e.N_.set("Online"),i instanceof $Q&&2===i.state&&i.cause)try{yield(n=we(function*(s,o){const l=o.cause;for(const w of o.targetIds)s.F_.has(w)&&(yield s.remoteSyncer.rejectListen(w,l),s.F_.delete(w),s.L_.removeTarget(w))}),function r(s,o){return n.apply(this,arguments)})(e,i)}catch(n){Be("RemoteStore","Failed to remove targets %s: %s ",i.targetIds.join(","),n),yield E_(e,n)}else if(i instanceof o_?e.L_.Ke(i):i instanceof YQ?e.L_.He(i):e.L_.We(i),!t.isEqual(Oi.min()))try{const n=yield WK(e.localStore);t.compareTo(n)>=0&&(yield function(s,o){const l=s.L_.rt(o);return l.targetChanges.forEach((w,E)=>{if(w.resumeToken.approximateByteSize()>0){const D=s.F_.get(E);D&&s.F_.set(E,D.withResumeToken(w.resumeToken,o))}}),l.targetMismatches.forEach((w,E)=>{const D=s.F_.get(w);if(!D)return;s.F_.set(w,D.withResumeToken(xa.EMPTY_BYTE_STRING,D.snapshotVersion)),eZ(s,w);const k=new kh(D.target,w,E,D.sequenceNumber);yO(s,k)}),s.remoteSyncer.applyRemoteEvent(l)}(e,t))}catch(n){Be("RemoteStore","Failed to raise snapshot:",n),yield E_(e,n)}var n}),SO.apply(this,arguments)}function E_(e,i,t){return EO.apply(this,arguments)}function EO(){return(EO=we(function*(e,i,t){if(!$d(i))throw i;e.M_.add(1),yield n0(e),e.N_.set("Offline"),t||(t=()=>WK(e.localStore)),e.asyncQueue.enqueueRetryable(we(function*(){Be("RemoteStore","Retrying IndexedDB access"),yield t(),e.M_.delete(1),yield Zb(e)}))})).apply(this,arguments)}function nZ(e,i){return i().catch(t=>E_(e,t,i))}function s0(e){return _O.apply(this,arguments)}function _O(){return(_O=we(function*(e){const i=di(e),t=af(i);let n=i.v_.length>0?i.v_[i.v_.length-1].batchId:-1;for(;JLt(i);)try{const r=yield LLt(i.localStore,n);if(null===r){0===i.v_.length&&t.n_();break}n=r.batchId,qLt(i,r)}catch(r){yield E_(i,r)}rZ(i)&&sZ(i)})).apply(this,arguments)}function JLt(e){return sf(e)&&e.v_.length<10}function qLt(e,i){e.v_.push(i);const t=af(e);t.Xo()&&t.E_&&t.d_(i.mutations)}function rZ(e){return sf(e)&&!af(e).Zo()&&e.v_.length>0}function sZ(e){af(e).start()}function tNt(e){return AO.apply(this,arguments)}function AO(){return(AO=we(function*(e){af(e).V_()})).apply(this,arguments)}function eNt(e){return DO.apply(this,arguments)}function DO(){return(DO=we(function*(e){const i=af(e);for(const t of e.v_)i.d_(t.mutations)})).apply(this,arguments)}function iNt(e,i,t){return MO.apply(this,arguments)}function MO(){return(MO=we(function*(e,i,t){const n=e.v_.shift(),r=VF.from(n,i,t);yield nZ(e,()=>e.remoteSyncer.applySuccessfulWrite(r)),yield s0(e)})).apply(this,arguments)}function nNt(e,i){return IO.apply(this,arguments)}function IO(){return IO=we(function*(e,i){var t;i&&af(e).E_&&(yield(t=we(function*(r,s){if(function GQ(e){switch(e){default:return Ti();case ge.CANCELLED:case ge.UNKNOWN:case ge.DEADLINE_EXCEEDED:case ge.RESOURCE_EXHAUSTED:case ge.INTERNAL:case ge.UNAVAILABLE:case ge.UNAUTHENTICATED:return!1;case ge.INVALID_ARGUMENT:case ge.NOT_FOUND:case ge.ALREADY_EXISTS:case ge.PERMISSION_DENIED:case ge.FAILED_PRECONDITION:case ge.ABORTED:case ge.OUT_OF_RANGE:case ge.UNIMPLEMENTED:case ge.DATA_LOSS:return!0}}(l=s.code)&&l!==ge.ABORTED){const o=r.v_.shift();af(r).t_(),yield nZ(r,()=>r.remoteSyncer.rejectFailedWrite(o.batchId,s)),yield s0(r)}var l}),function n(r,s){return t.apply(this,arguments)})(e,i)),rZ(e)&&sZ(e)}),IO.apply(this,arguments)}function aZ(e,i){return RO.apply(this,arguments)}function RO(){return(RO=we(function*(e,i){const t=di(e);t.asyncQueue.verifyOperationInProgress(),Be("RemoteStore","RemoteStore received new credentials");const n=sf(t);t.M_.add(3),yield n0(t),n&&t.N_.set("Unknown"),yield t.remoteSyncer.handleCredentialChange(i),t.M_.delete(3),yield Zb(t)})).apply(this,arguments)}function PO(e,i){return kO.apply(this,arguments)}function kO(){return(kO=we(function*(e,i){const t=di(e);i?(t.M_.delete(2),yield Zb(t)):i||(t.M_.add(2),yield n0(t),t.N_.set("Unknown"))})).apply(this,arguments)}function a0(e){return e.B_||(e.B_=function(t,n,r){const s=di(t);return s.f_(),new HLt(n,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,r)}(e.datastore,e.asyncQueue,{Po:$Lt.bind(null,e),To:QLt.bind(null,e),Ao:KLt.bind(null,e),h_:ZLt.bind(null,e)}),e.x_.push(function(){var i=we(function*(t){t?(e.B_.t_(),bO(e)?xO(e):e.N_.set("Unknown")):(yield e.B_.stop(),iZ(e))});return function(t){return i.apply(this,arguments)}}())),e.B_}function af(e){return e.k_||(e.k_=function(t,n,r){const s=di(t);return s.f_(),new WLt(n,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,r)}(e.datastore,e.asyncQueue,{Po:()=>Promise.resolve(),To:tNt.bind(null,e),Ao:nNt.bind(null,e),R_:eNt.bind(null,e),A_:iNt.bind(null,e)}),e.x_.push(function(){var i=we(function*(t){t?(e.k_.t_(),yield s0(e)):(yield e.k_.stop(),e.v_.length>0&&(Be("RemoteStore",`Stopping write stream with ${e.v_.length} pending writes`),e.v_=[]))});return function(t){return i.apply(this,arguments)}}())),e.k_}class FO{constructor(i,t,n,r,s){this.asyncQueue=i,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=s,this.deferred=new ya,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(i,t,n,r,s){const o=Date.now()+n,l=new FO(i,t,o,r,s);return l.start(n),l}start(i){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),i)}skipDelay(){return this.handleDelayElapsed()}cancel(i){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Ve(ge.CANCELLED,"Operation cancelled"+(i?": "+i:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(i=>this.deferred.resolve(i))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function o0(e,i){if(Os("AsyncQueue",`${i}: ${e}`),$d(e))return new Ve(ge.UNAVAILABLE,`${i}: ${e}`);throw e}class l0{constructor(i){this.comparator=i?(t,n)=>i(t,n)||gi.comparator(t.key,n.key):(t,n)=>gi.comparator(t.key,n.key),this.keyedMap=Fb(),this.sortedSet=new Yr(this.comparator)}static emptySet(i){return new l0(i.comparator)}has(i){return null!=this.keyedMap.get(i)}get(i){return this.keyedMap.get(i)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(i){const t=this.keyedMap.get(i);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(i){this.sortedSet.inorderTraversal((t,n)=>(i(t),!1))}add(i){const t=this.delete(i.key);return t.copy(t.keyedMap.insert(i.key,i),t.sortedSet.insert(i,null))}delete(i){const t=this.get(i);return t?this.copy(this.keyedMap.remove(i),this.sortedSet.remove(t)):this}isEqual(i){if(!(i instanceof l0)||this.size!==i.size)return!1;const t=this.sortedSet.getIterator(),n=i.sortedSet.getIterator();for(;t.hasNext();){const r=t.getNext().key,s=n.getNext().key;if(!r.isEqual(s))return!1}return!0}toString(){const i=[];return this.forEach(t=>{i.push(t.toString())}),0===i.length?"DocumentSet ()":"DocumentSet (\n "+i.join(" \n")+"\n)"}copy(i,t){const n=new l0;return n.comparator=this.comparator,n.keyedMap=i,n.sortedSet=t,n}}class oZ{constructor(){this.q_=new Yr(gi.comparator)}track(i){const t=i.doc.key,n=this.q_.get(t);n?0!==i.type&&3===n.type?this.q_=this.q_.insert(t,i):3===i.type&&1!==n.type?this.q_=this.q_.insert(t,{type:n.type,doc:i.doc}):2===i.type&&2===n.type?this.q_=this.q_.insert(t,{type:2,doc:i.doc}):2===i.type&&0===n.type?this.q_=this.q_.insert(t,{type:0,doc:i.doc}):1===i.type&&0===n.type?this.q_=this.q_.remove(t):1===i.type&&2===n.type?this.q_=this.q_.insert(t,{type:1,doc:n.doc}):0===i.type&&1===n.type?this.q_=this.q_.insert(t,{type:2,doc:i.doc}):Ti():this.q_=this.q_.insert(t,i)}Q_(){const i=[];return this.q_.inorderTraversal((t,n)=>{i.push(n)}),i}}class c0{constructor(i,t,n,r,s,o,l,w,E){this.query=i,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=l,this.excludesMetadataChanges=w,this.hasCachedResults=E}static fromInitialDocuments(i,t,n,r,s){const o=[];return t.forEach(l=>{o.push({type:0,doc:l})}),new c0(i,t,l0.emptySet(t),o,n,r,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(i){if(!(this.fromCache===i.fromCache&&this.hasCachedResults===i.hasCachedResults&&this.syncStateChanged===i.syncStateChanged&&this.mutatedKeys.isEqual(i.mutatedKeys)&&Pb(this.query,i.query)&&this.docs.isEqual(i.docs)&&this.oldDocs.isEqual(i.oldDocs)))return!1;const t=this.docChanges,n=i.docChanges;if(t.length!==n.length)return!1;for(let r=0;ri.G_())}}class sNt{constructor(){this.queries=new Rh(i=>TQ(i),Pb),this.onlineState="Unknown",this.z_=new Set}}function LO(){return(LO=we(function*(e,i){const t=di(e);let n=3;const r=i.query;let s=t.queries.get(r);s?!s.W_()&&i.G_()&&(n=2):(s=new rNt,n=i.G_()?0:1);try{switch(n){case 0:s.K_=yield t.onListen(r,!0);break;case 1:s.K_=yield t.onListen(r,!1);break;case 2:yield t.onFirstRemoteStoreListen(r)}}catch(o){const l=o0(o,`Initialization of query '${Hv(i.query)}' failed`);return void i.onError(l)}t.queries.set(r,s),s.U_.push(i),i.j_(t.onlineState),s.K_&&i.H_(s.K_)&&VO(t)})).apply(this,arguments)}function BO(){return(BO=we(function*(e,i){const t=di(e),n=i.query;let r=3;const s=t.queries.get(n);if(s){const o=s.U_.indexOf(i);o>=0&&(s.U_.splice(o,1),0===s.U_.length?r=i.G_()?0:1:!s.W_()&&i.G_()&&(r=2))}switch(r){case 0:return t.queries.delete(n),t.onUnlisten(n,!0);case 1:return t.queries.delete(n),t.onUnlisten(n,!1);case 2:return t.onLastRemoteStoreUnlisten(n);default:return}})).apply(this,arguments)}function aNt(e,i){const t=di(e);let n=!1;for(const r of i){const o=t.queries.get(r.query);if(o){for(const l of o.U_)l.H_(r)&&(n=!0);o.K_=r}}n&&VO(t)}function oNt(e,i,t){const n=di(e),r=n.queries.get(i);if(r)for(const s of r.U_)s.onError(t);n.queries.delete(i)}function VO(e){e.z_.forEach(i=>{i.next()})}var UO,lZ;(lZ=UO||(UO={})).J_="default",lZ.Cache="cache";class zO{constructor(i,t,n){this.query=i,this.Y_=t,this.Z_=!1,this.X_=null,this.onlineState="Unknown",this.options=n||{}}H_(i){if(!this.options.includeMetadataChanges){const n=[];for(const r of i.docChanges)3!==r.type&&n.push(r);i=new c0(i.query,i.docs,i.oldDocs,n,i.mutatedKeys,i.fromCache,i.syncStateChanged,!0,i.hasCachedResults)}let t=!1;return this.Z_?this.ea(i)&&(this.Y_.next(i),t=!0):this.ta(i,this.onlineState)&&(this.na(i),t=!0),this.X_=i,t}onError(i){this.Y_.error(i)}j_(i){this.onlineState=i;let t=!1;return this.X_&&!this.Z_&&this.ta(this.X_,i)&&(this.na(this.X_),t=!0),t}ta(i,t){return!i.fromCache||!this.G_()||(!this.options.ra||!("Offline"!==t))&&(!i.docs.isEmpty()||i.hasCachedResults||"Offline"===t)}ea(i){return i.docChanges.length>0||!!(i.syncStateChanged||this.X_&&this.X_.hasPendingWrites!==i.hasPendingWrites)&&!0===this.options.includeMetadataChanges}na(i){i=c0.fromInitialDocuments(i.query,i.docs,i.mutatedKeys,i.fromCache,i.hasCachedResults),this.Z_=!0,this.Y_.next(i)}G_(){return this.options.source!==UO.Cache}}class hZ{constructor(i){this.key=i}}class dZ{constructor(i){this.key=i}}class fZ{constructor(i,t){this.query=i,this.la=t,this.ha=null,this.hasCachedResults=!1,this.current=!1,this.Pa=Cn(),this.mutatedKeys=Cn(),this.Ia=SQ(i),this.Ta=new l0(this.Ia)}get Ea(){return this.la}da(i,t){const n=t?t.Aa:new oZ,r=t?t.Ta:this.Ta;let s=t?t.mutatedKeys:this.mutatedKeys,o=r,l=!1;const w="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,E="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(i.inorderTraversal((D,k)=>{const O=r.get(D),L=kb(this.query,k)?k:null,U=!!O&&this.mutatedKeys.has(O.key),j=!!L&&(L.hasLocalMutations||this.mutatedKeys.has(L.key)&&L.hasCommittedMutations);let W=!1;O&&L?O.data.isEqual(L.data)?U!==j&&(n.track({type:3,doc:L}),W=!0):this.Ra(O,L)||(n.track({type:2,doc:L}),W=!0,(w&&this.Ia(L,w)>0||E&&this.Ia(L,E)<0)&&(l=!0)):!O&&L?(n.track({type:0,doc:L}),W=!0):O&&!L&&(n.track({type:1,doc:O}),W=!0,(w||E)&&(l=!0)),W&&(L?(o=o.add(L),s=j?s.add(D):s.delete(D)):(o=o.delete(D),s=s.delete(D)))}),null!==this.query.limit)for(;o.size>this.query.limit;){const D="F"===this.query.limitType?o.last():o.first();o=o.delete(D.key),s=s.delete(D.key),n.track({type:1,doc:D})}return{Ta:o,Aa:n,Xi:l,mutatedKeys:s}}Ra(i,t){return i.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(i,t,n,r){const s=this.Ta;this.Ta=i.Ta,this.mutatedKeys=i.mutatedKeys;const o=i.Aa.Q_();o.sort((D,k)=>function(L,U){const j=W=>{switch(W){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Ti()}};return j(L)-j(U)}(D.type,k.type)||this.Ia(D.doc,k.doc)),this.Va(n),r=null!=r&&r;const l=t&&!r?this.ma():[],w=0===this.Pa.size&&this.current&&!r?1:0,E=w!==this.ha;return this.ha=w,0!==o.length||E?{snapshot:new c0(this.query,i.Ta,s,o,i.mutatedKeys,0===w,E,!1,!!n&&n.resumeToken.approximateByteSize()>0),fa:l}:{fa:l}}j_(i){return this.current&&"Offline"===i?(this.current=!1,this.applyChanges({Ta:this.Ta,Aa:new oZ,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{fa:[]}}ga(i){return!this.la.has(i)&&!!this.Ta.has(i)&&!this.Ta.get(i).hasLocalMutations}Va(i){i&&(i.addedDocuments.forEach(t=>this.la=this.la.add(t)),i.modifiedDocuments.forEach(t=>{}),i.removedDocuments.forEach(t=>this.la=this.la.delete(t)),this.current=i.current)}ma(){if(!this.current)return[];const i=this.Pa;this.Pa=Cn(),this.Ta.forEach(n=>{this.ga(n.key)&&(this.Pa=this.Pa.add(n.key))});const t=[];return i.forEach(n=>{this.Pa.has(n)||t.push(new dZ(n))}),this.Pa.forEach(n=>{i.has(n)||t.push(new hZ(n))}),t}pa(i){this.la=i.hs,this.Pa=Cn();const t=this.da(i.documents);return this.applyChanges(t,!0)}ya(){return c0.fromInitialDocuments(this.query,this.Ta,this.mutatedKeys,0===this.ha,this.hasCachedResults)}}class uNt{constructor(i,t,n){this.query=i,this.targetId=t,this.view=n}}class hNt{constructor(i){this.key=i,this.wa=!1}}class dNt{constructor(i,t,n,r,s,o){this.localStore=i,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Sa={},this.ba=new Rh(l=>TQ(l),Pb),this.Da=new Map,this.Ca=new Set,this.va=new Yr(gi.comparator),this.Fa=new Map,this.Ma=new tO,this.xa={},this.Oa=new Map,this.Na=Yp.Ln(),this.onlineState="Unknown",this.La=void 0}get isPrimaryClient(){return!0===this.La}}function fNt(e,i){return GO.apply(this,arguments)}function GO(){return(GO=we(function*(e,i,t=!0){const n=__(e);let r;const s=n.ba.get(i);return s?(n.sharedClientState.addLocalQueryTarget(s.targetId),r=s.view.ya()):r=yield pZ(n,i,t,!0),r})).apply(this,arguments)}function pNt(e,i){return HO.apply(this,arguments)}function HO(){return(HO=we(function*(e,i){const t=__(e);yield pZ(t,i,!0,!1)})).apply(this,arguments)}function pZ(e,i,t,n){return WO.apply(this,arguments)}function WO(){return(WO=we(function*(e,i,t,n){const r=yield function t0(e,i){const t=di(e);return t.persistence.runTransaction("Allocate target","readwrite",n=>{let r;return t.Qr.getTargetData(n,i).next(s=>s?(r=s,se.resolve(r)):t.Qr.allocateTargetId(n).next(o=>(r=new kh(i,o,"TargetPurposeListen",n.currentSequenceNumber),t.Qr.addTargetData(n,r).next(()=>r))))}).then(n=>{const r=t.ns.get(n.targetId);return(null===r||n.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(t.ns=t.ns.insert(n.targetId,n),t.rs.set(i,n.targetId)),n})}(e.localStore,po(i)),s=r.targetId,o=t?e.sharedClientState.addLocalQueryTarget(s):"not-current";let l;return n&&(l=yield function jO(e,i,t,n,r){return XO.apply(this,arguments)}(e,i,s,"current"===o,r.resumeToken)),e.isPrimaryClient&&t&&S_(e.remoteStore,r),l})).apply(this,arguments)}function XO(){return XO=we(function*(e,i,t,n,r){e.Ba=(k,O,L)=>{return(U=we(function*(W,Z,rt,st){let yt=Z.view.da(rt);yt.Xi&&(yt=yield x_(W.localStore,Z.query,!1).then(({documents:ht})=>Z.view.da(ht,yt)));const Tt=st&&st.targetChanges.get(Z.targetId),It=st&&null!=st.targetMismatches.get(Z.targetId),ft=Z.view.applyChanges(yt,W.isPrimaryClient,Tt,It);return nL(W,Z.targetId,ft.fa),ft.snapshot}),function j(W,Z,rt,st){return U.apply(this,arguments)})(e,k,O,L);var U};const s=yield x_(e.localStore,i,!0),o=new fZ(i,s.hs),l=o.da(s.documents),w=Ub.createSynthesizedTargetChangeForCurrentChange(t,n&&"Offline"!==e.onlineState,r),E=o.applyChanges(l,e.isPrimaryClient,w);nL(e,t,E.fa);const D=new uNt(i,t,o);return e.ba.set(i,D),e.Da.has(t)?e.Da.get(t).push(i):e.Da.set(t,[i]),E.snapshot}),XO.apply(this,arguments)}function mNt(e,i,t){return YO.apply(this,arguments)}function YO(){return(YO=we(function*(e,i,t){const n=di(e),r=n.ba.get(i),s=n.Da.get(r.targetId);if(s.length>1)return n.Da.set(r.targetId,s.filter(o=>!Pb(o,i))),void n.ba.delete(i);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||(yield e0(n.localStore,r.targetId,!1).then(()=>{n.sharedClientState.clearQueryState(r.targetId),t&&r0(n.remoteStore,r.targetId),u0(n,r.targetId)}).catch(Yd))):(u0(n,r.targetId),yield e0(n.localStore,r.targetId,!0))})).apply(this,arguments)}function gNt(e,i){return $O.apply(this,arguments)}function $O(){return($O=we(function*(e,i){const t=di(e),n=t.ba.get(i),r=t.Da.get(n.targetId);t.isPrimaryClient&&1===r.length&&(t.sharedClientState.removeLocalQueryTarget(n.targetId),r0(t.remoteStore,n.targetId))})).apply(this,arguments)}function QO(){return(QO=we(function*(e,i,t){const n=function pL(e){const i=di(e);return i.remoteStore.remoteSyncer.applySuccessfulWrite=xNt.bind(null,i),i.remoteStore.remoteSyncer.rejectFailedWrite=bNt.bind(null,i),i}(e);try{const r=yield function(o,l){const w=di(o),E=us.now(),D=l.reduce((L,U)=>L.add(U.key),Cn());let k,O;return w.persistence.runTransaction("Locally write mutations","readwrite",L=>{let U=ul(),j=Cn();return w.os.getEntries(L,D).next(W=>{U=W,U.forEach((Z,rt)=>{rt.isValidDocument()||(j=j.add(Z))})}).next(()=>w.localDocuments.getOverlayedDocuments(L,U)).next(W=>{k=W;const Z=[];for(const rt of l){const st=jOt(rt,k.get(rt.key).overlayedDocument);null!=st&&Z.push(new Ph(rt.key,st,aQ(st.value.mapValue),ds.exists(!0)))}return w.mutationQueue.addMutationBatch(L,E,Z,l)}).next(W=>{O=W;const Z=W.applyToLocalDocumentSet(k,j);return w.documentOverlayCache.saveOverlays(L,W.batchId,Z)})}).then(()=>({batchId:O.batchId,changes:_Q(k)}))}(n.localStore,i);n.sharedClientState.addPendingMutation(r.batchId),function(o,l,w){let E=o.xa[o.currentUser.toKey()];E||(E=new Yr(cn)),E=E.insert(l,w),o.xa[o.currentUser.toKey()]=E}(n,r.batchId,t),yield Fh(n,r.changes),yield s0(n.remoteStore)}catch(r){const s=o0(r,"Failed to persist write");t.reject(s)}})).apply(this,arguments)}function mZ(e,i){return KO.apply(this,arguments)}function KO(){return(KO=we(function*(e,i){const t=di(e);try{const n=yield function OLt(e,i){const t=di(e),n=i.snapshotVersion;let r=t.ns;return t.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=t.os.newChangeBuffer({trackRemovals:!0});r=t.ns;const l=[];i.targetChanges.forEach((D,k)=>{const O=r.get(k);if(!O)return;l.push(t.Qr.removeMatchingKeys(s,D.removedDocuments,k).next(()=>t.Qr.addMatchingKeys(s,D.addedDocuments,k)));let L=O.withSequenceNumber(s.currentSequenceNumber);var j,W,Z;null!==i.targetMismatches.get(k)?L=L.withResumeToken(xa.EMPTY_BYTE_STRING,Oi.min()).withLastLimboFreeSnapshotVersion(Oi.min()):D.resumeToken.approximateByteSize()>0&&(L=L.withResumeToken(D.resumeToken,n)),r=r.insert(k,L),W=L,Z=D,(0===(j=O).resumeToken.approximateByteSize()||W.snapshotVersion.toMicroseconds()-j.snapshotVersion.toMicroseconds()>=3e8||Z.addedDocuments.size+Z.modifiedDocuments.size+Z.removedDocuments.size>0)&&l.push(t.Qr.updateTargetData(s,L))});let w=ul(),E=Cn();if(i.documentUpdates.forEach(D=>{i.resolvedLimboDocuments.has(D)&&l.push(t.persistence.referenceDelegate.updateLimboDocument(s,D))}),l.push(function jK(e,i,t){let n=Cn(),r=Cn();return t.forEach(s=>n=n.add(s)),i.getEntries(e,n).next(s=>{let o=ul();return t.forEach((l,w)=>{const E=s.get(l);w.isFoundDocument()!==E.isFoundDocument()&&(r=r.add(l)),w.isNoDocument()&&w.version.isEqual(Oi.min())?(i.removeEntry(l,w.readTime),o=o.insert(l,w)):!E.isValidDocument()||w.version.compareTo(E.version)>0||0===w.version.compareTo(E.version)&&E.hasPendingWrites?(i.addEntry(w),o=o.insert(l,w)):Be("LocalStore","Ignoring outdated watch update for ",l,". Current version:",E.version," Watch version:",w.version)}),{cs:o,ls:r}})}(s,o,i.documentUpdates).next(D=>{w=D.cs,E=D.ls})),!n.isEqual(Oi.min())){const D=t.Qr.getLastRemoteSnapshotVersion(s).next(k=>t.Qr.setTargetsMetadata(s,s.currentSequenceNumber,n));l.push(D)}return se.waitFor(l).next(()=>o.apply(s)).next(()=>t.localDocuments.getLocalViewOfDocuments(s,w,E)).next(()=>w)}).then(s=>(t.ns=r,s))}(t.localStore,i);i.targetChanges.forEach((r,s)=>{const o=t.Fa.get(s);o&&(Fi(r.addedDocuments.size+r.modifiedDocuments.size+r.removedDocuments.size<=1),r.addedDocuments.size>0?o.wa=!0:r.modifiedDocuments.size>0?Fi(o.wa):r.removedDocuments.size>0&&(Fi(o.wa),o.wa=!1))}),yield Fh(t,n,i)}catch(n){yield Yd(n)}})).apply(this,arguments)}function gZ(e,i,t){const n=di(e);if(n.isPrimaryClient&&0===t||!n.isPrimaryClient&&1===t){const r=[];n.ba.forEach((s,o)=>{const l=o.view.j_(i);l.snapshot&&r.push(l.snapshot)}),function(o,l){const w=di(o);w.onlineState=l;let E=!1;w.queries.forEach((D,k)=>{for(const O of k.U_)O.j_(l)&&(E=!0)}),E&&VO(w)}(n.eventManager,i),r.length&&n.Sa.h_(r),n.onlineState=i,n.isPrimaryClient&&n.sharedClientState.setOnlineState(i)}}function yNt(e,i,t){return ZO.apply(this,arguments)}function ZO(){return(ZO=we(function*(e,i,t){const n=di(e);n.sharedClientState.updateQueryState(i,"rejected",t);const r=n.Fa.get(i),s=r&&r.key;if(s){let o=new Yr(gi.comparator);o=o.insert(s,ts.newNoDocument(s,Oi.min()));const l=Cn().add(s),w=new Vb(Oi.min(),new Map,new Yr(cn),o,l);yield mZ(n,w),n.va=n.va.remove(s),n.Fa.delete(i),rL(n)}else yield e0(n.localStore,i,!1).then(()=>u0(n,i,t)).catch(Yd)})).apply(this,arguments)}function xNt(e,i){return JO.apply(this,arguments)}function JO(){return(JO=we(function*(e,i){const t=di(e),n=i.batch.batchId;try{const r=yield function FLt(e,i){const t=di(e);return t.persistence.runTransaction("Acknowledge batch","readwrite-primary",n=>{const r=i.batch.keys(),s=t.os.newChangeBuffer({trackRemovals:!0});return function(l,w,E,D){const k=E.batch,O=k.keys();let L=se.resolve();return O.forEach(U=>{L=L.next(()=>D.getEntry(w,U)).next(j=>{const W=E.docVersions.get(U);Fi(null!==W),j.version.compareTo(W)<0&&(k.applyToRemoteDocument(j,E),j.isValidDocument()&&(j.setReadTime(E.commitVersion),D.addEntry(j)))})}),L.next(()=>l.mutationQueue.removeMutationBatch(w,k))}(t,n,i,s).next(()=>s.apply(n)).next(()=>t.mutationQueue.performConsistencyCheck(n)).next(()=>t.documentOverlayCache.removeOverlaysForBatchId(n,r,i.batch.batchId)).next(()=>t.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(n,function(l){let w=Cn();for(let E=0;E0&&(w=w.add(l.batch.mutations[E].key));return w}(i))).next(()=>t.localDocuments.getDocuments(n,r))})}(t.localStore,i);iL(t,n,null),eL(t,n),t.sharedClientState.updateMutationState(n,"acknowledged"),yield Fh(t,r)}catch(r){yield Yd(r)}})).apply(this,arguments)}function bNt(e,i,t){return qO.apply(this,arguments)}function qO(){return(qO=we(function*(e,i,t){const n=di(e);try{const r=yield function(o,l){const w=di(o);return w.persistence.runTransaction("Reject batch","readwrite-primary",E=>{let D;return w.mutationQueue.lookupMutationBatch(E,l).next(k=>(Fi(null!==k),D=k.keys(),w.mutationQueue.removeMutationBatch(E,k))).next(()=>w.mutationQueue.performConsistencyCheck(E)).next(()=>w.documentOverlayCache.removeOverlaysForBatchId(E,D,l)).next(()=>w.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(E,D)).next(()=>w.localDocuments.getDocuments(E,D))})}(n.localStore,i);iL(n,i,t),eL(n,i),n.sharedClientState.updateMutationState(i,"rejected",t),yield Fh(n,r)}catch(r){yield Yd(r)}})).apply(this,arguments)}function eL(e,i){(e.Oa.get(i)||[]).forEach(t=>{t.resolve()}),e.Oa.delete(i)}function iL(e,i,t){const n=di(e);let r=n.xa[n.currentUser.toKey()];if(r){const s=r.get(i);s&&(t?s.reject(t):s.resolve(),r=r.remove(i)),n.xa[n.currentUser.toKey()]=r}}function u0(e,i,t=null){e.sharedClientState.removeLocalQueryTarget(i);for(const n of e.Da.get(i))e.ba.delete(n),t&&e.Sa.ka(n,t);e.Da.delete(i),e.isPrimaryClient&&e.Ma.Vr(i).forEach(n=>{e.Ma.containsKey(n)||vZ(e,n)})}function vZ(e,i){e.Ca.delete(i.path.canonicalString());const t=e.va.get(i);null!==t&&(r0(e.remoteStore,t),e.va=e.va.remove(i),e.Fa.delete(t),rL(e))}function nL(e,i,t){for(const n of t)n instanceof hZ?(e.Ma.addReference(n.key,i),TNt(e,n)):n instanceof dZ?(Be("SyncEngine","Document no longer in limbo: "+n.key),e.Ma.removeReference(n.key,i),e.Ma.containsKey(n.key)||vZ(e,n.key)):Ti()}function TNt(e,i){const t=i.key,n=t.path.canonicalString();e.va.get(t)||e.Ca.has(n)||(Be("SyncEngine","New document in limbo: "+t),e.Ca.add(n),rL(e))}function rL(e){for(;e.Ca.size>0&&e.va.size{o.push(n.Ba(w,i,t).then(E=>{var D;if((E||t)&&n.isPrimaryClient){const k=E?!E.fromCache:null===(D=t?.targetChanges.get(w.targetId))||void 0===D?void 0:D.current;n.sharedClientState.updateQueryState(w.targetId,k?"current":"not-current")}if(E){r.push(E);const k=sO.Ki(w.targetId,E);s.push(k)}}))}),yield Promise.all(o),n.Sa.h_(r),yield(l=we(function*(E,D){const k=di(E);try{yield k.persistence.runTransaction("notifyLocalViewChanges","readwrite",O=>se.forEach(D,L=>se.forEach(L.qi,U=>k.persistence.referenceDelegate.addReference(O,L.targetId,U)).next(()=>se.forEach(L.Qi,U=>k.persistence.referenceDelegate.removeReference(O,L.targetId,U)))))}catch(O){if(!$d(O))throw O;Be("LocalStore","Failed to update sequence numbers: "+O)}for(const O of D){const L=O.targetId;if(!O.fromCache){const U=k.ns.get(L),W=U.withLastLimboFreeSnapshotVersion(U.snapshotVersion);k.ns=k.ns.insert(L,W)}}}),function w(E,D){return l.apply(this,arguments)})(n.localStore,s))}),sL.apply(this,arguments)}function CNt(e,i){return aL.apply(this,arguments)}function aL(){return(aL=we(function*(e,i){const t=di(e);if(!t.currentUser.isEqual(i)){Be("SyncEngine","User change. New user:",i.toKey());const n=yield HK(t.localStore,i);t.currentUser=i,(s=t).Oa.forEach(l=>{l.forEach(w=>{w.reject(new Ve(ge.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),s.Oa.clear(),t.sharedClientState.handleUserChange(i,n.removedBatchIds,n.addedBatchIds),yield Fh(t,n.us)}var s})).apply(this,arguments)}function SNt(e,i){const t=di(e),n=t.Fa.get(i);if(n&&n.wa)return Cn().add(n.key);{let r=Cn();const s=t.Da.get(i);if(!s)return r;for(const o of s){const l=t.ba.get(o);r=r.unionWith(l.view.Ea)}return r}}function __(e){const i=di(e);return i.remoteStore.remoteSyncer.applyRemoteEvent=mZ.bind(null,i),i.remoteStore.remoteSyncer.getRemoteKeysForTarget=SNt.bind(null,i),i.remoteStore.remoteSyncer.rejectListen=yNt.bind(null,i),i.Sa.h_=aNt.bind(null,i.eventManager),i.Sa.ka=oNt.bind(null,i.eventManager),i}class h0{constructor(){this.synchronizeTabs=!1}initialize(i){var t=this;return we(function*(){t.serializer=Kb(i.databaseInfo.databaseId),t.sharedClientState=t.createSharedClientState(i),t.persistence=t.createPersistence(i),yield t.persistence.start(),t.localStore=t.createLocalStore(i),t.gcScheduler=t.createGarbageCollectionScheduler(i,t.localStore),t.indexBackfillerScheduler=t.createIndexBackfillerScheduler(i,t.localStore)})()}createGarbageCollectionScheduler(i,t){return null}createIndexBackfillerScheduler(i,t){return null}createLocalStore(i){return function GK(e,i,t,n){return new kLt(e,i,t,n)}(this.persistence,new zK,i.initialUser,this.serializer)}createPersistence(i){return new eO(g_.Hr,this.serializer)}createSharedClientState(i){return new ZK}terminate(){var i=this;return we(function*(){var t,n;null===(t=i.gcScheduler)||void 0===t||t.stop(),null===(n=i.indexBackfillerScheduler)||void 0===n||n.stop(),i.sharedClientState.shutdown(),yield i.persistence.shutdown()})()}}class d0{initialize(i,t){var n=this;return we(function*(){n.localStore||(n.localStore=i.localStore,n.sharedClientState=i.sharedClientState,n.datastore=n.createDatastore(t),n.remoteStore=n.createRemoteStore(t),n.eventManager=n.createEventManager(t),n.syncEngine=n.createSyncEngine(t,!i.synchronizeTabs),n.sharedClientState.onlineStateHandler=r=>gZ(n.syncEngine,r,1),n.remoteStore.remoteSyncer.handleCredentialChange=CNt.bind(null,n.syncEngine),yield PO(n.remoteStore,n.syncEngine.isPrimaryClient))})()}createEventManager(i){return new sNt}createDatastore(i){const t=Kb(i.databaseInfo.databaseId),n=new GLt(i.databaseInfo);return new jLt(i.authCredentials,i.appCheckCredentials,n,t)}createRemoteStore(i){return n=this.localStore,r=this.datastore,s=i.asyncQueue,o=t=>gZ(this.syncEngine,t,0),l=JK.D()?new JK:new VLt,new YLt(n,r,s,o,l);var n,r,s,o,l}createSyncEngine(i,t){return function(r,s,o,l,w,E,D){const k=new dNt(r,s,o,l,w,E);return D&&(k.La=!0),k}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,i.initialUser,i.maxConcurrentLimboResolutions,t)}terminate(){var i=this;return we(function*(){var t,n;yield(n=we(function*(s){const o=di(s);Be("RemoteStore","RemoteStore shutting down."),o.M_.add(5),yield n0(o),o.O_.shutdown(),o.N_.set("Unknown")}),function r(s){return n.apply(this,arguments)})(i.remoteStore),null===(t=i.datastore)||void 0===t||t.terminate()})()}}class A_{constructor(i){this.observer=i,this.muted=!1}next(i){this.observer.next&&this.Ka(this.observer.next,i)}error(i){this.observer.error?this.Ka(this.observer.error,i):Os("Uncaught Error in snapshot listener:",i.toString())}$a(){this.muted=!0}Ka(i,t){this.muted||setTimeout(()=>{this.muted||i(t)},0)}}class NNt{constructor(i,t,n,r){var s=this;this.authCredentials=i,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=Ra.UNAUTHENTICATED,this.clientId=k$.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,function(){var o=we(function*(l){Be("FirestoreClient","Received user=",l.uid),yield s.authCredentialListener(l),s.user=l});return function(l){return o.apply(this,arguments)}}()),this.appCheckCredentials.start(n,o=>(Be("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(i){this.authCredentialListener=i}setAppCheckTokenChangeListener(i){this.appCheckCredentialListener=i}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Ve(ge.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var i=this;this.asyncQueue.enterRestrictedMode();const t=new ya;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(we(function*(){try{i._onlineComponents&&(yield i._onlineComponents.terminate()),i._offlineComponents&&(yield i._offlineComponents.terminate()),i.authCredentials.shutdown(),i.appCheckCredentials.shutdown(),t.resolve()}catch(n){const r=o0(n,"Failed to shutdown persistence");t.reject(r)}})),t.promise}}function D_(e,i){return gL.apply(this,arguments)}function gL(){return gL=we(function*(e,i){e.asyncQueue.verifyOperationInProgress(),Be("FirestoreClient","Initializing OfflineComponentProvider");const t=e.configuration;yield i.initialize(t);let n=t.initialUser;e.setCredentialChangeListener(function(){var r=we(function*(s){n.isEqual(s)||(yield HK(i.localStore,s),n=s)});return function(s){return r.apply(this,arguments)}}()),i.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=i}),gL.apply(this,arguments)}function vL(e,i){return yL.apply(this,arguments)}function yL(){return(yL=we(function*(e,i){e.asyncQueue.verifyOperationInProgress();const t=yield function xL(e){return bL.apply(this,arguments)}(e);Be("FirestoreClient","Initializing OnlineComponentProvider"),yield i.initialize(t,e.configuration),e.setCredentialChangeListener(n=>aZ(i.remoteStore,n)),e.setAppCheckTokenChangeListener((n,r)=>aZ(i.remoteStore,r)),e._onlineComponents=i})).apply(this,arguments)}function bL(){return(bL=we(function*(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){Be("FirestoreClient","Using user provided OfflineComponentProvider");try{yield D_(e,e._uninitializedComponentsProvider._offline)}catch(i){const t=i;if(!function TZ(e){return"FirebaseError"===e.name?e.code===ge.FAILED_PRECONDITION||e.code===ge.UNIMPLEMENTED:!(typeof DOMException<"u"&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}(t))throw t;Fl("Error using user provided cache. Falling back to memory cache: "+t),yield D_(e,new h0)}}else Be("FirestoreClient","Using default OfflineComponentProvider"),yield D_(e,new h0);return e._offlineComponents})).apply(this,arguments)}function M_(e){return wL.apply(this,arguments)}function wL(){return(wL=we(function*(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(Be("FirestoreClient","Using user provided OnlineComponentProvider"),yield vL(e,e._uninitializedComponentsProvider._online)):(Be("FirestoreClient","Using default OnlineComponentProvider"),yield vL(e,new d0))),e._onlineComponents})).apply(this,arguments)}function CL(){return(CL=we(function*(e){const i=yield M_(e),t=i.eventManager;return t.onListen=fNt.bind(null,i.syncEngine),t.onUnlisten=mNt.bind(null,i.syncEngine),t.onFirstRemoteStoreListen=pNt.bind(null,i.syncEngine),t.onLastRemoteStoreUnlisten=gNt.bind(null,i.syncEngine),t})).apply(this,arguments)}function AZ(e,i,t={}){const n=new ya;return e.asyncQueue.enqueueAndForget(we(function*(){return function(s,o,l,w,E){const D=new A_({next:O=>{o.enqueueAndForget(()=>function NO(e,i){return BO.apply(this,arguments)}(s,k)),O.fromCache&&"server"===w.source?E.reject(new Ve(ge.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):E.resolve(O)},error:O=>E.reject(O)}),k=new zO(l,D,{includeMetadataChanges:!0,ra:!0});return function OO(e,i){return LO.apply(this,arguments)}(s,k)}(yield function p0(e){return CL.apply(this,arguments)}(e),e.asyncQueue,i,t,n)})),n.promise}function DZ(e){const i={};return void 0!==e.timeoutSeconds&&(i.timeoutSeconds=e.timeoutSeconds),i}const MZ=new Map;function SL(e,i,t){if(!t)throw new Ve(ge.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${i}.`)}function IZ(e){if(!gi.isDocumentKey(e))throw new Ve(ge.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function RZ(e){if(gi.isDocumentKey(e))throw new Ve(ge.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function I_(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{const i=(n=e).constructor?n.constructor.name:null;return i?`a custom ${i} object`:"an object"}}var n;return"function"==typeof e?"a function":Ti()}function Vn(e,i){if("_delegate"in e&&(e=e._delegate),!(e instanceof i)){if(i.name===e.constructor.name)throw new Ve(ge.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const t=I_(e);throw new Ve(ge.INVALID_ARGUMENT,`Expected type '${i.name}', but it was: ${t}`)}}return e}class kZ{constructor(i){var t,n;if(void 0===i.host){if(void 0!==i.ssl)throw new Ve(ge.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=i.host,this.ssl=null===(t=i.ssl)||void 0===t||t;if(this.credentials=i.credentials,this.ignoreUndefinedProperties=!!i.ignoreUndefinedProperties,this.localCache=i.localCache,void 0===i.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==i.cacheSizeBytes&&i.cacheSizeBytes<1048576)throw new Ve(ge.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=i.cacheSizeBytes}(function QNt(e,i,t,n){if(!0===i&&!0===n)throw new Ve(ge.INVALID_ARGUMENT,`${e} and ${t} cannot be used together.`)})("experimentalForceLongPolling",i.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",i.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!i.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!(this.experimentalForceLongPolling||void 0!==i.experimentalAutoDetectLongPolling&&!i.experimentalAutoDetectLongPolling),this.experimentalLongPollingOptions=DZ(null!==(n=i.experimentalLongPollingOptions)&&void 0!==n?n:{}),function(s){if(void 0!==s.timeoutSeconds){if(isNaN(s.timeoutSeconds))throw new Ve(ge.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new Ve(ge.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new Ve(ge.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!i.useFetchStreams}isEqual(i){return this.host===i.host&&this.ssl===i.ssl&&this.credentials===i.credentials&&this.cacheSizeBytes===i.cacheSizeBytes&&this.experimentalForceLongPolling===i.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===i.experimentalAutoDetectLongPolling&&this.experimentalLongPollingOptions.timeoutSeconds===i.experimentalLongPollingOptions.timeoutSeconds&&this.ignoreUndefinedProperties===i.ignoreUndefinedProperties&&this.useFetchStreams===i.useFetchStreams}}class Jb{constructor(i,t,n,r){this._authCredentials=i,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new kZ({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Ve(ge.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(i){if(this._settingsFrozen)throw new Ve(ge.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 kZ(i),void 0!==i.credentials&&(this._authCredentials=function(n){if(!n)return new jFt;switch(n.type){case"firstParty":return new QFt(n.sessionIndex||"0",n.iamToken||null,n.authTokenFactory||null);case"provider":return n.client;default:throw new Ve(ge.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(i.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(t){const n=MZ.get(t);n&&(Be("ComponentProvider","Removing Datastore"),MZ.delete(t),n.terminate())}(this),Promise.resolve()}}class Ka{constructor(i,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=i}withConverter(i){return new Ka(this.firestore,i,this._query)}}class Ns{constructor(i,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=i}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Du(this.firestore,this.converter,this._key.path.popLast())}withConverter(i){return new Ns(this.firestore,i,this._key)}}class Du extends Ka{constructor(i,t,n){super(i,t,zv(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const i=this._path.popLast();return i.isEmpty()?null:new Ns(this.firestore,null,new gi(i))}withConverter(i){return new Du(this.firestore,i,this._path)}}function FZ(e,i,...t){if(e=Vc(e),SL("collection","path",i),e instanceof Jb){const n=Wn.fromString(i,...t);return RZ(n),new Du(e,null,n)}{if(!(e instanceof Ns||e instanceof Du))throw new Ve(ge.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(Wn.fromString(i,...t));return RZ(n),new Du(e.firestore,null,n)}}class JNt{constructor(){this.iu=Promise.resolve(),this.su=[],this.ou=!1,this._u=[],this.au=null,this.uu=!1,this.cu=!1,this.lu=[],this.Yo=new mO(this,"async_queue_retry"),this.hu=()=>{const t=C_();t&&Be("AsyncQueue","Visibility state changed to "+t.visibilityState),this.Yo.Wo()};const i=C_();i&&"function"==typeof i.addEventListener&&i.addEventListener("visibilitychange",this.hu)}get isShuttingDown(){return this.ou}enqueueAndForget(i){this.enqueue(i)}enqueueAndForgetEvenWhileRestricted(i){this.Pu(),this.Iu(i)}enterRestrictedMode(i){if(!this.ou){this.ou=!0,this.cu=i||!1;const t=C_();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.hu)}}enqueue(i){if(this.Pu(),this.ou)return new Promise(()=>{});const t=new ya;return this.Iu(()=>this.ou&&this.cu?Promise.resolve():(i().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(i){this.enqueueAndForget(()=>(this.su.push(i),this.Tu()))}Tu(){var i=this;return we(function*(){if(0!==i.su.length){try{yield i.su[0](),i.su.shift(),i.Yo.reset()}catch(t){if(!$d(t))throw t;Be("AsyncQueue","Operation failed with retryable error: "+t)}i.su.length>0&&i.Yo.$o(()=>i.Tu())}})()}Iu(i){const t=this.iu.then(()=>(this.uu=!0,i().catch(n=>{throw this.au=n,this.uu=!1,Os("INTERNAL UNHANDLED ERROR: ",function(o){let l=o.message||"";return o.stack&&(l=o.stack.includes(o.message)?o.stack:o.message+"\n"+o.stack),l}(n)),n}).then(n=>(this.uu=!1,n))));return this.iu=t,t}enqueueAfterDelay(i,t,n){this.Pu(),this.lu.indexOf(i)>-1&&(t=0);const r=FO.createAndSchedule(this,i,t,n,s=>this.Eu(s));return this._u.push(r),r}Pu(){this.au&&Ti()}verifyOperationInProgress(){}du(){var i=this;return we(function*(){let t;do{t=i.iu,yield t}while(t!==i.iu)})()}Au(i){for(const t of this._u)if(t.timerId===i)return!0;return!1}Ru(i){return this.du().then(()=>{this._u.sort((t,n)=>t.targetTimeMs-n.targetTimeMs);for(const t of this._u)if(t.skipDelay(),"all"!==i&&t.timerId===i)break;return this.du()})}Vu(i){this.lu.push(i)}Eu(i){const t=this._u.indexOf(i);this._u.splice(t,1)}}class kr extends Jb{constructor(i,t,n,r){super(i,t,n,r),this.type="firestore",this._queue=new JNt,this._persistenceKey=r?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||LZ(this),this._firestoreClient.terminate()}}function t4t(e,i){const t="object"==typeof e?e:function FFt(e=GE){const i=Rp.get(e);if(!i&&e===GE&&JY())return m$();if(!i)throw uc.create("no-app",{appName:e});return i}(),n="string"==typeof e?e:i||"(default)",r=function f$(e,i){const t=e.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),e.container.getProvider(i)}(t,"firestore").getImmediate({identifier:n});if(!r._initialized){const s=(e=>{const i=(e=>{var i,t;return null===(t=null===(i=VE())||void 0===i?void 0:i.emulatorHosts)||void 0===t?void 0:t[e]})(e);if(!i)return;const t=i.lastIndexOf(":");if(t<=0||t+1===i.length)throw new Error(`Invalid host ${i} with no separate hostname and port!`);const n=parseInt(i.substring(t+1),10);return"["===i[0]?[i.substring(1,t-1),n]:[i.substring(0,t),n]})("firestore");s&&function KNt(e,i,t,n={}){var r;const s=(e=Vn(e,Jb))._getSettings(),o=`${i}:${t}`;if("firestore.googleapis.com"!==s.host&&s.host!==o&&Fl("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),n.mockUserToken){let l,w;if("string"==typeof n.mockUserToken)l=n.mockUserToken,w=Ra.MOCK_USER;else{l=function Ckt(e,i){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=i||"demo-project",r=e.iat||0,s=e.sub||e.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},e);return[BE(JSON.stringify({alg:"none",type:"JWT"})),BE(JSON.stringify(o)),""].join(".")}(n.mockUserToken,null===(r=e._app)||void 0===r?void 0:r.options.projectId);const E=n.mockUserToken.sub||n.mockUserToken.user_id;if(!E)throw new Ve(ge.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");w=new Ra(E)}e._authCredentials=new XFt(new R$(l,w))}}(r,...s)}return r}function bs(e){return e._firestoreClient||LZ(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function LZ(e){var i,t,n;const r=e._freezeSettings(),s=(w=(null===(i=e._app)||void 0===i?void 0:i.options.appId)||"",new SOt(e._databaseId,w,e._persistenceKey,(D=r).host,D.ssl,D.experimentalForceLongPolling,D.experimentalAutoDetectLongPolling,DZ(D.experimentalLongPollingOptions),D.useFetchStreams));var w,D;e._firestoreClient=new NNt(e._authCredentials,e._appCheckCredentials,e._queue,s),null!==(t=r.localCache)&&void 0!==t&&t._offlineComponentProvider&&null!==(n=r.localCache)&&void 0!==n&&n._onlineComponentProvider&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:r.localCache.kind,_offline:r.localCache._offlineComponentProvider,_online:r.localCache._onlineComponentProvider})}class Qp{constructor(i){this._byteString=i}static fromBase64String(i){try{return new Qp(xa.fromBase64String(i))}catch(t){throw new Ve(ge.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(i){return new Qp(xa.fromUint8Array(i))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(i){return this._byteString.isEqual(i._byteString)}}class Kp{constructor(...i){for(let t=0;t90)throw new Ve(ge.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+i);if(!isFinite(t)||t<-180||t>180)throw new Ve(ge.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=i,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(i){return this._lat===i._lat&&this._long===i._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(i){return cn(this._lat,i._lat)||cn(this._long,i._long)}}const i4t=/^__.*__$/;class n4t{constructor(i,t,n){this.data=i,this.fieldMask=t,this.fieldTransforms=n}toMutation(i,t){return null!==this.fieldMask?new Ph(i,this.data,this.fieldMask,t,this.fieldTransforms):new Xv(i,this.data,t,this.fieldTransforms)}}function UZ(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Ti()}}class R_{constructor(i,t,n,r,s,o){this.settings=i,this.databaseId=t,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===s&&this.mu(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get fu(){return this.settings.fu}gu(i){return new R_(Object.assign(Object.assign({},this.settings),i),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}pu(i){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(i),r=this.gu({path:n,yu:!1});return r.wu(i),r}Su(i){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(i),r=this.gu({path:n,yu:!1});return r.mu(),r}bu(i){return this.gu({path:void 0,yu:!0})}Du(i){return F_(i,this.settings.methodName,this.settings.Cu||!1,this.path,this.settings.vu)}contains(i){return void 0!==this.fieldMask.find(t=>i.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>i.isPrefixOf(t.field))}mu(){if(this.path)for(let i=0;iw.covers(k.field))}else w=null,E=o.fieldTransforms;return new n4t(new Qa(l),w,E)}function Jp(e,i){if(WZ(e=Vc(e)))return kL("Unsupported field value:",i,e),HZ(e,i);if(e instanceof m0)return function(n,r){if(!UZ(r.fu))throw r.Du(`${n._methodName}() can only be used with update() and set()`);if(!r.path)throw r.Du(`${n._methodName}() is not currently supported inside arrays`);const s=n._toFieldTransform(r);s&&r.fieldTransforms.push(s)}(e,i),null;if(void 0===e&&i.ignoreUndefinedProperties)return null;if(i.path&&i.fieldMask.push(i.path),e instanceof Array){if(i.settings.yu&&4!==i.fu)throw i.Du("Nested arrays are not supported");return function(n,r){const s=[];let o=0;for(const l of n){let w=Jp(l,r.bu(o));null==w&&(w={nullValue:"NULL_VALUE"}),s.push(w),o++}return{arrayValue:{values:s}}}(e,i)}return function(n,r){if(null===(n=Vc(n)))return{nullValue:"NULL_VALUE"};if("number"==typeof n)return IQ(r.serializer,n);if("boolean"==typeof n)return{booleanValue:n};if("string"==typeof n)return{stringValue:n};if(n instanceof Date){const s=us.fromDate(n);return{timestampValue:$v(r.serializer,s)}}if(n instanceof us){const s=new us(n.seconds,1e3*Math.floor(n.nanoseconds/1e3));return{timestampValue:$v(r.serializer,s)}}if(n instanceof _L)return{geoPointValue:{latitude:n.latitude,longitude:n.longitude}};if(n instanceof Qp)return{bytesValue:JQ(r.serializer,n._byteString)};if(n instanceof Ns){const s=r.databaseId,o=n.firestore._databaseId;if(!o.isEqual(s))throw r.Du(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:HF(n.firestore._databaseId||r.databaseId,n._key.path)}}throw r.Du(`Unsupported field value: ${I_(n)}`)}(e,i)}function HZ(e,i){const t={};return Z$(e)?i.path&&i.path.length>0&&i.fieldMask.push(i.path):Qd(e,(n,r)=>{const s=Jp(r,i.pu(n));null!=s&&(t[n]=s)}),{mapValue:{fields:t}}}function WZ(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof us||e instanceof _L||e instanceof Qp||e instanceof Ns||e instanceof m0)}function kL(e,i,t){if(!WZ(t)||"object"!=typeof(r=t)||null===r||Object.getPrototypeOf(r)!==Object.prototype&&null!==Object.getPrototypeOf(r)){const n=I_(t);throw i.Du("an object"===n?e+" a custom object":e+" "+n)}var r}function e1(e,i,t){if((i=Vc(i))instanceof Kp)return i._internalPath;if("string"==typeof i)return k_(e,i);throw F_("Field path arguments must be of type string or ",e,!1,void 0,t)}const s4t=new RegExp("[~\\*/\\[\\]]");function k_(e,i,t){if(i.search(s4t)>=0)throw F_(`Invalid field path (${i}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,t);try{return new Kp(...i.split("."))._internalPath}catch{throw F_(`Invalid field path (${i}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,t)}}function F_(e,i,t,n,r){const s=n&&!n.isEmpty(),o=void 0!==r;let l=`Function ${i}() called with invalid data`;t&&(l+=" (via `toFirestore()`)"),l+=". ";let w="";return(s||o)&&(w+=" (found",s&&(w+=` in field ${n}`),o&&(w+=` in document ${r}`),w+=")"),new Ve(ge.INVALID_ARGUMENT,l+e+w)}function jZ(e,i){return e.some(t=>t.isEqual(i))}class n1{constructor(i,t,n,r,s){this._firestore=i,this._userDataWriter=t,this._key=n,this._document=r,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new Ns(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const i=new a4t(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(i)}return this._userDataWriter.convertValue(this._document.data.value)}}get(i){if(this._document){const t=this._document.data.field(O_("DocumentSnapshot.get",i));if(null!==t)return this._userDataWriter.convertValue(t)}}}class a4t extends n1{data(){return super.data()}}function O_(e,i){return"string"==typeof i?k_(e,i):i instanceof Kp?i._internalPath:i._delegate._internalPath}class FL{}class r1 extends FL{}class s1 extends r1{constructor(i,t,n){super(),this._field=i,this._op=t,this._value=n,this.type="where"}static _create(i,t,n){return new s1(i,t,n)}_apply(i){const t=this._parse(i);return KZ(i._query,t),new Ka(i.firestore,i.converter,OF(i._query,t))}_parse(i){const t=Zp(i.firestore);return function(s,o,l,w,E,D,k){let O;if(E.isKeyField()){if("array-contains"===D||"array-contains-any"===D)throw new Ve(ge.INVALID_ARGUMENT,`Invalid Query. You can't perform '${D}' queries on documentId().`);if("in"===D||"not-in"===D){QZ(k,D);const L=[];for(const U of k)L.push($Z(w,s,U));O={arrayValue:{values:L}}}else O=$Z(w,s,k)}else"in"!==D&&"not-in"!==D&&"array-contains-any"!==D||QZ(k,D),O=function GZ(e,i,t,n=!1){return Jp(t,e.Fu(n?4:3,i))}(l,"where",k,"in"===D||"not-in"===D);return jn.create(E,D,O)}(i._query,0,t,i.firestore._databaseId,this._field,this._op,this._value)}}class g0 extends FL{constructor(i,t){super(),this.type=i,this._queryConstraints=t}static _create(i,t){return new g0(i,t)}_parse(i){const t=this._queryConstraints.map(n=>n._parse(i)).filter(n=>n.getFilters().length>0);return 1===t.length?t[0]:Er.create(t,this._getOperator())}_apply(i){const t=this._parse(i);return 0===t.getFilters().length?i:(function(r,s){let o=r;const l=s.getFlattenedFilters();for(const w of l)KZ(o,w),o=OF(o,w)}(i._query,t),new Ka(i.firestore,i.converter,OF(i._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class OL extends r1{constructor(i,t){super(),this._field=i,this._direction=t,this.type="orderBy"}static _create(i,t){return new OL(i,t)}_apply(i){const t=function(r,s,o){if(null!==r.startAt)throw new Ve(ge.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==r.endAt)throw new Ve(ge.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new Ib(s,o)}(i._query,this._field,this._direction);return new Ka(i.firestore,i.converter,function(r,s){const o=r.explicitOrderBy.concat([s]);return new Ih(r.path,r.collectionGroup,o,r.filters.slice(),r.limit,r.limitType,r.startAt,r.endAt)}(i._query,t))}}class L_ extends r1{constructor(i,t,n){super(),this.type=i,this._limit=t,this._limitType=n}static _create(i,t,n){return new L_(i,t,n)}_apply(i){return new Ka(i.firestore,i.converter,i_(i._query,this._limit,this._limitType))}}function $Z(e,i,t){if("string"==typeof(t=Vc(t))){if(""===t)throw new Ve(ge.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!FF(i)&&-1!==t.indexOf("/"))throw new Ve(ge.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${t}' contains a '/' character.`);const n=i.path.child(Wn.fromString(t));if(!gi.isDocumentKey(n))throw new Ve(ge.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${n}' is not because it has an odd number of segments (${n.length}).`);return Bp(e,new gi(n))}if(t instanceof Ns)return Bp(e,t._key);throw new Ve(ge.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${I_(t)}.`)}function QZ(e,i){if(!Array.isArray(e)||0===e.length)throw new Ve(ge.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${i.toString()}' filters.`)}function KZ(e,i){const t=function(r,s){for(const o of r)for(const l of o.getFlattenedFilters())if(s.indexOf(l.op)>=0)return l.op;return null}(e.filters,function(r){switch(r){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(i.op));if(null!==t)throw new Ve(ge.INVALID_ARGUMENT,t===i.op?`Invalid query. You cannot use more than one '${i.op.toString()}' filter.`:`Invalid query. You cannot use '${i.op.toString()}' filters with '${t.toString()}' filters.`)}class JZ{convertValue(i,t="none"){switch(Zd(i)){case 0:return null;case 1:return i.booleanValue;case 2:return Es(i.integerValue||i.doubleValue);case 3:return this.convertTimestamp(i.timestampValue);case 4:return this.convertServerTimestamp(i,t);case 5:return i.stringValue;case 6:return this.convertBytes(Mh(i.bytesValue));case 7:return this.convertReference(i.referenceValue);case 8:return this.convertGeoPoint(i.geoPointValue);case 9:return this.convertArray(i.arrayValue,t);case 10:return this.convertObject(i.mapValue,t);default:throw Ti()}}convertObject(i,t){return this.convertObjectMap(i.fields,t)}convertObjectMap(i,t="none"){const n={};return Qd(i,(r,s)=>{n[r]=this.convertValue(s,t)}),n}convertGeoPoint(i){return new _L(Es(i.latitude),Es(i.longitude))}convertArray(i,t){return(i.values||[]).map(n=>this.convertValue(n,t))}convertServerTimestamp(i,t){switch(t){case"previous":const n=KE(i);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(_b(i));default:return null}}convertTimestamp(i){const t=Dh(i);return new us(t.seconds,t.nanos)}convertDocumentKey(i,t){const n=Wn.fromString(i);Fi(uK(n));const r=new Np(n.get(1),n.get(3)),s=new gi(n.popFirst(5));return r.isEqual(t)||Os(`Document ${s} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),s}}class qp{constructor(i,t){this.hasPendingWrites=i,this.fromCache=t}isEqual(i){return this.hasPendingWrites===i.hasPendingWrites&&this.fromCache===i.fromCache}}class v0 extends n1{constructor(i,t,n,r,s,o){super(i,t,n,r,o),this._firestore=i,this._firestoreImpl=i,this.metadata=s}exists(){return super.exists()}data(i={}){if(this._document){if(this._converter){const t=new U_(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,i)}return this._userDataWriter.convertValue(this._document.data.value,i.serverTimestamps)}}get(i,t={}){if(this._document){const n=this._document.data.field(O_("DocumentSnapshot.get",i));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class U_ extends v0{data(i={}){return super.data(i)}}class y0{constructor(i,t,n,r){this._firestore=i,this._userDataWriter=t,this._snapshot=r,this.metadata=new qp(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){const i=[];return this.forEach(t=>i.push(t)),i}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(i,t){this._snapshot.docs.forEach(n=>{i.call(t,new U_(this._firestore,this._userDataWriter,n.key,n,new qp(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}docChanges(i={}){const t=!!i.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new Ve(ge.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(r,s){if(r._snapshot.oldDocs.isEmpty()){let o=0;return r._snapshot.docChanges.map(l=>({type:"added",doc:new U_(r._firestore,r._userDataWriter,l.doc.key,l.doc,new qp(r._snapshot.mutatedKeys.has(l.doc.key),r._snapshot.fromCache),r.query.converter),oldIndex:-1,newIndex:o++}))}{let o=r._snapshot.oldDocs;return r._snapshot.docChanges.filter(l=>s||3!==l.type).map(l=>{const w=new U_(r._firestore,r._userDataWriter,l.doc.key,l.doc,new qp(r._snapshot.mutatedKeys.has(l.doc.key),r._snapshot.fromCache),r.query.converter);let E=-1,D=-1;return 0!==l.type&&(E=o.indexOf(l.doc.key),o=o.delete(l.doc.key)),1!==l.type&&(o=o.add(l.doc),D=o.indexOf(l.doc.key)),{type:d4t(l.type),doc:w,oldIndex:E,newIndex:D}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function d4t(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Ti()}}class lf extends JZ{constructor(i){super(),this.firestore=i}convertBytes(i){return new Qp(i)}convertReference(i){const t=this.convertDocumentKey(i,this.firestore._databaseId);return new Ns(this.firestore,null,t)}}function p4t(e,i){const t=Vn(e.firestore,kr),n=function ZNt(e,i,...t){if(e=Vc(e),1===arguments.length&&(i=k$.newId()),SL("doc","path",i),e instanceof Jb){const n=Wn.fromString(i,...t);return IZ(n),new Ns(e,null,new gi(n))}{if(!(e instanceof Ns||e instanceof Du))throw new Ve(ge.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(Wn.fromString(i,...t));return IZ(n),new Ns(e.firestore,e instanceof Du?e.converter:null,new gi(n))}}(e),r=function V_(e,i,t){let n;return n=e?t&&(t.merge||t.mergeFields)?e.toFirestore(i,t):e.toFirestore(i):i,n}(e.converter,i);return function a1(e,i){return function(n,r){const s=new ya;return n.asyncQueue.enqueueAndForget(we(function*(){return function vNt(e,i,t){return QO.apply(this,arguments)}(yield function TL(e){return M_(e).then(i=>i.syncEngine)}(n),r,s)})),s.promise}(bs(e),i)}(t,[P_(Zp(e.firestore),"addDoc",n._key,r,null!==e.converter,{}).toMutation(n._key,ds.exists(!1))]).then(()=>n)}!function(i,t=!0){kv="10.12.3",HE(new vb("firestore",(n,{instanceIdentifier:r,options:s})=>{const o=n.getProvider("app").getImmediate(),l=new kr(new YFt(n.getProvider("auth-internal")),new KFt(n.getProvider("app-check-internal")),function(E,D){if(!Object.prototype.hasOwnProperty.apply(E.options,["projectId"]))throw new Ve(ge.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Np(E.options.projectId,D)}(o,r),o);return s=Object.assign({useFetchStreams:t},s),l._setSettings(s),l},"PUBLIC").setMultipleInstances(!0)),Pp(I$,"4.6.4",i),Pp(I$,"4.6.4","esm2017")}();let iJ=(()=>{class e{constructor(t){this.terminologyService=t,this.goals=[{name:"Bronze",score:100},{name:"Silver",score:200},{name:"Gold",score:300},{name:"Platinum",score:400},{name:"Diamond",score:500}],this.difficultyLevels=[{name:"Easy",rules:{maxHitPoints:5,hitpointsAwardedForGuessingfullTerm:1,freeHints:2,pointsPerGuessedLetter:1,goals:this.goals,difficultyBonus:0,endless:!1,maxRoundTime:60}},{name:"Medium",rules:{maxHitPoints:4,hitpointsAwardedForGuessingfullTerm:1,freeHints:1,pointsPerGuessedLetter:2,goals:this.goals,difficultyBonus:50,endless:!1,maxRoundTime:50}},{name:"Hard",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals,difficultyBonus:100,endless:!1,maxRoundTime:40}},{name:"Endless",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals,difficultyBonus:100,endless:!0,maxRoundTime:30}}],this.rules=this.difficultyLevels[0].rules,this.fsn="",this.scg="",this.focusConcepts=[],this.attributePairs=[],this.usedHints=new Set,this.randomLimit=4e3,this.guessResult=new Oe,this.termResult=new Oe,this.game=new Kr(this.initialize())}loadMenu(){this.clearRoundTimer(),this.game.next({...this.game.value,state:"menu"})}getDifficultyLevels(){return this.difficultyLevels}newRound(t){var n=this;return we(function*(){n.clearRoundTimer(),n.game.next({...n.game.value,state:"choosingTerm",score:t?0:n.game.value.score,hitPoints:t?n.rules.maxHitPoints:n.game.value.hitPoints,round:t?1:n.game.value.round+1,remainingTime:n.rules.maxRoundTime});const r=Math.floor(Math.random()*n.randomLimit)+1,s=yield Ia(n.terminologyService.expandValueSet("^ 816080008 |International Patient Summary| {{ C definitionStatus = defined }}","",r,1));n.randomLimit=s.expansion.total-1;const o=yield Ia(n.terminologyService.lookupConcept(s.expansion.contains[0].code));let l=n.extractFSN(o);n.fsn=l||"";let w=n.extractScg(o);n.scg=w||"";let E=n.extractFocusConcepts(w||"");n.focusConcepts=E||[];let D=n.extractAttributePairs(w||"");n.attributePairs=D||[],l?n.initializeRound(l,t):n.initializeRound("No term found"),n.usedHints.clear()})()}extractFSN(t){let n=this.extractTerm(t,"900000000000003001",this.terminologyService.getLang());return n||(n=this.extractTerm(t,"900000000000013009",this.terminologyService.getLang())),n||(n=this.extractTerm(t,"900000000000003001","en")),n}extractTerm(t,n,r){let s="";return t.parameter.forEach(o=>{if("designation"===o.name){let l=o.part.some(E=>"use"===E.name&&E.valueCoding.code===n),w=o.part.some(E=>"language"===E.name&&E.valueCode===r);l&&w&&(s=o.part.find(E=>"value"===E.name)?.valueString)}}),s}extractScg(t){let n;return t.parameter.forEach(r=>{"property"===r.name&&r.part.some(s=>"code"===s.name&&"normalForm"===s.valueString)&&(n=r.part.find(s=>"valueString"===s.name)?.valueString)}),n}extractFocusConcepts(t){const[n]=t.split(":").map(l=>l.trim()),s=n.match(/\d+\|.*?\|/g);return s?s.map(l=>this.transformSnomedConcept(l.trim())||{code:"",display:""}).filter(l=>""!==l.code):[]}extractAttributePairs(t){const n=t.split(":").slice(1).join(":").trim(),r=/(\d+\|.*?\|)\s*=\s*(\d+\|.*?\|)/g;let s;const o=[];for(;null!==(s=r.exec(n));){const l=this.transformSnomedConcept(s[1].trim()),w=this.transformSnomedConcept(s[2].trim());l&&w&&o.push({type:l,target:w})}return o}transformSnomedConcept(t){const r=t.match(/^(\d+)\|(.+?)\|$/);return r?{code:r[1],display:r[2]}:null}initialize(){return{term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"menu",score:0,round:0,rules:this.rules,difficultyLevel:"",startTimestamp:0,endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0,maxRoundTime:0,remainingTime:0}}startGame(t){this.clearRoundTimer(),this.rules=this.difficultyLevels.find(n=>n.name.toLowerCase()===t.toLowerCase())?.rules,this.game.next({term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"playing",score:0,round:0,rules:this.rules,difficultyLevel:t,startTimestamp:Date.now(),endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0,maxRoundTime:this.rules.maxRoundTime,remainingTime:this.rules.maxRoundTime}),this.newRound(!0)}initializeRound(t,n){const r=t.match(/\(([^)]+)\)$/),s=r?r[0]:"",o=s?t.lastIndexOf(s):t.length,l=t.split("").map((w,E)=>E>=o?w:/[a-zA-Z0-9\xe1-\xfa\xf1]/.test(w)?"_":w);this.game.next({...this.game.value,term:t,displayTerm:l,hitPoints:n?this.rules.maxHitPoints:this.game.value.hitPoints,hints:[],state:"playing",score:n?0:this.game.value.score,remainingTime:this.rules.maxRoundTime}),this.startRoundTimer();for(let w=0;w{wthis.goals[this.goals.length-1].score&&!1===this.rules.endless){n.state="won",n.endTimestamp=Date.now(),n.difficultyBonus=this.rules.difficultyBonus,n.livesBonus=10*n.hitPoints;const w=Math.round((n.endTimestamp-n.startTimestamp)/1e3);n.timeBonus=Math.max(0,180-w),n.score+=n.difficultyBonus+n.livesBonus+n.timeBonus}else n.hitPoints=n.hitPoints+this.rules.hitpointsAwardedForGuessingfullTerm,n.hitPoints>this.rules.maxHitPoints&&(n.hitPoints=this.rules.maxHitPoints),setTimeout(()=>{this.newRound()},1500)}else this.guessResult.emit({letter:t,result:!1}),n.hitPoints-=1,n.hitPoints<=0&&(n.hitPoints=0,n.state="gameOver",n.endTimestamp=Date.now(),n.difficultyBonus=this.rules.difficultyBonus,n.score+=n.difficultyBonus,this.clearRoundTimer());this.game.next(n)}revealHint(t){let n={...this.game.value},r="";if(0===this.focusConcepts.length&&0===this.attributePairs.length)return n.hints.push("No more hints available."),void this.game.next(n);let s=this.focusConcepts.length>0,o=this.attributePairs.length>0;if(s&&o&&(s=Math.random()<.5),s){let l=Math.floor(Math.random()*this.focusConcepts.length);r=`One of the parents of this concept is: ${this.focusConcepts[l].display}`,this.focusConcepts.splice(l,1)}else if(o){let l=Math.floor(Math.random()*this.attributePairs.length),w=this.attributePairs[l];r=`This concept has a ${w.type.display} of ${w.target.display}`,this.attributePairs.splice(l,1)}this.usedHints.add(r),n.hints.push(r),t||(n.hitPoints-=1),n.hintsAvailable=this.focusConcepts.length>0||this.attributePairs.length>0,this.game.next(n),n.hitPoints<=0&&(n.hitPoints=0,n.state="gameOver",n.endTimestamp=Date.now(),this.clearRoundTimer(),this.game.next(n))}getGameState(){return this.game.asObservable()}startRoundTimer(){this.roundTimer=setInterval(()=>{const t=this.game.value,n=t.remainingTime-1,r={...t,remainingTime:n};n<=0?(r.remainingTime=0,r.state="gameOver",r.endTimestamp=Date.now(),this.clearRoundTimer(),this.game.next(r)):this.game.next(r)},1e3)}clearRoundTimer(){this.roundTimer&&(clearInterval(this.roundTimer),this.roundTimer=null)}static{this.\u0275fac=function(n){return new(n||e)(re(ma))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),A4t=(()=>{class e{constructor(){this.loadingProgress=new Kr(0)}preloadImages(t){const n=t.map((r,s)=>this.preloadImage(r,t.length,s));return Promise.all(n).then(()=>{this.loadingProgress.next(100)})}preloadImage(t,n,r){return new Promise((s,o)=>{const l=new Image;l.src=t,l.onload=()=>{this.loadingProgress.next((r+1)/n*100),s()},l.onerror=o})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),nJ=(()=>{class e{constructor(){this.db=t4t(),this.scoreLimit=20}addScore(t,n){var r=this;return we(function*(){try{yield p4t(FZ(r.db,t),n)}catch(s){console.error("Error adding document: ",s)}})()}getScores(t){var n=this;return we(function*(){const s=function o4t(e,i,...t){let n=[];i instanceof FL&&n.push(i),n=n.concat(t),function(s){const o=s.filter(w=>w instanceof g0).length,l=s.filter(w=>w instanceof s1).length;if(o>1||o>0&&l>0)throw new Ve(ge.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(n);for(const r of n)e=r._apply(e);return e}(FZ(n.db,t),function l4t(e,i="asc"){const t=i,n=O_("orderBy",e);return OL._create(n,t)}("score","desc"),function c4t(e){return function PZ(e,i){if(i<=0)throw new Ve(ge.INVALID_ARGUMENT,`Function ${e}() requires a positive number, but it was: ${i}.`)}("limit",e),L_._create("limit",e,"F")}(n.scoreLimit));return(yield function f4t(e){e=Vn(e,Ka);const i=Vn(e.firestore,kr),t=bs(i),n=new lf(i);return function XZ(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new Ve(ge.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(e._query),AZ(t,e._query).then(r=>new y0(i,n,e,r))}(s)).docs.map(l=>({id:l.id,...l.data()}))})()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function D4t(e,i){if(1&e){const t=xe();J(0,"button",4),Ut("click",function(){const r=zt(t).$implicit;return Gt(St(2).guessLetter(r))}),ut(1),et()}if(2&e){const t=i.$implicit,n=St(2);Ci("guessed-correct","correct"===n.guessedLetters[t])("guessed-wrong","wrong"===n.guessedLetters[t]),vt("disabled",n.isLetterGuessed(t)),ot(),Je(" ",t," ")}}function M4t(e,i){if(1&e&&(J(0,"div",2),Ht(1,D4t,2,6,"button",3),et()),2&e){const t=i.$implicit;ot(),vt("ngForOf",t)}}let I4t=(()=>{class e{constructor(){this.keyboardLayout=[["1","2","3","4","5","6","7","8","9","0"],["Q","W","E","R","T","Y","U","I","O","P"],["A","S","D","F","G","H","J","K","L"],["Z","X","C","V","B","N","M"]],this.guessedLetters={},this.letterGuessed=new Oe}addGuessedLetter(t,n){this.guessedLetters[t]=n?"correct":"wrong"}guessLetter(t){this.letterGuessed.emit(t)}isLetterGuessed(t){return t in this.guessedLetters}markLetterAsGuessed(t,n){this.guessedLetters[t]=n}reset(){this.guessedLetters={}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-keyboard"]],outputs:{letterGuessed:"letterGuessed"},decls:2,vars:1,consts:[[1,"keyboard-container"],["class","keyboard-row",4,"ngFor","ngForOf"],[1,"keyboard-row"],["mat-button","",3,"guessed-correct","guessed-wrong","disabled","click",4,"ngFor","ngForOf"],["mat-button","",3,"click","disabled"]],template:function(n,r){1&n&&(J(0,"div",0),Ht(1,M4t,2,1,"div",1),et()),2&n&&(ot(),vt("ngForOf",r.keyboardLayout))},dependencies:[ys,Cs],styles:[".keyboard-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.keyboard-row[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:5px;flex-wrap:wrap}button[_ngcontent-%COMP%]{margin:2px;padding:8px 6px;border-radius:8px;border:1px solid #000;transition:background-color .3s ease;min-width:40px;flex:1}button.guessed-correct[_ngcontent-%COMP%]{background-color:green;color:#fff}button.guessed-wrong[_ngcontent-%COMP%]{background-color:red;color:#fff}@media (max-width: 768px){.keyboard-row[_ngcontent-%COMP%]{margin:1px 0}.keyboard-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:1px;padding:8px;min-width:0;width:9%;flex:1 1 auto;font-size:14px}}"]})}}return e})(),R4t=(()=>{class e{constructor(){this.tooltipDismissedKey="iosSafariTooltipDismissed"}isIosSafari(){return/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&/Safari/i.test(window.navigator.userAgent)&&!/CriOS/i.test(window.navigator.userAgent)&&!/FxiOS/i.test(window.navigator.userAgent)}tooltipDismissed(){return"true"===localStorage.getItem(this.tooltipDismissedKey)}dismissTooltip(){localStorage.setItem(this.tooltipDismissedKey,"true")}isRunningStandalone(){return"standalone"in window.navigator&&window.navigator.standalone}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function P4t(e,i){if(1&e){const t=xe();J(0,"div",1)(1,"div",2),ut(2," Install this webapp on your iPhone: tap "),J(3,"mat-icon"),ut(4,"ios_share"),et(),ut(5," and then 'Add to Home Screen' "),et(),J(6,"button",3),Ut("click",function(){return zt(t),Gt(St().dismiss())}),J(7,"mat-icon"),ut(8,"close"),et()()()}}let k4t=(()=>{class e{constructor(t){this.platformDetectionService=t,this.isIosSafari=!1,this.tooltipDismissed=!1}ngOnInit(){this.isIosSafari=this.platformDetectionService.isIosSafari(),this.tooltipDismissed=this.platformDetectionService.tooltipDismissed()||this.platformDetectionService.isRunningStandalone()}dismiss(){this.tooltipDismissed=!0,this.platformDetectionService.dismissTooltip()}static{this.\u0275fac=function(n){return new(n||e)(pt(R4t))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-add-to-home"]],decls:1,vars:1,consts:[["class","custom-tooltip",4,"ngIf"],[1,"custom-tooltip"],[1,"tooltip-text"],[1,"tooltip-dismiss-button",3,"click"]],template:function(n,r){1&n&&Ht(0,P4t,9,0,"div",0),2&n&&vt("ngIf",r.isIosSafari&&!r.tooltipDismissed)},dependencies:[ls,ga],styles:['.custom-tooltip[_ngcontent-%COMP%]{position:fixed;bottom:20px;left:50%;transform:translate(-50%);background:#fff;border-radius:8px;padding:16px;box-shadow:0 4px 8px #0003;display:flex;flex-direction:row;align-items:center;max-width:320px;box-sizing:border-box;z-index:1000}.custom-tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:-20px;left:50%;transform:translate(-50%);width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:20px solid white}.tooltip-icon[_ngcontent-%COMP%]{background:#007bff;color:#fff;border-radius:50%;padding:10px;margin-right:16px}.tooltip-text[_ngcontent-%COMP%]{color:#333;font-size:16px}.tooltip-dismiss-button[_ngcontent-%COMP%]{margin-left:auto;background:transparent;border:none;cursor:pointer}.tooltip-dismiss-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#666;vertical-align:bottom}']})}}return e})(),rJ=(()=>{class e{transform(t,...n){if(!t)return t;const r=Math.floor(t/1e3%60),s=Math.floor(t/6e4%60),o=Math.floor(t/36e5%24),l=0===o&&s<10?s.toString():s<10?"0"+s:s;let D="";return o>0&&(D+=`${o<10?"0"+o:o}h `),(s>0||o>0)&&(D+=`${l}m `),D+=`${0===o&&0===s&&r<10?r.toString():r<10?"0"+r:r}s`,D}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275pipe=io({name:"elapsedTime",type:e,pure:!0})}}return e})();const F4t=["keyboard"],sJ=()=>[],O4t=(e,i)=>[e,i],BL=e=>[e],aJ=e=>[e,"shadow-local"],L4t=e=>[e,"trophy-large","shadow-local"];function N4t(e,i){if(1&e&&(J(0,"div",8)(1,"div",9)(2,"div",10),ut(3," Loading... "),et(),ye(4,"mat-progress-bar",11),et()()),2&e){const t=St(2);ot(4),vt("value",t.loadingAssetsProgress)}}function B4t(e,i){1&e&&(J(0,"span")(1,"mat-icon"),ut(2,"favorite"),et()())}function V4t(e,i){1&e&&(J(0,"span")(1,"mat-icon"),ut(2,"favorite_border"),et()())}function U4t(e,i){if(1&e&&(J(0,"span"),ut(1),et()),2&e){const t=i.$implicit;ot(),Ke(t)}}function z4t(e,i){if(1&e&&(J(0,"span",33),Ht(1,U4t,2,1,"span",18),et()),2&e){const t=i.$implicit;ot(),vt("ngForOf",t.split(""))}}function G4t(e,i){if(1&e&&(J(0,"div",31),Ht(1,z4t,2,1,"span",32),et()),2&e){const t=St(2).ngIf;ot(),vt("ngForOf",t.displayTerm.join("").split(" "))}}function H4t(e,i){1&e&&(J(0,"div",34)(1,"div",35),ut(2," Choosing a random SNOMED CT concept using the FHIR API "),et(),ye(3,"mat-progress-bar",36),et())}function W4t(e,i){if(1&e){const t=xe();J(0,"div",37),Ut("click",function(){return zt(t),Gt(St(3).revealHint())}),ut(1," Reveal Hint "),et()}}function j4t(e,i){if(1&e){const t=xe();J(0,"div",37),Ut("click",function(){return zt(t),Gt(St(3).loadMenu())}),ut(1," Abandon game "),et()}}function X4t(e,i){1&e&&ye(0,"li",41),2&e&&vt("innerHTML",i.$implicit,Gf)}function Y4t(e,i){if(1&e&&(J(0,"div",38)(1,"div",39)(2,"h2"),ut(3,"Hints:"),et(),J(4,"ul"),Ht(5,X4t,1,1,"li",40),et()()()),2&e){const t=St(2).ngIf;ot(5),vt("ngForOf",t.hints)}}function $4t(e,i){if(1&e&&(J(0,"mat-icon",47),ut(1,"grade"),et()),2&e){const t=St().$implicit;$s("left",St(3).calculateGoalPosition(t.score-5),"%"),vt("ngClass",Al(3,BL,t.name.toLowerCase()))}}function Q4t(e,i){if(1&e&&(J(0,"mat-icon",48),ut(1,"grade"),et()),2&e){const t=St().$implicit;$s("left",St(3).calculateGoalPosition(t.score-1),"%"),vt("ngClass",Al(3,BL,t.name.toLowerCase()))}}function K4t(e,i){if(1&e&&(J(0,"div",49),ut(1),et()),2&e){const t=St().$implicit;$s("left",St(3).calculateGoalPosition(t.score),"%"),vt("ngClass",Al(4,BL,t.name.toLowerCase())),ot(),Je("",t.name," trophy!")}}function Z4t(e,i){if(1&e&&(Qi(0),ye(1,"div",42),Ht(2,$4t,2,5,"mat-icon",43),J(3,"mat-icon",44),ut(4,"emoji_events"),et(),Ht(5,Q4t,2,5,"mat-icon",45)(6,K4t,2,6,"div",46),Ki()),2&e){const t=i.$implicit,n=St(2).ngIf,r=St();ot(),oo(t.name.toLowerCase()),$s("left",r.calculateGoalPosition(t.score),"%"),ot(),vt("ngIf",n.score>=t.score),ot(),$s("left",r.calculateGoalPosition(t.score-3),"%"),vt("ngClass",k2(10,O4t,t.name.toLowerCase(),n.score>=t.score?"trophy-large":"")),ot(2),vt("ngIf",n.score>=t.score),ot(),vt("ngIf",n.score>=t.score)}}function J4t(e,i){if(1&e){const t=xe();J(0,"div")(1,"div",12)(2,"div",13),ye(3,"img",14),J(4,"div",15),ut(5),et()()(),J(6,"div",16)(7,"span",17),ut(8),et(),Ht(9,B4t,3,0,"span",18)(10,V4t,3,0,"span",18),J(11,"span",17),ut(12),et()(),Ht(13,G4t,2,1,"div",19)(14,H4t,4,0,"div",20),J(15,"p",21),ut(16,"Click the keys to guess the letters of the term!"),et(),J(17,"div")(18,"app-keyboard",22,0),Ut("letterGuessed",function(r){return zt(t),Gt(St(2).guessLetter(r))}),et()(),J(20,"div",23),Ht(21,W4t,2,0,"div",24)(22,j4t,2,0,"div",25),et(),Ht(23,Y4t,6,1,"div",26),J(24,"div",27),ut(25," * Hints are generated from the definition of the SNOMED CT concept, retrieved from the FHIR API as an SCG grammar expression "),et(),J(26,"div",28)(27,"h3"),ut(28,"Score Progression"),et(),J(29,"div",29),ye(30,"mat-progress-bar",30),Ht(31,Z4t,7,13,"ng-container",18),et()()()}if(2&e){const t=St().ngIf,n=St();ot(3),vt("@popIn",void 0),ot(2),sl(" ",t.difficultyLevel," - ",n.getLanguageName(n.selectedLanguage)," "),ot(3),sl(" Round: ",t.round," \xa0\xa0\xa0\xa0 Score: ",t.score," \xa0\xa0\xa0\xa0 Life: "),ot(),vt("ngForOf",Xa(16,sJ).constructor(t.hitPoints)),ot(),vt("ngForOf",Xa(17,sJ).constructor(t.rules.maxHitPoints-t.hitPoints)),ot(2),Je(" \xa0\xa0\xa0\xa0 Time to guess: ",t.remainingTime,""),ot(),vt("ngIf","playing"==t.state),ot(),vt("ngIf","choosingTerm"===t.state),ot(3),vt("@shake",n.shakeState),ot(4),vt("ngIf","playing"==t.state&&t.hintsAvailable&&t.hitPoints>1),ot(),vt("ngIf","playing"==t.state),ot(),vt("ngIf",t.hints.length>0&&"playing"==t.state),ot(7),vt("value",n.calculateProgress(t.score)),ot(),vt("ngForOf",n.goals)}}function q4t(e,i){if(1&e){const t=xe();J(0,"div",50),ye(1,"img",51)(2,"img",52),J(3,"p",53)(4,"b"),ut(5,"Welcome to SnoGuess!"),et()(),J(6,"p",53),ut(7," A fun way to learn about SNOMED CT concepts and their definitions. "),et(),J(8,"div",54),Ut("click",function(){return zt(t),Gt(St(2).chooseDifficultyLevel())}),ut(9," New game "),et(),J(10,"div",54),Ut("click",function(){return zt(t),Gt(St(2).showInstructionsPanel())}),ut(11," Instructions "),et(),J(12,"div",55),Ut("click",function(){return zt(t),Gt(St(2).openScoreboard())}),ut(13," High Scores "),et(),J(14,"p",56),ut(15," Playing with terms in the IPS Reference Set in "),J(16,"b"),ut(17),et(),ut(18,", change language: "),et(),J(19,"div",57)(20,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("da"))}),ut(21,"DA"),et(),J(22,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("de"))}),ut(23,"DE"),et(),J(24,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("en"))}),ut(25,"EN"),et(),J(26,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("es"))}),ut(27,"ES"),et(),J(28,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("et"))}),ut(29,"ET"),et(),J(30,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("fi"))}),ut(31,"FI"),et(),J(32,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("fr"))}),ut(33,"FR"),et(),J(34,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("nl"))}),ut(35,"NL"),et(),J(36,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("no"))}),ut(37,"NO"),et(),J(38,"button",58),Ut("click",function(){return zt(t),Gt(St(2).setLanguage("sv"))}),ut(39,"SV"),et()()()}if(2&e){const t=St(2);ot(2),vt("@popIn",void 0),ot(6),vt("@scrollUp",void 0),ot(2),vt("@scrollUp",void 0),ot(2),vt("@scrollUp",void 0),ot(5),Ke(t.getLanguageName(t.selectedLanguage))}}function t3t(e,i){1&e&&(J(0,"span"),ut(1,", Endless"),et())}function e3t(e,i){if(1&e){const t=xe();J(0,"div",62)(1,"div",63),Ut("click",function(){const r=zt(t).$implicit;return Gt(St(3).startGame(r.name))}),ut(2),et(),J(3,"p",64),ut(4),J(5,"mat-icon",65),ut(6,"favorite"),et(),ut(7),J(8,"mat-icon",66),ut(9,"contact_support"),et(),ut(10),J(11,"mat-icon",67),ut(12,"timer"),et(),Ht(13,t3t,2,0,"span",5),et()()}if(2&e){const t=i.$implicit;ot(),vt("@scrollUp",void 0),ot(),Je(" ",t.name," "),ot(),vt("@fadeInDelayed",void 0),ot(),Je(" Life: ",t.rules.maxHitPoints," "),ot(3),Je(", Free hints: ",t.rules.freeHints," "),ot(3),sl(", Points per letter: ",t.rules.pointsPerGuessedLetter,", Time to guess: ",t.rules.maxRoundTime," "),ot(3),vt("ngIf",t.rules.endless)}}function i3t(e,i){if(1&e){const t=xe();J(0,"div",50),ye(1,"img",51)(2,"img",59),J(3,"p",53)(4,"b"),ut(5,"Choose the game difficulty"),et()(),Ht(6,e3t,14,8,"div",60),J(7,"div",61),Ut("click",function(){return zt(t),Gt(St(2).backToMenu())}),ut(8," Back "),et()()}if(2&e){const t=St(2);ot(2),vt("@popIn",void 0),ot(4),vt("ngForOf",t.difficultyLevels),ot(),vt("@scrollUp",void 0)}}function n3t(e,i){if(1&e){const t=xe();J(0,"div",50),ye(1,"img",51)(2,"img",68),J(3,"ul",69)(4,"li",70)(5,"mat-icon"),ut(6,"check"),et(),ut(7,"Click the keys on the screen to guess the letters of the term "),J(8,"mat-icon",71),ut(9,"keyboard"),et()(),J(10,"li",70)(11,"mat-icon"),ut(12,"check"),et(),ut(13,"You have three to five lives, depending on your difficulty level "),J(14,"span",72)(15,"mat-icon"),ut(16,"favorite"),et(),J(17,"mat-icon"),ut(18,"favorite"),et(),J(19,"mat-icon"),ut(20,"favorite"),et()()(),J(21,"li",70)(22,"mat-icon"),ut(23,"check"),et(),ut(24,"There is also a maxmimum time to guess each term "),J(25,"mat-icon",73),ut(26,"timer"),et()(),J(27,"li",70)(28,"mat-icon"),ut(29,"check"),et(),ut(30,"You will loose one life with each wrong guess "),J(31,"mat-icon",72),ut(32,"favorite_border"),et()(),J(33,"li",70)(34,"mat-icon"),ut(35,"check"),et(),ut(36,"The game ends when you run out of lives or time"),J(37,"mat-icon",72),ut(38,"close"),et()(),J(39,"li",70)(40,"mat-icon"),ut(41,"check"),et(),ut(42,"You earn points for each correct guess "),J(43,"mat-icon",71),ut(44,"plus_one"),et()(),J(45,"li",70)(46,"mat-icon"),ut(47,"check"),et(),ut(48,"In Easy mode you get 2 hints for free, and in Medium mode you get one \u{1f4a1} "),et(),J(49,"li",70)(50,"mat-icon"),ut(51,"check"),et(),ut(52,"You can reveal more hints, but each hint it will cost one life "),J(53,"mat-icon",72),ut(54,"favorite_border"),et()(),J(55,"li",70)(56,"mat-icon"),ut(57,"check"),et(),ut(58,"If you guess the whole term you can recover one life"),J(59,"mat-icon",72),ut(60,"favorite"),et()(),J(61,"li",70)(62,"mat-icon"),ut(63,"check"),et(),ut(64,"Keep guessing terms to increase your score and earn trophies "),J(65,"mat-icon",74),ut(66,"emoji_events"),et()(),J(67,"li",70)(68,"mat-icon"),ut(69,"check"),et(),ut(70,"Endless mode will not finish when you reach the Diamond Trophy "),J(71,"mat-icon",75),ut(72,"emoji_events"),et()()(),J(73,"div",76),Ut("click",function(){return zt(t),Gt(St(2).hideInstructionsPanel())}),ut(74," Back "),et()()}2&e&&(ot(2),vt("@popIn",void 0),ot(71),vt("@scrollUp",void 0))}function r3t(e,i){1&e&&(J(0,"div",77),ye(1,"img",78),et()),2&e&&(ot(),vt("@popIn",void 0))}function s3t(e,i){if(1&e&&(J(0,"div"),ut(1),et()),2&e){const t=St(2).ngIf,n=St();ot(),Je(" Trophy: ",n.getMaxTrophyObtained(t.score)," ")}}function a3t(e,i){if(1&e&&(J(0,"div")(1,"mat-icon",88),ut(2,"grade"),et(),ut(3," \xa0\xa0 "),J(4,"mat-icon",88),ut(5,"emoji_events"),et(),ut(6," \xa0 "),J(7,"mat-icon",88),ut(8,"grade"),et()()),2&e){const t=St(2).ngIf,n=St();ot(),vt("ngClass",Al(3,aJ,n.getMaxTrophyObtained(t.score).toLocaleLowerCase())),ot(3),vt("ngClass",Al(5,L4t,n.getMaxTrophyObtained(t.score).toLocaleLowerCase())),ot(3),vt("ngClass",Al(7,aJ,n.getMaxTrophyObtained(t.score).toLocaleLowerCase()))}}function o3t(e,i){1&e&&(J(0,"p",89),ut(1,"Checking high scores..."),et())}function l3t(e,i){if(1&e){const t=xe();J(0,"div",90)(1,"p",91),ut(2," This is a High Score! Save a message to the public leaderboard! "),et(),J(3,"input",92),Aa("ngModelChange",function(r){zt(t);const s=St(3);return ja(s.messageForLeaderboard,r)||(s.messageForLeaderboard=r),Gt(r)}),et(),J(4,"div",93),Ut("click",function(){zt(t);const r=St(2).ngIf;return Gt(St().saveScore(r))}),ut(5," Save "),et(),J(6,"p",94),ut(7,"No personal information is recorded"),et()()}if(2&e){const t=St(3);ot(3),_a("ngModel",t.messageForLeaderboard)}}function c3t(e,i){if(1&e){const t=xe();J(0,"div",50),ye(1,"img",51)(2,"img",79),J(3,"div",80)(4,"div"),ut(5," The term was: "),et(),J(6,"div",81),ut(7),et(),J(8,"div",82),ut(9),et(),J(10,"div",83),ut(11),vs(12,"elapsedTime"),et(),Ht(13,s3t,2,1,"div",5),et(),Ht(14,a3t,9,9,"div",5)(15,o3t,2,0,"p",84)(16,l3t,8,1,"div",85),J(17,"div",86),Ut("click",function(){zt(t);const r=St(2);return r.loadMenu(),Gt(r.chooseDifficultyLevel())}),ut(18," New game "),et(),J(19,"div",86),Ut("click",function(){return zt(t),Gt(St(2).openScoreboard())}),ut(20," High Scores "),et(),J(21,"div",87),Ut("click",function(){return zt(t),Gt(St(2).loadMenu())}),ut(22," Main menu "),et()()}if(2&e){const t=St().ngIf,n=St();ot(2),vt("@popIn",void 0),ot(5),Je(" ",t.term,""),ot(2),sl("",t.round," ",1==t.round?"round":"rounds",""),ot(2),sx(" Final Score: ",t.score," points - Difficulty: ",t.difficultyLevel," - Total time: ",Jl(12,14,t.endTimestamp-t.startTimestamp)," "),ot(2),vt("ngIf",n.getMaxTrophyObtained(t.score)),ot(),vt("ngIf",n.getMaxTrophyObtained(t.score)),ot(),vt("ngIf",n.highScoresLoading),ot(),vt("ngIf",n.highScore),ot(),vt("@scrollUp",void 0),ot(2),vt("@scrollUp",void 0),ot(2),vt("@scrollUp",void 0)}}function u3t(e,i){if(1&e&&(J(0,"span"),ut(1),et()),2&e){const t=St(2).ngIf;ot(),Je("\u2192 Bonus: ",t.livesBonus,"")}}function h3t(e,i){if(1&e&&(J(0,"span"),ut(1),et()),2&e){const t=St(2).ngIf;ot(),Je("\u2192 Bonus: ",t.difficultyBonus,"")}}function d3t(e,i){if(1&e&&(J(0,"span"),ut(1),et()),2&e){const t=St(2).ngIf;ot(),Je("\u2192 Bonus: ",t.timeBonus,"")}}function f3t(e,i){if(1&e){const t=xe();J(0,"div",90)(1,"p",91),ut(2," This is a High Score! Save a message to the public leaderboard! "),et(),J(3,"input",100),Aa("ngModelChange",function(r){zt(t);const s=St(3);return ja(s.messageForLeaderboard,r)||(s.messageForLeaderboard=r),Gt(r)}),et(),J(4,"div",101),Ut("click",function(){zt(t);const r=St(2).ngIf;return Gt(St().saveScore(r))}),ut(5," Save "),et(),J(6,"p",94),ut(7,"No personal information is recorded"),et()()}if(2&e){const t=St(3);ot(3),_a("ngModel",t.messageForLeaderboard)}}function p3t(e,i){if(1&e){const t=xe();J(0,"div",50),ye(1,"img",51)(2,"img",95),J(3,"div",96)(4,"mat-icon",97),ut(5,"grade"),et(),J(6,"mat-icon",97),ut(7,"emoji_events"),et(),J(8,"mat-icon",97),ut(9,"grade"),et()(),J(10,"div",98),ut(11),Ht(12,u3t,2,1,"span",5),et(),J(13,"div",98),ut(14),Ht(15,h3t,2,1,"span",5),et(),J(16,"div",98),ut(17),vs(18,"elapsedTime"),Ht(19,d3t,2,1,"span",5),et(),J(20,"div",99),ut(21),et(),Ht(22,f3t,8,1,"div",85),J(23,"div",86),Ut("click",function(){zt(t);const r=St(2);return r.loadMenu(),Gt(r.chooseDifficultyLevel())}),ut(24," New game "),et(),J(25,"div",86),Ut("click",function(){return zt(t),Gt(St(2).openScoreboard())}),ut(26," High Scores "),et(),J(27,"div",87),Ut("click",function(){return zt(t),Gt(St(2).loadMenu())}),ut(28," Main menu "),et()()}if(2&e){const t=St().ngIf,n=St();ot(2),vt("@popIn",void 0),ot(9),Je("Lives left: ",t.hitPoints," "),ot(),vt("ngIf",t.livesBonus>0),ot(2),Je("Difficulty: ",t.difficultyLevel," "),ot(),vt("ngIf",t.difficultyBonus>0),ot(2),Je("Time: ",Jl(18,12,t.endTimestamp-t.startTimestamp)," "),ot(2),vt("ngIf",t.timeBonus>0),ot(2),Je("Final score: ",t.score,""),ot(),vt("ngIf",n.highScore),ot(),vt("@scrollUp",void 0),ot(2),vt("@scrollUp",void 0),ot(2),vt("@scrollUp",void 0)}}function m3t(e,i){if(1&e&&(J(0,"div",3),Ht(1,N4t,5,1,"div",4)(2,J4t,32,18,"div",5)(3,q4t,40,5,"div",6)(4,i3t,9,3,"div",6)(5,n3t,75,2,"div",6)(6,r3t,2,1,"div",7)(7,c3t,23,16,"div",6)(8,p3t,29,14,"div",6),et()),2&e){const t=i.ngIf,n=St();ot(),vt("ngIf",n.loadingAssets),ot(),vt("ngIf",("playing"==t.state||"choosingTerm"==t.state)&&!n.loadingAssets),ot(),vt("ngIf","menu"===t.state&&!n.chooseDifficulty&&!n.showInstructions&&!n.loadingAssets),ot(),vt("ngIf","menu"===t.state&&n.chooseDifficulty&&!n.showInstructions&&!n.loadingAssets),ot(),vt("ngIf",n.showInstructions),ot(),vt("ngIf",n.termGuessed),ot(),vt("ngIf","gameOver"===t.state),ot(),vt("ngIf","won"==t.state)}}let g3t=(()=>{class e{constructor(t,n,r,s,o){this.snoguessMainService=t,this.preloadService=n,this.terminologyService=r,this.firebaseService=s,this.router=o,this.shakeState="normal",this.termGuessed="",this.goals=[],this.loadingAssetsProgress=0,this.loadingAssets=!0,this.highScoresLoading=!1,this.showInstructions=!1,this.chooseDifficulty=!1,this.currentYear=new Date,this.difficultyLevels=[],this.elapsedTime=0,this.gameInProgress=!1,this.messageForLeaderboard="",this.highScore=!1}ngOnInit(){this.game=this.snoguessMainService.getGameState(),this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.game.subscribe(n=>{"playing"===n.state&&(this.goals=n.rules.goals),("gameOver"===n.state||"won"===n.state)&&(this.stopTimer(),this.highScoresLoading=!0,this.firebaseService.getScores(n.difficultyLevel).then(r=>{this.highScoresLoading=!1,(!r||r.length<20||n.score>r[r.length-1].score)&&(this.highScore=!0)}))}),this.snoguessMainService.guessResult.subscribe(n=>{!1===n.result?(this.keyboard?.addGuessedLetter(n.letter,!1),this.shakeState="shake",setTimeout(()=>this.shakeState="normal",200)):this.keyboard?.addGuessedLetter(n.letter,!0)}),this.snoguessMainService.termResult.subscribe(n=>{n&&(this.keyboard?.reset(),this.termGuessed=n,setTimeout(()=>{this.termGuessed=""},2e3))}),this.preloadService.preloadImages(["assets/img/SI_CT_w_tagline.png","assets/img/snoguess-logo.png","assets/img/congratulations.png","assets/img/correct.png","assets/img/game-over.png","assets/img/instructions.png","assets/img/difficulty.png","assets/img/scoreboard.png"]).then(()=>{setTimeout(()=>{this.loadingAssets=!1,this.loadMenu()},500)}),this.preloadService.loadingProgress.subscribe(n=>{this.loadingAssetsProgress=n}),this.terminologyService.fhirUrlParam$.subscribe(n=>{n&&this.terminologyService.getCodeSystem(n).subscribe(r=>{this.selectedEdition=r?.entry[0]?.resource?.title})}),this.terminologyService.lang$.subscribe(n=>{this.selectedLanguage=n})}loadMenu(){this.snoguessMainService.loadMenu()}backToMenu(){this.chooseDifficulty=!1}showInstructionsPanel(){this.showInstructions=!0}hideInstructionsPanel(){this.showInstructions=!1}chooseDifficultyLevel(){this.chooseDifficulty=!0}startGame(t){this.chooseDifficulty=!1,this.keyboard&&this.keyboard.reset(),this.stopTimer(),this.snoguessMainService.startGame(t),this.startTimer(),this.highScore=!1}guessLetter(t){var n=this;return we(function*(){"playing"===(yield function ukt(e,i){const t="object"==typeof i;return new Promise((n,r)=>{const s=new qo({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{t?n(i.defaultValue):r(new Xg)}});e.subscribe(s)})}(n.game))?.state&&n.snoguessMainService.guessLetter(t)})()}revealHint(){this.snoguessMainService.revealHint()}calculateProgress(t){return Math.min(t/this.goals[this.goals.length-1].score*100,100)}calculateGoalPosition(t){return t/this.goals[this.goals.length-1].score*100}findCurrentGoal(t){if(!t||t{t>=r.score&&(n=r.name)}),n}startTimer(){this.elapsedTime=0,this.gameInProgress=!0;const t=Kx(0,1e3).pipe(Ri(n=>this.elapsedTime=n),MW(()=>this.gameInProgress));this.gameTimerSubscription=t.subscribe()}stopTimer(){this.gameInProgress=!1,this.gameTimerSubscription&&this.gameTimerSubscription.unsubscribe()}openScoreboard(t){t||(t=this.difficultyLevels[0].name),this.router.navigate(["/snoguess/scoreboard"],{queryParams:{level:t}})}saveScore(t){let n={score:t.score,numberOfRounds:t.round,difficulty:t.difficultyLevel,elapsed:t.endTimestamp-t.startTimestamp,date:us.now(),message:this.messageForLeaderboard};this.firebaseService.addScore(t.difficultyLevel,n).then(()=>{this.messageForLeaderboard="",this.openScoreboard(t.difficultyLevel)}).catch(r=>{this.messageForLeaderboard="",console.error("Error saving score: ",r),this.loadMenu()})}getLanguageName(t){return{en:"English",es:"Spanish",fr:"French",de:"German",da:"Danish",nl:"Dutch",et:"Estonian",fi:"Finnish",no:"Norwegian",sv:"Swedish"}[t]||t}setLanguage(t){this.terminologyService.setLang(t),this.terminologyService.setFhirUrlParam({en:{lang:"en",fhirUrl:"http://snomed.info/sct/900000000000207008"},es:{lang:"es",fhirUrl:"http://snomed.info/sct/449081005"},fr:{lang:"fr",fhirUrl:"http://snomed.info/sct/11000241103"},de:{lang:"de",fhirUrl:"http://snomed.info/sct/11000274103"},da:{lang:"da",fhirUrl:"http://snomed.info/sct/554471000005108"},nl:{lang:"nl",fhirUrl:"http://snomed.info/sct/11000146104"},et:{lang:"et",fhirUrl:"http://snomed.info/sct/11000181102"},fi:{lang:"fi",fhirUrl:"http://snomed.info/sct/11000229106"},no:{lang:"no",fhirUrl:"http://snomed.info/sct/51000202101"},sv:{lang:"sv",fhirUrl:"http://snomed.info/sct/45991000052106"}}[t].fhirUrl)}static{this.\u0275fac=function(n){return new(n||e)(pt(iJ),pt(A4t),pt(ma),pt(nJ),pt(Ho))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-snoguess-main"]],viewQuery:function(n,r){if(1&n&&ki(F4t,5),2&n){let s;He(s=We())&&(r.keyboard=s.first)}},decls:6,vars:7,consts:[["keyboard",""],["class","snoguess-game",4,"ngIf"],[1,"text-center","mt-8","mb-4"],[1,"snoguess-game"],["class","assets-loading-container",4,"ngIf"],[4,"ngIf"],["class","flex flex-col items-center gap-4",4,"ngIf"],["class","overlay overlay-transparent",4,"ngIf"],[1,"assets-loading-container"],[1,"mt-48","mb-48"],[1,"progress-bar-message","text-center"],["mode","determinate",1,"game-progress-bar",3,"value"],[1,"flex","justify-center","mt-8","mb-8"],[1,"relative","w-1/4"],["src","assets/img/snoguess-logo.png","alt","Game Logo"],[1,"diff-label","absolute","-bottom-3","right-5","italic","text-gray-500"],[1,"hit-points"],[1,"score"],[4,"ngFor","ngForOf"],["class","term-display flex flex-row flex-wrap justify-center gap-8",4,"ngIf"],["class","loading-container",4,"ngIf"],[1,"guess-message"],[3,"letterGuessed"],[1,"game-buttons","mt-4"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","hints-container",4,"ngIf"],[1,"note"],[1,"score-progression-panel"],[1,"progress-bar-container"],["mode","determinate",3,"value"],[1,"term-display","flex","flex-row","flex-wrap","justify-center","gap-8"],["class","whitespace-nowrap",4,"ngFor","ngForOf"],[1,"whitespace-nowrap"],[1,"loading-container"],[1,"progress-bar-message"],["mode","indeterminate"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pt-1","pb-1","pl-6","pr-6","w-fit","text-center","cursor-pointer","font-bold","text-white",3,"click"],[1,"hints-container"],[1,"hints-callout","text-center"],["class","hint-item",3,"innerHTML",4,"ngFor","ngForOf"],[1,"hint-item",3,"innerHTML"],[1,"goal-indicator"],["class","star-icon left-star",3,"ngClass","left",4,"ngIf"],[1,"trophy-icon",3,"ngClass"],["class","star-icon right-star",3,"ngClass","left",4,"ngIf"],["class","goal-name",3,"left","ngClass",4,"ngIf"],[1,"star-icon","left-star",3,"ngClass"],[1,"star-icon","right-star",3,"ngClass"],[1,"goal-name",3,"ngClass"],[1,"flex","flex-col","items-center","gap-4"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/snoguess-logo.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,"text-center","font-light","text-lg"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","text-3xl",3,"click"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-12","text-3xl",3,"click"],[1,"text-center","font-light","italic","text-lg"],[1,"text-center","font-light","italic","text-sm"],["mat-button","",3,"click"],["src","assets/img/difficulty.png","alt","Game Logo",1,"w-1/4","mt-8"],["class","level-container w-full flex flex-col justify-center items-center",4,"ngFor","ngForOf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","mb-8","text-3xl",3,"click"],[1,"level-container","w-full","flex","flex-col","justify-center","items-center"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","text-3xl",3,"click"],[1,"level-details","text-center","mt-3","flex","flex-row","items-center"],[1,"text-red-500","text-sm"],[1,"text-yellow-500","text-sm"],[1,"text-green-500","text-sm"],["src","assets/img/instructions.png","alt","Game Logo",1,"w-1/4","mt-8","mb-12"],[1,"text-left","instructions-text"],[1,"flex","flex-row","items-center","gap-2"],[1,"text-blue-900"],[1,"text-red-500"],[1,"text-green-500"],[1,"text-yellow-500"],[1,"text-blue-500"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-3xl",3,"click"],[1,"overlay","overlay-transparent"],["src","assets/img/correct.png","alt","Correct",1,"w-1/5","mt-8"],["src","assets/img/game-over.png","alt","Game Logo",1,"w-1/4","mt-8"],[1,"text-xl","text-pretty","text-center"],[1,"font-bold"],[1,"mt-12"],[1,"mt-4"],["class","text-center italic text-gray-500",4,"ngIf"],["class","flex flex-col items-center gap-4 w-full",4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","text-2xl",3,"click"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],[3,"ngClass"],[1,"text-center","italic","text-gray-500"],[1,"flex","flex-col","items-center","gap-4","w-full"],[1,"font-bold","text-lg","md:text-xl","text-blue-900"],["type","text","placeholder","Type your message here",1,"w-full","md:w-1/2","text-base","md:text-2xl","text-center","bg-blue-50","border-solid","border-2",3,"ngModelChange","ngModel"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4","md:text-2xl",3,"click"],[1,"text-sm","text-gray-400"],["src","assets/img/congratulations.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,""],[1,"large-icon","diamond","shadow-local"],[1,"text-lg"],[1,"reveal","won"],["type","text","placeholder","Your message here",1,"w-full","md:w-1/2","text-base","md:text-lg",3,"ngModelChange","ngModel"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4",3,"click"]],template:function(n,r){1&n&&(Ht(0,m3t,9,8,"div",1),vs(1,"async"),J(2,"div",2),ut(3),vs(4,"date"),et(),ye(5,"app-add-to-home")),2&n&&(vt("ngIf",Jl(1,2,r.game)),ot(3),Je(" Copyright \xa9 ",Pc(4,4,r.currentYear,"yyyy")," SNOMED International\n"))},dependencies:[Td,ys,ls,Cs,ga,rF,Pl,Yo,lc,I4t,k4t,fR,sh,rJ],styles:[".snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a;min-height:85vh!important}.term-display[_ngcontent-%COMP%]{font-size:24px;letter-spacing:4px;word-break:break-all;margin-bottom:20px;text-align:center;font-family:monospace}.term-display[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0}.hit-points[_ngcontent-%COMP%]{font-weight:700;color:#d9534f;text-align:center;margin-bottom:2rem}mat-form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}button[_ngcontent-%COMP%]{margin-right:8px}.guess-field[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1000}.overlay-dark[_ngcontent-%COMP%]{background-color:#00000080}.overlay-transparent[_ngcontent-%COMP%]{background-color:#0000}.message[_ngcontent-%COMP%]{font-size:4rem;text-align:center;margin-bottom:20px;font-weight:bolder}.reveal[_ngcontent-%COMP%]{font-size:2rem;text-align:center;margin-bottom:20px;font-weight:bolder}.won[_ngcontent-%COMP%]{color:#4caf50;text-shadow:black 2px 2px 2px}.lost[_ngcontent-%COMP%]{color:#f44336;text-shadow:rgb(0,0,0) 2px 2px 2px}.overlay[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1.5rem;padding:10px 20px}.loading-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center;margin-bottom:1rem}.progress-bar-message[_ngcontent-%COMP%]{color:#000;font-size:larger;margin-bottom:10px;font-style:italic;font-weight:lighter}.score[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700}.score-progression-panel[_ngcontent-%COMP%]{margin-top:2rem}.progress-bar-container[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:5rem;position:relative;background-color:#e0e0e0;border-radius:5px}.goal-indicator[_ngcontent-%COMP%]{position:absolute;bottom:0;width:2px;height:10px;background-color:#000}.goal-indicator.bronze[_ngcontent-%COMP%]{background-color:#cd7f32}.goal-indicator.silver[_ngcontent-%COMP%]{background-color:silver}.goal-indicator.gold[_ngcontent-%COMP%]{background-color:gold}.goal-indicator.platinum[_ngcontent-%COMP%]{background-color:#e5e4e2}.goal-indicator.diamond[_ngcontent-%COMP%]{background-color:#3b49c4}.trophy-icon[_ngcontent-%COMP%]{position:absolute;bottom:-35px;font-size:24px;width:24px;transition:transform .3s ease}.trophy-large[_ngcontent-%COMP%]{transform:scale(2.5) translate(-2px,3px)}.bronze[_ngcontent-%COMP%]{color:#cd7f32}.silver[_ngcontent-%COMP%]{color:silver}.gold[_ngcontent-%COMP%]{color:gold}.platinum[_ngcontent-%COMP%]{color:#e5e4e2}.diamond[_ngcontent-%COMP%]{color:#3b49c4}.shadow-local[_ngcontent-%COMP%]{text-shadow:black 2px 2px 2px}.star-icon[_ngcontent-%COMP%]{position:absolute;bottom:-40px;font-size:30px;width:30px;transition:transform .3s ease}.left-star[_ngcontent-%COMP%]{transform:translate(-50px)}.right-star[_ngcontent-%COMP%]{transform:translate(30px)}.goal-name[_ngcontent-%COMP%]{position:absolute;bottom:-75px;width:100px;margin-left:-50px;text-align:center;font-size:12px;font-weight:700;color:#000}.large-icon[_ngcontent-%COMP%]{font-size:5rem;width:5rem;height:5rem}.note[_ngcontent-%COMP%]{font-size:.8rem;font-weight:lighter;margin-top:1rem;text-align:center}.hints-container[_ngcontent-%COMP%]{margin-top:1rem}.hints-callout[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:.5rem}.hint-item[_ngcontent-%COMP%]{color:#555;font-size:1em;list-style-type:none;position:relative;padding:5px 0 5px 30px}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin:0}li[_ngcontent-%COMP%]{margin-bottom:10px;color:#666;font-size:1.2rem}.guess-message[_ngcontent-%COMP%]{text-align:center;margin-top:1rem;font-size:1.2rem}.assests-loading-container[_ngcontent-%COMP%]{text-align:center;font-size:20px;color:#fff}.game-progress-bar[_ngcontent-%COMP%]{border-radius:22px;overflow:hidden;background-color:#e0e0e0;box-shadow:0 4px 8px #0003}.game-progress-bar[_ngcontent-%COMP%] .mat-progress-bar-fill[_ngcontent-%COMP%]:after{background-color:#4caf50;border-radius:22px}.game-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.level-details[_ngcontent-%COMP%]{visibility:hidden}.level-container[_ngcontent-%COMP%]:hover .level-details[_ngcontent-%COMP%]{visibility:visible}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}"],data:{animation:[xr("shake",[gn("normal => shake",mn(200,pv([oi({transform:"translateX(0)"}),oi({transform:"translateX(-10px)"}),oi({transform:"translateX(10px)"}),oi({transform:"translateX(0)"})])))]),xr("popIn",[gn(":enter",[oi({transform:"scale(0.8)",opacity:0}),mn("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",oi({transform:"scale(1.3)",opacity:1})),mn("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",oi({transform:"scale(1)",opacity:1}))])]),xr("scrollUp",[gn(":enter",[oi({transform:"translateY(100%)",opacity:0}),mn("0.5s ease-out",oi({transform:"translateY(0)",opacity:1}))])]),xr("fadeInDelayed",[gn(":enter",[oi({opacity:0}),mn("1s 0.5s ease-out",oi({opacity:1}))])])]}})}}return e})();const v3t=()=>({});function y3t(e,i){if(1&e){const t=xe();J(0,"li")(1,"a",11),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().findingWithExplicitContextSelected(r))}),ut(2),et()()}if(2&e){const t=i.$implicit;ot(2),Ke(t.display)}}function x3t(e,i){1&e&&(J(0,"th",20),ut(1," Type "),et())}function b3t(e,i){if(1&e&&(J(0,"td",21),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.type.display," ")}}function w3t(e,i){1&e&&(J(0,"th",20),ut(1," Target "),et())}function T3t(e,i){if(1&e&&(J(0,"td",21),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.target.code," ")}}function C3t(e,i){1&e&&(J(0,"th",20),ut(1," Target "),et())}function S3t(e,i){if(1&e&&(J(0,"td",21),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.target.display," ")}}function E3t(e,i){1&e&&ye(0,"tr",22)}function _3t(e,i){1&e&&ye(0,"tr",23)}function A3t(e,i){if(1&e&&(J(0,"div",4)(1,"h3"),ut(2),et(),J(3,"table",12),Qi(4,13),Ht(5,x3t,2,0,"th",14)(6,b3t,2,1,"td",15),Ki(),Qi(7,16),Ht(8,w3t,2,0,"th",14)(9,T3t,2,1,"td",15),Ki(),Qi(10,17),Ht(11,C3t,2,0,"th",14)(12,S3t,2,1,"td",15),Ki(),Ht(13,E3t,1,0,"tr",18)(14,_3t,1,0,"tr",19),et()()),2&e){const t=St();ot(2),Je("Relevant attributes (",t.selectedSituation.display,")"),ot(),vt("dataSource",t.dataSource),ot(10),vt("matHeaderRowDef",t.displayedColumns),ot(),vt("matRowDefColumns",t.displayedColumns)}}function D3t(e,i){if(1&e&&(J(0,"div",4)(1,"h3"),ut(2,"Resource Type"),et(),J(3,"a",24)(4,"span"),ut(5),et(),J(6,"mat-icon"),ut(7,"open_in_new"),et()()()),2&e){const t=St();ot(3),vt("href","https://hl7.org/fhir/R4/"+t.resourceType+".html",Ay),ot(2),Je("FHIR R4 ",t.resourceType,"")}}function M3t(e,i){if(1&e){const t=xe();J(0,"div",25)(1,"button",26),Ut("click",function(){zt(t);const r=St();return Gt(r.saveOutput(r.fhirRepresentationString))}),ye(2,"mat-icon",27),et(),J(3,"button",28),Ut("click",function(){zt(t);const r=St();return Gt(r.copyOutputToClipboard(r.fhirRepresentationString))}),ye(4,"mat-icon",29),et()()}}let I3t=(()=>{class e{constructor(t,n){this.terminologyService=t,this.clipboard=n,this.fhirRepresentationString="{}",this.situationsBinding={title:"Finding with explicit context",type:"Autocomplete",ecl:"<< 413350009 |Finding with explicit context (situation)|",value:"",note:"Select a finding with explicit context"},this.SituationConstants={KnownPresent:{code:"410515003",display:"Known present",selfAndDescendants:[]},KnownAbsent:{code:"410516002",display:"Known absent",selfAndDescendants:[]},SubjectOfRecord:{code:"410604004",display:"Subject of record",selfAndDescendants:[]},PersonInTheFamily:{code:"303071001",display:"Person in the family",selfAndDescendants:[]},InThePast:{code:"410513005",display:"In the past",selfAndDescendants:[]},CurrentOrSpecifiedTime:{code:"410512000",display:"Current or specified time",selfAndDescendants:[]},KnownPossible:{code:"410590009",display:"Known possible",selfAndDescendants:[]}},this.examples=[{code:"160377001",display:"Family history of asthma"},{code:"12147341000119108",display:"History of burn"},{code:"428942009",display:"History of fall"},{code:"300890009",display:"Swelling absent"},{code:"162057007",display:"Nausea present"},{code:"401204006",display:"Suspected autism"}],this.displayedColumns=["type","targetCode","targetDisplay"],this.dataSource=[]}ngOnInit(){this.loadOrUpdateConstants()}loadOrUpdateConstants(){var t=this;return we(function*(){let n=localStorage.getItem("SituationConstants");n?(t.SituationConstants=JSON.parse(n),console.log("Loaded constants from cache.")):(yield t.updateConstantDescendants(),localStorage.setItem("SituationConstants",JSON.stringify(t.SituationConstants)),console.log("Updated constants and cached them."))})()}updateConstantDescendants(){var t=this;return we(function*(){for(const n in t.SituationConstants)if(Object.prototype.hasOwnProperty.call(t.SituationConstants,n)){const r=t.SituationConstants[n];let s=yield Ia(t.terminologyService.expandValueSet("<< "+r.code,"",0,1e3));r.selfAndDescendants=s.expansion.contains.map(o=>o.code)}})()}convertSituationToFhir(t){var n=this;return we(function*(){n.selectedSituation=t,n.fhirRepresentation=null,n.fhirRepresentationString="Loading...",n.dataSource=[],n.resourceType=void 0;let l,w,E,D,r=yield Ia(n.terminologyService.lookupConcept(t.code)),s=n.terminologyService.getNormalForm(r);if(n.terminologyService.parseNormmalForm(s).groups.forEach(k=>{const O=k.find(W=>"408732007"===W.type.code);O&&(n.dataSource=[...n.dataSource,O],w=O.target);const L=k.find(W=>"408729009"===W.type.code);L&&(n.dataSource=[...n.dataSource,L],l=L.target);const U=k.find(W=>"408731000"===W.type.code);U&&(n.dataSource=[...n.dataSource,U],E=U.target);const j=k.find(W=>"246090004"===W.type.code);j&&(n.dataSource=[...n.dataSource,j],D=j.target)}),D){const k=n.SituationConstants.KnownPresent.selfAndDescendants.includes(l?.code),O=n.SituationConstants.SubjectOfRecord.selfAndDescendants.includes(w?.code),L=n.SituationConstants.InThePast.selfAndDescendants.includes(E?.code),U=n.SituationConstants.KnownAbsent.selfAndDescendants.includes(l?.code),j=n.SituationConstants.KnownPossible.selfAndDescendants.includes(l?.code),W=n.SituationConstants.CurrentOrSpecifiedTime.selfAndDescendants.includes(E?.code),Z=n.SituationConstants.PersonInTheFamily.selfAndDescendants.includes(w?.code);k&&O&&L?n.updateFhirRepresentation(n.createFhirCondition(D,"inactive")):k&&O&&W?n.updateFhirRepresentation(n.createFhirCondition(D,"active")):j&&O&&W?n.updateFhirRepresentation(n.createFhirCondition(D,"unconfirmed")):k&&Z?n.updateFhirRepresentation(n.createFamilyMemberHistoryForFinding(D,w)):U&&O&&W?n.updateFhirRepresentation(n.createFhirObservationForAbsentFinding(D)):n.fhirRepresentationString="No FHIR representation for this situation"}else n.fhirRepresentationString="No FHIR representation for this situation"})()}updateFhirRepresentation(t){this.fhirRepresentation=t,this.fhirRepresentationString=JSON.stringify(t,null,2)}findingWithExplicitContextSelected(t){t&&t.code&&this.convertSituationToFhir(t)}createFhirCondition(t,n){return this.resourceType="Condition",{resourceType:"Condition",subject:{reference:"Patient/1234"},clinicalStatus:{coding:[{system:"http://terminology.hl7.org/CodeSystem/condition-clinical",code:n}]},code:{coding:[{system:"http://snomed.info/sct",code:t.code,display:t.display}]}}}createFhirObservationForAbsentFinding(t){return this.resourceType="Observation",{resourceType:"Observation",subject:{reference:"Patient/1234"},status:"registered",code:{coding:[{system:"http://snomed.info/sct",code:t.code,display:t.display}]},valueCodeableConcept:{coding:[{system:"http://snomed.info/sct",code:"410516002",display:"Known absent"}]}}}createFamilyMemberHistoryForFinding(t,n){return this.resourceType="FamilyMemberHistory",{resourceType:"FamilyMemberHistory",status:"completed",patient:{reference:"Patient/1234"},relationship:{coding:[{system:"http://snomed.info/sct",code:n.code,display:n.display}]},condition:[{code:{coding:[{system:"http://snomed.info/sct",code:t.code,display:t.display}]}}]}}saveOutput(t){var n=new Blob([t],{type:"text/plain;charset=utf-8"});(0,Tu.saveAs)(n,`${this.selectedSituation.display}-fhir.json`)}copyOutputToClipboard(t){this.clipboard.copy(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(ma),pt(Nk))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-situation-map"]],decls:17,vars:9,consts:[[1,"p-8"],[1,"flex","flex-wrap","gap-4"],[1,"w-1/3"],[1,"w-auto",3,"selectionChange","binding"],[1,"mt-8"],[4,"ngFor","ngForOf"],["class","mt-8",4,"ngIf"],[1,"flex-grow"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["href","javascript:void(0);",3,"click"],["mat-table","",3,"dataSource"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","targetCode"],["matColumnDef","targetDisplay"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["target","_blank",1,"flex","flex-row","items-center","gap-2",3,"href"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(n,r){1&n&&(J(0,"div",0)(1,"h2"),ut(2,"Consistent Context Representation for Situations with Explicit Context"),et(),J(3,"div",1)(4,"div",2)(5,"app-autocomplete-binding",3),Ut("selectionChange",function(o){return r.findingWithExplicitContextSelected(o)}),et(),J(6,"h3",4),ut(7,"Examples"),et(),J(8,"ul"),Ht(9,y3t,3,1,"li",5),et(),Ht(10,A3t,15,4,"div",6)(11,D3t,8,2,"div",6),et(),J(12,"div",7)(13,"div",8),Ht(14,M3t,5,0,"div",9),J(15,"textarea",10),ut(16," "),et()()()()()),2&n&&(ot(5),vt("binding",r.situationsBinding),ot(4),vt("ngForOf",r.examples),ot(),vt("ngIf",null==r.selectedSituation?null:r.selectedSituation.display),ot(),vt("ngIf",r.resourceType),ot(3),vt("ngIf",r.fhirRepresentationString.length>15),ot(),vt("options",Xa(8,v3t))("lang","json")("innerHTML",r.fhirRepresentationString,Gf))},dependencies:[ys,ls,EE,jo,ga,kd,wh,Fd,Th,bh,Od,Ch,Sh,Ld,Nd,_h,Ev],styles:[".output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem;min-height:45rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}"]})}}return e})(),R3t=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-context-main"]],decls:1,vars:0,template:function(n,r){1&n&&ye(0,"app-situation-map")},dependencies:[I3t]})}}return e})();var P3t=Mt(1867),k3t=Mt.n(P3t);let F3t=(()=>{class e{constructor(){this.filter=new(k3t())}transform(t){return t&&this.filter.clean(t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275pipe=io({name:"safeText",type:e,pure:!0})}}return e})();function O3t(e,i){if(1&e){const t=xe();J(0,"a",13),Ut("click",function(){zt(t);const r=St().$implicit;return Gt(St().setLevel(r.name))}),ut(1),et()}if(2&e){const t=St().$implicit;ot(),Je(" ",t.name," ")}}function L3t(e,i){if(1&e&&(J(0,"span",14),ut(1),et()),2&e){const t=St().$implicit;ot(),Ke(t.name)}}function N3t(e,i){if(1&e&&(J(0,"span"),Ht(1,O3t,2,1,"a",7)(2,L3t,2,1,"span",8),et()),2&e){const t=i.$implicit,n=St();ot(),vt("ngIf",n.selectedLevel!=t.name),ot(),vt("ngIf",n.selectedLevel==t.name)}}function B3t(e,i){if(1&e){const t=xe();J(0,"a",13),Ut("click",function(){return zt(t),Gt(St().setLevel("scoreboard"))}),ut(1," Legacy "),et()}}function V3t(e,i){1&e&&(J(0,"span",14),ut(1,"Legacy"),et())}function U3t(e,i){1&e&&ye(0,"mat-spinner",15)}function z3t(e,i){1&e&&(J(0,"th",28),ut(1," Position "),et())}function G3t(e,i){if(1&e&&(J(0,"td",29),ut(1),et()),2&e){const t=i.index;ot(),Je(" ",t+1," ")}}function H3t(e,i){1&e&&(J(0,"th",28),ut(1," Message "),et())}function W3t(e,i){if(1&e&&(J(0,"span"),ut(1),vs(2,"safeText"),et()),2&e){const t=St().$implicit;ot(),Ke(Jl(2,1,t.message))}}function j3t(e,i){1&e&&(J(0,"span",31)(1,"i"),ut(2,"No information available (qualifier value)"),et()())}function X3t(e,i){if(1&e&&(J(0,"td",29),Ht(1,W3t,3,3,"span",11)(2,j3t,3,0,"span",30),et()),2&e){const t=i.$implicit;ot(),vt("ngIf",t.message),ot(),vt("ngIf",!t.message)}}function Y3t(e,i){1&e&&(J(0,"th",28),ut(1," Score "),et())}function $3t(e,i){if(1&e&&(J(0,"td",29),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.score," ")}}function Q3t(e,i){1&e&&(J(0,"th",28),ut(1," Rounds "),et())}function K3t(e,i){if(1&e&&(J(0,"td",29),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.numberOfRounds," ")}}function Z3t(e,i){1&e&&(J(0,"th",28),ut(1," Difficulty "),et())}function J3t(e,i){if(1&e&&(J(0,"td",29),ut(1),et()),2&e){const t=i.$implicit;ot(),Je(" ",t.difficulty," ")}}function q3t(e,i){1&e&&(J(0,"th",28),ut(1," Time Played "),et())}function tBt(e,i){if(1&e&&(J(0,"td",29),ut(1),vs(2,"elapsedTime"),et()),2&e){const t=i.$implicit;ot(),Je(" ",Jl(2,1,t.elapsed)," ")}}function eBt(e,i){1&e&&(J(0,"th",28),ut(1," Date "),et())}function iBt(e,i){if(1&e&&(J(0,"td",29),ut(1),vs(2,"date"),et()),2&e){const t=i.$implicit;ot(),Je(" ",Pc(2,1,t.date,"short")," ")}}function nBt(e,i){1&e&&ye(0,"tr",32)}function rBt(e,i){1&e&&ye(0,"tr",33)}function sBt(e,i){if(1&e&&(J(0,"div")(1,"table",16),Qi(2,17),Ht(3,z3t,2,0,"th",18)(4,G3t,2,1,"td",19),Ki(),Qi(5,20),Ht(6,H3t,2,0,"th",18)(7,X3t,3,2,"td",19),Ki(),Qi(8,21),Ht(9,Y3t,2,0,"th",18)(10,$3t,2,1,"td",19),Ki(),Qi(11,22),Ht(12,Q3t,2,0,"th",18)(13,K3t,2,1,"td",19),Ki(),Qi(14,23),Ht(15,Z3t,2,0,"th",18)(16,J3t,2,1,"td",19),Ki(),Qi(17,24),Ht(18,q3t,2,0,"th",18)(19,tBt,3,3,"td",19),Ki(),Qi(20,25),Ht(21,eBt,2,0,"th",18)(22,iBt,3,4,"td",19),Ki(),Ht(23,nBt,1,0,"tr",26)(24,rBt,1,0,"tr",27),et()()),2&e){const t=St();ot(),vt("dataSource",t.dataSource),ot(22),vt("matHeaderRowDef",t.displayedColumns),ot(),vt("matRowDefColumns",t.displayedColumns)}}let aBt=(()=>{class e{constructor(t,n,r,s){this.firebaseService=t,this.router=n,this.snoguessMainService=r,this.route=s,this.displayedColumns=["position","message","difficulty","score","numberOfRounds","secondsPlayed","date"],this.dataSource=[],this.loadingScores=!1,this.difficultyLevels=[],this.selectedLevel=""}ngOnInit(){this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.route.queryParams.subscribe(t=>{const n=t.level;this.selectedLevel=n&&this.difficultyLevels.some(s=>s.name===n)?n:this.difficultyLevels[0].name,this.loadScores(this.selectedLevel),t.refresh&&this.startAutoRefresh()})}ngOnDestroy(){this.stopAutoRefresh()}startAutoRefresh(){this.stopAutoRefresh(),this.intervalId=setInterval(()=>{this.loadScores(this.selectedLevel)},6e4)}stopAutoRefresh(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}setLevel(t){this.selectedLevel=t,this.loadScores(t)}loadScores(t){this.loadingScores=!0,this.firebaseService.getScores(t).then(n=>{this.dataSource=n.map(r=>({...r,date:r.date?r.date.toDate():new Date})),this.loadingScores=!1})}backToGame(){this.router.navigate(["/snoguess"])}static{this.\u0275fac=function(n){return new(n||e)(pt(nJ),pt(Ho),pt(iJ),pt(nc))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-scoreboard"]],decls:19,vars:8,consts:[[1,"flex","flex-col","items-center","gap-4","pt-6","snoguess-game"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/scoreboard.png","alt","High Scores",1,"w-1/4","mt-8"],[1,"mb-2","flex","flex-row","items-center","gap-1"],[1,"diamond"],[1,"mb-3","flex","flex-row","items-center","gap-3"],[4,"ngFor","ngForOf"],["href","javascript:void(0)","class","text-blue-500 underline",3,"click",4,"ngIf"],["class","selected-level",4,"ngIf"],[1,"flex","flex-row","items-center","gap-3"],["diameter","50",4,"ngIf"],[4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],["href","javascript:void(0)",1,"text-blue-500","underline",3,"click"],[1,"selected-level"],["diameter","50"],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","position"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","message"],["matColumnDef","score"],["matColumnDef","numberOfRounds"],["matColumnDef","difficulty"],["matColumnDef","secondsPlayed"],["matColumnDef","date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","text-gray-400",4,"ngIf"],[1,"text-gray-400"],["mat-header-row",""],["mat-row",""]],template:function(n,r){1&n&&(J(0,"div",0),ye(1,"img",1)(2,"img",2),J(3,"div",3)(4,"span"),ut(5,"Messages posted by players!\xa0"),et(),J(6,"mat-icon",4),ut(7,"emoji_events"),et()(),J(8,"div",5),Ht(9,N3t,3,2,"span",6)(10,B3t,2,0,"a",7)(11,V3t,2,0,"span",8),et(),J(12,"div",9)(13,"h3"),ut(14),et()(),Ht(15,U3t,1,0,"mat-spinner",10)(16,sBt,25,3,"div",11),J(17,"div",12),Ut("click",function(){return r.backToGame()}),ut(18," Back to game "),et()()),2&n&&(ot(2),vt("@popIn",void 0),ot(7),vt("ngForOf",r.difficultyLevels),ot(),vt("ngIf","scoreboard"!=r.selectedLevel),ot(),vt("ngIf","scoreboard"==r.selectedLevel),ot(3),Je("Top 20 ",r.selectedLevel," level scores"),ot(),vt("ngIf",r.loadingScores),ot(),vt("ngIf",!r.loadingScores),ot(),vt("@scrollUp",void 0))},dependencies:[ys,ls,ga,Pd,kd,wh,Fd,Th,bh,Od,Ch,Sh,Ld,Nd,sh,rJ,F3t],styles:[".diamond[_ngcontent-%COMP%]{color:#3b49c4}.snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}.selected-level[_ngcontent-%COMP%]{font-weight:700}"],data:{animation:[xr("shake",[gn("normal => shake",mn(200,pv([oi({transform:"translateX(0)"}),oi({transform:"translateX(-10px)"}),oi({transform:"translateX(10px)"}),oi({transform:"translateX(0)"})])))]),xr("popIn",[gn(":enter",[oi({transform:"scale(0.8)",opacity:0}),mn("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",oi({transform:"scale(1.3)",opacity:1})),mn("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",oi({transform:"scale(1)",opacity:1}))])]),xr("scrollUp",[gn(":enter",[oi({transform:"translateY(100%)",opacity:0}),mn("0.5s ease-out",oi({transform:"translateY(0)",opacity:1}))])]),xr("fadeInDelayed",[gn(":enter",[oi({opacity:0}),mn("1s 0.5s ease-out",oi({opacity:1}))])])]}})}}return e})();var oBt=Mt(4418),lBt=Mt.n(oBt);function x0(e){return e+.5|0}const Oh=(e,i,t)=>Math.max(Math.min(e,t),i);function o1(e){return Oh(x0(2.55*e),0,255)}function uf(e){return Oh(x0(255*e),0,255)}function Lh(e){return Oh(x0(e/2.55)/100,0,1)}function oJ(e){return Oh(x0(100*e),0,100)}const hc={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},VL=[..."0123456789ABCDEF"],cBt=e=>VL[15&e],uBt=e=>VL[(240&e)>>4]+VL[15&e],G_=e=>(240&e)>>4==(15&e);const mBt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function lJ(e,i,t){const n=i*Math.min(t,1-t),r=(s,o=(s+e/30)%12)=>t-n*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function gBt(e,i,t){const n=(r,s=(r+e/60)%6)=>t-t*i*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function vBt(e,i,t){const n=lJ(e,1,.5);let r;for(i+t>1&&(r=1/(i+t),i*=r,t*=r),r=0;r<3;r++)n[r]*=1-i-t,n[r]+=i;return n}function UL(e){const t=e.r/255,n=e.g/255,r=e.b/255,s=Math.max(t,n,r),o=Math.min(t,n,r),l=(s+o)/2;let w,E,D;return s!==o&&(D=s-o,E=l>.5?D/(2-s-o):D/(s+o),w=function yBt(e,i,t,n,r){return e===r?(i-t)/n+(ie<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,b0=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function W_(e,i,t){if(e){let n=UL(e);n[i]=Math.max(0,Math.min(n[i]+n[i]*t,0===i?360:1)),n=GL(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function dJ(e,i){return e&&Object.assign(i||{},e)}function fJ(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=uf(e[3]))):(i=dJ(e,{r:0,g:0,b:0,a:1})).a=uf(i.a),i}function IBt(e){return"r"===e.charAt(0)?function ABt(e){const i=_Bt.exec(e);let n,r,s,t=255;if(i){if(i[7]!==n){const o=+i[7];t=i[8]?o1(o):Oh(255*o,0,255)}return n=+i[1],r=+i[3],s=+i[5],n=255&(i[2]?o1(n):Oh(n,0,255)),r=255&(i[4]?o1(r):Oh(r,0,255)),s=255&(i[6]?o1(s):Oh(s,0,255)),{r:n,g:r,b:s,a:t}}}(e):function wBt(e){const i=mBt.exec(e);let n,t=255;if(!i)return;i[5]!==n&&(t=i[6]?o1(+i[5]):uf(+i[5]));const r=cJ(+i[2]),s=+i[3]/100,o=+i[4]/100;return n="hwb"===i[1]?function xBt(e,i,t){return zL(vBt,e,i,t)}(r,s,o):"hsv"===i[1]?function bBt(e,i,t){return zL(gBt,e,i,t)}(r,s,o):GL(r,s,o),{r:n[0],g:n[1],b:n[2],a:t}}(e)}class w0{constructor(i){if(i instanceof w0)return i;const t=typeof i;let n;"object"===t?n=fJ(i):"string"===t&&(n=function dBt(e){var t,i=e.length;return"#"===e[0]&&(4===i||5===i?t={r:255&17*hc[e[1]],g:255&17*hc[e[2]],b:255&17*hc[e[3]],a:5===i?17*hc[e[4]]:255}:(7===i||9===i)&&(t={r:hc[e[1]]<<4|hc[e[2]],g:hc[e[3]]<<4|hc[e[4]],b:hc[e[5]]<<4|hc[e[6]],a:9===i?hc[e[7]]<<4|hc[e[8]]:255})),t}(i)||function EBt(e){H_||(H_=function SBt(){const e={},i=Object.keys(hJ),t=Object.keys(uJ);let n,r,s,o,l;for(n=0;n>16&255,s>>8&255,255&s]}return e}(),H_.transparent=[0,0,0,0]);const i=H_[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255}}(i)||IBt(i)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var i=dJ(this._rgb);return i&&(i.a=Lh(i.a)),i}set rgb(i){this._rgb=fJ(i)}rgbString(){return this._valid?function DBt(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Lh(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}(this._rgb):void 0}hexString(){return this._valid?function pBt(e){var i=(e=>G_(e.r)&&G_(e.g)&&G_(e.b)&&G_(e.a))(e)?cBt:uBt;return e?"#"+i(e.r)+i(e.g)+i(e.b)+((e,i)=>e<255?i(e):"")(e.a,i):void 0}(this._rgb):void 0}hslString(){return this._valid?function CBt(e){if(!e)return;const i=UL(e),t=i[0],n=oJ(i[1]),r=oJ(i[2]);return e.a<255?`hsla(${t}, ${n}%, ${r}%, ${Lh(e.a)})`:`hsl(${t}, ${n}%, ${r}%)`}(this._rgb):void 0}mix(i,t){if(i){const n=this.rgb,r=i.rgb;let s;const o=t===s?.5:t,l=2*o-1,w=n.a-r.a,E=((l*w==-1?l:(l+w)/(1+l*w))+1)/2;s=1-E,n.r=255&E*n.r+s*r.r+.5,n.g=255&E*n.g+s*r.g+.5,n.b=255&E*n.b+s*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(i,t){return i&&(this._rgb=function MBt(e,i,t){const n=b0(Lh(e.r)),r=b0(Lh(e.g)),s=b0(Lh(e.b));return{r:uf(HL(n+t*(b0(Lh(i.r))-n))),g:uf(HL(r+t*(b0(Lh(i.g))-r))),b:uf(HL(s+t*(b0(Lh(i.b))-s))),a:e.a+t*(i.a-e.a)}}(this._rgb,i._rgb,t)),this}clone(){return new w0(this.rgb)}alpha(i){return this._rgb.a=uf(i),this}clearer(i){return this._rgb.a*=1-i,this}greyscale(){const i=this._rgb,t=x0(.3*i.r+.59*i.g+.11*i.b);return i.r=i.g=i.b=t,this}opaquer(i){return this._rgb.a*=1+i,this}negate(){const i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return W_(this._rgb,2,i),this}darken(i){return W_(this._rgb,2,-i),this}saturate(i){return W_(this._rgb,1,i),this}desaturate(i){return W_(this._rgb,1,-i),this}rotate(i){return function TBt(e,i){var t=UL(e);t[0]=cJ(t[0]+i),t=GL(t),e.r=t[0],e.g=t[1],e.b=t[2]}(this._rgb,i),this}}function Nh(){}const RBt=(()=>{let e=0;return()=>e++})();function rr(e){return null==e}function es(e){if(Array.isArray&&Array.isArray(e))return!0;const i=Object.prototype.toString.call(e);return"[object"===i.slice(0,7)&&"Array]"===i.slice(-6)}function Xn(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function _s(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)}function Nl(e,i){return _s(e)?e:i}function Sn(e,i){return typeof e>"u"?i:e}const pJ=(e,i)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*i:+e;function $r(e,i,t){if(e&&"function"==typeof e.call)return e.apply(t,i)}function _r(e,i,t,n){let r,s,o;if(es(e))if(s=e.length,n)for(r=s-1;r>=0;r--)i.call(t,e[r],r);else for(r=0;re,x:e=>e.x,y:e=>e.y};function hf(e,i){return(gJ[i]||(gJ[i]=function LBt(e){const i=function OBt(e){const i=e.split("."),t=[];let n="";for(const r of i)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}(e);return t=>{for(const n of i){if(""===n)break;t=t&&t[n]}return t}}(i)))(e)}function WL(e){return e.charAt(0).toUpperCase()+e.slice(1)}const u1=e=>typeof e<"u",df=e=>"function"==typeof e,vJ=(e,i)=>{if(e.size!==i.size)return!1;for(const t of e)if(!i.has(t))return!1;return!0},is=Math.PI,ns=2*is,BBt=ns+is,Y_=Number.POSITIVE_INFINITY,VBt=is/180,Bs=is/2,tm=is/4,yJ=2*is/3,ff=Math.log10,Mu=Math.sign;function h1(e,i,t){return Math.abs(e-i)w&&E=Math.min(i,t)-n&&e<=Math.max(i,t)+n}function YL(e,i,t){t=t||(o=>e[o]1;)s=r+n>>1,t(s)?r=s:n=s;return{lo:r,hi:n}}const Vh=(e,i,t,n)=>YL(e,t,n?r=>{const s=e[r][i];return se[r][i]YL(e,t,n=>e[n][i]>=t),CJ=["push","pop","shift","splice","unshift"];function SJ(e,i){const t=e._chartjs;if(!t)return;const n=t.listeners,r=n.indexOf(i);-1!==r&&n.splice(r,1),!(n.length>0)&&(CJ.forEach(s=>{delete e[s]}),delete e._chartjs)}function EJ(e){const i=new Set(e);return i.size===e.length?e:Array.from(i)}const _J=typeof window>"u"?function(e){return e()}:window.requestAnimationFrame;function AJ(e,i){let t=[],n=!1;return function(...r){t=r,n||(n=!0,_J.call(window,()=>{n=!1,e.apply(i,t)}))}}const $L=e=>"start"===e?"left":"end"===e?"right":"center",vo=(e,i,t)=>"start"===e?i:"end"===e?t:(i+t)/2;function DJ(e,i,t){const n=i.length;let r=0,s=n;if(e._sorted){const{iScale:o,_parsed:l}=e,w=o.axis,{min:E,max:D,minDefined:k,maxDefined:O}=o.getUserBounds();k&&(r=Fa(Math.min(Vh(l,w,E).lo,t?n:Vh(i,w,o.getPixelForValue(E)).lo),0,n-1)),s=O?Fa(Math.max(Vh(l,o.axis,D,!0).hi+1,t?0:Vh(i,w,o.getPixelForValue(D),!0).hi+1),r,n)-r:n-r}return{start:r,count:s}}function MJ(e){const{xScale:i,yScale:t,_scaleRanges:n}=e,r={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!n)return e._scaleRanges=r,!0;const s=n.xmin!==i.min||n.xmax!==i.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,r),s}const $_=e=>0===e||1===e,IJ=(e,i,t)=>-Math.pow(2,10*(e-=1))*Math.sin((e-i)*ns/t),RJ=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*ns/t)+1,f1={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*Bs),easeOutSine:e=>Math.sin(e*Bs),easeInOutSine:e=>-.5*(Math.cos(is*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>$_(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>$_(e)?e:IJ(e,.075,.3),easeOutElastic:e=>$_(e)?e:RJ(e,.075,.3),easeInOutElastic:e=>$_(e)?e:e<.5?.5*IJ(2*e,.1125,.45):.5+.5*RJ(2*e-1,.1125,.45),easeInBack:e=>e*e*(2.70158*e-1.70158),easeOutBack:e=>(e-=1)*e*(2.70158*e+1.70158)+1,easeInOutBack(e){let i=1.70158;return(e/=.5)<1?e*e*((1+(i*=1.525))*e-i)*.5:.5*((e-=2)*e*((1+(i*=1.525))*e+i)+2)},easeInBounce:e=>1-f1.easeOutBounce(1-e),easeOutBounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,easeInOutBounce:e=>e<.5?.5*f1.easeInBounce(2*e):.5*f1.easeOutBounce(2*e-1)+.5};function QL(e){if(e&&"object"==typeof e){const i=e.toString();return"[object CanvasPattern]"===i||"[object CanvasGradient]"===i}return!1}function PJ(e){return QL(e)?e:new w0(e)}function KL(e){return QL(e)?e:new w0(e).saturate(.5).darken(.1).hexString()}const QBt=["x","y","borderWidth","radius","tension"],KBt=["color","borderColor","backgroundColor"],kJ=new Map;function p1(e,i,t){return function qBt(e,i){i=i||{};const t=e+JSON.stringify(i);let n=kJ.get(t);return n||(n=new Intl.NumberFormat(e,i),kJ.set(t,n)),n}(i,t).format(e)}const FJ={values:e=>es(e)?e:""+e,numeric(e,i,t){if(0===e)return"0";const n=this.chart.options.locale;let r,s=e;if(t.length>1){const E=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(E<1e-4||E>1e15)&&(r="scientific"),s=function tVt(e,i){let t=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}(e,t)}const o=ff(Math.abs(s)),l=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),w={notation:r,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(w,this.options.ticks.format),p1(e,n,w)},logarithmic(e,i,t){if(0===e)return"0";const n=t[i].significand||e/Math.pow(10,Math.floor(ff(e)));return[1,2,3,5,10,15].includes(n)||i>.8*t.length?FJ.numeric.call(this,e,i,t):""}};var Q_={formatters:FJ};const em=Object.create(null),ZL=Object.create(null);function m1(e,i){if(!i)return e;const t=i.split(".");for(let n=0,r=t.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>KL(r.backgroundColor),this.hoverBorderColor=(n,r)=>KL(r.borderColor),this.hoverColor=(n,r)=>KL(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(t)}set(i,t){return JL(this,i,t)}get(i){return m1(this,i)}describe(i,t){return JL(ZL,i,t)}override(i,t){return JL(em,i,t)}route(i,t,n,r){const s=m1(this,i),o=m1(this,n),l="_"+t;Object.defineProperties(s,{[l]:{value:s[t],writable:!0},[t]:{enumerable:!0,get(){const w=this[l],E=o[r];return Xn(w)?Object.assign({},E,w):Sn(w,E)},set(w){this[l]=w}}})}apply(i){i.forEach(t=>t(this))}}var fs=new iVt({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function ZBt(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>"onProgress"!==i&&"onComplete"!==i&&"fn"!==i}),e.set("animations",{colors:{type:"color",properties:KBt},numbers:{type:"number",properties:QBt}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>0|i}}}})},function JBt(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function eVt(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Q_.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&"callback"!==i&&"parser"!==i,_indexable:i=>"borderDash"!==i&&"tickBorderDash"!==i&&"dash"!==i}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:i=>"backdropPadding"!==i&&"callback"!==i,_indexable:i=>"backdropPadding"!==i})}]);function K_(e,i,t,n,r){let s=i[r];return s||(s=i[r]=e.measureText(r).width,t.push(r)),s>n&&(n=s),n}function rVt(e,i,t,n){let r=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==i&&(r=n.data={},s=n.garbageCollect=[],n.font=i),e.save(),e.font=i;let o=0;const l=t.length;let w,E,D,k,O;for(w=0;wt.length){for(w=0;w0&&e.stroke()}}function Uh(e,i,t){return t=t||.5,!i||e&&e.x>i.left-t&&e.xi.top-t&&e.y0&&""!==s.strokeColor;let w,E;for(e.save(),e.font=r.string,function oVt(e,i){i.translation&&e.translate(i.translation[0],i.translation[1]),rr(i.rotation)||e.rotate(i.rotation),i.color&&(e.fillStyle=i.color),i.textAlign&&(e.textAlign=i.textAlign),i.textBaseline&&(e.textBaseline=i.textBaseline)}(e,s),w=0;w+e||0;function tN(e,i){const t={},n=Xn(i),r=n?Object.keys(i):i,s=Xn(e)?n?o=>Sn(e[o],e[i[o]]):o=>e[o]:()=>e;for(const o of r)t[o]=fVt(s(o));return t}function NJ(e){return tN(e,{top:"y",right:"x",bottom:"y",left:"x"})}function rm(e){return tN(e,["topLeft","topRight","bottomLeft","bottomRight"])}function yo(e){const i=NJ(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function ba(e,i){let t=Sn((e=e||{}).size,(i=i||fs.font).size);"string"==typeof t&&(t=parseInt(t,10));let n=Sn(e.style,i.style);n&&!(""+n).match(hVt)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const r={family:Sn(e.family,i.family),lineHeight:dVt(Sn(e.lineHeight,i.lineHeight),t),size:t,style:n,weight:Sn(e.weight,i.weight),string:""};return r.string=function nVt(e){return!e||rr(e.size)||rr(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(r),r}function v1(e,i,t,n){let s,o,l,r=!0;for(s=0,o=e.length;se[0]){const s=t||e;typeof n>"u"&&(n=GJ("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:n,_getTarget:r,override:l=>eN([l,...e],i,s,n)};return new Proxy(o,{deleteProperty:(l,w)=>(delete l[w],delete l._keys,delete e[0][w],!0),get:(l,w)=>VJ(l,w,()=>function TVt(e,i,t,n){let r;for(const s of i)if(r=GJ(mVt(s,e),t),typeof r<"u")return iN(e,r)?nN(t,n,e,r):r}(w,i,e,l)),getOwnPropertyDescriptor:(l,w)=>Reflect.getOwnPropertyDescriptor(l._scopes[0],w),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(l,w)=>HJ(l).includes(w),ownKeys:l=>HJ(l),set(l,w,E){const D=l._storage||(l._storage=r());return l[w]=D[w]=E,delete l._keys,!0}})}function C0(e,i,t,n){const r={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set,_descriptors:BJ(e,n),setContext:s=>C0(e,s,t,n),override:s=>C0(e.override(s),i,t,n)};return new Proxy(r,{deleteProperty:(s,o)=>(delete s[o],delete e[o],!0),get:(s,o,l)=>VJ(s,o,()=>function gVt(e,i,t){const{_proxy:n,_context:r,_subProxy:s,_descriptors:o}=e;let l=n[i];return df(l)&&o.isScriptable(i)&&(l=function vVt(e,i,t,n){const{_proxy:r,_context:s,_subProxy:o,_stack:l}=t;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let w=i(s,o||n);return l.delete(e),iN(e,w)&&(w=nN(r._scopes,r,e,w)),w}(i,l,e,t)),es(l)&&l.length&&(l=function yVt(e,i,t,n){const{_proxy:r,_context:s,_subProxy:o,_descriptors:l}=t;if(typeof s.index<"u"&&n(e))return i[s.index%i.length];if(Xn(i[0])){const w=i,E=r._scopes.filter(D=>D!==w);i=[];for(const D of w){const k=nN(E,r,e,D);i.push(C0(k,s,o&&o[e],l))}}return i}(i,l,e,o.isIndexable)),iN(i,l)&&(l=C0(l,r,s&&s[i],o)),l}(s,o,l)),getOwnPropertyDescriptor:(s,o)=>s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(s,o)=>Reflect.has(e,o),ownKeys:()=>Reflect.ownKeys(e),set:(s,o,l)=>(e[o]=l,delete s[o],!0)})}function BJ(e,i={scriptable:!0,indexable:!0}){const{_scriptable:t=i.scriptable,_indexable:n=i.indexable,_allKeys:r=i.allKeys}=e;return{allKeys:r,scriptable:t,indexable:n,isScriptable:df(t)?t:()=>t,isIndexable:df(n)?n:()=>n}}const mVt=(e,i)=>e?e+WL(i):i,iN=(e,i)=>Xn(i)&&"adapters"!==e&&(null===Object.getPrototypeOf(i)||i.constructor===Object);function VJ(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||"constructor"===i)return e[i];const n=t();return e[i]=n,n}function UJ(e,i,t){return df(e)?e(i,t):e}const xVt=(e,i)=>!0===e?i:"string"==typeof e?hf(i,e):void 0;function bVt(e,i,t,n,r){for(const s of i){const o=xVt(t,s);if(o){e.add(o);const l=UJ(o._fallback,t,r);if(typeof l<"u"&&l!==t&&l!==n)return l}else if(!1===o&&typeof n<"u"&&t!==n)return null}return!1}function nN(e,i,t,n){const r=i._rootScopes,s=UJ(i._fallback,t,n),o=[...e,...r],l=new Set;l.add(n);let w=zJ(l,o,t,s||t,n);return!(null===w||typeof s<"u"&&s!==t&&(w=zJ(l,o,s,w,n),null===w))&&eN(Array.from(l),[""],r,s,()=>function wVt(e,i,t){const n=e._getTarget();i in n||(n[i]={});const r=n[i];return es(r)&&Xn(t)?t:r||{}}(i,t,n))}function zJ(e,i,t,n,r){for(;t;)t=bVt(e,i,t,n,r);return t}function GJ(e,i){for(const t of i){if(!t)continue;const n=t[e];if(typeof n<"u")return n}}function HJ(e){let i=e._keys;return i||(i=e._keys=function CVt(e){const i=new Set;for(const t of e)for(const n of Object.keys(t).filter(r=>!r.startsWith("_")))i.add(n);return Array.from(i)}(e._scopes)),i}function WJ(e,i,t,n){const{iScale:r}=e,{key:s="r"}=this._parsing,o=new Array(n);let l,w,E,D;for(l=0,w=n;li"x"===e?"y":"x";function EVt(e,i,t,n){const r=e.skip?i:e,s=i,o=t.skip?i:t,l=XL(s,r),w=XL(o,s);let E=l/(l+w),D=w/(l+w);E=isNaN(E)?0:E,D=isNaN(D)?0:D;const k=n*E,O=n*D;return{previous:{x:s.x-k*(o.x-r.x),y:s.y-k*(o.y-r.y)},next:{x:s.x+O*(o.x-r.x),y:s.y+O*(o.y-r.y)}}}function q_(e,i,t){return Math.max(Math.min(e,t),i)}function IVt(e,i,t,n,r){let s,o,l,w;if(i.spanGaps&&(e=e.filter(E=>!E.skip)),"monotone"===i.cubicInterpolationMode)!function DVt(e,i="x"){const t=jJ(i),n=e.length,r=Array(n).fill(0),s=Array(n);let o,l,w,E=S0(e,0);for(o=0;oe.ownerDocument.defaultView.getComputedStyle(e,null),PVt=["top","right","bottom","left"];function sm(e,i,t){const n={};t=t?"-"+t:"";for(let r=0;r<4;r++){const s=PVt[r];n[s]=parseFloat(e[i+"-"+s+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const kVt=(e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot);function am(e,i){if("native"in e)return e;const{canvas:t,currentDevicePixelRatio:n}=i,r=eA(t),s="border-box"===r.boxSizing,o=sm(r,"padding"),l=sm(r,"border","width"),{x:w,y:E,box:D}=function FVt(e,i){const t=e.touches,n=t&&t.length?t[0]:e,{offsetX:r,offsetY:s}=n;let l,w,o=!1;if(kVt(r,s,e.target))l=r,w=s;else{const E=i.getBoundingClientRect();l=n.clientX-E.left,w=n.clientY-E.top,o=!0}return{x:l,y:w,box:o}}(e,t),k=o.left+(D&&l.left),O=o.top+(D&&l.top);let{width:L,height:U}=i;return s&&(L-=o.width+l.width,U-=o.height+l.height),{x:Math.round((w-k)/L*t.width/n),y:Math.round((E-O)/U*t.height/n)}}const iA=e=>Math.round(10*e)/10;function XJ(e,i,t){const n=i||1,r=Math.floor(e.height*n),s=Math.floor(e.width*n);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==n||o.height!==r||o.width!==s)&&(e.currentDevicePixelRatio=n,o.height=r,o.width=s,e.ctx.setTransform(n,0,0,n,0,0),!0)}const NVt=function(){let e=!1;try{const i={get passive(){return e=!0,!1}};rN()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch{}return e}();function YJ(e,i){const t=function RVt(e,i){return eA(e).getPropertyValue(i)}(e,i),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function om(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)}}function BVt(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:"middle"===n?t<.5?e.y:i.y:"after"===n?t<1?e.y:i.y:t>0?i.y:e.y}}function VVt(e,i,t,n){const r={x:e.cp2x,y:e.cp2y},s={x:i.cp1x,y:i.cp1y},o=om(e,r,t),l=om(r,s,t),w=om(s,i,t),E=om(o,l,t),D=om(l,w,t);return om(E,D,t)}function E0(e,i,t){return e?function(e,i){return{x:t=>e+e+i-t,setWidth(t){i=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,n)=>t-n,leftForLtr:(t,n)=>t-n}}(i,t):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,i)=>e+i,leftForLtr:(e,i)=>e}}function $J(e,i){let t,n;("ltr"===i||"rtl"===i)&&(t=e.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",i,"important"),e.prevTextDirection=n)}function QJ(e,i){void 0!==i&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",i[0],i[1]))}function KJ(e){return"angle"===e?{between:d1,compare:GBt,normalize:Bl}:{between:Bh,compare:(i,t)=>i-t,normalize:i=>i}}function ZJ({start:e,end:i,count:t,loop:n,style:r}){return{start:e%t,end:i%t,loop:n&&(i-e+1)%t==0,style:r}}function JJ(e,i,t){if(!t)return[e];const{property:n,start:r,end:s}=t,o=i.length,{compare:l,between:w,normalize:E}=KJ(n),{start:D,end:k,loop:O,style:L}=function GVt(e,i,t){const{property:n,start:r,end:s}=t,{between:o,normalize:l}=KJ(n),w=i.length;let O,L,{start:E,end:D,loop:k}=e;if(k){for(E+=w,D+=w,O=0,L=w;Ol({chart:i,initial:t.initial,numSteps:o,currentStep:Math.min(n-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=_J.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;const s=n.items;let w,o=s.length-1,l=!1;for(;o>=0;--o)w=s[o],w._active?(w._total>n.duration&&(n.duration=w._total),w.tick(i),l=!0):(s[o]=s[s.length-1],s.pop());l&&(r.draw(),this._notify(r,n,i,"progress")),s.length||(n.running=!1,this._notify(r,n,i,"complete"),n.initial=!1),t+=s.length}),this._lastDate=i,0===t&&(this._running=!1)}_getAnims(i){const t=this._charts;let n=t.get(i);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,n)),n}listen(i,t,n){this._getAnims(i).listeners[t].push(n)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){const t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,r)=>Math.max(n,r._duration),0),this._refresh())}running(i){if(!this._running)return!1;const t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){const t=this._charts.get(i);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(i,t,Date.now(),"complete")}remove(i){return this._charts.delete(i)}}var zh=new $Vt;const iq="transparent",QVt={boolean:(e,i,t)=>t>.5?i:e,color(e,i,t){const n=PJ(e||iq),r=n.valid&&PJ(i||iq);return r&&r.valid?r.mix(n,t).hexString():i},number:(e,i,t)=>e+(i-e)*t};class KVt{constructor(i,t,n,r){const s=t[n];r=v1([i.to,r,s,i.from]);const o=v1([i.from,s,r]);this._active=!0,this._fn=i.fn||QVt[i.type||typeof o],this._easing=f1[i.easing]||f1.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=t,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(i,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,i.duration)),this._total+=s,this._loop=!!i.loop,this._to=v1([i.to,t,r,i.from]),this._from=v1([i.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){const t=i-this._start,n=this._duration,r=this._prop,s=this._from,o=this._loop,l=this._to;let w;if(this._active=s!==l&&(o||t1?2-w:w,w=this._easing(Math.min(1,Math.max(0,w))),this._target[r]=this._fn(s,l,w))}wait(){const i=this._promises||(this._promises=[]);return new Promise((t,n)=>{i.push({res:t,rej:n})})}_notify(i){const t=i?"res":"rej",n=this._promises||[];for(let r=0;r{const s=i[r];if(!Xn(s))return;const o={};for(const l of t)o[l]=s[l];(es(s.properties)&&s.properties||[r]).forEach(l=>{(l===r||!n.has(l))&&n.set(l,o)})})}_animateOptions(i,t){const n=t.options,r=function JVt(e,i){if(!i)return;let t=e.options;if(t)return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;e.options=i}(i,n);if(!r)return[];const s=this._createAnimations(r,n);return n.$shared&&function ZVt(e,i){const t=[],n=Object.keys(i);for(let r=0;r{i.options=n},()=>{}),s}_createAnimations(i,t){const n=this._properties,r=[],s=i.$animations||(i.$animations={}),o=Object.keys(t),l=Date.now();let w;for(w=o.length-1;w>=0;--w){const E=o[w];if("$"===E.charAt(0))continue;if("options"===E){r.push(...this._animateOptions(i,t));continue}const D=t[E];let k=s[E];const O=n.get(E);if(k){if(O&&k.active()){k.update(O,D,l);continue}k.cancel()}O&&O.duration?(s[E]=k=new KVt(O,i,E,D),r.push(k)):i[E]=D}return r}update(i,t){if(0===this._properties.size)return void Object.assign(i,t);const n=this._createAnimations(i,t);return n.length?(zh.add(this._chart,n),!0):void 0}}function rq(e,i){const t=e&&e.options||{},n=t.reverse,r=void 0===t.min?i:0,s=void 0===t.max?i:0;return{start:n?s:r,end:n?r:s}}function sq(e,i){const t=[],n=e._getSortedDatasetMetas(i);let r,s;for(r=0,s=n.length;r0||!t&&s<0)return r.index}return null}function lq(e,i){const{chart:t,_cachedMeta:n}=e,r=t._stacks||(t._stacks={}),{iScale:s,vScale:o,index:l}=n,w=s.axis,E=o.axis,D=function i5t(e,i,t){return`${e.id}.${i.id}.${t.stack||t.type}`}(s,o,n),k=i.length;let O;for(let L=0;Lt[n].axis===i).shift()}function y1(e,i){const t=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){i=i||e._parsed;for(const r of i){const s=r._stacks;if(!s||void 0===s[n]||void 0===s[n][t])return;delete s[n][t],void 0!==s[n]._visualValues&&void 0!==s[n]._visualValues[t]&&delete s[n]._visualValues[t]}}}const lN=e=>"reset"===e||"none"===e,cq=(e,i)=>i?e:Object.assign({},e);let mf=(()=>class e{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=aN(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&y1(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(O,L,U,j)=>"x"===O?L:"r"===O?j:U,o=n.xAxisID=Sn(r.xAxisID,oN(t,"x")),l=n.yAxisID=Sn(r.yAxisID,oN(t,"y")),w=n.rAxisID=Sn(r.rAxisID,oN(t,"r")),E=n.indexAxis,D=n.iAxisID=s(E,o,l,w),k=n.vAxisID=s(E,l,o,w);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(w),n.iScale=this.getScaleForId(D),n.vScale=this.getScaleForId(k)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&SJ(this._data,this),t._stacked&&y1(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Xn(n))this._data=function e5t(e,i){const{iScale:t,vScale:n}=i,r="x"===t.axis?"x":"y",s="x"===n.axis?"x":"y",o=Object.keys(e),l=new Array(o.length);let w,E,D;for(w=0,E=o.length;w{const n="_onData"+WL(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...s){const o=r.apply(this,s);return e._chartjs.listeners.forEach(l=>{"function"==typeof l[n]&&l[n](...s)}),o}})}))}(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const o=n._stacked;n._stacked=aN(n.vScale,n),n.stack!==r.stack&&(s=!0,y1(n),n.stack=r.stack),this._resyncElements(t),(s||o!==n._stacked)&&(lq(this,n._parsed),n._stacked=aN(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:s}=this,{iScale:o,_stacked:l}=r,w=o.axis;let k,O,L,E=0===t&&n===s.length||r._sorted,D=t>0&&r._parsed[t-1];if(!1===this._parsing)r._parsed=s,r._sorted=!0,L=s;else{L=es(s[t])?this.parseArrayData(r,s,t,n):Xn(s[t])?this.parseObjectData(r,s,t,n):this.parsePrimitiveData(r,s,t,n);const U=()=>null===O[w]||D&&O[w]e&&!i.hidden&&i._stacked&&{keys:sq(this.chart,!0),values:null})(n,r),D={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:k,max:O}=function n5t(e){const{min:i,max:t,minDefined:n,maxDefined:r}=e.getUserBounds();return{min:n?i:Number.NEGATIVE_INFINITY,max:r?t:Number.POSITIVE_INFINITY}}(w);let L,U;function j(){U=s[L];const W=U[w.axis];return!_s(U[t.axis])||k>W||O=0;--L)if(!j()){this.updateRangeFromParsed(D,t,U,E);break}return D}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let s,o,l;for(s=0,o=n.length;s=0&&tthis.getContext(r,s,n),O);return W.$shared&&(W.$shared=E,o[l]=Object.freeze(cq(W,E))),W}_resolveAnimations(t,n,r){const s=this.chart,o=this._cachedDataOpts,l=`animation-${n}`,w=o[l];if(w)return w;let E;if(!1!==s.options.animation){const k=this.chart.config,O=k.datasetAnimationScopeKeys(this._type,n),L=k.getOptionScopes(this.getDataset(),O);E=k.createResolver(L,this.getContext(t,r,n))}const D=new nq(s,E&&E.animations);return E&&E._cacheable&&(o[l]=Object.freeze(D)),D}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||lN(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),s=this._sharedOptions,o=this.getSharedOptions(r),l=this.includeOptions(n,o)||o!==s;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:l}}updateElement(t,n,r,s){lN(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!lN(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,s){t.active=s;const o=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[w,E,D]of this._syncList)this[w](E,D);this._syncList=[];const s=r.length,o=n.length,l=Math.min(o,s);l&&this.parse(0,l),o>s?this._insertElements(s,o-s,t):o{for(D.length+=n,w=D.length-1;w>=l;w--)D[w]=D[w-n]};for(E(o),w=t;wr-s))}return e._cache.$bar}(i,e.type);let r,s,o,l,n=i._length;const w=()=>{32767===o||-32768===o||(u1(l)&&(n=Math.min(n,Math.abs(o-l)||n)),l=o)};for(r=0,s=t.length;rMath.abs(l)&&(w=l,E=o),i[t.axis]=E,i._custom={barStart:w,barEnd:E,start:r,end:s,min:o,max:l}}(e,i,t,n):i[t.axis]=t.parse(e,n),i}function hq(e,i,t,n){const r=e.iScale,s=e.vScale,o=r.getLabels(),l=r===s,w=[];let E,D,k,O;for(E=t,D=t+n;Ee.x,t="left",n="right"):(i=e.baseclass e extends mf{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,s){return hq(t,n,r,s)}parseArrayData(t,n,r,s){return hq(t,n,r,s)}parseObjectData(t,n,r,s){const{iScale:o,vScale:l}=t,{xAxisKey:w="x",yAxisKey:E="y"}=this._parsing,D="x"===o.axis?w:E,k="x"===l.axis?w:E,O=[];let L,U,j,W;for(L=r,U=r+s;Lk.controller.options.grouped),o=r.options.stacked,l=[],w=this._cachedMeta.controller.getParsed(n),E=w&&w[r.axis],D=k=>{const O=k._parsed.find(U=>U[r.axis]===E),L=O&&O[k.vScale.axis];if(rr(L)||isNaN(L))return!0};for(const k of s)if((void 0===n||!D(k))&&((!1===o||-1===l.indexOf(k.stack)||void 0===o&&void 0===k.stack)&&l.push(k.stack),k.index===t))break;return l.length||l.push(void 0),l}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const s=this._getStacks(t,r),o=void 0!==n?s.indexOf(n):-1;return-1===o?s.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,s=[];let o,l;for(o=0,l=n.data.length;o=t?1:-1)}(W,n,w)*l,O===w&&(rt-=W/2);const st=n.getPixelForDecimal(0),yt=n.getPixelForDecimal(1),Tt=Math.min(st,yt),It=Math.max(st,yt);rt=Math.max(Math.min(rt,It),Tt),j=rt+W,r&&!k&&(E._stacks[n.axis]._visualValues[s]=n.getValueForPixel(j)-n.getValueForPixel(rt))}if(rt===n.getPixelForValue(w)){const st=Mu(W)*n.getLineWidthForValue(w)/2;rt+=st,W-=st}return{size:W,base:rt,head:j,center:j+W/2}}_calculateBarIndexPixels(t,n){const r=n.scale,s=this.options,o=s.skipNull,l=Sn(s.maxBarThickness,1/0);let w,E;if(n.grouped){const D=o?this._getStackCount(t):n.stackCount,k="flex"===s.barThickness?function h5t(e,i,t,n){const r=i.pixels,s=r[e];let o=e>0?r[e-1]:null,l=eclass e extends mf{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,s){const o=super.parsePrimitiveData(t,n,r,s);for(let l=0;l=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,l=this.getParsed(t),w=s.getLabelForValue(l.x),E=o.getLabelForValue(l.y),D=l._custom;return{label:r[t]||"",value:"("+w+", "+E+(D?", "+D:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,s){const o="reset"===s,{iScale:l,vScale:w}=this._cachedMeta,{sharedOptions:E,includeOptions:D}=this._getSharedOptions(n,s),k=l.axis,O=w.axis;for(let L=n;Lclass e extends mf{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=t.legend.options;return n.labels.map((o,l)=>{const E=t.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:E.backgroundColor,strokeStyle:E.borderColor,fontColor:s,lineWidth:E.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=r;else{let l,w,o=E=>+r[E];if(Xn(r[t])){const{key:E="value"}=this._parsing;o=D=>+hf(r[D],E)}for(l=t,w=t+n;l"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100:+e/i)(this.options.cutout,w),1),D=this._getRingWeight(this.index),{circumference:k,rotation:O}=this._getRotationExtents(),{ratioX:L,ratioY:U,offsetX:j,offsetY:W}=function b5t(e,i,t){let n=1,r=1,s=0,o=0;if(id1(st,l,w,!0)?1:Math.max(yt,yt*t,Tt,Tt*t),U=(st,yt,Tt)=>d1(st,l,w,!0)?-1:Math.min(yt,yt*t,Tt,Tt*t),j=L(0,E,k),W=L(Bs,D,O),Z=U(is,E,k),rt=U(is+Bs,D,O);n=(j-Z)/2,r=(W-rt)/2,s=-(j+Z)/2,o=-(W+rt)/2}return{ratioX:n,ratioY:r,offsetX:s,offsetY:o}}(O,k,E),st=Math.max(Math.min((r.width-l)/L,(r.height-l)/U)/2,0),yt=pJ(this.options.radius,st),It=(yt-Math.max(yt*E,0))/this._getVisibleDatasetWeightTotal();this.offsetX=j*yt,this.offsetY=W*yt,s.total=this.calculateTotal(),this.outerRadius=yt-It*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-It*D,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,s=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/ns)}updateElements(t,n,r,s){const o="reset"===s,l=this.chart,w=l.chartArea,k=(w.left+w.right)/2,O=(w.top+w.bottom)/2,L=o&&l.options.animation.animateScale,U=L?0:this.innerRadius,j=L?0:this.outerRadius,{sharedOptions:W,includeOptions:Z}=this._getSharedOptions(n,s);let st,rt=this._getRotation();for(st=0;st0&&!isNaN(t)?ns*(Math.abs(t)/n):0}getLabelAndValue(t){const r=this.chart,s=r.data.labels||[],o=p1(this._cachedMeta._parsed[t],r.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let s,o,l,w,E;if(!t)for(s=0,o=r.data.datasets.length;sclass e extends mf{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:s=[],_dataset:o}=n,l=this.chart._animationsDisabled;let{start:w,count:E}=DJ(n,s,l);this._drawStart=w,this._drawCount=E,MJ(n)&&(w=0,E=s.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=s;const D=this.resolveDatasetElementOptions(t);this.options.showLine||(D.borderWidth=0),D.segment=this.options.segment,this.updateElement(r,void 0,{animated:!l,options:D},t),this.updateElements(s,w,E,t)}updateElements(t,n,r,s){const o="reset"===s,{iScale:l,vScale:w,_stacked:E,_dataset:D}=this._cachedMeta,{sharedOptions:k,includeOptions:O}=this._getSharedOptions(n,s),L=l.axis,U=w.axis,{spanGaps:j,segment:W}=this.options,Z=T0(j)?j:Number.POSITIVE_INFINITY,rt=this.chart._animationsDisabled||o||"none"===s,st=n+r,yt=t.length;let Tt=n>0&&this.getParsed(n-1);for(let It=0;It=st){ht.skip=!0;continue}const mt=this.getParsed(It),wt=rr(mt[U]),Ct=ht[L]=l.getPixelForValue(mt[L],It),_t=ht[U]=o||wt?w.getBasePixel():w.getPixelForValue(E?this.applyStack(w,mt,E):mt[U],It);ht.skip=isNaN(Ct)||isNaN(_t)||wt,ht.stop=It>0&&Math.abs(mt[L]-Tt[L])>Z,W&&(ht.parsed=mt,ht.raw=D.data[It]),O&&(ht.options=k||this.resolveDataElementOptions(It,ft.active?"active":s)),rt||this.updateElement(ft,It,ht,s),Tt=mt}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return r;const o=s[0].size(this.resolveDataElementOptions(0)),l=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(r,o,l)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}})(),pq=(()=>class e extends mf{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=t.legend.options;return n.labels.map((o,l)=>{const E=t.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:E.backgroundColor,strokeStyle:E.borderColor,fontColor:s,lineWidth:E.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const r=this.chart,s=r.data.labels||[],o=p1(this._cachedMeta._parsed[t].r,r.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,n,r,s){return WJ.bind(this)(t,n,r,s)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach((r,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(s/2,0),w=(o-Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-w*this.index,this.innerRadius=this.outerRadius-w}updateElements(t,n,r,s){const o="reset"===s,l=this.chart,E=l.options.animation,D=this._cachedMeta.rScale,k=D.xCenter,O=D.yCenter,L=D.getIndexAngle(0)-.5*is;let j,U=L;const W=360/this.countVisibleElements();for(j=0;j{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Uc(this.resolveDataElementOptions(t,n).angle||r):0}})();var T5t=Object.freeze({__proto__:null,BarController:y5t,BubbleController:x5t,DoughnutController:uN,LineController:w5t,PieController:(()=>class e extends uN{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}})(),PolarAreaController:pq,RadarController:(()=>class e extends mf{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,s){return WJ.bind(this)(t,n,r,s)}update(t){const n=this._cachedMeta,r=n.dataset,s=n.data||[],o=n.iScale.getLabels();if(r.points=s,"resize"!==t){const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),this.updateElement(r,void 0,{_loop:!0,_fullLoop:o.length===s.length,options:l},t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,r,s){const o=this._cachedMeta.rScale,l="reset"===s;for(let w=n;wclass e extends mf{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,l=this.getParsed(t),w=s.getLabelForValue(l.x),E=o.getLabelForValue(l.y);return{label:r[t]||"",value:"("+w+", "+E+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=DJ(n,r,s);if(this._drawStart=o,this._drawCount=l,MJ(n)&&(o=0,l=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:w,_dataset:E}=n;w._chart=this.chart,w._datasetIndex=this.index,w._decimated=!!E._decimated,w.points=r;const D=this.resolveDatasetElementOptions(t);D.segment=this.options.segment,this.updateElement(w,void 0,{animated:!s,options:D},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,o,l,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,s){const o="reset"===s,{iScale:l,vScale:w,_stacked:E,_dataset:D}=this._cachedMeta,k=this.resolveDataElementOptions(n,s),O=this.getSharedOptions(k),L=this.includeOptions(s,O),U=l.axis,j=w.axis,{spanGaps:W,segment:Z}=this.options,rt=T0(W)?W:Number.POSITIVE_INFINITY,st=this.chart._animationsDisabled||o||"none"===s;let yt=n>0&&this.getParsed(n-1);for(let Tt=n;Tt0&&Math.abs(ft[U]-yt[U])>rt,Z&&(ht.parsed=ft,ht.raw=D.data[Tt]),L&&(ht.options=O||this.resolveDataElementOptions(Tt,It.active?"active":s)),st||this.updateElement(It,Tt,ht,s),yt=ft}this.updateSharedOptions(O,s,k)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let w=0;for(let E=n.length-1;E>=0;--E)w=Math.max(w,n[E].size(this.resolveDataElementOptions(E))/2);return w>0&&w}const r=t.dataset,s=r.options&&r.options.borderWidth||0;if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,l)/2}})()});function lm(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class hN{static override(i){Object.assign(hN.prototype,i)}options;constructor(i){this.options=i||{}}init(){}formats(){return lm()}parse(){return lm()}format(){return lm()}add(){return lm()}diff(){return lm()}startOf(){return lm()}endOf(){return lm()}}var C5t__date=hN;function S5t(e,i,t,n){const{controller:r,data:s,_sorted:o}=e,l=r._cachedMeta.iScale;if(l&&i===l.axis&&"r"!==i&&o&&s.length){const w=l._reversePixels?WBt:Vh;if(!n)return w(s,i,t);if(r._sharedOptions){const E=s[0],D="function"==typeof E.getRange&&E.getRange(i);if(D){const k=w(s,i,t-D),O=w(s,i,t+D);return{lo:k.lo,hi:O.hi}}}}return{lo:0,hi:s.length-1}}function x1(e,i,t,n,r){const s=e.getSortedVisibleDatasetMetas(),o=t[i];for(let l=0,w=s.length;l{w[o]&&w[o](i[t],r)&&(s.push({element:w,datasetIndex:E,index:D}),l=l||w.inRange(i.x,i.y,r))}),n&&!l?[]:s}var D5t={evaluateInteractionItems:x1,modes:{index(e,i,t,n){const r=am(i,e),s=t.axis||"x",o=t.includeInvisible||!1,l=t.intersect?dN(e,r,s,n,o):fN(e,r,s,!1,n,o),w=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(E=>{const D=l[0].index,k=E.data[D];k&&!k.skip&&w.push({element:k,datasetIndex:E.index,index:D})}),w):[]},dataset(e,i,t,n){const r=am(i,e),s=t.axis||"xy",o=t.includeInvisible||!1;let l=t.intersect?dN(e,r,s,n,o):fN(e,r,s,!1,n,o);if(l.length>0){const w=l[0].datasetIndex,E=e.getDatasetMeta(w).data;l=[];for(let D=0;DdN(e,am(i,e),t.axis||"xy",n,t.includeInvisible||!1),nearest:(e,i,t,n)=>fN(e,am(i,e),t.axis||"xy",t.intersect,n,t.includeInvisible||!1),x:(e,i,t,n)=>mq(e,am(i,e),"x",t.intersect,n),y:(e,i,t,n)=>mq(e,am(i,e),"y",t.intersect,n)}};const gq=["left","top","right","bottom"];function b1(e,i){return e.filter(t=>t.pos===i)}function vq(e,i){return e.filter(t=>-1===gq.indexOf(t.pos)&&t.box.axis===i)}function w1(e,i){return e.sort((t,n)=>{const r=i?n:t,s=i?t:n;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function yq(e,i,t,n){return Math.max(e[t],i[t])+Math.max(e[n],i[n])}function xq(e,i){e.top=Math.max(e.top,i.top),e.left=Math.max(e.left,i.left),e.bottom=Math.max(e.bottom,i.bottom),e.right=Math.max(e.right,i.right)}function k5t(e,i,t,n){const{pos:r,box:s}=t,o=e.maxPadding;if(!Xn(r)){t.size&&(e[r]-=t.size);const k=n[t.stack]||{size:0,count:1};k.size=Math.max(k.size,t.horizontal?s.height:s.width),t.size=k.size/k.count,e[r]+=t.size}s.getPadding&&xq(o,s.getPadding());const l=Math.max(0,i.outerWidth-yq(o,e,"left","right")),w=Math.max(0,i.outerHeight-yq(o,e,"top","bottom")),E=l!==e.w,D=w!==e.h;return e.w=l,e.h=w,t.horizontal?{same:E,other:D}:{same:D,other:E}}function O5t(e,i){const t=i.maxPadding;return function n(r){const s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(i[o],t[o])}),s}(e?["left","right"]:["top","bottom"])}function T1(e,i,t,n){const r=[];let s,o,l,w,E,D;for(s=0,o=e.length,E=0;sE.box.fullSize),!0),n=w1(b1(i,"left"),!0),r=w1(b1(i,"right")),s=w1(b1(i,"top"),!0),o=w1(b1(i,"bottom")),l=vq(i,"x"),w=vq(i,"y");return{fullSize:t,leftAndTop:n.concat(s),rightAndBottom:r.concat(w).concat(o).concat(l),chartArea:b1(i,"chartArea"),vertical:n.concat(r).concat(w),horizontal:s.concat(o).concat(l)}}(e.boxes),w=l.vertical,E=l.horizontal;_r(e.boxes,j=>{"function"==typeof j.beforeLayout&&j.beforeLayout()});const D=w.reduce((j,W)=>W.box.options&&!1===W.box.options.display?j:j+1,0)||1,k=Object.freeze({outerWidth:i,outerHeight:t,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/D,hBoxMaxHeight:o/2}),O=Object.assign({},r);xq(O,yo(n));const L=Object.assign({maxPadding:O,w:s,h:o,x:r.left,y:r.top},r),U=function R5t(e,i){const t=function I5t(e){const i={};for(const t of e){const{stack:n,pos:r,stackWeight:s}=t;if(!n||!gq.includes(r))continue;const o=i[n]||(i[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return i}(e),{vBoxMaxWidth:n,hBoxMaxHeight:r}=i;let s,o,l;for(s=0,o=e.length;s{const W=j.box;Object.assign(W,e.chartArea),W.update(L.w,L.h,{left:0,top:0,right:0,bottom:0})})}};class wq{acquireContext(i,t){}releaseContext(i){return!1}addEventListener(i,t,n){}removeEventListener(i,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,n,r){return t=Math.max(0,t||i.width),n=n||i.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(i){return!0}updateConfig(i){}}class L5t extends wq{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}}const rA="$chartjs",N5t={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Tq=e=>null===e||""===e,Cq=!!NVt&&{passive:!0};function U5t(e,i,t){e&&e.canvas&&e.canvas.removeEventListener(i,t,Cq)}function sA(e,i){for(const t of e)if(t===i||t.contains(i))return!0}function G5t(e,i,t){const n=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||sA(l.addedNodes,n),o=o&&!sA(l.removedNodes,n);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function H5t(e,i,t){const n=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||sA(l.removedNodes,n),o=o&&!sA(l.addedNodes,n);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}const C1=new Map;let Sq=0;function Eq(){const e=window.devicePixelRatio;e!==Sq&&(Sq=e,C1.forEach((i,t)=>{t.currentDevicePixelRatio!==e&&i()}))}function X5t(e,i,t){const n=e.canvas,r=n&&sN(n);if(!r)return;const s=AJ((l,w)=>{const E=r.clientWidth;t(l,w),E{const w=l[0],E=w.contentRect.width,D=w.contentRect.height;0===E&&0===D||s(E,D)});return o.observe(r),function W5t(e,i){C1.size||window.addEventListener("resize",Eq),C1.set(e,i)}(e,s),o}function pN(e,i,t){t&&t.disconnect(),"resize"===i&&function j5t(e){C1.delete(e),C1.size||window.removeEventListener("resize",Eq)}(e)}function Y5t(e,i,t){const n=e.canvas,r=AJ(s=>{null!==e.ctx&&t(function z5t(e,i){const t=N5t[e.type]||e.type,{x:n,y:r}=am(e,i);return{type:t,chart:i,native:e,x:void 0!==n?n:null,y:void 0!==r?r:null}}(s,e))},e);return function V5t(e,i,t){e&&e.addEventListener(i,t,Cq)}(n,i,r),r}class $5t extends wq{acquireContext(i,t){const n=i&&i.getContext&&i.getContext("2d");return n&&n.canvas===i?(function B5t(e,i){const t=e.style,n=e.getAttribute("height"),r=e.getAttribute("width");if(e[rA]={initial:{height:n,width:r,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Tq(r)){const s=YJ(e,"width");void 0!==s&&(e.width=s)}if(Tq(n))if(""===e.style.height)e.height=e.width/(i||2);else{const s=YJ(e,"height");void 0!==s&&(e.height=s)}}(i,t),n):null}releaseContext(i){const t=i.canvas;if(!t[rA])return!1;const n=t[rA].initial;["height","width"].forEach(s=>{const o=n[s];rr(o)?t.removeAttribute(s):t.setAttribute(s,o)});const r=n.style||{};return Object.keys(r).forEach(s=>{t.style[s]=r[s]}),t.width=t.width,delete t[rA],!0}addEventListener(i,t,n){this.removeEventListener(i,t),(i.$proxies||(i.$proxies={}))[t]=({attach:G5t,detach:H5t,resize:X5t}[t]||Y5t)(i,t,n)}removeEventListener(i,t){const n=i.$proxies||(i.$proxies={}),r=n[t];r&&(({attach:pN,detach:pN,resize:pN}[t]||U5t)(i,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,n,r){return function LVt(e,i,t,n){const r=eA(e),s=sm(r,"margin"),o=tA(r.maxWidth,e,"clientWidth")||Y_,l=tA(r.maxHeight,e,"clientHeight")||Y_,w=function OVt(e,i,t){let n,r;if(void 0===i||void 0===t){const s=e&&sN(e);if(s){const o=s.getBoundingClientRect(),l=eA(s),w=sm(l,"border","width"),E=sm(l,"padding");i=o.width-E.width-w.width,t=o.height-E.height-w.height,n=tA(l.maxWidth,s,"clientWidth"),r=tA(l.maxHeight,s,"clientHeight")}else i=e.clientWidth,t=e.clientHeight}return{width:i,height:t,maxWidth:n||Y_,maxHeight:r||Y_}}(e,i,t);let{width:E,height:D}=w;if("content-box"===r.boxSizing){const O=sm(r,"border","width"),L=sm(r,"padding");E-=L.width+O.width,D-=L.height+O.height}return E=Math.max(0,E-s.width),D=Math.max(0,n?E/n:D-s.height),E=iA(Math.min(E,o,w.maxWidth)),D=iA(Math.min(D,l,w.maxHeight)),E&&!D&&(D=iA(E/2)),(void 0!==i||void 0!==t)&&n&&w.height&&D>w.height&&(D=w.height,E=iA(Math.floor(D*n))),{width:E,height:D}}(i,t,n,r)}isAttached(i){const t=i&&sN(i);return!(!t||!t.isConnected)}}class Gh{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(i){const{x:t,y:n}=this.getProps(["x","y"],i);return{x:t,y:n}}hasValue(){return T0(this.x)&&T0(this.y)}getProps(i,t){const n=this.$animations;if(!t||!n)return this;const r={};return i.forEach(s=>{r[s]=n[s]&&n[s].active()?n[s]._to:this[s]}),r}}function aA(e,i,t,n,r){const s=Sn(n,0),o=Math.min(Sn(r,e.length),e.length);let w,E,D,l=0;for(t=Math.ceil(t),r&&(w=r-n,t=w/Math.floor(w/t)),D=s;D<0;)l++,D=Math.round(s+l*t);for(E=Math.max(s,0);E"top"===i||"left"===i?e[i]+t:e[i]-t,Aq=(e,i)=>Math.min(i||e,e);function Dq(e,i){const t=[],n=e.length/i,r=e.length;let s=0;for(;so+l)))return w}function S1(e){return e.drawTicks?e.tickLength:0}function Mq(e,i){if(!e.display)return 0;const t=ba(e.font,i),n=yo(e.padding);return(es(e.text)?e.text.length:1)*t.lineHeight+n.height}function o8t(e,i,t){let n=$L(e);return(t&&"right"!==i||!t&&"right"===i)&&(n=(e=>"left"===e?"right":"right"===e?"left":e)(n)),n}class cm extends Gh{constructor(i){super(),this.id=i.id,this.type=i.type,this.options=void 0,this.ctx=i.ctx,this.chart=i.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(i){this.options=i.setContext(this.getContext()),this.axis=i.axis,this._userMin=this.parse(i.min),this._userMax=this.parse(i.max),this._suggestedMin=this.parse(i.suggestedMin),this._suggestedMax=this.parse(i.suggestedMax)}parse(i,t){return i}getUserBounds(){let{_userMin:i,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return i=Nl(i,Number.POSITIVE_INFINITY),t=Nl(t,Number.NEGATIVE_INFINITY),n=Nl(n,Number.POSITIVE_INFINITY),r=Nl(r,Number.NEGATIVE_INFINITY),{min:Nl(i,n),max:Nl(t,r),minDefined:_s(i),maxDefined:_s(t)}}getMinMax(i){let o,{min:t,max:n,minDefined:r,maxDefined:s}=this.getUserBounds();if(r&&s)return{min:t,max:n};const l=this.getMatchingVisibleMetas();for(let w=0,E=l.length;wn?n:t,n=r&&t>n?t:n,{min:Nl(t,Nl(n,t)),max:Nl(n,Nl(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$r(this.options.beforeUpdate,[this])}update(i,t,n){const{beginAtZero:r,grace:s,ticks:o}=this.options,l=o.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function pVt(e,i,t){const{min:n,max:r}=e,s=pJ(i,(r-n)/2),o=(l,w)=>t&&0===l?0:l+w;return{min:o(n,-Math.abs(s)),max:o(r,s)}}(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const w=lr)return function t8t(e,i,t,n){let o,r=0,s=t[0];for(n=Math.ceil(n),o=0;or-s).pop(),i}(n);for(let o=0,l=s.length-1;or)return w}return Math.max(r,1)}(s,i,r);if(o>0){let k,O;const L=o>1?Math.round((w-l)/(o-1)):null;for(aA(i,E,D,rr(L)?0:l-L,l),k=0,O=o-1;k=s||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const D=this._getLabelSizes(),k=D.widest.width,O=D.highest.height,L=Fa(this.chart.width-k,0,this.maxWidth);l=i.offset?this.maxWidth/n:L/(n-1),k+6>l&&(l=L/(n-(i.offset?.5:1)),w=this.maxHeight-S1(i.grid)-t.padding-Mq(i.title,this.chart.options.font),E=Math.sqrt(k*k+O*O),o=jL(Math.min(Math.asin(Fa((D.highest.height+6)/l,-1,1)),Math.asin(Fa(w/E,-1,1))-Math.asin(Fa(O/E,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){$r(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$r(this.options.beforeFit,[this])}fit(){const i={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:s}}=this,o=this._isVisible(),l=this.isHorizontal();if(o){const w=Mq(r,t.options.font);if(l?(i.width=this.maxWidth,i.height=S1(s)+w):(i.height=this.maxHeight,i.width=S1(s)+w),n.display&&this.ticks.length){const{first:E,last:D,widest:k,highest:O}=this._getLabelSizes(),L=2*n.padding,U=Uc(this.labelRotation),j=Math.cos(U),W=Math.sin(U);l?i.height=Math.min(this.maxHeight,i.height+(n.mirror?0:W*k.width+j*O.height)+L):i.width=Math.min(this.maxWidth,i.width+(n.mirror?0:j*k.width+W*O.height)+L),this._calculatePadding(E,D,W,j)}}this._handleMargins(),l?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,t,n,r){const{ticks:{align:s,padding:o},position:l}=this.options,w=0!==this.labelRotation,E="top"!==l&&"x"===this.axis;if(this.isHorizontal()){const D=this.getPixelForTick(0)-this.left,k=this.right-this.getPixelForTick(this.ticks.length-1);let O=0,L=0;w?E?(O=r*i.width,L=n*t.height):(O=n*i.height,L=r*t.width):"start"===s?L=t.width:"end"===s?O=i.width:"inner"!==s&&(O=i.width/2,L=t.width/2),this.paddingLeft=Math.max((O-D+o)*this.width/(this.width-D),0),this.paddingRight=Math.max((L-k+o)*this.width/(this.width-k),0)}else{let D=t.height/2,k=i.height/2;"start"===s?(D=0,k=i.height):"end"===s&&(D=t.height,k=0),this.paddingTop=D+o,this.paddingBottom=k+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){$r(this.options.afterFit,[this])}isHorizontal(){const{axis:i,position:t}=this.options;return"top"===t||"bottom"===t||"x"===i}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(i),t=0,n=i.length;t{const n=t.gc,r=n.length/2;let s;if(r>i){for(s=0;s({width:o[mt]||0,height:l[mt]||0});return{first:ht(0),last:ht(t-1),widest:ht(It),highest:ht(ft),widths:o,heights:l}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){const t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);const t=this._startPixel+i*this._length;return function HBt(e){return Fa(e,-32768,32767)}(this._alignToPixels?im(this.chart,t,0):t)}getDecimalForPixel(i){const t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){const t=this.ticks||[];if(i>=0&&il*r?l/n:w/r:w*r0}_computeGridLineItems(i){const t=this.axis,n=this.chart,r=this.options,{grid:s,position:o,border:l}=r,w=s.offset,E=this.isHorizontal(),k=this.ticks.length+(w?1:0),O=S1(s),L=[],U=l.setContext(this.getContext()),j=U.display?U.width:0,W=j/2,Z=function(ve){return im(n,ve,j)};let rt,st,yt,Tt,It,ft,ht,mt,wt,Ct,_t,Dt;if("top"===o)rt=Z(this.bottom),ft=this.bottom-O,mt=rt-W,Ct=Z(i.top)+W,Dt=i.bottom;else if("bottom"===o)rt=Z(this.top),Ct=i.top,Dt=Z(i.bottom)-W,ft=rt+W,mt=this.top+O;else if("left"===o)rt=Z(this.right),It=this.right-O,ht=rt-W,wt=Z(i.left)+W,_t=i.right;else if("right"===o)rt=Z(this.left),wt=i.left,_t=Z(i.right)-W,It=rt+W,ht=this.left+O;else if("x"===t){if("center"===o)rt=Z((i.top+i.bottom)/2+.5);else if(Xn(o)){const ve=Object.keys(o)[0];rt=Z(this.chart.scales[ve].getPixelForValue(o[ve]))}Ct=i.top,Dt=i.bottom,ft=rt+W,mt=ft+O}else if("y"===t){if("center"===o)rt=Z((i.left+i.right)/2);else if(Xn(o)){const ve=Object.keys(o)[0];rt=Z(this.chart.scales[ve].getPixelForValue(o[ve]))}It=rt-W,ht=It-O,wt=i.left,_t=i.right}const Ue=Sn(r.ticks.maxTicksLimit,k),Te=Math.max(1,Math.ceil(k/Ue));for(st=0;st0&&(vi-=De/2)}Ii={left:vi,top:fi,width:De+ee.width,height:Ne+ee.height,color:Te.backdropColor}}W.push({label:yt,font:mt,textOffset:_t,options:{rotation:j,color:qt,strokeColor:_e,strokeWidth:ze,textAlign:Me,textBaseline:Dt,translation:[Tt,It],backdrop:Ii}})}return W}_getXAxisLabelAlignment(){const{position:i,ticks:t}=this.options;if(-Uc(this.labelRotation))return"top"===i?"left":"right";let r="center";return"start"===t.align?r="left":"end"===t.align?r="right":"inner"===t.align&&(r="inner"),r}_getYAxisLabelAlignment(i){const{position:t,ticks:{crossAlign:n,mirror:r,padding:s}}=this.options,l=i+s,w=this._getLabelSizes().widest.width;let E,D;return"left"===t?r?(D=this.right+s,"near"===n?E="left":"center"===n?(E="center",D+=w/2):(E="right",D+=w)):(D=this.right-l,"near"===n?E="right":"center"===n?(E="center",D-=w/2):(E="left",D=this.left)):"right"===t?r?(D=this.left+s,"near"===n?E="right":"center"===n?(E="center",D-=w/2):(E="left",D-=w)):(D=this.left+l,"near"===n?E="left":"center"===n?(E="center",D+=w/2):(E="right",D=this.right)):E="right",{textAlign:E,x:D}}_computeLabelArea(){if(this.options.ticks.mirror)return;const i=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:i.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:i.width}:void 0}drawBackground(){const{ctx:i,options:{backgroundColor:t},left:n,top:r,width:s,height:o}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(n,r,s,o),i.restore())}getLineWidthForValue(i){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const r=this.ticks.findIndex(s=>s.value===i);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(i){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i));let s,o;const l=(w,E,D)=>{!D.width||!D.color||(n.save(),n.lineWidth=D.width,n.strokeStyle=D.color,n.setLineDash(D.borderDash||[]),n.lineDashOffset=D.borderDashOffset,n.beginPath(),n.moveTo(w.x,w.y),n.lineTo(E.x,E.y),n.stroke(),n.restore())};if(t.display)for(s=0,o=r.length;s{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]:[{z:t,draw:s=>{this.draw(s)}}]}getMatchingVisibleMetas(i){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let s,o;for(s=0,o=t.length;s{const n=t.split("."),r=n.pop(),s=[e].concat(n).join("."),o=i[t].split("."),l=o.pop(),w=o.join(".");fs.route(s,r,w,l)})}(i,e.defaultRoutes),e.descriptors&&fs.describe(i,e.descriptors)}(i,o,n),this.override&&fs.override(i.id,i.overrides)),o}get(i){return this.items[i]}unregister(i){const t=this.items,n=i.id,r=this.scope;n in t&&delete t[n],r&&n in fs[r]&&(delete fs[r][n],this.override&&delete em[n])}}class d8t{constructor(){this.controllers=new oA(mf,"datasets",!0),this.elements=new oA(Gh,"elements"),this.plugins=new oA(Object,"plugins"),this.scales=new oA(cm,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,t,n){[...t].forEach(r=>{const s=n||this._getRegistryForType(r);n||s.isForType(r)||s===this.plugins&&r.id?this._exec(i,s,r):_r(r,o=>{const l=n||this._getRegistryForType(o);this._exec(i,l,o)})})}_exec(i,t,n){const r=WL(i);$r(n["before"+r],[],n),t[i](n),$r(n["after"+r],[],n)}_getRegistryForType(i){for(let t=0;ts.filter(l=>!o.some(w=>l.plugin.id===w.plugin.id));this._notify(r(t,n),i,"stop"),this._notify(r(n,t),i,"start")}}function m8t(e,i){return i||!1!==e?!0===e?{}:e:null}function v8t(e,{plugin:i,local:t},n,r){const s=e.pluginScopeKeys(i),o=e.getOptionScopes(n,s);return t&&i.defaults&&o.push(i.defaults),e.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function mN(e,i){return((i.datasets||{})[e]||{}).indexAxis||i.indexAxis||(fs.datasets[e]||{}).indexAxis||"x"}function Iq(e){if("x"===e||"y"===e||"r"===e)return e}function b8t(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function gN(e,...i){if(Iq(e))return e;for(const t of i){const n=t.axis||b8t(t.position)||e.length>1&&Iq(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Rq(e,i,t){if(t[i+"AxisID"]===e)return{axis:i}}function Pq(e){const i=e.options||(e.options={});i.plugins=Sn(i.plugins,{}),i.scales=function T8t(e,i){const t=em[e.type]||{scales:{}},n=i.scales||{},r=mN(e.type,i),s=Object.create(null);return Object.keys(n).forEach(o=>{const l=n[o];if(!Xn(l))return console.error(`Invalid scale configuration for scale: ${o}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const w=gN(o,l,function w8t(e,i){if(i.data&&i.data.datasets){const t=i.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(t.length)return Rq(e,"x",t[0])||Rq(e,"y",t[0])}return{}}(o,e),fs.scales[l.type]),E=function x8t(e,i){return e===i?"_index_":"_value_"}(w,r),D=t.scales||{};s[o]=c1(Object.create(null),[{axis:w},l,D[w],D[E]])}),e.data.datasets.forEach(o=>{const l=o.type||e.type,w=o.indexAxis||mN(l,i),D=(em[l]||{}).scales||{};Object.keys(D).forEach(k=>{const O=function y8t(e,i){let t=e;return"_index_"===e?t=i:"_value_"===e&&(t="x"===i?"y":"x"),t}(k,w),L=o[O+"AxisID"]||O;s[L]=s[L]||Object.create(null),c1(s[L],[{axis:O},n[L],D[k]])})}),Object.keys(s).forEach(o=>{const l=s[o];c1(l,[fs.scales[l.type],fs.scale])}),s}(e,i)}function kq(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const Fq=new Map,Oq=new Set;function lA(e,i){let t=Fq.get(e);return t||(t=i(),Fq.set(e,t),Oq.add(t)),t}const E1=(e,i,t)=>{const n=hf(i,t);void 0!==n&&e.add(n)};class S8t{constructor(i){this._config=function C8t(e){return(e=e||{}).data=kq(e.data),Pq(e),e}(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=kq(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){const i=this._config;this.clearCache(),Pq(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return lA(i,()=>[[`datasets.${i}`,""]])}datasetAnimationScopeKeys(i,t){return lA(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,""]])}datasetElementScopeKeys(i,t){return lA(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,""]])}pluginScopeKeys(i){const t=i.id;return lA(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){const n=this._scopeCache;let r=n.get(i);return(!r||t)&&(r=new Map,n.set(i,r)),r}getOptionScopes(i,t,n){const{options:r,type:s}=this,o=this._cachedScopes(i,n),l=o.get(t);if(l)return l;const w=new Set;t.forEach(D=>{i&&(w.add(i),D.forEach(k=>E1(w,i,k))),D.forEach(k=>E1(w,r,k)),D.forEach(k=>E1(w,em[s]||{},k)),D.forEach(k=>E1(w,fs,k)),D.forEach(k=>E1(w,ZL,k))});const E=Array.from(w);return 0===E.length&&E.push(Object.create(null)),Oq.has(t)&&o.set(t,E),E}chartOptionScopes(){const{options:i,type:t}=this;return[i,em[t]||{},fs.datasets[t]||{},{type:t},fs,ZL]}resolveNamedOptions(i,t,n,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:l}=Lq(this._resolverCache,i,r);let w=o;(function _8t(e,i){const{isScriptable:t,isIndexable:n}=BJ(e);for(const r of i){const s=t(r),o=n(r),l=(o||s)&&e[r];if(s&&(df(l)||E8t(l))||o&&es(l))return!0}return!1})(o,t)&&(s.$shared=!1,w=C0(o,n=df(n)?n():n,this.createResolver(i,n,l)));for(const E of t)s[E]=w[E];return s}createResolver(i,t,n=[""],r){const{resolver:s}=Lq(this._resolverCache,i,n);return Xn(t)?C0(s,t,void 0,r):s}}function Lq(e,i,t){let n=e.get(i);n||(n=new Map,e.set(i,n));const r=t.join();let s=n.get(r);return s||(s={resolver:eN(i,t),subPrefixes:t.filter(l=>!l.toLowerCase().includes("hover"))},n.set(r,s)),s}const E8t=e=>Xn(e)&&Object.getOwnPropertyNames(e).some(i=>df(e[i])),D8t=["top","bottom","left","right","chartArea"];function Nq(e,i){return"top"===e||"bottom"===e||-1===D8t.indexOf(e)&&"x"===i}function Bq(e,i){return function(t,n){return t[e]===n[e]?t[i]-n[i]:t[e]-n[e]}}function Vq(e){const i=e.chart,t=i.options.animation;i.notifyPlugins("afterRender"),$r(t&&t.onComplete,[e],i)}function M8t(e){const i=e.chart,t=i.options.animation;$r(t&&t.onProgress,[e],i)}function Uq(e){return rN()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const cA={},zq=e=>{const i=Uq(e);return Object.values(cA).filter(t=>t.canvas===i).pop()};function I8t(e,i,t){const n=Object.keys(e);for(const r of n){const s=+r;if(s>=i){const o=e[r];delete e[r],(t>0||s>i)&&(e[s+t]=o)}}}function uA(e,i,t){return e.options.clip?e[t]:i[t]}let vN=(()=>class e{static defaults=fs;static instances=cA;static overrides=em;static registry=Iu;static version="4.4.7";static getChart=zq;static register(...t){Iu.add(...t),Gq()}static unregister(...t){Iu.remove(...t),Gq()}constructor(t,n){const r=this.config=new S8t(n),s=Uq(t),o=zq(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const l=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||function Q5t(e){return!rN()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?L5t:$5t}(s)),this.platform.updateConfig(r);const w=this.platform.acquireContext(s,l.aspectRatio),E=w&&w.canvas,D=E&&E.height,k=E&&E.width;this.id=RBt(),this.ctx=w,this.canvas=E,this.width=k,this.height=D,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new f8t,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function YBt(e,i){let t;return function(...n){return i?(clearTimeout(t),t=setTimeout(e,i,n)):e.apply(this,n),i}}(O=>this.update(O),l.resizeDelay||0),this._dataChanges=[],cA[this.id]=this,w&&E?(zh.listen(this,"complete",Vq),zh.listen(this,"progress",M8t),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:s,_aspectRatio:o}=this;return rr(t)?n&&o?o:s?r/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Iu}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():XJ(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return OJ(this.canvas,this.ctx),this}stop(){return zh.stop(this),this}resize(t,n){zh.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,l=this.platform.getMaximumSize(this.canvas,t,n,r.maintainAspectRatio&&this.aspectRatio),w=r.devicePixelRatio||this.platform.getDevicePixelRatio(),E=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,XJ(this,w,!0)&&(this.notifyPlugins("resize",{size:l}),$r(r.onResize,[this,l],this),this.attached&&this._doResize(E)&&this.render())}ensureScalesHaveIDs(){_r(this.options.scales||{},(r,s)=>{r.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,s=Object.keys(r).reduce((l,w)=>(l[w]=!1,l),{});let o=[];n&&(o=o.concat(Object.keys(n).map(l=>{const w=n[l],E=gN(l,w),D="r"===E,k="x"===E;return{options:w,dposition:D?"chartArea":k?"bottom":"left",dtype:D?"radialLinear":k?"category":"linear"}}))),_r(o,l=>{const w=l.options,E=w.id,D=gN(E,w),k=Sn(w.type,l.dtype);(void 0===w.position||Nq(w.position,D)!==Nq(l.dposition))&&(w.position=l.dposition),s[E]=!0;let O=null;E in r&&r[E].type===k?O=r[E]:(O=new(Iu.getScale(k))({id:E,type:k,ctx:this.ctx,chart:this}),r[O.id]=O),O.init(w,t)}),_r(s,(l,w)=>{l||delete r[w]}),_r(r,l=>{xo.configure(this,l,l.options),xo.addBox(this,l)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((s,o)=>s.index-o.index),r>n){for(let s=n;sn.length&&delete this._stacks,t.forEach((r,s)=>{0===n.filter(o=>o===r._dataset).length&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let D=0,k=this.data.datasets.length;D{D.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Bq("z","_idx"));const{_active:w,_lastEvent:E}=this;E?this._eventHandler(E,!0):w.length&&this._updateHoverStyles(w,w,!0),this.render()}_updateScales(){_r(this.scales,t=>{xo.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!vJ(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:o}of n)I8t(t,s,"_removeElements"===r?-o:o)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(l=>l[0]===o).map((l,w)=>w+","+l.splice(1).join(","))),s=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;xo.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],_r(this.boxes,s=>{r&&"chartArea"===s.position||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,s=!r.disabled,o=function P8t(e,i){const{xScale:t,yScale:n}=e;return t&&n?{left:uA(t,i,"left"),right:uA(t,i,"right"),top:uA(n,i,"top"),bottom:uA(n,i,"bottom")}:i}(t,this.chartArea),l={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",l)&&(s&&Z_(n,{left:!1===r.left?0:o.left-r.left,right:!1===r.right?this.width:o.right+r.right,top:!1===r.top?0:o.top-r.top,bottom:!1===r.bottom?this.height:o.bottom+r.bottom}),t.controller.draw(),s&&J_(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(t){return Uh(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const o=D5t.modes[n];return"function"==typeof o?o(this,t,r,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let s=r.filter(o=>o&&o._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=pf(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return"boolean"==typeof r.hidden?!r.hidden:!n.hidden}setDatasetVisibility(t,n){this.getDatasetMeta(t).hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const s=r?"show":"hide",o=this.getDatasetMeta(t),l=o.controller._resolveAnimations(void 0,s);u1(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),l.update(o,{visible:r}),this.update(w=>w.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),zh.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,l),t[o]=l},s=(o,l,w)=>{o.offsetX=l,o.offsetY=w,this._eventHandler(o)};_r(this.options.events,o=>r(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(E,D)=>{n.addEventListener(this,E,D),t[E]=D},s=(E,D)=>{t[E]&&(n.removeEventListener(this,E,D),delete t[E])},o=(E,D)=>{this.canvas&&this.resize(E,D)};let l;const w=()=>{s("attach",w),this.attached=!0,this.resize(),r("resize",o),r("detach",l)};l=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),r("attach",w)},n.isAttached(this.canvas)?w():l()}unbindEvents(){_r(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},_r(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const s=r?"set":"remove";let o,l,w,E;for("dataset"===n&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),w=0,E=t.length;w{const w=this.getDatasetMeta(o);if(!w)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:w.data[l],index:l}});!j_(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return 1===this._plugins._cache.filter(n=>n.plugin.id===t).length}_updateHoverStyles(t,n,r){const s=this.options.hover,o=(E,D)=>E.filter(k=>!D.some(O=>k.datasetIndex===O.datasetIndex&&k.index===O.index)),l=o(n,t),w=r?t:o(t,n);l.length&&this.updateHoverStyle(l,s.mode,!1),w.length&&s.mode&&this.updateHoverStyle(w,s.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=l=>(l.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",r,s))return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:s=[],options:o}=this,w=this._getActiveElements(t,s,r,n),E=function NBt(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(t),D=function R8t(e,i,t,n){return t&&"mouseout"!==e.type?n?i:e:null}(t,this._lastEvent,r,E);r&&(this._lastEvent=null,$r(o.onHover,[t,w,this],this),E&&$r(o.onClick,[t,w,this],this));const k=!j_(w,s);return(k||n)&&(this._active=w,this._updateHoverStyles(w,s,n)),this._lastEvent=D,k}_getActiveElements(t,n,r,s){if("mouseout"===t.type)return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}})();function Gq(){return _r(vN.instances,e=>e._plugins.invalidate())}function _0(e,i,t,n){return{x:t+e*Math.cos(i),y:n+e*Math.sin(i)}}function hA(e,i,t,n,r,s){const{x:o,y:l,startAngle:w,pixelMargin:E,innerRadius:D}=i,k=Math.max(i.outerRadius+n+t-E,0),O=D>0?D+n+t+E:0;let L=0;const U=r-w;if(n){const qt=((D>0?D-n:0)+(k>0?k-n:0))/2;L=(U-(0!==qt?U*qt/(qt+n):U))/2}const W=(U-Math.max(.001,U*k-t/is)/k)/2,Z=w+W+L,rt=r-W-L,{outerStart:st,outerEnd:yt,innerStart:Tt,innerEnd:It}=function O8t(e,i,t,n){const r=function F8t(e){return tN(e,["outerStart","outerEnd","innerStart","innerEnd"])}(e.options.borderRadius),s=(t-i)/2,o=Math.min(s,n*i/2),l=w=>{const E=(t-Math.min(s,w))*n/2;return Fa(w,0,Math.min(s,E))};return{outerStart:l(r.outerStart),outerEnd:l(r.outerEnd),innerStart:Fa(r.innerStart,0,o),innerEnd:Fa(r.innerEnd,0,o)}}(i,O,k,rt-Z),ft=k-st,ht=k-yt,mt=Z+st/ft,wt=rt-yt/ht,Ct=O+Tt,_t=O+It,Dt=Z+Tt/Ct,Ue=rt-It/_t;if(e.beginPath(),s){const Te=(mt+wt)/2;if(e.arc(o,l,k,mt,Te),e.arc(o,l,k,Te,wt),yt>0){const ze=_0(ht,wt,o,l);e.arc(ze.x,ze.y,yt,wt,rt+Bs)}const ve=_0(_t,rt,o,l);if(e.lineTo(ve.x,ve.y),It>0){const ze=_0(_t,Ue,o,l);e.arc(ze.x,ze.y,It,rt+Bs,Ue+Math.PI)}const qt=(rt-It/O+(Z+Tt/O))/2;if(e.arc(o,l,O,rt-It/O,qt,!0),e.arc(o,l,O,qt,Z+Tt/O,!0),Tt>0){const ze=_0(Ct,Dt,o,l);e.arc(ze.x,ze.y,Tt,Dt+Math.PI,Z-Bs)}const _e=_0(ft,Z,o,l);if(e.lineTo(_e.x,_e.y),st>0){const ze=_0(ft,mt,o,l);e.arc(ze.x,ze.y,st,Z-Bs,mt)}}else{e.moveTo(o,l);const Te=Math.cos(mt)*k+o,ve=Math.sin(mt)*k+l;e.lineTo(Te,ve);const qt=Math.cos(wt)*k+o,_e=Math.sin(wt)*k+l;e.lineTo(qt,_e)}e.closePath()}function Hq(e,i,t=i){e.lineCap=Sn(t.borderCapStyle,i.borderCapStyle),e.setLineDash(Sn(t.borderDash,i.borderDash)),e.lineDashOffset=Sn(t.borderDashOffset,i.borderDashOffset),e.lineJoin=Sn(t.borderJoinStyle,i.borderJoinStyle),e.lineWidth=Sn(t.borderWidth,i.borderWidth),e.strokeStyle=Sn(t.borderColor,i.borderColor)}function V8t(e,i,t){e.lineTo(t.x,t.y)}function Wq(e,i,t={}){const n=e.length,{start:r=0,end:s=n-1}=t,{start:o,end:l}=i,w=Math.max(r,o),E=Math.min(s,l);return{count:n,start:w,loop:i.loop,ilen:El&&s>l)?n+E-w:E-w}}function z8t(e,i,t,n){const{points:r,options:s}=i,{count:o,start:l,loop:w,ilen:E}=Wq(r,t,n),D=function U8t(e){return e.stepped?sVt:e.tension||"monotone"===e.cubicInterpolationMode?aVt:V8t}(s);let L,U,j,{move:k=!0,reverse:O}=n||{};for(L=0;L<=E;++L)U=r[(l+(O?E-L:L))%o],!U.skip&&(k?(e.moveTo(U.x,U.y),k=!1):D(e,j,U,O,s.stepped),j=U);return w&&(U=r[(l+(O?E:0))%o],D(e,j,U,O,s.stepped)),!!w}function G8t(e,i,t,n){const r=i.points,{count:s,start:o,ilen:l}=Wq(r,t,n),{move:w=!0,reverse:E}=n||{};let O,L,U,j,W,Z,D=0,k=0;const rt=yt=>(o+(E?l-yt:yt))%s,st=()=>{j!==W&&(e.lineTo(D,W),e.lineTo(D,j),e.lineTo(D,Z))};for(w&&(L=r[rt(0)],e.moveTo(L.x,L.y)),O=0;O<=l;++O){if(L=r[rt(O)],L.skip)continue;const yt=L.x,Tt=L.y,It=0|yt;It===U?(TtW&&(W=Tt),D=(k*D+yt)/++k):(st(),e.lineTo(yt,Tt),U=It,k=0,j=W=Tt),Z=Tt}st()}function yN(e){const i=e.options;return e._decimated||e._loop||i.tension||"monotone"===i.cubicInterpolationMode||i.stepped||i.borderDash&&i.borderDash.length?z8t:G8t}const X8t="function"==typeof Path2D;let dA=(()=>class e extends Gh{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;!r.tension&&"monotone"!==r.cubicInterpolationMode||r.stepped||this._pointsUpdated||(IVt(this._points,r,t,r.spanGaps?this._loop:this._fullLoop,n),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function jVt(e,i){const t=e.points,n=e.options.spanGaps,r=t.length;if(!r)return[];const s=!!e._loop,{start:o,end:l}=function HVt(e,i,t,n){let r=0,s=i-1;if(t&&!n)for(;rr&&e[s%i].skip;)s--;return s%=i,{start:r,end:s}}(t,r,s,n);return function tq(e,i,t,n){return n&&n.setContext&&t?function XVt(e,i,t,n){const r=e._chart.getContext(),s=eq(e.options),{_datasetIndex:o,options:{spanGaps:l}}=e,w=t.length,E=[];let D=s,k=i[0].start,O=k;function L(U,j,W,Z){const rt=l?-1:1;if(U!==j){for(U+=w;t[U%w].skip;)U-=rt;for(;t[j%w].skip;)j+=rt;U%w!=j%w&&(E.push({start:U%w,end:j%w,loop:W,style:Z}),D=Z,k=j%w)}}for(const U of i){k=l?k:U.start;let W,j=t[k%w];for(O=k+1;O<=U.end;O++){const Z=t[O%w];W=eq(n.setContext(pf(r,{type:"segment",p0:j,p1:Z,p0DataIndex:(O-1)%w,p1DataIndex:O%w,datasetIndex:o}))),YVt(W,D)&&L(k,O-1,U.loop,D),j=Z,D=W}kclass e extends Gh{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const s=this.options,{x:o,y:l}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-l,2)"borderDash"!==i};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,i&&Object.assign(this,i)}inRange(i,t,n){const r=this.getProps(["x","y"],n),{angle:s,distance:o}=TJ(r,{x:i,y:t}),{startAngle:l,endAngle:w,innerRadius:E,outerRadius:D,circumference:k}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),O=(this.options.spacing+this.options.borderWidth)/2,L=Sn(k,w-l),U=d1(s,l,w)&&l!==w,j=L>=ns||U,W=Bh(o,E+O,D+O);return j&&W}getCenterPoint(i){const{x:t,y:n,startAngle:r,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:w,spacing:E}=this.options,D=(r+s)/2,k=(o+l+E+w)/2;return{x:t+Math.cos(D)*k,y:n+Math.sin(D)*k}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){const{options:t,circumference:n}=this,r=(t.offset||0)/4,s=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>ns?Math.floor(n/ns):0,0===n||this.innerRadius<0||this.outerRadius<0)return;i.save();const l=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(l)*r,Math.sin(l)*r);const E=r*(1-Math.sin(Math.min(is,n||0)));i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,function L8t(e,i,t,n,r){const{fullCircles:s,startAngle:o,circumference:l}=i;let w=i.endAngle;if(s){hA(e,i,t,n,w,r);for(let E=0;Er?(E=r/w,e.arc(s,o,w,t+E,n-E,!0)):e.arc(s,o,r,t+Bs,n-Bs),e.closePath(),e.clip()}(e,i,U),s||(hA(e,i,t,n,U,r),e.stroke())}(i,this,E,s,o),i.restore()}},BarElement:class t9t extends Gh{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(i){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,i&&Object.assign(this,i)}draw(i){const{inflateAmount:t,options:{borderColor:n,backgroundColor:r}}=this,{inner:s,outer:o}=function Z8t(e){const i=Xq(e),t=i.right-i.left,n=i.bottom-i.top,r=function Q8t(e,i,t){const r=e.borderSkipped,s=NJ(e.options.borderWidth);return{t:gf(r.top,s.top,0,t),r:gf(r.right,s.right,0,i),b:gf(r.bottom,s.bottom,0,t),l:gf(r.left,s.left,0,i)}}(e,t/2,n/2),s=function K8t(e,i,t){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,s=rm(r),o=Math.min(i,t),l=e.borderSkipped,w=n||Xn(r);return{topLeft:gf(!w||l.top||l.left,s.topLeft,0,o),topRight:gf(!w||l.top||l.right,s.topRight,0,o),bottomLeft:gf(!w||l.bottom||l.left,s.bottomLeft,0,o),bottomRight:gf(!w||l.bottom||l.right,s.bottomRight,0,o)}}(e,t/2,n/2);return{outer:{x:i.left,y:i.top,w:t,h:n,radius:s},inner:{x:i.left+r.l,y:i.top+r.t,w:t-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,s.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(r.b,r.r))}}}}(this),l=function J8t(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}(o.radius)?g1:q8t;i.save(),(o.w!==s.w||o.h!==s.h)&&(i.beginPath(),l(i,bN(o,t,s)),i.clip(),l(i,bN(s,-t,o)),i.fillStyle=n,i.fill("evenodd")),i.beginPath(),l(i,bN(s,t)),i.fillStyle=r,i.fill(),i.restore()}inRange(i,t,n){return xN(this,i,t,n)}inXRange(i,t){return xN(this,i,null,t)}inYRange(i,t){return xN(this,null,i,t)}getCenterPoint(i){const{x:t,y:n,base:r,horizontal:s}=this.getProps(["x","y","base","horizontal"],i);return{x:s?(t+r)/2:t,y:s?n:(n+r)/2}}getRange(i){return"x"===i?this.width/2:this.height/2}},LineElement:dA,PointElement:$8t});const wN=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Yq=wN.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function $q(e){return wN[e%wN.length]}function Qq(e){return Yq[e%Yq.length]}function Kq(e){let i;for(i in e)if(e[i].borderColor||e[i].backgroundColor)return!0;return!1}var l9t={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,i,t){if(!t.enabled)return;const{data:{datasets:n},options:r}=e.config,{elements:s}=r,o=Kq(n)||function a9t(e){return e&&(e.borderColor||e.backgroundColor)}(r)||s&&Kq(s)||function o9t(){return"rgba(0,0,0,0.1)"!==fs.borderColor||"rgba(0,0,0,0.1)"!==fs.backgroundColor}();if(!t.forceOverride&&o)return;const l=function s9t(e){let i=0;return(t,n)=>{const r=e.getDatasetMeta(n).controller;r instanceof uN?i=function n9t(e,i){return e.backgroundColor=e.data.map(()=>$q(i++)),i}(t,i):r instanceof pq?i=function r9t(e,i){return e.backgroundColor=e.data.map(()=>Qq(i++)),i}(t,i):r&&(i=function i9t(e,i){return e.borderColor=$q(i),e.backgroundColor=Qq(i),++i}(t,i))}}(e);n.forEach(l)}};function Zq(e){if(e._decimated){const i=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function Jq(e){e.data.datasets.forEach(i=>{Zq(i)})}var d9t={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,i,t)=>{if(!t.enabled)return void Jq(e);const n=e.width;e.data.datasets.forEach((r,s)=>{const{_data:o,indexAxis:l}=r,w=e.getDatasetMeta(s),E=o||r.data;if("y"===v1([l,e.options.indexAxis])||!w.controller.supportsDecimation)return;const D=e.scales[w.xAxisID];if("linear"!==D.type&&"time"!==D.type||e.options.parsing)return;let U,{start:k,count:O}=function h9t(e,i){const t=i.length;let r,n=0;const{iScale:s}=e,{min:o,max:l,minDefined:w,maxDefined:E}=s.getUserBounds();return w&&(n=Fa(Vh(i,s.axis,o).lo,0,t-1)),r=E?Fa(Vh(i,s.axis,l).hi+1,n,t)-n:t-n,{start:n,count:r}}(w,E);if(O<=(t.threshold||4*n))Zq(r);else{switch(rr(o)&&(r._data=E,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(j){this._data=j}})),t.algorithm){case"lttb":U=function c9t(e,i,t,n,r){const s=r.samples||n;if(s>=t)return e.slice(i,i+t);const o=[],l=(t-2)/(s-2);let w=0;const E=i+t-1;let k,O,L,U,j,D=i;for(o[w++]=e[D],k=0;kL&&(L=U,O=e[rt],j=rt);o[w++]=O,D=j}return o[w++]=e[E],o}(E,k,O,n,t);break;case"min-max":U=function u9t(e,i,t,n){let o,l,w,E,D,k,O,L,U,j,r=0,s=0;const W=[],rt=e[i].x,yt=e[i+t-1].x-rt;for(o=i;oj&&(j=E,O=o),r=(s*r+l.x)/++s;else{const It=o-1;if(!rr(k)&&!rr(O)){const ft=Math.min(k,O),ht=Math.max(k,O);ft!==L&&ft!==It&&W.push({...e[ft],x:r}),ht!==L&&ht!==It&&W.push({...e[ht],x:r})}o>0&&It!==L&&W.push(e[It]),W.push(l),D=Tt,s=0,U=j=E,k=O=L=o}}return W}(E,k,O,n);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}r._decimated=U}})},destroy(e){Jq(e)}};function TN(e,i,t,n){if(n)return;let r=i[e],s=t[e];return"angle"===e&&(r=Bl(r),s=Bl(s)),{property:e,start:r,end:s}}function CN(e,i,t){for(;i>e;i--){const n=t[i];if(!isNaN(n.x)&&!isNaN(n.y))break}return i}function qq(e,i,t,n){return e&&i?n(e[t],i[t]):e?e[t]:i?i[t]:0}function ttt(e,i){let t=[],n=!1;return es(e)?(n=!0,t=e):t=function p9t(e,i){const{x:t=null,y:n=null}=e||{},r=i.points,s=[];return i.segments.forEach(({start:o,end:l})=>{l=CN(o,l,r);const w=r[o],E=r[l];null!==n?(s.push({x:w.x,y:n}),s.push({x:E.x,y:n})):null!==t&&(s.push({x:t,y:w.y}),s.push({x:t,y:E.y}))}),s}(e,i),t.length?new dA({points:t,options:{tension:0},_loop:n,_fullLoop:n}):null}function ett(e){return e&&!1!==e.fill}function m9t(e,i,t){let r=e[i].fill;const s=[i];let o;if(!t)return r;for(;!1!==r&&-1===s.indexOf(r);){if(!_s(r))return r;if(o=e[r],!o)return!1;if(o.visible)return r;s.push(r),r=o.fill}return!1}function g9t(e,i,t){const n=function b9t(e){const i=e.options,t=i.fill;let n=Sn(t&&t.target,t);return void 0===n&&(n=!!i.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(e);if(Xn(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return _s(r)&&Math.floor(r)===r?function v9t(e,i,t,n){return("-"===e||"+"===e)&&(t=i+t),!(t===i||t<0||t>=n)&&t}(n[0],i,r,t):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function C9t(e,i,t){const n=[];for(let r=0;r=0;--o){const l=r[o].$filler;l&&(l.line.updateControlPoints(s,l.axis),n&&l.fill&&SN(e.ctx,l,s))}},beforeDatasetsDraw(e,i,t){if("beforeDatasetsDraw"!==t.drawTime)return;const n=e.getSortedVisibleDatasetMetas();for(let r=n.length-1;r>=0;--r){const s=n[r].$filler;ett(s)&&SN(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,i,t){const n=i.meta.$filler;!ett(n)||"beforeDatasetDraw"!==t.drawTime||SN(e.ctx,n,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const att=(e,i)=>{let{boxHeight:t=i,boxWidth:n=i}=e;return e.usePointStyle&&(t=Math.min(t,i),n=e.pointStyleWidth||Math.min(n,i)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(i,t)}};class ott extends Gh{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t,n){this.maxWidth=i,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const i=this.options.labels||{};let t=$r(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(n=>i.filter(n,this.chart.data))),i.sort&&(t=t.sort((n,r)=>i.sort(n,r,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:i,ctx:t}=this;if(!i.display)return void(this.width=this.height=0);const n=i.labels,r=ba(n.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:l,itemHeight:w}=att(n,s);let E,D;t.font=r.string,this.isHorizontal()?(E=this.maxWidth,D=this._fitRows(o,s,l,w)+10):(D=this.maxHeight,E=this._fitCols(o,r,l,w)+10),this.width=Math.min(E,i.maxWidth||this.maxWidth),this.height=Math.min(D,i.maxHeight||this.maxHeight)}_fitRows(i,t,n,r){const{ctx:s,maxWidth:o,options:{labels:{padding:l}}}=this,w=this.legendHitBoxes=[],E=this.lineWidths=[0],D=r+l;let k=i;s.textAlign="left",s.textBaseline="middle";let O=-1,L=-D;return this.legendItems.forEach((U,j)=>{const W=n+t/2+s.measureText(U.text).width;(0===j||E[E.length-1]+W+2*l>o)&&(k+=D,E[E.length-(j>0?0:1)]=0,L+=D,O++),w[j]={left:0,top:L,row:O,width:W,height:r},E[E.length-1]+=W+l}),k}_fitCols(i,t,n,r){const{ctx:s,maxHeight:o,options:{labels:{padding:l}}}=this,w=this.legendHitBoxes=[],E=this.columnSizes=[],D=o-i;let k=l,O=0,L=0,U=0,j=0;return this.legendItems.forEach((W,Z)=>{const{itemWidth:rt,itemHeight:st}=function F9t(e,i,t,n,r){const s=function O9t(e,i,t,n){let r=e.text;return r&&"string"!=typeof r&&(r=r.reduce((s,o)=>s.length>o.length?s:o)),i+t.size/2+n.measureText(r).width}(n,e,i,t),o=function L9t(e,i,t){let n=e;return"string"!=typeof i.text&&(n=ltt(i,t)),n}(r,n,i.lineHeight);return{itemWidth:s,itemHeight:o}}(n,t,s,W,r);Z>0&&L+st+2*l>D&&(k+=O+l,E.push({width:O,height:L}),U+=O+l,j++,O=L=0),w[Z]={left:U,top:L,col:j,width:rt,height:st},O=Math.max(O,rt),L+=st+l}),k+=O,E.push({width:O,height:L}),k}adjustHitBoxes(){if(!this.options.display)return;const i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:s}}=this,o=E0(s,this.left,this.width);if(this.isHorizontal()){let l=0,w=vo(n,this.left+r,this.right-this.lineWidths[l]);for(const E of t)l!==E.row&&(l=E.row,w=vo(n,this.left+r,this.right-this.lineWidths[l])),E.top+=this.top+i+r,E.left=o.leftForLtr(o.x(w),E.width),w+=E.width+r}else{let l=0,w=vo(n,this.top+i+r,this.bottom-this.columnSizes[l].height);for(const E of t)E.col!==l&&(l=E.col,w=vo(n,this.top+i+r,this.bottom-this.columnSizes[l].height)),E.top=w,E.left+=this.left+r,E.left=o.leftForLtr(o.x(E.left),E.width),w+=E.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const i=this.ctx;Z_(i,this),this._draw(),J_(i)}}_draw(){const{options:i,columnSizes:t,lineWidths:n,ctx:r}=this,{align:s,labels:o}=i,l=fs.color,w=E0(i.rtl,this.left,this.width),E=ba(o.font),{padding:D}=o,k=E.size,O=k/2;let L;this.drawTitle(),r.textAlign=w.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=E.string;const{boxWidth:U,boxHeight:j,itemHeight:W}=att(o,k),st=this.isHorizontal(),yt=this._computeTitleHeight();L=st?{x:vo(s,this.left+D,this.right-n[0]),y:this.top+D+yt,line:0}:{x:this.left+D,y:vo(s,this.top+yt+D,this.bottom-t[0].height),line:0},$J(this.ctx,i.textDirection);const Tt=W+D;this.legendItems.forEach((It,ft)=>{r.strokeStyle=It.fontColor,r.fillStyle=It.fontColor;const ht=r.measureText(It.text).width,mt=w.textAlign(It.textAlign||(It.textAlign=o.textAlign)),wt=U+O+ht;let Ct=L.x,_t=L.y;w.setWidth(this.width),st?ft>0&&Ct+wt+D>this.right&&(_t=L.y+=Tt,L.line++,Ct=L.x=vo(s,this.left+D,this.right-n[L.line])):ft>0&&_t+Tt>this.bottom&&(Ct=L.x=Ct+t[L.line].width+D,L.line++,_t=L.y=vo(s,this.top+yt+D,this.bottom-t[L.line].height)),function(It,ft,ht){if(isNaN(U)||U<=0||isNaN(j)||j<0)return;r.save();const mt=Sn(ht.lineWidth,1);if(r.fillStyle=Sn(ht.fillStyle,l),r.lineCap=Sn(ht.lineCap,"butt"),r.lineDashOffset=Sn(ht.lineDashOffset,0),r.lineJoin=Sn(ht.lineJoin,"miter"),r.lineWidth=mt,r.strokeStyle=Sn(ht.strokeStyle,l),r.setLineDash(Sn(ht.lineDash,[])),o.usePointStyle){const wt={radius:j*Math.SQRT2/2,pointStyle:ht.pointStyle,rotation:ht.rotation,borderWidth:mt},Ct=w.xPlus(It,U/2);LJ(r,wt,Ct,ft+O,o.pointStyleWidth&&U)}else{const wt=ft+Math.max((k-j)/2,0),Ct=w.leftForLtr(It,U),_t=rm(ht.borderRadius);r.beginPath(),Object.values(_t).some(Dt=>0!==Dt)?g1(r,{x:Ct,y:wt,w:U,h:j,radius:_t}):r.rect(Ct,wt,U,j),r.fill(),0!==mt&&r.stroke()}r.restore()}(w.x(Ct),_t,It),Ct=((e,i,t,n)=>e===(n?"left":"right")?t:"center"===e?(i+t)/2:i)(mt,Ct+U+O,st?Ct+wt:this.right,i.rtl),function(It,ft,ht){nm(r,ht.text,It,ft+W/2,E,{strikethrough:ht.hidden,textAlign:w.textAlign(ht.textAlign)})}(w.x(Ct),_t,It),st?L.x+=wt+D:L.y+="string"!=typeof It.text?ltt(It,E.lineHeight)+D:Tt}),QJ(this.ctx,i.textDirection)}drawTitle(){const i=this.options,t=i.title,n=ba(t.font),r=yo(t.padding);if(!t.display)return;const s=E0(i.rtl,this.left,this.width),o=this.ctx,l=t.position,E=r.top+n.size/2;let D,k=this.left,O=this.width;if(this.isHorizontal())O=Math.max(...this.lineWidths),D=this.top+E,k=vo(i.align,k,this.right-O);else{const U=this.columnSizes.reduce((j,W)=>Math.max(j,W.height),0);D=E+vo(i.align,this.top,this.bottom-U-i.labels.padding-this._computeTitleHeight())}const L=vo(l,k,k+O);o.textAlign=s.textAlign($L(l)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=n.string,nm(o,t.text,L,D,n)}_computeTitleHeight(){const i=this.options.title,t=ba(i.font),n=yo(i.padding);return i.display?t.lineHeight+n.height:0}_getLegendItemAt(i,t){let n,r,s;if(Bh(i,this.left,this.right)&&Bh(t,this.top,this.bottom))for(s=this.legendHitBoxes,n=0;nnull!==e&&null!==i&&e.datasetIndex===i.datasetIndex&&e.index===i.index)(r,n);r&&!s&&$r(t.onLeave,[i,r,this],this),this._hoveredItem=n,n&&!s&&$r(t.onHover,[i,n,this],this)}else n&&$r(t.onClick,[i,n,this],this)}}function ltt(e,i){return i*(e.text?e.text.length:0)}var B9t={id:"legend",_element:ott,start(e,i,t){const n=e.legend=new ott({ctx:e.ctx,options:t,chart:e});xo.configure(e,n,t),xo.addBox(e,n)},stop(e){xo.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,i,t){const n=e.legend;xo.configure(e,n,t),n.options=t},afterUpdate(e){const i=e.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(e,i){i.replay||e.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,i,t){const n=i.datasetIndex,r=t.chart;r.isDatasetVisible(n)?(r.hide(n),i.hidden=!0):(r.show(n),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const i=e.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:r,color:s,useBorderRadius:o,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(w=>{const E=w.controller.getStyle(t?0:void 0),D=yo(E.borderWidth);return{text:i[w.index].label,fillStyle:E.backgroundColor,fontColor:s,hidden:!w.visible,lineCap:E.borderCapStyle,lineDash:E.borderDash,lineDashOffset:E.borderDashOffset,lineJoin:E.borderJoinStyle,lineWidth:(D.width+D.height)/4,strokeStyle:E.borderColor,pointStyle:n||E.pointStyle,rotation:E.rotation,textAlign:r||E.textAlign,borderRadius:o&&(l||E.borderRadius),datasetIndex:w.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class EN extends Gh{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=i,this.height=this.bottom=t;const r=es(n.text)?n.text.length:1;this._padding=yo(n.padding);const s=r*ba(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const i=this.options.position;return"top"===i||"bottom"===i}_drawArgs(i){const{top:t,left:n,bottom:r,right:s,options:o}=this,l=o.align;let E,D,k,w=0;return this.isHorizontal()?(D=vo(l,n,s),k=t+i,E=s-n):("left"===o.position?(D=n+i,k=vo(l,r,t),w=-.5*is):(D=s-i,k=vo(l,t,r),w=.5*is),E=r-t),{titleX:D,titleY:k,maxWidth:E,rotation:w}}draw(){const i=this.ctx,t=this.options;if(!t.display)return;const n=ba(t.font),s=n.lineHeight/2+this._padding.top,{titleX:o,titleY:l,maxWidth:w,rotation:E}=this._drawArgs(s);nm(i,t.text,0,0,n,{color:t.color,maxWidth:w,rotation:E,textAlign:$L(t.align),textBaseline:"middle",translation:[o,l]})}}var U9t={id:"title",_element:EN,start(e,i,t){!function V9t(e,i){const t=new EN({ctx:e.ctx,options:i,chart:e});xo.configure(e,t,i),xo.addBox(e,t),e.titleBlock=t}(e,t)},stop(e){xo.removeBox(e,e.titleBlock),delete e.titleBlock},beforeUpdate(e,i,t){const n=e.titleBlock;xo.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const fA=new WeakMap;var z9t={id:"subtitle",start(e,i,t){const n=new EN({ctx:e.ctx,options:t,chart:e});xo.configure(e,n,t),xo.addBox(e,n),fA.set(e,n)},stop(e){xo.removeBox(e,fA.get(e)),fA.delete(e)},beforeUpdate(e,i,t){const n=fA.get(e);xo.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const _1={average(e){if(!e.length)return!1;let i,t,n=new Set,r=0,s=0;for(i=0,t=e.length;il+w)/n.size,y:r/s}},nearest(e,i){if(!e.length)return!1;let s,o,l,t=i.x,n=i.y,r=Number.POSITIVE_INFINITY;for(s=0,o=e.length;s-1?e.split("\n"):e}function G9t(e,i){const{element:t,datasetIndex:n,index:r}=i,s=e.getDatasetMeta(n).controller,{label:o,value:l}=s.getLabelAndValue(r);return{chart:e,label:o,parsed:s.getParsed(r),raw:e.data.datasets[n].data[r],formattedValue:l,dataset:s.getDataset(),dataIndex:r,datasetIndex:n,element:t}}function ctt(e,i){const t=e.chart.ctx,{body:n,footer:r,title:s}=e,{boxWidth:o,boxHeight:l}=i,w=ba(i.bodyFont),E=ba(i.titleFont),D=ba(i.footerFont),k=s.length,O=r.length,L=n.length,U=yo(i.padding);let j=U.height,W=0,Z=n.reduce((yt,Tt)=>yt+Tt.before.length+Tt.lines.length+Tt.after.length,0);Z+=e.beforeBody.length+e.afterBody.length,k&&(j+=k*E.lineHeight+(k-1)*i.titleSpacing+i.titleMarginBottom),Z&&(j+=L*(i.displayColors?Math.max(l,w.lineHeight):w.lineHeight)+(Z-L)*w.lineHeight+(Z-1)*i.bodySpacing),O&&(j+=i.footerMarginTop+O*D.lineHeight+(O-1)*i.footerSpacing);let rt=0;const st=function(yt){W=Math.max(W,t.measureText(yt).width+rt)};return t.save(),t.font=E.string,_r(e.title,st),t.font=w.string,_r(e.beforeBody.concat(e.afterBody),st),rt=i.displayColors?o+2+i.boxPadding:0,_r(n,yt=>{_r(yt.before,st),_r(yt.lines,st),_r(yt.after,st)}),rt=0,t.font=D.string,_r(e.footer,st),t.restore(),W+=U.width,{width:W,height:j}}function j9t(e,i,t,n){const{x:r,width:s}=t,{width:o,chartArea:{left:l,right:w}}=e;let E="center";return"center"===n?E=r<=(l+w)/2?"left":"right":r<=s/2?E="left":r>=o-s/2&&(E="right"),function W9t(e,i,t,n){const{x:r,width:s}=n,o=t.caretSize+t.caretPadding;if("left"===e&&r+s+o>i.width||"right"===e&&r-s-o<0)return!0}(E,e,i,t)&&(E="center"),E}function utt(e,i,t){const n=t.yAlign||i.yAlign||function H9t(e,i){const{y:t,height:n}=i;return te.height-n/2?"bottom":"center"}(e,t);return{xAlign:t.xAlign||i.xAlign||j9t(e,i,t,n),yAlign:n}}function htt(e,i,t,n){const{caretSize:r,caretPadding:s,cornerRadius:o}=e,{xAlign:l,yAlign:w}=t,E=r+s,{topLeft:D,topRight:k,bottomLeft:O,bottomRight:L}=rm(o);let U=function X9t(e,i){let{x:t,width:n}=e;return"right"===i?t-=n:"center"===i&&(t-=n/2),t}(i,l);const j=function Y9t(e,i,t){let{y:n,height:r}=e;return"top"===i?n+=t:n-="bottom"===i?r+t:r/2,n}(i,w,E);return"center"===w?"left"===l?U+=E:"right"===l&&(U-=E):"left"===l?U-=Math.max(D,O)+r:"right"===l&&(U+=Math.max(k,L)+r),{x:Fa(U,0,n.width-i.width),y:Fa(j,0,n.height-i.height)}}function pA(e,i,t){const n=yo(t.padding);return"center"===i?e.x+e.width/2:"right"===i?e.x+e.width-n.right:e.x+n.left}function dtt(e){return Ru([],Hh(e))}function ftt(e,i){const t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?e.override(t):e}const ptt={beforeTitle:Nh,title(e){if(e.length>0){const i=e[0],t=i.chart.data.labels,n=t?t.length:0;if(this&&this.options&&"dataset"===this.options.mode)return i.dataset.label||"";if(i.label)return i.label;if(n>0&&i.dataIndex"u"?ptt[i].call(t,n):r}let mtt=(()=>class e extends Gh{static positioners=_1;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new nq(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=function $9t(e,i,t){return pf(e,{tooltip:i,tooltipItems:t,type:"tooltip"})}(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=hl(r,"beforeTitle",this,t),o=hl(r,"title",this,t),l=hl(r,"afterTitle",this,t);let w=[];return w=Ru(w,Hh(s)),w=Ru(w,Hh(o)),w=Ru(w,Hh(l)),w}getBeforeBody(t,n){return dtt(hl(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return _r(t,o=>{const l={before:[],lines:[],after:[]},w=ftt(r,o);Ru(l.before,Hh(hl(w,"beforeLabel",this,o))),Ru(l.lines,hl(w,"label",this,o)),Ru(l.after,Hh(hl(w,"afterLabel",this,o))),s.push(l)}),s}getAfterBody(t,n){return dtt(hl(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=hl(r,"beforeFooter",this,t),o=hl(r,"footer",this,t),l=hl(r,"afterFooter",this,t);let w=[];return w=Ru(w,Hh(s)),w=Ru(w,Hh(o)),w=Ru(w,Hh(l)),w}_createItems(t){const n=this._active,r=this.chart.data,s=[],o=[],l=[];let E,D,w=[];for(E=0,D=n.length;Et.filter(k,O,L,r))),t.itemSort&&(w=w.sort((k,O)=>t.itemSort(k,O,r))),_r(w,k=>{const O=ftt(t.callbacks,k);s.push(hl(O,"labelColor",this,k)),o.push(hl(O,"labelPointStyle",this,k)),l.push(hl(O,"labelTextColor",this,k))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=l,this.dataPoints=w,w}update(t,n){const r=this.options.setContext(this.getContext()),s=this._active;let o,l=[];if(s.length){const w=_1[r.position].call(this,s,this._eventPosition);l=this._createItems(r),this.title=this.getTitle(l,r),this.beforeBody=this.getBeforeBody(l,r),this.body=this.getBody(l,r),this.afterBody=this.getAfterBody(l,r),this.footer=this.getFooter(l,r);const E=this._size=ctt(this,r),D=Object.assign({},w,E),k=utt(this.chart,r,D),O=htt(r,D,k,this.chart);this.xAlign=k.xAlign,this.yAlign=k.yAlign,o={opacity:1,x:O.x,y:O.y,width:E.width,height:E.height,caretX:w.x,caretY:w.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=l,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,s){const o=this.getCaretPosition(t,r,s);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:s,yAlign:o}=this,{caretSize:l,cornerRadius:w}=r,{topLeft:E,topRight:D,bottomLeft:k,bottomRight:O}=rm(w),{x:L,y:U}=t,{width:j,height:W}=n;let Z,rt,st,yt,Tt,It;return"center"===o?(Tt=U+W/2,"left"===s?(Z=L,rt=Z-l,yt=Tt+l,It=Tt-l):(Z=L+j,rt=Z+l,yt=Tt-l,It=Tt+l),st=Z):(rt="left"===s?L+Math.max(E,k)+l:"right"===s?L+j-Math.max(D,O)-l:this.caretX,"top"===o?(yt=U,Tt=yt-l,Z=rt-l,st=rt+l):(yt=U+W,Tt=yt+l,Z=rt+l,st=rt-l),It=yt),{x1:Z,x2:rt,x3:st,y1:yt,y2:Tt,y3:It}}drawTitle(t,n,r){const s=this.title,o=s.length;let l,w,E;if(o){const D=E0(r.rtl,this.x,this.width);for(t.x=pA(this,r.titleAlign,r),n.textAlign=D.textAlign(r.titleAlign),n.textBaseline="middle",l=ba(r.titleFont),w=r.titleSpacing,n.fillStyle=r.titleColor,n.font=l.string,E=0;E0!==st)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,g1(t,{x:W,y:j,w:D,h:E,radius:rt}),t.fill(),t.stroke(),t.fillStyle=l.backgroundColor,t.beginPath(),g1(t,{x:Z,y:j+1,w:D-2,h:E-2,radius:rt}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(W,j,D,E),t.strokeRect(W,j,D,E),t.fillStyle=l.backgroundColor,t.fillRect(Z,j+1,D-2,E-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:s}=this,{bodySpacing:o,bodyAlign:l,displayColors:w,boxHeight:E,boxWidth:D,boxPadding:k}=r,O=ba(r.bodyFont);let L=O.lineHeight,U=0;const j=E0(r.rtl,this.x,this.width),W=function(mt){n.fillText(mt,j.x(t.x+U),t.y+L/2),t.y+=L+o},Z=j.textAlign(l);let rt,st,yt,Tt,It,ft,ht;for(n.textAlign=l,n.textBaseline="middle",n.font=O.string,t.x=pA(this,Z,r),n.fillStyle=r.bodyColor,_r(this.beforeBody,W),U=w&&"right"!==Z?"center"===l?D/2+k:D+2+k:0,Tt=0,ft=s.length;Tt0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,s=r&&r.x,o=r&&r.y;if(s||o){const l=_1[t.position].call(this,this._active,this._eventPosition);if(!l)return;const w=this._size=ctt(this,t),E=Object.assign({},l,this._size),D=utt(n,t,E),k=htt(t,E,D,n);(s._to!==k.x||o._to!==k.y)&&(this.xAlign=D.xAlign,this.yAlign=D.yAlign,this.width=w.width,this.height=w.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,k))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const l=yo(n.padding);n.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,s,n),$J(t,n.textDirection),o.y+=l.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),QJ(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,s=t.map(({datasetIndex:w,index:E})=>{const D=this.chart.getDatasetMeta(w);if(!D)throw new Error("Cannot find a dataset at index "+w);return{datasetIndex:w,element:D.data[E],index:E}}),o=!j_(r,s),l=this._positionChanged(s,n);(o||l)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],l=this._getActiveElements(t,o,n,r),w=this._positionChanged(l,t),E=n||!j_(l,o)||w;return E&&(this._active=l,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),E}_getActiveElements(t,n,r,s){const o=this.options;if("mouseout"===t.type)return[];if(!s)return n.filter(w=>this.chart.data.datasets[w.datasetIndex]&&void 0!==this.chart.getDatasetMeta(w.datasetIndex).controller.getParsed(w.index));const l=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&l.reverse(),l}_positionChanged(t,n){const{caretX:r,caretY:s,options:o}=this,l=_1[o.position].call(this,t,n);return!1!==l&&(r!==l.x||s!==l.y)}})();var K9t=Object.freeze({__proto__:null,Colors:l9t,Decimation:d9t,Filler:P9t,Legend:B9t,SubTitle:z9t,Title:U9t,Tooltip:{id:"tooltip",_element:mtt,positioners:_1,afterInit(e,i,t){t&&(e.tooltip=new mtt({chart:e,options:t}))},beforeUpdate(e,i,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,i,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){const i=e.tooltip;if(i&&i._willRender()){const t={tooltip:i};if(!1===e.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0}))return;i.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,i){e.tooltip&&e.tooltip.handleEvent(i.event,i.replay,i.inChartArea)&&(i.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,i)=>i.bodyFont.size,boxWidth:(e,i)=>i.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ptt},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});function gtt(e){const i=this.getLabels();return e>=0&&eclass e extends cm{static id="category";static defaults={ticks:{callback:gtt}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:o}of n)r[s]===o&&r.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(rr(t))return null;const r=this.getLabels();return((e,i)=>null===e?null:Fa(Math.round(e),0,i))(n=isFinite(n)&&r[n]===t?n:function J9t(e,i,t,n){const r=e.indexOf(i);return-1===r?((e,i,t,n)=>("string"==typeof i?(t=e.push(i)-1,n.unshift({index:t,label:i})):isNaN(i)&&(t=null),t))(e,i,t,n):r!==e.lastIndexOf(i)?t:r}(r,t,Sn(n,t),this._addedLabels),r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,s=[];let o=this.getLabels();o=0===t&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let l=t;l<=n;l++)s.push({value:l});return s}getLabelForValue(t){return gtt.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}})();function vtt(e,i,{horizontal:t,minRotation:n}){const r=Uc(n),s=(t?Math.sin(r):Math.cos(r))||.001;return Math.min(i/s,.75*i*(""+e).length)}class mA extends cm{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(i,t){return rr(i)||("number"==typeof i||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){const{beginAtZero:i}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this;const o=w=>r=t?r:w,l=w=>s=n?s:w;if(i){const w=Mu(r),E=Mu(s);w<0&&E<0?l(0):w>0&&E>0&&o(0)}if(r===s){let w=0===s?1:Math.abs(.05*s);l(s+w),i||o(r-w)}this.min=r,this.max=s}getTickLimit(){const i=this.options.ticks;let r,{maxTicksLimit:t,stepSize:n}=i;return n?(r=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),t=t||11),t&&(r=Math.min(t,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const i=this.options,t=i.ticks;let n=this.getTickLimit();n=Math.max(2,n);const o=function e6t(e,i){const t=[],{bounds:r,step:s,min:o,max:l,precision:w,count:E,maxTicks:D,maxDigits:k,includeBounds:O}=e,L=s||1,U=D-1,{min:j,max:W}=i,Z=!rr(o),rt=!rr(l),st=!rr(E),yt=(W-j)/(k+1);let It,ft,ht,mt,Tt=xJ((W-j)/U/L)*L;if(Tt<1e-14&&!Z&&!rt)return[{value:j},{value:W}];mt=Math.ceil(W/Tt)-Math.floor(j/Tt),mt>U&&(Tt=xJ(mt*Tt/U/L)*L),rr(w)||(It=Math.pow(10,w),Tt=Math.ceil(Tt*It)/It),"ticks"===r?(ft=Math.floor(j/Tt)*Tt,ht=Math.ceil(W/Tt)*Tt):(ft=j,ht=W),Z&&rt&&s&&function zBt(e,i){const t=Math.round(e);return t-i<=e&&t+i>=e}((l-o)/s,Tt/1e3)?(mt=Math.round(Math.min((l-o)/Tt,D)),Tt=(l-o)/mt,ft=o,ht=l):st?(ft=Z?o:ft,ht=rt?l:ht,mt=E-1,Tt=(ht-ft)/mt):(mt=(ht-ft)/Tt,mt=h1(mt,Math.round(mt),Tt/1e3)?Math.round(mt):Math.ceil(mt));const wt=Math.max(wJ(Tt),wJ(ft));It=Math.pow(10,rr(w)?wt:w),ft=Math.round(ft*It)/It,ht=Math.round(ht*It)/It;let Ct=0;for(Z&&(O&&ft!==o?(t.push({value:o}),ftl)break;t.push({value:_t})}return rt&&O&&ht!==l?t.length&&h1(t[t.length-1].value,l,vtt(l,yt,e))?t[t.length-1].value=l:t.push({value:l}):(!rt||ht===l)&&t.push({value:ht}),t}({maxTicks:n,bounds:i.bounds,min:i.min,max:i.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===i.bounds&&bJ(o,this,"value"),i.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const i=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&i.length){const r=(n-t)/Math.max(i.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(i){return p1(i,this.chart.options.locale,this.options.ticks.format)}}const A1=e=>Math.floor(ff(e)),um=(e,i)=>Math.pow(10,A1(e)+i);function ytt(e){return e/Math.pow(10,A1(e))==1}function xtt(e,i,t){const n=Math.pow(10,t),r=Math.floor(e/n);return Math.ceil(i/n)-r}function _N(e){const i=e.ticks;if(i.display&&e.display){const t=yo(i.backdropPadding);return Sn(i.font&&i.font.size,fs.font.size)+t.height}return 0}function a6t(e,i,t){return t=es(t)?t:[t],{w:rVt(e,i.string,t),h:t.length*i.lineHeight}}function btt(e,i,t,n,r){return e===n||e===r?{start:i-t/2,end:i+t/2}:er?{start:i-t,end:i}:{start:i,end:i+t}}function l6t(e,i,t,n,r){const s=Math.abs(Math.sin(t)),o=Math.abs(Math.cos(t));let l=0,w=0;n.starti.r&&(l=(n.end-i.r)/s,e.r=Math.max(e.r,i.r+l)),r.starti.b&&(w=(r.end-i.b)/o,e.b=Math.max(e.b,i.b+w))}function c6t(e,i,t){const n=e.drawingArea,{extra:r,additionalAngle:s,padding:o,size:l}=t,w=e.getPointPosition(i,n+r+o,s),E=Math.round(jL(Bl(w.angle+Bs))),D=function p6t(e,i,t){return 90===t||270===t?e-=i/2:(t>270||t<90)&&(e-=i),e}(w.y,l.h,E),k=function d6t(e){return 0===e||180===e?"center":e<180?"left":"right"}(E),O=function f6t(e,i,t){return"right"===t?e-=i:"center"===t&&(e-=i/2),e}(w.x,l.w,k);return{visible:!0,x:w.x,y:D,textAlign:k,left:O,top:D,right:O+l.w,bottom:D+l.h}}function u6t(e,i){if(!i)return!0;const{left:t,top:n,right:r,bottom:s}=e;return!(Uh({x:t,y:n},i)||Uh({x:t,y:s},i)||Uh({x:r,y:n},i)||Uh({x:r,y:s},i))}function m6t(e,i,t){const{left:n,top:r,right:s,bottom:o}=t,{backdropColor:l}=i;if(!rr(l)){const w=rm(i.borderRadius),E=yo(i.backdropPadding);e.fillStyle=l;const D=n-E.left,k=r-E.top,O=s-n+E.width,L=o-r+E.height;Object.values(w).some(U=>0!==U)?(e.beginPath(),g1(e,{x:D,y:k,w:O,h:L,radius:w}),e.fill()):e.fillRect(D,k,O,L)}}function wtt(e,i,t,n){const{ctx:r}=e;if(t)r.arc(e.xCenter,e.yCenter,i,0,ns);else{let s=e.getPointPosition(0,i);r.moveTo(s.x,s.y);for(let o=1;o=i?t[n]:t[r]]=!0}}else e[i]=!0}function _tt(e,i,t){const n=[],r={},s=i.length;let o,l;for(o=0;o=0&&(i[w].major=!0);return i}(e,n,r,t):n}let AN=(()=>class e extends cm{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),s=this._adapter=new C5t__date(t.adapters.date);s.init(n),c1(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return void 0===t?null:Ctt(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:s,max:o,minDefined:l,maxDefined:w}=this.getUserBounds();function E(D){!l&&!isNaN(D.min)&&(s=Math.min(s,D.min)),!w&&!isNaN(D.max)&&(o=Math.max(o,D.max))}(!l||!w)&&(E(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&E(this.getMinMax(!1))),s=_s(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),o=_s(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,s="labels"===r.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,w=function jBt(e,i,t){let n=0,r=e.length;for(;nn&&e[r-1]>t;)r--;return n>0||r=dl.indexOf(t);s--){const o=dl[s];if(gA[o].common&&e._adapter.diff(r,n,o)>=i-1)return o}return dl[t?dl.indexOf(t):0]}(this,w.length,n.minUnit,this.min,this.max)),this._majorUnit=r.major.enabled&&"year"!==this._unit?function w6t(e){for(let i=dl.indexOf(e)+1,t=dl.length;i+t.value))}initOffsets(t=[]){let s,o,n=0,r=0;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),n=1===t.length?1-s:(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),r=1===t.length?o:(o-this.getDecimalForValue(t[t.length-2]))/2);const l=t.length<3?.5:.25;n=Fa(n,0,l),r=Fa(r,0,l),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,s=this.options,o=s.time,l=o.unit||Stt(o.minUnit,n,r,this._getLabelCapacity(n)),w=Sn(s.ticks.stepSize,1),E="week"===l&&o.isoWeekday,D=T0(E)||!0===E,k={};let L,U,O=n;if(D&&(O=+t.startOf(O,"isoWeek",E)),O=+t.startOf(O,D?"day":l),t.diff(r,n,l)>1e5*w)throw new Error(n+" and "+r+" are too far apart with stepSize of "+w+" "+l);const j="data"===s.ticks.source&&this.getDataTimestamps();for(L=O,U=0;L+W)}getLabelForValue(t){const r=this.options.time;return this._adapter.format(t,r.tooltipFormat?r.tooltipFormat:r.displayFormats.datetime)}format(t,n){return this._adapter.format(t,n||this.options.time.displayFormats[this._unit])}_tickFormatFunction(t,n,r,s){const o=this.options,l=o.ticks.callback;if(l)return $r(l,[t,n,r],this);const w=o.time.displayFormats,E=this._unit,D=this._majorUnit,O=D&&w[D],L=r[n];return this._adapter.format(t,s||(D&&O&&L&&L.major?O:E&&w[E]))}generateTickLabels(t){let n,r,s;for(n=0,r=t.length;n0?w:1}getDataTimestamps(){let n,r,t=this._cache.data||[];if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n=e[n].pos&&i<=e[r].pos&&({lo:n,hi:r}=Vh(e,"pos",i)),({pos:s,time:l}=e[n]),({pos:o,time:w}=e[r])):(i>=e[n].time&&i<=e[r].time&&({lo:n,hi:r}=Vh(e,"time",i)),({time:s,pos:l}=e[n]),({time:o,pos:w}=e[r]));const E=o-s;return E?l+(w-l)*(i-s)/E:l}const _6t=["radarCanvas"],Att=e=>({left:e});function A6t(e,i){if(1&e&&(J(0,"div",11)(1,"div",12),ut(2),et()()),2&e){const t=i.$implicit,n=St();vt("ngStyle",Al(2,Att,n.getMarkerPosition(t.value)+"%")),ot(2),Ke(t.value)}}function D6t(e,i){if(1&e&&(J(0,"span",13),ut(1),et()),2&e){const t=i.$implicit;ot(),Ke(t.label)}}function M6t(e,i){if(1&e&&(J(0,"td"),ut(1),vs(2,"titlecase"),et()),2&e){const t=St(2).$implicit,n=St(2).$implicit,r=St();_i("rowspan",r.getKpaRowSpan(r.maturityResponse,n,t)),ot(),Je(" ",Jl(2,2,r.getKpaName(t))," ")}}function I6t(e,i){if(1&e&&(J(0,"td"),ut(1),vs(2,"number"),et()),2&e){const t=St(2).$implicit,n=St(2).$implicit,r=St();_i("rowspan",r.getKpaRowSpan(r.maturityResponse,n,t)),ot(),Je(" ",Pc(2,2,r.calculateAverage(r.getQuestions(r.maturityResponse,n,t)),"1.2-2")," ")}}function R6t(e,i){if(1&e&&(Qi(0),J(1,"tr"),Ht(2,M6t,3,4,"td",14)(3,I6t,3,5,"td",14),et(),Ki()),2&e){const t=i.index,n=St(4);ot(2),vt("ngIf",n.isFirstRowInKpa(t)),ot(),vt("ngIf",n.isFirstRowInKpa(t))}}function P6t(e,i){if(1&e&&(Qi(0),Ht(1,R6t,4,2,"ng-container",9),vs(2,"keyvalue"),Ki()),2&e){const t=i.$implicit,n=St(2).$implicit,r=St();ot(),vt("ngForOf",Jl(2,1,r.getQuestions(r.maturityResponse,n,t)))}}function k6t(e,i){if(1&e&&(Qi(0),Ht(1,P6t,3,3,"ng-container",9),Ki()),2&e){const t=St().$implicit,n=St();ot(),vt("ngForOf",n.getKpas(n.maturityResponse,t))}}function F6t(e,i){if(1&e&&(Qi(0),Ht(1,k6t,2,1,"ng-container",14),Ki()),2&e){const t=i.$implicit,n=St();ot(),vt("ngIf",t==n.maturityResponse.selectedStakeholder)}}vN.register(T5t,e9t,K9t,Object.freeze({__proto__:null,CategoryScale:t6t,LinearScale:class i6t extends mA{static id="linear";static defaults={ticks:{callback:Q_.formatters.numeric}};determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=_s(i)?i:0,this.max=_s(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const i=this.isHorizontal(),t=i?this.width:this.height,n=Uc(this.options.ticks.minRotation),r=(i?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,s.lineHeight/r))}getPixelForValue(i){return null===i?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange}},LogarithmicScale:class s6t extends cm{static id="logarithmic";static defaults={ticks:{callback:Q_.formatters.logarithmic,major:{enabled:!0}}};constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(i,t){const n=mA.prototype.parse.apply(this,[i,t]);if(0!==n)return _s(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=_s(i)?Math.max(0,i):null,this.max=_s(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!_s(this._userMin)&&(this.min=i===um(this.min,0)?um(this.min,-1):um(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:i,maxDefined:t}=this.getUserBounds();let n=this.min,r=this.max;const s=l=>n=i?n:l,o=l=>r=t?r:l;n===r&&(n<=0?(s(1),o(10)):(s(um(n,-1)),o(um(r,1)))),n<=0&&s(um(r,-1)),r<=0&&o(um(n,1)),this.min=n,this.max=r}buildTicks(){const i=this.options,n=function r6t(e,{min:i,max:t}){i=Nl(e.min,i);const n=[],r=A1(i);let s=function n6t(e,i){let n=A1(i-e);for(;xtt(e,i,n)>10;)n++;for(;xtt(e,i,n)<10;)n--;return Math.min(n,A1(e))}(i,t),o=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),w=r>s?Math.pow(10,r):0,E=Math.round((i-w)*o)/o,D=Math.floor((i-w)/l/10)*l*10;let k=Math.floor((E-D)/Math.pow(10,s)),O=Nl(e.min,Math.round((w+D+k*Math.pow(10,s))*o)/o);for(;O=10?k=k<15?15:20:k++,k>=20&&(s++,k=2,o=s>=0?1:o),O=Math.round((w+D+k*Math.pow(10,s))*o)/o;const L=Nl(e.max,O);return n.push({value:L,major:ytt(L),significand:k}),n}({min:this._userMin,max:this._userMax},this);return"ticks"===i.bounds&&bJ(n,this,"value"),i.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(i){return void 0===i?"0":p1(i,this.chart.options.locale,this.options.ticks.format)}configure(){const i=this.min;super.configure(),this._startValue=ff(i),this._valueRange=ff(this.max)-ff(i)}getPixelForValue(i){return(void 0===i||0===i)&&(i=this.min),null===i||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:(ff(i)-this._startValue)/this._valueRange)}getValueForPixel(i){const t=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+t*this._valueRange)}},RadialLinearScale:class x6t extends mA{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Q_.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:i=>i,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(i){super(i),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const i=this._padding=yo(_N(this.options)/2),t=this.width=this.maxWidth-i.width,n=this.height=this.maxHeight-i.height;this.xCenter=Math.floor(this.left+t/2+i.left),this.yCenter=Math.floor(this.top+n/2+i.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!1);this.min=_s(i)&&!isNaN(i)?i:0,this.max=_s(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/_N(this.options))}generateTickLabels(i){mA.prototype.generateTickLabels.call(this,i),this._pointLabels=this.getLabels().map((t,n)=>{const r=$r(this.options.pointLabels.callback,[t,n],this);return r||0===r?r:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){const i=this.options;i.display&&i.pointLabels.display?function o6t(e){const i={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},i),n=[],r=[],s=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?is/s:0;for(let w=0;w=0&&i=0;r--){const s=e._pointLabelItems[r];if(!s.visible)continue;const o=n.setContext(e.getPointLabelContext(r));m6t(t,o,s);const l=ba(o.font),{x:w,y:E,textAlign:D}=s;nm(t,e._pointLabels[r],w,E+l.lineHeight/2,l,{color:o.color,textAlign:D,textBaseline:"middle"})}}(this,o),r.display&&this.ticks.forEach((D,k)=>{if(0!==k||0===k&&this.min<0){w=this.getDistanceFromCenterForValue(D.value);const O=this.getContext(k),L=r.setContext(O),U=s.setContext(O);!function v6t(e,i,t,n,r){const s=e.ctx,o=i.circular,{color:l,lineWidth:w}=i;!o&&!n||!l||!w||t<0||(s.save(),s.strokeStyle=l,s.lineWidth=w,s.setLineDash(r.dash||[]),s.lineDashOffset=r.dashOffset,s.beginPath(),wtt(e,t,o,n),s.closePath(),s.stroke(),s.restore())}(this,L,w,o,U)}}),n.display){for(i.save(),l=o-1;l>=0;l--){const D=n.setContext(this.getPointLabelContext(l)),{color:k,lineWidth:O}=D;!O||!k||(i.lineWidth=O,i.strokeStyle=k,i.setLineDash(D.borderDash),i.lineDashOffset=D.borderDashOffset,w=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),E=this.getPointPosition(l,w),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(E.x,E.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){const i=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let s,o;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(r),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((l,w)=>{if(0===w&&this.min>=0&&!t.reverse)return;const E=n.setContext(this.getContext(w)),D=ba(E.font);if(s=this.getDistanceFromCenterForValue(this.ticks[w].value),E.showLabelBackdrop){i.font=D.string,o=i.measureText(l.label).width,i.fillStyle=E.backdropColor;const k=yo(E.backdropPadding);i.fillRect(-o/2-k.left,-s-D.size/2-k.top,o+k.width,D.size+k.height)}nm(i,l.label,0,-s,D,{color:E.color,strokeColor:E.textStrokeColor,strokeWidth:E.textStrokeWidth})}),i.restore()}drawTitle(){}},TimeScale:AN,TimeSeriesScale:class C6t extends AN{static id="timeseries";static defaults=AN.defaults;constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const i=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(i);this._minPos=vA(t,this.min),this._tableRange=vA(t,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){const{min:t,max:n}=this,r=[],s=[];let o,l,w,E,D;for(o=0,l=i.length;o=t&&E<=n&&r.push(E);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(o=0,l=r.length;or-s)}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;const t=this.getDataTimestamps(),n=this.getLabelTimestamps();return i=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,i=this._cache.all=i,i}getDecimalForValue(i){return(vA(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){const t=this._offsets,n=this.getDecimalForPixel(i)/t.factor-t.end;return vA(this._table,n*this._tableRange+this._minPos,!0)}}}));let O6t=(()=>{class e{constructor(){this.allQuestions=[],this.resultsScale=[{value:1,label:"Basic"},{value:2,label:"Limited"},{value:3,label:"Advanced"},{value:4,label:"Integrated"},{value:5,label:"Optimizing"}]}ngAfterViewInit(){this.maturityResponse&&this.generateChart()}ngOnChanges(t){this.radarCanvas&&t.maturityResponse&&this.maturityResponse&&this.generateChart()}generateChart(){this.chart&&this.chart.destroy();const t={};Object.entries(this.maturityResponse).forEach(([o,l])=>{const[w,E,D]=o.split(".");w&&E&&D&&w===this.maturityResponse.selectedStakeholder&&(t[E]=t[E]||{sum:0,count:0},t[E].sum+=l||0,t[E].count+=1)});const n=Array.from(new Set(Object.keys(this.maturityResponse).filter(o=>o.startsWith(this.maturityResponse.selectedStakeholder)).map(o=>o.split(".")[1]))),r=n.map(o=>this.getKpaName(o)||o),s=[{label:this.getStakeholderName(),data:n.map(o=>t[o]?t[o].sum/t[o].count:0),backgroundColor:"rgba(54, 162, 235, 0.3)",borderColor:"rgba(54, 162, 235, 1)",pointBackgroundColor:"rgba(54, 162, 235, 1)",pointBorderColor:"#fff"}];this.chart=new vN(this.radarCanvas.nativeElement,{type:"radar",data:{labels:r,datasets:s},options:{aspectRatio:2,responsive:!0,plugins:{legend:{position:"top"},title:{display:!0,text:"Maturity Results by Stakeholder and KPA"}},scales:{r:{pointLabels:{padding:5},suggestedMin:0,suggestedMax:5,ticks:{stepSize:1}}}}})}getStakeholders(t){return Array.from(new Set(Object.keys(t).map(n=>n.split(".")[0])))}getKpas(t,n){return Array.from(new Set(Object.keys(t).filter(r=>r.startsWith(n)).map(r=>r.split(".")[1])))}getStakeholderName(){return this.allQuestions[0].stakeholderName}getKpaName(t){const n=this.allQuestions.find(r=>r.kpaId===t);return n?n.kpaName:null}getQuestions(t,n,r){return Object.keys(t).filter(s=>s.startsWith(`${n}.${r}`)).reduce((s,o)=>(s[o.split(".").slice(2).join(".")]=t[o],s),{})}getStakeholderRowSpan(t,n){return this.getKpas(t,n).reduce((s,o)=>s+this.getKpaRowSpan(t,n,o),0)}getKpaRowSpan(t,n,r){return Object.keys(t).filter(s=>s.startsWith(`${n}.${r}`)).length}isFirstRowInStakeholder(t,n,r){const s=this.getKpas(this.maturityResponse,n).indexOf(r);return 0===t&&0===s}isFirstRowInKpa(t){return 0===t}calculateAverage(t){const n=Object.values(t).filter(s=>null!==s),r=n.reduce((s,o)=>s+o,0);return n.length>0?r/n.length:0}calculateOverallAverage(t){const n={},r=["selectedStakeholder","name","author","timestamp","selectedKpas"];for(const l in t)if(t.hasOwnProperty(l)&&null!==t[l]&&!r.includes(l)){const w=l.split(".")[1];n[w]||(n[w]=[]),n[w].push(t[l])}const s=Object.keys(n).filter(l=>n[l].length>0).map(l=>{const w=n[l];return w.reduce((E,D)=>E+D,0)/w.length});return s.length>0?s.reduce((l,w)=>l+w,0)/s.length:0}getScaleLabel(t){return t=Math.floor(t),this.resultsScale.find(n=>n.value===t)?.label||""}getMarkerPosition(t){return t<1&&(t=1),t>5&&(t=5),(t-1)/4*100}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-maturity-results"]],viewQuery:function(n,r){if(1&n&&ki(_6t,5),2&n){let s;He(s=We())&&(r.radarCanvas=s.first)}},inputs:{maturityResponse:"maturityResponse",allQuestions:"allQuestions"},features:[lr],decls:24,vars:15,consts:[["radarCanvas",""],[1,"centered-box"],[1,"score-scale-container"],[1,"score-scale"],[1,"score-marker",3,"ngStyle"],["class","score-tick",3,"ngStyle",4,"ngFor","ngForOf"],[1,"score-scale-labels"],["class","level-label",4,"ngFor","ngForOf"],[1,"bordered-table"],[4,"ngFor","ngForOf"],[1,"chart-container"],[1,"score-tick",3,"ngStyle"],[1,"score-tick-label"],[1,"level-label"],[4,"ngIf"]],template:function(n,r){1&n&&(J(0,"h3",1),ut(1),vs(2,"number"),et(),ye(3,"br"),J(4,"div",2)(5,"div",3),ye(6,"div",4),Ht(7,A6t,3,4,"div",5),et(),J(8,"div",6),Ht(9,D6t,2,1,"span",7),vs(10,"slice"),et()(),J(11,"table",8)(12,"thead")(13,"tr")(14,"th"),ut(15,"KPA"),et(),J(16,"th"),ut(17,"Maturity score"),et()()(),J(18,"tbody"),Ht(19,F6t,2,1,"ng-container",9),et()(),J(20,"div",10),ye(21,"canvas",null,0),et(),ye(23,"br")),2&n&&(ot(),sl(" ",Pc(2,6,r.calculateOverallAverage(r.maturityResponse),"1.2-2")," - ",r.getScaleLabel(r.calculateOverallAverage(r.maturityResponse)),"\n"),ot(5),vt("ngStyle",Al(13,Att,"calc("+r.getMarkerPosition(r.calculateOverallAverage(r.maturityResponse))+"% - 3px)")),ot(),vt("ngForOf",r.resultsScale),ot(2),vt("ngForOf",vU(10,9,r.resultsScale,0,r.resultsScale.length-1)),ot(10),vt("ngForOf",r.getStakeholders(r.maturityResponse)))},dependencies:[ys,ls,qz,nG,iG,pR,tG],styles:[".bordered-table[_ngcontent-%COMP%]{border:1px solid #000;border-collapse:collapse;width:100%}.bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:1px solid #000;padding:4px}.chart-container[_ngcontent-%COMP%]{display:flex;justify-content:center}.centered-box[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:2px solid #000;padding:10px;margin:20px auto;width:fit-content;box-shadow:0 0 10px #0000001a}.score-scale-container[_ngcontent-%COMP%]{position:relative;width:100%;margin:1rem 0}.score-scale[_ngcontent-%COMP%]{position:relative;height:20px;width:100%;border-radius:4px;background:linear-gradient(to right,#c03700,#d47f00,#dfc500 66%,#417505)}.score-marker[_ngcontent-%COMP%]{position:absolute;top:-5px;width:6px;height:30px;background-color:#2821eb;transition:left .3s ease;border-radius:2px}.score-tick[_ngcontent-%COMP%]{position:absolute;top:0;width:1px;height:8px;background-color:#000;transform:translateY(-8px)}.score-tick-label[_ngcontent-%COMP%]{position:absolute;top:-20px;left:-4px;font-weight:700;font-size:small}.score-scale-labels[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:.5rem;width:100%}.level-label[_ngcontent-%COMP%]{text-align:center;font-weight:700;font-size:small;flex:1}"]})}}return e})();function L6t(e,i){if(1&e&&(J(0,"mat-radio-button",17),ut(1),J(2,"p",18),ut(3),et()()),2&e){const t=i.$implicit;vt("value",t.id),ot(),Je(" ",t.name," "),ot(2),Je(" ",t.description,"")}}function N6t(e,i){1&e&&(J(0,"div",19),ut(1," Please select a stakeholder. "),et())}function B6t(e,i){if(1&e&&(J(0,"div")(1,"h2"),ut(2,"Stakeholder Description"),et(),J(3,"mat-form-field",20)(4,"mat-label"),ut(5),vs(6,"titlecase"),et(),ye(7,"input",21),J(8,"mat-hint"),ut(9,"Stakeholder name to be included in the final assessment report. This information is not stored."),et()(),J(10,"mat-form-field",22)(11,"mat-label"),ut(12,"User name "),et(),ye(13,"input",23),J(14,"mat-hint"),ut(15,"User name to be included in the final assessment report. This information is not stored."),et()()()),2&e){let t;const n=St(2);ot(5),Je("",Jl(6,3,null==(t=n.getStakeHolder(n.responseForm.controls.selectedStakeholder.value))?null:t.name)," name "),ot(2),vt("formControl",n.nameControl),ot(6),vt("formControl",n.authorControl)}}function V6t(e,i){if(1&e){const t=xe();J(0,"div",6)(1,"div",7)(2,"h2"),ut(3,"Select Stakeholder"),et(),J(4,"div",2)(5,"div",8)(6,"mat-radio-group",9),Ht(7,L6t,4,3,"mat-radio-button",10),et(),Ht(8,N6t,2,0,"div",11),et(),J(9,"div",12),Ht(10,B6t,16,5,"div",13),et()(),J(11,"div",14)(12,"button",15),Ut("click",function(){return zt(t),Gt(St().onStakeholderSelected())}),ut(13," Start "),et(),J(14,"input",16,1),Ut("change",function(r){return zt(t),Gt(St().loadState(r))}),et(),J(16,"button",3),Ut("click",function(){return zt(t),Gt(Zi(15).click())}),ut(17,"Upload assessment"),et()()()()}if(2&e){const t=St();ot(),vt("formGroup",t.responseForm),ot(5),vt("formControl",t.currentControl)("@questionAnimation",t.animationState),ot(),vt("ngForOf",t.maturityQuestions.stakeHolders),ot(),vt("ngIf",(null==t.responseForm.controls.selectedStakeholder?null:t.responseForm.controls.selectedStakeholder.invalid)&&(null==t.responseForm.controls.selectedStakeholder?null:t.responseForm.controls.selectedStakeholder.touched)),ot(2),vt("ngIf",!t.responseForm.controls.selectedStakeholder.invalid),ot(2),vt("disabled",t.responseForm.controls.selectedStakeholder.invalid)}}function U6t(e,i){if(1&e&&(J(0,"mat-checkbox",30),ut(1),ye(2,"br"),J(3,"span",31),ut(4),et()()),2&e){const t=St().$implicit;vt("formControl",St(3).getKpaControl(t.id)),ot(),Je(" ",t.name,""),ot(3),Ke(t.description)}}function z6t(e,i){if(1&e&&(J(0,"div",28),Ht(1,U6t,5,3,"mat-checkbox",29),et()),2&e){const t=i.$implicit,n=St(3);ot(),vt("ngIf",n.getKpaControl(t.id))}}function G6t(e,i){if(1&e){const t=xe();J(0,"button",15),Ut("click",function(){return zt(t),Gt(St(3).filterKpasAndGoNext())}),ut(1," Next "),et()}2&e&&vt("disabled",St(3).currentControl.invalid)}function H6t(e,i){if(1&e){const t=xe();J(0,"div",7)(1,"h2"),ut(2),et(),J(3,"section",25)(4,"h4"),ut(5,"Select Relevant Key Process Areas:"),et(),Ht(6,z6t,2,1,"div",26),et(),J(7,"div",14),Ht(8,G6t,2,1,"button",27),et(),J(9,"div",14)(10,"button",3),Ut("click",function(){return zt(t),Gt(St(2).startOver())}),ut(11," Restart assessment "),et()()()}if(2&e){const t=St(2);vt("formGroup",t.responseForm),ot(2),sl("Stakeholder: ",t.nameControl.value," (",t.allQuestions[t.currentQuestionIndex+1].stakeholderName,")"),ot(4),vt("ngForOf",t.currentKpas),ot(2),vt("ngIf",t.currentQuestionIndex0),ot(),vt("ngIf",t.currentQuestionIndex{class e{constructor(t,n,r){this.http=t,this.fb=n,this.dialog=r,this.baseMaturityQuestions={},this.maturityQuestions={},this.allQuestions=[],this.currentQuestionIndex=-2,this.selectedStakeholder=null,this.animationState="enter",this.currentKpas=[],this.responseForm=this.fb.group({selectedStakeholder:new Fs(null,xu.required)}),this.currentControl=this.responseForm.controls.selectedStakeholder}ngOnInit(){var t=this;return we(function*(){t.baseMaturityQuestions=yield Ia(t.http.get("assets/maturity/maturityLevels.json")),t.initializeForm()})()}initializeForm(){var t=this;return we(function*(){t.maturityQuestions=lBt()(t.baseMaturityQuestions),t.nameControl=new Fs(null),t.authorControl=new Fs(null),t.timestampControl=new Fs((new Date).toISOString()),t.responseForm=t.fb.group({selectedStakeholder:new Fs(null,xu.required),name:t.nameControl,author:t.authorControl,timestamp:t.timestampControl}),t.currentControl=t.responseForm.controls.selectedStakeholder,t.maturityQuestions.stakeHolders.forEach(n=>{n.kpas.forEach(r=>{r.questions.forEach(s=>{const o=[n.id,r.id,s.id].join(".");t.responseForm.addControl(o,new Fs(null,xu.required))})})})})()}onStakeholderSelected(){this.animationState="leave",setTimeout(()=>{const t=this.responseForm.get("selectedStakeholder")?.value;this.selectedStakeholder=this.getStakeHolder(t);const n=this.fb.group({});this.selectedStakeholder.kpas.forEach(r=>{n.addControl(r.id,this.fb.control(!0))}),this.responseForm.addControl("selectedKpas",n),this.currentKpas=this.selectedStakeholder.kpas,this.flattenQuestions(),this.currentQuestionIndex++,this.animationState="enter"},200)}getKpaControl(t){return this.responseForm.get("selectedKpas")?.get(t)}getStakeHolder(t){return this.maturityQuestions.stakeHolders.find(r=>r.id===t)}flattenQuestions(){this.allQuestions=[],this.selectedStakeholder&&this.selectedStakeholder.kpas.forEach(t=>{t.questions.forEach(n=>{const r=[this.selectedStakeholder.id,t.id,n.id].join(".");this.allQuestions.push({stakeholderName:this.selectedStakeholder.name,kpaName:t.name,kpaId:t.id,question:n,questionFullPath:r})})})}filterKpasAndGoNext(){this.animationState="leave";const t=this.responseForm.get("selectedKpas"),n=Object.keys(t.controls).filter(r=>t.get(r)?.value);this.selectedStakeholder.kpas.forEach(r=>{n.includes(r.id)||r.questions.forEach(s=>{const o=[this.selectedStakeholder.id,r.id,s.id].join(".");this.responseForm.contains(o)&&this.responseForm.removeControl(o)})}),this.allQuestions=this.allQuestions.filter(r=>n.includes(r.kpaId)),setTimeout(()=>{this.currentQuestionIndex++,this.allQuestions.length>0&&(this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath]),this.animationState="enter"},200)}goToNextQuestion(){this.animationState="leave",setTimeout(()=>{this.currentQuestionIndex++,this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath],this.animationState="enter"},200)}goToPreviousQuestion(){this.animationState="leave",setTimeout(()=>{this.currentQuestionIndex--,this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath],this.animationState="enter"},200)}startOver(){this.currentQuestionIndex=-2,this.responseForm.reset(),this.currentKpas=[],this.selectedStakeholder=null,this.allQuestions=[],this.initializeForm()}uploadSpecification(t){if(1!==t.target.files.length)console.error("No file selected");else{const n=new FileReader;n.onloadend=r=>{if(n.result){const s=JSON.parse(n.result?.toString());this.maturityQuestions=s}},n.readAsText(t.target.files[0])}}downloadSpecification(){const t=JSON.stringify(this.maturityQuestions,null,2),n="data:application/json;charset=utf-8,"+encodeURIComponent(t),s=document.createElement("a");s.setAttribute("href",n),s.setAttribute("download","maturity_specification.json"),s.click()}submitStakeholderResponses(){this.timestampControl.setValue((new Date).toISOString()),this.animationState="leave",setTimeout(()=>{this.currentQuestionIndex++,this.animationState="enter"},200)}getStakeholderFormGroup(t){return this.responseForm.get(t)}getKpas(t){return this.getStakeHolder(t).kpas}getUnansweredCount(t){let n=0;const r=this.responseForm.get(t);return r&&Object.keys(r.controls).forEach(s=>{const o=r.get(s);o&&Object.keys(o.controls).forEach(l=>{const w=o.get(l);w&&w.invalid&&n++})}),n}saveState(){const t={selectedStakeholder:this.responseForm.get("selectedStakeholder")?.value,selectedKpas:this.responseForm.get("selectedKpas")?.value,responses:this.responseForm.value,currentQuestionIndex:this.currentQuestionIndex,currentControl:this.currentControl?.value,animationState:this.animationState,name:this.nameControl.value,author:this.authorControl.value,timestamp:this.timestampControl.value,allQuestions:this.allQuestions},n=new Blob([JSON.stringify(t)],{type:"application/json"}),r=document.createElement("a");r.href=URL.createObjectURL(n),r.download="maturity-assessment-results.json",r.click()}loadState(t){if(1!==t.target.files.length)return void console.error("No file selected");const n=new FileReader;n.onloadend=()=>{if(!n.result)return void console.error("FileReader result is empty");const r=JSON.parse(n.result.toString());this.responseForm.reset(),this.currentQuestionIndex=-2,this.allQuestions=[],this.selectedStakeholder=null,this.currentKpas=[],this.initializeForm().then(()=>{this.nameControl.setValue(r.name),this.authorControl.setValue(r.author),this.timestampControl.setValue(r.timestamp);const s=r.selectedStakeholder,o=r.selectedKpas||{};this.responseForm.get("selectedStakeholder")?.setValue(s);const l=this.fb.group({}),w=this.getStakeHolder(s);this.selectedStakeholder=w,w?.kpas&&w.kpas.forEach(k=>{l.addControl(k.id,this.fb.control(!!o[k.id]))}),this.responseForm.setControl("selectedKpas",l),this.selectedStakeholder?.kpas&&this.selectedStakeholder.kpas.forEach(k=>{k.questions.forEach(O=>{const L=[this.selectedStakeholder.id,k.id,O.id].join(".");this.responseForm.contains(L)||this.responseForm.addControl(L,new Fs(null,xu.required))})});const E=Object.keys(o).filter(k=>o[k]);this.selectedStakeholder?.kpas&&this.selectedStakeholder.kpas.forEach(k=>{E.includes(k.id)||k.questions.forEach(O=>{const L=[this.selectedStakeholder.id,k.id,O.id].join(".");this.responseForm.contains(L)&&this.responseForm.removeControl(L)})}),this.flattenQuestions(),this.allQuestions=this.allQuestions.filter(k=>E.includes(k.kpaId));const D=r.responses||{};Object.keys(D).forEach(k=>{this.responseForm.contains(k)&&this.responseForm.controls[k].setValue(D[k])}),this.currentQuestionIndex=r.currentQuestionIndex||-2,this.animationState=r.animationState||"enter"})},n.readAsText(t.target.files[0])}static{this.\u0275fac=function(n){return new(n||e)(pt(Il),pt(bE),pt(Dp))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-maturity-main"]],decls:11,vars:4,consts:[["fileInput",""],["fileInputState",""],[1,"flex","flex-row","gap-4","justify-end","flex-wrap","p-2"],["mat-flat-button","","color","primary",3,"click"],["hidden","","type","file","id","file",3,"change"],["class","question-flow-container",4,"ngIf"],[1,"question-flow-container"],[1,"question-container",3,"formGroup"],[1,"flex-1"],[1,"options-container",3,"formControl"],["class","mb-5",3,"value",4,"ngFor","ngForOf"],["class","error-message",4,"ngIf"],[1,"flex-1","mb-10"],[4,"ngIf"],[1,"button-container"],["mat-flat-button","","color","primary",3,"click","disabled"],["hidden","","type","file","id","fileState",3,"change"],[1,"mb-5",3,"value"],[1,"stakeholder-description"],[1,"error-message"],[1,"w-full"],["matInput","","placeholder","Enter stakeholder name...",3,"formControl"],[1,"w-full","mt-10"],["matInput","","placeholder","Enter the name of the user conducting the assessment...",3,"formControl"],["class","question-container",3,"formGroup",4,"ngIf"],[1,"example-section","mt-10"],["class","kpa-checkbox",4,"ngFor","ngForOf"],["mat-flat-button","","color","primary",3,"disabled","click",4,"ngIf"],[1,"kpa-checkbox"],[3,"formControl",4,"ngIf"],[3,"formControl"],[1,"kpa-description"],["mode","determinate",1,"progress-bar",3,"value"],[1,"progress-message"],[1,"question-text"],[3,"value",4,"ngFor","ngForOf"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],[3,"value"],[1,"mat-radio-label-content"],["matTooltipPosition","right",3,"matTooltip",4,"ngIf"],["matTooltipPosition","right",3,"matTooltip"],["mat-flat-button","","color","accent",3,"click","disabled"],[1,"question-container"],[1,"text-center"],[1,"text-center","mt-10","text-lg"],[3,"maturityResponse","allQuestions"]],template:function(n,r){if(1&n){const s=xe();J(0,"div",2)(1,"button",3),Ut("click",function(){return zt(s),Gt(r.downloadSpecification())}),ut(2,"Download Maturiry Spec"),et(),J(3,"input",4,0),Ut("change",function(l){return zt(s),Gt(r.uploadSpecification(l))}),et(),J(5,"button",3),Ut("click",function(){return zt(s),Gt(Zi(4).click())}),ut(6,"Upload Maturity Spec"),et()(),Ht(7,V6t,18,7,"div",5)(8,W6t,2,1,"div",5)(9,J6t,2,1,"div",5)(10,tUt,22,11,"div",5)}2&n&&(ot(7),vt("ngIf",-2===r.currentQuestionIndex),ot(),vt("ngIf",-1===r.currentQuestionIndex),ot(),vt("ngIf",r.currentQuestionIndex>=0&&r.currentQuestionIndex leave",[mn("200ms ease-in-out",oi({opacity:0}))]),gn("leave => enter",[oi({opacity:0}),mn("200ms ease-in-out",oi({opacity:1}))])])]}})}}return e})(),Dtt=(()=>{class e{constructor(){this.demos=[{name:"Clinical User Interface Demo",subtitle:"Clinical demo",type:"external",url:"http://snomed.org/ui",description:"A simulation of clinical data entry on an EHR using SNOMED FHIR Terminology services"},{name:"Allergies",subtitle:"Clinical demo",type:"internal",url:"/allergies",description:"A SNOMED / FHIR implementation demo of recording Allergy / Intollerance details, from Allergies Clinical Reference Group"},{name:"Terminology Bindings Sandbox",subtitle:"Learning demo",type:"internal",url:"/sandbox",description:"A sandbox for learning and testing terminology bindings"},{name:"SNOMED Maps Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-icd-maps",description:"A SNOMED / ICD-10 maps demonstration, including complex map rules execution"},{name:"Post-coordination Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-postcoordination",description:"A SNOMED post-coordination demonstration, with new prototype Postcoordination Terminology server SNOWSTORM X"},{name:"IPS Terminology Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-ips/",description:"A demonstration of the International Patient Summary (IPS) terminology, including the IPS SNOMED CT refset"},{name:"SNOMED & FHIR Questionnaires Manager Application",subtitle:"Application",type:"internal",url:"/questionnaires",description:"An application to manage a FHIR Questionnaires repository, with SNOMED CT bindings"},{name:"SNOMED & FHIR Questionnaires Utilities",subtitle:"Utilities",type:"internal",url:"/questionnaires",queryParams:{utility:!0},description:"Utilities for working with FHIR Questionnaires, including SNOMED CT bindings"},{name:"Context Representation Transformations",subtitle:"Learning demo",type:"internal",url:"/context",description:"A demonstration of the transformation of context representations from SNOMED to FHIR Resources"},{name:"SNOMED and LLMs (AI Demo)",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/openai-demo/",description:"This demo uses OpenAI ChatGPT API to demonstrate the use of SNOMED CT with Language Model Models (LLMs). A developer key for the OpenAI API is required."},{name:"Snoguess (A SNOMED game)",subtitle:"Game",type:"internal",url:"/snoguess",description:"A SNOMED term guessing game, learn about SNOMED content while having fun and competing to achieve the highest score"},{name:"SNOMED Implementation Roadmap Generator",subtitle:"Tool",type:"external",url:"https://ihtsdo.github.io/roadmap-generator",description:"A tool designed to promote and support the creation of implementation roadmaps for the adoption of SNOMED CT in countries, regions or organizations."}]}getDemos(){return this.demos}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function iUt(e,i){if(1&e){const t=xe();J(0,"div",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-subtitle"),ut(4),et(),J(5,"mat-card-title"),ut(6),et()(),J(7,"mat-card-content")(8,"p"),ut(9),et()(),J(10,"mat-card-actions")(11,"button",10),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().navigate(r))}),ut(12,"OPEN"),et()()()()}if(2&e){const t=i.$implicit;ot(4),Ke(t.subtitle),ot(2),Ke(t.name),ot(3),Ke(t.description)}}let Mtt=(()=>{class e{constructor(t,n,r){this.router=t,this.route=n,this.menuService=r,this.demos=[]}ngOnInit(){this.demos=this.menuService.getDemos()}navigate(t){if("internal"===t.type){let n=t.queryParams,r=this.route.snapshot.queryParams;n=n?{...r,...n}:r,this.router.navigate([t.url],{queryParams:n})}else this.openInNewTab(t.url)}openInNewTab(t){window.open(t,"_blank")}static{this.\u0275fac=function(n){return new(n||e)(pt(Ho),pt(nc),pt(Dtt))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-home"]],decls:17,vars:1,consts:[[1,"main-panel"],[1,"intro"],["href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank"],["href","https://confluence.ihtsdotools.org/display/CP/Clinical+Engagement","target","_blank"],[1,"demos-panel"],["class","demo-card-wrapper",4,"ngFor","ngForOf"],[1,"center-image"],["src","assets/img/SI_CT_Logo_Delivered_By.png","alt","SNOMED Logo",1,"transparent-image"],[1,"demo-card-wrapper"],[1,"demo-card"],["mat-button","","color","accent",3,"click"]],template:function(n,r){1&n&&(J(0,"div",0)(1,"h1"),ut(2,"SNOMED CT Implementation Demonstrators"),et(),J(3,"p",1),ut(4,"Welcome to our collection of SNOMED CT Implementation Demonstrators! This curated selection of demos showcases the diverse ways SNOMED CT can be implemented across different use cases. Each demonstration is "),J(5,"a",2),ut(6,"open source"),et(),ut(7,", free to explore, and easy to replicate, providing a hands-on learning experience for developers, implementers, and healthcare professionals."),et(),J(8,"p",1),ut(9,"These implementation demos have been created through the collaboration and expertise of the "),J(10,"a",3),ut(11,"global SNOMED CT community of clinical experts"),et(),ut(12,", reflecting best practices and innovative use cases. Whether you\u2019re just getting started with SNOMED CT or looking to deepen your understanding, you\u2019ll find valuable insights here. Explore, learn, and join us in advancing healthcare interoperability."),et(),J(13,"div",4),Ht(14,iUt,13,3,"div",5),et(),J(15,"div",6),ye(16,"img",7),et()()),2&n&&(ot(14),vt("ngForOf",r.demos))},dependencies:[ys,Cs,tb,tk,JP,ek,qP,ZP],styles:[".main-panel[_ngcontent-%COMP%]{padding:2rem;height:calc(100vh - 70px)}.intro[_ngcontent-%COMP%]{font-size:1.2rem;margin-bottom:1.5rem}.demos-panel[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;margin-top:3rem}.demo-card-wrapper[_ngcontent-%COMP%]{width:300px}.demo-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}mat-card-title[_ngcontent-%COMP%]{word-wrap:break-word;font-size:large;font-weight:700}mat-card-content[_ngcontent-%COMP%]{padding:1rem;margin-bottom:2rem}mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;padding-top:10px;margin-top:auto}.center-image[_ngcontent-%COMP%]{text-align:center;margin-top:4rem;margin-left:20%;margin-right:20%}.transparent-image[_ngcontent-%COMP%]{opacity:.5}"]})}}return e})();function nUt(e,i){if(1&e){const t=xe();J(0,"app-autocomplete-binding",9),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function rUt(e,i){if(1&e){const t=xe();J(0,"app-dropdown-binding",9),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function sUt(e,i){if(1&e){const t=xe();J(0,"app-radios-binding",9),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function aUt(e,i){if(1&e&&(J(0,"span",10),ut(1),et()),2&e){const t=St().$implicit;ot(),Ke(t.title)}}function oUt(e,i){if(1&e){const t=xe();J(0,"app-textbox-binding",11),Ut("textChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function lUt(e,i){if(1&e){const t=xe();J(0,"app-integer-binding",11),Ut("textChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function cUt(e,i){if(1&e){const t=xe();J(0,"app-decimal-binding",11),Ut("textChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function uUt(e,i){if(1&e){const t=xe();J(0,"app-checkbox-binding",9),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function hUt(e,i){if(1&e){const t=xe();J(0,"app-checkbox-multiple-binding",9),Ut("selectionChange",function(r){zt(t);const s=St().$implicit;return Gt(St().optionSelected(s.title,s.code,r))}),et()}2&e&&vt("binding",St().$implicit)}function dUt(e,i){if(1&e&&(J(0,"button",12)(1,"mat-icon"),ut(2,"info"),et()()),2&e){const t=St().$implicit;vt("matMenuTriggerFor",Zi(13))("disabled",!t.code&&!t.ecl)}}function fUt(e,i){if(1&e){const t=xe();J(0,"span",13),Ut("click",function(r){return zt(t),Gt(r.stopPropagation())}),J(1,"h4"),ut(2,"Question terminology binding"),et(),J(3,"pre"),ut(4),et()()}if(2&e){const t=St().$implicit;vt("disableRipple",!0),ot(4),sl("",null==t.code?null:t.code.code," |",null==t.code?null:t.code.display,"|")}}function pUt(e,i){if(1&e){const t=xe();J(0,"span",13),Ut("click",function(r){return zt(t),Gt(r.stopPropagation())}),J(1,"h4"),ut(2,"Answer terminology binding"),et(),J(3,"pre"),ut(4),et()()}if(2&e){const t=St().$implicit;vt("disableRipple",!0),ot(4),Ke(t.ecl)}}function mUt(e,i){if(1&e&&(J(0,"div",2)(1,"div",3),Ht(2,nUt,1,1,"app-autocomplete-binding",4)(3,rUt,1,1,"app-dropdown-binding",4)(4,sUt,1,1,"app-radios-binding",4)(5,aUt,2,1,"span",5)(6,oUt,1,1,"app-textbox-binding",6)(7,lUt,1,1,"app-integer-binding",6)(8,cUt,1,1,"app-decimal-binding",6)(9,uUt,1,1,"app-checkbox-binding",4)(10,hUt,1,1,"app-checkbox-multiple-binding",4)(11,dUt,3,2,"button",7),J(12,"mat-menu",null,0),Ht(14,fUt,5,3,"span",8)(15,pUt,5,2,"span",8),et()()()),2&e){const t=i.$implicit;ot(2),vt("ngIf","Autocomplete"==t.type),ot(),vt("ngIf","Select (Single)"==t.type||"Select (Multiple)"==t.type),ot(),vt("ngIf","Options"==t.type),ot(),vt("ngIf","Section header"==t.type),ot(),vt("ngIf","Text box"==t.type),ot(),vt("ngIf","Integer"==t.type),ot(),vt("ngIf","Decimal"==t.type),ot(),vt("ngIf","Checkbox"==t.type),ot(),vt("ngIf","Checkbox multiple"==t.type),ot(),vt("ngIf","Section header"!=t.type),ot(3),vt("ngIf",t.code),ot(),vt("ngIf",t.ecl)}}let gUt=(()=>{class e{constructor(){this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}"}optionSelected(t,n,r){this.output[t]={code:n,value:r},n||delete this.output[t].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}refreshResponse(){this.response={};for(let t of this.spec.bindings)this.response[t.title]={},t.code&&(this.response[t.title].code=t.code);for(let[t,n]of Object.entries(this.output))this.output[t].code&&(this.response[t].code=this.output[t].code),this.output[t].value&&(this.response[t].value=this.output[t].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[t,n]of Object.entries(this.response)){let r=n;const s=r.code?{coding:[{system:"http://snomed.info/sct",code:r.code.code,display:r.code.display}]}:void 0,o=r.value?.code?{coding:[{system:"http://snomed.info/sct",code:r.value.code,display:r.value.display}]}:void 0;let l={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};l.code=s||{coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},o&&(l.valueCodeableConcept=o),r.value&&"string"==typeof r.value&&(l.valueString=r.value),(l.valueCodeableConcept||l.valueString)&&this.responseBundle.entry.push(l)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-bindings-viewer"]],inputs:{spec:"spec"},decls:3,vars:2,consts:[["substancePopoverMenu","matMenu"],["class","output-panel",4,"ngFor","ngForOf"],[1,"output-panel"],[1,"row","control"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"selectionChange","binding"],[1,"title","grow"],[1,"grow",3,"textChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],["mat-menu-item","",3,"click","disableRipple"]],template:function(n,r){1&n&&(J(0,"h2"),ut(1),et(),Ht(2,mUt,16,12,"div",1)),2&n&&(ot(),Ke(r.spec.title),ot(),vt("ngForOf",r.spec.bindings))},dependencies:[ys,ls,jo,ga,Rl,oc,vh,Ev,PY,LY,NY,UY,zY,GY,HY],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"]})}}return e})();function vUt(e,i){if(1&e&&(J(0,"mat-tab",7)(1,"div",8),ye(2,"app-bindings-viewer",9),et()()),2&e){const t=i.$implicit;yd("label",t.spec.title),ot(2),vt("spec",t.spec)}}let yUt=(()=>{class e{constructor(t){this.http=t,this.emptySpec={},this.specs=[{specFile:"Example-spec.json",spec:this.emptySpec},{specFile:"Example-spec-2.json",spec:this.emptySpec}]}ngOnInit(){var t=this;this.specs.forEach(function(){var n=we(function*(r){const s=yield Ia(t.http.get("assets/specs/ncpt/"+r.specFile));console.log(s),r.spec=s});return function(r){return n.apply(this,arguments)}}())}static{this.\u0275fac=function(n){return new(n||e)(pt(Il))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-ncpt"]],decls:20,vars:3,consts:[["substancePopoverMenu","matMenu"],[1,"outer-container"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/display/WIPnutsig/SNOMED+CT+Implementation+Guide+for+the+Nutrition+Care+Process+Terminology","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"container"],[3,"spec"]],template:function(n,r){if(1&n){const s=xe();J(0,"div",1)(1,"h3"),ut(2,"SNOMED CT - NCPT Implementation Demonstrator "),J(3,"button",2)(4,"mat-icon"),ut(5,"info"),et()(),J(6,"mat-menu",null,0)(8,"span",3),Ut("click",function(l){return zt(s),Gt(l.stopPropagation())}),J(9,"h4"),ut(10,"SNOMED CT - NCPT Implementation Demonstrator"),et(),J(11,"p"),ut(12,"This is a demonstration of the use of SNOMED CT for coding clinical information related to the Nutrition Care Process."),et(),J(13,"p"),ut(14,"For more information check the "),J(15,"a",4),ut(16," Implementation Guide"),et(),ut(17,"."),et()()()(),J(18,"mat-tab-group",5),Ht(19,vUt,3,2,"mat-tab",6),et()()}if(2&n){const s=Zi(7);ot(3),vt("matMenuTriggerFor",s),ot(5),vt("disableRipple",!0),ot(11),vt("ngForOf",r.specs)}},dependencies:[ys,jo,ga,Rl,oc,vh,_v,Ap,gUt],styles:[".outer-container[_ngcontent-%COMP%]{margin:1rem;width:calc(100% - 2rem)}.container[_ngcontent-%COMP%]{margin:2rem;width:calc(100% - 4rem)}"]})}}return e})();const xUt=()=>["/reports"];function bUt(e,i){1&e&&(J(0,"div",4),ut(1," Loading...\n"),et())}let Itt=(()=>{class e{constructor(t,n,r){this.http=t,this.renderer=n,this.elementRef=r,this.loading=!0}ngOnInit(){this.http.get("assets/reports/fsn_changes_with_details.html",{responseType:"text"}).subscribe(t=>{this.loading=!1;const n=this.elementRef.nativeElement.querySelector("#chart-container");n.innerHTML=t,n.querySelectorAll("script").forEach(s=>{const o=this.renderer.createElement("script");o.type=s.type||"text/javascript",s.src?o.src=s.src:o.text=s.textContent||"",this.renderer.appendChild(n,o)})})}static{this.\u0275fac=function(n){return new(n||e)(pt(Il),pt(Kl),pt(ai))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-fsn-changes"]],decls:5,vars:3,consts:[[1,"pt-5","pl-10"],["mat-flat-button","","color","primary",3,"routerLink"],["class","mt-20 ml-10",4,"ngIf"],["id","chart-container",1,"mb-20"],[1,"mt-20","ml-10"]],template:function(n,r){1&n&&(J(0,"div",0)(1,"button",1),ut(2,"Back to reports"),et()(),Ht(3,bUt,2,0,"div",2),ye(4,"div",3)),2&n&&(ot(),vt("routerLink",Xa(2,xUt)),ot(2),vt("ngIf",r.loading))},dependencies:[ls,ov,Cs],styles:["#chart-container[_ngcontent-%COMP%]{padding:10px}"]})}}return e})();const wUt=()=>["/reports"];function TUt(e,i){1&e&&(J(0,"div",4),ut(1," Loading...\n"),et())}let CUt=(()=>{class e{constructor(t,n,r){this.http=t,this.renderer=n,this.elementRef=r,this.loading=!0}ngOnInit(){this.http.get("assets/reports/detect_inactivations_by_reason.html",{responseType:"text"}).subscribe(t=>{this.loading=!1;const n=this.elementRef.nativeElement.querySelector("#chart-container");n.innerHTML=t,n.querySelectorAll("script").forEach(s=>{const o=this.renderer.createElement("script");o.type=s.type||"text/javascript",s.src?o.src=s.src:o.text=s.textContent||"",this.renderer.appendChild(n,o)})})}static{this.\u0275fac=function(n){return new(n||e)(pt(Il),pt(Kl),pt(ai))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-inactivations-report"]],decls:5,vars:3,consts:[[1,"pt-5","pl-10"],["mat-flat-button","","color","primary",3,"routerLink"],["class","mt-20 ml-10",4,"ngIf"],["id","chart-container"],[1,"mt-20","ml-10"]],template:function(n,r){1&n&&(J(0,"div",0)(1,"button",1),ut(2,"Back to reports"),et()(),Ht(3,TUt,2,0,"div",2),ye(4,"div",3)),2&n&&(ot(),vt("routerLink",Xa(2,wUt)),ot(2),vt("ngIf",r.loading))},dependencies:[ls,ov,Cs],styles:["#chart-container[_ngcontent-%COMP%]{padding:10px}"]})}}return e})();function SUt(e,i){if(1&e){const t=xe();J(0,"div",12)(1,"mat-card",13)(2,"mat-card-header")(3,"mat-card-subtitle"),ut(4),et(),J(5,"mat-card-title"),ut(6),et()(),J(7,"mat-card-content")(8,"p"),ut(9),et()(),J(10,"mat-card-actions")(11,"button",14),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().navigate(r))}),ut(12,"OPEN"),et()()()()}if(2&e){const t=i.$implicit;ot(4),Ke(t.subtitle),ot(2),Ke(t.name),ot(3),Ke(t.description)}}let EUt=(()=>{class e{constructor(t,n){this.router=t,this.route=n,this.reports=[{type:"external",name:"RF2 History Mechanism",subtitle:"Specification Guide",url:"https://confluence.ihtsdotools.org/display/DOCRELFMT/3.1.5+History+Mechanism",description:"How SNOMED terminology changes are represented in the release files."},{type:"external",name:"Historical Associations Refset",subtitle:"Specification Guide",url:"https://confluence.ihtsdotools.org/display/DOCRELFMT/5.2.5.1+Historical+Association+Reference+Sets",description:"How SNOMED represents historical associations linking active components with inactive ones."},{type:"external",name:"Editorial Conventions for Changes in Components",subtitle:"Editorial Guide",url:"https://confluence.ihtsdotools.org/display/EDUEG/Changes+to+Components",description:"An educational resource outlining policies for managing terminology changes."},{type:"external",name:"Translation Maintenance Advice",subtitle:"Translation Management Guide",url:"https://confluence.ihtsdotools.org/display/DOCMANAGETRANS/5.+Maintenance+of+a+Translation",description:"Recommendations for managing translations, adapting to changes in international concepts and descriptions."},{type:"external",name:"Managing Inactivations in the Authoring Platform",subtitle:"User Guide",url:"https://confluence.ihtsdotools.org/display/SIAPUG/Inactivation+-+Descriptions%2C+Relationships%2C+and+Concepts",description:"Step by step guides on how to perform content inactivations in the Authoring Platform."},{type:"external",name:"Managing Inactivations in the Refset & Translation Tool",subtitle:"User Guide",url:"https://confluence.ihtsdotools.org/display/REFSET/Migration",description:"Features in the Refset & Translation Tool that support content migration between releases and the replacement of inactive content in refsets."},{type:"external",name:"Managing Inactivations in Snap2Snomed",subtitle:"User Guide",url:"https://confluence.ihtsdotools.org/display/S2SUG/Appendix+A+-+FAQs",description:"How inactive content is reported in Snap2Snomed and how the tool supports replacement selection."},{type:"external",name:"History Supplements in ECL",subtitle:"User Guide",url:"https://confluence.ihtsdotools.org/display/DOCECL/6.11+History+Supplements",description:"How history supplements can be applied to an expression constraint to include relevant inactive concepts in the results."},{type:"external",name:"Release Management Home",subtitle:"Release Notes",url:"https://confluence.ihtsdotools.org/display/RMT/SNOMED+International+Release+Management+Home",description:"Information on past and upcoming SNOMED Releases and access to Releases Notes describing content changes."},{type:"external",name:"Last International Release Statistics",subtitle:"Changes Report",url:"https://browser.ihtsdotools.org/qa/#/SNOMEDCT",description:"Descriptive statistics from the latest release of the International Edition of SNOMED CT."},{type:"internal",name:"FSN Changes",subtitle:"Changes Report",url:"reports/fsn",description:"This report displays changes to the FSN of concepts over time."},{type:"internal",name:"Inactivations",subtitle:"Changes Report",url:"reports/inactivations",description:"This report displays concept inactivations over time."},{type:"internal",name:"New Concepts",subtitle:"Changes Report",url:"reports/new-concepts",description:"This report displays newly added concepts over time."}]}navigate(t){if("internal"===t.type){let n=t.queryParams,r=this.route.snapshot.queryParams;n=n?{...r,...n}:r,this.router.navigate([t.url],{queryParams:n})}else this.openInNewTab(t.url)}openInNewTab(t){window.open(t,"_blank")}static{this.\u0275fac=function(n){return new(n||e)(pt(Ho),pt(nc))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-reports-main"]],decls:23,vars:1,consts:[[1,"main-panel"],[1,"draft-banner"],[1,"mb-1"],[1,"text-gray-500"],[1,"text-container"],[1,"intro"],[1,"text-sm"],["href","https://pmc.ncbi.nlm.nih.gov/articles/PMC3415631/","target","_blank"],[1,"demos-panel"],["class","demo-card-wrapper",4,"ngFor","ngForOf"],[1,"center-image"],["src","assets/img/SI_CT_Logo_Delivered_By.png","alt","SNOMED Logo",1,"transparent-image"],[1,"demo-card-wrapper"],[1,"demo-card"],["mat-button","","color","accent",3,"click"]],template:function(n,r){1&n&&(J(0,"div",0)(1,"div",1)(2,"strong"),ut(3,"Draft Version:"),et(),ut(4," This page is a work in progress and for internal review only. "),et(),J(5,"h1",2),ut(6,"SNOMED CT as an evolving terminology"),et(),J(7,"h4",3),ut(8,"Supporting the management of terminology changes in clinical implementations"),et(),J(9,"div",4)(10,"p",5),ut(11,"Maintaining the integrity and usefulness of a clinical terminology like SNOMED CT requires continuous updates, including concept modifications and inactivations. These updates ensure that the terminology remains aligned with clinical practice and evolving medical knowledge while supporting interoperability across health systems. This page provides detailed information about SNOMED CT content changes, offering transparency for implementers, terminology managers, and system developers who depend on up-to-date SNOMED CT content for clinical decision support, coding, and analytics."),et(),J(12,"p",5),ut(13,"This aligns with the principle of graceful evolution, which emphasizes that terminologies should change in a way that minimizes disruption to users. SNOMED CT follows this principle by ensuring that inactivated concepts have clear historical relationships to their replacements, FSN changes history is fully tracked, and new concepts integrate seamlessly into existing hierarchies. "),J(14,"span",6)(15,"a",7),ut(16," Cimino J. J. (1998). Desiderata for controlled medical vocabularies in the twenty-first century. Methods of information in medicine, 37(4-5), 394\u2013403. "),et()()(),J(17,"p",5),ut(18,"While this information exists in the RF2 release files, it is spread across multiple tables and requires complex queries to interpret. These guides, tools, and reports are key in the maintenance of SNOMED extensions, helping implementers identify the volume of changes over time and track updates efficiently, and update extension content to ensure that SNOMED CT remains a reliable and evolving global standard while minimizing the impact of inevitable terminology changes. "),et()(),J(19,"div",8),Ht(20,SUt,13,3,"div",9),et(),J(21,"div",10),ye(22,"img",11),et()()),2&n&&(ot(20),vt("ngForOf",r.reports))},dependencies:[ys,Cs,tb,tk,JP,ek,qP,ZP],styles:[".main-panel[_ngcontent-%COMP%]{padding:2rem;height:calc(100vh - 70px)}.intro[_ngcontent-%COMP%]{font-size:1.1rem;text-align:justify;margin-bottom:10px;line-height:1.2}.demos-panel[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;margin-top:3rem}.demo-card-wrapper[_ngcontent-%COMP%]{width:300px}.demo-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}mat-card-title[_ngcontent-%COMP%]{word-wrap:break-word;font-size:large;font-weight:700}mat-card-content[_ngcontent-%COMP%]{padding:1rem;margin-bottom:2rem}mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;padding-top:10px;margin-top:auto}.center-image[_ngcontent-%COMP%]{text-align:center;margin-top:4rem;margin-left:20%;margin-right:20%}.transparent-image[_ngcontent-%COMP%]{opacity:.5}.text-container[_ngcontent-%COMP%]{text-align:justify;padding:1rem 2rem;background-color:#fff;border:1px solid #e0e0e0}.draft-banner[_ngcontent-%COMP%]{background-color:#fc0;color:#333;text-align:center;font-weight:700;padding:10px;font-size:1rem;border-bottom:2px solid #e6b800;position:relative;margin-bottom:1rem}"]})}}return e})();const _Ut=()=>["/reports"];function AUt(e,i){1&e&&(J(0,"div",4),ut(1," Loading...\n"),et())}let DUt=(()=>{class e{constructor(t,n,r){this.http=t,this.renderer=n,this.elementRef=r,this.loading=!0}ngOnInit(){this.http.get("assets/reports/new_concepts_by_semantic_tag.html",{responseType:"text"}).subscribe(t=>{this.loading=!1;const n=this.elementRef.nativeElement.querySelector("#chart-container");n.innerHTML=t,n.querySelectorAll("script").forEach(s=>{const o=this.renderer.createElement("script");o.type=s.type||"text/javascript",s.src?o.src=s.src:o.text=s.textContent||"",this.renderer.appendChild(n,o)})})}static{this.\u0275fac=function(n){return new(n||e)(pt(Il),pt(Kl),pt(ai))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-inactivations-report"]],decls:5,vars:3,consts:[[1,"pt-5","pl-10"],["mat-flat-button","","color","primary",3,"routerLink"],["class","mt-20 ml-10",4,"ngIf"],["id","chart-container"],[1,"mt-20","ml-10"]],template:function(n,r){1&n&&(J(0,"div",0)(1,"button",1),ut(2,"Back to reports"),et()(),Ht(3,AUt,2,0,"div",2),ye(4,"div",3)),2&n&&(ot(),vt("routerLink",Xa(2,_Ut)),ot(2),vt("ngIf",r.loading))},dependencies:[ls,ov,Cs],styles:["#chart-container[_ngcontent-%COMP%]{padding:10px}"]})}}return e})();var Rtt=Mt(3945),yA=Mt.n(Rtt);class DN extends yA().GameObjects.Rectangle{constructor(i,t,n,r=1,s=65280){super(i,t,n,40,40,s),this.inQueue=!1,this.queuePosition=0,this.queueStartTime=0,this.hitPoints=5,this.previousX=0,this.info={},this.speed=1,this.sceneRef=i,i.add.existing(this),i.physics.add.existing(this),this.body.setCollideWorldBounds(!0),this.body.setImmovable(!1),this.spriteType=r}walkTo(i,t){if(0===i.length)return void t();const n=r=>{if(r>=i.length)return void t();const s=i[r];this.sceneRef.tweens.add({targets:this,x:s.x,y:s.y,duration:s.duration/this.speed,ease:"Linear",onUpdate:()=>{},onComplete:()=>{n(r+1)}}),this.sceneRef.tweens.add({targets:this,yoyo:!0,repeat:s.duration/150,duration:150,onComplete:()=>{}})};n(0)}hurt(){this.hitPoints--;const i=this.sceneRef.add.text(this.x,this.y-10,"-1",{fontSize:"20px",color:"#ff0000",fontStyle:"bold"}).setOrigin(.5);this.sceneRef.tweens.add({targets:i,y:this.y-100,alpha:0,duration:3500/this.speed,ease:"Power2",onComplete:()=>i.destroy()}),this.hitPoints<=0&&this.destroy()}say(i,t=2e3){this.calloutText&&this.calloutText.destroy(),this.calloutLine&&this.calloutLine.destroy(),this.calloutText=this.sceneRef.add.text(this.x,this.y-50,i,{fontSize:"16px",color:"#ffffff",backgroundColor:"#000000",padding:{x:5,y:2},align:"center"}).setOrigin(.5).setDepth(10),this.calloutLine=this.sceneRef.add.line(this.x+5,this.y+10,0,0,10,-35,16777215).setLineWidth(1.5).setDepth(9),this.sceneRef.tweens.add({targets:[this.calloutText,this.calloutLine],alpha:0,duration:500/this.speed,delay:t,onComplete:()=>{this.calloutText?.destroy(),this.calloutText=void 0,this.calloutLine?.destroy()}})}}class MUt extends DN{constructor(i,t,n,r=1,s=[]){if(super(i,t,n,r,16711680),this.clinicalData={},this.dxOptions=[],this.setScale(.5),this.dxOptions=i.cache.json.get("diagnosisData"),this.clinicalData.age=Phaser.Math.Between(18,100),this.clinicalData.diagnosis=[],s&&s.length>0)this.clinicalData.diagnosis=s;else{const o=Phaser.Math.Between(1,2);for(let l=0;lthis.showDiagnosis()),this.on("pointerout",()=>this.hideDiagnosis())}showDiagnosis(){this.diagnosisText&&this.diagnosisText.destroy();let i=this.clinicalData.diagnosis.map(t=>t.display).join("\n");i||(i="No diagnosis available"),this.diagnosisText=this.sceneRef.add.text(this.x,this.y-50,i,{fontSize:"14px",color:"#ffffff",backgroundColor:"#000000",padding:{x:5,y:2},align:"center"}).setOrigin(.5).setDepth(10)}hideDiagnosis(){this.diagnosisText?.destroy(),this.diagnosisText=void 0}}class Ptt extends DN{constructor(i,t,n,r,s){super(i,t,n,2,16776960),this.triageRules=[],this.setScale(.5),this.triageRules=r,this.gameService=s,this.setInteractive({useHandCursor:!0})}setTriageRules(i){this.triageRules=i}triagePatient(i,t){return new Promise(n=>{this.gameService.checkPatientDiagnosisVsEcl(i,t).then(r=>{n(r.length>0)})})}}class IUt extends DN{constructor(i,t,n,r,s){super(i,t,n,2,255),this.specialityEcl="",this.title="",this.busy=!1,this.setScale(.5),this.specialityEcl=r,this.gameService=s,this.setInteractive({useHandCursor:!0})}setSpecialityEcl(i){this.specialityEcl=i}setTitle(i){this.title=i}setBusy(i){this.busy=i}isBusy(){return this.busy}attendPatient(i){return new Promise(t=>{this.gameService.checkPatientDiagnosisVsEcl(i,this.specialityEcl).then(n=>{n.length>0?(i.clinicalData.diagnosis.forEach(r=>{n.find(s=>s.code===r.code)&&(r.status="treated")}),t(!0)):t(!1)})})}}class RUt{constructor(i){this.terminologyService=i}checkPatientDiagnosisVsEcl(i,t){return new Promise((n,r)=>{let s=0,o="";i?.clinicalData.diagnosis.forEach((l,w)=>{"treated"!==l.status&&(s++,o+=s>1?` OR ${l.code}`:` ${l.code}`)}),0!==s?this.terminologyService.expandValueSetUsingCache(t=t+" AND ("+o+" )","").subscribe(l=>{n(l.expansion?.total>0?l.expansion.contains:[])},l=>{r(l)}):n([])})}}class PUt extends Phaser.Scene{constructor(i){super({key:"CdstdScene"}),this.terminologyService=i,this.maxPatients=10,this.spawnedPatients=0,this.patientsInQueue=0,this.outsideQueue=[],this.insideQueue=[],this.goodTriage=0,this.badTriage=0,this.diagnosisData=[],this.admitting=!1,this.lastTriageTime=0,this.speedMultiplier=1,this.admissionEcl="( << 386661006 |Fever| OR << 22253000 |Pain (finding)| )",this.internalTriageRules=[{ecl:"<< 386661006",doctorIndex:1},{ecl:"<< 22253000",doctorIndex:0},{ecl:"<< 22253000",doctorIndex:0}],this.attendingDoctors=[{x:130,y:207,title:"Cardiologist",ecl:"(<< 106063007 |Cardiovascular finding (finding)| OR << 29857009 |Chest pain (finding)|)"},{x:130,y:140,title:"Infectologist",ecl:"<< 386661006 |Fever (finding)|"}],this.gameService=new RUt(i),this.terminologyService.setSnowstormFhirBase("https://snowstorm-lite.nw.r.appspot.com/fhir")}setSpeedMultiplier(i){this.speedMultiplier=i}getSelectedSpeed(){return this.speedMultiplier}preload(){this.load.json("diagnosisData","assets/cdstd/Data/dx_1.json")}create(){this.input.keyboard?.on("keydown-ENTER",()=>{this.internalTriage()}),this.input?.keyboard?.on("keydown-A",()=>{this.testNextPatientForAdmission()}),this.diagnosisData=this.cache.json.get("diagnosisData"),this.scoreText=this.add.text(750,10,`Patients: ${this.spawnedPatients}`,{fontSize:"20px",color:"#ffffff",fontStyle:"bold"}).setOrigin(1,0),this.input.enabled=!0,this.outsideQueue=[],this.goodTriage=0,this.spawnedPatients=0,this.patients=this.physics.add.group(),this.addDoctors(),this.gatekeeper=new Ptt(this,315,190,[{ecl:this.admissionEcl,doctorIndex:0}],this.gameService),this.gatekeeper.setInteractive({useHandCursor:!0}),this.gatekeeper.on("pointerdown",()=>{this.openEclEditor(this.gatekeeper)}),this.add.existing(this.gatekeeper),this.wall=this.add.line(0,0,270,480,650,480,16777215).setLineWidth(10).setOrigin(0,0),this.physics.add.existing(this.wall,!0),this.spawnPatient(),this.scheduleRandomPatientSpawn()}update(){this.patients.getChildren().forEach(t=>{if(!t.active)return;t.previousX=t.x}),this.scoreText.setText(`Patients: ${this.spawnedPatients} Effectiveness: ${(this.spawnedPatients-this.badTriage)/this.spawnedPatients*100}%`),this.admitting&&this.testNextPatientForAdmission();const i=Date.now();this.insideQueue.length>0&&this.attendingDoctors.every(t=>!t.character.busy)&&i-this.lastTriageTime>=2e3&&(this.lastTriageTime=Date.now(),this.time.delayedCall(1e3,()=>{}))}openEclEditor(i){this.scene.pause(),this.scene.launch("EclEditorScene",{rules:i.triageRules,callback:t=>{i.setTriageRules(t)}})}scheduleRandomPatientSpawn(){if(this.spawnedPatients{this.spawnPatient(),this.scheduleRandomPatientSpawn()},callbackScope:this})}}addDoctors(){this.internalTriageDoctor=new Ptt(this,270,350,this.internalTriageRules,this.gameService),this.internalTriageDoctor.setInteractive({useHandCursor:!0}),this.internalTriageDoctor.on("pointerdown",()=>{this.openEclEditor(this.internalTriageDoctor)}),this.attendingDoctors.forEach(i=>{const t=new IUt(this,i.x,i.y,i.ecl,this.gameService);t.setTitle(i.title),t.setBusy(!1),i.character=t})}spawnPatient(){const i=new MUt(this,80,10,Phaser.Math.Between(1,3));this.outsideQueue.push(i),i.queuePosition=this.outsideQueue.length,i.walkTo([{x:80,y:533,duration:500},{x:330+30*i.queuePosition,y:533,duration:500}],()=>{this.patientsInQueue++,this.time.delayedCall(100,()=>{}),this.patientsInQueue===this.maxPatients&&this.queueComplete()}),i.setActive(!0).setVisible(!0),this.patients.add(i),this.spawnedPatients++,this.physics.add.collider(i,this.wall)}queueComplete(){this.gatekeeper.walkTo([{x:315,y:350,duration:200},{x:240,y:350,duration:200},{x:240,y:533,duration:200},{x:310,y:533,duration:200}],()=>{this.gatekeeper.say("We will start soon",1100)})}testNextPatientForAdmission(){if(0===this.outsideQueue.length)return;const i=this.outsideQueue.shift();i&&(this.admitting=!1,this.gatekeeper.say("How do you feel?",1e3),this.time.delayedCall(1500,()=>{let t="I have been feeling with:\n";t+=i.clinicalData.diagnosis.map(n=>n.display).join("\n"),i.say(t,1800),this.time.delayedCall(2e3,()=>{this.gatekeeper.triagePatient(i,this.gatekeeper.triageRules[0].ecl).then(n=>{n?(this.gatekeeper.say("Go in...",1500),this.time.delayedCall(1500,()=>{this.enterHospital(i),this.advanceQueue(this.outsideQueue),this.time.delayedCall(1e3,()=>{})})):(this.gatekeeper.say("Go home...",1500),this.time.delayedCall(500,()=>{this.walkAway(i),this.advanceQueue(this.outsideQueue),this.time.delayedCall(1e3,()=>{})}))})})}))}walkToInternalTriage(i){i.walkTo([{x:310,y:350,duration:500}],()=>{})}enterHospital(i){this.insideQueue.push(i),i.queuePosition=this.insideQueue.length;let t=Phaser.Math.Between(350,500),n=Phaser.Math.Between(330,380);i.walkTo([{x:240,y:i.y,duration:500},{x:240,y:350,duration:500},{x:t,y:n,duration:500}],()=>{this.time.delayedCall(100,()=>{})})}walkAway(i){let t=[];i.y<500&&(t.push({x:240,y:i.y,duration:500}),t.push({x:240,y:560,duration:500}));let n=Phaser.Math.Between(0,1);t.push({x:800*n,y:560,duration:1e3}),i.walkTo(t,()=>{this.time.delayedCall(100,()=>{i.destroy()})})}advanceQueue(i){if(0===i.length)return;const t=i[0].x-60;i.forEach((n,r)=>{n.queuePosition=r+1,n.walkTo([{x:t+30*n.queuePosition,y:n.y,duration:500}],()=>{})})}internalTriage(){var i=this;return we(function*(){if(0===i.insideQueue.length)return;const t=i.insideQueue.shift();let n=!1;if(t){i.walkToInternalTriage(t);for(let r of i.internalTriageRules){const s=i.attendingDoctors[r.doctorIndex].character;if(s.busy)continue;let o=!1;if(o=yield i.internalTriageDoctor.triagePatient(t,r.ecl),o){n=!0,i.internalTriageDoctor.say(`Go to the ${s?.title}`,1e3),i.time.delayedCall(1e3,()=>{const l=[{x:240,y:t.y,duration:200},{x:240,y:s.y,duration:300},{x:s.x+30,y:s.y,duration:300}];s.busy=!0,t.walkTo(l,()=>{i.attendPatient(t,s)})});break}}n||(i.internalTriageDoctor.say("We can't help you...",1e3),i.time.delayedCall(1e3,()=>{i.walkAway(t)})),t.active||i.addToInsideQueue(t)}})()}addToInsideQueue(i){this.insideQueue.push(i),i.queuePosition=this.insideQueue.length,i.walkTo([{x:280+20*i.queuePosition,y:350,duration:500/this.speedMultiplier}],()=>{}),console.log(`Patient re-added to insideQueue at position ${i.queuePosition}`)}attendPatient(i,t){t.busy=!0,this.time.delayedCall(1e3,()=>{this.checkPatientDiagnosisVsEcl(i,t.specialityEcl).then(n=>{n.length>0?(i.clinicalData.diagnosis.forEach(r=>{n.find(s=>s.code===r.code)&&(r.status="treated")}),i.clinicalData.diagnosis.find(r=>"admitted"===r.status)?(t.say(`${t.title}\nGo to the next doctor`,1e3),this.time.delayedCall(1e3,()=>{this.enterHospital(i),t.busy=!1})):(t.say(`${t.title}\nHave a nice day`,1e3),this.time.delayedCall(1e3,()=>{this.goodTriage++,this.walkAway(i),t.busy=!1}))):i.clinicalData.diagnosis.find(r=>"admitted"===r.status)?(t.say(`${t.title}\nI can't help with this, but go to the next doctor`,1e3),this.time.delayedCall(1e3,()=>{this.enterHospital(i),t.busy=!1})):(t.say(`${t.title}\nI can't help you...`,1e3),this.time.delayedCall(1e3,()=>{this.badTriage++,this.walkAway(i),t.busy=!1}))})})}gameOver(){this.add.text(400,350,"Game Over",{fontSize:"48px",color:"#ff0000",fontStyle:"bold"}).setOrigin(.5),this.add.text(400,400,"Press R to Restart",{fontSize:"24px",color:"#ffffff"}).setOrigin(.5),this.physics.pause();const i=this.input?.keyboard?.addKey("R");i?i.once("down",()=>{this.time.removeAllEvents(),this.tweens.killAll(),this.scene.restart()}):console.error("Keyboard input is not available.")}checkPatientDiagnosisVsEcl(i,t){return new Promise((n,r)=>{let s=0,o="";i?.clinicalData.diagnosis.forEach((l,w)=>{"treated"!==l.status&&(s++,o+=s>1?` OR ${l.code}`:` ${l.code}`)}),0!==s?this.terminologyService.expandValueSetUsingCache(t=t+" AND ("+o+" )","").subscribe(l=>{n(l.expansion?.total>0?l.expansion.contains:[])},l=>{r(l)}):n([])})}}class kUt extends yA().Scene{constructor(){super({key:"UIScene",active:!0}),this.gamePaused=!1,this.speedButtons=[],this.speedLevels=[1,2,4,16],this.activeSpeedIndex=0}preload(){this.load.image("pauseButton","assets/cdstd/Objects/Buttons/button_pause.png"),this.load.image("unpauseButton","assets/cdstd/Objects/Buttons/button_unpause.png")}create(){this.pauseButton=this.add.image(75,50,"pauseButton").setInteractive(),this.pauseButton.on("pointerdown",()=>this.togglePause()),this.speedLevels.forEach((i,t)=>{const n=this.add.text(150+60*t,35,`${i}x`,{fontSize:"18px",color:t===this.activeSpeedIndex?"#ff0":"#fff",backgroundColor:"#000",padding:{x:10,y:5}}).setInteractive().on("pointerdown",()=>this.setSpeed(t));this.speedButtons.push(n)})}togglePause(){const i=this.scene.get("CdstdScene");this.gamePaused?(i.scene.resume(),this.gamePaused=!1,this.pauseButton.setTexture("pauseButton")):(i.scene.pause(),this.gamePaused=!0,this.pauseButton.setTexture("unpauseButton"))}setSpeed(i){this.activeSpeedIndex=i,this.speedButtons.forEach((n,r)=>{n.setStyle({color:r===this.activeSpeedIndex?"#ff0":"#fff"})});const t=this.scene.get("CdstdScene");t&&t.setSpeedMultiplier(this.speedLevels[this.activeSpeedIndex])}}class FUt extends Rtt.Scene{constructor(){super({key:"EclEditorScene"}),this.lineHeight=25,this.maxLines=3}init(i){console.log("EclEditorScene init",i),this.rules=i.rules,this.updateCallback=i.callback}create(){const i=this.cameras.main.width/2,t=this.cameras.main.height/2;console.log("EclEditorScene create",this.rules);const n=90*this.rules.length+50;this.overlay=this.add.rectangle(i,t,this.cameras.main.width,this.cameras.main.height,0,.5).setDepth(100),this.inputBox=this.add.rectangle(i,t,700,500,3355443,.9).setOrigin(.5).setDepth(101),this.rules.forEach((r,s)=>{const o=t-n/2+90*s+40;this.add.text(i-320,o,`Doctor ${r.doctorIndex}:`,{fontSize:"16px",color:"#ffcc00"}).setOrigin(0,.5).setDepth(102);let l=this.add.text(i-200,o,r.ecl,{fontSize:"16px",color:"#ffffff",backgroundColor:"#000000",padding:{x:5,y:5},wordWrap:{width:500},fixedWidth:500,fixedHeight:this.lineHeight*this.maxLines}).setOrigin(0,.5).setDepth(102);const w=this.add.rectangle(i+145,o+15,80,30,4474060).setOrigin(.5).setDepth(102).setInteractive({useHandCursor:!0});let E=this.add.text(i+145,o+15,"Copy",{fontSize:"14px",color:"#ffffff"}).setOrigin(.5).setDepth(103);w.on("pointerdown",()=>{navigator.clipboard.writeText(r.ecl).then(()=>{w.setFillStyle(52224),E.setText("Copied!"),this.time.delayedCall(1e3,()=>{w.setFillStyle(4474060),E.setText("Copy")})})});const D=this.add.rectangle(i+245,o+15,80,30,31436).setOrigin(.5).setDepth(102).setInteractive({useHandCursor:!0});this.add.text(i+245,o+15,"Paste",{fontSize:"14px",color:"#ffffff"}).setOrigin(.5).setDepth(103),D.on("pointerdown",()=>{navigator.clipboard.readText().then(k=>{r.ecl=k,l.setText(k)})})}),this.closeButton=this.add.rectangle(735,65,30,30,16711680).setOrigin(.5).setDepth(102).setInteractive({useHandCursor:!0}),this.add.text(735,65,"\u2715",{fontSize:"18px",color:"#ffffff"}).setOrigin(.5).setDepth(103),this.closeButton.on("pointerdown",()=>this.closeEclEditor()),this.confirmButton=this.add.rectangle(i,520,100,30,65280).setOrigin(.5).setDepth(102).setInteractive({useHandCursor:!0}),this.add.text(i,520,"OK",{fontSize:"16px",color:"#000000"}).setOrigin(.5).setDepth(103),this.confirmButton.on("pointerdown",()=>this.confirmEclChange())}confirmEclChange(){this.updateCallback(this.rules),this.closeEclEditor()}closeEclEditor(){this.scene.resume("CdstdScene"),this.scene.stop()}}const OUt=["gameContainer"];let LUt=(()=>{class e{constructor(t){this.terminologyService=t}ngOnInit(){const t=new kUt,n=new FUt,r=new PUt(this.terminologyService),s={type:yA().AUTO,width:800,height:600,parent:this.gameContainer.nativeElement,scene:[r,t,n],physics:{default:"arcade",arcade:{debug:!1}}};this.game=new(yA().Game)(s)}ngOnDestroy(){this.game&&this.game.destroy(!0)}static{this.\u0275fac=function(n){return new(n||e)(pt(ma))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-triage-game"]],viewQuery:function(n,r){if(1&n&&ki(OUt,7),2&n){let s;He(s=We())&&(r.gameContainer=s.first)}},decls:2,vars:0,consts:[["gameContainer",""]],template:function(n,r){1&n&&ye(0,"div",null,0)}})}}return e})(),NUt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-loinc-order"]],decls:2,vars:0,template:function(n,r){1&n&&(J(0,"p"),ut(1,"loinc-order works!"),et())}})}}return e})(),BUt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-loinc-results"]],decls:2,vars:0,template:function(n,r){1&n&&(J(0,"p"),ut(1,"loinc-results works!"),et())}})}}return e})();const VUt=[{path:"",component:Mtt},{path:"home",component:Mtt},{path:"allergies",component:oMt},{path:"sandbox",component:h2t},{path:"prescription",component:d2t},{path:"questionnaires",component:NPt},{path:"implementation-course/subset-validator",component:ckt},{path:"snoguess",component:g3t},{path:"snoguess/scoreboard",component:aBt},{path:"context",component:R3t},{path:"maturity",component:eUt},{path:"ncpt",component:yUt},{path:"triage",component:LUt},{path:"fsn",component:Itt},{path:"reports/fsn",component:Itt},{path:"reports/inactivations",component:CUt},{path:"reports/new-concepts",component:DUt},{path:"reports",component:EUt},{path:"loinc",component:(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-loinc-main"]],decls:8,vars:0,consts:[[1,"container"],[1,"tab-group"],["label","Order"],["label","Results"]],template:function(n,r){1&n&&(J(0,"div",0)(1,"h2"),ut(2,"LOINC Ontology Demonstrator"),et(),J(3,"mat-tab-group",1)(4,"mat-tab",2),ye(5,"app-loinc-order"),et(),J(6,"mat-tab",3),ye(7,"app-loinc-results"),et()()())},dependencies:[_v,Ap,NUt,BUt],styles:[".container[_ngcontent-%COMP%]{padding:1rem;width:100%;min-width:100%}"]})}}return e})()},{path:"**",redirectTo:""}];let UUt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[i7.forRoot(VUt,{useHash:!0}),i7]})}}return e})();const zUt=[{title:"GROUP 1",description:"The first group of bindings in the coding demonstration",bindings:[{title:"Medicinal product + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, contain at least provided ingredientes (open world assuption), no information on form."},{title:"Gender",type:"dropdown",ecl:"< 365873007 |Gender finding (finding)|",value:"",note:"Patient gender."},{title:"Medicinal product form + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details."}]},{title:"GROUP 2",description:"The second group of bindings in the coding demonstration",bindings:[{title:"Medicinal product only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, containing only the provided ingredientes (close world assuption), with no information on form."},{title:"Medicinal product form only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 732943007 |Has basis of strength substance (attribute)| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details, containing only the provided ingredientes (close world assuption)."}]}];let GUt=(()=>{class e{constructor(){}getCodingSpec(){return zUt}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var En,D1={version:"0.20.2"},wa=1200,hm=1252,HUt=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],MN={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},xA=function(e){-1!=HUt.indexOf(e)&&(hm=MN[0]=e)},dc=function(e){wa=e,xA(e)};var M1=function(i){return String.fromCharCode(i)},IN=function(i){return String.fromCharCode(i)},Vs=null,bo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function TA(e){for(var i="",t=0,n=0,r=0,s=0,o=0,l=0,w=0,E=0;E>2,o=(3&t)<<4|(n=e.charCodeAt(E++))>>4,l=(15&n)<<2|(r=e.charCodeAt(E++))>>6,w=63&r,isNaN(n)?l=w=64:isNaN(r)&&(w=64),i+=bo.charAt(s)+bo.charAt(o)+bo.charAt(l)+bo.charAt(w);return i}function Vl(e){var i="",s=0,o=0,l=0,w=0;"data:"==e.slice(0,5)&&(E=e.slice(0,1024).indexOf(";base64,"))>-1&&(e=e.slice(E+8)),e=e.replace(/[^\w\+\/\=]/g,"");for(var E=0;E>4),64!==(l=bo.indexOf(e.charAt(E++)))&&(i+=String.fromCharCode((15&o)<<4|l>>2)),64!==(w=bo.indexOf(e.charAt(E++)))&&(i+=String.fromCharCode((3&l)<<6|w));return i}var Rn=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),Pu=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(i,t){return t?new Buffer(i,t):new Buffer(i)}:Buffer.from.bind(Buffer)}return function(){}}(),I1=function(){if(typeof Buffer>"u")return!1;var e=Pu([65,0]);return!!e&&1==e.toString("utf16le").length}();function vf(e){return Rn?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Ltt(e){return Rn?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Qo=function(i){return Rn?Pu(i,"binary"):i.split("").map(function(t){return 255&t.charCodeAt(0)})};function R1(e){if(typeof ArrayBuffer>"u")return Qo(e);for(var i=new ArrayBuffer(e.length),t=new Uint8Array(i),n=0;n!=e.length;++n)t[n]=255&e.charCodeAt(n);return i}function ku(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var i=[],t=0;t=0;)i+=e.charAt(t--);return i}function zc(e,i){var t=""+e;return t.length>=i?t:Zn("0",i-t.length)+t}function PN(e,i){var t=""+e;return t.length>=i?t:Zn(" ",i-t.length)+t}function CA(e,i){var t=""+e;return t.length>=i?t:t+Zn(" ",i-t.length)}var Ntt=Math.pow(2,32);function M0(e,i){return e>Ntt||e<-Ntt?function ZUt(e,i){var t=""+Math.round(e);return t.length>=i?t:Zn("0",i-t.length)+t}(e,i):function JUt(e,i){var t=""+e;return t.length>=i?t:Zn("0",i-t.length)+t}(Math.round(e),i)}function SA(e,i){return e.length>=7+(i=i||0)&&103==(32|e.charCodeAt(i))&&101==(32|e.charCodeAt(i+1))&&110==(32|e.charCodeAt(i+2))&&101==(32|e.charCodeAt(i+3))&&114==(32|e.charCodeAt(i+4))&&97==(32|e.charCodeAt(i+5))&&108==(32|e.charCodeAt(i+6))}var Btt=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],kN=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]],Ni={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "'},Vtt={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},tzt={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function EA(e,i,t){for(var n=e<0?-1:1,r=e*n,s=0,o=1,l=0,w=1,E=0,D=0,k=Math.floor(r);Ei&&(E>i?(D=w,l=s):(D=E,l=o)),!t)return[0,n*l,D];var O=Math.floor(n*l/D);return[O,n*l-O*D,D]}function Fu(e,i,t){if(e>2958465||e<0)return null;e=function ezt(e){var i=e.toPrecision(16);if(i.indexOf("e")>-1){var t=i.slice(0,i.indexOf("e"));return(t=t.indexOf(".")>-1?t.slice(0,"0."==t.slice(0,2)?17:16):t.slice(0,15)+Zn("0",t.length-15))+i.slice(i.indexOf("e"))}var n=i.indexOf(".")>-1?i.slice(0,"0."==i.slice(0,2)?17:16):i.slice(0,15)+Zn("0",i.length-15);return Number(n)}(e);var n=0|e,r=Math.floor(86400*(e-n)),s=0,o=[],l={D:n,T:r,u:86400*(e-n)-r,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(l.u)<1e-6&&(l.u=0),i&&i.date1904&&(n+=1462),l.u>.9999&&(l.u=0,86400==++r&&(l.T=r=0,++n,++l.D)),60===n)o=t?[1317,10,29]:[1900,2,29],s=3;else if(0===n)o=t?[1317,8,29]:[1900,1,0],s=6;else{n>60&&--n;var w=new Date(1900,0,1);w.setDate(w.getDate()+n-1),o=[w.getFullYear(),w.getMonth()+1,w.getDate()],s=w.getDay(),n<60&&(s=(s+6)%7),t&&(s=function szt(e,i){i[0]-=581;var t=e.getDay();return e<60&&(t=(t+6)%7),t}(w,o))}return l.y=o[0],l.m=o[1],l.d=o[2],l.S=r%60,r=Math.floor(r/60),l.M=r%60,r=Math.floor(r/60),l.H=r,l.q=s,l}function FN(e){return-1==e.indexOf(".")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function dm(e,i){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(0|e)===e?e.toString(10):function k1(e){var t,i=Math.floor(Math.log(Math.abs(e))*Math.LOG10E);return t=i>=-4&&i<=-1?e.toPrecision(10+i):Math.abs(i)<=9?function nzt(e){var i=e<0?12:11,t=FN(e.toFixed(12));return t.length<=i||(t=e.toPrecision(10)).length<=i?t:e.toExponential(5)}(e):10===i?e.toFixed(10).substr(0,12):function rzt(e){var i=FN(e.toFixed(11));return i.length>(e<0?12:11)||"0"===i||"-0"===i?e.toPrecision(6):i}(e),FN(function izt(e){return-1==e.indexOf("E")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(t.toUpperCase()))}(e);case"undefined":return"";case"object":if(null==e)return"";if(e instanceof Date)return fl(14,ws(e,i&&i.date1904),i)}throw new Error("unsupported value in General format: "+e)}function azt(e,i,t,n){var w,r="",s=0,o=0,l=t.y,E=0;switch(e){case 98:l=t.y+543;case 121:switch(i.length){case 1:case 2:w=l%100,E=2;break;default:w=l%1e4,E=4}break;case 109:switch(i.length){case 1:case 2:w=t.m,E=i.length;break;case 3:return kN[t.m-1][1];case 5:return kN[t.m-1][0];default:return kN[t.m-1][2]}break;case 100:switch(i.length){case 1:case 2:w=t.d,E=i.length;break;case 3:return Btt[t.q][0];default:return Btt[t.q][1]}break;case 104:switch(i.length){case 1:case 2:w=1+(t.H+11)%12,E=i.length;break;default:throw"bad hour format: "+i}break;case 72:switch(i.length){case 1:case 2:w=t.H,E=i.length;break;default:throw"bad hour format: "+i}break;case 77:switch(i.length){case 1:case 2:w=t.M,E=i.length;break;default:throw"bad minute format: "+i}break;case 115:if("s"!=i&&"ss"!=i&&".0"!=i&&".00"!=i&&".000"!=i)throw"bad second format: "+i;return 0!==t.u||"s"!=i&&"ss"!=i?(o=n>=2?3===n?1e3:100:1===n?10:1,(s=Math.round(o*(t.S+t.u)))>=60*o&&(s=0),"s"===i?0===s?"0":""+s/o:(r=zc(s,2+n),"ss"===i?r.substr(0,2):"."+r.substr(2,i.length-1))):zc(t.S,i.length);case 90:switch(i){case"[h]":case"[hh]":w=24*t.D+t.H;break;case"[m]":case"[mm]":w=60*(24*t.D+t.H)+t.M;break;case"[s]":case"[ss]":w=60*(60*(24*t.D+t.H)+t.M)+(0==n?Math.round(t.S+t.u):t.S);break;default:throw"bad abstime format: "+i}E=3===i.length?1:2;break;case 101:w=l,E=1}return E>0?zc(w,E):""}function Wh(e){if(e.length<=3)return e;for(var t=e.length%3,n=e.substr(0,t);t!=e.length;t+=3)n+=(n.length>0?",":"")+e.substr(t,3);return n}var Utt=/%/g;function ztt(e,i){var t,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==i)return"0.0E+0";if(i<0)return"-"+ztt(e,-i);var r=e.indexOf(".");-1===r&&(r=e.indexOf("E"));var s=Math.floor(Math.log(i)*Math.LOG10E)%r;if(s<0&&(s+=r),-1===(t=(i/Math.pow(10,s)).toPrecision(n+1+(r+s)%r)).indexOf("e")){var o=Math.floor(Math.log(i)*Math.LOG10E);for(-1===t.indexOf(".")?t=t.charAt(0)+"."+t.substr(1)+"E+"+(o-t.length+s):t+="E+"+(o-s);"0."===t.substr(0,2);)t=(t=t.charAt(0)+t.substr(2,r)+"."+t.substr(2+r)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,w,E,D){return w+E+D.substr(0,(r+s)%r)+"."+D.substr(s)+"E"})}else t=i.toExponential(n);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}var Gtt=/# (\?+)( ?)\/( ?)(\d+)/,Htt=/^#*0*\.([0#]+)/,Wtt=/\)[^)]*[0#]/,jtt=/\(###\) ###\\?-####/;function Ko(e){for(var t,i="",n=0;n!=e.length;++n)switch(t=e.charCodeAt(n)){case 35:break;case 63:i+=" ";break;case 48:i+="0";break;default:i+=String.fromCharCode(t)}return i}function Xtt(e,i){var t=Math.pow(10,i);return""+Math.round(e*t)/t}function Ytt(e,i){var t=e-Math.floor(e),n=Math.pow(10,i);return i<(""+Math.round(t*n)).length?0:Math.round(t*n)}function fc(e,i,t){if(40===e.charCodeAt(0)&&!i.match(Wtt)){var n=i.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?fc("n",n,t):"("+fc("n",n,-t)+")"}if(44===i.charCodeAt(i.length-1))return function lzt(e,i,t){for(var n=i.length-1;44===i.charCodeAt(n-1);)--n;return jh(e,i.substr(0,n),t/Math.pow(10,3*(i.length-n)))}(e,i,t);if(-1!==i.indexOf("%"))return function ozt(e,i,t){var n=i.replace(Utt,""),r=i.length-n.length;return jh(e,n,t*Math.pow(10,2*r))+Zn("%",r)}(e,i,t);if(-1!==i.indexOf("E"))return ztt(i,t);if(36===i.charCodeAt(0))return"$"+fc(e,i.substr(" "==i.charAt(1)?2:1),t);var r,s,o,l,w=Math.abs(t),E=t<0?"-":"";if(i.match(/^00+$/))return E+M0(w,i.length);if(i.match(/^[#?]+$/))return"0"===(r=M0(t,0))&&(r=""),r.length>i.length?r:Ko(i.substr(0,i.length-r.length))+r;if(s=i.match(Gtt))return function czt(e,i,t){var n=parseInt(e[4],10),r=Math.round(i*n),s=Math.floor(r/n),o=r-s*n,l=n;return t+(0===s?"":""+s)+" "+(0===o?Zn(" ",e[1].length+1+e[4].length):PN(o,e[1].length)+e[2]+"/"+e[3]+zc(l,e[4].length))}(s,w,E);if(i.match(/^#+0+$/))return E+M0(w,i.length-i.indexOf("0"));if(s=i.match(Htt))return r=Xtt(t,s[1].length).replace(/^([^\.]+)$/,"$1."+Ko(s[1])).replace(/\.$/,"."+Ko(s[1])).replace(/\.(\d*)$/,function(U,j){return"."+j+Zn("0",Ko(s[1]).length-j.length)}),-1!==i.indexOf("0.")?r:r.replace(/^0\./,".");if(i=i.replace(/^#+([0.])/,"$1"),s=i.match(/^(0*)\.(#*)$/))return E+Xtt(w,s[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=i.match(/^#{1,3},##0(\.?)$/))return E+Wh(M0(w,0));if(s=i.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+fc(e,i,-t):Wh(""+(Math.floor(t)+function hzt(e,i){return i<(""+Math.round((e-Math.floor(e))*Math.pow(10,i))).length?1:0}(t,s[1].length)))+"."+zc(Ytt(t,s[1].length),s[1].length);if(s=i.match(/^#,#*,#0/))return fc(e,i.replace(/^#,#*,/,""),t);if(s=i.match(/^([0#]+)(\\?-([0#]+))+$/))return r=D0(fc(e,i.replace(/[\\-]/g,""),t)),o=0,D0(D0(i.replace(/\\/g,"")).replace(/[0#]/g,function(U){return o-2147483648?""+(e>=0?0|e:e-1|0):""+Math.floor(e)}(t)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(U){return"00,"+(U.length<3?zc(0,3-U.length):"")+U})+"."+zc(o,s[1].length);switch(i){case"###,##0.00":return fc(e,"#,##0.00",t);case"###,###":case"##,###":case"#,###":var L=Wh(M0(w,0));return"0"!==L?E+L:"";case"###,###.00":return fc(e,"###,##0.00",t).replace(/^0\./,".");case"#,###.00":return fc(e,"#,##0.00",t).replace(/^0\./,".")}throw new Error("unsupported format |"+i+"|")}function $tt(e,i){var t,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==i)return"0.0E+0";if(i<0)return"-"+$tt(e,-i);var r=e.indexOf(".");-1===r&&(r=e.indexOf("E"));var s=Math.floor(Math.log(i)*Math.LOG10E)%r;if(s<0&&(s+=r),!(t=(i/Math.pow(10,s)).toPrecision(n+1+(r+s)%r)).match(/[Ee]/)){var o=Math.floor(Math.log(i)*Math.LOG10E);-1===t.indexOf(".")?t=t.charAt(0)+"."+t.substr(1)+"E+"+(o-t.length+s):t+="E+"+(o-s),t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,w,E,D){return w+E+D.substr(0,(r+s)%r)+"."+D.substr(s)+"E"})}else t=i.toExponential(n);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}function Ou(e,i,t){if(40===e.charCodeAt(0)&&!i.match(Wtt)){var n=i.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?Ou("n",n,t):"("+Ou("n",n,-t)+")"}if(44===i.charCodeAt(i.length-1))return function fzt(e,i,t){for(var n=i.length-1;44===i.charCodeAt(n-1);)--n;return jh(e,i.substr(0,n),t/Math.pow(10,3*(i.length-n)))}(e,i,t);if(-1!==i.indexOf("%"))return function pzt(e,i,t){var n=i.replace(Utt,""),r=i.length-n.length;return jh(e,n,t*Math.pow(10,2*r))+Zn("%",r)}(e,i,t);if(-1!==i.indexOf("E"))return $tt(i,t);if(36===i.charCodeAt(0))return"$"+Ou(e,i.substr(" "==i.charAt(1)?2:1),t);var r,s,o,l,w=Math.abs(t),E=t<0?"-":"";if(i.match(/^00+$/))return E+zc(w,i.length);if(i.match(/^[#?]+$/))return r=""+t,0===t&&(r=""),r.length>i.length?r:Ko(i.substr(0,i.length-r.length))+r;if(s=i.match(Gtt))return function uzt(e,i,t){return t+(0===i?"":""+i)+Zn(" ",e[1].length+2+e[4].length)}(s,w,E);if(i.match(/^#+0+$/))return E+zc(w,i.length-i.indexOf("0"));if(s=i.match(Htt))return r=(r=(""+t).replace(/^([^\.]+)$/,"$1."+Ko(s[1])).replace(/\.$/,"."+Ko(s[1]))).replace(/\.(\d*)$/,function(U,j){return"."+j+Zn("0",Ko(s[1]).length-j.length)}),-1!==i.indexOf("0.")?r:r.replace(/^0\./,".");if(i=i.replace(/^#+([0.])/,"$1"),s=i.match(/^(0*)\.(#*)$/))return E+(""+w).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=i.match(/^#{1,3},##0(\.?)$/))return E+Wh(""+w);if(s=i.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+Ou(e,i,-t):Wh(""+t)+"."+Zn("0",s[1].length);if(s=i.match(/^#,#*,#0/))return Ou(e,i.replace(/^#,#*,/,""),t);if(s=i.match(/^([0#]+)(\\?-([0#]+))+$/))return r=D0(Ou(e,i.replace(/[\\-]/g,""),t)),o=0,D0(D0(i.replace(/\\/g,"")).replace(/[0#]/g,function(U){return o-1||"\\"==t&&"-"==e.charAt(i+1)&&"0#".indexOf(e.charAt(i+2))>-1););break;case"?":for(;e.charAt(++i)===t;);break;case"*":++i,(" "==e.charAt(i)||"*"==e.charAt(i))&&++i;break;case"(":case")":++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;i-1;);break;default:++i}return!1}var Ktt=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Ztt(e,i){if(null==i)return!1;var t=parseFloat(i[2]);switch(i[1]){case"=":if(e==t)return!0;break;case">":if(e>t)return!0;break;case"<":if(e":if(e!=t)return!0;break;case">=":if(e>=t)return!0;break;case"<=":if(e<=t)return!0}return!1}function fl(e,i,t){null==t&&(t={});var n="";switch(typeof e){case"string":n="m/d/yy"==e&&t.dateNF?t.dateNF:e;break;case"number":null==(n=14==e&&t.dateNF?t.dateNF:(null!=t.table?t.table:Ni)[e])&&(n=t.table&&t.table[Vtt[e]]||Ni[Vtt[e]]),null==n&&(n=tzt[e]||"General")}if(SA(n,0))return dm(i,t);i instanceof Date&&(i=ws(i,t.date1904));var r=function vzt(e,i){var t=function mzt(e){for(var i=[],t=!1,n=0,r=0;n-1&&--n,t.length>4)throw new Error("cannot find right format for |"+t.join("|")+"|");if("number"!=typeof i)return[4,4===t.length||r>-1?t[t.length-1]:"@"];switch(t.length){case 1:t=r>-1?["General","General","General",t[0]]:[t[0],t[0],t[0],"@"];break;case 2:t=r>-1?[t[0],t[0],t[0],t[1]]:[t[0],t[1],t[0],"@"];break;case 3:t=r>-1?[t[0],t[1],t[0],t[2]]:[t[0],t[1],t[2],"@"]}var s=i>0?t[0]:i<0?t[1]:t[2];if(-1===t[0].indexOf("[")&&-1===t[1].indexOf("["))return[n,s];if(null!=t[0].match(/\[[=<>]/)||null!=t[1].match(/\[[=<>]/)){var o=t[0].match(Ktt),l=t[1].match(Ktt);return Ztt(i,o)?[n,t[0]]:Ztt(i,l)?[n,t[1]]:[n,t[null!=o&&null!=l?2:1]]}return[n,s]}(n,i);if(SA(r[1]))return dm(i,t);if(!0===i)i="TRUE";else if(!1===i)i="FALSE";else if(""===i||null==i)return"";return function gzt(e,i,t,n){for(var E,D,k,r=[],s="",o=0,l="",w="t",O="H";o=12?e.charAt(o+2):l),j.t="T",O="h",o+=3):"AM/PM"===e.substr(o,5).toUpperCase()?(null!=E&&(j.v=E.H>=12?"PM":"AM"),j.t="T",o+=5,O="h"):"\u4e0a\u5348/\u4e0b\u5348"===e.substr(o,5).toUpperCase()?(null!=E&&(j.v=E.H>=12?"\u4e0b\u5348":"\u4e0a\u5348"),j.t="T",o+=5,O="h"):(j.t="t",++o),null==E&&"T"===j.t)return"";r[r.length]=j,w=l;break;case"[":for(s=l;"]"!==e.charAt(o++)&&o-1&&(s=(s.match(/\$([^-\[\]]*)/)||[])[1]||"$",Ul(e)||(r[r.length]={t:"t",v:s}));break;case".":if(null!=E){for(s=l;++o-1;)s+=l;r[r.length]={t:"n",v:s};break;case"?":for(s=l;e.charAt(++o)===l;)s+=l;r[r.length]={t:l,v:s},w=l;break;case"*":++o,(" "==e.charAt(o)||"*"==e.charAt(o))&&++o;break;case"(":case")":r[r.length]={t:1===n?"t":l,v:l},++o;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(s=l;o-1;)s+=e.charAt(o);r[r.length]={t:"D",v:s};break;case" ":r[r.length]={t:l,v:l},++o;break;case"$":r[r.length]={t:"t",v:"$"},++o;break;default:if(-1===",$-+/():!^&'~{}<>=\u20acacfijklopqrtuvwxzP".indexOf(l))throw new Error("unrecognized character "+l+" in "+e);r[r.length]={t:"t",v:l},++o}var rt,st,W=0,Z=0;for(o=r.length-1,w="t";o>=0;--o)switch(r[o].t){case"h":case"H":r[o].t=O,w="h",W<1&&(W=1);break;case"s":(rt=r[o].v.match(/\.0+$/))&&(Z=Math.max(Z,rt[0].length-1),W=4),W<3&&(W=3);case"d":case"y":case"e":w=r[o].t;break;case"M":w=r[o].t,W<2&&(W=2);break;case"m":"s"===w&&(r[o].t="M",W<2&&(W=2));break;case"X":break;case"Z":W<1&&r[o].v.match(/[Hh]/)&&(W=1),W<2&&r[o].v.match(/[Mm]/)&&(W=2),W<3&&r[o].v.match(/[Ss]/)&&(W=3)}switch(W){case 0:break;case 1:case 2:case 3:E.u>=.5&&(E.u=0,++E.S),E.S>=60&&(E.S=0,++E.M),E.M>=60&&(E.M=0,++E.H),E.H>=24&&(E.H=0,++E.D,(st=Fu(E.D)).u=E.u,st.S=E.S,st.M=E.M,st.H=E.H,E=st);break;case 4:switch(Z){case 1:E.u=Math.round(10*E.u)/10;break;case 2:E.u=Math.round(100*E.u)/100;break;case 3:E.u=Math.round(1e3*E.u)/1e3}E.u>=1&&(E.u=0,++E.S),E.S>=60&&(E.S=0,++E.M),E.M>=60&&(E.M=0,++E.H),E.H>=24&&(E.H=0,++E.D,(st=Fu(E.D)).u=E.u,st.S=E.S,st.M=E.M,st.H=E.H,E=st)}var Tt,yt="";for(o=0;o0){40==yt.charCodeAt(0)?(ft=i<0&&45===yt.charCodeAt(0)?-i:i,ht=jh("n",yt,ft)):(ht=jh("n",yt,ft=i<0&&n>1?-i:i),ft<0&&r[0]&&"t"==r[0].t&&(ht=ht.substr(1),r[0].v="-"+r[0].v)),Tt=ht.length-1;var mt=r.length;for(o=0;o-1){mt=o;break}var wt=r.length;if(mt===r.length&&-1===ht.indexOf("E")){for(o=r.length-1;o>=0;--o)null==r[o]||-1==="n?".indexOf(r[o].t)||(Tt>=r[o].v.length-1?r[o].v=ht.substr(1+(Tt-=r[o].v.length),r[o].v.length):Tt<0?r[o].v="":(r[o].v=ht.substr(0,Tt+1),Tt=-1),r[o].t="t",wt=o);Tt>=0&&wt=0;--o)if(null!=r[o]&&-1!=="n?".indexOf(r[o].t)){for(D=r[o].v.indexOf(".")>-1&&o===mt?r[o].v.indexOf(".")-1:r[o].v.length-1,It=r[o].v.substr(D+1);D>=0;--D)Tt>=0&&("0"===r[o].v.charAt(D)||"#"===r[o].v.charAt(D))&&(It=ht.charAt(Tt--)+It);r[o].v=It,r[o].t="t",wt=o}for(Tt>=0&&wt-1&&o===mt?r[o].v.indexOf(".")+1:0,It=r[o].v.substr(0,D);D-1&&(r[o].v=jh(r[o].t,r[o].v,ft=n>1&&i<0&&o>0&&"-"===r[o-1].v?-i:i),r[o].t="t");var Ct="";for(o=0;o!==r.length;++o)null!=r[o]&&(Ct+=r[o].v);return Ct}(r[1],i,t,r[0])}function ON(e,i){if("number"!=typeof i){i=+i||-1;for(var t=0;t<392;++t)if(null!=Ni[t]){if(Ni[t]==e){i=t;break}}else i<0&&(i=t);i<0&&(i=391)}return Ni[i]=e,i}function F1(e){for(var i=0;392!=i;++i)void 0!==e[i]&&ON(e[i],i)}function I0(){Ni=function qUt(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "',e}()}var _A=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,wzt={"d.m":"d\\.m"};function yf(e,i){return ON(wzt[e]||e,i)}var Xh,qtt=function(){var e={version:"1.2.0"},t=function i(){for(var ft=0,ht=new Array(256),mt=0;256!=mt;++mt)ht[mt]=ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=mt)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1;return typeof Int32Array<"u"?new Int32Array(ht):ht}(),r=function n(ft){var ht=0,mt=0,wt=0,Ct=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(wt=0;256!=wt;++wt)Ct[wt]=ft[wt];for(wt=0;256!=wt;++wt)for(mt=ft[wt],ht=256+wt;ht<4096;ht+=256)mt=Ct[ht]=mt>>>8^ft[255&mt];var _t=[];for(wt=1;16!=wt;++wt)_t[wt-1]=typeof Int32Array<"u"&&"function"==typeof Ct.subarray?Ct.subarray(256*wt,256*wt+256):Ct.slice(256*wt,256*wt+256);return _t}(t),s=r[0],o=r[1],l=r[2],w=r[3],E=r[4],D=r[5],k=r[6],O=r[7],L=r[8],U=r[9],j=r[10],W=r[11],Z=r[12],rt=r[13],st=r[14];return e.table=t,e.bstr=function yt(ft,ht){for(var mt=~ht,wt=0,Ct=ft.length;wt>>8^t[255&(mt^ft.charCodeAt(wt++))];return~mt},e.buf=function Tt(ft,ht){for(var mt=~ht,wt=ft.length-15,Ct=0;Ct>8&255]^Z[ft[Ct++]^mt>>16&255]^W[ft[Ct++]^mt>>>24]^j[ft[Ct++]]^U[ft[Ct++]]^L[ft[Ct++]]^O[ft[Ct++]]^k[ft[Ct++]]^D[ft[Ct++]]^E[ft[Ct++]]^w[ft[Ct++]]^l[ft[Ct++]]^o[ft[Ct++]]^s[ft[Ct++]]^t[ft[Ct++]];for(wt+=15;Ct>>8^t[255&(mt^ft[Ct++])];return~mt},e.str=function It(ft,ht){for(var mt=~ht,wt=0,Ct=ft.length,_t=0,Dt=0;wt>>8^t[255&(mt^_t)]:_t<2048?mt=(mt=mt>>>8^t[255&(mt^(192|_t>>6&31))])>>>8^t[255&(mt^(128|63&_t))]:_t>=55296&&_t<57344?(_t=64+(1023&_t),Dt=1023&ft.charCodeAt(wt++),mt=(mt=(mt=(mt=mt>>>8^t[255&(mt^(240|_t>>8&7))])>>>8^t[255&(mt^(128|_t>>2&63))])>>>8^t[255&(mt^(128|Dt>>6&15|(3&_t)<<4))])>>>8^t[255&(mt^(128|63&Dt))]):mt=(mt=(mt=mt>>>8^t[255&(mt^(224|_t>>12&15))])>>>8^t[255&(mt^(128|_t>>6&63))])>>>8^t[255&(mt^(128|63&_t))];return~mt},e}(),Vi=function(){var w,i={};function n(At){if("/"==At.charAt(At.length-1))return-1===At.slice(0,-1).indexOf("/")?At:n(At.slice(0,-1));var Lt=At.lastIndexOf("/");return-1===Lt?At:At.slice(0,Lt+1)}function r(At){if("/"==At.charAt(At.length-1))return r(At.slice(0,-1));var Lt=At.lastIndexOf("/");return-1===Lt?At:At.slice(Lt+1)}function s(At,Lt){"string"==typeof Lt&&(Lt=new Date(Lt));var Pt=Lt.getHours();Pt=(Pt=Pt<<6|Lt.getMinutes())<<5|Lt.getSeconds()>>>1,At.write_shift(2,Pt);var kt=Lt.getFullYear()-1980;kt=(kt=kt<<4|Lt.getMonth()+1)<<5|Lt.getDate(),At.write_shift(2,kt)}function l(At){Ca(At,0);for(var Lt={},Pt=0;At.l<=At.length-4;){var kt=At.read_shift(2),Nt=At.read_shift(2),Vt=At.l+Nt,ce={};switch(kt){case 21589:1&(Pt=At.read_shift(1))&&(ce.mtime=At.read_shift(4)),Nt>5&&(2&Pt&&(ce.atime=At.read_shift(4)),4&Pt&&(ce.ctime=At.read_shift(4))),ce.mtime&&(ce.mt=new Date(1e3*ce.mtime));break;case 1:var Ce=At.read_shift(4),oe=At.read_shift(4);ce.usz=oe*Math.pow(2,32)+Ce,Ce=At.read_shift(4),oe=At.read_shift(4),ce.csz=oe*Math.pow(2,32)+Ce}At.l=Vt,Lt[kt]=ce}return Lt}function E(){return w||(w=Xh)}function D(At,Lt){if(80==At[0]&&75==At[1])return Tw(At,Lt);if(109==(32|At[0])&&105==(32|At[1]))return function Um(At,Lt){if("mime-version:"!=ze(At.slice(0,13)).toLowerCase())throw new Error("Unsupported MAD header");var Pt=Lt&&Lt.root||"",kt=(Rn&&Buffer.isBuffer(At)?At.toString("binary"):ze(At)).split("\r\n"),Nt=0,Vt="";for(Nt=0;Nt0&&(Pt=(Pt=Pt.slice(0,Pt.length-1)).slice(0,Pt.lastIndexOf("/")+1),Vt.slice(0,Pt.length)!=Pt););var ce=(kt[1]||"").match(/boundary="(.*?)"/);if(!ce)throw new Error("MAD cannot find boundary");var Ce="--"+(ce[1]||""),he={FileIndex:[],FullPaths:[]};ft(he);var Xe,ti=0;for(Nt=0;Nt=Nt&&(ti-=Nt),!ce[ti]){oe=[];var ui=[];for(Xe=ti;Xe>=0;){ui[Xe]=!0,ce[Xe]=!0,Ce[Ce.length]=Xe,oe.push(At[Xe]);var $e=Pt[Math.floor(4*Xe/kt)];if(kt<4+(Ei=4*Xe&ue))throw new Error("FAT boundary crossed: "+Xe+" 4 "+kt);if(!At[$e]||ui[Xe=vm(At[$e],Ei)])break}Vt[ti]={nodes:Ce,data:Tet([oe])}}return Vt}(qi,ce,ue,kt);ce0&&Ce!==Dt&&(Dr[Ce].name="!MiniFAT"),Dr[ue[0]].name="!FAT",Dr.fat_addrs=ue,Dr.ssz=kt;var Qr=[],Ws=[],nd=[];(function st(At,Lt,Pt,kt,Nt,Vt,ce,Ce){for(var Ei,oe=0,ue=kt.length?2:0,he=Lt[At].data,Xe=0,ti=0;Xe0&&oe!==Dt&&(Lt[oe].name="!StreamData")):$e.size>=4096?($e.storage="fat",void 0===Lt[$e.start]&&(Lt[$e.start]=Z(Pt,$e.start,Lt.fat_addrs,Lt.ssz)),Lt[$e.start].name=$e.name,$e.content=Lt[$e.start].data.slice(0,$e.size)):($e.storage="minifat",$e.size<0?$e.size=0:oe!==Dt&&$e.start!==Dt&&Lt[oe]&&($e.content=j($e,Lt[oe].data,(Lt[Ce]||{}).data))),$e.content&&Ca($e.content,0),Vt[Ei]=$e,ce.push($e)}})(ce,Dr,qi,Qr,Nt,{},Ws,Ce),function U(At,Lt,Pt){for(var kt=0,Nt=0,Vt=0,ce=0,Ce=0,oe=Pt.length,ue=[],he=[];kt0&&ce>=0;)Vt.push(Lt.slice(ce*_t,ce*_t+_t)),Nt-=_t,ce=vm(Pt,4*ce);return 0===Vt.length?le(0):Us(Vt).slice(0,At.size)}function W(At,Lt,Pt,kt,Nt){var Vt=Dt;if(At===Dt){if(0!==Lt)throw new Error("DIFAT chain shorter than expected")}else if(-1!==At){var ce=Pt[At],Ce=(kt>>>2)-1;if(!ce)return;for(var oe=0;oe=1&&W(vm(ce,kt-4),Lt-1,Pt,kt,Nt)}}function Z(At,Lt,Pt,kt,Nt){var Vt=[],ce=[];Nt||(Nt=[]);var Ce=kt-1,oe=0,ue=0;for(oe=Lt;oe>=0;){Nt[oe]=!0,Vt[Vt.length]=oe,ce.push(At[oe]);var he=Pt[Math.floor(4*oe/kt)];if(kt<4+(ue=4*oe&Ce))throw new Error("FAT boundary crossed: "+oe+" 4 "+kt);if(!At[he])break;oe=vm(At[he],ue)}return{nodes:Vt,data:Tet([ce])}}function yt(At,Lt){return new Date(1e3*(La(At,Lt+4)/1e7*Math.pow(2,32)+La(At,Lt)/1e7-11644473600))}function ft(At,Lt){var Pt=Lt||{},kt=Pt.root||"Root Entry";if(At.FullPaths||(At.FullPaths=[]),At.FileIndex||(At.FileIndex=[]),At.FullPaths.length!==At.FileIndex.length)throw new Error("inconsistent CFB structure");0===At.FullPaths.length&&(At.FullPaths[0]=kt+"/",At.FileIndex[0]={name:kt,type:5}),Pt.CLSID&&(At.FileIndex[0].clsid=Pt.CLSID),function ht(At){var Lt="\x01Sh33tJ5";if(!Vi.find(At,"/"+Lt)){var Pt=le(4);Pt[0]=55,Pt[1]=Pt[3]=50,Pt[2]=54,At.FileIndex.push({name:Lt,type:2,content:Pt,size:4,L:69,R:69,C:69}),At.FullPaths.push(At.FullPaths[0]+Lt),mt(At)}}(At)}function mt(At,Lt){ft(At);for(var Pt=!1,kt=!1,Nt=At.FullPaths.length-1;Nt>=0;--Nt){var Vt=At.FileIndex[Nt];switch(Vt.type){case 0:kt?Pt=!0:(At.FileIndex.pop(),At.FullPaths.pop());break;case 1:case 2:case 5:kt=!0,isNaN(Vt.R*Vt.L*Vt.C)&&(Pt=!0),Vt.R>-1&&Vt.L>-1&&Vt.R==Vt.L&&(Pt=!0);break;default:Pt=!0}}if(Pt||Lt){var ce=new Date(1987,1,19),Ce=0,oe=Object.create?Object.create(null):{},ue=[];for(Nt=0;Nt1?1:-1,Xe.size=0,Xe.type=5;else if("/"==ti.slice(-1)){for(Ce=Nt+1;Ce=ue.length?-1:Ce,Ce=Nt+1;Ce=ue.length?-1:Ce,Xe.type=1}else n(At.FullPaths[Nt+1]||"")==n(ti)&&(Xe.R=Nt+1),Xe.type=2}}}function wt(At,Lt){var Pt=Lt||{};if("mad"==Pt.fileType)return function bD(At,Lt){for(var Pt=Lt||{},kt=Pt.boundary||"SheetJS",Nt=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(kt="------="+kt).slice(2)+'"',"","",""],Vt=At.FullPaths[0],ce=Vt,Ce=At.FileIndex[0],oe=1;oe=32&&Ei<128&&++Xe;var $e=Xe>=4*ti/5;Nt.push(kt),Nt.push("Content-Location: "+(Pt.root||"file:///C:/SheetJS/")+ce),Nt.push("Content-Transfer-Encoding: "+($e?"quoted-printable":"base64")),Nt.push("Content-Type: "+Cw(Ce,ce)),Nt.push(""),Nt.push($e?yD(he):id(he))}return Nt.push(kt+"--\r\n"),Nt.join("\r\n")}(At,Pt);if("zip"===(mt(At),Pt.fileType))return function Vm(At,Lt){var Pt=Lt||{},kt=[],Nt=[],Vt=le(1),ce=Pt.compression?8:0,Ce=0,ue=0,he=0,Xe=0,ti=0,Ei=At.FullPaths[0],ui=Ei,$e=At.FileIndex[0],qi=[],Dr=0;for(ue=1;ue0&&(Ba<4096?ui+=Ba+63>>6:$e+=Ba+511>>9)}}for(var Qr=Ei.FullPaths.length+3>>2,nd=ui+127>>7,Hm=(ui+7>>3)+$e+Qr+nd,Hu=Hm+127>>7,Q0=Hu<=109?0:Math.ceil((Hu-109)/127);Hm+Hu+Q0+127>>7>Hu;)Q0=++Hu<=109?0:Math.ceil((Hu-109)/127);var Cc=[1,Q0,Hu,nd,Qr,$e,ui,0];return Ei.FileIndex[0].size=ui<<6,Cc[7]=(Ei.FileIndex[0].start=Cc[0]+Cc[1]+Cc[2]+Cc[3]+Cc[4]+Cc[5])+(Cc[6]+7>>3),Cc}(At),Nt=le(kt[7]<<9),Vt=0,ce=0;for(Vt=0;Vt<8;++Vt)Nt.write_shift(1,Te[Vt]);for(Vt=0;Vt<8;++Vt)Nt.write_shift(2,0);for(Nt.write_shift(2,62),Nt.write_shift(2,3),Nt.write_shift(2,65534),Nt.write_shift(2,9),Nt.write_shift(2,6),Vt=0;Vt<3;++Vt)Nt.write_shift(2,0);for(Nt.write_shift(4,0),Nt.write_shift(4,kt[2]),Nt.write_shift(4,kt[0]+kt[1]+kt[2]+kt[3]-1),Nt.write_shift(4,0),Nt.write_shift(4,4096),Nt.write_shift(4,kt[3]?kt[0]+kt[1]+kt[2]-1:Dt),Nt.write_shift(4,kt[3]),Nt.write_shift(-4,kt[1]?kt[0]-1:Dt),Nt.write_shift(4,kt[1]),Vt=0;Vt<109;++Vt)Nt.write_shift(-4,Vt>9));for(Ce(kt[6]+7>>3);511&Nt.l;)Nt.write_shift(-4,qt.ENDOFCHAIN);for(ce=Vt=0,oe=0;oe=4096)&&(he.start=ce,Ce(ue+63>>6));for(;511&Nt.l;)Nt.write_shift(-4,qt.ENDOFCHAIN);for(Vt=0;Vt31&&(console.error("Name "+ti+" will be truncated to "+ti.slice(0,31)),ti=ti.slice(0,31)),ue=2*(ti.length+1),Nt.write_shift(64,ti,"utf16le"),Nt.write_shift(2,ue),Nt.write_shift(1,he.type),Nt.write_shift(1,he.color),Nt.write_shift(-4,he.L),Nt.write_shift(-4,he.R),Nt.write_shift(-4,he.C),he.clsid)Nt.write_shift(16,he.clsid,"hex");else for(oe=0;oe<4;++oe)Nt.write_shift(4,0);Nt.write_shift(4,he.state||0),Nt.write_shift(4,0),Nt.write_shift(4,0),Nt.write_shift(4,0),Nt.write_shift(4,0),Nt.write_shift(4,he.start),Nt.write_shift(4,he.size),Nt.write_shift(4,0)}else{for(oe=0;oe<17;++oe)Nt.write_shift(4,0);for(oe=0;oe<3;++oe)Nt.write_shift(4,-1);for(oe=0;oe<12;++oe)Nt.write_shift(4,0)}}for(Vt=1;Vt=4096)if(Nt.l=he.start+1<<9,Rn&&Buffer.isBuffer(he.content))he.content.copy(Nt,Nt.l,0,he.size),Nt.l+=he.size+511&-512;else{for(oe=0;oe0&&he.size<4096)if(Rn&&Buffer.isBuffer(he.content))he.content.copy(Nt,Nt.l,0,he.size),Nt.l+=he.size+63&-64;else{for(oe=0;oe>16|Lt>>8|Lt));function Ae(At,Lt){var Pt=$t[255&At];return Lt<=8?Pt>>>8-Lt:(Pt=Pt<<8|$t[At>>8&255],Lt<=16?Pt>>>16-Lt:(Pt=Pt<<8|$t[At>>16&255])>>>24-Lt)}function Ft(At,Lt){var Pt=7&Lt,kt=Lt>>>3;return(At[kt]|(Pt<=6?0:At[kt+1]<<8))>>>Pt&3}function Di(At,Lt){var Pt=7&Lt,kt=Lt>>>3;return(At[kt]|(Pt<=5?0:At[kt+1]<<8))>>>Pt&7}function je(At,Lt){var Pt=7&Lt,kt=Lt>>>3;return(At[kt]|(Pt<=3?0:At[kt+1]<<8))>>>Pt&31}function ji(At,Lt){var Pt=7&Lt,kt=Lt>>>3;return(At[kt]|(Pt<=1?0:At[kt+1]<<8))>>>Pt&127}function un(At,Lt,Pt){var kt=7&Lt,Nt=Lt>>>3,ce=At[Nt]>>>kt;return Pt<8-kt||(ce|=At[Nt+1]<<8-kt,Pt<16-kt)||(ce|=At[Nt+2]<<16-kt,Pt<24-kt)||(ce|=At[Nt+3]<<24-kt),ce&(1<>>3;return kt<=5?At[Nt]|=(7&Pt)<>8-kt),Lt+3}function ur(At,Lt,Pt){return At[Lt>>>3]|=Pt=(1&Pt)<<(7&Lt),Lt+1}function sr(At,Lt,Pt){var Nt=Lt>>>3;return At[Nt]|=255&(Pt<<=7&Lt),At[Nt+1]=Pt>>>=8,Lt+8}function ms(At,Lt,Pt){var Nt=Lt>>>3;return At[Nt]|=255&(Pt<<=7&Lt),At[Nt+1]=255&(Pt>>>=8),At[Nt+2]=Pt>>>8,Lt+16}function qa(At,Lt){var Pt=At.length,kt=2*Pt>Lt?2*Pt:Lt+5,Nt=0;if(Pt>=Lt)return At;if(Rn){var Vt=Ltt(kt);if(At.copy)At.copy(Vt);else for(;Nt>kt-Xe,ce=(1<=0;--ce)Lt[Ce|ce<0;)oe[oe.l++]=Ce[ue++]}return oe.l}(oe,ue):function ce(Ce,oe){for(var ue=0,he=0,Xe=Qt?new Uint16Array(32768):[];he0;)oe[oe.l++]=Ce[he++];ue=8*oe.l}else{ue=bi(oe,ue,+(he+ti==Ce.length)+2);for(var Ei=0;ti-- >0;){var ui=Ce[he],$e=-1,qi=0;if(($e=Xe[Ei=32767&(Ei<<5^ui)])&&(($e|=-32768&he)>he&&($e-=32768),$e2){(ui=Nt[qi])<=22?ue=sr(oe,ue,$t[ui+1]>>1)-1:(sr(oe,ue,3),sr(oe,ue+=5,$t[ui-23]>>5),ue+=3);var Dr=ui<8?0:ui-4>>2;Dr>0&&(ms(oe,ue,qi-vi[ui]),ue+=Dr),ue=sr(oe,ue,$t[ui=Lt[he-$e]]>>3),ue-=3;var Ba=ui<4?0:ui-2>>1;Ba>0&&(ms(oe,ue,he-$e-hi[ui]),ue+=Ba);for(var Qr=0;Qr>>3;return(At[kt]|(Pt<=4?0:At[kt+1]<<8))>>>Pt&15}(At,Lt+=5)+4;Lt+=4;for(var Vt=0,ce=Qt?new Uint8Array(19):si(19),Ce=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],oe=1,ue=Qt?new Uint8Array(8):si(8),he=Qt?new Uint8Array(8):si(8),Xe=ce.length,ti=0;ti>8-ui;for(var $e=(1<<7-ui)-1;$e>=0;--$e)tr[Ei|$e<>>=3){case 16:for(Vt=3+Ft(At,Lt),Lt+=2,Ei=qi[qi.length-1];Vt-- >0;)qi.push(Ei);break;case 17:for(Vt=3+Di(At,Lt),Lt+=3;Vt-- >0;)qi.push(0);break;case 18:for(Vt=11+ji(At,Lt),Lt+=7;Vt-- >0;)qi.push(0);break;default:qi.push(Ei),oe>>0,Ce=0,oe=0;!(1&kt);)if(kt=Di(At,Pt),Pt+=3,kt>>>1)for(kt>>1==1?(Ce=9,oe=5):(Pt=Tc(At,Pt),Ce=Br,oe=Nm);;){!Lt&&ce>>1==1?Po[he]:an[he];if(Pt+=15&Xe,(Xe>>>=4)>>>8&255){if(256==Xe)break;var ti=(Xe-=257)<8?0:Xe-4>>2;ti>5&&(ti=0);var Ei=Vt+vi[Xe];ti>0&&(Ei+=un(At,Pt,ti),Pt+=ti),he=un(At,Pt,oe),Pt+=15&(Xe=kt>>>1==1?ar[he]:Ji[he]);var ui=(Xe>>>=4)<4?0:Xe-2>>1,$e=hi[Xe];for(ui>0&&($e+=un(At,Pt,ui),Pt+=ui),!Lt&&ce>>3]|At[1+(Pt>>>3)]<<8;if(Pt+=32,ue>0)for(!Lt&&ce0;)Nt[Vt++]=At[Pt>>>3],Pt+=8}return Lt?[Nt,Pt+7>>>3]:[Nt.slice(0,Vt),Pt+7>>>3]}(At.slice(At.l||0),Lt);return At.l+=kt[1],kt[0]}function X0(At,Lt){if(!At)throw new Error(Lt);typeof console<"u"&&console.error(Lt)}function Tw(At,Lt){var Pt=At;Ca(Pt,0);var Vt={FileIndex:[],FullPaths:[]};ft(Vt,{root:Lt.root});for(var ce=Pt.length-4;(80!=Pt[ce]||75!=Pt[ce+1]||5!=Pt[ce+2]||6!=Pt[ce+3])&&ce>=0;)--ce;Pt.l=ce+4,Pt.l+=4;var Ce=Pt.read_shift(2);Pt.l+=6;var oe=Pt.read_shift(4);for(Pt.l=oe,ce=0;ce>>=5);Pt>>>=4,kt.setMilliseconds(0),kt.setFullYear(Pt+1980),kt.setMonth(Vt-1),kt.setDate(Nt);var ce=31&Lt,Ce=63&(Lt>>>=5);return kt.setHours(Lt>>>=6),kt.setMinutes(Ce),kt.setSeconds(ce<<1),kt}(At);if(8257&Vt)throw new Error("Unsupported ZIP encryption");At.read_shift(4);for(var ue=At.read_shift(4),he=At.read_shift(4),Xe=At.read_shift(2),ti=At.read_shift(2),Ei="",ui=0;ui"u")throw new Error("Unsupported");return new Uint8Array(e)}(e):e}function O1(e,i,t){if(typeof Xh<"u"&&Xh.writeFileSync)return t?Xh.writeFileSync(e,i,t):Xh.writeFileSync(e,i);if(typeof Deno<"u"){if(t&&"string"==typeof i)switch(t){case"utf8":i=new TextEncoder(t).encode(i);break;case"binary":i=R1(i);break;default:throw new Error("Unsupported encoding "+t)}return Deno.writeFileSync(e,i)}var n="utf8"==t?Lu(i):i;if(typeof IE_SaveFile<"u")return IE_SaveFile(n,e);if(typeof Blob<"u"){var r=new Blob([tet(n)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(r,e);if(typeof saveAs<"u")return saveAs(r,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var s=URL.createObjectURL(r);if("object"==typeof chrome&&"function"==typeof(chrome.downloads||{}).download)return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),chrome.downloads.download({url:s,filename:e,saveAs:!0});var o=document.createElement("a");if(null!=o.download)return o.download=e,o.href=s,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),s}else if(typeof URL<"u"&&!URL.createObjectURL&&"object"==typeof chrome){var l="data:application/octet-stream;base64,"+function $Ut(e){for(var i="",t=0,n=0,r=0,s=0,o=0,l=0,w=0,E=0;E>2,o=(3&t)<<4|(n=e[E++])>>4,l=(15&n)<<2|(r=e[E++])>>6,w=63&r,isNaN(n)?l=w=64:isNaN(r)&&(w=64),i+=bo.charAt(s)+bo.charAt(o)+bo.charAt(l)+bo.charAt(w);return i}(new Uint8Array(tet(n)));return chrome.downloads.download({url:l,filename:e,saveAs:!0})}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var w=File(e);return w.open("w"),w.encoding="binary",Array.isArray(i)&&(i=ku(i)),w.write(i),w.close(),i}catch(E){if(!E.message||-1==E.message.indexOf("onstruct"))throw E}throw new Error("cannot save file "+e)}function rs(e){for(var i=Object.keys(e),t=[],n=0;n=60&&e<61)return e;var i=new Date;return i.setTime(24*(e>60?e:e+1)*60*60*1e3+iet),i}var Dzt=/^(\d+):(\d+)(:\d+)?(\.\d+)?$/,Mzt=/^(\d+)-(\d+)-(\d+)$/,net=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/;function ps(e,i){if(e instanceof Date)return e;var t=e.match(Dzt);return t?new Date((i?_zt:Ezt)+1e3*(60*(60*parseInt(t[1],10)+parseInt(t[2],10))+(t[3]?parseInt(t[3].slice(1),10):0))+(t[4]?parseInt((t[4]+"000").slice(1,4),10):0)):(t=e.match(Mzt))?new Date(Date.UTC(+t[1],+t[2]-1,+t[3],0,0,0,0)):(t=e.match(net))?new Date(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4],+t[5],t[6]&&parseInt(t[6].slice(1),10)||0,t[7]&&parseInt((t[7]+"0000").slice(1,4),10)||0)):new Date(e)}function fm(e,i){if(Rn&&Buffer.isBuffer(e)){if(i&&I1){if(255==e[0]&&254==e[1])return Lu(e.slice(2).toString("utf16le"));if(254==e[1]&&255==e[2])return Lu(function Ftt(e){for(var i=[],t=0;t>1;++t)i[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return i.join("")}(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(i){if(255==e[0]&&254==e[1])return Lu(new TextDecoder("utf-16le").decode(e.slice(2)));if(254==e[0]&&255==e[1])return Lu(new TextDecoder("utf-16be").decode(e.slice(2)))}var t={"\u20ac":"\x80","\u201a":"\x82",\u0192:"\x83","\u201e":"\x84","\u2026":"\x85","\u2020":"\x86","\u2021":"\x87",\u02c6:"\x88","\u2030":"\x89",\u0160:"\x8a","\u2039":"\x8b",\u0152:"\x8c",\u017d:"\x8e","\u2018":"\x91","\u2019":"\x92","\u201c":"\x93","\u201d":"\x94","\u2022":"\x95","\u2013":"\x96","\u2014":"\x97","\u02dc":"\x98","\u2122":"\x99",\u0161:"\x9a","\u203a":"\x9b",\u0153:"\x9c",\u017e:"\x9e",\u0178:"\x9f"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u017d\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u017e\u0178]/g,function(s){return t[s]||s})}catch{}var n=[],r=0;try{for(r=0;r3&&-1==Lzt.indexOf(i))return s}else if(i.replace(/[ap]m?/,"").match(/[a-z]/))return s;return o<0||o>8099||e.match(/[^-0-9:,\/\\\ ]/)?s:r}function pm(e){return new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}function MA(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}function yn(e,i,t){if(e.FullPaths){var n;if("string"==typeof t)return n=Rn?Pu(t):function KUt(e){for(var i=[],t=0,n=e.length+250,r=vf(e.length+255),s=0;s>6&31,r[t++]=128|63&o;else if(o>=55296&&o<57344){o=64+(1023&o);var l=1023&e.charCodeAt(++s);r[t++]=240|o>>8&7,r[t++]=128|o>>2&63,r[t++]=128|l>>6&15|(3&o)<<4,r[t++]=128|63&l}else r[t++]=224|o>>12&15,r[t++]=128|o>>6&63,r[t++]=128|63&o;t>n&&(i.push(r.slice(0,t)),t=0,r=vf(65535),n=65530)}return i.push(r.slice(0,t)),Us(i)}(t),Vi.utils.cfb_add(e,i,n);Vi.utils.cfb_add(e,i,t)}else e.file(i,t)}function VN(){return Vi.utils.cfb_new()}var zs='\r\n',UN=AA({""":'"',"'":"'",">":">","<":"<","&":"&"}),zN=/[&<>'"]/g,Xzt=/[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;function _n(e){return(e+"").replace(zN,function(t){return UN[t]}).replace(Xzt,function(t){return"_x"+("000"+t.charCodeAt(0).toString(16)).slice(-4)+"_"})}function fet(e){return _n(e).replace(/ /g,"_x0020_")}var pet=/[\u0000-\u001f]/g;function B1(e){return(e+"").replace(zN,function(t){return UN[t]}).replace(/\n/g,"
").replace(pet,function(t){return"&#x"+("000"+t.charCodeAt(0).toString(16)).slice(-4)+";"})}function GN(e){for(var i="",t=0,n=0,r=0,s=0,o=0,l=0;t191&&n<224?(o=(31&n)<<6,o|=63&r,i+=String.fromCharCode(o)):(s=e.charCodeAt(t++),n<240?i+=String.fromCharCode((15&n)<<12|(63&r)<<6|63&s):(l=((7&n)<<18|(63&r)<<12|(63&s)<<6|63&(o=e.charCodeAt(t++)))-65536,i+=String.fromCharCode(55296+(l>>>10&1023)),i+=String.fromCharCode(56320+(1023&l)))));return i}function get(e){var t,n,l,i=vf(2*e.length),r=1,s=0,o=0;for(n=0;n>>10&1023),t=56320+(1023&t)),0!==o&&(i[s++]=255&o,i[s++]=o>>>8,o=0),i[s++]=t%256,i[s++]=t>>>8;return i.slice(0,s).toString("ucs2")}function vet(e){return Pu(e,"binary").toString("utf8")}var IA="foo bar baz\xe2\x98\x83\xf0\x9f\x8d\xa3",wr=Rn&&(vet(IA)==GN(IA)&&vet||get(IA)==GN(IA)&&get)||GN,Lu=Rn?function(e){return Pu(e,"utf8").toString("binary")}:function(e){for(var i=[],t=0,n=0,r=0;t>6))),i.push(String.fromCharCode(128+(63&n)));break;case n>=55296&&n<57344:n-=55296,r=e.charCodeAt(t++)-56320+(n<<10),i.push(String.fromCharCode(240+(r>>18&7))),i.push(String.fromCharCode(144+(r>>12&63))),i.push(String.fromCharCode(128+(r>>6&63))),i.push(String.fromCharCode(128+(63&r)));break;default:i.push(String.fromCharCode(224+(n>>12))),i.push(String.fromCharCode(128+(n>>6&63))),i.push(String.fromCharCode(128+(63&n)))}return i.join("")},bet=/(^\s|\s$|\n)/;function Ja(e,i){return"<"+e+(i.match(bet)?' xml:space="preserve"':"")+">"+i+""}function V1(e){return rs(e).map(function(i){return" "+i+'="'+e[i]+'"'}).join("")}function ii(e,i,t){return"<"+e+(null!=t?V1(t):"")+(null!=i?(i.match(bet)?' xml:space="preserve"':"")+">"+i+""}function HN(e,i){try{return e.toISOString().replace(/\.\d*/,"")}catch(t){if(i)throw t}return""}var Ta={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},gm=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],Gl={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"},wet=function(e){for(var i=[],n=0;n0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(i){return Buffer.isBuffer(i)?i:Pu(i)})):wet(e)}:wet,Cet=function(e,i,t){for(var n=[],r=i;r0?P0(e,i+4,i+4+t-1):""},WN=Det,Met=function(e,i){var t=La(e,i);return t>0?P0(e,i+4,i+4+t-1):""},jN=Met,Iet=function(e,i){var t=2*La(e,i);return t>0?P0(e,i+4,i+4+t-1):""},XN=Iet,Ret=function(i,t){var n=La(i,t);return n>0?PA(i,t+4,t+4+n):""},YN=Ret,Pet=function(e,i){var t=La(e,i);return t>0?P0(e,i+4,i+4+t):""},$N=Pet,ket=function(e,i){return function Jzt(e,i){for(var t=1-2*(e[i+7]>>>7),n=((127&e[i+7])<<4)+(e[i+6]>>>4&15),r=15&e[i+6],s=5;s>=0;--s)r=256*r+e[i+s];return 2047==n?0==r?t*(1/0):NaN:(0==n?n=-1022:(n-=1023,r+=Math.pow(2,52)),t*Math.pow(2,n-52)*r)}(e,i)},kA=ket,QN=function(i){return Array.isArray(i)||typeof Uint8Array<"u"&&i instanceof Uint8Array};Rn&&(WN=function(i,t){if(!Buffer.isBuffer(i))return Det(i,t);var n=i.readUInt32LE(t);return n>0?i.toString("utf8",t+4,t+4+n-1):""},jN=function(i,t){if(!Buffer.isBuffer(i))return Met(i,t);var n=i.readUInt32LE(t);return n>0?i.toString("utf8",t+4,t+4+n-1):""},XN=function(i,t){if(!Buffer.isBuffer(i)||!I1)return Iet(i,t);var n=2*i.readUInt32LE(t);return i.toString("utf16le",t+4,t+4+n-1)},YN=function(i,t){if(!Buffer.isBuffer(i)||!I1)return Ret(i,t);var n=i.readUInt32LE(t);return i.toString("utf16le",t+4,t+4+n)},$N=function(i,t){if(!Buffer.isBuffer(i))return Pet(i,t);var n=i.readUInt32LE(t);return i.toString("utf8",t+4,t+4+n)},kA=function(i,t){return Buffer.isBuffer(i)?i.readDoubleLE(t):ket(i,t)},QN=function(i){return Buffer.isBuffer(i)||Array.isArray(i)||typeof Uint8Array<"u"&&i instanceof Uint8Array}),typeof En<"u"&&function Fet(){PA=function(e,i,t){return En.utils.decode(1200,e.slice(i,t)).replace(wo,"")},P0=function(e,i,t){return En.utils.decode(65001,e.slice(i,t))},WN=function(e,i){var t=La(e,i);return t>0?En.utils.decode(hm,e.slice(i+4,i+4+t-1)):""},jN=function(e,i){var t=La(e,i);return t>0?En.utils.decode(wa,e.slice(i+4,i+4+t-1)):""},XN=function(e,i){var t=2*La(e,i);return t>0?En.utils.decode(1200,e.slice(i+4,i+4+t-1)):""},YN=function(e,i){var t=La(e,i);return t>0?En.utils.decode(1200,e.slice(i+4,i+4+t)):""},$N=function(e,i){var t=La(e,i);return t>0?En.utils.decode(65001,e.slice(i+4,i+4+t)):""}}();var k0=function(e,i){return e[i]},$h=function(e,i){return 256*e[i+1]+e[i]},tGt=function(e,i){var t=256*e[i+1]+e[i];return t<32768?t:-1*(65535-t+1)},La=function(e,i){return e[i+3]*(1<<24)+(e[i+2]<<16)+(e[i+1]<<8)+e[i]},vm=function(e,i){return e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i]},eGt=function(e,i){return e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]};function U1(e,i){var n,r,o,l,w,E,t="",s=[];switch(i){case"dbcs":if(E=this.l,Rn&&Buffer.isBuffer(this)&&I1)t=this.slice(this.l,this.l+2*e).toString("utf16le");else for(w=0;w0?vm:eGt)(this,this.l),this.l+=4,n);case 8:case-8:if("f"===i)return r=8==e?kA(this,this.l):kA([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,r;e=8;case 16:t=_et(this,this.l,e)}}return this.l+=e,t}var iGt=function(e,i,t){e[t]=255&i,e[t+1]=i>>>8&255,e[t+2]=i>>>16&255,e[t+3]=i>>>24&255},nGt=function(e,i,t){e[t]=255&i,e[t+1]=i>>8&255,e[t+2]=i>>16&255,e[t+3]=i>>24&255},rGt=function(e,i,t){e[t]=255&i,e[t+1]=i>>>8&255};function sGt(e,i,t){var n=0,r=0;if("dbcs"===t){for(r=0;r!=i.length;++r)rGt(this,i.charCodeAt(r),this.l+2*r);n=2*i.length}else if("sbcs"===t||"cpstr"==t)if(typeof En<"u"&&874==hm){for(r=0;r!=i.length;++r){var s=En.utils.encode(hm,i.charAt(r));this[this.l+r]=s[0]}n=i.length}else if(typeof En<"u"&&"cpstr"==t){if((s=En.utils.encode(wa,i)).length==i.length)for(r=0;r>8}for(;this.l>>=8);break;case 3:n=3,this[this.l]=255&i,this[this.l+1]=255&(i>>>=8),this[this.l+2]=255&(i>>>=8);break;case 4:n=4,iGt(this,i,this.l);break;case 8:if(n=8,"f"===t){!function qzt(e,i,t){var n=(i<0||1/i==-1/0?1:0)<<7,r=0,s=0,o=n?-i:i;isFinite(o)?0==o?r=s=0:(r=Math.floor(Math.log(o)/Math.LN2),s=o*Math.pow(2,52-r),r<=-1023&&(!isFinite(s)||s>4|n}(this,i,this.l);break}case 16:break;case-4:n=4,nGt(this,i,this.l)}}return this.l+=n,this}function Oet(e,i){var t=_et(this,this.l,e.length>>1);if(t!==e)throw new Error(i+"Expected "+e+" saw "+t);this.l+=e.length>>1}function Ca(e,i){e.l=i,e.read_shift=U1,e.chk=Oet,e.write_shift=sGt}function To(e,i){e.l+=i}function le(e){var i=vf(e);return Ca(i,0),i}function Co(){var e=[],i=Rn?256:2048,t=function(E){var D=le(E);return Ca(D,0),D},n=t(i),r=function(){n&&(n.l&&(n.length>n.l&&((n=n.slice(0,n.l)).l=n.length),n.length>0&&e.push(n)),n=null)},s=function(E){return n&&E=128?1:0)+1,n>=128&&++s,n>=16384&&++s,n>=2097152&&++s;var o=e.next(s);r<=127?o.write_shift(1,r):(o.write_shift(1,128+(127&r)),o.write_shift(1,r>>7));for(var l=0;4!=l;++l){if(!(n>=128)){o.write_shift(1,n);break}o.write_shift(1,128+(127&n)),n>>=7}n>0&&QN(t)&&e.push(t)}}function z1(e,i,t){var n=br(e);if(i.s?(n.cRel&&(n.c+=i.s.c),n.rRel&&(n.r+=i.s.r)):(n.cRel&&(n.c+=i.c),n.rRel&&(n.r+=i.r)),!t||t.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function Let(e,i,t){var n=br(e);return n.s=z1(n.s,i.s,t),n.e=z1(n.e,i.s,t),n}function G1(e,i){if(e.cRel&&e.c<0)for(e=br(e);e.c<0;)e.c+=i>8?16384:256;if(e.rRel&&e.r<0)for(e=br(e);e.r<0;)e.r+=i>8?1048576:i>5?65536:16384;var t=Pn(e);return!e.cRel&&null!=e.cRel&&(t=function lGt(e){return e.replace(/^([A-Z])/,"$$$1")}(t)),!e.rRel&&null!=e.rRel&&(t=function aGt(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}(t)),t}function KN(e,i){return 0!=e.s.r||e.s.rRel||e.e.r!=(i.biff>=12?1048575:i.biff>=8?65536:16384)||e.e.rRel?0!=e.s.c||e.s.cRel||e.e.c!=(i.biff>=12?16383:255)||e.e.cRel?G1(e.s,i.biff)+":"+G1(e.e,i.biff):(e.s.rRel?"":"$")+Un(e.s.r)+":"+(e.e.rRel?"":"$")+Un(e.e.r):(e.s.cRel?"":"$")+xn(e.s.c)+":"+(e.e.cRel?"":"$")+xn(e.e.c)}function ZN(e){return parseInt(function oGt(e){return e.replace(/\$(\d+)$/,"$1")}(e),10)-1}function Un(e){return""+(e+1)}function JN(e){for(var i=function cGt(e){return e.replace(/^\$([A-Z])/,"$1")}(e),t=0,n=0;n!==i.length;++n)t=26*t+i.charCodeAt(n)-64;return t-1}function xn(e){if(e<0)throw new Error("invalid column "+e);var i="";for(++e;e;e=Math.floor((e-1)/26))i=String.fromCharCode((e-1)%26+65)+i;return i}function Tr(e){for(var i=0,t=0,n=0;n=48&&r<=57?i=10*i+(r-48):r>=65&&r<=90&&(t=26*t+(r-64))}return{c:t-1,r:i-1}}function Pn(e){for(var i=e.c+1,t="";i;i=(i-1)/26|0)t=String.fromCharCode((i-1)%26+65)+t;return t+(e.r+1)}function Sa(e){var i=e.indexOf(":");return-1==i?{s:Tr(e),e:Tr(e)}:{s:Tr(e.slice(0,i)),e:Tr(e.slice(i+1))}}function bn(e,i){return typeof i>"u"||"number"==typeof i?bn(e.s,e.e):("string"!=typeof e&&(e=Pn(e)),"string"!=typeof i&&(i=Pn(i)),e==i?e:e+":"+i)}function H1(e){var i=Sa(e);return"$"+xn(i.s.c)+"$"+Un(i.s.r)+":$"+xn(i.e.c)+"$"+Un(i.e.r)}function W1(e,i){if(!(e||i&&i.biff<=5&&i.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e.replace(/'/g,"''")+"'":e}function $n(e){var i={s:{c:0,r:0},e:{c:0,r:0}},t=0,n=0,r=0,s=e.length;for(t=0;n26);++n)t=26*t+r;for(i.s.c=--t,t=0;n9);++n)t=10*t+r;if(i.s.r=--t,n===s||10!=r)return i.e.c=i.s.c,i.e.r=i.s.r,i;for(++n,t=0;n!=s&&!((r=e.charCodeAt(n)-64)<1||r>26);++n)t=26*t+r;for(i.e.c=--t,t=0;n!=s&&!((r=e.charCodeAt(n)-48)<0||r>9);++n)t=10*t+r;return i.e.r=--t,i}function Nu(e,i,t){return null==e||null==e.t||"z"==e.t?"":void 0!==e.w?e.w:("d"==e.t&&!e.z&&t&&t.dateNF&&(e.z=t.dateNF),"e"==e.t?vc[e.v]||e.v:function Net(e,i){var t="d"==e.t&&i instanceof Date;if(null!=e.z)try{return e.w=fl(e.z,t?ws(i):i)}catch{}try{return e.w=fl((e.XF||{}).numFmtId||(t?14:0),t?ws(i):i)}catch{return""+i}}(e,null==i?e.v:i))}function xf(e,i){var t=i&&i.sheet?i.sheet:"Sheet1",n={};return n[t]=e,{SheetNames:[t],Sheets:n}}function Bet(e,i,t){var n=t||{},r=e?null!=e["!data"]:n.dense;null!=Vs&&null==r&&(r=Vs);var s=e||{};r&&!s["!data"]&&(s["!data"]=[]);var o=0,l=0;if(s&&null!=n.origin)if("number"==typeof n.origin)o=n.origin;else{var w="string"==typeof n.origin?Tr(n.origin):n.origin;o=w.r,l=w.c}var E={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(s["!ref"]){var D=$n(s["!ref"]);E.s.c=D.s.c,E.s.r=D.s.r,E.e.c=Math.max(E.e.c,D.e.c),E.e.r=Math.max(E.e.r,D.e.r),-1==o&&(E.e.r=o=s["!ref"]?D.e.r+1:0)}else E.s.c=E.e.c=E.s.r=E.e.r=0;for(var k=[],O=!1,L=0;L!=i.length;++L)if(i[L]){if(!Array.isArray(i[L]))throw new Error("aoa_to_sheet expects an array of arrays");var U=o+L,j=""+(U+1);r&&(s["!data"][U]||(s["!data"][U]=[]),k=s["!data"][U]);for(var W=0;W!=i[L].length;++W)if(!(typeof i[L][W]>"u")){var Z={v:i[L][W]},rt=l+W;if(E.s.r>U&&(E.s.r=U),E.s.c>rt&&(E.s.c=rt),E.e.r0&&i.write_shift(0,e,"dbcs"),t?i.slice(0,i.l):i}function fGt(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function qN(e,i){var t=e.l,n=e.read_shift(1),r=So(e),s=[],o={t:r,h:r};if(1&n){for(var l=e.read_shift(4),w=0;w!=l;++w)s.push(fGt(e));o.r=s}else o.r=[{ich:0,ifnt:0}];return e.l=t+i,o}var gGt=qN;function gc(e){var i=e.read_shift(4),t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:i,iStyleRef:t}}function ym(e,i){return null==i&&(i=le(8)),i.write_shift(-4,e.c),i.write_shift(3,e.iStyleRef||e.s),i.write_shift(1,0),i}function xm(e){var i=e.read_shift(2);return i+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:i}}function bm(e,i){return null==i&&(i=le(4)),i.write_shift(3,e.iStyleRef||e.s),i.write_shift(1,0),i}var yGt=So,Vet=Ea;function FA(e){var i=e.read_shift(4);return 0===i||4294967295===i?"":e.read_shift(i,"dbcs")}function j1(e,i){var t=!1;return null==i&&(t=!0,i=le(127)),i.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&i.write_shift(0,e,"dbcs"),t?i.slice(0,i.l):i}var xGt=So,t4=FA,e4=j1;function OA(e){var i=e.slice(e.l,e.l+4),t=1&i[0],n=2&i[0];e.l+=4;var r=0===n?kA([0,0,0,0,252&i[0],i[1],i[2],i[3]],0):vm(i,0)>>2;return t?r/100:r}function Uet(e,i){null==i&&(i=le(4));var t=0,n=0,r=100*e;if(e==(0|e)&&e>=-(1<<29)&&e<1<<29?n=1:r==(0|r)&&r>=-(1<<29)&&r<1<<29&&(n=1,t=1),!n)throw new Error("unsupported RkNumber "+e);i.write_shift(-4,((t?r:e)<<2)+(t+2))}function zet(e){var i={s:{},e:{}};return i.s.r=e.read_shift(4),i.e.r=e.read_shift(4),i.s.c=e.read_shift(4),i.e.c=e.read_shift(4),i}var wm=zet,O0=function bGt(e,i){return i||(i=le(16)),i.write_shift(4,e.s.r),i.write_shift(4,e.e.r),i.write_shift(4,e.s.c),i.write_shift(4,e.e.c),i};function Eo(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function Tm(e,i){return(i||le(8)).write_shift(8,e,"f")}function LA(e,i){if(i||(i=le(8)),!e||e.auto)return i.write_shift(4,0),i.write_shift(4,0),i;null!=e.index?(i.write_shift(1,2),i.write_shift(1,e.index)):null!=e.theme?(i.write_shift(1,6),i.write_shift(1,e.theme)):(i.write_shift(1,5),i.write_shift(1,0));var t=e.tint||0;if(t>0?t*=32767:t<0&&(t*=32768),i.write_shift(2,t),e.rgb&&null==e.theme){var n=e.rgb||"FFFFFF";"number"==typeof n&&(n=("000000"+n.toString(16)).slice(-6)),i.write_shift(1,parseInt(n.slice(0,2),16)),i.write_shift(1,parseInt(n.slice(2,4),16)),i.write_shift(1,parseInt(n.slice(4,6),16)),i.write_shift(1,255)}else i.write_shift(2,0),i.write_shift(1,0),i.write_shift(1,0);return i}var r4={1:{n:"CodePage",t:2},2:{n:"Category",t:80},3:{n:"PresentationFormat",t:80},4:{n:"ByteCount",t:3},5:{n:"LineCount",t:3},6:{n:"ParagraphCount",t:3},7:{n:"SlideCount",t:3},8:{n:"NoteCount",t:3},9:{n:"HiddenCount",t:3},10:{n:"MultimediaClipCount",t:3},11:{n:"ScaleCrop",t:11},12:{n:"HeadingPairs",t:4108},13:{n:"TitlesOfParts",t:4126},14:{n:"Manager",t:80},15:{n:"Company",t:80},16:{n:"LinksUpToDate",t:11},17:{n:"CharacterCount",t:3},19:{n:"SharedDoc",t:11},22:{n:"HyperlinksChanged",t:11},23:{n:"AppVersion",t:3,p:"version"},24:{n:"DigSig",t:65},26:{n:"ContentType",t:80},27:{n:"ContentStatus",t:80},28:{n:"Language",t:80},29:{n:"Version",t:80},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},s4={1:{n:"CodePage",t:2},2:{n:"Title",t:80},3:{n:"Subject",t:80},4:{n:"Author",t:80},5:{n:"Keywords",t:80},6:{n:"Comments",t:80},7:{n:"Template",t:80},8:{n:"LastAuthor",t:80},9:{n:"RevNumber",t:80},10:{n:"EditTime",t:64},11:{n:"LastPrinted",t:64},12:{n:"CreatedDate",t:64},13:{n:"ModifiedDate",t:64},14:{n:"PageCount",t:3},15:{n:"WordCount",t:3},16:{n:"CharCount",t:3},17:{n:"Thumbnail",t:71},18:{n:"Application",t:80},19:{n:"DocSecurity",t:3},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}};function PGt(e){return e.map(function(i){return[i>>16&255,i>>8&255,255&i]})}var Cm=br(PGt([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,0,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),vc={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},X1={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},a4=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"],o4={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},UA={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function Xet(e,i,t){var s,n=function Szt(e){for(var i=[],t=rs(e),n=0;n!==t.length;++n)null==i[e[t[n]]]&&(i[e[t[n]]]=[]),i[e[t[n]]].push(t[n]);return i}(o4),r=[];t||(r[r.length]=zs,r[r.length]=ii("Types",null,{xmlns:Ta.CT,"xmlns:xsd":Ta.xsd,"xmlns:xsi":Ta.xsi}),r=r.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(E){return ii("Default",null,{Extension:E[0],ContentType:E[1]})})));var o=function(E){e[E]&&e[E].length>0&&(r[r.length]=ii("Override",null,{PartName:("/"==(s=e[E][0])[0]?"":"/")+s,ContentType:UA[E][i.bookType]||UA[E].xlsx}))},l=function(E){(e[E]||[]).forEach(function(D){r[r.length]=ii("Override",null,{PartName:("/"==D[0]?"":"/")+D,ContentType:UA[E][i.bookType]||UA[E].xlsx})})},w=function(E){(e[E]||[]).forEach(function(D){r[r.length]=ii("Override",null,{PartName:("/"==D[0]?"":"/")+D,ContentType:n[E][0]})})};return o("workbooks"),l("sheets"),l("charts"),w("themes"),["strs","styles"].forEach(o),["coreprops","extprops","custprops"].forEach(w),w("vba"),w("comments"),w("threadedcomments"),w("drawings"),l("metadata"),w("people"),!t&&r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}var wn={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",CONN:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function Y1(e){var i=e.lastIndexOf("/");return e.slice(0,i+1)+"_rels/"+e.slice(i+1)+".rels"}function L0(e){var i=[zs,ii("Relationships",null,{xmlns:Ta.RELS})];return rs(e["!id"]).forEach(function(t){i[i.length]=ii("Relationship",null,e["!id"][t])}),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function vr(e,i,t,n,r,s){if(r||(r={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),i<0)for(i=e["!idx"];e["!id"]["rId"+i];++i);if(e["!idx"]=i+1,r.Id="rId"+i,r.Type=n,r.Target=t,s?r.TargetMode=s:[wn.HLINK,wn.XPATH,wn.XMISS].indexOf(r.Type)>-1&&(r.TargetMode="External"),e["!id"][r.Id])throw new Error("Cannot rewrite rId "+i);return e["!id"][r.Id]=r,e[("/"+r.Target).replace("//","/")]=r,i}function Yet(e,i,t){return[' \n',' \n'," \n"].join("")}function BGt(e,i){return[' \n',' \n'," \n"].join("")}function $et(e,i){return'SheetJS '+D1.version+""}var Kh=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function c4(e,i,t,n,r){null!=r[e]||null==i||""===i||(r[e]=i,i=_n(i),n[n.length]=t?ii(e,i,t):Ja(e,i))}function Ket(e,i){var t=i||{},n=[zs,ii("cp:coreProperties",null,{"xmlns:cp":Ta.CORE_PROPS,"xmlns:dc":Ta.dc,"xmlns:dcterms":Ta.dcterms,"xmlns:dcmitype":Ta.dcmitype,"xmlns:xsi":Ta.xsi})],r={};if(!e&&!t.Props)return n.join("");e&&(null!=e.CreatedDate&&c4("dcterms:created","string"==typeof e.CreatedDate?e.CreatedDate:HN(e.CreatedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},n,r),null!=e.ModifiedDate&&c4("dcterms:modified","string"==typeof e.ModifiedDate?e.ModifiedDate:HN(e.ModifiedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},n,r));for(var s=0;s!=Kh.length;++s){var o=Kh[s],l=t.Props&&null!=t.Props[o[1]]?t.Props[o[1]]:e?e[o[1]]:null;!0===l?l="1":!1===l?l="0":"number"==typeof l&&(l=String(l)),null!=l&&c4(o[0],l,null,n,r)}return n.length>2&&(n[n.length]="",n[1]=n[1].replace("/>",">")),n.join("")}var Sm=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],Zet=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function qet(e){var i=[],t=ii;return e||(e={}),e.Application="SheetJS",i[i.length]=zs,i[i.length]=ii("Properties",null,{xmlns:Ta.EXT_PROPS,"xmlns:vt":Ta.vt}),Sm.forEach(function(n){if(void 0!==e[n[1]]){var r;switch(n[2]){case"string":r=_n(String(e[n[1]]));break;case"bool":r=e[n[1]]?"true":"false"}void 0!==r&&(i[i.length]=t(n[0],r))}}),i[i.length]=t("HeadingPairs",t("vt:vector",t("vt:variant","Worksheets")+t("vt:variant",t("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),i[i.length]=t("TitlesOfParts",t("vt:vector",e.SheetNames.map(function(n){return""+_n(n)+""}).join(""),{size:e.Worksheets,baseType:"lpstr"})),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function tit(e){var i=[zs,ii("Properties",null,{xmlns:Ta.CUST_PROPS,"xmlns:vt":Ta.vt})];if(!e)return i.join("");var t=1;return rs(e).forEach(function(r){++t,i[i.length]=ii("property",function Zzt(e,i){switch(typeof e){case"string":var t=ii("vt:lpwstr",_n(e));return i&&(t=t.replace(/"/g,"_x0022_")),t;case"number":return ii((0|e)==e?"vt:i4":"vt:r8",_n(String(e)));case"boolean":return ii("vt:bool",e?"true":"false")}if(e instanceof Date)return ii("vt:filetime",HN(e));throw new Error("Unable to serialize "+e)}(e[r],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:_n(r)})}),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}var u4={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function ait(e,i){var t=le(4),n=le(4);switch(t.write_shift(4,80==e?31:e),e){case 3:n.write_shift(-4,i);break;case 5:(n=le(8)).write_shift(8,i,"f");break;case 11:n.write_shift(4,i?1:0);break;case 64:n=function XGt(e){var t=("string"==typeof e?new Date(Date.parse(e)):e).getTime()/1e3+11644473600,n=t%Math.pow(2,32),r=(t-n)/Math.pow(2,32);r*=1e7;var s=(n*=1e7)/Math.pow(2,32)|0;s>0&&(n%=Math.pow(2,32),r+=s);var o=le(8);return o.write_shift(4,n),o.write_shift(4,r),o}(i);break;case 31:case 80:for((n=le(4+2*(i.length+1)+(i.length%2?0:2))).write_shift(4,i.length+1),n.write_shift(0,i,"dbcs");n.l!=n.length;)n.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+i)}return Us([t,n])}var lit=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function qGt(e){switch(typeof e){case"boolean":return 11;case"number":return(0|e)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64}return-1}function cit(e,i,t){var n=le(8),r=[],s=[],o=8,l=0,w=le(8),E=le(8);if(w.write_shift(4,2),w.write_shift(4,1200),E.write_shift(4,1),s.push(w),r.push(E),o+=8+w.length,!i){(E=le(8)).write_shift(4,0),r.unshift(E);var D=[le(4)];for(D[0].write_shift(4,e.length),l=0;l-1||Zet.indexOf(e[l][0])>-1)&&null!=e[l][1]){var O=e[l][1],L=0;if(i){var U=t[L=+i[e[l][0]]];if("version"==U.p&&"string"==typeof O){var j=O.split(".");O=(+j[0]<<16)+(+j[1]||0)}w=ait(U.t,O)}else{var W=qGt(O);-1==W&&(W=31,O=String(O)),w=ait(W,O)}s.push(w),(E=le(8)).write_shift(4,i?L:2+l),r.push(E),o+=8+w.length}var Z=8*(s.length+1);for(l=0;l=12?2:1),r="sbcs-cont",s=wa;t&&t.biff>=8&&(wa=1200),t&&8!=t.biff?12==t.biff&&(r="wstr"):e.read_shift(1)&&(r="dbcs-cont"),t.biff>=2&&t.biff<=5&&(r="cpstr");var l=n?e.read_shift(n,r):"";return wa=s,l}function nHt(e){var i=e.t||"",n=le(3);n.write_shift(2,i.length),n.write_shift(1,1);var r=le(2*i.length);return r.write_shift(2*i.length,i,"utf16le"),Us([n,r])}function mit(e,i,t){return t||(t=le(3+2*e.length)),t.write_shift(2,e.length),t.write_shift(1,1),t.write_shift(31,e,"utf16le"),t}function git(e,i){i||(i=le(6+2*e.length)),i.write_shift(4,1+e.length);for(var t=0;t-1?31:23;switch(n.charAt(0)){case"#":s=28;break;case".":s&=-3}i.write_shift(4,2),i.write_shift(4,s);var o=[8,6815827,6619237,4849780,83];for(t=0;t-1?n.slice(0,r):n;for(i.write_shift(4,2*(l.length+1)),t=0;t-1?n.slice(r+1):"",i)}else{for(o="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),t=0;t8?4:2;return[e.read_shift(n),e.read_shift(n,"i"),e.read_shift(n,"i")]}function HA(e){var i=e.read_shift(2),t=e.read_shift(2);return{s:{c:e.read_shift(2),r:i},e:{c:e.read_shift(2),r:t}}}function bit(e,i){return i||(i=le(8)),i.write_shift(2,e.s.r),i.write_shift(2,e.e.r),i.write_shift(2,e.s.c),i.write_shift(2,e.e.c),i}function p4(e,i,t){var n=1536,r=16;switch(t.bookType){case"biff8":case"xla":break;case"biff5":n=1280,r=8;break;case"biff4":n=4,r=6;break;case"biff3":n=3,r=6;break;case"biff2":n=2,r=4;break;default:throw new Error("unsupported BIFF version")}var s=le(r);return s.write_shift(2,n),s.write_shift(2,i),r>4&&s.write_shift(2,29282),r>6&&s.write_shift(2,1997),r>8&&(s.write_shift(2,49161),s.write_shift(2,1),s.write_shift(2,1798),s.write_shift(2,0)),s}function SHt(e,i){var t=!i||i.biff>=8?2:1,n=le(8+t*e.name.length);n.write_shift(4,e.pos),n.write_shift(1,e.hs||0),n.write_shift(1,e.dt),n.write_shift(1,e.name.length),i.biff>=8&&n.write_shift(1,1),n.write_shift(t*e.name.length,e.name,i.biff<8?"sbcs":"utf16le");var r=n.slice(0,n.l);return r.l=n.l,r}function HHt(e,i,t,n){var r=t&&5==t.biff;n||(n=le(r?3+i.length:5+2*i.length)),n.write_shift(2,e),n.write_shift(r?1:2,i.length),r||n.write_shift(1,1),n.write_shift((r?1:2)*i.length,i,r?"sbcs":"utf16le");var s=n.length>n.l?n.slice(0,n.l):n;return null==s.l&&(s.l=s.length),s}function Eit(e,i,t,n){var r=t&&5==t.biff;n||(n=le(r?16:20)),n.write_shift(2,0),e.style?(n.write_shift(2,e.numFmtId||0),n.write_shift(2,65524)):(n.write_shift(2,e.numFmtId||0),n.write_shift(2,i<<4));var s=0;return e.numFmtId>0&&r&&(s|=1024),n.write_shift(4,s),n.write_shift(4,0),r||n.write_shift(4,0),n.write_shift(2,0),n}function _it(e){var i=le(12);return i.l++,i.write_shift(1,e.numFmtId),i.l+=10,i}var e7t=_it;function m4(e,i,t,n,r,s){var o=le(8);return Am(e,i,n,o),pit(t,s,o),o}function g4(e,i,t,n){var r=le(6+(n||e.length));return r.write_shift(2,i),r.write_shift(2,t),r.write_shift(2,n||e.length),r.write_shift(e.length,e,"sbcs"),r}function T7t(e){var i=le(24),t=Tr(e[0]);i.write_shift(2,t.r),i.write_shift(2,t.r),i.write_shift(2,t.c),i.write_shift(2,t.c);for(var n="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<16;++r)i.write_shift(1,parseInt(n[r],16));return Us([i,cHt(e[1])])}function S7t(e){var i=e[1].Tooltip,t=le(10+2*(i.length+1));t.write_shift(2,2048);var n=Tr(e[0]);t.write_shift(2,n.r),t.write_shift(2,n.r),t.write_shift(2,n.c),t.write_shift(2,n.c);for(var r=0;r1048576&&(j=1e6),2!=k&&(W=D.read_shift(2));var Z=D.read_shift(2),rt=w.codepage||1252;2!=k&&(D.l+=16,D.read_shift(1),0!==D[D.l]&&(rt=e[D[D.l]]),D.l+=1,D.l+=2),U&&(D.l+=36);for(var st=[],yt={},Tt=Math.min(D.length,2==k?521:W-10-(L?264:0)),It=U?32:11;D.l0;)if(42!==D[D.l])for(++D.l,E[++ft]=[],ht=0,ht=0;ht!=st.length;++ht){var mt=D.slice(D.l,D.l+st[ht].len);D.l+=st[ht].len,Ca(mt,0);var wt=typeof En<"u"?En.utils.decode(rt,mt):ku(mt);switch(st[ht].type){case"C":wt.trim().length&&(E[ft][ht]=wt.replace(/([^\s])\s+$/,"$1"));break;case"D":8===wt.length?(E[ft][ht]=new Date(Date.UTC(+wt.slice(0,4),+wt.slice(4,6)-1,+wt.slice(6,8),0,0,0,0)),w&&w.UTC||(E[ft][ht]=pm(E[ft][ht]))):E[ft][ht]=wt;break;case"F":E[ft][ht]=parseFloat(wt.trim());break;case"+":case"I":E[ft][ht]=U?2147483648^mt.read_shift(-4,"i"):mt.read_shift(4,"i");break;case"L":switch(wt.trim().toUpperCase()){case"Y":case"T":E[ft][ht]=!0;break;case"N":case"F":E[ft][ht]=!1;break;case"":case"\0":case"?":break;default:throw new Error("DBF Unrecognized L:|"+wt+"|")}break;case"M":if(!O)throw new Error("DBF Unexpected MEMO for type "+k.toString(16));E[ft][ht]="##MEMO##"+(U?parseInt(wt.trim(),10):mt.read_shift(4));break;case"N":(wt=wt.replace(/\u0000/g,"").trim())&&"."!=wt&&(E[ft][ht]=+wt||0);break;case"@":E[ft][ht]=new Date(mt.read_shift(-8,"f")-621356832e5);break;case"T":var Ct=mt.read_shift(4),_t=mt.read_shift(4);if(0==Ct&&0==_t)break;E[ft][ht]=new Date(864e5*(Ct-2440588)+_t),w&&w.UTC||(E[ft][ht]=pm(E[ft][ht]));break;case"Y":E[ft][ht]=mt.read_shift(4,"i")/1e4+mt.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":E[ft][ht]=-mt.read_shift(-8,"f");break;case"B":if(L&&8==st[ht].len){E[ft][ht]=mt.read_shift(8,"f");break}case"G":case"P":mt.l+=st[ht].len;break;case"0":if("_NullFlags"===st[ht].name)break;default:throw new Error("DBF Unsupported data type "+st[ht].type)}}else D.l+=Z;if(2!=k&&D.l=0&&dc(+E.codepage),"string"==E.type)throw new Error("Cannot write DBF to JS string");var k=Co(),O=$4(l,{header:1,raw:!0,cellDates:!0}),L=O[0],U=O.slice(1),j=l["!cols"]||[],W=0,Z=0,rt=0,st=1;for(W=0;W250&&(wt=250),"C"==(mt=((j[W]||{}).DBF||{}).type)&&j[W].DBF.len>wt&&(wt=j[W].DBF.len),"B"==ht&&"N"==mt&&(ht="N",ft[W]=j[W].DBF.dec,wt=j[W].DBF.len),It[W]="C"==ht||"N"==mt?wt:s[ht]||0,st+=It[W],Tt[W]=ht}else Tt[W]="?"}var _t=k.next(32);for(_t.write_shift(4,318902576),_t.write_shift(4,U.length),_t.write_shift(2,296+32*rt),_t.write_shift(2,st),W=0;W<4;++W)_t.write_shift(4,0);var Dt=+i[wa]||3;for(_t.write_shift(4,Dt<<8),e[Dt]!=+E.codepage&&(E.codepage&&console.error("DBF Unsupported codepage "+wa+", using 1252"),wa=1252),W=0,Z=0;WIt[Z]&&(_e=_e.slice(0,It[Z])),rt=0;rt":190,"?":191,"{":223},i=new RegExp("\x1bN("+rs(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1").replace("{","\\{")+"|\\|)","gm");try{i=new RegExp("\x1bN("+rs(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm")}catch{}var t=function(L,U){var j=e[U];return"number"==typeof j?IN(j):j},n=function(L,U,j){var W=U.charCodeAt(0)-32<<4|j.charCodeAt(0)-48;return 59==W?L:IN(W)};e["|"]=254;function o(L,U){var _t,j=L.split(/[\n\r]+/),W=-1,Z=-1,rt=0,st=0,yt=[],Tt=[],It=null,ft={},ht=[],mt=[],wt=[],Ct=0,Dt={Workbook:{WBProps:{},Names:[]}};for(+U.codepage>=0&&dc(+U.codepage);rt!==j.length;++rt){Ct=0;var qt,Ue=j[rt].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(i,t),Te=Ue.replace(/;;/g,"\0").split(";").map(function(Yt){return Yt.replace(/\u0000/g,";")});if(Ue.length>0)switch(Te[0]){case"ID":case"E":case"B":case"W":break;case"O":for(st=1;st=1&&_e<=4&&(Dt.Workbook.WBProps.date1904=!0)}break;case"P":"P"===Te[1].charAt(0)&&Tt.push(Ue.slice(3).replace(/;;/g,";"));break;case"NN":var ze={Sheet:0};for(st=1;st-1&&yt[De][fi];if(!Qt||!Qt[1])throw new Error("SYLK shared formula cannot find base");vi=Zit(Qt[1],{r:W-De,c:Z-fi})}vi&&(yt[W][Z]?yt[W][Z].f=vi:yt[W][Z]={t:"n",f:vi}),Ot&&(yt[W][Z]||(yt[W][Z]={t:"z"}),yt[W][Z].c=[{a:"SheetJSYLK",t:Ot}]);break;case"F":var $t=0;for(st=1;st0?(ht[W].hpt=Ct,ht[W].hpx=V0(Ct)):0===Ct&&(ht[W].hidden=!0);break;default:if(U&&U.WTF)throw new Error("SYLK bad record "+Ue)}$t<1&&(It=null);break;default:if(U&&U.WTF)throw new Error("SYLK bad record "+Ue)}}return ht.length>0&&(ft["!rows"]=ht),mt.length>0&&(ft["!cols"]=mt),mt.forEach(function(Yt){wf(Yt)}),U&&U.sheetRows&&(yt=yt.slice(0,U.sheetRows)),[yt,ft,Dt]}function w(L,U,j,W,Z,rt){var st="C;Y"+(j+1)+";X"+(W+1)+";K";switch(L.t){case"n":st+=L.v||0,L.f&&!L.F&&(st+=";E"+ZA(L.f,{r:j,c:W}));break;case"b":st+=L.v?"TRUE":"FALSE";break;case"e":st+=L.w||vc[L.v]||L.v;break;case"d":st+=ws(ps(L.v,rt),rt);break;case"s":st+='"'+(null==L.v?"":String(L.v)).replace(/"/g,"").replace(/;/g,";;")+'"'}return st}function E(L,U,j){return"C;Y"+(U+1)+";X"+(j+1)+";A"+function(L){return L.replace(/\n/g,"\x1b :").replace(/\r/g,"\x1b =")}(L.map(function(Z){return Z.t}).join(""))}return{to_workbook:function l(L,U){var j=function s(L,U){switch(U.type){case"base64":return o(Vl(L),U);case"binary":return o(L,U);case"buffer":return o(Rn&&Buffer.isBuffer(L)?L.toString("binary"):ku(L),U);case"array":return o(fm(L),U)}throw new Error("Unrecognized type "+U.type)}(L,U),W=j[0],Z=j[1],rt=j[2],st=br(U);st.date1904=(((rt||{}).Workbook||{}).WBProps||{}).date1904;var yt=F0(W,st);rs(Z).forEach(function(It){yt[It]=Z[It]});var Tt=xf(yt,U);return rs(rt).forEach(function(It){Tt[It]=rt[It]}),Tt.bookType="sylk",Tt},from_sheet:function O(L,U,j){U||(U={}),U._formats=["General"];var st,W=["ID;PSheetJS;N;E"],Z=[],rt=$n(L["!ref"]||"A1"),yt=null!=L["!data"],Tt="\r\n",It=(((j||{}).Workbook||{}).WBProps||{}).date1904;W.push("P;PGeneral");var ht=rt.s.r,mt=rt.s.c,wt=[];if(L["!ref"])for(ht=rt.s.r;ht<=rt.e.r;++ht)if(!yt||L["!data"][ht]){for(wt=[],mt=rt.s.c;mt<=rt.e.c;++mt)(st=yt?L["!data"][ht][mt]:L[xn(mt)+Un(ht)])&&st.c&&wt.push(E(st.c,ht,mt));wt.length&&Z.push(wt.join(Tt))}if(L["!ref"])for(ht=rt.s.r;ht<=rt.e.r;++ht)if(!yt||L["!data"][ht]){for(wt=[],mt=rt.s.c;mt<=rt.e.c;++mt)if((st=yt?L["!data"][ht][mt]:L[xn(mt)+Un(ht)])&&(null!=st.v||st.f&&!st.F)){if("General"!=(st.z||("d"==st.t?Ni[14]:"General"))){var Ct=U._formats.indexOf(st.z);-1==Ct&&(U._formats.push(st.z),Ct=U._formats.length-1,W.push("P;P"+st.z.replace(/;/g,";;"))),wt.push("F;P"+Ct+";Y"+(ht+1)+";X"+(mt+1))}wt.push(w(st,0,ht,mt,0,It))}Z.push(wt.join(Tt))}return W.push("F;P0;DG0G8;M255"),L["!cols"]&&function D(L,U){U.forEach(function(j,W){var Z="F;W"+(W+1)+" "+(W+1)+" ";j.hidden?Z+="0":("number"==typeof j.width&&!j.wpx&&(j.wpx=J1(j.width)),"number"==typeof j.wpx&&!j.wch&&(j.wch=q1(j.wpx)),"number"==typeof j.wch&&(Z+=Math.round(j.wch)))," "!=Z.charAt(Z.length-1)&&L.push(Z)})}(W,L["!cols"]),L["!rows"]&&function k(L,U){U.forEach(function(j,W){var Z="F;";j.hidden?Z+="M0;":j.hpt?Z+="M"+20*j.hpt+";":j.hpx&&(Z+="M"+20*tw(j.hpx)+";"),Z.length>2&&L.push(Z+"R"+(W+1))})}(W,L["!rows"]),L["!ref"]&&W.push("B;Y"+(rt.e.r-rt.s.r+1)+";X"+(rt.e.c-rt.s.c+1)+";D"+[rt.s.c,rt.s.r,rt.e.c,rt.e.r].join(" ")),W.push("O;L;D;B"+(It?";V4":"")+";K47;G100 0.001"),delete U._formats,W.join(Tt)+Tt+Z.join(Tt)+Tt+"E"+Tt}}}(),Oit=function(){function i(l,w){for(var E=l.split("\n"),D=-1,k=-1,O=0,L=[];O!==E.length;++O)if("BOT"!==E[O].trim()){if(!(D<0)){for(var U=E[O].trim().split(","),j=U[0],W=U[1],Z=E[++O]||"";1&(Z.match(/["]/g)||[]).length&&O=0||D.indexOf(",")>=0||D.indexOf(";")>=0?function s(D,k){var O=k||{},L="";null!=Vs&&null==O.dense&&(O.dense=Vs);var U={};O.dense&&(U["!data"]=[]);var j={s:{c:0,r:0},e:{c:0,r:0}};"sep="==D.slice(0,4)?13==D.charCodeAt(5)&&10==D.charCodeAt(6)?(L=D.charAt(4),D=D.slice(7)):13==D.charCodeAt(5)||10==D.charCodeAt(5)?(L=D.charAt(4),D=D.slice(6)):L=r(D.slice(0,1024)):L=O&&O.FS?O.FS:r(D.slice(0,1024));var W=0,Z=0,rt=0,st=0,yt=0,Tt=L.charCodeAt(0),It=!1,ft=0,ht=D.charCodeAt(0),mt=null!=O.dateNF?function xzt(e){var i="number"==typeof e?Ni[e]:e;return i=i.replace(_A,"(\\d+)"),_A.lastIndex=0,new RegExp("^"+i+"$")}(O.dateNF):null;function wt(){var Ct=D.slice(st,yt);"\r"==Ct.slice(-1)&&(Ct=Ct.slice(0,-1));var _t={};if('"'==Ct.charAt(0)&&'"'==Ct.charAt(Ct.length-1)&&(Ct=Ct.slice(1,-1).replace(/""/g,'"')),!1!==O.cellText&&(_t.w=Ct),0===Ct.length)_t.t="z";else if(O.raw)_t.t="s",_t.v=Ct;else if(0===Ct.trim().length)_t.t="s",_t.v=Ct;else if(61==Ct.charCodeAt(0))34==Ct.charCodeAt(1)&&34==Ct.charCodeAt(Ct.length-1)?(_t.t="s",_t.v=Ct.slice(2,-1).replace(/""/g,'"')):function oXt(e){return 1!=e.length}(Ct)?(_t.t="s",_t.f=Ct.slice(1),_t.v=Ct):(_t.t="s",_t.v=Ct);else if("TRUE"==Ct)_t.t="b",_t.v=!0;else if("FALSE"==Ct)_t.t="b",_t.v=!1;else if(isNaN(rt=zl(Ct)))if(!isNaN((rt=L1(Ct)).getDate())||mt&&Ct.match(mt)){if(_t.z=O.dateNF||Ni[14],mt&&Ct.match(mt)){var Dt=function bzt(e,i,t){var n=-1,r=-1,s=-1,o=-1,l=-1,w=-1;(i.match(_A)||[]).forEach(function(k,O){var L=parseInt(t[O+1],10);switch(k.toLowerCase().charAt(0)){case"y":n=L;break;case"d":s=L;break;case"h":o=L;break;case"s":w=L;break;case"m":o>=0?l=L:r=L}}),_A.lastIndex=0,w>=0&&-1==l&&r>=0&&(l=r,r=-1);var E=(""+(n>=0?n:(new Date).getFullYear())).slice(-4)+"-"+("00"+(r>=1?r:1)).slice(-2)+"-"+("00"+(s>=1?s:1)).slice(-2);7==E.length&&(E="0"+E),8==E.length&&(E="20"+E);var D=("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(w>=0?w:0)).slice(-2);return-1==o&&-1==l&&-1==w?E:-1==n&&-1==r&&-1==s?D:E+"T"+D}(0,O.dateNF,Ct.match(mt)||[]);rt=ps(Dt),O&&!1===O.UTC&&(rt=pm(rt))}else O&&!1===O.UTC?rt=pm(rt):!1!==O.cellText&&O.dateNF&&(_t.w=fl(_t.z,rt));O.cellDates?(_t.t="d",_t.v=rt):(_t.t="n",_t.v=ws(rt)),O.cellNF||delete _t.z}else _t.t="s",_t.v=Ct;else _t.t="n",_t.v=rt;if("z"==_t.t||(O.dense?(U["!data"][W]||(U["!data"][W]=[]),U["!data"][W][Z]=_t):U[Pn({c:Z,r:W})]=_t),ht=D.charCodeAt(st=yt+1),j.e.c0&&wt(),U["!ref"]=bn(j),U}(D,k):F0(function i(D,k){var O=k||{},L=[];if(!D||0===D.length)return L;for(var U=D.split(/[\r\n]/),j=U.length-1;j>=0&&0===U[j].length;)--j;for(var W=10,Z=0,rt=0;rt<=j;++rt)-1==(Z=U[rt].indexOf(" "))?Z=U[rt].length:Z++,W=Math.max(W,Z);for(rt=0;rt<=j;++rt){L[rt]=[];var st=0;for(e(U[rt].slice(0,W).trim(),L,rt,st,O),st=1;st<=(U[rt].length-W)/10+1;++st)e(U[rt].slice(W+10*(st-1),W+10*st).trim(),L,rt,st,O)}return O.sheetRows&&(L=L.slice(0,O.sheetRows)),L}(D,k),k)}function l(D,k){var O="",L="string"==k.type?[0,0,0,0]:function W4(e,i){var t="";switch((i||{}).type||"base64"){case"buffer":case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":t=Vl(e.slice(0,12));break;case"binary":t=e;break;default:throw new Error("Unrecognized type "+(i&&i.type||"undefined"))}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3),t.charCodeAt(4),t.charCodeAt(5),t.charCodeAt(6),t.charCodeAt(7)]}(D,k);switch(k.type){case"base64":O=Vl(D);break;case"binary":case"string":O=D;break;case"buffer":O=65001==k.codepage?D.toString("utf8"):k.codepage&&typeof En<"u"?En.utils.decode(k.codepage,D):Rn&&Buffer.isBuffer(D)?D.toString("binary"):ku(D);break;case"array":O=fm(D);break;default:throw new Error("Unrecognized type "+k.type)}return 239==L[0]&&187==L[1]&&191==L[2]?O=wr(O.slice(3)):"string"!=k.type&&"buffer"!=k.type&&65001==k.codepage?O=wr(O):"binary"==k.type&&typeof En<"u"&&k.codepage&&(O=En.utils.decode(k.codepage,En.utils.encode(28591,O))),"socialcalc:version:"==O.slice(0,19)?Lit.to_sheet("string"==k.type?O:wr(O),k):o(O,k)}return{to_workbook:function w(D,k){return xf(l(D,k),k)},to_sheet:l,from_sheet:function E(D){var k=[];if(!D["!ref"])return"";for(var L,O=$n(D["!ref"]),U=null!=D["!data"],j=O.s.r;j<=O.e.r;++j){for(var W=[],Z=O.s.c;Z<=O.e.c;++Z){var rt=Pn({r:j,c:Z});if((L=U?(D["!data"][j]||[])[Z]:D[rt])&&null!=L.v){for(var st=(L.w||(Nu(L),L.w)||"").slice(0,10);st.length<10;)st+=" ";W.push(st+(0===Z?" ":""))}else W.push(" ")}k.push(W.join(""))}return k.join("\n")}}}(),Dm=function(){function e(Ot,Qt,$t){if(Ot){Ca(Ot,Ot.l||0);for(var Yt=$t.Enum||Ne;Ot.l255||ni.s.r>999999)break;ni.e.cun&&(ni.s.c=un),bi=si.read_shift(4),ni.s.r>bi&&(ni.s.r=bi),bi=si.read_shift(4),ni.e.rbi&&(ni.s.r=bi),ni.e.r0&&je>=0;){if(32&tr)switch(31&tr){case 2:Ji={t:"n",v:Ji.v+Tc&65535};break;case 3:(Ji={t:"n",v:Ji.v+Tc&65535}).v>32767&&(Ji.v-=65536);break;case 7:Ji={t:"s",v:Ae[ji=ji+Tc>>>0]};break;default:throw"Cannot apply delta for QPW cell type "+(31&tr)}else switch(31&tr){case 1:Ji={t:"z"};break;case 2:Ji={t:"n",v:si.read_shift(2)};break;case 7:Ji={t:"s",v:Ae[ji=si.read_shift(4)-1]};break;default:throw"Cannot apply repeat for QPW cell type "+(31&tr)}!$t.sheetStubs&&"z"==Ji.t||(null!=Yt["!data"]?(Yt["!data"][bi]||(Yt["!data"][bi]=[]),Yt["!data"][bi][un]=Ji):Yt[an+Un(bi)]=Ji),++bi,--je}}break;case 3074:un=si.read_shift(2),bi=si.read_shift(4);var Bm=vi(si);null!=Yt["!data"]?(Yt["!data"][bi]||(Yt["!data"][bi]=[]),Yt["!data"][bi][un]={t:"s",v:Bm}):Yt[xn(un)+Un(bi)]={t:"s",v:Bm}}Ot.l+=qa}return ur}(Ot,Qt);if(0==Ot[2]&&(8==Ot[3]||9==Ot[3])&&Ot.length>=16&&5==Ot[14]&&108===Ot[15])throw new Error("Unsupported Works 3 for Mac file");if(2==Ot[2])$t.Enum=Ne,e(Ot,function(ci,Po,ar){switch(ar){case 0:$t.vers=ci,ci>=4096&&($t.qpro=!0);break;case 255:$t.vers=ci,$t.works=!0;break;case 6:bi=ci;break;case 204:ci&&(Ft=ci);break;case 222:Ft=ci;break;case 15:case 51:(!$t.qpro&&!$t.works||51==ar)&&ci[1].v.charCodeAt(0)<48&&(ci[1].v=ci[1].v.slice(1)),($t.works||$t.works2)&&(ci[1].v=ci[1].v.replace(/\r\n/g,"\n"));case 13:case 14:case 16:!(112&~ci[2])&&(15&ci[2])>1&&(15&ci[2])<15&&(ci[1].z=$t.dateNF||t[(15&ci[2])-1]||Ni[14],$t.cellDates&&(ci[1].v=Yh(ci[1].v),ci[1].t="number"==typeof ci[1].v?"n":"d")),$t.qpro&&ci[3]>Di&&(Yt["!ref"]=bn(bi),ni[Ae]=Yt,je.push(Ae),Yt={},$t.dense&&(un=Yt["!data"]=[]),bi={s:{r:0,c:0},e:{r:0,c:0}},Di=ci[3],Ae=Ft||"Sheet"+(Di+1),Ft="");var Qn=$t.dense?(un[ci[0].r]||[])[ci[0].c]:Yt[Pn(ci[0])];if(Qn){Qn.t=ci[1].t,Qn.v=ci[1].v,null!=ci[1].z&&(Qn.z=ci[1].z),null!=ci[1].f&&(Qn.f=ci[1].f),sr=Qn;break}$t.dense?(un[ci[0].r]||(un[ci[0].r]=[]),un[ci[0].r][ci[0].c]=ci[1]):Yt[Pn(ci[0])]=ci[1],sr=ci[1];break;case 21509:$t.works2=!0;break;case 21506:5281==ci&&(sr.z="hh:mm:ss",$t.cellDates&&"n"==sr.t&&(sr.v=Yh(sr.v),sr.t="number"==typeof sr.v?"n":"d"))}},$t);else{if(26!=Ot[2]&&14!=Ot[2])throw new Error("Unrecognized LOTUS BOF "+Ot[2]);$t.Enum=De,14==Ot[2]&&($t.qpro=!0,Ot.l=0),e(Ot,function(ci,Po,ar){switch(ar){case 204:Ae=ci;break;case 22:ci[1].v.charCodeAt(0)<48&&(ci[1].v=ci[1].v.slice(1)),ci[1].v=ci[1].v.replace(/\x0F./g,function(Qn){return String.fromCharCode(Qn.charCodeAt(1)-32)}).replace(/\r\n/g,"\n");case 23:case 24:case 25:case 37:case 39:case 40:if(ci[3]>Di&&(Yt["!ref"]=bn(bi),ni[Ae]=Yt,je.push(Ae),Yt={},$t.dense&&(un=Yt["!data"]=[]),bi={s:{r:0,c:0},e:{r:0,c:0}},Ae="Sheet"+((Di=ci[3])+1)),ur>0&&ci[0].r>=ur)break;$t.dense?(un[ci[0].r]||(un[ci[0].r]=[]),un[ci[0].r][ci[0].c]=ci[1]):Yt[Pn(ci[0])]=ci[1],bi.e.c=128?95:Ft)}return Yt.write_shift(1,0),Yt}function W(Ot,Qt,$t){var Yt=le(7);return Yt.write_shift(1,k($t)),Yt.write_shift(2,Qt),Yt.write_shift(2,Ot),Yt.write_shift(2,$t.v,"i"),Yt}function rt(Ot,Qt,$t){var Yt=le(13);return Yt.write_shift(1,k($t)),Yt.write_shift(2,Qt),Yt.write_shift(2,Ot),Yt.write_shift(8,$t.v,"f"),Yt}function yt(Ot,Qt,$t){var Yt=32768&Qt;return Qt=(Yt?Ot:0)+((Qt&=-32769)>=8192?Qt-16384:Qt),(Yt?"":"$")+($t?xn(Qt):Un(Qt))}var Tt={31:["NA",0],33:["ABS",1],34:["TRUNC",1],35:["SQRT",1],36:["LOG",1],37:["LN",1],38:["PI",0],39:["SIN",1],40:["COS",1],41:["TAN",1],42:["ATAN2",2],43:["ATAN",1],44:["ASIN",1],45:["ACOS",1],46:["EXP",1],47:["MOD",2],49:["ISNA",1],50:["ISERR",1],51:["FALSE",0],52:["TRUE",0],53:["RAND",0],54:["DATE",3],63:["ROUND",2],64:["TIME",3],68:["ISNUMBER",1],69:["ISTEXT",1],70:["LEN",1],71:["VALUE",1],73:["MID",3],74:["CHAR",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],102:["UPPER",1],103:["LOWER",1],107:["PROPER",1],109:["TRIM",1],111:["T",1]},It=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function ht(Ot){var Qt=[{c:0,r:0},{t:"n",v:0},0];return Qt[0].r=Ot.read_shift(2),Qt[3]=Ot[Ot.l++],Qt[0].c=Ot[Ot.l++],Qt}function wt(Ot,Qt,$t,Yt){var Ae=le(6+Yt.length);Ae.write_shift(2,Ot),Ae.write_shift(1,$t),Ae.write_shift(1,Qt),Ae.write_shift(1,39);for(var Ft=0;Ft=128?95:Di)}return Ae.write_shift(1,0),Ae}function _t(Ot,Qt){var $t=ht(Ot),Yt=Ot.read_shift(4),Ae=Ot.read_shift(4),Ft=Ot.read_shift(2);if(65535==Ft)return 0===Yt&&3221225472===Ae?($t[1].t="e",$t[1].v=15):0===Yt&&3489660928===Ae?($t[1].t="e",$t[1].v=42):$t[1].v=0,$t;var Di=32768&Ft;return Ft=(32767&Ft)-16446,$t[1].v=(1-2*Di)*(Ae*Math.pow(2,Ft+32)+Yt*Math.pow(2,Ft)),$t}function Dt(Ot,Qt,$t,Yt){var Ae=le(14);if(Ae.write_shift(2,Ot),Ae.write_shift(1,$t),Ae.write_shift(1,Qt),0==Yt)return Ae.write_shift(4,0),Ae.write_shift(4,0),Ae.write_shift(2,65535),Ae;var Ft=0,Di=0,je=0;return Yt<0&&(Ft=1,Yt=-Yt),Di=0|Math.log2(Yt),2147483648&(je=(Yt/=Math.pow(2,Di-31))>>>0)||(++Di,je=(Yt/=2)>>>0),Yt-=je,je|=2147483648,je>>>=0,Yt*=Math.pow(2,32),Ae.write_shift(4,Yt>>>0),Ae.write_shift(4,je),Ae.write_shift(2,Di+=16383+(Ft?32768:0)),Ae}function ve(Ot,Qt){var $t=ht(Ot),Yt=Ot.read_shift(8,"f");return $t[1].v=Yt,$t}function _e(Ot,Qt){return 0==Ot[Ot.l+Qt-1]?Ot.read_shift(Qt,"cstr"):""}function ee(Ot,Qt){var $t=le(5+Ot.length);$t.write_shift(2,14e3),$t.write_shift(2,Qt);for(var Yt=0;Yt127?95:Ae}return $t[$t.l++]=0,$t}var Ne={0:{n:"BOF",f:As},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:function w(Ot,Qt,$t){var Yt={s:{c:0,r:0},e:{c:0,r:0}};return 8==Qt&&$t.qpro?(Yt.s.c=Ot.read_shift(1),Ot.l++,Yt.s.r=Ot.read_shift(2),Yt.e.c=Ot.read_shift(1),Ot.l++,Yt.e.r=Ot.read_shift(2),Yt):(Yt.s.c=Ot.read_shift(2),Yt.s.r=Ot.read_shift(2),12==Qt&&$t.qpro&&(Ot.l+=2),Yt.e.c=Ot.read_shift(2),Yt.e.r=Ot.read_shift(2),12==Qt&&$t.qpro&&(Ot.l+=2),65535==Yt.s.c&&(Yt.s.c=Yt.e.c=Yt.s.r=Yt.e.r=0),Yt)}},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:function j(Ot,Qt,$t){var Yt=D(Ot,0,$t);return Yt[1].v=Ot.read_shift(2,"i"),Yt}},14:{n:"NUMBER",f:function Z(Ot,Qt,$t){var Yt=D(Ot,0,$t);return Yt[1].v=Ot.read_shift(8,"f"),Yt}},15:{n:"LABEL",f:function O(Ot,Qt,$t){var Yt=Ot.l+Qt,Ae=D(Ot,0,$t);if(Ae[1].t="s",20768==(65534&$t.vers)){Ot.l++;var Ft=Ot.read_shift(1);return Ae[1].v=Ot.read_shift(Ft,"utf8"),Ae}return $t.qpro&&Ot.l++,Ae[1].v=Ot.read_shift(Yt-Ot.l,"cstr"),Ae}},16:{n:"FORMULA",f:function st(Ot,Qt,$t){var Yt=Ot.l+Qt,Ae=D(Ot,0,$t);if(Ae[1].v=Ot.read_shift(8,"f"),$t.qpro)Ot.l=Yt;else{var Ft=Ot.read_shift(2);(function ft(Ot,Qt){Ca(Ot,0);for(var $t=[],Yt=0,Ae="",Ft="",Di="",ni="";Ot.l$t.length)return void console.error("WK1 bad formula parse 0x"+je.toString(16)+":|"+$t.join("|")+"|");var ur=$t.slice(-Yt);$t.length-=Yt,$t.push(Tt[je][0]+"("+ur.join(",")+")")}}}1==$t.length?Qt[1].f=""+$t[0]:console.error("WK1 bad formula parse |"+$t.join("|")+"|")})(Ot.slice(Ot.l,Ot.l+Ft),Ae),Ot.l+=Ft}return Ae}},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:function U(Ot,Qt,$t){var Yt=Ot.l+Qt,Ae=D(Ot,0,$t);if(Ae[1].t="s",20768==$t.vers){var Ft=Ot.read_shift(1);return Ae[1].v=Ot.read_shift(Ft,"utf8"),Ae}return Ae[1].v=Ot.read_shift(Yt-Ot.l,"cstr"),Ae}},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:_e},222:{n:"SHEETNAMELP",f:function ze(Ot,Qt){var $t=Ot[Ot.l++];$t>Qt-1&&($t=Qt-1);for(var Yt="";Yt.length<$t;)Yt+=String.fromCharCode(Ot[Ot.l++]);return Yt}},255:{n:"BOF",f:As},21506:{n:"WKSNF",f:As},65535:{n:""}},De={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:function mt(Ot,Qt){var $t=ht(Ot);return $t[1].t="s",$t[1].v=Ot.read_shift(Qt-4,"cstr"),$t}},23:{n:"NUMBER17",f:_t},24:{n:"NUMBER18",f:function Ct(Ot,Qt){var $t=ht(Ot);$t[1].v=Ot.read_shift(2);var Yt=$t[1].v>>1;if(1&$t[1].v)switch(7&Yt){case 0:Yt=5e3*(Yt>>3);break;case 1:Yt=500*(Yt>>3);break;case 2:Yt=(Yt>>3)/20;break;case 3:Yt=(Yt>>3)/200;break;case 4:Yt=(Yt>>3)/2e3;break;case 5:Yt=(Yt>>3)/2e4;break;case 6:Yt=(Yt>>3)/16;break;case 7:Yt=(Yt>>3)/64}return $t[1].v=Yt,$t}},25:{n:"FORMULA19",f:function Ue(Ot,Qt){var $t=_t(Ot);return Ot.l+=Qt-14,$t}},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:function Ii(Ot,Qt){for(var $t={},Yt=Ot.l+Qt;Ot.l>6,$t}},38:{n:"??"},39:{n:"NUMBER27",f:ve},40:{n:"FORMULA28",f:function qt(Ot,Qt){var $t=ve(Ot);return Ot.l+=Qt-12,$t}},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:_e},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:function Me(Ot,Qt,$t){if($t.qpro&&!(Qt<21)){var Yt=Ot.read_shift(1);return Ot.l+=17,Ot.l+=1,Ot.l+=2,[Yt,Ot.read_shift(Qt-21,"cstr")]}}},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}},fi={5:"dd-mmm-yy",6:"dd-mmm",7:"mmm-yy",8:"mm/dd/yy",10:"hh:mm:ss AM/PM",11:"hh:mm AM/PM",14:"dd-mmm-yyyy",15:"mmm-yyyy",34:"0.00",50:"0.00;[Red]0.00",66:"0.00;(0.00)",82:"0.00;[Red](0.00)",162:'"$"#,##0.00;\\("$"#,##0.00\\)',288:"0%",304:"0E+00",320:"# ?/?"};function vi(Ot){var Qt=Ot.read_shift(2),$t=Ot.read_shift(1);if(0!=$t)throw"unsupported QPW string type "+$t.toString(16);return Ot.read_shift(Qt,"sbcs-cont")}return{sheet_to_wk1:function r(Ot,Qt){var $t=Qt||{};if(+$t.codepage>=0&&dc(+$t.codepage),"string"==$t.type)throw new Error("Cannot write WK1 to JS string");var Yt=Co();if(!Ot["!ref"])throw new Error("Cannot export empty sheet to WK1");var Ae=$n(Ot["!ref"]),Ft=null!=Ot["!data"],Di=[];Le(Yt,0,function o(Ot){var Qt=le(2);return Qt.write_shift(2,Ot),Qt}(1030)),Le(Yt,6,function E(Ot){var Qt=le(8);return Qt.write_shift(2,Ot.s.c),Qt.write_shift(2,Ot.s.r),Qt.write_shift(2,Ot.e.c),Qt.write_shift(2,Ot.e.r),Qt}(Ae));for(var ni=Math.min(Ae.e.r,8191),je=Ae.s.c;je<=Ae.e.c;++je)Di[je]=xn(je);for(var ji=Ae.s.r;ji<=ni;++ji){var un=Un(ji);for(je=Ae.s.c;je<=Ae.e.c;++je){var bi=Ft?(Ot["!data"][ji]||[])[je]:Ot[Di[je]+un];if(bi&&"z"!=bi.t)switch(bi.t){case"n":(0|bi.v)==bi.v&&bi.v>=-32768&&bi.v<=32767?Le(Yt,13,W(ji,je,bi)):Le(Yt,14,rt(ji,je,bi));break;case"d":var ur=ws(bi.v);(0|ur)==ur&&ur>=-32768&&ur<=32767?Le(Yt,13,W(ji,je,{t:"n",v:ur,z:bi.z||Ni[14]})):Le(Yt,14,rt(ji,je,{t:"n",v:ur,z:bi.z||Ni[14]}));break;default:Le(Yt,15,L(ji,je,Nu(bi).slice(0,239)))}}}return Le(Yt,1),Yt.end()},book_to_wk3:function s(Ot,Qt){var $t=Qt||{};if(+$t.codepage>=0&&dc(+$t.codepage),"string"==$t.type)throw new Error("Cannot write WK3 to JS string");var Yt=Co();Le(Yt,0,function l(Ot){var Qt=le(26);Qt.write_shift(2,4096),Qt.write_shift(2,4),Qt.write_shift(4,0);for(var $t=0,Yt=0,Ae=0,Ft=0;Ft8191&&($t=8191),Qt.write_shift(2,$t),Qt.write_shift(1,Ae),Qt.write_shift(1,Yt),Qt.write_shift(2,0),Qt.write_shift(2,0),Qt.write_shift(1,1),Qt.write_shift(1,2),Qt.write_shift(4,0),Qt.write_shift(4,0),Qt}(Ot));for(var Ae=0,Ft=0;Ae=0;--s)i=((16384&i?1:0)|i<<1&32767)^t[s];return 52811^i}function Z1(e){for(var i=0,t=1;3!=i;++i)t=256*t+(e[i]>255?255:e[i]<0?0:e[i]);return t.toString(16).toUpperCase().slice(1)}var Do=6;function J1(e){return Math.floor((e+Math.round(128/Do)/256)*Do)}function q1(e){return Math.floor((e-5)/Do*100+.5)/100}function YA(e){return Math.round((e*Do+5)/Do*256)/256}function wf(e){e.width?(e.wpx=J1(e.width),e.wch=q1(e.wpx),e.MDW=Do):e.wpx?(e.wch=q1(e.wpx),e.width=YA(e.wch),e.MDW=Do):"number"==typeof e.wch&&(e.width=YA(e.wch),e.wpx=J1(e.width),e.MDW=Do),e.customWidth&&delete e.customWidth}var Git=96;function tw(e){return 96*e/Git}function V0(e){return e*Git/96}function $Wt(e,i,t){t||(t=le(6+4*i.length)),t.write_shift(2,e),Ea(i,t);var n=t.length>t.l?t.slice(0,t.l):t;return null==t.l&&(t.l=t.length),n}var T4,ZWt=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],JWt=To;function Hit(e,i){i||(i=le(84)),T4||(T4=AA(ZWt));var t=T4[e.patternType];null==t&&(t=40),i.write_shift(4,t);var n=0;if(40!=t)for(LA({auto:1},i),LA({auto:1},i);n<12;++n)i.write_shift(4,0);else{for(;n<4;++n)i.write_shift(4,0);for(;n<12;++n)i.write_shift(4,0)}return i.length>i.l?i.slice(0,i.l):i}function Wit(e,i,t){return t||(t=le(16)),t.write_shift(2,i||0),t.write_shift(2,e.numFmtId||0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t}function ew(e,i){return i||(i=le(10)),i.write_shift(1,0),i.write_shift(1,0),i.write_shift(4,0),i.write_shift(4,0),i}var tjt=To;function pjt(e,i){var t=Co();return Re(t,278),function sjt(e,i){if(i){var t=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var r=n[0];r<=n[1];++r)null!=i[r]&&++t}),0!=t&&(Re(e,615,Gc(t)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var r=n[0];r<=n[1];++r)null!=i[r]&&Re(e,44,$Wt(r,i[r]))}),Re(e,616))}}(t,e.SSF),function ajt(e){Re(e,611,Gc(1)),Re(e,43,function KWt(e,i){i||(i=le(153)),i.write_shift(2,20*e.sz),function CGt(e,i){i||(i=le(2)),i.write_shift(1,(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0)),i.write_shift(1,0)}(e,i),i.write_shift(2,e.bold?700:400);var t=0;"superscript"==e.vertAlign?t=1:"subscript"==e.vertAlign&&(t=2),i.write_shift(2,t),i.write_shift(1,e.underline||0),i.write_shift(1,e.family||0),i.write_shift(1,e.charset||0),i.write_shift(1,0),LA(e.color,i);var n=0;return"major"==e.scheme&&(n=1),"minor"==e.scheme&&(n=2),i.write_shift(1,n),Ea(e.name,i),i.length>i.l?i.slice(0,i.l):i}({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),Re(e,612)}(t),function ojt(e){Re(e,603,Gc(2)),Re(e,45,Hit({patternType:"none"})),Re(e,45,Hit({patternType:"gray125"})),Re(e,604)}(t),function ljt(e){Re(e,613,Gc(1)),Re(e,46,function ejt(e,i){return i||(i=le(51)),i.write_shift(1,0),ew(0,i),ew(0,i),ew(0,i),ew(0,i),ew(0,i),i.length>i.l?i.slice(0,i.l):i}()),Re(e,614)}(t),function cjt(e){Re(e,626,Gc(1)),Re(e,47,Wit({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),Re(e,627)}(t),function ujt(e,i){Re(e,617,Gc(i.length)),i.forEach(function(t){Re(e,47,Wit(t,0))}),Re(e,618)}(t,i.cellXfs),function hjt(e){Re(e,619,Gc(1)),Re(e,48,function ijt(e,i){return i||(i=le(52)),i.write_shift(4,e.xfId),i.write_shift(2,1),i.write_shift(1,+e.builtinId),i.write_shift(1,0),j1(e.name||"",i),i.length>i.l?i.slice(0,i.l):i}({xfId:0,builtinId:0,name:"Normal"})),Re(e,620)}(t),function djt(e){Re(e,505,Gc(0)),Re(e,506)}(t),function fjt(e){Re(e,508,function njt(e,i,t){var n=le(2052);return n.write_shift(4,e),j1(i,n),j1(t,n),n.length>n.l?n.slice(0,n.l):n}(0,"TableStyleMedium9","PivotStyleMedium4")),Re(e,509)}(t),Re(t,279),t.end()}function C4(e,i){if(i&&i.themeXLSX)return i.themeXLSX;if(e&&"string"==typeof e.raw)return e.raw;var t=[zs];return t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t.join("")}function Xit(e,i,t){var n=[21600,21600],r=["m0,0l0",n[1],n[0],n[1],n[0],"0xe"].join(","),s=[ii("xml",null,{"xmlns:v":Gl.v,"xmlns:o":Gl.o,"xmlns:x":Gl.x,"xmlns:mv":Gl.mv}).replace(/\/>/,">"),ii("o:shapelayout",ii("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"})],o=65536*e,l=i||[];return l.length>0&&s.push(ii("v:shapetype",[ii("v:stroke",null,{joinstyle:"miter"}),ii("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202",coordsize:n.join(","),"o:spt":202,path:r})),l.forEach(function(w){++o,s.push(function Hjt(e,i){var n=Tr(e[0]),r={color2:"#BEFF82",type:"gradient"};"gradient"==r.type&&(r.angle="-180");var s="gradient"==r.type?ii("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,o=ii("v:fill",s,r);return["",o,ii("v:shadow",null,{on:"t",obscured:"t"}),ii("v:path",null,{"o:connecttype":"none"}),'
','',"","",Ja("x:Anchor",[n.c+1,0,n.r+1,0,n.c+3,20,n.r+5,20].join(",")),Ja("x:AutoFill","False"),Ja("x:Row",String(n.r)),Ja("x:Column",String(n.c)),e[1].hidden?"":"","",""].join("")}(w,o))}),s.push(""),s.join("")}function jjt(e){var i=[zs,ii("comments",null,{xmlns:gm[0]})],t=[];return i.push(""),e.forEach(function(n){n[1].forEach(function(r){var s=_n(r.a);-1==t.indexOf(s)&&(t.push(s),i.push(""+s+"")),r.T&&r.ID&&-1==t.indexOf("tc="+r.ID)&&(t.push("tc="+r.ID),i.push("tc="+r.ID+""))})}),0==t.length&&(t.push("SheetJ5"),i.push("SheetJ5")),i.push(""),i.push(""),e.forEach(function(n){var r=0,s=[],o=0;if(n[1][0]&&n[1][0].T&&n[1][0].ID&&(r=t.indexOf("tc="+n[1][0].ID)),n[1].forEach(function(E){E.a&&(r=t.indexOf(_n(E.a))),E.T&&++o,s.push(null==E.t?"":_n(E.t))}),0===o)n[1].forEach(function(E){i.push(''),i.push(Ja("t",null==E.t?"":_n(E.t))),i.push("")});else{n[1][0]&&n[1][0].T&&n[1][0].ID&&(r=t.indexOf("tc="+n[1][0].ID)),i.push('');for(var l="Comment:\n "+s[0]+"\n",w=1;w")}}),i.push(""),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function $it(e,i,t){var n=[zs,ii("ThreadedComments",null,{xmlns:Ta.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(r){var s="";(r[1]||[]).forEach(function(o,l){if(o.T){o.a&&-1==i.indexOf(o.a)&&i.push(o.a);var w={ref:r[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+t.tcid++).slice(-12)+"}"};0==l?s=w.id:w.parentId=s,o.ID=w.id,o.a&&(w.personId="{54EE7950-7262-4200-6969-"+("000000000000"+i.indexOf(o.a)).slice(-12)+"}"),n.push(ii("threadedComment",Ja("text",o.t||""),w))}else delete o.ID})}),n.push(""),n.join("")}function Qit(e){var i=[zs,ii("personList",null,{xmlns:Ta.TCMNT,"xmlns:x":gm[0]}).replace(/[\/]>/,">")];return e.forEach(function(t,n){i.push(ii("person",null,{displayName:t,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:t,providerId:"None"}))}),i.push(""),i.join("")}var Kjt=So;function Kit(e){return Ea(e.slice(0,54))}function Jjt(e){var i=Co(),t=[];return Re(i,628),Re(i,630),e.forEach(function(n){n[1].forEach(function(r){t.indexOf(r.a)>-1||(t.push(r.a.slice(0,54)),Re(i,632,Kit(r.a)),r.T&&r.ID&&-1==t.indexOf("tc="+r.ID)&&(t.push("tc="+r.ID),Re(i,632,Kit("tc="+r.ID))))})}),Re(i,631),Re(i,633),e.forEach(function(n){n[1].forEach(function(r){var s=-1;r.ID&&(s=t.indexOf("tc="+r.ID)),-1==s&&n[1][0].T&&n[1][0].ID&&(s=t.indexOf("tc="+n[1][0].ID)),-1==s&&(s=t.indexOf(r.a)),r.iauthor=s;var o={s:Tr(n[0]),e:Tr(n[0])};Re(i,635,function Qjt(e,i){return null==i&&(i=le(36)),i.write_shift(4,e[1].iauthor),O0(e[0],i),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i}([o,r])),r.t&&r.t.length>0&&Re(i,637,function vGt(e,i){var t=!1;return null==i&&(t=!0,i=le(23+4*e.t.length)),i.write_shift(1,1),Ea(e.t,i),i.write_shift(4,1),function pGt(e,i){i||(i=le(4)),i.write_shift(2,e.ich||0),i.write_shift(2,e.ifnt||0)}({ich:0,ifnt:0},i),t?i.slice(0,i.l):i}(r)),Re(i,636),delete r.iauthor})}),Re(i,634),Re(i,629),i.end()}var iXt=["xlsb","xlsm","xlam","biff8","xla"],Mm=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,i={r:0,c:0};function t(n,r,s,o){var l=!1,w=!1;0==s.length?w=!0:"["==s.charAt(0)&&(w=!0,s=s.slice(1,-1)),0==o.length?l=!0:"["==o.charAt(0)&&(l=!0,o=o.slice(1,-1));var E=s.length>0?0|parseInt(s,10):0,D=o.length>0?0|parseInt(o,10):0;return l?D+=i.c:--D,w?E+=i.r:--E,r+(l?"":"$")+xn(D)+(w?"":"$")+Un(E)}return function(r,s){return i=s,r.replace(e,t)}}(),KA=/(^|[^._A-Z0-9])(\$?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])(\$?)(\d{1,7})(?![_.\(A-Za-z0-9])/g;try{KA=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g}catch{}var ZA=function(){return function(i,t){return i.replace(KA,function(n,r,s,o,l,w){var E=JN(o)-(s?0:t.c),D=ZN(w)-(l?0:t.r);return r+"R"+("$"==l?D+1:0==D?"":"["+D+"]")+"C"+("$"==s?E+1:0==E?"":"["+E+"]")})}}();function Zit(e,i){return e.replace(KA,function(t,n,r,s,o,l){return n+("$"==r?r+s:xn(JN(s)+i.c))+("$"==o?o+l:Un(ZN(l)+i.r))})}function ra(e){e.l+=1}function Tf(e,i){var t=e.read_shift(1==i?1:2);return[16383&t,t>>14&1,t>>15&1]}function tnt(e,i,t){var n=2;if(t){if(t.biff>=2&&t.biff<=5)return ent(e);12==t.biff&&(n=4)}var r=e.read_shift(n),s=e.read_shift(n),o=Tf(e,2),l=Tf(e,2);return{s:{r,c:o[0],cRel:o[1],rRel:o[2]},e:{r:s,c:l[0],cRel:l[1],rRel:l[2]}}}function ent(e){var i=Tf(e,2),t=Tf(e,2),n=e.read_shift(1),r=e.read_shift(1);return{s:{r:i[0],c:n,cRel:i[1],rRel:i[2]},e:{r:t[0],c:r,cRel:t[1],rRel:t[2]}}}function int(e,i,t){if(t&&t.biff>=2&&t.biff<=5)return function cXt(e){var i=Tf(e,2),t=e.read_shift(1);return{r:i[0],c:t,cRel:i[1],rRel:i[2]}}(e);var n=e.read_shift(t&&12==t.biff?4:2),r=Tf(e,2);return{r:n,c:r[0],cRel:r[1],rRel:r[2]}}function uXt(e){var i=e.read_shift(2),t=e.read_shift(2);return{r:i,c:255&t,fQuoted:!!(16384&t),cRel:t>>15,rRel:t>>15}}function nnt(e){var i=1&e[e.l+1];return e.l+=4,[i,1]}function rnt(e){return[e.read_shift(1),e.read_shift(1)]}function VXt(e,i){var t=[e.read_shift(1)];if(12==i)switch(t[0]){case 2:t[0]=4;break;case 4:t[0]=16;break;case 0:t[0]=1;break;case 1:t[0]=2}switch(t[0]){case 4:t[1]=function Gs(e,i){return 1===e.read_shift(i)}(e,1)?"TRUE":"FALSE",12!=i&&(e.l+=7);break;case 37:case 16:t[1]=vc[e[e.l]],e.l+=12==i?4:8;break;case 0:e.l+=8;break;case 1:t[1]=Eo(e);break;case 2:t[1]=function _m(e,i,t){if(t.biff>5)return function Q1(e,i,t){var n=e.read_shift(t&&2==t.biff?1:2);return 0===n?(e.l++,""):function Em(e,i,t){if(t){if(t.biff>=2&&t.biff<=5)return e.read_shift(i,"cpstr");if(t.biff>=12)return e.read_shift(i,"dbcs-cont")}var r=e.read_shift(1);return e.read_shift(i,0===r?"sbcs-cont":"dbcs-cont")}(e,n,t)}(e,0,t);var n=e.read_shift(1);return 0===n?(e.l++,""):e.read_shift(n,t.biff<=4||!e.lens?"cpstr":"sbcs-cont")}(e,0,{biff:i>0&&i<8?2:i});break;default:throw new Error("Bad SerAr: "+t[0])}return t}function UXt(e,i,t){for(var n=e.read_shift(12==t.biff?4:2),r=[],s=0;s!=n;++s)r.push((12==t.biff?wm:HA)(e,8));return r}function zXt(e,i,t){var n=0,r=0;12==t.biff?(n=e.read_shift(4),r=e.read_shift(4)):(r=1+e.read_shift(1),n=1+e.read_shift(2)),t.biff>=2&&t.biff<8&&(--n,0==--r&&(r=256));for(var s=0,o=[];s!=n&&(o[s]=[]);++s)for(var l=0;l!=r;++l)o[s][l]=VXt(e,t.biff);return o}function iw(e,i,t){return e.l+=2,[uXt(e)]}function S4(e){return e.l+=6,[]}function snt(e){return e.l+=2,[As(e),1&e.read_shift(2)]}var oYt=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"],ant={1:{n:"PtgExp",f:function kXt(e,i,t){return e.l++,t&&12==t.biff?[e.read_shift(4,"i"),0]:[e.read_shift(2),e.read_shift(t&&2==t.biff?1:2)]}},2:{n:"PtgTbl",f:To},3:{n:"PtgAdd",f:ra},4:{n:"PtgSub",f:ra},5:{n:"PtgMul",f:ra},6:{n:"PtgDiv",f:ra},7:{n:"PtgPower",f:ra},8:{n:"PtgConcat",f:ra},9:{n:"PtgLt",f:ra},10:{n:"PtgLe",f:ra},11:{n:"PtgEq",f:ra},12:{n:"PtgGe",f:ra},13:{n:"PtgGt",f:ra},14:{n:"PtgNe",f:ra},15:{n:"PtgIsect",f:ra},16:{n:"PtgUnion",f:ra},17:{n:"PtgRange",f:ra},18:{n:"PtgUplus",f:ra},19:{n:"PtgUminus",f:ra},20:{n:"PtgPercent",f:ra},21:{n:"PtgParen",f:ra},22:{n:"PtgMissArg",f:ra},23:{n:"PtgStr",f:function BXt(e,i,t){return e.l++,N0(e,0,t)}},26:{n:"PtgSheet",f:function uYt(e,i,t){return e.l+=5,e.l+=2,e.l+=2==t.biff?1:4,["PTGSHEET"]}},27:{n:"PtgEndSheet",f:function hYt(e,i,t){return e.l+=2==t.biff?4:5,["PTGENDSHEET"]}},28:{n:"PtgErr",f:function FXt(e){return e.l++,vc[e.read_shift(1)]}},29:{n:"PtgBool",f:function LXt(e){return e.l++,0!==e.read_shift(1)}},30:{n:"PtgInt",f:function OXt(e){return e.l++,e.read_shift(2)}},31:{n:"PtgNum",f:function NXt(e){return e.l++,Eo(e)}},32:{n:"PtgArray",f:function yXt(e,i,t){var n=(96&e[e.l++])>>5;return e.l+=2==t.biff?6:12==t.biff?14:7,[n]}},33:{n:"PtgFunc",f:function MXt(e,i,t){var n=(96&e[e.l])>>5;e.l+=1;var r=e.read_shift(t&&t.biff<=3?1:2);return[HYt[r],unt[r],n]}},34:{n:"PtgFuncVar",f:function IXt(e,i,t){var n=e[e.l++],r=e.read_shift(1),s=t&&t.biff<=3?[88==n?-1:0,e.read_shift(1)]:function RXt(e){return[e[e.l+1]>>7,32767&e.read_shift(2)]}(e);return[r,(0===s[0]?unt:GYt)[s[1]]]}},35:{n:"PtgName",f:function GXt(e,i,t){var n=e.read_shift(1)>>>5&3,s=e.read_shift(!t||t.biff>=8?4:2);switch(t.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12}return[n,0,s]}},36:{n:"PtgRef",f:function _Xt(e,i,t){var n=(96&e[e.l])>>5;return e.l+=1,[n,int(e,0,t)]}},37:{n:"PtgArea",f:function fXt(e,i,t){return[(96&e[e.l++])>>5,tnt(e,0,t)]}},38:{n:"PtgMemArea",f:function jXt(e,i,t){var n=e.read_shift(1)>>>5&3;return e.l+=t&&2==t.biff?3:4,[n,e.read_shift(t&&2==t.biff?1:2)]}},39:{n:"PtgMemErr",f:To},40:{n:"PtgMemNoMem",f:To},41:{n:"PtgMemFunc",f:function XXt(e,i,t){return[e.read_shift(1)>>>5&3,e.read_shift(t&&2==t.biff?1:2)]}},42:{n:"PtgRefErr",f:function YXt(e,i,t){var n=e.read_shift(1)>>>5&3;return e.l+=4,t.biff<8&&e.l--,12==t.biff&&(e.l+=2),[n]}},43:{n:"PtgAreaErr",f:function mXt(e,i,t){var n=(96&e[e.l++])>>5;return e.l+=t&&t.biff>8?12:t.biff<8?6:8,[n]}},44:{n:"PtgRefN",f:function AXt(e,i,t){var n=(96&e[e.l])>>5;e.l+=1;var r=function hXt(e,i,t){var n=t&&t.biff?t.biff:8;if(n>=2&&n<=5)return function dXt(e){var i=e.read_shift(2),t=e.read_shift(1),n=(32768&i)>>15,r=(16384&i)>>14;return i&=16383,1==n&&i>=8192&&(i-=16384),1==r&&t>=128&&(t-=256),{r:i,c:t,cRel:r,rRel:n}}(e);var r=e.read_shift(n>=12?4:2),s=e.read_shift(2),o=(16384&s)>>14,l=(32768&s)>>15;if(s&=16383,1==l)for(;r>524287;)r-=1048576;if(1==o)for(;s>8191;)s-=16384;return{r,c:s,cRel:o,rRel:l}}(e,0,t);return[n,r]}},45:{n:"PtgAreaN",f:function vXt(e,i,t){var n=(96&e[e.l++])>>5,r=function lXt(e,i,t){if(t.biff<8)return ent(e);var n=e.read_shift(12==t.biff?4:2),r=e.read_shift(12==t.biff?4:2),s=Tf(e,2),o=Tf(e,2);return{s:{r:n,c:s[0],cRel:s[1],rRel:s[2]},e:{r,c:o[0],cRel:o[1],rRel:o[2]}}}(e,0,t);return[n,r]}},46:{n:"PtgMemAreaN",f:function dYt(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},47:{n:"PtgMemNoMemN",f:function fYt(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},57:{n:"PtgNameX",f:function HXt(e,i,t){return 5==t.biff?function WXt(e){var i=e.read_shift(1)>>>5&3,t=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[i,t,n]}(e):[e.read_shift(1)>>>5&3,e.read_shift(2),e.read_shift(4)]}},58:{n:"PtgRef3d",f:function DXt(e,i,t){var n=(96&e[e.l])>>5;e.l+=1;var r=e.read_shift(2);return t&&5==t.biff&&(e.l+=12),[n,r,int(e,0,t)]}},59:{n:"PtgArea3d",f:function pXt(e,i,t){var n=(96&e[e.l++])>>5,r=e.read_shift(2,"i");if(t&&5===t.biff)e.l+=12;return[n,r,tnt(e,0,t)]}},60:{n:"PtgRefErr3d",f:function $Xt(e,i,t){var n=(96&e[e.l++])>>5,r=e.read_shift(2),s=4;if(t)switch(t.biff){case 5:s=15;break;case 12:s=6}return e.l+=s,[n,r]}},61:{n:"PtgAreaErr3d",f:function gXt(e,i,t){var n=(96&e[e.l++])>>5,r=e.read_shift(2),s=8;if(t)switch(t.biff){case 5:e.l+=12,s=6;break;case 12:s=12}return e.l+=s,[n,r]}},255:{}},mYt={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},gYt={1:{n:"PtgElfLel",f:snt},2:{n:"PtgElfRw",f:iw},3:{n:"PtgElfCol",f:iw},6:{n:"PtgElfRwV",f:iw},7:{n:"PtgElfColV",f:iw},10:{n:"PtgElfRadical",f:iw},11:{n:"PtgElfRadicalS",f:S4},13:{n:"PtgElfColS",f:S4},15:{n:"PtgElfColSV",f:S4},16:{n:"PtgElfRadicalLel",f:snt},25:{n:"PtgList",f:function lYt(e){e.l+=2;var i=e.read_shift(2),t=e.read_shift(2),n=e.read_shift(4),r=e.read_shift(2),s=e.read_shift(2);return{ixti:i,coltype:3&t,rt:oYt[t>>2&31],idx:n,c:r,C:s}}},29:{n:"PtgSxName",f:function cYt(e){return e.l+=2,[e.read_shift(4)]}},255:{}},vYt={0:{n:"PtgAttrNoop",f:function pYt(e){return e.l+=4,[0,0]}},1:{n:"PtgAttrSemi",f:function CXt(e,i,t){var n=255&e[e.l+1]?1:0;return e.l+=t&&2==t.biff?3:4,[n]}},2:{n:"PtgAttrIf",f:function wXt(e,i,t){var n=255&e[e.l+1]?1:0;return e.l+=2,[n,e.read_shift(t&&2==t.biff?1:2)]}},4:{n:"PtgAttrChoose",f:function xXt(e,i,t){e.l+=2;for(var n=e.read_shift(t&&2==t.biff?1:2),r=[],s=0;s<=n;++s)r.push(e.read_shift(t&&2==t.biff?1:2));return r}},8:{n:"PtgAttrGoto",f:function bXt(e,i,t){var n=255&e[e.l+1]?1:0;return e.l+=2,[n,e.read_shift(t&&2==t.biff?1:2)]}},16:{n:"PtgAttrSum",f:function PXt(e,i,t){e.l+=t&&2==t.biff?3:4}},32:{n:"PtgAttrBaxcel",f:nnt},33:{n:"PtgAttrBaxcel",f:nnt},64:{n:"PtgAttrSpace",f:function SXt(e){return e.read_shift(2),rnt(e)}},65:{n:"PtgAttrSpaceSemi",f:function EXt(e){return e.read_shift(2),rnt(e)}},128:{n:"PtgAttrIfError",f:function TXt(e){var i=255&e[e.l+1]?1:0;return e.l+=2,[i,e.read_shift(2)]}},255:{}};function nw(e,i,t,n){if(n.biff<8)return To(e,i);for(var r=e.l+i,s=[],o=0;o!==t.length;++o)switch(t[o][0]){case"PtgArray":t[o][1]=zXt(e,0,n),s.push(t[o][1]);break;case"PtgMemArea":t[o][2]=UXt(e,0,n),s.push(t[o][2]);break;case"PtgExp":n&&12==n.biff&&(t[o][1][1]=e.read_shift(4),s.push(t[o][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+t[o][0]}return 0!=(i=r-e.l)&&s.push(To(e,i)),s}function yYt(e){for(var i=[],t=0;t=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function bYt(e,i){var t=e.lastIndexOf("!"),n=i.lastIndexOf("!");return-1==t&&-1==n?e+":"+i:t>0&&n>0&&e.slice(0,t).toLowerCase()==i.slice(0,n).toLowerCase()?e+":"+i.slice(n+1):(console.error("Cannot hydrate range",e,i),e+":"+i)}function ont(e,i,t){if(!e)return"SH33TJSERR0";if(t.biff>8&&(!e.XTI||!e.XTI[i]))return e.SheetNames[i];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[i];if(t.biff<8)return i>1e4&&(i-=65536),i<0&&(i=-i),0==i?"":e.XTI[i-1];if(!n)return"SH33TJSERR1";var r="";if(t.biff>8)switch(e[n[0]][0]){case 357:return r=-1==n[1]?"#REF":e.SheetNames[n[1]],n[1]==n[2]?r:r+":"+e.SheetNames[n[2]];case 358:return null!=t.SID?e.SheetNames[t.SID]:"SH33TJSSAME"+e[n[0]][0];default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return r=-1==n[1]?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?r:r+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(s){return s.Name}).join(";;");default:return e[n[0]][0][3]?(r=-1==n[1]?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?r:r+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function lnt(e,i,t){var n=ont(e,i,t);return"#REF"==n?n:W1(n,t)}function Mo(e,i,t,n,r){var w,E,D,L,s=r&&r.biff||8,o={s:{c:0,r:0},e:{c:0,r:0}},l=[],k=0,O=0,U="";if(!e[0]||!e[0][0])return"";for(var j=-1,W="",Z=0,rt=e[0].length;Z=0){switch(e[0][j][1][0]){case 0:W=Zn(" ",e[0][j][1][1]);break;case 1:W=Zn("\r",e[0][j][1][1]);break;default:if(W="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][j][1][0])}E+=W,j=-1}l.push(E+xYt[st[0]]+w);break;case"PtgIsect":w=l.pop(),E=l.pop(),l.push(E+" "+w);break;case"PtgUnion":w=l.pop(),E=l.pop(),l.push(E+","+w);break;case"PtgRange":w=l.pop(),E=l.pop(),l.push(bYt(E,w));break;case"PtgAttrChoose":case"PtgAttrGoto":case"PtgAttrIf":case"PtgAttrIfError":case"PtgAttrBaxcel":case"PtgAttrSemi":case"PtgMemArea":case"PtgTbl":case"PtgMemErr":case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":case"PtgMemFunc":case"PtgMemNoMem":break;case"PtgRef":D=z1(st[1][1],o,r),l.push(G1(D,s));break;case"PtgRefN":D=t?z1(st[1][1],t,r):st[1][1],l.push(G1(D,s));break;case"PtgRef3d":k=st[1][1],D=z1(st[1][2],o,r),U=lnt(n,k,r),l.push(U+"!"+G1(D,s));break;case"PtgFunc":case"PtgFuncVar":var Tt=st[1][0],It=st[1][1];Tt||(Tt=0);var ft=0==(Tt&=127)?[]:l.slice(-Tt);l.length-=Tt,"User"===It&&(It=ft.shift()),l.push(It+"("+ft.join(",")+")");break;case"PtgBool":l.push(st[1]?"TRUE":"FALSE");break;case"PtgInt":case"PtgErr":l.push(st[1]);break;case"PtgNum":l.push(String(st[1]));break;case"PtgStr":l.push('"'+st[1].replace(/"/g,'""')+'"');break;case"PtgAreaN":L=Let(st[1][1],t?{s:t}:o,r),l.push(KN(L,r));break;case"PtgArea":L=Let(st[1][1],o,r),l.push(KN(L,r));break;case"PtgArea3d":L=st[1][2],U=lnt(n,k=st[1][1],r),l.push(U+"!"+KN(L,r));break;case"PtgAttrSum":l.push("SUM("+l.pop()+")");break;case"PtgName":var ht=(n.names||[])[(O=st[1][2])-1]||(n[0]||[])[O],mt=ht?ht.Name:"SH33TJSNAME"+String(O);mt&&"_xlfn."==mt.slice(0,6)&&!r.xlfn&&(mt=mt.slice(6)),l.push(mt);break;case"PtgNameX":var Ct,wt=st[1][1];if(O=st[1][2],!(r.biff<=5)){var _t="";if(14849==((n[wt]||[])[0]||[])[0]||(1025==((n[wt]||[])[0]||[])[0]?n[wt][O]&&n[wt][O].itab>0&&(_t=n.SheetNames[n[wt][O].itab-1]+"!"):_t=n.SheetNames[O-1]+"!"),n[wt]&&n[wt][O])_t+=n[wt][O].Name;else if(n[0]&&n[0][O])_t+=n[0][O].Name;else{var Dt=(ont(n,wt,r)||"").split(";;");Dt[O-1]?_t=Dt[O-1]:_t+="SH33TJSERRX"}l.push(_t);break}wt<0&&(wt=-wt),n[wt]&&(Ct=n[wt][O]),Ct||(Ct={Name:"SH33TJSERRY"}),l.push(Ct.Name);break;case"PtgParen":var Ue="(",Te=")";if(j>=0){switch(W="",e[0][j][1][0]){case 2:Ue=Zn(" ",e[0][j][1][1])+Ue;break;case 3:Ue=Zn("\r",e[0][j][1][1])+Ue;break;case 4:Te=Zn(" ",e[0][j][1][1])+Te;break;case 5:Te=Zn("\r",e[0][j][1][1])+Te;break;default:if(r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][j][1][0])}j=-1}l.push(Ue+l.pop()+Te);break;case"PtgRefErr":case"PtgRefErr3d":case"PtgAreaErr":case"PtgAreaErr3d":l.push("#REF!");break;case"PtgExp":var ve={c:t.c,r:t.r};if(n.sharedf[Pn(D={c:st[1][1],r:st[1][0]})]){var qt=n.sharedf[Pn(D)];l.push(Mo(qt,0,ve,n,r))}else{var _e=!1;for(w=0;w!=n.arrayf.length;++w)if(!(D.c<(E=n.arrayf[w])[0].s.c||D.c>E[0].e.c||D.rE[0].e.r)){l.push(Mo(E[1],0,ve,n,r)),_e=!0;break}_e||l.push(st[1])}break;case"PtgArray":l.push("{"+yYt(st[1])+"}");break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":j=Z;break;case"PtgMissArg":l.push("");break;case"PtgList":l.push("Table"+st[1].idx+"[#"+st[1].rt+"]");break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");default:throw new Error("Unrecognized Formula Token: "+String(st))}if(3!=r.biff&&j>=0&&-1==["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"].indexOf(e[0][Z][0])){var Me=!0;switch((st=e[0][j])[1][0]){case 4:Me=!1;case 0:W=Zn(" ",st[1][1]);break;case 5:Me=!1;case 1:W=Zn("\r",st[1][1]);break;default:if(W="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+st[1][0])}l.push((Me?W:"")+l.pop()+(Me?"":W)),j=-1}}if(l.length>1&&r.WTF)throw new Error("bad formula stack");return"TRUE"==l[0]||"FALSE"!=l[0]&&l[0]}function JA(e,i,t){var n=e.read_shift(4),r=function rw(e,i,t){for(var r,s,n=e.l+i,o=[];n!=e.l;)i=n-e.l,r=ant[s=e[e.l]]||ant[mYt[s]],(24===s||25===s)&&(r=(24===s?gYt:vYt)[e[e.l+1]]),r&&r.f?o.push([r.n,r.f(e,i,t)]):To(e,i);return o}(e,n,t),s=e.read_shift(4);return[r,s>0?nw(e,s,r,t):null]}var DYt=JA,qA=JA,MYt=JA,IYt=JA;function cnt(e){if((0|e)==e&&e=0){var i=le(11);return i.write_shift(4,3),i.write_shift(1,30),i.write_shift(2,e),i.write_shift(4,0),i}var t=le(17);return t.write_shift(4,11),t.write_shift(1,31),t.write_shift(8,e),t.write_shift(4,0),t}var zYt=function UYt(e,i){if("number"==typeof e)return cnt(e);if("boolean"==typeof e)return function PYt(e){var i=le(10);return i.write_shift(4,2),i.write_shift(1,29),i.write_shift(1,e?1:0),i.write_shift(4,0),i}(e);if(/^#(DIV\/0!|GETTING_DATA|N\/A|NAME\?|NULL!|NUM!|REF!|VALUE!)$/.test(e))return function RYt(e){var i=le(10);return i.write_shift(4,2),i.write_shift(1,28),i.write_shift(1,e),i.write_shift(4,0),i}(+X1[e]);if(e.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function FYt(e){var i=Tr(e),t=le(15);return t.write_shift(4,7),t.write_shift(1,36),t.write_shift(4,i.r),t.write_shift(2,i.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),t.write_shift(4,0),t}(e);if(e.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function NYt(e){var i=e.split(":"),t=i[0],n=le(23);n.write_shift(4,15);var r=Tr(t=i[0]);return n.write_shift(1,36),n.write_shift(4,r.r),n.write_shift(2,r.c|("$"==t.charAt(0)?0:1)<<14|(t.match(/\$\d/)?0:1)<<15),n.write_shift(4,0),r=Tr(t=i[1]),n.write_shift(1,36),n.write_shift(4,r.r),n.write_shift(2,r.c|("$"==t.charAt(0)?0:1)<<14|(t.match(/\$\d/)?0:1)<<15),n.write_shift(4,0),n.write_shift(1,17),n.write_shift(4,0),n}(e);if(e.match(/^#REF!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function VYt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t);e=e.slice(t+1),"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var r=Sa(e),s=le(23);return s.write_shift(4,15),s.write_shift(1,59),s.write_shift(2,2+i.SheetNames.map(function(o){return o.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,r.s.r),s.write_shift(4,r.e.r),s.write_shift(2,r.s.c),s.write_shift(2,r.e.c),s.write_shift(4,0),s}(e,i);if(e.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function OYt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t),r=Tr(e=e.slice(t+1));"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var s=le(17);return s.write_shift(4,9),s.write_shift(1,58),s.write_shift(2,2+i.SheetNames.map(function(o){return o.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,r.r),s.write_shift(2,r.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),s.write_shift(4,0),s}(e,i);if(e.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function BYt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t);e=e.slice(t+1),"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var r=e.split(":"),s=le(27);s.write_shift(4,19);var o=r[0],l=Tr(o);return s.write_shift(1,58),s.write_shift(2,2+i.SheetNames.map(function(w){return w.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,l.r),s.write_shift(2,l.c|("$"==o.charAt(0)?0:1)<<14|(o.match(/\$\d/)?0:1)<<15),l=Tr(o=r[1]),s.write_shift(1,58),s.write_shift(2,2+i.SheetNames.map(function(w){return w.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,l.r),s.write_shift(2,l.c|("$"==o.charAt(0)?0:1)<<14|(o.match(/\$\d/)?0:1)<<15),s.write_shift(1,17),s.write_shift(4,0),s}(e,i);if(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!#REF!$/.test(e))return function LYt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t);e=e.slice(t+1),"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var r=le(17);return r.write_shift(4,9),r.write_shift(1,60),r.write_shift(2,2+i.SheetNames.map(function(s){return s.toLowerCase()}).indexOf(n.toLowerCase())),r.write_shift(4,0),r.write_shift(2,0),r.write_shift(4,0),r}(e,i);if(/^".*"$/.test(e))return function kYt(e){var i=le(7);i.write_shift(4,3+2*e.length),i.write_shift(1,23),i.write_shift(2,e.length);var t=le(2*e.length);t.write_shift(2*e.length,e,"utf16le");var n=le(4);return n.write_shift(4,0),Us([i,t,n])}(e);if(/^[+-]\d+$/.test(e))return cnt(parseInt(e,10));throw"Formula |"+e+"| not supported for XLSB"},GYt={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},unt={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},HYt={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function WYt(e){return("of:="+e.replace(KA,"$1[.$2$3$4$5]").replace(/\]:\[/g,":")).replace(/;/g,"|").replace(/,/g,";")}function dnt(e){return e.replace(/!/,".").replace(/:/,":.")}var aw=typeof Map<"u";function A4(e,i,t){var n=0,r=e.length;if(t){if(aw?t.has(i):Object.prototype.hasOwnProperty.call(t,i))for(var s=aw?t.get(i):t[i];n-1?(t.width=YA(n),t.customWidth=1):null!=i.width&&(t.width=i.width),i.hidden&&(t.hidden=!0),null!=i.level&&(t.outlineLevel=t.level=i.level),t}function Im(e,i){if(e){var t=[.7,.7,.75,.75,.3,.3];"xlml"==i&&(t=[1,1,1,1,.5,.5]),null==e.left&&(e.left=t[0]),null==e.right&&(e.right=t[1]),null==e.top&&(e.top=t[2]),null==e.bottom&&(e.bottom=t[3]),null==e.header&&(e.header=t[4]),null==e.footer&&(e.footer=t[5])}}function Cf(e,i,t){var n=t.revssf[null!=i.z?i.z:"General"],r=60,s=e.length;if(null==n&&t.ssf)for(;r<392;++r)if(null==t.ssf[r]){yf(i.z,r),t.ssf[r]=i.z,t.revssf[i.z]=n=r;break}for(r=0;r!=s;++r)if(e[r].numFmtId===n)return r;return e[s]={numFmtId:n,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},s}function jYt(e,i,t){if(e&&e["!ref"]){var n=$n(e["!ref"]);if(n.e.c"u")return"";var l="",w=e.t,E=e.v;if("z"!==e.t)switch(e.t){case"b":l=e.v?"1":"0";break;case"n":isNaN(e.v)?(e.t="e",l=vc[e.v=36]):isFinite(e.v)?l=""+e.v:(e.t="e",l=vc[e.v=7]);break;case"e":l=vc[e.v];break;case"d":if(n&&n.cellDates){var D=ps(e.v,o);l=D.toISOString(),D.getUTCFullYear()<1900&&(l=l.slice(l.indexOf("T")+1).replace("Z",""))}else(e=br(e)).t="n",l=""+(e.v=ws(ps(e.v,o),o));typeof e.z>"u"&&(e.z=Ni[14]);break;default:l=e.v}var k="z"==e.t||null==e.v?"":Ja("v",_n(l)),O={r:i},L=Cf(n.cellXfs,e,n);switch(0!==L&&(O.s=L),e.t){case"n":case"z":break;case"d":O.t="d";break;case"b":O.t="b";break;case"e":O.t="e";break;default:if(null==e.v){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(n&&n.bookSST){k=Ja("v",""+A4(n.Strings,e.v,n.revStrings)),O.t="s";break}O.t="str"}if(e.t!=w&&(e.t=w,e.v=E),"string"==typeof e.f&&e.f){var U=e.F&&e.F.slice(0,i.length)==i?{t:"array",ref:e.F}:null;k=ii("f",_n(e.f),U)+(null!=e.v?k:"")}return e.l&&(e.l.display=_n(l),t["!links"].push([i,e.l])),e.D&&(O.cm=1),ii("c",k,O)}function x$t(e,i,t,n){var o,r=[zs,ii("worksheet",null,{xmlns:gm[0],"xmlns:r":Ta.r})],l="",w=t.Sheets[t.SheetNames[e]];null==w&&(w={});var E=w["!ref"]||"A1",D=$n(E);if(D.e.c>16383||D.e.r>1048575){if(i.WTF)throw new Error("Range "+E+" exceeds format limit A1:XFD1048576");D.e.c=Math.min(D.e.c,16383),D.e.r=Math.min(D.e.c,1048575),E=bn(D)}n||(n={}),w["!comments"]=[];var k=[];(function i$t(e,i,t,n,r){var s=!1,o={},l=null;if("xlsx"!==n.bookType&&i.vbaraw){var w=i.SheetNames[t];try{i.Workbook&&(w=i.Workbook.Sheets[t].CodeName||w)}catch{}s=!0,o.codeName=Lu(_n(w))}if(e&&e["!outline"]){var E={summaryBelow:1,summaryRight:1};e["!outline"].above&&(E.summaryBelow=0),e["!outline"].left&&(E.summaryRight=0),l=(l||"")+ii("outlinePr",null,E)}!s&&!l||(r[r.length]=ii("sheetPr",l,o))})(w,t,e,i,r),r[r.length]=ii("dimension",null,{ref:E}),r[r.length]=function m$t(e,i,t,n){var r={workbookViewId:"0"};return(((n||{}).Workbook||{}).Views||[])[0]&&(r.rightToLeft=n.Workbook.Views[0].RTL?"1":"0"),ii("sheetViews",ii("sheetView",null,r),{})}(0,0,0,t),i.sheetFormat&&(r[r.length]=ii("sheetFormatPr",null,{defaultRowHeight:i.sheetFormat.defaultRowHeight||"16",baseColWidth:i.sheetFormat.baseColWidth||"10",outlineLevelRow:i.sheetFormat.outlineLevelRow||"7"})),null!=w["!cols"]&&w["!cols"].length>0&&(r[r.length]=function u$t(e,i){for(var n,t=[""],r=0;r!=i.length;++r)(n=i[r])&&(t[t.length]=ii("col",null,tD(r,n)));return t[t.length]="",t.join("")}(0,w["!cols"])),r[o=r.length]="",w["!links"]=[],null!=w["!ref"]&&(l=function y$t(e,i,t,n){var w,W,r=[],s=[],o=$n(e["!ref"]),l="",E="",D=[],k=0,O=0,L=e["!rows"],U=null!=e["!data"],j={r:E},Z=-1,rt=(((n||{}).Workbook||{}).WBProps||{}).date1904;for(O=o.s.c;O<=o.e.c;++O)D[O]=xn(O);for(k=o.s.r;k<=o.e.r;++k){for(s=[],E=Un(k),O=o.s.c;O<=o.e.c;++O){w=D[O]+E;var st=U?(e["!data"][k]||[])[O]:e[w];void 0!==st&&null!=(l=g$t(st,w,e,i,0,0,rt))&&s.push(l)}(s.length>0||L&&L[k])&&(j={r:E},L&&L[k]&&((W=L[k]).hidden&&(j.hidden=1),Z=-1,W.hpx?Z=tw(W.hpx):W.hpt&&(Z=W.hpt),Z>-1&&(j.ht=Z,j.customHeight=1),W.level&&(j.outlineLevel=W.level)),r[r.length]=ii("row",s.join(""),j))}if(L)for(;k-1&&(j.ht=Z,j.customHeight=1),W.level&&(j.outlineLevel=W.level),r[r.length]=ii("row","",j));return r.join("")}(w,i,0,t),l.length>0&&(r[r.length]=l)),r.length>o+1&&(r[r.length]="",r[o]=r[o].replace("/>",">")),w["!protect"]&&(r[r.length]=function s$t(e){var i={sheet:1};return n$t.forEach(function(t){null!=e[t]&&e[t]&&(i[t]="1")}),r$t.forEach(function(t){null!=e[t]&&!e[t]&&(i[t]="0")}),e.password&&(i.password=x4(e.password).toString(16).toUpperCase()),ii("sheetProtection",null,i)}(w["!protect"])),null!=w["!autofilter"]&&(r[r.length]=function d$t(e,i,t,n){var r="string"==typeof e.ref?e.ref:bn(e.ref);t.Workbook||(t.Workbook={Sheets:[]}),t.Workbook.Names||(t.Workbook.Names=[]);var s=t.Workbook.Names,o=Sa(r);o.s.r==o.e.r&&(o.e.r=Sa(i["!ref"]).e.r,r=bn(o));for(var l=0;l0&&(r[r.length]=function t$t(e){if(0===e.length)return"";for(var i='',t=0;t!=e.length;++t)i+='';return i+""}(w["!merges"]));var L,O=-1,U=-1;return w["!links"].length>0&&(r[r.length]="",w["!links"].forEach(function(j){j[1].Target&&(L={ref:j[0]},"#"!=j[1].Target.charAt(0)&&(U=vr(n,-1,_n(j[1].Target).replace(/#[\s\S]*$/,""),wn.HLINK),L["r:id"]="rId"+U),(O=j[1].Target.indexOf("#"))>-1&&(L.location=_n(j[1].Target.slice(O+1))),j[1].Tooltip&&(L.tooltip=_n(j[1].Tooltip)),L.display=j[1].display,r[r.length]=ii("hyperlink",null,L))}),r[r.length]=""),delete w["!links"],null!=w["!margins"]&&(r[r.length]=function l$t(e){return Im(e),ii("pageMargins",null,e)}(w["!margins"])),(!i||i.ignoreEC||null==i.ignoreEC)&&(r[r.length]=Ja("ignoredErrors",ii("ignoredError",null,{numberStoredAsText:1,sqref:E}))),k.length>0&&(U=vr(n,-1,"../drawings/drawing"+(e+1)+".xml",wn.DRAW),r[r.length]=ii("drawing",null,{"r:id":"rId"+U}),w["!drawing"]=k),w["!comments"].length>0&&(U=vr(n,-1,"../drawings/vmlDrawing"+(e+1)+".vml",wn.VML),r[r.length]=ii("legacyDrawing",null,{"r:id":"rId"+U}),w["!legacy"]=U),r.length>1&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}function T$t(e,i,t,n){var r=function w$t(e,i,t){var n=le(145),r=(t["!rows"]||[])[e]||{};n.write_shift(4,e),n.write_shift(4,0);var s=320;r.hpx?s=20*tw(r.hpx):r.hpt&&(s=20*r.hpt),n.write_shift(2,s),n.write_shift(1,0);var o=0;r.level&&(o|=r.level),r.hidden&&(o|=16),(r.hpx||r.hpt)&&(o|=32),n.write_shift(1,o),n.write_shift(1,0);var l=0,w=n.l;n.l+=4;for(var E={r:e,c:0},D=null!=t["!data"],k=0;k<16;++k)if(!(i.s.c>k+1<<10||i.e.cn.l?n.slice(0,n.l):n}(n,t,i);(r.length>17||(i["!rows"]||[])[n])&&Re(e,0,r)}var C$t=wm,S$t=O0;function M4(e,i,t){return null==t&&(t=le(9)),ym(i,t),t.write_shift(1,e.v),t}function I4(e,i,t){return null==t&&(t=le(8)),bm(i,t),t.write_shift(1,e.v),t.write_shift(2,0),t.write_shift(1,0),t}var rQt=wm,sQt=O0,gnt=["left","right","top","bottom","header","footer"];function TQt(e,i,t,n,r,s,o,l){var w={r:t,c:n};if(i.c&&s["!comments"].push([Pn(w),i.c]),void 0===i.v)return!1;var E="";switch(i.t){case"b":E=i.v?"1":"0";break;case"d":(i=br(i)).z=i.z||Ni[14],i.v=ws(ps(i.v,l),l),i.t="n";break;case"n":case"e":E=""+i.v;break;default:E=i.v}switch(w.s=Cf(r.cellXfs,i,r),i.l&&s["!links"].push([Pn(w),i.l]),i.t){case"s":case"str":return r.bookSST?(E=A4(r.Strings,null==i.v?"":String(i.v),r.revStrings),w.t="s",w.v=E,o?Re(e,18,function z$t(e,i,t){return null==t&&(t=le(8)),bm(i,t),t.write_shift(4,i.v),t}(0,w)):Re(e,7,function V$t(e,i,t){return null==t&&(t=le(12)),ym(i,t),t.write_shift(4,i.v),t}(0,w))):(w.t="str",o?Re(e,17,function q$t(e,i,t){var n=null==e.v?"":String(e.v);return null==t&&(t=le(8+4*n.length)),bm(i,t),Ea(n,t),t.length>t.l?t.slice(0,t.l):t}(i,w)):Re(e,6,function Z$t(e,i,t){var n=null==e.v?"":String(e.v);return null==t&&(t=le(12+4*e.v.length)),ym(i,t),Ea(n,t),t.length>t.l?t.slice(0,t.l):t}(i,w))),!0;case"n":return i.v==(0|i.v)&&i.v>-1e3&&i.v<1e3?o?Re(e,13,function $$t(e,i,t){return null==t&&(t=le(8)),bm(i,t),Uet(e.v,t),t}(i,w)):Re(e,2,function X$t(e,i,t){return null==t&&(t=le(12)),ym(i,t),Uet(e.v,t),t}(i,w)):isNaN(i.v)?o?Re(e,14,I4({t:"e",v:36},w)):Re(e,3,M4({t:"e",v:36},w)):isFinite(i.v)?o?Re(e,16,function W$t(e,i,t){return null==t&&(t=le(12)),bm(i,t),Tm(e.v,t),t}(i,w)):Re(e,5,function H$t(e,i,t){return null==t&&(t=le(16)),ym(i,t),Tm(e.v,t),t}(i,w)):o?Re(e,14,I4({t:"e",v:7},w)):Re(e,3,M4({t:"e",v:7},w)),!0;case"b":return w.t="b",o?Re(e,15,function O$t(e,i,t){return null==t&&(t=le(5)),bm(i,t),t.write_shift(1,e.v?1:0),t}(i,w)):Re(e,4,function k$t(e,i,t){return null==t&&(t=le(9)),ym(i,t),t.write_shift(1,e.v?1:0),t}(i,w)),!0;case"e":return w.t="e",o?Re(e,14,I4(i,w)):Re(e,3,M4(i,w)),!0}return o?Re(e,12,function R$t(e,i,t){return null==t&&(t=le(4)),bm(i,t)}(0,w)):Re(e,1,function M$t(e,i,t){return null==t&&(t=le(8)),ym(i,t)}(0,w)),!0}function PQt(e,i,t,n){var r=Co(),s=t.SheetNames[e],o=t.Sheets[s]||{},l=s;try{t&&t.Workbook&&(l=t.Workbook.Sheets[e].CodeName||l)}catch{}var w=$n(o["!ref"]||"A1");if(w.e.c>16383||w.e.r>1048575){if(i.WTF)throw new Error("Range "+(o["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");w.e.c=Math.min(w.e.c,16383),w.e.r=Math.min(w.e.c,1048575)}return o["!links"]=[],o["!comments"]=[],Re(r,129),(t.vbaraw||o["!outline"])&&Re(r,147,function A$t(e,i,t){null==t&&(t=le(84+4*e.length));var n=192;i&&(i.above&&(n&=-65),i.left&&(n&=-129)),t.write_shift(1,n);for(var r=1;r<3;++r)t.write_shift(1,0);return LA({auto:1},t),t.write_shift(-4,-1),t.write_shift(-4,-1),Vet(e,t),t.slice(0,t.l)}(l,o["!outline"])),Re(r,148,S$t(w)),function IQt(e,i,t){Re(e,133),Re(e,137,function gQt(e,i,t){null==t&&(t=le(30));var n=924;return(((i||{}).Views||[])[0]||{}).RTL&&(n|=32),t.write_shift(2,n),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(2,0),t.write_shift(2,100),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(4,0),t}(0,t)),Re(e,138),Re(e,134)}(r,0,t.Workbook),function EQt(e,i){!i||!i["!cols"]||(Re(e,390),i["!cols"].forEach(function(t,n){t&&Re(e,60,function dQt(e,i,t){null==t&&(t=le(18));var n=tD(e,i);t.write_shift(-4,e),t.write_shift(-4,e),t.write_shift(4,256*(n.width||10)),t.write_shift(4,0);var r=0;return i.hidden&&(r|=1),"number"==typeof n.width&&(r|=2),i.level&&(r|=i.level<<8),t.write_shift(2,r),t}(n,t))}),Re(e,391))}(r,o),function CQt(e,i,t,n,r){var s=$n(i["!ref"]||"A1"),l="",w=[],E=(((r||{}).Workbook||{}).WBProps||{}).date1904;Re(e,145);var D=null!=i["!data"],k=s.e.r;i["!rows"]&&(k=Math.max(s.e.r,i["!rows"].length-1));for(var O=s.s.r;O<=k;++O){l=Un(O),T$t(e,i,s,O);var L=!1;if(O<=s.e.r)for(var U=s.s.c;U<=s.e.c;++U){O===s.s.r&&(w[U]=xn(U));var j=D?(i["!data"][O]||[])[U]:i[w[U]+l];L=!!j&&TQt(e,j,O,U,n,i,L,E)}}Re(e,146)}(r,o,0,i,t),function RQt(e,i){i["!protect"]&&Re(e,535,function yQt(e,i){return null==i&&(i=le(66)),i.write_shift(2,e.password?x4(e.password):0),i.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(t){i.write_shift(4,t[1]?null==e[t[0]]||e[t[0]]?0:1:null!=e[t[0]]&&e[t[0]]?0:1)}),i}(i["!protect"]))}(r,o),function MQt(e,i,t,n){if(i["!autofilter"]){var r=i["!autofilter"],s="string"==typeof r.ref?r.ref:bn(r.ref);t.Workbook||(t.Workbook={Sheets:[]}),t.Workbook.Names||(t.Workbook.Names=[]);var o=t.Workbook.Names,l=Sa(s);l.s.r==l.e.r&&(l.e.r=Sa(i["!ref"]).e.r,s=bn(l));for(var w=0;w0){var r=vr(n,-1,"../drawings/vmlDrawing"+(t+1)+".vml",wn.VML);Re(e,551,e4("rId"+r)),i["!legacy"]=r}}(r,o,e,n),Re(r,130),r.end()}var R4=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],GQt=":][*?/\\".split("");function bnt(e,i){try{if(""==e)throw new Error("Sheet name cannot be blank");if(e.length>31)throw new Error("Sheet name cannot exceed 31 chars");if(39==e.charCodeAt(0)||39==e.charCodeAt(e.length-1))throw new Error("Sheet name cannot start or end with apostrophe (')");if("history"==e.toLowerCase())throw new Error("Sheet name cannot be 'History'");GQt.forEach(function(t){if(-1!=e.indexOf(t))throw new Error("Sheet name cannot contain : \\ / ? * [ ]")})}catch(t){if(i)return!1;throw t}return!0}function $Qt(e,i){return i||(i=le(127)),i.write_shift(4,e.Hidden),i.write_shift(4,e.iTabID),e4(e.strRelID,i),Ea(e.name.slice(0,31),i),i.length>i.l?i.slice(0,i.l):i}function lKt(e,i){var t=Co();return Re(t,131),Re(t,128,function iKt(e,i){i||(i=le(127));for(var t=0;4!=t;++t)i.write_shift(4,0);return Ea("SheetJS",i),Ea(D1.version,i),Ea(D1.version,i),Ea("7262",i),i.length>i.l?i.slice(0,i.l):i}()),Re(t,153,function KQt(e,i){i||(i=le(72));var t=0;return e&&(e.date1904&&(t|=1),e.filterPrivacy&&(t|=8)),i.write_shift(4,t),i.write_shift(4,0),Vet(e&&e.CodeName||"ThisWorkbook",i),i.slice(0,i.l)}(e.Workbook&&e.Workbook.WBProps||null)),function rKt(e,i){if(i.Workbook&&i.Workbook.Sheets){for(var t=i.Workbook.Sheets,n=0,r=-1,s=-1;nr||(Re(e,135),Re(e,158,function nKt(e,i){return i||(i=le(29)),i.write_shift(-4,0),i.write_shift(-4,460),i.write_shift(4,28800),i.write_shift(4,17600),i.write_shift(4,500),i.write_shift(4,e),i.write_shift(4,e),i.write_shift(1,120),i.length>i.l?i.slice(0,i.l):i}(r)),Re(e,136))}}(t,e),function eKt(e,i){Re(e,143);for(var t=0;t!=i.SheetNames.length;++t)Re(e,156,$Qt({Hidden:i.Workbook&&i.Workbook.Sheets&&i.Workbook.Sheets[t]&&i.Workbook.Sheets[t].Hidden||0,iTabID:t+1,strRelID:"rId"+(t+1),name:i.SheetNames[t]}));Re(e,144)}(t,e),function oKt(e,i){Re(e,353),Re(e,357),Re(e,362,function aKt(e){var i=e.SheetNames.length,t=le(12*i+28);t.write_shift(4,i+2),t.write_shift(4,0),t.write_shift(4,-2),t.write_shift(4,-2),t.write_shift(4,0),t.write_shift(4,-1),t.write_shift(4,-1);for(var n=0;n-1&&(n|=32,r=r.slice(6)),t.write_shift(4,n),t.write_shift(1,0),t.write_shift(4,null==e.Sheet?4294967295:e.Sheet);var s=[t,Ea(r),zYt(e.Ref,i)];if(e.Comment)s.push(j1(e.Comment));else{var o=le(4);o.write_shift(4,4294967295),s.push(o)}return Us(s)}(t,i))}catch{console.error("Could not serialize defined name "+JSON.stringify(t))}})}(t,e),Re(t,132),t.end()}function Snt(e){return ii("NamedRange",null,{"ss:Name":"_xlnm."==e.Name.slice(0,6)?e.Name.slice(6):e.Name,"ss:RefersTo":"="+ZA(e.Ref,{r:0,c:0})})}function OKt(e,i,t,n,r,s,o){if(!e||null==e.v&&null==e.f)return"";var l={};if(e.f&&(l["ss:Formula"]="="+_n(ZA(e.f,o))),e.F&&e.F.slice(0,i.length)==i){var w=Tr(e.F.slice(i.length+1));l["ss:ArrayRange"]="RC:R"+(w.r==o.r?"":"["+(w.r-o.r)+"]")+"C"+(w.c==o.c?"":"["+(w.c-o.c)+"]")}if(e.l&&e.l.Target&&(l["ss:HRef"]=_n(e.l.Target),e.l.Tooltip&&(l["x:HRefScreenTip"]=_n(e.l.Tooltip))),t["!merges"])for(var E=t["!merges"],D=0;D!=E.length;++D)E[D].s.c!=o.c||E[D].s.r!=o.r||(E[D].e.c>E[D].s.c&&(l["ss:MergeAcross"]=E[D].e.c-E[D].s.c),E[D].e.r>E[D].s.r&&(l["ss:MergeDown"]=E[D].e.r-E[D].s.r));var k="",O="";switch(e.t){case"z":if(!n.sheetStubs)return"";break;case"n":k="Number",O=String(e.v);break;case"b":k="Boolean",O=e.v?"1":"0";break;case"e":k="Error",O=vc[e.v];break;case"d":k="DateTime",O=new Date(e.v).toISOString(),null==e.z&&(e.z=e.z||Ni[14]);break;case"s":k="String",O=function Yzt(e){return(e+"").replace(zN,function(t){return UN[t]}).replace(pet,function(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"})}(e.v||"")}var L=Cf(n.cellXfs,e,n);l["ss:StyleID"]="s"+(21+L),l["ss:Index"]=o.c+1;var j="z"==e.t?"":''+(null!=e.v?O:"")+"";return(e.c||[]).length>0&&(j+=function FKt(e){return e.map(function(i){var t=function $zt(e){return e.replace(/(\r\n|[\r\n])/g," ")}(i.t||""),n=ii("ss:Data",t,{xmlns:"http://www.w3.org/TR/REC-html40"}),r={};return i.a&&(r["ss:Author"]=i.a),e.hidden||(r["ss:ShowAlways"]="1"),ii("Comment",n,r)}).join("")}(e.c)),ii("Cell",j,l)}function LKt(e,i){var t='"}function BKt(e,i,t){var n=[],s=t.Sheets[t.SheetNames[e]],o=s?function PKt(e,i,t,n){if(!e||!((n||{}).Workbook||{}).Names)return"";for(var r=n.Workbook.Names,s=[],o=0;o0&&n.push(""+o+""),o=s?function NKt(e,i){if(!e["!ref"])return"";var r=$n(e["!ref"]),s=e["!merges"]||[],o=0,l=[];e["!cols"]&&e["!cols"].forEach(function(W,Z){wf(W);var rt=!!W.width,st=tD(Z,W),yt={"ss:Index":Z+1};rt&&(yt["ss:Width"]=J1(st.width)),W.hidden&&(yt["ss:Hidden"]="1"),l.push(ii("Column",null,yt))});for(var w=null!=e["!data"],E=r.s.r;E<=r.e.r;++E){for(var D=[LKt(E,(e["!rows"]||[])[E])],k=r.s.c;k<=r.e.c;++k){var O=!1;for(o=0;o!=s.length;++o)if(!(s[o].s.c>k||s[o].s.r>E||s[o].e.c"),D.length>2&&l.push(D.join(""))}return l.join("")}(s,i):"",o.length>0&&n.push(""+o+"
"),n.push(function kKt(e,i,t,n){if(!e)return"";var r=[];if(e["!margins"]&&(r.push(""),e["!margins"].header&&r.push(ii("Header",null,{"x:Margin":e["!margins"].header})),e["!margins"].footer&&r.push(ii("Footer",null,{"x:Margin":e["!margins"].footer})),r.push(ii("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"})),r.push("")),n&&n.Workbook&&n.Workbook.Sheets&&n.Workbook.Sheets[t])if(n.Workbook.Sheets[t].Hidden)r.push(ii("Visible",1==n.Workbook.Sheets[t].Hidden?"SheetHidden":"SheetVeryHidden",{}));else{for(var s=0;s")}return((((n||{}).Workbook||{}).Views||[])[0]||{}).RTL&&r.push(""),e["!protect"]&&(r.push(Ja("ProtectContents","True")),e["!protect"].objects&&r.push(Ja("ProtectObjects","True")),e["!protect"].scenarios&&r.push(Ja("ProtectScenarios","True")),null==e["!protect"].selectLockedCells||e["!protect"].selectLockedCells?null!=e["!protect"].selectUnlockedCells&&!e["!protect"].selectUnlockedCells&&r.push(Ja("EnableSelection","UnlockedCells")):r.push(Ja("EnableSelection","NoSelection")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(o){e["!protect"][o[0]]&&r.push("<"+o[1]+"/>")})),0==r.length?"":ii("WorksheetOptions",r.join(""),{xmlns:Gl.x})}(s,0,e,t)),s["!autofilter"]&&n.push(''),n.join("")}function VKt(e,i){i||(i={}),e.SSF||(e.SSF=br(Ni)),e.SSF&&(I0(),F1(e.SSF),i.revssf=DA(e.SSF),i.revssf[e.SSF[65535]]=0,i.ssf=e.SSF,i.cellXfs=[],Cf(i.cellXfs,{},{revssf:{General:0}}));var t=[];t.push(function DKt(e,i){var t=[];return e.Props&&t.push(function WGt(e,i){var t=[];return rs(u4).map(function(n){for(var r=0;r'+r.join("")+""}(e.Props,e.Custprops)),t.join("")}(e,i)),t.push(function MKt(e){return(((e||{}).Workbook||{}).WBProps||{}).date1904?'':""}(e)),t.push(""),t.push("");for(var n=0;n'];return i.cellXfs.forEach(function(n,r){var s=[];s.push(ii("NumberFormat",null,{"ss:Format":_n(Ni[n.numFmtId])}));var o={"ss:ID":"s"+(21+r)};t.push(ii("Style",s.join(""),o))}),ii("Styles",t.join(""))}(0,i),t[3]=function RKt(e){if(!((e||{}).Workbook||{}).Names)return"";for(var i=e.Workbook.Names,t=[],n=0;n0&&(n.family=l);var w=e.read_shift(1);switch(w>0&&(n.charset=w),e.l++,n.color=function wGt(e){var i={},n=e.read_shift(1)>>>1,r=e.read_shift(1),s=e.read_shift(2,"i"),o=e.read_shift(1),l=e.read_shift(1),w=e.read_shift(1);switch(e.l++,n){case 0:i.auto=1;break;case 1:i.index=r;var E=Cm[r];E&&(i.rgb=Z1(E));break;case 2:i.rgb=Z1([o,l,w]);break;case 3:i.theme=r}return 0!=s&&(i.tint=s>0?s/32767:s/32768),i}(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor"}return n.name=So(e),n}},44:{f:function YWt(e,i){return[e.read_shift(2),So(e)]}},45:{f:JWt},46:{f:tjt},47:{f:function qWt(e,i){var t=e.l+i,n=e.read_shift(2),r=e.read_shift(2);return e.l=t,{ixfe:n,numFmtId:r}}},48:{},49:{f:function dGt(e){return e.read_shift(4,"i")}},50:{},51:{f:function Djt(e){for(var i=[],t=e.read_shift(4);t-- >0;)i.push([e.read_shift(4),e.read_shift(4)]);return i}},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:function kit(e,i,t){if(!t.cellStyles)return To(e,i);var n=t&&t.biff>=12?4:2,r=e.read_shift(n),s=e.read_shift(n),o=e.read_shift(n),l=e.read_shift(n),w=e.read_shift(2);2==n&&(e.l+=2);var E={s:r,e:s,w:o,ixfe:l,flags:w};return(t.biff>=5||!t.biff)&&(E.level=w>>8&7),E}},62:{f:function Q$t(e){return[gc(e),qN(e),"is"]}},63:{f:function Bjt(e){var i={};i.i=e.read_shift(4);var t={};t.r=e.read_shift(4),t.c=e.read_shift(4),i.r=Pn(t);var n=e.read_shift(1);return 2&n&&(i.l="1"),8&n&&(i.a="1"),i}},64:{f:function xQt(){}},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:To,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:function mQt(e){var i=e.read_shift(2);return e.l+=28,{RTL:32&i}}},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:function _$t(e,i){var t={},n=e[e.l];return++e.l,t.above=!(64&n),t.left=!(128&n),e.l+=18,t.name=yGt(e,i-19),t}},148:{f:C$t,p:16},151:{f:function cQt(){}},152:{},153:{f:function QQt(e,i){var t={},n=e.read_shift(4);t.defaultThemeVersion=e.read_shift(4);var r=i>8?So(e):"";return r.length>0&&(t.CodeName=r),t.autoCompressPictures=!!(65536&n),t.backupFile=!!(64&n),t.checkCompatibility=!!(4096&n),t.date1904=!!(1&n),t.filterPrivacy=!!(8&n),t.hidePivotFieldList=!!(1024&n),t.promptedSolutions=!!(16&n),t.publishItems=!!(2048&n),t.refreshAllConnections=!!(262144&n),t.saveExternalLinkValues=!!(128&n),t.showBorderUnselectedTables=!!(4&n),t.showInkAnnotation=!!(32&n),t.showObjects=["all","placeholders","none"][n>>13&3],t.showPivotChartFilter=!!(32768&n),t.updateLinks=["userSet","never","always"][n>>8&3],t}},154:{},155:{},156:{f:function YQt(e,i){var t={};return t.Hidden=e.read_shift(4),t.iTabID=e.read_shift(4),t.strRelID=t4(e,i-8),t.name=So(e),t}},157:{},158:{},159:{T:1,f:function aWt(e){return[e.read_shift(4),e.read_shift(4)]}},160:{T:-1},161:{T:1,f:wm},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:rQt},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:function _jt(e,i){return{flags:e.read_shift(4),version:e.read_shift(4),name:So(e)}}},336:{T:-1},337:{f:function Rjt(e){return e.l+=4,0!=e.read_shift(4)},T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:t4},357:{},358:{},359:{},360:{T:1},361:{},362:{f:function Iit(e,i,t){if(t.biff<8||!(t.biff>8)&&i==e[e.l]+(3==e[e.l+1]?1:0)+1)return function Rit(e,i,t){3==e[e.l+1]&&e[e.l]++;var n=N0(e,0,t);return 3==n.charCodeAt(0)?n.slice(1):n}(e,0,t);for(var n=[],r=e.l+i,s=e.read_shift(t.biff>8?4:2);0!=s--;)n.push(dHt(e,0,t));if(e.l!=r)throw new Error("Bad ExternSheet: "+e.l+" != "+r);return n}},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:function uQt(e,i,t){var n=e.l+i,r=zet(e),s=e.read_shift(1),o=[r];if(o[2]=s,t.cellFormula){var l=DYt(e,n-e.l,t);o[1]=l}else e.l=n;return o}},427:{f:function hQt(e,i,t){var n=e.l+i,s=[wm(e,16)];if(t.cellFormula){var o=IYt(e,n-e.l,t);s[1]=o,e.l=n}else e.l=n;return s}},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:function fQt(e){var i={};return gnt.forEach(function(t){i[t]=Eo(e)}),i}},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:function E$t(){}},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:function oQt(e,i){var t=e.l+i,n=wm(e,16),r=FA(e),s=So(e),o=So(e),l=So(e);e.l=t;var w={rfx:n,relId:r,loc:s,display:l};return o&&(w.Tooltip=o),w}},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:t4},551:{f:FA},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:Kjt},633:{T:1},634:{T:-1},635:{T:1,f:function $jt(e){var i={};i.iauthor=e.read_shift(4);var t=wm(e,16);return i.rfx=t.s,i.ref=Pn(t.s),e.l+=16,i}},636:{T:-1},637:{f:gGt},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:function LQt(e,i){return e.l+=10,{name:So(e)}}},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:function bQt(){}},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function Le(e,i,t,n){var r=i;if(!isNaN(r)){var s=n||(t||[]).length||0,o=e.next(4);o.write_shift(2,r),o.write_shift(2,s),s>0&&QN(t)&&e.push(t)}}function L4(e,i,t,n){var r=le(9);return K1(r,e,i),pit(t,n||"b",r),r}function Ent(e,i){i.forEach(function(t){var n=t[0].map(function(s){return s.t}).join("");if(n.length<=2048)return Le(e,28,g4(n,t[1],t[2]));Le(e,28,g4(n.slice(0,2048),t[1],t[2],n.length));for(var r=2048;r=0&&w<65536?Le(e,2,function G7t(e,i,t,n,r){var s=le(9);return K1(s,e,i,n||0,r||0),s.write_shift(2,t),s}(t,n,w,l,o)):isNaN(w)?Le(e,5,L4(t,n,36,"e")):isFinite(w)?Le(e,3,function U7t(e,i,t,n,r){var s=le(15);return K1(s,e,i,n||0,r||0),s.write_shift(8,t,"f"),s}(t,n,w,l,o)):Le(e,5,L4(t,n,7,"e")));case"b":case"e":return void Le(e,5,L4(t,n,i.v,i.t));case"s":case"str":return void Le(e,4,function $Kt(e,i,t){var n=le(8+2*t.length);return K1(n,e,i),n.write_shift(1,t.length),n.write_shift(t.length,t,"sbcs"),n.l255||L.e.r>=U){if(i.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:IV16384");L.e.c=Math.min(L.e.c,255),L.e.r=Math.min(L.e.c,U-1)}Le(n,2057,p4(0,16,i)),Le(n,13,yc(1)),Le(n,12,yc(100)),Le(n,15,_o(!0)),Le(n,17,_o(!1)),Le(n,16,Tm(.001)),Le(n,95,_o(!0)),Le(n,42,_o(!1)),Le(n,43,_o(!1)),Le(n,130,yc(1)),Le(n,128,function s7t(e){var i=le(8);return i.write_shift(4,0),i.write_shift(2,e[0]?e[0]+1:0),i.write_shift(2,e[1]?e[1]+1:0),i}([0,0])),Le(n,131,_o(!1)),Le(n,132,_o(!1)),E&&function sZt(e,i){if(i){var t=0;i.forEach(function(n,r){++t<=256&&n&&Le(e,125,function I7t(e,i){var t=le(12);t.write_shift(2,i),t.write_shift(2,i),t.write_shift(2,256*e.width),t.write_shift(2,0);var n=0;return e.hidden&&(n|=1),t.write_shift(1,n),t.write_shift(1,n=e.level||0),t.write_shift(2,0),t}(tD(r,n),r))})}}(n,s["!cols"]),Le(n,512,function YHt(e,i){var t=8!=i.biff&&i.biff?2:4,n=le(2*t+6);return n.write_shift(t,e.s.r),n.write_shift(t,e.e.r+1),n.write_shift(2,e.s.c),n.write_shift(2,e.e.c+1),n.write_shift(2,0),n}(L,i));var j=(((t||{}).Workbook||{}).WBProps||{}).date1904;E&&(s["!links"]=[]);for(var W=L.s.c;W<=L.e.c;++W)O[W]=xn(W);for(var Z=[],rt=[],st=L.s.r;st<=L.e.r;++st)for(w&&(rt=s["!data"][st]||[]),k=Un(st),W=L.s.c;W<=L.e.c;++W){D=O[W]+k;var yt=w?rt[W]:s[D];yt&&(aZt(n,yt,st,W,i,j),E&&yt.l&&s["!links"].push([D,yt.l]),yt.c&&Z.push([yt.c,st,W]))}var Tt=l.CodeName||l.name||r;return E?function qKt(e,i){var o,t=[],n=0,r=Co(),s=jc;i.forEach(function(w,E){var D="",k=w[0].map(function(st){return st.a&&!D&&(D=st.a),st.t}).join("");++jc;var O=le(150);O.write_shift(2,15),O.write_shift(2,61444),O.write_shift(4,150),O.write_shift(2,3234),O.write_shift(2,61450),O.write_shift(4,8),O.write_shift(4,jc),O.write_shift(4,2560),O.write_shift(2,227),O.write_shift(2,61451),O.write_shift(4,84),O.write_shift(2,128),O.write_shift(4,0),O.write_shift(2,139),O.write_shift(4,2),O.write_shift(2,191),O.write_shift(4,524296),O.write_shift(2,344),O.l+=4,O.write_shift(2,385),O.write_shift(4,134217808),O.write_shift(2,387),O.write_shift(4,134217808),O.write_shift(2,389),O.write_shift(4,268435700),O.write_shift(2,447),O.write_shift(4,1048592),O.write_shift(2,448),O.write_shift(4,134217809),O.write_shift(2,451),O.write_shift(4,268435700),O.write_shift(2,513),O.write_shift(4,134217809),O.write_shift(2,515),O.write_shift(4,268435700),O.write_shift(2,575),O.write_shift(4,196609),O.write_shift(2,959),O.write_shift(4,131072|(w[0].hidden?2:0)),O.l+=2,O.write_shift(2,61456),O.write_shift(4,18),O.write_shift(2,3),O.write_shift(2,w[2]+2),O.l+=2,O.write_shift(2,w[1]+1),O.l+=2,O.write_shift(2,w[2]+4),O.l+=2,O.write_shift(2,w[1]+5),O.l+=2,O.l+=2,O.write_shift(2,61457),O.l+=4,O.l=150,0==E?o=O:Le(r,236,O),n+=150;var L=le(52);L.write_shift(2,21),L.write_shift(2,18),L.write_shift(2,25),L.write_shift(2,jc),L.write_shift(2,0),L.l=22,L.write_shift(2,13),L.write_shift(2,22),L.write_shift(4,1651663474),L.write_shift(4,2503426821),L.write_shift(4,2150634280),L.write_shift(4,1768515844+256*jc),L.write_shift(2,0),L.write_shift(4,0),L.l+=4,Le(r,93,L);var U=le(8);U.l+=2,U.write_shift(2,61453),U.l+=4,Le(r,236,U),n+=8;var j=le(18);j.write_shift(2,18),j.l+=8,j.write_shift(2,k.length),j.write_shift(2,16),j.l+=4,Le(r,438,j);var W=le(1+k.length);W.write_shift(1,0),W.write_shift(k.length,k,"sbcs"),Le(r,60,W);var Z=le(16);Z.l+=8,Z.write_shift(2,k.length),Z.l+=6,Le(r,60,Z);var rt=le(12+D.length);rt.write_shift(2,w[1]),rt.write_shift(2,w[2]),rt.write_shift(2,0|(w[0].hidden?0:2)),rt.write_shift(2,jc),rt.write_shift(2,D.length),rt.write_shift(1,0),rt.write_shift(D.length,D,"sbcs"),rt.l++,t.push(rt)});var l=le(80);l.write_shift(2,15),l.write_shift(2,61442),l.write_shift(4,n+l.length-8),l.write_shift(2,16),l.write_shift(2,61448),l.write_shift(4,8),l.write_shift(4,i.length+1),l.write_shift(4,jc),l.write_shift(2,15),l.write_shift(2,61443),l.write_shift(4,n+48),l.write_shift(2,15),l.write_shift(2,61444),l.write_shift(4,40),l.write_shift(2,1),l.write_shift(2,61449),l.write_shift(4,16),l.l+=16,l.write_shift(2,2),l.write_shift(2,61450),l.write_shift(4,8),l.write_shift(4,s),l.write_shift(4,5),Le(e,236,o?Us([l,o]):l),e.push(r.end()),t.forEach(function(w){Le(e,28,w)}),xc.push([s,i.length+1,jc]),++jc}(n,Z):Ent(n,Z),E&&Le(n,574,function FHt(e){var i=le(18),t=1718;return e&&e.RTL&&(t|=64),i.write_shift(2,t),i.write_shift(4,0),i.write_shift(4,64),i.write_shift(4,0),i.write_shift(4,0),i}((o.Views||[])[0])),E&&(s["!merges"]||[]).length&&Le(n,229,function g7t(e){var i=le(2+8*e.length);i.write_shift(2,e.length);for(var t=0;t255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+e.SheetNames[t]+"' extends beyond column IV (255). Data may be lost.")}var s=i||{};switch(s.biff||2){case 8:case 5:return function cZt(e,i){var t=i||{},n=[];e&&!e.SSF&&(e.SSF=br(Ni)),e&&e.SSF&&(I0(),F1(e.SSF),t.revssf=DA(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),jc=1,xc=[],t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,H4(t),t.cellXfs=[],Cf(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});for(var r=0;r255||o.e.r>16383){if(n.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV16384");o.e.c=Math.min(o.e.c,255),o.e.r=Math.min(o.e.c,16383)}for(var E=(((r||{}).Workbook||{}).WBProps||{}).date1904,D=[],k=[],O=o.s.c;O<=o.e.c;++O)w[O]=xn(O);for(var L=o.s.r;L<=o.e.r;++L)for(s&&(D=i["!data"][L]||[]),l=Un(L),O=o.s.c;O<=o.e.c;++O){var U=s?D[O]:i[w[O]+l];U&&(QKt(e,U,L,O,n,E),U.c&&k.push([U.c,L,O]))}Ent(e,k)}(o,e.Sheets[e.SheetNames[r]],0,t,e),t._BIFF2FmtTable.forEach(function(l){t.biff<=3?Le(n,30,function jHt(e){var i=le(1+e.length);return i.write_shift(1,e.length),i.write_shift(e.length,e,"sbcs"),i}(l)):Le(n,1054,function XHt(e){var i=le(3+e.length);return i.l+=2,i.write_shift(1,e.length),i.write_shift(e.length,e,"sbcs"),i}(l))}),t.cellXfs.forEach(function(l){switch(t.biff){case 2:Le(n,67,function t7t(e){var i=le(4);return i.l+=2,i.write_shift(1,e.numFmtId),i.l++,i}(l));break;case 3:Le(n,579,_it(l));break;case 4:Le(n,1091,e7t(l))}}),delete t._BIFF2FmtTable,delete t.cellXfs,delete t._Fonts,n.push(o.end()),Le(n,10),n.end()}(e,i)}throw new Error("invalid type "+s.bookType+" for BIFF")}function Dnt(e,i,t,n){for(var r=e["!merges"]||[],s=[],o={},l=null!=e["!data"],w=i.s.c;w<=i.e.c;++w){for(var E=0,D=0,k=0;kt||r[k].s.c>w||r[k].e.r1&&(o.rowspan=E),D>1&&(o.colspan=D),n.editable?U=''+U+"":L&&(o["data-t"]=L&&L.t||"z",null!=L.v&&(o["data-v"]=B1(L.v instanceof Date?L.v.toISOString():L.v)),null!=L.z&&(o["data-z"]=L.z),L.l&&"#"!=(L.l.Target||"#").charAt(0)&&(U=''+U+"")),o.id=(n.id||"sjs")+"-"+O,s.push(ii("td",U,o))}}return""+s.join("")+""}var Mnt='SheetJS Table Export',Int="";function Pnt(e,i){var t=i||{},r=null!=t.footer?t.footer:Int,s=[null!=t.header?t.header:Mnt],o=Sa(e["!ref"]||"A1");if(s.push(function Rnt(e,i,t){return[].join("")+""}(0,0,t)),e["!ref"])for(var l=o.s.r;l<=o.e.r;++l)s.push(Dnt(e,o,l,t));return s.push(""+r),s.join("")}var pZt=function(){var e=["",'',"",'',"",'',"",""].join(""),i=""+e+"";return function(){return zs+i}}();function mZt(e,i){var t="number",n="",r={"style:name":i},s="",o=0;t:if((e=e.replace(/"[$]"/g,"$")).indexOf(";")>-1&&(console.error("Unsupported ODS Style Map exported. Using first branch of "+e),e=e.slice(0,e.indexOf(";"))),"@"!=e){if(e.indexOf(/\$/)>-1&&(t="currency"),'"'==e[o]){for(s="";'"'!=e[++o]||'"'==e[++o];)s+=e[o];"*"==e[1+--o]?(o++,n+=""+_n(s.replace(/""/g,'"'))+""):n+=""+_n(s.replace(/""/g,'"'))+"",e=e.slice(o+1),o=0}var l=e.match(/# (\?+)\/(\?+)/);if(l)n+=ii("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":l[1].length,"number:max-denominator-value":Math.max(+l[1].replace(/./g,"9"),+l[2].replace(/./g,"9"))});else if(l=e.match(/# (\?+)\/(\d+)/))n+=ii("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":l[1].length,"number:denominator-value":+l[2]});else if(l=e.match(/\b(\d+)(|\.\d+)%/))t="percentage",n+=ii("number:number",null,{"number:decimal-places":l[2]&&l.length-1||0,"number:min-decimal-places":l[2]&&l.length-1||0,"number:min-integer-digits":l[1].length})+"%";else{var w=!1;if(["y","m","d"].indexOf(e[0])>-1){t="date";e:for(;o";break;case"yyy":case"yyyy":n+='';break;case"mmmmm":console.error("ODS has no equivalent of format |mmmmm|");case"m":case"mm":case"mmm":case"mmmm":n+='';break;case"d":case"dd":n+='';break;case"ddd":case"dddd":n+=''}break;case'"':for(;'"'!=e[++o]||'"'==e[++o];)s+=e[o];--o,n+=""+_n(s.slice(1).replace(/""/g,'"'))+"";break;case"\\":n+=""+_n(s=e[++o])+"";break;case"/":case":":n+=""+_n(s)+"";break;default:console.error("unrecognized character "+s+" in ODF format "+e)}if(!w)break t;e=e.slice(o+1),o=0}if(e.match(/^\[?[hms]/))for("number"==t&&(t="time"),e.match(/\[/)&&(e=e.replace(/[\[\]]/g,""),r["number:truncate-on-overflow"]="false");o';break;case"m":case"mm":n+='';break;case"s":case"ss":if("."==e[o+1])do{s+=e[o+1],++o}while("0"==e[o+1]);n+='"}break;case'"':for(;'"'!=e[++o]||'"'==e[++o];)s+=e[o];--o,n+=""+_n(s.slice(1).replace(/""/g,'"'))+"";break;case"/":case":":n+=""+_n(s)+"";break;case"a":if("a/p"==e.slice(o,o+3).toLowerCase()){n+="",o+=2;break}if("am/pm"==e.slice(o,o+5).toLowerCase()){n+="",o+=4;break}default:console.error("unrecognized character "+s+" in ODF format "+e)}else{if(e.indexOf(/\$/)>-1&&(t="currency"),"$"==e[0]&&(n+='$',e=e.slice(1),o=0),'"'==e[o=0]){for(;'"'!=e[++o]||'"'==e[++o];)s+=e[o];"*"==e[1+--o]?(o++,n+=""+_n(s.replace(/""/g,'"'))+""):n+=""+_n(s.replace(/""/g,'"'))+"",e=e.slice(o+1),o=0}var D=e.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i);if(D&&D[0]){var k=D[1].replace(/,/g,"");n+="-1?' number:grouping="true"':"")+(D[2]&&' number:decimal-places="'+(D[2].length-1)+'"'||' number:decimal-places="0"')+(D[3]&&D[3].indexOf("+")>-1?' number:forced-exponent-sign="true"':"")+(D[3]?' number:min-exponent-digits="'+D[3].match(/0+/)[0].length+'"':"")+">",o=D.index+D[0].length}else console.error("Could not find numeric part of "+e);if('"'==e[o]){for(s="";'"'!=e[++o]||'"'==e[++o];)s+=e[o];--o,n+=""+_n(s.replace(/""/g,'"'))+""}}}}else t="text",n="";return n?ii("number:"+t+"-style",n,r):(console.error("Could not generate ODS number format for |"+e+"|"),"")}function Unt(e,i,t){for(var n=[],r=0;r\n"+n.map(function(o){var l=(-1==t?"$":"")+dnt(o.Ref);return" "+ii("table:named-range",null,{"table:name":o.Name,"table:cell-range-address":l,"table:base-cell-address":l.replace(/[\.][^\.]*$/,".$A$1")})}).join("\n")+"\n \n":""}var znt=function(){var e=function(r,s){return _n(r).replace(/ +/g,function(o){return''}).replace(/\t/g,"").replace(/\n/g,s?"":"").replace(/^ /,"").replace(/ $/,"")},i=" \n",t=function(r,s,o,l,w,E){var D=[];D.push(' \n');var k=0,O=0,L=Sa(r["!ref"]||"A1"),U=r["!merges"]||[],j=0,W=null!=r["!data"];if(r["!cols"])for(O=0;O<=L.e.c;++O)D.push(" \n");var rt=r["!rows"]||[];for(k=0;k\n");for(;k<=L.e.r;++k){for(D.push(" \n"),O=0;OO||U[j].s.r>k||U[j].e.c\n");else{var It=Pn({r:k,c:O}),ft=W?(r["!data"][k]||[])[O]:r[It];if(ft&&ft.f&&(yt["table:formula"]=_n(WYt(ft.f)),ft.F&&ft.F.slice(0,It.length)==It)){var ht=Sa(ft.F);yt["table:number-matrix-columns-spanned"]=ht.e.c-ht.s.c+1,yt["table:number-matrix-rows-spanned"]=ht.e.r-ht.s.r+1}if(ft){switch(ft.t){case"b":Tt=ft.v?"TRUE":"FALSE",yt["office:value-type"]="boolean",yt["office:boolean-value"]=ft.v?"true":"false";break;case"n":Tt=ft.w||String(ft.v||0),yt["office:value-type"]="float",yt["office:value"]=ft.v||0;break;case"s":case"str":Tt=null==ft.v?"":ft.v,yt["office:value-type"]="string";break;case"d":Tt=ft.w||ps(ft.v,E).toISOString(),yt["office:value-type"]="date",yt["office:date-value"]=ps(ft.v,E).toISOString(),yt["table:style-name"]="ce1";break;default:D.push(i);continue}var mt=e(Tt);if(ft.l&&ft.l.Target){var wt=ft.l.Target;"#"!=(wt="#"==wt.charAt(0)?"#"+dnt(wt.slice(1)):wt).charAt(0)&&!wt.match(/^\w+:/)&&(wt="../"+wt),mt=ii("text:a",mt,{"xlink:href":wt.replace(/&/g,"&")})}w[ft.z]&&(yt["table:style-name"]="ce"+w[ft.z].slice(1));var Ct=ii("text:p",mt,{});if(ft.c){for(var _t="",Dt="",Ue={},Te=0;Te"+e(ft.c[Te].t)+"";ft.c.hidden||(Ue["office:display"]=!0),Ct=ii("office:annotation",Dt,Ue)+Ct}D.push(" "+ii("table:table-cell",Ct,yt)+"\n")}else D.push(i)}}D.push(" \n")}return(s.Workbook||{}).Names&&D.push(Unt(s.Workbook.Names,0,o)),D.push(" \n"),D.join("")};return function(s,o){var l=[zs],w=V1({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),E=V1({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});"fods"==o.bookType?(l.push("\n"),l.push($et().replace(/]*?>/,"").replace(/<\/office:document-meta>/,"")+"\n")):l.push("\n");var D=function(r,s){r.push(" \n");var o=0;s.SheetNames.map(function(D){return s.Sheets[D]}).forEach(function(D){if(D&&D["!cols"])for(var k=0;k\n'),r.push(' \n'),r.push(" \n"),++o}});var l=0;s.SheetNames.map(function(D){return s.Sheets[D]}).forEach(function(D){if(D&&D["!rows"])for(var k=0;k\n'),r.push(' \n'),r.push(" \n"),++l}}),r.push(' \n'),r.push(' \n'),r.push(" \n"),r.push(' \n'),r.push(' \n'),r.push(" /\n"),r.push(' \n'),r.push(" /\n"),r.push(" \n"),r.push(" \n");var w={},E=69;return s.SheetNames.map(function(D){return s.Sheets[D]}).forEach(function(D){if(D){var k=null!=D["!data"];if(D["!ref"])for(var O=Sa(D["!ref"]),L=0;L<=O.e.r;++L)for(var U=0;U<=O.e.c;++U){var j=k?(D["!data"][L]||[])[U]:D[Pn({r:L,c:U})];if(j&&j.z&&"general"!=j.z.toLowerCase()&&!w[j.z]){var W=mZt(j.z,"N"+E);W&&(w[j.z]="N"+E,++E,r.push(W+"\n"))}}}}),r.push(' \n'),rs(w).forEach(function(D){r.push('\n')}),r.push(" \n"),w}(l,s);l.push(" \n"),l.push(" \n"),((s.Workbook||{}).WBProps||{}).date1904&&l.push(' \n \n \n');for(var k=0;k!=s.SheetNames.length;++k)l.push(t(s.Sheets[s.SheetNames[k]],s,k,0,D,((s.Workbook||{}).WBProps||{}).date1904));return(s.Workbook||{}).Names&&l.push(Unt(s.Workbook.Names,0,-1)),l.push(" \n"),l.push(" \n"),l.push("fods"==o.bookType?"":""),l.join("")}}();function Gnt(e,i){if("fods"==i.bookType)return znt(e,i);var t=VN(),n="",r=[],s=[];return yn(t,n="mimetype","application/vnd.oasis.opendocument.spreadsheet"),yn(t,n="content.xml",znt(e,i)),r.push([n,"text/xml"]),s.push([n,"ContentFile"]),yn(t,n="styles.xml",pZt(e,i)),r.push([n,"text/xml"]),s.push([n,"StylesFile"]),yn(t,n="meta.xml",zs+$et()),r.push([n,"text/xml"]),s.push([n,"MetadataFile"]),yn(t,n="manifest.rdf",function VGt(e){var i=[zs];i.push('\n');for(var t=0;t!=e.length;++t)i.push(Yet(e[t][0],e[t][1])),i.push(BGt("",e[t][0]));return i.push(Yet("","Document","pkg")),i.push(""),i.join("")}(s)),r.push([n,"application/rdf+xml"]),yn(t,n="META-INF/manifest.xml",function NGt(e){var i=[zs];i.push('\n'),i.push(' \n');for(var t=0;t\n');return i.push(""),i.join("")}(r)),t}var Hs=function(){try{return typeof Uint8Array>"u"||typeof Uint8Array.prototype.subarray>"u"?"slice":typeof Buffer<"u"?typeof Buffer.prototype.subarray>"u"?"slice":("function"==typeof Buffer.from?Buffer.from([72,62]):new Buffer([72,62]))instanceof Uint8Array?"subarray":"slice":"subarray"}catch{return"slice"}}();function Jh(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Xc(e){return typeof TextDecoder<"u"?(new TextDecoder).decode(e):wr(ku(e))}function Jo(e){return typeof TextEncoder<"u"?(new TextEncoder).encode(e):Qo(Lu(e))}function Sf(e){for(var i=0,t=0;t=128&&(n|=(127&e[t])<<7,e[t++]<128||(n|=(127&e[t])<<14,e[t++]<128)||(n|=(127&e[t])<<21,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,28),++t,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,35),++t,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,42),++t,e[t++]<128)))break t;return i.l=t,n}function Mi(e){var i=new Uint8Array(7);i[0]=127&e;var t=1;t:if(e>127){if(i[t-1]|=128,i[t]=e>>7&127,++t,e<=16383||(i[t-1]|=128,i[t]=e>>14&127,++t,e<=2097151)||(i[t-1]|=128,i[t]=e>>21&127,++t,e<=268435455)||(i[t-1]|=128,i[t]=e/256>>>21&127,++t,e<=34359738367)||(i[t-1]|=128,i[t]=e/65536>>>21&127,++t,e<=4398046511103))break t;i[t-1]|=128,i[t]=e/16777216>>>21&127,++t}return i[Hs](0,t)}function Hnt(e){for(var i={l:0},t=[];i.l=128;);o=e[Hs](t.l,l),t.l=l;break;case 1:o=e[Hs](l,l+8),t.l=l+8;break;case 2:var w=hw(e,t);o=e[Hs](t.l,t.l+w),t.l+=w;break;case 5:o=e[Hs](l,l+4),t.l=l+4;break;default:throw new Error("PB Type ".concat(s," for Field ").concat(r," at offset ").concat(n))}var E={data:o,type:s};null==i[r]&&(i[r]=[]),i[r].push(E)}return i}function Li(e){var i=[];return e.forEach(function(t,n){0!=n&&t.forEach(function(r){r.data&&(i.push(Mi(8*n+r.type)),2==r.type&&i.push(Mi(r.data.length)),i.push(r.data))})}),Sf(i)}function Rm(e,i){return e?.map(function(t){return i(t.data)})||[]}function dw(e){for(var i,t=[],n={l:0};n.l>>0>0),t.push(o)}return t}function z0(e){var i=[];return e.forEach(function(t){var n=[[],[{data:Mi(t.id),type:0}],[]];null!=t.merge&&(n[3]=[{data:Mi(+!!t.merge),type:0}]);var r=[];t.messages.forEach(function(o){r.push(o.data),o.meta[3]=[{type:0,data:Mi(o.data.length)}],n[2].push({data:Li(o.meta),type:2})});var s=Li(n);i.push(Mi(s.length)),i.push(s),r.forEach(function(o){return i.push(o)})}),Sf(i)}function yZt(e,i){if(0!=e)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var t={l:0},n=hw(i,t),r=[],s=t.l;s>2&7),E=(224&i[s++])<<3,E|=i[s++]):(D=1+(i[s++]>>2),2==o?(E=i[s]|i[s+1]<<8,s+=2):(E=(i[s]|i[s+1]<<8|i[s+2]<<16|i[s+3]<<24)>>>0,s+=4)),0==E)throw new Error("Invalid offset 0");for(var k=r.length-1,O=E;k>=0&&O>=r[k].length;)O-=r[k].length,--k;if(k<0){if(0!=O)throw new Error("Invalid offset beyond length");O=r[k=0].length}if(D0&&(r.push(r[k][Hs](r[k].length-O)),D-=O),++k;D>=r[k].length;)r.push(r[k]),D-=r[k].length,++k;D&&r.push(r[k][Hs](0,D))}r.length>25&&(r=[Sf(r)])}else{var l=i[s++]>>2;if(l<60)++l;else{var w=l-59;l=i[s],w>1&&(l|=i[s+1]<<8),w>2&&(l|=i[s+2]<<16),w>3&&(l|=i[s+3]<<24),l>>>=0,l++,s+=w}r.push(i[Hs](s,s+l)),s+=l}}for(var L=0,U=0;U>8&255]))):n<=16777216?(o+=4,i.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(o+=5,i.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),i.push(e[Hs](t,t+n)),o+=n,r[0]=0,r[1]=255&o,r[2]=o>>8&255,r[3]=o>>16&255,t+=n}return Sf(i)}function N4(e,i){var t=new Uint8Array(32),n=Jh(t),r=12,s=0;switch(t[0]=5,e.t){case"n":if(e.z&&Ul(e.z)){t[1]=5,n.setFloat64(r,(Yh(e.v+1462).getTime()-Date.UTC(2001,0,1))/1e3,!0),s|=4,r+=8;break}t[1]=2,function vZt(e,i,t){var n=Math.floor(0==t?0:Math.LOG10E*Math.log(Math.abs(t)))+6176-16,r=t/Math.pow(10,n-6176);e[i+15]|=n>>7,e[i+14]|=(127&n)<<1;for(var s=0;r>=1;++s,r/=256)e[i+s]=255&r;e[i+15]|=t>=0?0:128}(t,r,e.v),s|=1,r+=16;break;case"b":t[1]=6,n.setFloat64(r,e.v?1:0,!0),s|=2,r+=8;break;case"s":var o=null==e.v?"":String(e.v);if(e.l){var l=i.rsst.findIndex(function(E){var D;return E.v==o&&E.l==(null==(D=e.l)?void 0:D.Target)});-1==l&&(i.rsst[l=i.rsst.length]={v:o,l:e.l.Target}),t[1]=9,n.setUint32(r,l,!0),s|=16,r+=4}else{var w=i.sst.indexOf(o);-1==w&&(i.sst[w=i.sst.length]=o),t[1]=3,n.setUint32(r,w,!0),s|=8,r+=4}break;case"d":t[1]=5,n.setFloat64(r,(e.v.getTime()-Date.UTC(2001,0,1))/1e3,!0),s|=4,r+=8;break;case"z":t[1]=0;break;default:throw"unsupported cell type "+e.t}return e.c&&(i.cmnt.push(function _Zt(e){for(var i={a:"",t:"",replies:[]},t=0;t-1,r={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};H4(i=i||{});var s=VN(),o="",l=0;if(i.cellXfs=[],Cf(i.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),yn(s,o="docProps/core.xml",Ket(e.Props,i)),r.coreprops.push(o),vr(i.rels,2,o,wn.CORE_PROPS),o="docProps/app.xml",!e.Props||!e.Props.SheetNames)if(e.Workbook&&e.Workbook.Sheets){for(var w=[],E=0;E0&&(yn(s,o="docProps/custom.xml",tit(e.Custprops)),r.custprops.push(o),vr(i.rels,4,o,wn.CUST_PROPS));var D=["SheetJ5"];for(i.tcid=0,l=1;l<=e.SheetNames.length;++l){var k={"!id":{}},O=e.Sheets[e.SheetNames[l-1]];if(yn(s,o="xl/worksheets/sheet"+l+"."+t,x$t(l-1,i,e,k)),r.sheets.push(o),vr(i.wbrels,-1,"worksheets/sheet"+l+"."+t,wn.WS[0]),O){var U=O["!comments"],j=!1,W="";if(U&&U.length>0){var Z=!1;U.forEach(function(rt){rt[1].forEach(function(st){1==st.T&&(Z=!0)})}),Z&&(yn(s,W="xl/threadedComments/threadedComment"+l+".xml",$it(U,D,i)),r.threadedcomments.push(W),vr(k,-1,"../threadedComments/threadedComment"+l+".xml",wn.TCMNT)),yn(s,W="xl/comments"+l+"."+t,jjt(U)),r.comments.push(W),vr(k,-1,"../comments"+l+"."+t,wn.CMNT),j=!0}O["!legacy"]&&j&&yn(s,"xl/drawings/vmlDrawing"+l+".vml",Xit(l,O["!comments"])),delete O["!comments"],delete O["!legacy"]}k["!id"].rId1&&yn(s,Y1(o),L0(k))}return null!=i.Strings&&i.Strings.length>0&&(yn(s,o="xl/sharedStrings."+t,function sWt(e,i){if(!i.bookSST)return"";var t=[zs];t[t.length]=ii("sst",null,{xmlns:gm[0],count:e.Count,uniqueCount:e.Unique});for(var n=0;n!=e.length;++n)if(null!=e[n]){var r=e[n],s="";r.r?s+=r.r:(s+=""),t[t.length]=s+=""}return t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}(i.Strings,i)),r.strs.push(o),vr(i.wbrels,-1,"sharedStrings."+t,wn.SST)),yn(s,o="xl/workbook."+t,function XQt(e){var i=[zs];i[i.length]=ii("workbook",null,{xmlns:gm[0],"xmlns:r":Ta.r});var t=e.Workbook&&(e.Workbook.Names||[]).length>0,n={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(R4.forEach(function(l){null!=e.Workbook.WBProps[l[0]]&&e.Workbook.WBProps[l[0]]!=l[1]&&(n[l[0]]=e.Workbook.WBProps[l[0]])}),e.Workbook.WBProps.CodeName&&(n.codeName=e.Workbook.WBProps.CodeName,delete n.CodeName)),i[i.length]=ii("workbookPr",null,n);var r=e.Workbook&&e.Workbook.Sheets||[],s=0;if(r&&r[0]&&r[0].Hidden){for(i[i.length]="",s=0;s!=e.SheetNames.length&&r[s]&&r[s].Hidden;++s);s==e.SheetNames.length&&(s=0),i[i.length]='',i[i.length]=""}for(i[i.length]="",s=0;s!=e.SheetNames.length;++s){var o={name:_n(e.SheetNames[s].slice(0,31))};if(o.sheetId=""+(s+1),o["r:id"]="rId"+(s+1),r[s])switch(r[s].Hidden){case 1:o.state="hidden";break;case 2:o.state="veryHidden"}i[i.length]=ii("sheet",null,o)}return i[i.length]="",t&&(i[i.length]="",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(l){var w={name:l.Name};l.Comment&&(w.comment=l.Comment),null!=l.Sheet&&(w.localSheetId=""+l.Sheet),l.Hidden&&(w.hidden="1"),l.Ref&&(i[i.length]=ii("definedName",_n(l.Ref),w))}),i[i.length]=""),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}(e)),r.workbooks.push(o),vr(i.rels,1,o,wn.WB),yn(s,o="xl/theme/theme1.xml",C4(e.Themes,i)),r.themes.push(o),vr(i.wbrels,-1,"theme/theme1.xml",wn.THEME),yn(s,o="xl/styles."+t,function XWt(e,i){var n,t=[zs,ii("styleSheet",null,{xmlns:gm[0],"xmlns:vt":Ta.vt})];return e.SSF&&null!=(n=function GWt(e){var i=[""];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(t){for(var n=t[0];n<=t[1];++n)null!=e[n]&&(i[i.length]=ii("numFmt",null,{numFmtId:n,formatCode:_n(e[n])}))}),1===i.length?"":(i[i.length]="",i[0]=ii("numFmts",null,{count:i.length-2}).replace("/>",">"),i.join(""))}(e.SSF))&&(t[t.length]=n),t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',(n=function WWt(e){var i=[];return i[i.length]=ii("cellXfs",null),e.forEach(function(t){i[i.length]=ii("xf",null,t)}),i[i.length]="",2===i.length?"":(i[0]=ii("cellXfs",null,{count:i.length-2}).replace("/>",">"),i.join(""))}(i.cellXfs))&&(t[t.length]=n),t[t.length]='',t[t.length]='',t[t.length]='',t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}(e,i)),r.styles.push(o),vr(i.wbrels,-1,"styles."+t,wn.STY),e.vbaraw&&n&&(yn(s,o="xl/vbaProject.bin",e.vbaraw),r.vba.push(o),vr(i.wbrels,-1,"vbaProject.bin",wn.VBA)),yn(s,o="xl/metadata."+t,function Ljt(){var e=[zs];return e.push('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'),e.join("")}()),r.metadata.push(o),vr(i.wbrels,-1,"metadata."+t,wn.XLMETA),D.length>1&&(yn(s,o="xl/persons/person.xml",Qit(D)),r.people.push(o),vr(i.wbrels,-1,"persons/person.xml",wn.PEOPLE)),yn(s,"[Content_Types].xml",Xet(r,i)),yn(s,"_rels/.rels",L0(i.rels)),yn(s,"xl/_rels/workbook.xml.rels",L0(i.wbrels)),delete i.revssf,delete i.ssf,s}function trt(e,i){switch(i.type){case"base64":case"binary":break;case"buffer":case"array":i.type="";break;case"file":return O1(i.file,Vi.write(e,{type:Rn?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+i.bookType+"' files");default:throw new Error("Unrecognized type "+i.type)}return Vi.write(e,i)}function QZt(e,i){switch(i.bookType){case"ods":return Gnt(e,i);case"numbers":return function kZt(e,i){if(!i||!i.numbers)throw new Error("Must pass a `numbers` option -- check the README");var t=Vi.read(i.numbers,{type:"base64"}),n=function PZt(e){var i={},t=[];return e.FileIndex.map(function(n,r){return[n,e.FullPaths[r]]}).forEach(function(n){var r=n[0],s=n[1];2==r.type&&r.name.match(/\.iwa/)&&0==r.content[0]&&dw(fw(r.content)).forEach(function(o){t.push(o.id),i[o.id]={deps:[],location:s,type:zn(o.messages[0].meta[1][0].data)}})}),e.FileIndex.forEach(function(n){n.name.match(/\.iwa/)&&0==n.content[0]&&dw(fw(n.content)).forEach(function(r){r.messages.forEach(function(s){[5,6].forEach(function(o){s.meta[o]&&s.meta[o].forEach(function(l){i[r.id].deps.push(zn(l.data))})})})})}),i}(t),r=Uu(t,n,1);if(null==r)throw"Could not find message ".concat(1," in Numbers template");var s=Rm(mi(r.messages[0].data)[1],Gn);if(s.length>1)throw new Error("Template NUMBERS file must have exactly one sheet");return e.SheetNames.forEach(function(o,l){l>=1&&(function OZt(e,i,t){var n=-1,r=-1,s={};Ar(e,i,1,function(w,E){var D=mi(w.messages[0].data);n=Gn(mi(w.messages[0].data)[1][0].data),r=Vu({deps:[1],location:i[n].location,type:2},i),s[n]=r,Ro(w,r),D[1].push({type:2,data:Io(r)});var k=Uu(e,i,n);k.id=r,i[1].location==i[r].location?E.push(k):Ar(e,i,r,function(O,L){return L.push(k)}),w.messages[0].data=Li(D)});var o=-1;Ar(e,i,r,function(w,E){for(var D=mi(w.messages[0].data),k=3;k<=69;++k)delete D[k];var O=Rm(D[2],Gn);O.forEach(function(U){return qh(w,U)}),o=Vu({deps:[r],location:i[O[0]].location,type:i[O[0]].type},i),Ro(w,o),s[O[0]]=o,D[2]=[{type:2,data:Io(o)}];var L=Uu(e,i,O[0]);L.id=o,i[O[0]].location==i[r].location?E.push(L):(Ar(e,i,2,function(U){var j=mi(U.messages[0].data);ml(j,i,r,o),U.messages[0].data=Li(j)}),Ar(e,i,o,function(U,j){return j.push(L)})),w.messages[0].data=Li(D)});var l=-1;Ar(e,i,o,function(w,E){for(var D=mi(w.messages[0].data),k=mi(D[1][0].data),O=3;O<=69;++O)delete k[O];var L=Gn(k[2][0].data);k[2][0].data=Io(s[L]),D[1][0].data=Li(k);var U=Gn(D[2][0].data);qh(w,U),Ro(w,l=Vu({deps:[o],location:i[U].location,type:i[U].type},i)),s[U]=l,D[2][0].data=Io(l);var j=Uu(e,i,U);j.id=l,i[o].location==i[l].location?E.push(j):Ar(e,i,l,function(W,Z){return Z.push(j)}),w.messages[0].data=Li(D)}),Ar(e,i,l,function(w,E){var D,k,O=mi(w.messages[0].data),U=Xc(O[1][0].data).replace(/-[A-Z0-9]*/,"-".concat(("0000"+t.toString(16)).slice(-4)));if(O[1][0].data=Jo(U),[12,13,29,31,32,33,39,44,47,81,82,84].forEach(function(Tt){return delete O[Tt]}),O[45]){var W=Gn(mi(O[45][0].data)[1][0].data);qh(w,W),delete O[45]}O[70]&&(null==(D=mi(O[70][0].data)[2])||D.forEach(function(Tt){var It=mi(Tt.data);[2,3].map(function(ft){return It[ft][0]}).forEach(function(ft){var ht=mi(ft.data);if(ht[8]){var mt=Gn(ht[8][0].data);qh(w,mt)}})}),delete O[70]),[46,30,34,35,36,38,48,49,60,61,62,63,64,71,72,73,74,75,85,86,87,88,89].forEach(function(Tt){if(O[Tt]){var It=Gn(O[Tt][0].data);delete O[Tt],qh(w,It)}});var rt=mi(O[4][0].data);[2,4,5,6,11,12,13,15,16,17,18,19,20,21,22].forEach(function(Tt){var It;if(null!=(It=rt[Tt])&&It[0]){var ft=Gn(rt[Tt][0].data),ht=Vu({deps:[l],location:i[ft].location,type:i[ft].type},i);qh(w,ft),Ro(w,ht),s[ft]=ht;var mt=Uu(e,i,ft);if(mt.id=ht,i[ft].location==i[l].location)E.push(mt);else{i[ht].location=i[ft].location.replace(ft.toString(),ht.toString()),i[ht].location==i[ft].location&&(i[ht].location=i[ht].location.replace(/\.iwa/,"-".concat(ht,".iwa"))),Vi.utils.cfb_add(e,i[ht].location,G0(z0([mt])));var wt=i[ht].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");Ar(e,i,2,function(Ct){var _t=mi(Ct.messages[0].data);z4(_t,ht,wt),ml(_t,i,l,ht),Ct.messages[0].data=Li(_t)})}rt[Tt][0].data=Io(ht)}});var st=mi(rt[1][0].data);null==(k=st[2])||k.forEach(function(Tt){var It=Gn(Tt.data),ft=Vu({deps:[l],location:i[It].location,type:i[It].type},i);qh(w,It),Ro(w,ft),s[It]=ft;var ht=Uu(e,i,It);if(ht.id=ft,i[It].location==i[l].location)E.push(ht);else{i[ft].location=i[It].location.replace(It.toString(),ft.toString()),i[ft].location==i[It].location&&(i[ft].location=i[ft].location.replace(/\.iwa/,"-".concat(ft,".iwa"))),Vi.utils.cfb_add(e,i[ft].location,G0(z0([ht])));var mt=i[ft].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");Ar(e,i,2,function(wt){var Ct=mi(wt.messages[0].data);z4(Ct,ft,mt),ml(Ct,i,l,ft),wt.messages[0].data=Li(Ct)})}Tt.data=Io(ft)}),rt[1][0].data=Li(st);var yt=mi(rt[3][0].data);yt[1].forEach(function(Tt){var It=mi(Tt.data),ft=Gn(It[2][0].data),ht=s[ft];if(!s[ft]){ht=Vu({deps:[l],location:"",type:i[ft].type},i),i[ht].location="Root Entry/Index/Tables/Tile-".concat(ht,".iwa"),s[ft]=ht;var mt=Uu(e,i,ft);mt.id=ht,qh(w,ft),Ro(w,ht),Vi.utils.cfb_add(e,"/Index/Tables/Tile-".concat(ht,".iwa"),G0(z0([mt]))),Ar(e,i,2,function(wt){var Ct=mi(wt.messages[0].data);Ct[3].push({type:2,data:Li([[],[{type:0,data:Mi(ht)}],[{type:2,data:Jo("Tables/Tile")}],[{type:2,data:Jo("Tables/Tile-".concat(ht))}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:Mi(0)}],[],[{type:0,data:Mi(0)}]])}),Ct[1]=[{type:0,data:Mi(Math.max(ht+1,zn(Ct[1][0].data)))}],ml(Ct,i,l,ht),wt.messages[0].data=Li(Ct)})}It[2][0].data=Io(ht),Tt.data=Li(It)}),rt[3][0].data=Li(yt),O[4][0].data=Li(rt),w.messages[0].data=Li(O)})}(t,n,l+1),r=Uu(t,n,1),s=Rm(mi(r.messages[0].data)[1],Gn)),function LZt(e,i,t,n,r,s){var o=[];Ar(e,i,s,function(E){var D=mi(E.messages[0].data);D[1]=[{type:2,data:Jo(n)}],o=Rm(D[2],Gn),E.messages[0].data=Li(D)});var w=Gn(mi(Uu(e,i,o[0]).messages[0].data)[2][0].data);Ar(e,i,w,function(E,D){return function NZt(e,i,t,n,r,s){if(!t["!ref"])throw new Error("Cannot export empty sheet to NUMBERS");var o=Sa(t["!ref"]);o.s.r=o.s.c=0;var l=!1;o.e.c>999&&(l=!0,o.e.c=999),o.e.r>999999&&(l=!0,o.e.r=999999),l&&console.error("Truncating to ".concat(bn(o)));var w=[];if(t["!data"])w=t["!data"];else{for(var E=[],D=0;D<=o.e.c;++D)E[D]=xn(D);for(var k=0;k<=o.e.r;++k){w[k]=[];var O=""+(k+1);for(D=0;D<=o.e.c;++D){var L=t[E[D]+O];L&&(w[k][D]=L)}}}var U={cmnt:[{a:"~54ee77S~",t:"... the people who are crazy enough to think they can change the world, are the ones who do."}],ferr:[],fmla:[],nfmt:[],ofmt:[],rsst:[{v:"~54ee77S~",l:"https://sheetjs.com/"}],sst:["~Sh33tJ5~"]},j=mi(n.messages[0].data);j[6][0].data=Mi(o.e.r+1),j[7][0].data=Mi(o.e.c+1),delete j[46];var W=mi(j[4][0].data),Z=Gn(mi(W[1][0].data)[2][0].data);Ar(e,i,Z,function(ee,Ne){var De,fi=mi(ee.messages[0].data);if(null!=(De=fi?.[2])&&De[0])for(var vi=0;vi1){var ze=Gn(W[19][0].data),Me={},Ii=0;Ar(e,i,ze,function(ee){var Ne=mi(ee.messages[0].data);Ne[3]=[],U.cmnt.forEach(function(De,fi){if(0!=fi){var vi=[];De.replies&&De.replies.forEach(function(Qt){Me[Qt.a||""]||(Me[Qt.a||""]=km(e,212,[[],[{type:2,data:Jo(Qt.a||"")}],[{type:2,data:Ynt(++Ii)}],[],[{type:0,data:Mi(0)}]],"/Index/Tables/DataList",i));var $t=Me[Qt.a||""],Yt=km(e,3056,[[],[{type:2,data:Jo(Qt.t||"")}],[{type:2,data:Li([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:Io($t)}]],"/Index/Tables/DataList",i);Ar(e,i,Yt,function(Ae){return Ro(Ae,$t)}),vi.push(Yt),Ar(e,i,2,function(Ae){var Ft=mi(Ae.messages[0].data);ml(Ft,i,Yt,$t),Ae.messages[0].data=Li(Ft)})}),Me[De.a||""]||(Me[De.a||""]=km(e,212,[[],[{type:2,data:Jo(De.a||"")}],[{type:2,data:Ynt(++Ii)}],[],[{type:0,data:Mi(0)}]],"/Index/Tables/DataList",i));var hi=Me[De.a||""],Ot=km(e,3056,[[],[{type:2,data:Jo(De.t||"")}],[{type:2,data:Li([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:Io(hi)}],vi.map(function(Qt){return{type:2,data:Io(Qt)}}),[{type:2,data:Li([[],[{type:0,data:Mi(fi)}],[{type:0,data:Mi(0)}]])}]],"/Index/Tables/DataList",i);Ar(e,i,Ot,function(Qt){Ro(Qt,hi),vi.forEach(function($t){return Ro(Qt,$t)})}),Ne[3].push({type:2,data:Li([[],[{type:0,data:Mi(fi)}],[{type:0,data:Mi(1)}],[],[],[],[],[],[],[],[{type:2,data:Io(Ot)}]])}),Ro(ee,Ot),Ar(e,i,2,function(Qt){var $t=mi(Qt.messages[0].data);ml($t,i,ze,Ot),ml($t,i,Ot,hi),vi.length&&ml($t,i,Ot,vi),Qt.messages[0].data=Li($t)})}}),Ne[2][0].data=Mi(U.cmnt.length+1),ee.messages[0].data=Li(Ne)})}j[4][0].data=Li(W),n.messages[0].data=Li(j)}(e,i,t,E,D,w)})}(t,n,e.Sheets[o],o,0,s[l])}),t}(e,i);case"xlsb":return function HZt(e,i){e&&!e.SSF&&(e.SSF=br(Ni)),e&&e.SSF&&(I0(),F1(e.SSF),i.revssf=DA(e.SSF),i.revssf[e.SSF[65535]]=0,i.ssf=e.SSF),i.rels={},i.wbrels={},i.Strings=[],i.Strings.Count=0,i.Strings.Unique=0,aw?i.revStrings=new Map:(i.revStrings={},i.revStrings.foo=[],delete i.revStrings.foo);var t="bin",r={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};H4(i=i||{});var s=VN(),o="",l=0;if(i.cellXfs=[],Cf(i.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),yn(s,o="docProps/core.xml",Ket(e.Props,i)),r.coreprops.push(o),vr(i.rels,2,o,wn.CORE_PROPS),o="docProps/app.xml",!e.Props||!e.Props.SheetNames)if(e.Workbook&&e.Workbook.Sheets){for(var w=[],E=0;E0&&(yn(s,o="docProps/custom.xml",tit(e.Custprops)),r.custprops.push(o),vr(i.rels,4,o,wn.CUST_PROPS));var D=["SheetJ5"];for(i.tcid=0,l=1;l<=e.SheetNames.length;++l){var k={"!id":{}},O=e.Sheets[e.SheetNames[l-1]];if(yn(s,o="xl/worksheets/sheet"+l+"."+t,PQt(l-1,i,e,k)),r.sheets.push(o),vr(i.wbrels,-1,"worksheets/sheet"+l+"."+t,wn.WS[0]),O){var U=O["!comments"],j=!1,W="";if(U&&U.length>0){var Z=!1;U.forEach(function(st){st[1].forEach(function(yt){1==yt.T&&(Z=!0)})}),Z&&(yn(s,W="xl/threadedComments/threadedComment"+l+".xml",$it(U,D,i)),r.threadedcomments.push(W),vr(k,-1,"../threadedComments/threadedComment"+l+".xml",wn.TCMNT)),yn(s,W="xl/comments"+l+"."+t,Jjt(U)),r.comments.push(W),vr(k,-1,"../comments"+l+"."+t,wn.CMNT),j=!0}O["!legacy"]&&j&&yn(s,"xl/drawings/vmlDrawing"+l+".vml",Xit(l,O["!comments"])),delete O["!comments"],delete O["!legacy"]}k["!id"].rId1&&yn(s,Y1(o),L0(k))}return null!=i.Strings&&i.Strings.length>0&&(yn(s,o="xl/sharedStrings."+t,function uWt(e){var i=Co();Re(i,159,function lWt(e,i){return i||(i=le(8)),i.write_shift(4,e.Count),i.write_shift(4,e.Unique),i}(e));for(var t=0;t1&&(yn(s,o="xl/persons/person.xml",Qit(D)),r.people.push(o),vr(i.wbrels,-1,"persons/person.xml",wn.PEOPLE)),yn(s,"[Content_Types].xml",Xet(r,i)),yn(s,"_rels/.rels",L0(i.rels)),yn(s,"xl/_rels/workbook.bin.rels",L0(i.wbrels)),delete i.revssf,delete i.ssf,s}(e,i);default:return Znt(e,i)}}function zu(e,i,t){t||(t="");var n=t+e;switch(i.type){case"base64":return TA(Lu(n));case"binary":return Lu(n);case"string":return e;case"file":return O1(i.file,n,"utf8");case"buffer":return Rn?Pu(n,"utf8"):typeof TextEncoder<"u"?(new TextEncoder).encode(n):zu(n,{type:"binary"}).split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+i.type)}function nD(e,i){switch(i.type){case"string":case"base64":case"binary":for(var t="",n=0;n22)throw new Error("Bad Code Name: Worksheet"+o)}})}(e.SheetNames,e.Workbook&&e.Workbook.Sheets||[],!!e.vbaraw);for(var t=0;t255&&(t=95),s=t>>2,(n=e.charCodeAt(E++))>255&&(n=95),o=(3&t)<<4|n>>4,(r=e.charCodeAt(E++))>255&&(r=95),l=(15&n)<<2|r>>6,w=63&r,isNaN(n)?l=w=64:isNaN(r)&&(w=64),i+=bo.charAt(s)+bo.charAt(o)+bo.charAt(l)+bo.charAt(w);return i}(e);case"binary":case"string":return e;case"file":return O1(i.file,e,"binary");case"buffer":return Rn?Pu(e,"binary"):e.split("").map(function(t){return t.charCodeAt(0)})}throw new Error("Unrecognized type "+i.type)}(art(e.Sheets[e.SheetNames[r]],t),t);case"csv":return zu(Q4(e.Sheets[e.SheetNames[r]],t),t,"\ufeff");case"dif":return zu(Oit.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"dbf":return nD(v4.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"prn":return zu(B0.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"rtf":return zu(function IWt(e){var t=["{\\rtf1\\ansi"];if(!e["!ref"])return t[0]+"}";for(var r,n=$n(e["!ref"]),s=null!=e["!data"],o=[],l=n.s.r;l<=n.e.r;++l){t.push("\\trowd\\trautofit1");for(var w=n.s.c;w<=n.e.c;++w)t.push("\\cellx"+(w+1));for(t.push("\\pard\\intbl"),s&&(o=e["!data"][l]||[]),w=n.s.c;w<=n.e.c;++w){var E=Pn({r:l,c:w});(r=s?o[w]:e[E])&&(null!=r.v||r.f&&!r.F)?(t.push(" "+(r.w||(Nu(r),r.w)||"").replace(/[\r\n]/g,"\\par ")),t.push("\\cell")):t.push(" \\cell")}t.push("\\pard\\intbl\\row")}return t.join("")+"}"}(e.Sheets[e.SheetNames[r]]),t);case"eth":return zu(Lit.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"fods":return zu(Gnt(e,t),t);case"wk1":return nD(Dm.sheet_to_wk1(e.Sheets[e.SheetNames[r]],t),t);case"wk3":return nD(Dm.book_to_wk3(e,t),t);case"biff2":t.biff||(t.biff=2);case"biff3":t.biff||(t.biff=3);case"biff4":return t.biff||(t.biff=4),nD(_nt(e,t),t);case"biff5":t.biff||(t.biff=5);case"biff8":case"xla":case"xls":return t.biff||(t.biff=8),function JZt(e,i){var t=i||{};return trt(function XKt(e,i){var t=i||{},n=Vi.utils.cfb_new({root:"R"}),r="/Workbook";switch(t.bookType||"xls"){case"xls":t.bookType="biff8";case"xla":t.bookType||(t.bookType="xla");case"biff8":r="/Workbook",t.biff=8;break;case"biff5":r="/Book",t.biff=5;break;default:throw new Error("invalid type "+t.bookType+" for XLS CFB")}return Vi.utils.cfb_add(n,r,_nt(e,t)),8==t.biff&&(e.Props||e.Custprops)&&function jKt(e,i){var o,t=[],n=[],r=[],s=0,l=eet(r4,"n"),w=eet(s4,"n");if(e.Props)for(o=rs(e.Props),s=0;s-1||Zet.indexOf(r[s][0])>-1||null!=r[s][1]&&E.push(r[s]);n.length&&Vi.utils.cfb_add(i,"/\x05SummaryInformation",hit(n,lw.SI,w,s4)),(t.length||E.length)&&Vi.utils.cfb_add(i,"/\x05DocumentSummaryInformation",hit(t,lw.DSI,l,r4,E.length?E:null,lw.UDI))}(e,n),8==t.biff&&e.vbaraw&&function eXt(e,i){i.FullPaths.forEach(function(t,n){if(0!=n){var r=t.replace(/^[\/]*[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");"/"!==r.slice(-1)&&Vi.utils.cfb_add(e,r,i.FileIndex[n].content)}})}(n,Vi.read(e.vbaraw,{type:"string"==typeof e.vbaraw?"binary":"buffer"})),n}(e,t),t)}(e,t);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return function KZt(e,i){var t=br(i||{});return function ert(e,i){var t={},n=Rn?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(i.compression&&(t.compression="DEFLATE"),i.password)t.type=n;else switch(i.type){case"base64":t.type="base64";break;case"binary":t.type="string";break;case"string":throw new Error("'string' output type invalid for '"+i.bookType+"' files");case"buffer":case"file":t.type=n;break;default:throw new Error("Unrecognized type "+i.type)}var r=e.FullPaths?Vi.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[t.type]||t.type,compression:!!i.compression}):e.generate(t);if(typeof Deno<"u"&&"string"==typeof r){if("binary"==i.type||"base64"==i.type)return r;r=new Uint8Array(R1(r))}return i.password&&typeof encrypt_agile<"u"?trt(encrypt_agile(r,i.password),i):"file"===i.type?O1(i.file,r):"string"==i.type?wr(r):r}(QZt(e,t),t)}(e,t);default:throw new Error("Unrecognized bookType |"+t.bookType+"|")}}function nrt(e,i,t,n,r,s,o){var l=Un(t),w=o.defval,E=o.raw||!Object.prototype.hasOwnProperty.call(o,"raw"),D=!0,k=null!=e["!data"],O=1===r?[]:{};if(1!==r)if(Object.defineProperty)try{Object.defineProperty(O,"__rowNum__",{value:t,enumerable:!1})}catch{O.__rowNum__=t}else O.__rowNum__=t;if(!k||e["!data"][t])for(var L=i.s.c;L<=i.e.c;++L){var U=k?(e["!data"][t]||[])[L]:e[n[L]+l];if(null!=U&&void 0!==U.t){var j=U.v;switch(U.t){case"z":if(null==j)break;continue;case"e":j=0==j?null:void 0;break;case"s":case"b":case"n":if(!U.z||!Ul(U.z)||"number"==typeof(j=Yh(j)))break;case"d":o&&(o.UTC||!1===o.raw)||(j=pm(new Date(j)));break;default:throw new Error("unrecognized type "+U.t)}if(null!=s[L]){if(null==j)if("e"==U.t&&null===j)O[s[L]]=null;else if(void 0!==w)O[s[L]]=w;else{if(!E||null!==j)continue;O[s[L]]=null}else O[s[L]]=("n"===U.t&&"boolean"==typeof o.rawNumbers?o.rawNumbers:E)?j:Nu(U,j,o);null!=j&&(D=!1)}}else{if(void 0===w)continue;null!=s[L]&&(O[s[L]]=w)}}return{row:O,isempty:D}}function $4(e,i){if(null==e||null==e["!ref"])return[];var t={t:"n",v:0},n=0,r=1,s=[],o=0,l="",w={s:{r:0,c:0},e:{r:0,c:0}},E=i||{},D=null!=E.range?E.range:e["!ref"];switch(1===E.header?n=1:"A"===E.header?n=2:Array.isArray(E.header)?n=3:null==E.header&&(n=0),typeof D){case"string":w=$n(D);break;case"number":(w=$n(e["!ref"])).s.r=D;break;default:w=D}n>0&&(r=0);var k=Un(w.s.r),O=[],L=[],U=0,j=0,W=null!=e["!data"],Z=w.s.r,rt=0,st={};W&&!e["!data"][Z]&&(e["!data"][Z]=[]);var yt=E.skipHidden&&e["!cols"]||[],Tt=E.skipHidden&&e["!rows"]||[];for(rt=w.s.c;rt<=w.e.c;++rt)if(!(yt[rt]||{}).hidden)switch(O[rt]=xn(rt),t=W?e["!data"][Z][rt]:e[O[rt]+k],n){case 1:s[rt]=rt-w.s.c;break;case 2:s[rt]=O[rt];break;case 3:s[rt]=E.header[rt-w.s.c];break;default:if(null==t&&(t={w:"__EMPTY",t:"s"}),l=o=Nu(t,null,E),j=st[o]||0){do{l=o+"_"+j++}while(st[l]);st[o]=j,st[l]=1}else st[o]=1;s[rt]=l}for(Z=w.s.r+r;Z<=w.e.r;++Z)if(!(Tt[Z]||{}).hidden){var It=nrt(e,w,Z,O,n,s,E);(!1===It.isempty||(1===n?!1!==E.blankrows:E.blankrows))&&(L[U++]=It.row)}return L.length=U,L}var rrt=/"/g;function srt(e,i,t,n,r,s,o,l){for(var w=!0,E=[],D="",k=Un(t),O=null!=e["!data"],L=O&&e["!data"][t]||[],U=i.s.c;U<=i.e.c;++U)if(n[U]){var j=O?L[U]:e[n[U]+k];if(null==j)D="";else if(null!=j.v){w=!1,D=""+(l.rawNumbers&&"n"==j.t?j.v:Nu(j,null,l));for(var W=0,Z=0;W!==D.length;++W)if((Z=D.charCodeAt(W))===r||Z===s||34===Z||l.forceQuotes){D='"'+D.replace(rrt,'""')+'"';break}"ID"==D&&(D='"ID"')}else null==j.f||j.F?D="":(w=!1,(D="="+j.f).indexOf(",")>=0&&(D='"'+D.replace(rrt,'""')+'"'));E.push(D)}if(l.strip)for(;""===E[E.length-1];)--E.length;return!1===l.blankrows&&w?null:E.join(o)}function Q4(e,i){var t=[],n=i??{};if(null==e||null==e["!ref"])return"";for(var r=$n(e["!ref"]),s=void 0!==n.FS?n.FS:",",o=s.charCodeAt(0),l=void 0!==n.RS?n.RS:"\n",w=l.charCodeAt(0),E="",D=[],k=n.skipHidden&&e["!cols"]||[],O=n.skipHidden&&e["!rows"]||[],L=r.s.c;L<=r.e.c;++L)(k[L]||{}).hidden||(D[L]=xn(L));for(var U=0,j=r.s.r;j<=r.e.r;++j)(O[j]||{}).hidden||null!=(E=srt(e,r,j,D,o,w,s,n))&&(E||!1!==n.blankrows)&&t.push((U++?l:"")+E);return t.join("")}function art(e,i){i||(i={}),i.FS="\t",i.RS="\n";var t=Q4(e,i);return typeof En>"u"||"string"==i.type?t:"\xff\xfe"+En.utils.encode(1200,t,"str")}function ort(e,i,t){var n=t||{},r=e?null!=e["!data"]:n.dense;null!=Vs&&null==r&&(r=Vs);var s=+!n.skipHeader,o=e||{};!e&&r&&(o["!data"]=[]);var l=0,w=0;if(o&&null!=n.origin)if("number"==typeof n.origin)l=n.origin;else{var E="string"==typeof n.origin?Tr(n.origin):n.origin;l=E.r,w=E.c}var D={s:{c:0,r:0},e:{c:w,r:l+i.length-1+s}};if(o["!ref"]){var k=$n(o["!ref"]);D.e.c=Math.max(D.e.c,k.e.c),D.e.r=Math.max(D.e.r,k.e.r),-1==l&&(D.e.r=(l=k.e.r+1)+i.length-1+s)}else-1==l&&(l=0,D.e.r=i.length-1+s);var O=n.header||[],L=0,U=[];i.forEach(function(W,Z){r&&!o["!data"][l+Z+s]&&(o["!data"][l+Z+s]=[]),r&&(U=o["!data"][l+Z+s]),rs(W).forEach(function(rt){-1==(L=O.indexOf(rt))&&(O[L=O.length]=rt);var st=W[rt],yt="z",Tt="",It=r?"":xn(w+L)+Un(l+Z+s),ft=r?U[w+L]:o[It];!st||"object"!=typeof st||st instanceof Date?("number"==typeof st?yt="n":"boolean"==typeof st?yt="b":"string"==typeof st?yt="s":st instanceof Date?(yt="d",n.UTC||(st=MA(st)),n.cellDates||(yt="n",st=ws(st)),Tt=null!=ft&&ft.z&&Ul(ft.z)?ft.z:n.dateNF||Ni[14]):null===st&&n.nullError&&(yt="e",st=0),ft?(ft.t=yt,ft.v=st,delete ft.w,delete ft.R,Tt&&(ft.z=Tt)):r?U[w+L]=ft={t:yt,v:st}:o[It]=ft={t:yt,v:st},Tt&&(ft.z=Tt)):r?U[w+L]=st:o[It]=st})}),D.e.c=Math.max(D.e.c,w+O.length-1);var j=Un(l);if(r&&!o["!data"][l]&&(o["!data"][l]=[]),s)for(L=0;L=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(t)>=0&&t.length<32){var s=t.match(/\d+$/);r=s&&+s[0]||0;var o=s&&t.slice(0,s.index)||t;for(++r;r<=65535&&-1!=e.SheetNames.indexOf(t=o+r);++r);}if(bnt(t),e.SheetNames.indexOf(t)>=0)throw new Error("Worksheet with name |"+t+"| already exists!");return e.SheetNames.push(t),e.Sheets[t]=i,t}var crt_json_to_sheet=function nJt(e,i){return ort(null,e,i)};let vJt=(()=>{class e{constructor(){}exportAsExcelFile(t,n){const o=pw({Sheets:{data:crt_json_to_sheet(t)},SheetNames:["data"]},{bookType:"xlsx",type:"array"});this.saveAsExcelFile(o,n)}saveAsExcelFile(t,n){const r=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});Tu.saveAs(r,n+"_export_"+(new Date).getTime()+".xlsx")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const yJt=["*",[["mat-toolbar-row"]]],xJt=["*","mat-toolbar-row"];let bJt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=me({type:e,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"],standalone:!0})}}return e})(),wJt=(()=>{class e{constructor(t,n,r){this._elementRef=t,this._platform=n,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(cr),pt(Gi))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-toolbar"]],contentQueries:function(n,r,s){if(1&n&&Hn(s,bJt,5),2&n){let o;He(o=We())&&(r._toolbarRows=o)}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(n,r){2&n&&(oo(r.color?"mat-"+r.color:""),Ci("mat-toolbar-multiple-rows",r._toolbarRows.length>0)("mat-toolbar-single-row",0===r._toolbarRows.length))},inputs:{color:"color"},exportAs:["matToolbar"],standalone:!0,features:[Wi],ngContentSelectors:xJt,decls:2,vars:0,template:function(n,r){1&n&&(nr(yJt),Si(0),Si(1,1))},styles:[".mat-toolbar{background:var(--mat-toolbar-container-background-color, var(--mat-app-surface));color:var(--mat-toolbar-container-text-color, var(--mat-app-on-surface))}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:var(--mat-toolbar-title-text-font, var(--mat-app-title-large-font));font-size:var(--mat-toolbar-title-text-size, var(--mat-app-title-large-size));line-height:var(--mat-toolbar-title-text-line-height, var(--mat-app-title-large-line-height));font-weight:var(--mat-toolbar-title-text-weight, var(--mat-app-title-large-weight));letter-spacing:var(--mat-toolbar-title-text-tracking, var(--mat-app-title-large-tracking));margin:0}.cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar .mat-mdc-button-base.mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color:var(--mat-toolbar-container-text-color, var(--mat-app-on-surface));--mdc-outlined-button-label-text-color:var(--mat-toolbar-container-text-color, var(--mat-app-on-surface))}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap;height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-row,.mat-toolbar-single-row{height:var(--mat-toolbar-mobile-height)}}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%;min-height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-multiple-rows{min-height:var(--mat-toolbar-mobile-height)}}"],encapsulation:2,changeDetection:0})}}return e})(),TJt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,rn]})}}return e})();const urt=["*"],CJt=["content"],SJt=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],EJt=["mat-drawer","mat-drawer-content","*"];function _Jt(e,i){if(1&e){const t=xe();J(0,"div",1),Ut("click",function(){return zt(t),Gt(St()._onBackdropClicked())}),et()}2&e&&Ci("mat-drawer-shown",St()._isShowingBackdrop())}function AJt(e,i){1&e&&(J(0,"mat-drawer-content"),Si(1,2),et())}const DJt={transformDrawer:xr("transform",[Bn("open, open-instant",oi({transform:"none",visibility:"visible"})),Bn("void",oi({"box-shadow":"none",visibility:"hidden"})),gn("void => open-instant",mn("0ms")),gn("void <=> open, open-instant => void",mn("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},MJt=new te("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function IJt(){return!1}}),hrt=new te("MAT_DRAWER_CONTAINER");let Z4=(()=>{class e extends Jx{constructor(t,n,r,s,o){super(r,s,o),this._changeDetectorRef=t,this._container=n}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}static{this.\u0275fac=function(n){return new(n||e)(pt(In),pt(kn(()=>frt)),pt(ai),pt(Zx),pt(li))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(n,r){2&n&&$s("margin-left",r._container._contentMargins.left,"px")("margin-right",r._container._contentMargins.right,"px")},standalone:!0,features:[xi([{provide:Jx,useExisting:e}]),yi,Wi],ngContentSelectors:urt,decls:1,vars:0,template:function(n,r){1&n&&(nr(),Si(0))},encapsulation:2,changeDetection:0})}}return e})(),drt=(()=>{class e{get position(){return this._position}set position(t){(t="end"===t?"end":"start")!==this._position&&(this._isAttached&&this._updatePositionInParent(t),this._position=t,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=pa(t)}get autoFocus(){return this._autoFocus??("side"===this.mode?"dialog":"first-tabbable")}set autoFocus(t){("true"===t||"false"===t||null==t)&&(t=pa(t)),this._autoFocus=t}get opened(){return this._opened}set opened(t){this.toggle(pa(t))}constructor(t,n,r,s,o,l,w,E){this._elementRef=t,this._focusTrapFactory=n,this._focusMonitor=r,this._platform=s,this._ngZone=o,this._interactivityChecker=l,this._doc=w,this._container=E,this._focusTrap=null,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new Fe,this._animationEnd=new Fe,this._animationState="void",this.openedChange=new Oe(!0),this._openedStream=this.openedChange.pipe(Ln(D=>D),Ri(()=>{})),this.openedStart=this._animationStarted.pipe(Ln(D=>D.fromState!==D.toState&&0===D.toState.indexOf("open")),ZC(void 0)),this._closedStream=this.openedChange.pipe(Ln(D=>!D),Ri(()=>{})),this.closedStart=this._animationStarted.pipe(Ln(D=>D.fromState!==D.toState&&"void"===D.toState),ZC(void 0)),this._destroyed=new Fe,this.onPositionChanged=new Oe,this._modeChanged=new Fe,this._injector=Jt(On),this._changeDetectorRef=Jt(In),this.openedChange.pipe(Yi(this._destroyed)).subscribe(D=>{D?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{Bc(this._elementRef.nativeElement,"keydown").pipe(Ln(D=>27===D.keyCode&&!this.disableClose&&!co(D)),Yi(this._destroyed)).subscribe(D=>this._ngZone.run(()=>{this.close(),D.stopPropagation(),D.preventDefault()}))}),this._animationEnd.subscribe(D=>{const{fromState:k,toState:O}=D;(0===O.indexOf("open")&&"void"===k||"void"===O&&0===k.indexOf("open"))&&this.openedChange.emit(this._opened)})}_forceFocus(t,n){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{t.removeEventListener("blur",r),t.removeEventListener("mousedown",r),t.removeAttribute("tabindex")};t.addEventListener("blur",r),t.addEventListener("mousedown",r)})),t.focus(n)}_focusByCssSelector(t,n){let r=this._elementRef.nativeElement.querySelector(t);r&&this._forceFocus(r,n)}_takeFocus(){if(!this._focusTrap)return;const t=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":ao(()=>{!this._focusTrap.focusInitialElement()&&"function"==typeof t.focus&&t.focus()},{injector:this._injector});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus)}}_restoreFocus(t){"dialog"!==this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,t):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){const t=this._doc.activeElement;return!!t&&this._elementRef.nativeElement.contains(t)}ngAfterViewInit(){this._isAttached=!0,"end"===this._position&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(t=!this.opened,n){t&&n&&(this._openedVia=n);const r=this._setOpen(t,!t&&this._isFocusWithinDrawer(),this._openedVia||"program");return t||(this._openedVia=null),r}_setOpen(t,n,r){return this._opened=t,t?this._animationState=this._enableAnimations?"open":"open-instant":(this._animationState="void",n&&this._restoreFocus(r)),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(s=>{this.openedChange.pipe(xs(1)).subscribe(o=>s(o?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=!!this._container?.hasBackdrop&&this.opened)}_updatePositionInParent(t){if(!this._platform.isBrowser)return;const n=this._elementRef.nativeElement,r=n.parentNode;"end"===t?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),r.insertBefore(this._anchor,n)),r.appendChild(n)):this._anchor&&this._anchor.parentNode.insertBefore(n,this._anchor)}static{this.\u0275fac=function(n){return new(n||e)(pt(ai),pt(IP),pt(sc),pt(cr),pt(li),pt(PS),pt(Gi,8),pt(hrt,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-drawer"]],viewQuery:function(n,r){if(1&n&&ki(CJt,5),2&n){let s;He(s=We())&&(r._content=s.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(n,r){1&n&&fC("@transform.start",function(o){return r._animationStarted.next(o)})("@transform.done",function(o){return r._animationEnd.next(o)}),2&n&&(lC("@transform",r._animationState),_i("align",null),Ci("mat-drawer-end","end"===r.position)("mat-drawer-over","over"===r.mode)("mat-drawer-push","push"===r.mode)("mat-drawer-side","side"===r.mode)("mat-drawer-opened",r.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],standalone:!0,features:[Wi],ngContentSelectors:urt,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(n,r){1&n&&(nr(),J(0,"div",1,0),Si(2),et())},dependencies:[Jx],encapsulation:2,data:{animation:[DJt.transformDrawer]},changeDetection:0})}}return e})(),frt=(()=>{class e{get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=pa(t)}get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(t){this._backdropOverride=null==t?null:pa(t)}get scrollable(){return this._userContent||this._content}constructor(t,n,r,s,o,l=!1,w){this._dir=t,this._element=n,this._ngZone=r,this._changeDetectorRef=s,this._animationMode=w,this._drawers=new Ju,this.backdropClick=new Oe,this._destroyed=new Fe,this._doCheckSubject=new Fe,this._contentMargins={left:null,right:null},this._contentMarginChanges=new Fe,this._injector=Jt(On),t&&t.change.pipe(Yi(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),o.change().pipe(Yi(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=l}ngAfterContentInit(){this._allDrawers.changes.pipe(Ma(this._allDrawers),Yi(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(n=>!n._container||n._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Ma(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(vu(10),Yi(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,n=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const r=this._left._getWidth();t+=r,n-=r}if(this._right&&this._right.opened)if("side"==this._right.mode)n+=this._right._getWidth();else if("push"==this._right.mode){const r=this._right._getWidth();n+=r,t-=r}t=t||null,n=n||null,(t!==this._contentMargins.left||n!==this._contentMargins.right)&&(this._contentMargins={left:t,right:n},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe(Ln(n=>n.fromState!==n.toState),Yi(this._drawers.changes)).subscribe(n=>{"open-instant"!==n.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(Yi(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t&&t.onPositionChanged.pipe(Yi(this._drawers.changes)).subscribe(()=>{ao(()=>{this._validateDrawers()},{injector:this._injector,phase:Jf.Read})})}_watchDrawerMode(t){t&&t._modeChanged.pipe(Yi(qr(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const n=this._element.nativeElement.classList,r="mat-drawer-container-has-open";t?n.add(r):n.remove(r)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._drawerHasBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(t){return null!=t&&t.opened}_drawerHasBackdrop(t){return null==this._backdropOverride?!!t&&"side"!==t.mode:this._backdropOverride}static{this.\u0275fac=function(n){return new(n||e)(pt(Ya,8),pt(ai),pt(li),pt(In),pt(mh),pt(MJt),pt(Hr,8))}}static{this.\u0275cmp=Ge({type:e,selectors:[["mat-drawer-container"]],contentQueries:function(n,r,s){if(1&n&&(Hn(s,Z4,5),Hn(s,drt,5)),2&n){let o;He(o=We())&&(r._content=o.first),He(o=We())&&(r._allDrawers=o)}},viewQuery:function(n,r){if(1&n&&ki(Z4,5),2&n){let s;He(s=We())&&(r._userContent=s.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(n,r){2&n&&Ci("mat-drawer-container-explicit-backdrop",r._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],standalone:!0,features:[xi([{provide:hrt,useExisting:e}]),Wi],ngContentSelectors:EJt,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(n,r){1&n&&(nr(SJt),Ht(0,_Jt,1,2,"div",0),Si(1),Si(2,1),Ht(3,AJt,2,0,"mat-drawer-content")),2&n&&(Tn(r.hasBackdrop?0:-1),ot(3),Tn(r._content?-1:3))},dependencies:[Z4],styles:['.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-app-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-app-background));box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-app-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow);background-color:var(--mat-sidenav-container-background-color, var(--mat-app-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));width:var(--mat-sidenav-container-width);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0})}}return e})(),RJt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,gh,gh,rn]})}}return e})();function PJt(e,i){if(1&e){const t=xe();J(0,"button",19),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().navigate(r))}),ut(1),et()}if(2&e){const t=i.$implicit;ot(),Ke(t.name)}}function kJt(e,i){if(1&e){const t=xe();J(0,"button",19),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().setFhirServer(r))}),ut(1),et()}if(2&e){const t=i.$implicit;ot(),Ke(t.name)}}function FJt(e,i){if(1&e){const t=xe();J(0,"button",19),Ut("click",function(){const r=zt(t).$implicit;return Gt(St(2).setEdition(r))}),ut(1),et()}if(2&e){const t=i.$implicit;ot(),Ke(t.resource.version)}}function OJt(e,i){if(1&e&&(Qi(0),J(1,"button",20),ut(2),et(),J(3,"mat-menu",null,5)(5,"span",16),ut(6,"Versions / Releases"),et(),Ht(7,FJt,2,1,"button",15),et(),Ki()),2&e){const t=i.$implicit,n=Zi(4);ot(),vt("matMenuTriggerFor",n),ot(),Ke(t.editionName),ot(5),vt("ngForOf",t.editions)}}function LJt(e,i){if(1&e){const t=xe();J(0,"button",19),Ut("click",function(){const r=zt(t).$implicit;return Gt(St().setLanguage(r))}),ut(1),et()}if(2&e){const t=i.$implicit;ot(),Ke(t)}}function NJt(e,i){if(1&e){const t=xe();J(0,"button",19),Ut("click",function(){const r=zt(t).$implicit;return Gt(St(2).navigate(r))}),ut(1),et()}if(2&e){const t=i.$implicit;ot(),Ke(t.name)}}function BJt(e,i){if(1&e){const t=xe();J(0,"button",19),Ut("click",function(){const r=zt(t).$implicit;return Gt(St(2).setFhirServer(r))}),ut(1),et()}if(2&e){const t=i.$implicit;ot(),Ke(t.name)}}function VJt(e,i){if(1&e){const t=xe();J(0,"button",19),Ut("click",function(){const r=zt(t).$implicit;return Gt(St(3).setEdition(r))}),ut(1),et()}if(2&e){const t=i.$implicit;ot(),Ke(t.resource.version)}}function UJt(e,i){if(1&e&&(Qi(0),J(1,"button",20),ut(2),et(),J(3,"mat-menu",null,5)(5,"span",16),ut(6,"Versions / Releases"),et(),Ht(7,VJt,2,1,"button",15),et(),Ki()),2&e){const t=i.$implicit,n=Zi(4);ot(),vt("matMenuTriggerFor",n),ot(),Ke(t.editionName),ot(5),vt("ngForOf",t.editions)}}function zJt(e,i){if(1&e){const t=xe();J(0,"button",19),Ut("click",function(){const r=zt(t).$implicit;return Gt(St(2).setLanguage(r))}),ut(1),et()}if(2&e){const t=i.$implicit;ot(),Ke(t)}}function GJt(e,i){if(1&e){const t=xe();J(0,"mat-toolbar")(1,"button",21),Ut("click",function(){return zt(t),St(),Gt(Zi(2).toggle())}),J(2,"mat-icon"),ut(3,"menu"),et()(),J(4,"a",22),Ut("click",function(){return zt(t),Gt(St().navigate({url:"home",type:"internal"}))}),ye(5,"img",23),et(),J(6,"span",24),ut(7,"SNOMED CT Implementation Demos"),et(),J(8,"span",25),ut(9,"Implementation Demos"),et(),ye(10,"span",26),J(11,"button",27),ut(12,"Select Demonstrator"),et(),J(13,"mat-menu",14,6),Ht(15,NJt,2,1,"button",15),et(),J(16,"button",28),ut(17),et(),J(18,"mat-menu",null,7),Ht(20,BJt,2,1,"button",15),et(),J(21,"button",28),ut(22),et(),J(23,"mat-menu",14,8)(25,"span",16),ut(26,"Editions"),et(),Ht(27,UJt,8,3,"ng-container",17),et(),J(28,"button",28),ut(29),et(),J(30,"mat-menu",null,9),Ht(32,zJt,2,1,"button",15),et(),J(33,"a",29)(34,"mat-icon"),ut(35,"info"),et()()()}if(2&e){const t=Zi(14),n=Zi(19),r=Zi(24),s=Zi(31),o=St();ot(11),vt("matMenuTriggerFor",t),ot(4),vt("ngForOf",o.demos),ot(),vt("matMenuTriggerFor",n),ot(),Je("FHIR Server: ",o.selectedServer.name,""),ot(3),vt("ngForOf",o.fhirServers),ot(),vt("matMenuTriggerFor",r),ot(),Ke(o.selectedEdition),ot(5),vt("ngForOf",o.editionsDetails),ot(),vt("matMenuTriggerFor",s),ot(),Ke(o.selectedLanguage),ot(3),vt("ngForOf",o.languages)}}let HJt=(()=>{class e{constructor(t,n,r,s,o,l){this.codingSpecService=t,this.excelService=n,this.terminologyService=r,this.router=s,this.menuService=o,this.activatedRoute=l,this.title="sct-implementation-demonstrator",this.bindingsForExport=[],this.editions=[],this.editionsDetails=[],this.languages=["da","de","en","es","et","fi","fr","nl","no","sv"],this.selectedEdition="Edition",this.selectedLanguage="en",this.fhirServers=[{name:"SNOMED Dev IS",url:"https://dev-is-browser.ihtsdotools.org/fhir"},{name:"SNOMED Public",url:"https://snowstorm.ihtsdotools.org/fhir"},{name:"SNOMED Dev 2",url:"https://snowstorm-temp.kaicode.io/fhir"},{name:"SNOMED Lite Demo",url:"https://snowstorm-lite.nw.r.appspot.com/fhir"}],this.selectedServer=this.fhirServers[1],this.embeddedMode=!1,this.demos=[],this.router.events.subscribe(w=>{w instanceof pu&>ag("config","G-7SK998GPMX",{page_path:w.urlAfterRedirects})})}ngOnInit(){this.demos=this.menuService.getDemos(),this.setFhirServer(this.selectedServer),this.bindingsForExport=[];let t=this.codingSpecService.getCodingSpec();for(const n of t)for(const r of n.bindings)this.bindingsForExport.push({section:n.title,title:r.title,ecl:r.ecl.replace(/\s\s+/g," ")});this.activatedRoute.queryParams.subscribe(n=>{this.embeddedMode="true"===n.embedded,n.edition?this.updateCodeSystemOptions(n.edition):this.updateCodeSystemOptions()}),this.terminologyService.lang$.subscribe(n=>{this.selectedLanguage=n}),this.terminologyService.fhirUrlParam$.subscribe(n=>{this.editions?.length>0&&this.editions.forEach(r=>{r.resource.version===n&&(this.selectedEdition=r.resource.title?.replace("SNOMED CT release ",""))})})}navigate(t){"internal"===t.type?this.router.navigate([t.url],{queryParams:t.queryParams}):this.openInNewTab(t.url)}openInNewTab(t){window.open(t,"_blank")}updateCodeSystemOptions(t){this.terminologyService.getCodeSystems().subscribe(n=>{this.editionsDetails=[],this.editions=n.entry;let r=new Set;this.editions.forEach(o=>{r.add(o.resource.title)}),r.forEach(o=>{this.editionsDetails.push({editionName:o,editions:this.editions.filter(l=>l.resource.title.includes(o)).sort(this.compare)})});let s=this.editionsDetails.findIndex(o=>"International Edition"===o.editionName);t?this.editions.forEach(o=>{o.resource.version===t&&this.setEdition(o)}):this.setEdition(s>=0?this.editionsDetails[s].editions[0]:this.editions[0])})}compare(t,n){return t.resource.daten.resource.date?-1:0}setFhirServer(t){this.selectedServer=t,this.terminologyService.setSnowstormFhirBase(t.url),this.selectedEdition="Edition",this.editions=[],this.editionsDetails=[],this.updateCodeSystemOptions()}setEdition(t){this.selectedEdition=t.resource.title?.replace("SNOMED CT release ",""),this.terminologyService.setFhirUrlParam(t.resource.version)}setLanguage(t){this.selectedLanguage=t,this.terminologyService.setLang(t)}static{this.\u0275fac=function(n){return new(n||e)(pt(GUt),pt(vJt),pt(ma),pt(Ho),pt(Dtt),pt(nc))}}static{this.\u0275cmp=Ge({type:e,selectors:[["app-root"]],decls:28,vars:12,consts:[["drawer",""],["demosMenuN","matMenu"],["serverMenuN","matMenu"],["editionsMenuN","matMenu"],["menuN","matMenu"],["sub_menu","matMenu"],["demosMenu","matMenu"],["serverMenu","matMenu"],["editionsMenu","matMenu"],["menu","matMenu"],["autosize","",1,"example-container"],["mode","over",1,"example-sidenav"],[1,"flex","flex-col","justify-center"],["mat-button","",3,"matMenuTriggerFor"],[1,"wide-menu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"ml-4"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-icon-button","","id","menu-button",3,"click"],["href","javascript:void(0)",3,"click"],["src","assets/img/small_logo.png","id","logo"],["id","title"],["id","short-title"],[1,"example-spacer"],["mat-flat-button","","color","accent",1,"bar-button",3,"matMenuTriggerFor"],["mat-flat-button","","color","primary",1,"bar-button",3,"matMenuTriggerFor"],["mat-flat-button","","href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank","color","primary","id","info-button"]],template:function(n,r){if(1&n&&(J(0,"mat-drawer-container",10)(1,"mat-drawer",11,0)(3,"div",12)(4,"button",13),ut(5,"Select Demonstrator"),et(),J(6,"mat-menu",14,1),Ht(8,PJt,2,1,"button",15),et(),J(9,"button",13),ut(10),et(),J(11,"mat-menu",null,2),Ht(13,kJt,2,1,"button",15),et(),J(14,"button",13),ut(15),et(),J(16,"mat-menu",14,3)(18,"span",16),ut(19,"Editions"),et(),Ht(20,OJt,8,3,"ng-container",17),et(),J(21,"button",13),ut(22),et(),J(23,"mat-menu",null,4),Ht(25,LJt,2,1,"button",15),et()()(),Ht(26,GJt,36,11,"mat-toolbar",18),ye(27,"router-outlet"),et()),2&n){const s=Zi(7),o=Zi(12),l=Zi(17),w=Zi(24);ot(4),vt("matMenuTriggerFor",s),ot(4),vt("ngForOf",r.demos),ot(),vt("matMenuTriggerFor",o),ot(),Je("FHIR Server: ",r.selectedServer.name,""),ot(3),vt("ngForOf",r.fhirServers),ot(),vt("matMenuTriggerFor",l),ot(),Je("Edition: ",r.selectedEdition,""),ot(5),vt("ngForOf",r.editionsDetails),ot(),vt("matMenuTriggerFor",w),ot(),Je("Language: ",r.selectedLanguage,""),ot(3),vt("ngForOf",r.languages),ot(),vt("ngIf",!r.embeddedMode)}},dependencies:[ys,ls,JR,wJt,KTt,Cs,jo,ga,Rl,oc,vh,drt,frt],styles:[".mat-toolbar[_ngcontent-%COMP%]{background-color:#434a55;color:#fff;font-size:1.8rem;font-weight:700}button[_ngcontent-%COMP%]{font-weight:700;font-size:medium}.bar-button[_ngcontent-%COMP%]{margin-left:15px}#title[_ngcontent-%COMP%]{margin-left:15px;font-size:1.4rem}.example-spacer[_ngcontent-%COMP%]{flex:1 1 auto}a[_ngcontent-%COMP%]{margin-left:15px} .mat-mdc-menu-panel{max-width:fit-content!important;overflow-x:hidden!important}.mat-mdc-unelevated-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-raised-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-outlined-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{margin:0!important}#demo-selector[_ngcontent-%COMP%]{margin:5px 15px;padding:10px}#menu-button[_ngcontent-%COMP%], #short-title[_ngcontent-%COMP%]{display:none}#logo[_ngcontent-%COMP%]{height:4rem}@media (max-width: 768px){#title[_ngcontent-%COMP%]{display:none}#short-title[_ngcontent-%COMP%]{display:block;margin-left:15px;font-size:.9rem}#logo[_ngcontent-%COMP%]{height:3.5rem}#info-button[_ngcontent-%COMP%]{display:none}}@media (max-width: 1200px){.bar-button[_ngcontent-%COMP%]{display:none}#menu-button[_ngcontent-%COMP%]{display:block}}"]})}}return e})();function prt(e){return new pe(3e3,!1)}function Ef(e){switch(e.length){case 0:return new $x;case 1:return e[0];default:return new SW(e)}}function mrt(e,i,t=new Map,n=new Map){const r=[],s=[];let o=-1,l=null;if(i.forEach(w=>{const E=w.get("offset"),D=E==o,k=D&&l||new Map;w.forEach((O,L)=>{let U=L,j=O;if("offset"!==L)switch(U=e.normalizePropertyName(U,r),j){case"!":j=t.get(L);break;case dh:j=n.get(L);break;default:j=e.normalizeStyleValue(L,U,j,r)}k.set(U,j)}),D||s.push(k),l=k,o=E}),r.length)throw function dqt(){return new pe(3502,!1)}();return s}function J4(e,i,t,n){switch(i){case"start":e.onStart(()=>n(t&&q4(t,"start",e)));break;case"done":e.onDone(()=>n(t&&q4(t,"done",e)));break;case"destroy":e.onDestroy(()=>n(t&&q4(t,"destroy",e)))}}function q4(e,i,t){const s=t3(e.element,e.triggerName,e.fromState,e.toState,i||e.phaseName,t.totalTime??e.totalTime,!!t.disabled),o=e._data;return null!=o&&(s._data=o),s}function t3(e,i,t,n,r="",s=0,o){return{element:e,triggerName:i,fromState:t,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function Hl(e,i,t){let n=e.get(i);return n||e.set(i,n=t),n}function grt(e){const i=e.indexOf(":");return[e.substring(1,i),e.slice(i+1)]}const Sqt=typeof document>"u"?null:document.documentElement;function e3(e){const i=e.parentNode||e.host||null;return i===Sqt?null:i}let Fm=null,vrt=!1;function yrt(e,i){for(;i;){if(i===e)return!0;i=e3(i)}return!1}function xrt(e,i,t){if(t)return Array.from(e.querySelectorAll(i));const n=e.querySelector(i);return n?[n]:[]}let n3=(()=>{class e{validateStyleProperty(t){return function _qt(e){Fm||(Fm=function Aqt(){return typeof document<"u"?document.body:null}()||{},vrt=!!Fm.style&&"WebkitAppearance"in Fm.style);let i=!0;return Fm.style&&!function Eqt(e){return"ebkit"==e.substring(1,6)}(e)&&(i=e in Fm.style,!i&&vrt&&(i="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in Fm.style)),i}(t)}containsElement(t,n){return yrt(t,n)}getParentElement(t){return e3(t)}query(t,n,r){return xrt(t,n,r)}computeStyle(t,n,r){return r||""}animate(t,n,r,s,o,l=[],w){return new $x(r,s)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})();class r3{static{this.NOOP=new n3}}class s3{}const Mqt=1e3,a3="ng-enter",sD="ng-leave",aD="ng-trigger",oD=".ng-trigger",wrt="ng-animating",o3=".ng-animating";function td(e){if("number"==typeof e)return e;const i=e.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:l3(parseFloat(i[1]),i[2])}function l3(e,i){return"s"===i?e*Mqt:e}function lD(e,i,t){return e.hasOwnProperty("duration")?e:function Rqt(e,i,t){let r,s=0,o="";if("string"==typeof e){const l=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===l)return i.push(prt()),{duration:0,delay:0,easing:""};r=l3(parseFloat(l[1]),l[2]);const w=l[3];null!=w&&(s=l3(parseFloat(w),l[4]));const E=l[5];E&&(o=E)}else r=e;if(!t){let l=!1,w=i.length;r<0&&(i.push(function WJt(){return new pe(3100,!1)}()),l=!0),s<0&&(i.push(function jJt(){return new pe(3101,!1)}()),l=!0),l&&i.splice(w,0,prt())}return{duration:r,delay:s,easing:o}}(e,i,t)}function Gu(e,i,t){i.forEach((n,r)=>{const s=u3(r);t&&!t.has(r)&&t.set(r,e.style[s]),e.style[s]=n})}function Om(e,i){i.forEach((t,n)=>{const r=u3(n);e.style[r]=""})}function vw(e){return Array.isArray(e)?1==e.length?e[0]:function JTt(e,i=null){return{type:sn.Sequence,steps:e,options:i}}(e):e}const c3=new RegExp("{{\\s*(.+?)\\s*}}","g");function Crt(e){let i=[];if("string"==typeof e){let t;for(;t=c3.exec(e);)i.push(t[1]);c3.lastIndex=0}return i}function yw(e,i,t){const n=`${e}`,r=n.replace(c3,(s,o)=>{let l=i[o];return null==l&&(t.push(function YJt(){return new pe(3003,!1)}()),l=""),l.toString()});return r==n?e:r}const Fqt=/-+([a-z0-9])/g;function u3(e){return e.replace(Fqt,(...i)=>i[1].toUpperCase())}function Wl(e,i,t){switch(i.type){case sn.Trigger:return e.visitTrigger(i,t);case sn.State:return e.visitState(i,t);case sn.Transition:return e.visitTransition(i,t);case sn.Sequence:return e.visitSequence(i,t);case sn.Group:return e.visitGroup(i,t);case sn.Animate:return e.visitAnimate(i,t);case sn.Keyframes:return e.visitKeyframes(i,t);case sn.Style:return e.visitStyle(i,t);case sn.Reference:return e.visitReference(i,t);case sn.AnimateChild:return e.visitAnimateChild(i,t);case sn.AnimateRef:return e.visitAnimateRef(i,t);case sn.Query:return e.visitQuery(i,t);case sn.Stagger:return e.visitStagger(i,t);default:throw function $Jt(){return new pe(3004,!1)}()}}function h3(e,i){return window.getComputedStyle(e)[i]}const Nqt=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class Srt extends s3{normalizePropertyName(i,t){return u3(i)}normalizeStyleValue(i,t,n,r){let s="";const o=n.toString().trim();if(Nqt.has(t)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const l=n.match(/^[+-]?[\d\.]+([a-z]*)$/);l&&0==l[1].length&&r.push(function QJt(){return new pe(3005,!1)}())}return o+s}}const cD="*";const uD=new Set(["true","1"]),hD=new Set(["false","0"]);function Ert(e,i){const t=uD.has(e)||hD.has(e),n=uD.has(i)||hD.has(i);return(r,s)=>{let o=e==cD||e==r,l=i==cD||i==s;return!o&&t&&"boolean"==typeof r&&(o=r?uD.has(e):hD.has(e)),!l&&n&&"boolean"==typeof s&&(l=s?uD.has(i):hD.has(i)),o&&l}}const zqt=new RegExp("s*:selfs*,?","g");function d3(e,i,t,n){return new Gqt(e).build(i,t,n)}class Gqt{constructor(i){this._driver=i}build(i,t,n){const r=new jqt(t);return this._resetContextStyleTimingState(r),Wl(this,vw(i),r)}_resetContextStyleTimingState(i){i.currentQuerySelector="",i.collectedStyles=new Map,i.collectedStyles.set("",new Map),i.currentTime=0}visitTrigger(i,t){let n=t.queryCount=0,r=t.depCount=0;const s=[],o=[];return"@"==i.name.charAt(0)&&t.errors.push(function KJt(){return new pe(3006,!1)}()),i.definitions.forEach(l=>{if(this._resetContextStyleTimingState(t),l.type==sn.State){const w=l,E=w.name;E.toString().split(/\s*,\s*/).forEach(D=>{w.name=D,s.push(this.visitState(w,t))}),w.name=E}else if(l.type==sn.Transition){const w=this.visitTransition(l,t);n+=w.queryCount,r+=w.depCount,o.push(w)}else t.errors.push(function ZJt(){return new pe(3007,!1)}())}),{type:sn.Trigger,name:i.name,states:s,transitions:o,queryCount:n,depCount:r,options:null}}visitState(i,t){const n=this.visitStyle(i.styles,t),r=i.options&&i.options.params||null;if(n.containsDynamicStyles){const s=new Set,o=r||{};n.styles.forEach(l=>{l instanceof Map&&l.forEach(w=>{Crt(w).forEach(E=>{o.hasOwnProperty(E)||s.add(E)})})}),s.size&&t.errors.push(function JJt(){return new pe(3008,!1)}(0,s.values()))}return{type:sn.State,name:i.name,style:n,options:r?{params:r}:null}}visitTransition(i,t){t.queryCount=0,t.depCount=0;const n=Wl(this,vw(i.animation),t),r=function Bqt(e,i){const t=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(n=>function Vqt(e,i,t){if(":"==e[0]){const w=function Uqt(e,i){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}(e,t);if("function"==typeof w)return void i.push(w);e=w}const n=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return t.push(function oqt(){return new pe(3015,!1)}()),i;const r=n[1],s=n[2],o=n[3];i.push(Ert(r,o)),"<"==s[0]&&(r!=cD||o!=cD)&&i.push(Ert(o,r))}(n,t,i)):t.push(e),t}(i.expr,t.errors);return{type:sn.Transition,matchers:r,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:Lm(i.options)}}visitSequence(i,t){return{type:sn.Sequence,steps:i.steps.map(n=>Wl(this,n,t)),options:Lm(i.options)}}visitGroup(i,t){const n=t.currentTime;let r=0;const s=i.steps.map(o=>{t.currentTime=n;const l=Wl(this,o,t);return r=Math.max(r,t.currentTime),l});return t.currentTime=r,{type:sn.Group,steps:s,options:Lm(i.options)}}visitAnimate(i,t){const n=function Yqt(e,i){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return f3(lD(e,i).duration,0,"");const t=e;if(t.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=f3(0,0,"");return s.dynamic=!0,s.strValue=t,s}const r=lD(t,i);return f3(r.duration,r.delay,r.easing)}(i.timings,t.errors);t.currentAnimateTimings=n;let r,s=i.styles?i.styles:oi({});if(s.type==sn.Keyframes)r=this.visitKeyframes(s,t);else{let o=i.styles,l=!1;if(!o){l=!0;const E={};n.easing&&(E.easing=n.easing),o=oi(E)}t.currentTime+=n.duration+n.delay;const w=this.visitStyle(o,t);w.isEmptyStep=l,r=w}return t.currentAnimateTimings=null,{type:sn.Animate,timings:n,style:r,options:null}}visitStyle(i,t){const n=this._makeStyleAst(i,t);return this._validateStyleAst(n,t),n}_makeStyleAst(i,t){const n=[],r=Array.isArray(i.styles)?i.styles:[i.styles];for(let l of r)"string"==typeof l?l===dh?n.push(l):t.errors.push(new pe(3002,!1)):n.push(new Map(Object.entries(l)));let s=!1,o=null;return n.forEach(l=>{if(l instanceof Map&&(l.has("easing")&&(o=l.get("easing"),l.delete("easing")),!s))for(let w of l.values())if(w.toString().indexOf("{{")>=0){s=!0;break}}),{type:sn.Style,styles:n,easing:o,offset:i.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(i,t){const n=t.currentAnimateTimings;let r=t.currentTime,s=t.currentTime;n&&s>0&&(s-=n.duration+n.delay),i.styles.forEach(o=>{"string"!=typeof o&&o.forEach((l,w)=>{const E=t.collectedStyles.get(t.currentQuerySelector),D=E.get(w);let k=!0;D&&(s!=r&&s>=D.startTime&&r<=D.endTime&&(t.errors.push(function tqt(){return new pe(3010,!1)}()),k=!1),s=D.startTime),k&&E.set(w,{startTime:s,endTime:r}),t.options&&function kqt(e,i,t){const n=i.params||{},r=Crt(e);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||t.push(function XJt(){return new pe(3001,!1)}())})}(l,t.options,t.errors)})})}visitKeyframes(i,t){const n={type:sn.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function eqt(){return new pe(3011,!1)}()),n;let s=0;const o=[];let l=!1,w=!1,E=0;const D=i.steps.map(Z=>{const rt=this._makeStyleAst(Z,t);let st=null!=rt.offset?rt.offset:function Xqt(e){if("string"==typeof e)return null;let i=null;if(Array.isArray(e))e.forEach(t=>{if(t instanceof Map&&t.has("offset")){const n=t;i=parseFloat(n.get("offset")),n.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const t=e;i=parseFloat(t.get("offset")),t.delete("offset")}return i}(rt.styles),yt=0;return null!=st&&(s++,yt=rt.offset=st),w=w||yt<0||yt>1,l=l||yt0&&s{const st=O>0?rt==L?1:O*rt:o[rt],yt=st*W;t.currentTime=U+j.delay+yt,j.duration=yt,this._validateStyleAst(Z,t),Z.offset=st,n.styles.push(Z)}),n}visitReference(i,t){return{type:sn.Reference,animation:Wl(this,vw(i.animation),t),options:Lm(i.options)}}visitAnimateChild(i,t){return t.depCount++,{type:sn.AnimateChild,options:Lm(i.options)}}visitAnimateRef(i,t){return{type:sn.AnimateRef,animation:this.visitReference(i.animation,t),options:Lm(i.options)}}visitQuery(i,t){const n=t.currentQuerySelector,r=i.options||{};t.queryCount++,t.currentQuery=i;const[s,o]=function Hqt(e){const i=!!e.split(/\s*,\s*/).find(t=>":self"==t);return i&&(e=e.replace(zqt,"")),e=e.replace(/@\*/g,oD).replace(/@\w+/g,t=>oD+"-"+t.slice(1)).replace(/:animating/g,o3),[e,i]}(i.selector);t.currentQuerySelector=n.length?n+" "+s:s,Hl(t.collectedStyles,t.currentQuerySelector,new Map);const l=Wl(this,vw(i.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:sn.Query,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:l,originalSelector:i.selector,options:Lm(i.options)}}visitStagger(i,t){t.currentQuery||t.errors.push(function sqt(){return new pe(3013,!1)}());const n="full"===i.timings?{duration:0,delay:0,easing:"full"}:lD(i.timings,t.errors,!0);return{type:sn.Stagger,animation:Wl(this,vw(i.animation),t),timings:n,options:null}}}class jqt{constructor(i){this.errors=i,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Lm(e){return e?(e={...e}).params&&(e.params=function Wqt(e){return e?{...e}:null}(e.params)):e={},e}function f3(e,i,t){return{duration:e,delay:i,easing:t}}function p3(e,i,t,n,r,s,o=null,l=!1){return{type:1,element:e,keyframes:i,preStyleProps:t,postStyleProps:n,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:l}}class dD{constructor(){this._map=new Map}get(i){return this._map.get(i)||[]}append(i,t){let n=this._map.get(i);n||this._map.set(i,n=[]),n.push(...t)}has(i){return this._map.has(i)}clear(){this._map.clear()}}const Kqt=new RegExp(":enter","g"),Jqt=new RegExp(":leave","g");function m3(e,i,t,n,r,s=new Map,o=new Map,l,w,E=[]){return(new qqt).buildKeyframes(e,i,t,n,r,s,o,l,w,E)}class qqt{buildKeyframes(i,t,n,r,s,o,l,w,E,D=[]){E=E||new dD;const k=new g3(i,t,E,r,s,D,[]);k.options=w;const O=w.delay?td(w.delay):0;k.currentTimeline.delayNextStep(O),k.currentTimeline.setStyles([o],null,k.errors,w),Wl(this,n,k);const L=k.timelines.filter(U=>U.containsAnimation());if(L.length&&l.size){let U;for(let j=L.length-1;j>=0;j--){const W=L[j];if(W.element===t){U=W;break}}U&&!U.allowOnlyTimelineStyles()&&U.setStyles([l],null,k.errors,w)}return L.length?L.map(U=>U.buildKeyframes()):[p3(t,[],[],[],0,O,"",!1)]}visitTrigger(i,t){}visitState(i,t){}visitTransition(i,t){}visitAnimateChild(i,t){const n=t.subInstructions.get(t.element);if(n){const r=t.createSubContext(i.options),s=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);s!=o&&t.transformIntoNewTimeline(o)}t.previousNode=i}visitAnimateRef(i,t){const n=t.createSubContext(i.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],t,n),this.visitReference(i.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=i}_applyAnimationRefDelays(i,t,n){for(const r of i){const s=r?.delay;if(s){const o="number"==typeof s?s:td(yw(s,r?.params??{},t.errors));n.delayNextStep(o)}}}_visitSubInstructions(i,t,n){let s=t.currentTimeline.currentTime;const o=null!=n.duration?td(n.duration):null,l=null!=n.delay?td(n.delay):null;return 0!==o&&i.forEach(w=>{const E=t.appendInstructionToTimeline(w,o,l);s=Math.max(s,E.duration+E.delay)}),s}visitReference(i,t){t.updateOptions(i.options,!0),Wl(this,i.animation,t),t.previousNode=i}visitSequence(i,t){const n=t.subContextCount;let r=t;const s=i.options;if(s&&(s.params||s.delay)&&(r=t.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){r.previousNode.type==sn.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=fD);const o=td(s.delay);r.delayNextStep(o)}i.steps.length&&(i.steps.forEach(o=>Wl(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),t.previousNode=i}visitGroup(i,t){const n=[];let r=t.currentTimeline.currentTime;const s=i.options&&i.options.delay?td(i.options.delay):0;i.steps.forEach(o=>{const l=t.createSubContext(i.options);s&&l.delayNextStep(s),Wl(this,o,l),r=Math.max(r,l.currentTimeline.currentTime),n.push(l.currentTimeline)}),n.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(r),t.previousNode=i}_visitTiming(i,t){if(i.dynamic){const n=i.strValue;return lD(t.params?yw(n,t.params,t.errors):n,t.errors)}return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,t){const n=t.currentAnimateTimings=this._visitTiming(i.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());const s=i.style;s.type==sn.Keyframes?this.visitKeyframes(s,t):(t.incrementTime(n.duration),this.visitStyle(s,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=i}visitStyle(i,t){const n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();const s=r&&r.easing||i.easing;i.isEmptyStep?n.applyEmptyStep(s):n.setStyles(i.styles,s,t.errors,t.options),t.previousNode=i}visitKeyframes(i,t){const n=t.currentAnimateTimings,r=t.currentTimeline.duration,s=n.duration,l=t.createSubContext().currentTimeline;l.easing=n.easing,i.styles.forEach(w=>{l.forwardTime((w.offset||0)*s),l.setStyles(w.styles,w.easing,t.errors,t.options),l.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(l),t.transformIntoNewTimeline(r+s),t.previousNode=i}visitQuery(i,t){const n=t.currentTimeline.currentTime,r=i.options||{},s=r.delay?td(r.delay):0;s&&(t.previousNode.type===sn.Style||0==n&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=fD);let o=n;const l=t.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=l.length;let w=null;l.forEach((E,D)=>{t.currentQueryIndex=D;const k=t.createSubContext(i.options,E);s&&k.delayNextStep(s),E===t.element&&(w=k.currentTimeline),Wl(this,i.animation,k),k.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,k.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),w&&(t.currentTimeline.mergeTimelineCollectedStyles(w),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=i}visitStagger(i,t){const n=t.parentContext,r=t.currentTimeline,s=i.timings,o=Math.abs(s.duration),l=o*(t.currentQueryTotal-1);let w=o*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":w=l-w;break;case"full":w=n.currentStaggerTime}const D=t.currentTimeline;w&&D.delayNextStep(w);const k=D.currentTime;Wl(this,i.animation,t),t.previousNode=i,n.currentStaggerTime=r.currentTime-k+(r.startTime-n.currentTimeline.startTime)}}const fD={};class g3{constructor(i,t,n,r,s,o,l,w){this._driver=i,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=l,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=fD,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=w||new pD(this._driver,t,0),l.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,t){if(!i)return;const n=i;let r=this.options;null!=n.duration&&(r.duration=td(n.duration)),null!=n.delay&&(r.delay=td(n.delay));const s=n.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(l=>{(!t||!o.hasOwnProperty(l))&&(o[l]=yw(s[l],o,this.errors))})}}_copyOptions(){const i={};if(this.options){const t=this.options.params;if(t){const n=i.params={};Object.keys(t).forEach(r=>{n[r]=t[r]})}}return i}createSubContext(i=null,t,n){const r=t||this.element,s=new g3(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(i),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(i){return this.previousNode=fD,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,t,n){const r={duration:t??i.duration,delay:this.currentTimeline.currentTime+(n??0)+i.delay,easing:""},s=new tte(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,r,i.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,t,n,r,s,o){let l=[];if(r&&l.push(this.element),i.length>0){i=(i=i.replace(Kqt,"."+this._enterClassName)).replace(Jqt,"."+this._leaveClassName);let E=this._driver.query(this.element,i,1!=n);0!==n&&(E=n<0?E.slice(E.length+n,E.length):E.slice(0,n)),l.push(...E)}return!s&&0==l.length&&o.push(function aqt(){return new pe(3014,!1)}()),l}}class pD{constructor(i,t,n,r){this._driver=i,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(i){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+i),t&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,t){return this.applyStylesToKeyframe(),new pD(this._driver,i,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,t){this._localTimelineStyles.set(i,t),this._globalTimelineStyles.set(i,t),this._styleSummary.set(i,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||dh),this._currentKeyframe.set(t,dh);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,t,n,r){t&&this._previousKeyframe.set("easing",t);const s=r&&r.params||{},o=function ete(e,i){const t=new Map;let n;return e.forEach(r=>{if("*"===r){n??=i.keys();for(let s of n)t.set(s,dh)}else for(let[s,o]of r)t.set(s,o)}),t}(i,this._globalTimelineStyles);for(let[l,w]of o){const E=yw(w,s,n);this._pendingStyles.set(l,E),this._localTimelineStyles.has(l)||this._backFill.set(l,this._globalTimelineStyles.get(l)??dh),this._updateStyle(l,E)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((i,t)=>{this._currentKeyframe.set(t,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,i)}))}snapshotCurrentStyles(){for(let[i,t]of this._localTimelineStyles)this._pendingStyles.set(i,t),this._updateStyle(i,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const i=[];for(let t in this._currentKeyframe)i.push(t);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((t,n)=>{const r=this._styleSummary.get(n);(!r||t.time>r.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const i=new Set,t=new Set,n=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((l,w)=>{const E=new Map([...this._backFill,...l]);E.forEach((D,k)=>{"!"===D?i.add(k):D===dh&&t.add(k)}),n||E.set("offset",w/this.duration),r.push(E)});const s=[...i.values()],o=[...t.values()];if(n){const l=r[0],w=new Map(l);l.set("offset",0),w.set("offset",1),r=[l,w]}return p3(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class tte extends pD{constructor(i,t,n,r,s,o,l=!1){super(i,t,o.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=l,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:t,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const s=[],o=n+t,l=t/o,w=new Map(i[0]);w.set("offset",0),s.push(w);const E=new Map(i[0]);E.set("offset",Drt(l)),s.push(E);const D=i.length-1;for(let k=1;k<=D;k++){let O=new Map(i[k]);const L=O.get("offset");O.set("offset",Drt((t+L*n)/o)),s.push(O)}n=o,t=0,r="",i=s}return p3(this.element,i,this.preStyleProps,this.postStyleProps,n,t,r,!0)}}function Drt(e,i=3){const t=Math.pow(10,i-1);return Math.round(e*t)/t}function Mrt(e,i,t,n,r,s,o,l,w,E,D,k,O){return{type:0,element:e,triggerName:i,isRemovalTransition:r,fromState:t,fromStyles:s,toState:n,toStyles:o,timelines:l,queriedElements:w,preStyleProps:E,postStyleProps:D,totalTime:k,errors:O}}const v3={};class Irt{constructor(i,t,n){this._triggerName=i,this.ast=t,this._stateStyles=n}match(i,t,n,r){return function ite(e,i,t,n,r){return e.some(s=>s(i,t,n,r))}(this.ast.matchers,i,t,n,r)}buildStyles(i,t,n){let r=this._stateStyles.get("*");return void 0!==i&&(r=this._stateStyles.get(i?.toString())||r),r?r.buildStyles(t,n):new Map}build(i,t,n,r,s,o,l,w,E,D){const k=[],O=this.ast.options&&this.ast.options.params||v3,U=this.buildStyles(n,l&&l.params||v3,k),j=w&&w.params||v3,W=this.buildStyles(r,j,k),Z=new Set,rt=new Map,st=new Map,yt="void"===r,Tt={params:Rrt(j,O),delay:this.ast.options?.delay},It=D?[]:m3(i,t,this.ast.animation,s,o,U,W,Tt,E,k);let ft=0;return It.forEach(ht=>{ft=Math.max(ht.duration+ht.delay,ft)}),k.length?Mrt(t,this._triggerName,n,r,yt,U,W,[],[],rt,st,ft,k):(It.forEach(ht=>{const mt=ht.element,wt=Hl(rt,mt,new Set);ht.preStyleProps.forEach(_t=>wt.add(_t));const Ct=Hl(st,mt,new Set);ht.postStyleProps.forEach(_t=>Ct.add(_t)),mt!==t&&Z.add(mt)}),Mrt(t,this._triggerName,n,r,yt,U,W,It,[...Z.values()],rt,st,ft))}}function Rrt(e,i){const t={...i};return Object.entries(e).forEach(([n,r])=>{null!=r&&(t[n]=r)}),t}class nte{constructor(i,t,n){this.styles=i,this.defaultParams=t,this.normalizer=n}buildStyles(i,t){const n=new Map,r=Rrt(i,this.defaultParams);return this.styles.styles.forEach(s=>{"string"!=typeof s&&s.forEach((o,l)=>{o&&(o=yw(o,r,t));const w=this.normalizer.normalizePropertyName(l,t);o=this.normalizer.normalizeStyleValue(l,w,o,t),n.set(l,o)})}),n}}class ste{constructor(i,t,n){this.name=i,this.ast=t,this._normalizer=n,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{this.states.set(r.name,new nte(r.style,r.options&&r.options.params||{},n))}),Prt(this.states,"true","1"),Prt(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new Irt(i,r,this.states))}),this.fallbackTransition=function ate(e,i){return new Irt(e,{type:sn.Transition,animation:{type:sn.Sequence,steps:[],options:null},matchers:[(o,l)=>!0],options:null,queryCount:0,depCount:0},i)}(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,t,n,r){return this.transitionFactories.find(o=>o.match(i,t,n,r))||null}matchStyles(i,t,n){return this.fallbackTransition.buildStyles(i,t,n)}}function Prt(e,i,t){e.has(i)?e.has(t)||e.set(t,e.get(i)):e.has(t)&&e.set(i,e.get(t))}const ote=new dD;class lte{constructor(i,t,n){this.bodyNode=i,this._driver=t,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(i,t){const n=[],s=d3(this._driver,t,n,[]);if(n.length)throw function fqt(){return new pe(3503,!1)}();this._animations.set(i,s)}_buildPlayer(i,t,n){const r=i.element,s=mrt(this._normalizer,i.keyframes,t,n);return this._driver.animate(r,s,i.duration,i.delay,i.easing,[],!0)}create(i,t,n={}){const r=[],s=this._animations.get(i);let o;const l=new Map;if(s?(o=m3(this._driver,t,s,a3,sD,new Map,new Map,n,ote,r),o.forEach(D=>{const k=Hl(l,D.element,new Map);D.postStyleProps.forEach(O=>k.set(O,null))})):(r.push(function pqt(){return new pe(3300,!1)}()),o=[]),r.length)throw function mqt(){return new pe(3504,!1)}();l.forEach((D,k)=>{D.forEach((O,L)=>{D.set(L,this._driver.computeStyle(k,L,dh))})});const E=Ef(o.map(D=>{const k=l.get(D.element);return this._buildPlayer(D,new Map,k)}));return this._playersById.set(i,E),E.onDestroy(()=>this.destroy(i)),this.players.push(E),E}destroy(i){const t=this._getPlayer(i);t.destroy(),this._playersById.delete(i);const n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(i){const t=this._playersById.get(i);if(!t)throw function gqt(){return new pe(3301,!1)}();return t}listen(i,t,n,r){const s=t3(t,"","","");return J4(this._getPlayer(i),n,s,r),()=>{}}command(i,t,n,r){if("register"==n)return void this.register(i,r[0]);if("create"==n)return void this.create(i,t,r[0]||{});const s=this._getPlayer(i);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(i)}}}const krt="ng-animate-queued",y3="ng-animate-disabled",fte=[],Frt={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},pte={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Yc="__ng_removed";class x3{get params(){return this.options.params}constructor(i,t=""){this.namespaceId=t;const n=i&&i.hasOwnProperty("value");if(this.value=function yte(e){return e??null}(n?i.value:i),n){const{value:s,...o}=i;this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){const t=i.params;if(t){const n=this.options.params;Object.keys(t).forEach(r=>{null==n[r]&&(n[r]=t[r])})}}}const xw="void",b3=new x3(xw);class mte{constructor(i,t,n){this.id=i,this.hostElement=t,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+i,wc(t,this._hostClassName)}listen(i,t,n,r){if(!this._triggers.has(t))throw function vqt(){return new pe(3302,!1)}();if(null==n||0==n.length)throw function yqt(){return new pe(3303,!1)}();if(!function xte(e){return"start"==e||"done"==e}(n))throw function xqt(){return new pe(3400,!1)}();const s=Hl(this._elementListeners,i,[]),o={name:t,phase:n,callback:r};s.push(o);const l=Hl(this._engine.statesByElement,i,new Map);return l.has(t)||(wc(i,aD),wc(i,aD+"-"+t),l.set(t,b3)),()=>{this._engine.afterFlush(()=>{const w=s.indexOf(o);w>=0&&s.splice(w,1),this._triggers.has(t)||l.delete(t)})}}register(i,t){return!this._triggers.has(i)&&(this._triggers.set(i,t),!0)}_getTrigger(i){const t=this._triggers.get(i);if(!t)throw function bqt(){return new pe(3401,!1)}();return t}trigger(i,t,n,r=!0){const s=this._getTrigger(t),o=new w3(this.id,t,i);let l=this._engine.statesByElement.get(i);l||(wc(i,aD),wc(i,aD+"-"+t),this._engine.statesByElement.set(i,l=new Map));let w=l.get(t);const E=new x3(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&w&&E.absorbOptions(w.options),l.set(t,E),w||(w=b3),E.value!==xw&&w.value===E.value){if(!function Tte(e,i){const t=Object.keys(e),n=Object.keys(i);if(t.length!=n.length)return!1;for(let r=0;r{Om(i,W),Gu(i,Z)})}return}const O=Hl(this._engine.playersByElement,i,[]);O.forEach(j=>{j.namespaceId==this.id&&j.triggerName==t&&j.queued&&j.destroy()});let L=s.matchTransition(w.value,E.value,i,E.params),U=!1;if(!L){if(!r)return;L=s.fallbackTransition,U=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:t,transition:L,fromState:w,toState:E,player:o,isFallbackTransition:U}),U||(wc(i,krt),o.onStart(()=>{W0(i,krt)})),o.onDone(()=>{let j=this.players.indexOf(o);j>=0&&this.players.splice(j,1);const W=this._engine.playersByElement.get(i);if(W){let Z=W.indexOf(o);Z>=0&&W.splice(Z,1)}}),this.players.push(o),O.push(o),o}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(t=>t.delete(i)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(r=>r.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);const t=this._engine.playersByElement.get(i);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,t){const n=this._engine.driver.query(i,oD,!0);n.forEach(r=>{if(r[Yc])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(i,t,n,r){const s=this._engine.statesByElement.get(i),o=new Map;if(s){const l=[];if(s.forEach((w,E)=>{if(o.set(E,w.value),this._triggers.has(E)){const D=this.trigger(i,E,xw,r);D&&l.push(D)}}),l.length)return this._engine.markElementAsRemoved(this.id,i,!0,t,o),n&&Ef(l).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){const t=this._elementListeners.get(i),n=this._engine.statesByElement.get(i);if(t&&n){const r=new Set;t.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const w=this._triggers.get(o).fallbackTransition,E=n.get(o)||b3,D=new x3(xw),k=new w3(this.id,o,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:o,transition:w,fromState:E,toState:D,player:k,isFallbackTransition:!0})})}}removeNode(i,t){const n=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,t),this.triggerLeaveAnimation(i,t,!0))return;let r=!1;if(n.totalAnimations){const s=n.players.length?n.playersByQueriedElement.get(i):[];if(s&&s.length)r=!0;else{let o=i;for(;o=o.parentNode;)if(n.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(i),r)n.markElementAsRemoved(this.id,i,!1,t);else{const s=i[Yc];(!s||s===Frt)&&(n.afterFlush(()=>this.clearElementCache(i)),n.destroyInnerAnimations(i),n._onRemovalComplete(i,t))}}insertNode(i,t){wc(i,this._hostClassName)}drainQueuedTransitions(i){const t=[];return this._queue.forEach(n=>{const r=n.player;if(r.destroyed)return;const s=n.element,o=this._elementListeners.get(s);o&&o.forEach(l=>{if(l.name==n.triggerName){const w=t3(s,n.triggerName,n.fromState.value,n.toState.value);w._data=i,J4(n.player,l.phase,w,l.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(n)}),this._queue=[],t.sort((n,r)=>{const s=n.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(n.element,r.element)?1:-1})}destroy(i){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}}class gte{_onRemovalComplete(i,t){this.onRemovalComplete(i,t)}constructor(i,t,n){this.bodyNode=i,this.driver=t,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}get queuedPlayers(){const i=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&i.push(n)})}),i}createNamespace(i,t){const n=new mte(i,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[i]=n}_balanceNamespaceList(i,t){const n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,l=this.driver.getParentElement(t);for(;l;){const w=r.get(l);if(w){const E=n.indexOf(w);n.splice(E+1,0,i),o=!0;break}l=this.driver.getParentElement(l)}o||n.unshift(i)}else n.push(i);return r.set(t,i),i}register(i,t){let n=this._namespaceLookup[i];return n||(n=this.createNamespace(i,t)),n}registerTrigger(i,t,n){let r=this._namespaceLookup[i];r&&r.register(t,n)&&this.totalAnimations++}destroy(i,t){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const n=this._fetchNamespace(i);this.namespacesByHostElement.delete(n.hostElement);const r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1),n.destroy(t),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){const t=new Set,n=this.statesByElement.get(i);if(n)for(let r of n.values())if(r.namespaceId){const s=this._fetchNamespace(r.namespaceId);s&&t.add(s)}return t}trigger(i,t,n,r){if(mD(t)){const s=this._fetchNamespace(i);if(s)return s.trigger(t,n,r),!0}return!1}insertNode(i,t,n,r){if(!mD(t))return;const s=t[Yc];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(i){const o=this._fetchNamespace(i);o&&o.insertNode(t,n)}r&&this.collectEnterElement(t)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,t){t?this.disabledNodes.has(i)||(this.disabledNodes.add(i),wc(i,y3)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),W0(i,y3))}removeNode(i,t,n){if(mD(t)){const r=i?this._fetchNamespace(i):null;r?r.removeNode(t,n):this.markElementAsRemoved(i,t,!1,n);const s=this.namespacesByHostElement.get(t);s&&s.id!==i&&s.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(i,t,n,r,s){this.collectedLeaveElements.push(t),t[Yc]={namespaceId:i,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(i,t,n,r,s){return mD(t)?this._fetchNamespace(i).listen(t,n,r,s):()=>{}}_buildInstruction(i,t,n,r,s){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,n,r,i.fromState.options,i.toState.options,t,s)}destroyInnerAnimations(i){let t=this.driver.query(i,oD,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(i,o3,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(i){const t=this.playersByElement.get(i);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(i){const t=this.playersByQueriedElement.get(i);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return Ef(this.players).onDone(()=>i());i()})}processLeaveNode(i){const t=i[Yc];if(t&&t.setForRemoval){if(i[Yc]=Frt,t.namespaceId){this.destroyInnerAnimations(i);const n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(i)}this._onRemovalComplete(i,t.setForRemoval)}i.classList?.contains(y3)&&this.markElementAsDisabled(i,!1),this.driver.query(i,".ng-animate-disabled",!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(i=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){const n=this._whenQuietFns;this._whenQuietFns=[],t.length?Ef(t).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(i){throw function wqt(){return new pe(3402,!1)}()}_flushAnimations(i,t){const n=new dD,r=[],s=new Map,o=[],l=new Map,w=new Map,E=new Map,D=new Set;this.disabledNodes.forEach(ve=>{D.add(ve);const qt=this.driver.query(ve,".ng-animate-queued",!0);for(let _e=0;_e{const _e=a3+j++;U.set(qt,_e),ve.forEach(ze=>wc(ze,_e))});const W=[],Z=new Set,rt=new Set;for(let ve=0;veZ.add(ze)):rt.add(qt))}const st=new Map,yt=Nrt(O,Array.from(Z));yt.forEach((ve,qt)=>{const _e=sD+j++;st.set(qt,_e),ve.forEach(ze=>wc(ze,_e))}),i.push(()=>{L.forEach((ve,qt)=>{const _e=U.get(qt);ve.forEach(ze=>W0(ze,_e))}),yt.forEach((ve,qt)=>{const _e=st.get(qt);ve.forEach(ze=>W0(ze,_e))}),W.forEach(ve=>{this.processLeaveNode(ve)})});const Tt=[],It=[];for(let ve=this._namespaceList.length-1;ve>=0;ve--)this._namespaceList[ve].drainQueuedTransitions(t).forEach(_e=>{const ze=_e.player,Me=_e.element;if(Tt.push(ze),this.collectedEnterElements.length){const hi=Me[Yc];if(hi&&hi.setForMove){if(hi.previousTriggersValues&&hi.previousTriggersValues.has(_e.triggerName)){const Ot=hi.previousTriggersValues.get(_e.triggerName),Qt=this.statesByElement.get(_e.element);if(Qt&&Qt.has(_e.triggerName)){const $t=Qt.get(_e.triggerName);$t.value=Ot,Qt.set(_e.triggerName,$t)}}return void ze.destroy()}}const Ii=!k||!this.driver.containsElement(k,Me),ee=st.get(Me),Ne=U.get(Me),De=this._buildInstruction(_e,n,Ne,ee,Ii);if(De.errors&&De.errors.length)return void It.push(De);if(Ii)return ze.onStart(()=>Om(Me,De.fromStyles)),ze.onDestroy(()=>Gu(Me,De.toStyles)),void r.push(ze);if(_e.isFallbackTransition)return ze.onStart(()=>Om(Me,De.fromStyles)),ze.onDestroy(()=>Gu(Me,De.toStyles)),void r.push(ze);const fi=[];De.timelines.forEach(hi=>{hi.stretchStartingKeyframe=!0,this.disabledNodes.has(hi.element)||fi.push(hi)}),De.timelines=fi,n.append(Me,De.timelines),o.push({instruction:De,player:ze,element:Me}),De.queriedElements.forEach(hi=>Hl(l,hi,[]).push(ze)),De.preStyleProps.forEach((hi,Ot)=>{if(hi.size){let Qt=w.get(Ot);Qt||w.set(Ot,Qt=new Set),hi.forEach(($t,Yt)=>Qt.add(Yt))}}),De.postStyleProps.forEach((hi,Ot)=>{let Qt=E.get(Ot);Qt||E.set(Ot,Qt=new Set),hi.forEach(($t,Yt)=>Qt.add(Yt))})});if(It.length){const ve=[];It.forEach(qt=>{ve.push(function Tqt(){return new pe(3505,!1)}())}),Tt.forEach(qt=>qt.destroy()),this.reportError(ve)}const ft=new Map,ht=new Map;o.forEach(ve=>{const qt=ve.element;n.has(qt)&&(ht.set(qt,qt),this._beforeAnimationBuild(ve.player.namespaceId,ve.instruction,ft))}),r.forEach(ve=>{const qt=ve.element;this._getPreviousPlayers(qt,!1,ve.namespaceId,ve.triggerName,null).forEach(ze=>{Hl(ft,qt,[]).push(ze),ze.destroy()})});const mt=W.filter(ve=>Vrt(ve,w,E)),wt=new Map;Lrt(wt,this.driver,rt,E,dh).forEach(ve=>{Vrt(ve,w,E)&&mt.push(ve)});const _t=new Map;L.forEach((ve,qt)=>{Lrt(_t,this.driver,new Set(ve),w,"!")}),mt.forEach(ve=>{const qt=wt.get(ve),_e=_t.get(ve);wt.set(ve,new Map([...qt?.entries()??[],..._e?.entries()??[]]))});const Dt=[],Ue=[],Te={};o.forEach(ve=>{const{element:qt,player:_e,instruction:ze}=ve;if(n.has(qt)){if(D.has(qt))return _e.onDestroy(()=>Gu(qt,ze.toStyles)),_e.disabled=!0,_e.overrideTotalTime(ze.totalTime),void r.push(_e);let Me=Te;if(ht.size>1){let ee=qt;const Ne=[];for(;ee=ee.parentNode;){const De=ht.get(ee);if(De){Me=De;break}Ne.push(ee)}Ne.forEach(De=>ht.set(De,Me))}const Ii=this._buildAnimation(_e.namespaceId,ze,ft,s,_t,wt);if(_e.setRealPlayer(Ii),Me===Te)Dt.push(_e);else{const ee=this.playersByElement.get(Me);ee&&ee.length&&(_e.parentPlayer=Ef(ee)),r.push(_e)}}else Om(qt,ze.fromStyles),_e.onDestroy(()=>Gu(qt,ze.toStyles)),Ue.push(_e),D.has(qt)&&r.push(_e)}),Ue.forEach(ve=>{const qt=s.get(ve.element);if(qt&&qt.length){const _e=Ef(qt);ve.setRealPlayer(_e)}}),r.forEach(ve=>{ve.parentPlayer?ve.syncPlayerEvents(ve.parentPlayer):ve.destroy()});for(let ve=0;ve!Ii.destroyed);Me.length?bte(this,qt,Me):this.processLeaveNode(qt)}return W.length=0,Dt.forEach(ve=>{this.players.push(ve),ve.onDone(()=>{ve.destroy();const qt=this.players.indexOf(ve);this.players.splice(qt,1)}),ve.play()}),Dt}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,t,n,r,s){let o=[];if(t){const l=this.playersByQueriedElement.get(i);l&&(o=l)}else{const l=this.playersByElement.get(i);if(l){const w=!s||s==xw;l.forEach(E=>{E.queued||!w&&E.triggerName!=r||o.push(E)})}}return(n||r)&&(o=o.filter(l=>!(n&&n!=l.namespaceId||r&&r!=l.triggerName))),o}_beforeAnimationBuild(i,t,n){const s=t.element,o=t.isRemovalTransition?void 0:i,l=t.isRemovalTransition?void 0:t.triggerName;for(const w of t.timelines){const E=w.element,D=E!==s,k=Hl(n,E,[]);this._getPreviousPlayers(E,D,o,l,t.toState).forEach(L=>{const U=L.getRealPlayer();U.beforeDestroy&&U.beforeDestroy(),L.destroy(),k.push(L)})}Om(s,t.fromStyles)}_buildAnimation(i,t,n,r,s,o){const l=t.triggerName,w=t.element,E=[],D=new Set,k=new Set,O=t.timelines.map(U=>{const j=U.element;D.add(j);const W=j[Yc];if(W&&W.removedBeforeQueried)return new $x(U.duration,U.delay);const Z=j!==w,rt=function wte(e){const i=[];return Brt(e,i),i}((n.get(j)||fte).map(ft=>ft.getRealPlayer())).filter(ft=>!!ft.element&&ft.element===j),st=s.get(j),yt=o.get(j),Tt=mrt(this._normalizer,U.keyframes,st,yt),It=this._buildPlayer(U,Tt,rt);if(U.subTimeline&&r&&k.add(j),Z){const ft=new w3(i,l,j);ft.setRealPlayer(It),E.push(ft)}return It});E.forEach(U=>{Hl(this.playersByQueriedElement,U.element,[]).push(U),U.onDone(()=>function vte(e,i,t){let n=e.get(i);if(n){if(n.length){const r=n.indexOf(t);n.splice(r,1)}0==n.length&&e.delete(i)}return n}(this.playersByQueriedElement,U.element,U))}),D.forEach(U=>wc(U,wrt));const L=Ef(O);return L.onDestroy(()=>{D.forEach(U=>W0(U,wrt)),Gu(w,t.toStyles)}),k.forEach(U=>{Hl(r,U,[]).push(L)}),L}_buildPlayer(i,t,n){return t.length>0?this.driver.animate(i.element,t,i.duration,i.delay,i.easing,n):new $x(i.duration,i.delay)}}class w3{constructor(i,t,n){this.namespaceId=i,this.triggerName=t,this.element=n,this._player=new $x,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((t,n)=>{t.forEach(r=>J4(i,n,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){const t=this._player;t.triggerCallback&&i.onStart(()=>t.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,t){Hl(this._queuedCallbacks,i,[]).push(t)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){const t=this._player;t.triggerCallback&&t.triggerCallback(i)}}function mD(e){return e&&1===e.nodeType}function Ort(e,i){const t=e.style.display;return e.style.display=i??"none",t}function Lrt(e,i,t,n,r){const s=[];t.forEach(w=>s.push(Ort(w)));const o=[];n.forEach((w,E)=>{const D=new Map;w.forEach(k=>{const O=i.computeStyle(E,k,r);D.set(k,O),(!O||0==O.length)&&(E[Yc]=pte,o.push(E))}),e.set(E,D)});let l=0;return t.forEach(w=>Ort(w,s[l++])),o}function Nrt(e,i){const t=new Map;if(e.forEach(l=>t.set(l,[])),0==i.length)return t;const r=new Set(i),s=new Map;function o(l){if(!l)return 1;let w=s.get(l);if(w)return w;const E=l.parentNode;return w=t.has(E)?E:r.has(E)?1:o(E),s.set(l,w),w}return i.forEach(l=>{const w=o(l);1!==w&&t.get(w).push(l)}),t}function wc(e,i){e.classList?.add(i)}function W0(e,i){e.classList?.remove(i)}function bte(e,i,t){Ef(t).onDone(()=>e.processLeaveNode(i))}function Brt(e,i){for(let t=0;tr.add(s)):i.set(e,n),t.delete(e),!0}class bw{constructor(i,t,n){this._driver=t,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new gte(i.body,t,n),this._timelineEngine=new lte(i.body,t,n),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(i,t,n,r,s){const o=i+"-"+r;let l=this._triggerCache[o];if(!l){const w=[],D=d3(this._driver,s,w,[]);if(w.length)throw function hqt(){return new pe(3404,!1)}();l=function rte(e,i,t){return new ste(e,i,t)}(r,D,this._normalizer),this._triggerCache[o]=l}this._transitionEngine.registerTrigger(t,r,l)}register(i,t){this._transitionEngine.register(i,t)}destroy(i,t){this._transitionEngine.destroy(i,t)}onInsert(i,t,n,r){this._transitionEngine.insertNode(i,t,n,r)}onRemove(i,t,n){this._transitionEngine.removeNode(i,t,n)}disableAnimations(i,t){this._transitionEngine.markElementAsDisabled(i,t)}process(i,t,n,r){if("@"==n.charAt(0)){const[s,o]=grt(n);this._timelineEngine.command(s,t,o,r)}else this._transitionEngine.trigger(i,t,n,r)}listen(i,t,n,r,s){if("@"==n.charAt(0)){const[o,l]=grt(n);return this._timelineEngine.listen(o,t,l,s)}return this._transitionEngine.listen(i,t,n,r,s)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}}class ww{static{this.initialStylesByElement=new WeakMap}constructor(i,t,n){this._element=i,this._startStyles=t,this._endStyles=n,this._state=0;let r=ww.initialStylesByElement.get(i);r||ww.initialStylesByElement.set(i,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Gu(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Gu(this._element,this._initialStyles),this._endStyles&&(Gu(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(ww.initialStylesByElement.delete(this._element),this._startStyles&&(Om(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Om(this._element,this._endStyles),this._endStyles=null),Gu(this._element,this._initialStyles),this._state=3)}}function T3(e){let i=null;return e.forEach((t,n)=>{(function Ste(e){return"display"===e||"position"===e})(n)&&(i=i||new Map,i.set(n,t))}),i}class Urt{constructor(i,t,n,r){this.element=i,this.keyframes=t,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const i=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,i,this.options),this._finalKeyframe=i.length?i[i.length-1]:new Map;const t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(i){const t=[];return i.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(i,t,n){return i.animate(this._convertKeyframesToObject(t),n)}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(i=>i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}setPosition(i){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=i*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,r)=>{"offset"!==r&&i.set(r,this._finished?n:h3(this.element,r))}),this.currentSnapshot=i}triggerCallback(i){const t="start"===i?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}}class zrt{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}containsElement(i,t){return yrt(i,t)}getParentElement(i){return e3(i)}query(i,t,n){return xrt(i,t,n)}computeStyle(i,t,n){return h3(i,t)}animate(i,t,n,r,s,o=[]){const w={duration:n,delay:r,fill:0==r?"both":"forwards"};s&&(w.easing=s);const E=new Map,D=o.filter(L=>L instanceof Urt);(function Oqt(e,i){return 0===e||0===i})(n,r)&&D.forEach(L=>{L.currentSnapshot.forEach((U,j)=>E.set(j,U))});let k=function Pqt(e){return e.length?e[0]instanceof Map?e:e.map(i=>new Map(Object.entries(i))):[]}(t).map(L=>new Map(L));k=function Lqt(e,i,t){if(t.size&&i.length){let n=i[0],r=[];if(t.forEach((s,o)=>{n.has(o)||r.push(o),n.set(o,s)}),r.length)for(let s=1;so.set(l,h3(e,l)))}}return i}(i,k,E);const O=function Cte(e,i){let t=null,n=null;return Array.isArray(i)&&i.length?(t=T3(i[0]),i.length>1&&(n=T3(i[i.length-1]))):i instanceof Map&&(t=T3(i)),t||n?new ww(e,t,n):null}(i,k);return new Urt(i,k,w,O)}}const Grt="@.disabled";class Hrt{constructor(i,t,n,r){this.namespaceId=i,this.delegate=t,this.engine=n,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,t){return this.delegate.createElement(i,t)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,t){this.delegate.appendChild(i,t),this.engine.onInsert(this.namespaceId,t,i,!1)}insertBefore(i,t,n,r=!0){this.delegate.insertBefore(i,t,n),this.engine.onInsert(this.namespaceId,t,i,r)}removeChild(i,t,n){this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(i,t){return this.delegate.selectRootElement(i,t)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,t,n,r){this.delegate.setAttribute(i,t,n,r)}removeAttribute(i,t,n){this.delegate.removeAttribute(i,t,n)}addClass(i,t){this.delegate.addClass(i,t)}removeClass(i,t){this.delegate.removeClass(i,t)}setStyle(i,t,n,r){this.delegate.setStyle(i,t,n,r)}removeStyle(i,t,n){this.delegate.removeStyle(i,t,n)}setProperty(i,t,n){"@"==t.charAt(0)&&t==Grt?this.disableAnimations(i,!!n):this.delegate.setProperty(i,t,n)}setValue(i,t){this.delegate.setValue(i,t)}listen(i,t,n){return this.delegate.listen(i,t,n)}disableAnimations(i,t){this.engine.disableAnimations(i,t)}}class Ete extends Hrt{constructor(i,t,n,r,s){super(t,n,r,s),this.factory=i,this.namespaceId=t}setProperty(i,t,n){"@"==t.charAt(0)?"."==t.charAt(1)&&t==Grt?this.disableAnimations(i,n=void 0===n||!!n):this.engine.process(this.namespaceId,i,t.slice(1),n):this.delegate.setProperty(i,t,n)}listen(i,t,n){if("@"==t.charAt(0)){const r=function _te(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(i);let s=t.slice(1),o="";return"@"!=s.charAt(0)&&([s,o]=function Ate(e){const i=e.indexOf(".");return[e.substring(0,i),e.slice(i+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,l=>{this.factory.scheduleListenerCallback(l._data||-1,n,l)})}return this.delegate.listen(i,t,n)}}class Dte{constructor(i,t,n){this.delegate=i,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(r,s)=>{s?.removeChild(null,r)}}createRenderer(i,t){const r=this.delegate.createRenderer(i,t);if(!i||!t?.data?.animation){const E=this._rendererCache;let D=E.get(r);return D||(D=new Hrt("",r,this.engine,()=>E.delete(r)),E.set(r,D)),D}const s=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,i);const l=E=>{Array.isArray(E)?E.forEach(l):this.engine.registerTrigger(s,o,i,E.name,E)};return t.data.animation.forEach(l),new Ete(this,o,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,t,n){if(i>=0&&it(n));const r=this._animationCallbacksBuffer;0==r.length&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(s=>{const[o,l]=s;o(l)}),this._animationCallbacksBuffer=[]})}),r.push([t,n])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}const Wrt=[{provide:s3,useFactory:function Ite(){return new Srt}},{provide:bw,useClass:(()=>{class e extends bw{constructor(t,n,r){super(t,n,r)}ngOnDestroy(){this.flush()}static{this.\u0275fac=function(n){return new(n||e)(re(Gi),re(r3),re(s3))}}static{this.\u0275prov=Ie({token:e,factory:e.\u0275fac})}}return e})()},{provide:GT,useFactory:function Rte(e,i,t){return new Dte(e,i,t)},deps:[_R,bw,li]}],C3=[{provide:r3,useFactory:()=>new zrt},{provide:Hr,useValue:"BrowserAnimations"},...Wrt],jrt=[{provide:r3,useClass:n3},{provide:Hr,useValue:"NoopAnimations"},...Wrt];let Pte=(()=>{class e{static withConfig(t){return{ngModule:e,providers:t.disableAnimations?jrt:C3}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({providers:C3,imports:[IG]})}}return e})(),kte=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,rn]})}}return e})(),cee=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[EP,hu,rn,fv,fW,kte]})}}return e})(),xee=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e})}static{this.\u0275inj=Ui({imports:[rn,fv]})}}return e})();Pp("firebase","10.12.3","app"),m$({apiKey:"AIzaSyAFjiIuMBA1IpTrw__WdkQiK5PKht4_go8",authDomain:"snoguess-e4d1c.firebaseapp.com",projectId:"snoguess-e4d1c",storageBucket:"snoguess-e4d1c.appspot.com",messagingSenderId:"289449411190",appId:"1:289449411190:web:49ff68411f9e5148f11557"});let Tee=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Hi({type:e,bootstrap:[HJt]})}static{this.\u0275inj=Ui({providers:[mwt(fp(Ad.LegacyInterceptors,[{provide:T7,useFactory:rwt},{provide:Bx,useExisting:T7,multi:!0}]))],imports:[IG,hDt,UUt,Pte,AMt,TJt,VP,sSt,xSt,$Ct,yRt,SE,Z_t,ESt,nAt,i_t,lDt,kSt,rEt,kX,Fk,BX,jDt,rIt,dIt,zMt,CIt,cee,x2t,Fk,RJt,xee,O2t]})}}return e})();Tyt().bootstrapModule(Tee).catch(e=>console.error(e))},1867:(Wt,de,Mt)=>{const jt=Mt(6293).a,Xt=Mt(7687).array;Wt.exports=class S{constructor(a={}){Object.assign(this,{list:a.emptyList&&[]||Array.prototype.concat.apply(jt,[Xt,a.list||[]]),exclude:a.exclude||[],splitRegex:a.splitRegex||/\b/,placeHolder:a.placeHolder||"*",regex:a.regex||/[^a-zA-Z0-9|\$|\@]|\^/g,replaceRegex:a.replaceRegex||/\w/g})}isProfane(a){return this.list.filter(y=>{const C=new RegExp(`\\b${y.replace(/(\W)/g,"\\$1")}\\b`,"gi");return!this.exclude.includes(y.toLowerCase())&&C.test(a)}).length>0||!1}replaceWord(a){return a.replace(this.regex,"").replace(this.replaceRegex,this.placeHolder)}clean(a){return a.split(this.splitRegex).map(y=>this.isProfane(y)?this.replaceWord(y):y).join(this.splitRegex.exec(a)[0])}addWords(){let a=Array.from(arguments);this.list.push(...a),a.map(y=>y.toLowerCase()).forEach(y=>{this.exclude.includes(y)&&this.exclude.splice(this.exclude.indexOf(y),1)})}removeWords(){this.exclude.push(...Array.from(arguments).map(a=>a.toLowerCase()))}}},8402:Wt=>{Wt.exports=["4r5e","5h1t","5hit","a55","anal","anus","ar5e","arrse","arse","ass","ass-fucker","asses","assfucker","assfukka","asshole","assholes","asswhole","a_s_s","b!tch","b00bs","b17ch","b1tch","ballbag","balls","ballsack","bastard","beastial","beastiality","bellend","bestial","bestiality","bi+ch","biatch","bitch","bitcher","bitchers","bitches","bitchin","bitching","bloody","blow job","blowjob","blowjobs","boiolas","bollock","bollok","boner","boob","boobs","booobs","boooobs","booooobs","booooooobs","breasts","buceta","bugger","bum","bunny fucker","butt","butthole","buttmuch","buttplug","c0ck","c0cksucker","carpet muncher","cawk","chink","cipa","cl1t","clit","clitoris","clits","cnut","cock","cock-sucker","cockface","cockhead","cockmunch","cockmuncher","cocks","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cok","cokmuncher","coksucka","coon","cox","crap","cum","cummer","cumming","cums","cumshot","cunilingus","cunillingus","cunnilingus","cunt","cuntlick","cuntlicker","cuntlicking","cunts","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","d1ck","damn","dick","dickhead","dildo","dildos","dink","dinks","dirsa","dlck","dog-fucker","doggin","dogging","donkeyribber","doosh","duche","dyke","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejakulate","f u c k","f u c k e r","f4nny","fag","fagging","faggitt","faggot","faggs","fagot","fagots","fags","fanny","fannyflaps","fannyfucker","fanyy","fatass","fcuk","fcuker","fcuking","feck","fecker","felching","fellate","fellatio","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","flange","fook","fooker","fuck","fucka","fucked","fucker","fuckers","fuckhead","fuckheads","fuckin","fucking","fuckings","fuckingshitmotherfucker","fuckme","fucks","fuckwhit","fuckwit","fudge packer","fudgepacker","fuk","fuker","fukker","fukkin","fuks","fukwhit","fukwit","fux","fux0r","f_u_c_k","gangbang","gangbanged","gangbangs","gaylord","gaysex","goatse","God","god-dam","god-damned","goddamn","goddamned","hardcoresex","hell","heshe","hoar","hoare","hoer","homo","hore","horniest","horny","hotsex","jack-off","jackoff","jap","jerk-off","jism","jiz","jizm","jizz","kawk","knob","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","kock","kondum","kondums","kum","kummer","kumming","kums","kunilingus","l3i+ch","l3itch","labia","lust","lusting","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","masochist","master-bate","masterb8","masterbat*","masterbat3","masterbate","masterbation","masterbations","masturbate","mo-fo","mof0","mofo","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","motherfuck","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","muff","mutha","muthafecker","muthafuckker","muther","mutherfucker","n1gga","n1gger","nazi","nigg3r","nigg4h","nigga","niggah","niggas","niggaz","nigger","niggers","nob","nob jokey","nobhead","nobjocky","nobjokey","numbnuts","nutsack","orgasim","orgasims","orgasm","orgasms","p0rn","pawn","pecker","penis","penisfucker","phonesex","phuck","phuk","phuked","phuking","phukked","phukking","phuks","phuq","pigfucker","pimpis","piss","pissed","pisser","pissers","pisses","pissflaps","pissin","pissing","pissoff","poop","porn","porno","pornography","pornos","prick","pricks","pron","pube","pusse","pussi","pussies","pussy","pussys","rectum","retard","rimjaw","rimming","s hit","s.o.b.","sadist","schlong","screwing","scroat","scrote","scrotum","semen","sex","sh!+","sh!t","sh1t","shag","shagger","shaggin","shagging","shemale","shi+","shit","shitdick","shite","shited","shitey","shitfuck","shitfull","shithead","shiting","shitings","shits","shitted","shitter","shitters","shitting","shittings","shitty","skank","slut","sluts","smegma","smut","snatch","son-of-a-bitch","spac","spunk","s_h_i_t","t1tt1e5","t1tties","teets","teez","testical","testicle","tit","titfuck","tits","titt","tittie5","tittiefucker","titties","tittyfuck","tittywank","titwank","tosser","turd","tw4t","twat","twathead","twatty","twunt","twunter","v14gra","v1gra","vagina","viagra","vulva","w00se","wang","wank","wanker","wanky","whoar","whore","willies","willy","xrated","xxx"]},7687:(Wt,de,Mt)=>{Wt.exports={object:Mt(424),array:Mt(8402),regex:Mt(6658)}},424:Wt=>{Wt.exports={"4r5e":1,"5h1t":1,"5hit":1,a55:1,anal:1,anus:1,ar5e:1,arrse:1,arse:1,ass:1,"ass-fucker":1,asses:1,assfucker:1,assfukka:1,asshole:1,assholes:1,asswhole:1,a_s_s:1,"b!tch":1,b00bs:1,b17ch:1,b1tch:1,ballbag:1,balls:1,ballsack:1,bastard:1,beastial:1,beastiality:1,bellend:1,bestial:1,bestiality:1,"bi+ch":1,biatch:1,bitch:1,bitcher:1,bitchers:1,bitches:1,bitchin:1,bitching:1,bloody:1,"blow job":1,blowjob:1,blowjobs:1,boiolas:1,bollock:1,bollok:1,boner:1,boob:1,boobs:1,booobs:1,boooobs:1,booooobs:1,booooooobs:1,breasts:1,buceta:1,bugger:1,bum:1,"bunny fucker":1,butt:1,butthole:1,buttmuch:1,buttplug:1,c0ck:1,c0cksucker:1,"carpet muncher":1,cawk:1,chink:1,cipa:1,cl1t:1,clit:1,clitoris:1,clits:1,cnut:1,cock:1,"cock-sucker":1,cockface:1,cockhead:1,cockmunch:1,cockmuncher:1,cocks:1,cocksuck:1,cocksucked:1,cocksucker:1,cocksucking:1,cocksucks:1,cocksuka:1,cocksukka:1,cok:1,cokmuncher:1,coksucka:1,coon:1,cox:1,crap:1,cum:1,cummer:1,cumming:1,cums:1,cumshot:1,cunilingus:1,cunillingus:1,cunnilingus:1,cunt:1,cuntlick:1,cuntlicker:1,cuntlicking:1,cunts:1,cyalis:1,cyberfuc:1,cyberfuck:1,cyberfucked:1,cyberfucker:1,cyberfuckers:1,cyberfucking:1,d1ck:1,damn:1,dick:1,dickhead:1,dildo:1,dildos:1,dink:1,dinks:1,dirsa:1,dlck:1,"dog-fucker":1,doggin:1,dogging:1,donkeyribber:1,doosh:1,duche:1,dyke:1,ejaculate:1,ejaculated:1,ejaculates:1,ejaculating:1,ejaculatings:1,ejaculation:1,ejakulate:1,"f u c k":1,"f u c k e r":1,f4nny:1,fag:1,fagging:1,faggitt:1,faggot:1,faggs:1,fagot:1,fagots:1,fags:1,fanny:1,fannyflaps:1,fannyfucker:1,fanyy:1,fatass:1,fcuk:1,fcuker:1,fcuking:1,feck:1,fecker:1,felching:1,fellate:1,fellatio:1,fingerfuck:1,fingerfucked:1,fingerfucker:1,fingerfuckers:1,fingerfucking:1,fingerfucks:1,fistfuck:1,fistfucked:1,fistfucker:1,fistfuckers:1,fistfucking:1,fistfuckings:1,fistfucks:1,flange:1,fook:1,fooker:1,fuck:1,fucka:1,fucked:1,fucker:1,fuckers:1,fuckhead:1,fuckheads:1,fuckin:1,fucking:1,fuckings:1,fuckingshitmotherfucker:1,fuckme:1,fucks:1,fuckwhit:1,fuckwit:1,"fudge packer":1,fudgepacker:1,fuk:1,fuker:1,fukker:1,fukkin:1,fuks:1,fukwhit:1,fukwit:1,fux:1,fux0r:1,f_u_c_k:1,gangbang:1,gangbanged:1,gangbangs:1,gaylord:1,gaysex:1,goatse:1,God:1,"god-dam":1,"god-damned":1,goddamn:1,goddamned:1,hardcoresex:1,hell:1,heshe:1,hoar:1,hoare:1,hoer:1,homo:1,hore:1,horniest:1,horny:1,hotsex:1,"jack-off":1,jackoff:1,jap:1,"jerk-off":1,jism:1,jiz:1,jizm:1,jizz:1,kawk:1,knob:1,knobead:1,knobed:1,knobend:1,knobhead:1,knobjocky:1,knobjokey:1,kock:1,kondum:1,kondums:1,kum:1,kummer:1,kumming:1,kums:1,kunilingus:1,"l3i+ch":1,l3itch:1,labia:1,lust:1,lusting:1,m0f0:1,m0fo:1,m45terbate:1,ma5terb8:1,ma5terbate:1,masochist:1,"master-bate":1,masterb8:1,"masterbat*":1,masterbat3:1,masterbate:1,masterbation:1,masterbations:1,masturbate:1,"mo-fo":1,mof0:1,mofo:1,mothafuck:1,mothafucka:1,mothafuckas:1,mothafuckaz:1,mothafucked:1,mothafucker:1,mothafuckers:1,mothafuckin:1,mothafucking:1,mothafuckings:1,mothafucks:1,"mother fucker":1,motherfuck:1,motherfucked:1,motherfucker:1,motherfuckers:1,motherfuckin:1,motherfucking:1,motherfuckings:1,motherfuckka:1,motherfucks:1,muff:1,mutha:1,muthafecker:1,muthafuckker:1,muther:1,mutherfucker:1,n1gga:1,n1gger:1,nazi:1,nigg3r:1,nigg4h:1,nigga:1,niggah:1,niggas:1,niggaz:1,nigger:1,niggers:1,nob:1,"nob jokey":1,nobhead:1,nobjocky:1,nobjokey:1,numbnuts:1,nutsack:1,orgasim:1,orgasims:1,orgasm:1,orgasms:1,p0rn:1,pawn:1,pecker:1,penis:1,penisfucker:1,phonesex:1,phuck:1,phuk:1,phuked:1,phuking:1,phukked:1,phukking:1,phuks:1,phuq:1,pigfucker:1,pimpis:1,piss:1,pissed:1,pisser:1,pissers:1,pisses:1,pissflaps:1,pissin:1,pissing:1,pissoff:1,poop:1,porn:1,porno:1,pornography:1,pornos:1,prick:1,pricks:1,pron:1,pube:1,pusse:1,pussi:1,pussies:1,pussy:1,pussys:1,rectum:1,retard:1,rimjaw:1,rimming:1,"s hit":1,"s.o.b.":1,sadist:1,schlong:1,screwing:1,scroat:1,scrote:1,scrotum:1,semen:1,sex:1,"sh!+":1,"sh!t":1,sh1t:1,shag:1,shagger:1,shaggin:1,shagging:1,shemale:1,"shi+":1,shit:1,shitdick:1,shite:1,shited:1,shitey:1,shitfuck:1,shitfull:1,shithead:1,shiting:1,shitings:1,shits:1,shitted:1,shitter:1,shitters:1,shitting:1,shittings:1,shitty:1,skank:1,slut:1,sluts:1,smegma:1,smut:1,snatch:1,"son-of-a-bitch":1,spac:1,spunk:1,s_h_i_t:1,t1tt1e5:1,t1tties:1,teets:1,teez:1,testical:1,testicle:1,tit:1,titfuck:1,tits:1,titt:1,tittie5:1,tittiefucker:1,titties:1,tittyfuck:1,tittywank:1,titwank:1,tosser:1,turd:1,tw4t:1,twat:1,twathead:1,twatty:1,twunt:1,twunter:1,v14gra:1,v1gra:1,vagina:1,viagra:1,vulva:1,w00se:1,wang:1,wank:1,wanker:1,wanky:1,whoar:1,whore:1,willies:1,willy:1,xrated:1,xxx:1}},6658:Wt=>{Wt.exports=/\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi},2578:function(Wt,de){var Mt,Xt;void 0!==(Xt="function"==typeof(Mt=function(){"use strict";function P(d,c,h){var p=new XMLHttpRequest;p.open("GET",d),p.responseType="blob",p.onload=function(){f(p.response,c,h)},p.onerror=function(){console.error("could not download file")},p.send()}function a(d){var c=new XMLHttpRequest;c.open("HEAD",d,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function y(d){try{d.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),d.dispatchEvent(c)}}var C="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,g=C.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=C.saveAs||("object"!=typeof window||window!==C?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(d,c,h){var p=C.URL||C.webkitURL,u=document.createElement("a");u.download=c=c||d.name||"download",u.rel="noopener","string"==typeof d?(u.href=d,u.origin===location.origin?y(u):a(u.href)?P(d,c,h):y(u,u.target="_blank")):(u.href=p.createObjectURL(d),setTimeout(function(){p.revokeObjectURL(u.href)},4e4),setTimeout(function(){y(u)},0))}:"msSaveOrOpenBlob"in navigator?function(d,c,h){if(c=c||d.name||"download","string"!=typeof d)navigator.msSaveOrOpenBlob(function S(d,c){return typeof c>"u"?c={autoBom:!1}:"object"!=typeof c&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(d.type)?new Blob(["\ufeff",d],{type:d.type}):d}(d,h),c);else if(a(d))P(d,c,h);else{var p=document.createElement("a");p.href=d,p.target="_blank",setTimeout(function(){y(p)})}}:function(d,c,h,p){if((p=p||open("","_blank"))&&(p.document.title=p.document.body.innerText="downloading..."),"string"==typeof d)return P(d,c,h);var u="application/octet-stream"===d.type,m=/constructor/i.test(C.HTMLElement)||C.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||u&&m||g)&&typeof FileReader<"u"){var x=new FileReader;x.onloadend=function(){var _=x.result;_=v?_:_.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=_:location=_,p=null},x.readAsDataURL(d)}else{var b=C.URL||C.webkitURL,T=b.createObjectURL(d);p?p.location=T:location.href=T,p=null,setTimeout(function(){b.revokeObjectURL(T)},4e4)}});C.saveAs=f.saveAs=f,Wt.exports=f})?Mt.apply(de,[]):Mt)&&(Wt.exports=Xt)},5013:(Wt,de,Mt)=>{var S=Mt(4385)(Mt(1464),"DataView");Wt.exports=S},3028:(Wt,de,Mt)=>{var jt=Mt(6399),Xt=Mt(1483),S=Mt(3434),P=Mt(5230),a=Mt(3718);function y(C){var g=-1,f=null==C?0:C.length;for(this.clear();++g{var jt=Mt(3643),Xt=Mt(7103),S=Mt(62),P=Mt(1610),a=Mt(1090);function y(C){var g=-1,f=null==C?0:C.length;for(this.clear();++g{var S=Mt(4385)(Mt(1464),"Map");Wt.exports=S},752:(Wt,de,Mt)=>{var jt=Mt(1891),Xt=Mt(2759),S=Mt(7766),P=Mt(322),a=Mt(7258);function y(C){var g=-1,f=null==C?0:C.length;for(this.clear();++g{var S=Mt(4385)(Mt(1464),"Promise");Wt.exports=S},7814:(Wt,de,Mt)=>{var S=Mt(4385)(Mt(1464),"Set");Wt.exports=S},6898:(Wt,de,Mt)=>{var jt=Mt(5752),Xt=Mt(8945),S=Mt(8425),P=Mt(5280),a=Mt(324),y=Mt(4516);function C(g){var f=this.__data__=new jt(g);this.size=f.size}C.prototype.clear=Xt,C.prototype.delete=S,C.prototype.get=P,C.prototype.has=a,C.prototype.set=y,Wt.exports=C},8516:(Wt,de,Mt)=>{var jt=Mt(1464);Wt.exports=jt.Symbol},2737:(Wt,de,Mt)=>{var jt=Mt(1464);Wt.exports=jt.Uint8Array},2248:(Wt,de,Mt)=>{var S=Mt(4385)(Mt(1464),"WeakMap");Wt.exports=S},5558:Wt=>{Wt.exports=function de(Mt,jt){for(var Xt=-1,S=null==Mt?0:Mt.length;++Xt{Wt.exports=function de(Mt,jt){for(var Xt=-1,S=null==Mt?0:Mt.length,P=0,a=[];++Xt{var jt=Mt(9695),Xt=Mt(6265),S=Mt(9812),P=Mt(3151),a=Mt(8426),y=Mt(1028),g=Object.prototype.hasOwnProperty;Wt.exports=function f(d,c){var h=S(d),p=!h&&Xt(d),u=!h&&!p&&P(d),m=!h&&!p&&!u&&y(d),v=h||p||u||m,x=v?jt(d.length,String):[],b=x.length;for(var T in d)(c||g.call(d,T))&&(!v||!("length"==T||u&&("offset"==T||"parent"==T)||m&&("buffer"==T||"byteLength"==T||"byteOffset"==T)||a(T,b)))&&x.push(T);return x}},6319:Wt=>{Wt.exports=function de(Mt,jt){for(var Xt=-1,S=jt.length,P=Mt.length;++Xt{var jt=Mt(4399),Xt=Mt(2651),P=Object.prototype.hasOwnProperty;Wt.exports=function a(y,C,g){var f=y[C];(!P.call(y,C)||!Xt(f,g)||void 0===g&&!(C in y))&&jt(y,C,g)}},6316:(Wt,de,Mt)=>{var jt=Mt(2651);Wt.exports=function Xt(S,P){for(var a=S.length;a--;)if(jt(S[a][0],P))return a;return-1}},8336:(Wt,de,Mt)=>{var jt=Mt(3190),Xt=Mt(2561);Wt.exports=function S(P,a){return P&&jt(a,Xt(a),P)}},6303:(Wt,de,Mt)=>{var jt=Mt(3190),Xt=Mt(7674);Wt.exports=function S(P,a){return P&&jt(a,Xt(a),P)}},4399:(Wt,de,Mt)=>{var jt=Mt(4678);Wt.exports=function Xt(S,P,a){"__proto__"==P&&jt?jt(S,P,{configurable:!0,enumerable:!0,value:a,writable:!0}):S[P]=a}},5052:(Wt,de,Mt)=>{var jt=Mt(6898),Xt=Mt(5558),S=Mt(9220),P=Mt(8336),a=Mt(6303),y=Mt(7697),C=Mt(5820),g=Mt(5308),f=Mt(7491),d=Mt(3539),c=Mt(9088),h=Mt(828),p=Mt(9900),u=Mt(9686),m=Mt(2870),v=Mt(9812),x=Mt(3151),b=Mt(6879),T=Mt(3278),_=Mt(4257),A=Mt(2561),M=Mt(7674),N="[object Arguments]",H="[object Function]",lt="[object Object]",Ye={};Ye[N]=Ye["[object Array]"]=Ye["[object ArrayBuffer]"]=Ye["[object DataView]"]=Ye["[object Boolean]"]=Ye["[object Date]"]=Ye["[object Float32Array]"]=Ye["[object Float64Array]"]=Ye["[object Int8Array]"]=Ye["[object Int16Array]"]=Ye["[object Int32Array]"]=Ye["[object Map]"]=Ye["[object Number]"]=Ye[lt]=Ye["[object RegExp]"]=Ye["[object Set]"]=Ye["[object String]"]=Ye["[object Symbol]"]=Ye["[object Uint8Array]"]=Ye["[object Uint8ClampedArray]"]=Ye["[object Uint16Array]"]=Ye["[object Uint32Array]"]=!0,Ye["[object Error]"]=Ye[H]=Ye["[object WeakMap]"]=!1,Wt.exports=function Pe(Qe,Se,ei,ri,Bi,tn){var on,ln=1&Se,hn=2&Se,Mr=4&Se;if(ei&&(on=Bi?ei(Qe,ri,Bi,tn):ei(Qe)),void 0!==on)return on;if(!T(Qe))return Qe;var Ur=v(Qe);if(Ur){if(on=p(Qe),!ln)return C(Qe,on)}else{var dn=h(Qe),or=dn==H||"[object GeneratorFunction]"==dn;if(x(Qe))return y(Qe,ln);if(dn==lt||dn==N||or&&!Bi){if(on=hn||or?{}:m(Qe),!ln)return hn?f(Qe,a(on,Qe)):g(Qe,P(on,Qe))}else{if(!Ye[dn])return Bi?Qe:{};on=u(Qe,dn,ln)}}tn||(tn=new jt);var Fr=tn.get(Qe);if(Fr)return Fr;tn.set(Qe,on),_(Qe)?Qe.forEach(function(js){on.add(Pe(js,Se,ei,js,Qe,tn))}):b(Qe)&&Qe.forEach(function(js,Va){on.set(Va,Pe(js,Se,ei,Va,Qe,tn))});var Xl=Ur?void 0:(Mr?hn?c:d:hn?M:A)(Qe);return Xt(Xl||Qe,function(js,Va){Xl&&(js=Qe[Va=js]),S(on,Va,Pe(js,Se,ei,Va,Qe,tn))}),on}},9593:(Wt,de,Mt)=>{var jt=Mt(3278),Xt=Object.create;Wt.exports=function(){function P(){}return function(a){if(!jt(a))return{};if(Xt)return Xt(a);P.prototype=a;var y=new P;return P.prototype=void 0,y}}()},9926:(Wt,de,Mt)=>{var jt=Mt(6319),Xt=Mt(9812);Wt.exports=function S(P,a,y){var C=a(P);return Xt(P)?C:jt(C,y(P))}},1057:(Wt,de,Mt)=>{var jt=Mt(8516),Xt=Mt(8488),S=Mt(3327),y=jt?jt.toStringTag:void 0;Wt.exports=function C(g){return null==g?void 0===g?"[object Undefined]":"[object Null]":y&&y in Object(g)?Xt(g):S(g)}},8313:(Wt,de,Mt)=>{var jt=Mt(1057),Xt=Mt(7433);Wt.exports=function P(a){return Xt(a)&&"[object Arguments]"==jt(a)}},6095:(Wt,de,Mt)=>{var jt=Mt(828),Xt=Mt(7433);Wt.exports=function P(a){return Xt(a)&&"[object Map]"==jt(a)}},298:(Wt,de,Mt)=>{var jt=Mt(8653),Xt=Mt(8401),S=Mt(3278),P=Mt(8020),y=/^\[object .+?Constructor\]$/,c=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Wt.exports=function h(p){return!(!S(p)||Xt(p))&&(jt(p)?c:y).test(P(p))}},1889:(Wt,de,Mt)=>{var jt=Mt(828),Xt=Mt(7433);Wt.exports=function P(a){return Xt(a)&&"[object Set]"==jt(a)}},8068:(Wt,de,Mt)=>{var jt=Mt(1057),Xt=Mt(8845),S=Mt(7433),B={};B["[object Float32Array]"]=B["[object Float64Array]"]=B["[object Int8Array]"]=B["[object Int16Array]"]=B["[object Int32Array]"]=B["[object Uint8Array]"]=B["[object Uint8ClampedArray]"]=B["[object Uint16Array]"]=B["[object Uint32Array]"]=!0,B["[object Arguments]"]=B["[object Array]"]=B["[object ArrayBuffer]"]=B["[object Boolean]"]=B["[object DataView]"]=B["[object Date]"]=B["[object Error]"]=B["[object Function]"]=B["[object Map]"]=B["[object Number]"]=B["[object Object]"]=B["[object RegExp]"]=B["[object Set]"]=B["[object String]"]=B["[object WeakMap]"]=!1,Wt.exports=function G(Q){return S(Q)&&Xt(Q.length)&&!!B[jt(Q)]}},3809:(Wt,de,Mt)=>{var jt=Mt(3164),Xt=Mt(6199),P=Object.prototype.hasOwnProperty;Wt.exports=function a(y){if(!jt(y))return Xt(y);var C=[];for(var g in Object(y))P.call(y,g)&&"constructor"!=g&&C.push(g);return C}},1194:(Wt,de,Mt)=>{var jt=Mt(3278),Xt=Mt(3164),S=Mt(908),a=Object.prototype.hasOwnProperty;Wt.exports=function y(C){if(!jt(C))return S(C);var g=Xt(C),f=[];for(var d in C)"constructor"==d&&(g||!a.call(C,d))||f.push(d);return f}},9695:Wt=>{Wt.exports=function de(Mt,jt){for(var Xt=-1,S=Array(Mt);++Xt{Wt.exports=function de(Mt){return function(jt){return Mt(jt)}}},6220:(Wt,de,Mt)=>{var jt=Mt(2737);Wt.exports=function Xt(S){var P=new S.constructor(S.byteLength);return new jt(P).set(new jt(S)),P}},7697:(Wt,de,Mt)=>{Wt=Mt.nmd(Wt);var jt=Mt(1464),Xt=de&&!de.nodeType&&de,S=Xt&&Wt&&!Wt.nodeType&&Wt,a=S&&S.exports===Xt?jt.Buffer:void 0,y=a?a.allocUnsafe:void 0;Wt.exports=function C(g,f){if(f)return g.slice();var d=g.length,c=y?y(d):new g.constructor(d);return g.copy(c),c}},5942:(Wt,de,Mt)=>{var jt=Mt(6220);Wt.exports=function Xt(S,P){var a=P?jt(S.buffer):S.buffer;return new S.constructor(a,S.byteOffset,S.byteLength)}},8466:Wt=>{var de=/\w*$/;Wt.exports=function Mt(jt){var Xt=new jt.constructor(jt.source,de.exec(jt));return Xt.lastIndex=jt.lastIndex,Xt}},4511:(Wt,de,Mt)=>{var jt=Mt(8516),Xt=jt?jt.prototype:void 0,S=Xt?Xt.valueOf:void 0;Wt.exports=function P(a){return S?Object(S.call(a)):{}}},1334:(Wt,de,Mt)=>{var jt=Mt(6220);Wt.exports=function Xt(S,P){var a=P?jt(S.buffer):S.buffer;return new S.constructor(a,S.byteOffset,S.length)}},5820:Wt=>{Wt.exports=function de(Mt,jt){var Xt=-1,S=Mt.length;for(jt||(jt=Array(S));++Xt{var jt=Mt(9220),Xt=Mt(4399);Wt.exports=function S(P,a,y,C){var g=!y;y||(y={});for(var f=-1,d=a.length;++f{var jt=Mt(3190),Xt=Mt(181);Wt.exports=function S(P,a){return jt(P,Xt(P),a)}},7491:(Wt,de,Mt)=>{var jt=Mt(3190),Xt=Mt(5254);Wt.exports=function S(P,a){return jt(P,Xt(P),a)}},336:(Wt,de,Mt)=>{var jt=Mt(1464);Wt.exports=jt["__core-js_shared__"]},4678:(Wt,de,Mt)=>{var jt=Mt(4385),Xt=function(){try{var S=jt(Object,"defineProperty");return S({},"",{}),S}catch{}}();Wt.exports=Xt},8657:Wt=>{var de="object"==typeof global&&global&&global.Object===Object&&global;Wt.exports=de},3539:(Wt,de,Mt)=>{var jt=Mt(9926),Xt=Mt(181),S=Mt(2561);Wt.exports=function P(a){return jt(a,S,Xt)}},9088:(Wt,de,Mt)=>{var jt=Mt(9926),Xt=Mt(5254),S=Mt(7674);Wt.exports=function P(a){return jt(a,S,Xt)}},9038:(Wt,de,Mt)=>{var jt=Mt(3329);Wt.exports=function Xt(S,P){var a=S.__data__;return jt(P)?a["string"==typeof P?"string":"hash"]:a.map}},4385:(Wt,de,Mt)=>{var jt=Mt(298),Xt=Mt(8737);Wt.exports=function S(P,a){var y=Xt(P,a);return jt(y)?y:void 0}},6902:(Wt,de,Mt)=>{var Xt=Mt(2852)(Object.getPrototypeOf,Object);Wt.exports=Xt},8488:(Wt,de,Mt)=>{var jt=Mt(8516),Xt=Object.prototype,S=Xt.hasOwnProperty,P=Xt.toString,a=jt?jt.toStringTag:void 0;Wt.exports=function y(C){var g=S.call(C,a),f=C[a];try{C[a]=void 0;var d=!0}catch{}var c=P.call(C);return d&&(g?C[a]=f:delete C[a]),c}},181:(Wt,de,Mt)=>{var jt=Mt(2873),Xt=Mt(2260),P=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;Wt.exports=a?function(C){return null==C?[]:(C=Object(C),jt(a(C),function(g){return P.call(C,g)}))}:Xt},5254:(Wt,de,Mt)=>{var jt=Mt(6319),Xt=Mt(6902),S=Mt(181),P=Mt(2260);Wt.exports=Object.getOwnPropertySymbols?function(C){for(var g=[];C;)jt(g,S(C)),C=Xt(C);return g}:P},828:(Wt,de,Mt)=>{var jt=Mt(5013),Xt=Mt(1012),S=Mt(1339),P=Mt(7814),a=Mt(2248),y=Mt(1057),C=Mt(8020),g="[object Map]",d="[object Promise]",c="[object Set]",h="[object WeakMap]",p="[object DataView]",u=C(jt),m=C(Xt),v=C(S),x=C(P),b=C(a),T=y;(jt&&T(new jt(new ArrayBuffer(1)))!=p||Xt&&T(new Xt)!=g||S&&T(S.resolve())!=d||P&&T(new P)!=c||a&&T(new a)!=h)&&(T=function(_){var A=y(_),M="[object Object]"==A?_.constructor:void 0,I=M?C(M):"";if(I)switch(I){case u:return p;case m:return g;case v:return d;case x:return c;case b:return h}return A}),Wt.exports=T},8737:Wt=>{Wt.exports=function de(Mt,jt){return Mt?.[jt]}},6399:(Wt,de,Mt)=>{var jt=Mt(8247);Wt.exports=function Xt(){this.__data__=jt?jt(null):{},this.size=0}},1483:Wt=>{Wt.exports=function de(Mt){var jt=this.has(Mt)&&delete this.__data__[Mt];return this.size-=jt?1:0,jt}},3434:(Wt,de,Mt)=>{var jt=Mt(8247),P=Object.prototype.hasOwnProperty;Wt.exports=function a(y){var C=this.__data__;if(jt){var g=C[y];return"__lodash_hash_undefined__"===g?void 0:g}return P.call(C,y)?C[y]:void 0}},5230:(Wt,de,Mt)=>{var jt=Mt(8247),S=Object.prototype.hasOwnProperty;Wt.exports=function P(a){var y=this.__data__;return jt?void 0!==y[a]:S.call(y,a)}},3718:(Wt,de,Mt)=>{var jt=Mt(8247);Wt.exports=function S(P,a){var y=this.__data__;return this.size+=this.has(P)?0:1,y[P]=jt&&void 0===a?"__lodash_hash_undefined__":a,this}},9900:Wt=>{var Mt=Object.prototype.hasOwnProperty;Wt.exports=function jt(Xt){var S=Xt.length,P=new Xt.constructor(S);return S&&"string"==typeof Xt[0]&&Mt.call(Xt,"index")&&(P.index=Xt.index,P.input=Xt.input),P}},9686:(Wt,de,Mt)=>{var jt=Mt(6220),Xt=Mt(5942),S=Mt(8466),P=Mt(4511),a=Mt(1334);Wt.exports=function F(N,V,B){var G=N.constructor;switch(V){case"[object ArrayBuffer]":return jt(N);case"[object Boolean]":case"[object Date]":return new G(+N);case"[object DataView]":return Xt(N,B);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(N,B);case"[object Map]":case"[object Set]":return new G;case"[object Number]":case"[object String]":return new G(N);case"[object RegExp]":return S(N);case"[object Symbol]":return P(N)}}},2870:(Wt,de,Mt)=>{var jt=Mt(9593),Xt=Mt(6902),S=Mt(3164);Wt.exports=function P(a){return"function"!=typeof a.constructor||S(a)?{}:jt(Xt(a))}},8426:Wt=>{var Mt=/^(?:0|[1-9]\d*)$/;Wt.exports=function jt(Xt,S){var P=typeof Xt;return!!(S=S??9007199254740991)&&("number"==P||"symbol"!=P&&Mt.test(Xt))&&Xt>-1&&Xt%1==0&&Xt{Wt.exports=function de(Mt){var jt=typeof Mt;return"string"==jt||"number"==jt||"symbol"==jt||"boolean"==jt?"__proto__"!==Mt:null===Mt}},8401:(Wt,de,Mt)=>{var P,jt=Mt(336),Xt=(P=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||""))?"Symbol(src)_1."+P:"";Wt.exports=function S(P){return!!Xt&&Xt in P}},3164:Wt=>{var de=Object.prototype;Wt.exports=function Mt(jt){var Xt=jt&&jt.constructor;return jt===("function"==typeof Xt&&Xt.prototype||de)}},3643:Wt=>{Wt.exports=function de(){this.__data__=[],this.size=0}},7103:(Wt,de,Mt)=>{var jt=Mt(6316),S=Array.prototype.splice;Wt.exports=function P(a){var y=this.__data__,C=jt(y,a);return!(C<0||(C==y.length-1?y.pop():S.call(y,C,1),--this.size,0))}},62:(Wt,de,Mt)=>{var jt=Mt(6316);Wt.exports=function Xt(S){var P=this.__data__,a=jt(P,S);return a<0?void 0:P[a][1]}},1610:(Wt,de,Mt)=>{var jt=Mt(6316);Wt.exports=function Xt(S){return jt(this.__data__,S)>-1}},1090:(Wt,de,Mt)=>{var jt=Mt(6316);Wt.exports=function Xt(S,P){var a=this.__data__,y=jt(a,S);return y<0?(++this.size,a.push([S,P])):a[y][1]=P,this}},1891:(Wt,de,Mt)=>{var jt=Mt(3028),Xt=Mt(5752),S=Mt(1012);Wt.exports=function P(){this.size=0,this.__data__={hash:new jt,map:new(S||Xt),string:new jt}}},2759:(Wt,de,Mt)=>{var jt=Mt(9038);Wt.exports=function Xt(S){var P=jt(this,S).delete(S);return this.size-=P?1:0,P}},7766:(Wt,de,Mt)=>{var jt=Mt(9038);Wt.exports=function Xt(S){return jt(this,S).get(S)}},322:(Wt,de,Mt)=>{var jt=Mt(9038);Wt.exports=function Xt(S){return jt(this,S).has(S)}},7258:(Wt,de,Mt)=>{var jt=Mt(9038);Wt.exports=function Xt(S,P){var a=jt(this,S),y=a.size;return a.set(S,P),this.size+=a.size==y?0:1,this}},8247:(Wt,de,Mt)=>{var Xt=Mt(4385)(Object,"create");Wt.exports=Xt},6199:(Wt,de,Mt)=>{var Xt=Mt(2852)(Object.keys,Object);Wt.exports=Xt},908:Wt=>{Wt.exports=function de(Mt){var jt=[];if(null!=Mt)for(var Xt in Object(Mt))jt.push(Xt);return jt}},512:(Wt,de,Mt)=>{Wt=Mt.nmd(Wt);var jt=Mt(8657),Xt=de&&!de.nodeType&&de,S=Xt&&Wt&&!Wt.nodeType&&Wt,a=S&&S.exports===Xt&&jt.process,y=function(){try{return S&&S.require&&S.require("util").types||a&&a.binding&&a.binding("util")}catch{}}();Wt.exports=y},3327:Wt=>{var Mt=Object.prototype.toString;Wt.exports=function jt(Xt){return Mt.call(Xt)}},2852:Wt=>{Wt.exports=function de(Mt,jt){return function(Xt){return Mt(jt(Xt))}}},1464:(Wt,de,Mt)=>{var jt=Mt(8657),Xt="object"==typeof self&&self&&self.Object===Object&&self,S=jt||Xt||Function("return this")();Wt.exports=S},8945:(Wt,de,Mt)=>{var jt=Mt(5752);Wt.exports=function Xt(){this.__data__=new jt,this.size=0}},8425:Wt=>{Wt.exports=function de(Mt){var jt=this.__data__,Xt=jt.delete(Mt);return this.size=jt.size,Xt}},5280:Wt=>{Wt.exports=function de(Mt){return this.__data__.get(Mt)}},324:Wt=>{Wt.exports=function de(Mt){return this.__data__.has(Mt)}},4516:(Wt,de,Mt)=>{var jt=Mt(5752),Xt=Mt(1012),S=Mt(752);Wt.exports=function a(y,C){var g=this.__data__;if(g instanceof jt){var f=g.__data__;if(!Xt||f.length<199)return f.push([y,C]),this.size=++g.size,this;g=this.__data__=new S(f)}return g.set(y,C),this.size=g.size,this}},8020:Wt=>{var Mt=Function.prototype.toString;Wt.exports=function jt(Xt){if(null!=Xt){try{return Mt.call(Xt)}catch{}try{return Xt+""}catch{}}return""}},4418:(Wt,de,Mt)=>{var jt=Mt(5052);Wt.exports=function P(a){return jt(a,5)}},2651:Wt=>{Wt.exports=function de(Mt,jt){return Mt===jt||Mt!=Mt&&jt!=jt}},6265:(Wt,de,Mt)=>{var jt=Mt(8313),Xt=Mt(7433),S=Object.prototype,P=S.hasOwnProperty,a=S.propertyIsEnumerable,y=jt(function(){return arguments}())?jt:function(C){return Xt(C)&&P.call(C,"callee")&&!a.call(C,"callee")};Wt.exports=y},9812:Wt=>{Wt.exports=Array.isArray},7291:(Wt,de,Mt)=>{var jt=Mt(8653),Xt=Mt(8845);Wt.exports=function S(P){return null!=P&&Xt(P.length)&&!jt(P)}},3151:(Wt,de,Mt)=>{Wt=Mt.nmd(Wt);var jt=Mt(1464),Xt=Mt(5710),S=de&&!de.nodeType&&de,P=S&&Wt&&!Wt.nodeType&&Wt,y=P&&P.exports===S?jt.Buffer:void 0;Wt.exports=(y?y.isBuffer:void 0)||Xt},8653:(Wt,de,Mt)=>{var jt=Mt(1057),Xt=Mt(3278);Wt.exports=function C(g){if(!Xt(g))return!1;var f=jt(g);return"[object Function]"==f||"[object GeneratorFunction]"==f||"[object AsyncFunction]"==f||"[object Proxy]"==f}},8845:Wt=>{Wt.exports=function Mt(jt){return"number"==typeof jt&&jt>-1&&jt%1==0&&jt<=9007199254740991}},6879:(Wt,de,Mt)=>{var jt=Mt(6095),Xt=Mt(2502),S=Mt(512),P=S&&S.isMap,a=P?Xt(P):jt;Wt.exports=a},3278:Wt=>{Wt.exports=function de(Mt){var jt=typeof Mt;return null!=Mt&&("object"==jt||"function"==jt)}},7433:Wt=>{Wt.exports=function de(Mt){return null!=Mt&&"object"==typeof Mt}},4257:(Wt,de,Mt)=>{var jt=Mt(1889),Xt=Mt(2502),S=Mt(512),P=S&&S.isSet,a=P?Xt(P):jt;Wt.exports=a},1028:(Wt,de,Mt)=>{var jt=Mt(8068),Xt=Mt(2502),S=Mt(512),P=S&&S.isTypedArray,a=P?Xt(P):jt;Wt.exports=a},2561:(Wt,de,Mt)=>{var jt=Mt(8548),Xt=Mt(3809),S=Mt(7291);Wt.exports=function P(a){return S(a)?jt(a):Xt(a)}},7674:(Wt,de,Mt)=>{var jt=Mt(8548),Xt=Mt(1194),S=Mt(7291);Wt.exports=function P(a){return S(a)?jt(a,!0):Xt(a)}},2260:Wt=>{Wt.exports=function de(){return[]}},5710:Wt=>{Wt.exports=function de(){return!1}},3945:function(Wt){var jt;jt=()=>(()=>{var de={50792:S=>{"use strict";var P=Object.prototype.hasOwnProperty,a="~";function y(){}function C(c,h,p){this.fn=c,this.context=h,this.once=p||!1}function g(c,h,p,u,m){if("function"!=typeof p)throw new TypeError("The listener must be a function");var v=new C(p,u||c,m),x=a?a+h:h;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],v]:c._events[x].push(v):(c._events[x]=v,c._eventsCount++),c}function f(c,h){0==--c._eventsCount?c._events=new y:delete c._events[h]}function d(){this._events=new y,this._eventsCount=0}Object.create&&(y.prototype=Object.create(null),(new y).__proto__||(a=!1)),d.prototype.eventNames=function(){var p,u,h=[];if(0===this._eventsCount)return h;for(u in p=this._events)P.call(p,u)&&h.push(a?u.slice(1):u);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},d.prototype.listeners=function(h){var u=this._events[a?a+h:h];if(!u)return[];if(u.fn)return[u.fn];for(var m=0,v=u.length,x=new Array(v);m{var y=a(38829);S.exports=function(g,f,d,c){for(var h=g[0],p=1;p{var y=a(66979);S.exports=function(g,f,d,c,h){return y(g,"angle",f,d,c,h)}},60757:S=>{S.exports=function(a,y,C){for(var g=0;g{S.exports=function(a,y,C){void 0===C&&(C=0);for(var g=C;g{S.exports=function(a,y,C){void 0===C&&(C=0);for(var g=a.length-1;g>=C;g--){var f=a[g],d=!0;for(var c in y)f[c]!==y[c]&&(d=!1);if(d)return f}return null}},94420:(S,P,a)=>{var y=a(11879),C=a(60461),g=a(95540),f=a(29747),c=new(a(41481))({sys:{queueDepthSort:f,events:{once:f}}},0,0,1,1).setOrigin(0,0);S.exports=function(p,u){void 0===u&&(u={});var m=u.hasOwnProperty("width"),v=u.hasOwnProperty("height"),x=g(u,"width",-1),b=g(u,"height",-1),T=g(u,"cellWidth",1),_=g(u,"cellHeight",T),A=g(u,"position",C.TOP_LEFT),M=g(u,"x",0),I=g(u,"y",0),R=0,F=0,N=x*T,V=b*_;c.setPosition(M,I),c.setSize(T,_);for(var B=0;B{var y=a(66979);S.exports=function(g,f,d,c,h){return y(g,"alpha",f,d,c,h)}},67285:(S,P,a)=>{var y=a(66979);S.exports=function(g,f,d,c,h){return y(g,"x",f,d,c,h)}},9074:(S,P,a)=>{var y=a(66979);S.exports=function(g,f,d,c,h,p,u){return null==d&&(d=f),y(g,"x",f,c,p,u),y(g,"y",d,h,p,u)}},75222:(S,P,a)=>{var y=a(66979);S.exports=function(g,f,d,c,h){return y(g,"y",f,d,c,h)}},22983:S=>{S.exports=function(a,y,C,g){void 0===C&&(C=0),void 0===g&&(g=6.28);for(var f=C,d=(g-C)/a.length,c=y.x,h=y.y,p=y.radius,u=0;u{S.exports=function(a,y,C,g){void 0===C&&(C=0),void 0===g&&(g=6.28);for(var f=C,d=(g-C)/a.length,c=y.width/2,h=y.height/2,p=0;p{var y=a(15258),C=a(26708);S.exports=function(f,d,c){var h;h=c?C(d,c,f.length):y(d,f.length);for(var p=0;p{var y=a(14649),C=a(86003),g=a(49498);S.exports=function(d,c,h){void 0===h&&(h=0);var p=y(c,!1,d.length);h>0?C(p,h):h<0&&g(p,Math.abs(h));for(var u=0;u{var y=a(84993);S.exports=function(g,f,d){var c=y({x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2},d),h=y({x1:f.x2,y1:f.y2,x2:f.x3,y2:f.y3},d),p=y({x1:f.x3,y1:f.y3,x2:f.x1,y2:f.y1},d);c.pop(),h.pop(),p.pop();for(var u=(c=c.concat(h,p)).length/g.length,m=0,v=0;v{S.exports=function(a,y,C){for(var g=0;g{S.exports=function(a,y,C,g,f,d){void 0===g&&(g=0),void 0===f&&(f=0),void 0===d&&(d=1);var c,h=0,p=a.length;if(1===d)for(c=f;c=0;c--)a[c][y]+=C+h*g,h++;return a}},43967:S=>{S.exports=function(a,y,C,g,f,d){void 0===g&&(g=0),void 0===f&&(f=0),void 0===d&&(d=1);var c,h=0,p=a.length;if(1===d)for(c=f;c=0;c--)a[c][y]=C+h*g,h++;return a}},88926:(S,P,a)=>{var y=a(28176);S.exports=function(g,f){for(var d=0;d{var y=a(24820);S.exports=function(g,f){for(var d=0;d{var y=a(65822);S.exports=function(g,f){for(var d=0;d{var y=a(26597);S.exports=function(g,f){for(var d=0;d{var y=a(90260);S.exports=function(g,f){for(var d=0;d{var y=a(66979);S.exports=function(g,f,d,c,h){return y(g,"rotation",f,d,c,h)}},91051:(S,P,a)=>{var y=a(1163),C=a(20339);S.exports=function(f,d,c){for(var h=d.x,p=d.y,u=0;u{var y=a(1163);S.exports=function(g,f,d,c){var h=f.x,p=f.y;if(0===c)return g;for(var u=0;u{var y=a(66979);S.exports=function(g,f,d,c,h){return y(g,"scaleX",f,d,c,h)}},94868:(S,P,a)=>{var y=a(66979);S.exports=function(g,f,d,c,h,p,u){return null==d&&(d=f),y(g,"scaleX",f,c,p,u),y(g,"scaleY",d,h,p,u)}},95532:(S,P,a)=>{var y=a(66979);S.exports=function(g,f,d,c,h){return y(g,"scaleY",f,d,c,h)}},8689:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h){return y(g,"alpha",f,d,c,h)}},2645:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c){return y(g,"blendMode",f,0,d,c)}},32372:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h){return y(g,"depth",f,d,c,h)}},85373:S=>{S.exports=function(a,y,C){for(var g=0;g{var y=a(43967);S.exports=function(g,f,d,c,h,p,u){return null==d&&(d=f),y(g,"originX",f,c,p,u),y(g,"originY",d,h,p,u),g.forEach(function(m){m.updateDisplayOrigin()}),g}},79939:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h){return y(g,"rotation",f,d,c,h)}},2699:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h,p,u){return null==d&&(d=f),y(g,"scaleX",f,c,p,u),y(g,"scaleY",d,h,p,u)}},98739:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h){return y(g,"scaleX",f,d,c,h)}},98476:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h){return y(g,"scaleY",f,d,c,h)}},6207:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h,p,u){return null==d&&(d=f),y(g,"scrollFactorX",f,c,p,u),y(g,"scrollFactorY",d,h,p,u)}},6607:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h){return y(g,"scrollFactorX",f,d,c,h)}},72248:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h){return y(g,"scrollFactorY",f,d,c,h)}},14036:S=>{S.exports=function(a,y,C,g,f){for(var d=0;d{var y=a(43967);S.exports=function(g,f,d,c){return y(g,"visible",f,0,d,c)}},77597:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h){return y(g,"x",f,d,c,h)}},83194:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h,p,u){return null==d&&(d=f),y(g,"x",f,c,p,u),y(g,"y",d,h,p,u)}},67678:(S,P,a)=>{var y=a(43967);S.exports=function(g,f,d,c,h){return y(g,"y",f,d,c,h)}},35850:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c,h){void 0===c&&(c=0),void 0===h&&(h=new y);var p,u,m=g.length;if(1===m)p=g[0].x,u=g[0].y,g[0].x=f,g[0].y=d;else{var v=1,x=0;0===c&&(x=m-1,v=m-2),p=g[x].x,u=g[x].y,g[x].x=f,g[x].y=d;for(var b=0;b=m||-1===v)){var T=g[v],_=T.x,A=T.y;T.x=p,T.y=u,p=_,u=A,0===c?v--:v++}}return h.x=p,h.y=u,h}},8628:(S,P,a)=>{var y=a(33680);S.exports=function(g){return y(g)}},21837:(S,P,a)=>{var y=a(7602);S.exports=function(g,f,d,c,h){void 0===h&&(h=!1);var u,p=Math.abs(c-d)/g.length;if(h)for(u=0;u{var y=a(54261);S.exports=function(g,f,d,c,h){void 0===h&&(h=!1);var u,p=Math.abs(c-d)/g.length;if(h)for(u=0;u{S.exports=function(a,y,C,g,f){if(void 0===f&&(f=!1),0===a.length)return a;if(1===a.length)return f?a[0][y]+=(g+C)/2:a[0][y]=(g+C)/2,a;var c,d=Math.abs(g-C)/(a.length-1);if(f)for(c=0;c{S.exports=function(a){for(var y=0;y{var y=a(15994);S.exports=function(g,f,d){void 0===d&&(d=0);for(var c=0;c{S.exports={AlignTo:a(11517),Angle:a(80318),Call:a(60757),GetFirst:a(69927),GetLast:a(32265),GridAlign:a(94420),IncAlpha:a(41721),IncX:a(67285),IncXY:a(9074),IncY:a(75222),PlaceOnCircle:a(22983),PlaceOnEllipse:a(95253),PlaceOnLine:a(88505),PlaceOnRectangle:a(41346),PlaceOnTriangle:a(11575),PlayAnimation:a(29953),PropertyValueInc:a(66979),PropertyValueSet:a(43967),RandomCircle:a(88926),RandomEllipse:a(33286),RandomLine:a(96e3),RandomRectangle:a(28789),RandomTriangle:a(97154),Rotate:a(20510),RotateAround:a(91051),RotateAroundDistance:a(76332),ScaleX:a(61619),ScaleXY:a(94868),ScaleY:a(95532),SetAlpha:a(8689),SetBlendMode:a(2645),SetDepth:a(32372),SetHitArea:a(85373),SetOrigin:a(81583),SetRotation:a(79939),SetScale:a(2699),SetScaleX:a(98739),SetScaleY:a(98476),SetScrollFactor:a(6207),SetScrollFactorX:a(6607),SetScrollFactorY:a(72248),SetTint:a(14036),SetVisible:a(50159),SetX:a(77597),SetXY:a(83194),SetY:a(67678),ShiftPosition:a(35850),Shuffle:a(8628),SmootherStep:a(21910),SmoothStep:a(21837),Spread:a(62054),ToggleVisible:a(79815),WrapInRectangle:a(39665)}},42099:(S,P,a)=>{var y=a(45319),C=a(83419),g=a(74943),f=a(81957),d=a(41138),c=a(35154),h=a(90126),p=new C({initialize:function(m,v,x){this.manager=m,this.key=v,this.type="frame",this.frames=this.getFrames(m.textureManager,c(x,"frames",[]),c(x,"defaultTextureKey",null),c(x,"sortFrames",!0)),this.frameRate=c(x,"frameRate",null),this.duration=c(x,"duration",null),this.skipMissedFrames=c(x,"skipMissedFrames",!0),this.delay=c(x,"delay",0),this.repeat=c(x,"repeat",0),this.repeatDelay=c(x,"repeatDelay",0),this.yoyo=c(x,"yoyo",!1),this.showBeforeDelay=c(x,"showBeforeDelay",!1),this.showOnStart=c(x,"showOnStart",!1),this.hideOnComplete=c(x,"hideOnComplete",!1),this.randomFrame=c(x,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(g.PAUSE_ALL,this.pause,this),this.manager.on(g.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(u,m,v,x){null===v&&null===x?(u.frameRate=24,u.duration=24/m*1e3):v&&null===x?(u.duration=v,u.frameRate=m/(v/1e3)):(u.frameRate=x,u.duration=m/x*1e3),u.msPerFrame=1e3/u.frameRate},addFrame:function(u){return this.addFrameAt(this.frames.length,u)},addFrameAt:function(u,m){var v=this.getFrames(this.manager.textureManager,m);if(v.length>0){if(0===u)this.frames=v.concat(this.frames);else if(u===this.frames.length)this.frames=this.frames.concat(v);else{var x=this.frames.slice(0,u),b=this.frames.slice(u);this.frames=x.concat(v,b)}this.updateFrameSequence()}return this},checkFrame:function(u){return u>=0&&u0){_.isLast=!0,_.nextFrame=b[0],b[0].prevFrame=_;var Q=1/(b.length-1);for(M=0;M0?u.inReverse&&u.forward?u.forward=!1:this.repeatAnimation(u):u.complete():this.updateAndGetNextTick(u,m.nextFrame)},handleYoyoFrame:function(u,m){if(m||(m=!1),u.inReverse===!m&&u.repeatCounter>0)return(0===u.repeatDelay||u.pendingRepeat)&&(u.forward=m),void this.repeatAnimation(u);u.inReverse===m||0!==u.repeatCounter?(u.forward=m,this.updateAndGetNextTick(u,m?u.currentFrame.nextFrame:u.currentFrame.prevFrame)):u.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(u){var m=u.currentFrame;m.isFirst?u.yoyo?this.handleYoyoFrame(u,!0):u.repeatCounter>0?(u.inReverse&&!u.forward||(u.forward=!0),this.repeatAnimation(u)):u.complete():this.updateAndGetNextTick(u,m.prevFrame)},updateAndGetNextTick:function(u,m){u.setCurrentFrame(m),this.getNextTick(u)},removeFrame:function(u){var m=this.frames.indexOf(u);return-1!==m&&this.removeFrameAt(m),this},removeFrameAt:function(u){return this.frames.splice(u,1),this.updateFrameSequence(),this},repeatAnimation:function(u){if(2===u._pendingStop){if(0===u._pendingStopValue)return u.stop();u._pendingStopValue--}u.repeatDelay>0&&!u.pendingRepeat?(u.pendingRepeat=!0,u.accumulator-=u.nextTick,u.nextTick+=u.repeatDelay):(u.repeatCounter--,u.setCurrentFrame(u.forward?u.currentFrame.nextFrame:u.currentFrame.prevFrame),u.isPlaying&&(this.getNextTick(u),u.handleRepeat()))},toJSON:function(){var u={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(m){u.frames.push(m.toJSON())}),u},updateFrameSequence:function(){for(var v,u=this.frames.length,m=1/(u-1),x=0;x1?(v.isLast=!0,v.prevFrame=this.frames[u-2],v.nextFrame=this.frames[0]):u>1&&(v.prevFrame=this.frames[x-1],v.nextFrame=this.frames[x+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(g.PAUSE_ALL,this.pause,this),this.manager.off(g.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var u=0;u{var C=new(a(83419))({initialize:function(f,d,c,h,p){void 0===p&&(p=!1),this.textureKey=f,this.textureFrame=d,this.index=c,this.frame=h,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=p},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});S.exports=C},60848:(S,P,a)=>{var y=a(42099),C=a(83419),g=a(90330),f=a(50792),d=a(74943),c=a(8443),h=a(95540),p=a(35154),u=a(36383),m=a(20283),v=a(41836),x=new C({Extends:f,initialize:function(T){f.call(this),this.game=T,this.textureManager=null,this.globalTimeScale=1,this.anims=new g,this.mixes=new g,this.paused=!1,this.name="AnimationManager",T.events.once(c.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(c.DESTROY,this.destroy,this)},addMix:function(b,T,_){var A=this.anims,M=this.mixes,I="string"==typeof b?b:b.key,R="string"==typeof T?T:T.key;if(A.has(I)&&A.has(R)){var F=M.get(I);F||(F={}),F[R]=_,M.set(I,F)}return this},removeMix:function(b,T){var _=this.mixes,A="string"==typeof b?b:b.key,M=_.get(A);if(M)if(T){var I="string"==typeof T?T:T.key;M.hasOwnProperty(I)&&delete M[I]}else T||_.delete(A);return this},getMix:function(b,T){var M="string"==typeof T?T:T.key,I=this.mixes.get("string"==typeof b?b:b.key);return I&&I.hasOwnProperty(M)?I[M]:0},add:function(b,T){return this.anims.has(b)?(console.warn("Animation key exists: "+b),this):(T.key=b,this.anims.set(b,T),this.emit(d.ADD_ANIMATION,b,T),this)},exists:function(b){return this.anims.has(b)},createFromAseprite:function(b,T,_){var A=[],M=this.game.cache.json.get(b);if(!M)return console.warn("No Aseprite data found for: "+b),A;var I=this,R=p(M,"meta",null),F=p(M,"frames",null);return R&&F&&p(R,"frameTags",[]).forEach(function(V){var B=[],G=h(V,"name",null),Q=h(V,"from",0),H=h(V,"to",0),K=h(V,"direction","forward");if(G&&(!T||T&&T.indexOf(G)>-1)){for(var tt=0,at=Q;at<=H;at++){var lt=at.toString(),q=F[lt];if(q){var it=h(q,"duration",u.MAX_SAFE_INTEGER);B.push({key:b,frame:lt,duration:it}),tt+=it}}"reverse"===K&&(B=B.reverse());var X,Y={key:G,frames:B,duration:tt,yoyo:"pingpong"===K};_?_.anims&&(X=_.anims.create(Y)):X=I.create(Y),X&&A.push(X)}}),A},create:function(b){var T=b.key,_=!1;return T&&((_=this.get(T))?console.warn("AnimationManager key already exists: "+T):(_=new y(this,T,b),this.anims.set(T,_),this.emit(d.ADD_ANIMATION,T,_))),_},fromJSON:function(b,T){void 0===T&&(T=!1),T&&this.anims.clear(),"string"==typeof b&&(b=JSON.parse(b));var _=[];if(b.hasOwnProperty("anims")&&Array.isArray(b.anims)){for(var A=0;A{var y=a(42099),C=a(30976),g=a(83419),f=a(90330),d=a(74943),c=a(95540),h=new g({initialize:function(u){this.parent=u,this.animationManager=u.scene.sys.anims,this.animationManager.on(d.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0},chain:function(p){var u=this.parent;if(void 0===p)return this.nextAnimsQueue.length=0,this.nextAnim=null,u;Array.isArray(p)||(p=[p]);for(var m=0;mx&&(_=0),this.randomFrame&&(_=C(0,x-1));var A=v.frames[_];0===_&&!this.forward&&(A=v.getLastFrame()),this.currentFrame=A}else console.warn("Missing animation: "+m);return this.parent},pause:function(p){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==p&&this.setCurrentFrame(p),this.parent},resume:function(p){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==p&&this.setCurrentFrame(p),this.parent},playAfterDelay:function(p,u){if(this.isPlaying){var m=this.nextAnim;m&&this.nextAnimsQueue.unshift(m),this.nextAnim=p,this._pendingStop=1,this._pendingStopValue=u}else this.delayCounter=u,this.play(p,!0);return this.parent},playAfterRepeat:function(p,u){if(void 0===u&&(u=1),this.isPlaying){var m=this.nextAnim;m&&this.nextAnimsQueue.unshift(m),-1!==this.repeatCounter&&u>this.repeatCounter&&(u=this.repeatCounter),this.nextAnim=p,this._pendingStop=2,this._pendingStopValue=u}else this.play(p);return this.parent},play:function(p,u){void 0===u&&(u=!1);var m=this.currentAnim;if(u&&this.isPlaying&&m.key===("string"==typeof p?p:p.key))return this.parent;if(m&&this.isPlaying){var b=this.animationManager.getMix(m.key,p);if(b>0)return this.playAfterDelay(p,b)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(p)},playReverse:function(p,u){return void 0===u&&(u=!1),u&&this.isPlaying&&this.currentAnim.key===("string"==typeof p?p:p.key)?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(p))},startAnimation:function(p){this.load(p);var u=this.currentAnim,m=this.parent;return u&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,u.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),m},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(d.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(d.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(d.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(d.ANIMATION_COMPLETE,d.ANIMATION_COMPLETE_KEY)},emitEvents:function(p,u){var m=this.currentAnim;if(m){var v=this.currentFrame,x=this.parent,b=v.textureFrame;x.emit(p,m,v,x,b),u&&x.emit(u+m.key,m,v,x,b)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var p=this.currentFrame;if(!p)return 0;var u=p.progress;return this.inReverse&&(u*=-1),u},setProgress:function(p){return this.forward||(p=1-p),this.setCurrentFrame(this.currentAnim.getFrameByProgress(p)),this.parent},setRepeat:function(p){return this.repeatCounter=-1===p?Number.MAX_VALUE:p,this.parent},globalRemove:function(p,u){void 0===u&&(u=this.currentAnim),this.isPlaying&&u.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(p,u){void 0===p&&(p=!1),void 0===u&&(u=!1);var m=this.currentAnim,v=this.parent;return m?(u&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),m.getFirstTick(this),this.emitEvents(d.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!p,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(m.frames[0]),this.parent):v},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var p=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(p)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var p=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(p)}return this.parent},stopAfterDelay:function(p){return this._pendingStop=1,this._pendingStopValue=p,this.parent},stopAfterRepeat:function(p){return void 0===p&&(p=1),-1!==this.repeatCounter&&p>this.repeatCounter&&(p=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=p,this.parent},stopOnFrame:function(p){return this._pendingStop=3,this._pendingStopValue=p,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(p,u){var m=this.currentAnim;if(this.isPlaying&&m&&!m.paused){if(this.accumulator+=u*this.timeScale*this.animationManager.globalTimeScale,1===this._pendingStop&&(this._pendingStopValue-=u,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?m.nextFrame(this):m.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var v=0;do{this.forward?m.nextFrame(this):m.previousFrame(this),v++}while(this.isPlaying&&this.accumulator>this.nextTick&&v<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(p){var u=this.parent;return this.currentFrame=p,u.texture=p.frame.texture,u.frame=p.frame,u.isCropped&&u.frame.updateCropUVs(u._crop,u.flipX,u.flipY),p.setAlpha&&(u.alpha=p.alpha),u.setSizeToFrame(),u._originComponent&&(p.frame.customPivot?u.setOrigin(p.frame.pivotX,p.frame.pivotY):u.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(d.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===p&&this.stop()),u},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(p){return this.anims?this.anims.get(p):null},exists:function(p){return!!this.anims&&this.anims.has(p)},create:function(p){var u=p.key,m=!1;return u&&((m=this.get(u))?console.warn("Animation key already exists: "+u):(m=new y(this,u,p),this.anims||(this.anims=new f),this.anims.set(u,m))),m},createFromAseprite:function(p,u){return this.animationManager.createFromAseprite(p,u,this.parent)},generateFrameNames:function(p,u){return this.animationManager.generateFrameNames(p,u)},generateFrameNumbers:function(p,u){return this.animationManager.generateFrameNumbers(p,u)},remove:function(p){var u=this.get(p);return u&&(this.currentAnim===u&&this.stop(),this.anims.delete(p)),u},destroy:function(){this.animationManager.off(d.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});S.exports=h},57090:S=>{S.exports="add"},25312:S=>{S.exports="animationcomplete"},89580:S=>{S.exports="animationcomplete-"},52860:S=>{S.exports="animationrepeat"},63850:S=>{S.exports="animationrestart"},99085:S=>{S.exports="animationstart"},28087:S=>{S.exports="animationstop"},1794:S=>{S.exports="animationupdate"},52562:S=>{S.exports="pauseall"},57953:S=>{S.exports="remove"},68339:S=>{S.exports="resumeall"},74943:(S,P,a)=>{S.exports={ADD_ANIMATION:a(57090),ANIMATION_COMPLETE:a(25312),ANIMATION_COMPLETE_KEY:a(89580),ANIMATION_REPEAT:a(52860),ANIMATION_RESTART:a(63850),ANIMATION_START:a(99085),ANIMATION_STOP:a(28087),ANIMATION_UPDATE:a(1794),PAUSE_ALL:a(52562),REMOVE_ANIMATION:a(57953),RESUME_ALL:a(68339)}},60421:(S,P,a)=>{S.exports={Animation:a(42099),AnimationFrame:a(41138),AnimationManager:a(60848),AnimationState:a(9674),Events:a(74943)}},2161:(S,P,a)=>{var y=a(83419),C=a(90330),g=a(50792),f=a(24736),d=new y({initialize:function(){this.entries=new C,this.events=new g},add:function(c,h){return this.entries.set(c,h),this.events.emit(f.ADD,this,c,h),this},has:function(c){return this.entries.has(c)},exists:function(c){return this.entries.has(c)},get:function(c){return this.entries.get(c)},remove:function(c){var h=this.get(c);return h&&(this.entries.delete(c),this.events.emit(f.REMOVE,this,c,h.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});S.exports=d},24047:(S,P,a)=>{var y=a(2161),C=a(83419),g=a(8443),f=new C({initialize:function(c){this.game=c,this.binary=new y,this.bitmapFont=new y,this.json=new y,this.physics=new y,this.shader=new y,this.audio=new y,this.video=new y,this.text=new y,this.html=new y,this.obj=new y,this.tilemap=new y,this.xml=new y,this.custom={},this.game.events.once(g.DESTROY,this.destroy,this)},addCustom:function(d){return this.custom.hasOwnProperty(d)||(this.custom[d]=new y),this.custom[d]},destroy:function(){for(var d=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],c=0;c{S.exports="add"},59261:S=>{S.exports="remove"},24736:(S,P,a)=>{S.exports={ADD:a(51464),REMOVE:a(59261)}},83388:(S,P,a)=>{S.exports={BaseCache:a(2161),CacheManager:a(24047),Events:a(24736)}},71911:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(39506),f=a(50792),d=a(19715),c=a(87841),h=a(61340),p=a(80333),u=a(26099),m=new y({Extends:f,Mixins:[C.AlphaSingle,C.Visible],initialize:function(x,b,T,_){void 0===x&&(x=0),void 0===b&&(b=0),void 0===T&&(T=0),void 0===_&&(_=0),f.call(this),this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new c,this.dirty=!0,this._x=x,this._y=b,this._width=T,this._height=_,this._bounds=new c,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new h,this.transparent=!0,this.backgroundColor=p("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new u(T/2,_/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.renderRoundPixels=!0},addToRenderList:function(v){this.renderList.push(v)},setOrigin:function(v,x){return void 0===v&&(v=.5),void 0===x&&(x=v),this.originX=v,this.originY=x,this},getScroll:function(v,x,b){void 0===b&&(b=new u);var _=.5*this.height;return b.x=v-.5*this.width,b.y=x-_,this.useBounds&&(b.x=this.clampX(b.x),b.y=this.clampY(b.y)),b},centerOnX:function(v){var x=.5*this.width;return this.midPoint.x=v,this.scrollX=v-x,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(v){var x=.5*this.height;return this.midPoint.y=v,this.scrollY=v-x,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(v,x){return this.centerOnX(v),this.centerOnY(x),this},centerToBounds:function(){if(this.useBounds){var v=this._bounds,x=.5*this.width,b=.5*this.height;this.midPoint.set(v.centerX,v.centerY),this.scrollX=v.centerX-x,this.scrollY=v.centerY-b}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(v){if(this.disableCull)return v;var x=this.matrix.matrix,b=x[0],T=x[1],_=x[2],A=x[3],M=b*A-T*_;if(!M)return v;var I=x[4],R=x[5],F=this.scrollX,N=this.scrollY,G=this.y,Q=G+this.height,H=this.x,K=H+this.width,tt=this.culledObjects,at=v.length;M=1/M,tt.length=0;for(var lt=0;ltH&&X*b+nt*_+IG&&X*T+nt*A+R_&&(v=_),v},clampY:function(v){var x=this._bounds,b=this.displayHeight,T=x.y+(b-this.height)/2,_=Math.max(T,T+x.height-b);return v_&&(v=_),v},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(v){return void 0===v&&(v=0),this.rotation=g(v),this},setBackgroundColor:function(v){return void 0===v&&(v="rgba(0,0,0,0)"),this.backgroundColor=p(v),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(v,x,b,T,_){return void 0===_&&(_=!1),this._bounds.setTo(v,x,b,T),this.dirty=!0,this.useBounds=!0,_?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(v){void 0===v&&(v=new c);var x=this._bounds;return v.setTo(x.x,x.y,x.width,x.height),v},setName:function(v){return void 0===v&&(v=""),this.name=v,this},setPosition:function(v,x){return void 0===x&&(x=v),this.x=v,this.y=x,this},setRotation:function(v){return void 0===v&&(v=0),this.rotation=v,this},setRoundPixels:function(v){return this.roundPixels=v,this},setScene:function(v,x){void 0===x&&(x=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=v,this.isSceneCamera=x;var b=v.sys;return this.sceneManager=b.game.scene,this.scaleManager=b.scale,this.cameraManager=b.cameras,this.updateSystem(),this},setScroll:function(v,x){return void 0===x&&(x=v),this.scrollX=v,this.scrollY=x,this},setSize:function(v,x){return void 0===x&&(x=v),this.width=v,this.height=x,this},setViewport:function(v,x,b,T){return this.x=v,this.y=x,this.width=b,this.height=T,this},setZoom:function(v,x){return void 0===v&&(v=1),void 0===x&&(x=v),0===v&&(v=.001),0===x&&(x=.001),this.zoomX=v,this.zoomY=x,this},setMask:function(v,x){return void 0===x&&(x=!0),this.mask=v,this._maskCamera=x?this.cameraManager.default:this,this},clearMask:function(v){return void 0===v&&(v=!1),v&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var v={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(v.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),v},update:function(){},setIsSceneCamera:function(v){return this.isSceneCamera=v,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var v=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,x=this.sceneManager;v&&!this._customViewport?x.customViewports++:!v&&this._customViewport&&x.customViewports--,this.dirty=!0,this._customViewport=v}},destroy:function(){this.emit(d.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(v){this._x=v,this.updateSystem()}},y:{get:function(){return this._y},set:function(v){this._y=v,this.updateSystem()}},width:{get:function(){return this._width},set:function(v){this._width=v,this.updateSystem()}},height:{get:function(){return this._height},set:function(v){this._height=v,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(v){v!==this._scrollX&&(this._scrollX=v,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(v){v!==this._scrollY&&(this._scrollY=v,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(v){this._zoomX=v,this._zoomY=v,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(v){this._zoomX=v,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(v){this._zoomY=v,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(v){this._rotation=v,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});S.exports=m},38058:(S,P,a)=>{var y=a(71911),C=a(67502),g=a(45319),f=a(83419),d=a(31401),c=a(20052),h=a(19715),p=a(28915),u=a(87841),m=a(26099),v=new f({Extends:y,Mixins:[d.PostPipeline],initialize:function(b,T,_,A){y.call(this,b,T,_,A),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new c.Fade(this),this.flashEffect=new c.Flash(this),this.shakeEffect=new c.Shake(this),this.panEffect=new c.Pan(this),this.rotateToEffect=new c.RotateTo(this),this.zoomEffect=new c.Zoom(this),this.lerp=new m(1,1),this.followOffset=new m,this.deadzone=null,this._follow=null},setDeadzone:function(x,b){if(void 0===x)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=x,this.deadzone.height=b):this.deadzone=new u(0,0,x,b),this._follow){var T=this.width/2,_=this.height/2,A=this._follow.x-this.followOffset.x,M=this._follow.y-this.followOffset.y;this.midPoint.set(A,M),this.scrollX=A-T,this.scrollY=M-_}C(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(x,b,T,_,A,M){return this.fadeEffect.start(!1,x,b,T,_,!0,A,M)},fadeOut:function(x,b,T,_,A,M){return this.fadeEffect.start(!0,x,b,T,_,!0,A,M)},fadeFrom:function(x,b,T,_,A,M,I){return this.fadeEffect.start(!1,x,b,T,_,A,M,I)},fade:function(x,b,T,_,A,M,I){return this.fadeEffect.start(!0,x,b,T,_,A,M,I)},flash:function(x,b,T,_,A,M,I){return this.flashEffect.start(x,b,T,_,A,M,I)},shake:function(x,b,T,_,A){return this.shakeEffect.start(x,b,T,_,A)},pan:function(x,b,T,_,A,M,I){return this.panEffect.start(x,b,T,_,A,M,I)},rotateTo:function(x,b,T,_,A,M,I){return this.rotateToEffect.start(x,b,T,_,A,M,I)},zoomTo:function(x,b,T,_,A,M){return this.zoomEffect.start(x,b,T,_,A,M)},preRender:function(){this.renderList.length=0;var x=this.width,b=this.height,T=.5*x,_=.5*b,A=this.zoomX,M=this.zoomY,I=this.matrix;this.renderRoundPixels=this.roundPixels&&Number.isInteger(A)&&Number.isInteger(M);var R=x*this.originX,F=b*this.originY,N=this._follow,V=this.deadzone,B=this.scrollX,G=this.scrollY;V&&C(V,this.midPoint.x,this.midPoint.y);var Q=!1;if(N&&!this.panEffect.isRunning){var H=this.lerp,K=N.x-this.followOffset.x,tt=N.y-this.followOffset.y;V?(KV.right&&(B=p(B,B+(K-V.right),H.x)),ttV.bottom&&(G=p(G,G+(tt-V.bottom),H.y))):(B=p(B,K-R,H.x),G=p(G,tt-F,H.y)),Q=!0}this.roundPixels&&(B=Math.floor(B),G=Math.floor(G)),this.useBounds&&(B=this.clampX(B),G=this.clampY(G)),this.scrollX=B,this.scrollY=G;var at=B+T,lt=G+_;this.midPoint.set(at,lt);var q=Math.floor(x/A+.5),it=Math.floor(b/M+.5),Y=Math.floor(at-q/2+.5),X=Math.floor(lt-it/2+.5);this.worldView.setTo(Y,X,q,it),I.applyITRS(Math.floor(this.x+R+.5),Math.floor(this.y+F+.5),this.rotation,A,M),I.translate(-R,-F),this.shakeEffect.preRender(),Q&&this.emit(h.FOLLOW_UPDATE,this,N)},setLerp:function(x,b){return void 0===x&&(x=1),void 0===b&&(b=x),this.lerp.set(x,b),this},setFollowOffset:function(x,b){return void 0===x&&(x=0),void 0===b&&(b=0),this.followOffset.set(x,b),this},startFollow:function(x,b,T,_,A,M){void 0===b&&(b=!1),void 0===T&&(T=1),void 0===_&&(_=T),void 0===A&&(A=0),void 0===M&&(M=A),this._follow=x,this.roundPixels=b,T=g(T,0,1),_=g(_,0,1),this.lerp.set(T,_),this.followOffset.set(A,M);var I=this.width/2,R=this.height/2,F=x.x-A,N=x.y-M;return this.midPoint.set(F,N),this.scrollX=F-I,this.scrollY=N-R,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(x,b){this.visible&&(this.rotateToEffect.update(x,b),this.panEffect.update(x,b),this.zoomEffect.update(x,b),this.shakeEffect.update(x,b),this.flashEffect.update(x,b),this.fadeEffect.update(x,b))},destroy:function(){this.resetFX(),y.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});S.exports=v},32743:(S,P,a)=>{var y=a(38058),C=a(83419),g=a(95540),f=a(37277),d=a(37303),c=a(97480),h=a(44594),p=new C({initialize:function(m){this.scene=m,this.systems=m.sys,this.roundPixels=m.sys.game.config.roundPixels,this.cameras=[],m.sys.events.once(h.BOOT,this.boot,this),m.sys.events.on(h.START,this.start,this)},boot:function(){var u=this.systems;u.settings.cameras?this.fromJSON(u.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new y(0,0,u.scale.width,u.scale.height).setScene(this.scene),u.game.scale.on(c.RESIZE,this.onResize,this),this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){if(!this.main){var u=this.systems;u.settings.cameras?this.fromJSON(u.settings.cameras):this.add(),this.main=this.cameras[0]}var m=this.systems.events;m.on(h.UPDATE,this.update,this),m.once(h.SHUTDOWN,this.shutdown,this)},add:function(u,m,v,x,b,T){void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=this.scene.sys.scale.width),void 0===x&&(x=this.scene.sys.scale.height),void 0===b&&(b=!1),void 0===T&&(T="");var _=new y(u,m,v,x);return _.setName(T),_.setScene(this.scene),_.setRoundPixels(this.roundPixels),_.id=this.getNextID(),this.cameras.push(_),b&&(this.main=_),_},addExisting:function(u,m){return void 0===m&&(m=!1),-1===this.cameras.indexOf(u)?(u.id=this.getNextID(),u.setRoundPixels(this.roundPixels),this.cameras.push(u),m&&(this.main=u),u):null},getNextID:function(){for(var u=this.cameras,m=1,v=0;v<32;v++){for(var x=!1,b=0;b0){T.preRender();var _=this.getVisibleChildren(m.getChildren(),T);u.render(v,_,T)}}},getVisibleChildren:function(u,m){return u.filter(function(v){return v.willRender(m)})},resetAll:function(){for(var u=0;u{var y=a(45319),C=a(83419),g=a(19715),f=new C({initialize:function(c){this.camera=c,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0},start:function(d,c,h,p,u,m,v,x){return void 0===d&&(d=!0),void 0===c&&(c=1e3),void 0===h&&(h=0),void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=!1),void 0===v&&(v=null),void 0===x&&(x=this.camera.scene),!m&&this.isRunning||(this.isRunning=!0,this.isComplete=!1,this.duration=c,this.direction=d,this.progress=0,this.red=h,this.green=p,this.blue=u,this.alpha=d?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=v,this._onUpdateScope=x,this.camera.emit(d?g.FADE_OUT_START:g.FADE_IN_START,this.camera,this,c,h,p,u)),this.camera},update:function(d,c){this.isRunning&&(this._elapsed+=c,this.progress=y(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var y=a(45319),C=a(83419),g=a(19715),f=new C({initialize:function(c){this.camera=c,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0},start:function(d,c,h,p,u,m,v){return void 0===d&&(d=250),void 0===c&&(c=255),void 0===h&&(h=255),void 0===p&&(p=255),void 0===u&&(u=!1),void 0===m&&(m=null),void 0===v&&(v=this.camera.scene),!u&&this.isRunning||(this.isRunning=!0,this.duration=d,this.progress=0,this.red=c,this.green=h,this.blue=p,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=m,this._onUpdateScope=v,this.camera.emit(g.FLASH_START,this.camera,this,d,c,h,p)),this.camera},update:function(d,c){this.isRunning&&(this._elapsed+=c,this.progress=y(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var y=a(45319),C=a(83419),g=a(62640),f=a(19715),d=a(26099),c=new C({initialize:function(p){this.camera=p,this.isRunning=!1,this.duration=0,this.source=new d,this.current=new d,this.destination=new d,this.progress=0,this._elapsed=0},start:function(h,p,u,m,v,x,b){void 0===u&&(u=1e3),void 0===m&&(m=g.Linear),void 0===v&&(v=!1),void 0===x&&(x=null),void 0===b&&(b=this.camera.scene);var T=this.camera;return!v&&this.isRunning||(this.isRunning=!0,this.duration=u,this.progress=0,this.source.set(T.scrollX,T.scrollY),this.destination.set(h,p),T.getScroll(h,p,this.current),"string"==typeof m&&g.hasOwnProperty(m)?this.ease=g[m]:"function"==typeof m&&(this.ease=m),this._elapsed=0,this._onUpdate=x,this._onUpdateScope=b,this.camera.emit(f.PAN_START,this.camera,this,u,h,p)),T},update:function(h,p){if(this.isRunning){this._elapsed+=p;var u=y(this._elapsed/this.duration,0,1);this.progress=u;var m=this.camera;if(this._elapsed{var y=a(45319),C=a(83419),g=a(19715),f=a(62640),d=new C({initialize:function(h){this.camera=h,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.progress=0,this._elapsed=0,this.clockwise=!0,this.shortestPath=!1},start:function(c,h,p,u,m,v,x){void 0===p&&(p=1e3),void 0===u&&(u=f.Linear),void 0===m&&(m=!1),void 0===v&&(v=null),void 0===x&&(x=this.camera.scene),void 0===h&&(h=!1),this.shortestPath=h;var b=c;c<0?(b=-1*c,this.clockwise=!1):this.clockwise=!0;var T=360*Math.PI/180;b-=Math.floor(b/T)*T;var _=this.camera;if(!m&&this.isRunning)return _;if(this.isRunning=!0,this.duration=p,this.progress=0,this.source=_.rotation,this.destination=b,"string"==typeof u&&f.hasOwnProperty(u)?this.ease=f[u]:"function"==typeof u&&(this.ease=u),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=x,this.shortestPath){var A,M;(A=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+T)-this.source)<(M=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+T)-this.destination)?this.clockwise=!0:A>M&&(this.clockwise=!1)}return this.camera.emit(g.ROTATE_START,this.camera,this,p,b),_},update:function(c,h){if(this.isRunning){this._elapsed+=h;var p=y(this._elapsed/this.duration,0,1);this.progress=p;var u=this.camera;if(this._elapsed=T?Math.abs(b-T):Math.abs(b+x)-T;var _;u.rotation=_=this.clockwise?u.rotation+v*m:u.rotation-v*m,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,u,p,_)}else u.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,u,p,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(g.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});S.exports=d},30330:(S,P,a)=>{var y=a(45319),C=a(83419),g=a(19715),f=a(26099),d=new C({initialize:function(h){this.camera=h,this.isRunning=!1,this.duration=0,this.intensity=new f,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0},start:function(c,h,p,u,m){return void 0===c&&(c=100),void 0===h&&(h=.05),void 0===p&&(p=!1),void 0===u&&(u=null),void 0===m&&(m=this.camera.scene),!p&&this.isRunning||(this.isRunning=!0,this.duration=c,this.progress=0,"number"==typeof h?this.intensity.set(h):this.intensity.set(h.x,h.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=u,this._onUpdateScope=m,this.camera.emit(g.SHAKE_START,this.camera,this,c,h)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(c,h){if(this.isRunning)if(this._elapsed+=h,this.progress=y(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var y=a(45319),C=a(83419),g=a(62640),f=a(19715),d=new C({initialize:function(h){this.camera=h,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.progress=0,this._elapsed=0},start:function(c,h,p,u,m,v){void 0===h&&(h=1e3),void 0===p&&(p=g.Linear),void 0===u&&(u=!1),void 0===m&&(m=null),void 0===v&&(v=this.camera.scene);var x=this.camera;return!u&&this.isRunning||(this.isRunning=!0,this.duration=h,this.progress=0,this.source=x.zoom,this.destination=c,"string"==typeof p&&g.hasOwnProperty(p)?this.ease=g[p]:"function"==typeof p&&(this.ease=p),this._elapsed=0,this._onUpdate=m,this._onUpdateScope=v,this.camera.emit(f.ZOOM_START,this.camera,this,h,c)),x},update:function(c,h){this.isRunning&&(this._elapsed+=h,this.progress=y(this._elapsed/this.duration,0,1),this._elapsed{S.exports={Fade:a(5020),Flash:a(10662),Pan:a(20359),Shake:a(30330),RotateTo:a(34208),Zoom:a(45641)}},16438:S=>{S.exports="cameradestroy"},32726:S=>{S.exports="camerafadeincomplete"},87807:S=>{S.exports="camerafadeinstart"},45917:S=>{S.exports="camerafadeoutcomplete"},95666:S=>{S.exports="camerafadeoutstart"},47056:S=>{S.exports="cameraflashcomplete"},91261:S=>{S.exports="cameraflashstart"},45047:S=>{S.exports="followupdate"},81927:S=>{S.exports="camerapancomplete"},74264:S=>{S.exports="camerapanstart"},54419:S=>{S.exports="postrender"},79330:S=>{S.exports="prerender"},93183:S=>{S.exports="camerarotatecomplete"},80112:S=>{S.exports="camerarotatestart"},62252:S=>{S.exports="camerashakecomplete"},86017:S=>{S.exports="camerashakestart"},539:S=>{S.exports="camerazoomcomplete"},51892:S=>{S.exports="camerazoomstart"},19715:(S,P,a)=>{S.exports={DESTROY:a(16438),FADE_IN_COMPLETE:a(32726),FADE_IN_START:a(87807),FADE_OUT_COMPLETE:a(45917),FADE_OUT_START:a(95666),FLASH_COMPLETE:a(47056),FLASH_START:a(91261),FOLLOW_UPDATE:a(45047),PAN_COMPLETE:a(81927),PAN_START:a(74264),POST_RENDER:a(54419),PRE_RENDER:a(79330),ROTATE_COMPLETE:a(93183),ROTATE_START:a(80112),SHAKE_COMPLETE:a(62252),SHAKE_START:a(86017),ZOOM_COMPLETE:a(539),ZOOM_START:a(51892)}},87969:(S,P,a)=>{S.exports={Camera:a(38058),BaseCamera:a(71911),CameraManager:a(32743),Effects:a(20052),Events:a(19715)}},63091:(S,P,a)=>{var y=a(83419),C=a(35154),g=new y({initialize:function(d){this.camera=C(d,"camera",null),this.left=C(d,"left",null),this.right=C(d,"right",null),this.up=C(d,"up",null),this.down=C(d,"down",null),this.zoomIn=C(d,"zoomIn",null),this.zoomOut=C(d,"zoomOut",null),this.zoomSpeed=C(d,"zoomSpeed",.01),this.minZoom=C(d,"minZoom",.001),this.maxZoom=C(d,"maxZoom",1e3),this.speedX=0,this.speedY=0;var c=C(d,"speed",null);"number"==typeof c?(this.speedX=c,this.speedY=c):(this.speedX=C(d,"speed.x",0),this.speedY=C(d,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(f){return this.camera=f,this},update:function(f){if(this.active){void 0===f&&(f=1);var d=this.camera;this.up&&this.up.isDown?d.scrollY-=this.speedY*f|0:this.down&&this.down.isDown&&(d.scrollY+=this.speedY*f|0),this.left&&this.left.isDown?d.scrollX-=this.speedX*f|0:this.right&&this.right.isDown&&(d.scrollX+=this.speedX*f|0),this.zoomIn&&this.zoomIn.isDown?(d.zoom-=this.zoomSpeed,d.zoomthis.maxZoom&&(d.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});S.exports=g},58818:(S,P,a)=>{var y=a(83419),C=a(35154),g=new y({initialize:function(d){this.camera=C(d,"camera",null),this.left=C(d,"left",null),this.right=C(d,"right",null),this.up=C(d,"up",null),this.down=C(d,"down",null),this.zoomIn=C(d,"zoomIn",null),this.zoomOut=C(d,"zoomOut",null),this.zoomSpeed=C(d,"zoomSpeed",.01),this.minZoom=C(d,"minZoom",.001),this.maxZoom=C(d,"maxZoom",1e3),this.accelX=0,this.accelY=0;var c=C(d,"acceleration",null);"number"==typeof c?(this.accelX=c,this.accelY=c):(this.accelX=C(d,"acceleration.x",0),this.accelY=C(d,"acceleration.y",0)),this.dragX=0,this.dragY=0;var h=C(d,"drag",null);"number"==typeof h?(this.dragX=h,this.dragY=h):(this.dragX=C(d,"drag.x",0),this.dragY=C(d,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var p=C(d,"maxSpeed",null);"number"==typeof p?(this.maxSpeedX=p,this.maxSpeedY=p):(this.maxSpeedX=C(d,"maxSpeed.x",0),this.maxSpeedY=C(d,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(f){return this.camera=f,this},update:function(f){if(this.active){void 0===f&&(f=1);var d=this.camera;this._speedX>0?(this._speedX-=this.dragX*f,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*f,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*f,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*f,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this._zoom=this.zoomIn&&this.zoomIn.isDown?-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this.zoomSpeed:0,0!==this._speedX&&(d.scrollX-=this._speedX*f|0),0!==this._speedY&&(d.scrollY-=this._speedY*f|0),0!==this._zoom&&(d.zoom+=this._zoom,d.zoomthis.maxZoom&&(d.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});S.exports=g},38865:(S,P,a)=>{S.exports={FixedKeyControl:a(63091),SmoothedKeyControl:a(58818)}},26638:(S,P,a)=>{S.exports={Controls:a(38865),Scene2D:a(87969)}},8054:(S,P,a)=>{var y={VERSION:"3.87",LOG_VERSION:"v387",BlendModes:a(10312),ScaleModes:a(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};S.exports=y},69547:(S,P,a)=>{var y=a(83419),C=a(8054),g=a(42363),f=a(82264),d=a(95540),c=a(35154),h=a(41212),p=a(29747),u=a(75508),m=a(36060),v=a(80333),x=new y({initialize:function(T){void 0===T&&(T={});var M=c(T,"scale",null);this.width=c(M,"width",1024,T),this.height=c(M,"height",768,T),this.zoom=c(M,"zoom",1,T),this.parent=c(M,"parent",void 0,T),this.scaleMode=c(M,M?"mode":"scaleMode",0,T),this.expandParent=c(M,"expandParent",!0,T),this.autoRound=c(M,"autoRound",!1,T),this.autoCenter=c(M,"autoCenter",0,T),this.resizeInterval=c(M,"resizeInterval",500,T),this.fullscreenTarget=c(M,"fullscreenTarget",null,T),this.minWidth=c(M,"min.width",0,T),this.maxWidth=c(M,"max.width",0,T),this.minHeight=c(M,"min.height",0,T),this.maxHeight=c(M,"max.height",0,T),this.snapWidth=c(M,"snap.width",0,T),this.snapHeight=c(M,"snap.height",0,T),this.renderType=c(T,"type",C.AUTO),this.canvas=c(T,"canvas",null),this.context=c(T,"context",null),this.canvasStyle=c(T,"canvasStyle",null),this.customEnvironment=c(T,"customEnvironment",!1),this.sceneConfig=c(T,"scene",null),this.seed=c(T,"seed",[(Date.now()*Math.random()).toString()]),u.RND=new u.RandomDataGenerator(this.seed),this.gameTitle=c(T,"title",""),this.gameURL=c(T,"url","https://phaser.io/"+C.LOG_VERSION),this.gameVersion=c(T,"version",""),this.autoFocus=c(T,"autoFocus",!0),this.stableSort=c(T,"stableSort",-1),-1===this.stableSort&&(this.stableSort=f.browser.es2019?1:0),f.features.stableSort=this.stableSort,this.domCreateContainer=c(T,"dom.createContainer",!1),this.domPointerEvents=c(T,"dom.pointerEvents","none"),this.inputKeyboard=c(T,"input.keyboard",!0),this.inputKeyboardEventTarget=c(T,"input.keyboard.target",window),this.inputKeyboardCapture=c(T,"input.keyboard.capture",[]),this.inputMouse=c(T,"input.mouse",!0),this.inputMouseEventTarget=c(T,"input.mouse.target",null),this.inputMousePreventDefaultDown=c(T,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=c(T,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=c(T,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=c(T,"input.mouse.preventDefaultWheel",!0),this.inputTouch=c(T,"input.touch",f.input.touch),this.inputTouchEventTarget=c(T,"input.touch.target",null),this.inputTouchCapture=c(T,"input.touch.capture",!0),this.inputActivePointers=c(T,"input.activePointers",1),this.inputSmoothFactor=c(T,"input.smoothFactor",0),this.inputWindowEvents=c(T,"input.windowEvents",!0),this.inputGamepad=c(T,"input.gamepad",!1),this.inputGamepadEventTarget=c(T,"input.gamepad.target",window),this.disableContextMenu=c(T,"disableContextMenu",!1),this.audio=c(T,"audio",{}),this.hideBanner=!1===c(T,"banner",null),this.hidePhaser=c(T,"banner.hidePhaser",!1),this.bannerTextColor=c(T,"banner.text","#ffffff"),this.bannerBackgroundColor=c(T,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=c(T,"fps",null),this.disablePreFX=c(T,"disablePreFX",!1),this.disablePostFX=c(T,"disablePostFX",!1);var I=c(T,"render",null);this.pipeline=c(I,"pipeline",null,T),this.autoMobilePipeline=c(I,"autoMobilePipeline",!0,T),this.defaultPipeline=c(I,"defaultPipeline",m.MULTI_PIPELINE,T),this.antialias=c(I,"antialias",!0,T),this.antialiasGL=c(I,"antialiasGL",!0,T),this.mipmapFilter=c(I,"mipmapFilter","",T),this.desynchronized=c(I,"desynchronized",!1,T),this.roundPixels=c(I,"roundPixels",!1,T),this.pixelArt=c(I,"pixelArt",1!==this.zoom,T),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=c(I,"transparent",!1,T),this.clearBeforeRender=c(I,"clearBeforeRender",!0,T),this.preserveDrawingBuffer=c(I,"preserveDrawingBuffer",!1,T),this.premultipliedAlpha=c(I,"premultipliedAlpha",!0,T),this.failIfMajorPerformanceCaveat=c(I,"failIfMajorPerformanceCaveat",!1,T),this.powerPreference=c(I,"powerPreference","default",T),this.batchSize=c(I,"batchSize",4096,T),this.maxTextures=c(I,"maxTextures",-1,T),this.maxLights=c(I,"maxLights",10,T);var R=c(T,"backgroundColor",0);this.backgroundColor=v(R),this.transparent&&(this.backgroundColor=v(0),this.backgroundColor.alpha=0),this.preBoot=c(T,"callbacks.preBoot",p),this.postBoot=c(T,"callbacks.postBoot",p),this.physics=c(T,"physics",{}),this.defaultPhysicsSystem=c(this.physics,"default",!1),this.loaderBaseURL=c(T,"loader.baseURL",""),this.loaderPath=c(T,"loader.path",""),this.loaderMaxParallelDownloads=c(T,"loader.maxParallelDownloads",f.os.android?6:32),this.loaderCrossOrigin=c(T,"loader.crossOrigin",void 0),this.loaderResponseType=c(T,"loader.responseType",""),this.loaderAsync=c(T,"loader.async",!0),this.loaderUser=c(T,"loader.user",""),this.loaderPassword=c(T,"loader.password",""),this.loaderTimeout=c(T,"loader.timeout",0),this.loaderMaxRetries=c(T,"loader.maxRetries",2),this.loaderWithCredentials=c(T,"loader.withCredentials",!1),this.loaderImageLoadType=c(T,"loader.imageLoadType","XHR"),this.loaderLocalScheme=c(T,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=c(T,"fx.glow.quality",.1),this.glowFXDistance=c(T,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var F=c(T,"plugins",null),N=g.DefaultScene;F&&(Array.isArray(F)?this.defaultPlugins=F:h(F)&&(this.installGlobalPlugins=d(F,"global",[]),this.installScenePlugins=d(F,"scene",[]),Array.isArray(F.default)?N=F.default:Array.isArray(F.defaultMerge)&&(N=N.concat(F.defaultMerge)))),this.defaultPlugins=N;var V="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=c(T,"images.default",V+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=c(T,"images.missing",V+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=c(T,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=C.WEBGL:window.FORCE_CANVAS&&(this.renderType=C.CANVAS))}});S.exports=x},86054:(S,P,a)=>{var y=a(20623),C=a(27919),g=a(8054),f=a(89357);S.exports=function(c){var h=c.config;if((h.customEnvironment||h.canvas)&&h.renderType===g.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!h.customEnvironment&&!h.canvas&&h.renderType!==g.HEADLESS)if(h.renderType===g.AUTO&&(h.renderType=f.webGL?g.WEBGL:g.CANVAS),h.renderType===g.WEBGL){if(!f.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(h.renderType!==g.CANVAS)throw new Error("Unknown value for renderer type: "+h.renderType);if(!f.canvas)throw new Error("Cannot create Canvas context, aborting.")}h.antialias||C.disableSmoothing();var v,x,p=c.scale.baseSize,u=p.width,m=p.height;h.canvas?(c.canvas=h.canvas,c.canvas.width=u,c.canvas.height=m):c.canvas=C.create(c,u,m,h.renderType),h.canvasStyle&&(c.canvas.style=h.canvasStyle),h.antialias||y.setCrisp(c.canvas),h.renderType!==g.HEADLESS&&(v=a(68627),x=a(74797),h.renderType===g.WEBGL?c.renderer=new x(c):(c.renderer=new v(c),c.context=c.renderer.gameContext))}},96391:(S,P,a)=>{var y=a(8054);S.exports=function(g){var f=g.config;if(!f.hideBanner){var d="WebGL";f.renderType===y.CANVAS?d="Canvas":f.renderType===y.HEADLESS&&(d="Headless");var p,c=f.audio,h=g.device.audio;if(p=h.webAudio&&!c.disableWebAudio?"Web Audio":c.noAudio||!h.webAudio&&!h.audioData?"No Audio":"HTML5 Audio",g.device.browser.ie)window.console&&console.log("Phaser v"+y.VERSION+" / https://phaser.io");else{var v,u="",m=[u];Array.isArray(f.bannerBackgroundColor)?(f.bannerBackgroundColor.forEach(function(b){u=u.concat("%c "),m.push("background: "+b),v=b}),m[m.length-1]="color: "+f.bannerTextColor+"; background: "+v):(u=u.concat("%c "),m.push("color: "+f.bannerTextColor+"; background: "+f.bannerBackgroundColor)),m.push("background: transparent"),f.gameTitle&&(u=u.concat(f.gameTitle),f.gameVersion&&(u=u.concat(" v"+f.gameVersion)),f.hidePhaser||(u=u.concat(" / "))),f.hidePhaser||(u=u.concat("Phaser v"+y.VERSION+" ("+d+" | "+p+")")),u=u.concat(" %c "+f.gameURL),m[0]=u,console.log.apply(console,m)}}}},50127:(S,P,a)=>{var y=a(40366),C=a(60848),g=a(24047),f=a(27919),d=a(83419),c=a(69547),h=a(83719),p=a(86054),u=a(45893),m=a(96391),v=a(82264),x=a(57264),b=a(50792),T=a(8443),_=a(7003),A=a(37277),M=a(77332),I=a(76531),R=a(60903),F=a(69442),N=a(17130),V=a(65898),B=a(51085),G=a(14747),H=new d({initialize:function(tt){this.config=new c(tt),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new b,this.anims=new C(this),this.textures=new N(this),this.cache=new g(this),this.registry=new u(this,new b),this.input=new _(this,this.config),this.scene=new R(this,this.config.sceneConfig),this.device=v,this.scale=new I(this,this.config),this.sound=null,this.sound=G.create(this),this.loop=new V(this,this.config.fps),this.plugins=new M(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,x(this.boot.bind(this))},boot:function(){A.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),p(this),h(this),m(this),y(this.canvas,this.config.parent),this.textures.once(F.READY,this.texturesReady,this),this.events.emit(T.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(T.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.loop.start(this.renderer?this.step.bind(this):this.headlessStep.bind(this)),B(this);var K=this.events;K.on(T.HIDDEN,this.onHidden,this),K.on(T.VISIBLE,this.onVisible,this),K.on(T.BLUR,this.onBlur,this),K.on(T.FOCUS,this.onFocus,this)},step:function(K,tt){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var at=this.events;at.emit(T.PRE_STEP,K,tt),at.emit(T.STEP,K,tt),this.scene.update(K,tt),at.emit(T.POST_STEP,K,tt);var lt=this.renderer;lt.preRender(),at.emit(T.PRE_RENDER,lt,K,tt),this.scene.render(lt),lt.postRender(),at.emit(T.POST_RENDER,lt,K,tt)}},headlessStep:function(K,tt){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var at=this.events;at.emit(T.PRE_STEP,K,tt),at.emit(T.STEP,K,tt),this.scene.update(K,tt),at.emit(T.POST_STEP,K,tt),this.scene.isProcessing=!1,at.emit(T.PRE_RENDER,null,K,tt),at.emit(T.POST_RENDER,null,K,tt)}},onHidden:function(){this.loop.pause(),this.events.emit(T.PAUSE)},pause:function(){var K=this.isPaused;this.isPaused=!0,K||this.events.emit(T.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(T.RESUME,this.loop.pauseDuration)},resume:function(){var K=this.isPaused;this.isPaused=!1,K&&this.events.emit(T.RESUME,0)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(K,tt){void 0===tt&&(tt=!1),this.pendingDestroy=!0,this.removeCanvas=K,this.noReturn=tt},runDestroy:function(){this.scene.destroy(),this.events.emit(T.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(f.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});S.exports=H},65898:(S,P,a)=>{var y=a(83419),C=a(35154),g=a(29747),f=a(43092),d=new y({initialize:function(h,p){this.game=h,this.raf=new f,this.started=!1,this.running=!1,this.minFps=C(p,"min",5),this.targetFps=C(p,"target",60),this.fpsLimit=C(p,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=g,this.forceSetTimeOut=C(p,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this.pauseDuration=0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=C(p,"deltaHistory",10),this.panicMax=C(p,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=C(p,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.pauseDuration=this.time-this._pauseTime,this.startTime+=this.pauseDuration},resetDelta:function(){var c=window.performance.now();this.time=c,this.lastTime=c,this.nextFpsUpdate=c+1e3,this.framesThisSecond=0;for(var h=0;h0||!this.inFocus)&&(this._coolDown--,c=Math.min(c,this._target)),c>this._min&&(c=p[h],c=Math.min(c,this._min)),p[h]=c,this.deltaIndex++,this.deltaIndex>=u&&(this.deltaIndex=0);for(var m=0,v=0;v=this.nextFpsUpdate&&this.updateFPS(c),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(c,this.delta),this.delta=0),this.lastTime=c,this.frame++},step:function(c){this.now=c;var h=Math.max(0,c-this.lastTime);this.rawDelta=h,this.time+=this.rawDelta,this.smoothStep&&(h=this.smoothDelta(h)),this.delta=h,c>=this.nextFpsUpdate&&this.updateFPS(c),this.framesThisSecond++,this.callback(c,h),this.lastTime=c,this.frame++},tick:function(){var c=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(c):this.step(c)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(c){void 0===c&&(c=!1);var h=window.performance.now();if(!this.running){c&&(this.startTime+=-this.lastTime+(this.lastTime+h));var p=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(p,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=h+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});S.exports=d},51085:(S,P,a)=>{var y=a(8443);S.exports=function(g){var f,d=g.events;void 0!==document.hidden?f="visibilitychange":["webkit","moz","ms"].forEach(function(p){void 0!==document[p+"Hidden"]&&(document.hidden=function(){return document[p+"Hidden"]},f=p+"visibilitychange")}),f&&document.addEventListener(f,function(p){document.hidden||"pause"===p.type?d.emit(y.HIDDEN):d.emit(y.VISIBLE)},!1),window.onblur=function(){d.emit(y.BLUR)},window.onfocus=function(){d.emit(y.FOCUS)},window.focus&&g.config.autoFocus&&window.focus()}},97217:S=>{S.exports="blur"},47548:S=>{S.exports="boot"},19814:S=>{S.exports="contextlost"},68446:S=>{S.exports="destroy"},41700:S=>{S.exports="focus"},25432:S=>{S.exports="hidden"},65942:S=>{S.exports="pause"},59211:S=>{S.exports="postrender"},47789:S=>{S.exports="poststep"},39066:S=>{S.exports="prerender"},460:S=>{S.exports="prestep"},16175:S=>{S.exports="ready"},42331:S=>{S.exports="resume"},11966:S=>{S.exports="step"},32969:S=>{S.exports="systemready"},94830:S=>{S.exports="visible"},8443:(S,P,a)=>{S.exports={BLUR:a(97217),BOOT:a(47548),CONTEXT_LOST:a(19814),DESTROY:a(68446),FOCUS:a(41700),HIDDEN:a(25432),PAUSE:a(65942),POST_RENDER:a(59211),POST_STEP:a(47789),PRE_RENDER:a(39066),PRE_STEP:a(460),READY:a(16175),RESUME:a(42331),STEP:a(11966),SYSTEM_READY:a(32969),VISIBLE:a(94830)}},42857:(S,P,a)=>{S.exports={Config:a(69547),CreateRenderer:a(86054),DebugHeader:a(96391),Events:a(8443),TimeStep:a(65898),VisibilityHandler:a(51085)}},99584:(S,P,a)=>{var y=a(5290),C=a(27919),g=a(35154);S.exports=function(d){var c=g(d,"data",[]),h=g(d,"canvas",null),p=g(d,"palette",y),u=g(d,"pixelWidth",1),m=g(d,"pixelHeight",u),v=g(d,"resizeCanvas",!0),x=g(d,"clearCanvas",!0),b=g(d,"preRender",null),T=g(d,"postRender",null),_=Math.floor(Math.abs(c[0].length*u)),A=Math.floor(Math.abs(c.length*m));h||(h=C.create2D(this,_,A),v=!1,x=!1),v&&(h.width=_,h.height=A);var M=h.getContext("2d",{willReadFrequently:!0});x&&M.clearRect(0,0,_,A),b&&b(h,M);for(var I=0;I{S.exports={GenerateTexture:a(99584),Palettes:a(57763)}},5290:S=>{S.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:S=>{S.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},9866:S=>{S.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},77552:S=>{S.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},92259:S=>{S.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},57763:(S,P,a)=>{S.exports={ARNE16:a(5290),C64:a(23816),CGA:a(9866),JMP:a(77552),MSX:a(92259)}},46728:(S,P,a)=>{var y=a(83419),C=a(36316),g=a(80021),f=a(26099),d=new y({Extends:g,initialize:function(h,p,u,m){g.call(this,"CubicBezierCurve"),Array.isArray(h)&&(m=new f(h[6],h[7]),u=new f(h[4],h[5]),p=new f(h[2],h[3]),h=new f(h[0],h[1])),this.p0=h,this.p1=p,this.p2=u,this.p3=m},getStartPoint:function(c){return void 0===c&&(c=new f),c.copy(this.p0)},getResolution:function(c){return c},getPoint:function(c,h){void 0===h&&(h=new f);var p=this.p0,u=this.p1,m=this.p2,v=this.p3;return h.set(C(c,p.x,u.x,m.x,v.x),C(c,p.y,u.y,m.y,v.y))},draw:function(c,h){void 0===h&&(h=32);var p=this.getPoints(h);c.beginPath(),c.moveTo(this.p0.x,this.p0.y);for(var u=1;u{var y=a(83419),C=a(19217),g=a(87841),f=a(26099),d=new y({initialize:function(h){this.type=h,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new f,this._tmpVec2B=new f},draw:function(c,h){return void 0===h&&(h=32),c.strokePoints(this.getPoints(h))},getBounds:function(c,h){c||(c=new g),void 0===h&&(h=16);var p=this.getLength();h>p&&(h=p/2);var u=Math.max(1,Math.round(p/h));return C(this.getSpacedPoints(u),c)},getDistancePoints:function(c){var h=this.getLength(),p=Math.max(1,h/c);return this.getSpacedPoints(p)},getEndPoint:function(c){return void 0===c&&(c=new f),this.getPointAt(1,c)},getLength:function(){var c=this.getLengths();return c[c.length-1]},getLengths:function(c){if(void 0===c&&(c=this.arcLengthDivisions),this.cacheArcLengths.length===c+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var p,h=[],u=this.getPoint(0,this._tmpVec2A),m=0;h.push(0);for(var v=1;v<=c;v++)m+=(p=this.getPoint(v/c,this._tmpVec2B)).distance(u),h.push(m),u.copy(p);return this.cacheArcLengths=h,h},getPointAt:function(c,h){var p=this.getUtoTmapping(c);return this.getPoint(p,h)},getPoints:function(c,h,p){void 0===p&&(p=[]),c||(c=h?this.getLength()/h:this.defaultDivisions);for(var u=0;u<=c;u++)p.push(this.getPoint(u/c));return p},getRandomPoint:function(c){return void 0===c&&(c=new f),this.getPoint(Math.random(),c)},getSpacedPoints:function(c,h,p){void 0===p&&(p=[]),c||(c=h?this.getLength()/h:this.defaultDivisions);for(var u=0;u<=c;u++){var m=this.getUtoTmapping(u/c,null,c);p.push(this.getPoint(m))}return p},getStartPoint:function(c){return void 0===c&&(c=new f),this.getPointAt(0,c)},getTangent:function(c,h){void 0===h&&(h=new f);var p=1e-4,u=c-p,m=c+p;return u<0&&(u=0),m>1&&(m=1),this.getPoint(u,this._tmpVec2A),this.getPoint(m,h),h.subtract(this._tmpVec2A).normalize()},getTangentAt:function(c,h){var p=this.getUtoTmapping(c);return this.getTangent(p,h)},getTFromDistance:function(c,h){return c<=0?0:this.getUtoTmapping(0,c,h)},getUtoTmapping:function(c,h,p){var x,u=this.getLengths(p),m=0,v=u.length;x=h?Math.min(h,u[v-1]):c*u[v-1];for(var _,b=0,T=v-1;b<=T;)if((_=u[m=Math.floor(b+(T-b)/2)]-x)<0)b=m+1;else{if(!(_>0)){T=m;break}T=m-1}if(u[m=T]===x)return m/(v-1);var A=u[m];return(m+(x-A)/(u[m+1]-A))/(v-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});S.exports=d},73825:(S,P,a)=>{var y=a(83419),C=a(80021),g=a(39506),f=a(35154),d=a(43396),c=a(26099),h=new y({Extends:C,initialize:function(u,m,v,x,b,T,_,A){if("object"==typeof u){var M=u;u=f(M,"x",0),m=f(M,"y",0),v=f(M,"xRadius",0),x=f(M,"yRadius",v),b=f(M,"startAngle",0),T=f(M,"endAngle",360),_=f(M,"clockwise",!1),A=f(M,"rotation",0)}else void 0===x&&(x=v),void 0===b&&(b=0),void 0===T&&(T=360),void 0===_&&(_=!1),void 0===A&&(A=0);C.call(this,"EllipseCurve"),this.p0=new c(u,m),this._xRadius=v,this._yRadius=x,this._startAngle=g(b),this._endAngle=g(T),this._clockwise=_,this._rotation=g(A)},getStartPoint:function(p){return void 0===p&&(p=new c),this.getPoint(0,p)},getResolution:function(p){return 2*p},getPoint:function(p,u){void 0===u&&(u=new c);for(var m=2*Math.PI,v=this._endAngle-this._startAngle,x=Math.abs(v)m;)v-=m;v{var y=a(83419),C=a(80021),g=a(19217),f=a(87841),d=a(26099),c=new y({Extends:C,initialize:function(p,u){C.call(this,"LineCurve"),Array.isArray(p)&&(u=new d(p[2],p[3]),p=new d(p[0],p[1])),this.p0=p,this.p1=u,this.arcLengthDivisions=1},getBounds:function(h){return void 0===h&&(h=new f),g([this.p0,this.p1],h)},getStartPoint:function(h){return void 0===h&&(h=new d),h.copy(this.p0)},getResolution:function(h){return void 0===h&&(h=1),h},getPoint:function(h,p){return void 0===p&&(p=new d),1===h?p.copy(this.p1):(p.copy(this.p1).subtract(this.p0).scale(h).add(this.p0),p)},getPointAt:function(h,p){return this.getPoint(h,p)},getTangent:function(h,p){return void 0===p&&(p=new d),p.copy(this.p1).subtract(this.p0).normalize(),p},getUtoTmapping:function(h,p,u){var m;if(p){var v=this.getLengths(u),x=v[v.length-1];m=Math.min(p,x)/x}else m=h;return m},draw:function(h){return h.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),h},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});c.fromJSON=function(h){var p=h.points,u=new d(p[0],p[1]),m=new d(p[2],p[3]);return new c(u,m)},S.exports=c},14744:(S,P,a)=>{var y=a(83419),C=a(80021),g=a(32112),f=a(26099),d=new y({Extends:C,initialize:function(h,p,u){C.call(this,"QuadraticBezierCurve"),Array.isArray(h)&&(u=new f(h[4],h[5]),p=new f(h[2],h[3]),h=new f(h[0],h[1])),this.p0=h,this.p1=p,this.p2=u},getStartPoint:function(c){return void 0===c&&(c=new f),c.copy(this.p0)},getResolution:function(c){return c},getPoint:function(c,h){void 0===h&&(h=new f);var p=this.p0,u=this.p1,m=this.p2;return h.set(g(c,p.x,u.x,m.x),g(c,p.y,u.y,m.y))},draw:function(c,h){void 0===h&&(h=32);var p=this.getPoints(h);c.beginPath(),c.moveTo(this.p0.x,this.p0.y);for(var u=1;u{var y=a(87842),C=a(83419),g=a(80021),f=a(26099),d=new C({Extends:g,initialize:function(h){void 0===h&&(h=[]),g.call(this,"SplineCurve"),this.points=[],this.addPoints(h)},addPoints:function(c){for(var h=0;hp.length-2?p.length-1:m+1],_=p[m>p.length-3?p.length-1:m+2];return h.set(y(v,x.x,b.x,T.x,_.x),y(v,x.y,b.y,T.y,_.y))},toJSON:function(){for(var c=[],h=0;h{S.exports={Path:a(46669),MoveTo:a(68618),CubicBezier:a(46728),Curve:a(80021),Ellipse:a(73825),Line:a(33951),QuadraticBezier:a(14744),Spline:a(42534)}},68618:(S,P,a)=>{var y=a(83419),C=a(26099),g=new y({initialize:function(d,c){this.active=!1,this.p0=new C(d,c)},getPoint:function(f,d){return void 0===d&&(d=new C),d.copy(this.p0)},getPointAt:function(f,d){return this.getPoint(f,d)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});S.exports=g},46669:(S,P,a)=>{var y=a(83419),C=a(46728),g=a(73825),f=a(39429),d=a(33951),c=a(68618),h=a(14744),p=a(87841),u=a(42534),m=a(26099),v=a(36383),x=new y({initialize:function(T,_){void 0===T&&(T=0),void 0===_&&(_=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new m,this._tmpVec2A=new m,this._tmpVec2B=new m,"object"==typeof T?this.fromJSON(T):this.startPoint.set(T,_)},add:function(b){return this.curves.push(b),this},circleTo:function(b,T,_){return void 0===T&&(T=!1),this.ellipseTo(b,b,0,360,T,_)},closePath:function(){var b=this.curves[0].getPoint(0),T=this.curves[this.curves.length-1].getPoint(1);return b.equals(T)||this.curves.push(new d(T,b)),this},cubicBezierTo:function(b,T,_,A,M,I){var F,N,V,R=this.getEndPoint();return b instanceof m?(F=b,N=T,V=_):(F=new m(_,A),N=new m(M,I),V=new m(b,T)),this.add(new C(R,F,N,V))},quadraticBezierTo:function(b,T,_,A){var I,R,M=this.getEndPoint();return b instanceof m?(I=b,R=T):(I=new m(_,A),R=new m(b,T)),this.add(new h(M,I,R))},draw:function(b,T){for(var _=0;_=T)return this.curves[A];A++}return null},getEndPoint:function(b){return void 0===b&&(b=new m),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,b):b.copy(this.startPoint),b},getLength:function(){var b=this.getCurveLengths();return b[b.length-1]},getPoint:function(b,T){void 0===T&&(T=new m);for(var _=b*this.getLength(),A=this.getCurveLengths(),M=0;M=_){var I=A[M]-_,R=this.curves[M],F=R.getLength();return R.getPointAt(0===F?0:1-I/F,T)}M++}return null},getPoints:function(b,T){!b&&!T&&(b=this.defaultDivisions);for(var A,_=[],M=0;M1&&!_[_.length-1].equals(_[0])&&_.push(_[0]),_},getRandomPoint:function(b){return void 0===b&&(b=new m),this.getPoint(Math.random(),b)},getSpacedPoints:function(b){void 0===b&&(b=40);for(var T=[],_=0;_<=b;_++)T.push(this.getPoint(_/b));return this.autoClose&&T.push(T[0]),T},getStartPoint:function(b){return void 0===b&&(b=new m),b.copy(this.startPoint)},getTangent:function(b,T){void 0===T&&(T=new m);for(var _=b*this.getLength(),A=this.getCurveLengths(),M=0;M=_){var I=A[M]-_,R=this.curves[M],F=R.getLength();return R.getTangentAt(0===F?0:1-I/F,T)}M++}return null},lineTo:function(b,T){b instanceof m?this._tmpVec2B.copy(b):"object"==typeof b?this._tmpVec2B.setFromObject(b):this._tmpVec2B.set(b,T);var _=this.getEndPoint(this._tmpVec2A);return this.add(new d([_.x,_.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(b){return b.unshift(this.getEndPoint()),this.add(new u(b))},moveTo:function(b,T){return this.add(b instanceof m?new c(b.x,b.y):new c(b,T))},toJSON:function(){for(var b=[],T=0;T{var y=a(83419),C=a(24882),g=new y({initialize:function(d,c){this.parent=d,this.events=c,c||(this.events=d.events?d.events:d),this.list={},this.values={},this._frozen=!1,!d.hasOwnProperty("sys")&&this.events&&this.events.once(C.DESTROY,this.destroy,this)},get:function(f){var d=this.list;if(Array.isArray(f)){for(var c=[],h=0;h{var y=a(83419),C=a(45893),g=a(37277),f=a(44594),d=new y({Extends:C,initialize:function(h){C.call(this,h,h.sys.events),this.scene=h,this.systems=h.sys,h.sys.events.once(f.BOOT,this.boot,this),h.sys.events.on(f.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(f.DESTROY,this.destroy,this)},start:function(){this.events.once(f.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(f.SHUTDOWN,this.shutdown,this)},destroy:function(){C.prototype.destroy.call(this),this.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});g.register("DataManagerPlugin",d,"data"),S.exports=d},10700:S=>{S.exports="changedata"},93608:S=>{S.exports="changedata-"},60883:S=>{S.exports="destroy"},69780:S=>{S.exports="removedata"},22166:S=>{S.exports="setdata"},24882:(S,P,a)=>{S.exports={CHANGE_DATA:a(10700),CHANGE_DATA_KEY:a(93608),DESTROY:a(60883),REMOVE_DATA:a(69780),SET_DATA:a(22166)}},44965:(S,P,a)=>{S.exports={DataManager:a(45893),DataManagerPlugin:a(63646),Events:a(24882)}},7098:(S,P,a)=>{var y=a(84148),C={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};S.exports=function g(){if("function"==typeof importScripts)return C;C.audioData=!!window.Audio,C.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var f=document.createElement("audio"),d=!!f.canPlayType;try{if(d){var c=function(u,m){var v=f.canPlayType("audio/"+u).replace(/^no$/,"");return m?!(!v&&!f.canPlayType("audio/"+m).replace(/^no$/,"")):!!v};if(C.ogg=c('ogg; codecs="vorbis"'),C.opus=c('ogg; codecs="opus"',"opus"),C.mp3=c("mpeg"),C.wav=c("wav"),C.m4a=c("x-m4a"),C.aac=c("aac"),C.flac=c("flac","x-flac"),C.webm=c('webm; codecs="vorbis"'),""!==f.canPlayType('audio/mp4; codecs="ec-3"'))if(y.edge)C.dolby=!0;else if(y.safari&&y.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var h=parseInt(RegExp.$1,10),p=parseInt(RegExp.$2,10);(10===h&&p>=11||h>10)&&(C.dolby=!0)}}}catch{}return C}()},84148:(S,P,a)=>{var y=a(25892),C={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};S.exports=function g(){var f=navigator.userAgent;return/Edg\/\d+/.test(f)?(C.edge=!0,C.es2019=!0):/OPR/.test(f)?(C.opera=!0,C.es2019=!0):/Chrome\/(\d+)/.test(f)&&!y.windowsPhone?(C.chrome=!0,C.chromeVersion=parseInt(RegExp.$1,10),C.es2019=C.chromeVersion>69):/Firefox\D+(\d+)/.test(f)?(C.firefox=!0,C.firefoxVersion=parseInt(RegExp.$1,10),C.es2019=C.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(f)&&y.iOS?(C.mobileSafari=!0,C.es2019=!0):/MSIE (\d+\.\d+);/.test(f)?(C.ie=!0,C.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(f)&&!y.windowsPhone?(C.safari=!0,C.safariVersion=parseInt(RegExp.$1,10),C.es2019=C.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(f)&&(C.ie=!0,C.trident=!0,C.tridentVersion=parseInt(RegExp.$1,10),C.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(f)&&(C.silk=!0),C}()},89289:(S,P,a)=>{var y=a(27919),C={supportInverseAlpha:!1,supportNewBlendModes:!1};S.exports=function d(){return"function"!=typeof importScripts&&void 0!==document&&(C.supportNewBlendModes=function g(){var c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",h="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",p=new Image;return p.onload=function(){var u=new Image;u.onload=function(){var v=y.create2D(u,6).getContext("2d",{willReadFrequently:!0});if(v.globalCompositeOperation="multiply",v.drawImage(p,0,0),v.drawImage(u,2,0),!v.getImageData(2,0,1,1))return!1;var x=v.getImageData(2,0,1,1).data;y.remove(u),C.supportNewBlendModes=255===x[0]&&0===x[1]&&0===x[2]},u.src=c+"/wCKxvRF"+h},p.src=c+"AP804Oa6"+h,!1}(),C.supportInverseAlpha=function f(){var h=y.create2D(this,2).getContext("2d",{willReadFrequently:!0});h.fillStyle="rgba(10, 20, 30, 0.5)",h.fillRect(0,0,1,1);var p=h.getImageData(0,0,1,1);if(null===p)return!1;h.putImageData(p,1,0);var u=h.getImageData(1,0,1,1),m=u.data[0]===p.data[0]&&u.data[1]===p.data[1]&&u.data[2]===p.data[2]&&u.data[3]===p.data[3];return y.remove(this),m}()),C}()},89357:(S,P,a)=>{var y=a(25892),C=a(84148),g=a(27919),f={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};S.exports=function c(){if("function"==typeof importScripts)return f;f.canvas=!!window.CanvasRenderingContext2D;try{f.localStorage=!!localStorage.getItem}catch{f.localStorage=!1}f.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),f.fileSystem=!!window.requestFileSystem;var h=!1;return f.webGL=function(){if(window.WebGLRenderingContext)try{var u=g.createWebGL(this),m=u.getContext("webgl")||u.getContext("experimental-webgl"),v=g.create2D(this),b=v.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return h=b.data instanceof Uint8ClampedArray,g.remove(u),g.remove(v),!!m}catch{return!1}return!1}(),f.worker=!!window.Worker,f.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,f.getUserMedia=f.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,C.firefox&&C.firefoxVersion<21&&(f.getUserMedia=!1),!y.iOS&&(C.ie||C.firefox||C.chrome)&&(f.canvasBitBltShift=!0),(C.safari||C.mobileSafari)&&(f.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(f.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(f.littleEndian=function d(){var h=new ArrayBuffer(4),p=new Uint8Array(h),u=new Uint32Array(h);return p[0]=161,p[1]=178,p[2]=195,p[3]=212,3569595041===u[0]||2712847316!==u[0]&&null}()),f.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&null!==f.littleEndian&&h,f}()},91639:S=>{var P={available:!1,cancel:"",keyboard:!1,request:""};S.exports=function a(){if("function"==typeof importScripts)return P;var y,C="Fullscreen",g="FullScreen",f=["request"+C,"request"+g,"webkitRequest"+C,"webkitRequest"+g,"msRequest"+C,"msRequest"+g,"mozRequest"+g,"mozRequest"+C];for(y=0;y{var y=a(84148),C={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};S.exports=function g(){return"function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(C.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(C.mspointer=!0),navigator.getGamepads&&(C.gamepads=!0),"onwheel"in window||y.ie&&"WheelEvent"in window?C.wheelEvent="wheel":"onmousewheel"in window?C.wheelEvent="mousewheel":y.firefox&&"MouseScrollEvent"in window&&(C.wheelEvent="DOMMouseScroll")),C}()},25892:S=>{var P={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};S.exports=function a(){if("function"==typeof importScripts)return P;var y=navigator.userAgent;/Windows/.test(y)?P.windows=!0:/Mac OS/.test(y)&&!/like Mac OS/.test(y)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(P.iOS=!0,P.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),P.iOSVersion=parseInt(RegExp.$1,10)):P.macOS=!0:/Android/.test(y)?P.android=!0:/Linux/.test(y)?P.linux=!0:/iP[ao]d|iPhone/i.test(y)?(P.iOS=!0,navigator.appVersion.match(/OS (\d+)/),P.iOSVersion=parseInt(RegExp.$1,10),P.iPhone=-1!==y.toLowerCase().indexOf("iphone"),P.iPad=-1!==y.toLowerCase().indexOf("ipad")):/Kindle/.test(y)||/\bKF[A-Z][A-Z]+/.test(y)||/Silk.*Mobile Safari/.test(y)?P.kindle=!0:/CrOS/.test(y)&&(P.chromeOS=!0),(/Windows Phone/i.test(y)||/IEMobile/i.test(y))&&(P.android=!1,P.iOS=!1,P.macOS=!1,P.windows=!0,P.windowsPhone=!0);var C=/Silk/.test(y);return(P.windows||P.macOS||P.linux&&!C||P.chromeOS)&&(P.desktop=!0),(P.windowsPhone||/Windows NT/i.test(y)&&/Touch/i.test(y))&&(P.desktop=!1),navigator.standalone&&(P.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(P.cordova=!0),void 0!==window.ejecta&&(P.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(P.node=!0),P.node&&"object"==typeof process.versions&&(P.nodeWebkit=!!process.versions["node-webkit"],P.electron=!!process.versions.electron),/Crosswalk/.test(y)&&(P.crosswalk=!0),P.pixelRatio=window.devicePixelRatio||1,P}()},43267:(S,P,a)=>{var y=a(95540),C={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};S.exports=function g(){if("function"==typeof importScripts)return C;var f=document.createElement("video"),d=!!f.canPlayType,c=/^no$/;try{d&&(f.canPlayType('video/ogg; codecs="theora"').replace(c,"")&&(C.ogg=!0),f.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(c,"")&&(C.h264=!0,C.mp4=!0),f.canPlayType("video/x-m4v").replace(c,"")&&(C.m4v=!0),f.canPlayType('video/webm; codecs="vp8, vorbis"').replace(c,"")&&(C.webm=!0),f.canPlayType('video/webm; codecs="vp9"').replace(c,"")&&(C.vp9=!0),f.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(c,"")&&(C.hls=!0))}catch{}return f.parentNode&&f.parentNode.removeChild(f),C.getVideoURL=function(h){Array.isArray(h)||(h=[h]);for(var p=0;p{S.exports={os:a(25892),browser:a(84148),features:a(89357),input:a(31784),audio:a(7098),video:a(43267),fullscreen:a(91639),canvasFeatures:a(89289)}},89422:(S,P,a)=>{var y=a(83419),C=new Float32Array(20),g=new y({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(f){return this._matrix.set(f),this._dirty=!0,this},reset:function(){var f=this._matrix;return f.fill(0),f[0]=1,f[6]=1,f[12]=1,f[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var f=this._data;return this._dirty&&(f.set(this._matrix),f[4]/=255,f[9]/=255,f[14]/=255,f[19]/=255,this._dirty=!1),f},brightness:function(f,d){return void 0===f&&(f=0),void 0===d&&(d=!1),this.multiply([f,0,0,0,0,0,f,0,0,0,0,0,f,0,0,0,0,0,1,0],d)},saturate:function(f,d){void 0===f&&(f=0),void 0===d&&(d=!1);var c=2*f/3+1,h=-.5*(c-1);return this.multiply([c,h,h,0,0,h,c,h,0,0,h,h,c,0,0,0,0,0,1,0],d)},desaturate:function(f){return void 0===f&&(f=!1),this.saturate(-1,f)},hue:function(f,d){void 0===f&&(f=0),void 0===d&&(d=!1),f=f/180*Math.PI;var c=Math.cos(f),h=Math.sin(f),p=.213,u=.715,m=.072;return this.multiply([p+c*(1-p)+h*-p,u+c*-u+h*-u,m+c*-m+h*(1-m),0,0,p+c*-p+.143*h,u+c*(1-u)+.14*h,m+c*-m+-.283*h,0,0,p+c*-p+-.787*h,u+c*-u+h*u,m+c*(1-m)+h*m,0,0,0,0,0,1,0],d)},grayscale:function(f,d){return void 0===f&&(f=1),void 0===d&&(d=!1),this.saturate(-f,d)},blackWhite:function(f){return void 0===f&&(f=!1),this.multiply(g.BLACK_WHITE,f)},contrast:function(f,d){void 0===f&&(f=0),void 0===d&&(d=!1);var c=f+1,h=-.5*(c-1);return this.multiply([c,0,0,0,h,0,c,0,0,h,0,0,c,0,h,0,0,0,1,0],d)},negative:function(f){return void 0===f&&(f=!1),this.multiply(g.NEGATIVE,f)},desaturateLuminance:function(f){return void 0===f&&(f=!1),this.multiply(g.DESATURATE_LUMINANCE,f)},sepia:function(f){return void 0===f&&(f=!1),this.multiply(g.SEPIA,f)},night:function(f,d){return void 0===f&&(f=.1),void 0===d&&(d=!1),this.multiply([-2*f,-f,0,0,0,-f,0,f,0,0,0,f,2*f,0,0,0,0,0,1,0],d)},lsd:function(f){return void 0===f&&(f=!1),this.multiply(g.LSD,f)},brown:function(f){return void 0===f&&(f=!1),this.multiply(g.BROWN,f)},vintagePinhole:function(f){return void 0===f&&(f=!1),this.multiply(g.VINTAGE,f)},kodachrome:function(f){return void 0===f&&(f=!1),this.multiply(g.KODACHROME,f)},technicolor:function(f){return void 0===f&&(f=!1),this.multiply(g.TECHNICOLOR,f)},polaroid:function(f){return void 0===f&&(f=!1),this.multiply(g.POLAROID,f)},shiftToBGR:function(f){return void 0===f&&(f=!1),this.multiply(g.SHIFT_BGR,f)},multiply:function(f,d){void 0===d&&(d=!1),d||this.reset();var c=this._matrix,h=C;return h.set(c),c.set([h[0]*f[0]+h[1]*f[5]+h[2]*f[10]+h[3]*f[15],h[0]*f[1]+h[1]*f[6]+h[2]*f[11]+h[3]*f[16],h[0]*f[2]+h[1]*f[7]+h[2]*f[12]+h[3]*f[17],h[0]*f[3]+h[1]*f[8]+h[2]*f[13]+h[3]*f[18],h[0]*f[4]+h[1]*f[9]+h[2]*f[14]+h[3]*f[19]+h[4],h[5]*f[0]+h[6]*f[5]+h[7]*f[10]+h[8]*f[15],h[5]*f[1]+h[6]*f[6]+h[7]*f[11]+h[8]*f[16],h[5]*f[2]+h[6]*f[7]+h[7]*f[12]+h[8]*f[17],h[5]*f[3]+h[6]*f[8]+h[7]*f[13]+h[8]*f[18],h[5]*f[4]+h[6]*f[9]+h[7]*f[14]+h[8]*f[19]+h[9],h[10]*f[0]+h[11]*f[5]+h[12]*f[10]+h[13]*f[15],h[10]*f[1]+h[11]*f[6]+h[12]*f[11]+h[13]*f[16],h[10]*f[2]+h[11]*f[7]+h[12]*f[12]+h[13]*f[17],h[10]*f[3]+h[11]*f[8]+h[12]*f[13]+h[13]*f[18],h[10]*f[4]+h[11]*f[9]+h[12]*f[14]+h[13]*f[19]+h[14],h[15]*f[0]+h[16]*f[5]+h[17]*f[10]+h[18]*f[15],h[15]*f[1]+h[16]*f[6]+h[17]*f[11]+h[18]*f[16],h[15]*f[2]+h[16]*f[7]+h[17]*f[12]+h[18]*f[17],h[15]*f[3]+h[16]*f[8]+h[17]*f[13]+h[18]*f[18],h[15]*f[4]+h[16]*f[9]+h[17]*f[14]+h[18]*f[19]+h[19]]),this._dirty=!0,this}});g.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],g.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],g.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],g.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],g.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],g.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],g.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],g.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],g.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],g.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],g.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],S.exports=g},51767:(S,P,a)=>{var y=a(83419),C=a(29747),g=new y({initialize:function(d,c,h){this._rgb=[0,0,0],this.onChangeCallback=C,this.dirty=!1,this.set(d,c,h)},set:function(f,d,c){return void 0===f&&(f=0),void 0===d&&(d=0),void 0===c&&(c=0),this._rgb=[f,d,c],this.onChange(),this},equals:function(f,d,c){var h=this._rgb;return h[0]===f&&h[1]===d&&h[2]===c},onChange:function(){this.dirty=!0;var f=this._rgb;this.onChangeCallback.call(this,f[0],f[1],f[2])},r:{get:function(){return this._rgb[0]},set:function(f){this._rgb[0]=f,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(f){this._rgb[1]=f,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(f){this._rgb[2]=f,this.onChange()}},destroy:function(){this.onChangeCallback=null}});S.exports=g},60461:S=>{S.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},54312:(S,P,a)=>{var y=a(62235),C=a(35893),g=a(86327),f=a(88417);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,C(h)+p),g(c,y(h)+u),c}},46768:(S,P,a)=>{var y=a(62235),C=a(26541),g=a(86327),f=a(385);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,C(h)-p),g(c,y(h)+u),c}},35827:(S,P,a)=>{var y=a(62235),C=a(54380),g=a(86327),f=a(40136);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,C(h)+p),g(c,y(h)+u),c}},46871:(S,P,a)=>{var y=a(66786),C=a(35893),g=a(7702);S.exports=function(d,c,h,p){return void 0===h&&(h=0),void 0===p&&(p=0),y(d,C(c)+h,g(c)+p),d}},5198:(S,P,a)=>{var y=a(7702),C=a(26541),g=a(20786),f=a(385);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,C(h)-p),g(c,y(h)+u),c}},11879:(S,P,a)=>{var y=a(60461),C=[];C[y.BOTTOM_CENTER]=a(54312),C[y.BOTTOM_LEFT]=a(46768),C[y.BOTTOM_RIGHT]=a(35827),C[y.CENTER]=a(46871),C[y.LEFT_CENTER]=a(5198),C[y.RIGHT_CENTER]=a(80503),C[y.TOP_CENTER]=a(89698),C[y.TOP_LEFT]=a(922),C[y.TOP_RIGHT]=a(21373),C[y.LEFT_BOTTOM]=C[y.BOTTOM_LEFT],C[y.LEFT_TOP]=C[y.TOP_LEFT],C[y.RIGHT_BOTTOM]=C[y.BOTTOM_RIGHT],C[y.RIGHT_TOP]=C[y.TOP_RIGHT],S.exports=function(f,d,c,h,p){return C[c](f,d,h,p)}},80503:(S,P,a)=>{var y=a(7702),C=a(54380),g=a(20786),f=a(40136);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,C(h)+p),g(c,y(h)+u),c}},89698:(S,P,a)=>{var y=a(35893),C=a(17717),g=a(88417),f=a(66737);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),g(c,y(h)+p),f(c,C(h)-u),c}},922:(S,P,a)=>{var y=a(26541),C=a(17717),g=a(385),f=a(66737);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),g(c,y(h)-p),f(c,C(h)-u),c}},21373:(S,P,a)=>{var y=a(54380),C=a(17717),g=a(40136),f=a(66737);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),g(c,y(h)+p),f(c,C(h)-u),c}},91660:(S,P,a)=>{S.exports={BottomCenter:a(54312),BottomLeft:a(46768),BottomRight:a(35827),Center:a(46871),LeftCenter:a(5198),QuickSet:a(11879),RightCenter:a(80503),TopCenter:a(89698),TopLeft:a(922),TopRight:a(21373)}},71926:(S,P,a)=>{var y=a(60461),C=a(79291),g={In:a(91660),To:a(16694)};g=C(!1,g,y),S.exports=g},21578:(S,P,a)=>{var y=a(62235),C=a(35893),g=a(88417),f=a(66737);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),g(c,C(h)+p),f(c,y(h)+u),c}},10210:(S,P,a)=>{var y=a(62235),C=a(26541),g=a(385),f=a(66737);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),g(c,C(h)-p),f(c,y(h)+u),c}},82341:(S,P,a)=>{var y=a(62235),C=a(54380),g=a(40136),f=a(66737);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),g(c,C(h)+p),f(c,y(h)+u),c}},87958:(S,P,a)=>{var y=a(62235),C=a(26541),g=a(86327),f=a(40136);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,C(h)-p),g(c,y(h)+u),c}},40080:(S,P,a)=>{var y=a(7702),C=a(26541),g=a(20786),f=a(40136);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,C(h)-p),g(c,y(h)+u),c}},88466:(S,P,a)=>{var y=a(26541),C=a(17717),g=a(40136),f=a(66737);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),g(c,y(h)-p),f(c,C(h)-u),c}},38829:(S,P,a)=>{var y=a(60461),C=[];C[y.BOTTOM_CENTER]=a(21578),C[y.BOTTOM_LEFT]=a(10210),C[y.BOTTOM_RIGHT]=a(82341),C[y.LEFT_BOTTOM]=a(87958),C[y.LEFT_CENTER]=a(40080),C[y.LEFT_TOP]=a(88466),C[y.RIGHT_BOTTOM]=a(19211),C[y.RIGHT_CENTER]=a(34609),C[y.RIGHT_TOP]=a(48741),C[y.TOP_CENTER]=a(49440),C[y.TOP_LEFT]=a(81288),C[y.TOP_RIGHT]=a(61323),S.exports=function(f,d,c,h,p){return C[c](f,d,h,p)}},19211:(S,P,a)=>{var y=a(62235),C=a(54380),g=a(86327),f=a(385);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,C(h)+p),g(c,y(h)+u),c}},34609:(S,P,a)=>{var y=a(7702),C=a(54380),g=a(20786),f=a(385);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,C(h)+p),g(c,y(h)+u),c}},48741:(S,P,a)=>{var y=a(54380),C=a(17717),g=a(385),f=a(66737);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),g(c,y(h)+p),f(c,C(h)-u),c}},49440:(S,P,a)=>{var y=a(35893),C=a(17717),g=a(86327),f=a(88417);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,y(h)+p),g(c,C(h)-u),c}},81288:(S,P,a)=>{var y=a(26541),C=a(17717),g=a(86327),f=a(385);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,y(h)-p),g(c,C(h)-u),c}},61323:(S,P,a)=>{var y=a(54380),C=a(17717),g=a(86327),f=a(40136);S.exports=function(c,h,p,u){return void 0===p&&(p=0),void 0===u&&(u=0),f(c,y(h)+p),g(c,C(h)-u),c}},16694:(S,P,a)=>{S.exports={BottomCenter:a(21578),BottomLeft:a(10210),BottomRight:a(82341),LeftBottom:a(87958),LeftCenter:a(40080),LeftTop:a(88466),QuickSet:a(38829),RightBottom:a(19211),RightCenter:a(34609),RightTop:a(48741),TopCenter:a(49440),TopLeft:a(81288),TopRight:a(61323)}},66786:(S,P,a)=>{var y=a(88417),C=a(20786);S.exports=function(f,d,c){return y(f,d),C(f,c)}},62235:S=>{S.exports=function(a){return a.y+a.height-a.height*a.originY}},72873:(S,P,a)=>{var y=a(62235),C=a(26541),g=a(54380),f=a(17717),d=a(87841);S.exports=function(h,p){void 0===p&&(p=new d);var u=C(h),m=f(h);return p.x=u,p.y=m,p.width=g(h)-u,p.height=y(h)-m,p}},35893:S=>{S.exports=function(a){return a.x-a.width*a.originX+.5*a.width}},7702:S=>{S.exports=function(a){return a.y-a.height*a.originY+.5*a.height}},26541:S=>{S.exports=function(a){return a.x-a.width*a.originX}},87431:S=>{S.exports=function(a){return a.width*a.originX}},46928:S=>{S.exports=function(a){return a.height*a.originY}},54380:S=>{S.exports=function(a){return a.x+a.width-a.width*a.originX}},17717:S=>{S.exports=function(a){return a.y-a.height*a.originY}},86327:S=>{S.exports=function(a,y){return a.y=y-a.height+a.height*a.originY,a}},88417:S=>{S.exports=function(a,y){return a.x=y+a.width*a.originX-.5*a.width,a}},20786:S=>{S.exports=function(a,y){return a.y=y+a.height*a.originY-.5*a.height,a}},385:S=>{S.exports=function(a,y){return a.x=y+a.width*a.originX,a}},40136:S=>{S.exports=function(a,y){return a.x=y-a.width+a.width*a.originX,a}},66737:S=>{S.exports=function(a,y){return a.y=y+a.height*a.originY,a}},58724:(S,P,a)=>{S.exports={CenterOn:a(66786),GetBottom:a(62235),GetBounds:a(72873),GetCenterX:a(35893),GetCenterY:a(7702),GetLeft:a(26541),GetOffsetX:a(87431),GetOffsetY:a(46928),GetRight:a(54380),GetTop:a(17717),SetBottom:a(86327),SetCenterX:a(88417),SetCenterY:a(20786),SetLeft:a(385),SetRight:a(40136),SetTop:a(66737)}},20623:S=>{S.exports={setCrisp:function(a){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(C){a.style["image-rendering"]=C}),a.style.msInterpolationMode="nearest-neighbor",a},setBicubic:function(a){return a.style["image-rendering"]="auto",a.style.msInterpolationMode="bicubic",a}}},27919:(S,P,a)=>{var c,u,v,y=a(8054),C=a(68703),g=[],f=!1;S.exports=(v=function(){var _=0;return g.forEach(function(A){A.parent&&_++}),_},{create2D:function(_,A,M){return c(_,A,M,y.CANVAS)},create:c=function(_,A,M,I,R){void 0===A&&(A=1),void 0===M&&(M=1),void 0===I&&(I=y.CANVAS),void 0===R&&(R=!1);var F,N=u(I);return null===N?(N={parent:_,canvas:document.createElement("canvas"),type:I},I===y.CANVAS&&g.push(N),F=N.canvas):(N.parent=_,F=N.canvas),R&&(N.parent=F),F.width=A,F.height=M,f&&I===y.CANVAS&&C.disable(F.getContext("2d",{willReadFrequently:!1})),F},createWebGL:function(_,A,M){return c(_,A,M,y.WEBGL)},disableSmoothing:function(){f=!0},enableSmoothing:function(){f=!1},first:u=function(_){if(void 0===_&&(_=y.CANVAS),_===y.WEBGL)return null;for(var A=0;A{var y,P="";S.exports={disable:function(d){return""===P&&(P=y(d)),P&&(d[P]=!1),d},enable:function(d){return""===P&&(P=y(d)),P&&(d[P]=!0),d},getPrefix:y=function(d){for(var c=["i","webkitI","msI","mozI","oI"],h=0;h{S.exports=function(a,y){return void 0===y&&(y="none"),a.style.msTouchAction=y,a.style["ms-touch-action"]=y,a.style["touch-action"]=y,a}},91610:S=>{S.exports=function(a,y){return void 0===y&&(y="none"),["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(g){a.style[g+"user-select"]=y}),a.style["-webkit-touch-callout"]=y,a.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",a}},26253:(S,P,a)=>{S.exports={CanvasInterpolation:a(20623),CanvasPool:a(27919),Smoothing:a(68703),TouchAction:a(65208),UserSelect:a(91610)}},40987:(S,P,a)=>{var y=a(83419),C=a(37589),g=a(1e3),f=a(7537),d=a(87837),c=new y({initialize:function(p,u,m,v){void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(p,u,m,v)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(h,p,u,m,v){return void 0===m&&(m=255),void 0===v&&(v=!0),this._locked=!0,this.red=h,this.green=p,this.blue=u,this.alpha=m,this._locked=!1,this.update(v)},setGLTo:function(h,p,u,m){return void 0===m&&(m=1),this._locked=!0,this.redGL=h,this.greenGL=p,this.blueGL=u,this.alphaGL=m,this._locked=!1,this.update(!0)},setFromRGB:function(h){return this._locked=!0,this.red=h.r,this.green=h.g,this.blue=h.b,h.hasOwnProperty("a")&&(this.alpha=h.a),this._locked=!1,this.update(!0)},setFromHSV:function(h,p,u){return f(h,p,u,this)},update:function(h){if(void 0===h&&(h=!1),this._locked)return this;var p=this.r,u=this.g,m=this.b,v=this.a;return this._color=C(p,u,m),this._color32=g(p,u,m,v),this._rgba="rgba("+p+","+u+","+m+","+v/255+")",h&&d(p,u,m,this),this},updateHSV:function(){return d(this.r,this.g,this.b,this),this},clone:function(){return new c(this.r,this.g,this.b,this.a)},gray:function(h){return this.setTo(h,h,h)},random:function(h,p){void 0===h&&(h=0),void 0===p&&(p=255);var u=Math.floor(h+Math.random()*(p-h)),m=Math.floor(h+Math.random()*(p-h)),v=Math.floor(h+Math.random()*(p-h));return this.setTo(u,m,v)},randomGray:function(h,p){void 0===h&&(h=0),void 0===p&&(p=255);var u=Math.floor(h+Math.random()*(p-h));return this.setTo(u,u,u)},saturate:function(h){return this.s+=h/100,this},desaturate:function(h){return this.s-=h/100,this},lighten:function(h){return this.v+=h/100,this},darken:function(h){return this.v-=h/100,this},brighten:function(h){var p=this.r,u=this.g,m=this.b;return p=Math.max(0,Math.min(255,p-Math.round(-h/100*255))),u=Math.max(0,Math.min(255,u-Math.round(-h/100*255))),m=Math.max(0,Math.min(255,m-Math.round(-h/100*255))),this.setTo(p,u,m)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(h){this.gl[0]=Math.min(Math.abs(h),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(h){this.gl[1]=Math.min(Math.abs(h),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(h){this.gl[2]=Math.min(Math.abs(h),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(h){this.gl[3]=Math.min(Math.abs(h),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(h){h=Math.floor(Math.abs(h)),this.r=Math.min(h,255),this.gl[0]=h/255,this.update(!0)}},green:{get:function(){return this.g},set:function(h){h=Math.floor(Math.abs(h)),this.g=Math.min(h,255),this.gl[1]=h/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(h){h=Math.floor(Math.abs(h)),this.b=Math.min(h,255),this.gl[2]=h/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(h){h=Math.floor(Math.abs(h)),this.a=Math.min(h,255),this.gl[3]=h/255,this.update()}},h:{get:function(){return this._h},set:function(h){this._h=h,f(h,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(h){this._s=h,f(this._h,h,this._v,this)}},v:{get:function(){return this._v},set:function(h){this._v=h,f(this._h,this._s,h,this)}}});S.exports=c},92728:(S,P,a)=>{var y=a(37589);S.exports=function(g){void 0===g&&(g=1024);var c,f=[],d=255,h=255,p=0,u=0;for(c=0;c<=d;c++)f.push({r:h,g:c,b:u,color:y(h,c,u)});for(p=255,c=d;c>=0;c--)f.push({r:c,g:p,b:u,color:y(c,p,u)});for(h=0,c=0;c<=d;c++,p--)f.push({r:h,g:p,b:c,color:y(h,p,c)});for(p=0,u=255,c=0;c<=d;c++,u--,h++)f.push({r:h,g:p,b:u,color:y(h,p,u)});if(1024===g)return f;var m=[],v=0,x=1024/g;for(c=0;c{S.exports=function(a){var y={r:a>>16&255,g:a>>8&255,b:255&a,a:255};return a>16777215&&(y.a=a>>>24),y}},62957:S=>{S.exports=function(a){var y=a.toString(16);return 1===y.length?"0"+y:y}},37589:S=>{S.exports=function(a,y,C){return a<<16|y<<8|C}},1e3:S=>{S.exports=function(a,y,C,g){return g<<24|a<<16|y<<8|C}},62183:(S,P,a)=>{var y=a(40987),C=a(89528);S.exports=function(f,d,c){var h=c,p=c,u=c;if(0!==d){var m=c<.5?c*(1+d):c+d-c*d,v=2*c-m;h=C(v,m,f+1/3),p=C(v,m,f),u=C(v,m,f-1/3)}return(new y).setGLTo(h,p,u,1)}},27939:(S,P,a)=>{var y=a(7537);S.exports=function(g,f){void 0===g&&(g=1),void 0===f&&(f=1);for(var d=[],c=0;c<=359;c++)d.push(y(c/359,g,f));return d}},7537:(S,P,a)=>{var y=a(37589);function C(f,d,c,h){var p=(f+6*d)%6,u=Math.min(p,4-p,1);return Math.round(255*(h-h*c*Math.max(0,u)))}S.exports=function(f,d,c,h){void 0===d&&(d=1),void 0===c&&(c=1);var p=C(5,f,d,c),u=C(3,f,d,c),m=C(1,f,d,c);return h?h.setTo?h.setTo(p,u,m,h.alpha,!0):(h.r=p,h.g=u,h.b=m,h.color=y(p,u,m),h):{r:p,g:u,b:m,color:y(p,u,m)}}},70238:(S,P,a)=>{var y=a(40987);S.exports=function(g){var f=new y;g=g.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(u,m,v,x){return m+m+v+v+x+x});var d=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(g);if(d){var c=parseInt(d[1],16),h=parseInt(d[2],16),p=parseInt(d[3],16);f.setTo(c,h,p)}return f}},89528:S=>{S.exports=function(a,y,C){return C<0&&(C+=1),C>1&&(C-=1),C<.16666666666666666?a+6*(y-a)*C:C<.5?y:C<.6666666666666666?a+(y-a)*(.6666666666666666-C)*6:a}},30100:(S,P,a)=>{var y=a(40987),C=a(90664);S.exports=function(f){var d=C(f);return new y(d.r,d.g,d.b,d.a)}},90664:S=>{S.exports=function(a){return a>16777215?{a:a>>>24,r:a>>16&255,g:a>>8&255,b:255&a}:{a:255,r:a>>16&255,g:a>>8&255,b:255&a}}},13699:(S,P,a)=>{var y=a(28915),C=function(d,c,h,p,u,m,v,x){void 0===v&&(v=100),void 0===x&&(x=0);var b=x/v;return{r:y(d,p,b),g:y(c,u,b),b:y(h,m,b)}};S.exports={RGBWithRGB:C,ColorWithRGB:function(d,c,h,p,u,m){return void 0===u&&(u=100),void 0===m&&(m=0),C(d.r,d.g,d.b,c,h,p,u,m)},ColorWithColor:function(d,c,h,p){return void 0===h&&(h=100),void 0===p&&(p=0),C(d.r,d.g,d.b,c.r,c.g,c.b,h,p)}}},68957:(S,P,a)=>{var y=a(40987);S.exports=function(g){return new y(g.r,g.g,g.b,g.a)}},87388:(S,P,a)=>{var y=a(40987);S.exports=function(g){var f=new y,d=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(g.toLowerCase());if(d){var c=parseInt(d[1],10),h=parseInt(d[2],10),p=parseInt(d[3],10),u=void 0!==d[4]?parseFloat(d[4]):1;f.setTo(c,h,p,255*u)}return f}},87837:S=>{S.exports=function(a,y,C,g){void 0===g&&(g={h:0,s:0,v:0}),a/=255,y/=255,C/=255;var f=Math.min(a,y,C),d=Math.max(a,y,C),c=d-f,h=0,p=0===d?0:c/d,u=d;return d!==f&&(d===a?h=(y-C)/c+(y{var y=a(62957);S.exports=function(g,f,d,c,h){return void 0===c&&(c=255),void 0===h&&(h="#"),"#"===h?"#"+((1<<24)+(g<<16)+(f<<8)+d).toString(16).slice(1,7):"0x"+y(c)+y(g)+y(f)+y(d)}},85386:(S,P,a)=>{var y=a(30976),C=a(40987);S.exports=function(f,d){return void 0===f&&(f=0),void 0===d&&(d=255),new C(y(f,d),y(f,d),y(f,d))}},80333:(S,P,a)=>{var y=a(70238),C=a(30100),g=a(68957),f=a(87388);S.exports=function(c){switch(typeof c){case"string":return"rgb"===c.substr(0,3).toLowerCase()?f(c):y(c);case"number":return C(c);case"object":return g(c)}}},3956:(S,P,a)=>{var y=a(40987);y.ColorSpectrum=a(92728),y.ColorToRGBA=a(91588),y.ComponentToHex=a(62957),y.GetColor=a(37589),y.GetColor32=a(1e3),y.HexStringToColor=a(70238),y.HSLToColor=a(62183),y.HSVColorWheel=a(27939),y.HSVToRGB=a(7537),y.HueToComponent=a(89528),y.IntegerToColor=a(30100),y.IntegerToRGB=a(90664),y.Interpolate=a(13699),y.ObjectToColor=a(68957),y.RandomRGB=a(85386),y.RGBStringToColor=a(87388),y.RGBToHSV=a(87837),y.RGBToString=a(75723),y.ValueToColor=a(80333),S.exports=y},27460:(S,P,a)=>{S.exports={Align:a(71926),BaseShader:a(73894),Bounds:a(58724),Canvas:a(26253),Color:a(3956),ColorMatrix:a(89422),Masks:a(69781),RGB:a(51767)}},6858:(S,P,a)=>{var y=a(83419),C=a(39429),g=new y({initialize:function(d,c,h,p,u,m){c||(c=d.sys.make.image({x:h,y:p,key:u,frame:m,add:!1})),this.bitmapMask=c,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(f){this.bitmapMask=f},preRenderWebGL:function(f,d,c){f.pipelines.BITMAPMASK_PIPELINE.beginMask(this,d,c)},postRenderWebGL:function(f,d,c){f.pipelines.BITMAPMASK_PIPELINE.endMask(this,d,c)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});C.register("bitmapMask",function(f,d,c,h,p){return new g(this.scene,f,d,c,h,p)}),S.exports=g},80661:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d){this.geometryMask=d,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(g){return this.geometryMask=g,this},setInvertAlpha:function(g){return void 0===g&&(g=!0),this.invertAlpha=g,this},preRenderWebGL:function(g,f,d){var c=g.gl;g.flush(),0===g.maskStack.length&&(c.enable(c.STENCIL_TEST),c.clear(c.STENCIL_BUFFER_BIT),g.maskCount=0),g.currentCameraMask.mask!==this&&(g.currentMask.mask=this),g.maskStack.push({mask:this,camera:d}),this.applyStencil(g,d,!0),g.maskCount++},applyStencil:function(g,f,d){var c=g.gl,h=this.geometryMask,p=g.maskCount;c.colorMask(!1,!1,!1,!1),d?(c.stencilFunc(c.EQUAL,p,255),c.stencilOp(c.KEEP,c.KEEP,c.INCR),p++):(c.stencilFunc(c.EQUAL,p+1,255),c.stencilOp(c.KEEP,c.KEEP,c.DECR)),this.level=p,h.renderWebGL(g,h,f),g.flush(),c.colorMask(!0,!0,!0,!0),c.stencilOp(c.KEEP,c.KEEP,c.KEEP),c.stencilFunc(this.invertAlpha?c.NOTEQUAL:c.EQUAL,p,255)},postRenderWebGL:function(g){var f=g.gl;g.maskStack.pop(),g.maskCount--,g.flush();var d=g.currentMask;if(0===g.maskStack.length)d.mask=null,f.disable(f.STENCIL_TEST);else{var c=g.maskStack[g.maskStack.length-1];c.mask.applyStencil(g,c.camera,!1),g.currentCameraMask.mask!==c.mask?(d.mask=c.mask,d.camera=c.camera):d.mask=null}},preRenderCanvas:function(g,f,d){var c=this.geometryMask;g.currentContext.save(),c.renderCanvas(g,c,d,null,null,!0),g.currentContext.clip()},postRenderCanvas:function(g){g.currentContext.restore()},destroy:function(){this.geometryMask=null}});S.exports=C},69781:(S,P,a)=>{S.exports={BitmapMask:a(6858),GeometryMask:a(80661)}},73894:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d,c,h){(!d||""===d)&&(d=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),(!c||""===c)&&(c=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===h&&(h=null),this.key=f,this.fragmentSrc=d,this.vertexSrc=c,this.uniforms=h}});S.exports=C},40366:S=>{S.exports=function(a,y){var C;if(y)"string"==typeof y?C=document.getElementById(y):"object"==typeof y&&1===y.nodeType&&(C=y);else if(a.parentElement||null===y)return a;return C||(C=document.body),C.appendChild(a),a}},83719:(S,P,a)=>{var y=a(40366);S.exports=function(g){var f=g.config;if(f.parent&&f.domCreateContainer){var d=document.createElement("div");d.style.cssText=["display: block;","width: "+g.scale.width+"px;","height: "+g.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+f.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),g.domContainer=d,y(d,f.parent)}}},57264:(S,P,a)=>{var y=a(25892);S.exports=function(g){if("complete"!==document.readyState&&"interactive"!==document.readyState){var f=function(){document.removeEventListener("deviceready",f,!0),document.removeEventListener("DOMContentLoaded",f,!0),window.removeEventListener("load",f,!0),g()};document.body?y.cordova?document.addEventListener("deviceready",f,!1):(document.addEventListener("DOMContentLoaded",f,!0),window.addEventListener("load",f,!0)):window.setTimeout(f,20)}else g()}},57811:S=>{S.exports=function(a){if(!a)return window.innerHeight;var y=Math.abs(window.orientation),C={w:0,h:0},g=document.createElement("div");return g.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(g),C.w=90===y?g.offsetHeight:window.innerWidth,C.h=90===y?window.innerWidth:g.offsetHeight,document.documentElement.removeChild(g),g=null,90!==Math.abs(window.orientation)?C.h:C.w}},45818:(S,P,a)=>{var y=a(13560);S.exports=function(g,f){var d=window.screen,c=!!d&&(d.orientation||d.mozOrientation||d.msOrientation);return c&&"string"==typeof c.type?c.type:"string"==typeof c?c:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?y.ORIENTATION.PORTRAIT:y.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?y.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?y.ORIENTATION.LANDSCAPE:void 0:f>g?y.ORIENTATION.PORTRAIT:y.ORIENTATION.LANDSCAPE}},74403:S=>{S.exports=function(a){var y;return""!==a&&("string"==typeof a?y=document.getElementById(a):a&&1===a.nodeType&&(y=a)),y||(y=document.body),y}},56836:S=>{S.exports=function(a){var y="";try{window.DOMParser?y=(new DOMParser).parseFromString(a,"text/xml"):(y=new ActiveXObject("Microsoft.XMLDOM")).loadXML(a)}catch{y=null}return y&&y.documentElement&&!y.getElementsByTagName("parsererror").length?y:null}},35846:S=>{S.exports=function(a){a.parentNode&&a.parentNode.removeChild(a)}},43092:(S,P,a)=>{var y=a(83419),C=a(29747),g=new y({initialize:function(){this.isRunning=!1,this.callback=C,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var d=this;this.step=function c(h){d.callback(h),d.isRunning&&(d.timeOutID=window.requestAnimationFrame(c))},this.stepTimeout=function c(){d.isRunning&&(d.timeOutID=window.setTimeout(c,d.delay)),d.callback(window.performance.now())}},start:function(f,d,c){this.isRunning||(this.callback=f,this.isSetTimeOut=d,this.delay=c,this.isRunning=!0,this.timeOutID=d?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=C}});S.exports=g},84902:(S,P,a)=>{var y={AddToDOM:a(40366),DOMContentLoaded:a(57264),GetInnerHeight:a(57811),GetScreenOrientation:a(45818),GetTarget:a(74403),ParseXML:a(56836),RemoveFromDOM:a(35846),RequestAnimationFrame:a(43092)};S.exports=y},47565:(S,P,a)=>{var y=a(83419),C=a(50792),g=a(37277),f=new y({Extends:C,initialize:function(){C.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});g.register("EventEmitter",f,"events"),S.exports=f},93055:(S,P,a)=>{S.exports={EventEmitter:a(47565)}},20122:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h){void 0===h&&(h=1),C.call(this,g.BARREL,c),this.amount=h}});S.exports=f},32251:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m,v,x){void 0===p&&(p=1),void 0===u&&(u=1),void 0===m&&(m=1),void 0===v&&(v=1),void 0===x&&(x=4),C.call(this,g.BLOOM,c),this.steps=x,this.offsetX=p,this.offsetY=u,this.blurStrength=m,this.strength=v,this.glcolor=[1,1,1],null!=h&&(this.color=h)},color:{get:function(){var d=this.glcolor;return(255*d[0]<<16)+(255*d[1]<<8)+(255*d[2]|0)},set:function(d){var c=this.glcolor;c[0]=(d>>16&255)/255,c[1]=(d>>8&255)/255,c[2]=(255&d)/255}}});S.exports=f},9047:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m,v,x){void 0===h&&(h=0),void 0===p&&(p=2),void 0===u&&(u=2),void 0===m&&(m=1),void 0===x&&(x=4),C.call(this,g.BLUR,c),this.quality=h,this.x=p,this.y=u,this.steps=x,this.strength=m,this.glcolor=[1,1,1],null!=v&&(this.color=v)},color:{get:function(){var d=this.glcolor;return(255*d[0]<<16)+(255*d[1]<<8)+(255*d[2]|0)},set:function(d){var c=this.glcolor;c[0]=(d>>16&255)/255,c[1]=(d>>8&255)/255,c[2]=(255&d)/255}}});S.exports=f},27885:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m,v,x,b){void 0===h&&(h=.5),void 0===p&&(p=1),void 0===u&&(u=.2),void 0===m&&(m=!1),void 0===v&&(v=1),void 0===x&&(x=1),void 0===b&&(b=1),C.call(this,g.BOKEH,c),this.radius=h,this.amount=p,this.contrast=u,this.isTiltShift=m,this.strength=b,this.blurX=v,this.blurY=x}});S.exports=f},12578:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m,v){void 0===h&&(h=8),void 0===m&&(m=1),void 0===v&&(v=.005),C.call(this,g.CIRCLE,c),this.scale=m,this.feather=v,this.thickness=h,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=p&&(this.color=p),null!=u&&(this.backgroundColor=u)},color:{get:function(){var d=this.glcolor;return(255*d[0]<<16)+(255*d[1]<<8)+(255*d[2]|0)},set:function(d){var c=this.glcolor;c[0]=(d>>16&255)/255,c[1]=(d>>8&255)/255,c[2]=(255&d)/255}},backgroundColor:{get:function(){var d=this.glcolor2;return(255*d[0]<<16)+(255*d[1]<<8)+(255*d[2]|0)},set:function(d){var c=this.glcolor2;c[0]=(d>>16&255)/255,c[1]=(d>>8&255)/255,c[2]=(255&d)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(d){this.glcolor2[3]=d}}});S.exports=f},15802:(S,P,a)=>{var y=a(83419),C=a(89422),g=a(14811),f=new y({Extends:C,initialize:function(c){C.call(this),this.type=g.COLOR_MATRIX,this.gameObject=c,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});S.exports=f},72898:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d){this.type=f,this.gameObject=d,this.active=!0},setActive:function(g){return this.active=g,this},destroy:function(){this.gameObject=null,this.active=!1}});S.exports=C},44553:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u){void 0===h&&(h="__WHITE"),void 0===p&&(p=.005),void 0===u&&(u=.005),C.call(this,g.DISPLACEMENT,c),this.x=p,this.y=u,this.setTexture(h)},setTexture:function(d){var c=this.gameObject.scene.sys.textures.getFrame(d);return c&&(this.glTexture=c.glTexture),this}});S.exports=f},68531:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m){void 0===p&&(p=4),void 0===u&&(u=0),void 0===m&&(m=!1),C.call(this,g.GLOW,c),this.outerStrength=p,this.innerStrength=u,this.knockout=m,this.glcolor=[1,1,1,1],void 0!==h&&(this.color=h)},color:{get:function(){var d=this.glcolor;return(255*d[0]<<16)+(255*d[1]<<8)+(255*d[2]|0)},set:function(d){var c=this.glcolor;c[0]=(d>>16&255)/255,c[1]=(d>>8&255)/255,c[2]=(255&d)/255}}});S.exports=f},37102:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m,v,x,b,T){void 0===u&&(u=.2),void 0===m&&(m=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===b&&(b=1),void 0===T&&(T=0),C.call(this,g.GRADIENT,c),this.alpha=u,this.size=T,this.fromX=m,this.fromY=v,this.toX=x,this.toY=b,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=h&&(this.color1=h),null!=p&&(this.color2=p)},color1:{get:function(){var d=this.glcolor1;return(d[0]<<16)+(d[1]<<8)+(0|d[2])},set:function(d){var c=this.glcolor1;c[0]=d>>16&255,c[1]=d>>8&255,c[2]=255&d}},color2:{get:function(){var d=this.glcolor2;return(d[0]<<16)+(d[1]<<8)+(0|d[2])},set:function(d){var c=this.glcolor2;c[0]=d>>16&255,c[1]=d>>8&255,c[2]=255&d}}});S.exports=f},86886:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h){void 0===h&&(h=1),C.call(this,g.PIXELATE,c),this.amount=h}});S.exports=f},92322:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m,v,x,b){void 0===h&&(h=0),void 0===p&&(p=0),void 0===u&&(u=.1),void 0===m&&(m=1),void 0===x&&(x=6),void 0===b&&(b=1),C.call(this,g.SHADOW,c),this.x=h,this.y=p,this.decay=u,this.power=m,this.glcolor=[0,0,0,1],this.samples=x,this.intensity=b,void 0!==v&&(this.color=v)},color:{get:function(){var d=this.glcolor;return(255*d[0]<<16)+(255*d[1]<<8)+(255*d[2]|0)},set:function(d){var c=this.glcolor;c[0]=(d>>16&255)/255,c[1]=(d>>8&255)/255,c[2]=(255&d)/255}}});S.exports=f},39563:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m){void 0===h&&(h=.5),void 0===p&&(p=.5),void 0===u&&(u=3),void 0===m&&(m=!1),C.call(this,g.SHINE,c),this.speed=h,this.lineWidth=p,this.gradient=u,this.reveal=m}});S.exports=f},56448:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m){void 0===h&&(h=.5),void 0===p&&(p=.5),void 0===u&&(u=.5),void 0===m&&(m=.5),C.call(this,g.VIGNETTE,c),this.x=h,this.y=p,this.radius=u,this.strength=m}});S.exports=f},38433:(S,P,a)=>{var y=a(83419),C=a(72898),g=a(14811),f=new y({Extends:C,initialize:function(c,h,p,u,m){void 0===h&&(h=.1),void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=!1),C.call(this,g.WIPE,c),this.progress=0,this.wipeWidth=h,this.direction=p,this.axis=u,this.reveal=m}});S.exports=f},14811:S=>{S.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},66064:(S,P,a)=>{var y=a(79291),C=a(14811),g={Barrel:a(20122),Controller:a(72898),Bloom:a(32251),Blur:a(9047),Bokeh:a(27885),Circle:a(12578),ColorMatrix:a(15802),Displacement:a(44553),Glow:a(68531),Gradient:a(37102),Pixelate:a(86886),Shadow:a(92322),Shine:a(39563),Vignette:a(56448),Wipe:a(38433)};g=y(!1,g,C),S.exports=g},25305:(S,P,a)=>{var y=a(10312),C=a(23568);S.exports=function(f,d,c){d.x=C(c,"x",0),d.y=C(c,"y",0),d.depth=C(c,"depth",0),d.flipX=C(c,"flipX",!1),d.flipY=C(c,"flipY",!1);var h=C(c,"scale",null);"number"==typeof h?d.setScale(h):null!==h&&(d.scaleX=C(h,"x",1),d.scaleY=C(h,"y",1));var p=C(c,"scrollFactor",null);"number"==typeof p?d.setScrollFactor(p):null!==p&&(d.scrollFactorX=C(p,"x",1),d.scrollFactorY=C(p,"y",1)),d.rotation=C(c,"rotation",0);var u=C(c,"angle",null);null!==u&&(d.angle=u),d.alpha=C(c,"alpha",1);var m=C(c,"origin",null);if("number"==typeof m)d.setOrigin(m);else if(null!==m){var v=C(m,"x",.5),x=C(m,"y",.5);d.setOrigin(v,x)}return d.blendMode=C(c,"blendMode",y.NORMAL),d.visible=C(c,"visible",!0),C(c,"add",!0)&&f.sys.displayList.add(d),d.preUpdate&&f.sys.updateList.add(d),d}},13059:(S,P,a)=>{var y=a(23568);S.exports=function(g,f){var d=y(f,"anims",null);if(null===d)return g;if("string"==typeof d)g.anims.play(d);else if("object"==typeof d){var c=g.anims,h=y(d,"key",void 0);if(h){var p=y(d,"startFrame",void 0),u=y(d,"delay",0),m=y(d,"repeat",0),v=y(d,"repeatDelay",0),x=y(d,"yoyo",!1),b=y(d,"play",!1),T=y(d,"delayedPlay",0),_={key:h,delay:u,repeat:m,repeatDelay:v,yoyo:x,startFrame:p};b?c.play(_):T>0?c.playAfterDelay(_,T):c.load(_)}}return g}},8050:(S,P,a)=>{var y=a(83419),C=a(73162),g=a(37277),f=a(51708),d=a(44594),c=a(19186),h=new y({Extends:C,initialize:function(u){C.call(this,u),this.sortChildrenFlag=!1,this.scene=u,this.systems=u.sys,this.events=u.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(d.BOOT,this.boot,this),this.events.on(d.START,this.start,this)},boot:function(){this.events.once(d.DESTROY,this.destroy,this)},addChildCallback:function(p){p.displayList&&p.displayList!==this&&p.removeFromDisplayList(),p.parentContainer&&p.parentContainer.remove(p),p.displayList||(this.queueDepthSort(),p.displayList=this,p.emit(f.ADDED_TO_SCENE,p,this.scene),this.events.emit(d.ADDED_TO_SCENE,p,this.scene))},removeChildCallback:function(p){this.queueDepthSort(),p.displayList=null,p.emit(f.REMOVED_FROM_SCENE,p,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,p,this.scene)},start:function(){this.events.once(d.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(c(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(p,u){return p._depth-u._depth},getChildren:function(){return this.list},shutdown:function(){for(var p=this.list;p.length;)p[0].destroy(!0);this.events.off(d.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(d.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});g.register("DisplayList",h,"displayList"),S.exports=h},95643:(S,P,a)=>{var y=a(83419),C=a(53774),g=a(45893),f=a(50792),d=a(51708),c=a(44594),h=new y({Extends:f,initialize:function(u,m){f.call(this),this.scene=u,this.displayList=null,this.type=m,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(d.ADDED_TO_SCENE,this.addedToScene,this),this.on(d.REMOVED_FROM_SCENE,this.removedFromScene,this),u.sys.queueDepthSort()},setActive:function(p){return this.active=p,this},setName:function(p){return this.name=p,this},setState:function(p){return this.state=p,this},setDataEnabled:function(){return this.data||(this.data=new g(this)),this},setData:function(p,u){return this.data||(this.data=new g(this)),this.data.set(p,u),this},incData:function(p,u){return this.data||(this.data=new g(this)),this.data.inc(p,u),this},toggleData:function(p){return this.data||(this.data=new g(this)),this.data.toggle(p),this},getData:function(p){return this.data||(this.data=new g(this)),this.data.get(p)},setInteractive:function(p,u,m){return this.scene.sys.input.enable(this,p,u,m),this},disableInteractive:function(p){return void 0===p&&(p=!1),this.scene.sys.input.disable(this,p),this},removeInteractive:function(p){return void 0===p&&(p=!1),this.scene.sys.input.clear(this),p&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return C(this)},willRender:function(p){return!(this.displayList&&this.displayList.active&&!this.displayList.willRender(p)||h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&p.id)},getIndexList:function(){for(var p=this,u=this.parentContainer,m=[];u&&(m.unshift(u.getIndex(p)),p=u,u.parentContainer);)u=u.parentContainer;return m.unshift(this.displayList?this.displayList.getIndex(p):this.scene.sys.displayList.getIndex(p)),m},addToDisplayList:function(p){return void 0===p&&(p=this.scene.sys.displayList),this.displayList&&this.displayList!==p&&this.removeFromDisplayList(),p.exists(this)||(this.displayList=p,p.add(this,!0),p.queueDepthSort(),this.emit(d.ADDED_TO_SCENE,this,this.scene),p.events.emit(c.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var p=this.displayList||this.scene.sys.displayList;return p&&p.exists(this)&&(p.remove(this,!0),p.queueDepthSort(),this.displayList=null,this.emit(d.REMOVED_FROM_SCENE,this,this.scene),p.events.emit(c.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var p=null;return this.parentContainer?p=this.parentContainer.list:this.displayList&&(p=this.displayList.list),p},destroy:function(p){!this.scene||this.ignoreDestroy||(void 0===p&&(p=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(d.DESTROY,this,p),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});h.RENDER_MASK=15,S.exports=h},44603:(S,P,a)=>{var y=a(83419),C=a(37277),g=a(44594),f=new y({initialize:function(c){this.scene=c,this.systems=c.sys,this.events=c.sys.events,this.events.once(g.BOOT,this.boot,this),this.events.on(g.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(g.DESTROY,this.destroy,this)},start:function(){this.events.once(g.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(g.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(g.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});f.register=function(d,c){f.prototype.hasOwnProperty(d)||(f.prototype[d]=c)},f.remove=function(d){f.prototype.hasOwnProperty(d)&&delete f.prototype[d]},C.register("GameObjectCreator",f,"make"),S.exports=f},39429:(S,P,a)=>{var y=a(83419),C=a(37277),g=a(44594),f=new y({initialize:function(c){this.scene=c,this.systems=c.sys,this.events=c.sys.events,this.events.once(g.BOOT,this.boot,this),this.events.on(g.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(g.DESTROY,this.destroy,this)},start:function(){this.events.once(g.SHUTDOWN,this.shutdown,this)},existing:function(d){return(d.renderCanvas||d.renderWebGL)&&this.displayList.add(d),d.preUpdate&&this.updateList.add(d),d},shutdown:function(){this.events.off(g.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(g.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});f.register=function(d,c){f.prototype.hasOwnProperty(d)||(f.prototype[d]=c)},f.remove=function(d){f.prototype.hasOwnProperty(d)&&delete f.prototype[d]},C.register("GameObjectFactory",f,"add"),S.exports=f},91296:(S,P,a)=>{var y=a(61340),C=new y,g=new y,f=new y,d={camera:C,sprite:g,calc:f};S.exports=function(h,p,u){var m=C,v=g,x=f;return v.applyITRS(h.x,h.y,h.rotation,h.scaleX,h.scaleY),m.copyFrom(p.matrix),u?(m.multiplyWithOffset(u,-p.scrollX*h.scrollFactorX,-p.scrollY*h.scrollFactorY),v.e=h.x,v.f=h.y):(v.e-=p.scrollX*h.scrollFactorX,v.f-=p.scrollY*h.scrollFactorY),m.multiply(v,x),d}},45027:(S,P,a)=>{var y=a(83419),C=a(25774),g=a(37277),f=a(44594),d=new y({Extends:C,initialize:function(h){C.call(this),this.checkQueue=!0,this.scene=h,this.systems=h.sys,h.sys.events.once(f.BOOT,this.boot,this),h.sys.events.on(f.START,this.start,this)},boot:function(){this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){var c=this.systems.events;c.on(f.PRE_UPDATE,this.update,this),c.on(f.UPDATE,this.sceneUpdate,this),c.once(f.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(c,h){for(var p=this._active,u=p.length,m=0;m{S.exports=function(a,y,C,g,f,d,c,h,p,u,m,v,x,b,T){var _=C.x-y.displayOriginX+f,A=C.y-y.displayOriginY+d,M=_+C.w,I=A+C.h,R=c.a,F=c.b,N=c.c,V=c.d,B=c.e,G=c.f,Q=_*R+A*N+B,H=_*F+A*V+G,K=_*R+I*N+B,tt=_*F+I*V+G,at=M*R+I*N+B,lt=M*F+I*V+G,q=M*R+A*N+B,it=M*F+A*V+G;h&&(Q=Math.round(Q),H=Math.round(H),K=Math.round(K),tt=Math.round(tt),at=Math.round(at),lt=Math.round(lt),q=Math.round(q),it=Math.round(it)),a.batchQuad(y,Q,H,K,tt,at,lt,q,it,g.u0,g.v0,g.u1,g.v1,p,u,m,v,x,b,T)}},53048:S=>{S.exports=function(a,y,C,g){if(void 0===C&&(C=!1),void 0===g)return{local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var Y,X,nt,f=a.text,d=f.length,c=a.maxWidth,h=a.wordWrapCharCode,p=Number.MAX_VALUE,u=Number.MAX_VALUE,m=0,v=0,x=a.fontData.chars,b=a.fontData.lineHeight,T=a.letterSpacing,_=a.lineSpacing,A=0,M=0,I=0,R=null,F=a._align,N=0,V=0,B=a.fontSize/a.fontData.size,G=B*a.scaleX,Q=B*a.scaleY,H=null,K=0,tt=[],at=Number.MAX_VALUE,lt=0,q=0,it=0,dt=[],gt=[],bt=null,Et=function(Mr,Ur){for(var dn=0,or=0;or0){nt=f.split("\n");var Bt=[];for(Y=0;YN&&(p=N),u>(V=M)&&(u=V);var Qe=N+R.xAdvance,Se=V+b;mlt&&(lt=it),itlt&&(lt=it),it0)for(var ri=0;ri{var y=a(21859);S.exports=function(g,f,d,c,h,p,u){var m=g.sys.textures.get(d),v=m.get(c),x=g.sys.cache.xml.get(h);if(v&&x){var b=y(x,v,p,u,m);return g.sys.cache.bitmapFont.add(f,{data:b,texture:d,frame:c,fromAtlas:!0}),!0}return!1}},6925:(S,P,a)=>{var y=a(35154);S.exports=function(g,f){var d=f.width,c=f.height,h=Math.floor(d/2),p=Math.floor(c/2),u=y(f,"chars","");if(""!==u){var m=y(f,"image",""),v=g.sys.textures.getFrame(m),x=v.cutX,b=v.cutY,T=v.source.width,_=v.source.height,A=y(f,"offset.x",0),M=y(f,"offset.y",0),I=y(f,"spacing.x",0),R=y(f,"spacing.y",0),F=y(f,"lineSpacing",0),N=y(f,"charsPerRow",null);null===N&&(N=T/d)>u.length&&(N=u.length);for(var V=A,B=M,G={retroFont:!0,font:m,size:d,lineHeight:c+F,chars:{}},Q=0,H=0;H{function P(y,C){return parseInt(y.getAttribute(C),10)}S.exports=function(y,C,g,f,d){void 0===g&&(g=0),void 0===f&&(f=0);var c=C.cutX,h=C.cutY,p=C.source.width,u=C.source.height,m=C.sourceIndex,v={},x=y.getElementsByTagName("info")[0],b=y.getElementsByTagName("common")[0];v.font=x.getAttribute("face"),v.size=P(x,"size"),v.lineHeight=P(b,"lineHeight")+f,v.chars={};var T=y.getElementsByTagName("char"),_=void 0!==C&&C.trimmed;if(_)var A=C.height,M=C.width;for(var I=0;I{var y=a(87662),C=a(79291),g={Parse:a(6925)};g=C(!1,g,y),S.exports=g},87662:S=>{S.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},2638:(S,P,a)=>{var y=a(22186),C=a(83419),g=a(12310),f=new C({Extends:y,Mixins:[g],initialize:function(c,h,p,u,m,v,x){y.call(this,c,h,p,u,m,v,x),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(d,c){return this.cropWidth=d,this.cropHeight=c,this},setDisplayCallback:function(d){return this.displayCallback=d,this},setScrollX:function(d){return this.scrollX=d,this},setScrollY:function(d){return this.scrollY=d,this}});S.exports=f},86741:(S,P,a)=>{var y=a(20926);S.exports=function(g,f,d,c){var h=f._text,p=h.length,u=g.currentContext;if(0!==p&&y(g,u,f,d,c)){d.addToRenderList(f);var m=f.fromAtlas?f.frame:f.texture.frames.__BASE,v=f.displayCallback,x=f.callbackData,b=f.fontData.chars,T=f.fontData.lineHeight,_=f._letterSpacing,A=0,M=0,I=0,R=null,F=0,N=0,V=0,B=0,G=0,Q=0,H=null,K=0,tt=f.frame.source.image,at=m.cutX,lt=m.cutY,q=0,it=0,Y=f._fontSize/f.fontData.size,X=f._align,nt=0,dt=0;f.getTextBounds(!1);var gt=f._bounds.lines;1===X?dt=(gt.longest-gt.lengths[0])/2:2===X&&(dt=gt.longest-gt.lengths[0]),u.translate(-f.displayOriginX,-f.displayOriginY);var bt=d.roundPixels;f.cropWidth>0&&f.cropHeight>0&&(u.beginPath(),u.rect(0,0,f.cropWidth,f.cropHeight),u.clip());for(var Et=0;Et{var y=a(2638),C=a(25305),g=a(44603),f=a(23568);g.register("dynamicBitmapText",function(d,c){void 0===d&&(d={});var h=f(d,"font",""),p=f(d,"text",""),u=f(d,"size",!1),m=new y(this.scene,0,0,h,p,u);return void 0!==c&&(d.add=c),C(this.scene,m,d),m})},72566:(S,P,a)=>{var y=a(2638);a(39429).register("dynamicBitmapText",function(g,f,d,c,h){return this.displayList.add(new y(this.scene,g,f,d,c,h))})},12310:(S,P,a)=>{var C,g;a(29747),C=a(73482),g=a(86741),S.exports={renderWebGL:C,renderCanvas:g}},73482:(S,P,a)=>{var y=a(91296),C=a(61340),g=a(70554),f=new C;S.exports=function(c,h,p,u){var m=h.text,v=m.length;if(0!==v){p.addToRenderList(h);var x=c.pipelines.set(h.pipeline,h),b=y(h,p,u);c.pipelines.preBatch(h);var T=b.sprite,_=b.calc,A=f,M=h.cropWidth>0||h.cropHeight>0;M&&(x.flush(),c.pushScissor(_.tx,_.ty,h.cropWidth*_.scaleX,h.cropHeight*_.scaleY));var q,X,R=h.frame.glTexture,F=h.tintFill,N=g.getTintAppendFloatAlpha(h.tintTopLeft,p.alpha*h._alphaTL),V=g.getTintAppendFloatAlpha(h.tintTopRight,p.alpha*h._alphaTR),B=g.getTintAppendFloatAlpha(h.tintBottomLeft,p.alpha*h._alphaBL),G=g.getTintAppendFloatAlpha(h.tintBottomRight,p.alpha*h._alphaBR),Q=x.setGameObject(h),H=0,K=0,tt=0,at=0,lt=h.letterSpacing,it=0,Y=0,nt=h.scrollX,dt=h.scrollY,gt=h.fontData,bt=gt.chars,Et=gt.lineHeight,Bt=h.fontSize/gt.size,Kt=0,Zt=h._align,ne=0,ae=0,fe=h.getTextBounds(!1);h.maxWidth>0&&(v=(m=fe.wrappedText).length);var ke=h._bounds.lines;1===Zt?ae=(ke.longest-ke.lengths[0])/2:2===Zt&&(ae=ke.longest-ke.lengths[0]);for(var Ye=p.roundPixels,Pe=h.displayCallback,Qe=h.callbackData,Se=0;Se{var y=a(83419),C=a(45319),g=a(31401),f=a(95643),d=a(53048),c=a(61327),h=a(21859),p=a(87841),u=a(18658),m=new y({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.Depth,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Texture,g.Tint,g.Transform,g.Visible,u],initialize:function(x,b,T,_,A,M,I){void 0===A&&(A=""),void 0===I&&(I=0),f.call(this,x,"BitmapText"),this.font=_;var R=this.scene.sys.cache.bitmapFont.get(_);if(!R)throw new Error("Invalid BitmapText key: "+_);this.fontData=R.data,this._text="",this._fontSize=M||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=I,this._bounds=d(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=R.fromAtlas,this.setTexture(R.texture,R.frame),this.setPosition(b,T),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(A)},setLeftAlign:function(){return this._align=m.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=m.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=m.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(v){return this._fontSize=v,this._dirty=!0,this},setLetterSpacing:function(v){return void 0===v&&(v=0),this._letterSpacing=v,this._dirty=!0,this},setLineSpacing:function(v){return void 0===v&&(v=0),this.lineSpacing=v,this},setText:function(v){return!v&&0!==v&&(v=""),Array.isArray(v)&&(v=v.join("\n")),v!==this.text&&(this._text=v.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(v,x,b,T){return void 0===v&&(v=0),void 0===x&&(x=0),void 0===b&&(b=0),void 0===T&&(T=.5),this.dropShadowX=v,this.dropShadowY=x,this.dropShadowColor=b,this.dropShadowAlpha=T,this},setCharacterTint:function(v,x,b,T,_,A,M){void 0===v&&(v=0),void 0===x&&(x=1),void 0===b&&(b=!1),void 0===T&&(T=-1),void 0===_&&(_=T,A=T,M=T);var I=this.text.length;-1===x&&(x=I),v<0&&(v=I+v),v=C(v,0,I-1);for(var R=C(v+x,v,I),F=this.charColors,N=v;N{var y=a(20926);S.exports=function(g,f,d,c){var h=f._text,p=h.length,u=g.currentContext;if(0!==p&&y(g,u,f,d,c)){d.addToRenderList(f);var m=f.fromAtlas?f.frame:f.texture.frames.__BASE,v=f.fontData.chars,x=f.fontData.lineHeight,b=f._letterSpacing,T=f._lineSpacing,_=0,A=0,M=0,I=null,R=0,F=0,N=0,V=0,B=0,G=0,Q=null,H=0,K=m.source.image,tt=m.cutX,at=m.cutY,lt=f._fontSize/f.fontData.size,q=f._align,it=0,Y=0,X=f.getTextBounds(!1);f.maxWidth>0&&(p=(h=X.wrappedText).length);var nt=f._bounds.lines;1===q?Y=(nt.longest-nt.lengths[0])/2:2===q&&(Y=nt.longest-nt.lengths[0]),u.translate(-f.displayOriginX,-f.displayOriginY);for(var dt=d.roundPixels,gt=0;gt{var y=a(22186),C=a(25305),g=a(44603),f=a(23568),d=a(35154);g.register("bitmapText",function(c,h){void 0===c&&(c={});var p=d(c,"font",""),u=f(c,"text",""),m=f(c,"size",!1),v=d(c,"align",0),x=new y(this.scene,0,0,p,u,m,v);return void 0!==h&&(c.add=h),C(this.scene,x,c),x})},34914:(S,P,a)=>{var y=a(22186);a(39429).register("bitmapText",function(g,f,d,c,h,p){return this.displayList.add(new y(this.scene,g,f,d,c,h,p))})},18658:(S,P,a)=>{var C,g;a(29747),C=a(33590),g=a(37289),S.exports={renderWebGL:C,renderCanvas:g}},33590:(S,P,a)=>{var y=a(3217),C=a(91296),g=a(70554);S.exports=function(d,c,h,p){if(0!==c._text.length){h.addToRenderList(c);var v=d.pipelines.set(c.pipeline,c),x=C(c,h,p).calc;d.pipelines.preBatch(c);var Q,H,K,b=h.roundPixels,T=h.alpha,_=c.charColors,A=c.tintFill,M=g.getTintAppendFloatAlpha,I=M(c.tintTopLeft,T*c._alphaTL),R=M(c.tintTopRight,T*c._alphaTR),F=M(c.tintBottomLeft,T*c._alphaBL),N=M(c.tintBottomRight,T*c._alphaBR),V=c.frame.glTexture,B=v.setGameObject(c),tt=c.getTextBounds(!1).characters,at=c.dropShadowX,lt=c.dropShadowY;if(0!==at||0!==lt){var it=c.dropShadowColor,Y=c.dropShadowAlpha,X=M(it,T*Y*c._alphaTL),nt=M(it,T*Y*c._alphaTR),dt=M(it,T*Y*c._alphaBL),gt=M(it,T*Y*c._alphaBR);for(Q=0;Q{var y=a(48011),C=a(46590),g=a(83419),f=a(31401),d=a(4327),c=a(95643),h=a(73162),p=new g({Extends:c,Mixins:[f.Alpha,f.BlendMode,f.Depth,f.Mask,f.Pipeline,f.PostPipeline,f.ScrollFactor,f.Size,f.Texture,f.Transform,f.Visible,y],initialize:function(m,v,x,b,T){c.call(this,m,"Blitter"),this.setTexture(b,T),this.setPosition(v,x),this.initPipeline(),this.initPostPipeline(),this.children=new h,this.renderList=[],this.dirty=!1},create:function(u,m,v,x,b){void 0===x&&(x=!0),void 0===b&&(b=this.children.length),void 0===v?v=this.frame:v instanceof d||(v=this.texture.get(v));var T=new C(this,u,m,v,x);return this.children.addAt(T,b,!1),this.dirty=!0,T},createFromCallback:function(u,m,v,x){for(var b=this.createMultiple(m,v,x),T=0;T0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});S.exports=p},72396:S=>{S.exports=function(a,y,C,g){var f=y.getRenderList();if(0!==f.length){var d=a.currentContext,c=C.alpha*y.alpha;if(0!==c){C.addToRenderList(y),d.globalCompositeOperation=a.blendModes[y.blendMode],d.imageSmoothingEnabled=!y.frame.source.scaleMode;var h=y.x-C.scrollX*y.scrollFactorX,p=y.y-C.scrollY*y.scrollFactorY;d.save(),g&&g.copyToContext(d);for(var u=C.roundPixels,m=0;m0&&T.height>0&&(d.save(),d.translate(v.x+h,v.y+p),d.scale(M,I),d.drawImage(b.source.image,T.x,T.y,T.width,T.height,_,A,T.width,T.height),d.restore())):(u&&(_=Math.round(_),A=Math.round(A)),T.width>0&&T.height>0&&d.drawImage(b.source.image,T.x,T.y,T.width,T.height,_+v.x+h,A+v.y+p,T.width,T.height)))}d.restore()}}}},9403:(S,P,a)=>{var y=a(6107),C=a(25305),g=a(44603),f=a(23568);g.register("blitter",function(d,c){void 0===d&&(d={});var h=f(d,"key",null),p=f(d,"frame",null),u=new y(this.scene,0,0,h,p);return void 0!==c&&(d.add=c),C(this.scene,u,d),u})},12709:(S,P,a)=>{var y=a(6107);a(39429).register("blitter",function(g,f,d,c){return this.displayList.add(new y(this.scene,g,f,d,c))})},48011:(S,P,a)=>{var C,g;a(29747),C=a(99485),g=a(72396),S.exports={renderWebGL:C,renderCanvas:g}},99485:(S,P,a)=>{var y=a(61340),C=a(70554),g=new y;S.exports=function(d,c,h,p){var u=c.getRenderList(),m=h.alpha*c.alpha;if(0!==u.length&&0!==m){h.addToRenderList(c);var v=d.pipelines.set(this.pipeline,c),x=h.scrollX*c.scrollFactorX,b=h.scrollY*c.scrollFactorY,T=g.copyFrom(h.matrix);p&&(T.multiplyWithOffset(p,-x,-b),x=0,b=0);var _=c.x-x,A=c.y-b,M=-1,R=h.roundPixels;d.pipelines.preBatch(c);for(var F=0;F{var y=a(83419),C=a(4327),g=new y({initialize:function(d,c,h,p,u){this.parent=d,this.x=c,this.y=h,this.frame=p,this.data={},this.tint=16777215,this._visible=u,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(f){return this.frame=void 0===f?this.parent.frame:f instanceof C&&f.texture===this.parent.texture?f:this.parent.texture.get(f),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(f,d,c){return this.x=f,this.y=d,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,c&&this.setFrame(c),this},setPosition:function(f,d){return this.x=f,this.y=d,this},setFlipX:function(f){return this.flipX=f,this},setFlipY:function(f){return this.flipY=f,this},setFlip:function(f,d){return this.flipX=f,this.flipY=d,this},setVisible:function(f){return this.visible=f,this},setAlpha:function(f){return this.alpha=f,this},setTint:function(f){return this.tint=f,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(f){this.parent.dirty|=this._visible!==f,this._visible=f}},alpha:{get:function(){return this._alpha},set:function(f){this.parent.dirty|=this._alpha>0!=f>0,this._alpha=f}}});S.exports=g},16005:(S,P,a)=>{var y=a(45319);S.exports={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(f,d,c,h){return void 0===f&&(f=1),void 0===d?this.alpha=f:(this._alphaTL=y(f,0,1),this._alphaTR=y(d,0,1),this._alphaBL=y(c,0,1),this._alphaBR=y(h,0,1)),this},alpha:{get:function(){return this._alpha},set:function(f){var d=y(f,0,1);this._alpha=d,this._alphaTL=d,this._alphaTR=d,this._alphaBL=d,this._alphaBR=d,0===d?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(f){var d=y(f,0,1);this._alphaTL=d,0!==d&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(f){var d=y(f,0,1);this._alphaTR=d,0!==d&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(f){var d=y(f,0,1);this._alphaBL=d,0!==d&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(f){var d=y(f,0,1);this._alphaBR=d,0!==d&&(this.renderFlags|=2)}}}},88509:(S,P,a)=>{var y=a(45319);S.exports={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(f){return void 0===f&&(f=1),this.alpha=f,this},alpha:{get:function(){return this._alpha},set:function(f){var d=y(f,0,1);this._alpha=d,0===d?this.renderFlags&=-3:this.renderFlags|=2}}}},90065:(S,P,a)=>{var y=a(10312);S.exports={_blendMode:y.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(g){"string"==typeof g&&(g=y[g]),(g|=0)>=-1&&(this._blendMode=g)}},setBlendMode:function(g){return this.blendMode=g,this}}},94215:S=>{S.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(a){this.scaleX=a/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(a){this.scaleY=a/this.height}},setSize:function(a,y){return this.width=a,this.height=y,this},setDisplaySize:function(a,y){return this.displayWidth=a,this.displayHeight=y,this}}},61683:S=>{S.exports={texture:null,frame:null,isCropped:!1,setCrop:function(a,y,C,g){return void 0===a?this.isCropped=!1:this.frame&&("number"==typeof a?this.frame.setCropUVs(this._crop,a,y,C,g,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,a.x,a.y,a.width,a.height,this.flipX,this.flipY),this.isCropped=!0),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},89272:(S,P,a)=>{var y=a(37105);S.exports={_depth:0,depth:{get:function(){return this._depth},set:function(g){this.displayList&&this.displayList.queueDepthSort(),this._depth=g}},setDepth:function(g){return void 0===g&&(g=0),this.depth=g,this},setToTop:function(){var g=this.getDisplayList();return g&&y.BringToTop(g,this),this},setToBack:function(){var g=this.getDisplayList();return g&&y.SendToBack(g,this),this},setAbove:function(g){var f=this.getDisplayList();return f&&g&&y.MoveAbove(f,this,g),this},setBelow:function(g){var f=this.getDisplayList();return f&&g&&y.MoveBelow(f,this,g),this}}},47059:(S,P,a)=>{var y=a(83419),C=a(66064),g=a(19133),f=new y({initialize:function(c,h){this.gameObject=c,this.isPost=h,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(d){return void 0===d&&(d=0),this.padding=d,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(d){if(!this.isPost){var c=this.gameObject.scene.sys.renderer;c&&c.pipelines?(this.gameObject.pipeline=c.pipelines.FX_PIPELINE,void 0!==d&&(this.padding=d),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var d=this.list,c=0;c{S.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(a){return this.flipX=a,this},setFlipY:function(a){return this.flipY=a,this},setFlip:function(a,y){return this.flipX=a,this.flipY=y,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},8004:(S,P,a)=>{var y=a(87841),C=a(11520),g=a(26099);S.exports={prepareBoundsOutput:function(d,c){return void 0===c&&(c=!1),0!==this.rotation&&C(d,this.x,this.y,this.rotation),c&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(d.x,d.y,d),d},getCenter:function(d,c){return void 0===d&&(d=new g),d.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,d.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(d,c)},getTopLeft:function(d,c){return d||(d=new g),d.x=this.x-this.displayWidth*this.originX,d.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(d,c)},getTopCenter:function(d,c){return d||(d=new g),d.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,d.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(d,c)},getTopRight:function(d,c){return d||(d=new g),d.x=this.x-this.displayWidth*this.originX+this.displayWidth,d.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(d,c)},getLeftCenter:function(d,c){return d||(d=new g),d.x=this.x-this.displayWidth*this.originX,d.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(d,c)},getRightCenter:function(d,c){return d||(d=new g),d.x=this.x-this.displayWidth*this.originX+this.displayWidth,d.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(d,c)},getBottomLeft:function(d,c){return d||(d=new g),d.x=this.x-this.displayWidth*this.originX,d.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(d,c)},getBottomCenter:function(d,c){return d||(d=new g),d.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,d.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(d,c)},getBottomRight:function(d,c){return d||(d=new g),d.x=this.x-this.displayWidth*this.originX+this.displayWidth,d.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(d,c)},getBounds:function(d){var c,h,p,u,m,v,x,b;if(void 0===d&&(d=new y),this.parentContainer){var T=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(d),T.transformPoint(d.x,d.y,d),c=d.x,h=d.y,this.getTopRight(d),T.transformPoint(d.x,d.y,d),p=d.x,u=d.y,this.getBottomLeft(d),T.transformPoint(d.x,d.y,d),m=d.x,v=d.y,this.getBottomRight(d),T.transformPoint(d.x,d.y,d),x=d.x,b=d.y}else this.getTopLeft(d),c=d.x,h=d.y,this.getTopRight(d),p=d.x,u=d.y,this.getBottomLeft(d),m=d.x,v=d.y,this.getBottomRight(d),x=d.x,b=d.y;return d.x=Math.min(c,p,m,x),d.y=Math.min(h,u,v,b),d.width=Math.max(c,p,m,x)-d.x,d.height=Math.max(h,u,v,b)-d.y,d}}},8573:(S,P,a)=>{var y=a(6858),C=a(80661);S.exports={mask:null,setMask:function(f){return this.mask=f,this},clearMask:function(f){return void 0===f&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(f,d,c,h,p){return void 0===f&&(this.texture||this.shader||this.geom)&&(f=this),new y(this.scene,f,d,c,h,p)},createGeometryMask:function(f){return void 0===f&&("Graphics"===this.type||this.geom)&&(f=this),new C(this.scene,f)}}},27387:S=>{S.exports={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(a){this._displayOriginX=a,this.originX=a/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(a){this._displayOriginY=a,this.originY=a/this.height}},setOrigin:function(a,y){return void 0===a&&(a=.5),void 0===y&&(y=a),this.originX=a,this.originY=y,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(a,y){return void 0===a&&(a=0),void 0===y&&(y=a),this.displayOriginX=a,this.displayOriginY=y,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}}},37640:(S,P,a)=>{var y=a(39506),C=a(57355),g=a(35154),f=a(86353),d=a(26099);S.exports={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:f.PLAYING_FORWARD,setPath:function(h,p){void 0===p&&(p=this.pathConfig);var u=this.pathTween;return u&&u.isPlaying()&&u.stop(),this.path=h,p&&this.startFollow(p),this},setRotateToPath:function(h,p){return void 0===p&&(p=0),this.rotateToPath=h,this.pathRotationOffset=p,this},isFollowing:function(){var h=this.pathTween;return h&&h.isPlaying()},startFollow:function(h,p){void 0===h&&(h={}),void 0===p&&(p=0);var u=this.pathTween;u&&u.isPlaying()&&u.stop(),"number"==typeof h&&(h={duration:h}),h.from=g(h,"from",0),h.to=g(h,"to",1);var m=C(h,"positionOnPath",!1);this.rotateToPath=C(h,"rotateToPath",!1),this.pathRotationOffset=g(h,"rotationOffset",0);var v=g(h,"startAt",p);if(v&&(h.onStart=function(b){var T=b.data[0];T.progress=v,T.elapsed=T.duration*v;var _=T.ease(T.progress);T.current=T.start+(T.end-T.start)*_,T.setTargetValue()}),this.pathOffset||(this.pathOffset=new d(this.x,this.y)),this.pathVector||(this.pathVector=new d),this.pathDelta||(this.pathDelta=new d),this.pathDelta.reset(),h.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(h),this.path.getStartPoint(this.pathOffset),m&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=f.PLAYING_FORWARD,this.rotateToPath){var x=this.path.getPoint(.1);this.rotation=Math.atan2(x.y-this.y,x.x-this.x)+y(this.pathRotationOffset)}return this.pathConfig=h,this},pauseFollow:function(){var h=this.pathTween;return h&&h.isPlaying()&&h.pause(),this},resumeFollow:function(){var h=this.pathTween;return h&&h.isPaused()&&h.resume(),this},stopFollow:function(){var h=this.pathTween;return h&&h.isPlaying()&&h.stop(),this},pathUpdate:function(){var h=this.pathTween;if(h&&h.data){var p=h.data[0],u=this.pathDelta,m=this.pathVector;if(u.copy(m).negate(),p.state===f.COMPLETE)return this.path.getPoint(p.end,m),u.add(m),m.add(this.pathOffset),void this.setPosition(m.x,m.y);if(p.state!==f.PLAYING_FORWARD&&p.state!==f.PLAYING_BACKWARD)return;this.path.getPoint(h.getValue(),m),u.add(m),m.add(this.pathOffset);var v=this.x,x=this.y;this.setPosition(m.x,m.y);var b=this.x-v,T=this.y-x;if(0===b&&0===T)return;if(p.state!==this._prevDirection)return void(this._prevDirection=p.state);this.rotateToPath&&(this.rotation=Math.atan2(T,b)+y(this.pathRotationOffset))}}}},72699:(S,P,a)=>{var y=a(62644);S.exports={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(g){this.pipelineData={};var f=this.scene.sys.renderer;if(!f)return!1;var d=f.pipelines;if(d){void 0===g&&(g=d.default);var c=d.get(g);if(c)return this.defaultPipeline=c,this.pipeline=c,!0}return!1},setPipeline:function(g,f,d){var c=this.scene.sys.renderer;if(!c)return this;var h=c.pipelines;if(h){var p=h.get(g);p&&(this.pipeline=p),f&&(this.pipelineData=d?y(f):f)}return this},setPipelineData:function(g,f){var d=this.pipelineData;return void 0===f?delete d[g]:d[g]=f,this},resetPipeline:function(g){return void 0===g&&(g=!1),this.pipeline=this.defaultPipeline,g&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return null===this.pipeline?null:this.pipeline.name}}},17581:(S,P,a)=>{var y=a(62644),C=a(47059),g=a(19133);S.exports={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(d){this.postPipelines=[],this.postPipelineData={},this.postFX=new C(this,!0),d&&(this.preFX=new C(this,!1))},setPostPipeline:function(d,c,h){var p=this.scene.sys.renderer;if(!p)return this;var u=p.pipelines;if(u){Array.isArray(d)||(d=[d]);for(var m=0;m0,this},setPostPipelineData:function(d,c){var h=this.postPipelineData;return void 0===c?delete h[d]:h[d]=c,this},getPostPipeline:function(d){for(var c="string"==typeof d,h=this.postPipelines,p=[],u=0;u=0;p--){var u=h[p];(c&&u.name===d||!c&&u===d)&&(u.destroy(),g(h,p))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}}},80227:S=>{S.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(a,y){return void 0===y&&(y=a),this.scrollFactorX=a,this.scrollFactorY=y,this}}},16736:S=>{S.exports={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(a){this.scaleX=a/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(a){this.scaleY=a/this.frame.realHeight}},setSizeToFrame:function(a){a||(a=this.frame),this.width=a.realWidth,this.height=a.realHeight;var y=this.input;return y&&!y.customHitArea&&(y.hitArea.width=this.width,y.hitArea.height=this.height),this},setSize:function(a,y){return this.width=a,this.height=y,this},setDisplaySize:function(a,y){return this.displayWidth=a,this.displayHeight=y,this}}},37726:(S,P,a)=>{var y=a(4327);S.exports={texture:null,frame:null,isCropped:!1,setTexture:function(f,d,c,h){return this.texture=this.scene.sys.textures.get(f),this.setFrame(d,c,h)},setFrame:function(f,d,c){return void 0===d&&(d=!0),void 0===c&&(c=!0),f instanceof y?(this.texture=this.scene.sys.textures.get(f.texture.key),this.frame=f):this.frame=this.texture.get(f),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&d&&this.setSizeToFrame(),this._originComponent&&c&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}}},79812:(S,P,a)=>{var y=a(4327);S.exports={texture:null,frame:null,isCropped:!1,setCrop:function(f,d,c,h){return void 0===f?this.isCropped=!1:this.frame&&("number"==typeof f?this.frame.setCropUVs(this._crop,f,d,c,h,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,f.x,f.y,f.width,f.height,this.flipX,this.flipY),this.isCropped=!0),this},setTexture:function(f,d){return this.texture=this.scene.sys.textures.get(f),this.setFrame(d)},setFrame:function(f,d,c){return void 0===d&&(d=!0),void 0===c&&(c=!0),f instanceof y?(this.texture=this.scene.sys.textures.get(f.texture.key),this.frame=f):this.frame=this.texture.get(f),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&d&&this.setSizeToFrame(),this._originComponent&&c&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},27472:S=>{S.exports={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(a,y,C,g){return void 0===a&&(a=16777215),void 0===y&&(y=a,C=a,g=a),this.tintTopLeft=a,this.tintTopRight=y,this.tintBottomLeft=C,this.tintBottomRight=g,this.tintFill=!1,this},setTintFill:function(a,y,C,g){return this.setTint(a,y,C,g),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(a){this.setTint(a,a,a,a)}},isTinted:{get:function(){var a=16777215;return this.tintFill||this.tintTopLeft!==a||this.tintTopRight!==a||this.tintBottomLeft!==a||this.tintBottomRight!==a}}}},53774:S=>{S.exports=function(a){var y={name:a.name,type:a.type,x:a.x,y:a.y,depth:a.depth,scale:{x:a.scaleX,y:a.scaleY},origin:{x:a.originX,y:a.originY},flipX:a.flipX,flipY:a.flipY,rotation:a.rotation,alpha:a.alpha,visible:a.visible,blendMode:a.blendMode,textureKey:"",frameKey:"",data:{}};return a.texture&&(y.textureKey=a.texture.key,y.frameKey=a.frame.name),y}},16901:(S,P,a)=>{var y=a(36383),C=a(61340),g=a(85955),f=a(86554),d=a(30954),c=a(26099);S.exports={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(u){this._scaleX=u,this._scaleY=u,0===u?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(u){this._scaleX=u,0===u?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(u){this._scaleY=u,0===u?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return d(this._rotation*y.RAD_TO_DEG)},set:function(u){this.rotation=d(u)*y.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(u){this._rotation=f(u)}},setPosition:function(u,m,v,x){return void 0===u&&(u=0),void 0===m&&(m=u),void 0===v&&(v=0),void 0===x&&(x=0),this.x=u,this.y=m,this.z=v,this.w=x,this},copyPosition:function(u){return void 0!==u.x&&(this.x=u.x),void 0!==u.y&&(this.y=u.y),void 0!==u.z&&(this.z=u.z),void 0!==u.w&&(this.w=u.w),this},setRandomPosition:function(u,m,v,x){return void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=this.scene.sys.scale.width),void 0===x&&(x=this.scene.sys.scale.height),this.x=u+Math.random()*v,this.y=m+Math.random()*x,this},setRotation:function(u){return void 0===u&&(u=0),this.rotation=u,this},setAngle:function(u){return void 0===u&&(u=0),this.angle=u,this},setScale:function(u,m){return void 0===u&&(u=1),void 0===m&&(m=u),this.scaleX=u,this.scaleY=m,this},setX:function(u){return void 0===u&&(u=0),this.x=u,this},setY:function(u){return void 0===u&&(u=0),this.y=u,this},setZ:function(u){return void 0===u&&(u=0),this.z=u,this},setW:function(u){return void 0===u&&(u=0),this.w=u,this},getLocalTransformMatrix:function(u){return void 0===u&&(u=new C),u.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(u,m){void 0===u&&(u=new C);var v=this.parentContainer;if(!v)return this.getLocalTransformMatrix(u);for(m||(m=new C),u.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);v;)m.applyITRS(v.x,v.y,v._rotation,v._scaleX,v._scaleY),m.multiply(u,u),v=v.parentContainer;return u},getLocalPoint:function(u,m,v,x){v||(v=new c),x||(x=this.scene.sys.cameras.main);var b=x.scrollX,T=x.scrollY,_=u+b*this.scrollFactorX-b,A=m+T*this.scrollFactorY-T;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(_,A,v):g(_,A,this.x,this.y,this.rotation,this.scaleX,this.scaleY,v),this._originComponent&&(v.x+=this._displayOriginX,v.y+=this._displayOriginY),v},getParentRotation:function(){for(var u=0,m=this.parentContainer;m;)u+=m.rotation,m=m.parentContainer;return u}}},61340:(S,P,a)=>{var y=a(83419),C=a(36383),g=a(26099),f=new y({initialize:function(c,h,p,u,m,v){void 0===c&&(c=1),void 0===h&&(h=0),void 0===p&&(p=0),void 0===u&&(u=1),void 0===m&&(m=0),void 0===v&&(v=0),this.matrix=new Float32Array([c,h,p,u,m,v,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(d){this.matrix[0]=d}},b:{get:function(){return this.matrix[1]},set:function(d){this.matrix[1]=d}},c:{get:function(){return this.matrix[2]},set:function(d){this.matrix[2]=d}},d:{get:function(){return this.matrix[3]},set:function(d){this.matrix[3]=d}},e:{get:function(){return this.matrix[4]},set:function(d){this.matrix[4]=d}},f:{get:function(){return this.matrix[5]},set:function(d){this.matrix[5]=d}},tx:{get:function(){return this.matrix[4]},set:function(d){this.matrix[4]=d}},ty:{get:function(){return this.matrix[5]},set:function(d){this.matrix[5]=d}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var d=this.matrix,c=d[0],h=d[1],p=d[2],u=d[3];return c||h?h>0?Math.acos(c/this.scaleX):-Math.acos(c/this.scaleX):p||u?C.TAU-(u>0?Math.acos(-p/this.scaleY):-Math.acos(p/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var d=this.matrix;return d[0]=1,d[1]=0,d[2]=0,d[3]=1,d[4]=0,d[5]=0,this},translate:function(d,c){var h=this.matrix;return h[4]=h[0]*d+h[2]*c+h[4],h[5]=h[1]*d+h[3]*c+h[5],this},scale:function(d,c){var h=this.matrix;return h[0]*=d,h[1]*=d,h[2]*=c,h[3]*=c,this},rotate:function(d){var c=Math.sin(d),h=Math.cos(d),p=this.matrix,u=p[0],m=p[1],v=p[2],x=p[3];return p[0]=u*h+v*c,p[1]=m*h+x*c,p[2]=u*-c+v*h,p[3]=m*-c+x*h,this},multiply:function(d,c){var h=this.matrix,p=d.matrix,u=h[0],m=h[1],v=h[2],x=h[3],b=h[4],T=h[5],_=p[0],A=p[1],M=p[2],I=p[3],R=p[4],F=p[5],N=void 0===c?h:c.matrix;return N[0]=_*u+A*v,N[1]=_*m+A*x,N[2]=M*u+I*v,N[3]=M*m+I*x,N[4]=R*u+F*v+b,N[5]=R*m+F*x+T,N},multiplyWithOffset:function(d,c,h){var p=this.matrix,u=d.matrix,m=p[0],v=p[1],x=p[2],b=p[3],A=c*m+h*x+p[4],M=c*v+h*b+p[5],I=u[0],R=u[1],F=u[2],N=u[3],V=u[4],B=u[5];return p[0]=I*m+R*x,p[1]=I*v+R*b,p[2]=F*m+N*x,p[3]=F*v+N*b,p[4]=V*m+B*x+A,p[5]=V*v+B*b+M,this},transform:function(d,c,h,p,u,m){var v=this.matrix,x=v[0],b=v[1],T=v[2],_=v[3],A=v[4],M=v[5];return v[0]=d*x+c*T,v[1]=d*b+c*_,v[2]=h*x+p*T,v[3]=h*b+p*_,v[4]=u*x+m*T+A,v[5]=u*b+m*_+M,this},transformPoint:function(d,c,h){void 0===h&&(h={x:0,y:0});var p=this.matrix,m=p[1],x=p[3],T=p[5];return h.x=d*p[0]+c*p[2]+p[4],h.y=d*m+c*x+T,h},invert:function(){var d=this.matrix,c=d[0],h=d[1],p=d[2],u=d[3],m=d[4],v=d[5],x=c*u-h*p;return d[0]=u/x,d[1]=-h/x,d[2]=-p/x,d[3]=c/x,d[4]=(p*v-u*m)/x,d[5]=-(c*v-h*m)/x,this},copyFrom:function(d){var c=this.matrix;return c[0]=d.a,c[1]=d.b,c[2]=d.c,c[3]=d.d,c[4]=d.e,c[5]=d.f,this},copyFromArray:function(d){var c=this.matrix;return c[0]=d[0],c[1]=d[1],c[2]=d[2],c[3]=d[3],c[4]=d[4],c[5]=d[5],this},copyToContext:function(d){var c=this.matrix;return d.transform(c[0],c[1],c[2],c[3],c[4],c[5]),d},setToContext:function(d){return d.setTransform(this),d},copyToArray:function(d){var c=this.matrix;return void 0===d?d=[c[0],c[1],c[2],c[3],c[4],c[5]]:(d[0]=c[0],d[1]=c[1],d[2]=c[2],d[3]=c[3],d[4]=c[4],d[5]=c[5]),d},setTransform:function(d,c,h,p,u,m){var v=this.matrix;return v[0]=d,v[1]=c,v[2]=h,v[3]=p,v[4]=u,v[5]=m,this},decomposeMatrix:function(){var d=this.decomposedMatrix,c=this.matrix,h=c[0],p=c[1],u=c[2],m=c[3],v=h*m-p*u;if(d.translateX=c[4],d.translateY=c[5],h||p){var x=Math.sqrt(h*h+p*p);d.rotation=p>0?Math.acos(h/x):-Math.acos(h/x),d.scaleX=x,d.scaleY=v/x}else if(u||m){var b=Math.sqrt(u*u+m*m);d.rotation=.5*Math.PI-(m>0?Math.acos(-u/b):-Math.acos(u/b)),d.scaleX=v/b,d.scaleY=b}else d.rotation=0,d.scaleX=0,d.scaleY=0;return d},applyITRS:function(d,c,h,p,u){var m=this.matrix,v=Math.sin(h),x=Math.cos(h);return m[4]=d,m[5]=c,m[0]=x*p,m[1]=v*p,m[2]=-v*u,m[3]=x*u,this},applyInverse:function(d,c,h){void 0===h&&(h=new g);var p=this.matrix,u=p[0],m=p[1],v=p[2],x=p[3],b=p[4],T=p[5],_=1/(u*x+v*-m);return h.x=x*_*d+-v*_*c+(T*v-b*x)*_,h.y=u*_*c+-m*_*d+(-T*u+b*m)*_,h},setQuad:function(d,c,h,p,u,m){void 0===u&&(u=!1),void 0===m&&(m=this.quad);var v=this.matrix,x=v[0],b=v[1],T=v[2],_=v[3],A=v[4],M=v[5],I=d*x+c*T+A,R=d*b+c*_+M,F=d*x+p*T+A,N=d*b+p*_+M,V=h*x+p*T+A,B=h*b+p*_+M,G=h*x+c*T+A,Q=h*b+c*_+M;if(u){var H=Math.floor(I+.5),K=Math.floor(R+.5),tt=H-I,at=K-R;m[0]=H,m[1]=K,m[2]=F+tt,m[3]=N+at,m[4]=V+tt,m[5]=B+at,m[6]=G+tt,m[7]=Q+at}else m[0]=I,m[1]=R,m[2]=F,m[3]=N,m[4]=V,m[5]=B,m[6]=G,m[7]=Q;return m},getX:function(d,c){return d*this.a+c*this.c+this.e},getY:function(d,c){return d*this.b+c*this.d+this.f},getXRound:function(d,c,h){var p=this.getX(d,c);return h&&(p=Math.floor(p+.5)),p},getYRound:function(d,c,h){var p=this.getY(d,c);return h&&(p=Math.floor(p+.5)),p},getCSSMatrix:function(){var d=this.matrix;return"matrix("+d[0]+","+d[1]+","+d[2]+","+d[3]+","+d[4]+","+d[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});S.exports=f},59715:S=>{S.exports={_visible:!0,visible:{get:function(){return this._visible},set:function(y){y?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(y){return this.visible=y,this}}},31401:(S,P,a)=>{S.exports={Alpha:a(16005),AlphaSingle:a(88509),BlendMode:a(90065),ComputedSize:a(94215),Crop:a(61683),Depth:a(89272),Flip:a(54434),FX:a(47059),GetBounds:a(8004),Mask:a(8573),Origin:a(27387),PathFollower:a(37640),Pipeline:a(72699),PostPipeline:a(17581),ScrollFactor:a(80227),Size:a(16736),Texture:a(37726),TextureCrop:a(79812),Tint:a(27472),ToJSON:a(53774),Transform:a(16901),TransformMatrix:a(61340),Visible:a(59715)}},31559:(S,P,a)=>{var y=a(37105),C=a(10312),g=a(83419),f=a(31401),d=a(51708),c=a(95643),h=a(87841),p=a(29959),u=a(36899),m=a(26099),v=new f.TransformMatrix,x=new g({Extends:c,Mixins:[f.AlphaSingle,f.BlendMode,f.ComputedSize,f.Depth,f.Mask,f.PostPipeline,f.Transform,f.Visible,p],initialize:function(T,_,A,M){c.call(this,T,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new f.TransformMatrix,this._sortKey="",this._sysEvents=T.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(_,A),this.setBlendMode(C.SKIP_CHECK),M&&this.add(M)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(b){return void 0===b&&(b=!0),this.exclusive=b,this},getBounds:function(b){if(void 0===b&&(b=new h),b.setTo(this.x,this.y,0,0),this.parentContainer){var _=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);b.setTo(_.x,_.y,0,0)}if(this.list.length>0){var A=this.list,M=new h,I=!1;b.setEmpty();for(var R=0;R-1},setAll:function(b,T,_,A){return y.SetAll(this.list,b,T,_,A),this},each:function(b,T){var A,_=[null],M=this.list.slice(),I=M.length;for(A=2;A0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.list=[]},onChildDestroyed:function(b){y.Remove(this.list,b),this.exclusive&&(b.parentContainer=null,b.removedFromScene())}});S.exports=x},53584:S=>{S.exports=function(a,y,C,g){C.addToRenderList(y);var f=y.list;if(0!==f.length){var d=y.localTransform;g?(d.loadIdentity(),d.multiply(g),d.translate(y.x,y.y),d.rotate(y.rotation),d.scale(y.scaleX,y.scaleY)):d.applyITRS(y.x,y.y,y.rotation,y.scaleX,y.scaleY);var c=-1!==y.blendMode;c||a.setBlendMode(0);var h=y._alpha,p=y.scrollFactorX,u=y.scrollFactorY;y.mask&&y.mask.preRenderCanvas(a,null,C);for(var m=0;m{var y=a(25305),C=a(31559),g=a(44603),f=a(23568),d=a(95540);g.register("container",function(c,h){void 0===c&&(c={});var p=f(c,"x",0),u=f(c,"y",0),m=d(c,"children",null),v=new C(this.scene,p,u,m);return void 0!==h&&(c.add=h),y(this.scene,v,c),v})},24961:(S,P,a)=>{var y=a(31559);a(39429).register("container",function(g,f,d){return this.displayList.add(new y(this.scene,g,f,d))})},29959:(S,P,a)=>{var C,g;a(29747),C=a(72249),g=a(53584),S.exports={renderWebGL:C,renderCanvas:g}},72249:S=>{S.exports=function(a,y,C,g){C.addToRenderList(y);var f=y.list,d=f.length;if(0!==d){var c=y.localTransform;g?(c.loadIdentity(),c.multiply(g),c.translate(y.x,y.y),c.rotate(y.rotation),c.scale(y.scaleX,y.scaleY)):c.applyITRS(y.x,y.y,y.rotation,y.scaleX,y.scaleY),a.pipelines.preBatch(y);var h=-1!==y.blendMode;h||a.setBlendMode(0);for(var p=y.alpha,u=y.scrollFactorX,m=y.scrollFactorY,v=0;v{S.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(441),f=a(95643),d=a(41212),c=a(35846),h=a(44594),p=a(61369),u=new y({Extends:f,Mixins:[C.AlphaSingle,C.BlendMode,C.Depth,C.Origin,C.ScrollFactor,C.Transform,C.Visible,g],initialize:function(v,x,b,T,_,A){f.call(this,v,"DOMElement"),this.parent=v.sys.game.domContainer,this.cache=v.sys.cache.html,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new p,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(x,b),"string"==typeof T?"#"===T[0]?this.setElement(T.substr(1),_,A):this.createElement(T,_,A):T&&this.setElement(T,_,A),v.sys.events.on(h.SLEEP,this.handleSceneEvent,this),v.sys.events.on(h.WAKE,this.handleSceneEvent,this),v.sys.events.on(h.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(m){var v=this.node;v&&(v.style.display=m.settings.visible?"block":"none")},setSkew:function(m,v){return void 0===m&&(m=0),void 0===v&&(v=m),this.skewX=m,this.skewY=v,this},setPerspective:function(m){return this.parent.style.perspective=m+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(m){this.parent.style.perspective=m+"px"}},addListener:function(m){if(this.node){m=m.split(" ");for(var v=0;v{var y=a(47407),C=a(95643),g=a(61340),f=new g,d=new g,c=new g;S.exports=function(p,u,m,v){if(u.node){var x=u.node.style;if(!x||!u.scene.sys.settings.visible||C.RENDER_MASK!==u.renderFlags||0!==u.cameraFilter&&u.cameraFilter&m.id||u.parentContainer&&!u.parentContainer.willRender())return void(x.display="none");var T=u.parentContainer,_=m.alpha*u.alpha;T&&(_*=T.alpha);var A=f,M=d,I=c,R=0,F=0,N="0%",V="0%";v?(M.applyITRS(u.x-(R=u.width*u.scaleX*u.originX),u.y-(F=u.height*u.scaleY*u.originY),u.rotation,u.scaleX,u.scaleY),A.copyFrom(m.matrix),A.multiplyWithOffset(v,-m.scrollX*u.scrollFactorX,-m.scrollY*u.scrollFactorY),M.e=u.x-R,M.f=u.y-F,A.multiply(M,I)):(R=u.width*u.originX,F=u.height*u.originY,M.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),A.copyFrom(m.matrix),N=100*u.originX+"%",V=100*u.originY+"%",M.e-=m.scrollX*u.scrollFactorX,M.f-=m.scrollY*u.scrollFactorY,A.multiply(M,I),I.e-=R,I.f-=F),u.transformOnly||(x.display="block",x.opacity=_,x.zIndex=u._depth,x.pointerEvents=u.pointerEvents,x.mixBlendMode=y[u._blendMode]),x.transform=I.getCSSMatrix()+" skew("+u.skewX+"rad, "+u.skewY+"rad) rotate3d("+u.rotate3d.x+","+u.rotate3d.y+","+u.rotate3d.z+","+u.rotate3d.w+u.rotate3dAngle+")",x.transformOrigin=N+" "+V}}},2611:(S,P,a)=>{var y=a(3069);a(39429).register("dom",function(g,f,d,c,h){var p=new y(this.scene,g,f,d,c,h);return this.displayList.add(p),p})},441:(S,P,a)=>{var C,g;a(29747),C=a(49381),g=a(49381),S.exports={renderWebGL:C,renderCanvas:g}},62980:S=>{S.exports="addedtoscene"},41337:S=>{S.exports="destroy"},44947:S=>{S.exports="removedfromscene"},49358:S=>{S.exports="complete"},35163:S=>{S.exports="created"},97249:S=>{S.exports="error"},19483:S=>{S.exports="locked"},56059:S=>{S.exports="loop"},26772:S=>{S.exports="metadata"},64437:S=>{S.exports="playing"},83411:S=>{S.exports="play"},75780:S=>{S.exports="seeked"},67799:S=>{S.exports="seeking"},63500:S=>{S.exports="stalled"},55541:S=>{S.exports="stop"},53208:S=>{S.exports="textureready"},4992:S=>{S.exports="unlocked"},12:S=>{S.exports="unsupported"},51708:(S,P,a)=>{S.exports={ADDED_TO_SCENE:a(62980),DESTROY:a(41337),REMOVED_FROM_SCENE:a(44947),VIDEO_COMPLETE:a(49358),VIDEO_CREATED:a(35163),VIDEO_ERROR:a(97249),VIDEO_LOCKED:a(19483),VIDEO_LOOP:a(56059),VIDEO_METADATA:a(26772),VIDEO_PLAY:a(83411),VIDEO_PLAYING:a(64437),VIDEO_SEEKED:a(75780),VIDEO_SEEKING:a(67799),VIDEO_STALLED:a(63500),VIDEO_STOP:a(55541),VIDEO_TEXTURE:a(53208),VIDEO_UNLOCKED:a(4992),VIDEO_UNSUPPORTED:a(12)}},42421:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(95643),f=a(64993),d=new y({Extends:g,Mixins:[C.Alpha,C.BlendMode,C.Depth,C.Flip,C.Origin,C.ScrollFactor,C.Size,C.Texture,C.Tint,C.Transform,C.Visible,f],initialize:function(h){g.call(this,h,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});S.exports=d},70217:()=>{},56315:(S,P,a)=>{var y=a(42421);a(39429).register("extern",function(){var g=new y(this.scene);return this.displayList.add(g),g})},64993:(S,P,a)=>{var C,g;a(29747),C=a(80287),g=a(70217),S.exports={renderWebGL:C,renderCanvas:g}},80287:(S,P,a)=>{var y=a(91296);S.exports=function(g,f,d,c){g.pipelines.clear();var h=y(f,d,c).calc;f.render.call(f,g,d,h),g.pipelines.rebind()}},85592:S=>{S.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},43831:(S,P,a)=>{var y=a(71911),C=a(83419),g=a(85592),f=a(31401),d=a(8497),c=a(95643),h=a(95540),p=a(35154),u=a(36383),m=a(84503),v=new C({Extends:c,Mixins:[f.AlphaSingle,f.BlendMode,f.Depth,f.Mask,f.Pipeline,f.PostPipeline,f.Transform,f.Visible,f.ScrollFactor,m],initialize:function(b,T){var _=p(T,"x",0),A=p(T,"y",0);c.call(this,b,"Graphics"),this.setPosition(_,A),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(T)},setDefaultStyles:function(x){return p(x,"lineStyle",null)&&(this.defaultStrokeWidth=p(x,"lineStyle.width",1),this.defaultStrokeColor=p(x,"lineStyle.color",16777215),this.defaultStrokeAlpha=p(x,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),p(x,"fillStyle",null)&&(this.defaultFillColor=p(x,"fillStyle.color",16777215),this.defaultFillAlpha=p(x,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(x,b,T){return void 0===T&&(T=1),this.commandBuffer.push(g.LINE_STYLE,x,b,T),this._lineWidth=x,this},fillStyle:function(x,b){return void 0===b&&(b=1),this.commandBuffer.push(g.FILL_STYLE,x,b),this},fillGradientStyle:function(x,b,T,_,A,M,I,R){return void 0===A&&(A=1),void 0===M&&(M=A),void 0===I&&(I=A),void 0===R&&(R=A),this.commandBuffer.push(g.GRADIENT_FILL_STYLE,A,M,I,R,x,b,T,_),this},lineGradientStyle:function(x,b,T,_,A,M){return void 0===M&&(M=1),this.commandBuffer.push(g.GRADIENT_LINE_STYLE,x,M,b,T,_,A),this},beginPath:function(){return this.commandBuffer.push(g.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(g.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(g.FILL_PATH),this},fill:function(){return this.commandBuffer.push(g.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(g.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(g.STROKE_PATH),this},fillCircleShape:function(x){return this.fillCircle(x.x,x.y,x.radius)},strokeCircleShape:function(x){return this.strokeCircle(x.x,x.y,x.radius)},fillCircle:function(x,b,T){return this.beginPath(),this.arc(x,b,T,0,u.PI2),this.fillPath(),this},strokeCircle:function(x,b,T){return this.beginPath(),this.arc(x,b,T,0,u.PI2),this.strokePath(),this},fillRectShape:function(x){return this.fillRect(x.x,x.y,x.width,x.height)},strokeRectShape:function(x){return this.strokeRect(x.x,x.y,x.width,x.height)},fillRect:function(x,b,T,_){return this.commandBuffer.push(g.FILL_RECT,x,b,T,_),this},strokeRect:function(x,b,T,_){var A=this._lineWidth/2,M=x-A,I=x+A;return this.beginPath(),this.moveTo(x,b),this.lineTo(x,b+_),this.strokePath(),this.beginPath(),this.moveTo(x+T,b),this.lineTo(x+T,b+_),this.strokePath(),this.beginPath(),this.moveTo(M,b),this.lineTo(I+T,b),this.strokePath(),this.beginPath(),this.moveTo(M,b+_),this.lineTo(I+T,b+_),this.strokePath(),this},fillRoundedRect:function(x,b,T,_,A){void 0===A&&(A=20);var M=A,I=A,R=A,F=A;"number"!=typeof A&&(M=h(A,"tl",20),I=h(A,"tr",20),R=h(A,"bl",20),F=h(A,"br",20));var N=M>=0,V=I>=0,B=R>=0,G=F>=0;return M=Math.abs(M),I=Math.abs(I),R=Math.abs(R),F=Math.abs(F),this.beginPath(),this.moveTo(x+M,b),this.lineTo(x+T-I,b),V?this.arc(x+T-I,b+I,I,-u.TAU,0):this.arc(x+T,b,I,Math.PI,u.TAU,!0),this.lineTo(x+T,b+_-F),G?this.arc(x+T-F,b+_-F,F,0,u.TAU):this.arc(x+T,b+_,F,-u.TAU,Math.PI,!0),this.lineTo(x+R,b+_),B?this.arc(x+R,b+_-R,R,u.TAU,Math.PI):this.arc(x,b+_,R,0,-u.TAU,!0),this.lineTo(x,b+M),N?this.arc(x+M,b+M,M,-Math.PI,-u.TAU):this.arc(x,b,M,u.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(x,b,T,_,A){void 0===A&&(A=20);var M=A,I=A,R=A,F=A,N=Math.min(T,_)/2;"number"!=typeof A&&(M=h(A,"tl",20),I=h(A,"tr",20),R=h(A,"bl",20),F=h(A,"br",20));var V=M>=0,B=I>=0,G=R>=0,Q=F>=0;return M=Math.min(Math.abs(M),N),I=Math.min(Math.abs(I),N),R=Math.min(Math.abs(R),N),F=Math.min(Math.abs(F),N),this.beginPath(),this.moveTo(x+M,b),this.lineTo(x+T-I,b),this.moveTo(x+T-I,b),B?this.arc(x+T-I,b+I,I,-u.TAU,0):this.arc(x+T,b,I,Math.PI,u.TAU,!0),this.lineTo(x+T,b+_-F),this.moveTo(x+T,b+_-F),Q?this.arc(x+T-F,b+_-F,F,0,u.TAU):this.arc(x+T,b+_,F,-u.TAU,Math.PI,!0),this.lineTo(x+R,b+_),this.moveTo(x+R,b+_),G?this.arc(x+R,b+_-R,R,u.TAU,Math.PI):this.arc(x,b+_,R,0,-u.TAU,!0),this.lineTo(x,b+M),this.moveTo(x,b+M),V?this.arc(x+M,b+M,M,-Math.PI,-u.TAU):this.arc(x,b,M,u.TAU,0,!0),this.strokePath(),this},fillPointShape:function(x,b){return this.fillPoint(x.x,x.y,b)},fillPoint:function(x,b,T){return!T||T<1?T=1:(x-=T/2,b-=T/2),this.commandBuffer.push(g.FILL_RECT,x,b,T,T),this},fillTriangleShape:function(x){return this.fillTriangle(x.x1,x.y1,x.x2,x.y2,x.x3,x.y3)},strokeTriangleShape:function(x){return this.strokeTriangle(x.x1,x.y1,x.x2,x.y2,x.x3,x.y3)},fillTriangle:function(x,b,T,_,A,M){return this.commandBuffer.push(g.FILL_TRIANGLE,x,b,T,_,A,M),this},strokeTriangle:function(x,b,T,_,A,M){return this.commandBuffer.push(g.STROKE_TRIANGLE,x,b,T,_,A,M),this},strokeLineShape:function(x){return this.lineBetween(x.x1,x.y1,x.x2,x.y2)},lineBetween:function(x,b,T,_){return this.beginPath(),this.moveTo(x,b),this.lineTo(T,_),this.strokePath(),this},lineTo:function(x,b){return this.commandBuffer.push(g.LINE_TO,x,b),this},moveTo:function(x,b){return this.commandBuffer.push(g.MOVE_TO,x,b),this},strokePoints:function(x,b,T,_){void 0===b&&(b=!1),void 0===T&&(T=!1),void 0===_&&(_=x.length),this.beginPath(),this.moveTo(x[0].x,x[0].y);for(var A=1;A<_;A++)this.lineTo(x[A].x,x[A].y);return b&&this.lineTo(x[0].x,x[0].y),T&&this.closePath(),this.strokePath(),this},fillPoints:function(x,b,T,_){void 0===b&&(b=!1),void 0===T&&(T=!1),void 0===_&&(_=x.length),this.beginPath(),this.moveTo(x[0].x,x[0].y);for(var A=1;A<_;A++)this.lineTo(x[A].x,x[A].y);return b&&this.lineTo(x[0].x,x[0].y),T&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(x,b){void 0===b&&(b=32);var T=x.getPoints(b);return this.strokePoints(T,!0)},strokeEllipse:function(x,b,T,_,A){void 0===A&&(A=32);var I=new d(x,b,T,_).getPoints(A);return this.strokePoints(I,!0)},fillEllipseShape:function(x,b){void 0===b&&(b=32);var T=x.getPoints(b);return this.fillPoints(T,!0)},fillEllipse:function(x,b,T,_,A){void 0===A&&(A=32);var I=new d(x,b,T,_).getPoints(A);return this.fillPoints(I,!0)},arc:function(x,b,T,_,A,M,I){return void 0===M&&(M=!1),void 0===I&&(I=0),this.commandBuffer.push(g.ARC,x,b,T,_,A,M,I),this},slice:function(x,b,T,_,A,M,I){return void 0===M&&(M=!1),void 0===I&&(I=0),this.commandBuffer.push(g.BEGIN_PATH),this.commandBuffer.push(g.MOVE_TO,x,b),this.commandBuffer.push(g.ARC,x,b,T,_,A,M,I),this.commandBuffer.push(g.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(g.SAVE),this},restore:function(){return this.commandBuffer.push(g.RESTORE),this},translateCanvas:function(x,b){return this.commandBuffer.push(g.TRANSLATE,x,b),this},scaleCanvas:function(x,b){return this.commandBuffer.push(g.SCALE,x,b),this},rotateCanvas:function(x){return this.commandBuffer.push(g.ROTATE,x),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(x,b,T){var _=this.scene.sys,A=_.game.renderer;void 0===b&&(b=_.scale.width),void 0===T&&(T=_.scale.height),v.TargetCamera.setScene(this.scene),v.TargetCamera.setViewport(0,0,b,T),v.TargetCamera.scrollX=this.x,v.TargetCamera.scrollY=this.y;var M,I,R={willReadFrequently:!0};if("string"==typeof x)if(_.textures.exists(x)){var F=(M=_.textures.get(x)).getSourceImage();F instanceof HTMLCanvasElement&&(I=F.getContext("2d",R))}else I=(M=_.textures.createCanvas(x,b,T)).getSourceImage().getContext("2d",R);else x instanceof HTMLCanvasElement&&(I=x.getContext("2d",R));return I&&(this.renderCanvas(A,this,v.TargetCamera,null,I,!1),M&&M.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});v.TargetCamera=new y,S.exports=v},32768:(S,P,a)=>{var y=a(85592),C=a(20926);S.exports=function(f,d,c,h,p,u){var m=d.commandBuffer,v=m.length,x=p||f.currentContext;if(0!==v&&C(f,x,d,c,h)){c.addToRenderList(d);var _=0,A=0,M=1;x.beginPath();for(var N=0;N>>16)+","+((65280&_)>>>8)+","+(255&_)+","+m[N+3]+")",x.lineWidth=M,N+=3;break;case y.FILL_STYLE:x.fillStyle="rgba("+((16711680&(A=m[N+1]))>>>16)+","+((65280&A)>>>8)+","+(255&A)+","+m[N+2]+")",N+=2;break;case y.BEGIN_PATH:x.beginPath();break;case y.CLOSE_PATH:x.closePath();break;case y.FILL_PATH:u||x.fill();break;case y.STROKE_PATH:u||x.stroke();break;case y.FILL_RECT:u?x.rect(m[N+1],m[N+2],m[N+3],m[N+4]):x.fillRect(m[N+1],m[N+2],m[N+3],m[N+4]),N+=4;break;case y.FILL_TRIANGLE:x.beginPath(),x.moveTo(m[N+1],m[N+2]),x.lineTo(m[N+3],m[N+4]),x.lineTo(m[N+5],m[N+6]),x.closePath(),u||x.fill(),N+=6;break;case y.STROKE_TRIANGLE:x.beginPath(),x.moveTo(m[N+1],m[N+2]),x.lineTo(m[N+3],m[N+4]),x.lineTo(m[N+5],m[N+6]),x.closePath(),u||x.stroke(),N+=6;break;case y.LINE_TO:x.lineTo(m[N+1],m[N+2]),N+=2;break;case y.MOVE_TO:x.moveTo(m[N+1],m[N+2]),N+=2;break;case y.LINE_FX_TO:x.lineTo(m[N+1],m[N+2]),N+=5;break;case y.MOVE_FX_TO:x.moveTo(m[N+1],m[N+2]),N+=5;break;case y.SAVE:x.save();break;case y.RESTORE:x.restore();break;case y.TRANSLATE:x.translate(m[N+1],m[N+2]),N+=2;break;case y.SCALE:x.scale(m[N+1],m[N+2]),N+=2;break;case y.ROTATE:x.rotate(m[N+1]),N+=1;break;case y.GRADIENT_FILL_STYLE:N+=5;break;case y.GRADIENT_LINE_STYLE:N+=6}x.restore()}}},87079:(S,P,a)=>{var y=a(44603),C=a(43831);y.register("graphics",function(g,f){void 0===g&&(g={}),void 0!==f&&(g.add=f);var d=new C(this.scene,g);return g.add&&this.scene.sys.displayList.add(d),d})},1201:(S,P,a)=>{var y=a(43831);a(39429).register("graphics",function(g){return this.displayList.add(new y(this.scene,g))})},84503:(S,P,a)=>{var C,g;a(29747),C=a(77545),a(32768),g=a(32768),S.exports={renderWebGL:C,renderCanvas:g}},77545:(S,P,a)=>{var y=a(85592),C=a(91296),g=a(61340),f=a(70554),d=function(m,v,x){this.x=m,this.y=v,this.width=x},c=function(m,v,x){this.points=[],this.pointsLength=1,this.points[0]=new d(m,v,x)},h=[],p=new g;S.exports=function(m,v,x,b){if(0!==v.commandBuffer.length){x.addToRenderList(v);var T=m.pipelines.set(v.pipeline,v);m.pipelines.preBatch(v);for(var K,_=C(v,x,b).calc,A=p.loadIdentity(),M=v.commandBuffer,I=x.alpha*v.alpha,R=1,F=T.fillTint,N=T.strokeTint,V=0,B=0,G=0,H=2*Math.PI,tt=[],at=0,lt=!0,q=null,it=f.getTintAppendFloatAlpha,Y=0;Y0&&(Se=Se%H-H):Se>H?Se=H:Se<0&&(Se=H+Se%H),null===q&&(q=new c(ke+Math.cos(Qe)*Pe,Ye+Math.sin(Qe)*Pe,R),tt.push(q),fe+=.01);fe<1+ri;)G=Se*fe+Qe,V=ke+Math.cos(G)*Pe,B=Ye+Math.sin(G)*Pe,q.points.push(new d(V,B,R)),fe+=.01;G=Se+Qe,V=ke+Math.cos(G)*Pe,B=Ye+Math.sin(G)*Pe,q.points.push(new d(V,B,R));break;case y.FILL_RECT:T.batchFillRect(M[++Y],M[++Y],M[++Y],M[++Y],A,_);break;case y.FILL_TRIANGLE:T.batchFillTriangle(M[++Y],M[++Y],M[++Y],M[++Y],M[++Y],M[++Y],A,_);break;case y.STROKE_TRIANGLE:T.batchStrokeTriangle(M[++Y],M[++Y],M[++Y],M[++Y],M[++Y],M[++Y],R,A,_);break;case y.LINE_TO:null!==q?q.points.push(new d(M[++Y],M[++Y],R)):(q=new c(M[++Y],M[++Y],R),tt.push(q));break;case y.MOVE_TO:q=new c(M[++Y],M[++Y],R),tt.push(q);break;case y.SAVE:h.push(A.copyToArray());break;case y.RESTORE:A.copyFromArray(h.pop());break;case y.TRANSLATE:ke=M[++Y],Ye=M[++Y],A.translate(ke,Ye);break;case y.SCALE:ke=M[++Y],Ye=M[++Y],A.scale(ke,Ye);break;case y.ROTATE:A.rotate(M[++Y])}m.pipelines.postBatch(v)}}},26479:(S,P,a)=>{var y=a(61061),C=a(83419),g=a(51708),f=a(50792),d=a(46710),c=a(95540),h=a(35154),p=a(97022),u=a(41212),m=a(88492),v=a(35072),x=a(68287),b=new C({Extends:f,initialize:function(_,A,M){f.call(this),M?A&&!Array.isArray(A)&&(A=[A]):Array.isArray(A)?u(A[0])&&(M=A,A=null):u(A)&&(M=A,A=null),this.scene=_,this.children=new v,this.isParent=!0,this.type="Group",this.classType=c(M,"classType",x),this.name=c(M,"name",""),this.active=c(M,"active",!0),this.maxSize=c(M,"maxSize",-1),this.defaultKey=c(M,"defaultKey",null),this.defaultFrame=c(M,"defaultFrame",null),this.runChildUpdate=c(M,"runChildUpdate",!1),this.createCallback=c(M,"createCallback",null),this.removeCallback=c(M,"removeCallback",null),this.createMultipleCallback=c(M,"createMultipleCallback",null),this.internalCreateCallback=c(M,"internalCreateCallback",null),this.internalRemoveCallback=c(M,"internalRemoveCallback",null),A&&this.addMultiple(A),M&&this.createMultiple(M),this.on(g.ADDED_TO_SCENE,this.addedToScene,this),this.on(g.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(T,_,A,M,I,R){if(void 0===T&&(T=0),void 0===_&&(_=0),void 0===A&&(A=this.defaultKey),void 0===M&&(M=this.defaultFrame),void 0===I&&(I=!0),void 0===R&&(R=!0),this.isFull())return null;var F=new this.classType(this.scene,T,_,A,M);return F.addToDisplayList(this.scene.sys.displayList),F.addToUpdateList(),F.visible=I,F.setActive(R),this.add(F),F},createMultiple:function(T){if(this.isFull())return[];Array.isArray(T)||(T=[T]);var _=[];if(T[0].key)for(var A=0;A=0;G--)if((B=H[G]).active===A){if(++Q===_)break}else B=null;return B?("number"==typeof I&&(B.x=I),"number"==typeof R&&(B.y=R),B):M?this.create(I,R,F,N,V):null},get:function(T,_,A,M,I){return this.getFirst(!1,!0,T,_,A,M,I)},getFirstAlive:function(T,_,A,M,I,R){return this.getFirst(!0,T,_,A,M,I,R)},getFirstDead:function(T,_,A,M,I,R){return this.getFirst(!1,T,_,A,M,I,R)},playAnimation:function(T,_){return y.PlayAnimation(this.children.entries,T,_),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(T){void 0===T&&(T=!0);for(var _=0,A=0;A{var y=a(44603),C=a(26479);y.register("group",function(g){return new C(this.scene,null,g)})},3385:(S,P,a)=>{var y=a(26479);a(39429).register("group",function(g,f){return this.updateList.add(new y(this.scene,g,f))})},88571:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(95643),f=a(59819),d=new y({Extends:g,Mixins:[C.Alpha,C.BlendMode,C.Depth,C.Flip,C.GetBounds,C.Mask,C.Origin,C.Pipeline,C.PostPipeline,C.ScrollFactor,C.Size,C.TextureCrop,C.Tint,C.Transform,C.Visible,f],initialize:function(h,p,u,m,v){g.call(this,h,"Image"),this._crop=this.resetCropObject(),this.setTexture(m,v),this.setPosition(p,u),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});S.exports=d},40652:S=>{S.exports=function(a,y,C,g){C.addToRenderList(y),a.batchSprite(y,y.frame,C,g)}},82459:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(88571);C.register("image",function(d,c){void 0===d&&(d={});var h=g(d,"key",null),p=g(d,"frame",null),u=new f(this.scene,0,0,h,p);return void 0!==c&&(d.add=c),y(this.scene,u,d),u})},2117:(S,P,a)=>{var y=a(88571);a(39429).register("image",function(g,f,d,c){return this.displayList.add(new y(this.scene,g,f,d,c))})},59819:(S,P,a)=>{var C,g;a(29747),C=a(99517),g=a(40652),S.exports={renderWebGL:C,renderCanvas:g}},99517:S=>{S.exports=function(a,y,C,g){C.addToRenderList(y),this.pipeline.batchSprite(y,C,g)}},77856:(S,P,a)=>{var y={Events:a(51708),DisplayList:a(8050),GameObjectCreator:a(44603),GameObjectFactory:a(39429),UpdateList:a(45027),Components:a(31401),GetCalcMatrix:a(91296),BuildGameObject:a(25305),BuildGameObjectAnimation:a(13059),GameObject:a(95643),BitmapText:a(22186),Blitter:a(6107),Bob:a(46590),Container:a(31559),DOMElement:a(3069),DynamicBitmapText:a(2638),Extern:a(42421),Graphics:a(43831),Group:a(26479),Image:a(88571),Layer:a(93595),Particles:a(18404),PathFollower:a(1159),RenderTexture:a(591),RetroFont:a(196),Rope:a(77757),Sprite:a(68287),Text:a(50171),GetTextSize:a(14220),MeasureText:a(79557),TextStyle:a(35762),TileSprite:a(20839),Zone:a(41481),Video:a(18471),Shape:a(17803),Arc:a(23629),Curve:a(89),Ellipse:a(19921),Grid:a(30479),IsoBox:a(61475),IsoTriangle:a(16933),Line:a(57847),Polygon:a(24949),Rectangle:a(74561),Star:a(55911),Triangle:a(36931),Factories:{Blitter:a(12709),Container:a(24961),DOMElement:a(2611),DynamicBitmapText:a(72566),Extern:a(56315),Graphics:a(1201),Group:a(3385),Image:a(2117),Layer:a(20005),Particles:a(676),PathFollower:a(90145),RenderTexture:a(60505),Rope:a(96819),Sprite:a(46409),StaticBitmapText:a(34914),Text:a(68005),TileSprite:a(91681),Zone:a(84175),Video:a(89025),Arc:a(42563),Curve:a(40511),Ellipse:a(1543),Grid:a(34137),IsoBox:a(3933),IsoTriangle:a(49803),Line:a(2481),Polygon:a(64827),Rectangle:a(87959),Star:a(93697),Triangle:a(45245)},Creators:{Blitter:a(9403),Container:a(77143),DynamicBitmapText:a(11164),Graphics:a(87079),Group:a(94975),Image:a(82459),Layer:a(25179),Particles:a(92730),RenderTexture:a(34495),Rope:a(26209),Sprite:a(15567),StaticBitmapText:a(57336),Text:a(71259),TileSprite:a(14167),Zone:a(95261),Video:a(11511)}};y.Shader=a(20071),y.Mesh=a(4703),y.NineSlice=a(28103),y.PointLight=a(80321),y.Plane=a(33663),y.Factories.Shader=a(74177),y.Factories.Mesh=a(9225),y.Factories.NineSlice=a(47521),y.Factories.PointLight=a(71255),y.Factories.Plane=a(30985),y.Creators.Shader=a(54935),y.Creators.Mesh=a(20527),y.Creators.NineSlice=a(28279),y.Creators.PointLight=a(39829),y.Creators.Plane=a(56015),y.Light=a(41432),y.LightsManager=a(61356),y.LightsPlugin=a(88992),S.exports=y},93595:(S,P,a)=>{var y=a(10312),C=a(83419),g=a(31401),f=a(53774),d=a(45893),c=a(50792),h=a(51708),p=a(73162),u=a(33963),m=a(44594),v=a(19186),x=new C({Extends:p,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.Mask,g.PostPipeline,g.Visible,c,u],initialize:function(T,_){p.call(this,T),c.call(this),this.scene=T,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=T.sys,this.events=T.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(y.SKIP_CHECK),_&&this.add(_),T.sys.queueDepthSort()},setActive:function(b){return this.active=b,this},setName:function(b){return this.name=b,this},setState:function(b){return this.state=b,this},setDataEnabled:function(){return this.data||(this.data=new d(this)),this},setData:function(b,T){return this.data||(this.data=new d(this)),this.data.set(b,T),this},incData:function(b,T){return this.data||(this.data=new d(this)),this.data.inc(b,T),this},toggleData:function(b){return this.data||(this.data=new d(this)),this.data.toggle(b),this},getData:function(b){return this.data||(this.data=new d(this)),this.data.get(b)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return f(this)},willRender:function(b){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&b.id)},getIndexList:function(){for(var b=this,T=this.parentContainer,_=[];T&&(_.unshift(T.getIndex(b)),b=T,T.parentContainer);)T=T.parentContainer;return _.unshift(this.displayList.getIndex(b)),_},addChildCallback:function(b){var T=b.displayList;T&&T!==this&&b.removeFromDisplayList(),b.displayList||(this.queueDepthSort(),b.displayList=this,b.emit(h.ADDED_TO_SCENE,b,this.scene),this.events.emit(m.ADDED_TO_SCENE,b,this.scene))},removeChildCallback:function(b){this.queueDepthSort(),b.displayList=null,b.emit(h.REMOVED_FROM_SCENE,b,this.scene),this.events.emit(m.REMOVED_FROM_SCENE,b,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(v(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(b,T){return b._depth-T._depth},getChildren:function(){return this.list},addToDisplayList:function(b){return void 0===b&&(b=this.scene.sys.displayList),this.displayList&&this.displayList!==b&&this.removeFromDisplayList(),b.exists(this)||(this.displayList=b,b.add(this,!0),b.queueDepthSort(),this.emit(h.ADDED_TO_SCENE,this,this.scene),b.events.emit(m.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var b=this.displayList||this.scene.sys.displayList;return b.exists(this)&&(b.remove(this,!0),b.queueDepthSort(),this.displayList=null,this.emit(h.REMOVED_FROM_SCENE,this,this.scene),b.events.emit(m.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(b){if(this.scene&&!this.ignoreDestroy){this.emit(h.DESTROY,this);for(var T=this.list;T.length;)T[0].destroy(b);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});S.exports=x},2956:S=>{S.exports=function(a,y,C){var g=y.list;if(0!==g.length){y.depthSort();var f=-1!==y.blendMode;f||a.setBlendMode(0);var d=y._alpha;y.mask&&y.mask.preRenderCanvas(a,null,C);for(var c=0;c{var y=a(25305),C=a(93595),g=a(44603),f=a(23568);g.register("layer",function(d,c){void 0===d&&(d={});var h=f(d,"children",null),p=new C(this.scene,h);return void 0!==c&&(d.add=c),y(this.scene,p,d),p})},20005:(S,P,a)=>{var y=a(93595);a(39429).register("layer",function(g){return this.displayList.add(new y(this.scene,g))})},33963:(S,P,a)=>{var C,g;a(29747),C=a(15869),g=a(2956),S.exports={renderWebGL:C,renderCanvas:g}},15869:S=>{S.exports=function(a,y,C){var g=y.list,f=g.length;if(0!==f){y.depthSort(),a.pipelines.preBatch(y);var d=-1!==y.blendMode;d||a.setBlendMode(0);for(var c=y.alpha,h=0;h{var y=a(96503),C=a(83419),g=a(31401),f=a(51767),d=a(70554),c=new C({Extends:y,Mixins:[g.Origin,g.ScrollFactor,g.Visible],initialize:function(p,u,m,v,x,b,T){y.call(this,p,u,m),this.color=new f(v,x,b),this.intensity=T,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(m)},displayWidth:{get:function(){return this.diameter},set:function(h){this.diameter=h}},displayHeight:{get:function(){return this.diameter},set:function(h){this.diameter=h}},width:{get:function(){return this.diameter},set:function(h){this.diameter=h}},height:{get:function(){return this.diameter},set:function(h){this.diameter=h}},willRender:function(h){return!(c.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&h.id)},setColor:function(h){var p=d.getFloatsFromUintRGB(h);return this.color.set(p[0],p[1],p[2]),this},setIntensity:function(h){return this.intensity=h,this},setRadius:function(h){return this.radius=h,this}});c.RENDER_MASK=15,S.exports=c},61356:(S,P,a)=>{var y=a(81491),C=a(83419),g=a(20339),f=a(41432),d=a(80321),c=a(51767),h=a(19133),p=a(19186),u=a(70554),m=new C({initialize:function(){this.lights=[],this.ambientColor=new c(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(v,x,b,T,_,A){return this.systems.displayList.add(new d(this.scene,v,x,b,T,_,A))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(v){for(var x=this.lights,b=v.worldView,T=[],_=0;_this.maxLights&&(p(T,this.sortByDistance),T=T.slice(0,this.maxLights)),this.visibleLights=T.length,T},sortByDistance:function(v,x){return v.distance>=x.distance},setAmbientColor:function(v){var x=u.getFloatsFromUintRGB(v);return this.ambientColor.set(x[0],x[1],x[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(v,x,b,T,_){void 0===v&&(v=0),void 0===x&&(x=0),void 0===b&&(b=128),void 0===T&&(T=16777215),void 0===_&&(_=1);var A=u.getFloatsFromUintRGB(T),M=new f(v,x,b,A[0],A[1],A[2],_);return this.lights.push(M),M},removeLight:function(v){var x=this.lights.indexOf(v);return x>=0&&h(this.lights,x),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});S.exports=m},88992:(S,P,a)=>{var y=a(83419),C=a(61356),g=a(37277),f=a(44594),d=new y({Extends:C,initialize:function(h){this.scene=h,this.systems=h.sys,h.sys.settings.isBooted||h.sys.events.once(f.BOOT,this.boot,this),C.call(this)},boot:function(){var c=this.systems.events;c.on(f.SHUTDOWN,this.shutdown,this),c.on(f.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});g.register("LightsPlugin",d,"lights"),S.exports=d},4703:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(39506),f=a(83997),d=a(95643),c=a(34684),h=a(92515),p=a(91296),u=a(37867),m=a(29807),v=a(43396),x=a(19186),b=a(25836),T=a(39318),_=new y({Extends:d,Mixins:[C.AlphaSingle,C.BlendMode,C.Depth,C.Mask,C.Pipeline,C.PostPipeline,C.ScrollFactor,C.Size,C.Texture,C.Transform,C.Visible,m],initialize:function(M,I,R,F,N,V,B,G,Q,H,K,tt){void 0===I&&(I=0),void 0===R&&(R=0),void 0===F&&(F="__WHITE"),d.call(this,M,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new b,this.modelScale=new b(1,1,1),this.modelRotation=new b,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new u,this.viewPosition=new b,this.viewMatrix=new u,this.projectionMatrix=new u,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.displayOriginX=0,this.displayOriginY=0;var at=M.sys.renderer;this.setPosition(I,R),this.setTexture(F,N),this.setSize(at.width,at.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(at.width,at.height),V&&this.addVertices(V,B,G,Q,H,K,tt)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(A){return this.viewPosition.addScale(b.LEFT,A),this.dirtyCache[10]=1,this},panY:function(A){return this.viewPosition.y+=b.DOWN.y*A,this.dirtyCache[10]=1,this},panZ:function(A){return this.viewPosition.z+=A,this.dirtyCache[10]=1,this},setPerspective:function(A,M,I,R,F){return void 0===I&&(I=45),void 0===R&&(R=.01),void 0===F&&(F=1e3),this.fov=I,this.projectionMatrix.perspective(g(I),A/M,R,F),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(A,M,I,R){return void 0===A&&(A=this.scene.sys.renderer.getAspectRatio()),void 0===M&&(M=1),void 0===I&&(I=-1e3),void 0===R&&(R=1e3),this.fov=0,this.projectionMatrix.ortho(-A,A,-M,M,I,R),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(A){A.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(A,M,I,R,F,N,V,B,G){var H,Q=this.scene.sys.cache.obj.get(A);return Q&&(H=c(Q,this,M,I,R,F,N,V,B,G)),(!H||0===H.verts.length)&&console.warn("Mesh.addVerticesFromObj data empty:",A),this},sortByDepth:function(A,M){return A.depth-M.depth},depthSort:function(){return x(this.faces,this.sortByDepth),this},addVertex:function(A,M,I,R,F,N,V){var B=new T(A,M,I,R,F,N,V);return this.vertices.push(B),B},addFace:function(A,M,I){var R=new f(A,M,I);return this.faces.push(R),this.dirtyCache[9]=-1,R},addVertices:function(A,M,I,R,F,N,V){var B=h(A,M,I,R,F,N,V);return B?(this.faces=this.faces.concat(B.faces),this.vertices=this.vertices.concat(B.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(A){return this.faces[A]},hasFaceAt:function(A,M,I){void 0===I&&(I=this.scene.sys.cameras.main);for(var R=p(this,I).calc,F=this.faces,N=0;N{S.exports=function(){}},20527:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(35154),d=a(4703);C.register("mesh",function(c,h){void 0===c&&(c={});var p=g(c,"key",null),u=g(c,"frame",null),m=f(c,"vertices",[]),v=f(c,"uvs",[]),x=f(c,"indicies",[]),b=f(c,"containsZ",!1),T=f(c,"normals",[]),_=f(c,"colors",16777215),A=f(c,"alphas",1),M=new d(this.scene,0,0,p,u,m,v,x,b,T,_,A);return void 0!==h&&(c.add=h),y(this.scene,M,c),M})},9225:(S,P,a)=>{var y=a(4703);a(39429).register("mesh",function(g,f,d,c,h,p,u,m,v,x,b){return this.displayList.add(new y(this.scene,g,f,d,c,h,p,u,m,v,x,b))})},29807:(S,P,a)=>{var C,g;a(29747),C=a(48833),g=a(36488),S.exports={renderWebGL:C,renderCanvas:g}},48833:(S,P,a)=>{var y=a(91296);S.exports=function(g,f,d,c){var h=f.faces,p=h.length;if(0!==p){d.addToRenderList(f);var u=g.pipelines.set(f.pipeline,f),m=y(f,d,c).calc;g.pipelines.preBatch(f);for(var v=u.setGameObject(f),x=u.vertexViewF32,b=u.vertexViewU32,T=u.vertexCount*u.currentShader.vertexComponentCount-1,_=f.tintFill,A=[],M=f.debugCallback,I=m.a,R=m.b,F=m.c,N=m.d,V=m.e,B=m.f,G=f.viewPosition.z,Q=f.hideCCW,H=d.roundPixels,K=d.alpha*f.alpha,tt=0,at=0;at{var y=a(83419),C=a(31401),g=a(95643),f=a(78023),d=a(39318),c=new y({Extends:g,Mixins:[C.AlphaSingle,C.BlendMode,C.Depth,C.GetBounds,C.Mask,C.Origin,C.Pipeline,C.PostPipeline,C.ScrollFactor,C.Texture,C.Transform,C.Visible,f],initialize:function(p,u,m,v,x,b,T,_,A,M,I){g.call(this,p,"NineSlice"),this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.tint=16777215,this.tintFill=!1;var R=p.textures.getFrame(v,x);this.is3Slice=!M&&!I,R&&R.scale9&&(this.is3Slice=R.is3Slice);for(var F=this.is3Slice?18:54,N=0;N{var y=a(25305),C=a(44603),g=a(23568),f=a(35154),d=a(28103);C.register("nineslice",function(c,h){void 0===c&&(c={});var p=g(c,"key",null),u=g(c,"frame",null),m=f(c,"width",256),v=f(c,"height",256),x=f(c,"leftWidth",10),b=f(c,"rightWidth",10),T=f(c,"topHeight",0),_=f(c,"bottomHeight",0),A=new d(this.scene,0,0,p,u,m,v,x,b,T,_);return void 0!==h&&(c.add=h),y(this.scene,A,c),A})},47521:(S,P,a)=>{var y=a(28103);a(39429).register("nineslice",function(g,f,d,c,h,p,u,m,v,x){return this.displayList.add(new y(this.scene,g,f,d,c,h,p,u,m,v,x))})},78023:(S,P,a)=>{var C,g=a(29747);C=a(52230),S.exports={renderWebGL:C,renderCanvas:g}},52230:(S,P,a)=>{var y=a(91296),C=a(70554);S.exports=function(f,d,c,h){var p=d.vertices,u=p.length;if(0!==u){c.addToRenderList(d);var m=f.pipelines.set(d.pipeline,d),v=y(d,c,h,!1).calc;f.pipelines.preBatch(d);var x=m.setGameObject(d),b=m.vertexViewF32,T=m.vertexViewU32,_=m.vertexCount*m.currentShader.vertexComponentCount-1,A=c.roundPixels,M=d.tintFill,R=C.getTintAppendFloatAlpha(d.tint,c.alpha*d.alpha),F=m.vertexAvailable(),N=-1;F{var y=a(83419),C=a(44777),g=a(37589),f=a(6113),d=a(91389),c=a(90664),h=new y({Extends:C,initialize:function(u){C.call(this,u,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return null===this.propertyValue?0:9},setMethods:function(){var p=this.propertyValue,u=p,m=this.defaultEmit,v=this.defaultUpdate;if(9===this.method){this.start=p[0],this.ease=f("Linear"),this.interpolation=d("linear"),m=this.easedValueEmit,v=this.easeValueUpdate,u=p[0],this.active=!0;for(var x=0;x{var y=a(30976),C=a(45319),g=a(83419),f=a(99472),d=a(6113),c=a(95540),h=a(91389),p=a(77720),u=a(15994),m=new g({initialize:function(x,b,T){void 0===T&&(T=!1),this.propertyKey=x,this.propertyValue=b,this.defaultValue=b,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=T,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0},loadConfig:function(v,x){void 0===v&&(v={}),x&&(this.propertyKey=x),this.propertyValue=c(v,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(v){var x;switch(this.method){case 1:case 3:case 8:x=v;break;case 2:this.propertyValue.indexOf(v)>=0&&(x=v);break;case 4:x=p(v,(this.end-this.start)/this.steps),this.counter=x;break;case 5:case 6:case 7:x=C(v,this.start,this.end);break;case 9:x=this.start[0]}return this.current=x,this},getMethod:function(){var v=this.propertyValue;if(null===v)return 0;var x=typeof v;if("number"===x)return 1;if(Array.isArray(v))return 2;if("function"===x)return 3;if("object"===x){if(this.hasBoth(v,"start","end"))return this.has(v,"steps")?4:5;if(this.hasBoth(v,"min","max"))return 6;if(this.has(v,"random"))return 7;if(this.hasEither(v,"onEmit","onUpdate"))return 8;if(this.hasEither(v,"values","interpolation"))return 9}return 0},setMethods:function(){var v=this.propertyValue,x=v,b=this.defaultEmit,T=this.defaultUpdate;switch(this.method){case 1:b=this.staticValueEmit;break;case 2:b=this.randomStaticValueEmit,x=v[0];break;case 3:this._onEmit=v,b=this.proxyEmit;break;case 4:this.start=v.start,this.end=v.end,this.steps=v.steps,this.counter=this.start,this.yoyo=!!this.has(v,"yoyo")&&v.yoyo,this.direction=0,b=this.steppedEmit,x=this.start;break;case 5:this.start=v.start,this.end=v.end;var _=this.has(v,"ease")?v.ease:"Linear";this.ease=d(_,v.easeParams),b=this.has(v,"random")&&v.random?this.randomRangedValueEmit:this.easedValueEmit,T=this.easeValueUpdate,x=this.start;break;case 6:this.start=v.min,this.end=v.max,b=this.has(v,"int")&&v.int?this.randomRangedIntEmit:this.randomRangedValueEmit,x=this.start;break;case 7:var A=v.random;Array.isArray(A)&&(this.start=A[0],this.end=A[1]),b=this.randomRangedIntEmit,x=this.start;break;case 8:this._onEmit=this.has(v,"onEmit")?v.onEmit:this.defaultEmit,this._onUpdate=this.has(v,"onUpdate")?v.onUpdate:this.defaultUpdate,b=this.proxyEmit,T=this.proxyUpdate;break;case 9:this.start=v.values;var M=this.has(v,"ease")?v.ease:"Linear";this.ease=d(M,v.easeParams),this.interpolation=h(v.interpolation),b=this.easedValueEmit,T=this.easeValueUpdate,x=this.start[0]}return this.onEmit=b,this.onUpdate=T,this.current=x,this},has:function(v,x){return v.hasOwnProperty(x)},hasBoth:function(v,x,b){return v.hasOwnProperty(x)&&v.hasOwnProperty(b)},hasEither:function(v,x,b){return v.hasOwnProperty(x)||v.hasOwnProperty(b)},defaultEmit:function(v,x,b){return b},defaultUpdate:function(v,x,b,T){return T},proxyEmit:function(v,x,b){var T=this._onEmit(v,x,b);return this.current=T,T},proxyUpdate:function(v,x,b,T){var _=this._onUpdate(v,x,b,T);return this.current=_,_},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var v=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[v],this.current},randomRangedValueEmit:function(v,x){var b=f(this.start,this.end);return v&&v.data[x]&&(v.data[x].min=b,v.data[x].max=this.end),this.current=b,b},randomRangedIntEmit:function(v,x){var b=y(this.start,this.end);return v&&v.data[x]&&(v.data[x].min=b,v.data[x].max=this.end),this.current=b,b},steppedEmit:function(){var v=this.counter,x=v,b=(this.end-this.start)/this.steps;return this.yoyo?(0===this.direction?(x+=b)>=this.end&&(x=this.end-(x-this.end),this.direction=1):(x-=b)<=this.start&&(x=this.start+(this.start-x),this.direction=0),this.counter=x):this.counter=u(x+b,this.start,this.end),this.current=v,v},easedValueEmit:function(v,x){if(v&&v.data[x]){var b=v.data[x];b.min=this.start,b.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(v,x,b){var _,T=v.data[x],A=this.ease(b);return _=this.interpolation?this.interpolation(this.start,A):(T.max-T.min)*A+T.min,this.current=_,_},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});S.exports=m},24502:(S,P,a)=>{var y=a(83419),C=a(95540),g=a(20286),f=new y({Extends:g,initialize:function(c,h,p,u,m){if("object"==typeof c){var v=c;c=C(v,"x",0),h=C(v,"y",0),p=C(v,"power",0),u=C(v,"epsilon",100),m=C(v,"gravity",50)}else void 0===c&&(c=0),void 0===h&&(h=0),void 0===p&&(p=0),void 0===u&&(u=100),void 0===m&&(m=50);g.call(this,c,h,!0),this._gravity=m,this._power=p*m,this._epsilon=u*u},update:function(d,c){var h=this.x-d.x,p=this.y-d.y,u=h*h+p*p;if(0!==u){var m=Math.sqrt(u);u{var y=a(9674),C=a(45319),g=a(83419),f=a(39506),d=a(87841),c=a(11520),h=a(26099),p=new g({initialize:function(m){this.emitter=m,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new h,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=m.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new y(this)),this.bounds=new d},emit:function(u,m,v,x,b,T){return this.emitter.emit(u,m,v,x,b,T)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(u,m){void 0===u&&(u=0),void 0===m&&(m=0),this.x=u,this.y=m},fire:function(u,m){var v=this.emitter,x=v.ops,b=v.getAnim();if(b?this.anims.play(b):(this.frame=v.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(v.getEmitZone(this),this.x+=void 0===u?x.x.onEmit(this,"x"):x.x.steps>0?u+x.x.onEmit(this,"x"):u,this.y+=void 0===m?x.y.onEmit(this,"y"):x.y.steps>0?m+x.y.onEmit(this,"y"):m,this.life=x.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=x.delay.onEmit(this,"delay"),this.holdCurrent=x.hold.onEmit(this,"hold"),this.scaleX=x.scaleX.onEmit(this,"scaleX"),this.scaleY=x.scaleY.active?x.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=x.rotate.onEmit(this,"rotate"),this.rotation=f(this.angle),v.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),0===this.delayCurrent&&v.getDeathZone(this))return this.lifeCurrent=0,!1;var T=x.speedX.onEmit(this,"speedX"),_=x.speedY.active?x.speedY.onEmit(this,"speedY"):T;if(v.radial){var A=f(x.angle.onEmit(this,"angle"));this.velocityX=Math.cos(A)*Math.abs(T),this.velocityY=Math.sin(A)*Math.abs(_)}else if(v.moveTo){var M=x.moveToX.onEmit(this,"moveToX"),I=x.moveToY.onEmit(this,"moveToY"),R=this.life/1e3;this.velocityX=(M-this.x)/R,this.velocityY=(I-this.y)/R}else this.velocityX=T,this.velocityY=_;return v.acceleration&&(this.accelerationX=x.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=x.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=x.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=x.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=x.bounce.onEmit(this,"bounce"),this.alpha=x.alpha.onEmit(this,"alpha"),this.tint=x.color.active?x.color.onEmit(this,"tint"):x.tint.onEmit(this,"tint"),!0},update:function(u,m,v){if(this.lifeCurrent<=0)return!(this.holdCurrent>0)||(this.holdCurrent-=u,this.holdCurrent<=0);if(this.delayCurrent>0)return this.delayCurrent-=u,!1;this.anims&&this.anims.update(0,u);var x=this.emitter,b=x.ops,T=1-this.lifeCurrent/this.life;if(this.lifeT=T,this.x=b.x.onUpdate(this,"x",T,this.x),this.y=b.y.onUpdate(this,"y",T,this.y),x.moveTo){var _=b.moveToX.onUpdate(this,"moveToX",T,x.moveToX),A=b.moveToY.onUpdate(this,"moveToY",T,x.moveToY),M=this.lifeCurrent/1e3;this.velocityX=(_-this.x)/M,this.velocityY=(A-this.y)/M}return this.computeVelocity(x,u,m,v,T),this.scaleX=b.scaleX.onUpdate(this,"scaleX",T,this.scaleX),this.scaleY=b.scaleY.active?b.scaleY.onUpdate(this,"scaleY",T,this.scaleY):this.scaleX,this.angle=b.rotate.onUpdate(this,"rotate",T,this.angle),this.rotation=f(this.angle),x.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=C(b.alpha.onUpdate(this,"alpha",T,this.alpha),0,1),this.tint=b.color.active?b.color.onUpdate(this,"color",T,this.tint):b.tint.onUpdate(this,"tint",T,this.tint),this.lifeCurrent-=u,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(u,m,v,x,b){var T=u.ops,_=this.velocityX,A=this.velocityY,M=T.accelerationX.onUpdate(this,"accelerationX",b,this.accelerationX),I=T.accelerationY.onUpdate(this,"accelerationY",b,this.accelerationY),R=T.maxVelocityX.onUpdate(this,"maxVelocityX",b,this.maxVelocityX),F=T.maxVelocityY.onUpdate(this,"maxVelocityY",b,this.maxVelocityY);this.bounce=T.bounce.onUpdate(this,"bounce",b,this.bounce),A+=u.gravityY*v+I*v,_=C(_+=u.gravityX*v+M*v,-R,R),A=C(A,-F,F),this.velocityX=_,this.velocityY=A,this.x+=_*v,this.y+=A*v,u.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var N=0;N{var y=a(83419),C=a(20286),g=a(87841),f=new y({Extends:C,initialize:function(c,h,p,u,m,v,x,b){void 0===m&&(m=!0),void 0===v&&(v=!0),void 0===x&&(x=!0),void 0===b&&(b=!0),C.call(this,c,h,!0),this.bounds=new g(c,h,p,u),this.collideLeft=m,this.collideRight=v,this.collideTop=x,this.collideBottom=b},update:function(d){var c=this.bounds,h=-d.bounce,p=d.worldPosition;p.xc.right&&this.collideRight&&(d.x-=p.x-c.right,d.velocityX*=h),p.yc.bottom&&this.collideBottom&&(d.y-=p.y-c.bottom,d.velocityY*=h)}});S.exports=f},31600:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(53774),f=a(43459),d=a(26388),c=a(19909),h=a(76472),p=a(44777),u=a(20696),m=a(95643),v=a(95540),x=a(26546),b=a(24502),T=a(1985),_=a(97022),A=a(86091),M=a(73162),I=a(20074),R=a(269),F=a(56480),N=a(69601),V=a(68875),B=a(87841),G=a(59996),Q=a(72905),H=a(90668),K=a(19186),tt=a(61340),at=a(26099),lt=a(15994),q=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],it=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],Y=new y({Extends:m,Mixins:[C.AlphaSingle,C.BlendMode,C.Depth,C.Mask,C.Pipeline,C.PostPipeline,C.ScrollFactor,C.Texture,C.Transform,C.Visible,H],initialize:function(nt,dt,gt,bt,Et){m.call(this,nt,"ParticleEmitter"),this.particleClass=F,this.config=null,this.ops={accelerationX:new p("accelerationX",0),accelerationY:new p("accelerationY",0),alpha:new p("alpha",1),angle:new p("angle",{min:0,max:360},!0),bounce:new p("bounce",0),color:new h("color"),delay:new p("delay",0,!0),hold:new p("hold",0,!0),lifespan:new p("lifespan",1e3,!0),maxVelocityX:new p("maxVelocityX",1e4),maxVelocityY:new p("maxVelocityY",1e4),moveToX:new p("moveToX",0),moveToY:new p("moveToY",0),quantity:new p("quantity",1,!0),rotate:new p("rotate",0),scaleX:new p("scaleX",1),scaleY:new p("scaleY",1),speedX:new p("speedX",0,!0),speedY:new p("speedY",0,!0),tint:new p("tint",16777215),x:new p("x",0),y:new p("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new at,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new tt,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new M(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(dt,gt),this.setTexture(bt),Et&&this.setConfig(Et)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(X){if(!X)return this;this.config=X;var nt=0,dt="",gt=this.ops;for(nt=0;nt=this.animQuantity&&(this.animCounter=0,this.currentAnim=lt(this.currentAnim+1,0,nt)),dt},setAnim:function(X,nt,dt){void 0===nt&&(nt=!0),void 0===dt&&(dt=1),this.randomAnim=nt,this.animQuantity=dt,this.currentAnim=0;var gt=typeof X;if(this.anims.length=0,Array.isArray(X))this.anims=this.anims.concat(X);else if("string"===gt)this.anims.push(X);else if("object"===gt){var bt=X;(X=v(bt,"anims",null))&&(this.anims=this.anims.concat(X));var Et=v(bt,"cycle",!1);this.randomAnim=!Et,this.animQuantity=v(bt,"quantity",dt)}return 1===this.anims.length&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(X){return void 0===X&&(X=!0),this.radial=X,this},addParticleBounds:function(X,nt,dt,gt,bt,Et,Bt,Kt){if("object"==typeof X){var Zt=X;X=Zt.x,nt=Zt.y,dt=_(Zt,"w")?Zt.w:Zt.width,gt=_(Zt,"h")?Zt.h:Zt.height}return this.addParticleProcessor(new N(X,nt,dt,gt,bt,Et,Bt,Kt))},setParticleSpeed:function(X,nt){return void 0===nt&&(nt=X),this.ops.speedX.onChange(X),X===nt?this.ops.speedY.active=!1:this.ops.speedY.onChange(nt),this.radial=!0,this},setParticleScale:function(X,nt){return void 0===X&&(X=1),void 0===nt&&(nt=X),this.ops.scaleX.onChange(X),this.ops.scaleY.onChange(nt),this},setParticleGravity:function(X,nt){return this.gravityX=X,this.gravityY=nt,this},setParticleAlpha:function(X){return this.ops.alpha.onChange(X),this},setParticleTint:function(X){return this.ops.tint.onChange(X),this},setEmitterAngle:function(X){return this.ops.angle.onChange(X),this},setParticleLifespan:function(X){return this.ops.lifespan.onChange(X),this},setQuantity:function(X){return this.quantity=X,this},setFrequency:function(X,nt){return this.frequency=X,this.flowCounter=X>0?X:0,nt&&(this.quantity=nt),this},addDeathZone:function(X){Array.isArray(X)||(X=[X]);for(var nt,dt=[],gt=0;gt-1&&(this.zoneTotal++,this.zoneTotal===gt.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===dt&&(this.zoneIndex=0)))}},getDeathZone:function(X){for(var nt=this.deathZones,dt=0;dt=0&&(this.zoneIndex=nt),this},addParticleProcessor:function(X){return this.processors.exists(X)||(X.emitter&&X.emitter.removeParticleProcessor(X),this.processors.add(X),X.emitter=this),X},removeParticleProcessor:function(X){return this.processors.exists(X)&&(this.processors.remove(X,!0),X.emitter=null),X},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(X){return this.addParticleProcessor(new b(X))},reserve:function(X){var nt=this.dead;if(this.maxParticles>0){var dt=this.getParticleCount();dt+X>this.maxParticles&&(X=this.maxParticles-(dt+X))}for(var gt=0;gt0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(X,nt){return void 0===X?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof X&&(this.emitCallback=X,nt&&(this.emitCallbackScope=nt)),this},onParticleDeath:function(X,nt){return void 0===X?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof X&&(this.deathCallback=X,nt&&(this.deathCallbackScope=nt)),this},killAll:function(){for(var X=this.dead,nt=this.alive;nt.length>0;)X.push(nt.pop());return this},forEachAlive:function(X,nt){for(var dt=this.alive,gt=dt.length,bt=0;bt0&&this.fastForward(X),this.emitting=!0,this.resetCounters(this.frequency,!0),void 0!==nt&&(this.duration=Math.abs(nt)),this.emit(u.START,this)),this},stop:function(X){return void 0===X&&(X=!1),this.emitting&&(this.emitting=!1,X&&this.killAll(),this.emit(u.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(X,nt){return void 0===X&&(X=""),void 0===nt&&(nt=this.true),this.sortProperty=X,this.sortOrderAsc=nt,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(X){return this.sortCallback=""!==this.sortProperty?this.depthSortCallback:null,this},depthSort:function(){return K(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(X,nt){var dt=this.sortProperty;return this.sortOrderAsc?X[dt]-nt[dt]:nt[dt]-X[dt]},flow:function(X,nt,dt){return void 0===nt&&(nt=1),this.emitting=!1,this.frequency=X,this.quantity=nt,void 0!==dt&&(this.stopAfter=dt),this.start()},explode:function(X,nt,dt){this.frequency=-1,this.resetCounters(-1,!0);var gt=this.emitParticle(X,nt,dt);return this.emit(u.EXPLODE,this,gt),gt},emitParticleAt:function(X,nt,dt){return this.emitParticle(dt,X,nt)},emitParticle:function(X,nt,dt){if(!this.atLimit()){void 0===X&&(X=this.ops.quantity.onEmit());for(var gt=this.dead,bt=this.stopAfter,Et=this.follow?this.follow.x+this.followOffset.x:nt,Bt=this.follow?this.follow.y+this.followOffset.y:dt,Kt=0;Kt0&&(this.stopCounter++,this.stopCounter>=bt)||this.atLimit())break}return Zt}},fastForward:function(X,nt){void 0===nt&&(nt=1e3/60);var dt=0;for(this.skipping=!0;dt0){var ae=this.deathCallback,fe=this.deathCallbackScope;for(Bt=Zt-1;Bt>=0;Bt--){var ke=Kt[Bt];bt.splice(ke.index,1),Et.push(ke.particle),ae&&ae.call(fe,ke.particle),ke.particle.setPosition()}}if(this.emitting||this.skipping){if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=nt;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=nt,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())}else 1===this.completeFlag&&0===bt.length&&(this.completeFlag=0,this.emit(u.COMPLETE,this))},overlap:function(X){for(var nt=this.getWorldTransformMatrix(),dt=this.alive,gt=dt.length,bt=[],Et=0;Et0){var ne=0;for(this.skipping=!0;ne0&&A(gt,X,X),gt},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(X){this.ops.x.onChange(X)}},particleY:{get:function(){return this.ops.y.current},set:function(X){this.ops.y.onChange(X)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(X){this.ops.accelerationX.onChange(X)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(X){this.ops.accelerationY.onChange(X)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(X){this.ops.maxVelocityX.onChange(X)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(X){this.ops.maxVelocityY.onChange(X)}},speed:{get:function(){return this.ops.speedX.current},set:function(X){this.ops.speedX.onChange(X),this.ops.speedY.onChange(X)}},speedX:{get:function(){return this.ops.speedX.current},set:function(X){this.ops.speedX.onChange(X)}},speedY:{get:function(){return this.ops.speedY.current},set:function(X){this.ops.speedY.onChange(X)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(X){this.ops.moveToX.onChange(X)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(X){this.ops.moveToY.onChange(X)}},bounce:{get:function(){return this.ops.bounce.current},set:function(X){this.ops.bounce.onChange(X)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(X){this.ops.scaleX.onChange(X)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(X){this.ops.scaleY.onChange(X)}},particleColor:{get:function(){return this.ops.color.current},set:function(X){this.ops.color.onChange(X)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(X){this.ops.color.setEase(X)}},particleTint:{get:function(){return this.ops.tint.current},set:function(X){this.ops.tint.onChange(X)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(X){this.ops.alpha.onChange(X)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(X){this.ops.lifespan.onChange(X)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(X){this.ops.angle.onChange(X)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(X){this.ops.rotate.onChange(X)}},quantity:{get:function(){return this.ops.quantity.current},set:function(X){this.ops.quantity.onChange(X)}},delay:{get:function(){return this.ops.delay.current},set:function(X){this.ops.delay.onChange(X)}},hold:{get:function(){return this.ops.hold.current},set:function(X){this.ops.hold.onChange(X)}},flowCounter:{get:function(){return this.counters[0]},set:function(X){this.counters[0]=X}},frameCounter:{get:function(){return this.counters[1]},set:function(X){this.counters[1]=X}},animCounter:{get:function(){return this.counters[2]},set:function(X){this.counters[2]=X}},elapsed:{get:function(){return this.counters[3]},set:function(X){this.counters[3]=X}},stopCounter:{get:function(){return this.counters[4]},set:function(X){this.counters[4]=X}},completeFlag:{get:function(){return this.counters[5]},set:function(X){this.counters[5]=X}},zoneIndex:{get:function(){return this.counters[6]},set:function(X){this.counters[6]=X}},zoneTotal:{get:function(){return this.counters[7]},set:function(X){this.counters[7]=X}},currentFrame:{get:function(){return this.counters[8]},set:function(X){this.counters[8]=X}},currentAnim:{get:function(){return this.counters[9]},set:function(X){this.counters[9]=X}},preDestroy:function(){this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var X,nt=this.ops;for(X=0;X{var y=a(59996),C=a(61340),g=new C,f=new C,d=new C,c=new C;S.exports=function(p,u,m,v){var x=g,b=f,T=d,_=c;v?(_.loadIdentity(),_.multiply(v),_.translate(u.x,u.y),_.rotate(u.rotation),_.scale(u.scaleX,u.scaleY)):_.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY);var A=p.currentContext,M=m.roundPixels,I=m.alpha,R=u.alpha,F=u.alive,N=F.length,V=u.viewBounds;if(u.visible&&0!==N&&(!V||y(V,m.worldView))){u.sortCallback&&u.depthSort(),m.addToRenderList(u);var B=u.scrollFactorX,G=u.scrollFactorY;A.save(),A.globalCompositeOperation=p.blendModes[u.blendMode];for(var Q=0;Q0&&at.height>0){var lt=-tt.halfWidth,q=-tt.halfHeight;A.globalAlpha=K,A.save(),b.setToContext(A),M&&(lt=Math.round(lt),q=Math.round(q)),A.imageSmoothingEnabled=!tt.source.scaleMode,A.drawImage(tt.source.image,at.x,at.y,at.width,at.height,lt,q,at.width,at.height),A.restore()}}}A.restore()}}},92730:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(95540),d=a(31600);C.register("particles",function(c,h){void 0===c&&(c={});var p=g(c,"key",null),u=f(c,"config",null),m=new d(this.scene,0,0,p);return void 0!==h&&(c.add=h),y(this.scene,m,c),u&&m.setConfig(u),m})},676:(S,P,a)=>{var y=a(39429),C=a(31600);y.register("particles",function(g,f,d,c){return void 0!==g&&"string"==typeof g&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new C(this.scene,g,f,d,c))})},90668:(S,P,a)=>{var C,g;a(29747),C=a(21188),g=a(9871),S.exports={renderWebGL:C,renderCanvas:g}},21188:(S,P,a)=>{var y=a(59996),C=a(61340),g=a(70554),f=new C,d=new C,c=new C,h=new C;S.exports=function(u,m,v,x){var b=u.pipelines.set(m.pipeline),T=f,_=d,A=c,M=h;x?(M.loadIdentity(),M.multiply(x),M.translate(m.x,m.y),M.rotate(m.rotation),M.scale(m.scaleX,m.scaleY)):M.applyITRS(m.x,m.y,m.rotation,m.scaleX,m.scaleY);var I=g.getTintAppendFloatAlpha,R=v.alpha,F=m.alpha;u.pipelines.preBatch(m);var N=m.alive,V=N.length,B=m.viewBounds;if(0!==V&&(!B||y(B,v.worldView))){m.sortCallback&&m.depthSort(),v.addToRenderList(m),T.copyFrom(v.matrix),T.multiplyWithOffset(M,-v.scrollX*m.scrollFactorX,-v.scrollY*m.scrollFactorY),u.setBlendMode(m.blendMode),m.mask&&(m.mask.preRenderWebGL(u,m,v),u.pipelines.set(m.pipeline));for(var Q,H,G=m.tintFill,K=0;K{var C=new(a(83419))({initialize:function(f,d,c){void 0===f&&(f=0),void 0===d&&(d=0),void 0===c&&(c=!0),this.x=f,this.y=d,this.active=c},update:function(){},destroy:function(){this.emitter=null}});S.exports=C},9774:S=>{S.exports="complete"},812:S=>{S.exports="deathzone"},30522:S=>{S.exports="explode"},96695:S=>{S.exports="start"},18677:S=>{S.exports="stop"},20696:(S,P,a)=>{S.exports={COMPLETE:a(9774),DEATH_ZONE:a(812),EXPLODE:a(30522),START:a(96695),STOP:a(18677)}},18404:(S,P,a)=>{S.exports={EmitterColorOp:a(76472),EmitterOp:a(44777),Events:a(20696),GravityWell:a(24502),Particle:a(56480),ParticleBounds:a(69601),ParticleEmitter:a(31600),ParticleProcessor:a(20286),Zones:a(21024)}},26388:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d){this.source=f,this.killOnEnter=d},willKill:function(g){var f=this.source.contains(g.x,g.y);return f&&this.killOnEnter||!f&&!this.killOnEnter}});S.exports=C},19909:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d,c,h,p,u){void 0===h&&(h=!1),void 0===p&&(p=!0),void 0===u&&(u=-1),this.source=f,this.points=[],this.quantity=d,this.stepRate=c,this.yoyo=h,this.counter=-1,this.seamless=p,this._length=0,this._direction=0,this.total=u,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var g=this.points[0],f=this.points[this.points.length-1];g.x===f.x&&g.y===f.y&&this.points.pop()}var d=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(g){return this.source=g,this.updateSource()},getPoint:function(g){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var f=this.points[this.counter];f&&(g.x=f.x,g.y=f.y)}});S.exports=C},68875:(S,P,a)=>{var y=a(83419),C=a(26099),g=new y({initialize:function(d){this.source=d,this._tempVec=new C,this.total=-1},getPoint:function(f){var d=this._tempVec;this.source.getRandomPoint(d),f.x=d.x,f.y=d.y}});S.exports=g},21024:(S,P,a)=>{S.exports={DeathZone:a(26388),EdgeZone:a(19909),RandomZone:a(68875)}},1159:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(68287),f=new y({Extends:g,Mixins:[C.PathFollower],initialize:function(c,h,p,u,m,v){g.call(this,c,p,u,m,v),this.path=h},preUpdate:function(d,c){this.anims.update(d,c),this.pathUpdate(d)}});S.exports=f},90145:(S,P,a)=>{var y=a(39429),C=a(1159);y.register("follower",function(g,f,d,c,h){var p=new C(this.scene,g,f,d,c,h);return this.displayList.add(p),this.updateList.add(p),p})},33663:(S,P,a)=>{var y=a(9674),C=a(83419),g=a(48803),f=a(90664),d=a(4703),c=a(45650),h=new C({Extends:d,initialize:function(u,m,v,x,b,T,_,A){x||(x="__DEFAULT"),d.call(this,u,m,v,x,b),this.type="Plane",this.anims=new y(this),this._checkerboard=null,this.hideCCW=!1,this.setGridSize(T,_,A),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return.5}},originY:{get:function(){return.5}},setGridSize:function(p,u,m){void 0===p&&(p=8),void 0===u&&(u=8),void 0===m&&(m=!1);var v=!1;return m&&(v=!0),this.gridWidth=p,this.gridHeight=u,this.isTiled=m,this.clear(),g({mesh:this,widthSegments:p,heightSegments:u,isOrtho:!1,tile:m,flipY:v}),this},setSizeToFrame:function(p){void 0===p&&(p=!0);var u=this.frame;if(this.setPerspective(this.width/u.width,this.height/u.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!p)return this;var M,I,m=this.gridWidth,v=this.gridHeight,x=this.vertices,b=u.u0,T=u.u1,_=u.v0,A=u.v1,R=0;if(this.isTiled)for(_=u.v1,A=u.v0,I=0;I7&&M>7?_.push(b.r,b.g,b.b,m):_.push(T.r,T.g,T.b,v);var I=this.scene.sys.textures.addUint8Array(c(),new Uint8Array(_),16,16);return this.removeCheckerboard(),this.setTexture(I),this.setSizeToFrame(),this.setViewHeight(x),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(p,u){return this.anims.play(p,u)},playReverse:function(p,u){return this.anims.playReverse(p,u)},playAfterDelay:function(p,u){return this.anims.playAfterDelay(p,u)},playAfterRepeat:function(p,u){return this.anims.playAfterRepeat(p,u)},stop:function(){return this.anims.stop()},stopAfterDelay:function(p){return this.anims.stopAfterDelay(p)},stopAfterRepeat:function(p){return this.anims.stopAfterRepeat(p)},stopOnFrame:function(p){return this.anims.stopOnFrame(p)},preUpdate:function(p,u){d.prototype.preUpdate.call(this,p,u),this.anims.update(p,u)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});S.exports=h},56015:(S,P,a)=>{var y=a(25305),C=a(13059),g=a(44603),f=a(23568),d=a(35154),c=a(33663);g.register("plane",function(h,p){void 0===h&&(h={});var u=f(h,"key",null),m=f(h,"frame",null),v=d(h,"width",8),x=d(h,"height",8),b=d(h,"tile",!1),T=new c(this.scene,0,0,u,m,v,x,b);void 0!==p&&(h.add=p);var _=d(h,"checkerboard",null);if(_){var A=d(_,"color1",16777215),M=d(_,"color2",255),I=d(_,"alpha1",255),R=d(_,"alpha2",255),F=d(_,"height",128);T.createCheckerboard(A,M,I,R,F)}return y(this.scene,T,h),C(T,h),T})},30985:(S,P,a)=>{var y=a(33663);a(39429).register("plane",function(g,f,d,c,h,p,u){return this.displayList.add(new y(this.scene,g,f,d,c,h,p,u))})},80321:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(95643),f=a(30100),d=a(36060),c=a(67277),h=new y({Extends:g,Mixins:[C.AlphaSingle,C.BlendMode,C.Depth,C.Mask,C.Pipeline,C.PostPipeline,C.ScrollFactor,C.Transform,C.Visible,c],initialize:function(u,m,v,x,b,T,_){void 0===x&&(x=16777215),void 0===b&&(b=128),void 0===T&&(T=1),void 0===_&&(_=.1),g.call(this,u,"PointLight"),this.initPipeline(d.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(m,v),this.color=f(x),this.intensity=T,this.attenuation=_,this.width=2*b,this.height=2*b,this._radius=b},radius:{get:function(){return this._radius},set:function(p){this._radius=p,this.width=2*p,this.height=2*p}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});S.exports=h},39829:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(80321);C.register("pointlight",function(d,c){void 0===d&&(d={});var h=g(d,"color",16777215),p=g(d,"radius",128),u=g(d,"intensity",1),m=g(d,"attenuation",.1),v=new f(this.scene,0,0,h,p,u,m);return void 0!==c&&(d.add=c),y(this.scene,v,d),v})},71255:(S,P,a)=>{var y=a(39429),C=a(80321);y.register("pointlight",function(g,f,d,c,h,p){return this.displayList.add(new C(this.scene,g,f,d,c,h,p))})},67277:(S,P,a)=>{var C,g=a(29747);C=a(57787),S.exports={renderWebGL:C,renderCanvas:g}},57787:(S,P,a)=>{var y=a(91296);S.exports=function(g,f,d,c){d.addToRenderList(f);var h=g.pipelines.set(f.pipeline),p=y(f,d,c).calc,v=-f._radius,x=-f._radius,b=v+f.width,T=x+f.height,_=p.getX(0,0),A=p.getY(0,0),M=p.getX(v,x),I=p.getY(v,x),R=p.getX(v,T),F=p.getY(v,T),N=p.getX(b,T),V=p.getY(b,T),B=p.getX(b,x),G=p.getY(b,x);g.pipelines.preBatch(f),h.batchPointLight(f,d,M,I,R,F,N,V,B,G,_,A),g.pipelines.postBatch(f)}},591:(S,P,a)=>{var y=a(83419),C=a(81320),g=a(88571),f=new y({Extends:g,initialize:function(c,h,p,u,m){void 0===h&&(h=0),void 0===p&&(p=0),void 0===u&&(u=32),void 0===m&&(m=32);var v=new C(c.sys.textures,"",u,m);g.call(this,c,h,p,v),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(d,c){this.width=d,this.height=c,this.texture.setSize(d,c),this.updateDisplayOrigin();var h=this.input;return h&&!h.customHitArea&&(h.hitArea.width=d,h.hitArea.height=c),this},resize:function(d,c){return this.setSize(d,c),this},saveTexture:function(d){var c=this.texture;return c.key=d,c.manager.addDynamicTexture(c)&&(this._saved=!0),c},fill:function(d,c,h,p,u,m){return this.texture.fill(d,c,h,p,u,m),this},clear:function(){return this.texture.clear(),this},stamp:function(d,c,h,p,u){return this.texture.stamp(d,c,h,p,u),this},erase:function(d,c,h){return this.texture.erase(d,c,h),this},draw:function(d,c,h,p,u){return this.texture.draw(d,c,h,p,u),this},drawFrame:function(d,c,h,p,u,m){return this.texture.drawFrame(d,c,h,p,u,m),this},repeat:function(d,c,h,p,u,m,v,x,b){return this.texture.repeat(d,c,h,p,u,m,v,x,b),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(d,c,h,p,u){return this.texture.batchDraw(d,c,h,p,u),this},batchDrawFrame:function(d,c,h,p,u,m){return this.texture.batchDrawFrame(d,c,h,p,u,m),this},endDraw:function(d){return this.texture.endDraw(d),this},snapshotArea:function(d,c,h,p,u,m,v){return this.texture.snapshotArea(d,c,h,p,u,m,v),this},snapshot:function(d,c,h){return this.snapshotArea(0,0,this.width,this.height,d,c,h)},snapshotPixel:function(d,c,h){return this.snapshotArea(d,c,1,1,h,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});S.exports=f},34495:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(591);C.register("renderTexture",function(d,c){void 0===d&&(d={});var h=g(d,"x",0),p=g(d,"y",0),u=g(d,"width",32),m=g(d,"height",32),v=new f(this.scene,h,p,u,m);return void 0!==c&&(d.add=c),y(this.scene,v,d),v})},60505:(S,P,a)=>{var y=a(39429),C=a(591);y.register("renderTexture",function(g,f,d,c){return this.displayList.add(new C(this.scene,g,f,d,c))})},77757:(S,P,a)=>{var y=a(9674),C=a(83419),g=a(31401),f=a(95643),d=a(36060),c=a(38745),h=a(26099),p=new C({Extends:f,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.Flip,g.Mask,g.Pipeline,g.PostPipeline,g.Size,g.Texture,g.Transform,g.Visible,g.ScrollFactor,c],initialize:function(m,v,x,b,T,_,A,M,I){void 0===b&&(b="__DEFAULT"),void 0===_&&(_=2),void 0===A&&(A=!0),f.call(this,m,"Rope"),this.anims=new y(this),this.points=_,this.tintFill="__DEFAULT"===b,this.dirty=!1,this.horizontal=A,this._flipX=!1,this._flipY=!1,this._perp=new h,this.debugCallback=null,this.debugGraphic=null,this.setTexture(b,T),this.setPosition(v,x),this.setSizeToFrame(),this.initPipeline(d.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(_)&&this.resizeArrays(_.length),this.setPoints(_,M,I),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(u,m){var v=this.anims.currentFrame;this.anims.update(u,m),this.anims.currentFrame!==v&&(this.updateUVs(),this.updateVertices())},play:function(u,m,v){return this.anims.play(u,m,v),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(u,m,v){return void 0===u&&(u=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(u,m,v))},setVertical:function(u,m,v){return void 0===u&&(u=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(u,m,v)):this},setTintFill:function(u){return void 0===u&&(u=!1),this.tintFill=u,this},setAlphas:function(u,m){var v=this.points.length;if(v<1)return this;var x=this.alphas;void 0===u?u=[1]:!Array.isArray(u)&&void 0===m&&(u=[u]);var b,T=0;if(void 0!==m)for(b=0;b(T=2*b)&&(_=u[T]),x[T]=_,u.length>T+1&&(_=u[T+1]),x[T+1]=_}return this},setColors:function(u){var m=this.points.length;if(m<1)return this;var v=this.colors;void 0===u?u=[16777215]:Array.isArray(u)||(u=[u]);var x,b=0;if(u.length===m)for(x=0;x(b=2*x)&&(T=u[b]),v[b]=T,u.length>b+1&&(T=u[b+1]),v[b+1]=T}return this},setPoints:function(u,m,v){if(void 0===u&&(u=2),"number"==typeof u){var b,T,_,x=u;if(x<2&&(x=2),u=[],this.horizontal)for(_=-this.frame.halfWidth,T=this.frame.width/(x-1),b=0;b{S.exports=function(){}},26209:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(35154),d=a(77757);C.register("rope",function(c,h){void 0===c&&(c={});var p=g(c,"key",null),u=g(c,"frame",null),m=g(c,"horizontal",!0),v=f(c,"points",void 0),x=f(c,"colors",void 0),b=f(c,"alphas",void 0),T=new d(this.scene,0,0,p,u,v,m,x,b);return void 0!==h&&(c.add=h),y(this.scene,T,c),T})},96819:(S,P,a)=>{var y=a(77757);a(39429).register("rope",function(g,f,d,c,h,p,u,m){return this.displayList.add(new y(this.scene,g,f,d,c,h,p,u,m))})},38745:(S,P,a)=>{var C,g;a(29747),C=a(20439),g=a(95262),S.exports={renderWebGL:C,renderCanvas:g}},20439:(S,P,a)=>{var y=a(91296),C=a(70554);S.exports=function(f,d,c,h){c.addToRenderList(d);var p=f.pipelines.set(d.pipeline,d),u=y(d,c,h).calc,m=d.vertices,v=d.uv,x=d.colors,b=d.alphas,T=d.alpha,_=C.getTintAppendFloatAlpha,A=c.roundPixels,M=m.length,I=Math.floor(.5*M);p.flush(),f.pipelines.preBatch(d);var R=p.setGameObject(d),F=p.vertexViewF32,N=p.vertexViewU32,V=p.vertexCount*p.currentShader.vertexComponentCount-1,B=0,G=d.tintFill;d.dirty&&d.updateVertices();for(var Q=d.debugCallback,H=[],K=0;K{var y=a(83419),C=a(31401),g=a(95643),f=a(95540),d=a(79291),c=a(61622),h=a(25479),p=a(61340),u=a(95428),m=a(92503),v=new y({Extends:g,Mixins:[C.ComputedSize,C.Depth,C.GetBounds,C.Mask,C.Origin,C.ScrollFactor,C.Transform,C.Visible,h],initialize:function(b,T,_,A,M,I,R,F){void 0===_&&(_=0),void 0===A&&(A=0),void 0===M&&(M=128),void 0===I&&(I=128),g.call(this,b,"Shader"),this.blendMode=-1;var N=b.sys.renderer;this.renderer=N,this.gl=N.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=N.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=N.width,this._rendererHeight=N.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(_,A),this.setSize(M,I),this.setOrigin(.5,.5),this.setShader(T,R,F),this.renderer.on(m.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(x){return!!this.renderToTexture||!(g.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&x.id)},setRenderToTexture:function(x,b){if(void 0===b&&(b=!1),!this.renderToTexture){var T=this.width,_=this.height,A=this.renderer;this.glTexture=A.createTextureFromSource(null,T,_,0),this.framebuffer=A.createFramebuffer(T,_,this.glTexture,!1),this._rendererWidth=T,this._rendererHeight=_,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),x&&(this.texture=this.scene.sys.textures.addGLTexture(x,this.glTexture))}return this.shader&&(A.pipelines.clear(),this.load(),this.flush(),A.pipelines.rebind()),this},setShader:function(x,b,T){if(this.renderer.contextLost)return this._deferSetShader={key:x,textures:b,textureData:T},this;if(void 0===b&&(b=[]),"string"==typeof x){var _=this.scene.sys.cache.shader;if(!_.has(x))return console.warn("Shader missing: "+x),this;this.shader=_.get(x)}else this.shader=x;var A=this.gl,M=this.renderer;this.program&&M.deleteProgram(this.program);var I=M.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);A.uniformMatrix4fv(A.getUniformLocation(I.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),A.uniformMatrix4fv(A.getUniformLocation(I.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),A.uniform2f(A.getUniformLocation(I.webGLProgram,"uResolution"),this.width,this.height),this.program=I;var R=new Date,F={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[R.getFullYear(),R.getMonth(),R.getDate(),60*R.getHours()*60+60*R.getMinutes()+R.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.uniforms=this.shader.uniforms?d(!0,{},this.shader.uniforms,F):F;for(var N=0;N<4;N++)b[N]&&this.setSampler2D("iChannel"+N,b[N],N,T);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(x){return this.pointer=x,this},projOrtho:function(x,b,T,_){if(this.renderer.contextLost)this._deferProjOrtho={left:x,right:b,bottom:T,top:_};else{var I=1/(x-b),R=1/(T-_),N=this.projectionMatrix;N[0]=-2*I,N[5]=-2*R,N[10]=-.001,N[12]=(x+b)*I,N[13]=(_+T)*R,N[14]=-0;var V=this.program,B=this.gl;this.renderer.setProgram(V),B.uniformMatrix4fv(B.getUniformLocation(V.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=b,this._rendererHeight=T}},initUniforms:function(){var x=this.renderer.glFuncMap,b=this.program;for(var T in this._textureCount=0,this.uniforms){var _=this.uniforms[T],A=_.type,M=x[A];_.uniformLocation=this.renderer.createUniformLocation(b,T),"sampler2D"!==A&&(_.glMatrix=M.matrix,_.glValueLength=M.length,_.glFunc=M.func)}},setSampler2DBuffer:function(x,b,T,_,A,M){void 0===A&&(A=0),void 0===M&&(M={});var I=this.uniforms[x];return I.value=b,M.width=T,M.height=_,I.textureData=M,this._textureCount=A,this.initSampler2D(I),this},setSampler2D:function(x,b,T,_){void 0===T&&(T=0);var A=this.scene.sys.textures;if(A.exists(b)){var M=A.getFrame(b);if(M.glTexture&&M.glTexture.isRenderTexture)return this.setSampler2DBuffer(x,M.glTexture,M.width,M.height,T,_);var I=this.uniforms[x],R=M.source;I.textureKey=b,I.source=R.image,I.value=M.glTexture,R.isGLTexture&&(_||(_={}),_.width=R.width,_.height=R.height),_&&(I.textureData=_),this._textureCount=T,this.initSampler2D(I)}return this},setUniform:function(x,b){return c(this.uniforms,x,b),this},getUniform:function(x){return f(this.uniforms,x,null)},setChannel0:function(x,b){return this.setSampler2D("iChannel0",x,0,b)},setChannel1:function(x,b){return this.setSampler2D("iChannel1",x,1,b)},setChannel2:function(x,b){return this.setSampler2D("iChannel2",x,2,b)},setChannel3:function(x,b){return this.setSampler2D("iChannel3",x,3,b)},initSampler2D:function(x){if(x.value){var b=x.textureData;if(b&&!x.value.isRenderTexture){var T=this.gl,_=x.value,A=T[f(b,"magFilter","linear").toUpperCase()],M=T[f(b,"minFilter","linear").toUpperCase()],I=T[f(b,"wrapS","repeat").toUpperCase()],R=T[f(b,"wrapT","repeat").toUpperCase()],F=T[f(b,"format","rgba").toUpperCase()],N=f(b,"flipY",!1),V=f(b,"width",_.width),B=f(b,"height",_.height),G=f(b,"source",_.pixels);b.repeat&&(I=T.REPEAT,R=T.REPEAT),b.width&&(G=null),_.update(G,V,B,N,I,R,M,A,F)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var T,_,A,M,I,x=this.gl,b=this.uniforms,R=0;for(var F in b)A=(T=b[F]).glFunc,_=T.glValueLength,M=T.uniformLocation,null!==(I=T.value)&&(1===_?T.glMatrix?A.call(x,M.webGLUniformLocation,T.transpose,I):A.call(x,M.webGLUniformLocation,I):2===_?A.call(x,M.webGLUniformLocation,I.x,I.y):3===_?A.call(x,M.webGLUniformLocation,I.x,I.y,I.z):4===_?A.call(x,M.webGLUniformLocation,I.x,I.y,I.z,I.w):"sampler2D"===T.type&&(x.activeTexture(x.TEXTURE0+R),x.bindTexture(x.TEXTURE_2D,I.webGLTexture),x.uniform1i(M.webGLUniformLocation,R),R++))},load:function(x){var b=this.gl,T=this.width,_=this.height,A=this.renderer,M=this.program,I=this.viewMatrix;if(!this.renderToTexture){var R=-this._displayOriginX,F=-this._displayOriginY;I[0]=x[0],I[1]=x[1],I[4]=x[2],I[5]=x[3],I[8]=x[4],I[9]=x[5],I[12]=I[0]*R+I[4]*F,I[13]=I[1]*R+I[5]*F}b.useProgram(M.webGLProgram),b.uniformMatrix4fv(b.getUniformLocation(M.webGLProgram,"uViewMatrix"),!1,I),b.uniformMatrix4fv(b.getUniformLocation(M.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),b.uniform2f(b.getUniformLocation(M.webGLProgram,"uResolution"),this.width,this.height);var N=this.uniforms,V=N.resolution;V.value.x=T,V.value.y=_,N.time.value=A.game.loop.getDuration();var B=this.pointer;if(B){var G=N.mouse,H=1-B.y/_;G.value.x=(B.x/T).toFixed(2),G.value.y=H.toFixed(2)}this.syncUniforms()},flush:function(){var x=this.width,b=this.height,T=this.program,_=this.gl,A=this.vertexBuffer,M=this.renderer,I=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(M.setFramebuffer(this.framebuffer),_.clearColor(0,0,0,0),_.clear(_.COLOR_BUFFER_BIT)),_.bindBuffer(_.ARRAY_BUFFER,A.webGLBuffer);var R=_.getAttribLocation(T.webGLProgram,"inPosition");-1!==R&&(_.enableVertexAttribArray(R),_.vertexAttribPointer(R,2,_.FLOAT,!1,I,0));var F=this.vertexViewF32;F[3]=b,F[4]=x,F[5]=b,F[8]=x,F[9]=b,F[10]=x,_.bufferSubData(_.ARRAY_BUFFER,0,this.bytes.subarray(0,6*I)),_.drawArrays(_.TRIANGLES,0,6),this.renderToTexture&&M.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(null!==this._deferSetShader){var x=this._deferSetShader.key,b=this._deferSetShader.textures,T=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(x,b,T)}if(null!==this._deferProjOrtho){var _=this._deferProjOrtho.left,A=this._deferProjOrtho.right,M=this._deferProjOrtho.bottom,I=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(_,A,M,I)}},preDestroy:function(){var x=this.renderer;x.off(m.RESTORE_WEBGL,this.onContextRestored,this),x.deleteProgram(this.program),x.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(x.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),u(this.uniforms,function(b){x.deleteUniformLocation(b.uniformLocation),b.uniformLocation=null})}});S.exports=v},80464:S=>{S.exports=function(){}},54935:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(20071);C.register("shader",function(d,c){void 0===d&&(d={});var h=g(d,"key",null),p=g(d,"x",0),u=g(d,"y",0),m=g(d,"width",128),v=g(d,"height",128),x=new f(this.scene,h,p,u,m,v);return void 0!==c&&(d.add=c),y(this.scene,x,d),x})},74177:(S,P,a)=>{var y=a(20071);a(39429).register("shader",function(g,f,d,c,h,p,u){return this.displayList.add(new y(this.scene,g,f,d,c,h,p,u))})},25479:(S,P,a)=>{var C,g;a(29747),C=a(19257),g=a(80464),S.exports={renderWebGL:C,renderCanvas:g}},19257:(S,P,a)=>{var y=a(91296);S.exports=function(g,f,d,c){if(f.shader){if(d.addToRenderList(f),g.pipelines.clear(),f.renderToTexture)f.load(),f.flush();else{var h=y(f,d,c).calc;(g.width!==f._rendererWidth||g.height!==f._rendererHeight)&&f.projOrtho(0,g.width,g.height,0),f.load(h.matrix),f.flush()}g.pipelines.rebind()}}},10441:(S,P,a)=>{var y=a(70554);S.exports=function(g,f,d,c,h,p){for(var u=y.getTintAppendFloatAlpha(d.fillColor,d.fillAlpha*c),m=d.pathData,v=d.pathIndexes,x=0;x{S.exports=function(a,y,C,g){var f=C||y.fillColor;a.fillStyle="rgba("+((16711680&f)>>>16)+","+((65280&f)>>>8)+","+(255&f)+","+(g||y.fillAlpha)+")"}},75177:S=>{S.exports=function(a,y,C,g){var f=C||y.strokeColor;a.strokeStyle="rgba("+((16711680&f)>>>16)+","+((65280&f)>>>8)+","+(255&f)+","+(g||y.strokeAlpha)+")",a.lineWidth=y.lineWidth}},17803:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(95643),f=a(23031),d=new y({Extends:g,Mixins:[C.AlphaSingle,C.BlendMode,C.Depth,C.GetBounds,C.Mask,C.Origin,C.Pipeline,C.PostPipeline,C.ScrollFactor,C.Transform,C.Visible],initialize:function(h,p,u){void 0===p&&(p="Shape"),g.call(this,h,p),this.geom=u,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new f,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(c,h){return void 0===h&&(h=1),void 0===c?this.isFilled=!1:(this.fillColor=c,this.fillAlpha=h,this.isFilled=!0),this},setStrokeStyle:function(c,h,p){return void 0===p&&(p=1),void 0===c?this.isStroked=!1:(this.lineWidth=c,this.strokeColor=h,this.strokeAlpha=p,this.isStroked=!0),this},setClosePath:function(c){return this.closePath=c,this},setSize:function(c,h){return this.width=c,this.height=h,this},setDisplaySize:function(c,h){return this.displayWidth=c,this.displayHeight=h,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(c){this.scaleX=c/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(c){this.scaleY=c/this.height}}});S.exports=d},34682:(S,P,a)=>{var y=a(70554);S.exports=function(g,f,d,c,h){var p=g.strokeTint,u=y.getTintAppendFloatAlpha(f.strokeColor,f.strokeAlpha*d);p.TL=u,p.TR=u,p.BL=u,p.BR=u;var m=f.pathData,v=m.length-1,x=f.lineWidth,b=x/2,T=m[0]-c,_=m[1]-h;f.closePath||(v-=2);for(var A=2;A{var y=a(13609),C=a(83419),g=a(39506),f=a(94811),d=a(96503),c=a(36383),h=a(17803),p=new C({Extends:h,Mixins:[y],initialize:function(m,v,x,b,T,_,A,M,I){void 0===v&&(v=0),void 0===x&&(x=0),void 0===b&&(b=128),void 0===T&&(T=0),void 0===_&&(_=360),void 0===A&&(A=!1),h.call(this,m,"Arc",new d(0,0,b)),this._startAngle=T,this._endAngle=_,this._anticlockwise=A,this._iterations=.01,this.setPosition(v,x);var R=2*this.geom.radius;this.setSize(R,R),void 0!==M&&this.setFillStyle(M,I),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(u){this._iterations=u,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(u){this.geom.radius=u;var m=2*u;this.setSize(m,m),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(u){this._startAngle=u,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(u){this._endAngle=u,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(u){this._anticlockwise=u,this.updateData()}},setRadius:function(u){return this.radius=u,this},setIterations:function(u){return void 0===u&&(u=.01),this.iterations=u,this},setStartAngle:function(u,m){return this._startAngle=u,void 0!==m&&(this._anticlockwise=m),this.updateData()},setEndAngle:function(u,m){return this._endAngle=u,void 0!==m&&(this._anticlockwise=m),this.updateData()},updateData:function(){var u=this._iterations,m=u,v=this.geom.radius,x=g(this._startAngle),b=g(this._endAngle),_=v,A=v;b-=x,this._anticlockwise?b<-c.PI2?b=-c.PI2:b>0&&(b=b%c.PI2-c.PI2):b>c.PI2?b=c.PI2:b<0&&(b=c.PI2+b%c.PI2);for(var I,M=[_+Math.cos(x)*v,A+Math.sin(x)*v];m<1;)I=b*m+x,M.push(_+Math.cos(I)*v,A+Math.sin(I)*v),m+=u;return I=b+x,M.push(_+Math.cos(I)*v,A+Math.sin(I)*v),M.push(_+Math.cos(x)*v,A+Math.sin(x)*v),this.pathIndexes=f(M),this.pathData=M,this}});S.exports=p},42542:(S,P,a)=>{var y=a(39506),C=a(65960),g=a(75177),f=a(20926);S.exports=function(c,h,p,u){p.addToRenderList(h);var m=c.currentContext;if(f(c,m,h,p,u)){var v=h.radius;m.beginPath(),m.arc(v-h.originX*(2*v),v-h.originY*(2*v),v,y(h._startAngle),y(h._endAngle),h.anticlockwise),h.closePath&&m.closePath(),h.isFilled&&(C(m,h),m.fill()),h.isStroked&&(g(m,h),m.stroke()),m.restore()}}},42563:(S,P,a)=>{var y=a(23629),C=a(39429);C.register("arc",function(g,f,d,c,h,p,u,m){return this.displayList.add(new y(this.scene,g,f,d,c,h,p,u,m))}),C.register("circle",function(g,f,d,c,h){return this.displayList.add(new y(this.scene,g,f,d,0,360,!1,c,h))})},13609:(S,P,a)=>{var C,g;a(29747),C=a(41447),g=a(42542),S.exports={renderWebGL:C,renderCanvas:g}},41447:(S,P,a)=>{var y=a(91296),C=a(10441),g=a(34682);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.pipelines.set(c.pipeline),m=y(c,h,p),v=u.calcMatrix.copyFrom(m.calc),x=c._displayOriginX,b=c._displayOriginY,T=h.alpha*c.alpha;d.pipelines.preBatch(c),c.isFilled&&C(u,v,c,T,x,b),c.isStroked&&g(u,c,T,x,b),d.pipelines.postBatch(c)}},89:(S,P,a)=>{var y=a(83419),C=a(33141),g=a(94811),f=a(87841),d=a(17803),c=new y({Extends:d,Mixins:[C],initialize:function(p,u,m,v,x,b){void 0===u&&(u=0),void 0===m&&(m=0),d.call(this,p,"Curve",v),this._smoothness=32,this._curveBounds=new f,this.closePath=!1,this.setPosition(u,m),void 0!==x&&this.setFillStyle(x,b),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(h){this._smoothness=h,this.updateData()}},setSmoothness:function(h){return this._smoothness=h,this.updateData()},updateData:function(){var h=this._curveBounds,p=this._smoothness;this.geom.getBounds(h,p),this.setSize(h.width,h.height),this.updateDisplayOrigin();for(var u=[],m=this.geom.getPoints(p),v=0;v{var y=a(65960),C=a(75177),g=a(20926);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.currentContext;if(g(d,u,c,h,p)){var m=c._displayOriginX+c._curveBounds.x,v=c._displayOriginY+c._curveBounds.y,x=c.pathData,b=x.length-1,T=x[0]-m,_=x[1]-v;u.beginPath(),u.moveTo(T,_),c.closePath||(b-=2);for(var A=2;A{var y=a(39429),C=a(89);y.register("curve",function(g,f,d,c,h){return this.displayList.add(new C(this.scene,g,f,d,c,h))})},33141:(S,P,a)=>{var C,g;a(29747),C=a(53987),g=a(3170),S.exports={renderWebGL:C,renderCanvas:g}},53987:(S,P,a)=>{var y=a(10441),C=a(91296),g=a(34682);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.pipelines.set(c.pipeline),m=C(c,h,p),v=u.calcMatrix.copyFrom(m.calc),x=c._displayOriginX+c._curveBounds.x,b=c._displayOriginY+c._curveBounds.y,T=h.alpha*c.alpha;d.pipelines.preBatch(c),c.isFilled&&y(u,v,c,T,x,b),c.isStroked&&g(u,c,T,x,b),d.pipelines.postBatch(c)}},19921:(S,P,a)=>{var y=a(83419),C=a(94811),g=a(54205),f=a(8497),d=a(17803),c=new y({Extends:d,Mixins:[g],initialize:function(p,u,m,v,x,b,T){void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=128),void 0===x&&(x=128),d.call(this,p,"Ellipse",new f(v/2,x/2,v,x)),this._smoothness=64,this.setPosition(u,m),this.width=v,this.height=x,void 0!==b&&this.setFillStyle(b,T),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(h){this._smoothness=h,this.updateData()}},setSize:function(h,p){return this.width=h,this.height=p,this.geom.setPosition(h/2,p/2),this.geom.setSize(h,p),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(h){return this._smoothness=h,this.updateData()},updateData:function(){for(var h=[],p=this.geom.getPoints(this._smoothness),u=0;u{var y=a(65960),C=a(75177),g=a(20926);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.currentContext;if(g(d,u,c,h,p)){var m=c._displayOriginX,v=c._displayOriginY,x=c.pathData,b=x.length-1,T=x[0]-m,_=x[1]-v;u.beginPath(),u.moveTo(T,_),c.closePath||(b-=2);for(var A=2;A{var y=a(19921);a(39429).register("ellipse",function(g,f,d,c,h,p){return this.displayList.add(new y(this.scene,g,f,d,c,h,p))})},54205:(S,P,a)=>{var C,g;a(29747),C=a(19467),g=a(7930),S.exports={renderWebGL:C,renderCanvas:g}},19467:(S,P,a)=>{var y=a(10441),C=a(91296),g=a(34682);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.pipelines.set(c.pipeline),m=C(c,h,p),v=u.calcMatrix.copyFrom(m.calc),x=c._displayOriginX,b=c._displayOriginY,T=h.alpha*c.alpha;d.pipelines.preBatch(c),c.isFilled&&y(u,v,c,T,x,b),c.isStroked&&g(u,c,T,x,b),d.pipelines.postBatch(c)}},30479:(S,P,a)=>{var y=a(83419),C=a(17803),g=a(26015),f=new y({Extends:C,Mixins:[g],initialize:function(c,h,p,u,m,v,x,b,T,_,A){void 0===h&&(h=0),void 0===p&&(p=0),void 0===u&&(u=128),void 0===m&&(m=128),void 0===v&&(v=32),void 0===x&&(x=32),C.call(this,c,"Grid",null),this.cellWidth=v,this.cellHeight=x,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.setPosition(h,p),this.setSize(u,m),this.setFillStyle(b,T),void 0!==_&&this.setOutlineStyle(_,A),this.updateDisplayOrigin()},setFillStyle:function(d,c){return void 0===c&&(c=1),void 0===d?this.showCells=!1:(this.fillColor=d,this.fillAlpha=c,this.showCells=!0),this},setAltFillStyle:function(d,c){return void 0===c&&(c=1),void 0===d?this.showAltCells=!1:(this.altFillColor=d,this.altFillAlpha=c,this.showAltCells=!0),this},setOutlineStyle:function(d,c){return void 0===c&&(c=1),void 0===d?this.showOutline=!1:(this.outlineFillColor=d,this.outlineFillAlpha=c,this.showOutline=!0),this}});S.exports=f},49912:(S,P,a)=>{var y=a(65960),C=a(75177),g=a(20926);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.currentContext;if(g(d,u,c,h,p)){var m=-c._displayOriginX,v=-c._displayOriginY,x=h.alpha*c.alpha,b=c.width,T=c.height,_=c.cellWidth,A=c.cellHeight,M=Math.ceil(b/_),I=Math.ceil(T/A),R=_,F=A,N=_-(M*_-b),V=A-(I*A-T),G=c.showAltCells,Q=c.showOutline,H=0,K=0,tt=0;if(Q&&(R--,F--,N===_&&N--,V===A&&V--),c.showCells&&c.fillAlpha>0)for(y(u,c),K=0;K0)for(y(u,c,c.altFillColor,c.altFillAlpha*x),K=0;K0){for(C(u,c,c.outlineFillColor,c.outlineFillAlpha*x),H=1;H{var y=a(39429),C=a(30479);y.register("grid",function(g,f,d,c,h,p,u,m,v,x){return this.displayList.add(new C(this.scene,g,f,d,c,h,p,u,m,v,x))})},26015:(S,P,a)=>{var C,g;a(29747),C=a(46161),g=a(49912),S.exports={renderWebGL:C,renderCanvas:g}},46161:(S,P,a)=>{var y=a(91296),C=a(70554);S.exports=function(f,d,c,h){c.addToRenderList(d);var p=f.pipelines.set(d.pipeline),u=y(d,c,h);p.calcMatrix.copyFrom(u.calc).translate(-d._displayOriginX,-d._displayOriginY);var V,B,v=c.alpha*d.alpha,x=d.width,b=d.height,T=d.cellWidth,_=d.cellHeight,A=Math.ceil(x/T),M=Math.ceil(b/_),I=T,R=_,F=T-(A*T-x),N=_-(M*_-b),G=d.showCells,Q=d.showAltCells,H=d.showOutline,K=0,tt=0,at=0;if(H&&(I--,R--,F===T&&F--,N===_&&N--),f.pipelines.preBatch(d),G&&d.fillAlpha>0)for(V=p.fillTint,B=C.getTintAppendFloatAlpha(d.fillColor,d.fillAlpha*v),V.TL=B,V.TR=B,V.BL=B,V.BR=B,tt=0;tt0)for(V=p.fillTint,B=C.getTintAppendFloatAlpha(d.altFillColor,d.altFillAlpha*v),V.TL=B,V.TR=B,V.BL=B,V.BR=B,tt=0;tt0){var it=p.strokeTint,Y=C.getTintAppendFloatAlpha(d.outlineFillColor,d.outlineFillAlpha*v);for(it.TL=Y,it.TR=Y,it.BL=Y,it.BR=Y,K=1;K{var y=a(99651),C=a(83419),g=a(17803),f=new C({Extends:g,Mixins:[y],initialize:function(c,h,p,u,m,v,x,b){void 0===h&&(h=0),void 0===p&&(p=0),void 0===u&&(u=48),void 0===m&&(m=32),void 0===v&&(v=15658734),void 0===x&&(x=10066329),void 0===b&&(b=13421772),g.call(this,c,"IsoBox",null),this.projection=4,this.fillTop=v,this.fillLeft=x,this.fillRight=b,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(h,p),this.setSize(u,m),this.updateDisplayOrigin()},setProjection:function(d){return this.projection=d,this},setFaces:function(d,c,h){return void 0===d&&(d=!0),void 0===c&&(c=!0),void 0===h&&(h=!0),this.showTop=d,this.showLeft=c,this.showRight=h,this},setFillStyle:function(d,c,h){return this.fillTop=d,this.fillLeft=c,this.fillRight=h,this.isFilled=!0,this}});S.exports=f},11508:(S,P,a)=>{var y=a(65960),C=a(20926);S.exports=function(f,d,c,h){c.addToRenderList(d);var p=f.currentContext;if(C(f,p,d,c,h)&&d.isFilled){var u=d.width,m=d.height,v=u/2,x=u/d.projection;d.showTop&&(y(p,d,d.fillTop),p.beginPath(),p.moveTo(-v,-m),p.lineTo(0,-x-m),p.lineTo(v,-m),p.lineTo(v,-1),p.lineTo(0,x-1),p.lineTo(-v,-1),p.lineTo(-v,-m),p.fill()),d.showLeft&&(y(p,d,d.fillLeft),p.beginPath(),p.moveTo(-v,0),p.lineTo(0,x),p.lineTo(0,x-m),p.lineTo(-v,-m),p.lineTo(-v,0),p.fill()),d.showRight&&(y(p,d,d.fillRight),p.beginPath(),p.moveTo(v,0),p.lineTo(0,x),p.lineTo(0,x-m),p.lineTo(v,-m),p.lineTo(v,0),p.fill()),p.restore()}}},3933:(S,P,a)=>{var y=a(39429),C=a(61475);y.register("isobox",function(g,f,d,c,h,p,u){return this.displayList.add(new C(this.scene,g,f,d,c,h,p,u))})},99651:(S,P,a)=>{var C,g;a(29747),C=a(68149),g=a(11508),S.exports={renderWebGL:C,renderCanvas:g}},68149:(S,P,a)=>{var y=a(91296),C=a(70554);S.exports=function(f,d,c,h){c.addToRenderList(d);var A,M,I,R,F,N,V,B,G,p=f.pipelines.set(d.pipeline),u=y(d,c,h),m=p.calcMatrix.copyFrom(u.calc),v=d.width,x=d.height,b=v/2,T=v/d.projection,_=c.alpha*d.alpha;d.isFilled&&(f.pipelines.preBatch(d),d.showTop&&(A=C.getTintAppendFloatAlpha(d.fillTop,_),M=m.getX(-b,-x),I=m.getY(-b,-x),R=m.getX(0,-T-x),F=m.getY(0,-T-x),N=m.getX(b,-x),V=m.getY(b,-x),B=m.getX(0,T-x),G=m.getY(0,T-x),p.batchQuad(d,M,I,R,F,N,V,B,G,0,0,1,1,A,A,A,A,2)),d.showLeft&&(A=C.getTintAppendFloatAlpha(d.fillLeft,_),M=m.getX(-b,0),I=m.getY(-b,0),R=m.getX(0,T),F=m.getY(0,T),N=m.getX(0,T-x),V=m.getY(0,T-x),B=m.getX(-b,-x),G=m.getY(-b,-x),p.batchQuad(d,M,I,R,F,N,V,B,G,0,0,1,1,A,A,A,A,2)),d.showRight&&(A=C.getTintAppendFloatAlpha(d.fillRight,_),M=m.getX(b,0),I=m.getY(b,0),R=m.getX(0,T),F=m.getY(0,T),N=m.getX(0,T-x),V=m.getY(0,T-x),B=m.getX(b,-x),G=m.getY(b,-x),p.batchQuad(d,M,I,R,F,N,V,B,G,0,0,1,1,A,A,A,A,2)),f.pipelines.postBatch(d))}},16933:(S,P,a)=>{var y=a(83419),C=a(60561),g=a(17803),f=new y({Extends:g,Mixins:[C],initialize:function(c,h,p,u,m,v,x,b,T){void 0===h&&(h=0),void 0===p&&(p=0),void 0===u&&(u=48),void 0===m&&(m=32),void 0===v&&(v=!1),void 0===x&&(x=15658734),void 0===b&&(b=10066329),void 0===T&&(T=13421772),g.call(this,c,"IsoTriangle",null),this.projection=4,this.fillTop=x,this.fillLeft=b,this.fillRight=T,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=v,this.isFilled=!0,this.setPosition(h,p),this.setSize(u,m),this.updateDisplayOrigin()},setProjection:function(d){return this.projection=d,this},setReversed:function(d){return this.isReversed=d,this},setFaces:function(d,c,h){return void 0===d&&(d=!0),void 0===c&&(c=!0),void 0===h&&(h=!0),this.showTop=d,this.showLeft=c,this.showRight=h,this},setFillStyle:function(d,c,h){return this.fillTop=d,this.fillLeft=c,this.fillRight=h,this.isFilled=!0,this}});S.exports=f},79590:(S,P,a)=>{var y=a(65960),C=a(20926);S.exports=function(f,d,c,h){c.addToRenderList(d);var p=f.currentContext;if(C(f,p,d,c,h)&&d.isFilled){var u=d.width,m=d.height,v=u/2,x=u/d.projection,b=d.isReversed;d.showTop&&b&&(y(p,d,d.fillTop),p.beginPath(),p.moveTo(-v,-m),p.lineTo(0,-x-m),p.lineTo(v,-m),p.lineTo(0,x-m),p.fill()),d.showLeft&&(y(p,d,d.fillLeft),p.beginPath(),b?(p.moveTo(-v,-m),p.lineTo(0,x),p.lineTo(0,x-m)):(p.moveTo(-v,0),p.lineTo(0,x),p.lineTo(0,x-m)),p.fill()),d.showRight&&(y(p,d,d.fillRight),p.beginPath(),b?(p.moveTo(v,-m),p.lineTo(0,x),p.lineTo(0,x-m)):(p.moveTo(v,0),p.lineTo(0,x),p.lineTo(0,x-m)),p.fill()),p.restore()}}},49803:(S,P,a)=>{var y=a(39429),C=a(16933);y.register("isotriangle",function(g,f,d,c,h,p,u,m){return this.displayList.add(new C(this.scene,g,f,d,c,h,p,u,m))})},60561:(S,P,a)=>{var C,g;a(29747),C=a(51503),g=a(79590),S.exports={renderWebGL:C,renderCanvas:g}},51503:(S,P,a)=>{var y=a(91296),C=a(70554);S.exports=function(f,d,c,h){c.addToRenderList(d);var p=f.pipelines.set(d.pipeline),u=y(d,c,h),m=p.calcMatrix.copyFrom(u.calc),v=d.width,x=d.height,b=v/2,T=v/d.projection,_=d.isReversed,A=c.alpha*d.alpha;if(d.isFilled){var M,I,R,F,N,V,B;if(f.pipelines.preBatch(d),d.showTop&&_){M=C.getTintAppendFloatAlpha(d.fillTop,A),I=m.getX(-b,-x),R=m.getY(-b,-x),F=m.getX(0,-T-x),N=m.getY(0,-T-x),V=m.getX(b,-x),B=m.getY(b,-x);var G=m.getX(0,T-x),Q=m.getY(0,T-x);p.batchQuad(d,I,R,F,N,V,B,G,Q,0,0,1,1,M,M,M,M,2)}d.showLeft&&(M=C.getTintAppendFloatAlpha(d.fillLeft,A),_?(I=m.getX(-b,-x),R=m.getY(-b,-x),F=m.getX(0,T),N=m.getY(0,T),V=m.getX(0,T-x),B=m.getY(0,T-x)):(I=m.getX(-b,0),R=m.getY(-b,0),F=m.getX(0,T),N=m.getY(0,T),V=m.getX(0,T-x),B=m.getY(0,T-x)),p.batchTri(d,I,R,F,N,V,B,0,0,1,1,M,M,M,2)),d.showRight&&(M=C.getTintAppendFloatAlpha(d.fillRight,A),_?(I=m.getX(b,-x),R=m.getY(b,-x),F=m.getX(0,T),N=m.getY(0,T),V=m.getX(0,T-x),B=m.getY(0,T-x)):(I=m.getX(b,0),R=m.getY(b,0),F=m.getX(0,T),N=m.getY(0,T),V=m.getX(0,T-x),B=m.getY(0,T-x)),p.batchTri(d,I,R,F,N,V,B,0,0,1,1,M,M,M,2)),f.pipelines.postBatch(d)}}},57847:(S,P,a)=>{var y=a(83419),C=a(17803),g=a(23031),f=a(36823),d=new y({Extends:C,Mixins:[f],initialize:function(h,p,u,m,v,x,b,T,_){void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=0),void 0===x&&(x=128),void 0===b&&(b=0),C.call(this,h,"Line",new g(m,v,x,b));var A=Math.max(1,this.geom.right-this.geom.left),M=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(p,u),this.setSize(A,M),void 0!==T&&this.setStrokeStyle(1,T,_),this.updateDisplayOrigin()},setLineWidth:function(c,h){return void 0===h&&(h=c),this._startWidth=c,this._endWidth=h,this.lineWidth=c,this},setTo:function(c,h,p,u){return this.geom.setTo(c,h,p,u),this}});S.exports=d},17440:(S,P,a)=>{var y=a(75177),C=a(20926);S.exports=function(f,d,c,h){c.addToRenderList(d);var p=f.currentContext;if(C(f,p,d,c,h)){var u=d._displayOriginX,m=d._displayOriginY;d.isStroked&&(y(p,d),p.beginPath(),p.moveTo(d.geom.x1-u,d.geom.y1-m),p.lineTo(d.geom.x2-u,d.geom.y2-m),p.stroke()),p.restore()}}},2481:(S,P,a)=>{var y=a(39429),C=a(57847);y.register("line",function(g,f,d,c,h,p,u,m){return this.displayList.add(new C(this.scene,g,f,d,c,h,p,u,m))})},36823:(S,P,a)=>{var C,g;a(29747),C=a(77385),g=a(17440),S.exports={renderWebGL:C,renderCanvas:g}},77385:(S,P,a)=>{var y=a(91296),C=a(70554);S.exports=function(f,d,c,h){c.addToRenderList(d);var p=f.pipelines.set(d.pipeline),u=y(d,c,h);p.calcMatrix.copyFrom(u.calc);var m=d._displayOriginX,v=d._displayOriginY,x=c.alpha*d.alpha;if(f.pipelines.preBatch(d),d.isStroked){var b=p.strokeTint,T=C.getTintAppendFloatAlpha(d.strokeColor,d.strokeAlpha*x);b.TL=T,b.TR=T,b.BL=T,b.BR=T,p.batchLine(d.geom.x1-m,d.geom.y1-v,d.geom.x2-m,d.geom.y2-v,d._startWidth/2,d._endWidth/2,1,0,!1,u.sprite,u.camera)}f.pipelines.postBatch(d)}},24949:(S,P,a)=>{var y=a(90273),C=a(83419),g=a(94811),f=a(13829),d=a(25717),c=a(17803),h=a(5469),p=new C({Extends:c,Mixins:[y],initialize:function(m,v,x,b,T,_){void 0===v&&(v=0),void 0===x&&(x=0),c.call(this,m,"Polygon",new d(b));var A=f(this.geom);this.setPosition(v,x),this.setSize(A.width,A.height),void 0!==T&&this.setFillStyle(T,_),this.updateDisplayOrigin(),this.updateData()},smooth:function(u){void 0===u&&(u=1);for(var m=0;m{var y=a(65960),C=a(75177),g=a(20926);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.currentContext;if(g(d,u,c,h,p)){var m=c._displayOriginX,v=c._displayOriginY,x=c.pathData,b=x.length-1,T=x[0]-m,_=x[1]-v;u.beginPath(),u.moveTo(T,_),c.closePath||(b-=2);for(var A=2;A{var y=a(39429),C=a(24949);y.register("polygon",function(g,f,d,c,h){return this.displayList.add(new C(this.scene,g,f,d,c,h))})},90273:(S,P,a)=>{var C,g;a(29747),C=a(73695),g=a(38710),S.exports={renderWebGL:C,renderCanvas:g}},73695:(S,P,a)=>{var y=a(10441),C=a(91296),g=a(34682);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.pipelines.set(c.pipeline),m=C(c,h,p),v=u.calcMatrix.copyFrom(m.calc),x=c._displayOriginX,b=c._displayOriginY,T=h.alpha*c.alpha;d.pipelines.preBatch(c),c.isFilled&&y(u,v,c,T,x,b),c.isStroked&&g(u,c,T,x,b),d.pipelines.postBatch(c)}},74561:(S,P,a)=>{var y=a(83419),C=a(87841),g=a(17803),f=a(95597),d=new y({Extends:g,Mixins:[f],initialize:function(h,p,u,m,v,x,b){void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=128),void 0===v&&(v=128),g.call(this,h,"Rectangle",new C(0,0,m,v)),this.setPosition(p,u),this.setSize(m,v),void 0!==x&&this.setFillStyle(x,b),this.updateDisplayOrigin(),this.updateData()},setSize:function(c,h){this.width=c,this.height=h,this.geom.setSize(c,h),this.updateData(),this.updateDisplayOrigin();var p=this.input;return p&&!p.customHitArea&&(p.hitArea.width=c,p.hitArea.height=h),this},updateData:function(){var c=[],h=this.geom,p=this._tempLine;return h.getLineA(p),c.push(p.x1,p.y1,p.x2,p.y2),h.getLineB(p),c.push(p.x2,p.y2),h.getLineC(p),c.push(p.x2,p.y2),h.getLineD(p),c.push(p.x2,p.y2),this.pathData=c,this}});S.exports=d},48682:(S,P,a)=>{var y=a(65960),C=a(75177),g=a(20926);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.currentContext;if(g(d,u,c,h,p)){var m=c._displayOriginX,v=c._displayOriginY;c.isFilled&&(y(u,c),u.fillRect(-m,-v,c.width,c.height)),c.isStroked&&(C(u,c),u.beginPath(),u.rect(-m,-v,c.width,c.height),u.stroke()),u.restore()}}},87959:(S,P,a)=>{var y=a(39429),C=a(74561);y.register("rectangle",function(g,f,d,c,h,p){return this.displayList.add(new C(this.scene,g,f,d,c,h,p))})},95597:(S,P,a)=>{var C,g;a(29747),C=a(52059),g=a(48682),S.exports={renderWebGL:C,renderCanvas:g}},52059:(S,P,a)=>{var y=a(91296),C=a(34682),g=a(70554);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.pipelines.set(c.pipeline),m=y(c,h,p);u.calcMatrix.copyFrom(m.calc);var v=c._displayOriginX,x=c._displayOriginY,b=h.alpha*c.alpha;if(d.pipelines.preBatch(c),c.isFilled){var T=u.fillTint,_=g.getTintAppendFloatAlpha(c.fillColor,c.fillAlpha*b);T.TL=_,T.TR=_,T.BL=_,T.BR=_,u.batchFillRect(-v,-x,c.width,c.height)}c.isStroked&&C(u,c,b,v,x),d.pipelines.postBatch(c)}},55911:(S,P,a)=>{var y=a(81991),C=a(83419),g=a(94811),f=a(17803),d=new C({Extends:f,Mixins:[y],initialize:function(h,p,u,m,v,x,b,T){void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=5),void 0===v&&(v=32),void 0===x&&(x=64),f.call(this,h,"Star",null),this._points=m,this._innerRadius=v,this._outerRadius=x,this.setPosition(p,u),this.setSize(2*x,2*x),void 0!==b&&this.setFillStyle(b,T),this.updateDisplayOrigin(),this.updateData()},setPoints:function(c){return this._points=c,this.updateData()},setInnerRadius:function(c){return this._innerRadius=c,this.updateData()},setOuterRadius:function(c){return this._outerRadius=c,this.updateData()},points:{get:function(){return this._points},set:function(c){this._points=c,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(c){this._innerRadius=c,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(c){this._outerRadius=c,this.updateData()}},updateData:function(){var c=[],h=this._points,p=this._innerRadius,u=this._outerRadius,m=Math.PI/2*3,v=Math.PI/h,x=u,b=u;c.push(x,b+-u);for(var T=0;T{var y=a(65960),C=a(75177),g=a(20926);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.currentContext;if(g(d,u,c,h,p)){var m=c._displayOriginX,v=c._displayOriginY,x=c.pathData,b=x.length-1,T=x[0]-m,_=x[1]-v;u.beginPath(),u.moveTo(T,_),c.closePath||(b-=2);for(var A=2;A{var y=a(55911);a(39429).register("star",function(g,f,d,c,h,p,u){return this.displayList.add(new y(this.scene,g,f,d,c,h,p,u))})},81991:(S,P,a)=>{var C,g;a(29747),C=a(57017),g=a(64272),S.exports={renderWebGL:C,renderCanvas:g}},57017:(S,P,a)=>{var y=a(10441),C=a(91296),g=a(34682);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.pipelines.set(c.pipeline),m=C(c,h,p),v=u.calcMatrix.copyFrom(m.calc),x=c._displayOriginX,b=c._displayOriginY,T=h.alpha*c.alpha;d.pipelines.preBatch(c),c.isFilled&&y(u,v,c,T,x,b),c.isStroked&&g(u,c,T,x,b),d.pipelines.postBatch(c)}},36931:(S,P,a)=>{var y=a(83419),C=a(17803),g=a(16483),f=a(96195),d=new y({Extends:C,Mixins:[f],initialize:function(h,p,u,m,v,x,b,T,_,A,M){void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=128),void 0===x&&(x=64),void 0===b&&(b=0),void 0===T&&(T=128),void 0===_&&(_=128),C.call(this,h,"Triangle",new g(m,v,x,b,T,_));var I=this.geom.right-this.geom.left,R=this.geom.bottom-this.geom.top;this.setPosition(p,u),this.setSize(I,R),void 0!==A&&this.setFillStyle(A,M),this.updateDisplayOrigin(),this.updateData()},setTo:function(c,h,p,u,m,v){return this.geom.setTo(c,h,p,u,m,v),this.updateData()},updateData:function(){var c=[],h=this.geom,p=this._tempLine;return h.getLineA(p),c.push(p.x1,p.y1,p.x2,p.y2),h.getLineB(p),c.push(p.x2,p.y2),h.getLineC(p),c.push(p.x2,p.y2),this.pathData=c,this}});S.exports=d},85172:(S,P,a)=>{var y=a(65960),C=a(75177),g=a(20926);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.currentContext;if(g(d,u,c,h,p)){var m=c._displayOriginX,v=c._displayOriginY,x=c.geom.x1-m,b=c.geom.y1-v,T=c.geom.x2-m,_=c.geom.y2-v,A=c.geom.x3-m,M=c.geom.y3-v;u.beginPath(),u.moveTo(x,b),u.lineTo(T,_),u.lineTo(A,M),u.closePath(),c.isFilled&&(y(u,c),u.fill()),c.isStroked&&(C(u,c),u.stroke()),u.restore()}}},45245:(S,P,a)=>{var y=a(39429),C=a(36931);y.register("triangle",function(g,f,d,c,h,p,u,m,v,x){return this.displayList.add(new C(this.scene,g,f,d,c,h,p,u,m,v,x))})},96195:(S,P,a)=>{var C,g;a(29747),C=a(83253),g=a(85172),S.exports={renderWebGL:C,renderCanvas:g}},83253:(S,P,a)=>{var y=a(91296),C=a(34682),g=a(70554);S.exports=function(d,c,h,p){h.addToRenderList(c);var u=d.pipelines.set(c.pipeline),m=y(c,h,p);u.calcMatrix.copyFrom(m.calc);var v=c._displayOriginX,x=c._displayOriginY,b=h.alpha*c.alpha;if(d.pipelines.preBatch(c),c.isFilled){var T=u.fillTint,_=g.getTintAppendFloatAlpha(c.fillColor,c.fillAlpha*b);T.TL=_,T.TR=_,T.BL=_,T.BR=_,u.batchFillTriangle(c.geom.x1-v,c.geom.y1-x,c.geom.x2-v,c.geom.y2-x,c.geom.x3-v,c.geom.y3-x,m.sprite,m.camera)}c.isStroked&&C(u,c,b,v,x),d.pipelines.postBatch(c)}},68287:(S,P,a)=>{var y=a(9674),C=a(83419),g=a(31401),f=a(95643),d=a(92751),c=new C({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Size,g.TextureCrop,g.Tint,g.Transform,g.Visible,d],initialize:function(p,u,m,v,x){f.call(this,p,"Sprite"),this._crop=this.resetCropObject(),this.anims=new y(this),this.setTexture(v,x),this.setPosition(u,m),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(h,p){this.anims.update(h,p)},play:function(h,p){return this.anims.play(h,p)},playReverse:function(h,p){return this.anims.playReverse(h,p)},playAfterDelay:function(h,p){return this.anims.playAfterDelay(h,p)},playAfterRepeat:function(h,p){return this.anims.playAfterRepeat(h,p)},chain:function(h){return this.anims.chain(h)},stop:function(){return this.anims.stop()},stopAfterDelay:function(h){return this.anims.stopAfterDelay(h)},stopAfterRepeat:function(h){return this.anims.stopAfterRepeat(h)},stopOnFrame:function(h){return this.anims.stopOnFrame(h)},toJSON:function(){return g.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});S.exports=c},76552:S=>{S.exports=function(a,y,C,g){C.addToRenderList(y),a.batchSprite(y,y.frame,C,g)}},15567:(S,P,a)=>{var y=a(25305),C=a(13059),g=a(44603),f=a(23568),d=a(68287);g.register("sprite",function(c,h){void 0===c&&(c={});var p=f(c,"key",null),u=f(c,"frame",null),m=new d(this.scene,0,0,p,u);return void 0!==h&&(c.add=h),y(this.scene,m,c),C(m,c),m})},46409:(S,P,a)=>{var y=a(39429),C=a(68287);y.register("sprite",function(g,f,d,c){return this.displayList.add(new C(this.scene,g,f,d,c))})},92751:(S,P,a)=>{var C,g;a(29747),C=a(9409),g=a(76552),S.exports={renderWebGL:C,renderCanvas:g}},9409:S=>{S.exports=function(a,y,C,g){C.addToRenderList(y),y.pipeline.batchSprite(y,C,g)}},14220:S=>{S.exports=function(a,y,C){var f=a.context,d=a.style,c=[],h=0,p=C.length;d.maxLines>0&&d.maxLines1&&(v+=u*(x.length-1))}d.wordWrap&&(v-=f.measureText(" ").width),c[m]=Math.ceil(v),h=Math.max(h,c[m])}var T=y.fontSize+d.strokeThickness,_=T*p,A=a.lineSpacing;return p>1&&(_+=A*(p-1)),{width:h,height:_,lines:p,lineWidths:c,lineSpacing:A,lineHeight:T}}},79557:(S,P,a)=>{var y=a(27919);S.exports=function(g){var f=y.create(this),d=f.getContext("2d",{willReadFrequently:!0});g.syncFont(f,d);var c=d.measureText(g.testString);if("actualBoundingBoxAscent"in c){var h=c.actualBoundingBoxAscent,p=c.actualBoundingBoxDescent;return y.remove(f),{ascent:h,descent:p,fontSize:h+p}}var u=Math.ceil(c.width*g.baselineX),m=u,v=2*m;m=m*g.baselineY|0,f.width=u,f.height=v,d.fillStyle="#f00",d.fillRect(0,0,u,v),d.font=g._font,d.textBaseline="alphabetic",d.fillStyle="#000",d.fillText(g.testString,0,m);var x={ascent:0,descent:0,fontSize:0},b=d.getImageData(0,0,u,v);if(!b)return x.ascent=m,x.descent=m+6,x.fontSize=x.ascent+x.descent,y.remove(f),x;var M,I,T=b.data,_=T.length,A=4*u,R=0,F=!1;for(M=0;Mm;M--){for(I=0;I{var y=a(40366),C=a(27919),g=a(83419),f=a(31401),d=a(95643),c=a(14220),h=a(35154),p=a(35846),u=a(61771),m=a(35762),v=a(45650),x=new g({Extends:d,Mixins:[f.Alpha,f.BlendMode,f.ComputedSize,f.Crop,f.Depth,f.Flip,f.GetBounds,f.Mask,f.Origin,f.Pipeline,f.PostPipeline,f.ScrollFactor,f.Tint,f.Transform,f.Visible,u],initialize:function(T,_,A,M,I){void 0===_&&(_=0),void 0===A&&(A=0),d.call(this,T,"Text"),this.renderer=T.sys.renderer,this.setPosition(_,A),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=C.create(this),this.style=new m(this,I),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=v(),this.texture=T.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(M),I&&I.padding&&this.setPadding(I.padding),I&&I.lineSpacing&&this.setLineSpacing(I.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",y(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(b){var T=this.style;if(T.wordWrapCallback){var _=T.wordWrapCallback.call(T.wordWrapCallbackScope,b,this);return Array.isArray(_)&&(_=_.join("\n")),_}return T.wordWrapWidth?T.wordWrapUseAdvanced?this.advancedWordWrap(b,this.context,this.style.wordWrapWidth):this.basicWordWrap(b,this.context,this.style.wordWrapWidth):b},advancedWordWrap:function(b,T,_){for(var A="",M=b.replace(/ +/gi," ").split(this.splitRegExp),I=M.length,R=0;RB){if(0===Q){for(var at=K;at.length&&(at=at.slice(0,-1),!((tt=T.measureText(at).width)<=B)););if(!at.length)throw new Error("wordWrapWidth < a single character");var lt=H.substr(at.length);G[Q]=lt,N+=at}var it=G.slice(G[Q].length?Q:Q+1).join(" ").replace(/[ \n]*$/gi,"");M.splice(R+1,0,it),I=M.length;break}N+=K,B-=tt}A+=N.replace(/[ \n]*$/gi,"")+"\n"}}return A.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(b,T,_){for(var A="",M=b.split(this.splitRegExp),I=M.length-1,R=T.measureText(" ").width,F=0;F<=I;F++){for(var N=_,V=M[F].split(" "),B=V.length-1,G=0;G<=B;G++){var Q=V[G],H=T.measureText(Q).width,K=H;GN&&G>0&&(A+="\n",N=_),A+=Q,G0&&(H+=F.lineSpacing*K),_.rtl)Q=B-Q-N.left-N.right;else if("right"===_.align)Q+=V-F.lineWidths[K];else if("center"===_.align)Q+=(V-F.lineWidths[K])/2;else if("justify"===_.align&&F.lineWidths[K]/F.width>=.85){for(var at=F.width-F.lineWidths[K],lt=T.measureText(" ").width,q=R[K].trim(),it=q.split(" "),Y=Math.floor((at+=(R[K].length-q.length)*lt)/lt),X=0;Y>0;)it[X]+=" ",X=(X+1)%(it.length-1||1),--Y;R[K]=it.join(" ")}this.autoRound&&(Q=Math.round(Q),H=Math.round(H));var nt=this.letterSpacing;if(_.strokeThickness&&0===nt&&(_.syncShadow(T,_.shadowStroke),T.strokeText(R[K],Q,H)),_.color)if(_.syncShadow(T,_.shadowFill),0!==nt)for(var dt=0,gt=R[K].split(""),bt=0;bt{S.exports=function(a,y,C,g){0===y.width||0===y.height||(C.addToRenderList(y),a.batchSprite(y,y.frame,C,g))}},71259:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(50171);C.register("text",function(d,c){void 0===d&&(d={});var h=g(d,"text",""),p=g(d,"style",null),u=g(d,"padding",null);null!==u&&(p.padding=u);var m=new f(this.scene,0,0,h,p);return void 0!==c&&(d.add=c),y(this.scene,m,d),m.autoRound=g(d,"autoRound",!0),m.resolution=g(d,"resolution",1),m})},68005:(S,P,a)=>{var y=a(50171);a(39429).register("text",function(g,f,d,c){return this.displayList.add(new y(this.scene,g,f,d,c))})},61771:(S,P,a)=>{var C,g;a(29747),C=a(34397),g=a(79724),S.exports={renderWebGL:C,renderCanvas:g}},35762:(S,P,a)=>{var y=a(83419),C=a(23568),g=a(35154),f=a(79557),d={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|M\xc3\u2030qgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},c=new y({initialize:function(p,u){this.parent=p,this.setStyle(u,!1,!0)},setStyle:function(h,p,u){for(var m in void 0===p&&(p=!0),void 0===u&&(u=!1),d){var v=u?d[m][1]:this[m];this[m]="wordWrapCallback"===m||"wordWrapCallbackScope"===m?g(h,d[m][0],v):h&&"fontSize"===m&&"number"==typeof h.fontSize?h.fontSize.toString()+"px":C(h,d[m][0],v)}var x=g(h,"font",null);null!==x&&this.setFont(x,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var b=g(h,"fill",null);null!==b&&(this.color=b);var T=g(h,"metrics",!1);return T?this.metrics={ascent:g(T,"ascent",0),descent:g(T,"descent",0),fontSize:g(T,"fontSize",0)}:(p||!this.metrics)&&(this.metrics=f(this)),p?this.parent.updateText():this.parent},syncFont:function(h,p){p.font=this._font},syncStyle:function(h,p){p.textBaseline="alphabetic",p.fillStyle=this.color,p.strokeStyle=this.stroke,p.lineWidth=this.strokeThickness,p.lineCap="round",p.lineJoin="round"},syncShadow:function(h,p){p?(h.shadowOffsetX=this.shadowOffsetX,h.shadowOffsetY=this.shadowOffsetY,h.shadowColor=this.shadowColor,h.shadowBlur=this.shadowBlur):(h.shadowOffsetX=0,h.shadowOffsetY=0,h.shadowColor=0,h.shadowBlur=0)},update:function(h){return h&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=f(this)),this.parent.updateText()},setFont:function(h,p){void 0===p&&(p=!0);var u=h,m="",v="";if("string"!=typeof h)u=g(h,"fontFamily","Courier"),m=g(h,"fontSize","16px"),v=g(h,"fontStyle","");else{var x=h.split(" "),b=0;v=x.length>2?x[b++]:"",m=x[b++]||"16px",u=x[b++]||"Courier"}return(u!==this.fontFamily||m!==this.fontSize||v!==this.fontStyle)&&(this.fontFamily=u,this.fontSize=m,this.fontStyle=v,p&&this.update(!0)),this.parent},setFontFamily:function(h){return this.fontFamily!==h&&(this.fontFamily=h,this.update(!0)),this.parent},setFontStyle:function(h){return this.fontStyle!==h&&(this.fontStyle=h,this.update(!0)),this.parent},setFontSize:function(h){return"number"==typeof h&&(h=h.toString()+"px"),this.fontSize!==h&&(this.fontSize=h,this.update(!0)),this.parent},setTestString:function(h){return this.testString=h,this.update(!0)},setFixedSize:function(h,p){return this.fixedWidth=h,this.fixedHeight=p,h&&(this.parent.width=h),p&&(this.parent.height=p),this.update(!1)},setBackgroundColor:function(h){return this.backgroundColor=h,this.update(!1)},setFill:function(h){return this.color=h,this.update(!1)},setColor:function(h){return this.color=h,this.update(!1)},setResolution:function(h){return this.resolution=h,this.update(!1)},setStroke:function(h,p){return void 0===p&&(p=this.strokeThickness),void 0===h&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):(this.stroke!==h||this.strokeThickness!==p)&&(this.stroke=h,this.strokeThickness=p,this.update(!0)),this.parent},setShadow:function(h,p,u,m,v,x){return void 0===h&&(h=0),void 0===p&&(p=0),void 0===u&&(u="#000"),void 0===m&&(m=0),void 0===v&&(v=!1),void 0===x&&(x=!0),this.shadowOffsetX=h,this.shadowOffsetY=p,this.shadowColor=u,this.shadowBlur=m,this.shadowStroke=v,this.shadowFill=x,this.update(!1)},setShadowOffset:function(h,p){return void 0===h&&(h=0),void 0===p&&(p=h),this.shadowOffsetX=h,this.shadowOffsetY=p,this.update(!1)},setShadowColor:function(h){return void 0===h&&(h="#000"),this.shadowColor=h,this.update(!1)},setShadowBlur:function(h){return void 0===h&&(h=0),this.shadowBlur=h,this.update(!1)},setShadowStroke:function(h){return this.shadowStroke=h,this.update(!1)},setShadowFill:function(h){return this.shadowFill=h,this.update(!1)},setWordWrapWidth:function(h,p){return void 0===p&&(p=!1),this.wordWrapWidth=h,this.wordWrapUseAdvanced=p,this.update(!1)},setWordWrapCallback:function(h,p){return void 0===p&&(p=null),this.wordWrapCallback=h,this.wordWrapCallbackScope=p,this.update(!1)},setAlign:function(h){return void 0===h&&(h="left"),this.align=h,this.update(!1)},setMaxLines:function(h){return void 0===h&&(h=0),this.maxLines=h,this.update(!1)},getTextMetrics:function(){var h=this.metrics;return{ascent:h.ascent,descent:h.descent,fontSize:h.fontSize}},toJSON:function(){var h={};for(var p in d)h[p]=this[p];return h.metrics=this.getTextMetrics(),h},destroy:function(){this.parent=void 0}});S.exports=c},34397:(S,P,a)=>{var y=a(70554);S.exports=function(g,f,d,c){if(0!==f.width&&0!==f.height){d.addToRenderList(f);var h=f.frame,p=h.width,u=h.height,m=y.getTintAppendFloatAlpha,v=g.pipelines.set(f.pipeline,f),x=v.setTexture2D(h.glTexture,f);v.batchTexture(f,h.glTexture,p,u,f.x,f.y,p/f.style.resolution,u/f.style.resolution,f.scaleX,f.scaleY,f.rotation,f.flipX,f.flipY,f.scrollFactorX,f.scrollFactorY,f.displayOriginX,f.displayOriginY,0,0,p,u,m(f.tintTopLeft,d.alpha*f._alphaTL),m(f.tintTopRight,d.alpha*f._alphaTR),m(f.tintBottomLeft,d.alpha*f._alphaBL),m(f.tintBottomRight,d.alpha*f._alphaBR),f.tintFill,0,0,d,c,!1,x)}}},20839:(S,P,a)=>{var y=a(27919),C=a(83419),g=a(31401),f=a(95643),d=a(98439),c=a(68703),h=a(56295),p=a(45650),u=a(26099),v=new C({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.ComputedSize,g.Crop,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Tint,g.Transform,g.Visible,h],initialize:function(b,T,_,A,M,I,R){var F=b.sys.renderer;f.call(this,b,"TileSprite");var N=b.sys.textures.get(I),V=N.get(R);V.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),V=(N=b.sys.textures.get("__MISSING")).get()),"DynamicTexture"===N.type&&(console.warn("TileSprite cannot use Dynamic Texture"),V=(N=b.sys.textures.get("__MISSING")).get()),A&&M?(A=Math.floor(A),M=Math.floor(M)):(A=A||V.width,M=M||V.height),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=F,this.canvas=y.create(this,A,M),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=N,this.displayFrame=V,this._crop=this.resetCropObject(),this._textureKey=p(),this.texture=b.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=d(V.width),this.potHeight=d(V.height),this.fillCanvas=y.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(T,_),this.setSize(A,M),this.setFrame(R),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(x,b){return this.displayTexture=this.scene.sys.textures.get(x),this.setFrame(b)},setFrame:function(x){var b=this.displayTexture.get(x);return this.potWidth=d(b.width),this.potHeight=d(b.height),this.canvas.width=0,b.cutWidth&&b.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=b,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(x,b){return void 0!==x&&(this.tilePositionX=x),void 0!==b&&(this.tilePositionY=b),this},setTileScale:function(x,b){return void 0===x&&(x=this.tileScaleX),void 0===b&&(b=x),this.tileScaleX=x,this.tileScaleY=b,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var x=this.displayFrame;if(x.source.isRenderTexture||x.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var b=this.fillContext,T=this.fillCanvas,_=this.potWidth,A=this.potHeight;(!this.renderer||!this.renderer.gl)&&(_=x.cutWidth,A=x.cutHeight),b.clearRect(0,0,_,A),T.width=_,T.height=A,b.drawImage(x.source.image,x.cutX,x.cutY,x.cutWidth,x.cutHeight,0,0,_,A),this.fillPattern=this.renderer&&this.renderer.gl?this.renderer.canvasToTexture(T,this.fillPattern):b.createPattern(T,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var x=this.canvas;if((x.width!==this.width||x.height!==this.height)&&(x.width=this.width,x.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var b=this.context;this.scene.sys.game.config.antialias||c.disable(b);var T=this._tileScale.x,_=this._tileScale.y,A=this._tilePosition.x,M=this._tilePosition.y;b.clearRect(0,0,this.width,this.height),b.save(),b.scale(T,_),b.translate(-A,-M),b.fillStyle=this.fillPattern,b.fillRect(A,M,this.width/T,this.height/_),b.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),y.remove(this.canvas),y.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var x=this.texture;x&&x.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(x){this._tilePosition.x=x,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(x){this._tilePosition.y=x,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(x){this._tileScale.x=x,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(x){this._tileScale.y=x,this.dirty=!0}}});S.exports=v},46992:S=>{S.exports=function(a,y,C,g){y.updateCanvas(),C.addToRenderList(y),a.batchSprite(y,y.frame,C,g)}},14167:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(20839);C.register("tileSprite",function(d,c){void 0===d&&(d={});var h=g(d,"x",0),p=g(d,"y",0),u=g(d,"width",512),m=g(d,"height",512),v=g(d,"key",""),x=g(d,"frame",""),b=new f(this.scene,h,p,u,m,v,x);return void 0!==c&&(d.add=c),y(this.scene,b,d),b})},91681:(S,P,a)=>{var y=a(20839);a(39429).register("tileSprite",function(g,f,d,c,h,p){return this.displayList.add(new y(this.scene,g,f,d,c,h,p))})},56295:(S,P,a)=>{var C,g;a(29747),C=a(18553),g=a(46992),S.exports={renderWebGL:C,renderCanvas:g}},18553:(S,P,a)=>{var y=a(70554);S.exports=function(g,f,d,c){f.updateCanvas();var h=f.width,p=f.height;if(0!==h&&0!==p){d.addToRenderList(f);var u=y.getTintAppendFloatAlpha,m=g.pipelines.set(f.pipeline,f),v=m.setTexture2D(f.fillPattern,f);m.batchTexture(f,f.fillPattern,f.displayFrame.width*f.tileScaleX,f.displayFrame.height*f.tileScaleY,f.x,f.y,h,p,f.scaleX,f.scaleY,f.rotation,f.flipX,f.flipY,f.scrollFactorX,f.scrollFactorY,f.originX*h,f.originY*p,0,0,h,p,u(f.tintTopLeft,d.alpha*f._alphaTL),u(f.tintTopRight,d.alpha*f._alphaTR),u(f.tintBottomLeft,d.alpha*f._alphaBL),u(f.tintBottomRight,d.alpha*f._alphaBR),f.tintFill,f.tilePositionX%f.displayFrame.width/f.displayFrame.width,f.tilePositionY%f.displayFrame.height/f.displayFrame.height,d,c,!1,v)}}},18471:(S,P,a)=>{var y=a(45319),C=a(83419),g=a(31401),f=a(51708),d=a(8443),c=a(95643),h=a(36383),p=a(14463),u=a(45650),m=a(10247),v=new C({Extends:c,Mixins:[g.Alpha,g.BlendMode,g.ComputedSize,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.TextureCrop,g.Tint,g.Transform,g.Visible,m],initialize:function(b,T,_,A){c.call(this,b,"Video"),this.flipY=!1,this._key=u(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._getFrame=!1,this._rfvCallbackId=0;var M=b.sys.game;this._device=M.device.video,this.setPosition(T,_),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),M.events.on(d.PAUSE,this.globalPause,this),M.events.on(d.RESUME,this.globalResume,this);var I=b.sys.sound;I&&I.on(p.GLOBAL_MUTE,this.globalMute,this),A&&this.load(A)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(x){var b=this.scene.sys.cache.video.get(x);return b?(this.cacheKey=x,this.loadHandler(b.url,b.noAudio,b.crossOrigin)):console.warn("No video in cache for key: "+x),this},changeSource:function(x,b,T,_,A){void 0===b&&(b=!0),void 0===T&&(T=!1),this.cacheKey!==x&&(this.load(x),b&&this.play(T,_,A))},getVideoKey:function(){return this.cacheKey},loadURL:function(x,b,T){void 0===b&&(b=!1);var _=this._device.getVideoURL(x);return _?(this.cacheKey="",this.loadHandler(_.url,b,T)):console.warn("No supported video format found for "+x),this},loadMediaStream:function(x,b,T){return this.loadHandler(null,b,T,x)},loadHandler:function(x,b,T,_){b||(b=!1);var A=this.video;if(A?(this.removeLoadEventHandlers(),this.stop()):((A=document.createElement("video")).controls=!1,A.setAttribute("playsinline","playsinline"),A.setAttribute("preload","auto"),A.setAttribute("disablePictureInPicture","true")),b?(A.muted=!0,A.defaultMuted=!0,A.setAttribute("autoplay","autoplay")):(A.muted=!1,A.defaultMuted=!1,A.removeAttribute("autoplay")),T?A.setAttribute("crossorigin",T):A.removeAttribute("crossorigin"),_)if("srcObject"in A)try{A.srcObject=_}catch(I){if("TypeError"!==I.name)throw I;A.src=URL.createObjectURL(_)}else A.src=URL.createObjectURL(_);else A.src=x;this.retry=0,this.video=A,this._playCalled=!1,A.load(),this.addLoadEventHandlers();var M=this.scene.sys.textures.get(this._key);return this.setTexture(M),this},requestVideoFrame:function(x,b){var T=this.video;if(T){var _=b.width,A=b.height,M=this.videoTexture,I=this.videoTextureSource,R=!M||I.source!==T;R?(this._codePaused=T.paused,this._codeMuted=T.muted,M?(I.source=T,I.width=_,I.height=A,M.get().setSize(_,A)):((M=this.scene.sys.textures.create(this._key,T,_,A)).add("__BASE",0,0,0,_,A),this.setTexture(M),this.videoTexture=M,this.videoTextureSource=M.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(f.VIDEO_TEXTURE,this,M)),this.setSizeToFrame(),this.updateDisplayOrigin()):I.update(),this.isStalled=!1,this.metadata=b;var F=b.mediaTime;R&&(this._lastUpdate=F,this.emit(f.VIDEO_CREATED,this,_,A),this.frameReady||(this.frameReady=!0,this.emit(f.VIDEO_PLAY,this))),this._playingMarker?F>=this._markerOut&&(T.loop?(T.currentTime=this._markerIn,this.emit(f.VIDEO_LOOP,this)):(this.stop(!1),this.emit(f.VIDEO_COMPLETE,this))):F-1&&T>b&&T=0&&!isNaN(T)&&T>b&&(this.markers[x]=[b,T]),this},playMarker:function(x,b){var T=this.markers[x];return T&&this.play(b,T[0],T[1]),this},removeMarker:function(x){return delete this.markers[x],this},snapshot:function(x,b){return void 0===x&&(x=this.width),void 0===b&&(b=this.height),this.snapshotArea(0,0,this.width,this.height,x,b)},snapshotArea:function(x,b,T,_,A,M){void 0===x&&(x=0),void 0===b&&(b=0),void 0===T&&(T=this.width),void 0===_&&(_=this.height),void 0===A&&(A=T),void 0===M&&(M=_);var I=this.video,R=this.snapshotTexture;return R?(R.setSize(A,M),I&&R.context.drawImage(I,x,b,T,_,0,0,A,M)):(R=this.scene.sys.textures.createCanvas(u(),A,M),this.snapshotTexture=R,I&&R.context.drawImage(I,x,b,T,_,0,0,A,M)),R.update()},saveSnapshotTexture:function(x){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,x):this.snapshotTexture=this.scene.sys.textures.createCanvas(x,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(f.VIDEO_UNLOCKED,this));var x=this.scene.sys.sound;x&&x.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(x){var b=x.name;"NotAllowedError"===b?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(f.VIDEO_LOCKED,this)):"NotSupportedError"===b?(this.stop(!1),this.emit(f.VIDEO_UNSUPPORTED,this,x)):(this.stop(!1),this.emit(f.VIDEO_ERROR,this,x))},legacyPlayHandler:function(){var x=this.video;x&&(this.playSuccess(),x.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(f.VIDEO_PLAYING,this)},loadErrorHandler:function(x){this.stop(!1),this.emit(f.VIDEO_ERROR,this,x)},metadataHandler:function(x){this.emit(f.VIDEO_METADATA,this,x)},setSizeToFrame:function(x){x||(x=this.frame),this.width=x.realWidth,this.height=x.realHeight,1!==this.scaleX&&(this.scaleX=this.displayWidth/this.width),1!==this.scaleY&&(this.scaleY=this.displayHeight/this.height);var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},stalledHandler:function(x){this.isStalled=!0,this.emit(f.VIDEO_STALLED,this,x)},completeHandler:function(){this._playCalled=!1,this.emit(f.VIDEO_COMPLETE,this)},preUpdate:function(x,b){!this.video||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=b,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(x){var b=this.video;if(b){var T=b.duration;T===1/0||isNaN(T)||this.setCurrentTime(T*x)}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(x){var b=this.video;if(b){if("string"==typeof x){var T=x[0],_=parseFloat(x.substr(1));"+"===T?x=b.currentTime+_:"-"===T&&(x=b.currentTime-_)}b.currentTime=x}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(f.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(f.VIDEO_SEEKED,this)},getProgress:function(){var x=this.video;if(x){var b=x.duration;if(b!==1/0&&!isNaN(b))return x.currentTime/b}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(x){void 0===x&&(x=!0),this._codeMuted=x;var b=this.video;return b&&(b.muted=!!this._systemMuted||x),this},isMuted:function(){return this._codeMuted},globalMute:function(x,b){this._systemMuted=b;var T=this.video;T&&(T.muted=!!this._codeMuted||b)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(x){void 0===x&&(x=!0);var b=this.video;return this._codePaused=x,b&&!b.ended&&(x?b.paused||(this.removeEventHandlers(),b.pause()):x||(this._playCalled?b.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(x){return void 0===x&&(x=1),this.video&&(this.video.volume=y(x,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(x){return this.video&&(this.video.playbackRate=x),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(x){return void 0===x&&(x=!0),this.video&&(this.video.loop=x),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(x,b){return void 0===b&&(b=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,x),this.videoTextureSource.setFlipY(b)),this._key=x,this.flipY=b,!!this.videoTexture},stop:function(x){void 0===x&&(x=!0);var b=this.video;return b&&(this.removeEventHandlers(),b.cancelVideoFrameCallback(this._rfvCallbackId),b.pause()),this.retry=0,this._playCalled=!1,x&&this.emit(f.VIDEO_STOP,this),this},removeVideoElement:function(){var x=this.video;if(x){for(x.parentNode&&x.parentNode.removeChild(x);x.hasChildNodes();)x.removeChild(x.firstChild);x.removeAttribute("autoplay"),x.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var x=this.scene.sys.game.events;x.off(d.PAUSE,this.globalPause,this),x.off(d.RESUME,this.globalResume,this);var b=this.scene.sys.sound;b&&b.off(p.GLOBAL_MUTE,this.globalMute,this)}});S.exports=v},58352:S=>{S.exports=function(a,y,C,g){y.videoTexture&&(C.addToRenderList(y),a.batchSprite(y,y.frame,C,g))}},11511:(S,P,a)=>{var y=a(25305),C=a(44603),g=a(23568),f=a(18471);C.register("video",function(d,c){void 0===d&&(d={});var h=g(d,"key",null),p=new f(this.scene,0,0,h);return void 0!==c&&(d.add=c),y(this.scene,p,d),p})},89025:(S,P,a)=>{var y=a(18471);a(39429).register("video",function(g,f,d){return this.displayList.add(new y(this.scene,g,f,d))})},10247:(S,P,a)=>{var C,g;a(29747),C=a(29849),g=a(58352),S.exports={renderWebGL:C,renderCanvas:g}},29849:S=>{S.exports=function(a,y,C,g){y.videoTexture&&(C.addToRenderList(y),y.pipeline.batchSprite(y,C,g))}},41481:(S,P,a)=>{var y=a(10312),C=a(96503),g=a(87902),f=a(83419),d=a(31401),c=a(95643),h=a(87841),p=a(37303),u=new f({Extends:c,Mixins:[d.Depth,d.GetBounds,d.Origin,d.Transform,d.ScrollFactor,d.Visible],initialize:function(v,x,b,T,_){void 0===T&&(T=1),void 0===_&&(_=T),c.call(this,v,"Zone"),this.setPosition(x,b),this.width=T,this.height=_,this.blendMode=y.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(m){this.scaleX=m/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(m){this.scaleY=m/this.height}},setSize:function(m,v,x){void 0===x&&(x=!0),this.width=m,this.height=v,this.updateDisplayOrigin();var b=this.input;return x&&b&&!b.customHitArea&&(b.hitArea.width=m,b.hitArea.height=v),this},setDisplaySize:function(m,v){return this.displayWidth=m,this.displayHeight=v,this},setCircleDropZone:function(m){return this.setDropZone(new C(0,0,m),g)},setRectangleDropZone:function(m,v){return this.setDropZone(new h(0,0,m,v),p)},setDropZone:function(m,v){return this.input||this.setInteractive(m,v,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(m,v,x){x.addToRenderList(v)},renderWebGL:function(m,v,x){x.addToRenderList(v)}});S.exports=u},95261:(S,P,a)=>{var y=a(44603),C=a(23568),g=a(41481);y.register("zone",function(f){var d=C(f,"x",0),c=C(f,"y",0),h=C(f,"width",1),p=C(f,"height",h);return new g(this.scene,d,c,h,p)})},84175:(S,P,a)=>{var y=a(41481);a(39429).register("zone",function(g,f,d,c){return this.displayList.add(new y(this.scene,g,f,d,c))})},95166:S=>{S.exports=function(a){return a.radius>0?Math.PI*a.radius*a.radius:0}},96503:(S,P,a)=>{var y=a(83419),C=a(87902),g=a(26241),f=a(79124),d=a(23777),c=a(28176),h=new y({initialize:function(u,m,v){void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=0),this.type=d.CIRCLE,this.x=u,this.y=m,this._radius=v,this._diameter=2*v},contains:function(p,u){return C(this,p,u)},getPoint:function(p,u){return g(this,p,u)},getPoints:function(p,u,m){return f(this,p,u,m)},getRandomPoint:function(p){return c(this,p)},setTo:function(p,u,m){return this.x=p,this.y=u,this._radius=m,this._diameter=2*m,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(p,u){return void 0===u&&(u=p),this.x=p,this.y=u,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(p){this._radius=p,this._diameter=2*p}},diameter:{get:function(){return this._diameter},set:function(p){this._diameter=p,this._radius=.5*p}},left:{get:function(){return this.x-this._radius},set:function(p){this.x=p+this._radius}},right:{get:function(){return this.x+this._radius},set:function(p){this.x=p-this._radius}},top:{get:function(){return this.y-this._radius},set:function(p){this.y=p+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(p){this.y=p-this._radius}}});S.exports=h},71562:S=>{S.exports=function(a){return Math.PI*a.radius*2}},92110:(S,P,a)=>{var y=a(2141);S.exports=function(g,f,d){return void 0===d&&(d=new y),d.x=g.x+g.radius*Math.cos(f),d.y=g.y+g.radius*Math.sin(f),d}},42250:(S,P,a)=>{var y=a(96503);S.exports=function(g){return new y(g.x,g.y,g.radius)}},87902:S=>{S.exports=function(a,y,C){return a.radius>0&&y>=a.left&&y<=a.right&&C>=a.top&&C<=a.bottom&&(a.x-y)*(a.x-y)+(a.y-C)*(a.y-C)<=a.radius*a.radius}},5698:(S,P,a)=>{var y=a(87902);S.exports=function(g,f){return y(g,f.x,f.y)}},70588:(S,P,a)=>{var y=a(87902);S.exports=function(g,f){return y(g,f.x,f.y)&&y(g,f.right,f.y)&&y(g,f.x,f.bottom)&&y(g,f.right,f.bottom)}},26394:S=>{S.exports=function(a,y){return y.setTo(a.x,a.y,a.radius)}},76278:S=>{S.exports=function(a,y){return a.x===y.x&&a.y===y.y&&a.radius===y.radius}},2074:(S,P,a)=>{var y=a(87841);S.exports=function(g,f){return void 0===f&&(f=new y),f.x=g.left,f.y=g.top,f.width=g.diameter,f.height=g.diameter,f}},26241:(S,P,a)=>{var y=a(92110),C=a(62945),g=a(36383),f=a(2141);S.exports=function(c,h,p){void 0===p&&(p=new f);var u=C(h,0,g.PI2);return y(c,u,p)}},79124:(S,P,a)=>{var y=a(71562),C=a(92110),g=a(62945),f=a(36383);S.exports=function(c,h,p,u){void 0===u&&(u=[]),!h&&p>0&&(h=y(c)/p);for(var m=0;m{S.exports=function(a,y,C){return a.x+=y,a.y+=C,a}},39212:S=>{S.exports=function(a,y){return a.x+=y.x,a.y+=y.y,a}},28176:(S,P,a)=>{var y=a(2141);S.exports=function(g,f){void 0===f&&(f=new y);var d=2*Math.PI*Math.random(),c=Math.random()+Math.random(),h=c>1?2-c:c,p=h*Math.cos(d),u=h*Math.sin(d);return f.x=g.x+p*g.radius,f.y=g.y+u*g.radius,f}},88911:(S,P,a)=>{var y=a(96503);y.Area=a(95166),y.Circumference=a(71562),y.CircumferencePoint=a(92110),y.Clone=a(42250),y.Contains=a(87902),y.ContainsPoint=a(5698),y.ContainsRect=a(70588),y.CopyFrom=a(26394),y.Equals=a(76278),y.GetBounds=a(2074),y.GetPoint=a(26241),y.GetPoints=a(79124),y.Offset=a(50884),y.OffsetPoint=a(39212),y.Random=a(28176),S.exports=y},23777:S=>{S.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},78874:S=>{S.exports=function(a){return a.isEmpty()?0:a.getMajorRadius()*a.getMinorRadius()*Math.PI}},92990:S=>{S.exports=function(a){var y=a.width/2,C=a.height/2,g=Math.pow(y-C,2)/Math.pow(y+C,2);return Math.PI*(y+C)*(1+3*g/(10+Math.sqrt(4-3*g)))}},79522:(S,P,a)=>{var y=a(2141);S.exports=function(g,f,d){void 0===d&&(d=new y);var h=g.height/2;return d.x=g.x+g.width/2*Math.cos(f),d.y=g.y+h*Math.sin(f),d}},58102:(S,P,a)=>{var y=a(8497);S.exports=function(g){return new y(g.x,g.y,g.width,g.height)}},81154:S=>{S.exports=function(a,y,C){if(a.width<=0||a.height<=0)return!1;var g=(y-a.x)/a.width,f=(C-a.y)/a.height;return(g*=g)+(f*=f)<.25}},46662:(S,P,a)=>{var y=a(81154);S.exports=function(g,f){return y(g,f.x,f.y)}},1632:(S,P,a)=>{var y=a(81154);S.exports=function(g,f){return y(g,f.x,f.y)&&y(g,f.right,f.y)&&y(g,f.x,f.bottom)&&y(g,f.right,f.bottom)}},65534:S=>{S.exports=function(a,y){return y.setTo(a.x,a.y,a.width,a.height)}},8497:(S,P,a)=>{var y=a(83419),C=a(81154),g=a(90549),f=a(48320),d=a(23777),c=a(24820),h=new y({initialize:function(u,m,v,x){void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=0),void 0===x&&(x=0),this.type=d.ELLIPSE,this.x=u,this.y=m,this.width=v,this.height=x},contains:function(p,u){return C(this,p,u)},getPoint:function(p,u){return g(this,p,u)},getPoints:function(p,u,m){return f(this,p,u,m)},getRandomPoint:function(p){return c(this,p)},setTo:function(p,u,m,v){return this.x=p,this.y=u,this.width=m,this.height=v,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(p,u){return void 0===u&&(u=p),this.x=p,this.y=u,this},setSize:function(p,u){return void 0===u&&(u=p),this.width=p,this.height=u,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(p){this.x=p+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(p){this.x=p-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(p){this.y=p+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(p){this.y=p-this.height/2}}});S.exports=h},36146:S=>{S.exports=function(a,y){return a.x===y.x&&a.y===y.y&&a.width===y.width&&a.height===y.height}},23694:(S,P,a)=>{var y=a(87841);S.exports=function(g,f){return void 0===f&&(f=new y),f.x=g.left,f.y=g.top,f.width=g.width,f.height=g.height,f}},90549:(S,P,a)=>{var y=a(79522),C=a(62945),g=a(36383),f=a(2141);S.exports=function(c,h,p){void 0===p&&(p=new f);var u=C(h,0,g.PI2);return y(c,u,p)}},48320:(S,P,a)=>{var y=a(92990),C=a(79522),g=a(62945),f=a(36383);S.exports=function(c,h,p,u){void 0===u&&(u=[]),!h&&p>0&&(h=y(c)/p);for(var m=0;m{S.exports=function(a,y,C){return a.x+=y,a.y+=C,a}},44808:S=>{S.exports=function(a,y){return a.x+=y.x,a.y+=y.y,a}},24820:(S,P,a)=>{var y=a(2141);S.exports=function(g,f){void 0===f&&(f=new y);var d=Math.random()*Math.PI*2,c=Math.sqrt(Math.random());return f.x=g.x+c*Math.cos(d)*g.width/2,f.y=g.y+c*Math.sin(d)*g.height/2,f}},49203:(S,P,a)=>{var y=a(8497);y.Area=a(78874),y.Circumference=a(92990),y.CircumferencePoint=a(79522),y.Clone=a(58102),y.Contains=a(81154),y.ContainsPoint=a(46662),y.ContainsRect=a(1632),y.CopyFrom=a(65534),y.Equals=a(36146),y.GetBounds=a(23694),y.GetPoint=a(90549),y.GetPoints=a(48320),y.Offset=a(73424),y.OffsetPoint=a(44808),y.Random=a(24820),S.exports=y},55738:(S,P,a)=>{var y=a(23777),C=a(79291),g={Circle:a(88911),Ellipse:a(49203),Intersects:a(91865),Line:a(2529),Mesh:a(73090),Point:a(43711),Polygon:a(58423),Rectangle:a(93232),Triangle:a(84435)};g=C(!1,g,y),S.exports=g},2044:(S,P,a)=>{var y=a(20339);S.exports=function(g,f){return y(g.x,g.y,f.x,f.y)<=g.radius+f.radius}},81491:S=>{S.exports=function(a,y){var C=y.width/2,g=y.height/2,f=Math.abs(a.x-y.x-C),d=Math.abs(a.y-y.y-g);if(f>C+a.radius||d>g+a.radius)return!1;if(f<=C||d<=g)return!0;var p=f-C,u=d-g;return p*p+u*u<=a.radius*a.radius}},63376:(S,P,a)=>{var y=a(2141),C=a(2044);S.exports=function(f,d,c){if(void 0===c&&(c=[]),C(f,d)){var b,T,A,M,h=f.x,p=f.y,u=f.radius,m=d.x,v=d.y,x=d.radius;if(p===v)0==(A=(T=-2*v)*T-4*(b=1)*(m*m+(M=(x*x-u*u-m*m+h*h)/(2*(h-m)))*M-2*m*M+v*v-x*x))?c.push(new y(M,-T/(2*b))):A>0&&(c.push(new y(M,(-T+Math.sqrt(A))/(2*b))),c.push(new y(M,(-T-Math.sqrt(A))/(2*b))));else{var I=(h-m)/(p-v),R=(x*x-u*u-m*m+h*h-v*v+p*p)/(2*(p-v));0==(A=(T=2*p*I-2*R*I-2*h)*T-4*(b=I*I+1)*(h*h+p*p+R*R-u*u-2*p*R))?c.push(new y(M=-T/(2*b),R-M*I)):A>0&&(M=(-T+Math.sqrt(A))/(2*b),c.push(new y(M,R-M*I)),M=(-T-Math.sqrt(A))/(2*b),c.push(new y(M,R-M*I)))}}return c}},97439:(S,P,a)=>{var y=a(4042),C=a(81491);S.exports=function(f,d,c){if(void 0===c&&(c=[]),C(f,d)){var h=d.getLineA(),p=d.getLineB(),u=d.getLineC(),m=d.getLineD();y(h,f,c),y(p,f,c),y(u,f,c),y(m,f,c)}return c}},4042:(S,P,a)=>{var y=a(2141),C=a(80462);S.exports=function(f,d,c){if(void 0===c&&(c=[]),C(f,d)){var V,B,h=f.x1,p=f.y1,b=d.radius,T=f.x2-h,_=f.y2-p,A=h-d.x,M=p-d.y,I=T*T+_*_,R=2*(T*A+_*M),N=R*R-4*I*(A*A+M*M-b*b);if(0===N){var G=-R/(2*I);V=h+G*T,B=p+G*_,G>=0&&G<=1&&c.push(new y(V,B))}else if(N>0){var Q=(-R-Math.sqrt(N))/(2*I);V=h+Q*T,B=p+Q*_,Q>=0&&Q<=1&&c.push(new y(V,B));var H=(-R+Math.sqrt(N))/(2*I);V=h+H*T,B=p+H*_,H>=0&&H<=1&&c.push(new y(V,B))}}return c}},36100:(S,P,a)=>{var y=a(25836);S.exports=function(g,f,d,c){void 0===d&&(d=!1);var F,N,V,h=g.x1,p=g.y1,v=f.x1,x=f.y1,_=g.x2-h,A=g.y2-p,M=f.x2-v,I=f.y2-x,R=_*I-A*M;if(0===R)return null;if(d){if(F=(_*(x-p)+A*(h-v))/(M*A-I*_),0!==_)N=(v+M*F-h)/_;else{if(0===A)return null;N=(x+I*F-p)/A}if(N<0||F<0||F>1)return null;V=N}else{if(N=((p-x)*_-(h-v)*A)/R,(F=((v-h)*I-(x-p)*M)/R)<0||F>1||N<0||N>1)return null;V=F}return void 0===c&&(c=new y),c.set(h+_*V,p+A*V,V)}},3073:(S,P,a)=>{var y=a(36100),C=a(23031),g=a(25836),f=new C,d=new g;S.exports=function(h,p,u,m){void 0===u&&(u=!1),void 0===m&&(m=new g);var v=!1;m.set(),d.set();for(var x=p[p.length-1],b=0;b{var y=a(25836),C=a(61369),g=a(3073),f=new y;S.exports=function(c,h,p,u){void 0===u&&(u=new C),Array.isArray(h)||(h=[h]);var m=!1;u.set(),f.set();for(var v=0;v{var y=a(2141),C=a(76112),g=a(92773);S.exports=function(d,c,h){if(void 0===h&&(h=[]),g(d,c))for(var p=c.getLineA(),u=c.getLineB(),m=c.getLineC(),v=c.getLineD(),x=[new y,new y,new y,new y],b=[C(p,d,x[0]),C(u,d,x[1]),C(m,d,x[2]),C(v,d,x[3])],T=0;T<4;T++)b[T]&&h.push(x[T]);return h}},71147:(S,P,a)=>{var y=a(61369),C=a(56362),f=new(a(23031));function d(p,u,m,v,x){var b=Math.cos(p),T=Math.sin(p);f.setTo(u,m,u+b,m+T);var _=C(f,v,!0);_&&x.push(new y(_.x,_.y,p,_.w))}function c(p,u){return p.z-u.z}S.exports=function(p,u,m){Array.isArray(m)||(m=[m]);for(var v=[],x=[],b=0;b{var y=a(87841),C=a(59996);S.exports=function(f,d,c){return void 0===c&&(c=new y),C(f,d)&&(c.x=Math.max(f.x,d.x),c.y=Math.max(f.y,d.y),c.width=Math.min(f.right,d.right)-c.x,c.height=Math.min(f.bottom,d.bottom)-c.y),c}},52784:(S,P,a)=>{var y=a(60646),C=a(59996);S.exports=function(f,d,c){if(void 0===c&&(c=[]),C(f,d)){var h=f.getLineA(),p=f.getLineB(),u=f.getLineC(),m=f.getLineD();y(h,d,c),y(p,d,c),y(u,d,c),y(m,d,c)}return c}},26341:(S,P,a)=>{var y=a(89265),C=a(60646);S.exports=function(f,d,c){if(void 0===c&&(c=[]),y(f,d)){var h=d.getLineA(),p=d.getLineB(),u=d.getLineC();C(h,f,c),C(p,f,c),C(u,f,c)}return c}},38720:(S,P,a)=>{var y=a(4042),C=a(67636);S.exports=function(f,d,c){if(void 0===c&&(c=[]),C(f,d)){var h=f.getLineA(),p=f.getLineB(),u=f.getLineC();y(h,d,c),y(p,d,c),y(u,d,c)}return c}},13882:(S,P,a)=>{var y=a(2141),C=a(2822),g=a(76112);S.exports=function(d,c,h){if(void 0===h&&(h=[]),C(d,c))for(var p=d.getLineA(),u=d.getLineB(),m=d.getLineC(),v=[new y,new y,new y],x=[g(p,c,v[0]),g(u,c,v[1]),g(m,c,v[2])],b=0;b<3;b++)x[b]&&h.push(v[b]);return h}},75636:(S,P,a)=>{var y=a(82944),C=a(13882);S.exports=function(f,d,c){if(void 0===c&&(c=[]),y(f,d)){var h=d.getLineA(),p=d.getLineB(),u=d.getLineC();C(f,h,c),C(f,p,c),C(f,u,c)}return c}},80462:(S,P,a)=>{var y=a(87902),g=new(a(2141));S.exports=function(d,c,h){if(void 0===h&&(h=g),y(c,d.x1,d.y1))return h.x=d.x1,h.y=d.y1,!0;if(y(c,d.x2,d.y2))return h.x=d.x2,h.y=d.y2,!0;var p=d.x2-d.x1,u=d.y2-d.y1,x=p*p+u*u,b=p,T=u;if(x>0){var _=((c.x-d.x1)*p+(c.y-d.y1)*u)/x;b*=_,T*=_}return h.x=d.x1+b,h.y=d.y1+T,b*b+T*T<=x&&b*p+T*u>=0&&y(c,h.x,h.y)}},76112:S=>{S.exports=function(a,y,C){var g=a.x1,f=a.y1,d=a.x2,c=a.y2,h=y.x1,p=y.y1,u=y.x2,m=y.y2;if(g===d&&f===c||h===u&&p===m)return!1;var v=(m-p)*(d-g)-(u-h)*(c-f);if(0===v)return!1;var x=((u-h)*(f-p)-(m-p)*(g-h))/v,b=((d-g)*(f-p)-(c-f)*(g-h))/v;return!(x<0||x>1||b<0||b>1||(C&&(C.x=g+x*(d-g),C.y=f+x*(c-f)),0))}},92773:S=>{S.exports=function(a,y){var C=a.x1,g=a.y1,f=a.x2,d=a.y2,c=y.x,h=y.y,p=y.right,u=y.bottom,m=0;if(C>=c&&C<=p&&g>=h&&g<=u||f>=c&&f<=p&&d>=h&&d<=u)return!0;if(C=c){if((m=g+(d-g)*(c-C)/(f-C))>h&&m<=u)return!0}else if(C>p&&f<=p&&(m=g+(d-g)*(p-C)/(f-C))>=h&&m<=u)return!0;if(g=h){if((m=C+(f-C)*(h-g)/(d-g))>=c&&m<=p)return!0}else if(g>u&&d<=u&&(m=C+(f-C)*(u-g)/(d-g))>=c&&m<=p)return!0;return!1}},16204:S=>{S.exports=function(a,y,C){void 0===C&&(C=1);var g=y.x1,f=y.y1,d=y.x2,c=y.y2,h=a.x,p=a.y,u=(d-g)*(d-g)+(c-f)*(c-f);if(0===u)return!1;var m=((h-g)*(d-g)+(p-f)*(c-f))/u;return m<0?Math.sqrt((g-h)*(g-h)+(f-p)*(f-p))<=C:m>=0&&m<=1?Math.abs(((f-p)*(d-g)-(g-h)*(c-f))/u)*Math.sqrt(u)<=C:Math.sqrt((d-h)*(d-h)+(c-p)*(c-p))<=C}},14199:(S,P,a)=>{var y=a(16204);S.exports=function(g,f){if(!y(g,f))return!1;var d=Math.min(f.x1,f.x2),c=Math.max(f.x1,f.x2),h=Math.min(f.y1,f.y2),p=Math.max(f.y1,f.y2);return g.x>=d&&g.x<=c&&g.y>=h&&g.y<=p}},59996:S=>{S.exports=function(a,y){return!(a.width<=0||a.height<=0||y.width<=0||y.height<=0||a.righty.right||a.y>y.bottom)}},89265:(S,P,a)=>{var y=a(76112),C=a(37303),g=a(48653),f=a(77493);S.exports=function(c,h){if(h.left>c.right||h.rightc.bottom||h.bottom0}},84411:S=>{S.exports=function(a,y,C,g,f,d){return void 0===d&&(d=0),!(y>a.right+d||Ca.bottom+d||f{var y=a(80462),C=a(10690);S.exports=function(f,d){return!(f.left>d.right||f.rightd.bottom||f.bottom{var y=a(76112);S.exports=function(g,f){return!!(g.contains(f.x1,f.y1)||g.contains(f.x2,f.y2)||y(g.getLineA(),f)||y(g.getLineB(),f)||y(g.getLineC(),f))}},82944:(S,P,a)=>{var y=a(48653),C=a(71694),g=a(76112);S.exports=function(d,c){if(d.left>c.right||d.rightc.bottom||d.bottom0||(b=C(c),(T=y(d,b,!0)).length>0)}},91865:(S,P,a)=>{S.exports={CircleToCircle:a(2044),CircleToRectangle:a(81491),GetCircleToCircle:a(63376),GetCircleToRectangle:a(97439),GetLineToCircle:a(4042),GetLineToLine:a(36100),GetLineToPoints:a(3073),GetLineToPolygon:a(56362),GetLineToRectangle:a(60646),GetRaysFromPointToPolygon:a(71147),GetRectangleIntersection:a(68389),GetRectangleToRectangle:a(52784),GetRectangleToTriangle:a(26341),GetTriangleToCircle:a(38720),GetTriangleToLine:a(13882),GetTriangleToTriangle:a(75636),LineToCircle:a(80462),LineToLine:a(76112),LineToRectangle:a(92773),PointToLine:a(16204),PointToLineSegment:a(14199),RectangleToRectangle:a(59996),RectangleToTriangle:a(89265),RectangleToValues:a(84411),TriangleToCircle:a(67636),TriangleToLine:a(2822),TriangleToTriangle:a(82944)}},91938:S=>{S.exports=function(a){return Math.atan2(a.y2-a.y1,a.x2-a.x1)}},84993:S=>{S.exports=function(a,y,C){void 0===y&&(y=1),void 0===C&&(C=[]);var g=Math.round(a.x1),f=Math.round(a.y1),d=Math.round(a.x2),c=Math.round(a.y2),h=Math.abs(d-g),p=Math.abs(c-f),u=g-p&&(v-=p,g+=u),b{S.exports=function(a,y,C){var g=y-(a.x1+a.x2)/2,f=C-(a.y1+a.y2)/2;return a.x1+=g,a.y1+=f,a.x2+=g,a.y2+=f,a}},31116:(S,P,a)=>{var y=a(23031);S.exports=function(g){return new y(g.x1,g.y1,g.x2,g.y2)}},59944:S=>{S.exports=function(a,y){return y.setTo(a.x1,a.y1,a.x2,a.y2)}},59220:S=>{S.exports=function(a,y){return a.x1===y.x1&&a.y1===y.y1&&a.x2===y.x2&&a.y2===y.y2}},78177:(S,P,a)=>{var y=a(35001);S.exports=function(g,f,d){void 0===d&&(d=f);var c=y(g),h=g.x2-g.x1,p=g.y2-g.y1;return f&&(g.x1=g.x1-h/c*f,g.y1=g.y1-p/c*f),d&&(g.x2=g.x2+h/c*d,g.y2=g.y2+p/c*d),g}},26708:(S,P,a)=>{var y=a(52816),C=a(6113),g=a(2141);S.exports=function(d,c,h,p,u){void 0===p&&(p=0),void 0===u&&(u=[]);var A,M,m=[],v=d.x1,x=d.y1,b=d.x2-v,T=d.y2-x,_=C(c,u),I=h-1;for(A=0;A0){var R=m[0],F=[R];for(A=1;A=p&&(F.push(N),R=N)}var V=m[m.length-1];return y(R,V){var y=a(2141);S.exports=function(g,f){return void 0===f&&(f=new y),f.x=(g.x1+g.x2)/2,f.y=(g.y1+g.y2)/2,f}},99569:(S,P,a)=>{var y=a(2141);S.exports=function(g,f,d){void 0===d&&(d=new y);var c=g.x1,h=g.y1,p=g.x2,u=g.y2,m=(p-c)*(p-c)+(u-h)*(u-h);if(0===m)return d;var v=((f.x-c)*(p-c)+(f.y-h)*(u-h))/m;return d.x=c+v*(p-c),d.y=h+v*(u-h),d}},34638:(S,P,a)=>{var y=a(36383),C=a(91938),g=a(2141);S.exports=function(d,c){void 0===c&&(c=new g);var h=C(d)-y.TAU;return c.x=Math.cos(h),c.y=Math.sin(h),c}},13151:(S,P,a)=>{var y=a(2141);S.exports=function(g,f,d){return void 0===d&&(d=new y),d.x=g.x1+(g.x2-g.x1)*f,d.y=g.y1+(g.y2-g.y1)*f,d}},15258:(S,P,a)=>{var y=a(35001),C=a(2141);S.exports=function(f,d,c,h){void 0===h&&(h=[]),!d&&c>0&&(d=y(f)/c);for(var p=f.x1,u=f.y1,m=f.x2,v=f.y2,x=0;x{S.exports=function(a,y){var C=a.x1,g=a.y1,f=a.x2,d=a.y2,c=(f-C)*(f-C)+(d-g)*(d-g);return 0!==c&&Math.abs(((g-y.y)*(f-C)-(C-y.x)*(d-g))/c)*Math.sqrt(c)}},98770:S=>{S.exports=function(a){return Math.abs(a.y1-a.y2)}},35001:S=>{S.exports=function(a){return Math.sqrt((a.x2-a.x1)*(a.x2-a.x1)+(a.y2-a.y1)*(a.y2-a.y1))}},23031:(S,P,a)=>{var y=a(83419),C=a(13151),g=a(15258),f=a(23777),d=a(65822),c=a(26099),h=new y({initialize:function(u,m,v,x){void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=0),void 0===x&&(x=0),this.type=f.LINE,this.x1=u,this.y1=m,this.x2=v,this.y2=x},getPoint:function(p,u){return C(this,p,u)},getPoints:function(p,u,m){return g(this,p,u,m)},getRandomPoint:function(p){return d(this,p)},setTo:function(p,u,m,v){return void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=0),this.x1=p,this.y1=u,this.x2=m,this.y2=v,this},setFromObjects:function(p,u){return this.x1=p.x,this.y1=p.y,this.x2=u.x,this.y2=u.y,this},getPointA:function(p){return void 0===p&&(p=new c),p.set(this.x1,this.y1),p},getPointB:function(p){return void 0===p&&(p=new c),p.set(this.x2,this.y2),p},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(p){this.x1<=this.x2?this.x1=p:this.x2=p}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(p){this.x1>this.x2?this.x1=p:this.x2=p}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(p){this.y1<=this.y2?this.y1=p:this.y2=p}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(p){this.y1>this.y2?this.y1=p:this.y2=p}}});S.exports=h},64795:(S,P,a)=>{var y=a(36383),C=a(15994),g=a(91938);S.exports=function(d){var c=g(d)-y.TAU;return C(c,-Math.PI,Math.PI)}},52616:(S,P,a)=>{var y=a(36383),C=a(91938);S.exports=function(f){return Math.cos(C(f)-y.TAU)}},87231:(S,P,a)=>{var y=a(36383),C=a(91938);S.exports=function(f){return Math.sin(C(f)-y.TAU)}},89662:S=>{S.exports=function(a,y,C){return a.x1+=y,a.y1+=C,a.x2+=y,a.y2+=C,a}},71165:S=>{S.exports=function(a){return-(a.x2-a.x1)/(a.y2-a.y1)}},65822:(S,P,a)=>{var y=a(2141);S.exports=function(g,f){void 0===f&&(f=new y);var d=Math.random();return f.x=g.x1+d*(g.x2-g.x1),f.y=g.y1+d*(g.y2-g.y1),f}},69777:(S,P,a)=>{var y=a(91938),C=a(64795);S.exports=function(f,d){return 2*C(d)-Math.PI-y(f)}},39706:(S,P,a)=>{var y=a(64400);S.exports=function(g,f){return y(g,(g.x1+g.x2)/2,(g.y1+g.y2)/2,f)}},82585:(S,P,a)=>{var y=a(64400);S.exports=function(g,f,d){return y(g,f.x,f.y,d)}},64400:S=>{S.exports=function(a,y,C,g){var f=Math.cos(g),d=Math.sin(g),c=a.x1-y,h=a.y1-C;return a.x1=c*f-h*d+y,a.y1=c*d+h*f+C,a.x2=(c=a.x2-y)*f-(h=a.y2-C)*d+y,a.y2=c*d+h*f+C,a}},62377:S=>{S.exports=function(a,y,C,g,f){return a.x1=y,a.y1=C,a.x2=y+Math.cos(g)*f,a.y2=C+Math.sin(g)*f,a}},71366:S=>{S.exports=function(a){return(a.y2-a.y1)/(a.x2-a.x1)}},10809:S=>{S.exports=function(a){return Math.abs(a.x1-a.x2)}},2529:(S,P,a)=>{var y=a(23031);y.Angle=a(91938),y.BresenhamPoints=a(84993),y.CenterOn=a(36469),y.Clone=a(31116),y.CopyFrom=a(59944),y.Equals=a(59220),y.Extend=a(78177),y.GetEasedPoints=a(26708),y.GetMidPoint=a(32125),y.GetNearestPoint=a(99569),y.GetNormal=a(34638),y.GetPoint=a(13151),y.GetPoints=a(15258),y.GetShortestDistance=a(26408),y.Height=a(98770),y.Length=a(35001),y.NormalAngle=a(64795),y.NormalX=a(52616),y.NormalY=a(87231),y.Offset=a(89662),y.PerpSlope=a(71165),y.Random=a(65822),y.ReflectAngle=a(69777),y.Rotate=a(39706),y.RotateAroundPoint=a(82585),y.RotateAroundXY=a(64400),y.SetToAngle=a(62377),y.Slope=a(71366),y.Width=a(10809),S.exports=y},83997:(S,P,a)=>{var y=a(83419),C=a(87841),g=a(26099);function f(c,h,p,u){var m=c-p,v=h-u;return Math.sqrt(m*m+v*v)}var d=new y({initialize:function(h,p,u){this.vertex1=h,this.vertex2=p,this.vertex3=u,this.bounds=new C,this._inCenter=new g},getInCenter:function(c){void 0===c&&(c=!0);var m,v,x,b,T,_,h=this.vertex1,p=this.vertex2,u=this.vertex3;c?(m=h.x,v=h.y,x=p.x,b=p.y,T=u.x,_=u.y):(m=h.vx,v=h.vy,x=p.vx,b=p.vy,T=u.vx,_=u.vy);var A=f(T,_,x,b),M=f(m,v,T,_),I=f(x,b,m,v),R=A+M+I;return this._inCenter.set((m*A+x*M+T*I)/R,(v*A+b*M+_*I)/R)},contains:function(c,h,p){var u=this.vertex1,m=this.vertex2,v=this.vertex3,x=u.vx,b=u.vy,T=m.vx,_=m.vy,A=v.vx,M=v.vy;if(p){var I=p.a,R=p.b,F=p.c,N=p.d,V=p.e,B=p.f;x=u.vx*I+u.vy*F+V,b=u.vx*R+u.vy*N+B,T=m.vx*I+m.vy*F+V,_=m.vx*R+m.vy*N+B,A=v.vx*I+v.vy*F+V,M=v.vx*R+v.vy*N+B}var G=A-x,Q=M-b,H=T-x,K=_-b,tt=c-x,at=h-b,lt=G*G+Q*Q,q=G*H+Q*K,it=G*tt+Q*at,Y=H*H+K*K,X=H*tt+K*at,nt=lt*Y-q*q,dt=0===nt?0:1/nt,gt=(Y*it-q*X)*dt,bt=(lt*X-q*it)*dt;return gt>=0&&bt>=0&>+bt<1},isCounterClockwise:function(c){var h=this.vertex1,p=this.vertex2,u=this.vertex3,m=(p.vx-h.vx)*(u.vy-h.vy)-(p.vy-h.vy)*(u.vx-h.vx);return c<=0?m>=0:m<0},load:function(c,h,p,u,m){return p=this.vertex1.load(c,h,p,u,m),p=this.vertex2.load(c,h,p,u,m),this.vertex3.load(c,h,p,u,m)},transformCoordinatesLocal:function(c,h,p,u){return this.vertex1.transformCoordinatesLocal(c,h,p,u),this.vertex2.transformCoordinatesLocal(c,h,p,u),this.vertex3.transformCoordinatesLocal(c,h,p,u),this},updateBounds:function(){var c=this.vertex1,h=this.vertex2,p=this.vertex3,u=this.bounds;return u.x=Math.min(c.vx,h.vx,p.vx),u.y=Math.min(c.vy,h.vy,p.vy),u.width=Math.max(c.vx,h.vx,p.vx)-u.x,u.height=Math.max(c.vy,h.vy,p.vy)-u.y,this},isInView:function(c,h,p,u,m,v,x,b,T,_,A){this.update(u,m,v,x,b,T,_,A);var M=this.vertex1,I=this.vertex2,R=this.vertex3;if(M.ta<=0&&I.ta<=0&&R.ta<=0||h&&!this.isCounterClockwise(p))return!1;var F=this.bounds;return F.x=Math.min(M.tx,I.tx,R.tx),F.y=Math.min(M.ty,I.ty,R.ty),F.width=Math.max(M.tx,I.tx,R.tx)-F.x,F.height=Math.max(M.ty,I.ty,R.ty)-F.y,!(F.width<=0||F.height<=0||c.width<=0||c.height<=0||F.rightc.x+c.width||F.y>c.y+c.height)},scrollUV:function(c,h){return this.vertex1.scrollUV(c,h),this.vertex2.scrollUV(c,h),this.vertex3.scrollUV(c,h),this},scaleUV:function(c,h){return this.vertex1.scaleUV(c,h),this.vertex2.scaleUV(c,h),this.vertex3.scaleUV(c,h),this},setColor:function(c){return this.vertex1.color=c,this.vertex2.color=c,this.vertex3.color=c,this},update:function(c,h,p,u,m,v,x,b){return this.vertex1.update(h,p,u,m,v,x,b,c),this.vertex2.update(h,p,u,m,v,x,b,c),this.vertex3.update(h,p,u,m,v,x,b,c),this},translate:function(c,h){void 0===h&&(h=0);var p=this.vertex1,u=this.vertex2,m=this.vertex3;return p.x+=c,p.y+=h,u.x+=c,u.y+=h,m.x+=c,m.y+=h,this},x:{get:function(){return this.getInCenter().x},set:function(c){var h=this.getInCenter();this.translate(c-h.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(c){var h=this.getInCenter();this.translate(0,c-h.y)}},alpha:{get:function(){return(this.vertex1.alpha+this.vertex2.alpha+this.vertex3.alpha)/3},set:function(c){this.vertex1.alpha=c,this.vertex2.alpha=c,this.vertex3.alpha=c}},depth:{get:function(){return(this.vertex1.vz+this.vertex2.vz+this.vertex3.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});S.exports=d},48803:(S,P,a)=>{var y=a(83997),C=a(95540),g=a(37867),f=a(25836),d=a(39318),c=new f,h=new f,p=new g;S.exports=function(m){var it,v=C(m,"mesh"),x=C(m,"texture",null),b=C(m,"frame"),T=C(m,"width",1),_=C(m,"height",T),A=C(m,"widthSegments",1),M=C(m,"heightSegments",A),I=C(m,"x",0),R=C(m,"y",0),F=C(m,"z",0),N=C(m,"rotateX",0),V=C(m,"rotateY",0),B=C(m,"rotateZ",0),G=C(m,"zIsUp",!0),Q=C(m,"isOrtho",!!v&&v.dirtyCache[11]),H=C(m,"colors",[16777215]),K=C(m,"alphas",[1]),tt=C(m,"tile",!1),at=C(m,"flipY",!1),lt=C(m,"width",null),q={faces:[],verts:[]};if(c.set(I,R,F),h.set(N,V,B),p.fromRotationXYTranslation(h,c,G),!x&&v)x=v.texture,b||(it=v.frame);else if(v&&"string"==typeof x)x=v.scene.sys.textures.get(x);else if(!x)return q;it||(it=x.get(b)),!lt&&Q&&x&&v&&(T=it.width/v.height,_=it.height/v.height);var ne,ae,Y=T/2,X=_/2,nt=Math.floor(A),dt=Math.floor(M),gt=nt+1,bt=dt+1,Et=T/nt,Bt=_/dt,Kt=[],Zt=[],fe=0,ke=1,Ye=0,Pe=1;it&&(fe=it.u0,ke=it.u1,at?(Ye=it.v1,Pe=it.v0):(Ye=it.v0,Pe=it.v1));var Qe=ke-fe,Se=Pe-Ye;for(ae=0;ae{var y=a(83997),C=a(37867),g=a(25836),f=a(39318),d=new g,c=new g,h=new C;S.exports=function(u,m,v,x,b,T,_,A,M,I){void 0===v&&(v=1),void 0===x&&(x=0),void 0===b&&(b=0),void 0===T&&(T=0),void 0===_&&(_=0),void 0===A&&(A=0),void 0===M&&(M=0),void 0===I&&(I=!0);var R={faces:[],verts:[]},F=u.materials;d.set(x,b,T),c.set(_,A,M),h.fromRotationXYTranslation(c,d,I);for(var N=0;N{var y=a(83997),C=a(39318);S.exports=function(f,d,c,h,p,u,m,v){if(void 0===h&&(h=!1),void 0===u&&(u=16777215),void 0===m&&(m=1),void 0===v&&(v=!1),f.length===d.length||h){var b,I,N,V,B,x={faces:[],vertices:[]},G=h?3:2,Q=Array.isArray(u),H=Array.isArray(m);if(Array.isArray(c)&&c.length>0)for(b=0;b{var P=!0,a="untitled",y="",C="";function g(T){var _=T.indexOf("#");return _>-1?T.substring(0,_):T}function f(T){return 0===T.models.length&&T.models.push({faces:[],name:a,textureCoords:[],vertexNormals:[],vertices:[]}),y="",T.models[T.models.length-1]}function d(T,_){_.models.push({faces:[],name:T.length>=2?T[1]:a,textureCoords:[],vertexNormals:[],vertices:[]}),y=""}function c(T){2===T.length&&(y=T[1])}function h(T,_){var A=T.length,M=A>=2?parseFloat(T[1]):0,I=A>=3?parseFloat(T[2]):0,R=A>=4?parseFloat(T[3]):0;f(_).vertices.push({x:M,y:I,z:R})}function p(T,_){var A=T.length,M=A>=2?parseFloat(T[1]):0,I=A>=3?parseFloat(T[2]):0,R=A>=4?parseFloat(T[3]):0;isNaN(M)&&(M=0),isNaN(I)&&(I=0),isNaN(R)&&(R=0),P&&(I=1-I),f(_).textureCoords.push({u:M,v:I,w:R})}function u(T,_){var A=T.length,M=A>=2?parseFloat(T[1]):0,I=A>=3?parseFloat(T[2]):0,R=A>=4?parseFloat(T[3]):0;f(_).vertexNormals.push({x:M,y:I,z:R})}function m(T,_){var A=T.length-1;if(!(A<3)){for(var M={group:y,material:C,vertices:[]},I=0;I3)){var V=0,B=0,G=0;V=parseInt(F[0],10),N>1&&""!==F[1]&&(B=parseInt(F[1],10)),N>2&&(G=parseInt(F[2],10)),0!==V&&(V<0&&(V=f(_).vertices.length+1+V),M.vertices.push({textureCoordsIndex:B-=1,vertexIndex:V-=1,vertexNormalIndex:G-=1}))}}f(_).faces.push(M)}}function v(T,_){T.length>=2&&_.materialLibraries.push(T[1])}function x(T){T.length>=2&&(C=T[1])}S.exports=function(T,_){void 0===_&&(_=!0),P=_;var A={materials:{},materialLibraries:[],models:[]};y="",C="";for(var M=T.split("\n"),I=0;I{var y=a(37589);S.exports=function(g){for(var f={},d=g.split("\n"),c="",h=0;h=2?Math.floor(255*u[2]):m,x=u.length>=3?Math.floor(255*u[3]):m;f[c]=y(m,v,x)}}}return f}},92570:S=>{S.exports=function(a,y,C,g){var f,d;if(void 0===C&&void 0===g){var c=a.getInCenter();f=c.x,d=c.y}var h=Math.cos(y),p=Math.sin(y),u=a.vertex1,m=a.vertex2,v=a.vertex3,x=u.x-f,b=u.y-d;u.set(x*h-b*p+f,x*p+b*h+d),m.set((x=m.x-f)*h-(b=m.y-d)*p+f,x*p+b*h+d),v.set((x=v.x-f)*h-(b=v.y-d)*p+f,x*p+b*h+d)}},39318:(S,P,a)=>{var y=a(83419),C=a(70554),g=a(25836),f=new y({Extends:g,initialize:function(c,h,p,u,m,v,x,b,T,_){void 0===v&&(v=16777215),void 0===x&&(x=1),void 0===b&&(b=0),void 0===T&&(T=0),void 0===_&&(_=0),g.call(this,c,h,p),this.vx=0,this.vy=0,this.vz=0,this.nx=b,this.ny=T,this.nz=_,this.u=u,this.v=m,this.color=v,this.alpha=x,this.tx=0,this.ty=0,this.ta=0,this.tu=u,this.tv=m},setUVs:function(d,c){return this.u=d,this.v=c,this.tu=d,this.tv=c,this},scrollUV:function(d,c){return this.tu+=d,this.tv+=c,this},scaleUV:function(d,c){return this.tu=this.u*d,this.tv=this.v*c,this},transformCoordinatesLocal:function(d,c,h,p){var u=this.x,m=this.y,v=this.z,x=d.val,T=u*x[1]+m*x[5]+v*x[9]+x[13],_=u*x[2]+m*x[6]+v*x[10]+x[14],A=u*x[3]+m*x[7]+v*x[11]+x[15];this.vx=(u*x[0]+m*x[4]+v*x[8]+x[12])/A*c,this.vy=-T/A*h,this.vz=p<=0?_/A:-_/A},resize:function(d,c,h,p,u,m){return this.x=d,this.y=c,this.vx=this.x*h,this.vy=-this.y*p,this.vz=0,u<.5?this.vx+=h*(.5-u):u>.5&&(this.vx-=h*(u-.5)),m<.5?this.vy+=p*(.5-m):m>.5&&(this.vy-=p*(m-.5)),this},update:function(d,c,h,p,u,m,v,x){var b=this.vx*d+this.vy*h+u,T=this.vx*c+this.vy*p+m;return v&&(b=Math.round(b),T=Math.round(T)),this.tx=b,this.ty=T,this.ta=this.alpha*x,this},load:function(d,c,h,p,u){return d[++h]=this.tx,d[++h]=this.ty,d[++h]=this.tu,d[++h]=this.tv,d[++h]=p,d[++h]=u,c[++h]=C.getTintAppendFloatAlpha(this.color,this.ta),h}});S.exports=f},73090:(S,P,a)=>{var y={Face:a(83997),GenerateGridVerts:a(48803),GenerateObjVerts:a(34684),GenerateVerts:a(92515),ParseObj:a(85048),ParseObjMaterial:a(61485),RotateFace:a(92570),Vertex:a(39318)};S.exports=y},96550:S=>{S.exports=function(a){return a.setTo(Math.ceil(a.x),Math.ceil(a.y))}},99706:(S,P,a)=>{var y=a(2141);S.exports=function(g){return new y(g.x,g.y)}},68010:S=>{S.exports=function(a,y){return y.setTo(a.x,a.y)}},27814:S=>{S.exports=function(a,y){return a.x===y.x&&a.y===y.y}},73565:S=>{S.exports=function(a){return a.setTo(Math.floor(a.x),Math.floor(a.y))}},87555:(S,P,a)=>{var y=a(2141);S.exports=function(g,f){if(void 0===f&&(f=new y),!Array.isArray(g))throw new Error("GetCentroid points argument must be an array");var d=g.length;if(d<1)throw new Error("GetCentroid points array must not be empty");if(1===d)f.x=g[0].x,f.y=g[0].y;else{for(var c=0;c{S.exports=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)}},44405:S=>{S.exports=function(a){return a.x*a.x+a.y*a.y}},20873:(S,P,a)=>{var y=a(87841);S.exports=function(g,f){void 0===f&&(f=new y);for(var d=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,u=0;ud&&(d=m.x),m.xh&&(h=m.y),m.y{var y=a(2141);S.exports=function(g,f,d,c){return void 0===d&&(d=0),void 0===c&&(c=new y),c.x=g.x+(f.x-g.x)*d,c.y=g.y+(f.y-g.y)*d,c}},55767:S=>{S.exports=function(a){return a.setTo(a.y,a.x)}},79432:(S,P,a)=>{var y=a(2141);S.exports=function(g,f){return void 0===f&&(f=new y),f.setTo(-g.x,-g.y)}},2141:(S,P,a)=>{var y=a(83419),C=a(23777),g=new y({initialize:function(d,c){void 0===d&&(d=0),void 0===c&&(c=d),this.type=C.POINT,this.x=d,this.y=c},setTo:function(f,d){return void 0===f&&(f=0),void 0===d&&(d=f),this.x=f,this.y=d,this}});S.exports=g},72930:(S,P,a)=>{var y=a(2141),C=a(44405);S.exports=function(f,d,c){void 0===c&&(c=new y);var p=(f.x*d.x+f.y*d.y)/C(d);return 0!==p&&(c.x=p*d.x,c.y=p*d.y),c}},62880:(S,P,a)=>{var y=a(2141);S.exports=function(g,f,d){void 0===d&&(d=new y);var c=g.x*f.x+g.y*f.y;return 0!==c&&(d.x=c*f.x,d.y=c*f.y),d}},15093:(S,P,a)=>{var y=a(28793);S.exports=function(g,f){if(0!==g.x||0!==g.y){var d=y(g);g.x/=d,g.y/=d}return g.x*=f,g.y*=f,g}},43711:(S,P,a)=>{var y=a(2141);y.Ceil=a(96550),y.Clone=a(99706),y.CopyFrom=a(68010),y.Equals=a(27814),y.Floor=a(73565),y.GetCentroid=a(87555),y.GetMagnitude=a(28793),y.GetMagnitudeSq=a(44405),y.GetRectangleFromPoints=a(20873),y.Interpolate=a(26152),y.Invert=a(55767),y.Negative=a(79432),y.Project=a(72930),y.ProjectUnit=a(62880),y.SetMagnitude=a(15093),S.exports=y},12306:(S,P,a)=>{var y=a(25717);S.exports=function(g){return new y(g.points)}},63814:S=>{S.exports=function(a,y,C){for(var g=!1,f=-1,d=a.points.length-1;++f{var y=a(63814);S.exports=function(g,f){return y(g,f.x,f.y)}},94811:S=>{"use strict";function P(q,it,Y){Y=Y||2;var bt,Et,Bt,Kt,Zt,ne,ae,X=it&&it.length,nt=X?it[0]*Y:q.length,dt=a(q,0,nt,Y,!0),gt=[];if(!dt||dt.next===dt.prev)return gt;if(X&&(dt=function h(q,it,Y,X){var dt,gt,Bt,nt=[];for(dt=0,gt=it.length;dt80*Y){bt=Bt=q[0],Et=Kt=q[1];for(var fe=Y;feBt&&(Bt=Zt),ne>Kt&&(Kt=ne);ae=0!==(ae=Math.max(Bt-bt,Kt-Et))?32767/ae:0}return C(dt,gt,Y,bt,Et,ae,0),gt}function a(q,it,Y,X,nt){var dt,gt;if(nt===lt(q,it,Y,X)>0)for(dt=it;dt=it;dt-=X)gt=K(dt,q[dt],q[dt+1],gt);return gt&&R(gt,gt.next)&&(tt(gt),gt=gt.next),gt}function y(q,it){if(!q)return q;it||(it=q);var X,Y=q;do{if(X=!1,Y.steiner||!R(Y,Y.next)&&0!==I(Y.prev,Y,Y.next))Y=Y.next;else{if(tt(Y),(Y=it=Y.prev)===Y.next)break;X=!0}}while(X||Y!==it);return it}function C(q,it,Y,X,nt,dt,gt){if(q){!gt&&dt&&function x(q,it,Y,X){var nt=q;do{0===nt.z&&(nt.z=T(nt.x,nt.y,it,Y,X)),nt.prevZ=nt.prev,nt.nextZ=nt.next,nt=nt.next}while(nt!==q);nt.prevZ.nextZ=null,nt.prevZ=null,function b(q){var it,Y,X,nt,dt,gt,bt,Et,Bt=1;do{for(Y=q,q=null,dt=null,gt=0;Y;){for(gt++,X=Y,bt=0,it=0;it0||Et>0&&X;)0!==bt&&(0===Et||!X||Y.z<=X.z)?(nt=Y,Y=Y.nextZ,bt--):(nt=X,X=X.nextZ,Et--),dt?dt.nextZ=nt:q=nt,nt.prevZ=dt,dt=nt;Y=X}dt.nextZ=null,Bt*=2}while(gt>1)}(nt)}(q,X,nt,dt);for(var Et,Bt,bt=q;q.prev!==q.next;)if(Et=q.prev,Bt=q.next,dt?f(q,X,nt,dt):g(q))it.push(Et.i/Y|0),it.push(q.i/Y|0),it.push(Bt.i/Y|0),tt(q),q=Bt.next,bt=Bt.next;else if((q=Bt)===bt){gt?1===gt?C(q=d(y(q),it,Y),it,Y,X,nt,dt,2):2===gt&&c(q,it,Y,X,nt,dt):C(y(q),it,Y,X,nt,dt,1);break}}}function g(q){var it=q.prev,Y=q,X=q.next;if(I(it,Y,X)>=0)return!1;for(var nt=it.x,dt=Y.x,gt=X.x,bt=it.y,Et=Y.y,Bt=X.y,Kt=ntdt?nt>gt?nt:gt:dt>gt?dt:gt,ae=bt>Et?bt>Bt?bt:Bt:Et>Bt?Et:Bt,fe=X.next;fe!==it;){if(fe.x>=Kt&&fe.x<=ne&&fe.y>=Zt&&fe.y<=ae&&A(nt,bt,dt,Et,gt,Bt,fe.x,fe.y)&&I(fe.prev,fe,fe.next)>=0)return!1;fe=fe.next}return!0}function f(q,it,Y,X){var nt=q.prev,dt=q,gt=q.next;if(I(nt,dt,gt)>=0)return!1;for(var bt=nt.x,Et=dt.x,Bt=gt.x,Kt=nt.y,Zt=dt.y,ne=gt.y,ae=btEt?bt>Bt?bt:Bt:Et>Bt?Et:Bt,Ye=Kt>Zt?Kt>ne?Kt:ne:Zt>ne?Zt:ne,Pe=T(ae,fe,it,Y,X),Qe=T(ke,Ye,it,Y,X),Se=q.prevZ,ei=q.nextZ;Se&&Se.z>=Pe&&ei&&ei.z<=Qe;){if(Se.x>=ae&&Se.x<=ke&&Se.y>=fe&&Se.y<=Ye&&Se!==nt&&Se!==gt&&A(bt,Kt,Et,Zt,Bt,ne,Se.x,Se.y)&&I(Se.prev,Se,Se.next)>=0||(Se=Se.prevZ,ei.x>=ae&&ei.x<=ke&&ei.y>=fe&&ei.y<=Ye&&ei!==nt&&ei!==gt&&A(bt,Kt,Et,Zt,Bt,ne,ei.x,ei.y)&&I(ei.prev,ei,ei.next)>=0))return!1;ei=ei.nextZ}for(;Se&&Se.z>=Pe;){if(Se.x>=ae&&Se.x<=ke&&Se.y>=fe&&Se.y<=Ye&&Se!==nt&&Se!==gt&&A(bt,Kt,Et,Zt,Bt,ne,Se.x,Se.y)&&I(Se.prev,Se,Se.next)>=0)return!1;Se=Se.prevZ}for(;ei&&ei.z<=Qe;){if(ei.x>=ae&&ei.x<=ke&&ei.y>=fe&&ei.y<=Ye&&ei!==nt&&ei!==gt&&A(bt,Kt,Et,Zt,Bt,ne,ei.x,ei.y)&&I(ei.prev,ei,ei.next)>=0)return!1;ei=ei.nextZ}return!0}function d(q,it,Y){var X=q;do{var nt=X.prev,dt=X.next.next;!R(nt,dt)&&F(nt,X,X.next,dt)&&G(nt,dt)&&G(dt,nt)&&(it.push(nt.i/Y|0),it.push(X.i/Y|0),it.push(dt.i/Y|0),tt(X),tt(X.next),X=q=dt),X=X.next}while(X!==q);return y(X)}function c(q,it,Y,X,nt,dt){var gt=q;do{for(var bt=gt.next.next;bt!==gt.prev;){if(gt.i!==bt.i&&M(gt,bt)){var Et=H(gt,bt);return gt=y(gt,gt.next),Et=y(Et,Et.next),C(gt,it,Y,X,nt,dt,0),void C(Et,it,Y,X,nt,dt,0)}bt=bt.next}gt=gt.next}while(gt!==q)}function p(q,it){return q.x-it.x}function u(q,it){var Y=function m(q,it){var gt,Y=it,X=q.x,nt=q.y,dt=-1/0;do{if(nt<=Y.y&&nt>=Y.next.y&&Y.next.y!==Y.y){var bt=Y.x+(nt-Y.y)*(Y.next.x-Y.x)/(Y.next.y-Y.y);if(bt<=X&&bt>dt&&(dt=bt,gt=Y.x=Y.x&&Y.x>=Bt&&X!==Y.x&&A(ntgt.x||Y.x===gt.x&&v(gt,Y)))&&(gt=Y,Zt=ne)),Y=Y.next}while(Y!==Et);return gt}(q,it);if(!Y)return it;var X=H(Y,q);return y(X,X.next),y(Y,Y.next)}function v(q,it){return I(q.prev,q,it.prev)<0&&I(it.next,q,q.next)<0}function T(q,it,Y,X,nt){return(q=1431655765&((q=858993459&((q=252645135&((q=16711935&((q=(q-Y)*nt|0)|q<<8))|q<<4))|q<<2))|q<<1))|(it=1431655765&((it=858993459&((it=252645135&((it=16711935&((it=(it-X)*nt|0)|it<<8))|it<<4))|it<<2))|it<<1))<<1}function _(q){var it=q,Y=q;do{(it.x=(q-gt)*(dt-bt)&&(q-gt)*(X-bt)>=(Y-gt)*(it-bt)&&(Y-gt)*(dt-bt)>=(nt-gt)*(X-bt)}function M(q,it){return q.next.i!==it.i&&q.prev.i!==it.i&&!function B(q,it){var Y=q;do{if(Y.i!==q.i&&Y.next.i!==q.i&&Y.i!==it.i&&Y.next.i!==it.i&&F(Y,Y.next,q,it))return!0;Y=Y.next}while(Y!==q);return!1}(q,it)&&(G(q,it)&&G(it,q)&&function Q(q,it){var Y=q,X=!1,nt=(q.x+it.x)/2,dt=(q.y+it.y)/2;do{Y.y>dt!=Y.next.y>dt&&Y.next.y!==Y.y&&nt<(Y.next.x-Y.x)*(dt-Y.y)/(Y.next.y-Y.y)+Y.x&&(X=!X),Y=Y.next}while(Y!==q);return X}(q,it)&&(I(q.prev,q,it.prev)||I(q,it.prev,it))||R(q,it)&&I(q.prev,q,q.next)>0&&I(it.prev,it,it.next)>0)}function I(q,it,Y){return(it.y-q.y)*(Y.x-it.x)-(it.x-q.x)*(Y.y-it.y)}function R(q,it){return q.x===it.x&&q.y===it.y}function F(q,it,Y,X){var nt=V(I(q,it,Y)),dt=V(I(q,it,X)),gt=V(I(Y,X,q)),bt=V(I(Y,X,it));return!!(nt!==dt&>!==bt||0===nt&&N(q,Y,it)||0===dt&&N(q,X,it)||0===gt&&N(Y,q,X)||0===bt&&N(Y,it,X))}function N(q,it,Y){return it.x<=Math.max(q.x,Y.x)&&it.x>=Math.min(q.x,Y.x)&&it.y<=Math.max(q.y,Y.y)&&it.y>=Math.min(q.y,Y.y)}function V(q){return q>0?1:q<0?-1:0}function G(q,it){return I(q.prev,q,q.next)<0?I(q,it,q.next)>=0&&I(q,q.prev,it)>=0:I(q,it,q.prev)<0||I(q,q.next,it)<0}function H(q,it){var Y=new at(q.i,q.x,q.y),X=new at(it.i,it.x,it.y),nt=q.next,dt=it.prev;return q.next=it,it.prev=q,Y.next=nt,nt.prev=Y,X.next=Y,Y.prev=X,dt.next=X,X.prev=dt,X}function K(q,it,Y,X){var nt=new at(q,it,Y);return X?(nt.next=X.next,nt.prev=X,X.next.prev=nt,X.next=nt):(nt.prev=nt,nt.next=nt),nt}function tt(q){q.next.prev=q.prev,q.prev.next=q.next,q.prevZ&&(q.prevZ.nextZ=q.nextZ),q.nextZ&&(q.nextZ.prevZ=q.prevZ)}function at(q,it,Y){this.i=q,this.x=it,this.y=Y,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function lt(q,it,Y,X){for(var nt=0,dt=it,gt=Y-X;dt0&&Y.holes.push(X+=q[nt-1].length)}return Y},S.exports=P},13829:(S,P,a)=>{var y=a(87841);S.exports=function(g,f){void 0===f&&(f=new y);for(var u,d=1/0,c=1/0,h=-d,p=-c,m=0;m{S.exports=function(a,y){void 0===y&&(y=[]);for(var C=0;C{var y=a(35001),C=a(23031),g=a(30052);S.exports=function(d,c,h,p){void 0===p&&(p=[]);var u=d.points,m=g(d);!c&&h>0&&(c=m/h);for(var v=0;vb+I)){var R=M.getPoint((x-b)/I);p.push(R);break}b+=I}return p}},30052:(S,P,a)=>{var y=a(35001),C=a(23031);S.exports=function(f){for(var d=f.points,c=0,h=0;h{var y=a(83419),C=a(63814),g=a(9564),f=a(23777),d=new y({initialize:function(h){this.type=f.POLYGON,this.area=0,this.points=[],h&&this.setTo(h)},contains:function(c,h){return C(this,c,h)},setTo:function(c){if(this.area=0,this.points=[],"string"==typeof c&&(c=c.split(" ")),!Array.isArray(c))return this;for(var h,p=0;p{S.exports=function(a){return a.points.reverse(),a}},29524:S=>{function P(d,c){var h=d.x-c.x,p=d.y-c.y;return h*h+p*p}function a(d,c,h){var p=c.x,u=c.y,m=h.x-p,v=h.y-u;if(0!==m||0!==v){var x=((d.x-p)*m+(d.y-u)*v)/(m*m+v*v);x>1?(p=h.x,u=h.y):x>0&&(p+=m*x,u+=v*x)}return(m=d.x-p)*m+(v=d.y-u)*v}function C(d,c,h,p,u){for(var v,m=p,x=c+1;xm&&(v=x,m=b)}m>p&&(v-c>1&&C(d,c,v,p,u),u.push(d[v]),h-v>1&&C(d,v,h,p,u))}function g(d,c){var h=d.length-1,p=[d[0]];return C(d,0,h,c,p),p.push(d[h]),p}S.exports=function(d,c,h){void 0===c&&(c=1),void 0===h&&(h=!1);var p=d.points;if(p.length>2){var u=c*c;h||(p=function y(d,c){for(var u,h=d[0],p=[h],m=1,v=d.length;mc&&(p.push(u),h=u);return h!==u&&p.push(u),p}(p,u)),d.setTo(g(p,u))}return d}},5469:S=>{var P=function(y,C){return y[0]=C[0],y[1]=C[1],y};S.exports=function(y){var C,g=[],f=y.points;for(C=0;C0&&d.push(P([0,0],g[0])),C=0;C1&&d.push(P([0,0],g[g.length-1])),y.setTo(d)}},24709:S=>{S.exports=function(a,y,C){for(var g=a.points,f=0;f{var y=a(25717);y.Clone=a(12306),y.Contains=a(63814),y.ContainsPoint=a(99338),y.Earcut=a(94811),y.GetAABB=a(13829),y.GetNumberArray=a(26173),y.GetPoints=a(9564),y.Perimeter=a(30052),y.Reverse=a(8133),y.Simplify=a(29524),y.Smooth=a(5469),y.Translate=a(24709),S.exports=y},62224:S=>{S.exports=function(a){return a.width*a.height}},98615:S=>{S.exports=function(a){return a.x=Math.ceil(a.x),a.y=Math.ceil(a.y),a}},31688:S=>{S.exports=function(a){return a.x=Math.ceil(a.x),a.y=Math.ceil(a.y),a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),a}},67502:S=>{S.exports=function(a,y,C){return a.x=y-a.width/2,a.y=C-a.height/2,a}},65085:(S,P,a)=>{var y=a(87841);S.exports=function(g){return new y(g.x,g.y,g.width,g.height)}},37303:S=>{S.exports=function(a,y,C){return!(a.width<=0||a.height<=0)&&a.x<=y&&a.x+a.width>=y&&a.y<=C&&a.y+a.height>=C}},96553:(S,P,a)=>{var y=a(37303);S.exports=function(g,f){return y(g,f.x,f.y)}},70273:S=>{S.exports=function(a,y){return!(y.width*y.height>a.width*a.height)&&y.x>a.x&&y.xa.x&&y.righta.y&&y.ya.y&&y.bottom{S.exports=function(a,y){return y.setTo(a.x,a.y,a.width,a.height)}},77493:S=>{S.exports=function(a,y){return void 0===y&&(y=[]),y.push({x:a.x,y:a.y}),y.push({x:a.right,y:a.y}),y.push({x:a.right,y:a.bottom}),y.push({x:a.x,y:a.bottom}),y}},9219:S=>{S.exports=function(a,y){return a.x===y.x&&a.y===y.y&&a.width===y.width&&a.height===y.height}},53751:(S,P,a)=>{var y=a(8249);S.exports=function(g,f){var d=y(g);return d{var y=a(8249);S.exports=function(g,f){var d=y(g);return d>y(f)?g.setSize(f.height*d,f.height):g.setSize(f.width,f.width/d),g.setPosition(f.centerX-g.width/2,f.centerY-g.height/2)}},80774:S=>{S.exports=function(a){return a.x=Math.floor(a.x),a.y=Math.floor(a.y),a}},83859:S=>{S.exports=function(a){return a.x=Math.floor(a.x),a.y=Math.floor(a.y),a.width=Math.floor(a.width),a.height=Math.floor(a.height),a}},19217:(S,P,a)=>{var y=a(87841),C=a(36383);S.exports=function(f,d){if(void 0===d&&(d=new y),0===f.length)return d;for(var m,v,x,c=Number.MAX_VALUE,h=Number.MAX_VALUE,p=C.MIN_SAFE_INTEGER,u=C.MIN_SAFE_INTEGER,b=0;b{var y=a(87841);S.exports=function(g,f,d,c,h){return void 0===h&&(h=new y),h.setTo(Math.min(g,d),Math.min(f,c),Math.abs(g-d),Math.abs(f-c))}},8249:S=>{S.exports=function(a){return 0===a.height?NaN:a.width/a.height}},27165:(S,P,a)=>{var y=a(2141);S.exports=function(g,f){return void 0===f&&(f=new y),f.x=g.centerX,f.y=g.centerY,f}},20812:(S,P,a)=>{var y=a(13019),C=a(2141);S.exports=function(f,d,c){if(void 0===c&&(c=new C),d<=0||d>=1)return c.x=f.x,c.y=f.y,c;var h=y(f)*d;return d>.5?(h-=f.width+f.height)<=f.width?(c.x=f.right-h,c.y=f.bottom):(c.x=f.x,c.y=f.bottom-(h-f.width)):h<=f.width?(c.x=f.x+h,c.y=f.y):(c.x=f.right,c.y=f.y+(h-f.width)),c}},34819:(S,P,a)=>{var y=a(20812),C=a(13019);S.exports=function(f,d,c,h){void 0===h&&(h=[]),!d&&c>0&&(d=C(f)/c);for(var p=0;p{var y=a(2141);S.exports=function(g,f){return void 0===f&&(f=new y),f.x=g.width,f.y=g.height,f}},86091:(S,P,a)=>{var y=a(67502);S.exports=function(g,f,d){var c=g.centerX,h=g.centerY;return g.setSize(g.width+2*f,g.height+2*d),y(g,c,h)}},53951:(S,P,a)=>{var y=a(87841),C=a(59996);S.exports=function(f,d,c){return void 0===c&&(c=new y),C(f,d)?(c.x=Math.max(f.x,d.x),c.y=Math.max(f.y,d.y),c.width=Math.min(f.right,d.right)-c.x,c.height=Math.min(f.bottom,d.bottom)-c.y):c.setEmpty(),c}},14649:(S,P,a)=>{var y=a(13019),C=a(2141);S.exports=function(f,d,c,h){if(void 0===h&&(h=[]),!d&&!c)return h;d?c=Math.round(y(f)/d):d=y(f)/c;for(var p=f.x,u=f.y,m=0,v=0;v=f.right&&(m=1,u+=p-f.right,p=f.right);break;case 1:(u+=d)>=f.bottom&&(m=2,p-=u-f.bottom,u=f.bottom);break;case 2:(p-=d)<=f.left&&(m=3,u-=f.left-p,p=f.left);break;case 3:(u-=d)<=f.top&&(m=0,u=f.top)}return h}},33595:S=>{S.exports=function(a,y){for(var C=a.x,g=a.right,f=a.y,d=a.bottom,c=0;c{S.exports=function(a,y){var C=Math.min(a.x,y.x),g=Math.max(a.right,y.right);a.x=C,a.width=g-C;var f=Math.min(a.y,y.y),d=Math.max(a.bottom,y.bottom);return a.y=f,a.height=d-f,a}},92171:S=>{S.exports=function(a,y,C){var g=Math.min(a.x,y),f=Math.max(a.right,y);a.x=g,a.width=f-g;var d=Math.min(a.y,C),c=Math.max(a.bottom,C);return a.y=d,a.height=c-d,a}},42981:S=>{S.exports=function(a,y,C){return a.x+=y,a.y+=C,a}},46907:S=>{S.exports=function(a,y){return a.x+=y.x,a.y+=y.y,a}},60170:S=>{S.exports=function(a,y){return a.xy.x&&a.yy.y}},13019:S=>{S.exports=function(a){return 2*(a.width+a.height)}},85133:(S,P,a)=>{var y=a(2141),C=a(39506);S.exports=function(f,d,c){void 0===c&&(c=new y),d=C(d);var h=Math.sin(d),p=Math.cos(d),u=p>0?f.width/2:f.width/-2,m=h>0?f.height/2:f.height/-2;return Math.abs(u*h){var y=a(2141);S.exports=function(g,f){return void 0===f&&(f=new y),f.x=g.x+Math.random()*g.width,f.y=g.y+Math.random()*g.height,f}},86470:(S,P,a)=>{var y=a(30976),C=a(70273),g=a(2141);S.exports=function(d,c,h){if(void 0===h&&(h=new g),C(d,c))switch(y(0,3)){case 0:h.x=d.x+Math.random()*(c.right-d.x),h.y=d.y+Math.random()*(c.top-d.y);break;case 1:h.x=c.x+Math.random()*(d.right-c.x),h.y=c.bottom+Math.random()*(d.bottom-c.bottom);break;case 2:h.x=d.x+Math.random()*(c.x-d.x),h.y=c.y+Math.random()*(d.bottom-c.y);break;case 3:h.x=c.right+Math.random()*(d.right-c.right),h.y=d.y+Math.random()*(c.bottom-d.y)}return h}},87841:(S,P,a)=>{var y=a(83419),C=a(37303),g=a(20812),f=a(34819),d=a(23777),c=a(23031),h=a(26597),p=new y({initialize:function(m,v,x,b){void 0===m&&(m=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===b&&(b=0),this.type=d.RECTANGLE,this.x=m,this.y=v,this.width=x,this.height=b},contains:function(u,m){return C(this,u,m)},getPoint:function(u,m){return g(this,u,m)},getPoints:function(u,m,v){return f(this,u,m,v)},getRandomPoint:function(u){return h(this,u)},setTo:function(u,m,v,x){return this.x=u,this.y=m,this.width=v,this.height=x,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(u,m){return void 0===m&&(m=u),this.x=u,this.y=m,this},setSize:function(u,m){return void 0===m&&(m=u),this.width=u,this.height=m,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(u){return void 0===u&&(u=new c),u.setTo(this.x,this.y,this.right,this.y),u},getLineB:function(u){return void 0===u&&(u=new c),u.setTo(this.right,this.y,this.right,this.bottom),u},getLineC:function(u){return void 0===u&&(u=new c),u.setTo(this.right,this.bottom,this.x,this.bottom),u},getLineD:function(u){return void 0===u&&(u=new c),u.setTo(this.x,this.bottom,this.x,this.y),u},left:{get:function(){return this.x},set:function(u){this.width=u>=this.right?0:this.right-u,this.x=u}},right:{get:function(){return this.x+this.width},set:function(u){this.width=u<=this.x?0:u-this.x}},top:{get:function(){return this.y},set:function(u){this.height=u>=this.bottom?0:this.bottom-u,this.y=u}},bottom:{get:function(){return this.y+this.height},set:function(u){this.height=u<=this.y?0:u-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(u){this.x=u-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(u){this.y=u-this.height/2}}});S.exports=p},94845:S=>{S.exports=function(a,y){return a.width===y.width&&a.height===y.height}},31730:S=>{S.exports=function(a,y,C){return void 0===C&&(C=y),a.width*=y,a.height*=C,a}},36899:(S,P,a)=>{var y=a(87841);S.exports=function(g,f,d){void 0===d&&(d=new y);var c=Math.min(g.x,f.x),h=Math.min(g.y,f.y),p=Math.max(g.right,f.right)-c,u=Math.max(g.bottom,f.bottom)-h;return d.setTo(c,h,p,u)}},93232:(S,P,a)=>{var y=a(87841);y.Area=a(62224),y.Ceil=a(98615),y.CeilAll=a(31688),y.CenterOn=a(67502),y.Clone=a(65085),y.Contains=a(37303),y.ContainsPoint=a(96553),y.ContainsRect=a(70273),y.CopyFrom=a(43459),y.Decompose=a(77493),y.Equals=a(9219),y.FitInside=a(53751),y.FitOutside=a(16088),y.Floor=a(80774),y.FloorAll=a(83859),y.FromPoints=a(19217),y.FromXY=a(9477),y.GetAspectRatio=a(8249),y.GetCenter=a(27165),y.GetPoint=a(20812),y.GetPoints=a(34819),y.GetSize=a(51313),y.Inflate=a(86091),y.Intersection=a(53951),y.MarchingAnts=a(14649),y.MergePoints=a(33595),y.MergeRect=a(20074),y.MergeXY=a(92171),y.Offset=a(42981),y.OffsetPoint=a(46907),y.Overlaps=a(60170),y.Perimeter=a(13019),y.PerimeterPoint=a(85133),y.Random=a(26597),y.RandomOutside=a(86470),y.SameDimensions=a(94845),y.Scale=a(31730),y.Union=a(36899),S.exports=y},41658:S=>{S.exports=function(a){var y=a.x1,C=a.y1;return Math.abs(((a.x3-y)*(a.y2-C)-(a.x2-y)*(a.y3-C))/2)}},39208:(S,P,a)=>{var y=a(16483);S.exports=function(g,f,d){var c=d*(Math.sqrt(3)/2);return new y(g,f,g+d/2,f+c,g-d/2,f+c)}},39545:(S,P,a)=>{var y=a(94811),C=a(16483);S.exports=function(f,d,c,h,p){void 0===d&&(d=null),void 0===c&&(c=1),void 0===h&&(h=1),void 0===p&&(p=[]);for(var m,v,x,u=y(f,d),R=0;R{var y=a(16483);S.exports=function(g,f,d,c){return void 0===c&&(c=d),new y(g,f,g,f-c,g+d,f)}},23707:(S,P,a)=>{var y=a(97523),C=a(13584);S.exports=function(f,d,c,h){void 0===h&&(h=y);var p=h(f);return C(f,d-p.x,c-p.y)}},97523:(S,P,a)=>{var y=a(2141);S.exports=function(g,f){return void 0===f&&(f=new y),f.x=(g.x1+g.x2+g.x3)/3,f.y=(g.y1+g.y2+g.y3)/3,f}},24951:(S,P,a)=>{var y=a(26099);function C(f,d,c,h){return f*h-d*c}S.exports=function(f,d){void 0===d&&(d=new y);var c=f.x3,h=f.y3,p=f.x1-c,u=f.y1-h,m=f.x2-c,v=f.y2-h,x=2*C(p,u,m,v),b=C(u,p*p+u*u,v,m*m+v*v),T=C(p,p*p+u*u,m,m*m+v*v);return d.x=c-b/x,d.y=h+T/x,d}},85614:(S,P,a)=>{var y=a(96503);S.exports=function(g,f){void 0===f&&(f=new y);var I,R,d=g.x1,c=g.y1,h=g.x2,p=g.y2,u=g.x3,m=g.y3,v=h-d,x=p-c,b=u-d,T=m-c,_=v*(d+h)+x*(c+p),A=b*(d+u)+T*(c+m),M=2*(v*(m-p)-x*(u-h));if(Math.abs(M)<1e-6){var F=Math.min(d,h,u),N=Math.min(c,p,m);I=.5*(Math.max(d,h,u)-F),R=.5*(Math.max(c,p,m)-N),f.x=F+I,f.y=N+R,f.radius=Math.sqrt(I*I+R*R)}else f.x=(T*_-x*A)/M,f.y=(v*A-b*_)/M,I=f.x-d,R=f.y-c,f.radius=Math.sqrt(I*I+R*R);return f}},74422:(S,P,a)=>{var y=a(16483);S.exports=function(g){return new y(g.x1,g.y1,g.x2,g.y2,g.x3,g.y3)}},10690:S=>{S.exports=function(a,y,C){var g=a.x3-a.x1,f=a.y3-a.y1,d=a.x2-a.x1,c=a.y2-a.y1,h=y-a.x1,p=C-a.y1,u=g*g+f*f,m=g*d+f*c,v=g*h+f*p,x=d*d+c*c,b=d*h+c*p,T=u*x-m*m,_=0===T?0:1/T,A=(x*v-m*b)*_,M=(u*b-m*v)*_;return A>=0&&M>=0&&A+M<1}},48653:S=>{S.exports=function(a,y,C,g){void 0===C&&(C=!1),void 0===g&&(g=[]);for(var b,T,_,A,M,I,f=a.x3-a.x1,d=a.y3-a.y1,c=a.x2-a.x1,h=a.y2-a.y1,p=f*f+d*d,u=f*c+d*h,m=c*c+h*h,v=p*m-u*u,x=0===v?0:1/v,R=a.x1,F=a.y1,N=0;N=0&&T>=0&&b+T<1&&(g.push({x:y[N].x,y:y[N].y}),C)));N++);return g}},96006:(S,P,a)=>{var y=a(10690);S.exports=function(g,f){return y(g,f.x,f.y)}},71326:S=>{S.exports=function(a,y){return y.setTo(a.x1,a.y1,a.x2,a.y2,a.x3,a.y3)}},71694:S=>{S.exports=function(a,y){return void 0===y&&(y=[]),y.push({x:a.x1,y:a.y1}),y.push({x:a.x2,y:a.y2}),y.push({x:a.x3,y:a.y3}),y}},33522:S=>{S.exports=function(a,y){return a.x1===y.x1&&a.y1===y.y1&&a.x2===y.x2&&a.y2===y.y2&&a.x3===y.x3&&a.y3===y.y3}},20437:(S,P,a)=>{var y=a(2141),C=a(35001);S.exports=function(f,d,c){void 0===c&&(c=new y);var h=f.getLineA(),p=f.getLineB(),u=f.getLineC();if(d<=0||d>=1)return c.x=h.x1,c.y=h.y1,c;var m=C(h),v=C(p),x=C(u),T=(m+v+x)*d,_=0;return Tm+v?(c.x=u.x1+(u.x2-u.x1)*(_=(T-=m+v)/x),c.y=u.y1+(u.y2-u.y1)*_):(c.x=p.x1+(p.x2-p.x1)*(_=(T-=m)/v),c.y=p.y1+(p.y2-p.y1)*_),c}},80672:(S,P,a)=>{var y=a(35001),C=a(2141);S.exports=function(f,d,c,h){void 0===h&&(h=[]);var p=f.getLineA(),u=f.getLineB(),m=f.getLineC(),v=y(p),x=y(u),b=y(m),T=v+x+b;!d&&c>0&&(d=T/c);for(var _=0;_v+x?(I.x=m.x1+(m.x2-m.x1)*(M=(A-=v+x)/b),I.y=m.y1+(m.y2-m.y1)*M):(I.x=u.x1+(u.x2-u.x1)*(M=(A-=v)/x),I.y=u.y1+(u.y2-u.y1)*M),h.push(I)}return h}},39757:(S,P,a)=>{var y=a(2141);function C(f,d,c,h){var p=f-c,u=d-h;return Math.sqrt(p*p+u*u)}S.exports=function(f,d){void 0===d&&(d=new y);var c=f.x1,h=f.y1,p=f.x2,u=f.y2,m=f.x3,v=f.y3,x=C(m,v,p,u),b=C(c,h,m,v),T=C(p,u,c,h),_=x+b+T;return d.x=(c*x+p*b+m*T)/_,d.y=(h*x+u*b+v*T)/_,d}},13584:S=>{S.exports=function(a,y,C){return a.x1+=y,a.y1+=C,a.x2+=y,a.y2+=C,a.x3+=y,a.y3+=C,a}},1376:(S,P,a)=>{var y=a(35001);S.exports=function(g){var f=g.getLineA(),d=g.getLineB(),c=g.getLineC();return y(f)+y(d)+y(c)}},90260:(S,P,a)=>{var y=a(2141);S.exports=function(g,f){void 0===f&&(f=new y);var d=g.x2-g.x1,c=g.y2-g.y1,h=g.x3-g.x1,p=g.y3-g.y1,u=Math.random(),m=Math.random();return u+m>=1&&(u=1-u,m=1-m),f.x=g.x1+(d*u+h*m),f.y=g.y1+(c*u+p*m),f}},52172:(S,P,a)=>{var y=a(99614),C=a(39757);S.exports=function(f,d){var c=C(f);return y(f,c.x,c.y,d)}},49907:(S,P,a)=>{var y=a(99614);S.exports=function(g,f,d){return y(g,f.x,f.y,d)}},99614:S=>{S.exports=function(a,y,C,g){var f=Math.cos(g),d=Math.sin(g),c=a.x1-y,h=a.y1-C;return a.x1=c*f-h*d+y,a.y1=c*d+h*f+C,a.x2=(c=a.x2-y)*f-(h=a.y2-C)*d+y,a.y2=c*d+h*f+C,a.x3=(c=a.x3-y)*f-(h=a.y3-C)*d+y,a.y3=c*d+h*f+C,a}},16483:(S,P,a)=>{var y=a(83419),C=a(10690),g=a(20437),f=a(80672),d=a(23777),c=a(23031),h=a(90260),p=new y({initialize:function(m,v,x,b,T,_){void 0===m&&(m=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===b&&(b=0),void 0===T&&(T=0),void 0===_&&(_=0),this.type=d.TRIANGLE,this.x1=m,this.y1=v,this.x2=x,this.y2=b,this.x3=T,this.y3=_},contains:function(u,m){return C(this,u,m)},getPoint:function(u,m){return g(this,u,m)},getPoints:function(u,m,v){return f(this,u,m,v)},getRandomPoint:function(u){return h(this,u)},setTo:function(u,m,v,x,b,T){return void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===b&&(b=0),void 0===T&&(T=0),this.x1=u,this.y1=m,this.x2=v,this.y2=x,this.x3=b,this.y3=T,this},getLineA:function(u){return void 0===u&&(u=new c),u.setTo(this.x1,this.y1,this.x2,this.y2),u},getLineB:function(u){return void 0===u&&(u=new c),u.setTo(this.x2,this.y2,this.x3,this.y3),u},getLineC:function(u){return void 0===u&&(u=new c),u.setTo(this.x3,this.y3,this.x1,this.y1),u},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(u){var m;this.x1-=m=this.x1<=this.x2&&this.x1<=this.x3?this.x1-u:this.x2<=this.x1&&this.x2<=this.x3?this.x2-u:this.x3-u,this.x2-=m,this.x3-=m}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(u){var m;this.x1-=m=this.x1>=this.x2&&this.x1>=this.x3?this.x1-u:this.x2>=this.x1&&this.x2>=this.x3?this.x2-u:this.x3-u,this.x2-=m,this.x3-=m}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(u){var m;this.y1-=m=this.y1<=this.y2&&this.y1<=this.y3?this.y1-u:this.y2<=this.y1&&this.y2<=this.y3?this.y2-u:this.y3-u,this.y2-=m,this.y3-=m}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(u){var m;this.y1-=m=this.y1>=this.y2&&this.y1>=this.y3?this.y1-u:this.y2>=this.y1&&this.y2>=this.y3?this.y2-u:this.y3-u,this.y2-=m,this.y3-=m}}});S.exports=p},84435:(S,P,a)=>{var y=a(16483);y.Area=a(41658),y.BuildEquilateral=a(39208),y.BuildFromPolygon=a(39545),y.BuildRight=a(90301),y.CenterOn=a(23707),y.Centroid=a(97523),y.CircumCenter=a(24951),y.CircumCircle=a(85614),y.Clone=a(74422),y.Contains=a(10690),y.ContainsArray=a(48653),y.ContainsPoint=a(96006),y.CopyFrom=a(71326),y.Decompose=a(71694),y.Equals=a(33522),y.GetPoint=a(20437),y.GetPoints=a(80672),y.InCenter=a(39757),y.Perimeter=a(1376),y.Offset=a(13584),y.Random=a(90260),y.Rotate=a(52172),y.RotateAroundPoint=a(49907),y.RotateAroundXY=a(99614),S.exports=y},74457:S=>{S.exports=function(a,y,C){return{gameObject:a,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:y,hitAreaCallback:C,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}}},84409:S=>{S.exports=function(a,y){return function(C,g,f,d){var c=a.getPixelAlpha(g,f,d.texture.key,d.frame.name);return c&&c>=y}}},7003:(S,P,a)=>{var y=a(83419),C=a(93301),g=a(50792),f=a(8214),d=a(8443),c=a(78970),h=a(85098),p=a(42515),u=a(36210),m=a(61340),v=a(85955),x=new y({initialize:function(T,_){this.game=T,this.config=_,this.enabled=!0,this.events=new g,this.isOver=!0,this.defaultCursor="",this.keyboard=_.inputKeyboard?new c(this):null,this.mouse=_.inputMouse?new h(this):null,this.touch=_.inputTouch?new u(this):null,this.pointers=[],this.pointersTotal=_.inputActivePointers;for(var A=0;A<=this.pointersTotal;A++){var M=new p(this,A);M.smoothFactor=_.inputSmoothFactor,this.pointers.push(M)}this.mousePointer=_.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new m,this._tempMatrix2=new m,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],T.events.once(d.BOOT,this.boot,this)},boot:function(){var b=this.game,T=b.events;this.canvas=b.canvas,this.scaleManager=b.scale,this.events.emit(f.MANAGER_BOOT),T.on(d.PRE_RENDER,this.preRender,this),T.once(d.DESTROY,this.destroy,this)},setCanvasOver:function(b){this.isOver=!0,this.events.emit(f.GAME_OVER,b)},setCanvasOut:function(b){this.isOver=!1,this.events.emit(f.GAME_OUT,b)},preRender:function(){var b=this.game.loop.now,T=this.game.loop.delta,_=this.game.scene.getScenes(!0,!0);this.time=b,this.events.emit(f.MANAGER_UPDATE);for(var A=0;A<_.length;A++){var M=_[A];if(M.sys.input&&M.sys.input.updatePoll(b,T)&&this.globalTopOnly)return}},setDefaultCursor:function(b){this.defaultCursor=b,this.canvas.style.cursor!==b&&(this.canvas.style.cursor=b)},setCursor:function(b){b.cursor&&(this.canvas.style.cursor=b.cursor)},resetCursor:function(b,T){(T||b&&b.cursor)&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(b){void 0===b&&(b=1);var T=[];this.pointersTotal+b>10&&(b=10-this.pointersTotal);for(var _=0;_{var y=a(96503),C=a(87902),g=a(83419),f=a(93301),d=a(74457),c=a(84409),h=a(20339),p=a(8497),u=a(81154),m=a(8214),v=a(50792),x=a(95540),b=a(23777),T=a(89639),_=a(41212),A=a(37277),M=a(87841),I=a(37303),R=a(44594),F=a(16483),N=a(10690),V=new g({Extends:v,initialize:function(G){v.call(this),this.scene=G,this.systems=G.sys,this.settings=G.sys.settings,this.manager=G.sys.game.input,this.pluginEvents=new v,this.enabled=!0,T.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var Q={cancelled:!1};this._eventContainer={stopPropagation:function(){Q.cancelled=!0}},this._eventData=Q,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,G.sys.events.once(R.BOOT,this.boot,this),G.sys.events.on(R.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(R.DESTROY,this.destroy,this),this.pluginEvents.emit(m.BOOT)},start:function(){var B=this.systems.events;B.on(R.TRANSITION_START,this.transitionIn,this),B.on(R.TRANSITION_OUT,this.transitionOut,this),B.on(R.TRANSITION_COMPLETE,this.transitionComplete,this),B.on(R.PRE_UPDATE,this.preUpdate,this),B.once(R.SHUTDOWN,this.shutdown,this),this.manager.events.on(m.GAME_OUT,this.onGameOut,this),this.manager.events.on(m.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(m.START)},onGameOver:function(B){this.isActive()&&this.emit(m.GAME_OVER,B.timeStamp,B)},onGameOut:function(B){this.isActive()&&this.emit(m.GAME_OUT,B.timeStamp,B)},preUpdate:function(){this.pluginEvents.emit(m.PRE_UPDATE);var B=this._pendingRemoval,G=this._pendingInsertion,Q=B.length;if(0!==Q||0!==G.length){for(var K=this._list,tt=0;tt-1&&(K.splice(lt,1),this.clear(at,!0))}this._pendingRemoval.length=0,this._list=K.concat(G.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(B){this.manager&&this.manager.setCursor(B)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(B,G){if(!this.isActive())return!1;if(this.pluginEvents.emit(m.UPDATE,B,G),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var Q,K=this.manager.pointers;for(Q=0;Q0){if(this._pollTimer-=G,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var at=!1;for(Q=0;Q0&&(at=!0)}return at},update:function(B,G){if(!this.isActive())return!1;for(var Q=!1,H=0;H0&&(Q=!0)}return this._updatedThisFrame=!0,Q},clear:function(B,G){void 0===G&&(G=!1),this.disable(B);var Q=B.input;Q&&(this.removeDebug(B),this.manager.resetCursor(Q),Q.gameObject=void 0,Q.target=void 0,Q.hitArea=void 0,Q.hitAreaCallback=void 0,Q.callbackContext=void 0,B.input=null),G||this.queueForRemoval(B);var H=this._draggable.indexOf(B);return H>-1&&this._draggable.splice(H,1),B},disable:function(B,G){void 0===G&&(G=!1);var Q=B.input;Q&&(Q.enabled=!1,Q.dragState=0);for(var lt,H=this._drag,K=this._over,tt=this.manager,at=0;at-1&&H[at].splice(lt,1),(lt=K[at].indexOf(B))>-1&&K[at].splice(lt,1);return G&&this.resetCursor(),this},enable:function(B,G,Q,H){return void 0===H&&(H=!1),B.input?B.input.enabled=!0:this.setHitArea(B,G,Q),B.input&&H&&!B.input.dropZone&&(B.input.dropZone=H),this},hitTestPointer:function(B){for(var G=this.cameras.getCamerasBelowPointer(B),Q=0;Q0)return B.camera=H,K}return B.camera=G[0],[]},processDownEvents:function(B){var G=0,Q=this._temp,H=this._eventData,K=this._eventContainer;H.cancelled=!1;for(var tt=0;tt0&&h(B.x,B.y,B.downX,B.downY)>=K||H>0&&G>=B.downTime+H)&&(Q=!0),Q)return this.setDragState(B,3),this.processDragStartList(B)},processDragStartList:function(B){if(3!==this.getDragState(B))return 0;var G=this._drag[B.id];G.length>1&&(G=G.slice(0));for(var Q=0;Q1&&(this.sortGameObjects(Q,B),this.topOnly&&Q.splice(1)),this._drag[B.id]=Q,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(B,3),this.processDragStartList(B)):(this.setDragState(B,2),0))},processDragMoveEvent:function(B){if(2===this.getDragState(B)&&this.processDragThresholdEvent(B,this.manager.game.loop.now),4!==this.getDragState(B))return 0;var G=this._tempZones,Q=this._drag[B.id];Q.length>1&&(Q=Q.slice(0));for(var H=0;H0?(K.emit(m.GAMEOBJECT_DRAG_LEAVE,B,at),this.emit(m.DRAG_LEAVE,B,K,at),tt.target=G[0],K.emit(m.GAMEOBJECT_DRAG_ENTER,B,at=tt.target),this.emit(m.DRAG_ENTER,B,K,at)):(K.emit(m.GAMEOBJECT_DRAG_LEAVE,B,at),this.emit(m.DRAG_LEAVE,B,K,at),G[0]?(tt.target=G[0],K.emit(m.GAMEOBJECT_DRAG_ENTER,B,at=tt.target),this.emit(m.DRAG_ENTER,B,K,at)):tt.target=null)}else!at&&G[0]&&(tt.target=G[0],K.emit(m.GAMEOBJECT_DRAG_ENTER,B,at=tt.target),this.emit(m.DRAG_ENTER,B,K,at));var q,it,Y=B.positionToCamera(tt.dragStartCamera);if(K.parentContainer){var X=Y.x-tt.dragStartXGlobal,nt=Y.y-tt.dragStartYGlobal,dt=K.getParentRotation(),gt=X*Math.cos(dt)+nt*Math.sin(dt),bt=nt*Math.cos(dt)-X*Math.sin(dt);q=(gt*=1/K.parentContainer.scaleX)+tt.dragStartX,it=(bt*=1/K.parentContainer.scaleY)+tt.dragStartY}else q=Y.x-tt.dragX,it=Y.y-tt.dragY;K.emit(m.GAMEOBJECT_DRAG,B,q,it),this.emit(m.DRAG,B,K,q,it)}return Q.length},processDragUpEvent:function(B){var G=this._drag[B.id];G.length>1&&(G=G.slice(0));for(var Q=0;Q0){var tt=this.manager,at=this._eventData,lt=this._eventContainer;at.cancelled=!1;for(var q=0;q0){var K=this.manager,tt=this._eventData,at=this._eventContainer;tt.cancelled=!1,this.sortGameObjects(G,B);for(var lt=0;lt0){for(this.sortGameObjects(K,B),Q=0;Q0){for(this.sortGameObjects(tt,B),Q=0;Q-1&&this._draggable.splice(K,1)}return this},makePixelPerfect:function(B){return void 0===B&&(B=1),c(this.systems.textures,B)},setHitArea:function(B,G,Q){if(void 0===G)return this.setHitAreaFromTexture(B);Array.isArray(B)||(B=[B]);var H=!1,K=!1,tt=!1,at=!1,lt=!1,q=!0;if(_(G)&&Object.keys(G).length){var it=G;if(!B.some(function(bt){return bt.hasOwnProperty("faces")})){G=x(it,"hitArea",null),Q=x(it,"hitAreaCallback",null),lt=x(it,"pixelPerfect",!1);var X=x(it,"alphaTolerance",1);lt&&(G={},Q=this.makePixelPerfect(X))}H=x(it,"draggable",!1),K=x(it,"dropZone",!1),tt=x(it,"cursor",!1),at=x(it,"useHandCursor",!1),(!G||!Q)&&(this.setHitAreaFromTexture(B),q=!1)}else"function"==typeof G&&!Q&&(Q=G,G={});for(var nt=0;nt{var y=a(35154),C={};S.exports={register:function(f,d,c,h,p){C[f]={plugin:d,mapping:c,settingsKey:h,configKey:p}},getPlugin:function(f){return C[f]},install:function(f){var d=f.scene.sys,c=d.settings.input,h=d.game.config;for(var p in C){var u=C[p].plugin,m=C[p].mapping;y(c,C[p].settingsKey,h[C[p].configKey])&&(f[m]=new u(f))}},remove:function(f){C.hasOwnProperty(f)&&delete C[f]}}},42515:(S,P,a)=>{var y=a(31040),C=a(83419),g=a(20339),f=a(43855),d=a(47235),c=a(26099),h=a(25892),p=new C({initialize:function(m,v){this.manager=m,this.id=v,this.camera=null,this.button=0,this.buttons=0,this.position=new c,this.prevPosition=new c,this.midPoint=new c(-1,-1),this.velocity=new c,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===v,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(u){var m=u.getWorldPoint(this.x,this.y);return this.worldX=m.x,this.worldY=m.y,this},positionToCamera:function(u,m){return u.getWorldPoint(this.x,this.y,m)},updateMotion:function(){var u=this.position.x,m=this.position.y,v=this.midPoint.x,x=this.midPoint.y;if(u!==v||m!==x){var b=d(this.motionFactor,v,u),T=d(this.motionFactor,x,m);f(b,u,.1)&&(b=u),f(T,m,.1)&&(T=m),this.midPoint.set(b,T);var _=u-b,A=m-T;this.velocity.set(_,A),this.angle=y(b,T,u,m),this.distance=Math.sqrt(_*_+A*A)}},up:function(u){"buttons"in u&&(this.buttons=u.buttons),this.event=u,this.button=u.button,this.upElement=u.target,this.manager.transformPointer(this,u.pageX,u.pageY,!1),0===u.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=u.timeStamp,this.wasTouch=!1)},down:function(u){"buttons"in u&&(this.buttons=u.buttons),this.event=u,this.button=u.button,this.downElement=u.target,this.manager.transformPointer(this,u.pageX,u.pageY,!1),0===u.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),h.macOS&&u.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=u.timeStamp),this.wasTouch=!1},move:function(u){"buttons"in u&&(this.buttons=u.buttons),this.event=u,this.manager.transformPointer(this,u.pageX,u.pageY,!0),this.locked&&(this.movementX=u.movementX||u.mozMovementX||u.webkitMovementX||0,this.movementY=u.movementY||u.mozMovementY||u.webkitMovementY||0),this.moveTime=u.timeStamp,this.wasTouch=!1},wheel:function(u){"buttons"in u&&(this.buttons=u.buttons),this.event=u,this.manager.transformPointer(this,u.pageX,u.pageY,!1),this.deltaX=u.deltaX,this.deltaY=u.deltaY,this.deltaZ=u.deltaZ,this.wasTouch=!1},touchstart:function(u,m){u.pointerId&&(this.pointerId=u.pointerId),this.identifier=u.identifier,this.target=u.target,this.active=!0,this.buttons=1,this.event=m,this.downElement=u.target,this.manager.transformPointer(this,u.pageX,u.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=m.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(u,m){this.event=m,this.manager.transformPointer(this,u.pageX,u.pageY,!0),this.moveTime=m.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(u,m){this.buttons=0,this.event=m,this.upElement=u.target,this.manager.transformPointer(this,u.pageX,u.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=m.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(u,m){this.buttons=0,this.event=m,this.upElement=u.target,this.manager.transformPointer(this,u.pageX,u.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=m.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.buttons?0===this.button&&!this.isDown:0===this.button},rightButtonReleased:function(){return 0===this.buttons?2===this.button&&!this.isDown:2===this.button},middleButtonReleased:function(){return 0===this.buttons?1===this.button&&!this.isDown:1===this.button},backButtonReleased:function(){return 0===this.buttons?3===this.button&&!this.isDown:3===this.button},forwardButtonReleased:function(){return 0===this.buttons?4===this.button&&!this.isDown:4===this.button},getDistance:function(){return this.isDown?g(this.downX,this.downY,this.x,this.y):g(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?y(this.downX,this.downY,this.x,this.y):y(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(u,m){void 0===u&&(u=10),void 0===m&&(m=[]);for(var v=this.prevPosition.x,x=this.prevPosition.y,b=this.position.x,T=this.position.y,_=0;_{S.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},7179:S=>{S.exports="boot"},85375:S=>{S.exports="destroy"},39843:S=>{S.exports="dragend"},23388:S=>{S.exports="dragenter"},16133:S=>{S.exports="drag"},27829:S=>{S.exports="dragleave"},53904:S=>{S.exports="dragover"},56058:S=>{S.exports="dragstart"},2642:S=>{S.exports="drop"},88171:S=>{S.exports="gameobjectdown"},36147:S=>{S.exports="dragend"},71692:S=>{S.exports="dragenter"},96149:S=>{S.exports="drag"},81285:S=>{S.exports="dragleave"},74048:S=>{S.exports="dragover"},21322:S=>{S.exports="dragstart"},49378:S=>{S.exports="drop"},86754:S=>{S.exports="gameobjectmove"},86433:S=>{S.exports="gameobjectout"},60709:S=>{S.exports="gameobjectover"},24081:S=>{S.exports="pointerdown"},11172:S=>{S.exports="pointermove"},18907:S=>{S.exports="pointerout"},95579:S=>{S.exports="pointerover"},35368:S=>{S.exports="pointerup"},26972:S=>{S.exports="wheel"},47078:S=>{S.exports="gameobjectup"},73802:S=>{S.exports="gameobjectwheel"},56718:S=>{S.exports="gameout"},25936:S=>{S.exports="gameover"},27503:S=>{S.exports="boot"},50852:S=>{S.exports="process"},96438:S=>{S.exports="update"},59152:S=>{S.exports="pointerlockchange"},47777:S=>{S.exports="pointerdown"},27957:S=>{S.exports="pointerdownoutside"},19444:S=>{S.exports="pointermove"},54251:S=>{S.exports="pointerout"},18667:S=>{S.exports="pointerover"},27192:S=>{S.exports="pointerup"},24652:S=>{S.exports="pointerupoutside"},45132:S=>{S.exports="wheel"},44512:S=>{S.exports="preupdate"},15757:S=>{S.exports="shutdown"},41637:S=>{S.exports="start"},93802:S=>{S.exports="update"},8214:(S,P,a)=>{S.exports={BOOT:a(7179),DESTROY:a(85375),DRAG_END:a(39843),DRAG_ENTER:a(23388),DRAG:a(16133),DRAG_LEAVE:a(27829),DRAG_OVER:a(53904),DRAG_START:a(56058),DROP:a(2642),GAME_OUT:a(56718),GAME_OVER:a(25936),GAMEOBJECT_DOWN:a(88171),GAMEOBJECT_DRAG_END:a(36147),GAMEOBJECT_DRAG_ENTER:a(71692),GAMEOBJECT_DRAG:a(96149),GAMEOBJECT_DRAG_LEAVE:a(81285),GAMEOBJECT_DRAG_OVER:a(74048),GAMEOBJECT_DRAG_START:a(21322),GAMEOBJECT_DROP:a(49378),GAMEOBJECT_MOVE:a(86754),GAMEOBJECT_OUT:a(86433),GAMEOBJECT_OVER:a(60709),GAMEOBJECT_POINTER_DOWN:a(24081),GAMEOBJECT_POINTER_MOVE:a(11172),GAMEOBJECT_POINTER_OUT:a(18907),GAMEOBJECT_POINTER_OVER:a(95579),GAMEOBJECT_POINTER_UP:a(35368),GAMEOBJECT_POINTER_WHEEL:a(26972),GAMEOBJECT_UP:a(47078),GAMEOBJECT_WHEEL:a(73802),MANAGER_BOOT:a(27503),MANAGER_PROCESS:a(50852),MANAGER_UPDATE:a(96438),POINTER_DOWN:a(47777),POINTER_DOWN_OUTSIDE:a(27957),POINTER_MOVE:a(19444),POINTER_OUT:a(54251),POINTER_OVER:a(18667),POINTER_UP:a(27192),POINTER_UP_OUTSIDE:a(24652),POINTER_WHEEL:a(45132),POINTERLOCK_CHANGE:a(59152),PRE_UPDATE:a(44512),SHUTDOWN:a(15757),START:a(41637),UPDATE:a(93802)}},97421:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d){this.pad=f,this.events=f.events,this.index=d,this.value=0,this.threshold=.1},update:function(g){this.value=g},getValue:function(){return Math.abs(this.value){var y=a(83419),C=a(92734),g=new y({initialize:function(d,c){this.pad=d,this.events=d.manager,this.index=c,this.value=0,this.threshold=1,this.pressed=!1},update:function(f){this.value=f;var d=this.pad,c=this.index;f>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(C.BUTTON_DOWN,d,this,f),this.pad.emit(C.GAMEPAD_BUTTON_DOWN,c,f,this)):this.pressed&&(this.pressed=!1,this.events.emit(C.BUTTON_UP,d,this,f),this.pad.emit(C.GAMEPAD_BUTTON_UP,c,f,this))},destroy:function(){this.pad=null,this.events=null}});S.exports=g},99125:(S,P,a)=>{var y=a(97421),C=a(28884),g=a(83419),f=a(50792),d=a(26099),c=new g({Extends:f,initialize:function(p,u){f.call(this),this.manager=p,this.pad=u,this.id=u.id,this.index=u.index;for(var m=[],v=0;v=2&&(this.leftStick.set(x[0].getValue(),x[1].getValue()),v>=4&&this.rightStick.set(x[2].getValue(),x[3].getValue()))}},destroy:function(){var h;for(this.removeAllListeners(),this.manager=null,this.pad=null,h=0;h{var y=a(83419),C=a(50792),g=a(92734),f=a(99125),d=a(35154),c=a(89639),h=a(8214),p=new y({Extends:C,initialize:function(m){C.call(this),this.scene=m.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=m,this.enabled=!0,this.gamepads=[],this.queue=[],m.pluginEvents.once(h.BOOT,this.boot,this),m.pluginEvents.on(h.START,this.start,this)},boot:function(){var u=this.scene.sys.game,m=this.settings.input,v=u.config;this.enabled=d(m,"gamepad",v.inputGamepad)&&u.device.input.gamepads,this.target=d(m,"gamepad.target",v.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var u=this,m=this.target,v=function(x){x.defaultPrevented||!u.isActive()||(u.refreshPads(),u.queue.push(x))};this.onGamepadHandler=v,m.addEventListener("gamepadconnected",v,!1),m.addEventListener("gamepaddisconnected",v,!1),this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(h.UPDATE,this.update);for(var u=0;u{S.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:S=>{S.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:S=>{S.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(S,P,a)=>{S.exports={DUALSHOCK_4:a(65294),SNES_USB:a(89651),XBOX_360:a(90089)}},46008:S=>{S.exports="down"},7629:S=>{S.exports="up"},42206:S=>{S.exports="connected"},86544:S=>{S.exports="disconnected"},94784:S=>{S.exports="down"},14325:S=>{S.exports="up"},92734:(S,P,a)=>{S.exports={BUTTON_DOWN:a(46008),BUTTON_UP:a(7629),CONNECTED:a(42206),DISCONNECTED:a(86544),GAMEPAD_BUTTON_DOWN:a(94784),GAMEPAD_BUTTON_UP:a(14325)}},48646:(S,P,a)=>{S.exports={Axis:a(97421),Button:a(28884),Events:a(92734),Gamepad:a(99125),GamepadPlugin:a(56654),Configs:a(64894)}},14350:(S,P,a)=>{var y=a(93301),C=a(79291),g={CreatePixelPerfectHandler:a(84409),CreateInteractiveObject:a(74457),Events:a(8214),Gamepad:a(48646),InputManager:a(7003),InputPlugin:a(48205),InputPluginCache:a(89639),Keyboard:a(51442),Mouse:a(87078),Pointer:a(42515),Touch:a(95618)};g=C(!1,g,y),S.exports=g},78970:(S,P,a)=>{var y=a(72905),C=a(83419),g=a(8443),f=a(8214),d=a(46032),c=a(29747),h=new C({initialize:function(u){this.manager=u,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.onKeyDown=c,this.onKeyUp=c,u.events.once(f.MANAGER_BOOT,this.boot,this)},boot:function(){var p=this.manager.config;this.enabled=p.inputKeyboard,this.target=p.inputKeyboardEventTarget,this.addCapture(p.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(g.POST_STEP,this.postUpdate,this)},startListeners:function(){var p=this;this.onKeyDown=function(m){!m.defaultPrevented&&p.enabled&&p.manager&&(p.queue.push(m),p.manager.events.emit(f.MANAGER_PROCESS),p.preventDefault&&!(m.altKey||m.ctrlKey||m.shiftKey||m.metaKey)&&p.captures.indexOf(m.keyCode)>-1&&m.preventDefault())},this.onKeyUp=function(m){!m.defaultPrevented&&p.enabled&&p.manager&&(p.queue.push(m),p.manager.events.emit(f.MANAGER_PROCESS),p.preventDefault&&!(m.altKey||m.ctrlKey||m.shiftKey||m.metaKey)&&p.captures.indexOf(m.keyCode)>-1&&m.preventDefault())};var u=this.target;u&&(u.addEventListener("keydown",this.onKeyDown,!1),u.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var p=this.target;p.removeEventListener("keydown",this.onKeyDown,!1),p.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(p){"string"==typeof p&&(p=p.split(",")),Array.isArray(p)||(p=[p]);for(var u=this.captures,m=0;m0},removeCapture:function(p){"string"==typeof p&&(p=p.split(",")),Array.isArray(p)||(p=[p]);for(var u=this.captures,m=0;m0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(g.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});S.exports=h},28846:(S,P,a)=>{var y=a(83419),C=a(50792),g=a(95922),f=a(8443),d=a(35154),c=a(8214),h=a(89639),p=a(30472),u=a(46032),m=a(87960),v=a(74600),x=a(44594),b=a(56583),T=new y({Extends:C,initialize:function(A){C.call(this),this.game=A.systems.game,this.scene=A.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=A,this.manager=A.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,A.pluginEvents.once(c.BOOT,this.boot,this),A.pluginEvents.on(c.START,this.start,this)},boot:function(){var _=this.settings.input;this.enabled=d(_,"keyboard",!0);var A=d(_,"keyboard.capture",null);A&&this.addCaptures(A),this.sceneInputPlugin.pluginEvents.once(c.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(c.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(c.SHUTDOWN,this.shutdown,this),this.game.events.on(f.BLUR,this.resetKeys,this),this.scene.sys.events.on(x.PAUSE,this.resetKeys,this),this.scene.sys.events.on(x.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(_){return this.manager.addCapture(_),this},removeCapture:function(_){return this.manager.removeCapture(_),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:u.UP,down:u.DOWN,left:u.LEFT,right:u.RIGHT,space:u.SPACE,shift:u.SHIFT})},addKeys:function(_,A,M){void 0===A&&(A=!0),void 0===M&&(M=!1);var I={};if("string"==typeof _){_=_.split(",");for(var R=0;R<_.length;R++){var F=_[R].trim();F&&(I[F]=this.addKey(F,A,M))}}else for(var N in _)I[N]=this.addKey(_[N],A,M);return I},addKey:function(_,A,M){void 0===A&&(A=!0),void 0===M&&(M=!1);var I=this.keys;if(_ instanceof p){var R=I.indexOf(_);return R>-1?I[R]=_:I[_.keyCode]=_,A&&this.addCapture(_.keyCode),_.setEmitOnRepeat(M),_}return"string"==typeof _&&(_=u[_.toUpperCase()]),I[_]||(I[_]=new p(this,_),A&&this.addCapture(_),I[_].setEmitOnRepeat(M)),I[_]},removeKey:function(_,A,M){void 0===A&&(A=!1),void 0===M&&(M=!1);var R,I=this.keys;if(_ instanceof p){var F=I.indexOf(_);F>-1&&(R=this.keys[F],this.keys[F]=void 0)}else"string"==typeof _&&(_=u[_.toUpperCase()]);return I[_]&&(R=I[_],I[_]=void 0),R&&(R.plugin=null,M&&this.removeCapture(R.keyCode),A&&R.destroy()),this},removeAllKeys:function(_,A){void 0===_&&(_=!1),void 0===A&&(A=!1);for(var M=this.keys,I=0;I_._tick)return _._tick=M,!0}return!1},update:function(){var _=this.manager.queue,A=_.length;if(this.isActive()&&0!==A)for(var M=this.keys,I=0;I{S.exports=function(a,y){return y.timeLastMatched=a.timeStamp,y.index++,y.index===y.size||(y.current=y.keyCodes[y.index],!1)}},87960:(S,P,a)=>{var y=a(83419),C=a(95922),g=a(95540),f=a(68769),d=a(92803),c=new y({initialize:function(p,u,m){if(void 0===m&&(m={}),u.length<2)return!1;this.manager=p,this.enabled=!0,this.keyCodes=[];for(var v=0;v{var y=a(66970);S.exports=function(g,f){if(f.matched)return!0;var d=!1,c=!1;return g.keyCode===f.current&&(f.index>0&&f.maxKeyDelay>0?g.timeStamp<=f.timeLastMatched+f.maxKeyDelay&&(c=!0,d=y(g,f)):(c=!0,d=y(g,f))),!c&&f.resetOnWrongKey&&(f.index=0,f.current=f.keyCodes[0]),d&&(f.timeLastMatched=g.timeStamp,f.matched=!0,f.timeMatched=g.timeStamp),d}},92803:S=>{S.exports=function(a){return a.current=a.keyCodes[0],a.index=0,a.timeLastMatched=0,a.matched=!1,a.timeMatched=0,a}},92612:S=>{S.exports="keydown"},23345:S=>{S.exports="keyup"},21957:S=>{S.exports="keycombomatch"},44743:S=>{S.exports="down"},3771:S=>{S.exports="keydown-"},46358:S=>{S.exports="keyup-"},75674:S=>{S.exports="up"},95922:(S,P,a)=>{S.exports={ANY_KEY_DOWN:a(92612),ANY_KEY_UP:a(23345),COMBO_MATCH:a(21957),DOWN:a(44743),KEY_DOWN:a(3771),KEY_UP:a(46358),UP:a(75674)}},51442:(S,P,a)=>{S.exports={Events:a(95922),KeyboardManager:a(78970),KeyboardPlugin:a(28846),Key:a(30472),KeyCodes:a(46032),KeyCombo:a(87960),AdvanceKeyCombo:a(66970),ProcessKeyCombo:a(68769),ResetKeyCombo:a(92803),JustDown:a(90229),JustUp:a(38796),DownDuration:a(37015),UpDuration:a(41170)}},37015:S=>{S.exports=function(a,y){return void 0===y&&(y=50),a.isDown&&a.plugin.game.loop.time-a.timeDown{S.exports=function(a){return!!a._justDown&&(a._justDown=!1,!0)}},38796:S=>{S.exports=function(a){return!!a._justUp&&(a._justUp=!1,!0)}},30472:(S,P,a)=>{var y=a(83419),C=a(50792),g=a(95922),f=new y({Extends:C,initialize:function(c,h){C.call(this),this.plugin=c,this.keyCode=h,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(d){return this.emitOnRepeat=d,this},onDown:function(d){this.originalEvent=d,this.enabled&&(this.altKey=d.altKey,this.ctrlKey=d.ctrlKey,this.shiftKey=d.shiftKey,this.metaKey=d.metaKey,this.location=d.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(g.DOWN,this,d):(this.isDown=!0,this.isUp=!1,this.timeDown=d.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(g.DOWN,this,d)))},onUp:function(d){this.originalEvent=d,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=d.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(g.UP,this,d))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});S.exports=f},46032:S=>{S.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},74600:(S,P,a)=>{var y=a(46032),C={};for(var g in y)C[y[g]]=g;S.exports=C},41170:S=>{S.exports=function(a,y){return void 0===y&&(y=50),a.isUp&&a.plugin.game.loop.time-a.timeUp{var y=a(83419),C=a(89357),g=a(8214),f=a(29747),d=new y({initialize:function(h){this.manager=h,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.locked=!1,this.onMouseMove=f,this.onMouseDown=f,this.onMouseUp=f,this.onMouseDownWindow=f,this.onMouseUpWindow=f,this.onMouseOver=f,this.onMouseOut=f,this.onMouseWheel=f,this.pointerLockChange=f,this.isTop=!0,h.events.once(g.MANAGER_BOOT,this.boot,this)},boot:function(){var c=this.manager.config;this.enabled=c.inputMouse,this.target=c.inputMouseEventTarget,this.passive=c.inputMousePassive,this.preventDefaultDown=c.inputMousePreventDefaultDown,this.preventDefaultUp=c.inputMousePreventDefaultUp,this.preventDefaultMove=c.inputMousePreventDefaultMove,this.preventDefaultWheel=c.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,c.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(c){return c.preventDefault(),!1}),this},requestPointerLock:function(){if(C.pointerLock){var c=this.target;c.requestPointerLock=c.requestPointerLock||c.mozRequestPointerLock||c.webkitRequestPointerLock,c.requestPointerLock()}},releasePointerLock:function(){C.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var c=this.target;if(c){var h=this,p=this.manager,u=p.canvas,m=window&&window.focus&&p.game.config.autoFocus;this.onMouseMove=function(x){!x.defaultPrevented&&h.enabled&&p&&p.enabled&&(p.onMouseMove(x),h.preventDefaultMove&&x.preventDefault())},this.onMouseDown=function(x){m&&window.focus(),!x.defaultPrevented&&h.enabled&&p&&p.enabled&&(p.onMouseDown(x),h.preventDefaultDown&&x.target===u&&x.preventDefault())},this.onMouseDownWindow=function(x){x.sourceCapabilities&&x.sourceCapabilities.firesTouchEvents||!x.defaultPrevented&&h.enabled&&p&&p.enabled&&x.target!==u&&p.onMouseDown(x)},this.onMouseUp=function(x){!x.defaultPrevented&&h.enabled&&p&&p.enabled&&(p.onMouseUp(x),h.preventDefaultUp&&x.target===u&&x.preventDefault())},this.onMouseUpWindow=function(x){x.sourceCapabilities&&x.sourceCapabilities.firesTouchEvents||!x.defaultPrevented&&h.enabled&&p&&p.enabled&&x.target!==u&&p.onMouseUp(x)},this.onMouseOver=function(x){!x.defaultPrevented&&h.enabled&&p&&p.enabled&&p.setCanvasOver(x)},this.onMouseOut=function(x){!x.defaultPrevented&&h.enabled&&p&&p.enabled&&p.setCanvasOut(x)},this.onMouseWheel=function(x){!x.defaultPrevented&&h.enabled&&p&&p.enabled&&p.onMouseWheel(x),h.preventDefaultWheel&&x.target===u&&x.preventDefault()};var v={passive:!0};if(c.addEventListener("mousemove",this.onMouseMove),c.addEventListener("mousedown",this.onMouseDown),c.addEventListener("mouseup",this.onMouseUp),c.addEventListener("mouseover",this.onMouseOver,v),c.addEventListener("mouseout",this.onMouseOut,v),c.addEventListener("wheel",this.onMouseWheel,this.preventDefaultWheel?{passive:!1}:v),window&&p.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,v),window.top.addEventListener("mouseup",this.onMouseUpWindow,v)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,v),window.addEventListener("mouseup",this.onMouseUpWindow,v),this.isTop=!1}C.pointerLock&&(this.pointerLockChange=function(x){var b=h.target;h.locked=document.pointerLockElement===b||document.mozPointerLockElement===b||document.webkitPointerLockElement===b,p.onPointerLockChange(x)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var c=this.target;c.removeEventListener("mousemove",this.onMouseMove),c.removeEventListener("mousedown",this.onMouseDown),c.removeEventListener("mouseup",this.onMouseUp),c.removeEventListener("mouseover",this.onMouseOver),c.removeEventListener("mouseout",this.onMouseOut),window&&((c=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),c.removeEventListener("mouseup",this.onMouseUpWindow)),C.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});S.exports=d},87078:(S,P,a)=>{S.exports={MouseManager:a(85098)}},36210:(S,P,a)=>{var y=a(83419),C=a(8214),g=a(29747),f=new y({initialize:function(c){this.manager=c,this.capture=!0,this.enabled=!1,this.onTouchStart=g,this.onTouchStartWindow=g,this.onTouchMove=g,this.onTouchEnd=g,this.onTouchEndWindow=g,this.onTouchCancel=g,this.onTouchCancelWindow=g,this.isTop=!0,c.events.once(C.MANAGER_BOOT,this.boot,this)},boot:function(){var d=this.manager.config;this.enabled=d.inputTouch,this.target=d.inputTouchEventTarget,this.capture=d.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,d.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(d){return d.preventDefault(),!1}),this},startListeners:function(){var d=this.target;if(d){var c=this,h=this.manager,p=h.canvas,u=window&&window.focus&&h.game.config.autoFocus;this.onTouchMove=function(b){!b.defaultPrevented&&c.enabled&&h&&h.enabled&&(h.onTouchMove(b),c.capture&&b.cancelable&&b.preventDefault())},this.onTouchStart=function(b){u&&window.focus(),!b.defaultPrevented&&c.enabled&&h&&h.enabled&&(h.onTouchStart(b),c.capture&&b.cancelable&&b.target===p&&b.preventDefault())},this.onTouchStartWindow=function(b){!b.defaultPrevented&&c.enabled&&h&&h.enabled&&b.target!==p&&h.onTouchStart(b)},this.onTouchEnd=function(b){!b.defaultPrevented&&c.enabled&&h&&h.enabled&&(h.onTouchEnd(b),c.capture&&b.cancelable&&b.target===p&&b.preventDefault())},this.onTouchEndWindow=function(b){!b.defaultPrevented&&c.enabled&&h&&h.enabled&&b.target!==p&&h.onTouchEnd(b)},this.onTouchCancel=function(b){!b.defaultPrevented&&c.enabled&&h&&h.enabled&&(h.onTouchCancel(b),c.capture&&b.preventDefault())},this.onTouchCancelWindow=function(b){!b.defaultPrevented&&c.enabled&&h&&h.enabled&&h.onTouchCancel(b)};var m=this.capture,v={passive:!0},x={passive:!1};if(d.addEventListener("touchstart",this.onTouchStart,m?x:v),d.addEventListener("touchmove",this.onTouchMove,m?x:v),d.addEventListener("touchend",this.onTouchEnd,m?x:v),d.addEventListener("touchcancel",this.onTouchCancel,m?x:v),window&&h.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,x),window.top.addEventListener("touchend",this.onTouchEndWindow,x),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,x)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,x),window.addEventListener("touchend",this.onTouchEndWindow,x),window.addEventListener("touchcancel",this.onTouchCancelWindow,x),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var d=this.target;d.removeEventListener("touchstart",this.onTouchStart),d.removeEventListener("touchmove",this.onTouchMove),d.removeEventListener("touchend",this.onTouchEnd),d.removeEventListener("touchcancel",this.onTouchCancel),window&&((d=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),d.removeEventListener("touchend",this.onTouchEndWindow),d.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});S.exports=f},95618:(S,P,a)=>{S.exports={TouchManager:a(36210)}},41299:(S,P,a)=>{var y=a(83419),C=a(23906),g=a(54899),f=a(95540),d=a(98356),c=a(3374),h=a(84376),p=a(92638),u=new y({initialize:function(v,x){if(this.loader=v,this.cache=f(x,"cache",!1),this.type=f(x,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=f(x,"key",!1);var b=this.key;if(v.prefix&&""!==v.prefix&&(this.key=v.prefix+b),!this.key)throw new Error("Invalid File key: "+this.key);var T=f(x,"url");void 0===T?T=v.path+b+"."+f(x,"extension",""):"string"==typeof T&&!T.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(T=v.path+T),this.url=T,this.src="",this.xhrSettings=p(f(x,"responseType",void 0)),f(x,"xhrSettings",!1)&&(this.xhrSettings=c(this.xhrSettings,f(x,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?C.FILE_POPULATED:C.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=f(x,"config",{}),this.base64="string"==typeof T&&0===T.indexOf("data:"),this.retryAttempts=f(x,"maxRetries",v.maxRetries)},setLink:function(m){this.linkFile=m,m.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===C.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=C.FILE_LOADING,this.src=d(this,this.loader.baseURL),!this.src)throw new Error("URL Error in File: "+this.key+" from: "+this.url);0===this.src.indexOf("data:")&&(this.base64=!0),this.xhrLoader=h(this,this.loader.xhr)}},onLoad:function(m,v){var x=m.responseURL&&this.loader.localSchemes.some(function(_){return 0===m.responseURL.indexOf(_)}),T=!(v.target&&200!==v.target.status)||x&&0===v.target.status;4===m.readyState&&m.status>=400&&m.status<=599&&(T=!1),this.state=C.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,T)},onBase64Load:function(m){this.xhrLoader=m,this.state=C.FILE_LOADED,this.percentComplete=1,this.loader.emit(g.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.retryAttempts>0?(this.retryAttempts--,this.load()):this.loader.nextFile(this,!1)},onProgress:function(m){m.lengthComputable&&(this.bytesLoaded=m.loaded,this.bytesTotal=m.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(g.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=C.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=C.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=C.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(m){if(this.state!==C.FILE_PENDING_DESTROY){void 0===m&&(m=this.data);var v=this.key,x=this.type;this.loader.emit(g.FILE_COMPLETE,v,x,m),this.loader.emit(g.FILE_KEY_COMPLETE+x+"-"+v,v,x,m),this.loader.flagForRemoval(this),this.state=C.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});u.createObjectURL=function(m,v,x){if("function"==typeof URL)m.src=URL.createObjectURL(v);else{var b=new FileReader;b.onload=function(){m.removeAttribute("crossOrigin"),m.src="data:"+(v.type||x)+";base64,"+b.result.split(",")[1]},b.onerror=m.onerror,b.readAsDataURL(v)}},u.revokeObjectURL=function(m){"function"==typeof URL&&URL.revokeObjectURL(m.src)},S.exports=u},74099:S=>{var P={};S.exports={install:function(y){for(var C in P)y[C]=P[C]},register:function(y,C){P[y]=C},destroy:function(){P={}}}},98356:S=>{S.exports=function(a,y){return!!a.url&&(a.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?a.url:y+a.url)}},74261:(S,P,a)=>{var y=a(83419),C=a(23906),g=a(35072),f=a(50792),d=a(54899),c=a(74099),h=a(95540),p=a(35154),u=a(41212),m=a(37277),v=a(44594),x=a(92638),b=new y({Extends:f,initialize:function(_){f.call(this);var A=_.sys.game.config,M=_.sys.settings.loader;this.scene=_,this.systems=_.sys,this.cacheManager=_.sys.cache,this.textureManager=_.sys.textures,this.sceneManager=_.sys.game.scene,c.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(h(M,"baseURL",A.loaderBaseURL)),this.setPath(h(M,"path",A.loaderPath)),this.setPrefix(h(M,"prefix",A.loaderPrefix)),this.maxParallelDownloads=h(M,"maxParallelDownloads",A.loaderMaxParallelDownloads),this.xhr=x(h(M,"responseType",A.loaderResponseType),h(M,"async",A.loaderAsync),h(M,"user",A.loaderUser),h(M,"password",A.loaderPassword),h(M,"timeout",A.loaderTimeout),h(M,"withCredentials",A.loaderWithCredentials)),this.crossOrigin=h(M,"crossOrigin",A.loaderCrossOrigin),this.imageLoadType=h(M,"imageLoadType",A.loaderImageLoadType),this.localSchemes=h(M,"localScheme",A.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new g,this.inflight=new g,this.queue=new g,this._deleteQueue=new g,this.totalFailed=0,this.totalComplete=0,this.state=C.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=h(M,"maxRetries",A.loaderMaxRetries),_.sys.events.once(v.BOOT,this.boot,this),_.sys.events.on(v.START,this.pluginStart,this)},boot:function(){this.systems.events.once(v.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(v.SHUTDOWN,this.shutdown,this)},setBaseURL:function(T){return void 0===T&&(T=""),""!==T&&"/"!==T.substr(-1)&&(T=T.concat("/")),this.baseURL=T,this},setPath:function(T){return void 0===T&&(T=""),""!==T&&"/"!==T.substr(-1)&&(T=T.concat("/")),this.path=T,this},setPrefix:function(T){return void 0===T&&(T=""),this.prefix=T,this},setCORS:function(T){return this.crossOrigin=T,this},addFile:function(T){Array.isArray(T)||(T=[T]);for(var _=0;_0},removePack:function(T,_){var F,A=this.systems.anims,M=this.cacheManager,I=this.textureManager,R={animation:"json",aseprite:"json",audio:"audio",audioSprite:"audio",binary:"binary",bitmapFont:"bitmapFont",css:null,glsl:"shader",html:"html",json:"json",obj:"obj",plugin:null,scenePlugin:null,script:null,spine:"json",text:"text",tilemapCSV:"tilemap",tilemapImpact:"tilemap",tilemapTiledJSON:"tilemap",video:"video",xml:"xml"};if(u(T))F=T;else if(!(F=M.json.get(T)))return void console.warn("Asset Pack not found in JSON cache:",T);for(var N in _&&(F={_:F[_]}),F){var V=F[N],B=h(V,"prefix",""),G=h(V,"files"),Q=h(V,"defaultType");if(Array.isArray(G))for(var H=0;H0&&this.inflight.size{var y=a(79291),C=a(92638);S.exports=function(f,d){var c=void 0===f?C():y({},f);if(d)for(var h in d)void 0!==d[h]&&(c[h]=d[h]);return c}},26430:(S,P,a)=>{var y=a(83419),C=a(23906),g=a(54899),f=new y({initialize:function(c,h,p,u){var m=[];u.forEach(function(b){b&&m.push(b)}),this.loader=c,this.type=h,this.key=p,c.prefix&&""!==c.prefix&&(this.key=c.prefix+this.key),this.multiKeyIndex=c.multiKeyIndex++,this.files=m,this.state=C.FILE_PENDING,this.complete=!1,this.pending=m.length,this.failed=0,this.config={},this.baseURL=c.baseURL,this.path=c.path,this.prefix=c.prefix;for(var x=0;x{var y=a(3374);S.exports=function(g,f){var d=y(f,g.xhrSettings);if(!g.base64){var p=new XMLHttpRequest;if(p.open("GET",g.src,d.async,d.user,d.password),p.responseType=g.xhrSettings.responseType,p.timeout=d.timeout,d.headers)for(var u in d.headers)p.setRequestHeader(u,d.headers[u]);return d.header&&d.headerValue&&p.setRequestHeader(d.header,d.headerValue),d.requestedWith&&p.setRequestHeader("X-Requested-With",d.requestedWith),d.overrideMimeType&&p.overrideMimeType(d.overrideMimeType),d.withCredentials&&(p.withCredentials=!0),p.onload=g.onLoad.bind(g,p),p.onerror=g.onError.bind(g,p),p.onprogress=g.onProgress.bind(g),p.ontimeout=g.onError.bind(g,p),p.send(),p}var c=g.url.split(";base64,").pop()||g.url.split(",").pop(),h={responseText:atob(c)};g.onBase64Load(h)}},92638:S=>{S.exports=function(a,y,C,g,f,d){return void 0===a&&(a=""),void 0===y&&(y=!0),void 0===C&&(C=""),void 0===g&&(g=""),void 0===f&&(f=0),void 0===d&&(d=!1),{responseType:a,async:y,user:C,password:g,timeout:f,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:d}}},23906:S=>{S.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},42155:S=>{S.exports="addfile"},38991:S=>{S.exports="complete"},27540:S=>{S.exports="filecomplete"},87464:S=>{S.exports="filecomplete-"},94486:S=>{S.exports="loaderror"},13035:S=>{S.exports="load"},38144:S=>{S.exports="fileprogress"},97520:S=>{S.exports="postprocess"},85595:S=>{S.exports="progress"},55680:S=>{S.exports="start"},54899:(S,P,a)=>{S.exports={ADD:a(42155),COMPLETE:a(38991),FILE_COMPLETE:a(27540),FILE_KEY_COMPLETE:a(87464),FILE_LOAD_ERROR:a(94486),FILE_LOAD:a(13035),FILE_PROGRESS:a(38144),POST_PROCESS:a(97520),PROGRESS:a(85595),START:a(55680)}},14135:(S,P,a)=>{var y=a(83419),C=a(74099),g=a(518),f=a(54899),d=new y({Extends:g,initialize:function(h,p,u,m,v){g.call(this,h,p,u,m,v),this.type="animationJSON"},onProcess:function(){this.loader.once(f.POST_PROCESS,this.onLoadComplete,this),g.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});C.register("animation",function(c,h,p,u){if(Array.isArray(c))for(var m=0;m{var y=a(83419),C=a(74099),g=a(95540),f=a(19550),d=a(41212),c=a(518),h=a(26430),p=new y({Extends:h,initialize:function(m,v,x,b,T,_){var A,M;if(d(v)){var I=v;v=g(I,"key"),A=new f(m,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),M=new c(m,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","json"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(m,v,x,T),M=new c(m,v,b,_);h.call(this,m,"atlasjson",v,A.linkFile?[A,M,A.linkFile]:[A,M])},addToCache:function(){if(this.isReadyToProcess()){var u=this.files[0],m=this.files[1];this.loader.textureManager.addAtlas(u.key,u.data,m.data,this.files[2]?this.files[2].data:null),m.addToCache(),this.complete=!0}}});C.register("aseprite",function(u,m,v,x,b){var T;if(Array.isArray(u))for(var _=0;_{var y=a(83419),C=a(74099),g=a(95540),f=a(19550),d=a(41212),c=a(518),h=a(26430),p=new y({Extends:h,initialize:function(m,v,x,b,T,_){var A,M;if(d(v)){var I=v;v=g(I,"key"),A=new f(m,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),M=new c(m,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","json"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(m,v,x,T),M=new c(m,v,b,_);h.call(this,m,"atlasjson",v,A.linkFile?[A,M,A.linkFile]:[A,M])},addToCache:function(){if(this.isReadyToProcess()){var u=this.files[0];this.loader.textureManager.addAtlas(u.key,u.data,this.files[1].data,this.files[2]?this.files[2].data:null),this.complete=!0}}});C.register("atlas",function(u,m,v,x,b){var T;if(Array.isArray(u))for(var _=0;_{var y=a(83419),C=a(74099),g=a(95540),f=a(19550),d=a(41212),c=a(26430),h=a(57318),p=new y({Extends:c,initialize:function(m,v,x,b,T,_){var A,M;if(d(v)){var I=v;v=g(I,"key"),A=new f(m,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),M=new h(m,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","xml"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(m,v,x,T),M=new h(m,v,b,_);c.call(this,m,"atlasxml",v,A.linkFile?[A,M,A.linkFile]:[A,M])},addToCache:function(){if(this.isReadyToProcess()){var u=this.files[0];this.loader.textureManager.addAtlasXML(u.key,u.data,this.files[1].data,this.files[2]?this.files[2].data:null),this.complete=!0}}});C.register("atlasXML",function(u,m,v,x,b){var T;if(Array.isArray(u))for(var _=0;_{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(89749),h=a(41212),p=new y({Extends:g,initialize:function(m,v,x,b,T){if(h(v)){var _=v;v=d(_,"key"),b=d(_,"xhrSettings"),T=d(_,"context",T)}g.call(this,m,{type:"audio",cache:m.cacheManager.audio,extension:x.type,responseType:"arraybuffer",key:v,url:x.url,xhrSettings:b,config:{context:T}})},onProcess:function(){this.state=C.FILE_PROCESSING;var u=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(m){u.data=m,u.onProcessComplete()},function(m){console.error("Error decoding audio: "+u.key+" - ",m?m.message:null),u.onProcessError()}),this.config.context=null}});p.create=function(u,m,v,x,b){var T=u.systems.game,_=T.config.audio,A=T.device.audio;h(m)&&(v=d(m,"url",[]),x=d(m,"config",{}));var M=p.getAudioURL(T,v);return M?A.webAudio&&!_.disableWebAudio?new p(u,m,M,b,T.sound.context):new c(u,m,M,x):(console.warn('No audio URLs for "%s" can play on this device',m),null)},p.getAudioURL=function(u,m){Array.isArray(m)||(m=[m]);for(var v=0;v{var y=a(21097),C=a(83419),g=a(74099),f=a(95540),d=a(41212),c=a(518),h=a(26430),p=new C({Extends:h,initialize:function(m,v,x,b,T,_,A){if(d(v)){var M=v;v=f(M,"key"),x=f(M,"jsonURL"),b=f(M,"audioURL"),T=f(M,"audioConfig"),_=f(M,"audioXhrSettings"),A=f(M,"jsonXhrSettings")}var I;if(b){var R=y.create(m,v,b,T,_);R&&(I=new c(m,v,x,A),h.call(this,m,"audiosprite",v,[R,I]),this.config.resourceLoad=!1)}else I=new c(m,v,x,A),h.call(this,m,"audiosprite",v,[I]),this.config.resourceLoad=!0,this.config.audioConfig=T,this.config.audioXhrSettings=_},onFileComplete:function(u){if(-1!==this.files.indexOf(u)&&(this.pending--,this.config.resourceLoad&&"json"===u.type&&u.data.hasOwnProperty("resources"))){var v=u.data.resources,x=f(this.config,"audioConfig"),b=f(this.config,"audioXhrSettings"),T=y.create(this.loader,u.key,v,x,b);T&&(this.addToMultiFile(T),this.loader.addFile(T))}},addToCache:function(){if(this.isReadyToProcess()){var m=this.files[1];this.files[0].addToCache(),m.addToCache(),this.complete=!0}}});g.register("audioSprite",function(u,m,v,x,b,T){var I,_=this.systems.game,A=_.config.audio,M=_.device.audio;if(A&&A.noAudio||!M.webAudio&&!M.audioData)return this;if(Array.isArray(u))for(var R=0;R{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x,b){var T="bin";if(c(m)){var _=m;m=d(_,"key"),v=d(_,"url"),x=d(_,"xhrSettings"),T=d(_,"extension",T),b=d(_,"dataType",b)}g.call(this,u,{type:"binary",cache:u.cacheManager.binary,extension:T,responseType:"arraybuffer",key:m,url:v,xhrSettings:x,config:{dataType:b}})},onProcess:function(){this.state=C.FILE_PROCESSING;var p=this.config.dataType;this.data=p?new p(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});f.register("binary",function(p,u,m,v){if(Array.isArray(p))for(var x=0;x{var y=a(83419),C=a(74099),g=a(95540),f=a(19550),d=a(41212),c=a(26430),h=a(21859),p=a(57318),u=new y({Extends:c,initialize:function(v,x,b,T,_,A){var M,I;if(d(x)){var R=x;x=g(R,"key"),M=new f(v,{key:x,url:g(R,"textureURL"),extension:g(R,"textureExtension","png"),normalMap:g(R,"normalMap"),xhrSettings:g(R,"textureXhrSettings")}),I=new p(v,{key:x,url:g(R,"fontDataURL"),extension:g(R,"fontDataExtension","xml"),xhrSettings:g(R,"fontDataXhrSettings")})}else M=new f(v,x,b,_),I=new p(v,x,T,A);c.call(this,v,"bitmapfont",x,M.linkFile?[M,I,M.linkFile]:[M,I])},addToCache:function(){if(this.isReadyToProcess()){var m=this.files[0],v=this.files[1];m.addToCache();var x=m.cache.get(m.key),b=h(v.data,m.cache.getFrame(m.key),0,0,x);this.loader.cacheManager.bitmapFont.add(m.key,{data:b,texture:m.key,frame:null}),this.complete=!0}}});C.register("bitmapFont",function(m,v,x,b,T){var _;if(Array.isArray(m))for(var A=0;A{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x){var b="css";if(c(m)){var T=m;m=d(T,"key"),v=d(T,"url"),x=d(T,"xhrSettings"),b=d(T,"extension",b)}g.call(this,u,{type:"script",cache:!1,extension:b,responseType:"text",key:m,url:v,xhrSettings:x})},onProcess:function(){this.state=C.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});f.register("css",function(p,u,m){if(Array.isArray(p))for(var v=0;v{var y=a(38734),C=a(85722),g=a(83419),f=a(74099),d=a(95540),c=a(19550),h=a(41212),p=a(518),u=a(31403),m=a(46975),v=a(59327),x=a(26430),b=a(82038),T=a(55222),_=new g({Extends:x,initialize:function(M,I,R,F){if(R.multiAtlasURL){var N=new p(M,{key:I,url:R.multiAtlasURL,xhrSettings:F,config:R});x.call(this,M,"texture",I,[N])}else{var V=R.textureURL.substr(R.textureURL.length-3);R.type||(R.type="ktx"===V.toLowerCase()?"KTX":"PVR");var B=new C(M,{key:I,url:R.textureURL,extension:V,xhrSettings:F,config:R});if(R.atlasURL){var G=new p(M,{key:I,url:R.atlasURL,xhrSettings:F,config:R});x.call(this,M,"texture",I,[B,G])}else x.call(this,M,"texture",I,[B])}this.config=R},onFileComplete:function(A){if(-1!==this.files.indexOf(A)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===A.type&&A.data.hasOwnProperty("textures")){var I=A.data.textures,R=this.config,F=this.loader,N=F.baseURL,V=F.path,B=F.prefix,G=d(R,"multiBaseURL",this.baseURL),Q=d(R,"multiPath",this.path),H=d(R,"prefix",this.prefix),K=d(R,"textureXhrSettings");G&&F.setBaseURL(G),Q&&F.setPath(Q),H&&F.setPrefix(H);for(var tt=0;tt{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(98356),h=a(41212),p=new y({Extends:g,initialize:function(m,v,x,b,T,_){var A="ttf";if(h(v)){var M=v;v=d(M,"key"),x=d(M,"url"),b=d(M,"format","truetype"),T=d(M,"descriptors",null),_=d(M,"xhrSettings"),A=d(M,"extension",A)}else void 0===b&&(b="truetype");g.call(this,m,{type:"font",cache:!1,extension:A,responseType:"text",key:v,url:x,xhrSettings:_}),this.data={format:b,descriptors:T},this.state=C.FILE_POPULATED},onProcess:function(){this.state=C.FILE_PROCESSING,this.src=c(this,this.loader.baseURL);var u,m=this.key,v="url("+this.src+') format("'+this.data.format+'")';u=this.data.descriptors?new FontFace(m,v,this.data.descriptors):new FontFace(m,v);var x=this;u.load().then(function(){document.fonts.add(u),document.body.classList.add("fonts-loaded"),x.onProcessComplete()}).catch(function(){console.warn("Font failed to load",v),x.onProcessComplete()})}});f.register("font",function(u,m,v,x,b){if(Array.isArray(u))for(var T=0;T{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=a(73894),p=new y({Extends:g,initialize:function(m,v,x,b,T){var _="glsl";if(c(v)){var A=v;v=d(A,"key"),x=d(A,"url"),b=d(A,"shaderType","fragment"),T=d(A,"xhrSettings"),_=d(A,"extension",_)}else void 0===b&&(b="fragment");g.call(this,m,{type:"glsl",cache:m.cacheManager.shader,extension:_,responseType:"text",key:v,url:x,config:{shaderType:b},xhrSettings:T})},onProcess:function(){this.state=C.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var u=this.data.split("\n"),m=this.extractBlock(u,0);if(m)for(;m;){var v=this.getShaderName(m.header),x=this.getShaderType(m.header),b=this.getShaderUniforms(m.header),T=m.shader;if(this.cache.has(v)){var _=this.cache.get(v);"fragment"===x?_.fragmentSrc=T:_.vertexSrc=T,_.uniforms||(_.uniforms=b)}else this.cache.add(v,"fragment"===x?new h(v,T,"",b):new h(v,"",T,b));m=this.extractBlock(u,m.offset)}else this.cache.add(this.key,"fragment"===this.config.shaderType?new h(this.key,this.data):new h(this.key,"",this.data))},getShaderName:function(u){for(var m=0;m{var y=a(83419),C=a(54899),g=a(41299),f=a(95540),d=a(98356),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x){if(c(m)){var b=m;m=f(b,"key"),x=f(b,"config",x)}g.call(this,u,{type:"audio",cache:u.cacheManager.audio,extension:v.type,key:m,url:v.url,config:x}),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var p=0;p{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x){var b="html";if(c(m)){var T=m;m=d(T,"key"),v=d(T,"url"),x=d(T,"xhrSettings"),b=d(T,"extension",b)}g.call(this,u,{type:"text",cache:u.cacheManager.html,extension:b,responseType:"text",key:m,url:v,xhrSettings:x})},onProcess:function(){this.state=C.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});f.register("html",function(p,u,m){if(Array.isArray(p))for(var v=0;v{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x,b,T){void 0===x&&(x=512),void 0===b&&(b=512);var _="html";if(c(m)){var A=m;m=d(A,"key"),v=d(A,"url"),T=d(A,"xhrSettings"),_=d(A,"extension",_),x=d(A,"width",x),b=d(A,"height",b)}g.call(this,u,{type:"html",cache:u.textureManager,extension:_,responseType:"text",key:m,url:v,xhrSettings:T,config:{width:x,height:b}})},onProcess:function(){this.state=C.FILE_PROCESSING;var p=this.config.width,u=this.config.height,m=[];m.push(''),m.push(''),m.push(''),m.push(this.xhrLoader.responseText),m.push(""),m.push(""),m.push("");var v=[m.join("\n")],x=this;try{var b=new window.Blob(v,{type:"image/svg+xml;charset=utf-8"})}catch{return x.state=C.FILE_ERRORED,void x.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){g.revokeObjectURL(x.data),x.onProcessComplete()},this.data.onerror=function(){g.revokeObjectURL(x.data),x.onProcessError()},g.createObjectURL(this.data,b,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});f.register("htmlTexture",function(p,u,m,v,x){if(Array.isArray(p))for(var b=0;b{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=a(98356),p=new y({Extends:g,initialize:function u(m,v,x,b,T){var A,_="png";if(c(v)){var M=v;v=d(M,"key"),x=d(M,"url"),A=d(M,"normalMap"),b=d(M,"xhrSettings"),_=d(M,"extension",_),T=d(M,"frameConfig")}if(Array.isArray(x)&&(A=x[1],x=x[0]),g.call(this,m,{type:"image",cache:m.textureManager,extension:_,responseType:"blob",key:v,url:x,xhrSettings:b,config:T}),A){var R=new u(m,this.key,A,b,T);R.type="normalMap",this.setLink(R),m.addFile(R)}this.useImageElementLoad="HTMLImageElement"===m.imageLoadType||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=C.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var u=this;this.data.onload=function(){g.revokeObjectURL(u.data),u.onProcessComplete()},this.data.onerror=function(){g.revokeObjectURL(u.data),u.onProcessError()},g.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var u=this.state;this.state=C.FILE_PROCESSING,u===C.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=C.FILE_LOADING,this.src=h(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var u=this;this.data.onload=function(){u.state=C.FILE_LOADED,u.loader.nextFile(u,!0)},this.data.onerror=function(){u.loader.nextFile(u,!1)},this.data.src=this.src},addToCache:function(){var u=this.linkFile;u?u.state>=C.FILE_COMPLETE&&("spritesheet"===u.type?u.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,u.data,this.data):this.cache.addImage(this.key,this.data,u.data)):this.cache.addImage(this.key,this.data)}});f.register("image",function(u,m,v){if(Array.isArray(u))for(var x=0;x{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(35154),h=a(41212),p=new y({Extends:g,initialize:function(m,v,x,b,T){var _="json";if(h(v)){var A=v;v=d(A,"key"),x=d(A,"url"),b=d(A,"xhrSettings"),_=d(A,"extension",_),T=d(A,"dataKey",T)}g.call(this,m,{type:"json",cache:m.cacheManager.json,extension:_,responseType:"text",key:v,url:x,xhrSettings:b,config:T}),h(x)&&(this.data=T?c(x,T):x,this.state=C.FILE_POPULATED)},onProcess:function(){if(this.state!==C.FILE_POPULATED){this.state=C.FILE_PROCESSING;try{var u=JSON.parse(this.xhrLoader.responseText)}catch(v){throw this.onProcessError(),v}var m=this.config;this.data="string"==typeof m?c(u,m,u):u}this.onProcessComplete()}});f.register("json",function(u,m,v,x){if(Array.isArray(u))for(var b=0;b{var y=a(83419),C=a(74099),g=a(95540),f=a(19550),d=a(41212),c=a(518),h=a(26430),p=new y({Extends:h,initialize:function(m,v,x,b,T,_,A){if(d(v)){var M=v;v=g(M,"key"),x=g(M,"url",!1)?g(M,"url"):g(M,"atlasURL"),_=g(M,"xhrSettings"),b=g(M,"path"),T=g(M,"baseURL"),A=g(M,"textureXhrSettings")}var I=new c(m,v,x,_);h.call(this,m,"multiatlas",v,[I]),this.config.path=b,this.config.baseURL=T,this.config.textureXhrSettings=A},onFileComplete:function(u){if(-1!==this.files.indexOf(u)&&(this.pending--,"json"===u.type&&u.data.hasOwnProperty("textures"))){var v=u.data.textures,x=this.config,b=this.loader,T=b.baseURL,_=b.path,A=b.prefix,M=g(x,"baseURL",this.baseURL),I=g(x,"path",this.path),R=g(x,"prefix",this.prefix),F=g(x,"textureXhrSettings");b.setBaseURL(M),b.setPath(I),b.setPrefix(R);for(var N=0;N{var y=a(83419),C=a(74099),g=a(95540),f=a(41212),d=a(26430),c=a(34328),h=new y({Extends:d,initialize:function(u,m,v,x){var b="js",T=[];if(f(m)){var _=m;m=g(_,"key"),v=g(_,"url"),x=g(_,"xhrSettings"),b=g(_,"extension",b)}Array.isArray(v)||(v=[v]);for(var A=0;A{var y=a(83419),C=a(74099),g=a(95540),f=a(41212),d=a(26430),c=a(85048),h=a(61485),p=a(78776),u=new y({Extends:d,initialize:function(v,x,b,T,_,A){var M,I,R=v.cacheManager.obj;if(f(x)){var F=x;x=g(F,"key"),M=new p(v,{key:x,type:"obj",cache:R,url:g(F,"url"),extension:g(F,"extension","obj"),xhrSettings:g(F,"xhrSettings"),config:{flipUV:g(F,"flipUV",_)}}),(T=g(F,"matURL"))&&(I=new p(v,{key:x,type:"mat",cache:R,url:T,extension:g(F,"matExtension","mat"),xhrSettings:g(F,"xhrSettings")}))}else M=new p(v,{key:x,url:b,type:"obj",cache:R,extension:"obj",xhrSettings:A,config:{flipUV:_}}),T&&(I=new p(v,{key:x,url:T,type:"mat",cache:R,extension:"mat",xhrSettings:A}));d.call(this,v,"obj",x,[M,I])},addToCache:function(){if(this.isReadyToProcess()){var m=this.files[0],v=this.files[1],x=c(m.data,m.config.flipUV);v&&(x.materials=h(v.data)),m.cache.add(m.key,x),this.complete=!0}}});C.register("obj",function(m,v,x,b,T){var _;if(Array.isArray(m))for(var A=0;A{var y=a(83419),C=a(23906),g=a(74099),f=a(518),d=new y({Extends:f,initialize:function(h,p,u,m,v){f.call(this,h,p,u,m,v),this.type="packfile"},onProcess:function(){if(this.state!==C.FILE_POPULATED&&(this.state=C.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var c={};c[this.config]=this.data,this.data=c}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});g.register("pack",function(c,h,p,u){if(Array.isArray(c))for(var m=0;m{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x,b,T){var _="js";if(c(m)){var A=m;m=d(A,"key"),v=d(A,"url"),T=d(A,"xhrSettings"),_=d(A,"extension",_),x=d(A,"start"),b=d(A,"mapping")}g.call(this,u,{type:"plugin",cache:!1,extension:_,responseType:"text",key:m,url:v,xhrSettings:T,config:{start:x,mapping:b}}),"function"==typeof v&&(this.data=v,this.state=C.FILE_POPULATED)},onProcess:function(){var p=this.loader.systems.plugins,u=this.config,m=d(u,"start",!1),v=d(u,"mapping",null);if(this.state===C.FILE_POPULATED)p.install(this.key,this.data,m,v);else{this.state=C.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var x=p.install(this.key,window[this.key],m,v);(m||v)&&(this.loader.systems[v]=x,this.loader.scene[v]=x)}this.onProcessComplete()}});f.register("plugin",function(p,u,m,v,x){if(Array.isArray(p))for(var b=0;b{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x,b){var T="svg";if(c(m)){var _=m;m=d(_,"key"),v=d(_,"url"),x=d(_,"svgConfig",{}),b=d(_,"xhrSettings"),T=d(_,"extension",T)}var A={type:"svg",cache:u.textureManager,extension:T,responseType:"text",key:m,url:v,xhrSettings:b,config:{width:d(x,"width"),height:d(x,"height"),scale:d(x,"scale")}};g.call(this,u,A)},onProcess:function(){this.state=C.FILE_PROCESSING;var p=this.xhrLoader.responseText,u=[p],m=this.config.width,v=this.config.height,x=this.config.scale;t:if(m&&v||x){var _=(new DOMParser).parseFromString(p,"text/xml").getElementsByTagName("svg")[0],A=_.hasAttribute("viewBox"),M=parseFloat(_.getAttribute("width")),I=parseFloat(_.getAttribute("height"));if(!A&&M&&I)_.setAttribute("viewBox","0 0 "+M+" "+I);else if(A&&!M&&!I){var R=_.getAttribute("viewBox").split(/\s+|,/);M=R[2],I=R[3]}if(x){if(!M||!I)break t;m=M*x,v=I*x}_.setAttribute("width",m.toString()+"px"),_.setAttribute("height",v.toString()+"px"),u=[(new XMLSerializer).serializeToString(_)]}try{var F=new window.Blob(u,{type:"image/svg+xml;charset=utf-8"})}catch{return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var N=this,V=!1;this.data.onload=function(){V||g.revokeObjectURL(N.data),N.onProcessComplete()},this.data.onerror=function(){V?N.onProcessError():(V=!0,g.revokeObjectURL(N.data),N.data.src="data:image/svg+xml,"+encodeURIComponent(u.join("")))},g.createObjectURL(this.data,F,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});f.register("svg",function(p,u,m,v){if(Array.isArray(p))for(var x=0;x{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x){var b="js";if(c(m)){var T=m;m=d(T,"key"),v=d(T,"url"),x=d(T,"xhrSettings"),b=d(T,"extension",b)}g.call(this,u,{type:"text",extension:b,responseType:"text",key:m,url:v,xhrSettings:x})},onProcess:function(){this.state=C.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var p=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),u=eval;this.loader.sceneManager.add(this.key,u(p)),this.complete=!0}});f.register("sceneFile",function(p,u,m){if(Array.isArray(p))for(var v=0;v{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x,b,T){var _="js";if(c(m)){var A=m;m=d(A,"key"),v=d(A,"url"),T=d(A,"xhrSettings"),_=d(A,"extension",_),x=d(A,"systemKey"),b=d(A,"sceneKey")}g.call(this,u,{type:"scenePlugin",cache:!1,extension:_,responseType:"text",key:m,url:v,xhrSettings:T,config:{systemKey:x,sceneKey:b}}),"function"==typeof v&&(this.data=v,this.state=C.FILE_POPULATED)},onProcess:function(){var p=this.loader.systems.plugins,u=this.config,m=this.key,v=d(u,"systemKey",m),x=d(u,"sceneKey",m);this.state===C.FILE_POPULATED?p.installScenePlugin(v,this.data,x,this.loader.scene,!0):(this.state=C.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),p.installScenePlugin(v,window[this.key],x,this.loader.scene,!0)),this.onProcessComplete()}});f.register("scenePlugin",function(p,u,m,v,x){if(Array.isArray(p))for(var b=0;b{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x,b){var T="js";if(c(m)){var _=m;m=d(_,"key"),v=d(_,"url"),x=d(_,"type","script"),b=d(_,"xhrSettings"),T=d(_,"extension",T)}else void 0===x&&(x="script");g.call(this,u,{type:x,cache:!1,extension:T,responseType:"text",key:m,url:v,xhrSettings:b})},onProcess:function(){this.state=C.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});f.register("script",function(p,u,m,v){if(Array.isArray(p))for(var x=0;x{var y=a(83419),C=a(23906),g=a(74099),f=a(19550),d=new y({Extends:f,initialize:function(h,p,u,m,v){f.call(this,h,p,u,v,m),this.type="spritesheet"},addToCache:function(){var c=this.linkFile;c?c.state>=C.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addSpriteSheet(this.key,c.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,c.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});g.register("spritesheet",function(c,h,p,u){if(Array.isArray(c))for(var m=0;m{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=new y({Extends:g,initialize:function(u,m,v,x){var b="text",T="txt",_=u.cacheManager.text;if(c(m)){var A=m;m=d(A,"key"),v=d(A,"url"),x=d(A,"xhrSettings"),T=d(A,"extension",T),b=d(A,"type",b),_=d(A,"cache",_)}g.call(this,u,{type:b,cache:_,extension:T,responseType:"text",key:m,url:v,xhrSettings:x})},onProcess:function(){this.state=C.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});f.register("text",function(p,u,m){if(Array.isArray(p))for(var v=0;v{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=a(80341),p=new y({Extends:g,initialize:function(m,v,x,b){var T="csv";if(c(v)){var _=v;v=d(_,"key"),x=d(_,"url"),b=d(_,"xhrSettings"),T=d(_,"extension",T)}g.call(this,m,{type:"tilemapCSV",cache:m.cacheManager.tilemap,extension:T,responseType:"text",key:v,url:x,xhrSettings:b}),this.tilemapFormat=h.CSV},onProcess:function(){this.state=C.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){this.cache.add(this.key,{format:this.tilemapFormat,data:this.data})}});f.register("tilemapCSV",function(u,m,v){if(Array.isArray(u))for(var x=0;x{var y=a(83419),C=a(74099),g=a(518),f=a(80341),d=new y({Extends:g,initialize:function(h,p,u,m){g.call(this,h,p,u,m),this.type="tilemapJSON",this.cache=h.cacheManager.tilemap},addToCache:function(){this.cache.add(this.key,{format:f.WELTMEISTER,data:this.data})}});C.register("tilemapImpact",function(c,h,p){if(Array.isArray(c))for(var u=0;u{var y=a(83419),C=a(74099),g=a(518),f=a(80341),d=new y({Extends:g,initialize:function(h,p,u,m){g.call(this,h,p,u,m),this.type="tilemapJSON",this.cache=h.cacheManager.tilemap},addToCache:function(){this.cache.add(this.key,{format:f.TILED_JSON,data:this.data})}});C.register("tilemapTiledJSON",function(c,h,p){if(Array.isArray(c))for(var u=0;u{var y=a(83419),C=a(74099),g=a(95540),f=a(19550),d=a(41212),c=a(26430),h=a(78776),p=new y({Extends:c,initialize:function(m,v,x,b,T,_){var A,M;if(d(v)){var I=v;v=g(I,"key"),A=new f(m,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),M=new h(m,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","txt"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(m,v,x,T),M=new h(m,v,b,_);c.call(this,m,"unityatlas",v,A.linkFile?[A,M,A.linkFile]:[A,M])},addToCache:function(){if(this.isReadyToProcess()){var u=this.files[0];this.loader.textureManager.addUnityAtlas(u.key,u.data,this.files[1].data,this.files[2]?this.files[2].data:null),this.complete=!0}}});C.register("unityAtlas",function(u,m,v,x,b){var T;if(Array.isArray(u))for(var _=0;_{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(98356),c=a(95540),h=a(41212),p=new y({Extends:g,initialize:function(m,v,x,b){if(void 0===b&&(b=!1),h(v)){var T=v;v=c(T,"key"),x=c(T,"url",[]),b=c(T,"noAudio",!1)}var _=m.systems.game.device.video.getVideoURL(x);_||console.warn("VideoFile: No supported format for "+v),g.call(this,m,{type:"video",cache:m.cacheManager.video,extension:_.type,key:v,url:_.url,config:{noAudio:b}})},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=d(this,this.loader.baseURL),this.state=C.FILE_LOADED,this.loader.nextFile(this,!0)}});f.register("video",function(u,m,v){if(Array.isArray(u))for(var x=0;x{var y=a(83419),C=a(23906),g=a(41299),f=a(74099),d=a(95540),c=a(41212),h=a(56836),p=new y({Extends:g,initialize:function(m,v,x,b){var T="xml";if(c(v)){var _=v;v=d(_,"key"),x=d(_,"url"),b=d(_,"xhrSettings"),T=d(_,"extension",T)}g.call(this,m,{type:"xml",cache:m.cacheManager.xml,extension:T,responseType:"text",key:v,url:x,xhrSettings:b})},onProcess:function(){this.state=C.FILE_PROCESSING,this.data=h(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});f.register("xml",function(u,m,v){if(Array.isArray(u))for(var x=0;x{S.exports={AnimationJSONFile:a(14135),AsepriteFile:a(76272),AtlasJSONFile:a(38734),AtlasXMLFile:a(74599),AudioFile:a(21097),AudioSpriteFile:a(89524),BinaryFile:a(85722),BitmapFontFile:a(97025),CompressedTextureFile:a(69559),CSSFile:a(16024),FontFile:a(87674),GLSLFile:a(47931),HTML5AudioFile:a(89749),HTMLFile:a(88470),HTMLTextureFile:a(14643),ImageFile:a(19550),JSONFile:a(518),MultiAtlasFile:a(59327),MultiScriptFile:a(99297),OBJFile:a(41846),PackFile:a(58610),PluginFile:a(48988),SceneFile:a(88423),ScenePluginFile:a(56812),ScriptFile:a(34328),SpriteSheetFile:a(85035),SVGFile:a(67397),TextFile:a(78776),TilemapCSVFile:a(49477),TilemapImpactFile:a(40807),TilemapJSONFile:a(56775),UnityAtlasFile:a(25771),VideoFile:a(33720),XMLFile:a(57318)}},57777:(S,P,a)=>{var y=a(23906),C=a(79291),g={Events:a(54899),FileTypes:a(64589),File:a(41299),FileTypesManager:a(74099),GetURL:a(98356),LoaderPlugin:a(74261),MergeXHRSettings:a(3374),MultiFile:a(26430),XHRLoader:a(84376),XHRSettings:a(92638)};g=C(!1,g,y),S.exports=g},53307:S=>{S.exports=function(a){for(var y=0,C=0;C{var y=a(6411);S.exports=function(g,f){return y(g)/y(f)/y(g-f)}},30976:S=>{S.exports=function(a,y){return Math.floor(Math.random()*(y-a+1)+a)}},87842:S=>{S.exports=function(a,y,C,g,f){var d=.5*(g-y),c=.5*(f-C),h=a*a;return(2*C-2*g+d+c)*(a*h)+(-3*C+3*g-2*d-c)*h+d*a+C}},26302:S=>{S.exports=function(a,y,C){void 0===y&&(y=0),void 0===C&&(C=10);var g=Math.pow(C,-y);return Math.ceil(a*g)/g}},45319:S=>{S.exports=function(a,y,C){return Math.max(y,Math.min(C,a))}},39506:(S,P,a)=>{var y=a(36383);S.exports=function(g){return g*y.DEG_TO_RAD}},61241:S=>{S.exports=function(a,y){return Math.abs(a-y)}},38857:(S,P,a)=>{var y=a(45319),C=a(83419),g=a(37867),f=a(29747),d=new g,c=new C({initialize:function h(p,u,m,v){void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v=h.DefaultOrder),this._x=p,this._y=u,this._z=m,this._order=v,this.onChangeCallback=f},x:{get:function(){return this._x},set:function(h){this._x=h,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(h){this._y=h,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(h){this._z=h,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(h){this._order=h,this.onChangeCallback(this)}},set:function(h,p,u,m){return void 0===m&&(m=this._order),this._x=h,this._y=p,this._z=u,this._order=m,this.onChangeCallback(this),this},copy:function(h){return this.set(h.x,h.y,h.z,h.order)},setFromQuaternion:function(h,p,u){return void 0===p&&(p=this._order),void 0===u&&(u=!1),d.fromQuat(h),this.setFromRotationMatrix(d,p,u)},setFromRotationMatrix:function(h,p,u){void 0===p&&(p=this._order),void 0===u&&(u=!1);var m=h.val,v=m[0],x=m[4],b=m[8],T=m[1],_=m[5],A=m[9],M=m[2],I=m[6],R=m[10],F=0,N=0,V=0,B=.99999;switch(p){case"XYZ":N=Math.asin(y(b,-1,1)),Math.abs(b){S.exports=function(a){if(0===a)return 1;for(var y=a;--a;)y*=a;return y}},99472:S=>{S.exports=function(a,y){return Math.random()*(y-a)+a}},77623:S=>{S.exports=function(a,y,C){void 0===y&&(y=0),void 0===C&&(C=10);var g=Math.pow(C,-y);return Math.floor(a*g)/g}},62945:(S,P,a)=>{var y=a(45319);S.exports=function(g,f,d){return(d-f)*(g=y(g,0,1))+f}},38265:S=>{S.exports=function(a,y){return a/y/1e3}},78702:S=>{S.exports=function(a){return a==parseFloat(a)?!(a%2):void 0}},94883:S=>{S.exports=function(a){return a===parseFloat(a)?!(a%2):void 0}},28915:S=>{S.exports=function(a,y,C){return(y-a)*C+a}},94908:S=>{S.exports=function(a,y,C){return void 0===C&&(C=0),a.clone().lerp(y,C)}},94434:(S,P,a)=>{var C=new(a(83419))({initialize:function(f){this.val=new Float32Array(9),f?this.copy(f):this.identity()},clone:function(){return new C(this)},set:function(g){return this.copy(g)},copy:function(g){var f=this.val,d=g.val;return f[0]=d[0],f[1]=d[1],f[2]=d[2],f[3]=d[3],f[4]=d[4],f[5]=d[5],f[6]=d[6],f[7]=d[7],f[8]=d[8],this},fromMat4:function(g){var f=g.val,d=this.val;return d[0]=f[0],d[1]=f[1],d[2]=f[2],d[3]=f[4],d[4]=f[5],d[5]=f[6],d[6]=f[8],d[7]=f[9],d[8]=f[10],this},fromArray:function(g){var f=this.val;return f[0]=g[0],f[1]=g[1],f[2]=g[2],f[3]=g[3],f[4]=g[4],f[5]=g[5],f[6]=g[6],f[7]=g[7],f[8]=g[8],this},identity:function(){var g=this.val;return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=1,g[5]=0,g[6]=0,g[7]=0,g[8]=1,this},transpose:function(){var g=this.val,f=g[1],d=g[2],c=g[5];return g[1]=g[3],g[2]=g[6],g[3]=f,g[5]=g[7],g[6]=d,g[7]=c,this},invert:function(){var g=this.val,f=g[0],d=g[1],c=g[2],h=g[3],p=g[4],u=g[5],m=g[6],v=g[7],x=g[8],b=x*p-u*v,T=-x*h+u*m,_=v*h-p*m,A=f*b+d*T+c*_;return A?(g[0]=b*(A=1/A),g[1]=(-x*d+c*v)*A,g[2]=(u*d-c*p)*A,g[3]=T*A,g[4]=(x*f-c*m)*A,g[5]=(-u*f+c*h)*A,g[6]=_*A,g[7]=(-v*f+d*m)*A,g[8]=(p*f-d*h)*A,this):null},adjoint:function(){var g=this.val,f=g[0],d=g[1],c=g[2],h=g[3],p=g[4],u=g[5],m=g[6],v=g[7],x=g[8];return g[0]=p*x-u*v,g[1]=c*v-d*x,g[2]=d*u-c*p,g[3]=u*m-h*x,g[4]=f*x-c*m,g[5]=c*h-f*u,g[6]=h*v-p*m,g[7]=d*m-f*v,g[8]=f*p-d*h,this},determinant:function(){var g=this.val,h=g[3],p=g[4],u=g[5],m=g[6],v=g[7],x=g[8];return g[0]*(x*p-u*v)+g[1]*(-x*h+u*m)+g[2]*(v*h-p*m)},multiply:function(g){var f=this.val,d=f[0],c=f[1],h=f[2],p=f[3],u=f[4],m=f[5],v=f[6],x=f[7],b=f[8],T=g.val,_=T[0],A=T[1],M=T[2],I=T[3],R=T[4],F=T[5],N=T[6],V=T[7],B=T[8];return f[0]=_*d+A*p+M*v,f[1]=_*c+A*u+M*x,f[2]=_*h+A*m+M*b,f[3]=I*d+R*p+F*v,f[4]=I*c+R*u+F*x,f[5]=I*h+R*m+F*b,f[6]=N*d+V*p+B*v,f[7]=N*c+V*u+B*x,f[8]=N*h+V*m+B*b,this},translate:function(g){var f=this.val,d=g.x,c=g.y;return f[6]=d*f[0]+c*f[3]+f[6],f[7]=d*f[1]+c*f[4]+f[7],f[8]=d*f[2]+c*f[5]+f[8],this},rotate:function(g){var f=this.val,d=f[0],c=f[1],h=f[2],p=f[3],u=f[4],m=f[5],v=Math.sin(g),x=Math.cos(g);return f[0]=x*d+v*p,f[1]=x*c+v*u,f[2]=x*h+v*m,f[3]=x*p-v*d,f[4]=x*u-v*c,f[5]=x*m-v*h,this},scale:function(g){var f=this.val,d=g.x,c=g.y;return f[0]=d*f[0],f[1]=d*f[1],f[2]=d*f[2],f[3]=c*f[3],f[4]=c*f[4],f[5]=c*f[5],this},fromQuat:function(g){var f=g.x,d=g.y,c=g.z,h=g.w,p=f+f,u=d+d,m=c+c,v=f*p,x=f*u,b=f*m,T=d*u,_=d*m,A=c*m,M=h*p,I=h*u,R=h*m,F=this.val;return F[0]=1-(T+A),F[3]=x+R,F[6]=b-I,F[1]=x-R,F[4]=1-(v+A),F[7]=_+M,F[2]=b+I,F[5]=_-M,F[8]=1-(v+T),this},normalFromMat4:function(g){var f=g.val,d=this.val,c=f[0],h=f[1],p=f[2],u=f[3],m=f[4],v=f[5],x=f[6],b=f[7],T=f[8],_=f[9],A=f[10],M=f[11],I=f[12],R=f[13],F=f[14],N=f[15],V=c*v-h*m,B=c*x-p*m,G=c*b-u*m,Q=h*x-p*v,H=h*b-u*v,K=p*b-u*x,tt=T*R-_*I,at=T*F-A*I,lt=T*N-M*I,q=_*F-A*R,it=_*N-M*R,Y=A*N-M*F,X=V*Y-B*it+G*q+Q*lt-H*at+K*tt;return X?(d[0]=(v*Y-x*it+b*q)*(X=1/X),d[1]=(x*lt-m*Y-b*at)*X,d[2]=(m*it-v*lt+b*tt)*X,d[3]=(p*it-h*Y-u*q)*X,d[4]=(c*Y-p*lt+u*at)*X,d[5]=(h*lt-c*it-u*tt)*X,d[6]=(R*K-F*H+N*Q)*X,d[7]=(F*G-I*K-N*B)*X,d[8]=(I*H-R*G+N*V)*X,this):null}});S.exports=C},37867:(S,P,a)=>{var y=a(83419),C=a(25836),g=1e-6,f=new y({initialize:function(v){this.val=new Float32Array(16),v?this.copy(v):this.identity()},clone:function(){return new f(this)},set:function(m){return this.copy(m)},setValues:function(m,v,x,b,T,_,A,M,I,R,F,N,V,B,G,Q){var H=this.val;return H[0]=m,H[1]=v,H[2]=x,H[3]=b,H[4]=T,H[5]=_,H[6]=A,H[7]=M,H[8]=I,H[9]=R,H[10]=F,H[11]=N,H[12]=V,H[13]=B,H[14]=G,H[15]=Q,this},copy:function(m){var v=m.val;return this.setValues(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15])},fromArray:function(m){return this.setValues(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(m,v,x){var T=d.fromQuat(x).val,_=v.x,A=v.y,M=v.z;return this.setValues(T[0]*_,T[1]*_,T[2]*_,0,T[4]*A,T[5]*A,T[6]*A,0,T[8]*M,T[9]*M,T[10]*M,0,m.x,m.y,m.z,1)},xyz:function(m,v,x){this.identity();var b=this.val;return b[12]=m,b[13]=v,b[14]=x,this},scaling:function(m,v,x){this.zero();var b=this.val;return b[0]=m,b[5]=v,b[10]=x,b[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var m=this.val,v=m[1],x=m[2],b=m[3],T=m[6],_=m[7],A=m[11];return m[1]=m[4],m[2]=m[8],m[3]=m[12],m[4]=v,m[6]=m[9],m[7]=m[13],m[8]=x,m[9]=T,m[11]=m[14],m[12]=b,m[13]=_,m[14]=A,this},getInverse:function(m){return this.copy(m),this.invert()},invert:function(){var m=this.val,v=m[0],x=m[1],b=m[2],T=m[3],_=m[4],A=m[5],M=m[6],I=m[7],R=m[8],F=m[9],N=m[10],V=m[11],B=m[12],G=m[13],Q=m[14],H=m[15],K=v*A-x*_,tt=v*M-b*_,at=v*I-T*_,lt=x*M-b*A,q=x*I-T*A,it=b*I-T*M,Y=R*G-F*B,X=R*Q-N*B,nt=R*H-V*B,dt=F*Q-N*G,gt=F*H-V*G,bt=N*H-V*Q,Et=K*bt-tt*gt+at*dt+lt*nt-q*X+it*Y;return Et?this.setValues((A*bt-M*gt+I*dt)*(Et=1/Et),(b*gt-x*bt-T*dt)*Et,(G*it-Q*q+H*lt)*Et,(N*q-F*it-V*lt)*Et,(M*nt-_*bt-I*X)*Et,(v*bt-b*nt+T*X)*Et,(Q*at-B*it-H*tt)*Et,(R*it-N*at+V*tt)*Et,(_*gt-A*nt+I*Y)*Et,(x*nt-v*gt-T*Y)*Et,(B*q-G*at+H*K)*Et,(F*at-R*q-V*K)*Et,(A*X-_*dt-M*Y)*Et,(v*dt-x*X+b*Y)*Et,(G*tt-B*lt-Q*K)*Et,(R*lt-F*tt+N*K)*Et):this},adjoint:function(){var m=this.val,v=m[0],x=m[1],b=m[2],T=m[3],_=m[4],A=m[5],M=m[6],I=m[7],R=m[8],F=m[9],N=m[10],V=m[11],B=m[12],G=m[13],Q=m[14],H=m[15];return this.setValues(A*(N*H-V*Q)-F*(M*H-I*Q)+G*(M*V-I*N),-(x*(N*H-V*Q)-F*(b*H-T*Q)+G*(b*V-T*N)),x*(M*H-I*Q)-A*(b*H-T*Q)+G*(b*I-T*M),-(x*(M*V-I*N)-A*(b*V-T*N)+F*(b*I-T*M)),-(_*(N*H-V*Q)-R*(M*H-I*Q)+B*(M*V-I*N)),v*(N*H-V*Q)-R*(b*H-T*Q)+B*(b*V-T*N),-(v*(M*H-I*Q)-_*(b*H-T*Q)+B*(b*I-T*M)),v*(M*V-I*N)-_*(b*V-T*N)+R*(b*I-T*M),_*(F*H-V*G)-R*(A*H-I*G)+B*(A*V-I*F),-(v*(F*H-V*G)-R*(x*H-T*G)+B*(x*V-T*F)),v*(A*H-I*G)-_*(x*H-T*G)+B*(x*I-T*A),-(v*(A*V-I*F)-_*(x*V-T*F)+R*(x*I-T*A)),-(_*(F*Q-N*G)-R*(A*Q-M*G)+B*(A*N-M*F)),v*(F*Q-N*G)-R*(x*Q-b*G)+B*(x*N-b*F),-(v*(A*Q-M*G)-_*(x*Q-b*G)+B*(x*M-b*A)),v*(A*N-M*F)-_*(x*N-b*F)+R*(x*M-b*A))},determinant:function(){var m=this.val,v=m[0],x=m[1],b=m[2],T=m[3],_=m[4],A=m[5],M=m[6],I=m[7],R=m[8],F=m[9],N=m[10],V=m[11],B=m[12],G=m[13],Q=m[14],H=m[15];return(v*A-x*_)*(N*H-V*Q)-(v*M-b*_)*(F*H-V*G)+(v*I-T*_)*(F*Q-N*G)+(x*M-b*A)*(R*H-V*B)-(x*I-T*A)*(R*Q-N*B)+(b*I-T*M)*(R*G-F*B)},multiply:function(m){var v=this.val,x=v[0],b=v[1],T=v[2],_=v[3],A=v[4],M=v[5],I=v[6],R=v[7],F=v[8],N=v[9],V=v[10],B=v[11],G=v[12],Q=v[13],H=v[14],K=v[15],tt=m.val,at=tt[0],lt=tt[1],q=tt[2],it=tt[3];return v[0]=at*x+lt*A+q*F+it*G,v[1]=at*b+lt*M+q*N+it*Q,v[2]=at*T+lt*I+q*V+it*H,v[3]=at*_+lt*R+q*B+it*K,v[4]=(at=tt[4])*x+(lt=tt[5])*A+(q=tt[6])*F+(it=tt[7])*G,v[5]=at*b+lt*M+q*N+it*Q,v[6]=at*T+lt*I+q*V+it*H,v[7]=at*_+lt*R+q*B+it*K,v[8]=(at=tt[8])*x+(lt=tt[9])*A+(q=tt[10])*F+(it=tt[11])*G,v[9]=at*b+lt*M+q*N+it*Q,v[10]=at*T+lt*I+q*V+it*H,v[11]=at*_+lt*R+q*B+it*K,v[12]=(at=tt[12])*x+(lt=tt[13])*A+(q=tt[14])*F+(it=tt[15])*G,v[13]=at*b+lt*M+q*N+it*Q,v[14]=at*T+lt*I+q*V+it*H,v[15]=at*_+lt*R+q*B+it*K,this},multiplyLocal:function(m){var v=this.val,x=m.val;return this.setValues(v[0]*x[0]+v[1]*x[4]+v[2]*x[8]+v[3]*x[12],v[0]*x[1]+v[1]*x[5]+v[2]*x[9]+v[3]*x[13],v[0]*x[2]+v[1]*x[6]+v[2]*x[10]+v[3]*x[14],v[0]*x[3]+v[1]*x[7]+v[2]*x[11]+v[3]*x[15],v[4]*x[0]+v[5]*x[4]+v[6]*x[8]+v[7]*x[12],v[4]*x[1]+v[5]*x[5]+v[6]*x[9]+v[7]*x[13],v[4]*x[2]+v[5]*x[6]+v[6]*x[10]+v[7]*x[14],v[4]*x[3]+v[5]*x[7]+v[6]*x[11]+v[7]*x[15],v[8]*x[0]+v[9]*x[4]+v[10]*x[8]+v[11]*x[12],v[8]*x[1]+v[9]*x[5]+v[10]*x[9]+v[11]*x[13],v[8]*x[2]+v[9]*x[6]+v[10]*x[10]+v[11]*x[14],v[8]*x[3]+v[9]*x[7]+v[10]*x[11]+v[11]*x[15],v[12]*x[0]+v[13]*x[4]+v[14]*x[8]+v[15]*x[12],v[12]*x[1]+v[13]*x[5]+v[14]*x[9]+v[15]*x[13],v[12]*x[2]+v[13]*x[6]+v[14]*x[10]+v[15]*x[14],v[12]*x[3]+v[13]*x[7]+v[14]*x[11]+v[15]*x[15])},premultiply:function(m){return this.multiplyMatrices(m,this)},multiplyMatrices:function(m,v){var x=m.val,b=v.val,T=x[0],_=x[4],A=x[8],M=x[12],I=x[1],R=x[5],F=x[9],N=x[13],V=x[2],B=x[6],G=x[10],Q=x[14],H=x[3],K=x[7],tt=x[11],at=x[15],lt=b[0],q=b[4],it=b[8],Y=b[12],X=b[1],nt=b[5],dt=b[9],gt=b[13],bt=b[2],Et=b[6],Bt=b[10],Kt=b[14],Zt=b[3],ne=b[7],ae=b[11],fe=b[15];return this.setValues(T*lt+_*X+A*bt+M*Zt,I*lt+R*X+F*bt+N*Zt,V*lt+B*X+G*bt+Q*Zt,H*lt+K*X+tt*bt+at*Zt,T*q+_*nt+A*Et+M*ne,I*q+R*nt+F*Et+N*ne,V*q+B*nt+G*Et+Q*ne,H*q+K*nt+tt*Et+at*ne,T*it+_*dt+A*Bt+M*ae,I*it+R*dt+F*Bt+N*ae,V*it+B*dt+G*Bt+Q*ae,H*it+K*dt+tt*Bt+at*ae,T*Y+_*gt+A*Kt+M*fe,I*Y+R*gt+F*Kt+N*fe,V*Y+B*gt+G*Kt+Q*fe,H*Y+K*gt+tt*Kt+at*fe)},translate:function(m){return this.translateXYZ(m.x,m.y,m.z)},translateXYZ:function(m,v,x){var b=this.val;return b[12]=b[0]*m+b[4]*v+b[8]*x+b[12],b[13]=b[1]*m+b[5]*v+b[9]*x+b[13],b[14]=b[2]*m+b[6]*v+b[10]*x+b[14],b[15]=b[3]*m+b[7]*v+b[11]*x+b[15],this},scale:function(m){return this.scaleXYZ(m.x,m.y,m.z)},scaleXYZ:function(m,v,x){var b=this.val;return b[0]=b[0]*m,b[1]=b[1]*m,b[2]=b[2]*m,b[3]=b[3]*m,b[4]=b[4]*v,b[5]=b[5]*v,b[6]=b[6]*v,b[7]=b[7]*v,b[8]=b[8]*x,b[9]=b[9]*x,b[10]=b[10]*x,b[11]=b[11]*x,this},makeRotationAxis:function(m,v){var x=Math.cos(v),b=Math.sin(v),T=1-x,_=m.x,A=m.y,M=m.z,I=T*_,R=T*A;return this.setValues(I*_+x,I*A-b*M,I*M+b*A,0,I*A+b*M,R*A+x,R*M-b*_,0,I*M-b*A,R*M+b*_,T*M*M+x,0,0,0,0,1)},rotate:function(m,v){var x=this.val,b=v.x,T=v.y,_=v.z,A=Math.sqrt(b*b+T*T+_*_);if(Math.abs(A){S.exports=function(a,y,C){return Math.min(a+y,C)}},50040:S=>{S.exports=function(a){var y=a.length;if(0===y)return 0;a.sort(function(g,f){return g-f});var C=Math.floor(y/2);return y%2==0?(a[C]+a[C-1])/2:a[C]}},37204:S=>{S.exports=function(a,y,C){return Math.max(a-y,C)}},65201:S=>{S.exports=function(a,y,C,g){void 0===C&&(C=y+1);var f=(a-y)/(C-y);return f>1?void 0!==g?(f=(g-a)/(g-C))<0&&(f=0):f=1:f<0&&(f=0),f}},15746:(S,P,a)=>{var y=a(83419),C=a(94434),g=a(29747),f=a(25836),d=1e-6,c=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),p=new f(1,0,0),u=new f(0,1,0),m=new f,v=new C,x=new y({initialize:function(T,_,A,M){this.onChangeCallback=g,this.set(T,_,A,M)},x:{get:function(){return this._x},set:function(b){this._x=b,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(b){this._y=b,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(b){this._z=b,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(b){this._w=b,this.onChangeCallback(this)}},copy:function(b){return this.set(b)},set:function(b,T,_,A,M){return void 0===M&&(M=!0),"object"==typeof b?(this._x=b.x||0,this._y=b.y||0,this._z=b.z||0,this._w=b.w||0):(this._x=b||0,this._y=T||0,this._z=_||0,this._w=A||0),M&&this.onChangeCallback(this),this},add:function(b){return this._x+=b.x,this._y+=b.y,this._z+=b.z,this._w+=b.w,this.onChangeCallback(this),this},subtract:function(b){return this._x-=b.x,this._y-=b.y,this._z-=b.z,this._w-=b.w,this.onChangeCallback(this),this},scale:function(b){return this._x*=b,this._y*=b,this._z*=b,this._w*=b,this.onChangeCallback(this),this},length:function(){var b=this.x,T=this.y,_=this.z,A=this.w;return Math.sqrt(b*b+T*T+_*_+A*A)},lengthSq:function(){var b=this.x,T=this.y,_=this.z,A=this.w;return b*b+T*T+_*_+A*A},normalize:function(){var b=this.x,T=this.y,_=this.z,A=this.w,M=b*b+T*T+_*_+A*A;return M>0&&(M=1/Math.sqrt(M),this._x=b*M,this._y=T*M,this._z=_*M,this._w=A*M),this.onChangeCallback(this),this},dot:function(b){return this.x*b.x+this.y*b.y+this.z*b.z+this.w*b.w},lerp:function(b,T){void 0===T&&(T=0);var _=this.x,A=this.y,M=this.z,I=this.w;return this.set(_+T*(b.x-_),A+T*(b.y-A),M+T*(b.z-M),I+T*(b.w-I))},rotationTo:function(b,T){var _=b.x*T.x+b.y*T.y+b.z*T.z;return _<-.999999?(m.copy(p).cross(b).length().999999?this.set(0,0,0,1):(m.copy(b).cross(T),this._x=m.x,this._y=m.y,this._z=m.z,this._w=1+_,this.normalize())},setAxes:function(b,T,_){var A=v.val;return A[0]=T.x,A[3]=T.y,A[6]=T.z,A[1]=_.x,A[4]=_.y,A[7]=_.z,A[2]=-b.x,A[5]=-b.y,A[8]=-b.z,this.fromMat3(v).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(b,T){T*=.5;var _=Math.sin(T);return this.set(_*b.x,_*b.y,_*b.z,Math.cos(T))},multiply:function(b){var T=this.x,_=this.y,A=this.z,M=this.w,I=b.x,R=b.y,F=b.z,N=b.w;return this.set(T*N+M*I+_*F-A*R,_*N+M*R+A*I-T*F,A*N+M*F+T*R-_*I,M*N-T*I-_*R-A*F)},slerp:function(b,T){var _=this.x,A=this.y,M=this.z,I=this.w,R=b.x,F=b.y,N=b.z,V=b.w,B=_*R+A*F+M*N+I*V;B<0&&(B=-B,R=-R,F=-F,N=-N,V=-V);var G=1-T,Q=T;if(1-B>d){var H=Math.acos(B),K=Math.sin(H);G=Math.sin((1-T)*H)/K,Q=Math.sin(T*H)/K}return this.set(G*_+Q*R,G*A+Q*F,G*M+Q*N,G*I+Q*V)},invert:function(){var b=this.x,T=this.y,_=this.z,A=this.w,M=b*b+T*T+_*_+A*A,I=M?1/M:0;return this.set(-b*I,-T*I,-_*I,A*I)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(b){b*=.5;var T=this.x,_=this.y,A=this.z,M=this.w,I=Math.sin(b),R=Math.cos(b);return this.set(T*R+M*I,_*R+A*I,A*R-_*I,M*R-T*I)},rotateY:function(b){b*=.5;var T=this.x,_=this.y,A=this.z,M=this.w,I=Math.sin(b),R=Math.cos(b);return this.set(T*R-A*I,_*R+M*I,A*R+T*I,M*R-_*I)},rotateZ:function(b){b*=.5;var T=this.x,_=this.y,A=this.z,M=this.w,I=Math.sin(b),R=Math.cos(b);return this.set(T*R+_*I,_*R-T*I,A*R+M*I,M*R-A*I)},calculateW:function(){var b=this.x,T=this.y,_=this.z;return this.w=-Math.sqrt(1-b*b-T*T-_*_),this},setFromEuler:function(b,T){var _=b.x/2,A=b.y/2,M=b.z/2,I=Math.cos(_),R=Math.cos(A),F=Math.cos(M),N=Math.sin(_),V=Math.sin(A),B=Math.sin(M);switch(b.order){case"XYZ":this.set(N*R*F+I*V*B,I*V*F-N*R*B,I*R*B+N*V*F,I*R*F-N*V*B,T);break;case"YXZ":this.set(N*R*F+I*V*B,I*V*F-N*R*B,I*R*B-N*V*F,I*R*F+N*V*B,T);break;case"ZXY":this.set(N*R*F-I*V*B,I*V*F+N*R*B,I*R*B+N*V*F,I*R*F-N*V*B,T);break;case"ZYX":this.set(N*R*F-I*V*B,I*V*F+N*R*B,I*R*B-N*V*F,I*R*F+N*V*B,T);break;case"YZX":this.set(N*R*F+I*V*B,I*V*F+N*R*B,I*R*B-N*V*F,I*R*F-N*V*B,T);break;case"XZY":this.set(N*R*F-I*V*B,I*V*F-N*R*B,I*R*B+N*V*F,I*R*F+N*V*B,T)}return this},setFromRotationMatrix:function(b){var Q,T=b.val,_=T[0],A=T[4],M=T[8],I=T[1],R=T[5],F=T[9],N=T[2],V=T[6],B=T[10],G=_+R+B;return G>0?(Q=.5/Math.sqrt(G+1),this.set((V-F)*Q,(M-N)*Q,(I-A)*Q,.25/Q)):_>R&&_>B?(Q=2*Math.sqrt(1+_-R-B),this.set(.25*Q,(A+I)/Q,(M+N)/Q,(V-F)/Q)):R>B?(Q=2*Math.sqrt(1+R-_-B),this.set((A+I)/Q,.25*Q,(F+V)/Q,(M-N)/Q)):(Q=2*Math.sqrt(1+B-_-R),this.set((M+N)/Q,(F+V)/Q,.25*Q,(I-A)/Q)),this},fromMat3:function(b){var A,T=b.val,_=T[0]+T[4]+T[8];if(_>0)A=Math.sqrt(_+1),this.w=.5*A,this._x=(T[7]-T[5])*(A=.5/A),this._y=(T[2]-T[6])*A,this._z=(T[3]-T[1])*A;else{var M=0;T[4]>T[0]&&(M=1),T[8]>T[3*M+M]&&(M=2);var I=c[M],R=c[I];A=Math.sqrt(T[3*M+M]-T[3*I+I]-T[3*R+R]+1),h[M]=.5*A,h[I]=(T[3*I+M]+T[3*M+I])*(A=.5/A),h[R]=(T[3*R+M]+T[3*M+R])*A,this._x=h[0],this._y=h[1],this._z=h[2],this._w=(T[3*R+I]-T[3*I+R])*A}return this.onChangeCallback(this),this}});S.exports=x},43396:(S,P,a)=>{var y=a(36383);S.exports=function(g){return g*y.RAD_TO_DEG}},74362:S=>{S.exports=function(a,y){void 0===y&&(y=1);var C=2*Math.random()*Math.PI;return a.x=Math.cos(C)*y,a.y=Math.sin(C)*y,a}},60706:S=>{S.exports=function(a,y){void 0===y&&(y=1);var C=2*Math.random()*Math.PI,g=2*Math.random()-1,f=Math.sqrt(1-g*g)*y;return a.x=Math.cos(C)*f,a.y=Math.sin(C)*f,a.z=g*y,a}},67421:S=>{S.exports=function(a,y){return void 0===y&&(y=1),a.x=(2*Math.random()-1)*y,a.y=(2*Math.random()-1)*y,a.z=(2*Math.random()-1)*y,a.w=(2*Math.random()-1)*y,a}},36305:S=>{S.exports=function(a,y){var C=a.x,g=a.y;return a.x=C*Math.cos(y)-g*Math.sin(y),a.y=C*Math.sin(y)+g*Math.cos(y),a}},11520:S=>{S.exports=function(a,y,C,g){var f=Math.cos(g),d=Math.sin(g),c=a.x-y,h=a.y-C;return a.x=c*f-h*d+y,a.y=c*d+h*f+C,a}},1163:S=>{S.exports=function(a,y,C,g,f){var d=g+Math.atan2(a.y-C,a.x-y);return a.x=y+f*Math.cos(d),a.y=C+f*Math.sin(d),a}},70336:S=>{S.exports=function(a,y,C,g,f){return a.x=y+f*Math.cos(g),a.y=C+f*Math.sin(g),a}},72678:(S,P,a)=>{var y=a(25836),C=a(37867),g=a(15746),f=new C,d=new g,c=new y;S.exports=function(p,u,m){return d.setAxisAngle(u,m),f.fromRotationTranslation(d,c.set(0,0,0)),p.transformMat4(f)}},2284:S=>{S.exports=function(a){return a>0?Math.ceil(a):Math.floor(a)}},41013:S=>{S.exports=function(a,y,C){void 0===y&&(y=0),void 0===C&&(C=10);var g=Math.pow(C,-y);return Math.round(a*g)/g}},16922:S=>{S.exports=function(a,y,C,g){void 0===y&&(y=1),void 0===C&&(C=1),void 0===g&&(g=1),g*=Math.PI/a;for(var f=[],d=[],c=0;c{S.exports=function(a,y,C){return a<=y?0:a>=C?1:(a=(a-y)/(C-y))*a*(3-2*a)}},54261:S=>{S.exports=function(a,y,C){return(a=Math.max(0,Math.min(1,(a-y)/(C-y))))*a*a*(a*(6*a-15)+10)}},44408:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c){void 0===c&&(c=new y);var h=0,p=0;return g>0&&g<=f*d&&(h=g>f-1?g-(p=Math.floor(g/f))*f:g),c.set(h,p)}},85955:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c,h,p,u,m){void 0===m&&(m=new y);var v=Math.sin(h),x=Math.cos(h),b=x*p,T=v*p,_=-v*u,A=x*u,M=1/(b*A+_*-T);return m.x=A*M*g+-_*M*f+(c*_-d*A)*M,m.y=b*M*f+-T*M*g+(-c*b+d*T)*M,m}},26099:(S,P,a)=>{var y=a(83419),C=a(43855),g=new y({initialize:function(d,c){this.x=0,this.y=0,"object"==typeof d?(this.x=d.x||0,this.y=d.y||0):(void 0===c&&(c=d),this.x=d||0,this.y=c||0)},clone:function(){return new g(this.x,this.y)},copy:function(f){return this.x=f.x||0,this.y=f.y||0,this},setFromObject:function(f){return this.x=f.x||0,this.y=f.y||0,this},set:function(f,d){return void 0===d&&(d=f),this.x=f,this.y=d,this},setTo:function(f,d){return this.set(f,d)},setToPolar:function(f,d){return null==d&&(d=1),this.x=Math.cos(f)*d,this.y=Math.sin(f)*d,this},equals:function(f){return this.x===f.x&&this.y===f.y},fuzzyEquals:function(f,d){return C(this.x,f.x,d)&&C(this.y,f.y,d)},angle:function(){var f=Math.atan2(this.y,this.x);return f<0&&(f+=2*Math.PI),f},setAngle:function(f){return this.setToPolar(f,this.length())},add:function(f){return this.x+=f.x,this.y+=f.y,this},subtract:function(f){return this.x-=f.x,this.y-=f.y,this},multiply:function(f){return this.x*=f.x,this.y*=f.y,this},scale:function(f){return isFinite(f)?(this.x*=f,this.y*=f):(this.x=0,this.y=0),this},divide:function(f){return this.x/=f.x,this.y/=f.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(f){var d=f.x-this.x,c=f.y-this.y;return Math.sqrt(d*d+c*c)},distanceSq:function(f){var d=f.x-this.x,c=f.y-this.y;return d*d+c*c},length:function(){var f=this.x,d=this.y;return Math.sqrt(f*f+d*d)},setLength:function(f){return this.normalize().scale(f)},lengthSq:function(){var f=this.x,d=this.y;return f*f+d*d},normalize:function(){var f=this.x,d=this.y,c=f*f+d*d;return c>0&&(c=1/Math.sqrt(c),this.x=f*c,this.y=d*c),this},normalizeRightHand:function(){var f=this.x;return this.x=-1*this.y,this.y=f,this},normalizeLeftHand:function(){var f=this.x;return this.x=this.y,this.y=-1*f,this},dot:function(f){return this.x*f.x+this.y*f.y},cross:function(f){return this.x*f.y-this.y*f.x},lerp:function(f,d){void 0===d&&(d=0);var c=this.x,h=this.y;return this.x=c+d*(f.x-c),this.y=h+d*(f.y-h),this},transformMat3:function(f){var d=this.x,c=this.y,h=f.val;return this.x=h[0]*d+h[3]*c+h[6],this.y=h[1]*d+h[4]*c+h[7],this},transformMat4:function(f){var d=this.x,c=this.y,h=f.val;return this.x=h[0]*d+h[4]*c+h[12],this.y=h[1]*d+h[5]*c+h[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(f){var d=this.length();return d&&d>f&&this.scale(f/d),this},reflect:function(f){return f=f.clone().normalize(),this.subtract(f.scale(2*this.dot(f)))},mirror:function(f){return this.reflect(f).negate()},rotate:function(f){var d=Math.cos(f),c=Math.sin(f);return this.set(d*this.x-c*this.y,c*this.x+d*this.y)},project:function(f){var d=this.dot(f)/f.dot(f);return this.copy(f).scale(d)}});g.ZERO=new g,g.RIGHT=new g(1,0),g.LEFT=new g(-1,0),g.UP=new g(0,-1),g.DOWN=new g(0,1),g.ONE=new g(1,1),S.exports=g},25836:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d,c){this.x=0,this.y=0,this.z=0,"object"==typeof f?(this.x=f.x||0,this.y=f.y||0,this.z=f.z||0):(this.x=f||0,this.y=d||0,this.z=c||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(g){return this.x=Math.min(this.x,g.x),this.y=Math.min(this.y,g.y),this.z=Math.min(this.z,g.z),this},max:function(g){return this.x=Math.max(this.x,g.x),this.y=Math.max(this.y,g.y),this.z=Math.max(this.z,g.z),this},clone:function(){return new C(this.x,this.y,this.z)},addVectors:function(g,f){return this.x=g.x+f.x,this.y=g.y+f.y,this.z=g.z+f.z,this},subVectors:function(g,f){return this.x=g.x-f.x,this.y=g.y-f.y,this.z=g.z-f.z,this},crossVectors:function(g,f){var d=g.x,c=g.y,h=g.z,p=f.x,u=f.y,m=f.z;return this.x=c*m-h*u,this.y=h*p-d*m,this.z=d*u-c*p,this},equals:function(g){return this.x===g.x&&this.y===g.y&&this.z===g.z},copy:function(g){return this.x=g.x,this.y=g.y,this.z=g.z||0,this},set:function(g,f,d){return"object"==typeof g?(this.x=g.x||0,this.y=g.y||0,this.z=g.z||0):(this.x=g||0,this.y=f||0,this.z=d||0),this},setFromMatrixPosition:function(g){return this.fromArray(g.val,12)},setFromMatrixColumn:function(g,f){return this.fromArray(g.val,4*f)},fromArray:function(g,f){return void 0===f&&(f=0),this.x=g[f],this.y=g[f+1],this.z=g[f+2],this},add:function(g){return this.x+=g.x,this.y+=g.y,this.z+=g.z||0,this},addScalar:function(g){return this.x+=g,this.y+=g,this.z+=g,this},addScale:function(g,f){return this.x+=g.x*f,this.y+=g.y*f,this.z+=g.z*f||0,this},subtract:function(g){return this.x-=g.x,this.y-=g.y,this.z-=g.z||0,this},multiply:function(g){return this.x*=g.x,this.y*=g.y,this.z*=g.z||1,this},scale:function(g){return isFinite(g)?(this.x*=g,this.y*=g,this.z*=g):(this.x=0,this.y=0,this.z=0),this},divide:function(g){return this.x/=g.x,this.y/=g.y,this.z/=g.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(g){var f=g.x-this.x,d=g.y-this.y,c=g.z-this.z||0;return Math.sqrt(f*f+d*d+c*c)},distanceSq:function(g){var f=g.x-this.x,d=g.y-this.y,c=g.z-this.z||0;return f*f+d*d+c*c},length:function(){var g=this.x,f=this.y,d=this.z;return Math.sqrt(g*g+f*f+d*d)},lengthSq:function(){var g=this.x,f=this.y,d=this.z;return g*g+f*f+d*d},normalize:function(){var g=this.x,f=this.y,d=this.z,c=g*g+f*f+d*d;return c>0&&(c=1/Math.sqrt(c),this.x=g*c,this.y=f*c,this.z=d*c),this},dot:function(g){return this.x*g.x+this.y*g.y+this.z*g.z},cross:function(g){var f=this.x,d=this.y,c=this.z,h=g.x,p=g.y,u=g.z;return this.x=d*u-c*p,this.y=c*h-f*u,this.z=f*p-d*h,this},lerp:function(g,f){void 0===f&&(f=0);var d=this.x,c=this.y,h=this.z;return this.x=d+f*(g.x-d),this.y=c+f*(g.y-c),this.z=h+f*(g.z-h),this},applyMatrix3:function(g){var f=this.x,d=this.y,c=this.z,h=g.val;return this.x=h[0]*f+h[3]*d+h[6]*c,this.y=h[1]*f+h[4]*d+h[7]*c,this.z=h[2]*f+h[5]*d+h[8]*c,this},applyMatrix4:function(g){var f=this.x,d=this.y,c=this.z,h=g.val,p=1/(h[3]*f+h[7]*d+h[11]*c+h[15]);return this.x=(h[0]*f+h[4]*d+h[8]*c+h[12])*p,this.y=(h[1]*f+h[5]*d+h[9]*c+h[13])*p,this.z=(h[2]*f+h[6]*d+h[10]*c+h[14])*p,this},transformMat3:function(g){var f=this.x,d=this.y,c=this.z,h=g.val;return this.x=f*h[0]+d*h[3]+c*h[6],this.y=f*h[1]+d*h[4]+c*h[7],this.z=f*h[2]+d*h[5]+c*h[8],this},transformMat4:function(g){var f=this.x,d=this.y,c=this.z,h=g.val;return this.x=h[0]*f+h[4]*d+h[8]*c+h[12],this.y=h[1]*f+h[5]*d+h[9]*c+h[13],this.z=h[2]*f+h[6]*d+h[10]*c+h[14],this},transformCoordinates:function(g){var f=this.x,d=this.y,c=this.z,h=g.val,u=f*h[1]+d*h[5]+c*h[9]+h[13],m=f*h[2]+d*h[6]+c*h[10]+h[14],v=f*h[3]+d*h[7]+c*h[11]+h[15];return this.x=(f*h[0]+d*h[4]+c*h[8]+h[12])/v,this.y=u/v,this.z=m/v,this},transformQuat:function(g){var f=this.x,d=this.y,c=this.z,h=g.x,p=g.y,u=g.z,m=g.w,v=m*f+p*c-u*d,x=m*d+u*f-h*c,b=m*c+h*d-p*f,T=-h*f-p*d-u*c;return this.x=v*m+T*-h+x*-u-b*-p,this.y=x*m+T*-p+b*-h-v*-u,this.z=b*m+T*-u+v*-p-x*-h,this},project:function(g){var f=this.x,d=this.y,c=this.z,h=g.val,u=h[1],m=h[2],b=h[5],T=h[6],M=h[9],I=h[10],N=h[13],V=h[14],G=1/(f*h[3]+d*h[7]+c*h[11]+h[15]);return this.x=(f*h[0]+d*h[4]+c*h[8]+h[12])*G,this.y=(f*u+d*b+c*M+N)*G,this.z=(f*m+d*T+c*I+V)*G,this},projectViewMatrix:function(g,f){return this.applyMatrix4(g).applyMatrix4(f)},unprojectViewMatrix:function(g,f){return this.applyMatrix4(g).applyMatrix4(f)},unproject:function(g,f){var p=g.w,m=p-this.y-1-g.y,v=this.z;return this.x=2*(this.x-g.x)/g.z-1,this.y=2*m/p-1,this.z=2*v-1,this.project(f)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});C.ZERO=new C,C.RIGHT=new C(1,0,0),C.LEFT=new C(-1,0,0),C.UP=new C(0,-1,0),C.DOWN=new C(0,1,0),C.FORWARD=new C(0,0,1),C.BACK=new C(0,0,-1),C.ONE=new C(1,1,1),S.exports=C},61369:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d,c,h){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof f?(this.x=f.x||0,this.y=f.y||0,this.z=f.z||0,this.w=f.w||0):(this.x=f||0,this.y=d||0,this.z=c||0,this.w=h||0)},clone:function(){return new C(this.x,this.y,this.z,this.w)},copy:function(g){return this.x=g.x,this.y=g.y,this.z=g.z||0,this.w=g.w||0,this},equals:function(g){return this.x===g.x&&this.y===g.y&&this.z===g.z&&this.w===g.w},set:function(g,f,d,c){return"object"==typeof g?(this.x=g.x||0,this.y=g.y||0,this.z=g.z||0,this.w=g.w||0):(this.x=g||0,this.y=f||0,this.z=d||0,this.w=c||0),this},add:function(g){return this.x+=g.x,this.y+=g.y,this.z+=g.z||0,this.w+=g.w||0,this},subtract:function(g){return this.x-=g.x,this.y-=g.y,this.z-=g.z||0,this.w-=g.w||0,this},scale:function(g){return this.x*=g,this.y*=g,this.z*=g,this.w*=g,this},length:function(){var g=this.x,f=this.y,d=this.z,c=this.w;return Math.sqrt(g*g+f*f+d*d+c*c)},lengthSq:function(){var g=this.x,f=this.y,d=this.z,c=this.w;return g*g+f*f+d*d+c*c},normalize:function(){var g=this.x,f=this.y,d=this.z,c=this.w,h=g*g+f*f+d*d+c*c;return h>0&&(h=1/Math.sqrt(h),this.x=g*h,this.y=f*h,this.z=d*h,this.w=c*h),this},dot:function(g){return this.x*g.x+this.y*g.y+this.z*g.z+this.w*g.w},lerp:function(g,f){void 0===f&&(f=0);var d=this.x,c=this.y,h=this.z,p=this.w;return this.x=d+f*(g.x-d),this.y=c+f*(g.y-c),this.z=h+f*(g.z-h),this.w=p+f*(g.w-p),this},multiply:function(g){return this.x*=g.x,this.y*=g.y,this.z*=g.z||1,this.w*=g.w||1,this},divide:function(g){return this.x/=g.x,this.y/=g.y,this.z/=g.z||1,this.w/=g.w||1,this},distance:function(g){var f=g.x-this.x,d=g.y-this.y,c=g.z-this.z||0,h=g.w-this.w||0;return Math.sqrt(f*f+d*d+c*c+h*h)},distanceSq:function(g){var f=g.x-this.x,d=g.y-this.y,c=g.z-this.z||0,h=g.w-this.w||0;return f*f+d*d+c*c+h*h},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(g){var f=this.x,d=this.y,c=this.z,h=this.w,p=g.val;return this.x=p[0]*f+p[4]*d+p[8]*c+p[12]*h,this.y=p[1]*f+p[5]*d+p[9]*c+p[13]*h,this.z=p[2]*f+p[6]*d+p[10]*c+p[14]*h,this.w=p[3]*f+p[7]*d+p[11]*c+p[15]*h,this},transformQuat:function(g){var f=this.x,d=this.y,c=this.z,h=g.x,p=g.y,u=g.z,m=g.w,v=m*f+p*c-u*d,x=m*d+u*f-h*c,b=m*c+h*d-p*f,T=-h*f-p*d-u*c;return this.x=v*m+T*-h+x*-u-b*-p,this.y=x*m+T*-p+b*-h-v*-u,this.z=b*m+T*-u+v*-p-x*-h,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});C.prototype.sub=C.prototype.subtract,C.prototype.mul=C.prototype.multiply,C.prototype.div=C.prototype.divide,C.prototype.dist=C.prototype.distance,C.prototype.distSq=C.prototype.distanceSq,C.prototype.len=C.prototype.length,C.prototype.lenSq=C.prototype.lengthSq,S.exports=C},60417:S=>{S.exports=function(a,y,C){return Math.abs(a-y)<=C}},15994:S=>{S.exports=function(a,y,C){var g=C-y;return y+((a-y)%g+g)%g}},31040:S=>{S.exports=function(a,y,C,g){return Math.atan2(g-y,C-a)}},55495:S=>{S.exports=function(a,y){return Math.atan2(y.y-a.y,y.x-a.x)}},128:S=>{S.exports=function(a,y){return Math.atan2(y.x-a.x,y.y-a.y)}},41273:S=>{S.exports=function(a,y,C,g){return Math.atan2(C-a,g-y)}},1432:(S,P,a)=>{var y=a(36383);S.exports=function(g){return g>Math.PI&&(g-=y.PI2),Math.abs(((g+y.TAU)%y.PI2-y.PI2)%y.PI2)}},12407:S=>{S.exports=function(a){return(a%=2*Math.PI)>=0?a:a+2*Math.PI}},53993:(S,P,a)=>{var y=a(99472);S.exports=function(){return y(-Math.PI,Math.PI)}},86564:(S,P,a)=>{var y=a(99472);S.exports=function(){return y(-180,180)}},90154:(S,P,a)=>{var y=a(12407);S.exports=function(g){return y(g+Math.PI)}},48736:(S,P,a)=>{var y=a(36383);S.exports=function(g,f,d){return void 0===d&&(d=.05),g===f||(Math.abs(f-g)<=d||Math.abs(f-g)>=y.PI2-d?g=f:(Math.abs(f-g)>Math.PI&&(fg?g+=d:f{S.exports=function(a,y){var C=y-a;return 0===C?0:C-360*Math.floor((C- -180)/360)}},86554:(S,P,a)=>{var y=a(15994);S.exports=function(g){return y(g,-Math.PI,Math.PI)}},30954:(S,P,a)=>{var y=a(15994);S.exports=function(g){return y(g,-180,180)}},25588:(S,P,a)=>{S.exports={Between:a(31040),BetweenPoints:a(55495),BetweenPointsY:a(128),BetweenY:a(41273),CounterClockwise:a(1432),Normalize:a(12407),Random:a(53993),RandomDegrees:a(86564),Reverse:a(90154),RotateTo:a(48736),ShortestBetween:a(61430),Wrap:a(86554),WrapDegrees:a(30954)}},36383:S=>{var P={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};S.exports=P},20339:S=>{S.exports=function(a,y,C,g){var f=a-C,d=y-g;return Math.sqrt(f*f+d*d)}},52816:S=>{S.exports=function(a,y){var C=a.x-y.x,g=a.y-y.y;return Math.sqrt(C*C+g*g)}},64559:S=>{S.exports=function(a,y){var C=a.x-y.x,g=a.y-y.y;return C*C+g*g}},82340:S=>{S.exports=function(a,y,C,g){return Math.max(Math.abs(a-C),Math.abs(y-g))}},14390:S=>{S.exports=function(a,y,C,g,f){return void 0===f&&(f=2),Math.sqrt(Math.pow(C-a,f)+Math.pow(g-y,f))}},2243:S=>{S.exports=function(a,y,C,g){return Math.abs(a-C)+Math.abs(y-g)}},89774:S=>{S.exports=function(a,y,C,g){var f=a-C,d=y-g;return f*f+d*d}},50994:(S,P,a)=>{S.exports={Between:a(20339),BetweenPoints:a(52816),BetweenPointsSquared:a(64559),Chebyshev:a(82340),Power:a(14390),Snake:a(2243),Squared:a(89774)}},62640:(S,P,a)=>{var y=a(54178),C=a(41521),g=a(79980),f=a(85433),d=a(99140),c=a(48857),h=a(81596),p=a(59133),u=a(98516),m=a(35248),v=a(82500),x=a(49752);S.exports={Power0:h,Power1:p.Out,Power2:f.Out,Power3:u.Out,Power4:m.Out,Linear:h,Quad:p.Out,Cubic:f.Out,Quart:u.Out,Quint:m.Out,Sine:v.Out,Expo:c.Out,Circ:g.Out,Elastic:d.Out,Back:y.Out,Bounce:C.Out,Stepped:x,"Quad.easeIn":p.In,"Cubic.easeIn":f.In,"Quart.easeIn":u.In,"Quint.easeIn":m.In,"Sine.easeIn":v.In,"Expo.easeIn":c.In,"Circ.easeIn":g.In,"Elastic.easeIn":d.In,"Back.easeIn":y.In,"Bounce.easeIn":C.In,"Quad.easeOut":p.Out,"Cubic.easeOut":f.Out,"Quart.easeOut":u.Out,"Quint.easeOut":m.Out,"Sine.easeOut":v.Out,"Expo.easeOut":c.Out,"Circ.easeOut":g.Out,"Elastic.easeOut":d.Out,"Back.easeOut":y.Out,"Bounce.easeOut":C.Out,"Quad.easeInOut":p.InOut,"Cubic.easeInOut":f.InOut,"Quart.easeInOut":u.InOut,"Quint.easeInOut":m.InOut,"Sine.easeInOut":v.InOut,"Expo.easeInOut":c.InOut,"Circ.easeInOut":g.InOut,"Elastic.easeInOut":d.InOut,"Back.easeInOut":y.InOut,"Bounce.easeInOut":C.InOut}},1639:S=>{S.exports=function(a,y){return void 0===y&&(y=1.70158),a*a*((y+1)*a-y)}},50099:S=>{S.exports=function(a,y){void 0===y&&(y=1.70158);var C=1.525*y;return(a*=2)<1?a*a*((C+1)*a-C)*.5:.5*((a-=2)*a*((C+1)*a+C)+2)}},41286:S=>{S.exports=function(a,y){return void 0===y&&(y=1.70158),--a*a*((y+1)*a+y)+1}},54178:(S,P,a)=>{S.exports={In:a(1639),Out:a(41286),InOut:a(50099)}},59590:S=>{S.exports=function(a){return(a=1-a)<.36363636363636365?1-7.5625*a*a:a<.7272727272727273?1-(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?1-(7.5625*(a-=.8181818181818182)*a+.9375):1-(7.5625*(a-=.9545454545454546)*a+.984375)}},41788:S=>{S.exports=function(a){var y=!1;return a<.5?(a=1-2*a,y=!0):a=2*a-1,a<.36363636363636365?a*=7.5625*a:a=a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375,y?.5*(1-a):.5*a+.5}},69905:S=>{S.exports=function(a){return a<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375}},41521:(S,P,a)=>{S.exports={In:a(59590),Out:a(69905),InOut:a(41788)}},91861:S=>{S.exports=function(a){return 1-Math.sqrt(1-a*a)}},4177:S=>{S.exports=function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)}},57512:S=>{S.exports=function(a){return Math.sqrt(1- --a*a)}},79980:(S,P,a)=>{S.exports={In:a(91861),Out:a(57512),InOut:a(4177)}},51150:S=>{S.exports=function(a){return a*a*a}},82820:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a*a:.5*((a-=2)*a*a+2)}},35033:S=>{S.exports=function(a){return--a*a*a+1}},85433:(S,P,a)=>{S.exports={In:a(51150),Out:a(35033),InOut:a(82820)}},69965:S=>{S.exports=function(a,y,C){if(void 0===y&&(y=.1),void 0===C&&(C=.1),0===a)return 0;if(1===a)return 1;var g=C/4;return y<1?y=1:g=C*Math.asin(1/y)/(2*Math.PI),-y*Math.pow(2,10*(a-=1))*Math.sin((a-g)*(2*Math.PI)/C)}},50665:S=>{S.exports=function(a,y,C){if(void 0===y&&(y=.1),void 0===C&&(C=.1),0===a)return 0;if(1===a)return 1;var g=C/4;return y<1?y=1:g=C*Math.asin(1/y)/(2*Math.PI),(a*=2)<1?y*Math.pow(2,10*(a-=1))*Math.sin((a-g)*(2*Math.PI)/C)*-.5:y*Math.pow(2,-10*(a-=1))*Math.sin((a-g)*(2*Math.PI)/C)*.5+1}},7744:S=>{S.exports=function(a,y,C){if(void 0===y&&(y=.1),void 0===C&&(C=.1),0===a)return 0;if(1===a)return 1;var g=C/4;return y<1?y=1:g=C*Math.asin(1/y)/(2*Math.PI),y*Math.pow(2,-10*a)*Math.sin((a-g)*(2*Math.PI)/C)+1}},99140:(S,P,a)=>{S.exports={In:a(69965),Out:a(7744),InOut:a(50665)}},24590:S=>{S.exports=function(a){return Math.pow(2,10*(a-1))-.001}},87844:S=>{S.exports=function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))}},89433:S=>{S.exports=function(a){return 1-Math.pow(2,-10*a)}},48857:(S,P,a)=>{S.exports={In:a(24590),Out:a(89433),InOut:a(87844)}},48820:(S,P,a)=>{S.exports={Back:a(54178),Bounce:a(41521),Circular:a(79980),Cubic:a(85433),Elastic:a(99140),Expo:a(48857),Linear:a(81596),Quadratic:a(59133),Quartic:a(98516),Quintic:a(35248),Sine:a(82500),Stepped:a(49752)}},7147:S=>{S.exports=function(a){return a}},81596:(S,P,a)=>{S.exports=a(7147)},34826:S=>{S.exports=function(a){return a*a}},20544:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a:-.5*(--a*(a-2)-1)}},92029:S=>{S.exports=function(a){return a*(2-a)}},59133:(S,P,a)=>{S.exports={In:a(34826),Out:a(92029),InOut:a(20544)}},64413:S=>{S.exports=function(a){return a*a*a*a}},78137:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)}},45840:S=>{S.exports=function(a){return 1- --a*a*a*a}},98516:(S,P,a)=>{S.exports={In:a(64413),Out:a(45840),InOut:a(78137)}},87745:S=>{S.exports=function(a){return a*a*a*a*a}},16509:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)}},17868:S=>{S.exports=function(a){return--a*a*a*a*a+1}},35248:(S,P,a)=>{S.exports={In:a(87745),Out:a(17868),InOut:a(16509)}},80461:S=>{S.exports=function(a){return 0===a?0:1===a?1:1-Math.cos(a*Math.PI/2)}},34025:S=>{S.exports=function(a){return 0===a?0:1===a?1:.5*(1-Math.cos(Math.PI*a))}},52768:S=>{S.exports=function(a){return 0===a?0:1===a?1:Math.sin(a*Math.PI/2)}},82500:(S,P,a)=>{S.exports={In:a(80461),Out:a(52768),InOut:a(34025)}},72251:S=>{S.exports=function(a,y){return void 0===y&&(y=1),a<=0?0:a>=1?1:1/y*(1+(y*a|0))}},49752:(S,P,a)=>{S.exports=a(72251)},75698:S=>{S.exports=function(a,y){return void 0===y&&(y=1e-4),Math.ceil(a-y)}},43855:S=>{S.exports=function(a,y,C){return void 0===C&&(C=1e-4),Math.abs(a-y){S.exports=function(a,y){return void 0===y&&(y=1e-4),Math.floor(a+y)}},5470:S=>{S.exports=function(a,y,C){return void 0===C&&(C=1e-4),a>y-C}},94977:S=>{S.exports=function(a,y,C){return void 0===C&&(C=1e-4),a{S.exports={Ceil:a(75698),Equal:a(43855),Floor:a(25777),GreaterThan:a(5470),LessThan:a(94977)}},75508:(S,P,a)=>{var y=a(36383),C=a(79291),g={Angle:a(25588),Distance:a(50994),Easing:a(48820),Fuzzy:a(48379),Interpolation:a(38289),Pow2:a(49001),Snap:a(73697),RandomDataGenerator:a(28453),Average:a(53307),Bernstein:a(85710),Between:a(30976),CatmullRom:a(87842),CeilTo:a(26302),Clamp:a(45319),DegToRad:a(39506),Difference:a(61241),Euler:a(38857),Factorial:a(6411),FloatBetween:a(99472),FloorTo:a(77623),FromPercent:a(62945),GetSpeed:a(38265),IsEven:a(78702),IsEvenStrict:a(94883),Linear:a(28915),LinearXY:a(94908),MaxAdd:a(86883),Median:a(50040),MinSub:a(37204),Percent:a(65201),RadToDeg:a(43396),RandomXY:a(74362),RandomXYZ:a(60706),RandomXYZW:a(67421),Rotate:a(36305),RotateAround:a(11520),RotateAroundDistance:a(1163),RotateTo:a(70336),RoundAwayFromZero:a(2284),RoundTo:a(41013),SinCosTableGenerator:a(16922),SmootherStep:a(54261),SmoothStep:a(7602),ToXY:a(44408),TransformXY:a(85955),Within:a(60417),Wrap:a(15994),Vector2:a(26099),Vector3:a(25836),Vector4:a(61369),Matrix3:a(94434),Matrix4:a(37867),Quaternion:a(15746),RotateVec3:a(72678)};g=C(!1,g,y),S.exports=g},89318:(S,P,a)=>{var y=a(85710);S.exports=function(g,f){for(var d=0,c=g.length-1,h=0;h<=c;h++)d+=Math.pow(1-f,c-h)*Math.pow(f,h)*g[h]*y(c,h);return d}},77259:(S,P,a)=>{var y=a(87842);S.exports=function(g,f){var d=g.length-1,c=d*f,h=Math.floor(c);return g[0]===g[d]?(f<0&&(h=Math.floor(c=d*(1+f))),y(c-h,g[(h-1+d)%d],g[h],g[(h+1)%d],g[(h+2)%d])):f<0?g[0]-(y(-c,g[0],g[0],g[1],g[1])-g[0]):f>1?g[d]-(y(c-d,g[d],g[d],g[d-1],g[d-1])-g[d]):y(c-h,g[h?h-1:0],g[h],g[d{S.exports=function(f,d,c,h,p){return function P(f,d){var c=1-f;return c*c*c*d}(f,d)+function a(f,d){var c=1-f;return 3*c*c*f*d}(f,c)+function y(f,d){return 3*(1-f)*f*f*d}(f,h)+function C(f,d){return f*f*f*d}(f,p)}},28392:(S,P,a)=>{var y=a(28915);S.exports=function(g,f){var d=g.length-1,c=d*f,h=Math.floor(c);return f<0?y(g[0],g[1],c):f>1?y(g[d],g[d-1],d-c):y(g[h],g[h+1>d?d:h+1],c-h)}},32112:S=>{S.exports=function(g,f,d,c){return function P(g,f){var d=1-g;return d*d*f}(g,f)+function a(g,f){return 2*(1-g)*g*f}(g,d)+function y(g,f){return g*g*f}(g,c)}},47235:(S,P,a)=>{var y=a(7602);S.exports=function(g,f,d){return f+(d-f)*y(g,0,1)}},50178:(S,P,a)=>{var y=a(54261);S.exports=function(g,f,d){return f+(d-f)*y(g,0,1)}},38289:(S,P,a)=>{S.exports={Bezier:a(89318),CatmullRom:a(77259),CubicBezier:a(36316),Linear:a(28392),QuadraticBezier:a(32112),SmoothStep:a(47235),SmootherStep:a(50178)}},98439:S=>{S.exports=function(a){var y=Math.log(a)/.6931471805599453;return 1<{S.exports=function(a,y){return a>0&&!(a&a-1)&&y>0&&!(y&y-1)}},81230:S=>{S.exports=function(a){return a>0&&!(a&a-1)}},49001:(S,P,a)=>{S.exports={GetNext:a(98439),IsSize:a(50030),IsValue:a(81230)}},28453:(S,P,a)=>{var C=new(a(83419))({initialize:function(f){void 0===f&&(f=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],f&&this.init(f)},rnd:function(){var g=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|g,this.s0=this.s1,this.s1=this.s2,this.s2=g-this.c,this.s2},hash:function(g){var f,d=this.n;g=g.toString();for(var c=0;c>>0,d=(f*=d)>>>0,d+=4294967296*(f-=d);return this.n=d,2.3283064365386963e-10*(d>>>0)},init:function(g){"string"==typeof g?this.state(g):this.sow(g)},sow:function(g){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,g)for(var f=0;f0;d--){var c=Math.floor(this.frac()*(d+1)),h=g[c];g[c]=g[d],g[d]=h}return g}});S.exports=C},63448:S=>{S.exports=function(a,y,C,g){return void 0===C&&(C=0),0===y?a:(a-=C,a=y*Math.ceil(a/y),g?(C+a)/y:C+a)}},56583:S=>{S.exports=function(a,y,C,g){return void 0===C&&(C=0),0===y?a:(a-=C,a=y*Math.floor(a/y),g?(C+a)/y:C+a)}},77720:S=>{S.exports=function(a,y,C,g){return void 0===C&&(C=0),0===y?a:(a-=C,a=y*Math.round(a/y),g?(C+a)/y:C+a)}},73697:(S,P,a)=>{S.exports={Ceil:a(63448),Floor:a(56583),To:a(77720)}},85454:(S,P,a)=>{a(63595);var y=a(8054),C=a(79291),g={Actions:a(61061),Animations:a(60421),BlendModes:a(10312),Cache:a(83388),Cameras:a(26638),Core:a(42857),Class:a(83419),Create:a(15822),Curves:a(25410),Data:a(44965),Display:a(27460),DOM:a(84902),Events:a(93055),FX:a(66064),Game:a(50127),GameObjects:a(77856),Geom:a(55738),Input:a(14350),Loader:a(57777),Math:a(75508),Physics:a(44563),Plugins:a(18922),Renderer:a(36909),Scale:a(93364),ScaleModes:a(29795),Scene:a(97482),Scenes:a(62194),Structs:a(41392),Textures:a(27458),Tilemaps:a(62501),Time:a(90291),Tweens:a(43066),Utils:a(91799)};g.Sound=a(23717),g=C(!1,g,y),S.exports=g,a.g.Phaser=g},71289:(S,P,a)=>{var y=a(83419),C=a(92209),g=a(88571),f=new y({Extends:g,Mixins:[C.Acceleration,C.Angular,C.Bounce,C.Collision,C.Debug,C.Drag,C.Enable,C.Friction,C.Gravity,C.Immovable,C.Mass,C.Pushable,C.Size,C.Velocity],initialize:function(c,h,p,u,m){g.call(this,c,h,p,u,m),this.body=null}});S.exports=f},86689:(S,P,a)=>{var y=a(83419),C=a(39506),g=a(20339),f=a(89774),d=a(66022),c=a(95540),h=a(46975),p=a(72441),u=a(47956),m=a(37277),v=a(44594),x=a(26099),b=a(82248),T=new y({initialize:function(A){this.scene=A,this.systems=A.sys,this.config=this.getConfig(),this._category=1,A.sys.events.once(v.BOOT,this.boot,this),A.sys.events.on(v.START,this.start,this)},boot:function(){this.world=new b(this.scene,this.config),this.add=new d(this.world),this.systems.events.once(v.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new b(this.scene,this.config),this.add=new d(this.world));var _=this.systems.events;c(this.config,"customUpdate",!1)||_.on(v.UPDATE,this.world.update,this.world),_.on(v.POST_UPDATE,this.world.postUpdate,this.world),_.once(v.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(v.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(v.UPDATE,this.world.update,this.world)},getConfig:function(){var _=this.systems.game.config.physics;return h(c(this.systems.settings.physics,"arcade",{}),c(_,"arcade",{}))},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(_,A,M,I,R){return void 0===M&&(M=null),void 0===I&&(I=null),void 0===R&&(R=M),this.world.collideObjects(_,A,M,I,R,!0)},collide:function(_,A,M,I,R){return void 0===M&&(M=null),void 0===I&&(I=null),void 0===R&&(R=M),this.world.collideObjects(_,A,M,I,R,!1)},collideTiles:function(_,A,M,I,R){return this.world.collideTiles(_,A,M,I,R)},overlapTiles:function(_,A,M,I,R){return this.world.overlapTiles(_,A,M,I,R)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(_,A,M,I,R,F){void 0===I&&(I=60);var N=Math.atan2(M-_.y,A-_.x);return _.body.acceleration.setToPolar(N,I),void 0!==R&&void 0!==F&&_.body.maxVelocity.set(R,F),N},accelerateToObject:function(_,A,M,I,R){return this.accelerateTo(_,A.x,A.y,M,I,R)},closest:function(_,A){A||(A=this.world.bodies.entries);for(var M=Number.MAX_VALUE,I=null,R=_.x,F=_.y,N=A.length,V=0;VM&&(I=B,M=Q)}}return I},moveTo:function(_,A,M,I,R){void 0===I&&(I=60),void 0===R&&(R=0);var F=Math.atan2(M-_.y,A-_.x);return R>0&&(I=g(_.x,_.y,A,M)/(R/1e3)),_.body.velocity.setToPolar(F,I),F},moveToObject:function(_,A,M,I){return this.moveTo(_,A.x,A.y,M,I)},velocityFromAngle:function(_,A,M){return void 0===A&&(A=60),void 0===M&&(M=new x),M.setToPolar(C(_),A)},velocityFromRotation:function(_,A,M){return void 0===A&&(A=60),void 0===M&&(M=new x),M.setToPolar(_,A)},overlapRect:function(_,A,M,I,R,F){return u(this.world,_,A,M,I,R,F)},overlapCirc:function(_,A,M,I,R){return p(this.world,_,A,M,I,R)},shutdown:function(){if(this.world){var _=this.systems.events;_.off(v.UPDATE,this.world.update,this.world),_.off(v.POST_UPDATE,this.world.postUpdate,this.world),_.off(v.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(v.START,this.start,this),this.scene=null,this.systems=null}});m.register("ArcadePhysics",T,"arcadePhysics"),S.exports=T},13759:(S,P,a)=>{var y=a(83419),C=a(92209),g=a(68287),f=new y({Extends:g,Mixins:[C.Acceleration,C.Angular,C.Bounce,C.Collision,C.Debug,C.Drag,C.Enable,C.Friction,C.Gravity,C.Immovable,C.Mass,C.Pushable,C.Size,C.Velocity],initialize:function(c,h,p,u,m){g.call(this,c,h,p,u,m),this.body=null}});S.exports=f},37742:(S,P,a)=>{var y=a(83419),C=a(78389),g=a(37747),f=a(63012),d=a(43396),c=a(87841),h=a(37303),p=a(95829),u=a(26099),m=new y({Mixins:[C],initialize:function(x,b){var T=64,_=64,M=void 0!==b;M&&b.displayWidth&&(T=b.displayWidth,_=b.displayHeight),M||(b={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=x,this.gameObject=M?b:void 0,this.isBody=!0,this.transform={x:b.x,y:b.y,rotation:b.angle,scaleX:b.scaleX,scaleY:b.scaleY,displayOriginX:b.displayOriginX,displayOriginY:b.displayOriginY},this.debugShowBody=x.defaults.debugShowBody,this.debugShowVelocity=x.defaults.debugShowVelocity,this.debugBodyColor=x.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new u,this.position=new u(b.x-b.scaleX*b.displayOriginX,b.y-b.scaleY*b.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=b.angle,this.preRotation=b.angle,this.width=T,this.height=_,this.sourceWidth=T,this.sourceHeight=_,b.frame&&(this.sourceWidth=b.frame.realWidth,this.sourceHeight=b.frame.realHeight),this.halfWidth=Math.abs(T/2),this.halfHeight=Math.abs(_/2),this.center=new u(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new u,this.newVelocity=new u,this.deltaMax=new u,this.acceleration=new u,this.allowDrag=!0,this.drag=new u,this.allowGravity=!0,this.gravity=new u,this.bounce=new u,this.worldBounce=null,this.customBoundsRectangle=x.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new u(1e4,1e4),this.maxSpeed=-1,this.friction=new u(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=g.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new u(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=p(!1),this.touching=p(!0),this.wasTouching=p(!0),this.blocked=p(!0),this.syncBounds=!1,this.physicsType=g.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=b.scaleX,this._sy=b.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new c,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var v=this.gameObject,x=this.transform;if(v.parentContainer){var b=v.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);x.x=b.tx,x.y=b.ty,x.rotation=d(b.rotation),x.scaleX=b.scaleX,x.scaleY=b.scaleY,x.displayOriginX=v.displayOriginX,x.displayOriginY=v.displayOriginY}else x.x=v.x,x.y=v.y,x.rotation=v.angle,x.scaleX=v.scaleX,x.scaleY=v.scaleY,x.displayOriginX=v.displayOriginX,x.displayOriginY=v.displayOriginY;var T=!1;if(this.syncBounds){var _=v.getBounds(this._bounds);this.width=_.width,this.height=_.height,T=!0}else{var A=Math.abs(x.scaleX),M=Math.abs(x.scaleY);(this._sx!==A||this._sy!==M)&&(this.width=this.sourceWidth*A,this.height=this.sourceHeight*M,this._sx=A,this._sy=M,T=!0)}T&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var v=this.transform;this.position.x=v.x+v.scaleX*(this.offset.x-v.displayOriginX),this.position.y=v.y+v.scaleY*(this.offset.y-v.displayOriginY),this.updateCenter()},resetFlags:function(v){void 0===v&&(v=!1);var x=this.wasTouching,b=this.touching,T=this.blocked;v?p(!0,x):(x.none=b.none,x.up=b.up,x.down=b.down,x.left=b.left,x.right=b.right),p(!0,b),p(!0,T),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(v,x){if(v&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var b=this.position;this.prev.x=b.x,this.prev.y=b.y,this.prevFrame.x=b.x,this.prevFrame.y=b.y}v&&this.update(x)},update:function(v){var x=this.prev,b=this.position,T=this.velocity;if(x.set(b.x,b.y),!this.moves)return this._dx=b.x-x.x,void(this._dy=b.y-x.y);if(this.directControl){var _=this.autoFrame;T.set((b.x-_.x)/v,(b.y-_.y)/v),this.world.updateMotion(this,v),this._dx=b.x-_.x,this._dy=b.y-_.y}else this.world.updateMotion(this,v),this.newVelocity.set(T.x*v,T.y*v),b.add(this.newVelocity),this._dx=b.x-x.x,this._dy=b.y-x.y;var A=T.x,M=T.y;if(this.updateCenter(),this.angle=Math.atan2(M,A),this.speed=Math.sqrt(A*A+M*M),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var I=this.blocked;this.world.emit(f.WORLD_BOUNDS,this,I.up,I.down,I.left,I.right)}},postUpdate:function(){var v=this.position,x=v.x-this.prevFrame.x,b=v.y-this.prevFrame.y,T=this.gameObject;if(this.moves){var _=this.deltaMax.x,A=this.deltaMax.y;0!==_&&0!==x&&(x<0&&x<-_?x=-_:x>0&&x>_&&(x=_)),0!==A&&0!==b&&(b<0&&b<-A?b=-A:b>0&&b>A&&(b=A)),T&&(T.x+=x,T.y+=b)}x<0?this.facing=g.FACING_LEFT:x>0&&(this.facing=g.FACING_RIGHT),b<0?this.facing=g.FACING_UP:b>0&&(this.facing=g.FACING_DOWN),this.allowRotation&&T&&(T.angle+=this.deltaZ()),this._tx=x,this._ty=b,this.autoFrame.set(v.x,v.y)},setBoundsRectangle:function(v){return this.customBoundsRectangle=v||this.world.bounds,this},checkWorldBounds:function(){var v=this.position,x=this.velocity,b=this.blocked,T=this.customBoundsRectangle,_=this.world.checkCollision,A=this.worldBounce?-this.worldBounce.x:-this.bounce.x,M=this.worldBounce?-this.worldBounce.y:-this.bounce.y,I=!1;return v.xT.right&&_.right&&(v.x=T.right-this.width,x.x*=A,b.right=!0,I=!0),v.yT.bottom&&_.down&&(v.y=T.bottom-this.height,x.y*=M,b.down=!0,I=!0),I&&(this.blocked.none=!1,this.updateCenter()),I},setOffset:function(v,x){return void 0===x&&(x=v),this.offset.set(v,x),this},setGameObject:function(v,x){return void 0===x&&(x=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=v,v.body&&(v.body=this),this.setSize(),this.world.add(this),this.enable=x,this},setSize:function(v,x,b){void 0===b&&(b=!0);var T=this.gameObject;return T&&(!v&&T.frame&&(v=T.frame.realWidth),!x&&T.frame&&(x=T.frame.realHeight)),this.sourceWidth=v,this.sourceHeight=x,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),b&&T&&T.getCenter&&this.offset.set((T.width-v)/2,(T.height-x)/2),this.isCircle=!1,this.radius=0,this},setCircle:function(v,x,b){return void 0===x&&(x=this.offset.x),void 0===b&&(b=this.offset.y),v>0?(this.isCircle=!0,this.radius=v,this.sourceWidth=2*v,this.sourceHeight=2*v,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(x,b),this.updateCenter()):this.isCircle=!1,this},reset:function(v,x){this.stop();var b=this.gameObject;b&&(b.setPosition(v,x),this.rotation=b.angle,this.preRotation=b.angle);var T=this.position;b&&b.getTopLeft?b.getTopLeft(T):T.set(v,x),this.prev.copy(T),this.prevFrame.copy(T),this.autoFrame.copy(T),b&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(v){return v.x=this.x,v.y=this.y,v.right=this.right,v.bottom=this.bottom,v},hitTest:function(v,x){return this.isCircle?this.radius>0&&v>=this.left&&v<=this.right&&x>=this.top&&x<=this.bottom&&(this.center.x-v)*(this.center.x-v)+(this.center.y-x)*(this.center.y-x)<=this.radius*this.radius:h(this,v,x)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(v){var x=this.position,b=x.x+this.halfWidth,T=x.y+this.halfHeight;this.debugShowBody&&(v.lineStyle(v.defaultStrokeWidth,this.debugBodyColor),this.isCircle?v.strokeCircle(b,T,this.width/2):(this.checkCollision.up&&v.lineBetween(x.x,x.y,x.x+this.width,x.y),this.checkCollision.right&&v.lineBetween(x.x+this.width,x.y,x.x+this.width,x.y+this.height),this.checkCollision.down&&v.lineBetween(x.x,x.y+this.height,x.x+this.width,x.y+this.height),this.checkCollision.left&&v.lineBetween(x.x,x.y,x.x,x.y+this.height))),this.debugShowVelocity&&(v.lineStyle(v.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),v.lineBetween(b,T,b+this.velocity.x/2,T+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(v){return void 0===v&&(v=!0),this.directControl=v,this},setCollideWorldBounds:function(v,x,b,T){void 0===v&&(v=!0),this.collideWorldBounds=v;var _=void 0!==x,A=void 0!==b;return(_||A)&&(this.worldBounce||(this.worldBounce=new u),_&&(this.worldBounce.x=x),A&&(this.worldBounce.y=b)),void 0!==T&&(this.onWorldBounds=T),this},setVelocity:function(v,x){return this.velocity.set(v,x),v=this.velocity.x,x=this.velocity.y,this.speed=Math.sqrt(v*v+x*x),this},setVelocityX:function(v){return this.setVelocity(v,this.velocity.y)},setVelocityY:function(v){return this.setVelocity(this.velocity.x,v)},setMaxVelocity:function(v,x){return this.maxVelocity.set(v,x),this},setMaxVelocityX:function(v){return this.maxVelocity.x=v,this},setMaxVelocityY:function(v){return this.maxVelocity.y=v,this},setMaxSpeed:function(v){return this.maxSpeed=v,this},setSlideFactor:function(v,x){return this.slideFactor.set(v,x),this},setBounce:function(v,x){return this.bounce.set(v,x),this},setBounceX:function(v){return this.bounce.x=v,this},setBounceY:function(v){return this.bounce.y=v,this},setAcceleration:function(v,x){return this.acceleration.set(v,x),this},setAccelerationX:function(v){return this.acceleration.x=v,this},setAccelerationY:function(v){return this.acceleration.y=v,this},setAllowDrag:function(v){return void 0===v&&(v=!0),this.allowDrag=v,this},setAllowGravity:function(v){return void 0===v&&(v=!0),this.allowGravity=v,this},setAllowRotation:function(v){return void 0===v&&(v=!0),this.allowRotation=v,this},setDrag:function(v,x){return this.drag.set(v,x),this},setDamping:function(v){return this.useDamping=v,this},setDragX:function(v){return this.drag.x=v,this},setDragY:function(v){return this.drag.y=v,this},setGravity:function(v,x){return this.gravity.set(v,x),this},setGravityX:function(v){return this.gravity.x=v,this},setGravityY:function(v){return this.gravity.y=v,this},setFriction:function(v,x){return this.friction.set(v,x),this},setFrictionX:function(v){return this.friction.x=v,this},setFrictionY:function(v){return this.friction.y=v,this},setAngularVelocity:function(v){return this.angularVelocity=v,this},setAngularAcceleration:function(v){return this.angularAcceleration=v,this},setAngularDrag:function(v){return this.angularDrag=v,this},setMass:function(v){return this.mass=v,this},setImmovable:function(v){return void 0===v&&(v=!0),this.immovable=v,this},setEnable:function(v){return void 0===v&&(v=!0),this.enable=v,this},processX:function(v,x,b,T){this.x+=v,this.updateCenter(),null!==x&&(this.velocity.x=x*this.slideFactor.x);var _=this.blocked;b&&(_.left=!0,_.none=!1),T&&(_.right=!0,_.none=!1)},processY:function(v,x,b,T){this.y+=v,this.updateCenter(),null!==x&&(this.velocity.y=x*this.slideFactor.y);var _=this.blocked;b&&(_.up=!0,_.none=!1),T&&(_.down=!0,_.none=!1)},x:{get:function(){return this.position.x},set:function(v){this.position.x=v}},y:{get:function(){return this.position.y},set:function(v){this.position.y=v}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});S.exports=m},79342:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d,c,h,p,u,m){this.world=f,this.name="",this.active=!0,this.overlapOnly=d,this.object1=c,this.object2=h,this.collideCallback=p,this.processCallback=u,this.callbackContext=m},setName:function(g){return this.name=g,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});S.exports=C},66022:(S,P,a)=>{var y=a(71289),C=a(13759),g=a(37742),f=a(83419),d=a(37747),c=a(60758),h=a(72624),p=a(71464),u=new f({initialize:function(v){this.world=v,this.scene=v.scene,this.sys=v.scene.sys},collider:function(m,v,x,b,T){return this.world.addCollider(m,v,x,b,T)},overlap:function(m,v,x,b,T){return this.world.addOverlap(m,v,x,b,T)},existing:function(m,v){return this.world.enableBody(m,v?d.STATIC_BODY:d.DYNAMIC_BODY),m},staticImage:function(m,v,x,b){var T=new y(this.scene,m,v,x,b);return this.sys.displayList.add(T),this.world.enableBody(T,d.STATIC_BODY),T},image:function(m,v,x,b){var T=new y(this.scene,m,v,x,b);return this.sys.displayList.add(T),this.world.enableBody(T,d.DYNAMIC_BODY),T},staticSprite:function(m,v,x,b){var T=new C(this.scene,m,v,x,b);return this.sys.displayList.add(T),this.sys.updateList.add(T),this.world.enableBody(T,d.STATIC_BODY),T},sprite:function(m,v,x,b){var T=new C(this.scene,m,v,x,b);return this.sys.displayList.add(T),this.sys.updateList.add(T),this.world.enableBody(T,d.DYNAMIC_BODY),T},staticGroup:function(m,v){return this.sys.updateList.add(new p(this.world,this.world.scene,m,v))},group:function(m,v){return this.sys.updateList.add(new c(this.world,this.world.scene,m,v))},body:function(m,v,x,b){var T=new g(this.world);return T.position.set(m,v),x&&b&&T.setSize(x,b),this.world.add(T,d.DYNAMIC_BODY),T},staticBody:function(m,v,x,b){var T=new h(this.world);return T.position.set(m,v),x&&b&&T.setSize(x,b),this.world.add(T,d.STATIC_BODY),T},destroy:function(){this.world=null,this.scene=null,this.sys=null}});S.exports=u},79599:S=>{S.exports=function(a){var y=0;if(Array.isArray(a))for(var C=0;C{var y=a(37747);S.exports=function(g,f,d,c){var h=0,p=g.deltaAbsX()+f.deltaAbsX()+c;return 0===g._dx&&0===f._dx?(g.embedded=!0,f.embedded=!0):g._dx>f._dx?(h=g.right-f.x)>p&&!d||!1===g.checkCollision.right||!1===f.checkCollision.left?h=0:(g.touching.none=!1,g.touching.right=!0,f.touching.none=!1,f.touching.left=!0,f.physicsType===y.STATIC_BODY&&!d&&(g.blocked.none=!1,g.blocked.right=!0),g.physicsType===y.STATIC_BODY&&!d&&(f.blocked.none=!1,f.blocked.left=!0)):g._dxp&&!d||!1===g.checkCollision.left||!1===f.checkCollision.right?h=0:(g.touching.none=!1,g.touching.left=!0,f.touching.none=!1,f.touching.right=!0,f.physicsType===y.STATIC_BODY&&!d&&(g.blocked.none=!1,g.blocked.left=!0),g.physicsType===y.STATIC_BODY&&!d&&(f.blocked.none=!1,f.blocked.right=!0))),g.overlapX=h,f.overlapX=h,h}},45170:(S,P,a)=>{var y=a(37747);S.exports=function(g,f,d,c){var h=0,p=g.deltaAbsY()+f.deltaAbsY()+c;return 0===g._dy&&0===f._dy?(g.embedded=!0,f.embedded=!0):g._dy>f._dy?(h=g.bottom-f.y)>p&&!d||!1===g.checkCollision.down||!1===f.checkCollision.up?h=0:(g.touching.none=!1,g.touching.down=!0,f.touching.none=!1,f.touching.up=!0,f.physicsType===y.STATIC_BODY&&!d&&(g.blocked.none=!1,g.blocked.down=!0),g.physicsType===y.STATIC_BODY&&!d&&(f.blocked.none=!1,f.blocked.up=!0)):g._dyp&&!d||!1===g.checkCollision.up||!1===f.checkCollision.down?h=0:(g.touching.none=!1,g.touching.up=!0,f.touching.none=!1,f.touching.down=!0,f.physicsType===y.STATIC_BODY&&!d&&(g.blocked.none=!1,g.blocked.up=!0),g.physicsType===y.STATIC_BODY&&!d&&(f.blocked.none=!1,f.blocked.down=!0))),g.overlapY=h,f.overlapY=h,h}},60758:(S,P,a)=>{var y=a(13759),C=a(83419),g=a(78389),f=a(37747),d=a(95540),c=a(26479),h=a(41212),p=new C({Extends:c,Mixins:[g],initialize:function(m,v,x,b){if(x||b)if(h(x))b=x,x=null,b.internalCreateCallback=this.createCallbackHandler,b.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(x)&&h(x[0])){var T=this;x.forEach(function(_){_.internalCreateCallback=T.createCallbackHandler,_.internalRemoveCallback=T.removeCallbackHandler,_.classType=d(_,"classType",y)}),b=null}else b={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else b={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=m,b&&(b.classType=d(b,"classType",y)),this.physicsType=f.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:d(b,"collideWorldBounds",!1),setBoundsRectangle:d(b,"customBoundsRectangle",null),setAccelerationX:d(b,"accelerationX",0),setAccelerationY:d(b,"accelerationY",0),setAllowDrag:d(b,"allowDrag",!0),setAllowGravity:d(b,"allowGravity",!0),setAllowRotation:d(b,"allowRotation",!0),setDamping:d(b,"useDamping",!1),setBounceX:d(b,"bounceX",0),setBounceY:d(b,"bounceY",0),setDragX:d(b,"dragX",0),setDragY:d(b,"dragY",0),setEnable:d(b,"enable",!0),setGravityX:d(b,"gravityX",0),setGravityY:d(b,"gravityY",0),setFrictionX:d(b,"frictionX",0),setFrictionY:d(b,"frictionY",0),setMaxSpeed:d(b,"maxSpeed",-1),setMaxVelocityX:d(b,"maxVelocityX",1e4),setMaxVelocityY:d(b,"maxVelocityY",1e4),setVelocityX:d(b,"velocityX",0),setVelocityY:d(b,"velocityY",0),setAngularVelocity:d(b,"angularVelocity",0),setAngularAcceleration:d(b,"angularAcceleration",0),setAngularDrag:d(b,"angularDrag",0),setMass:d(b,"mass",1),setImmovable:d(b,"immovable",!1)},c.call(this,v,x,b),this.type="PhysicsGroup"},createCallbackHandler:function(u){u.body||this.world.enableBody(u,f.DYNAMIC_BODY);var m=u.body;for(var v in this.defaults)m[v](this.defaults[v])},removeCallbackHandler:function(u){u.body&&this.world.disableBody(u)},setVelocity:function(u,m,v){void 0===v&&(v=0);for(var x=this.getChildren(),b=0;b{var P,a,y,C,g,f,d,c,h,p,u,m,v,x,b,T,_,M=function(){return p&&b&&a.blocked.right?(P.processX(-_,d,!1,!0),1):h&&T&&a.blocked.left?(P.processX(_,d,!0),1):v&&T&&P.blocked.right?(a.processX(-_,c,!1,!0),2):m&&b&&P.blocked.left?(a.processX(_,c,!0),2):0},R=function(V){if(y&&C)_*=.5,0===V||3===V?(P.processX(_,g),a.processX(-_,f)):(P.processX(-_,g),a.processX(_,f));else if(y&&!C)0===V||3===V?P.processX(_,d,!0):P.processX(-_,d,!1,!0);else if(!y&&C)0===V||3===V?a.processX(-_,c,!1,!0):a.processX(_,c,!0);else{var B=.5*_;0===V?x?(P.processX(_,0,!0),a.processX(0,null,!1,!0)):v?(P.processX(B,0,!0),a.processX(-B,0,!1,!0)):(P.processX(B,a.velocity.x,!0),a.processX(-B,null,!1,!0)):1===V?u?(P.processX(0,null,!1,!0),a.processX(_,0,!0)):p?(P.processX(-B,0,!1,!0),a.processX(B,0,!0)):(P.processX(-B,null,!1,!0),a.processX(B,P.velocity.x,!0)):2===V?x?(P.processX(-_,0,!1,!0),a.processX(0,null,!0)):m?(P.processX(-B,0,!1,!0),a.processX(B,0,!0)):(P.processX(-B,a.velocity.x,!1,!0),a.processX(B,null,!0)):3===V&&(u?(P.processX(0,null,!0),a.processX(-_,0,!1,!0)):h?(P.processX(B,0,!0),a.processX(-B,0,!1,!0)):(P.processX(B,a.velocity.y,!0),a.processX(-B,null,!1,!0)))}return!0};S.exports={BlockCheck:M,Check:function(){var V=P.velocity.x,B=a.velocity.x,G=Math.sqrt(B*B*a.mass/P.mass)*(B>0?1:-1),Q=Math.sqrt(V*V*P.mass/a.mass)*(V>0?1:-1),H=.5*(G+Q);return g=H+(G-=H)*P.bounce.x,f=H+(Q-=H)*a.bounce.x,h&&T?R(0):m&&b?R(1):p&&b?R(2):!(!v||!T)&&R(3)},Set:function(V,B,G){var Q=(P=V).velocity.x,H=(a=B).velocity.x;return y=P.pushable,h=P._dx<0,p=P._dx>0,u=0===P._dx,b=Math.abs(P.right-a.x)<=Math.abs(a.right-P.x),d=H-Q*P.bounce.x,C=a.pushable,m=a._dx<0,v=a._dx>0,x=0===a._dx,T=!b,c=Q-H*a.bounce.x,_=Math.abs(G),M()},Run:R,RunImmovableBody1:function(V){1===V?a.velocity.x=0:b?a.processX(_,c,!0):a.processX(-_,c,!1,!0),P.moves&&(a.y+=(P.directControl?P.y-P.autoFrame.y:P.y-P.prev.y)*P.friction.y,a._dy=a.y-a.prev.y)},RunImmovableBody2:function(V){2===V?P.velocity.x=0:T?P.processX(_,d,!0):P.processX(-_,d,!1,!0),a.moves&&(P.y+=(a.directControl?a.y-a.autoFrame.y:a.y-a.prev.y)*a.friction.y,P._dy=P.y-P.prev.y)}}},47962:S=>{var P,a,y,C,g,f,d,c,h,p,u,m,v,x,b,T,_,M=function(){return p&&b&&a.blocked.down?(P.processY(-_,d,!1,!0),1):h&&T&&a.blocked.up?(P.processY(_,d,!0),1):v&&T&&P.blocked.down?(a.processY(-_,c,!1,!0),2):m&&b&&P.blocked.up?(a.processY(_,c,!0),2):0},R=function(V){if(y&&C)_*=.5,0===V||3===V?(P.processY(_,g),a.processY(-_,f)):(P.processY(-_,g),a.processY(_,f));else if(y&&!C)0===V||3===V?P.processY(_,d,!0):P.processY(-_,d,!1,!0);else if(!y&&C)0===V||3===V?a.processY(-_,c,!1,!0):a.processY(_,c,!0);else{var B=.5*_;0===V?x?(P.processY(_,0,!0),a.processY(0,null,!1,!0)):v?(P.processY(B,0,!0),a.processY(-B,0,!1,!0)):(P.processY(B,a.velocity.y,!0),a.processY(-B,null,!1,!0)):1===V?u?(P.processY(0,null,!1,!0),a.processY(_,0,!0)):p?(P.processY(-B,0,!1,!0),a.processY(B,0,!0)):(P.processY(-B,null,!1,!0),a.processY(B,P.velocity.y,!0)):2===V?x?(P.processY(-_,0,!1,!0),a.processY(0,null,!0)):m?(P.processY(-B,0,!1,!0),a.processY(B,0,!0)):(P.processY(-B,a.velocity.y,!1,!0),a.processY(B,null,!0)):3===V&&(u?(P.processY(0,null,!0),a.processY(-_,0,!1,!0)):h?(P.processY(B,0,!0),a.processY(-B,0,!1,!0)):(P.processY(B,a.velocity.y,!0),a.processY(-B,null,!1,!0)))}return!0};S.exports={BlockCheck:M,Check:function(){var V=P.velocity.y,B=a.velocity.y,G=Math.sqrt(B*B*a.mass/P.mass)*(B>0?1:-1),Q=Math.sqrt(V*V*P.mass/a.mass)*(V>0?1:-1),H=.5*(G+Q);return g=H+(G-=H)*P.bounce.y,f=H+(Q-=H)*a.bounce.y,h&&T?R(0):m&&b?R(1):p&&b?R(2):!(!v||!T)&&R(3)},Set:function(V,B,G){var Q=(P=V).velocity.y,H=(a=B).velocity.y;return y=P.pushable,h=P._dy<0,p=P._dy>0,u=0===P._dy,b=Math.abs(P.bottom-a.y)<=Math.abs(a.bottom-P.y),d=H-Q*P.bounce.y,C=a.pushable,m=a._dy<0,v=a._dy>0,x=0===a._dy,T=!b,c=Q-H*a.bounce.y,_=Math.abs(G),M()},Run:R,RunImmovableBody1:function(V){1===V?a.velocity.y=0:b?a.processY(_,c,!0):a.processY(-_,c,!1,!0),P.moves&&(a.x+=(P.directControl?P.x-P.autoFrame.x:P.x-P.prev.x)*P.friction.x,a._dx=a.x-a.prev.x)},RunImmovableBody2:function(V){2===V?P.velocity.y=0:T?P.processY(_,d,!0):P.processY(-_,d,!1,!0),a.moves&&(P.x+=(a.directControl?a.x-a.autoFrame.x:a.x-a.prev.x)*a.friction.x,P._dx=P.x-P.prev.x)}}},14087:(S,P,a)=>{var y=a(64897),C=a(3017);S.exports=function(f,d,c,h,p){void 0===p&&(p=y(f,d,c,h));var u=f.immovable,m=d.immovable;if(c||0===p||u&&m||f.customSeparateX||d.customSeparateX)return 0!==p||f.embedded&&d.embedded;var v=C.Set(f,d,p);return u||m?(u?C.RunImmovableBody1(v):m&&C.RunImmovableBody2(v),!0):v>0||C.Check()}},89936:(S,P,a)=>{var y=a(45170),C=a(47962);S.exports=function(f,d,c,h,p){void 0===p&&(p=y(f,d,c,h));var u=f.immovable,m=d.immovable;if(c||0===p||u&&m||f.customSeparateY||d.customSeparateY)return 0!==p||f.embedded&&d.embedded;var v=C.Set(f,d,p);return u||m?(u?C.RunImmovableBody1(v):m&&C.RunImmovableBody2(v),!0):v>0||C.Check()}},95829:S=>{S.exports=function(a,y){return void 0===y&&(y={}),y.none=a,y.up=!1,y.down=!1,y.left=!1,y.right=!1,a||(y.up=!0,y.down=!0,y.left=!0,y.right=!0),y}},72624:(S,P,a)=>{var y=a(87902),C=a(83419),g=a(78389),f=a(37747),d=a(37303),c=a(95829),h=a(26099),p=new C({Mixins:[g],initialize:function(m,v){var x=64,b=64,_=void 0!==v;_&&v.displayWidth&&(x=v.displayWidth,b=v.displayHeight),_||(v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=m,this.gameObject=_?v:void 0,this.isBody=!0,this.debugShowBody=m.defaults.debugShowStaticBody,this.debugBodyColor=m.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new h,this.position=new h(v.x-x*v.originX,v.y-b*v.originY),this.width=x,this.height=b,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new h(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=h.ZERO,this.allowGravity=!1,this.gravity=h.ZERO,this.bounce=h.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=c(!1),this.touching=c(!0),this.wasTouching=c(!0),this.blocked=c(!0),this.physicsType=f.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(u,m){return u&&u!==this.gameObject&&(this.gameObject.body=null,u.body=this,this.gameObject=u),m&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var u=this.gameObject;return u.getTopLeft(this.position),this.width=u.displayWidth,this.height=u.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(u,m){return void 0===m&&(m=u),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(u,m),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(u,m,v){void 0===v&&(v=!0);var x=this.gameObject;if(x&&x.frame&&(u||(u=x.frame.realWidth),m||(m=x.frame.realHeight)),this.world.staticTree.remove(this),this.width=u,this.height=m,this.halfWidth=Math.floor(u/2),this.halfHeight=Math.floor(m/2),v&&x&&x.getCenter){var b=x.displayWidth/2,T=x.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(b-this.halfWidth,T-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(u,m,v){return void 0===m&&(m=this.offset.x),void 0===v&&(v=this.offset.y),u>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=u,this.width=2*u,this.height=2*u,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(m,v),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(u,m){var v=this.gameObject;void 0===u&&(u=v.x),void 0===m&&(m=v.y),this.world.staticTree.remove(this),v.setPosition(u,m),v.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(u){return u.x=this.x,u.y=this.y,u.right=this.right,u.bottom=this.bottom,u},hitTest:function(u,m){return this.isCircle?y(this,u,m):d(this,u,m)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(u){var m=this.position,v=m.x+this.halfWidth,x=m.y+this.halfHeight;this.debugShowBody&&(u.lineStyle(u.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?u.strokeCircle(v,x,this.width/2):u.strokeRect(m.x,m.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(u){return u<=0&&(u=.1),this.mass=u,this},x:{get:function(){return this.position.x},set:function(u){this.world.staticTree.remove(this),this.position.x=u,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(u){this.world.staticTree.remove(this),this.position.y=u,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});S.exports=p},71464:(S,P,a)=>{var y=a(13759),C=a(83419),g=a(78389),f=a(37747),d=a(95540),c=a(26479),h=a(41212),p=new C({Extends:c,Mixins:[g],initialize:function(m,v,x,b){x||b?h(x)?(b=x,x=null,b.internalCreateCallback=this.createCallbackHandler,b.internalRemoveCallback=this.removeCallbackHandler,b.createMultipleCallback=this.createMultipleCallbackHandler,b.classType=d(b,"classType",y)):Array.isArray(x)&&h(x[0])?(b=x,x=null,b.forEach(function(T){T.internalCreateCallback=this.createCallbackHandler,T.internalRemoveCallback=this.removeCallbackHandler,T.createMultipleCallback=this.createMultipleCallbackHandler,T.classType=d(T,"classType",y)})):b={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:b={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:y},this.world=m,this.physicsType=f.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,c.call(this,v,x,b),this.type="StaticPhysicsGroup"},createCallbackHandler:function(u){u.body||this.world.enableBody(u,f.STATIC_BODY)},removeCallbackHandler:function(u){u.body&&this.world.disableBody(u)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var u=this.children.entries,m=0;m{var y=a(55495),C=a(37742),g=a(45319),f=a(83419),d=a(79342),c=a(37747),h=a(20339),p=a(52816),u=a(50792),m=a(63012),v=a(43855),x=a(5470),b=a(94977),T=a(64897),_=a(45170),A=a(96523),M=a(35154),I=a(36383),R=a(25774),F=a(96602),N=a(87841),V=a(59542),B=a(40012),G=a(14087),Q=a(89936),H=a(35072),K=a(72624),tt=a(2483),at=a(61340),lt=a(26099),q=a(15994),it=new f({Extends:u,initialize:function(X,nt){u.call(this),this.scene=X,this.bodies=new H,this.staticBodies=new H,this.pendingDestroy=new H,this.colliders=new R,this.gravity=new lt(M(nt,"gravity.x",0),M(nt,"gravity.y",0)),this.bounds=new N(M(nt,"x",0),M(nt,"y",0),M(nt,"width",X.sys.scale.width),M(nt,"height",X.sys.scale.height)),this.checkCollision={up:M(nt,"checkCollision.up",!0),down:M(nt,"checkCollision.down",!0),left:M(nt,"checkCollision.left",!0),right:M(nt,"checkCollision.right",!0)},this.fps=M(nt,"fps",60),this.fixedStep=M(nt,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=M(nt,"timeScale",1),this.OVERLAP_BIAS=M(nt,"overlapBias",4),this.TILE_BIAS=M(nt,"tileBias",16),this.forceX=M(nt,"forceX",!1),this.isPaused=M(nt,"isPaused",!1),this._total=0,this.drawDebug=M(nt,"debug",!1),this.defaults={debugShowBody:M(nt,"debugShowBody",!0),debugShowStaticBody:M(nt,"debugShowStaticBody",!0),debugShowVelocity:M(nt,"debugShowVelocity",!0),bodyDebugColor:M(nt,"debugBodyColor",16711935),staticBodyDebugColor:M(nt,"debugStaticBodyColor",255),velocityDebugColor:M(nt,"debugVelocityColor",65280)},this.maxEntries=M(nt,"maxEntries",16),this.useTree=M(nt,"useTree",!0),this.tree=new V(this.maxEntries),this.staticTree=new V(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new at,this._tempMatrix2=new at,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(Y,X){void 0===X&&(X=c.DYNAMIC_BODY),Array.isArray(Y)||(Y=[Y]);for(var nt=0;nt=gt;for(this.fixedStep||(dt=.001*X,Bt=!0,this._elapsed=0),nt=0;nt=gt;)this._elapsed-=gt,this.step(dt)}},step:function(Y){var X,nt,dt=this.bodies.entries,gt=dt.length;for(X=0;X0){var Kt=this.tree,Zt=this.staticTree;for(dt=(nt=Bt.entries).length,Y=0;Y-1&&Y.velocity.length()>ae&&(Y.velocity.normalize().scale(ae),ne=ae),Y.speed=ne},separate:function(Y,X,nt,dt,gt){var bt,Et,Bt=!1,Kt=!0;if(!Y.enable||!X.enable||Y.checkCollision.none||X.checkCollision.none||!this.intersects(Y,X)||nt&&!1===nt.call(dt,Y.gameObject||Y,X.gameObject||X))return Bt;if(Y.isCircle||X.isCircle){var Zt=this.separateCircle(Y,X,gt);Zt.result?(Bt=!0,Kt=!1):(bt=Zt.x,Et=Zt.y,Kt=!0)}if(Kt){var ne=!1,ae=!1,fe=this.OVERLAP_BIAS;gt?(ne=G(Y,X,gt,fe,bt),ae=Q(Y,X,gt,fe,Et)):this.forceX||Math.abs(this.gravity.y+Y.gravity.y)ei&&(ae=h(ke,Ye,ei,Se)-Pe):Ye>ri&&(keei&&(ae=h(ke,Ye,ei,ri)-Pe)),ae*=-1}else ae=Y.halfWidth+X.halfWidth-p(bt,Et);Y.overlapR=ae,X.overlapR=ae;var Bi=y(bt,Et),tn=(ae+I.EPSILON)*Math.cos(Bi),on=(ae+I.EPSILON)*Math.sin(Bi),ln={overlap:ae,result:!1,x:tn,y:on};if(nt&&(!fe||fe&&0!==ae))return ln.result=!0,ln;if(!fe&&0===ae||Bt&&Kt||Y.customSeparateX||X.customSeparateX)return ln.x=void 0,ln.y=void 0,ln;var hn=!Y.pushable&&!X.pushable;if(fe){var Ur=bt.y-Et.y,dn=Math.sqrt(Math.pow(bt.x-Et.x,2)+Math.pow(Ur,2)),or=(Et.x-bt.x)/dn||0,Fr=(Et.y-bt.y)/dn||0,Ts=2*(Zt.x*or+Zt.y*Fr-ne.x*or-ne.y*Fr)/(Y.mass+X.mass);(Bt||Kt||!Y.pushable||!X.pushable)&&(Ts*=2),!Bt&&Y.pushable&&(Zt.x=Zt.x-Ts/Y.mass*or,Zt.y=Zt.y-Ts/Y.mass*Fr,Zt.multiply(Y.bounce)),!Kt&&X.pushable&&(ne.x=ne.x+Ts/X.mass*or,ne.y=ne.y+Ts/X.mass*Fr,ne.multiply(X.bounce)),!Bt&&!Kt&&(tn*=.5,on*=.5),!Bt||Y.pushable||hn?(Y.x-=tn,Y.y-=on,Y.updateCenter()):(!Kt||X.pushable||hn)&&(X.x+=tn,X.y+=on,X.updateCenter()),ln.result=!0}else!Bt||Y.pushable||hn?(Y.x-=tn,Y.y-=on,Y.updateCenter()):(!Kt||X.pushable||hn)&&(X.x+=tn,X.y+=on,X.updateCenter()),ln.x=void 0,ln.y=void 0;return ln},intersects:function(Y,X){return Y!==X&&(Y.isCircle||X.isCircle?Y.isCircle?X.isCircle?p(Y.center,X.center)<=Y.halfWidth+X.halfWidth:this.circleBodyIntersects(Y,X):this.circleBodyIntersects(X,Y):!(Y.right<=X.left||Y.bottom<=X.top||Y.left>=X.right||Y.top>=X.bottom))},circleBodyIntersects:function(Y,X){var nt=g(Y.center.x,X.left,X.right),dt=g(Y.center.y,X.top,X.bottom);return(Y.center.x-nt)*(Y.center.x-nt)+(Y.center.y-dt)*(Y.center.y-dt)<=Y.halfWidth*Y.halfWidth},overlap:function(Y,X,nt,dt,gt){return void 0===nt&&(nt=null),void 0===dt&&(dt=null),void 0===gt&&(gt=nt),this.collideObjects(Y,X,nt,dt,gt,!0)},collide:function(Y,X,nt,dt,gt){return void 0===nt&&(nt=null),void 0===dt&&(dt=null),void 0===gt&&(gt=nt),this.collideObjects(Y,X,nt,dt,gt,!1)},collideObjects:function(Y,X,nt,dt,gt,bt){var Et,Bt;Y.isParent&&(void 0===Y.physicsType||void 0===X||Y===X)&&(Y=Y.children.entries),X&&X.isParent&&void 0===X.physicsType&&(X=X.children.entries);var Kt=Array.isArray(Y),Zt=Array.isArray(X);if(this._total=0,Kt||Zt)if(!Kt&&Zt)for(Et=0;Et0},collideHandler:function(Y,X,nt,dt,gt,bt){if(void 0===X&&Y.isParent)return this.collideGroupVsGroup(Y,Y,nt,dt,gt,bt);if(!Y||!X)return!1;if(Y.body||Y.isBody){if(X.body||X.isBody)return this.collideSpriteVsSprite(Y,X,nt,dt,gt,bt);if(X.isParent)return this.collideSpriteVsGroup(Y,X,nt,dt,gt,bt);if(X.isTilemap)return this.collideSpriteVsTilemapLayer(Y,X,nt,dt,gt,bt)}else if(Y.isParent){if(X.body||X.isBody)return this.collideSpriteVsGroup(X,Y,nt,dt,gt,bt);if(X.isParent)return this.collideGroupVsGroup(Y,X,nt,dt,gt,bt);if(X.isTilemap)return this.collideGroupVsTilemapLayer(Y,X,nt,dt,gt,bt)}else if(Y.isTilemap){if(X.body||X.isBody)return this.collideSpriteVsTilemapLayer(X,Y,nt,dt,gt,bt);if(X.isParent)return this.collideGroupVsTilemapLayer(X,Y,nt,dt,gt,bt)}},canCollide:function(Y,X){return Y&&X&&!!(Y.collisionMask&X.collisionCategory)&&!!(X.collisionMask&Y.collisionCategory)},collideSpriteVsSprite:function(Y,X,nt,dt,gt,bt){var Et=Y.isBody?Y:Y.body,Bt=X.isBody?X:X.body;return!!this.canCollide(Et,Bt)&&(this.separate(Et,Bt,dt,gt,bt)&&(nt&&nt.call(gt,Y,X),this._total++),!0)},collideSpriteVsGroup:function(Y,X,nt,dt,gt,bt){var Bt,Kt,Zt,Et=Y.isBody?Y:Y.body;if(0!==X.getLength()&&Et&&Et.enable&&!Et.checkCollision.none&&this.canCollide(Et,X))if(this.useTree||X.physicsType===c.STATIC_BODY){var ne=this.treeMinMax;ne.minX=Et.left,ne.minY=Et.top,ne.maxX=Et.right,ne.maxY=Et.bottom;var ae=X.physicsType===c.DYNAMIC_BODY?this.tree.search(ne):this.staticTree.search(ne);for(Kt=ae.length,Bt=0;Bt{S.exports={setAcceleration:function(a,y){return this.body.acceleration.set(a,y),this},setAccelerationX:function(a){return this.body.acceleration.x=a,this},setAccelerationY:function(a){return this.body.acceleration.y=a,this}}},59023:S=>{S.exports={setAngularVelocity:function(a){return this.body.angularVelocity=a,this},setAngularAcceleration:function(a){return this.body.angularAcceleration=a,this},setAngularDrag:function(a){return this.body.angularDrag=a,this}}},62069:S=>{S.exports={setBounce:function(a,y){return this.body.bounce.set(a,y),this},setBounceX:function(a){return this.body.bounce.x=a,this},setBounceY:function(a){return this.body.bounce.y=a,this},setCollideWorldBounds:function(a,y,C,g){return this.body.setCollideWorldBounds(a,y,C,g),this}}},78389:(S,P,a)=>{var y=a(79599);S.exports={setCollisionCategory:function(g){return(this.body?this.body:this).collisionCategory=g,this},willCollideWith:function(g){return!!((this.body?this.body:this).collisionMask&g)},addCollidesWith:function(g){var f=this.body?this.body:this;return f.collisionMask=f.collisionMask|g,this},removeCollidesWith:function(g){var f=this.body?this.body:this;return f.collisionMask=f.collisionMask&~g,this},setCollidesWith:function(g){return(this.body?this.body:this).collisionMask=y(g),this},resetCollisionCategory:function(){var g=this.body?this.body:this;return g.collisionCategory=1,g.collisionMask=2147483647,this}}},87118:S=>{S.exports={setDebug:function(a,y,C){return this.debugShowBody=a,this.debugShowVelocity=y,this.debugBodyColor=C,this},setDebugBodyColor:function(a){return this.body.debugBodyColor=a,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(a){this.body.debugShowBody=a}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(a){this.body.debugShowVelocity=a}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(a){this.body.debugBodyColor=a}}}},52819:S=>{S.exports={setDrag:function(a,y){return this.body.drag.set(a,y),this},setDragX:function(a){return this.body.drag.x=a,this},setDragY:function(a){return this.body.drag.y=a,this},setDamping:function(a){return this.body.useDamping=a,this}}},4074:S=>{S.exports={setDirectControl:function(a){return this.body.setDirectControl(a),this},enableBody:function(a,y,C,g,f){return a&&this.body.reset(y,C),g&&(this.body.gameObject.active=!0),f&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(a,y){return void 0===a&&(a=!1),void 0===y&&(y=!1),this.body.stop(),this.body.enable=!1,a&&(this.body.gameObject.active=!1),y&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}}},40831:S=>{S.exports={setFriction:function(a,y){return this.body.friction.set(a,y),this},setFrictionX:function(a){return this.body.friction.x=a,this},setFrictionY:function(a){return this.body.friction.y=a,this}}},26775:S=>{S.exports={setGravity:function(a,y){return this.body.gravity.set(a,y),this},setGravityX:function(a){return this.body.gravity.x=a,this},setGravityY:function(a){return this.body.gravity.y=a,this}}},9437:S=>{S.exports={setImmovable:function(a){return void 0===a&&(a=!0),this.body.immovable=a,this}}},30621:S=>{S.exports={setMass:function(a){return this.body.mass=a,this}}},72441:(S,P,a)=>{var y=a(47956),C=a(96503),g=a(2044),f=a(81491);S.exports=function(c,h,p,u,m,v){var x=y(c,h-u,p-u,2*u,2*u,m,v);if(0===x.length)return x;for(var b=new C(h,p,u),T=new C,_=[],A=0;A{S.exports=function(a,y,C,g,f,d,c){void 0===d&&(d=!0),void 0===c&&(c=!1);var h=[],p=[],u=a.treeMinMax;if(u.minX=y,u.minY=C,u.maxX=y+g,u.maxY=C+f,c&&(p=a.staticTree.search(u)),d&&a.useTree)h=a.tree.search(u);else if(d){var v={position:{x:y,y:C},left:y,top:C,right:y+g,bottom:C+f,isCircle:!1},x=a.intersects;a.bodies.iterate(function(b){x(b,v)&&h.push(b)})}return p.concat(h)}},62121:S=>{S.exports={setPushable:function(a){return void 0===a&&(a=!0),this.body.pushable=a,this}}},29384:S=>{S.exports={setOffset:function(a,y){return this.body.setOffset(a,y),this},setSize:function(a,y,C){return this.body.setSize(a,y,C),this},setBodySize:function(a,y,C){return this.body.setSize(a,y,C),this},setCircle:function(a,y,C){return this.body.setCircle(a,y,C),this}}},15098:S=>{S.exports={setVelocity:function(a,y){return this.body.setVelocity(a,y),this},setVelocityX:function(a){return this.body.setVelocityX(a),this},setVelocityY:function(a){return this.body.setVelocityY(a),this},setMaxVelocity:function(a,y){return this.body.maxVelocity.set(a,y),this}}},92209:(S,P,a)=>{S.exports={Acceleration:a(1093),Angular:a(59023),Bounce:a(62069),Collision:a(78389),Debug:a(87118),Drag:a(52819),Enable:a(4074),Friction:a(40831),Gravity:a(26775),Immovable:a(9437),Mass:a(30621),OverlapCirc:a(72441),OverlapRect:a(47956),Pushable:a(62121),Size:a(29384),Velocity:a(15098)}},37747:S=>{S.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},20009:S=>{S.exports="collide"},36768:S=>{S.exports="overlap"},60473:S=>{S.exports="pause"},89954:S=>{S.exports="resume"},61804:S=>{S.exports="tilecollide"},7161:S=>{S.exports="tileoverlap"},34689:S=>{S.exports="worldbounds"},16006:S=>{S.exports="worldstep"},63012:(S,P,a)=>{S.exports={COLLIDE:a(20009),OVERLAP:a(36768),PAUSE:a(60473),RESUME:a(89954),TILE_COLLIDE:a(61804),TILE_OVERLAP:a(7161),WORLD_BOUNDS:a(34689),WORLD_STEP:a(16006)}},27064:(S,P,a)=>{var y=a(37747),C=a(79291),g={ArcadePhysics:a(86689),Body:a(37742),Collider:a(79342),Components:a(92209),Events:a(63012),Factory:a(66022),GetCollidesWith:a(79599),GetOverlapX:a(64897),GetOverlapY:a(45170),SeparateX:a(14087),SeparateY:a(89936),Group:a(60758),Image:a(71289),Sprite:a(13759),StaticBody:a(72624),StaticGroup:a(71464),Tilemap:a(55173),World:a(82248)};g=C(!1,g,y),S.exports=g},96602:S=>{S.exports=function(a,y){return a.collisionCallback?!a.collisionCallback.call(a.collisionCallbackContext,y,a):!a.layer.callbacks[a.index]||!a.layer.callbacks[a.index].callback.call(a.layer.callbacks[a.index].callbackContext,y,a)}},36294:S=>{S.exports=function(a,y){y<0?(a.blocked.none=!1,a.blocked.left=!0):y>0&&(a.blocked.none=!1,a.blocked.right=!0),a.position.x-=y,a.updateCenter(),a.velocity.x=0===a.bounce.x?0:-a.velocity.x*a.bounce.x}},67013:S=>{S.exports=function(a,y){y<0?(a.blocked.none=!1,a.blocked.up=!0):y>0&&(a.blocked.none=!1,a.blocked.down=!0),a.position.y-=y,a.updateCenter(),a.velocity.y=0===a.bounce.y?0:-a.velocity.y*a.bounce.y}},40012:(S,P,a)=>{var y=a(21329),C=a(53442),g=a(2483);S.exports=function(d,c,h,p,u,m,v){var x=p.left,b=p.top,T=p.right,_=p.bottom,A=h.faceLeft||h.faceRight,M=h.faceTop||h.faceBottom;if(v||(A=!0,M=!0),!A&&!M)return!1;var I=0,R=0,F=0,N=1;if(c.deltaAbsX()>c.deltaAbsY()?F=-1:c.deltaAbsX(){var y=a(36294);S.exports=function(g,f,d,c,h,p){var u=0,m=f.faceLeft,v=f.faceRight,x=f.collideLeft,b=f.collideRight;return p||(m=!0,v=!0,x=!0,b=!0),g.deltaX()<0&&b&&g.checkCollision.left?v&&g.x0&&x&&g.checkCollision.right&&m&&g.right>d&&(u=g.right-d)>h&&(u=0),0!==u&&(g.customSeparateX?g.overlapX=u:y(g,u)),u}},53442:(S,P,a)=>{var y=a(67013);S.exports=function(g,f,d,c,h,p){var u=0,m=f.faceTop,v=f.faceBottom,x=f.collideUp,b=f.collideDown;return p||(m=!0,v=!0,x=!0,b=!0),g.deltaY()<0&&b&&g.checkCollision.up?v&&g.y0&&x&&g.checkCollision.down&&m&&g.bottom>d&&(u=g.bottom-d)>h&&(u=0),0!==u&&(g.customSeparateY?g.overlapY=u:y(g,u)),u}},2483:S=>{S.exports=function(a,y){return!(y.right<=a.left||y.bottom<=a.top||y.position.x>=a.right||y.position.y>=a.bottom)}},55173:(S,P,a)=>{var y={ProcessTileCallbacks:a(96602),ProcessTileSeparationX:a(36294),ProcessTileSeparationY:a(67013),SeparateTile:a(40012),TileCheckX:a(21329),TileCheckY:a(53442),TileIntersectsBody:a(2483)};S.exports=y},44563:(S,P,a)=>{S.exports={Arcade:a(27064),Matter:a(3875)}},68174:(S,P,a)=>{var y=a(83419),C=a(26099),g=new y({initialize:function(){this.boundsCenter=new C,this.centerDiff=new C},parseBody:function(f){if(!(f=f.hasOwnProperty("body")?f.body:f).hasOwnProperty("bounds")||!f.hasOwnProperty("centerOfMass"))return!1;var d=this.boundsCenter,c=this.centerDiff,h=f.bounds.max.x-f.bounds.min.x,p=f.bounds.max.y-f.bounds.min.y,u=h*f.centerOfMass.x,m=p*f.centerOfMass.y;return d.set(h/2,p/2),c.set(u-d.x,m-d.y),!0},getTopLeft:function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),this.parseBody(f)){var h=this.boundsCenter,p=this.centerDiff;return new C(d+h.x+p.x,c+h.y+p.y)}return!1},getTopCenter:function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),this.parseBody(f)){var p=this.centerDiff;return new C(d+p.x,c+this.boundsCenter.y+p.y)}return!1},getTopRight:function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),this.parseBody(f)){var h=this.boundsCenter,p=this.centerDiff;return new C(d-(h.x-p.x),c+h.y+p.y)}return!1},getLeftCenter:function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),this.parseBody(f)){var p=this.centerDiff;return new C(d+this.boundsCenter.x+p.x,c+p.y)}return!1},getCenter:function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),this.parseBody(f)){var h=this.centerDiff;return new C(d+h.x,c+h.y)}return!1},getRightCenter:function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),this.parseBody(f)){var p=this.centerDiff;return new C(d-(this.boundsCenter.x-p.x),c+p.y)}return!1},getBottomLeft:function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),this.parseBody(f)){var h=this.boundsCenter,p=this.centerDiff;return new C(d+h.x+p.x,c-(h.y-p.y))}return!1},getBottomCenter:function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),this.parseBody(f)){var p=this.centerDiff;return new C(d+p.x,c-(this.boundsCenter.y-p.y))}return!1},getBottomRight:function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),this.parseBody(f)){var h=this.boundsCenter,p=this.centerDiff;return new C(d-(h.x-p.x),c-(h.y-p.y))}return!1}});S.exports=g},19933:(S,P,a)=>{var y=a(6790);y.Body=a(22562),y.Composite=a(69351),y.World=a(4372),y.Collision=a(52284),y.Detector=a(81388),y.Pairs=a(99561),y.Pair=a(4506),y.Query=a(73296),y.Resolver=a(66272),y.Constraint=a(48140),y.Common=a(53402),y.Engine=a(48413),y.Events=a(35810),y.Sleeping=a(53614),y.Plugin=a(73832),y.Bodies=a(66280),y.Composites=a(74116),y.Axes=a(66615),y.Bounds=a(15647),y.Svg=a(74058),y.Vector=a(31725),y.Vertices=a(41598),y.World.add=y.Composite.add,y.World.remove=y.Composite.remove,y.World.addComposite=y.Composite.addComposite,y.World.addBody=y.Composite.addBody,y.World.addConstraint=y.Composite.addConstraint,y.World.clear=y.Composite.clear,S.exports=y},28137:(S,P,a)=>{var y=a(66280),C=a(83419),g=a(74116),f=a(48140),d=a(74058),c=a(75803),h=a(23181),p=a(34803),u=a(73834),m=a(19496),v=a(85791),x=a(98713),b=a(41598),T=new C({initialize:function(A){this.world=A,this.scene=A.scene,this.sys=A.scene.sys},rectangle:function(_,A,M,I,R){var F=y.rectangle(_,A,M,I,R);return this.world.add(F),F},trapezoid:function(_,A,M,I,R,F){var N=y.trapezoid(_,A,M,I,R,F);return this.world.add(N),N},circle:function(_,A,M,I,R){var F=y.circle(_,A,M,I,R);return this.world.add(F),F},polygon:function(_,A,M,I,R){var F=y.polygon(_,A,M,I,R);return this.world.add(F),F},fromVertices:function(_,A,M,I,R,F,N){"string"==typeof M&&(M=b.fromPath(M));var V=y.fromVertices(_,A,M,I,R,F,N);return this.world.add(V),V},fromPhysicsEditor:function(_,A,M,I,R){void 0===R&&(R=!0);var F=m.parseBody(_,A,M,I);return R&&!this.world.has(F)&&this.world.add(F),F},fromSVG:function(_,A,M,I,R,F){void 0===I&&(I=1),void 0===R&&(R={}),void 0===F&&(F=!0);for(var N=M.getElementsByTagName("path"),V=[],B=0;B{var y=a(31884),C=a(95540),g=a(26099);function f(c){return!!c.get&&"function"==typeof c.get||!!c.set&&"function"==typeof c.set}S.exports=function(c,h,p,u){void 0===p&&(p={}),void 0===u&&(u=!0);var m=h.x,v=h.y;if(h.body={temp:!0,position:{x:m,y:v}},[y.Bounce,y.Collision,y.Force,y.Friction,y.Gravity,y.Mass,y.Sensor,y.SetBody,y.Sleep,y.Static,y.Transform,y.Velocity].forEach(function(T){for(var _ in T)f(T[_])?Object.defineProperty(h,_,{get:T[_].get,set:T[_].set}):Object.defineProperty(h,_,{value:T[_]})}),h.world=c,h._tempVec2=new g(m,v),p.hasOwnProperty("type")&&"body"===p.type)h.setExistingBody(p,u);else{var b=C(p,"shape",null);b||(b="rectangle"),p.addToWorld=u,h.setBody(b,p)}return h}},23181:(S,P,a)=>{var y=a(83419),C=a(31884),g=a(95643),f=a(95540),d=a(88571),c=a(72699),h=a(26099),p=new y({Extends:d,Mixins:[C.Bounce,C.Collision,C.Force,C.Friction,C.Gravity,C.Mass,C.Sensor,C.SetBody,C.Sleep,C.Static,C.Transform,C.Velocity,c],initialize:function(m,v,x,b,T,_){g.call(this,m.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(b,T),this.setSizeToFrame(),this.setOrigin(),this.world=m,this._tempVec2=new h(v,x);var A=f(_,"shape",null);A?this.setBody(A,_):this.setRectangle(this.width,this.height,_),this.setPosition(v,x),this.initPipeline(),this.initPostPipeline(!0)}});S.exports=p},42045:(S,P,a)=>{var y=a(60461),C=a(66615),g=a(66280),f=a(22562),d=a(68174),c=a(15647),h=a(83419),p=a(52284),u=a(53402),m=a(69351),v=a(74116),x=a(48140),b=a(81388),T=a(20339),_=a(28137),A=a(95540),M=a(35154),I=a(46975),R=a(4506),F=a(99561),N=a(37277),V=a(73296),B=a(66272),G=a(44594),Q=a(74058),H=a(31725),K=a(41598),tt=a(68243);u.setDecomp(a(55973));var at=new h({initialize:function(q){this.scene=q,this.systems=q.sys,this.config=this.getConfig(),this.body=f,this.composite=m,this.collision=p,this.detector=b,this.pair=R,this.pairs=F,this.query=V,this.resolver=B,this.constraint=x,this.bodies=g,this.composites=v,this.axes=C,this.bounds=c,this.svg=Q,this.vector=H,this.vertices=K,this.verts=K,this._tempVec2=H.create(),B._restingThresh=M(this.config,"restingThresh",4),B._restingThreshTangent=M(this.config,"restingThreshTangent",6),B._positionDampen=M(this.config,"positionDampen",.9),B._positionWarming=M(this.config,"positionWarming",.8),B._frictionNormalMultiplier=M(this.config,"frictionNormalMultiplier",5),q.sys.events.once(G.BOOT,this.boot,this),q.sys.events.on(G.START,this.start,this)},boot:function(){this.world=new tt(this.scene,this.config),this.add=new _(this.world),this.bodyBounds=new d,this.systems.events.once(G.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new tt(this.scene,this.config),this.add=new _(this.world));var lt=this.systems.events;lt.on(G.UPDATE,this.world.update,this.world),lt.on(G.POST_UPDATE,this.world.postUpdate,this.world),lt.once(G.SHUTDOWN,this.shutdown,this)},getConfig:function(){var lt=this.systems.game.config.physics;return I(A(this.systems.settings.physics,"matter",{}),A(lt,"matter",{}))},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(lt,q){this.world.step(lt,q)},containsPoint:function(lt,q,it){lt=this.getMatterBodies(lt);var Y=H.create(q,it);return V.point(lt,Y).length>0},intersectPoint:function(lt,q,it){it=this.getMatterBodies(it);var Y=H.create(lt,q),X=[];return V.point(it,Y).forEach(function(dt){-1===X.indexOf(dt)&&X.push(dt)}),X},intersectRect:function(lt,q,it,Y,X,nt){void 0===X&&(X=!1),nt=this.getMatterBodies(nt);var gt=[];return V.region(nt,{min:{x:lt,y:q},max:{x:lt+it,y:q+Y}},X).forEach(function(Et){-1===gt.indexOf(Et)&>.push(Et)}),gt},intersectRay:function(lt,q,it,Y,X,nt){void 0===X&&(X=1),nt=this.getMatterBodies(nt);for(var dt=[],gt=V.ray(nt,H.create(lt,q),H.create(it,Y),X),bt=0;bt{var y=a(9674),C=a(83419),g=a(31884),f=a(95643),d=a(95540),c=a(72699),h=a(68287),p=a(26099),u=new C({Extends:h,Mixins:[g.Bounce,g.Collision,g.Force,g.Friction,g.Gravity,g.Mass,g.Sensor,g.SetBody,g.Sleep,g.Static,g.Transform,g.Velocity,c],initialize:function(v,x,b,T,_,A){f.call(this,v.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new y(this),this.setTexture(T,_),this.setSizeToFrame(),this.setOrigin(),this.world=v,this._tempVec2=new p(x,b);var M=d(A,"shape",null);M?this.setBody(M,A):this.setRectangle(this.width,this.height,A),this.setPosition(x,b),this.initPipeline(),this.initPostPipeline(!0)}});S.exports=u},73834:(S,P,a)=>{var y=a(66280),C=a(22562),g=a(83419),f=a(31884),d=a(62644),c=a(50792),h=a(95540),p=a(97022),u=a(41598),m=new g({Extends:c,Mixins:[f.Bounce,f.Collision,f.Friction,f.Gravity,f.Mass,f.Sensor,f.Sleep,f.Static],initialize:function(x,b,T){c.call(this),this.tile=b,this.world=x,b.physics.matterBody&&b.physics.matterBody.destroy(),b.physics.matterBody=this;var _=h(T,"body",null),A=h(T,"addToWorld",!0);if(_)this.setBody(_,A);else{var M=b.getCollisionGroup();h(M,"objects",[]).length>0?this.setFromTileCollision(T):this.setFromTileRectangle(T)}if(b.flipX||b.flipY){var R={x:b.getCenterX(),y:b.getCenterY()};C.scale(_,b.flipX?-1:1,b.flipY?-1:1,R)}},setFromTileRectangle:function(v){void 0===v&&(v={}),p(v,"isStatic")||(v.isStatic=!0),p(v,"addToWorld")||(v.addToWorld=!0);var x=this.tile.getBounds(),_=y.rectangle(x.x+x.width/2,x.y+x.height/2,x.width,x.height,v);return this.setBody(_,v.addToWorld),this},setFromTileCollision:function(v){void 0===v&&(v={}),p(v,"isStatic")||(v.isStatic=!0),p(v,"addToWorld")||(v.addToWorld=!0);for(var x=this.tile.tilemapLayer.scaleX,b=this.tile.tilemapLayer.scaleY,T=this.tile.getLeft(),_=this.tile.getTop(),A=this.tile.getCollisionGroup(),M=h(A,"objects",[]),I=[],R=0;R1){var lt=d(v);lt.parts=I,this.setBody(C.create(lt),lt.addToWorld)}return this},setBody:function(v,x){return void 0===x&&(x=!0),this.body&&this.removeBody(),this.body=v,this.body.gameObject=this,x&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});S.exports=m},19496:(S,P,a)=>{var y=a(66280),C=a(22562),g=a(53402),f=a(95540),d=a(41598);S.exports={parseBody:function(h,p,u,m){void 0===m&&(m={});for(var v=f(u,"fixtures",[]),x=[],b=0;b{var y=a(66280),C=a(22562);S.exports={parseBody:function(f,d,c,h){void 0===h&&(h={});var p,u=c.vertices;if(1===u.length)h.vertices=u[0],p=C.create(h),y.flagCoincidentParts(p.parts);else{for(var m=[],v=0;v{var y=a(15647),C=a(83419),g=a(69351),f=a(48140),d=a(81388),c=a(1121),h=a(8214),p=a(46975),u=a(53614),m=a(26099),v=a(41598),x=new C({initialize:function(T,_,A){void 0===A&&(A={}),this.scene=T,this.world=_,this.camera=null,this.pointer=null,this.active=!0,this.position=new m,this.body=null,this.part=null,this.constraint=f.create(p(A,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(c.BEFORE_UPDATE,this.update,this),T.sys.input.on(h.POINTER_DOWN,this.onDown,this),T.sys.input.on(h.POINTER_UP,this.onUp,this)},onDown:function(b){this.pointer||(this.pointer=b,this.camera=b.camera)},onUp:function(b){b===this.pointer&&(this.pointer=null)},getBody:function(b){var T=this.position,_=this.constraint;this.camera.getWorldPoint(b.x,b.y,T);for(var A=g.allBodies(this.world.localWorld),M=0;M1?1:0;I{var y=a(66280),C=a(22562),g=a(83419),f=a(53402),d=a(69351),c=a(48413),h=a(50792),p=a(1121),u=a(95540),m=a(35154),v=a(22562),x=a(35810),b=a(73834),T=a(4372),_=a(13037),A=a(31725),M=new g({Extends:h,initialize:function(R,F){h.call(this),this.scene=R,this.engine=c.create(F),this.localWorld=this.engine.world;var N=m(F,"gravity",null);N?this.setGravity(N.x,N.y,N.scale):!1===N&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=m(F,"enabled",!0),this.getDelta=m(F,"getDelta",this.update60Hz);var V=u(F,"runner",{}),B=u(V,"fps",!1),G=u(V,"fps",60),Q=u(V,"delta",1e3/G),H=u(V,"deltaMin",1e3/G),K=u(V,"deltaMax",1e3/(.5*G));B||(G=1e3/Q),this.runner={fps:G,deltaSampleSize:u(V,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,timeBuffer:0,isFixed:u(V,"isFixed",!1),delta:Q,deltaMin:H,deltaMax:K},this.autoUpdate=m(F,"autoUpdate",!0);var tt=m(F,"debug",!1);if(this.drawDebug="object"==typeof tt||tt,this.debugConfig={showAxes:u(tt,"showAxes",!1),showAngleIndicator:u(tt,"showAngleIndicator",!1),angleColor:u(tt,"angleColor",15208787),showBroadphase:u(tt,"showBroadphase",!1),broadphaseColor:u(tt,"broadphaseColor",16757760),showBounds:u(tt,"showBounds",!1),boundsColor:u(tt,"boundsColor",16777215),showVelocity:u(tt,"showVelocity",!1),velocityColor:u(tt,"velocityColor",44783),showCollisions:u(tt,"showCollisions",!1),collisionColor:u(tt,"collisionColor",16094476),showSeparations:u(tt,"showSeparations",!1),separationColor:u(tt,"separationColor",16753920),showBody:u(tt,"showBody",!0),showStaticBody:u(tt,"showStaticBody",!0),showInternalEdges:u(tt,"showInternalEdges",!1),renderFill:u(tt,"renderFill",!1),renderLine:u(tt,"renderLine",!0),fillColor:u(tt,"fillColor",1075465),fillOpacity:u(tt,"fillOpacity",1),lineColor:u(tt,"lineColor",2678297),lineOpacity:u(tt,"lineOpacity",1),lineThickness:u(tt,"lineThickness",1),staticFillColor:u(tt,"staticFillColor",857979),staticLineColor:u(tt,"staticLineColor",1255396),showSleeping:u(tt,"showSleeping",!1),staticBodySleepOpacity:u(tt,"staticBodySleepOpacity",.7),sleepFillColor:u(tt,"sleepFillColor",4605510),sleepLineColor:u(tt,"sleepLineColor",10066585),showSensors:u(tt,"showSensors",!0),sensorFillColor:u(tt,"sensorFillColor",857979),sensorLineColor:u(tt,"sensorLineColor",1255396),showPositions:u(tt,"showPositions",!0),positionSize:u(tt,"positionSize",4),positionColor:u(tt,"positionColor",14697178),showJoint:u(tt,"showJoint",!0),jointColor:u(tt,"jointColor",14737474),jointLineOpacity:u(tt,"jointLineOpacity",1),jointLineThickness:u(tt,"jointLineThickness",2),pinSize:u(tt,"pinSize",4),pinColor:u(tt,"pinColor",4382944),springColor:u(tt,"springColor",14697184),anchorColor:u(tt,"anchorColor",15724527),anchorSize:u(tt,"anchorSize",4),showConvexHulls:u(tt,"showConvexHulls",!1),hullColor:u(tt,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),u(F,"setBounds",!1)){var at=F.setBounds;if("boolean"==typeof at)this.setBounds();else{var lt=u(at,"x",0),q=u(at,"y",0),it=u(at,"width",R.sys.scale.width),Y=u(at,"height",R.sys.scale.height),X=u(at,"thickness",64),nt=u(at,"left",!0),dt=u(at,"right",!0),gt=u(at,"top",!0),bt=u(at,"bottom",!0);this.setBounds(lt,q,it,Y,X,nt,dt,gt,bt)}}},setCompositeRenderStyle:function(I){var V,B,G,R=I.bodies,F=I.constraints,N=I.composites;for(V=0;V0&&V.map(function(Q){G=Q.bodyB,(B=Q.bodyA).gameObject&&B.gameObject.emit("collide",B,G,Q),G.gameObject&&G.gameObject.emit("collide",G,B,Q),x.trigger(B,"onCollide",{pair:Q}),x.trigger(G,"onCollide",{pair:Q}),B.onCollideCallback&&B.onCollideCallback(Q),G.onCollideCallback&&G.onCollideCallback(Q),B.onCollideWith[G.id]&&B.onCollideWith[G.id](G,Q),G.onCollideWith[B.id]&&G.onCollideWith[B.id](B,Q)}),I.emit(p.COLLISION_START,N,B,G)}),x.on(R,"collisionActive",function(N){var B,G,V=N.pairs;V.length>0&&V.map(function(Q){G=Q.bodyB,(B=Q.bodyA).gameObject&&B.gameObject.emit("collideActive",B,G,Q),G.gameObject&&G.gameObject.emit("collideActive",G,B,Q),x.trigger(B,"onCollideActive",{pair:Q}),x.trigger(G,"onCollideActive",{pair:Q}),B.onCollideActiveCallback&&B.onCollideActiveCallback(Q),G.onCollideActiveCallback&&G.onCollideActiveCallback(Q)}),I.emit(p.COLLISION_ACTIVE,N,B,G)}),x.on(R,"collisionEnd",function(N){var B,G,V=N.pairs;V.length>0&&V.map(function(Q){G=Q.bodyB,(B=Q.bodyA).gameObject&&B.gameObject.emit("collideEnd",B,G,Q),G.gameObject&&G.gameObject.emit("collideEnd",G,B,Q),x.trigger(B,"onCollideEnd",{pair:Q}),x.trigger(G,"onCollideEnd",{pair:Q}),B.onCollideEndCallback&&B.onCollideEndCallback(Q),G.onCollideEndCallback&&G.onCollideEndCallback(Q)}),I.emit(p.COLLISION_END,N,B,G)})},setBounds:function(I,R,F,N,V,B,G,Q,H){return void 0===I&&(I=0),void 0===R&&(R=0),void 0===F&&(F=this.scene.sys.scale.width),void 0===N&&(N=this.scene.sys.scale.height),void 0===V&&(V=64),void 0===B&&(B=!0),void 0===G&&(G=!0),void 0===Q&&(Q=!0),void 0===H&&(H=!0),this.updateWall(B,"left",I-V,R-V,V,N+2*V),this.updateWall(G,"right",I+F,R-V,V,N+2*V),this.updateWall(Q,"top",I,R-V,F,V),this.updateWall(H,"bottom",I,R+N,F,V),this},updateWall:function(I,R,F,N,V,B){var G=this.walls[R];I?(G&&T.remove(this.localWorld,G),this.walls[R]=this.create(F+=V/2,N+=B/2,V,B,{isStatic:!0,friction:0,frictionStatic:0})):(G&&T.remove(this.localWorld,G),this.walls[R]=null)},createDebugGraphic:function(){var I=this.scene.sys.add.graphics({x:0,y:0});return I.setDepth(Number.MAX_VALUE),this.debugGraphic=I,this.drawDebug=!0,I},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(I,R,F){return void 0===I&&(I=0),void 0===R&&(R=1),void 0===F&&(F=.001),this.localWorld.gravity.x=I,this.localWorld.gravity.y=R,this.localWorld.gravity.scale=F,this},create:function(I,R,F,N,V){var B=y.rectangle(I,R,F,N,V);return T.add(this.localWorld,B),B},add:function(I){return T.add(this.localWorld,I),this},remove:function(I,R){Array.isArray(I)||(I=[I]);for(var F=0;FMath.max(_._maxFrameDelta,F.maxFrameTime))&&(G=F.frameDelta||_._frameDeltaFallback),F.frameDeltaSmoothing){F.frameDeltaHistory.push(G),F.frameDeltaHistory=F.frameDeltaHistory.slice(-F.frameDeltaHistorySize);var Q=F.frameDeltaHistory.slice(0).sort(),H=F.frameDeltaHistory.slice(Q.length*_._smoothingLowerBound,Q.length*_._smoothingUpperBound);G=_._mean(H)||G}F.frameDeltaSnapping&&(G=1e3/Math.round(1e3/G)),F.frameDelta=G,F.timeLastTick=I,F.timeBuffer+=F.frameDelta,F.timeBuffer=f.clamp(F.timeBuffer,0,F.frameDelta+V*_._timeBufferMargin),F.lastUpdatesDeferred=0;for(var tt=F.maxUpdates||Math.ceil(F.maxFrameTime/V),at=f.now();V>0&&F.timeBuffer>=V*_._timeBufferMargin;){c.update(R,V),F.timeBuffer-=V,B+=1;var lt=f.now()-N,q=f.now()-at;if(B>=tt||lt+_._elapsedNextEstimate*q/B>F.maxFrameTime){F.lastUpdatesDeferred=Math.round(Math.max(0,F.timeBuffer/V-_._timeBufferMargin));break}}}},step:function(I){c.update(this.engine,I)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(I){var R=I.hasOwnProperty("body")?I.body:I;return null!==d.get(this.localWorld,R.id,R.type)},getAllBodies:function(){return d.allBodies(this.localWorld)},getAllConstraints:function(){return d.allConstraints(this.localWorld)},getAllComposites:function(){return d.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var I=this.debugConfig,R=this.engine,F=this.debugGraphic,N=d.allBodies(this.localWorld);this.debugGraphic.clear(),I.showBroadphase&&R.broadphase.controller&&this.renderGrid(R.broadphase,F,I.broadphaseColor,.5),I.showBounds&&this.renderBodyBounds(N,F,I.boundsColor,.5),(I.showBody||I.showStaticBody)&&this.renderBodies(N),I.showJoint&&this.renderJoints(),(I.showAxes||I.showAngleIndicator)&&this.renderBodyAxes(N,F,I.showAxes,I.angleColor,.5),I.showVelocity&&this.renderBodyVelocity(N,F,I.velocityColor,1,2),I.showSeparations&&this.renderSeparations(R.pairs.list,F,I.separationColor),I.showCollisions&&this.renderCollisions(R.pairs.list,F,I.collisionColor)}},renderGrid:function(I,R,F,N){R.lineStyle(1,F,N);for(var V=f.keys(I.buckets),B=0;B0){var tt=K[0].vertex.x,at=K[0].vertex.y;2===V.contactCount&&(tt=(K[0].vertex.x+K[1].vertex.x)/2,at=(K[0].vertex.y+K[1].vertex.y)/2),H.bodyB===H.supports[0].body||H.bodyA.isStatic?R.lineBetween(tt-8*H.normal.x,at-8*H.normal.y,tt,at):R.lineBetween(tt+8*H.normal.x,at+8*H.normal.y,tt,at)}}return this},renderBodyBounds:function(I,R,F,N){R.lineStyle(1,F,N);for(var V=0;V1?1:0;H1?1:0;K1?1:0;K1&&this.renderConvexHull(Y,R,q,dt)}}},renderBody:function(I,R,F,N,V,B,G,Q){void 0===N&&(N=null),void 0===V&&(V=null),void 0===B&&(B=1),void 0===G&&(G=null),void 0===Q&&(Q=null);for(var H=this.debugConfig,K=H.sensorFillColor,tt=H.sensorLineColor,at=I.parts,lt=at.length,q=lt>1?1:0;q1){var G=I.vertices;R.lineStyle(N,F),R.beginPath(),R.moveTo(G[0].x,G[0].y);for(var Q=1;Q0&&(R.fillStyle(G),R.fillCircle(at.x,at.y,Q),R.fillCircle(lt.x,lt.y,Q)),this},resetCollisionIDs:function(){return C._nextCollidingGroupId=1,C._nextNonCollidingGroupId=-1,C._nextCategory=1,this},shutdown:function(){x.off(this.engine),this.removeAllListeners(),T.clear(this.localWorld,!1),c.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});S.exports=M},70410:S=>{S.exports={setBounce:function(a){return this.body.restitution=a,this}}},66968:S=>{S.exports={setCollisionCategory:function(a){return this.body.collisionFilter.category=a,this},setCollisionGroup:function(a){return this.body.collisionFilter.group=a,this},setCollidesWith:function(a){var y=0;if(Array.isArray(a))for(var C=0;C{var y=a(22562);S.exports={applyForce:function(g){return this._tempVec2.set(this.body.position.x,this.body.position.y),y.applyForce(this.body,this._tempVec2,g),this},applyForceFrom:function(g,f){return y.applyForce(this.body,g,f),this},thrust:function(g){var f=this.body.angle;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),y.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(g){var f=this.body.angle-Math.PI/2;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),y.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(g){var f=this.body.angle+Math.PI/2;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),y.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(g){var f=this.body.angle-Math.PI;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),y.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}}},5436:S=>{S.exports={setFriction:function(a,y,C){return this.body.friction=a,void 0!==y&&(this.body.frictionAir=y),void 0!==C&&(this.body.frictionStatic=C),this},setFrictionAir:function(a){return this.body.frictionAir=a,this},setFrictionStatic:function(a){return this.body.frictionStatic=a,this}}},39858:S=>{S.exports={setIgnoreGravity:function(a){return this.body.ignoreGravity=a,this}}},37302:(S,P,a)=>{var y=a(22562),C=a(26099);S.exports={setMass:function(f){return y.setMass(this.body,f),this},setDensity:function(f){return y.setDensity(this.body,f),this},centerOfMass:{get:function(){return new C(this.body.centerOfMass.x,this.body.centerOfMass.y)}}}},39132:S=>{S.exports={setSensor:function(a){return this.body.isSensor=a,this},isSensor:function(){return this.body.isSensor}}},57772:(S,P,a)=>{var y=a(66280),C=a(22562),g=a(43855),f=a(95540),d=a(19496),c=a(85791),h=a(41598);S.exports={setRectangle:function(u,m,v){return this.setBody({type:"rectangle",width:u,height:m},v)},setCircle:function(u,m){return this.setBody({type:"circle",radius:u},m)},setPolygon:function(u,m,v){return this.setBody({type:"polygon",sides:m,radius:u},v)},setTrapezoid:function(u,m,v,x){return this.setBody({type:"trapezoid",width:u,height:m,slope:v},x)},setExistingBody:function(u,m){void 0===m&&(m=!0),this.body&&this.world.remove(this.body,!0),this.body=u;for(var v=0;v{var y=a(1121),C=a(53614),g=a(35810);S.exports={setToSleep:function(){return C.set(this.body,!0),this},setAwake:function(){return C.set(this.body,!1),this},setSleepThreshold:function(d){return void 0===d&&(d=60),this.body.sleepThreshold=d,this},setSleepEvents:function(d,c){return this.setSleepStartEvent(d),this.setSleepEndEvent(c),this},setSleepStartEvent:function(d){if(d){var c=this.world;g.on(this.body,"sleepStart",function(h){c.emit(y.SLEEP_START,h,this)})}else g.off(this.body,"sleepStart");return this},setSleepEndEvent:function(d){if(d){var c=this.world;g.on(this.body,"sleepEnd",function(h){c.emit(y.SLEEP_END,h,this)})}else g.off(this.body,"sleepEnd");return this}}},90556:(S,P,a)=>{var y=a(22562);S.exports={setStatic:function(g){return y.setStatic(this.body,g),this},isStatic:function(){return this.body.isStatic}}},85436:(S,P,a)=>{var y=a(22562),C=a(36383),g=a(86554),f=a(30954);S.exports={x:{get:function(){return this.body.position.x},set:function(h){this._tempVec2.set(h,this.y),y.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(h){this._tempVec2.set(this.x,h),y.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(h){var p=1/this._scaleX,u=1/this._scaleY;this._scaleX=h,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,y.scale(this.body,p,u),y.scale(this.body,h,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(h){var p=1/this._scaleX,u=1/this._scaleY;this._scaleY=h,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,y.scale(this.body,p,u),y.scale(this.body,this._scaleX,h)}},angle:{get:function(){return f(this.body.angle*C.RAD_TO_DEG)},set:function(h){this.rotation=f(h)*C.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(h){this._rotation=g(h),y.setAngle(this.body,this._rotation)}},setPosition:function(h,p){return void 0===h&&(h=0),void 0===p&&(p=h),this._tempVec2.set(h,p),y.setPosition(this.body,this._tempVec2),this},setRotation:function(h){return void 0===h&&(h=0),this._rotation=g(h),y.setAngle(this.body,h),this},setFixedRotation:function(){return y.setInertia(this.body,1/0),this},setAngle:function(h){return void 0===h&&(h=0),this.angle=h,y.setAngle(this.body,this.rotation),this},setScale:function(h,p,u){void 0===h&&(h=1),void 0===p&&(p=h);var m=1/this._scaleX,v=1/this._scaleY;return this._scaleX=h,this._scaleY=p,y.scale(this.body,m,v,u),y.scale(this.body,h,p,u),this}}},42081:(S,P,a)=>{var y=a(22562);S.exports={setVelocityX:function(g){return this._tempVec2.set(g,this.body.velocity.y),y.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(g){return this._tempVec2.set(this.body.velocity.x,g),y.setVelocity(this.body,this._tempVec2),this},setVelocity:function(g,f){return this._tempVec2.set(g,f),y.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return y.getVelocity(this.body)},setAngularVelocity:function(g){return y.setAngularVelocity(this.body,g),this},getAngularVelocity:function(){return y.getAngularVelocity(this.body)},setAngularSpeed:function(g){return y.setAngularSpeed(this.body,g),this},getAngularSpeed:function(){return y.getAngularSpeed(this.body)}}},31884:(S,P,a)=>{S.exports={Bounce:a(70410),Collision:a(66968),Force:a(51607),Friction:a(5436),Gravity:a(39858),Mass:a(37302),Sensor:a(39132),SetBody:a(57772),Sleep:a(38083),Static:a(90556),Transform:a(85436),Velocity:a(42081)}},85608:S=>{S.exports="afteradd"},1213:S=>{S.exports="afterremove"},25968:S=>{S.exports="afterupdate"},67205:S=>{S.exports="beforeadd"},39438:S=>{S.exports="beforeremove"},44823:S=>{S.exports="beforeupdate"},92593:S=>{S.exports="collisionactive"},60128:S=>{S.exports="collisionend"},76861:S=>{S.exports="collisionstart"},92362:S=>{S.exports="dragend"},76408:S=>{S.exports="drag"},93971:S=>{S.exports="dragstart"},5656:S=>{S.exports="pause"},47861:S=>{S.exports="resume"},79099:S=>{S.exports="sleepend"},35906:S=>{S.exports="sleepstart"},1121:(S,P,a)=>{S.exports={AFTER_ADD:a(85608),AFTER_REMOVE:a(1213),AFTER_UPDATE:a(25968),BEFORE_ADD:a(67205),BEFORE_REMOVE:a(39438),BEFORE_UPDATE:a(44823),COLLISION_ACTIVE:a(92593),COLLISION_END:a(60128),COLLISION_START:a(76861),DRAG_END:a(92362),DRAG:a(76408),DRAG_START:a(93971),PAUSE:a(5656),RESUME:a(47861),SLEEP_END:a(79099),SLEEP_START:a(35906)}},3875:(S,P,a)=>{S.exports={BodyBounds:a(68174),Components:a(31884),Events:a(1121),Factory:a(28137),MatterGameObject:a(75803),Image:a(23181),Matter:a(19933),MatterPhysics:a(42045),PolyDecomp:a(55973),Sprite:a(34803),TileBody:a(73834),PhysicsEditorParser:a(19496),PhysicsJSONParser:a(85791),PointerConstraint:a(98713),World:a(68243)}},22562:(S,P,a)=>{var y={};S.exports=y;var C=a(41598),g=a(31725),f=a(53614),d=a(53402),c=a(15647),h=a(66615);!function(){y._timeCorrection=!0,y._inertiaScale=4,y._nextCollidingGroupId=1,y._nextNonCollidingGroupId=-1,y._nextCategory=1,y._baseDelta=16.666666666666668,y.create=function(u){var m={id:d.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:u.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!u.hasOwnProperty("position")&&u.hasOwnProperty("vertices")?u.position=C.centre(u.vertices):u.hasOwnProperty("vertices")||(m.vertices=C.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var v=d.extend(m,u);return p(v,u),v.setOnCollideWith=function(x,b){return b?this.onCollideWith[x.id]=b:delete this.onCollideWith[x.id],this},v},y.nextGroup=function(u){return u?y._nextNonCollidingGroupId--:y._nextCollidingGroupId++},y.nextCategory=function(){return y._nextCategory=y._nextCategory<<1,y._nextCategory};var p=function(u,m){if(m=m||{},y.set(u,{bounds:u.bounds||c.create(u.vertices),positionPrev:u.positionPrev||g.clone(u.position),anglePrev:u.anglePrev||u.angle,vertices:u.vertices,parts:u.parts||[u],isStatic:u.isStatic,isSleeping:u.isSleeping,parent:u.parent||u}),C.rotate(u.vertices,u.angle,u.position),h.rotate(u.axes,u.angle),c.update(u.bounds,u.vertices,u.velocity),y.set(u,{axes:m.axes||u.axes,area:m.area||u.area,mass:m.mass||u.mass,inertia:m.inertia||u.inertia}),1===u.parts.length){var v=u.bounds,x=u.centerOfMass,b=u.centerOffset,T=v.max.x-v.min.x,_=v.max.y-v.min.y;x.x=-(v.min.x-u.position.x)/T,x.y=-(v.min.y-u.position.y)/_,b.x=T*x.x,b.y=_*x.y}};y.set=function(u,m,v){var x;for(x in"string"==typeof m&&(x=m,(m={})[x]=v),m)if(Object.prototype.hasOwnProperty.call(m,x))switch(v=m[x],x){case"isStatic":y.setStatic(u,v);break;case"isSleeping":f.set(u,v);break;case"mass":y.setMass(u,v);break;case"density":y.setDensity(u,v);break;case"inertia":y.setInertia(u,v);break;case"vertices":y.setVertices(u,v);break;case"position":y.setPosition(u,v);break;case"angle":y.setAngle(u,v);break;case"velocity":y.setVelocity(u,v);break;case"angularVelocity":y.setAngularVelocity(u,v);break;case"speed":y.setSpeed(u,v);break;case"angularSpeed":y.setAngularSpeed(u,v);break;case"parts":y.setParts(u,v);break;case"centre":y.setCentre(u,v);break;default:u[x]=v}},y.setStatic=function(u,m){for(var v=0;v0&&g.rotateAbout(T.position,x,u.position,T.position)}},y.setVelocity=function(u,m){var v=u.deltaTime/y._baseDelta;u.positionPrev.x=u.position.x-m.x*v,u.positionPrev.y=u.position.y-m.y*v,u.velocity.x=(u.position.x-u.positionPrev.x)/v,u.velocity.y=(u.position.y-u.positionPrev.y)/v,u.speed=g.magnitude(u.velocity)},y.getVelocity=function(u){var m=y._baseDelta/u.deltaTime;return{x:(u.position.x-u.positionPrev.x)*m,y:(u.position.y-u.positionPrev.y)*m}},y.getSpeed=function(u){return g.magnitude(y.getVelocity(u))},y.setSpeed=function(u,m){y.setVelocity(u,g.mult(g.normalise(y.getVelocity(u)),m))},y.setAngularVelocity=function(u,m){var v=u.deltaTime/y._baseDelta;u.anglePrev=u.angle-m*v,u.angularVelocity=(u.angle-u.anglePrev)/v,u.angularSpeed=Math.abs(u.angularVelocity)},y.getAngularVelocity=function(u){return(u.angle-u.anglePrev)*y._baseDelta/u.deltaTime},y.getAngularSpeed=function(u){return Math.abs(y.getAngularVelocity(u))},y.setAngularSpeed=function(u,m){y.setAngularVelocity(u,d.sign(y.getAngularVelocity(u))*m)},y.translate=function(u,m,v){y.setPosition(u,g.add(u.position,m),v)},y.rotate=function(u,m,v,x){if(v){var b=Math.cos(m),T=Math.sin(m),_=u.position.x-v.x,A=u.position.y-v.y;y.setPosition(u,{x:v.x+(_*b-A*T),y:v.y+(_*T+A*b)},x),y.setAngle(u,u.angle+m,x)}else y.setAngle(u,u.angle+m,x)},y.scale=function(u,m,v,x){var b=0,T=0;x=x||u.position;for(var _=u.inertia===1/0,A=0;A0&&(b+=M.area,T+=M.inertia),M.position.x=x.x+(M.position.x-x.x)*m,M.position.y=x.y+(M.position.y-x.y)*v,c.update(M.bounds,M.vertices,u.velocity)}u.parts.length>1&&(u.area=b,u.isStatic||(y.setMass(u,u.density*b),y.setInertia(u,T))),u.circleRadius&&(m===v?u.circleRadius*=m:u.circleRadius=null),_&&y.setInertia(u,1/0)},y.update=function(u,m){var v=(m=(typeof m<"u"?m:16.666666666666668)*u.timeScale)*m,x=y._timeCorrection?m/(u.deltaTime||m):1,b=1-u.frictionAir*(m/d._baseDelta),_=(u.position.y-u.positionPrev.y)*x;u.velocity.x=(u.position.x-u.positionPrev.x)*x*b+u.force.x/u.mass*v,u.velocity.y=_*b+u.force.y/u.mass*v,u.positionPrev.x=u.position.x,u.positionPrev.y=u.position.y,u.position.x+=u.velocity.x,u.position.y+=u.velocity.y,u.deltaTime=m,u.angularVelocity=(u.angle-u.anglePrev)*b*x+u.torque/u.inertia*v,u.anglePrev=u.angle,u.angle+=u.angularVelocity,u.speed=g.magnitude(u.velocity),u.angularSpeed=Math.abs(u.angularVelocity);for(var A=0;A0&&(M.position.x+=u.velocity.x,M.position.y+=u.velocity.y),0!==u.angularVelocity&&(C.rotate(M.vertices,u.angularVelocity,u.position),h.rotate(M.axes,u.angularVelocity),A>0&&g.rotateAbout(M.position,u.angularVelocity,u.position,M.position)),c.update(M.bounds,M.vertices,u.velocity)}},y.updateVelocities=function(u){var m=y._baseDelta/u.deltaTime,v=u.velocity;v.x=(u.position.x-u.positionPrev.x)*m,v.y=(u.position.y-u.positionPrev.y)*m,u.speed=Math.sqrt(v.x*v.x+v.y*v.y),u.angularVelocity=(u.angle-u.anglePrev)*m,u.angularSpeed=Math.abs(u.angularVelocity)},y.applyForce=function(u,m,v){var x_x=m.x-u.position.x,x_y=m.y-u.position.y;u.force.x+=v.x,u.force.y+=v.y,u.torque+=x_x*v.y-x_y*v.x},y._totalProperties=function(u){for(var m={mass:0,area:0,inertia:0,centre:{x:0,y:0}},v=1===u.parts.length?0:1;v{var y={};S.exports=y;var C=a(35810),g=a(53402),f=a(15647),d=a(22562);y.create=function(c){return g.extend({id:g.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},c)},y.setModified=function(c,h,p,u){if(C.trigger(c,"compositeModified",c),c.isModified=h,h&&c.cache&&(c.cache.allBodies=null,c.cache.allConstraints=null,c.cache.allComposites=null),p&&c.parent&&y.setModified(c.parent,h,p,u),u)for(var m=0;m{var y={};S.exports=y;var C=a(69351);y.create=C.create,y.add=C.add,y.remove=C.remove,y.clear=C.clear,y.addComposite=C.addComposite,y.addBody=C.addBody,y.addConstraint=C.addConstraint},52284:(S,P,a)=>{var y={};S.exports=y;var f,d,c,C=a(41598),g=a(4506);f=[],d={overlap:0,axis:null},c={overlap:0,axis:null},y.create=function(h,p){return{pair:null,collided:!1,bodyA:h,bodyB:p,parentA:h.parent,parentB:p.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},y.collides=function(h,p,u){if(y._overlapAxes(d,h.vertices,p.vertices,h.axes),d.overlap<=0||(y._overlapAxes(c,p.vertices,h.vertices,p.axes),c.overlap<=0))return null;var v,x,m=u&&u.table[g.id(h,p)];m?v=m.collision:((v=y.create(h,p)).collided=!0,v.bodyA=h.id=0&&(R=-R,F=-F),b.x=R,b.y=F,T.x=-F,T.y=R,_.x=R*M,_.y=F*M,v.depth=M;var B=y._findSupports(h,p,b,1),G=0;if(C.contains(h.vertices,B[0])&&(A[G++]=B[0]),C.contains(h.vertices,B[1])&&(A[G++]=B[1]),G<2){var Q=y._findSupports(p,h,b,-1);C.contains(p.vertices,Q[0])&&(A[G++]=Q[0]),G<2&&C.contains(p.vertices,Q[1])&&(A[G++]=Q[1])}return 0===G&&(A[G++]=B[0]),v.supportCount=G,v},y._overlapAxes=function(h,p,u,m){var F,N,V,B,G,Q,v=p.length,x=u.length,b=p[0].x,T=p[0].y,_=u[0].x,A=u[0].y,M=m.length,I=Number.MAX_VALUE,R=0;for(G=0;Gq?q=B:Bit?it=B:B{var P={};S.exports=P,P.create=function(a){return{vertex:a,normalImpulse:0,tangentImpulse:0}}},81388:(S,P,a)=>{var y={};S.exports=y;var C=a(53402),g=a(52284);y.create=function(f){return C.extend({bodies:[],collisions:[],pairs:null},f)},y.setBodies=function(f,d){f.bodies=d.slice(0)},y.clear=function(f){f.bodies=[],f.collisions=[]},y.collisions=function(f){var x,b,d=f.pairs,c=f.bodies,h=c.length,p=y.canCollide,u=g.collides,m=f.collisions,v=0;for(c.sort(y._compareBoundsX),x=0;xA)break;if(!(MB.max.y)&&(!R||!V.isStatic&&!V.isSleeping)&&p(T.collisionFilter,V.collisionFilter)){var G=V.parts.length;if(N&&1===G)(Q=u(T,V,d))&&(m[v++]=Q);else for(var K=G>1?1:0,tt=F>1?1:0;tt(B=q.bounds).max.x||_.max.xB.max.y||(Q=u(at,q,d))&&(m[v++]=Q)}}}}return m.length!==v&&(m.length=v),m},y.canCollide=function(f,d){return f.group===d.group&&0!==f.group?f.group>0:!!(f.mask&d.category)&&!!(d.mask&f.category)},y._compareBoundsX=function(f,d){return f.bounds.min.x-d.bounds.min.x}},4506:(S,P,a)=>{var y={};S.exports=y;var C=a(43424);y.create=function(g,f){var d=g.bodyA,c=g.bodyB,h={id:y.id(d,c),bodyA:d,bodyB:c,collision:g,contacts:[C.create(),C.create()],contactCount:0,separation:0,isActive:!0,isSensor:d.isSensor||c.isSensor,timeCreated:f,timeUpdated:f,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return y.update(h,g,f),h},y.update=function(g,f,d){var c=f.supports,h=f.supportCount,p=g.contacts,u=f.parentA,m=f.parentB;g.isActive=!0,g.timeUpdated=d,g.collision=f,g.separation=f.depth,g.inverseMass=u.inverseMass+m.inverseMass,g.friction=u.frictionm.frictionStatic?u.frictionStatic:m.frictionStatic,g.restitution=u.restitution>m.restitution?u.restitution:m.restitution,g.slop=u.slop>m.slop?u.slop:m.slop,g.contactCount=h,f.pair=g;var v=c[0],x=p[0],b=c[1],T=p[1];(T.vertex===v||x.vertex===b)&&(p[1]=x,p[0]=x=T,T=p[1]),x.vertex=v,T.vertex=b},y.setActive=function(g,f,d){f?(g.isActive=!0,g.timeUpdated=d):(g.isActive=!1,g.contactCount=0)},y.id=function(g,f){return g.id{var y={};S.exports=y;var C=a(4506),g=a(53402);y.create=function(f){return g.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},f)},y.update=function(f,d,c){var N,V,B,h=C.update,p=C.create,u=C.setActive,m=f.table,v=f.list,x=v.length,b=x,T=f.collisionStart,_=f.collisionEnd,A=f.collisionActive,M=d.length,I=0,R=0,F=0;for(B=0;B=c?v[b++]=V:(u(V,!1,c),V.collision.bodyA.sleepCounter>0&&V.collision.bodyB.sleepCounter>0?v[b++]=V:(_[R++]=V,delete m[V.id]));v.length!==b&&(v.length=b),T.length!==I&&(T.length=I),_.length!==R&&(_.length=R),A.length!==F&&(A.length=F)},y.clear=function(f){return f.table={},f.list.length=0,f.collisionStart.length=0,f.collisionActive.length=0,f.collisionEnd.length=0,f}},73296:(S,P,a)=>{var y={};S.exports=y;var C=a(31725),g=a(52284),f=a(15647),d=a(66280),c=a(41598);y.collides=function(h,p){for(var u=[],m=p.length,v=h.bounds,x=g.collides,b=f.overlaps,T=0;T{var y={};S.exports=y;var C=a(41598),g=a(53402),f=a(15647);y._restingThresh=2,y._restingThreshTangent=Math.sqrt(6),y._positionDampen=.9,y._positionWarming=.8,y._frictionNormalMultiplier=5,y._frictionMaxStatic=Number.MAX_VALUE,y.preSolvePosition=function(d){var c,h,p,u=d.length;for(c=0;ctn?(_=R.friction*(ei>0?1:-1)*u)<-(A=ei>0?ei:-ei)?_=-A:_>A&&(_=A):(_=ei,A=b);var on=Bt*G-Kt*B,ln=Zt*G-ne*B,hn=q/(K+N.inverseInertia*on*on+V.inverseInertia*ln*ln),Mr=(1+R.restitution)*Se*hn;if(_*=hn,Se0&&(bt.normalImpulse=0),Mr=bt.normalImpulse-Ur}if(ei<-v||ei>v)bt.tangentImpulse=0;else{var dn=bt.tangentImpulse;bt.tangentImpulse+=_,bt.tangentImpulse<-A&&(bt.tangentImpulse=-A),bt.tangentImpulse>A&&(bt.tangentImpulse=A),_=bt.tangentImpulse-dn}var or=B*Mr+Q*_,Fr=G*Mr+H*_;N.isStatic||N.isSleeping||(N.positionPrev.x+=or*N.inverseMass,N.positionPrev.y+=Fr*N.inverseMass,N.anglePrev+=(Bt*Fr-Kt*or)*N.inverseInertia),V.isStatic||V.isSleeping||(V.positionPrev.x-=or*V.inverseMass,V.positionPrev.y-=Fr*V.inverseMass,V.anglePrev-=(Zt*Fr-ne*or)*V.inverseInertia)}}}}},48140:(S,P,a)=>{var y={};S.exports=y;var C=a(41598),g=a(31725),f=a(53614),d=a(15647),c=a(66615),h=a(53402);y._warming=.4,y._torqueDampen=1,y._minLength=1e-6,y.create=function(p){var u=p;u.bodyA&&!u.pointA&&(u.pointA={x:0,y:0}),u.bodyB&&!u.pointB&&(u.pointB={x:0,y:0});var m=u.bodyA?g.add(u.bodyA.position,u.pointA):u.pointA,v=u.bodyB?g.add(u.bodyB.position,u.pointB):u.pointB,x=g.magnitude(g.sub(m,v));u.length=typeof u.length<"u"?u.length:x,u.id=u.id||h.nextId(),u.label=u.label||"Constraint",u.type="constraint",u.stiffness=u.stiffness||(u.length>0?1:.7),u.damping=u.damping||0,u.angularStiffness=u.angularStiffness||0,u.angleA=u.bodyA?u.bodyA.angle:u.angleA,u.angleB=u.bodyB?u.bodyB.angle:u.angleB,u.plugin={};var b={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===u.length&&u.stiffness>.1?(b.type="pin",b.anchors=!1):u.stiffness<.9&&(b.type="spring"),u.render=h.extend(b,u.render),u},y.preSolveAll=function(p){for(var u=0;u=1||0===p.length?p.stiffness*u:p.stiffness*u*u)),B=(m?m.inverseMass:0)+(v?v.inverseMass:0),Q=B+((m?m.inverseInertia:0)+(v?v.inverseInertia:0));if(N>0){var q=g.create();tt=g.div(A,M),lt=g.sub(v&&g.sub(v.position,v.positionPrev)||q,m&&g.sub(m.position,m.positionPrev)||q),at=g.dot(tt,lt)}m&&!m.isStatic&&(m.constraintImpulse.x-=V.x*(K=m.inverseMass/B),m.constraintImpulse.y-=V.y*K,m.position.x-=V.x*K,m.position.y-=V.y*K,N>0&&(m.positionPrev.x-=N*tt.x*at*K,m.positionPrev.y-=N*tt.y*at*K),H=g.cross(x,V)/Q*y._torqueDampen*m.inverseInertia*(1-p.angularStiffness),m.constraintImpulse.angle-=H,m.angle-=H),v&&!v.isStatic&&(v.constraintImpulse.x+=V.x*(K=v.inverseMass/B),v.constraintImpulse.y+=V.y*K,v.position.x+=V.x*K,v.position.y+=V.y*K,N>0&&(v.positionPrev.x+=N*tt.x*at*K,v.positionPrev.y+=N*tt.y*at*K),H=g.cross(b,V)/Q*y._torqueDampen*v.inverseInertia*(1-p.angularStiffness),v.constraintImpulse.angle+=H,v.angle+=H)}}},y.postSolveAll=function(p){for(var u=0;u0&&(b.position.x+=v.x,b.position.y+=v.y),0!==v.angle&&(C.rotate(b.vertices,v.angle,m.position),c.rotate(b.axes,v.angle),x>0&&g.rotateAbout(b.position,v.angle,m.position,b.position)),d.update(b.bounds,b.vertices,m.velocity)}v.angle*=y._warming,v.x*=y._warming,v.y*=y._warming}}},y.pointAWorld=function(p){return{x:(p.bodyA?p.bodyA.position.x:0)+(p.pointA?p.pointA.x:0),y:(p.bodyA?p.bodyA.position.y:0)+(p.pointA?p.pointA.y:0)}},y.pointBWorld=function(p){return{x:(p.bodyB?p.bodyB.position.x:0)+(p.pointB?p.pointB.x:0),y:(p.bodyB?p.bodyB.position.y:0)+(p.pointB?p.pointB.y:0)}},y.currentLength=function(p){var b=(p.bodyA?p.bodyA.position.x:0)+(p.pointA?p.pointA.x:0)-((p.bodyB?p.bodyB.position.x:0)+(p.pointB?p.pointB.x:0)),T=(p.bodyA?p.bodyA.position.y:0)+(p.pointA?p.pointA.y:0)-((p.bodyB?p.bodyB.position.y:0)+(p.pointB?p.pointB.y:0));return Math.sqrt(b*b+T*T)}},53402:(S,P,a)=>{var y={};S.exports=y,function(){y._baseDelta=16.666666666666668,y._nextId=0,y._seed=0,y._nowStartTime=+new Date,y._warnedOnce={},y._decomp=null,y.extend=function(g,f){var d,h;"boolean"==typeof f?(d=2,h=f):(d=1,h=!0);for(var p=d;p0;f--){var d=Math.floor(y.random()*(f+1)),c=g[f];g[f]=g[d],g[d]=c}return g},y.choose=function(g){return g[Math.floor(y.random()*g.length)]},y.isElement=function(g){return typeof HTMLElement<"u"?g instanceof HTMLElement:!!(g&&g.nodeType&&g.nodeName)},y.isArray=function(g){return"[object Array]"===Object.prototype.toString.call(g)},y.isFunction=function(g){return"function"==typeof g},y.isPlainObject=function(g){return"object"==typeof g&&g.constructor===Object},y.isString=function(g){return"[object String]"===toString.call(g)},y.clamp=function(g,f,d){return gd?d:g},y.sign=function(g){return g<0?-1:1},y.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-y._nowStartTime},y.random=function(g,f){return f=typeof f<"u"?f:1,(g=typeof g<"u"?g:0)+C()*(f-g)};var C=function(){return y._seed=(9301*y._seed+49297)%233280,y._seed/233280};y.colorToNumber=function(g){return 3==(g=g.replace("#","")).length&&(g=g.charAt(0)+g.charAt(0)+g.charAt(1)+g.charAt(1)+g.charAt(2)+g.charAt(2)),parseInt(g,16)},y.logLevel=1,y.log=function(){console&&y.logLevel>0&&y.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},y.info=function(){console&&y.logLevel>0&&y.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},y.warn=function(){console&&y.logLevel>0&&y.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},y.warnOnce=function(){var g=Array.prototype.slice.call(arguments).join(" ");y._warnedOnce[g]||(y.warn(g),y._warnedOnce[g]=!0)},y.deprecated=function(g,f,d){g[f]=y.chain(function(){y.warnOnce("\u{1f505} deprecated \u{1f505}",d)},g[f])},y.nextId=function(){return y._nextId++},y.indexOf=function(g,f){if(g.indexOf)return g.indexOf(f);for(var d=0;d{var y={};S.exports=y;var C=a(53614),g=a(66272),f=a(81388),d=a(99561),c=a(35810),h=a(69351),p=a(48140),u=a(53402),m=a(22562);y._deltaMax=16.666666666666668,y.create=function(v){var b=u.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},v=v||{});return b.world=v.world||h.create({label:"World"}),b.pairs=v.pairs||d.create(),b.detector=v.detector||f.create(),b.detector.pairs=b.pairs,b.grid={buckets:[]},b.world.gravity=b.gravity,b.broadphase=b.grid,b.metrics={},b},y.update=function(v,x){var R,b=u.now(),T=v.world,_=v.detector,A=v.pairs,M=v.timing,I=M.timestamp;x>y._deltaMax&&u.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",y._deltaMax.toFixed(3),"ms."),x=typeof x<"u"?x:u._baseDelta,M.timestamp+=x*=M.timeScale,M.lastDelta=x;var F={timestamp:M.timestamp,delta:x};c.trigger(v,"beforeUpdate",F);var N=h.allBodies(T),V=h.allConstraints(T),B=h.allComposites(T);for(T.isModified&&(f.setBodies(_,N),h.setModified(T,!1,!1,!0)),v.enableSleeping&&C.update(N,x),y._bodiesApplyGravity(N,v.gravity),y.wrap(N,B),y.attractors(N),x>0&&y._bodiesUpdate(N,x),c.trigger(v,"beforeSolve",F),p.preSolveAll(N),R=0;R0&&c.trigger(v,"collisionStart",{pairs:A.collisionStart,timestamp:M.timestamp,delta:x});var Q=u.clamp(20/v.positionIterations,0,1);for(g.preSolvePosition(A.list),R=0;R0&&c.trigger(v,"collisionActive",{pairs:A.collisionActive,timestamp:M.timestamp,delta:x}),A.collisionEnd.length>0&&c.trigger(v,"collisionEnd",{pairs:A.collisionEnd,timestamp:M.timestamp,delta:x}),y._bodiesClearForces(N),c.trigger(v,"afterUpdate",F),v.timing.lastElapsed=u.now()-b,v},y.merge=function(v,x){if(u.extend(v,x),x.world){v.world=x.world,y.clear(v);for(var b=h.allBodies(v.world),T=0;T0)for(var _=0;_{var y={};S.exports=y;var C=a(53402);y.on=function(g,f,d){for(var h,c=f.split(" "),p=0;p0){d||(d={}),c=f.split(" ");for(var v=0;v{var y={};S.exports=y;var C=a(73832),g=a(53402);y.name="matter-js",y.version="0.20.0",y.uses=[],y.used=[],y.use=function(){C.use(y,Array.prototype.slice.call(arguments))},y.before=function(f,d){return f=f.replace(/^Matter./,""),g.chainPathBefore(y,f,d)},y.after=function(f,d){return f=f.replace(/^Matter./,""),g.chainPathAfter(y,f,d)}},73832:(S,P,a)=>{var y={};S.exports=y;var C=a(53402);y._registry={},y.register=function(g){if(y.isPlugin(g)||C.warn("Plugin.register:",y.toString(g),"does not implement all required fields."),g.name in y._registry){var f=y._registry[g.name],d=y.versionParse(g.version).number,c=y.versionParse(f.version).number;d>c?(C.warn("Plugin.register:",y.toString(f),"was upgraded to",y.toString(g)),y._registry[g.name]=g):d-1},y.isFor=function(g,f){var d=g.for&&y.dependencyParse(g.for);return!g.for||f.name===d.name&&y.versionSatisfies(f.version,d.range)},y.use=function(g,f){if(g.uses=(g.uses||[]).concat(f||[]),0!==g.uses.length){for(var d=y.dependencies(g),c=C.topologicalSort(d),h=[],p=0;p0&&!u.silent&&C.info(h.join(" "))}else C.warn("Plugin.use:",y.toString(g),"does not specify any dependencies to install.")},y.dependencies=function(g,f){var d=y.dependencyParse(g),c=d.name;if(!(c in(f=f||{}))){g=y.resolve(g)||g,f[c]=C.map(g.uses||[],function(p){y.isPlugin(p)&&y.register(p);var u=y.dependencyParse(p),m=y.resolve(p);return m&&!y.versionSatisfies(m.version,u.range)?(C.warn("Plugin.dependencies:",y.toString(m),"does not satisfy",y.toString(u),"used by",y.toString(d)+"."),m._warned=!0,g._warned=!0):m||(C.warn("Plugin.dependencies:",y.toString(p),"used by",y.toString(d),"could not be resolved."),g._warned=!0),u.name});for(var h=0;h=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;f.test(g)||C.warn("Plugin.versionParse:",g,"is not a valid version or range.");var d=f.exec(g),c=Number(d[4]),h=Number(d[5]),p=Number(d[6]);return{isRange:!(!d[1]&&!d[2]),version:d[3],range:g,operator:d[1]||d[2]||"",major:c,minor:h,patch:p,parts:[c,h,p],prerelease:d[7],number:1e8*c+1e4*h+p}},y.versionSatisfies=function(g,f){var d=y.versionParse(f=f||"*"),c=y.versionParse(g);if(d.isRange){if("*"===d.operator||"*"===g)return!0;if(">"===d.operator)return c.number>d.number;if(">="===d.operator)return c.number>=d.number;if("~"===d.operator)return c.major===d.major&&c.minor===d.minor&&c.patch>=d.patch;if("^"===d.operator)return d.major>0?c.major===d.major&&c.number>=d.number:d.minor>0?c.minor===d.minor&&c.patch>=d.patch:c.patch===d.patch}return g===f||"*"===g}},13037:(S,P,a)=>{var y={};S.exports=y;var C=a(35810),g=a(48413),f=a(53402);!function(){y._maxFrameDelta=66.66666666666667,y._frameDeltaFallback=16.666666666666668,y._timeBufferMargin=1.5,y._elapsedNextEstimate=1,y._smoothingLowerBound=.1,y._smoothingUpperBound=.9,y.create=function(c){var p=f.extend({delta:16.666666666666668,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:33.333333333333336,lastUpdatesDeferred:0,enabled:!0},c);return p.fps=0,p},y.run=function(c,h){return c.timeBuffer=y._frameDeltaFallback,function p(u){c.frameRequestId=y._onNextFrame(c,p),u&&c.enabled&&y.tick(c,h,u)}(),c},y.tick=function(c,h,p){var u=f.now(),m=c.delta,v=0,x=p-c.timeLastTick;if((!x||!c.timeLastTick||x>Math.max(y._maxFrameDelta,c.maxFrameTime))&&(x=c.frameDelta||y._frameDeltaFallback),c.frameDeltaSmoothing){c.frameDeltaHistory.push(x),c.frameDeltaHistory=c.frameDeltaHistory.slice(-c.frameDeltaHistorySize);var b=c.frameDeltaHistory.slice(0).sort(),T=c.frameDeltaHistory.slice(b.length*y._smoothingLowerBound,b.length*y._smoothingUpperBound);x=d(T)||x}c.frameDeltaSnapping&&(x=1e3/Math.round(1e3/x)),c.frameDelta=x,c.timeLastTick=p,c.timeBuffer+=c.frameDelta,c.timeBuffer=f.clamp(c.timeBuffer,0,c.frameDelta+m*y._timeBufferMargin),c.lastUpdatesDeferred=0;var A=c.maxUpdates||Math.ceil(c.maxFrameTime/m),M={timestamp:h.timing.timestamp};C.trigger(c,"beforeTick",M),C.trigger(c,"tick",M);for(var I=f.now();m>0&&c.timeBuffer>=m*y._timeBufferMargin;){C.trigger(c,"beforeUpdate",M),g.update(h,m),C.trigger(c,"afterUpdate",M),c.timeBuffer-=m,v+=1;var R=f.now()-u,F=f.now()-I;if(v>=A||R+y._elapsedNextEstimate*F/v>c.maxFrameTime){c.lastUpdatesDeferred=Math.round(Math.max(0,c.timeBuffer/m-y._timeBufferMargin));break}}h.timing.lastUpdatesPerFrame=v,C.trigger(c,"afterTick",M),c.frameDeltaHistory.length>=100&&(c.lastUpdatesDeferred&&Math.round(c.frameDelta/m)>A?f.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):c.lastUpdatesDeferred&&f.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof c.isFixed<"u"&&f.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(c.deltaMin||c.deltaMax)&&f.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),0!==c.fps&&f.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},y.stop=function(c){y._cancelNextFrame(c)},y._onNextFrame=function(c,h){if(!(typeof window<"u"&&window.requestAnimationFrame))throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return c.frameRequestId=window.requestAnimationFrame(h),c.frameRequestId},y._cancelNextFrame=function(c){if(!(typeof window<"u"&&window.cancelAnimationFrame))throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.");window.cancelAnimationFrame(c.frameRequestId)};var d=function(c){for(var h=0,p=c.length,u=0;u{var y={};S.exports=y;var C=a(22562),g=a(35810),f=a(53402);y._motionWakeThreshold=.18,y._motionSleepThreshold=.08,y._minBias=.9,y.update=function(d,c){for(var h=c/f._baseDelta,p=y._motionSleepThreshold,u=0;u0&&m.motion=m.sleepThreshold/h&&y.set(m,!0)):m.sleepCounter>0&&(m.sleepCounter-=1)}else y.set(m,!1)}},y.afterCollisions=function(d){for(var c=y._motionSleepThreshold,h=0;hc&&y.set(x,!1)}}}},y.set=function(d,c){var h=d.isSleeping;c?(d.isSleeping=!0,d.sleepCounter=d.sleepThreshold,d.positionImpulse.x=0,d.positionImpulse.y=0,d.positionPrev.x=d.position.x,d.positionPrev.y=d.position.y,d.anglePrev=d.angle,d.speed=0,d.angularSpeed=0,d.motion=0,h||g.trigger(d,"sleepStart")):(d.isSleeping=!1,d.sleepCounter=0,h&&g.trigger(d,"sleepEnd"))}},66280:(S,P,a)=>{var y={};S.exports=y;var C=a(41598),g=a(53402),f=a(22562),d=a(15647),c=a(31725);y.rectangle=function(h,p,u,m,v){v=v||{};var x={label:"Rectangle Body",position:{x:h,y:p},vertices:C.fromPath("L 0 0 L "+u+" 0 L "+u+" "+m+" L 0 "+m)};if(v.chamfer){var b=v.chamfer;x.vertices=C.chamfer(x.vertices,b.radius,b.quality,b.qualityMin,b.qualityMax),delete v.chamfer}return f.create(g.extend({},x,v))},y.trapezoid=function(h,p,u,m,v,x){x=x||{},v>=1&&g.warn("Bodies.trapezoid: slope parameter must be < 1.");var T=u*(v*=.5),_=T+(1-2*v)*u,A=_+T,I={label:"Trapezoid Body",position:{x:h,y:p},vertices:C.fromPath(v<.5?"L 0 0 L "+T+" "+-m+" L "+_+" "+-m+" L "+A+" 0":"L 0 0 L "+_+" "+-m+" L "+A+" 0")};if(x.chamfer){var R=x.chamfer;I.vertices=C.chamfer(I.vertices,R.radius,R.quality,R.qualityMin,R.qualityMax),delete x.chamfer}return f.create(g.extend({},I,x))},y.circle=function(h,p,u,m,v){m=m||{};var x={label:"Circle Body",circleRadius:u};v=v||25;var b=Math.ceil(Math.max(10,Math.min(v,u)));return b%2==1&&(b+=1),y.polygon(h,p,b,u,g.extend({},x,m))},y.polygon=function(h,p,u,m,v){if(v=v||{},u<3)return y.circle(h,p,m,v);for(var x=2*Math.PI/u,b="",T=.5*x,_=0;_0&&C.area(lt)1?(M=f.create(g.extend({parts:I.slice(0)},m)),f.setPosition(M,{x:h,y:p}),M):I[0]},y.flagCoincidentParts=function(h,p){void 0===p&&(p=5);for(var u=0;u{var y={};S.exports=y;var C=a(69351),g=a(48140),f=a(53402),d=a(22562),c=a(66280);y.stack=function(h,p,u,m,v,x,b){for(var M,T=C.create({label:"Stack"}),_=h,A=p,I=0,R=0;RF&&(F=B),d.translate(V,{x:.5*(V.bounds.max.x-V.bounds.min.x),y:.5*B}),_=V.bounds.max.x+v,C.addBody(T,V),M=V,I+=1}else _+=v}A+=F+x,_=h}return T},y.chain=function(h,p,u,m,v,x){for(var b=h.bodies,T=1;T0)for(T=0;T0&&C.addConstraint(h,g.create(f.extend({bodyA:x[T-1+(b-1)*p],bodyB:A},v))),m&&TF||A<(M=F-M)||A>u-1-M))return 1===R&&d.translate(I,{x:(A+(u%2==1?1:-1))*N,y:0}),b(h+(I?A*N:0)+A*v,_,A,M,I,R)})},y.newtonsCradle=function(h,p,u,m,v){for(var x=C.create({label:"Newtons Cradle"}),b=0;b{var y={};S.exports=y;var C=a(31725),g=a(53402);y.fromVertices=function(f){for(var d={},c=0;c{var P={};S.exports=P,P.create=function(a){var y={min:{x:0,y:0},max:{x:0,y:0}};return a&&P.update(y,a),y},P.update=function(a,y,C){a.min.x=1/0,a.max.x=-1/0,a.min.y=1/0,a.max.y=-1/0;for(var g=0;ga.max.x&&(a.max.x=f.x),f.xa.max.y&&(a.max.y=f.y),f.y0?a.max.x+=C.x:a.min.x+=C.x,C.y>0?a.max.y+=C.y:a.min.y+=C.y)},P.contains=function(a,y){return y.x>=a.min.x&&y.x<=a.max.x&&y.y>=a.min.y&&y.y<=a.max.y},P.overlaps=function(a,y){return a.min.x<=y.max.x&&a.max.x>=y.min.x&&a.max.y>=y.min.y&&a.min.y<=y.max.y},P.translate=function(a,y){a.min.x+=y.x,a.max.x+=y.x,a.min.y+=y.y,a.max.y+=y.y},P.shift=function(a,y){var C=a.max.x-a.min.x,g=a.max.y-a.min.y;a.min.x=y.x,a.max.x=y.x+C,a.min.y=y.y,a.max.y=y.y+g},P.wrap=function(a,y,C){var g=null,f=null;if(typeof y.min.x<"u"&&typeof y.max.x<"u"&&(a.min.x>y.max.x?g=y.min.x-a.max.x:a.max.xy.max.y?f=y.min.y-a.max.y:a.max.y{var y={};S.exports=y,a(15647);var g=a(53402);y.pathToVertices=function(f,d){typeof window<"u"&&!("SVGPathSeg"in window)&&g.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var c,h,p,u,m,v,x,b,T,M,I,A=[],R=0,F=0,N=0;d=d||15;var V=function(G,Q,H){var K=H%2==1&&H>1;if(!T||G!=T.x||Q!=T.y){T&&K?(M=T.x,I=T.y):(M=0,I=0);var tt={x:M+G,y:I+Q};(K||!T)&&(T=tt),A.push(tt),F=M+G,N=I+Q}},B=function(G){var Q=G.pathSegTypeAsLetter.toUpperCase();if("Z"!==Q){switch(Q){case"M":case"L":case"T":case"C":case"S":case"Q":F=G.x,N=G.y;break;case"H":F=G.x;break;case"V":N=G.y}V(F,N,G.pathSegType)}};for(y._svgPathToAbsolute(f),p=f.getTotalLength(),v=[],c=0;c{var P={};S.exports=P,P.create=function(a,y){return{x:a||0,y:y||0}},P.clone=function(a){return{x:a.x,y:a.y}},P.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},P.magnitudeSquared=function(a){return a.x*a.x+a.y*a.y},P.rotate=function(a,y,C){var g=Math.cos(y),f=Math.sin(y);C||(C={});var d=a.x*g-a.y*f;return C.y=a.x*f+a.y*g,C.x=d,C},P.rotateAbout=function(a,y,C,g){var f=Math.cos(y),d=Math.sin(y);g||(g={});var c=C.x+((a.x-C.x)*f-(a.y-C.y)*d);return g.y=C.y+((a.x-C.x)*d+(a.y-C.y)*f),g.x=c,g},P.normalise=function(a){var y=P.magnitude(a);return 0===y?{x:0,y:0}:{x:a.x/y,y:a.y/y}},P.dot=function(a,y){return a.x*y.x+a.y*y.y},P.cross=function(a,y){return a.x*y.y-a.y*y.x},P.cross3=function(a,y,C){return(y.x-a.x)*(C.y-a.y)-(y.y-a.y)*(C.x-a.x)},P.add=function(a,y,C){return C||(C={}),C.x=a.x+y.x,C.y=a.y+y.y,C},P.sub=function(a,y,C){return C||(C={}),C.x=a.x-y.x,C.y=a.y-y.y,C},P.mult=function(a,y){return{x:a.x*y,y:a.y*y}},P.div=function(a,y){return{x:a.x/y,y:a.y/y}},P.perp=function(a,y){return{x:(y=!0===y?-1:1)*-a.y,y:y*a.x}},P.neg=function(a){return{x:-a.x,y:-a.y}},P.angle=function(a,y){return Math.atan2(y.y-a.y,y.x-a.x)},P._temp=[P.create(),P.create(),P.create(),P.create(),P.create(),P.create()]},41598:(S,P,a)=>{var y={};S.exports=y;var C=a(31725),g=a(53402);y.create=function(f,d){for(var c=[],h=0;h0)return!1;u=m}return!0},y.scale=function(f,d,c,h){if(1===d&&1===c)return f;h=h||y.centre(f);for(var u,m=0;m=0?m-1:f.length-1],x=f[m],b=f[(m+1)%f.length],T=d[m0&&(d|=2),3===d)return!1;return 0!==d||null},y.hull=function(f){var h,p,d=[],c=[];for((f=f.slice(0)).sort(function(u,m){var v=u.x-m.x;return 0!==v?v:u.y-m.y}),p=0;p=2&&C.cross3(c[c.length-2],c[c.length-1],h)<=0;)c.pop();c.push(h)}for(p=f.length-1;p>=0;p-=1){for(h=f[p];d.length>=2&&C.cross3(d[d.length-2],d[d.length-1],h)<=0;)d.pop();d.push(h)}return d.pop(),c.pop(),d.concat(c)}},55973:S=>{function P(q,it,Y){var nt,dt,gt,bt,Et,Bt,Kt,X=[0,0];return gt=(nt=q[1][1]-q[0][1])*q[0][0]+(dt=q[0][0]-q[1][0])*q[0][1],Bt=(bt=it[1][1]-it[0][1])*it[0][0]+(Et=it[0][0]-it[1][0])*it[0][1],at(Kt=nt*Et-bt*dt,0,Y=Y||0)||(X[0]=(Et*gt-dt*Bt)/Kt,X[1]=(nt*Bt-bt*gt)/Kt),X}function a(q,it,Y,X){var nt=it[0]-q[0],dt=it[1]-q[1],gt=X[0]-Y[0],bt=X[1]-Y[1];if(gt*dt-bt*nt==0)return!1;var Et=(nt*(Y[1]-q[1])+dt*(q[0]-Y[0]))/(gt*dt-bt*nt),Bt=(gt*(q[1]-Y[1])+bt*(Y[0]-q[0]))/(bt*nt-gt*dt);return Et>=0&&Et<=1&&Bt>=0&&Bt<=1}function y(q,it,Y){return(it[0]-q[0])*(Y[1]-q[1])-(Y[0]-q[0])*(it[1]-q[1])}function C(q,it,Y){return y(q,it,Y)>0}function g(q,it,Y){return y(q,it,Y)>=0}function f(q,it,Y){return y(q,it,Y)<0}function d(q,it,Y){return y(q,it,Y)<=0}S.exports={decomp:function V(q){var it=N(q);return it.length>0?B(q,it):[q]},quickDecomp:function H(q,it,Y,X,nt,dt,gt){gt=gt||0,nt=nt||25,it=typeof it<"u"?it:[],Y=Y||[],X=X||[];var bt=[0,0],Et=[0,0],Bt=[0,0],Kt=0,Zt=0,ne=0,ae=0,fe=0,ke=0,Ye=0,Pe=[],Qe=[],Se=q,ei=q;if(ei.length<3)return it;if(++gt>(dt=dt||100))return console.warn("quickDecomp: max level ("+dt+") reached."),it;for(var ri=0;rife&&(fe+=q.length),ae=Number.MAX_VALUE,fe3&&X>=0;--X)p(m(q,X-1),m(q,X),m(q,X+1),it)&&(q.splice(X%q.length,1),Y++);return Y},removeDuplicatePoints:function tt(q,it){for(var Y=q.length-1;Y>=1;--Y)for(var X=q[Y],nt=Y-1;nt>=0;--nt)if(lt(X,q[nt],it)){q.splice(Y,1);continue}},makeCCW:function b(q){for(var it=0,Y=q,X=1;XY[it][0])&&(it=X);return!C(m(q,it-1),m(q,it),m(q,it+1))&&(function T(q){for(var it=[],Y=q.length,X=0;X!==Y;X++)it.push(q.pop());for(X=0;X!==Y;X++)q[X]=it[X]}(q),!0)}};var c=[],h=[];function p(q,it,Y,X){if(X){var nt=c,dt=h;nt[0]=it[0]-q[0],nt[1]=it[1]-q[1],dt[0]=Y[0]-it[0],dt[1]=Y[1]-it[1];var gt=nt[0]*dt[0]+nt[1]*dt[1],bt=Math.sqrt(nt[0]*nt[0]+nt[1]*nt[1]),Et=Math.sqrt(dt[0]*dt[0]+dt[1]*dt[1]);return Math.acos(gt/(bt*Et)){var C=new(a(83419))({initialize:function(f){this.pluginManager=f,this.game=f.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});S.exports=C},42363:S=>{S.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},37277:S=>{var P={},a={};S.exports={register:function(C,g,f,d){void 0===d&&(d=!1),P[C]={plugin:g,mapping:f,custom:d}},registerCustom:function(C,g,f,d){a[C]={plugin:g,mapping:f,data:d}},hasCore:function(C){return P.hasOwnProperty(C)},hasCustom:function(C){return a.hasOwnProperty(C)},getCore:function(C){return P[C]},getCustom:function(C){return a[C]},getCustomClass:function(C){return a.hasOwnProperty(C)?a[C].plugin:null},remove:function(C){P.hasOwnProperty(C)&&delete P[C]},removeCustom:function(C){a.hasOwnProperty(C)&&delete a[C]},destroyCorePlugins:function(){for(var C in P)P.hasOwnProperty(C)&&delete P[C]},destroyCustomPlugins:function(){for(var C in a)a.hasOwnProperty(C)&&delete a[C]}}},77332:(S,P,a)=>{var y=a(83419),C=a(8443),g=a(50792),f=a(74099),d=a(44603),c=a(39429),h=a(95540),p=a(37277),u=a(72905),m=new y({Extends:g,initialize:function(x){g.call(this),this.game=x,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],x.isBooted?this.boot():x.events.once(C.BOOT,this.boot,this)},boot:function(){var v,x,b,T,_,A,M,I=this.game.config,R=I.installGlobalPlugins;for(R=R.concat(this._pendingGlobal),v=0;v{var y=a(52018),C=a(83419),g=a(44594),f=new C({Extends:y,initialize:function(c,h,p){y.call(this,h),this.scene=c,this.systems=c.sys,this.pluginKey=p,c.sys.events.once(g.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});S.exports=f},18922:(S,P,a)=>{S.exports={BasePlugin:a(52018),DefaultPlugins:a(42363),PluginCache:a(37277),PluginManager:a(77332),ScenePlugin:a(45145)}},63595:()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(S){const P=performance.now(),a=this.getVideoPlaybackQuality(),y=this.mozPresentedFrames||this.mozPaintedFrames||a.totalVideoFrames-a.droppedVideoFrames,C=(g,f)=>{const d=this.getVideoPlaybackQuality(),c=this.mozPresentedFrames||this.mozPaintedFrames||d.totalVideoFrames-d.droppedVideoFrames;if(c>y){const h=this.mozFrameDelay||d.totalFrameDelay-a.totalFrameDelay||0,p=f-g;S(f,{presentationTime:f+1e3*h,expectedDisplayTime:f+p,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+p/1e3,presentedFrames:c,processingDuration:h}),delete this._rvfcpolyfillmap[P]}else this._rvfcpolyfillmap[P]=requestAnimationFrame(h=>C(f,h))};return this._rvfcpolyfillmap[P]=requestAnimationFrame(g=>C(P,g)),P},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(S){cancelAnimationFrame(this._rvfcpolyfillmap[S]),delete this._rvfcpolyfillmap[S]})},10312:S=>{S.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},29795:S=>{S.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},68627:(S,P,a)=>{var y=a(19715),C=a(32880),g=a(83419),f=a(8054),d=a(50792),c=a(92503),h=a(56373),p=a(97480),u=a(69442),m=a(61340),v=new g({Extends:d,initialize:function(b){d.call(this);var T=b.config;this.config={clearBeforeRender:T.clearBeforeRender,backgroundColor:T.backgroundColor,antialias:T.antialias,roundPixels:T.roundPixels},this.game=b,this.type=f.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=b.canvas,this.gameContext=T.context?T.context:this.gameCanvas.getContext("2d",{alpha:b.config.transparent,desynchronized:b.config.desynchronized,willReadFrequently:!1}),this.currentContext=this.gameContext,this.antialias=b.config.antialias,this.blendModes=h(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new m,this._tempMatrix2=new m,this._tempMatrix3=new m,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(u.READY,this.boot,this)},boot:function(){var x=this.game,b=x.scale.baseSize;this.width=b.width,this.height=b.height,this.isBooted=!0,x.scale.on(p.RESIZE,this.onResize,this),this.resize(b.width,b.height)},onResize:function(x,b){(b.width!==this.width||b.height!==this.height)&&this.resize(b.width,b.height)},resize:function(x,b){this.width=x,this.height=b,this.emit(c.RESIZE,x,b)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(x){return this.currentContext.globalCompositeOperation=x,this},setContext:function(x){return this.currentContext=x||this.gameContext,this},setAlpha:function(x){return this.currentContext.globalAlpha=x,this},preRender:function(){var x=this.gameContext,b=this.config,T=this.width,_=this.height;x.globalAlpha=1,x.globalCompositeOperation="source-over",x.setTransform(1,0,0,1,0,0),this.emit(c.PRE_RENDER_CLEAR),b.clearBeforeRender&&(x.clearRect(0,0,T,_),b.transparent||(x.fillStyle=b.backgroundColor.rgba,x.fillRect(0,0,T,_))),x.save(),this.drawCount=0,this.emit(c.PRE_RENDER)},render:function(x,b,T){var _=b.length;this.emit(c.RENDER,x,T);var A=T.x,M=T.y,I=T.width,R=T.height,F=T.renderToTexture?T.context:x.sys.context;F.save(),this.game.scene.customViewports&&(F.beginPath(),F.rect(A,M,I,R),F.clip()),T.emit(y.PRE_RENDER,T),this.currentContext=F;var N=T.mask;N&&N.preRenderCanvas(this,null,T._maskCamera),T.transparent||(F.fillStyle=T.backgroundColor.rgba,F.fillRect(A,M,I,R)),F.globalAlpha=T.alpha,F.globalCompositeOperation="source-over",this.drawCount+=_,T.renderToTexture&&T.emit(y.PRE_RENDER,T),T.matrix.copyToContext(F);for(var V=0;V<_;V++){var B=b[V];B.mask&&B.mask.preRenderCanvas(this,B,T),B.renderCanvas(this,B,T),B.mask&&B.mask.postRenderCanvas(this,B,T)}F.setTransform(1,0,0,1,0,0),F.globalCompositeOperation="source-over",F.globalAlpha=1,T.flashEffect.postRenderCanvas(F),T.fadeEffect.postRenderCanvas(F),T.dirty=!1,N&&N.postRenderCanvas(this),F.restore(),T.renderToTexture&&(T.emit(y.POST_RENDER,T),T.renderToGame&&x.sys.context.drawImage(T.canvas,A,M)),T.emit(y.POST_RENDER,T)},postRender:function(){this.gameContext.restore(),this.emit(c.POST_RENDER);var b=this.snapshotState;b.callback&&(C(this.gameCanvas,b),b.callback=null)},snapshotCanvas:function(x,b,T,_,A,M,I,R,F){void 0===T&&(T=!1),this.snapshotArea(_,A,M,I,b,R,F);var N=this.snapshotState;return N.getPixel=T,C(x,N),N.callback=null,this},snapshot:function(x,b,T){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,x,b,T)},snapshotArea:function(x,b,T,_,A,M,I){var R=this.snapshotState;return R.callback=A,R.type=M,R.encoder=I,R.getPixel=!1,R.x=x,R.y=b,R.width=Math.min(T,this.gameCanvas.width),R.height=Math.min(_,this.gameCanvas.height),this},snapshotPixel:function(x,b,T){return this.snapshotArea(x,b,1,1,T),this.snapshotState.getPixel=!0,this},batchSprite:function(x,b,T,_){var A=T.alpha*x.alpha;if(0!==A){var M=this.currentContext,I=this._tempMatrix1,R=this._tempMatrix2,F=b.canvasData,N=F.x,V=F.y,B=b.cutWidth,G=b.cutHeight,Q=b.customPivot,H=b.source.resolution,K=x.displayOriginX,tt=x.displayOriginY,at=-K+b.x,lt=-tt+b.y;if(x.isCropped){var q=x._crop;(q.flipX!==x.flipX||q.flipY!==x.flipY)&&b.updateCropUVs(q,x.flipX,x.flipY),B=q.cw,G=q.ch,N=q.cx,V=q.cy,at=-K+q.x,lt=-tt+q.y,x.flipX&&(at>=0?at=-(at+B):at<0&&(at=Math.abs(at)-B)),x.flipY&&(lt>=0?lt=-(lt+G):lt<0&&(lt=Math.abs(lt)-G))}var it=1,Y=1;x.flipX&&(Q||(at+=2*K-b.realWidth),it=-1),x.flipY&&(Q||(lt+=2*tt-b.realHeight),Y=-1);var X=x.x,nt=x.y;if(T.roundPixels&&(X=Math.floor(X),nt=Math.floor(nt)),R.applyITRS(X,nt,x.rotation,x.scaleX*it,x.scaleY*Y),I.copyFrom(T.matrix),_?(I.multiplyWithOffset(_,-T.scrollX*x.scrollFactorX,-T.scrollY*x.scrollFactorY),R.e=X,R.f=nt):(R.e-=T.scrollX*x.scrollFactorX,R.f-=T.scrollY*x.scrollFactorY),I.multiply(R),T.renderRoundPixels&&(I.e=Math.floor(I.e+.5),I.f=Math.floor(I.f+.5)),M.save(),I.setToContext(M),M.globalCompositeOperation=this.blendModes[x.blendMode],M.globalAlpha=A,M.imageSmoothingEnabled=!b.source.scaleMode,x.mask&&x.mask.preRenderCanvas(this,x,T),B>0&&G>0){var dt=B/H,gt=G/H;T.roundPixels&&(at=Math.floor(at+.5),lt=Math.floor(lt+.5),dt+=.5,gt+=.5),M.drawImage(b.source.image,N,V,B,G,at,lt,dt,gt)}x.mask&&x.mask.postRenderCanvas(this,x,T),M.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});S.exports=v},55830:(S,P,a)=>{S.exports={CanvasRenderer:a(68627),GetBlendModes:a(56373),SetTransform:a(20926)}},56373:(S,P,a)=>{var y=a(10312),C=a(89289);S.exports=function(){var f=[],d=C.supportNewBlendModes,c="source-over";return f[y.NORMAL]=c,f[y.ADD]="lighter",f[y.MULTIPLY]=d?"multiply":c,f[y.SCREEN]=d?"screen":c,f[y.OVERLAY]=d?"overlay":c,f[y.DARKEN]=d?"darken":c,f[y.LIGHTEN]=d?"lighten":c,f[y.COLOR_DODGE]=d?"color-dodge":c,f[y.COLOR_BURN]=d?"color-burn":c,f[y.HARD_LIGHT]=d?"hard-light":c,f[y.SOFT_LIGHT]=d?"soft-light":c,f[y.DIFFERENCE]=d?"difference":c,f[y.EXCLUSION]=d?"exclusion":c,f[y.HUE]=d?"hue":c,f[y.SATURATION]=d?"saturation":c,f[y.COLOR]=d?"color":c,f[y.LUMINOSITY]=d?"luminosity":c,f[y.ERASE]="destination-out",f[y.SOURCE_IN]="source-in",f[y.SOURCE_OUT]="source-out",f[y.SOURCE_ATOP]="source-atop",f[y.DESTINATION_OVER]="destination-over",f[y.DESTINATION_IN]="destination-in",f[y.DESTINATION_OUT]="destination-out",f[y.DESTINATION_ATOP]="destination-atop",f[y.LIGHTER]="lighter",f[y.COPY]="copy",f[y.XOR]="xor",f}},20926:(S,P,a)=>{var y=a(91296);S.exports=function(g,f,d,c,h){var p=c.alpha*d.alpha;if(p<=0)return!1;var u=y(d,c,h).calc;return f.globalCompositeOperation=g.blendModes[d.blendMode],f.globalAlpha=p,f.save(),u.setToContext(f),f.imageSmoothingEnabled=d.frame?!d.frame.source.scaleMode:g.antialias,!0}},63899:S=>{S.exports="losewebgl"},6119:S=>{S.exports="postrender"},48070:S=>{S.exports="prerender"},15640:S=>{S.exports="render"},8912:S=>{S.exports="resize"},87124:S=>{S.exports="restorewebgl"},92503:(S,P,a)=>{S.exports={LOSE_WEBGL:a(63899),POST_RENDER:a(6119),PRE_RENDER:a(48070),RENDER:a(15640),RESIZE:a(8912),RESTORE_WEBGL:a(87124)}},36909:(S,P,a)=>{S.exports={Events:a(92503),Snapshot:a(89966)},S.exports.Canvas=a(55830),S.exports.WebGL=a(4159)},32880:(S,P,a)=>{var y=a(27919),C=a(40987),g=a(95540);S.exports=function(d,c){var h=g(c,"callback"),p=g(c,"type","image/png"),u=g(c,"encoder",.92),m=Math.abs(Math.round(g(c,"x",0))),v=Math.abs(Math.round(g(c,"y",0))),x=Math.floor(g(c,"width",d.width)),b=Math.floor(g(c,"height",d.height));if(g(c,"getPixel",!1)){var M=d.getContext("2d",{willReadFrequently:!1}).getImageData(m,v,1,1).data;h.call(null,new C(M[0],M[1],M[2],M[3]))}else if(0!==m||0!==v||x!==d.width||b!==d.height){var I=y.createWebGL(this,x,b),R=I.getContext("2d",{willReadFrequently:!0});x>0&&b>0&&R.drawImage(d,m,v,x,b,0,0,x,b);var F=new Image;F.onerror=function(){h.call(null),y.remove(I)},F.onload=function(){h.call(null,F),y.remove(I)},F.src=I.toDataURL(p,u)}else{var N=new Image;N.onerror=function(){h.call(null)},N.onload=function(){h.call(null,N)},N.src=d.toDataURL(p,u)}}},88815:(S,P,a)=>{var y=a(27919),C=a(40987),g=a(95540);S.exports=function(d,c){var h=d,p=g(c,"callback"),u=g(c,"type","image/png"),m=g(c,"encoder",.92),v=Math.abs(Math.round(g(c,"x",0))),x=Math.abs(Math.round(g(c,"y",0))),b=g(c,"getPixel",!1),T=g(c,"isFramebuffer",!1),_=T?g(c,"bufferWidth",1):h.drawingBufferWidth,A=T?g(c,"bufferHeight",1):h.drawingBufferHeight;if(b){var M=new Uint8Array(4);h.readPixels(v,T?x:A-x,1,1,h.RGBA,h.UNSIGNED_BYTE,M),p.call(null,new C(M[0],M[1],M[2],M[3]))}else{var R=Math.floor(g(c,"width",_)),F=Math.floor(g(c,"height",A)),N=R*F*4,V=new Uint8Array(N);h.readPixels(v,A-x-F,R,F,h.RGBA,h.UNSIGNED_BYTE,V);for(var B=y.createWebGL(this,R,F),G=B.getContext("2d",{willReadFrequently:!0}),Q=G.getImageData(0,0,R,F),H=Q.data,K=0;K{S.exports={Canvas:a(32880),WebGL:a(88815)}},7530:(S,P,a)=>{var y=a(83419),C=a(36060),g=a(90330),f=a(82264),d=a(95540),c=a(32302),h=a(63448),p=a(31302),u=a(58918),m=a(14811),v=a(92651),x=a(96569),b=a(56527),T=a(57516),_=a(43439),A=a(81041),M=a(12385),I=a(7589),R=a(95428),F=a(72905),N=new y({initialize:function(B){this.game=B.game,this.renderer=B,this.classes=new g([[C.UTILITY_PIPELINE,I],[C.MULTI_PIPELINE,T],[C.BITMAPMASK_PIPELINE,p],[C.SINGLE_PIPELINE,M],[C.ROPE_PIPELINE,A],[C.LIGHT_PIPELINE,x],[C.POINTLIGHT_PIPELINE,_],[C.MOBILE_PIPELINE,b]]),this.postPipelineClasses=new g,this.pipelines=new g,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(V,B,G){var Q=this.renderer,H=this.renderTargets;this.frameInc=Math.floor(d(V,"frameInc",32));var K=Q.width,tt=Q.height,at=this.game.config.disablePreFX;if(this.game.config.disablePostFX||this.postPipelineClasses.setAll([[String(m.BARREL),u.Barrel],[String(m.BLOOM),u.Bloom],[String(m.BLUR),u.Blur],[String(m.BOKEH),u.Bokeh],[String(m.CIRCLE),u.Circle],[String(m.COLOR_MATRIX),u.ColorMatrix],[String(m.DISPLACEMENT),u.Displacement],[String(m.GLOW),u.Glow],[String(m.GRADIENT),u.Gradient],[String(m.PIXELATE),u.Pixelate],[String(m.SHADOW),u.Shadow],[String(m.SHINE),u.Shine],[String(m.VIGNETTE),u.Vignette],[String(m.WIPE),u.Wipe]]),!at){this.classes.set(C.FX_PIPELINE,v);for(var q=Math.min(K,tt),it=Math.ceil(q/this.frameInc),Y=1;Y=0;G--){var Q=B[G];Q.active&&Q.preBatch(V)}}},postBatch:function(V){if(V.hasPostPipeline){this.flush();for(var B=V.postPipelines,G=0;G=0;G--){var Q=B[G];Q.active&&Q.preBatch(V)}}},postBatchCamera:function(V){if(V.hasPostPipeline){this.flush();for(var B=V.postPipelines,G=0;Gthis.maxDimension)return this.targetIndex=B.length-3,B[this.targetIndex];var Q=3*(h(V,this.frameInc,0,!0)-1);return this.targetIndex=Q,B[Q]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});S.exports=N},32302:(S,P,a)=>{var y=a(83419),C=a(92503),g=new y({initialize:function(d,c,h,p,u,m,v,x,b){void 0===p&&(p=1),void 0===u&&(u=0),void 0===m&&(m=!0),void 0===v&&(v=!1),void 0===x&&(x=!0),void 0===b&&(b=!0),this.renderer=d,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=p,this.minFilter=u,this.autoClear=m,this.autoResize=!0,this.hasDepthBuffer=x,this.forceClamp=b,this.init(c,h),v?this.renderer.on(C.RESIZE,this.resize,this):this.autoResize=!1},init:function(f,d){var c=this.renderer;this.texture=c.createTextureFromSource(null,f,d,this.minFilter,this.forceClamp),this.framebuffer=c.createFramebuffer(f,d,this.texture,this.hasDepthBuffer),this.width=f,this.height=d},setAutoResize:function(f){return f&&!this.autoResize?(this.renderer.on(C.RESIZE,this.resize,this),this.autoResize=!0):!f&&this.autoResize&&(this.renderer.off(C.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(f,d){if(this.autoResize&&this.willResize(f,d)){var c=this.renderer;c.deleteFramebuffer(this.framebuffer),c.deleteTexture(this.texture),this.texture=c.createTextureFromSource(null,f,d,this.minFilter,this.forceClamp),this.framebuffer=c.createFramebuffer(f,d,this.texture,this.hasDepthBuffer),this.width=f,this.height=d}return this},willResize:function(f,d){return"number"==typeof f&&"number"==typeof d&&(f=Math.round(f*this.scale),d=Math.round(d*this.scale),f=Math.max(f,1),d=Math.max(d,1),f!==this.width||d!==this.height)},bind:function(f,d,c){void 0===f&&(f=!1);var h=this.renderer;if(f&&h.flush(),d&&c&&this.resize(d,c),h.pushFramebuffer(this.framebuffer,!1,!1),f&&this.adjustViewport(),this.autoClear){var p=this.renderer.gl;p.clearColor(0,0,0,0),p.clear(p.COLOR_BUFFER_BIT)}h.clearStencilMask()},adjustViewport:function(){var f=this.renderer.gl;f.viewport(0,0,this.width,this.height),f.disable(f.SCISSOR_TEST)},clear:function(f,d,c,h){var p=this.renderer,u=p.gl;p.pushFramebuffer(this.framebuffer),void 0!==f&&void 0!==d&&void 0!==c&&void 0!==h?(u.enable(u.SCISSOR_TEST),u.scissor(f,d,c,h)):u.disable(u.SCISSOR_TEST),u.clearColor(0,0,0,0),u.clear(u.COLOR_BUFFER_BIT),p.popFramebuffer(),p.resetScissor()},unbind:function(f){void 0===f&&(f=!1);var d=this.renderer;return f&&d.flush(),d.popFramebuffer()},destroy:function(){var f=this.renderer;f.off(C.RESIZE,this.resize,this),f.deleteFramebuffer(this.framebuffer),f.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});S.exports=g},70554:S=>{S.exports={getTintFromFloats:function(P,a,y,C){return((255*C&255)<<24|(255*P&255)<<16|(255*a&255)<<8|255*y&255)>>>0},getTintAppendFloatAlpha:function(P,a){return((255*a&255)<<24|P)>>>0},getTintAppendFloatAlphaAndSwap:function(P,a){return((255*a&255)<<24|(255&P)<<16|(P>>8&255)<<8|P>>16&255)>>>0},getFloatsFromUintRGB:function(P){return[(P>>16&255)/255,(P>>8&255)/255,(255&P)/255]},checkShaderMax:function(P,a){var y=Math.min(16,P.getParameter(P.MAX_TEXTURE_IMAGE_UNITS));return a&&-1!==a?Math.min(y,a):y},parseFragmentShaderMaxTextures:function(P,a){if(!P)return"";for(var y="",C=0;C0&&(y+="\n\telse "),C{var y=a(83419),C=a(62644),g=a(50792),f=a(77085),d=a(95540),c=a(37867),h=a(92503),p=a(32302),u=a(70554),m=a(38683),v=new y({Extends:g,initialize:function(b){g.call(this);var T=b.game,_=T.renderer,A=_.gl;this.name=d(b,"name","WebGLPipeline"),this.game=T,this.renderer=_,this.gl=A,this.view=T.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.topology=d(b,"topology",A.TRIANGLES),this.active=!0,this.forceZero=d(b,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.shaders=[],this.projectionWidth=0,this.projectionHeight=0,this.config=b,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=d(b,"resizeUniform","")},boot:function(){var x,b=this.gl,T=this.config,_=this.renderer;this.isPostFX||(this.projectionMatrix=(new c).identity());var A=this.renderTargets,M=d(T,"renderTarget",!1);"boolean"==typeof M&&M&&(M=1);var I=_.width,R=_.height;if("number"==typeof M)for(x=0;xK&&(K=H[x].vertexSize);var tt=d(T,"batchSize",_.config.batchSize);this.vertexCapacity=6*tt;var at=new ArrayBuffer(this.vertexCapacity*K);this.vertexData=at,this.bytes=new Uint8Array(at),this.vertexViewF32=new Float32Array(at),this.vertexViewU32=new Uint32Array(at);var lt=d(T,"vertices",null);for(lt?(this.vertexViewF32.set(lt),this.vertexBuffer=_.createVertexBuffer(at,b.STATIC_DRAW)):this.vertexBuffer=_.createVertexBuffer(at.byteLength,b.DYNAMIC_DRAW),this.setVertexBuffer(),x=H.length-1;x>=0;x--)H[x].rebind();this.hasBooted=!0,_.on(h.RESIZE,this.resize,this),_.on(h.PRE_RENDER,this.onPreRender,this),_.on(h.RENDER,this.onRender,this),_.on(h.POST_RENDER,this.onPostRender,this),this.emit(f.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(x,b,T){return x===this.currentShader&&this.renderer.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(T)&&!b&&(b=!0),x.bind(b,!1),this.currentShader=x),this},getShaderByName:function(x){for(var b=this.shaders,T=0;T-1&&(H=q.substring(20))}K&&tt&&G.push(new m(this,H,K,tt,C(at)))}this.shaders=G}return 0===this.shaders.length?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(x){return this.currentBatch={start:this.vertexCount,count:0,texture:[x],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=x,this.batch.push(this.currentBatch),0},addTextureToBatch:function(x){var b=this.currentBatch;b&&(b.texture.push(x),b.unit++,b.maxUnit++)},pushBatch:function(x){if(!this.currentBatch||this.forceZero&&x!==this.currentTexture)return this.createBatch(x);if(x===this.currentTexture)return this.currentUnit;var b=this.currentBatch,T=b.texture.indexOf(x);return-1===T?b.texture.length===this.renderer.maxTextures?this.createBatch(x):(b.unit++,b.maxUnit++,b.texture.push(x),this.currentUnit=b.unit,this.currentTexture=x,b.unit):(this.currentUnit=T,this.currentTexture=x,T)},setGameObject:function(x,b){return void 0===b&&(b=x.frame),this.pushBatch(b.source.glTexture)},shouldFlush:function(x){return void 0===x&&(x=0),this.vertexCount+x>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(x,b){(x!==this.width||b!==this.height)&&this.flush(),this.width=x,this.height=b;for(var T=this.renderTargets,_=0;_=0;T--){var _=b[T].rebind();(!x||_===x)&&(this.currentShader=_)}return this.activeTextures.length=0,this.emit(f.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var x=this.shaders,b=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,b&&this.setVertexBuffer();for(var T=0;T0){this.emit(f.BEFORE_FLUSH,this,x),this.onBeforeFlush(x);var b=this.gl,T=this.vertexCount,_=this.currentShader.vertexSize,A=this.topology;if(this.active){this.setVertexBuffer(),T===this.vertexCapacity?b.bufferData(b.ARRAY_BUFFER,this.vertexData,b.DYNAMIC_DRAW):b.bufferSubData(b.ARRAY_BUFFER,0,this.bytes.subarray(0,T*_));var M,I,R,F=this.batch,N=this.activeTextures;if(this.forceZero)for(N[0]||b.activeTexture(b.TEXTURE0),M=0;M{var y=a(95428),C=a(72905),g=a(19715),f=a(83419),d=a(8054),c=a(50792),h=a(92503),p=a(50030),u=a(37867),m=a(29747),v=a(7530),x=a(32302),b=a(97480),T=a(69442),_=a(70554),A=a(88815),M=a(26128),I=a(1482),R=a(82751),F=a(84387),N=a(93567),V=a(57183),Q=new f({Extends:c,initialize:function(K){c.call(this);var tt=K.config;this.config={clearBeforeRender:tt.clearBeforeRender,antialias:tt.antialias,backgroundColor:tt.backgroundColor,contextCreation:{alpha:tt.transparent,desynchronized:tt.desynchronized,depth:!0,antialias:tt.antialiasGL,premultipliedAlpha:tt.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:tt.failIfMajorPerformanceCaveat,powerPreference:tt.powerPreference,preserveDrawingBuffer:tt.preserveDrawingBuffer,willReadFrequently:!1},roundPixels:tt.roundPixels,maxTextures:tt.maxTextures,maxTextureSize:tt.maxTextureSize,batchSize:tt.batchSize,maxLights:tt.maxLights,mipmapFilter:tt.mipmapFilter},this.game=K,this.type=d.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=K.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=m,this.contextRestoredHandler=m,this.previousContextLostHandler=m,this.previousContextRestoredHandler=m,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(H){var K,tt=this.game,at=this.canvas,lt=H.backgroundColor;if(!(K=tt.config.context?tt.config.context:at.getContext("webgl",H.contextCreation)||at.getContext("experimental-webgl",H.contextCreation))||K.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=K,this.setExtensions(),this.setContextHandlers(),tt.context=K;for(var q=0;q<=27;q++)this.blendModes.push({func:[K.ONE,K.ONE_MINUS_SRC_ALPHA],equation:K.FUNC_ADD});return this.blendModes[1].func=[K.ONE,K.DST_ALPHA],this.blendModes[2].func=[K.DST_COLOR,K.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[K.ONE,K.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[K.ZERO,K.ONE_MINUS_SRC_ALPHA],equation:K.FUNC_REVERSE_SUBTRACT},this.glFormats=[K.BYTE,K.SHORT,K.UNSIGNED_BYTE,K.UNSIGNED_SHORT,K.FLOAT],this.glFuncMap={mat2:{func:K.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:K.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:K.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:K.uniform1f,length:1},"1fv":{func:K.uniform1fv,length:1},"1i":{func:K.uniform1i,length:1},"1iv":{func:K.uniform1iv,length:1},"2f":{func:K.uniform2f,length:2},"2fv":{func:K.uniform2fv,length:1},"2i":{func:K.uniform2i,length:2},"2iv":{func:K.uniform2iv,length:1},"3f":{func:K.uniform3f,length:3},"3fv":{func:K.uniform3fv,length:1},"3i":{func:K.uniform3i,length:3},"3iv":{func:K.uniform3iv,length:1},"4f":{func:K.uniform4f,length:4},"4fv":{func:K.uniform4fv,length:1},"4i":{func:K.uniform4i,length:4},"4iv":{func:K.uniform4iv,length:1}},(!H.maxTextures||-1===H.maxTextures)&&(H.maxTextures=K.getParameter(K.MAX_TEXTURE_IMAGE_UNITS)),H.maxTextureSize||(H.maxTextureSize=K.getParameter(K.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),K.disable(K.DEPTH_TEST),K.disable(K.CULL_FACE),K.enable(K.BLEND),K.clearColor(lt.redGL,lt.greenGL,lt.blueGL,lt.alphaGL),-1!==["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"].indexOf(H.mipmapFilter)&&(this.mipmapFilter=K[H.mipmapFilter]),this.maxTextures=_.checkShaderMax(K,H.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new v(this),this.setBlendMode(d.BlendModes.NORMAL),this.projectionMatrix=(new u).identity(),tt.textures.once(T.READY,this.boot,this),this},boot:function(){var H=this.game,K=this.pipelines,tt=H.scale.baseSize,at=tt.width,lt=tt.height;this.width=at,this.height=lt,this.isBooted=!0,this.renderTarget=new x(this,at,lt,1,0,!0,!0),this.maskTarget=new x(this,at,lt,1,0,!0,!0),this.maskSource=new x(this,at,lt,1,0,!0,!0);var q=H.config;K.boot(q.pipeline,q.defaultPipeline,q.autoMobilePipeline),this.blankTexture=H.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=H.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=H.textures.getFrame("__WHITE").glTexture;var it=this.gl;it.bindFramebuffer(it.FRAMEBUFFER,null),it.enable(it.SCISSOR_TEST),H.scale.on(b.RESIZE,this.onResize,this),this.resize(at,lt)},setExtensions:function(){var H=this.gl,K=H.getSupportedExtensions();this.supportedExtensions=K;var tt="ANGLE_instanced_arrays";this.instancedArraysExtension=K.indexOf(tt)>-1?H.getExtension(tt):null;var at="OES_vertex_array_object";this.vaoExtension=K.indexOf(at)>-1?H.getExtension(at):null},setContextHandlers:function(H,K){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),this.contextLostHandler="function"==typeof H?H.bind(this):this.dispatchContextLost.bind(this),this.contextRestoredHandler="function"==typeof K?K.bind(this):this.dispatchContextRestored.bind(this),this.canvas.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),this.previousContextLostHandler=this.contextLostHandler,this.previousContextRestoredHandler=this.contextRestoredHandler},dispatchContextLost:function(H){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(h.LOSE_WEBGL,this),H.preventDefault()},dispatchContextRestored:function(H){var K=this.gl;if(K.isContextLost())console&&console.log("WebGL Context restored, but context is still lost");else{this.currentProgram=null,this.currentFramebuffer=null,this.setBlendMode(d.BlendModes.NORMAL),K.disable(K.BLEND),K.disable(K.DEPTH_TEST),K.enable(K.CULL_FACE),this.compression=this.getCompressedTextures();var tt=function(at){at.createResource()};y(this.glTextureWrappers,tt),y(this.glBufferWrappers,tt),y(this.glFramebufferWrappers,tt),y(this.glProgramWrappers,tt),y(this.glAttribLocationWrappers,tt),y(this.glUniformLocationWrappers,tt),this.createTemporaryTextures(),this.pipelines.restoreContext(),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.setExtensions(),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(h.RESTORE_WEBGL,this),H.preventDefault()}},createTemporaryTextures:function(){for(var H=this.gl,K=0;K0&&at>0;it&&Y&&(Y=it[0]!==H||it[1]!==K||it[2]!==tt||it[3]!==at),Y&&(this.flush(),q.scissor(H,lt-K-at,tt,at))},resetScissor:function(){var H=this.gl;H.enable(H.SCISSOR_TEST);var K=this.currentScissor;if(K){var lt=K[2],q=K[3];lt>0&&q>0&&H.scissor(K[0],this.drawingBufferHeight-K[1]-q,lt,q)}},popScissor:function(){var H=this.scissorStack;H.pop();var K=H[H.length-1];K&&this.setScissor(K[0],K[1],K[2],K[3]),this.currentScissor=K},hasActiveStencilMask:function(){var H=this.currentMask.mask,K=this.currentCameraMask.mask;return H&&H.isStencil||K&&K.isStencil},resetViewport:function(){var H=this.gl;H.viewport(0,0,this.width,this.height),this.drawingBufferHeight=H.drawingBufferHeight},setBlendMode:function(H,K){void 0===K&&(K=!1);var tt=this.gl,at=this.blendModes[H];return!!(K||H!==d.BlendModes.SKIP_CHECK&&this.currentBlendMode!==H)&&(this.flush(),tt.enable(tt.BLEND),tt.blendEquation(at.equation),at.func.length>2?tt.blendFuncSeparate(at.func[0],at.func[1],at.func[2],at.func[3]):tt.blendFunc(at.func[0],at.func[1]),this.currentBlendMode=H,!0)},addBlendMode:function(H,K){return this.blendModes.push({func:H,equation:K})-1},updateBlendMode:function(H,K,tt){return this.blendModes[H]&&(this.blendModes[H].func=K,tt&&(this.blendModes[H].equation=tt)),this},removeBlendMode:function(H){return H>17&&this.blendModes[H]&&this.blendModes.splice(H,1),this},pushFramebuffer:function(H,K,tt,at,lt){return H===this.currentFramebuffer?this:(this.fboStack.push(H),this.setFramebuffer(H,K,tt,at,lt))},setFramebuffer:function(H,K,tt,at,lt){if(void 0===K&&(K=!1),void 0===tt&&(tt=!0),void 0===at&&(at=null),void 0===lt&&(lt=!1),H===this.currentFramebuffer)return this;var q=this.gl,it=this.width,Y=this.height;return H&&H.renderTexture&&tt?(it=H.renderTexture.width,Y=H.renderTexture.height):this.flush(),q.bindFramebuffer(q.FRAMEBUFFER,H?H.webGLFramebuffer:null),tt&&q.viewport(0,0,it,Y),at&&q.framebufferTexture2D(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,q.TEXTURE_2D,at.webGLTexture,0),lt&&(q.clearColor(0,0,0,0),q.clear(q.COLOR_BUFFER_BIT)),K&&(H?(this.drawingBufferHeight=Y,this.pushScissor(0,0,it,Y)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=H,this},popFramebuffer:function(H,K){void 0===H&&(H=!1),void 0===K&&(K=!0);var tt=this.fboStack;tt.pop();var at=tt[tt.length-1];return at||(at=null),this.setFramebuffer(at,H,K),at},restoreFramebuffer:function(H,K){void 0===H&&(H=!1),void 0===K&&(K=!0);var tt=this.fboStack,at=tt[tt.length-1];at||(at=null),this.currentFramebuffer=null,this.setFramebuffer(at,H,K)},setProgram:function(H){return H!==this.currentProgram&&(this.flush(),this.gl.useProgram(H.webGLProgram),this.currentProgram=H,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(H,K,tt,at,lt){void 0===lt&&(lt=!1);var q=this.gl,it=q.NEAREST,Y=q.NEAREST,X=q.CLAMP_TO_EDGE,dt=p(K=H?H.width:K,tt=H?H.height:tt);if(dt&&!lt&&(X=q.REPEAT),at===d.ScaleModes.LINEAR&&this.config.antialias){var gt=H&&H.compressed;it=this.mipmapFilter&&(!gt&&dt||gt&&H.mipmaps.length>1)?this.mipmapFilter:q.LINEAR,Y=q.LINEAR}return H||"number"!=typeof K||"number"!=typeof tt?this.createTexture2D(0,it,Y,X,X,q.RGBA,H):this.createTexture2D(0,it,Y,X,X,q.RGBA,null,K,tt)},createTexture2D:function(H,K,tt,at,lt,q,it,Y,X,nt,dt,gt){"number"!=typeof Y&&(Y=it?it.width:1),"number"!=typeof X&&(X=it?it.height:1);var bt=new R(this.gl,H,K,tt,at,lt,q,it,Y,X,nt,dt,gt);return this.glTextureWrappers.push(bt),bt},createFramebuffer:function(H,K,tt,at){this.currentFramebuffer=null;var lt=new F(this.gl,H,K,tt,at);return this.glFramebufferWrappers.push(lt),lt},beginBitmapMask:function(H,K){this.gl&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==H&&(this.currentMask.mask=H,this.currentMask.camera=K))},drawBitmapMask:function(H,K,tt){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),H.renderWebGL(this,H,K),this.maskSource.unbind(!0),this.maskTarget.unbind();var at=this.gl,lt=this.getCurrentStencilMask();lt?(at.enable(at.STENCIL_TEST),lt.mask.applyStencil(this,lt.camera,!0)):this.currentMask.mask=null,this.pipelines.set(tt),at.activeTexture(at.TEXTURE0),at.bindTexture(at.TEXTURE_2D,this.maskTarget.texture.webGLTexture),at.activeTexture(at.TEXTURE1),at.bindTexture(at.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(H,K){var tt=new I(this.gl,H,K);return this.glProgramWrappers.push(tt),tt},createVertexBuffer:function(H,K){var tt=this.gl,at=new M(tt,H,tt.ARRAY_BUFFER,K);return this.glBufferWrappers.push(at),at},createAttribLocation:function(H,K){var tt=new N(this.gl,H,K);return this.glAttribLocationWrappers.push(tt),tt},createUniformLocation:function(H,K){var tt=new V(this.gl,H,K);return this.glUniformLocationWrappers.push(tt),tt},createIndexBuffer:function(H,K){var tt=this.gl,at=new M(tt,H,tt.ELEMENT_ARRAY_BUFFER,K);return this.glBufferWrappers.push(at),at},deleteTexture:function(H){if(H)return C(this.glTextureWrappers,H),H.destroy(),this},deleteFramebuffer:function(H){return H?(C(this.fboStack,H),C(this.glFramebufferWrappers,H),H.destroy(),this):this},deleteProgram:function(H){return H&&(C(this.glProgramWrappers,H),H.destroy()),this},deleteAttribLocation:function(H){return H&&(C(this.glAttribLocationWrappers,H),H.destroy()),this},deleteUniformLocation:function(H){return H&&(C(this.glUniformLocationWrappers,H),H.destroy()),this},deleteBuffer:function(H){return H?(C(this.glBufferWrappers,H),H.destroy(),this):this},preRenderCamera:function(H){var K=H.x,tt=H.y,at=H.width,lt=H.height,q=H.backgroundColor;H.emit(g.PRE_RENDER,H),this.pipelines.preBatchCamera(H),this.pushScissor(K,tt,at,lt),H.mask&&(this.currentCameraMask.mask=H.mask,this.currentCameraMask.camera=H._maskCamera,H.mask.preRenderWebGL(this,H,H._maskCamera)),q.alphaGL>0&&this.pipelines.setMulti().drawFillRect(K,tt,at,lt,_.getTintFromFloats(q.blueGL,q.greenGL,q.redGL,1),q.alphaGL)},getCurrentStencilMask:function(){var H=null,K=this.maskStack,tt=this.currentCameraMask;return K.length>0?H=K[K.length-1]:tt.mask&&tt.mask.isStencil&&(H=tt),H},postRenderCamera:function(H){var K=H.flashEffect,tt=H.fadeEffect;if(K.isRunning||tt.isRunning||tt.isComplete){var at=this.pipelines.setMulti();K.postRenderWebGL(at,_.getTintFromFloats),tt.postRenderWebGL(at,_.getTintFromFloats)}H.dirty=!1,this.popScissor(),H.mask&&(this.currentCameraMask.mask=null,H.mask.postRenderWebGL(this,H._maskCamera)),this.pipelines.postBatchCamera(H),H.emit(g.POST_RENDER,H)},preRender:function(){if(!this.contextLost){var H=this.gl;if(H.bindFramebuffer(H.FRAMEBUFFER,null),this.emit(h.PRE_RENDER_CLEAR),this.config.clearBeforeRender){var K=this.config.backgroundColor;H.clearColor(K.redGL,K.greenGL,K.blueGL,K.alphaGL),H.clear(H.COLOR_BUFFER_BIT|H.DEPTH_BUFFER_BIT|H.STENCIL_BUFFER_BIT)}H.enable(H.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&H.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(h.PRE_RENDER)}},render:function(H,K,tt){if(!this.contextLost){var at=K.length;if(this.emit(h.RENDER,H,tt),this.preRenderCamera(tt),0===at)return this.setBlendMode(d.BlendModes.NORMAL),void this.postRenderCamera(tt);this.currentType="";for(var lt=this.currentMask,q=0;q{var y=a(83419),C=a(95428),g=a(95540),f=a(14500),d=new y({initialize:function(h,p,u,m,v){this.pipeline=h,this.name=p,this.renderer=h.renderer,this.gl=this.renderer.gl,this.fragSrc=m,this.vertSrc=u,this.program=this.renderer.createProgram(u,m),this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(v),this.createUniforms()},createAttributes:function(c){var h=0,p=0,u=[];this.vertexComponentCount=0;for(var m=0;m=0?(h.enableVertexAttribArray(F.webGLAttribLocation),h.vertexAttribPointer(F.webGLAttribLocation,T,_,R,u,A),b.enabled=!0,b.location=F):-1!==F.webGLAttribLocation&&h.disableVertexAttribArray(F.webGLAttribLocation)}else M?h.vertexAttribPointer(I.webGLAttribLocation,T,_,R,u,A):!M&&-1!==I&&I.webGLAttribLocation>-1&&(h.disableVertexAttribArray(I.webGLAttribLocation),b.location=-1)}return this},createUniforms:function(){var u,m,v,c=this.gl,h=this.program,p=this.uniforms,x=c.getProgramParameter(h.webGLProgram,c.ACTIVE_UNIFORMS);for(u=0;u0&&(m=m.substr(0,T),p.hasOwnProperty(m)||null!==(v=this.renderer.createUniformLocation(h,m))&&(p[m]={name:m,location:v,setter:null,value1:null,value2:null,value3:null,value4:null}))}}return this},syncUniforms:function(){var c=this.gl;for(var h in this.renderer.setProgram(this.program),this.uniforms){var p=this.uniforms[h];p.setter&&p.setter.call(c,p.location.webGLUniformLocation,p.value1,p.value2,p.value3,p.value4)}},hasUniform:function(c){return this.uniforms.hasOwnProperty(c)},resetUniform:function(c){var h=this.uniforms[c];return h&&(h.value1=null,h.value2=null,h.value3=null,h.value4=null),this},setUniform1:function(c,h,p,u){var m=this.uniforms[h];return m?((u||m.value1!==p)&&(m.setter||(m.setter=c),m.value1=p,this.renderer.setProgram(this.program),c.call(this.gl,m.location.webGLUniformLocation,p),this.pipeline.currentShader=this),this):this},setUniform2:function(c,h,p,u,m){var v=this.uniforms[h];return v?((m||v.value1!==p||v.value2!==u)&&(v.setter||(v.setter=c),v.value1=p,v.value2=u,this.renderer.setProgram(this.program),c.call(this.gl,v.location.webGLUniformLocation,p,u),this.pipeline.currentShader=this),this):this},setUniform3:function(c,h,p,u,m,v){var x=this.uniforms[h];return x?((v||x.value1!==p||x.value2!==u||x.value3!==m)&&(x.setter||(x.setter=c),x.value1=p,x.value2=u,x.value3=m,this.renderer.setProgram(this.program),c.call(this.gl,x.location.webGLUniformLocation,p,u,m),this.pipeline.currentShader=this),this):this},setUniform4:function(c,h,p,u,m,v,x){var b=this.uniforms[h];return b?((x||b.value1!==p||b.value2!==u||b.value3!==m||b.value4!==v)&&(b.setter||(b.setter=c),b.value1=p,b.value2=u,b.value3=m,b.value4=v,this.renderer.setProgram(this.program),c.call(this.gl,b.location.webGLUniformLocation,p,u,m,v),this.pipeline.currentShader=this),this):this},setBoolean:function(c,h){return this.setUniform1(this.gl.uniform1i,c,Number(h))},set1f:function(c,h){return this.setUniform1(this.gl.uniform1f,c,h)},set2f:function(c,h,p){return this.setUniform2(this.gl.uniform2f,c,h,p)},set3f:function(c,h,p,u){return this.setUniform3(this.gl.uniform3f,c,h,p,u)},set4f:function(c,h,p,u,m){return this.setUniform4(this.gl.uniform4f,c,h,p,u,m)},set1fv:function(c,h){return this.setUniform1(this.gl.uniform1fv,c,h,!0)},set2fv:function(c,h){return this.setUniform1(this.gl.uniform2fv,c,h,!0)},set3fv:function(c,h){return this.setUniform1(this.gl.uniform3fv,c,h,!0)},set4fv:function(c,h){return this.setUniform1(this.gl.uniform4fv,c,h,!0)},set1iv:function(c,h){return this.setUniform1(this.gl.uniform1iv,c,h,!0)},set2iv:function(c,h){return this.setUniform1(this.gl.uniform2iv,c,h,!0)},set3iv:function(c,h){return this.setUniform1(this.gl.uniform3iv,c,h,!0)},set4iv:function(c,h){return this.setUniform1(this.gl.uniform4iv,c,h,!0)},set1i:function(c,h){return this.setUniform1(this.gl.uniform1i,c,h)},set2i:function(c,h,p){return this.setUniform2(this.gl.uniform2i,c,h,p)},set3i:function(c,h,p,u){return this.setUniform3(this.gl.uniform3i,c,h,p,u)},set4i:function(c,h,p,u,m){return this.setUniform4(this.gl.uniform4i,c,h,p,u,m)},setMatrix2fv:function(c,h,p){return this.setUniform2(this.gl.uniformMatrix2fv,c,h,p,!0)},setMatrix3fv:function(c,h,p){return this.setUniform2(this.gl.uniformMatrix3fv,c,h,p,!0)},setMatrix4fv:function(c,h,p){return this.setUniform2(this.gl.uniformMatrix4fv,c,h,p,!0)},createProgram:function(c,h){return void 0===c&&(c=this.vertSrc),void 0===h&&(h=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=c,this.fragSrc=h,this.program=this.renderer.createProgram(c,h),this.createUniforms(),this.rebind()},destroy:function(){var c=this.renderer;C(this.uniforms,function(h){c.deleteUniformLocation(h.location)}),this.uniforms=null,C(this.attributes,function(h){c.deleteAttribLocation(h.location)}),this.attributes=null,c.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});S.exports=d},14500:S=>{S.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},4159:(S,P,a)=>{var y=a(14500),C=a(79291),g={PipelineManager:a(7530),Pipelines:a(96615),RenderTarget:a(32302),Utils:a(70554),WebGLPipeline:a(29100),WebGLRenderer:a(74797),WebGLShader:a(38683),Wrappers:a(9503)};g=C(!1,g,y),S.exports=g},31302:(S,P,a)=>{var y=a(83419),C=a(95540),g=a(78908),f=a(85191),d=a(14500),c=a(29100),h=new y({Extends:c,initialize:function(u){u.fragShader=C(u,"fragShader",g),u.vertShader=C(u,"vertShader",f),u.batchSize=C(u,"batchSize",1),u.vertices=C(u,"vertices",[-1,1,-1,-7,7,1]),u.attributes=C(u,"attributes",[{name:"inPosition",size:2,type:d.FLOAT}]),c.call(this,u)},boot:function(){c.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(p,u){c.prototype.resize.call(this,p,u),this.set2f("uResolution",p,u)},beginMask:function(p,u,m){this.renderer.beginBitmapMask(p,m)},endMask:function(p,u,m){var v=this.gl,b=p.bitmapMask;b&&v&&(this.renderer.drawBitmapMask(b,u,this),m&&this.set2f("uResolution",m.width,m.height),this.set1i("uInvertMaskAlpha",p.invertAlpha),v.drawArrays(this.topology,0,3),m&&this.set2f("uResolution",this.width,this.height),v.bindTexture(v.TEXTURE_2D,null))}});S.exports=h},92651:(S,P,a)=>{var y=a(83419),C=a(58918),g=a(14811),f=a(95540),d=a(43558),c=a(89350),h=a(70554),p=new y({Extends:d,initialize:function(m){m.shaders=[h.setGlowQuality(c.FXGlowFrag,m.game),c.FXShadowFrag,c.FXPixelateFrag,c.FXVignetteFrag,c.FXShineFrag,c.FXBlurLowFrag,c.FXBlurMedFrag,c.FXBlurHighFrag,c.FXGradientFrag,c.FXBloomFrag,c.ColorMatrixFrag,c.FXCircleFrag,c.FXBarrelFrag,c.FXDisplacementFrag,c.FXWipeFrag,c.FXBokehFrag],d.call(this,m);var v=this.game;this.glow=new C.Glow(v),this.shadow=new C.Shadow(v),this.pixelate=new C.Pixelate(v),this.vignette=new C.Vignette(v),this.shine=new C.Shine(v),this.gradient=new C.Gradient(v),this.circle=new C.Circle(v),this.barrel=new C.Barrel(v),this.wipe=new C.Wipe(v),this.bokeh=new C.Bokeh(v);var x=[];x[g.GLOW]=this.onGlow,x[g.SHADOW]=this.onShadow,x[g.PIXELATE]=this.onPixelate,x[g.VIGNETTE]=this.onVignette,x[g.SHINE]=this.onShine,x[g.BLUR]=this.onBlur,x[g.GRADIENT]=this.onGradient,x[g.BLOOM]=this.onBloom,x[g.COLOR_MATRIX]=this.onColorMatrix,x[g.CIRCLE]=this.onCircle,x[g.BARREL]=this.onBarrel,x[g.DISPLACEMENT]=this.onDisplacement,x[g.WIPE]=this.onWipe,x[g.BOKEH]=this.onBokeh,this.fxHandlers=x},onDraw:function(u,m,v){this.source=u,this.target=m,this.swap=v;var x=u.width,b=u.height,T=this.tempSprite,_=this.fxHandlers;if(T&&T.preFX)for(var A=T.preFX.list,M=0;M{var y=a(83419),C=a(95540),g=a(31063),f=a(57516),d=a(61340),c=a(26099),h=a(29100),p=new y({Extends:f,initialize:function(m){var v=C(m,"fragShader",g);m.fragShader=v.replace("%LIGHT_COUNT%",m.game.renderer.config.maxLights),f.call(this,m),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.lightsActive=!0,this.tempVec2=new c,this._tempMatrix=new d,this._tempMatrix2=new d},boot:function(){h.prototype.boot.call(this)},onRender:function(u,m){var v=u.sys.lights;if(this.lightsActive=!1,v&&v.active){var x=v.getLights(m),b=x.length;this.lightsActive=!0;var T,A=this.renderer.height,M=m.matrix,I=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",m.x,m.y,m.rotation,m.zoom),this.set3f("uAmbientLightColor",v.ambientColor.r,v.ambientColor.g,v.ambientColor.b),this.set1i("uLightCount",b),T=0;T0&&this.flush();var m=this.inverseRotationMatrix;if(u){var v=-u,x=Math.cos(v),b=Math.sin(v);m[1]=b,m[3]=-b,m[0]=m[4]=x}else m[0]=m[4]=1,m[1]=m[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,m),this.currentNormalMapRotation=u}},setTexture2D:function(u,m){void 0===u&&(u=this.renderer.whiteTexture);var x=this.getNormalMap(m);this.isNewNormalMap(u,x)&&(this.flush(),this.createBatch(u),this.addTextureToBatch(x),this.currentNormalMap=x);var b=0;return m&&m.parentContainer?b=m.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:m&&(b=m.rotation),null===this.currentBatch&&(this.createBatch(u),this.addTextureToBatch(x)),this.setNormalMapRotation(b),0},setGameObject:function(u,m){void 0===m&&(m=u.frame);var v=m.glTexture,x=this.getNormalMap(u);if(this.isNewNormalMap(v,x)&&(this.flush(),this.createBatch(v),this.addTextureToBatch(x),this.currentNormalMap=x),u.parentContainer){var b=u.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(b.rotationNormalized)}else this.setNormalMapRotation(u.rotation);return null===this.currentBatch&&(this.createBatch(v),this.addTextureToBatch(x)),0},isNewNormalMap:function(u,m){return this.currentTexture!==u||this.currentNormalMap!==m},getNormalMap:function(u){var m;return u?(u.displayTexture?m=u.displayTexture.dataSource[u.displayFrame.sourceIndex]:u.texture?m=u.texture.dataSource[u.frame.sourceIndex]:u.tileset&&(m=Array.isArray(u.tileset)?u.tileset[0].image.dataSource[0]:u.tileset.image.dataSource[0]),m?m.glTexture:this.renderer.normalTexture):this.renderer.normalTexture},batchSprite:function(u,m,v){this.lightsActive&&f.prototype.batchSprite.call(this,u,m,v)},batchTexture:function(u,m,v,x,b,T,_,A,M,I,R,F,N,V,B,G,Q,H,K,tt,at,lt,q,it,Y,X,nt,dt,gt,bt,Et,Bt){this.lightsActive&&f.prototype.batchTexture.call(this,u,m,v,x,b,T,_,A,M,I,R,F,N,V,B,G,Q,H,K,tt,at,lt,q,it,Y,X,nt,dt,gt,bt,Et,Bt)},batchTextureFrame:function(u,m,v,x,b,T,_){this.lightsActive&&f.prototype.batchTextureFrame.call(this,u,m,v,x,b,T,_)}});S.exports=p},56527:(S,P,a)=>{var y=a(83419),C=a(95540),g=a(57516),f=a(45561),d=a(60722),c=a(14500),h=a(29100),p=new y({Extends:g,initialize:function(m){m.fragShader=C(m,"fragShader",f),m.vertShader=C(m,"vertShader",d),m.attributes=C(m,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:c.UNSIGNED_BYTE,normalized:!0}]),m.forceZero=!0,m.resizeUniform="uResolution",g.call(this,m)},boot:function(){h.prototype.boot.call(this);var u=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",u.width,u.height)}});S.exports=p},57516:(S,P,a)=>{var y=a(83419),C=a(94811),g=a(95540),f=a(98840),d=a(44667),c=a(61340),h=a(70554),p=a(14500),u=a(29100),m=new y({Extends:u,initialize:function(x){var b=x.game.renderer,T=g(x,"fragShader",f);x.fragShader=h.parseFragmentShaderMaxTextures(T,b.maxTextures),x.vertShader=g(x,"vertShader",d),x.attributes=g(x,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:p.UNSIGNED_BYTE,normalized:!0}]),x.resizeUniform="uResolution",u.call(this,x),this._tempMatrix1=new c,this._tempMatrix2=new c,this._tempMatrix3=new c,this.calcMatrix=new c,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){u.prototype.boot.call(this);var v=this.renderer;this.set1iv("uMainSampler",v.textureIndexes),this.set2f("uResolution",v.width,v.height)},batchSprite:function(v,x,b){this.manager.set(this,v);var T=this._tempMatrix1,_=this._tempMatrix2,A=this._tempMatrix3,M=v.frame,I=M.glTexture,R=M.u0,F=M.v0,N=M.u1,V=M.v1,B=M.x,G=M.y,Q=M.cutWidth,H=M.cutHeight,K=M.customPivot,tt=v.displayOriginX,at=v.displayOriginY,lt=-tt+B,q=-at+G;if(v.isCropped){var it=v._crop;(it.flipX!==v.flipX||it.flipY!==v.flipY)&&M.updateCropUVs(it,v.flipX,v.flipY),R=it.u0,F=it.v0,N=it.u1,V=it.v1,Q=it.width,H=it.height,lt=-tt+(B=it.x),q=-at+(G=it.y)}var Y=1,X=1;v.flipX&&(K||(lt+=2*tt-M.realWidth),Y=-1),v.flipY&&(K||(q+=2*at-M.realHeight),X=-1);var nt=v.x,dt=v.y;x.roundPixels&&(nt=Math.floor(nt),dt=Math.floor(dt)),_.applyITRS(nt,dt,v.rotation,v.scaleX*Y,v.scaleY*X),T.copyFrom(x.matrix),b?(T.multiplyWithOffset(b,-x.scrollX*v.scrollFactorX,-x.scrollY*v.scrollFactorY),_.e=nt,_.f=dt):(_.e-=x.scrollX*v.scrollFactorX,_.f-=x.scrollY*v.scrollFactorY),T.multiply(_,A);var gt=A.setQuad(lt,q,lt+Q,q+H,x.renderRoundPixels),bt=h.getTintAppendFloatAlpha,Et=x.alpha,Bt=bt(v.tintTopLeft,Et*v._alphaTL),Kt=bt(v.tintTopRight,Et*v._alphaTR),Zt=bt(v.tintBottomLeft,Et*v._alphaBL),ne=bt(v.tintBottomRight,Et*v._alphaBR);this.shouldFlush(6)&&this.flush();var ae=this.setGameObject(v,M);this.manager.preBatch(v),this.batchQuad(v,gt[0],gt[1],gt[2],gt[3],gt[4],gt[5],gt[6],gt[7],R,F,N,V,Bt,Kt,Zt,ne,v.tintFill,I,ae),this.manager.postBatch(v)},batchTexture:function(v,x,b,T,_,A,M,I,R,F,N,V,B,G,Q,H,K,tt,at,lt,q,it,Y,X,nt,dt,gt,bt,Et,Bt,Kt,Zt,ne){void 0===ne&&(ne=!1),this.manager.set(this,v);var ae=this._tempMatrix1,fe=this._tempMatrix2,ke=this._tempMatrix3,Ye=tt/b+gt,Pe=at/T+bt,Qe=(tt+lt)/b+gt,Se=(at+q)/T+bt,ei=M,ri=I,Bi=-H,tn=-K;if(v.isCropped){var on=v._crop,ln=on.width,hn=on.height;ei=ln,ri=hn,M=ln,I=hn;var Mr=tt=on.x,Ur=at=on.y;V&&(Mr=lt-on.x-ln),B&&(Ur=q-on.y-hn),Ye=Mr/b+gt,Pe=Ur/T+bt,Qe=(Mr+ln)/b+gt,Se=(Ur+hn)/T+bt,Bi=-H+tt,tn=-K+at}V&&(ei*=-1,Bi+=M),(B^=!Kt&&x.isRenderTexture?1:0)&&(ri*=-1,tn+=I),Et.roundPixels&&(_=Math.floor(_),A=Math.floor(A)),fe.applyITRS(_,A,N,R,F),ae.copyFrom(Et.matrix),Bt?(ae.multiplyWithOffset(Bt,-Et.scrollX*G,-Et.scrollY*Q),fe.e=_,fe.f=A):(fe.e-=Et.scrollX*G,fe.f-=Et.scrollY*Q),ae.multiply(fe,ke);var dn=ke.setQuad(Bi,tn,Bi+ei,tn+ri,Et.renderRoundPixels);null==Zt&&(Zt=this.setTexture2D(x)),v&&!ne&&this.manager.preBatch(v),this.batchQuad(v,dn[0],dn[1],dn[2],dn[3],dn[4],dn[5],dn[6],dn[7],Ye,Pe,Qe,Se,it,Y,X,nt,dt,x,Zt),v&&!ne&&this.manager.postBatch(v)},batchTextureFrame:function(v,x,b,T,_,A,M){this.manager.set(this);var I=this._tempMatrix1.copyFrom(A),R=this._tempMatrix2;M?I.multiply(M,R):R=I;var F=R.setQuad(x,b,x+v.width,b+v.height),N=this.setTexture2D(v.source.glTexture);T=h.getTintAppendFloatAlpha(T,_),this.batchQuad(null,F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],v.u0,v.v0,v.u1,v.v1,T,T,T,T,0,v.glTexture,N)},batchFillRect:function(v,x,b,T,_,A){this.renderer.pipelines.set(this);var M=this.calcMatrix;A&&A.multiply(_,M);var I=M.setQuad(v,x,v+b,x+T),R=this.fillTint;this.batchQuad(null,I[0],I[1],I[2],I[3],I[4],I[5],I[6],I[7],0,0,1,1,R.TL,R.TR,R.BL,R.BR,2)},batchFillTriangle:function(v,x,b,T,_,A,M,I){this.renderer.pipelines.set(this);var R=this.calcMatrix;I&&I.multiply(M,R);var F=R.getX(v,x),N=R.getY(v,x),V=R.getX(b,T),B=R.getY(b,T),G=R.getX(_,A),Q=R.getY(_,A),H=this.fillTint;this.batchTri(null,F,N,V,B,G,Q,0,0,1,1,H.TL,H.TR,H.BL,2)},batchStrokeTriangle:function(v,x,b,T,_,A,M,I,R){var F=this.tempTriangle;F[0].x=v,F[0].y=x,F[0].width=M,F[1].x=b,F[1].y=T,F[1].width=M,F[2].x=_,F[2].y=A,F[2].width=M,F[3].x=v,F[3].y=x,F[3].width=M,this.batchStrokePath(F,M,!1,I,R)},batchFillPath:function(v,x,b){this.renderer.pipelines.set(this);var T=this.calcMatrix;b&&b.multiply(x,T);for(var M,I,_=v.length,A=this.polygonCache,R=this.fillTint.TL,F=this.fillTint.TR,N=this.fillTint.BL,V=0;V<_;++V)A.push((I=v[V]).x,I.y);_=(M=C(A)).length;for(var B=0;B<_;B+=3){var G=2*M[B+0],Q=2*M[B+1],H=2*M[B+2],K=A[G+0],tt=A[G+1],at=A[Q+0],lt=A[Q+1],q=A[H+0],it=A[H+1],Y=T.getX(K,tt),X=T.getY(K,tt),nt=T.getX(at,lt),dt=T.getY(at,lt),gt=T.getX(q,it),bt=T.getY(q,it);this.batchTri(null,Y,X,nt,dt,gt,bt,0,0,1,1,R,F,N,2)}A.length=0},batchStrokePath:function(v,x,b,T,_){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var A=v.length-1,M=0;M0&&ei[4]?this.batchQuad(null,ae,fe,Bt,Kt,ei[0],ei[1],ei[2],ei[3],0,0,1,1,Ye,Pe,Qe,Se,2):(ri[0]=ae,ri[1]=fe,ri[2]=Bt,ri[3]=Kt,ri[4]=1),R&&ri[4]?this.batchQuad(null,bt,Et,Zt,ne,ri[0],ri[1],ri[2],ri[3],0,0,1,1,Ye,Pe,Qe,Se,2):(ei[0]=bt,ei[1]=Et,ei[2]=Zt,ei[3]=ne,ei[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,u.prototype.destroy.call(this),this}});S.exports=m},43439:(S,P,a)=>{var y=a(83419),C=a(95540),g=a(4127),f=a(89924),d=a(29100),c=new y({Extends:d,initialize:function(p){p.vertShader=C(p,"vertShader",f),p.fragShader=C(p,"fragShader",g),p.attributes=C(p,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),d.call(this,p)},onRender:function(h,p){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",p.zoom)},batchPointLight:function(h,p,u,m,v,x,b,T,_,A,M,I){var R=h.color,F=h.intensity,N=h.radius,V=h.attenuation,B=R.r*F,G=R.g*F,Q=R.b*F,H=p.alpha*h.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(u,m,M,I,N,V,B,G,Q,H),this.batchLightVert(v,x,M,I,N,V,B,G,Q,H),this.batchLightVert(b,T,M,I,N,V,B,G,Q,H),this.batchLightVert(u,m,M,I,N,V,B,G,Q,H),this.batchLightVert(b,T,M,I,N,V,B,G,Q,H),this.batchLightVert(_,A,M,I,N,V,B,G,Q,H),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(h,p,u,m,v,x,b,T,_,A){var M=this.vertexViewF32,I=this.vertexCount*this.currentShader.vertexComponentCount-1;M[++I]=h,M[++I]=p,M[++I]=u,M[++I]=m,M[++I]=v,M[++I]=x,M[++I]=b,M[++I]=T,M[++I]=_,M[++I]=A,this.vertexCount++}});S.exports=c},84057:(S,P,a)=>{var y=a(83419),C=a(89422),g=a(95540),f=a(27681),d=a(49627),c=a(29100),h=new y({Extends:c,initialize:function(u){u.renderTarget=g(u,"renderTarget",1),u.fragShader=g(u,"fragShader",f),u.vertShader=g(u,"vertShader",d),u.attributes=g(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),u.batchSize=1,u.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],c.call(this,u),this.isPostFX=!0,this.colorMatrix=new C,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){c.prototype.boot.call(this);var p=this.manager.UTILITY_PIPELINE;this.fullFrame1=p.fullFrame1,this.fullFrame2=p.fullFrame2,this.halfFrame1=p.halfFrame1,this.halfFrame2=p.halfFrame2;var u=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",u.width,u.height);for(var m=this.renderTargets,v=0;v{var y=a(10312),C=a(67502),g=a(83419),f=a(96293),d=a(95540),c=a(57516),h=a(27681),p=a(87841),u=a(32302),m=a(45561),v=a(60722),x=a(29100),b=new g({Extends:c,initialize:function(_){var A=d(_,"fragShader",h),M=d(_,"vertShader",v),I=d(_,"drawShader",h),R=[{name:"DrawSprite",fragShader:m,vertShader:v},{name:"CopySprite",fragShader:A,vertShader:M},{name:"DrawGame",fragShader:I,vertShader:v},{name:"ColorMatrix",fragShader:f}],F=d(_,"shaders",[]);_.shaders=R.concat(F),_.vertShader||(_.vertShader=M),_.batchSize=1,c.call(this,_),this.isPreFX=!0,this.customMainSampler=null,this.spriteBounds=new p,this.targetBounds=new p,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){x.prototype.boot.call(this);var T=this.shaders,_=this.renderer;this.drawSpriteShader=T[0],this.copyShader=T[1],this.gameShader=T[2],this.colorMatrixShader=T[3],this.fsTarget=new u(_,_.width,_.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var A=new ArrayBuffer(168);this.quadVertexData=A,this.quadVertexViewF32=new Float32Array(A),this.quadVertexBuffer=_.createVertexBuffer(A,this.gl.STATIC_DRAW),this.onResize(_.width,_.height),this.currentShader=this.copyShader,this.set2f("uResolution",_.width,_.height)},onResize:function(T,_){var A=this.quadVertexViewF32;A[1]=_,A[22]=_,A[14]=T,A[28]=T,A[35]=T,A[36]=_},batchQuad:function(T,_,A,M,I,R,F,N,V,B,G,Q,H,K,tt,at,lt,q,it){var Y=Math.min(_,M,R,N),X=Math.min(A,I,F,V),gt=Math.max(_,M,R,N)-Y,bt=Math.max(A,I,F,V)-X,Et=this.spriteBounds.setTo(Y,X,gt,bt),Bt=T?T.preFX.padding:0,ne=Math.abs(Math.max(gt+2*Bt,bt+2*Bt)),ae=this.manager.getRenderTarget(ne),fe=this.targetBounds.setTo(0,0,ae.width,ae.height);C(fe,Math.round(Et.centerX),Math.round(Et.centerY)),this.tempSprite=T;var ke=this.gl,Ye=this.renderer;Ye.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",Ye.width,Ye.height),this.flipProjectionMatrix(!0),T&&(this.onDrawSprite(T,ae),T.preFX.onFX(this));var Pe=this.fsTarget;return this.flush(),ke.viewport(0,0,Ye.width,Ye.height),ke.bindFramebuffer(ke.FRAMEBUFFER,Pe.framebuffer.webGLFramebuffer),ke.framebufferTexture2D(ke.FRAMEBUFFER,ke.COLOR_ATTACHMENT0,ke.TEXTURE_2D,Pe.texture.webGLTexture,0),ke.clearColor(0,0,0,0),ke.clear(ke.COLOR_BUFFER_BIT),this.setTexture2D(it),this.batchVert(_,A,B,G,0,q,K),this.batchVert(M,I,B,H,0,q,at),this.batchVert(R,F,Q,H,0,q,lt),this.batchVert(_,A,B,G,0,q,K),this.batchVert(R,F,Q,H,0,q,lt),this.batchVert(N,V,Q,G,0,q,tt),this.flush(),this.flipProjectionMatrix(!1),ke.activeTexture(ke.TEXTURE0),ke.bindTexture(ke.TEXTURE_2D,ae.texture.webGLTexture),ke.copyTexSubImage2D(ke.TEXTURE_2D,0,0,0,fe.x,fe.y,fe.width,fe.height),ke.bindFramebuffer(ke.FRAMEBUFFER,null),ke.bindTexture(ke.TEXTURE_2D,null),this.onBatch(T),this.currentShader=this.copyShader,this.onDraw(ae,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(T,_,A,M,I,R,F){void 0===A&&(A=!0),void 0===M&&(M=!0),void 0===I&&(I=!1),void 0===F&&(F=this.copyShader);var N=this.gl,V=this.tempSprite;R&&(F=this.colorMatrixShader),this.currentShader=F;var B=this.setVertexBuffer(this.quadVertexBuffer);F.bind(B,!1);var G=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",G.width,G.height),V.preFX.onFXCopy(this),this.onCopySprite(T,_,V),R&&(this.set1fv("uColorMatrix",R.getData()),this.set1f("uAlpha",R.alpha)),N.activeTexture(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,T.texture.webGLTexture),T.height>_.height?(N.viewport(0,0,T.width,T.height),this.setTargetUVs(T,_)):(N.viewport(0,_.height-T.height,T.width,T.height),this.resetUVs()),N.bindFramebuffer(N.FRAMEBUFFER,_.framebuffer.webGLFramebuffer),N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,_.texture.webGLTexture,0),A&&(N.clearColor(0,0,0,+!M),N.clear(N.COLOR_BUFFER_BIT)),I){var H=this.renderer.currentBlendMode;this.renderer.setBlendMode(y.ERASE)}N.bufferData(N.ARRAY_BUFFER,this.quadVertexData,N.STATIC_DRAW),N.drawArrays(N.TRIANGLES,0,6),I&&this.renderer.setBlendMode(H),N.bindFramebuffer(N.FRAMEBUFFER,null)},copy:function(T,_){var A=this.gl;this.set1i("uMainSampler",0),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,T.texture.webGLTexture),A.viewport(0,0,T.width,T.height),this.setUVs(0,0,0,1,1,1,1,0),A.bindFramebuffer(A.FRAMEBUFFER,_.framebuffer.webGLFramebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,_.texture.webGLTexture,0),A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),A.bufferData(A.ARRAY_BUFFER,this.quadVertexData,A.STATIC_DRAW),A.drawArrays(A.TRIANGLES,0,6),A.bindFramebuffer(A.FRAMEBUFFER,null)},blendFrames:function(T,_,A,M,I){this.manager.blendFrames(T,_,A,M,I)},blendFramesAdditive:function(T,_,A,M,I){this.manager.blendFramesAdditive(T,_,A,M,I)},drawToGame:function(T){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(T)},copyToGame:function(T){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(T)},bindAndDraw:function(T){var _=this.gl,A=this.renderer;this.set1i("uMainSampler",0),this.setTexture2D(this.customMainSampler?this.customMainSampler:T.texture);var M=this._tempMatrix1.loadIdentity(),I=this.targetBounds.x,R=this.targetBounds.y,F=I+T.width,N=R+T.height,V=M.getX(I,R),B=M.getX(I,N),G=M.getX(F,N),Q=M.getX(F,R),H=M.getY(I,R),K=M.getY(I,N),tt=M.getY(F,N),at=M.getY(F,R),lt=16777215;this.batchVert(V,H,0,0,0,0,lt),this.batchVert(B,K,0,1,0,0,lt),this.batchVert(G,tt,1,1,0,0,lt),this.batchVert(V,H,0,0,0,0,lt),this.batchVert(G,tt,1,1,0,0,lt),this.batchVert(Q,at,1,0,0,0,lt),A.restoreFramebuffer(!1,!0),A.currentFramebuffer||_.viewport(0,0,A.width,A.height),A.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(T){this.drawToGame(T)},setUVs:function(T,_,A,M,I,R,F,N){var V=this.quadVertexViewF32;V[2]=T,V[3]=_,V[9]=A,V[10]=M,V[16]=I,V[17]=R,V[23]=T,V[24]=_,V[30]=I,V[31]=R,V[37]=F,V[38]=N},setTargetUVs:function(T,_){var A=_.height/T.height;this.setUVs(0,A=A>.5?.5-(A-.5):.5-A+.5,0,1+A,1,1+A,1,A)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,c.prototype.destroy.call(this),this}});S.exports=b},81041:(S,P,a)=>{var y=a(83419),C=a(95540),g=a(57516),f=new y({Extends:g,initialize:function(c){c.topology=5,c.batchSize=C(c,"batchSize",256),g.call(this,c)}});S.exports=f},12385:(S,P,a)=>{var y=a(83419),C=a(95540),g=a(57516),f=a(45561),d=a(60722),c=a(29100),h=new y({Extends:g,initialize:function(u){u.fragShader=C(u,"fragShader",f),u.vertShader=C(u,"vertShader",d),u.forceZero=!0,g.call(this,u)},boot:function(){c.prototype.boot.call(this);var p=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",p.width,p.height)}});S.exports=h},7589:(S,P,a)=>{var y=a(35407),C=a(10312),g=a(83419),f=a(89422),d=a(96293),c=a(36682),h=a(95540),p=a(48247),u=a(49627),m=a(29100),v=new g({Extends:m,initialize:function(b){b.renderTarget=h(b,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),b.vertShader=h(b,"vertShader",u),b.shaders=h(b,"shaders",[{name:"Copy",fragShader:c},{name:"AddBlend",fragShader:y},{name:"LinearBlend",fragShader:p},{name:"ColorMatrix",fragShader:d}]),b.attributes=h(b,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),b.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],b.batchSize=1,m.call(this,b),this.colorMatrix=new f},boot:function(){m.prototype.boot.call(this);var x=this.shaders,b=this.renderTargets;this.copyShader=x[0],this.addShader=x[1],this.linearShader=x[2],this.colorMatrixShader=x[3],this.fullFrame1=b[0],this.fullFrame2=b[1],this.halfFrame1=b[2],this.halfFrame2=b[3]},copyFrame:function(x,b,T,_,A){void 0===T&&(T=1),void 0===_&&(_=!0),void 0===A&&(A=!0);var M=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",T),M.activeTexture(M.TEXTURE0),M.bindTexture(M.TEXTURE_2D,x.texture.webGLTexture),b?(M.viewport(0,0,b.width,b.height),M.bindFramebuffer(M.FRAMEBUFFER,b.framebuffer.webGLFramebuffer),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,b.texture.webGLTexture,0)):M.viewport(0,0,x.width,x.height),_&&(M.clearColor(0,0,0,A?0:1),M.clear(M.COLOR_BUFFER_BIT)),M.bufferData(M.ARRAY_BUFFER,this.vertexData,M.STATIC_DRAW),M.drawArrays(M.TRIANGLES,0,6),M.bindFramebuffer(M.FRAMEBUFFER,null),M.bindTexture(M.TEXTURE_2D,null)},blitFrame:function(x,b,T,_,A,M,I){void 0===T&&(T=1),void 0===_&&(_=!0),void 0===A&&(A=!0),void 0===M&&(M=!1),void 0===I&&(I=!1);var R=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",T),R.activeTexture(R.TEXTURE0),R.bindTexture(R.TEXTURE_2D,x.texture.webGLTexture),x.height>b.height?(R.viewport(0,0,x.width,x.height),this.setTargetUVs(x,b)):R.viewport(0,b.height-x.height,x.width,x.height),R.bindFramebuffer(R.FRAMEBUFFER,b.framebuffer.webGLFramebuffer),R.framebufferTexture2D(R.FRAMEBUFFER,R.COLOR_ATTACHMENT0,R.TEXTURE_2D,b.texture.webGLTexture,0),_&&(R.clearColor(0,0,0,A?0:1),R.clear(R.COLOR_BUFFER_BIT)),M){var N=this.renderer.currentBlendMode;this.renderer.setBlendMode(C.ERASE)}I&&this.flipY(),R.bufferData(R.ARRAY_BUFFER,this.vertexData,R.STATIC_DRAW),R.drawArrays(R.TRIANGLES,0,6),M&&this.renderer.setBlendMode(N),R.bindFramebuffer(R.FRAMEBUFFER,null),R.bindTexture(R.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(x,b,T,_,A,M,I,R){void 0===I&&(I=!0),void 0===R&&(R=!0);var F=this.gl;F.bindFramebuffer(F.FRAMEBUFFER,x.framebuffer.webGLFramebuffer),F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_2D,x.texture.webGLTexture,0),I&&(F.clearColor(0,0,0,R?0:1),F.clear(F.COLOR_BUFFER_BIT)),F.activeTexture(F.TEXTURE0),F.bindTexture(F.TEXTURE_2D,b.texture.webGLTexture),F.copyTexSubImage2D(F.TEXTURE_2D,0,0,0,T,_,A,M),F.bindFramebuffer(F.FRAMEBUFFER,null),F.bindTexture(F.TEXTURE_2D,null)},copyToGame:function(x){var b=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,x.texture.webGLTexture),b.bufferData(b.ARRAY_BUFFER,this.vertexData,b.STATIC_DRAW),b.drawArrays(b.TRIANGLES,0,6)},drawFrame:function(x,b,T,_){void 0===T&&(T=!0),void 0===_&&(_=this.colorMatrix);var A=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",_.getData()),this.set1f("uAlpha",_.alpha),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,x.texture.webGLTexture),b?(A.viewport(0,0,b.width,b.height),A.bindFramebuffer(A.FRAMEBUFFER,b.framebuffer.webGLFramebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,b.texture.webGLTexture,0)):A.viewport(0,0,x.width,x.height),A.clearColor(0,0,0,T?0:1),A.clear(A.COLOR_BUFFER_BIT),A.bufferData(A.ARRAY_BUFFER,this.vertexData,A.STATIC_DRAW),A.drawArrays(A.TRIANGLES,0,6),A.bindFramebuffer(A.FRAMEBUFFER,null),A.bindTexture(A.TEXTURE_2D,null)},blendFrames:function(x,b,T,_,A,M){void 0===_&&(_=1),void 0===A&&(A=!0),void 0===M&&(M=this.linearShader);var I=this.gl;this.setShader(M),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",_),I.activeTexture(I.TEXTURE0),I.bindTexture(I.TEXTURE_2D,x.texture.webGLTexture),I.activeTexture(I.TEXTURE1),I.bindTexture(I.TEXTURE_2D,b.texture.webGLTexture),T?(I.bindFramebuffer(I.FRAMEBUFFER,T.framebuffer.webGLFramebuffer),I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,T.texture.webGLTexture,0),I.viewport(0,0,T.width,T.height)):I.viewport(0,0,x.width,x.height),I.clearColor(0,0,0,A?0:1),I.clear(I.COLOR_BUFFER_BIT),I.bufferData(I.ARRAY_BUFFER,this.vertexData,I.STATIC_DRAW),I.drawArrays(I.TRIANGLES,0,6),I.bindFramebuffer(I.FRAMEBUFFER,null),I.bindTexture(I.TEXTURE_2D,null)},blendFramesAdditive:function(x,b,T,_,A){this.blendFrames(x,b,T,_,A,this.addShader)},clearFrame:function(x,b){void 0===b&&(b=!0);var T=this.gl;T.viewport(0,0,x.width,x.height),T.bindFramebuffer(T.FRAMEBUFFER,x.framebuffer.webGLFramebuffer),T.clearColor(0,0,0,b?0:1),T.clear(T.COLOR_BUFFER_BIT),T.bindFramebuffer(T.FRAMEBUFFER,this.renderer.currentFramebuffer.webGLFramebuffer)},setUVs:function(x,b,T,_,A,M,I,R){var F=this.vertexViewF32;F[2]=x,F[3]=b,F[6]=T,F[7]=_,F[10]=A,F[11]=M,F[14]=x,F[15]=b,F[18]=A,F[19]=M,F[22]=I,F[23]=R},setTargetUVs:function(x,b){var T=b.height/x.height;this.setUVs(0,T=T>.5?.5-(T-.5):.5-T+.5,0,1+T,1,1+T,1,T)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});S.exports=v},36060:S=>{S.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"}},84817:S=>{S.exports="pipelineafterflush"},36712:S=>{S.exports="pipelinebeforeflush"},40285:S=>{S.exports="pipelinebind"},65918:S=>{S.exports="pipelineboot"},92852:S=>{S.exports="pipelinedestroy"},56072:S=>{S.exports="pipelinerebind"},57566:S=>{S.exports="pipelineresize"},77085:(S,P,a)=>{S.exports={AFTER_FLUSH:a(84817),BEFORE_FLUSH:a(36712),BIND:a(40285),BOOT:a(65918),DESTROY:a(92852),REBIND:a(56072),RESIZE:a(57566)}},54812:(S,P,a)=>{var y=a(83419),C=a(99155),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.amount=1},onPreRender:function(d,c){d=this.getController(d),this.set1f("amount",d.amount,c)}});S.exports=f},67329:(S,P,a)=>{var y=a(83419),C=a(24400),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(d){d=this.getController(d),this.set1f("strength",d.blurStrength),this.set3fv("color",d.glcolor)},onDraw:function(d){var c=this.getController(),h=this.fullFrame1,p=this.fullFrame2;this.copyFrame(d,p);for(var u=2/d.width*c.offsetX,m=2/d.height*c.offsetY,v=0;v{var y=a(83419),C=a(41514),g=a(51078),f=a(94328),d=a(84057),c=new y({Extends:d,initialize:function(p){d.call(this,{game:p,shaders:[{name:"Gaussian5",fragShader:C},{name:"Gaussian9",fragShader:g},{name:"Gaussian13",fragShader:f}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(h){var p=this.getController(),u=this.gl,m=this.fullFrame1,v=u.getParameter(u.FRAMEBUFFER_BINDING);this.bind(this.shaders[p.quality]),u.activeTexture(u.TEXTURE0),u.viewport(0,0,h.width,h.height),this.set1i("uMainSampler",0),this.set2f("resolution",h.width,h.height),this.set1f("strength",p.strength),this.set3fv("color",p.glcolor);for(var x=0;x{var y=a(83419),C=a(90610),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(d,c,h,p){d=this.getController(d),this.set1f("radius",d.radius,c),this.set1f("amount",d.amount,c),this.set1f("contrast",d.contrast,c),this.set1f("strength",d.strength,c),this.set2f("blur",d.blurX,d.blurY,c),this.setBoolean("isTiltShift",d.isTiltShift,c),h&&p&&this.set2f("resolution",h,p,c)},onDraw:function(d){this.set2f("resolution",d.width,d.height),this.bindAndDraw(d)}});S.exports=f},89428:(S,P,a)=>{var y=a(83419),C=a(91899),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(d,c,h,p){d=this.getController(d),this.set1f("scale",d.scale,c),this.set1f("feather",d.feather,c),this.set1f("thickness",d.thickness,c),this.set3fv("color",d.glcolor,c),this.set4fv("backgroundColor",d.glcolor2,c),h&&p&&this.set2f("resolution",h,p,c)},onDraw:function(d){this.set2f("resolution",d.width,d.height),this.bindAndDraw(d)}});S.exports=f},88904:(S,P,a)=>{var y=a(83419),C=a(84057),g=new y({Extends:C,initialize:function(d){C.call(this,{game:d})},onDraw:function(f){var d=this.fullFrame1;this.controller?this.manager.drawFrame(f,d,!0,this.controller):this.drawFrame(f,d),this.copyToGame(d)}});S.exports=g},63563:(S,P,a)=>{var y=a(83419),C=a(47838),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.x=.005,this.y=.005},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(d){var c=this.game.textures.getFrame(d);c&&(this.glTexture=c.glTexture)},onDraw:function(d){var c=this.getController(),h=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",c.x,c.y),this.bindTexture(c.glTexture,1),this.copySprite(d,h),this.copyToGame(h)}});S.exports=f},94045:(S,P,a)=>{var y=a(83419),C=a(95540),g=a(98656),f=a(84057),d=a(70554),c=new y({Extends:f,initialize:function(p,u){var m=C(u,"quality",.1),v=C(u,"distance",10);f.call(this,{game:p,fragShader:d.setGlowQuality(g,p,m,v)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(h,p,u,m){h=this.getController(h),this.set1f("outerStrength",h.outerStrength,p),this.set1f("innerStrength",h.innerStrength,p),this.set4fv("glowColor",h.glcolor,p),this.setBoolean("knockout",h.knockout,p),u&&m&&this.set2f("resolution",u,m,p)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});S.exports=c},74088:(S,P,a)=>{var y=a(83419),C=a(70463),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(d,c){d=this.getController(d),this.set1f("alpha",d.alpha,c),this.set1i("size",d.size,c),this.set3fv("color1",d.glcolor1,c),this.set3fv("color2",d.glcolor2,c),this.set2f("positionFrom",d.fromX,d.fromY,c),this.set2f("positionTo",d.toX,d.toY,c)}});S.exports=f},99636:(S,P,a)=>{var y=a(83419),C=a(50831),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.amount=1},onPreRender:function(d,c,h,p){d=this.getController(d),this.set1f("amount",d.amount,c),h&&p&&this.set2f("resolution",h,p,c)},onDraw:function(d){this.set2f("resolution",d.width,d.height),this.bindAndDraw(d)}});S.exports=f},34700:(S,P,a)=>{var y=a(83419),C=a(92595),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(d,c){var h=(d=this.getController(d)).samples;this.set1i("samples",h,c),this.set1f("intensity",d.intensity,c),this.set1f("decay",d.decay,c),this.set1f("power",d.power/h,c),this.set2f("lightPosition",d.x,d.y,c),this.set4fv("color",d.glcolor,c)}});S.exports=f},91157:(S,P,a)=>{var y=a(83419),C=a(72464),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(d,c,h,p){d=this.getController(d),this.setTime("time",c),this.set1f("speed",d.speed,c),this.set1f("lineWidth",d.lineWidth,c),this.set1f("gradient",d.gradient,c),this.setBoolean("reveal",d.reveal,c),h&&p&&this.set2f("resolution",h,p,c)},onDraw:function(d){this.set2f("resolution",d.width,d.height),this.bindAndDraw(d)}});S.exports=f},27797:(S,P,a)=>{var y=a(83419),C=a(39249),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(d,c){d=this.getController(d),this.set1f("radius",d.radius,c),this.set1f("strength",d.strength,c),this.set2f("position",d.x,d.y,c)}});S.exports=f},67603:(S,P,a)=>{var y=a(83419),C=a(2878),g=a(84057),f=new y({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:C}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(d,c){d=this.getController(d),this.set4f("config",d.progress,d.wipeWidth,d.direction,d.axis,c),this.setBoolean("reveal",d.reveal,c)}});S.exports=f},58918:(S,P,a)=>{var y={Barrel:a(54812),Bloom:a(67329),Blur:a(8861),Bokeh:a(51051),Circle:a(89428),ColorMatrix:a(88904),Displacement:a(63563),Glow:a(94045),Gradient:a(74088),Pixelate:a(99636),Shadow:a(34700),Shine:a(91157),Vignette:a(27797),Wipe:a(67603)};S.exports=y},96615:(S,P,a)=>{var y=a(36060),C=a(79291),g={FX:a(58918),BitmapMaskPipeline:a(31302),Events:a(77085),FXPipeline:a(92651),LightPipeline:a(96569),MobilePipeline:a(56527),MultiPipeline:a(57516),PointLightPipeline:a(43439),PostFXPipeline:a(84057),PreFXPipeline:a(43558),RopePipeline:a(81041),SinglePipeline:a(12385),UtilityPipeline:a(7589)};g=C(!1,g,y),S.exports=g},35407:S=>{S.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join("\n")},78908:S=>{S.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join("\n")},85191:S=>{S.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join("\n")},96293:S=>{S.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join("\n")},36682:S=>{S.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join("\n")},99155:S=>{S.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join("\n")},24400:S=>{S.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join("\n")},94328:S=>{S.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},41514:S=>{S.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},51078:S=>{S.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},90610:S=>{S.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join("\n")},91899:S=>{S.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join("\n")},47838:S=>{S.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join("\n")},98656:S=>{S.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join("\n")},70463:S=>{S.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join("\n")},50831:S=>{S.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join("\n")},92595:S=>{S.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join("\n")},72464:S=>{S.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{","\tvec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join("\n")},39249:S=>{S.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," \tcol = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join("\n")},2878:S=>{S.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join("\n")},31063:S=>{S.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join("\n")},48247:S=>{S.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join("\n")},41214:S=>{S.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join("\n")},39653:S=>{S.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join("\n")},62143:S=>{S.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},47940:S=>{S.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},98840:S=>{S.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},44667:S=>{S.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},4127:S=>{S.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join("\n")},89924:S=>{S.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join("\n")},27681:S=>{S.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join("\n")},49627:S=>{S.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join("\n")},45561:S=>{S.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},60722:S=>{S.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},89350:(S,P,a)=>{S.exports={AddBlendFrag:a(35407),BitmapMaskFrag:a(78908),BitmapMaskVert:a(85191),ColorMatrixFrag:a(96293),CopyFrag:a(36682),FXBarrelFrag:a(99155),FXBloomFrag:a(24400),FXBlurHighFrag:a(94328),FXBlurLowFrag:a(41514),FXBlurMedFrag:a(51078),FXBokehFrag:a(90610),FXCircleFrag:a(91899),FXDisplacementFrag:a(47838),FXGlowFrag:a(98656),FXGradientFrag:a(70463),FXPixelateFrag:a(50831),FXShadowFrag:a(92595),FXShineFrag:a(72464),FXVignetteFrag:a(39249),FXWipeFrag:a(2878),LightFrag:a(31063),LinearBlendFrag:a(48247),MeshFrag:a(41214),MeshVert:a(39653),MobileFrag:a(62143),MobileVert:a(47940),MultiFrag:a(98840),MultiVert:a(44667),PointLightFrag:a(4127),PointLightVert:a(89924),PostFXFrag:a(27681),QuadVert:a(49627),SingleFrag:a(45561),SingleVert:a(60722)}},93567:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d,c){this.webGLAttribLocation=-1,this.gl=f,this.program=d,this.name=c,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var g=this.gl;g.isContextLost()||(this.webGLAttribLocation=g.getAttribLocation(this.program.webGLProgram,this.name))}else this.webGLAttribLocation=-1},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});S.exports=C},26128:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d,c,h){this.webGLBuffer=null,this.gl=f,this.initialDataOrSize=d,this.bufferType=c,this.bufferUsage=h,this.createResource()},createResource:function(){if(null!==this.initialDataOrSize){var g=this.gl;if(!g.isContextLost()){var f=this.bufferType,d=g.createBuffer();this.webGLBuffer=d,g.bindBuffer(f,this.webGLBuffer),g.bufferData(f,this.initialDataOrSize,this.bufferUsage),g.bindBuffer(f,null)}}},destroy:function(){var g=this.gl;g.isContextLost()||g.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});S.exports=C},84387:(S,P,a)=>{var y=a(83419),C={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},g=new y({initialize:function(d,c,h,p,u){this.webGLFramebuffer=null,this.gl=d,this.width=c,this.height=h,this.renderTexture=p,this.addDepthStencilBuffer=!!u,this.createResource()},createResource:function(){var f=this.gl;if(!f.isContextLost()){var c,d=this.renderTexture,h=f.createFramebuffer();if(this.webGLFramebuffer=h,f.bindFramebuffer(f.FRAMEBUFFER,h),d.isRenderTexture=!0,d.isAlphaPremultiplied=!1,f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,d.webGLTexture,0),(c=f.checkFramebufferStatus(f.FRAMEBUFFER))!==f.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(C[c]||c));if(this.addDepthStencilBuffer){var p=f.createRenderbuffer();f.bindRenderbuffer(f.RENDERBUFFER,p),f.renderbufferStorage(f.RENDERBUFFER,f.DEPTH_STENCIL,this.width,this.height),f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.RENDERBUFFER,p)}f.bindFramebuffer(f.FRAMEBUFFER,null)}},destroy:function(){if(null!==this.webGLFramebuffer){var f=this.gl;if(!f.isContextLost()){f.bindFramebuffer(f.FRAMEBUFFER,this.webGLFramebuffer);var d=f.getFramebufferAttachmentParameter(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==d&&(f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,null,0),f.deleteTexture(d));var c=f.getFramebufferAttachmentParameter(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==c&&f.deleteRenderbuffer(c),f.bindFramebuffer(f.FRAMEBUFFER,null),f.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});S.exports=g},1482:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d,c){this.webGLProgram=null,this.gl=f,this.vertexSource=d,this.fragmentSource=c,this.createResource()},createResource:function(){var g=this.gl;if(!g.isContextLost()){var f=g.createProgram(),d=g.createShader(g.VERTEX_SHADER),c=g.createShader(g.FRAGMENT_SHADER);g.shaderSource(d,this.vertexSource),g.shaderSource(c,this.fragmentSource),g.compileShader(d),g.compileShader(c);var h="Shader failed:\n";if(!g.getShaderParameter(d,g.COMPILE_STATUS))throw new Error("Vertex "+h+g.getShaderInfoLog(d));if(!g.getShaderParameter(c,g.COMPILE_STATUS))throw new Error("Fragment "+h+g.getShaderInfoLog(c));if(g.attachShader(f,d),g.attachShader(f,c),g.linkProgram(f),!g.getProgramParameter(f,g.LINK_STATUS))throw new Error("Link "+h+g.getProgramInfoLog(f));g.useProgram(f),this.webGLProgram=f}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});S.exports=C},82751:(S,P,a)=>{var y=a(83419),C=a(50030),g=new y({initialize:function(d,c,h,p,u,m,v,x,b,T,_,A,M){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=d,this.mipLevel=c,this.minFilter=h,this.magFilter=p,this.wrapT=u,this.wrapS=m,this.format=v,this.pixels=x,this.width=b,this.height=T,this.pma=_??!0,this.forceSize=!!A,this.flipY=!!M,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var f=this.gl;if(!f.isContextLost()){if(this.pixels instanceof g)return void(this.webGLTexture=this.pixels.webGLTexture);var d=f.createTexture();d.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=d,this._processTexture()}},update:function(f,d,c,h,p,u,m,v,x){0!==d&&0!==c&&(this.pixels=f,this.width=d,this.height=c,this.flipY=h,this.wrapS=p,this.wrapT=u,this.minFilter=m,this.magFilter=v,this.format=x,this.gl.isContextLost()||this._processTexture())},_processTexture:function(){var f=this.gl;f.activeTexture(f.TEXTURE0);var d=f.getParameter(f.TEXTURE_BINDING_2D);f.bindTexture(f.TEXTURE_2D,this.webGLTexture),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,this.minFilter),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,this.magFilter),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,this.wrapS),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,this.wrapT),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,this.flipY);var c=this.pixels,h=this.mipLevel,p=this.width,u=this.height,m=this.format,v=!1;if(null==c)f.texImage2D(f.TEXTURE_2D,h,m,p,u,0,m,f.UNSIGNED_BYTE,null),v=C(p,u);else if(c.compressed){p=c.width,u=c.height,v=c.generateMipmap;for(var x=0;x{var C=new(a(83419))({initialize:function(f,d,c){this.webGLUniformLocation=null,this.gl=f,this.program=d,this.name=c,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var g=this.gl;g.isContextLost()||(this.webGLUniformLocation=g.getUniformLocation(this.program.webGLProgram,this.name))}else this.webGLUniformLocation=null},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});S.exports=C},9503:(S,P,a)=>{var y={WebGLAttribLocationWrapper:a(93567),WebGLBufferWrapper:a(26128),WebGLProgramWrapper:a(1482),WebGLTextureWrapper:a(82751),WebGLFramebufferWrapper:a(84387),WebGLUniformLocationWrapper:a(57183)};S.exports=y},76531:(S,P,a)=>{var y=a(13560),C=a(83419),g=a(50792),f=a(97480),d=a(8443),c=a(57811),h=a(74403),p=a(45818),u=a(29747),m=a(87841),v=a(86555),x=a(56583),b=a(26099),T=a(38058),_=new C({Extends:g,initialize:function(M){g.call(this),this.game=M,this.canvasBounds=new m,this.parent=null,this.parentIsWindow=!1,this.parentSize=new v,this.gameSize=new v,this.baseSize=new v,this.displaySize=new v,this.scaleMode=y.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new b(1,1),this.autoRound=!1,this.autoCenter=y.CENTER.NO_CENTER,this.orientation=y.ORIENTATION.LANDSCAPE,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:u,windowResize:u,fullScreenChange:u,fullScreenError:u}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(d.BOOT,this.boot,this)},boot:function(){var A=this.game;this.canvas=A.canvas,this.fullscreen=A.device.fullscreen;var M=this.scaleMode;M!==y.SCALE_MODE.RESIZE&&M!==y.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(M),M===y.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),A.events.on(d.PRE_STEP,this.step,this),A.events.once(d.READY,this.refresh,this),A.events.once(d.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(A){this.getParent(A),this.getParentBounds();var M=A.width,I=A.height,R=A.scaleMode,F=A.zoom,N=A.autoRound;if("string"==typeof M)if("%"!==M.substr(-1))M=parseInt(M,10);else{var V=this.parentSize.width;0===V&&(V=window.innerWidth);var B=parseInt(M,10)/100;M=Math.floor(V*B)}if("string"==typeof I)if("%"!==I.substr(-1))I=parseInt(I,10);else{var G=this.parentSize.height;0===G&&(G=window.innerHeight);var Q=parseInt(I,10)/100;I=Math.floor(G*Q)}this.scaleMode=R,this.autoRound=N,this.autoCenter=A.autoCenter,this.resizeInterval=A.resizeInterval,N&&(M=Math.floor(M),I=Math.floor(I)),this.gameSize.setSize(M,I),F===y.ZOOM.MAX_ZOOM&&(F=this.getMaxZoom()),this.zoom=F,1!==F&&(this._resetZoom=!0),this.baseSize.setSize(M,I),N&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),A.minWidth>0&&this.displaySize.setMin(A.minWidth*F,A.minHeight*F),A.maxWidth>0&&this.displaySize.setMax(A.maxWidth*F,A.maxHeight*F),this.displaySize.setSize(M,I),(A.snapWidth>0||A.snapHeight>0)&&this.displaySize.setSnap(A.snapWidth,A.snapHeight),this.orientation=p(M,I)},getParent:function(A){var M=A.parent;if(null!==M){if(this.parent=h(M),this.parentIsWindow=this.parent===document.body,A.expandParent&&A.scaleMode!==y.SCALE_MODE.NONE){var I=this.parent.getBoundingClientRect();(this.parentIsWindow||0===I.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",I=this.parent.getBoundingClientRect(),!this.parentIsWindow&&0===I.height&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}A.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=h(A.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var A=this.parentSize,M=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(M.height=c(!0));var I=M.width,R=M.height;if(A.width!==I||A.height!==R)return A.setSize(I,R),!0;if(this.canvas){var F=this.canvasBounds,N=this.canvas.getBoundingClientRect();if(N.x!==F.x||N.y!==F.y)return!0}return!1},lockOrientation:function(A){var M=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!M&&M.call(screen,A)},setParentSize:function(A,M){return this.parentSize.setSize(A,M),this.refresh()},setGameSize:function(A,M){var I=this.autoRound;I&&(A=Math.floor(A),M=Math.floor(M));var R=this.width,F=this.height;return this.gameSize.resize(A,M),this.baseSize.resize(A,M),I&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(A/M),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(R,F)},resize:function(A,M){var I=this.zoom,R=this.autoRound;R&&(A=Math.floor(A),M=Math.floor(M));var F=this.width,N=this.height;this.gameSize.resize(A,M),this.baseSize.resize(A,M),R&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(A*I,M*I),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var V=this.canvas.style,B=A*I,G=M*I;return R&&(B=Math.floor(B),G=Math.floor(G)),(B!==A||G!==M)&&(V.width=B+"px",V.height=G+"px"),this.refresh(F,N)},setZoom:function(A){return this.zoom=A,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(A,M){return void 0===A&&(A=0),void 0===M&&(M=A),this.displaySize.setSnap(A,M),this.refresh()},refresh:function(A,M){void 0===A&&(A=this.width),void 0===M&&(M=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var I=this.game.domContainer;if(I){this.baseSize.setCSS(I);var R=this.canvas.style,F=I.style;F.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",F.marginLeft=R.marginLeft,F.marginTop=R.marginTop}return this.emit(f.RESIZE,this.gameSize,this.baseSize,this.displaySize,A,M),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var A=p(this.width,this.height);A!==this.orientation&&(this.orientation=A,this.emit(f.ORIENTATION_CHANGE,A))}},updateScale:function(){var R,F,A=this.canvas.style,N=this.zoom,V=this.autoRound;if(this.scaleMode===y.SCALE_MODE.NONE)this.displaySize.setSize(this.gameSize.width*N,this.gameSize.height*N),R=this.displaySize.width,F=this.displaySize.height,V&&(R=Math.floor(R),F=Math.floor(F)),this._resetZoom&&(A.width=R+"px",A.height=F+"px",this._resetZoom=!1);else if(this.scaleMode===y.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),R=this.displaySize.width,F=this.displaySize.height,V&&(R=Math.floor(R),F=Math.floor(F)),this.canvas.width=R,this.canvas.height=F;else if(this.scaleMode===y.SCALE_MODE.EXPAND){var B=this.game.config.width,G=this.game.config.height;this.displaySize.setSize(this.parentSize.width,this.parentSize.height),R=this.displaySize.width,F=this.displaySize.height,V&&(R=Math.floor(R),F=Math.floor(F)),A.width=R+"px",A.height=F+"px";var Q=this.parentSize.width/B,H=this.parentSize.height/G;Q=0?0:-F.x*N.x,F.y>=0?0:-F.y*N.y,R.width>=F.width?I.width:I.width-(F.width-R.width)*N.x,R.height>=F.height?I.height:I.height-(F.height-R.height)*N.y),A&&(M.width/=A.zoomX,M.height/=A.zoomY,M.centerX=A.centerX+A.scrollX,M.centerY=A.centerY+A.scrollY),M},step:function(A,M){this.parent&&(this._lastCheck+=M,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var A=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",A.orientationChange,!1):window.removeEventListener("orientationchange",A.orientationChange,!1),window.removeEventListener("resize",A.windowResize,!1),["webkit","moz",""].forEach(function(I){document.removeEventListener(I+"fullscreenchange",A.fullScreenChange,!1),document.removeEventListener(I+"fullscreenerror",A.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",A.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",A.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===y.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===y.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});S.exports=_},64743:S=>{S.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:S=>{S.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:S=>{S.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:S=>{S.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(S,P,a)=>{var y={CENTER:a(64743),ORIENTATION:a(39218),SCALE_MODE:a(81050),ZOOM:a(80805)};S.exports=y},56139:S=>{S.exports="enterfullscreen"},2336:S=>{S.exports="fullscreenfailed"},47412:S=>{S.exports="fullscreenunsupported"},51452:S=>{S.exports="leavefullscreen"},20666:S=>{S.exports="orientationchange"},47945:S=>{S.exports="resize"},97480:(S,P,a)=>{S.exports={ENTER_FULLSCREEN:a(56139),FULLSCREEN_FAILED:a(2336),FULLSCREEN_UNSUPPORTED:a(47412),LEAVE_FULLSCREEN:a(51452),ORIENTATION_CHANGE:a(20666),RESIZE:a(47945)}},93364:(S,P,a)=>{var y=a(79291),C=a(13560),g={Center:a(64743),Events:a(97480),Orientation:a(39218),ScaleManager:a(76531),ScaleModes:a(81050),Zoom:a(80805)};g=y(!1,g,C.CENTER),g=y(!1,g,C.ORIENTATION),g=y(!1,g,C.SCALE_MODE),g=y(!1,g,C.ZOOM),S.exports=g},27397:(S,P,a)=>{var y=a(95540),C=a(35355);S.exports=function(f){var d=f.game.config.defaultPhysicsSystem,c=y(f.settings,"physics",!1);if(d||c){var h=[];if(d&&h.push(C(d+"Physics")),c)for(var p in c)p=C(p.concat("Physics")),-1===h.indexOf(p)&&h.push(p);return h}}},52106:(S,P,a)=>{var y=a(95540);S.exports=function(g){var f=g.plugins.getDefaultScenePlugins(),d=y(g.settings,"plugins",!1);return Array.isArray(d)?d:f||[]}},87033:S=>{S.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},97482:(S,P,a)=>{var y=a(83419),C=a(2368),g=new y({initialize:function(d){this.sys=new C(this,d)},update:function(){}});S.exports=g},60903:(S,P,a)=>{var y=a(83419),C=a(89993),g=a(44594),f=a(8443),d=a(35154),c=a(54899),h=a(29747),p=a(97482),u=a(2368),m=new y({initialize:function(x,b){if(this.game=x,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,b){Array.isArray(b)||(b=[b]);for(var T=0;T-1&&(delete this.keys[T],this.scenes.splice(b,1),this._start.indexOf(T)>-1&&(b=this._start.indexOf(T),this._start.splice(b,1)),x.sys.destroy()),this},bootScene:function(v){var T,x=v.sys,b=x.settings;x.sceneUpdate=h,v.init&&(v.init.call(v,b.data),b.status=C.INIT,b.isTransition&&x.events.emit(g.TRANSITION_INIT,b.transitionFrom,b.transitionDuration)),x.load&&(T=x.load).reset(),T&&v.preload?(v.preload.call(v),b.status=C.LOADING,T.once(c.COMPLETE,this.loadComplete,this),T.start()):this.create(v)},loadComplete:function(v){this.create(v.scene)},payloadComplete:function(v){this.bootScene(v.scene)},update:function(v,x){this.processQueue(),this.isProcessing=!0;for(var b=this.scenes.length-1;b>=0;b--){var T=this.scenes[b].sys;T.settings.status>C.START&&T.settings.status<=C.RUNNING&&T.step(v,x),T.scenePlugin&&T.scenePlugin._target&&T.scenePlugin.step(v,x)}},render:function(v){for(var x=0;x=C.LOADING&&b.settings.status=C.START&&_<=C.CREATING)return this;if(_>=C.RUNNING&&_<=C.SLEEPING)T.shutdown(),T.sceneUpdate=h,T.start(x);else if(T.sceneUpdate=h,T.start(x),T.load&&(A=T.load),A&&T.settings.hasOwnProperty("pack")&&(A.reset(),A.addPack({payload:T.settings.pack})))return T.settings.status=C.LOADING,A.once(c.COMPLETE,this.payloadComplete,this),A.start(),this;return this.bootScene(b),this},stop:function(v,x){var b=this.getScene(v);if(b&&!b.sys.isTransitioning()&&b.sys.settings.status!==C.SHUTDOWN){var T=b.sys.load;T&&(T.off(c.COMPLETE,this.loadComplete,this),T.off(c.COMPLETE,this.payloadComplete,this)),b.sys.shutdown(x)}return this},switch:function(v,x,b){var T=this.getScene(v),_=this.getScene(x);return T&&_&&T!==_&&(this.sleep(v),this.isSleeping(x)?this.wake(x,b):this.start(x,b)),this},getAt:function(v){return this.scenes[v]},getIndex:function(v){var x=this.getScene(v);return this.scenes.indexOf(x)},bringToTop:function(v){if(this.isProcessing)return this.queueOp("bringToTop",v);var x=this.getIndex(v),b=this.scenes;if(-1!==x&&x0){var b=this.getScene(v);this.scenes.splice(x,1),this.scenes.unshift(b)}return this},moveDown:function(v){if(this.isProcessing)return this.queueOp("moveDown",v);var x=this.getIndex(v);if(x>0){var b=x-1,T=this.getScene(v),_=this.getAt(b);this.scenes[x]=_,this.scenes[b]=T}return this},moveUp:function(v){if(this.isProcessing)return this.queueOp("moveUp",v);var x=this.getIndex(v);if(xb),0,_)}return this},moveBelow:function(v,x){if(v===x)return this;if(this.isProcessing)return this.queueOp("moveBelow",v,x);var b=this.getIndex(v),T=this.getIndex(x);if(-1!==b&&-1!==T&&T>b){var _=this.getAt(T);this.scenes.splice(T,1),0===b?this.scenes.unshift(_):this.scenes.splice(b-(T{var y=a(45319),C=a(83419),g=a(44594),f=a(95540),d=a(37277),c=new C({initialize:function(p){this.scene=p,this.systems=p.sys,this.settings=p.sys.settings,this.key=p.sys.settings.key,this.manager=p.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._willSleep=!1,this._willRemove=!1,p.sys.events.once(g.BOOT,this.boot,this),p.sys.events.on(g.START,this.pluginStart,this)},boot:function(){this.systems.events.once(g.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(g.SHUTDOWN,this.shutdown,this)},start:function(h,p){return void 0===h&&(h=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",h,p),this},restart:function(h){var p=this.key;return this.manager.queueOp("stop",p),this.manager.queueOp("start",p,h),this},transition:function(h){void 0===h&&(h={});var p=f(h,"target",!1),u=this.manager.getScene(p);if(!p||!this.checkValidTransition(u))return!1;var m=f(h,"duration",1e3);this._elapsed=0,this._target=u,this._duration=m,this._willSleep=f(h,"sleep",!1),this._willRemove=f(h,"remove",!1);var v=f(h,"onUpdate",null);v&&(this._onUpdate=v,this._onUpdateScope=f(h,"onUpdateScope",this.scene));var x=f(h,"allowInput",!1);this.settings.transitionAllowInput=x;var b=u.sys.settings;b.isTransition=!0,b.transitionFrom=this.scene,b.transitionDuration=m,b.transitionAllowInput=x,f(h,"moveAbove",!1)?this.manager.moveAbove(this.key,p):f(h,"moveBelow",!1)&&this.manager.moveBelow(this.key,p),u.sys.isSleeping()?u.sys.wake(f(h,"data")):this.manager.start(p,f(h,"data"));var T=f(h,"onStart",null),_=f(h,"onStartScope",this.scene);return T&&T.call(_,this.scene,u,m),this.systems.events.emit(g.TRANSITION_OUT,u,m),!0},checkValidTransition:function(h){return!(!h||h.sys.isActive()||h.sys.isTransitioning()||h===this.scene||this.systems.isTransitioning())},step:function(h,p){this._elapsed+=p,this.transitionProgress=y(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var p=this._target.sys.settings;this._target.sys.events.emit(g.TRANSITION_COMPLETE,this.scene),p.isTransition=!1,p.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(h,p,u,m){return this.manager.add(h,p,u,m)},launch:function(h,p){return h&&h!==this.key&&this.manager.queueOp("start",h,p),this},run:function(h,p){return h&&h!==this.key&&this.manager.queueOp("run",h,p),this},pause:function(h,p){return void 0===h&&(h=this.key),this.manager.queueOp("pause",h,p),this},resume:function(h,p){return void 0===h&&(h=this.key),this.manager.queueOp("resume",h,p),this},sleep:function(h,p){return void 0===h&&(h=this.key),this.manager.queueOp("sleep",h,p),this},wake:function(h,p){return void 0===h&&(h=this.key),this.manager.queueOp("wake",h,p),this},switch:function(h,p){return h!==this.key&&this.manager.queueOp("switch",this.key,h,p),this},stop:function(h,p){return void 0===h&&(h=this.key),this.manager.queueOp("stop",h,p),this},setActive:function(h,p,u){void 0===p&&(p=this.key);var m=this.manager.getScene(p);return m&&m.sys.setActive(h,u),this},setVisible:function(h,p){void 0===p&&(p=this.key);var u=this.manager.getScene(p);return u&&u.sys.setVisible(h),this},isSleeping:function(h){return void 0===h&&(h=this.key),this.manager.isSleeping(h)},isActive:function(h){return void 0===h&&(h=this.key),this.manager.isActive(h)},isPaused:function(h){return void 0===h&&(h=this.key),this.manager.isPaused(h)},isVisible:function(h){return void 0===h&&(h=this.key),this.manager.isVisible(h)},swapPosition:function(h,p){return void 0===p&&(p=this.key),h!==p&&this.manager.swapPosition(h,p),this},moveAbove:function(h,p){return void 0===p&&(p=this.key),h!==p&&this.manager.moveAbove(h,p),this},moveBelow:function(h,p){return void 0===p&&(p=this.key),h!==p&&this.manager.moveBelow(h,p),this},remove:function(h){return void 0===h&&(h=this.key),this.manager.remove(h),this},moveUp:function(h){return void 0===h&&(h=this.key),this.manager.moveUp(h),this},moveDown:function(h){return void 0===h&&(h=this.key),this.manager.moveDown(h),this},bringToTop:function(h){return void 0===h&&(h=this.key),this.manager.bringToTop(h),this},sendToBack:function(h){return void 0===h&&(h=this.key),this.manager.sendToBack(h),this},get:function(h){return this.manager.getScene(h)},getStatus:function(h){var p=this.manager.getScene(h);if(p)return p.sys.getStatus()},getIndex:function(h){return void 0===h&&(h=this.key),this.manager.getIndex(h)},shutdown:function(){var h=this.systems.events;h.off(g.SHUTDOWN,this.shutdown,this),h.off(g.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(g.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});d.register("ScenePlugin",c,"scenePlugin"),S.exports=c},55681:(S,P,a)=>{var y=a(89993),C=a(35154),g=a(46975),f=a(87033);S.exports={create:function(c){return"string"==typeof c?c={key:c}:void 0===c&&(c={}),{status:y.PENDING,key:C(c,"key",""),active:C(c,"active",!1),visible:C(c,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:C(c,"pack",!1),cameras:C(c,"cameras",null),map:C(c,"map",g(f,C(c,"mapAdd",{}))),physics:C(c,"physics",{}),loader:C(c,"loader",{}),plugins:C(c,"plugins",!1),input:C(c,"input",{})}}}},2368:(S,P,a)=>{var y=a(83419),C=a(89993),g=a(42363),f=a(44594),d=a(27397),c=a(52106),h=a(29747),p=a(55681),u=new y({initialize:function(v,x){this.scene=v,this.config=x,this.settings=p.create(x),this.sceneUpdate=h},init:function(m){this.settings.status=C.INIT,this.sceneUpdate=h,this.game=m,this.renderer=m.renderer,this.canvas=m.canvas,this.context=m.context;var v=m.plugins;this.plugins=v,v.addToScene(this,g.Global,[g.CoreScene,c(this),d(this)]),this.events.emit(f.BOOT,this),this.settings.isBooted=!0},step:function(m,v){var x=this.events;x.emit(f.PRE_UPDATE,m,v),x.emit(f.UPDATE,m,v),this.sceneUpdate.call(this.scene,m,v),x.emit(f.POST_UPDATE,m,v)},render:function(m){var v=this.displayList;v.depthSort(),this.events.emit(f.PRE_RENDER,m),this.cameras.render(m,v),this.events.emit(f.RENDER,m)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(m){var v=this.settings,x=this.getStatus();return x!==C.CREATING&&x!==C.RUNNING?console.warn("Cannot pause non-running Scene",v.key):this.settings.active&&(v.status=C.PAUSED,v.active=!1,this.events.emit(f.PAUSE,this,m)),this},resume:function(m){var v=this.events,x=this.settings;return this.settings.active||(x.status=C.RUNNING,x.active=!0,v.emit(f.RESUME,this,m)),this},sleep:function(m){var v=this.settings,x=this.getStatus();return x!==C.CREATING&&x!==C.RUNNING?console.warn("Cannot sleep non-running Scene",v.key):(v.status=C.SLEEPING,v.active=!1,v.visible=!1,this.events.emit(f.SLEEP,this,m)),this},wake:function(m){var v=this.events,x=this.settings;return x.status=C.RUNNING,x.active=!0,x.visible=!0,v.emit(f.WAKE,this,m),x.isTransition&&v.emit(f.TRANSITION_WAKE,x.transitionFrom,x.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var m=this.settings.status;return m>C.PENDING&&m<=C.RUNNING},isSleeping:function(){return this.settings.status===C.SLEEPING},isActive:function(){return this.settings.status===C.RUNNING},isPaused:function(){return this.settings.status===C.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(m){return this.settings.visible=m,this},setActive:function(m,v){return m?this.resume(v):this.pause(v)},start:function(m){var v=this.events,x=this.settings;m&&(x.data=m),x.status=C.START,x.active=!0,x.visible=!0,v.emit(f.START,this),v.emit(f.READY,this,m)},shutdown:function(m){var v=this.events,x=this.settings;v.off(f.TRANSITION_INIT),v.off(f.TRANSITION_START),v.off(f.TRANSITION_COMPLETE),v.off(f.TRANSITION_OUT),x.status=C.SHUTDOWN,x.active=!1,x.visible=!1,v.emit(f.SHUTDOWN,this,m)},destroy:function(){var m=this.events,v=this.settings;v.status=C.DESTROYED,v.active=!1,v.visible=!1,m.emit(f.DESTROY,this),m.removeAllListeners();for(var x=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],b=0;b{S.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},69830:S=>{S.exports="addedtoscene"},7919:S=>{S.exports="boot"},46763:S=>{S.exports="create"},11763:S=>{S.exports="destroy"},71555:S=>{S.exports="pause"},36735:S=>{S.exports="postupdate"},3809:S=>{S.exports="prerender"},90716:S=>{S.exports="preupdate"},58262:S=>{S.exports="ready"},91633:S=>{S.exports="removedfromscene"},10319:S=>{S.exports="render"},87132:S=>{S.exports="resume"},81961:S=>{S.exports="shutdown"},90194:S=>{S.exports="sleep"},6265:S=>{S.exports="start"},33178:S=>{S.exports="transitioncomplete"},43063:S=>{S.exports="transitioninit"},11259:S=>{S.exports="transitionout"},61611:S=>{S.exports="transitionstart"},45209:S=>{S.exports="transitionwake"},22966:S=>{S.exports="update"},21747:S=>{S.exports="wake"},44594:(S,P,a)=>{S.exports={ADDED_TO_SCENE:a(69830),BOOT:a(7919),CREATE:a(46763),DESTROY:a(11763),PAUSE:a(71555),POST_UPDATE:a(36735),PRE_RENDER:a(3809),PRE_UPDATE:a(90716),READY:a(58262),REMOVED_FROM_SCENE:a(91633),RENDER:a(10319),RESUME:a(87132),SHUTDOWN:a(81961),SLEEP:a(90194),START:a(6265),TRANSITION_COMPLETE:a(33178),TRANSITION_INIT:a(43063),TRANSITION_OUT:a(11259),TRANSITION_START:a(61611),TRANSITION_WAKE:a(45209),UPDATE:a(22966),WAKE:a(21747)}},62194:(S,P,a)=>{var y=a(89993),C=a(79291),g={Events:a(44594),GetPhysicsPlugins:a(27397),GetScenePlugins:a(52106),SceneManager:a(60903),ScenePlugin:a(52209),Settings:a(55681),Systems:a(2368)};g=C(!1,g,y),S.exports=g},30341:(S,P,a)=>{var y=a(83419),C=a(50792),g=a(14463),f=a(79291),d=a(29747),c=new y({Extends:C,initialize:function(p,u,m){C.call(this),this.manager=p,this.key=u,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=f(this.config,m),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(h){return!(!h||!h.name||"string"!=typeof h.name||(this.markers[h.name]?(console.error("addMarker "+h.name+" already exists in Sound"),1):(h=f(!0,{name:"",start:0,duration:this.totalDuration-(h.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},h),this.markers[h.name]=h,0)))},updateMarker:function(h){return!(!h||!h.name||"string"!=typeof h.name||(this.markers[h.name]?(this.markers[h.name]=f(!0,this.markers[h.name],h),0):(console.warn("Audio Marker: "+h.name+" missing in Sound: "+this.key),1)))},removeMarker:function(h){var p=this.markers[h];return p?(this.markers[h]=null,p):null},play:function(h,p){if(void 0===h&&(h=""),"object"==typeof h&&(p=h,h=""),"string"!=typeof h)return!1;if(h){if(!this.markers[h])return console.warn("Marker: "+h+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[h],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=f(this.currentConfig,p),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying||(this.isPlaying=!1,this.isPaused=!0,0))},resume:function(){return!(!this.isPaused||this.isPlaying||(this.isPlaying=!0,this.isPaused=!1,0))},stop:function(){return!(!this.isPaused&&!this.isPlaying||(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),0))},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:d,calculateRate:function(){var u=Math.pow(1.0005777895065548,this.currentConfig.detune+this.manager.detune);this.totalRate=this.currentConfig.rate*this.manager.rate*u},destroy:function(){this.pendingRemove||(this.stop(),this.emit(g.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});S.exports=c},85034:(S,P,a)=>{var y=a(83419),C=a(41786),g=a(50792),f=a(14463),d=a(8443),c=a(46710),h=a(58731),p=a(29747),u=a(26099),m=new y({Extends:g,initialize:function(x){g.call(this),this.game=x,this.jsonCache=x.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new u,x.events.on(d.BLUR,this.onGameBlur,this),x.events.on(d.FOCUS,this.onGameFocus,this),x.events.on(d.PRE_STEP,this.update,this),x.events.once(d.DESTROY,this.destroy,this)},add:p,addAudioSprite:function(v,x){void 0===x&&(x={});var b=this.add(v,x);for(var T in b.spritemap=this.jsonCache.get(v).spritemap,b.spritemap)if(b.spritemap.hasOwnProperty(T)){var _=C(x),A=b.spritemap[T];_.loop=!!A.hasOwnProperty("loop")&&A.loop,b.addMarker({name:T,start:A.start,duration:A.end-A.start,config:_})}return b},get:function(v){return h(this.sounds,"key",v)},getAll:function(v){return v?c(this.sounds,"key",v):c(this.sounds)},getAllPlaying:function(){return c(this.sounds,"isPlaying",!0)},play:function(v,x){var b=this.add(v);return b.once(f.COMPLETE,b.destroy,b),x?x.name?(b.addMarker(x),b.play(x.name)):b.play(x):b.play()},playAudioSprite:function(v,x,b){var T=this.addAudioSprite(v);return T.once(f.COMPLETE,T.destroy,T),T.play(x,b)},remove:function(v){var x=this.sounds.indexOf(v);return-1!==x&&(v.destroy(),this.sounds.splice(x,1),!0)},removeAll:function(){this.sounds.forEach(function(v){v.destroy()}),this.sounds.length=0},removeByKey:function(v){for(var x=0,b=this.sounds.length-1;b>=0;b--){var T=this.sounds[b];T.key===v&&(T.destroy(),this.sounds.splice(b,1),x++)}return x},pauseAll:function(){this.forEachActiveSound(function(v){v.pause()}),this.emit(f.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(v){v.resume()}),this.emit(f.RESUME_ALL,this)},setListenerPosition:p,stopAll:function(){this.forEachActiveSound(function(v){v.stop()}),this.emit(f.STOP_ALL,this)},stopByKey:function(v){var x=0;return this.getAll(v).forEach(function(b){b.stop()&&x++}),x},isPlaying:function(v){var T,b=this.sounds.length-1;if(void 0===v){for(;b>=0;b--)if((T=this.sounds[b]).isPlaying)return!0}else for(;b>=0;b--)if((T=this.sounds[b]).key===v&&T.isPlaying)return!0;return!1},unlock:p,onBlur:p,onFocus:p,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(v,x){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(f.UNLOCKED,this));for(var b=this.sounds.length-1;b>=0;b--)this.sounds[b].pendingRemove&&this.sounds.splice(b,1);this.sounds.forEach(function(T){T.update(v,x)})},destroy:function(){this.game.events.off(d.BLUR,this.onGameBlur,this),this.game.events.off(d.FOCUS,this.onGameFocus,this),this.game.events.off(d.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(v,x){var b=this;this.sounds.forEach(function(T,_){T&&!T.pendingRemove&&v.call(x||b,T,_,b.sounds)})},setRate:function(v){return this.rate=v,this},rate:{get:function(){return this._rate},set:function(v){this._rate=v,this.forEachActiveSound(function(x){x.calculateRate()}),this.emit(f.GLOBAL_RATE,this,v)}},setDetune:function(v){return this.detune=v,this},detune:{get:function(){return this._detune},set:function(v){this._detune=v,this.forEachActiveSound(function(x){x.calculateRate()}),this.emit(f.GLOBAL_DETUNE,this,v)}}});S.exports=m},14747:(S,P,a)=>{var y=a(33684),C=a(25960),g=a(57490);S.exports={create:function(d){var c=d.config.audio,h=d.device.audio;return c.noAudio||!h.webAudio&&!h.audioData?new C(d):h.webAudio&&!c.disableWebAudio?new g(d):new y(d)}}},19723:S=>{S.exports="complete"},98882:S=>{S.exports="decodedall"},57506:S=>{S.exports="decoded"},73146:S=>{S.exports="destroy"},11305:S=>{S.exports="detune"},40577:S=>{S.exports="detune"},30333:S=>{S.exports="mute"},20394:S=>{S.exports="rate"},21802:S=>{S.exports="volume"},1299:S=>{S.exports="looped"},99190:S=>{S.exports="loop"},97125:S=>{S.exports="mute"},89259:S=>{S.exports="pan"},79986:S=>{S.exports="pauseall"},17586:S=>{S.exports="pause"},19618:S=>{S.exports="play"},42306:S=>{S.exports="rate"},10387:S=>{S.exports="resumeall"},48959:S=>{S.exports="resume"},9960:S=>{S.exports="seek"},19180:S=>{S.exports="stopall"},98328:S=>{S.exports="stop"},50401:S=>{S.exports="unlocked"},52498:S=>{S.exports="volume"},14463:(S,P,a)=>{S.exports={COMPLETE:a(19723),DECODED:a(57506),DECODED_ALL:a(98882),DESTROY:a(73146),DETUNE:a(11305),GLOBAL_DETUNE:a(40577),GLOBAL_MUTE:a(30333),GLOBAL_RATE:a(20394),GLOBAL_VOLUME:a(21802),LOOP:a(99190),LOOPED:a(1299),MUTE:a(97125),PAN:a(89259),PAUSE_ALL:a(79986),PAUSE:a(17586),PLAY:a(19618),RATE:a(42306),RESUME_ALL:a(10387),RESUME:a(48959),SEEK:a(9960),STOP_ALL:a(19180),STOP:a(98328),UNLOCKED:a(50401),VOLUME:a(52498)}},64895:(S,P,a)=>{var y=a(30341),C=a(83419),g=a(14463),f=a(45319),d=new C({Extends:y,initialize:function(h,p,u){if(void 0===u&&(u={}),this.tags=h.game.cache.audio.get(p),!this.tags)throw new Error('No cached audio asset with key "'+p);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,y.call(this,h,p,u)},play:function(c,h){return!(this.manager.isLocked(this,"play",[c,h])||!y.prototype.play.call(this,c,h)||!this.pickAndPlayAudioTag()||(this.emit(g.PLAY,this),0))},pause:function(){return!(this.manager.isLocked(this,"pause")||this.startTime>0||!y.prototype.pause.call(this)||(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(g.PAUSE,this),0))},resume:function(){return!(this.manager.isLocked(this,"resume")||this.startTime>0||!y.prototype.resume.call(this)||!this.pickAndPlayAudioTag()||(this.emit(g.RESUME,this),0))},stop:function(){return!(this.manager.isLocked(this,"stop")||!y.prototype.stop.call(this)||(this.stopAndReleaseAudioTag(),this.emit(g.STOP,this),0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var h=this.currentConfig.delay,p=(this.currentMarker?this.currentMarker.start:0)+this.currentConfig.seek;return this.previousTime=p,this.audio.currentTime=p,this.applyConfig(),0===h?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*h,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var c=0;c0)return void(this.startTime=p-this.manager.loopEndOffset?(this.audio.currentTime=h+Math.max(0,u-p),u=this.audio.currentTime):u=p)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(g.COMPLETE,this);this.previousTime=u}},destroy:function(){y.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=f(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){y.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(c){this.currentConfig.mute=c,!this.manager.isLocked(this,"mute",c)&&(this.updateMute(),this.emit(g.MUTE,this,c))}},setMute:function(c){return this.mute=c,this},volume:{get:function(){return this.currentConfig.volume},set:function(c){this.currentConfig.volume=c,!this.manager.isLocked(this,"volume",c)&&(this.updateVolume(),this.emit(g.VOLUME,this,c))}},setVolume:function(c){return this.volume=c,this},rate:{get:function(){return this.currentConfig.rate},set:function(c){this.currentConfig.rate=c,!this.manager.isLocked(this,g.RATE,c)&&(this.calculateRate(),this.emit(g.RATE,this,c))}},setRate:function(c){return this.rate=c,this},detune:{get:function(){return this.currentConfig.detune},set:function(c){this.currentConfig.detune=c,!this.manager.isLocked(this,g.DETUNE,c)&&(this.calculateRate(),this.emit(g.DETUNE,this,c))}},setDetune:function(c){return this.detune=c,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(c){this.manager.isLocked(this,"seek",c)||this.startTime>0||(this.isPlaying||this.isPaused)&&(c=Math.min(Math.max(0,c),this.duration),this.isPlaying?(this.previousTime=c,this.audio.currentTime=c):this.isPaused&&(this.currentConfig.seek=c),this.emit(g.SEEK,this,c))}},setSeek:function(c){return this.seek=c,this},loop:{get:function(){return this.currentConfig.loop},set:function(c){this.currentConfig.loop=c,!this.manager.isLocked(this,"loop",c)&&(this.audio&&(this.audio.loop=c),this.emit(g.LOOP,this,c))}},setLoop:function(c){return this.loop=c,this},pan:{get:function(){return this.currentConfig.pan},set:function(c){this.currentConfig.pan=c,this.emit(g.PAN,this,c)}},setPan:function(c){return this.pan=c,this}});S.exports=d},33684:(S,P,a)=>{var y=a(85034),C=a(83419),g=a(14463),f=a(64895),d=new C({Extends:y,initialize:function(h){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,y.call(this,h)},add:function(c,h){var p=new f(this,c,h);return this.sounds.push(p),p},unlock:function(){this.locked=!1;var c=this;if(this.game.cache.audio.entries.each(function(m,v){for(var x=0;x{S.exports={SoundManagerCreator:a(14747),Events:a(14463),BaseSound:a(30341),BaseSoundManager:a(85034),WebAudioSound:a(71741),WebAudioSoundManager:a(57490),HTML5AudioSound:a(64895),HTML5AudioSoundManager:a(33684),NoAudioSound:a(4603),NoAudioSoundManager:a(25960)}},4603:(S,P,a)=>{var y=a(30341),C=a(83419),g=a(50792),f=a(79291),d=a(29747),c=function(){return!1},h=function(){return null},p=function(){return this},u=new C({Extends:g,initialize:function(v,x,b){void 0===b&&(b={}),g.call(this),this.manager=v,this.key=x,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=f({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},b),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:c,updateMarker:c,removeMarker:h,play:c,pause:c,resume:c,stop:c,setMute:p,setVolume:p,setRate:p,setDetune:p,setSeek:p,setLoop:p,setPan:p,applyConfig:h,resetConfig:h,update:d,calculateRate:h,destroy:function(){y.prototype.destroy.call(this)}});S.exports=u},25960:(S,P,a)=>{var y=a(85034),C=a(83419),g=a(50792),f=a(4603),d=a(29747),c=new C({Extends:g,initialize:function(p){g.call(this),this.game=p,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(h,p){var u=new f(this,h,p);return this.sounds.push(u),u},addAudioSprite:function(h,p){var u=this.add(h,p);return u.spritemap={},u},get:function(h){return y.prototype.get.call(this,h)},getAll:function(h){return y.prototype.getAll.call(this,h)},play:function(h,p){return!1},playAudioSprite:function(h,p,u){return!1},remove:function(h){return y.prototype.remove.call(this,h)},removeAll:function(){return y.prototype.removeAll.call(this)},removeByKey:function(h){return y.prototype.removeByKey.call(this,h)},stopByKey:function(h){return y.prototype.stopByKey.call(this,h)},onBlur:d,onFocus:d,onGameBlur:d,onGameFocus:d,pauseAll:d,resumeAll:d,stopAll:d,update:d,setRate:d,setDetune:d,setMute:d,setVolume:d,unlock:d,forEachActiveSound:function(h,p){y.prototype.forEachActiveSound.call(this,h,p)},destroy:function(){y.prototype.destroy.call(this)}});S.exports=c},71741:(S,P,a)=>{var y=a(30341),C=a(83419),g=a(14463),f=a(95540),d=new C({Extends:y,initialize:function(h,p,u){if(void 0===u&&(u={}),this.audioBuffer=h.game.cache.audio.get(p),!this.audioBuffer)throw new Error('Audio key "'+p+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=h.context.createGain(),this.volumeNode=h.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),h.context.createPanner&&(this.spatialNode=h.context.createPanner(),this.volumeNode.connect(this.spatialNode)),h.context.createStereoPanner?(this.pannerNode=h.context.createStereoPanner(),h.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(h.destination)):h.context.createPanner?this.spatialNode.connect(h.destination):this.volumeNode.connect(h.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,y.call(this,h,p,u)},play:function(c,h){return!!y.prototype.play.call(this,c,h)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(g.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var y=a(53134),C=a(85034),g=a(83419),f=a(14463),d=a(8443),c=a(71741),h=a(95540),p=new g({Extends:C,initialize:function(m){this.context=this.createAudioContext(m),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),C.call(this,m),this.locked&&m.isBooted?this.unlock():m.events.once(d.BOOT,this.unlock,this)},createAudioContext:function(u){var m=u.config.audio;return m.context?(m.context.resume(),m.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(u){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=u,this.masterMuteNode=u.createGain(),this.masterVolumeNode=u.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(u.destination),this.destination=this.masterMuteNode,this},add:function(u,m){var v=new c(this,u,m);return this.sounds.push(v),v},decodeAudio:function(u,m){var v;v=Array.isArray(u)?u:[{key:u,data:m}];for(var x=this.game.cache.audio,b=v.length,T=0;T{var y=a(37105),C=a(83419),g=a(29747),f=a(19186),d=new C({initialize:function(h){this.parent=h,this.list=[],this.position=0,this.addCallback=g,this.removeCallback=g,this._sortKey=""},add:function(c,h){return h?y.Add(this.list,c):y.Add(this.list,c,0,this.addCallback,this)},addAt:function(c,h,p){return p?y.AddAt(this.list,c,h):y.AddAt(this.list,c,h,0,this.addCallback,this)},getAt:function(c){return this.list[c]},getIndex:function(c){return this.list.indexOf(c)},sort:function(c,h){return c?(void 0===h&&(h=function(p,u){return p[c]-u[c]}),f(this.list,h),this):this},getByName:function(c){return y.GetFirst(this.list,"name",c)},getRandom:function(c,h){return y.GetRandom(this.list,c,h)},getFirst:function(c,h,p,u){return y.GetFirst(this.list,c,h,p,u)},getAll:function(c,h,p,u){return y.GetAll(this.list,c,h,p,u)},count:function(c,h){return y.CountAllMatching(this.list,c,h)},swap:function(c,h){y.Swap(this.list,c,h)},moveTo:function(c,h){return y.MoveTo(this.list,c,h)},moveAbove:function(c,h){return y.MoveAbove(this.list,c,h)},moveBelow:function(c,h){return y.MoveBelow(this.list,c,h)},remove:function(c,h){return h?y.Remove(this.list,c):y.Remove(this.list,c,this.removeCallback,this)},removeAt:function(c,h){return h?y.RemoveAt(this.list,c):y.RemoveAt(this.list,c,this.removeCallback,this)},removeBetween:function(c,h,p){return p?y.RemoveBetween(this.list,c,h):y.RemoveBetween(this.list,c,h,this.removeCallback,this)},removeAll:function(c){for(var h=this.list.length;h--;)this.remove(this.list[h],c);return this},bringToTop:function(c){return y.BringToTop(this.list,c)},sendToBack:function(c){return y.SendToBack(this.list,c)},moveUp:function(c){return y.MoveUp(this.list,c),c},moveDown:function(c){return y.MoveDown(this.list,c),c},reverse:function(){return this.list.reverse(),this},shuffle:function(){return y.Shuffle(this.list),this},replace:function(c,h){return y.Replace(this.list,c,h)},exists:function(c){return this.list.indexOf(c)>-1},setAll:function(c,h,p,u){return y.SetAll(this.list,c,h,p,u),this},each:function(c,h){for(var p=[null],u=2;u0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});S.exports=d},90330:(S,P,a)=>{var C=new(a(83419))({initialize:function(f){this.entries={},this.size=0,this.setAll(f)},setAll:function(g){if(Array.isArray(g))for(var f=0;f{var y=a(83419),C=a(50792),g=a(82348),f=new y({Extends:C,initialize:function(){C.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(d){return this._active.indexOf(d)>-1},isPending:function(d){return this._toProcess>0&&this._pending.indexOf(d)>-1},isDestroying:function(d){return this._destroy.indexOf(d)>-1},add:function(d){return this.checkQueue&&this.isActive(d)&&!this.isDestroying(d)||this.isPending(d)||(this._pending.push(d),this._toProcess++),d},remove:function(d){if(this.isPending(d)){var c=this._pending,h=c.indexOf(d);-1!==h&&c.splice(h,1)}else this.isActive(d)&&(this._destroy.push(d),this._toProcess++);return d},removeAll:function(){for(var d=this._active,c=this._destroy,h=d.length;h--;)c.push(d[h]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var h,p,d=this._destroy,c=this._active;for(h=0;h{var y=a(43886);function C(M){if(!(this instanceof C))return new C(M,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,M||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function g(M,I,R){if(!R)return I.indexOf(M);for(var F=0;F=M.minX&&I.maxY>=M.minY}function _(M){return{children:M,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function A(M,I,R,F,N){for(var B,V=[I,R];V.length;)!((R=V.pop())-(I=V.pop())<=F)&&(B=I+Math.ceil((R-I)/F/2)*F,y(M,B,I,R,N),V.push(I,B,B,R))}C.prototype={all:function(){return this._all(this.data,[])},search:function(M){var I=this.data,R=[],F=this.toBBox;if(!T(M,I))return R;for(var V,B,G,Q,N=[];I;){for(V=0,B=I.children.length;V=0&&V[I].children.length>this._maxEntries;)this._split(V,I),I--;this._adjustParentBBoxes(N,V,I)},_split:function(M,I){var R=M[I],F=R.children.length,N=this._minEntries;this._chooseSplitAxis(R,N,F);var V=this._chooseSplitIndex(R,N,F),B=_(R.children.splice(V,R.children.length-V));B.height=R.height,B.leaf=R.leaf,f(R,this.toBBox),f(B,this.toBBox),I?M[I-1].children.push(B):this._splitRoot(R,B)},_splitRoot:function(M,I){this.data=_([M,I]),this.data.height=M.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(M,I,R){var F,N,V,B,G,Q,H,K;for(Q=H=1/0,F=I;F<=R-I;F++)B=x(N=d(M,0,F,this.toBBox),V=d(M,F,R,this.toBBox)),G=u(N)+u(V),B=I;Q--)H=M.children[Q],c(B,M.leaf?N(H):H),G+=m(B);return G},_adjustParentBBoxes:function(M,I,R){for(var F=R;F>=0;F--)c(I[F],M)},_condense:function(M){for(var R,I=M.length-1;I>=0;I--)0===M[I].children.length?I>0?(R=M[I-1].children).splice(R.indexOf(M[I]),1):this.clear():f(M[I],this.toBBox)},compareMinX:function(M,I){return M.left-I.left},compareMinY:function(M,I){return M.top-I.top},toBBox:function(M){return{minX:M.left,minY:M.top,maxX:M.right,maxY:M.bottom}}},S.exports=C},35072:(S,P,a)=>{var C=new(a(83419))({initialize:function(f){if(this.entries=[],Array.isArray(f))for(var d=0;d-1&&this.entries.splice(f,1),this},dump:function(){console.group("Set");for(var g=0;g-1},union:function(g){var f=new C;return g.entries.forEach(function(d){f.set(d)}),this.entries.forEach(function(d){f.set(d)}),f},intersect:function(g){var f=new C;return this.entries.forEach(function(d){g.contains(d)&&f.set(d)}),f},difference:function(g){var f=new C;return this.entries.forEach(function(d){g.contains(d)||f.set(d)}),f},size:{get:function(){return this.entries.length},set:function(g){return g{var y=a(45319),C=a(83419),g=a(56583),f=a(26099),d=new C({initialize:function(h,p,u,m){void 0===h&&(h=0),void 0===p&&(p=h),void 0===u&&(u=0),void 0===m&&(m=null),this._width=h,this._height=p,this._parent=m,this.aspectMode=u,this.aspectRatio=0===p?1:h/p,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new f},setAspectMode:function(c){return void 0===c&&(c=0),this.aspectMode=c,this.setSize(this._width,this._height)},setSnap:function(c,h){return void 0===c&&(c=0),void 0===h&&(h=c),this.snapTo.set(c,h),this.setSize(this._width,this._height)},setParent:function(c){return this._parent=c,this.setSize(this._width,this._height)},setMin:function(c,h){return void 0===c&&(c=0),void 0===h&&(h=c),this.minWidth=y(c,0,this.maxWidth),this.minHeight=y(h,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(c,h){return void 0===c&&(c=Number.MAX_VALUE),void 0===h&&(h=c),this.maxWidth=y(c,this.minWidth,Number.MAX_VALUE),this.maxHeight=y(h,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(c,h){switch(void 0===c&&(c=0),void 0===h&&(h=c),this.aspectMode){case d.NONE:this._width=this.getNewWidth(g(c,this.snapTo.x)),this._height=this.getNewHeight(g(h,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case d.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(g(c,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case d.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(g(h,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case d.FIT:this.constrain(c,h,!0);break;case d.ENVELOP:this.constrain(c,h,!1)}return this},setAspectRatio:function(c){return this.aspectRatio=c,this.setSize(this._width,this._height)},resize:function(c,h){return this._width=this.getNewWidth(g(c,this.snapTo.x)),this._height=this.getNewHeight(g(h,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(c,h){return void 0===h&&(h=!0),c=y(c,this.minWidth,this.maxWidth),h&&this._parent&&c>this._parent.width&&(c=Math.max(this.minWidth,this._parent.width)),c},getNewHeight:function(c,h){return void 0===h&&(h=!0),c=y(c,this.minHeight,this.maxHeight),h&&this._parent&&c>this._parent.height&&(c=Math.max(this.minHeight,this._parent.height)),c},constrain:function(c,h,p){void 0===c&&(c=0),void 0===h&&(h=c),void 0===p&&(p=!0),c=this.getNewWidth(c),h=this.getNewHeight(h);var u=this.snapTo,m=0===h?1:c/h;return p&&this.aspectRatio>m||!p&&this.aspectRatio0&&(c=(h=g(h,u.y))*this.aspectRatio)):(p&&this.aspectRatiom)&&(c=(h=g(h,u.y))*this.aspectRatio,u.x>0&&(h=(c=g(c,u.x))*(1/this.aspectRatio))),this._width=c,this._height=h,this},fitTo:function(c,h){return this.constrain(c,h,!0)},envelop:function(c,h){return this.constrain(c,h,!1)},setWidth:function(c){return this.setSize(c,this._height)},setHeight:function(c){return this.setSize(this._width,c)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(c){c&&c.style&&(c.style.width=this._width+"px",c.style.height=this._height+"px")},copy:function(c){return c.setAspectMode(this.aspectMode),c.aspectRatio=this.aspectRatio,c.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(c){this.setSize(c,this._height)}},height:{get:function(){return this._height},set:function(c){this.setSize(this._width,c)}}});d.NONE=0,d.WIDTH_CONTROLS_HEIGHT=1,d.HEIGHT_CONTROLS_WIDTH=2,d.FIT=3,d.ENVELOP=4,S.exports=d},15238:S=>{S.exports="add"},56187:S=>{S.exports="remove"},82348:(S,P,a)=>{S.exports={PROCESS_QUEUE_ADD:a(15238),PROCESS_QUEUE_REMOVE:a(56187)}},41392:(S,P,a)=>{S.exports={Events:a(82348),List:a(73162),Map:a(90330),ProcessQueue:a(25774),RTree:a(59542),Set:a(35072),Size:a(86555)}},57382:(S,P,a)=>{var y=a(83419),C=a(45319),g=a(40987),f=a(8054),d=a(50030),c=a(79237),h=new y({Extends:c,initialize:function(u,m,v,x,b){c.call(this,u,m,v,x,b),this.add("__BASE",0,0,0,x,b),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=x,this.height=b,this.imageData=this.context.getImageData(0,0,x,b),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===f.WEBGL&&this.refresh(),this},draw:function(p,u,m,v){return void 0===v&&(v=!0),this.context.drawImage(m,p,u),v&&this.update(),this},drawFrame:function(p,u,m,v,x){void 0===m&&(m=0),void 0===v&&(v=0),void 0===x&&(x=!0);var b=this.manager.getFrame(p,u);if(b){var T=b.canvasData,_=b.cutWidth,A=b.cutHeight,M=b.source.resolution;this.context.drawImage(b.source.image,T.x,T.y,_,A,m,v,_/M,A/M),x&&this.update()}return this},setPixel:function(p,u,m,v,x,b){if(void 0===b&&(b=255),p=Math.abs(Math.floor(p)),u=Math.abs(Math.floor(u)),this.getIndex(p,u)>-1){var _=this.context.getImageData(p,u,1,1);_.data[0]=m,_.data[1]=v,_.data[2]=x,_.data[3]=b,this.context.putImageData(_,p,u)}return this},putData:function(p,u,m,v,x,b,T){return void 0===v&&(v=0),void 0===x&&(x=0),void 0===b&&(b=p.width),void 0===T&&(T=p.height),this.context.putImageData(p,u,m,v,x,b,T),this},getData:function(p,u,m,v){return p=C(Math.floor(p),0,this.width-1),u=C(Math.floor(u),0,this.height-1),m=C(m,1,this.width-p),v=C(v,1,this.height-u),this.context.getImageData(p,u,m,v)},getPixel:function(p,u,m){m||(m=new g);var v=this.getIndex(p,u);if(v>-1){var x=this.data;m.setTo(x[v+0],x[v+1],x[v+2],x[v+3])}return m},getPixels:function(p,u,m,v){void 0===p&&(p=0),void 0===u&&(u=0),void 0===m&&(m=this.width),void 0===v&&(v=m),p=Math.abs(Math.round(p)),u=Math.abs(Math.round(u));for(var x=C(p,0,this.width),b=C(p+m,0,this.width),T=C(u,0,this.height),_=C(u+v,0,this.height),A=new g,M=[],I=T;I<_;I++){for(var R=[],F=x;F{var y=a(10312),C=a(38058),g=a(27919),f=a(83419),d=a(8054),c=a(4327),h=a(95540),p=a(36060),u=a(32302),m=a(79237),v=a(70554),x=new f({Extends:m,initialize:function(T,_,A,M){void 0===A&&(A=256),void 0===M&&(M=256),this.type="DynamicTexture";var I=T.game.renderer,R=I&&I.type===d.CANVAS,F=R?g.create2D(this,A,M):[this];m.call(this,T,_,F,A,M),this.add("__BASE",0,0,0,A,M),this.renderer=I,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=R?F:null,this.context=R?F.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new C(0,0,A,M).setScene(T.game.scene.systemScene,!1),this.renderTarget=R?null:new u(I,A,M,1,0,!1,!1,!0,!1),this.pipeline=R?null:I.pipelines.get(p.SINGLE_PIPELINE),this.setSize(A,M)},setSize:function(b,T){void 0===T&&(T=b);var _=this.get(),A=_.source;if(b!==this.width||T!==this.height){this.canvas&&(this.canvas.width=b,this.canvas.height=T);var M=this.renderTarget;M&&(M.willResize(b,T)&&M.resize(b,T),M.texture!==A.glTexture&&this.renderer.deleteTexture(A.glTexture),this.setFromRenderTarget()),this.camera.setSize(b,T),A.width=b,A.height=T,_.setSize(b,T),this.width=b,this.height=T}else{var I=this.getSourceImage();_.cutX+b>I.width&&(b=I.width-_.cutX),_.cutY+T>I.height&&(T=I.height-_.cutY),_.setSize(b,T,_.cutX,_.cutY)}return this},setFromRenderTarget:function(){var T=this.get().source,_=this.renderTarget;return T.isRenderTexture=!0,T.isGLTexture=!0,T.glTexture=_.texture,this},setIsSpriteTexture:function(b){return this.isSpriteTexture=b,this},fill:function(b,T,_,A,M,I){var F=this.renderer;void 0===T&&(T=1),void 0===_&&(_=0),void 0===A&&(A=0),void 0===M&&(M=this.width),void 0===I&&(I=this.height);var N=b>>16&255,V=b>>8&255,B=255&b,G=this.renderTarget;if(this.camera.preRender(),G){G.bind(!0);var Q=this.pipeline.manager.set(this.pipeline),H=F.width/G.width,K=F.height/G.height;Q.drawFillRect(_*H,(G.height-(A+I))*K,M*H,I*K,v.getTintFromFloats(B/255,V/255,N/255,1),T),G.unbind(!0)}else{var at=this.context;F.setContext(at),at.globalCompositeOperation="source-over",at.fillStyle="rgba("+N+","+V+","+B+","+T+")",at.fillRect(_,A,M,I),F.setContext()}return this.dirty=!0,this},clear:function(b,T,_,A){if(this.dirty){var M=this.context,I=this.renderTarget;I?I.clear(b,T,_,A):M&&(void 0!==b&&void 0!==T&&void 0!==_&&void 0!==A?M.clearRect(b,T,_,A):(M.save(),M.setTransform(1,0,0,1,0,0),M.clearRect(0,0,this.width,this.height),M.restore())),this.dirty=!1}return this},stamp:function(b,T,_,A,M){void 0===_&&(_=0),void 0===A&&(A=0);var I=h(M,"alpha",1),R=h(M,"tint",16777215),F=h(M,"angle",0),N=h(M,"rotation",0),V=h(M,"scale",1),B=h(M,"scaleX",V),G=h(M,"scaleY",V),Q=h(M,"originX",.5),H=h(M,"originY",.5),K=h(M,"blendMode",0),tt=h(M,"erase",!1),at=h(M,"skipBatch",!1),lt=this.manager.resetStamp(I,R);return lt.setAngle(0),0!==F?lt.setAngle(F):0!==N&<.setRotation(N),lt.setScale(B,G),lt.setTexture(b,T),lt.setOrigin(Q,H),lt.setBlendMode(K),tt&&(this._eraseMode=!0),at?this.batchGameObject(lt,_,A):this.draw(lt,_,A),tt&&(this._eraseMode=!1),this},erase:function(b,T,_){return this._eraseMode=!0,this.draw(b,T,_),this._eraseMode=!1,this},draw:function(b,T,_,A,M){return this.beginDraw(),this.batchDraw(b,T,_,A,M),this.endDraw(),this},drawFrame:function(b,T,_,A,M,I){return this.beginDraw(),this.batchDrawFrame(b,T,_,A,M,I),this.endDraw(),this},repeat:function(b,T,_,A,M,I,R,F,N){if(void 0===_&&(_=0),void 0===A&&(A=0),void 0===M&&(M=this.width),void 0===I&&(I=this.height),void 0===R&&(R=1),void 0===F&&(F=16777215),void 0===N&&(N=!1),!(T=b instanceof c?b:this.manager.getFrame(b,T)))return this;var V=this.manager.resetStamp(R,F);V.setFrame(T),V.setOrigin(0);var B=T.width,G=T.height;M=Math.floor(M),I=Math.floor(I);var Q=Math.ceil(M/B),H=Math.ceil(I/G),K=Q*B-M,tt=H*G-I;K>0&&(K=B-K),tt>0&&(tt=G-tt),_<0&&(Q+=Math.ceil(Math.abs(_)/B)),A<0&&(H+=Math.ceil(Math.abs(A)/G));var at=_,lt=A,q=!1,it=this.manager.stampCrop.setTo(0,0,B,G);N||this.beginDraw();for(var Y=0;Y0&&X===Q-1&&(q=!0,it.width=K),tt>0&&Y===H-1&&(q=!0,it.height=tt),q&&V.setCrop(it),this.batchGameObject(V,at,lt),V.isCropped=!1,it.setTo(0,0,B,G)),at+=B;at=_,lt+=G}return N||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var T=this.renderer,_=this.renderTarget;this.camera.preRender(),_?T.beginCapture(_.width,_.height):T.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(b,T,_,A,M){return Array.isArray(b)||(b=[b]),this.batchList(b,T,_,A,M),this},batchDrawFrame:function(b,T,_,A,M,I){void 0===_&&(_=0),void 0===A&&(A=0),void 0===M&&(M=1),void 0===I&&(I=16777215);var R=this.manager.getFrame(b,T);return R&&(this.renderTarget?this.pipeline.batchTextureFrame(R,_,A,I,M,this.camera.matrix,null):this.batchTextureFrame(R,_,A,M,I)),this},endDraw:function(b){if(void 0===b&&(b=this._eraseMode),this.isDrawing){var T=this.renderer,_=this.renderTarget;if(_){var A=T.endCapture();T.pipelines.setUtility().blitFrame(A,_,1,!1,!1,b,this.isSpriteTexture),T.resetScissor(),T.resetViewport()}else T.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(b,T,_,A,M){var I=b.length;if(0!==I)for(var R=0;R0&&N.height>0&&F.drawImage(V,N.x,N.y,N.width,N.height,T,_,N.width,N.height),F.restore()}},snapshotArea:function(b,T,_,A,M,I,R){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,M,!1,b,T,_,A,I,R):this.renderer.snapshotCanvas(this.canvas,M,!1,b,T,_,A,I,R),this},snapshot:function(b,T,_){return this.snapshotArea(0,0,this.width,this.height,b,T,_)},snapshotPixel:function(b,T,_){return this.snapshotArea(b,T,1,1,_,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(b,T,_,A){var M=this.manager.resetStamp();M.setTexture(this),M.setOrigin(0),M.renderWebGL(b,M,_,A)},renderCanvas:function(){},destroy:function(){var b=this.manager.stamp;b&&b.texture===this&&this.manager.resetStamp(),m.prototype.destroy.call(this),g.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});S.exports=x},4327:(S,P,a)=>{var y=a(83419),C=a(45319),g=a(79291),f=new y({initialize:function(c,h,p,u,m,v,x){this.texture=c,this.name=h,this.source=c.source[p],this.sourceIndex=p,this.x=0,this.y=0,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(v,x,u,m)},setCutPosition:function(d,c){return void 0===d&&(d=0),void 0===c&&(c=0),this.cutX=d,this.cutY=c,this.updateUVs()},setCutSize:function(d,c){return this.cutWidth=d,this.cutHeight=c,this.updateUVs()},setSize:function(d,c,h,p){void 0===h&&(h=0),void 0===p&&(p=0),this.setCutPosition(h,p),this.setCutSize(d,c),this.width=d,this.height=c,this.halfWidth=Math.floor(.5*d),this.halfHeight=Math.floor(.5*c),this.centerX=Math.floor(d/2),this.centerY=Math.floor(c/2);var u=this.data,m=u.cut;m.x=h,m.y=p,m.w=d,m.h=c,m.r=h+d,m.b=p+c,u.sourceSize.w=d,u.sourceSize.h=c,u.spriteSourceSize.w=d,u.spriteSourceSize.h=c,u.radius=.5*Math.sqrt(d*d+c*c);var v=u.drawImage;return v.x=h,v.y=p,v.width=d,v.height=c,this.updateUVs()},setTrim:function(d,c,h,p,u,m){var v=this.data,x=v.spriteSourceSize;return v.trim=!0,v.sourceSize.w=d,v.sourceSize.h=c,x.x=h,x.y=p,x.w=u,x.h=m,x.r=h+u,x.b=p+m,this.x=h,this.y=p,this.width=u,this.height=m,this.halfWidth=.5*u,this.halfHeight=.5*m,this.centerX=Math.floor(u/2),this.centerY=Math.floor(m/2),this.updateUVs()},setScale9:function(d,c,h,p){var u=this.data;return u.scale9=!0,u.is3Slice=0===c&&p===this.height,u.scale9Borders.x=d,u.scale9Borders.y=c,u.scale9Borders.w=h,u.scale9Borders.h=p,this},setCropUVs:function(d,c,h,p,u,m,v){var x=this.cutX,b=this.cutY,T=this.cutWidth,_=this.cutHeight,A=this.realWidth,M=this.realHeight,I=x+(c=C(c,0,A)),R=b+(h=C(h,0,M)),F=p=C(p,0,A-c),N=u=C(u,0,M-h),V=this.data;if(V.trim){var B=V.spriteSourceSize,G=c+(p=C(p,0,T-c)),Q=h+(u=C(u,0,_-h));if(B.rG||B.y>Q)I=0,R=0,F=0,N=0;else{var K=Math.max(B.x,c),tt=Math.max(B.y,h),at=Math.min(B.r,G)-K,lt=Math.min(B.b,Q)-tt;F=at,N=lt,I=m?x+(T-(K-B.x)-at):x+(K-B.x),R=v?b+(_-(tt-B.y)-lt):b+(tt-B.y),c=K,h=tt,p=at,u=lt}}else m&&(I=x+(T-c-p)),v&&(R=b+(_-h-u));var q=this.source.width,it=this.source.height;return d.u0=Math.max(0,I/q),d.v0=Math.max(0,R/it),d.u1=Math.min(1,(I+F)/q),d.v1=Math.min(1,(R+N)/it),d.x=c,d.y=h,d.cx=I,d.cy=R,d.cw=F,d.ch=N,d.width=p,d.height=u,d.flipX=m,d.flipY=v,d},updateCropUVs:function(d,c,h){return this.setCropUVs(d,d.x,d.y,d.width,d.height,c,h)},setUVs:function(d,c,h,p,u,m){var v=this.data.drawImage;return v.width=d,v.height=c,this.u0=h,this.v0=p,this.u1=u,this.v1=m,this},updateUVs:function(){var d=this.cutX,c=this.cutY,h=this.cutWidth,p=this.cutHeight,u=this.data.drawImage;u.width=h,u.height=p;var m=this.source.width,v=this.source.height;return this.u0=d/m,this.v0=c/v,this.u1=(d+h)/m,this.v1=(c+p)/v,this},updateUVsInverted:function(){var d=this.source.width,c=this.source.height;return this.u0=(this.cutX+this.cutHeight)/d,this.v0=this.cutY/c,this.u1=this.cutX/d,this.v1=(this.cutY+this.cutWidth)/c,this},clone:function(){var d=new f(this.texture,this.name,this.sourceIndex);return d.cutX=this.cutX,d.cutY=this.cutY,d.cutWidth=this.cutWidth,d.cutHeight=this.cutHeight,d.x=this.x,d.y=this.y,d.width=this.width,d.height=this.height,d.halfWidth=this.halfWidth,d.halfHeight=this.halfHeight,d.centerX=this.centerX,d.centerY=this.centerY,d.rotated=this.rotated,d.data=g(!0,d.data,this.data),d.updateUVs(),d},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});S.exports=f},79237:(S,P,a)=>{var y=a(83419),C=a(4327),g=a(11876),f='Texture "%s" has no frame "%s"',d=new y({initialize:function(h,p,u,m,v){Array.isArray(u)||(u=[u]),this.manager=h,this.key=p,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var x=0;xv&&(v=T.cutX+T.cutWidth),T.cutY+T.cutHeight>x&&(x=T.cutY+T.cutHeight)}return{x:u,y:m,width:v-u,height:x-m}},getFrameNames:function(c){void 0===c&&(c=!1);var h=Object.keys(this.frames);if(!c){var p=h.indexOf("__BASE");-1!==p&&h.splice(p,1)}return h},getSourceImage:function(c){(null==c||1===this.frameTotal)&&(c="__BASE");var h=this.frames[c];return h?h.source.image:(console.warn(f,this.key,c),this.frames.__BASE.source.image)},getDataSourceImage:function(c){(null==c||1===this.frameTotal)&&(c="__BASE");var p,h=this.frames[c];return h?p=h.sourceIndex:(console.warn(f,this.key,c),p=this.frames.__BASE.sourceIndex),this.dataSource[p].image},setDataSource:function(c){Array.isArray(c)||(c=[c]);for(var h=0;h{var y=a(27919),C=a(57382),g=a(83419),f=a(40987),d=a(8054),c=a(81320),h=a(50792),p=a(69442),u=a(4327),m=a(8443),v=a(99584),x=a(35154),b=a(88571),T=a(41212),_=a(61309),A=a(87841),M=a(79237),I=new g({Extends:h,initialize:function(F){h.call(this),this.game=F,this.name="TextureManager",this.list={},this._tempCanvas=y.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stampCrop=new A,this.silentWarnings=!1,F.events.once(m.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(p.LOAD,this.updatePending,this),this.on(p.ERROR,this.updatePending,this);var R=this.game.config;null!==R.defaultImage&&this.addBase64("__DEFAULT",R.defaultImage),null!==R.missingImage&&this.addBase64("__MISSING",R.missingImage),null!==R.whiteImage&&this.addBase64("__WHITE",R.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(m.DESTROY,this.destroy,this),this.game.events.once(m.SYSTEM_READY,function(F){this.stamp=new b(F).setOrigin(0)},this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(p.LOAD),this.off(p.ERROR),this.emit(p.READY))},checkKey:function(R){return!(!R||"string"!=typeof R||this.exists(R))||(this.silentWarnings||console.error("Texture key already in use: "+R),!1)},remove:function(R){if("string"==typeof R){if(!this.exists(R))return this.silentWarnings||console.warn("No texture found matching key: "+R),this;R=this.get(R)}var F=R.key;return this.list.hasOwnProperty(F)&&(R.destroy(),this.emit(p.REMOVE,F),this.emit(p.REMOVE_KEY+F)),this},removeKey:function(R){return this.list.hasOwnProperty(R)&&delete this.list[R],this},addBase64:function(R,F){if(this.checkKey(R)){var N=this,V=new Image;V.onerror=function(){N.emit(p.ERROR,R)},V.onload=function(){var B=N.create(R,V);_.Image(B,0),N.emit(p.ADD,R,B),N.emit(p.ADD_KEY+R,B),N.emit(p.LOAD,R,B)},V.src=F}return this},getBase64:function(R,F,N,V){void 0===N&&(N="image/png"),void 0===V&&(V=.92);var B="",G=this.getFrame(R,F);if(G&&(G.source.isRenderTexture||G.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(G){var Q=G.canvasData,H=y.create2D(this,Q.width,Q.height),K=H.getContext("2d",{willReadFrequently:!0});Q.width>0&&Q.height>0&&K.drawImage(G.source.image,Q.x,Q.y,Q.width,Q.height,0,0,Q.width,Q.height),B=H.toDataURL(N,V),y.remove(H)}return B},addImage:function(R,F,N){var V=null;return this.checkKey(R)&&(V=this.create(R,F),_.Image(V,0),N&&V.setDataSource(N),this.emit(p.ADD,R,V),this.emit(p.ADD_KEY+R,V)),V},addGLTexture:function(R,F){var N=null;if(this.checkKey(R)){var V=F.width,B=F.height;(N=this.create(R,F,V,B)).add("__BASE",0,0,0,V,B),this.emit(p.ADD,R,N),this.emit(p.ADD_KEY+R,N)}return N},addCompressedTexture:function(R,F,N){var V=null;if(this.checkKey(R)){if((V=this.create(R,F)).add("__BASE",0,0,0,F.width,F.height),N){var B=function(Q,H,K){Array.isArray(K.textures)||Array.isArray(K.frames)?_.JSONArray(Q,H,K):_.JSONHash(Q,H,K)};if(Array.isArray(N))for(var G=0;G=G.x&&R=G.y&&F=G.x&&R=G.y&&F{var y=a(27919),C=a(83419),g=a(50030),f=a(29795),d=a(82751),c=new C({initialize:function(p,u,m,v,x){void 0===x&&(x=!1);var b=p.manager.game;this.renderer=b.renderer,this.texture=p,this.source=u,this.image=u.compressed?null:u,this.compressionAlgorithm=u.compressed?u.format:null,this.resolution=1,this.width=m||u.naturalWidth||u.videoWidth||u.width||0,this.height=v||u.naturalHeight||u.videoHeight||u.height||0,this.scaleMode=f.DEFAULT,this.isCanvas=u instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&u instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===u.type||"DynamicTexture"===u.type,this.isGLTexture=u instanceof d,this.isPowerOf2=g(this.width,this.height),this.glTexture=null,this.flipY=x,this.init(b)},init:function(h){var p=this.renderer;if(p){var u=this.source;if(p.gl){var m=this.image,v=this.flipY,x=this.width,b=this.height,T=this.scaleMode;this.glTexture=this.isCanvas?p.createCanvasTexture(m,!1,v):this.isVideo?p.createVideoTexture(m,!1,v):this.isRenderTexture?p.createTextureFromSource(null,x,b,T):this.isGLTexture?u:this.compressionAlgorithm?p.createTextureFromSource(u,void 0,void 0,T):u instanceof Uint8Array?p.createUint8ArrayTexture(u,x,b,T):p.createTextureFromSource(m,x,b,T)}else this.isRenderTexture&&(this.image=u.canvas)}h.config.antialias||this.setFilter(1)},setFilter:function(h){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,h),this.scaleMode=h},setFlipY:function(h){return void 0===h&&(h=!0),h===this.flipY||(this.flipY=h,this.update()),this},update:function(){var h=this.renderer,p=this.image,u=this.flipY,m=h.gl;m&&this.isCanvas?h.updateCanvasTexture(p,this.glTexture,u):m&&this.isVideo&&h.updateVideoTexture(p,this.glTexture,u)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&y.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});S.exports=c},19673:S=>{S.exports={LINEAR:0,NEAREST:1}},44538:S=>{S.exports="addtexture"},63486:S=>{S.exports="addtexture-"},94851:S=>{S.exports="onerror"},29099:S=>{S.exports="onload"},8678:S=>{S.exports="ready"},86415:S=>{S.exports="removetexture"},30879:S=>{S.exports="removetexture-"},69442:(S,P,a)=>{S.exports={ADD:a(44538),ADD_KEY:a(63486),ERROR:a(94851),LOAD:a(29099),READY:a(8678),REMOVE:a(86415),REMOVE_KEY:a(30879)}},27458:(S,P,a)=>{var y=a(79291),C=a(19673),g={CanvasTexture:a(57382),DynamicTexture:a(81320),Events:a(69442),FilterMode:C,Frame:a(4327),Parsers:a(61309),Texture:a(79237),TextureManager:a(17130),TextureSource:a(11876)};g=y(!1,g,C),S.exports=g},89905:S=>{S.exports=function(a,y,C){if(C.getElementsByTagName("TextureAtlas")){var g=a.source[y];a.add("__BASE",y,0,0,g.width,g.height);for(var d,f=C.getElementsByTagName("SubTexture"),c=0;c{S.exports=function(a,y){var C=a.source[y];return a.add("__BASE",y,0,0,C.width,C.height),a}},4832:S=>{S.exports=function(a,y){var C=a.source[y];return a.add("__BASE",y,0,0,C.width,C.height),a}},78566:(S,P,a)=>{var y=a(41786);S.exports=function(g,f,d){if(d.frames||d.textures){var c=g.source[f];g.add("__BASE",f,0,0,c.width,c.height);for(var p,h=Array.isArray(d.textures)?d.textures[f].frames:d.frames,u=0;u{var y=a(41786);S.exports=function(g,f,d){if(d.frames){var c=g.source[f];g.add("__BASE",f,0,0,c.width,c.height);var p,h=d.frames;for(var u in h)if(h.hasOwnProperty(u)){var m=h[u];if(!(p=g.add(u,f,m.frame.x,m.frame.y,m.frame.w,m.frame.h))){console.warn("Invalid atlas json, frame already exists: "+u);continue}m.trimmed&&p.setTrim(m.sourceSize.w,m.sourceSize.h,m.spriteSourceSize.x,m.spriteSourceSize.y,m.spriteSourceSize.w,m.spriteSourceSize.h),m.rotated&&(p.rotated=!0,p.updateUVsInverted());var v=m.anchor||m.pivot;v&&(p.customPivot=!0,p.pivotX=v.x,p.pivotY=v.y),m.scale9Borders&&p.setScale9(m.scale9Borders.x,m.scale9Borders.y,m.scale9Borders.w,m.scale9Borders.h),p.customData=y(m)}for(var x in d)"frames"!==x&&(g.customData[x]=Array.isArray(d[x])?d[x].slice(0):d[x]);return g}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},31403:S=>{S.exports=function(a){var C,y=[171,75,84,88,32,49,49,187,13,10,26,10],g=new Uint8Array(a,0,12);for(C=0;C>1),A=Math.max(1,A>>1),T+=M}return{mipmaps:b,width:u,height:m,internalFormat:p,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},82038:S=>{function P(F,N,V,B,G,Q,H){return void 0===H&&(H=16),Math.floor((F+V)/G)*Math.floor((N+B)/Q)*H}function a(F,N){return(F=Math.max(F,16))*(N=Math.max(N,8))/4}function y(F,N){return(F=Math.max(F,8))*(N=Math.max(N,8))/2}function C(F,N){return Math.ceil(F/4)*Math.ceil(N/4)*16}function g(F,N){return P(F,N,3,3,4,4,8)}function f(F,N){return P(F,N,3,3,4,4)}var I={0:{sizeFunc:a,glFormat:[35841]},1:{sizeFunc:a,glFormat:[35843]},2:{sizeFunc:y,glFormat:[35840]},3:{sizeFunc:y,glFormat:[35842]},6:{sizeFunc:g,glFormat:[36196]},7:{sizeFunc:g,glFormat:[33776,35916]},8:{sizeFunc:f,glFormat:[33777,35917]},9:{sizeFunc:f,glFormat:[33778,35918]},11:{sizeFunc:f,glFormat:[33779,35919]},14:{sizeFunc:C,glFormat:[36494,36495]},15:{sizeFunc:C,glFormat:[36492,36493]},22:{sizeFunc:g,glFormat:[37492,37493]},23:{sizeFunc:f,glFormat:[37496,37497]},24:{sizeFunc:g,glFormat:[37494,37495]},25:{sizeFunc:g,glFormat:[37488]},26:{sizeFunc:f,glFormat:[37490]},27:{sizeFunc:f,glFormat:[37808,37840]},28:{sizeFunc:function d(F,N){return P(F,N,4,3,5,4)},glFormat:[37809,37841]},29:{sizeFunc:function c(F,N){return P(F,N,4,4,5,5)},glFormat:[37810,37842]},30:{sizeFunc:function h(F,N){return P(F,N,5,4,6,5)},glFormat:[37811,37843]},31:{sizeFunc:function p(F,N){return P(F,N,5,5,6,6)},glFormat:[37812,37844]},32:{sizeFunc:function u(F,N){return P(F,N,7,4,8,5)},glFormat:[37813,37845]},33:{sizeFunc:function m(F,N){return P(F,N,7,5,8,6)},glFormat:[37814,37846]},34:{sizeFunc:function v(F,N){return P(F,N,7,7,8,8)},glFormat:[37815,37847]},35:{sizeFunc:function x(F,N){return P(F,N,9,4,10,5)},glFormat:[37816,37848]},36:{sizeFunc:function b(F,N){return P(F,N,9,5,10,6)},glFormat:[37817,37849]},37:{sizeFunc:function T(F,N){return P(F,N,9,7,10,8)},glFormat:[37818,37850]},38:{sizeFunc:function _(F,N){return P(F,N,9,9,10,10)},glFormat:[37819,37851]},39:{sizeFunc:function A(F,N){return P(F,N,11,9,12,10)},glFormat:[37820,37852]},40:{sizeFunc:function M(F,N){return P(F,N,11,11,12,12)},glFormat:[37821,37853]}};S.exports=function(F){for(var N=new Uint32Array(F,0,13),G=55727696===N[0]?N[2]:N[3],H=I[G].glFormat[N[4]],K=I[G].sizeFunc,tt=N[11],at=N[7],lt=N[6],it=new Uint8Array(F,52+N[12]),Y=new Array(tt),X=0,nt=at,dt=lt,gt=0;gt>1),dt=Math.max(1,dt>>1),X+=bt}return{mipmaps:Y,width:at,height:lt,internalFormat:H,compressed:!0,generateMipmap:!1}}},75549:(S,P,a)=>{var y=a(95540);S.exports=function(g,f,d,c,h,p,u){var m=y(u,"frameWidth",null),v=y(u,"frameHeight",m);if(null===m)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var x=g.source[f];g.add("__BASE",f,0,0,x.width,x.height);var b=y(u,"startFrame",0),T=y(u,"endFrame",-1),_=y(u,"margin",0),A=y(u,"spacing",0),R=Math.floor((h-_+A)/(m+A))*Math.floor((p-_+A)/(v+A));0===R&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",g.key),(b>R||b<-R)&&(b=0),b<0&&(b=R+b),(-1===T||T>R||Th&&(V=H-h),K>p&&(B=K-p),Q>=b&&Q<=T&&(g.add(G,f,d+F,c+N,m-V,v-B),G++),(F+=m+A)+m>h&&(F=_,N+=v+A)}return g}},47534:(S,P,a)=>{var y=a(95540);S.exports=function(g,f,d){var c=y(d,"frameWidth",null),h=y(d,"frameHeight",c);if(!c)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var p=g.source[0];g.add("__BASE",0,0,0,p.width,p.height);var u=y(d,"startFrame",0),m=y(d,"endFrame",-1),v=y(d,"margin",0),x=y(d,"spacing",0),b=f.cutX,T=f.cutY,_=f.cutWidth,A=f.cutHeight,M=f.realWidth,I=f.realHeight,R=Math.floor((M-v+x)/(c+x)),F=Math.floor((I-v+x)/(h+x)),N=R*F,V=f.x,B=c-V,G=c-(M-_-V),Q=f.y,H=h-Q,K=h-(I-A-Q);(u>N||u<-N)&&(u=0),u<0&&(u=N+u),-1!==m&&(N=u+(m+1));for(var tt,at=v,lt=v,q=0,Y=0;Y{var P=0,a=function(C,g,f,d){C.add(f,g,d.x,P-d.y-d.height,d.width,d.height)};S.exports=function(C,g,f){var d=C.source[g];C.add("__BASE",g,0,0,d.width,d.height),P=d.height;for(var c=f.split("\n"),h=/^[ ]*(- )*(\w+)+[: ]+(.*)/,p="",u="",m={x:0,y:0,width:0,height:0},v=0;v{var y=a(50030);function g(p){for(var u=p.mipmaps,m=0;m{S.exports={AtlasXML:a(89905),Canvas:a(72893),Image:a(4832),JSONArray:a(78566),JSONHash:a(39711),KTXParser:a(31403),PVRParser:a(82038),SpriteSheet:a(75549),SpriteSheetFromAtlas:a(47534),UnityYAML:a(86147)}},80341:S=>{S.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(S,P,a)=>{var C=new(a(83419))({initialize:function(f,d,c,h,p,u,m){(void 0===c||c<=0)&&(c=32),(void 0===h||h<=0)&&(h=32),void 0===p&&(p=0),void 0===u&&(u=0),this.name=f,this.firstgid=0|d,this.imageWidth=0|c,this.imageHeight=0|h,this.imageMargin=0|p,this.imageSpacing=0|u,this.properties=m||{},this.images=[],this.total=0},containsImageIndex:function(g){return g>=this.firstgid&&g{var C=new(a(83419))({initialize:function(f){if(this.gids=[],void 0!==f)for(var d=0;d{var y=a(80341),C=a(87010),g=a(46177),f=a(49075);S.exports=function(c,h,p,u,m,v,x,b){void 0===p&&(p=32),void 0===u&&(u=32),void 0===m&&(m=10),void 0===v&&(v=10),void 0===b&&(b=!1);var T=null;if(Array.isArray(x))T=g(void 0!==h?h:"map",y.ARRAY_2D,x,p,u,b);else if(void 0!==h){var A=c.cache.tilemap.get(h);A?T=g(h,A.format,A.data,p,u,b):console.warn("No map data found for key "+h)}return null===T&&(T=new C({tileWidth:p,tileHeight:u,width:m,height:v})),new f(c,T)}},23029:(S,P,a)=>{var y=a(83419),C=a(31401),g=a(91907),f=a(62644),d=a(93232),c=new y({Mixins:[C.AlphaSingle,C.Flip,C.Visible],initialize:function(p,u,m,v,x,b,T,_){this.layer=p,this.index=u,this.x=m,this.y=v,this.width=x,this.height=b,this.baseWidth=void 0!==T?T:x,this.baseHeight=void 0!==_?_:b,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(h,p){return!(hthis.right||p>this.bottom)},copy:function(h){return this.index=h.index,this.alpha=h.alpha,this.properties=f(h.properties),this.visible=h.visible,this.setFlip(h.flipX,h.flipY),this.tint=h.tint,this.rotation=h.rotation,this.collideUp=h.collideUp,this.collideDown=h.collideDown,this.collideLeft=h.collideLeft,this.collideRight=h.collideRight,this.collisionCallback=h.collisionCallback,this.collisionCallbackContext=h.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(h){var p=this.tilemapLayer;return p?p.tileToWorldXY(this.x,this.y,void 0,h).x:this.x*this.baseWidth},getRight:function(h){var p=this.tilemapLayer;return p?this.getLeft(h)+this.width*p.scaleX:this.getLeft(h)+this.width},getTop:function(h){var p=this.tilemapLayer;return p?p.tileToWorldXY(this.x,this.y,void 0,h).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(h){var p=this.tilemapLayer;return p?this.getTop(h)+this.height*p.scaleY:this.getTop(h)+this.height},getBounds:function(h,p){return void 0===p&&(p=new d),p.x=this.getLeft(h),p.y=this.getTop(h),p.width=this.getRight(h)-p.x,p.height=this.getBottom(h)-p.y,p},getCenterX:function(h){return(this.getLeft(h)+this.getRight(h))/2},getCenterY:function(h){return(this.getTop(h)+this.getBottom(h))/2},intersects:function(h,p,u,m){return!(u<=this.pixelX||m<=this.pixelY||h>=this.right||p>=this.bottom)},isInteresting:function(h,p){return h&&p?this.canCollide||this.hasInterestingFace:h?this.collides:!!p&&this.hasInterestingFace},resetCollision:function(h){return void 0===h&&(h=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,h&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(h,p,u,m,v){return void 0===p&&(p=h),void 0===u&&(u=h),void 0===m&&(m=h),void 0===v&&(v=!0),this.collideLeft=h,this.collideRight=p,this.collideUp=u,this.collideDown=m,this.faceLeft=h,this.faceRight=p,this.faceTop=u,this.faceBottom=m,v&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(h,p){return null===h?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=h,this.collisionCallbackContext=p),this},setSize:function(h,p,u,m){return void 0!==h&&(this.width=h),void 0!==p&&(this.height=p),void 0!==u&&(this.baseWidth=u),void 0!==m&&(this.baseHeight=m),this.updatePixelXY(),this},updatePixelXY:function(){var h=this.layer.orientation;if(h===g.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(h===g.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(h===g.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(h===g.HEXAGONAL){var x,p=this.layer.staggerAxis,u=this.layer.staggerIndex,m=this.layer.hexSideLength;"y"===p?(x=(this.baseHeight-m)/2+m,this.pixelX="odd"===u?this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*x):"x"===p&&(this.pixelX=this.x*((this.baseWidth-m)/2+m),this.pixelY="odd"===u?this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var h=this.layer.tilemapLayer;if(h){var p=h.gidMap[this.index];if(p)return p}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var h=this.tilemapLayer;return h?h.tilemap:null}}});S.exports=c},49075:(S,P,a)=>{var y=a(84101),C=a(83419),g=a(39506),f=a(80341),d=a(95540),c=a(14977),h=a(27462),p=a(91907),u=a(36305),m=a(19133),v=a(68287),x=a(23029),b=a(81086),T=a(20442),_=a(33629),A=new C({initialize:function(I,R){this.scene=I,this.tileWidth=R.tileWidth,this.tileHeight=R.tileHeight,this.width=R.width,this.height=R.height,this.orientation=R.orientation,this.renderOrder=R.renderOrder,this.format=R.format,this.version=R.version,this.properties=R.properties,this.widthInPixels=R.widthInPixels,this.heightInPixels=R.heightInPixels,this.imageCollections=R.imageCollections,this.images=R.images,this.layers=R.layers,this.tiles=R.tiles,this.tilesets=R.tilesets,this.objects=R.objects,this.currentLayerIndex=0,this.hexSideLength=R.hexSideLength;var F=this.orientation;this._convert={WorldToTileXY:b.GetWorldToTileXYFunction(F),WorldToTileX:b.GetWorldToTileXFunction(F),WorldToTileY:b.GetWorldToTileYFunction(F),TileToWorldXY:b.GetTileToWorldXYFunction(F),TileToWorldX:b.GetTileToWorldXFunction(F),TileToWorldY:b.GetTileToWorldYFunction(F),GetTileCorners:b.GetTileCornersFunction(F)}},setRenderOrder:function(M){var I=["right-down","left-down","right-up","left-up"];return"number"==typeof M&&(M=I[M]),I.indexOf(M)>-1&&(this.renderOrder=M),this},addTilesetImage:function(M,I,R,F,N,V,B,G){if(void 0===M)return null;null==I&&(I=M);var Q=this.scene.sys.textures;if(!Q.exists(I))return console.warn('Texture key "%s" not found',I),null;var H=Q.get(I),K=this.getTilesetIndex(M);if(null===K&&this.format===f.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',M,this.tilesets),null;var tt=this.tilesets[K];return tt?((R||F)&&tt.setTileSize(R,F),(N||V)&&tt.setSpacing(N,V),tt.setImage(H),tt):(void 0===R&&(R=this.tileWidth),void 0===F&&(F=this.tileHeight),void 0===N&&(N=0),void 0===V&&(V=0),void 0===B&&(B=0),void 0===G&&(G={x:0,y:0}),(tt=new _(M,B,R,F,N,V,void 0,void 0,G)).setImage(H),this.tilesets.push(tt),this.tiles=y(this),tt)},copy:function(M,I,R,F,N,V,B,G){return null!==(G=this.getLayer(G))?(b.Copy(M,I,R,F,N,V,B,G),this):null},createBlankLayer:function(M,I,R,F,N,V,B,G){if(void 0===R&&(R=0),void 0===F&&(F=0),void 0===N&&(N=this.width),void 0===V&&(V=this.height),void 0===B&&(B=this.tileWidth),void 0===G&&(G=this.tileHeight),null!==this.getLayerIndex(M))return console.warn("Invalid Tilemap Layer ID: "+M),null;for(var K,H=new c({name:M,tileWidth:B,tileHeight:G,width:N,height:V,orientation:this.orientation}),tt=0;tt-1&&this.putTileAt(I,V.x,V.y,R,V.tilemapLayer)}return F},removeTileAt:function(M,I,R,F,N){return void 0===R&&(R=!0),void 0===F&&(F=!0),null===(N=this.getLayer(N))?null:b.RemoveTileAt(M,I,R,F,N)},removeTileAtWorldXY:function(M,I,R,F,N,V){return void 0===R&&(R=!0),void 0===F&&(F=!0),null===(V=this.getLayer(V))?null:b.RemoveTileAtWorldXY(M,I,R,F,N,V)},renderDebug:function(M,I,R){return null===(R=this.getLayer(R))?null:(this.orientation===p.ORTHOGONAL&&b.RenderDebug(M,I,R),this)},renderDebugFull:function(M,I){for(var R=this.layers,F=0;F{var y=a(44603),C=a(31989);y.register("tilemap",function(g){var f=void 0!==g?g:{};return C(this.scene,f.key,f.tileWidth,f.tileHeight,f.width,f.height,f.data,f.insertNull)})},46029:(S,P,a)=>{var y=a(39429),C=a(31989);y.register("tilemap",function(g,f,d,c,h,p,u){return null===g&&(g=void 0),null===f&&(f=void 0),null===d&&(d=void 0),null===c&&(c=void 0),null===h&&(h=void 0),C(this.scene,g,f,d,c,h,p,u)})},20442:(S,P,a)=>{var y=a(83419),C=a(78389),g=a(31401),f=a(95643),d=a(81086),c=a(19218),h=a(26099),p=new y({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.ComputedSize,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.Transform,g.Visible,g.ScrollFactor,C,c],initialize:function(m,v,x,b,T,_){f.call(this,m,"TilemapLayer"),this.isTilemap=!0,this.tilemap=v,this.layerIndex=x,this.layer=v.layers[x],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=d.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new h,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(b),this.setAlpha(this.layer.alpha),this.setPosition(T,_),this.setOrigin(0,0),this.setSize(v.tileWidth*this.layer.width,v.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(u){var m=[],v=[],x=this.tilemap;Array.isArray(u)||(u=[u]);for(var b=0;b=0&&u<4&&(this._renderOrder=u),this},calculateFacesAt:function(u,m){return d.CalculateFacesAt(u,m,this.layer),this},calculateFacesWithin:function(u,m,v,x){return d.CalculateFacesWithin(u,m,v,x,this.layer),this},createFromTiles:function(u,m,v,x,b){return d.CreateFromTiles(u,m,v,x,b,this.layer)},cull:function(u){return this.cullCallback(this.layer,u,this.culledTiles,this._renderOrder)},copy:function(u,m,v,x,b,T,_){return d.Copy(u,m,v,x,b,T,_,this.layer),this},fill:function(u,m,v,x,b,T){return d.Fill(u,m,v,x,b,T,this.layer),this},filterTiles:function(u,m,v,x,b,T,_){return d.FilterTiles(u,m,v,x,b,T,_,this.layer)},findByIndex:function(u,m,v){return d.FindByIndex(u,m,v,this.layer)},findTile:function(u,m,v,x,b,T,_){return d.FindTile(u,m,v,x,b,T,_,this.layer)},forEachTile:function(u,m,v,x,b,T,_){return d.ForEachTile(u,m,v,x,b,T,_,this.layer),this},setTint:function(u,m,v,x,b,T){return void 0===u&&(u=16777215),this.forEachTile(function(A){A.tint=u,A.tintFill=!1},this,m,v,x,b,T)},setTintFill:function(u,m,v,x,b,T){return void 0===u&&(u=16777215),this.forEachTile(function(A){A.tint=u,A.tintFill=!0},this,m,v,x,b,T)},getTileAt:function(u,m,v){return d.GetTileAt(u,m,v,this.layer)},getTileAtWorldXY:function(u,m,v,x){return d.GetTileAtWorldXY(u,m,v,x,this.layer)},getIsoTileAtWorldXY:function(u,m,v,x,b){void 0===v&&(v=!0);var T=this.tempVec;return d.IsometricWorldToTileXY(u,m,!0,T,b,this.layer,v),this.getTileAt(T.x,T.y,x)},getTilesWithin:function(u,m,v,x,b){return d.GetTilesWithin(u,m,v,x,b,this.layer)},getTilesWithinShape:function(u,m,v){return d.GetTilesWithinShape(u,m,v,this.layer)},getTilesWithinWorldXY:function(u,m,v,x,b,T){return d.GetTilesWithinWorldXY(u,m,v,x,b,T,this.layer)},hasTileAt:function(u,m){return d.HasTileAt(u,m,this.layer)},hasTileAtWorldXY:function(u,m,v){return d.HasTileAtWorldXY(u,m,v,this.layer)},putTileAt:function(u,m,v,x){return d.PutTileAt(u,m,v,x,this.layer)},putTileAtWorldXY:function(u,m,v,x,b){return d.PutTileAtWorldXY(u,m,v,x,b,this.layer)},putTilesAt:function(u,m,v,x){return d.PutTilesAt(u,m,v,x,this.layer),this},randomize:function(u,m,v,x,b){return d.Randomize(u,m,v,x,b,this.layer),this},removeTileAt:function(u,m,v,x){return d.RemoveTileAt(u,m,v,x,this.layer)},removeTileAtWorldXY:function(u,m,v,x,b){return d.RemoveTileAtWorldXY(u,m,v,x,b,this.layer)},renderDebug:function(u,m){return d.RenderDebug(u,m,this.layer),this},replaceByIndex:function(u,m,v,x,b,T){return d.ReplaceByIndex(u,m,v,x,b,T,this.layer),this},setSkipCull:function(u){return void 0===u&&(u=!0),this.skipCull=u,this},setCullPadding:function(u,m){return void 0===u&&(u=1),void 0===m&&(m=1),this.cullPaddingX=u,this.cullPaddingY=m,this},setCollision:function(u,m,v,x){return d.SetCollision(u,m,v,this.layer,x),this},setCollisionBetween:function(u,m,v,x){return d.SetCollisionBetween(u,m,v,x,this.layer),this},setCollisionByProperty:function(u,m,v){return d.SetCollisionByProperty(u,m,v,this.layer),this},setCollisionByExclusion:function(u,m,v){return d.SetCollisionByExclusion(u,m,v,this.layer),this},setCollisionFromCollisionGroup:function(u,m){return d.SetCollisionFromCollisionGroup(u,m,this.layer),this},setTileIndexCallback:function(u,m,v){return d.SetTileIndexCallback(u,m,v,this.layer),this},setTileLocationCallback:function(u,m,v,x,b,T){return d.SetTileLocationCallback(u,m,v,x,b,T,this.layer),this},shuffle:function(u,m,v,x){return d.Shuffle(u,m,v,x,this.layer),this},swapByIndex:function(u,m,v,x,b,T){return d.SwapByIndex(u,m,v,x,b,T,this.layer),this},tileToWorldX:function(u,m){return this.tilemap.tileToWorldX(u,m,this)},tileToWorldY:function(u,m){return this.tilemap.tileToWorldY(u,m,this)},tileToWorldXY:function(u,m,v,x){return this.tilemap.tileToWorldXY(u,m,v,x,this)},getTileCorners:function(u,m,v){return this.tilemap.getTileCorners(u,m,v,this)},weightedRandomize:function(u,m,v,x,b){return d.WeightedRandomize(m,v,x,b,u,this.layer),this},worldToTileX:function(u,m,v){return this.tilemap.worldToTileX(u,m,v,this)},worldToTileY:function(u,m,v){return this.tilemap.worldToTileY(u,m,v,this)},worldToTileXY:function(u,m,v,x,b){return this.tilemap.worldToTileXY(u,m,v,x,b,this)},destroy:function(u){void 0===u&&(u=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),u&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],f.prototype.destroy.call(this))}});S.exports=p},16153:(S,P,a)=>{var y=a(61340),C=new y,g=new y,f=new y;S.exports=function(c,h,p,u){var m=h.cull(p),v=m.length,x=p.alpha*h.alpha;if(!(0===v||x<=0)){var b=C,T=g,_=f;T.applyITRS(h.x,h.y,h.rotation,h.scaleX,h.scaleY),b.copyFrom(p.matrix);var A=c.currentContext,M=h.gidMap;A.save(),u?(b.multiplyWithOffset(u,-p.scrollX*h.scrollFactorX,-p.scrollY*h.scrollFactorY),T.e=h.x,T.f=h.y,b.multiply(T,_),_.copyToContext(A)):(T.e-=p.scrollX*h.scrollFactorX,T.f-=p.scrollY*h.scrollFactorY,T.copyToContext(A)),(!c.antialias||h.scaleX>1||h.scaleY>1)&&(A.imageSmoothingEnabled=!1);for(var I=0;I{var C,g;a(29747),C=a(99558),g=a(16153),S.exports={renderWebGL:C,renderCanvas:g}},99558:(S,P,a)=>{var y=a(70554);S.exports=function(g,f,d){var c=f.cull(d),h=c.length,p=d.alpha*f.alpha;if(!(0===h||p<=0)){var u=f.gidMap,m=g.pipelines.set(f.pipeline,f),v=y.getTintAppendFloatAlpha,x=f.scrollFactorX,b=f.scrollFactorY,T=f.x,_=f.y,A=f.scaleX,M=f.scaleY;g.pipelines.preBatch(f);for(var I=0;I{var y=a(83419),C=a(26099),g=new y({initialize:function(d,c,h,p,u,m,v,x,b){(void 0===h||h<=0)&&(h=32),(void 0===p||p<=0)&&(p=32),void 0===u&&(u=0),void 0===m&&(m=0),void 0===v&&(v={}),void 0===x&&(x={}),this.name=d,this.firstgid=c,this.tileWidth=h,this.tileHeight=p,this.tileMargin=u,this.tileSpacing=m,this.tileProperties=v,this.tileData=x,this.tileOffset=new C,void 0!==b&&this.tileOffset.set(b.x,b.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(f){return this.containsTileIndex(f)?this.tileProperties[f-this.firstgid]:null},getTileData:function(f){return this.containsTileIndex(f)?this.tileData[f-this.firstgid]:null},getTileCollisionGroup:function(f){var d=this.getTileData(f);return d&&d.objectgroup?d.objectgroup:null},containsTileIndex:function(f){return f>=this.firstgid&&fc.width||d.height>c.height?this.updateTileData(d.width,d.height):this.updateTileData(c.width,c.height,c.x,c.y),this},setTileSize:function(f,d){return void 0!==f&&(this.tileWidth=f),void 0!==d&&(this.tileHeight=d),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(f,d){return void 0!==f&&(this.tileMargin=f),void 0!==d&&(this.tileSpacing=d),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(f,d,c,h){void 0===c&&(c=0),void 0===h&&(h=0);var p=(d-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),u=(f-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(p%1!=0||u%1!=0)&&console.warn("Image tile area not tile size multiple in: "+this.name),p=Math.floor(p),u=Math.floor(u),this.rows=p,this.columns=u,this.total=p*u,this.texCoordinates.length=0;for(var m=this.tileMargin+c,v=this.tileMargin+h,x=0;x{var y=a(7423);S.exports=function(g,f,d){var c=y(g,f,!0,d),h=y(g,f-1,!0,d),p=y(g,f+1,!0,d),u=y(g-1,f,!0,d),m=y(g+1,f,!0,d),v=c&&c.collides;return v&&(c.faceTop=!0,c.faceBottom=!0,c.faceLeft=!0,c.faceRight=!0),h&&h.collides&&(v&&(c.faceTop=!1),h.faceBottom=!v),p&&p.collides&&(v&&(c.faceBottom=!1),p.faceTop=!v),u&&u.collides&&(v&&(c.faceLeft=!1),u.faceRight=!v),m&&m.collides&&(v&&(c.faceRight=!1),m.faceLeft=!v),c&&!c.collides&&c.resetFaces(),c}},42573:(S,P,a)=>{var y=a(7423),C=a(7386);S.exports=function(f,d,c,h,p){for(var u=null,m=null,v=null,x=null,b=C(f,d,c,h,null,p),T=0;T{var C=new(a(26099));S.exports=function(f,d,c,h){var p=c.tilemapLayer,u=p.cullPaddingX,m=p.cullPaddingY,v=p.tilemap.tileToWorldXY(f,d,C,h,p);return v.x>h.worldView.x+p.scaleX*c.tileWidth*(-u-.5)&&v.xh.worldView.y+p.scaleY*c.tileHeight*(-m-1)&&v.y{var y=a(42573),C=a(7386),g=a(62991),f=a(23029);S.exports=function(c,h,p,u,m,v,x,b){void 0===x&&(x=!0);var T=C(c,h,p,u,null,b),_=[];T.forEach(function(V){var B=new f(V.layer,V.index,V.x,V.y,V.width,V.height,V.baseWidth,V.baseHeight);B.copy(V),_.push(B)});for(var A=m-c,M=v-h,I=0;I<_.length;I++){var R=_[I],F=R.x+A,N=R.y+M;g(F,N,b)&&b.data[N][F]&&(R.x=F,R.y=N,R.updatePixelXY(),b.data[N][F]=R)}x&&y(m-1,v-1,p+2,u+2,b),T.length=0,_.length=0}},78419:(S,P,a)=>{var y=a(62644),C=a(7386),g=a(27987);S.exports=function(d,c,h,p,u,m){h||(h={}),Array.isArray(d)||(d=[d]);var v=m.tilemapLayer;p||(p=v.scene),u||(u=p.cameras.main);var A,x=m.width,b=m.height,T=C(0,0,x,b,null,m),_=[],M=function(N,V,B){for(var G=0;G{var y=a(87841),C=a(63448),g=a(56583),f=new y;S.exports=function(c,h){var p=c.tilemapLayer.tilemap,u=c.tilemapLayer,m=Math.floor(p.tileWidth*u.scaleX),v=Math.floor(p.tileHeight*u.scaleY),x=g(h.worldView.x-u.x,m,0,!0)-u.cullPaddingX,b=C(h.worldView.right-u.x,m,0,!0)+u.cullPaddingX,T=g(h.worldView.y-u.y,v,0,!0)-u.cullPaddingY,_=C(h.worldView.bottom-u.y,v,0,!0)+u.cullPaddingY;return f.setTo(x,T,b-x,_-T)}},30003:(S,P,a)=>{var y=a(19545),C=a(32483);S.exports=function(f,d,c,h){void 0===c&&(c=[]),void 0===h&&(h=0),c.length=0;var p=f.tilemapLayer,u=y(f,d);return(p.skipCull||1!==p.scrollFactorX||1!==p.scrollFactorY)&&(u.left=0,u.right=f.width,u.top=0,u.bottom=f.height),C(f,u,h,c),c}},35137:(S,P,a)=>{var y=a(7386),C=a(42573),g=a(20576);S.exports=function(d,c,h,p,u,m,v){for(var x=-1!==v.collideIndexes.indexOf(d),b=y(c,h,p,u,null,v),T=0;T{var y=a(7386);S.exports=function(g,f,d,c,h,p,u,m){return y(d,c,h,p,u,m).filter(g,f)}},52692:S=>{S.exports=function(a,y,C,g){void 0===y&&(y=0),void 0===C&&(C=!1);var d,c,h,f=0;if(C){for(c=g.height-1;c>=0;c--)for(d=g.width-1;d>=0;d--)if((h=g.data[c][d])&&h.index===a){if(f===y)return h;f+=1}}else for(c=0;c{var y=a(7386);S.exports=function(g,f,d,c,h,p,u,m){return y(d,c,h,p,u,m).find(g,f)||null}},97560:(S,P,a)=>{var y=a(7386);S.exports=function(g,f,d,c,h,p,u,m){y(d,c,h,p,u,m).forEach(g,f)}},43305:(S,P,a)=>{var y=a(91907),C=a(30003),g=a(9474),f=a(14018),d=a(29747),c=a(54503);S.exports=function(p){return p===y.ORTHOGONAL?C:p===y.HEXAGONAL?g:p===y.STAGGERED?c:p===y.ISOMETRIC?f:d}},7423:(S,P,a)=>{var y=a(62991);S.exports=function(g,f,d,c){if(y(g,f,c)){var h=c.data[f][g]||null;return h?-1===h.index?d?h:null:h:null}return null}},60540:(S,P,a)=>{var y=a(7423),g=new(a(26099));S.exports=function(d,c,h,p,u){return u.tilemapLayer.worldToTileXY(d,c,!0,g,p),y(g.x,g.y,h,u)}},55826:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c){var h=c.baseTileWidth,p=c.baseTileHeight,u=c.tilemapLayer,m=0,v=0;u&&(d||(d=u.scene.cameras.main),m=u.x+d.scrollX*(1-u.scrollFactorX),v=u.y+d.scrollY*(1-u.scrollFactorY),h*=u.scaleX,p*=u.scaleY);var x=m+g*h,b=v+f*p;return[new y(x,b),new y(x+h,b),new y(x+h,b+p),new y(x,b+p)]}},11758:(S,P,a)=>{var y=a(91907),C=a(27229),g=a(29747),f=a(55826);S.exports=function(c){return c===y.ORTHOGONAL?f:c===y.ISOMETRIC?g:c===y.HEXAGONAL?C:g}},39167:(S,P,a)=>{var y=a(91907),C=a(29747),g=a(97281);S.exports=function(d){return d===y.ORTHOGONAL?g:C}},62e3:(S,P,a)=>{var y=a(91907),C=a(19951),g=a(14127),f=a(29747),d=a(97202),c=a(70326);S.exports=function(p){return p===y.ORTHOGONAL?c:p===y.ISOMETRIC?g:p===y.HEXAGONAL?C:p===y.STAGGERED?d:f}},5984:(S,P,a)=>{var y=a(91907),C=a(29747),g=a(28054),f=a(29650);S.exports=function(c){return c===y.ORTHOGONAL?f:c===y.STAGGERED?g:C}},7386:(S,P,a)=>{var y=a(95540);S.exports=function(g,f,d,c,h,p){void 0===g&&(g=0),void 0===f&&(f=0),void 0===d&&(d=p.width),void 0===c&&(c=p.height),h||(h={});var u=y(h,"isNotEmpty",!1),m=y(h,"isColliding",!1),v=y(h,"hasInterestingFace",!1);g<0&&(d+=g,g=0),f<0&&(c+=f,f=0),g+d>p.width&&(d=Math.max(p.width-g,0)),f+c>p.height&&(c=Math.max(p.height-f,0));for(var x=[],b=f;b{var y=a(55738),C=a(7386),g=a(91865),f=a(29747),d=a(26099),c=function(v,x){return g.RectangleToTriangle(x,v)},h=new d,p=new d,u=new d;S.exports=function(v,x,b,T){if(void 0===v)return[];var _=f;v instanceof y.Circle?_=g.CircleToRectangle:v instanceof y.Rectangle?_=g.RectangleToRectangle:v instanceof y.Triangle?_=c:v instanceof y.Line&&(_=g.LineToRectangle),T.tilemapLayer.worldToTileXY(v.left,v.top,!0,p,b);var A=p.x,M=p.y;T.tilemapLayer.worldToTileXY(v.right,v.bottom,!1,u,b);var I=Math.ceil(u.x),R=Math.ceil(u.y),F=Math.max(I-A,1),N=Math.max(R-M,1),V=C(A,M,F,N,x,T),B=T.tileWidth,G=T.tileHeight;T.tilemapLayer&&(B*=T.tilemapLayer.scaleX,G*=T.tilemapLayer.scaleY);for(var Q=[],H=new y.Rectangle(0,0,B,G),K=0;K{var y=a(7386),C=a(26099),g=new C,f=new C;S.exports=function(c,h,p,u,m,v,x){var b=x.tilemapLayer.tilemap._convert.WorldToTileXY;b(c,h,!0,g,v,x);var T=g.x,_=g.y;b(c+p,h+u,!1,f,v,x);var A=Math.ceil(f.x),M=Math.ceil(f.y);return y(T,_,A-T,M-_,m,x)}},96113:(S,P,a)=>{var y=a(91907),C=a(20242),g=a(10095);S.exports=function(d){return d===y.ORTHOGONAL?g:C}},16926:(S,P,a)=>{var y=a(91907),C=a(86625),g=a(96897),f=a(29747),d=a(15108),c=a(85896);S.exports=function(p){return p===y.ORTHOGONAL?c:p===y.ISOMETRIC?g:p===y.HEXAGONAL?C:p===y.STAGGERED?d:f}},55762:(S,P,a)=>{var y=a(91907),C=a(20242),g=a(51900),f=a(63288);S.exports=function(c){return c===y.ORTHOGONAL?f:c===y.STAGGERED?g:C}},45091:(S,P,a)=>{var y=a(62991);S.exports=function(g,f,d){if(y(g,f,d)){var c=d.data[f][g];return null!==c&&c.index>-1}return!1}},24152:(S,P,a)=>{var y=a(45091),g=new(a(26099));S.exports=function(d,c,h,p){return p.tilemapLayer.worldToTileXY(d,c,!0,g,h),y(g.x,g.y,p)}},90454:(S,P,a)=>{var y=a(63448),C=a(56583);S.exports=function(f,d){var v,x,b,T,c=f.tilemapLayer.tilemap,h=f.tilemapLayer,p=Math.floor(c.tileWidth*h.scaleX),u=Math.floor(c.tileHeight*h.scaleY),m=f.hexSideLength;if("y"===f.staggerAxis){var _=(u-m)/2+m;v=C(d.worldView.x-h.x,p,0,!0)-h.cullPaddingX,x=y(d.worldView.right-h.x,p,0,!0)+h.cullPaddingX,b=C(d.worldView.y-h.y,_,0,!0)-h.cullPaddingY,T=y(d.worldView.bottom-h.y,_,0,!0)+h.cullPaddingY}else{var A=(p-m)/2+m;v=C(d.worldView.x-h.x,A,0,!0)-h.cullPaddingX,x=y(d.worldView.right-h.x,A,0,!0)+h.cullPaddingX,b=C(d.worldView.y-h.y,u,0,!0)-h.cullPaddingY,T=y(d.worldView.bottom-h.y,u,0,!0)+h.cullPaddingY}return{left:v,right:x,top:b,bottom:T}}},9474:(S,P,a)=>{var y=a(90454),C=a(32483);S.exports=function(f,d,c,h){void 0===c&&(c=[]),void 0===h&&(h=0),c.length=0;var p=f.tilemapLayer,u=y(f,d);return p.skipCull&&1===p.scrollFactorX&&1===p.scrollFactorY&&(u.left=0,u.right=f.width,u.top=0,u.bottom=f.height),C(f,u,h,c),c}},27229:(S,P,a)=>{var y=a(19951),C=a(26099),g=new C;S.exports=function(d,c,h,p){var u=p.baseTileWidth,m=p.baseTileHeight,v=p.tilemapLayer;v&&(u*=v.scaleX,m*=v.scaleY);var _,A,x=y(d,c,g,h,p),b=[],T=.5773502691896257;"y"===p.staggerAxis?(_=T*u,A=m/2):(_=u/2,A=T*m);for(var M=0;M<6;M++){var I=2*Math.PI*(.5-M)/6;b.push(new C(x.x+_*Math.cos(I),x.y+A*Math.sin(I)))}return b}},19951:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c,h){d||(d=new y);var p=h.baseTileWidth,u=h.baseTileHeight,m=h.tilemapLayer,v=0,x=0;m&&(c||(c=m.scene.cameras.main),v=m.x+c.scrollX*(1-m.scrollFactorX),x=m.y+c.scrollY*(1-m.scrollFactorY),p*=m.scaleX,u*=m.scaleY);var _,A,b=p/2,T=u/2,M=h.staggerAxis,I=h.staggerIndex;return"y"===M?(_=v+p*g+p,A=x+1.5*f*T+T,f%2==0&&("odd"===I?_-=b:_+=b)):"x"===M&&"odd"===I&&(_=v+1.5*g*b+b,A=x+u*g+u,g%2==0&&("odd"===I?A-=T:A+=T)),d.set(_,A)}},86625:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c,h,p){c||(c=new y);var u=p.baseTileWidth,m=p.baseTileHeight,v=p.tilemapLayer;v&&(h||(h=v.scene.cameras.main),g-=v.x+h.scrollX*(1-v.scrollFactorX),f-=v.y+h.scrollY*(1-v.scrollFactorY),u*=v.scaleX,m*=v.scaleY);var I,R,F,N,V,x=.5773502691896257,b=-.3333333333333333,_=.6666666666666666,A=u/2,M=m/2;"y"===p.staggerAxis?(F=x*(I=(g-A)/(x*u))+b*(R=(f-M)/M),N=0*I+_*R):(F=b*(I=(g-A)/A)+x*(R=(f-M)/(x*m)),N=_*I+0*R),V=-F-N;var B=Math.round(F),G=Math.round(N),Q=Math.round(V),H=Math.abs(B-F),K=Math.abs(G-N),tt=Math.abs(Q-V);return H>K&&H>tt?B=-G-Q:K>tt&&(G=-B-Q),c.set("odd"===p.staggerIndex?G%2==0?G/2+B:G/2+B-.5:G%2==0?G/2+B:G/2+B+.5,G)}},62991:S=>{S.exports=function(a,y,C){return a>=0&&a=0&&y{var y=a(33528);S.exports=function(g,f,d,c){void 0===d&&(d=[]),void 0===c&&(c=0),d.length=0;var A,M,I,h=g.tilemapLayer,p=g.data,u=g.width,m=g.height,v=h.skipCull,b=u,_=m;if(0===c)for(M=0;M<_;M++)for(A=0;A=0;A--)(I=p[M][A])&&-1!==I.index&&I.visible&&0!==I.alpha&&(!v&&!y(A,M,g,f)||d.push(I));else if(2===c)for(M=_;M>=0;M--)for(A=0;A=0;M--)for(A=b;A>=0;A--)(I=p[M][A])&&-1!==I.index&&I.visible&&0!==I.alpha&&(!v&&!y(A,M,g,f)||d.push(I));return h.tilesDrawn=d.length,h.tilesTotal=u*m,d}},14127:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c,h){d||(d=new y);var p=h.baseTileWidth,u=h.baseTileHeight,m=h.tilemapLayer,v=0,x=0;return m&&(c||(c=m.scene.cameras.main),v=m.x+c.scrollX*(1-m.scrollFactorX),p*=m.scaleX,x=m.y+c.scrollY*(1-m.scrollFactorY),u*=m.scaleY),d.set(v+p/2*(g-f),x+(g+f)*(u/2))}},96897:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c,h,p,u){c||(c=new y);var m=p.baseTileWidth,v=p.baseTileHeight,x=p.tilemapLayer;x&&(h||(h=x.scene.cameras.main),f-=x.y+h.scrollY*(1-x.scrollFactorY),v*=x.scaleY,g-=x.x+h.scrollX*(1-x.scrollFactorX),m*=x.scaleX);var b=m/2,T=v/2;u||(f-=v);var _=.5*((g-=b)/b+f/T),A=.5*(-g/b+f/T);return d&&(_=Math.floor(_),A=Math.floor(A)),c.set(_,A)}},71558:(S,P,a)=>{var y=a(23029),C=a(62991),g=a(72023),f=a(20576);S.exports=function(c,h,p,u,m){if(void 0===u&&(u=!0),!C(h,p,m))return null;var v,x=m.data[p][h],b=x&&x.collides;c instanceof y?(null===m.data[p][h]&&(m.data[p][h]=new y(m,c.index,h,p,m.tileWidth,m.tileHeight)),m.data[p][h].copy(c)):(v=c,null===m.data[p][h]?m.data[p][h]=new y(m,v,h,p,m.tileWidth,m.tileHeight):m.data[p][h].index=v);var T=m.data[p][h],_=-1!==m.collideIndexes.indexOf(T.index);if(-1===(v=c instanceof y?c.index:c))T.width=m.tileWidth,T.height=m.tileHeight;else{var A=m.tilemapLayer.tilemap,R=A.tilesets[A.tiles[v][2]];T.width=R.tileWidth,T.height=R.tileHeight}return f(T,_),u&&b!==T.collides&&g(h,p,m),T}},26303:(S,P,a)=>{var y=a(71558),g=new(a(26099));S.exports=function(d,c,h,p,u,m){return m.tilemapLayer.worldToTileXY(c,h,!0,g,u,m),y(d,g.x,g.y,p,m)}},14051:(S,P,a)=>{var y=a(42573),C=a(71558);S.exports=function(f,d,c,h,p){if(void 0===h&&(h=!0),!Array.isArray(f))return null;Array.isArray(f[0])||(f=[f]);for(var u=f.length,m=f[0].length,v=0;v{var y=a(7386),C=a(26546);S.exports=function(f,d,c,h,p,u){var m,v=y(f,d,c,h,{},u);if(!p)for(p=[],m=0;m{var y=a(23029),C=a(62991),g=a(72023);S.exports=function(d,c,h,p,u){if(void 0===h&&(h=!0),void 0===p&&(p=!0),!C(d,c,u))return null;var m=u.data[c][d];return m?(u.data[c][d]=h?null:new y(u,-1,d,c,u.tileWidth,u.tileHeight),p&&m&&m.collides&&g(d,c,u),m):null}},94178:(S,P,a)=>{var y=a(63557),g=new(a(26099));S.exports=function(d,c,h,p,u,m){return m.tilemapLayer.worldToTileXY(d,c,!0,g,u,m),y(g.x,g.y,h,p,m)}},15533:(S,P,a)=>{var y=a(7386),C=a(3956),g=new C(105,210,231,150),f=new C(243,134,48,200),d=new C(40,39,37,150);S.exports=function(h,p,u){void 0===p&&(p={});var m=void 0!==p.tileColor?p.tileColor:g,v=void 0!==p.collidingTileColor?p.collidingTileColor:f,x=void 0!==p.faceColor?p.faceColor:d,b=y(0,0,u.width,u.height,null,u);h.translateCanvas(u.tilemapLayer.x,u.tilemapLayer.y),h.scaleCanvas(u.tilemapLayer.scaleX,u.tilemapLayer.scaleY);for(var T=0;T{var y=a(7386);S.exports=function(g,f,d,c,h,p,u){for(var m=y(d,c,h,p,null,u),v=0;v{S.exports=function(a,y,C,g){var x,b,T,f=a.data,d=a.width,c=a.height,h=a.tilemapLayer,p=Math.max(0,y.left),u=Math.min(d,y.right),m=Math.max(0,y.top),v=Math.min(c,y.bottom);if(0===C)for(b=m;b=p;x--)(T=f[b][x])&&-1!==T.index&&T.visible&&0!==T.alpha&&g.push(T);else if(2===C)for(b=v;b>=m;b--)for(x=p;f[b]&&x=m;b--)for(x=u;f[b]&&x>=p;x--)(T=f[b][x])&&-1!==T.index&&T.visible&&0!==T.alpha&&g.push(T);return h.tilesDrawn=g.length,h.tilesTotal=d*c,g}},57068:(S,P,a)=>{var y=a(20576),C=a(42573),g=a(9589);S.exports=function(d,c,h,p,u){void 0===c&&(c=!0),void 0===h&&(h=!0),void 0===u&&(u=!0),Array.isArray(d)||(d=[d]);for(var m=0;m{var y=a(20576),C=a(42573),g=a(9589);S.exports=function(d,c,h,p,u,m){if(void 0===h&&(h=!0),void 0===p&&(p=!0),void 0===m&&(m=!0),!(d>c)){for(var v=d;v<=c;v++)g(v,h,u);if(m)for(var x=0;x=d&&T.index<=c&&y(T,h)}p&&C(0,0,u.width,u.height,u)}}},75661:(S,P,a)=>{var y=a(20576),C=a(42573),g=a(9589);S.exports=function(d,c,h,p){void 0===c&&(c=!0),void 0===h&&(h=!0),Array.isArray(d)||(d=[d]);for(var u=0;u{var y=a(20576),C=a(42573),g=a(97022);S.exports=function(d,c,h,p){void 0===c&&(c=!0),void 0===h&&(h=!0);for(var u=0;u{var y=a(20576),C=a(42573);S.exports=function(f,d,c){void 0===f&&(f=!0),void 0===d&&(d=!0);for(var h=0;h0&&y(u,f)}}d&&C(0,0,c.width,c.height,c)}},9589:S=>{S.exports=function(a,y,C){var g=C.collideIndexes.indexOf(a);y&&-1===g?C.collideIndexes.push(a):!y&&-1!==g&&C.collideIndexes.splice(g,1)}},20576:S=>{S.exports=function(a,y){y?a.setCollision(!0,!0,!0,!0,!1):a.resetCollision(!1)}},79583:S=>{S.exports=function(a,y,C,g){if("number"==typeof a)g.callbacks[a]=null!==y?{callback:y,callbackContext:C}:void 0;else for(var f=0,d=a.length;f{var y=a(7386);S.exports=function(g,f,d,c,h,p,u){for(var m=y(g,f,d,c,null,u),v=0;v{var y=a(7386),C=a(33680);S.exports=function(f,d,c,h,p){var u=y(f,d,c,h,null,p),m=u.map(function(x){return x.index});C(m);for(var v=0;v{var y=a(63448),C=a(56583);S.exports=function(f,d){var c=f.tilemapLayer.tilemap,h=f.tilemapLayer,p=Math.floor(c.tileWidth*h.scaleX),u=Math.floor(c.tileHeight*h.scaleY);return{left:C(d.worldView.x-h.x,p,0,!0)-h.cullPaddingX,right:y(d.worldView.right-h.x,p,0,!0)+h.cullPaddingX,top:C(d.worldView.y-h.y,u/2,0,!0)-h.cullPaddingY,bottom:y(d.worldView.bottom-h.y,u/2,0,!0)+h.cullPaddingY}}},54503:(S,P,a)=>{var y=a(61325),C=a(32483);S.exports=function(f,d,c,h){void 0===c&&(c=[]),void 0===h&&(h=0),c.length=0;var p=f.tilemapLayer,u=y(f,d);return p.skipCull&&1===p.scrollFactorX&&1===p.scrollFactorY&&(u.left=0,u.right=f.width,u.top=0,u.bottom=f.height),C(f,u,h,c),c}},97202:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c,h){d||(d=new y);var p=h.baseTileWidth,u=h.baseTileHeight,m=h.tilemapLayer,v=0,x=0;return m&&(c||(c=m.scene.cameras.main),v=m.x+c.scrollX*(1-m.scrollFactorX),p*=m.scaleX,x=m.y+c.scrollY*(1-m.scrollFactorY),u*=m.scaleY),d.set(v+g*p+f%2*(p/2),x+f*(u/2))}},28054:S=>{S.exports=function(a,y,C){var g=C.baseTileHeight,f=C.tilemapLayer,d=0;return f&&(void 0===y&&(y=f.scene.cameras.main),d=f.y+y.scrollY*(1-f.scrollFactorY),g*=f.scaleY),d+a*(g/2)+g}},15108:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c,h,p){c||(c=new y);var u=p.baseTileWidth,m=p.baseTileHeight,v=p.tilemapLayer;v&&(h||(h=v.scene.cameras.main),f-=v.y+h.scrollY*(1-v.scrollFactorY),m*=v.scaleY,g-=v.x+h.scrollX*(1-v.scrollFactorX),u*=v.scaleX);var x=d?Math.floor(f/(m/2)):f/(m/2),b=d?Math.floor((g+x%2*.5*u)/u):(g+x%2*.5*u)/u;return c.set(b,x)}},51900:S=>{S.exports=function(a,y,C,g){var f=g.baseTileHeight,d=g.tilemapLayer;return d&&(C||(C=d.scene.cameras.main),a-=d.y+C.scrollY*(1-d.scrollFactorY),f*=d.scaleY),y?Math.floor(a/(f/2)):a/(f/2)}},86560:(S,P,a)=>{var y=a(7386);S.exports=function(g,f,d,c,h,p,u){for(var m=y(d,c,h,p,null,u),v=0;v{S.exports=function(a,y,C){var g=C.baseTileWidth,f=C.tilemapLayer,d=0;return f&&(y||(y=f.scene.cameras.main),d=f.x+y.scrollX*(1-f.scrollFactorX),g*=f.scaleX),d+a*g}},70326:(S,P,a)=>{var y=a(97281),C=a(29650),g=a(26099);S.exports=function(d,c,h,p,u){return h||(h=new g(0,0)),h.x=y(d,p,u),h.y=C(c,p,u),h}},29650:S=>{S.exports=function(a,y,C){var g=C.baseTileHeight,f=C.tilemapLayer,d=0;return f&&(y||(y=f.scene.cameras.main),d=f.y+y.scrollY*(1-f.scrollFactorY),g*=f.scaleY),d+a*g}},77366:(S,P,a)=>{var y=a(7386),C=a(75508);S.exports=function(f,d,c,h,p,u){if(p){var m,v=y(f,d,c,h,null,u),x=0;for(m=0;m{var y=a(85896),g=new(a(26099));S.exports=function(d,c,h,p){return y(d,0,c,g,h,p),g.x}},85896:(S,P,a)=>{var y=a(26099);S.exports=function(g,f,d,c,h,p){void 0===d&&(d=!0),c||(c=new y);var u=p.baseTileWidth,m=p.baseTileHeight,v=p.tilemapLayer;v&&(h||(h=v.scene.cameras.main),g-=v.x+h.scrollX*(1-v.scrollFactorX),f-=v.y+h.scrollY*(1-v.scrollFactorY),u*=v.scaleX,m*=v.scaleY);var x=g/u,b=f/m;return d&&(x=Math.floor(x),b=Math.floor(b)),c.set(x,b)}},63288:(S,P,a)=>{var y=a(85896),g=new(a(26099));S.exports=function(d,c,h,p){return y(0,d,c,g,h,p),g.y}},81086:(S,P,a)=>{S.exports={CalculateFacesAt:a(72023),CalculateFacesWithin:a(42573),CheckIsoBounds:a(33528),Copy:a(1785),CreateFromTiles:a(78419),CullBounds:a(19545),CullTiles:a(30003),Fill:a(35137),FilterTiles:a(40253),FindByIndex:a(52692),FindTile:a(66151),ForEachTile:a(97560),GetCullTilesFunction:a(43305),GetTileAt:a(7423),GetTileAtWorldXY:a(60540),GetTileCorners:a(55826),GetTileCornersFunction:a(11758),GetTilesWithin:a(7386),GetTilesWithinShape:a(91141),GetTilesWithinWorldXY:a(96523),GetTileToWorldXFunction:a(39167),GetTileToWorldXYFunction:a(62e3),GetTileToWorldYFunction:a(5984),GetWorldToTileXFunction:a(96113),GetWorldToTileXYFunction:a(16926),GetWorldToTileYFunction:a(55762),HasTileAt:a(45091),HasTileAtWorldXY:a(24152),HexagonalCullBounds:a(90454),HexagonalCullTiles:a(9474),HexagonalGetTileCorners:a(27229),HexagonalTileToWorldXY:a(19951),HexagonalWorldToTileXY:a(86625),IsInLayerBounds:a(62991),IsometricCullTiles:a(14018),IsometricTileToWorldXY:a(14127),IsometricWorldToTileXY:a(96897),PutTileAt:a(71558),PutTileAtWorldXY:a(26303),PutTilesAt:a(14051),Randomize:a(77389),RemoveTileAt:a(63557),RemoveTileAtWorldXY:a(94178),RenderDebug:a(15533),ReplaceByIndex:a(27987),RunCull:a(32483),SetCollision:a(57068),SetCollisionBetween:a(37266),SetCollisionByExclusion:a(75661),SetCollisionByProperty:a(64740),SetCollisionFromCollisionGroup:a(63307),SetLayerCollisionIndex:a(9589),SetTileCollision:a(20576),SetTileIndexCallback:a(79583),SetTileLocationCallback:a(93254),Shuffle:a(32903),StaggeredCullBounds:a(61325),StaggeredCullTiles:a(54503),StaggeredTileToWorldXY:a(97202),StaggeredTileToWorldY:a(28054),StaggeredWorldToTileXY:a(15108),StaggeredWorldToTileY:a(51900),SwapByIndex:a(86560),TileToWorldX:a(97281),TileToWorldXY:a(70326),TileToWorldY:a(29650),WeightedRandomize:a(77366),WorldToTileX:a(10095),WorldToTileXY:a(85896),WorldToTileY:a(63288)}},91907:S=>{S.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(S,P,a)=>{var y={ORIENTATION:a(91907)};S.exports=y},62501:(S,P,a)=>{var y=a(79291),C=a(21829),g={Components:a(81086),Parsers:a(57442),Formats:a(80341),ImageCollection:a(16536),ParseToTilemap:a(31989),Tile:a(23029),Tilemap:a(49075),TilemapCreator:a(45939),TilemapFactory:a(46029),Tileset:a(33629),TilemapLayer:a(20442),Orientation:a(91907),LayerData:a(14977),MapData:a(87010),ObjectLayer:a(48700)};g=y(!1,g,C.ORIENTATION),S.exports=g},14977:(S,P,a)=>{var y=a(83419),C=a(91907),g=a(95540),f=new y({initialize:function(c){void 0===c&&(c={}),this.name=g(c,"name","layer"),this.id=g(c,"id",0),this.x=g(c,"x",0),this.y=g(c,"y",0),this.width=g(c,"width",0),this.height=g(c,"height",0),this.tileWidth=g(c,"tileWidth",0),this.tileHeight=g(c,"tileHeight",0),this.baseTileWidth=g(c,"baseTileWidth",this.tileWidth),this.baseTileHeight=g(c,"baseTileHeight",this.tileHeight),this.orientation=g(c,"orientation",C.ORTHOGONAL),this.widthInPixels=g(c,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=g(c,"heightInPixels",this.height*this.baseTileHeight),this.alpha=g(c,"alpha",1),this.visible=g(c,"visible",!0),this.properties=g(c,"properties",[]),this.indexes=g(c,"indexes",[]),this.collideIndexes=g(c,"collideIndexes",[]),this.callbacks=g(c,"callbacks",[]),this.bodies=g(c,"bodies",[]),this.data=g(c,"data",[]),this.tilemapLayer=g(c,"tilemapLayer",null),this.hexSideLength=g(c,"hexSideLength",0),this.staggerAxis=g(c,"staggerAxis","y"),this.staggerIndex=g(c,"staggerIndex","odd")}});S.exports=f},87010:(S,P,a)=>{var y=a(83419),C=a(91907),g=a(95540),f=new y({initialize:function(c){void 0===c&&(c={}),this.name=g(c,"name","map"),this.width=g(c,"width",0),this.height=g(c,"height",0),this.infinite=g(c,"infinite",!1),this.tileWidth=g(c,"tileWidth",0),this.tileHeight=g(c,"tileHeight",0),this.widthInPixels=g(c,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=g(c,"heightInPixels",this.height*this.tileHeight),this.format=g(c,"format",null),this.orientation=g(c,"orientation",C.ORTHOGONAL),this.renderOrder=g(c,"renderOrder","right-down"),this.version=g(c,"version","1"),this.properties=g(c,"properties",{}),this.layers=g(c,"layers",[]),this.images=g(c,"images",[]),this.objects=g(c,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=g(c,"collision",{}),this.tilesets=g(c,"tilesets",[]),this.imageCollections=g(c,"imageCollections",[]),this.tiles=g(c,"tiles",[]),this.hexSideLength=g(c,"hexSideLength",0),this.staggerAxis=g(c,"staggerAxis","y"),this.staggerIndex=g(c,"staggerIndex","odd")}});S.exports=f},48700:(S,P,a)=>{var y=a(83419),C=a(95540),g=new y({initialize:function(d){void 0===d&&(d={}),this.name=C(d,"name","object layer"),this.id=C(d,"id",0),this.opacity=C(d,"opacity",1),this.properties=C(d,"properties",{}),this.propertyTypes=C(d,"propertytypes",{}),this.type=C(d,"type","objectgroup"),this.visible=C(d,"visible",!0),this.objects=C(d,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});S.exports=g},6641:(S,P,a)=>{var y=a(91907);S.exports=function(g){return"isometric"===(g=g.toLowerCase())?y.ISOMETRIC:"staggered"===g?y.STAGGERED:"hexagonal"===g?y.HEXAGONAL:y.ORTHOGONAL}},46177:(S,P,a)=>{var y=a(80341),C=a(2342),g=a(82593),f=a(46594),d=a(87021);S.exports=function(h,p,u,m,v,x){var b;switch(p){case y.ARRAY_2D:b=C(h,u,m,v,x);break;case y.CSV:b=g(h,u,m,v,x);break;case y.TILED_JSON:b=f(h,u,x);break;case y.WELTMEISTER:b=d(h,u,x);break;default:console.warn("Unrecognized tilemap data format: "+p),b=null}return b}},2342:(S,P,a)=>{var y=a(80341),C=a(14977),g=a(87010),f=a(23029);S.exports=function(c,h,p,u,m){for(var v=new C({tileWidth:p,tileHeight:u}),x=new g({name:c,tileWidth:p,tileHeight:u,format:y.ARRAY_2D,layers:[v]}),b=[],T=h.length,_=0,A=0;A{var y=a(80341),C=a(2342);S.exports=function(f,d,c,h,p){var u=d.trim().split("\n").map(function(v){return v.split(",")}),m=C(f,u,c,h,p);return m.format=y.CSV,m}},6656:(S,P,a)=>{var y=a(14977),C=a(23029);S.exports=function(f,d){for(var c=[],h=0;h-1?new C(u,T,b,x,p.tilesize,p.tilesize):d?null:new C(u,-1,b,x,p.tilesize,p.tilesize),m.push(_)}v.push(m),m=[]}u.data=v,c.push(u)}return c}},96483:(S,P,a)=>{var y=a(33629);S.exports=function(g){for(var f=[],d=[],c=0;c{var y=a(80341),C=a(87010),g=a(6656),f=a(96483);S.exports=function(c,h,p){if(0===h.layer.length)return console.warn("No layers found in the Weltmeister map: "+c),null;for(var u=0,m=0,v=0;vu&&(u=h.layer[v].width),h.layer[v].height>m&&(m=h.layer[v].height);var x=new C({width:u,height:m,name:c,tileWidth:h.layer[0].tilesize,tileHeight:h.layer[0].tilesize,format:y.WELTMEISTER});return x.layers=g(h,p),x.tilesets=f(h),x}},52833:(S,P,a)=>{S.exports={ParseTileLayers:a(6656),ParseTilesets:a(96483),ParseWeltmeister:a(87021)}},57442:(S,P,a)=>{S.exports={FromOrientationString:a(6641),Parse:a(46177),Parse2DArray:a(2342),ParseCSV:a(82593),Impact:a(52833),Tiled:a(96761)}},51233:(S,P,a)=>{var y=a(79291);S.exports=function(g){for(var f,d,h,p,u=0;u{S.exports=function(a){for(var y=window.atob(a),C=y.length,g=new Array(C/4),f=0;f>>0;return g}},84101:(S,P,a)=>{var y=a(33629);S.exports=function(g){var f,d,c=[];for(f=0;f{var y=a(95540);S.exports=function(g,f,d){if(!f)return{i:0,layers:g.layers,name:"",opacity:1,visible:!0,x:0,y:0};var c=f.x+y(f,"startx",0)*g.tilewidth+y(f,"offsetx",0),h=f.y+y(f,"starty",0)*g.tileheight+y(f,"offsety",0);return{i:0,layers:f.layers,name:d.name+f.name+"/",opacity:d.opacity*f.opacity,visible:d.visible&&f.visible,x:d.x+c,y:d.y+h}}},29920:S=>{var P=2147483648,a=1073741824,y=536870912;S.exports=function(g){var f=!!(g&P),d=!!(g&a),c=!!(g&y);g&=~(P|a|y);var h=0,p=!1;return f&&d&&c?(h=Math.PI/2,p=!0):f&&d&&!c?(h=Math.PI,p=!1):f&&!d&&c?(h=Math.PI/2,p=!1):!f||d||c?!f&&d&&c?(h=3*Math.PI/2,p=!1):f||!d||c?f||d||!c?!f&&!d&&!c&&(h=0,p=!1):(h=3*Math.PI/2,p=!0):(h=Math.PI,p=!0):(h=0,p=!0),{gid:g,flippedHorizontal:f,flippedVertical:d,flippedAntiDiagonal:c,rotation:h,flipped:p}}},12635:(S,P,a)=>{var y=a(95540),C=a(79677);S.exports=function(f){for(var d=[],c=[],h=C(f);h.i0;)if(h.i>=h.layers.length){if(c.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}h=c.pop()}else{var p=h.layers[h.i];if(h.i++,"imagelayer"===p.type){var m=y(p,"offsetx",0)+y(p,"startx",0),v=y(p,"offsety",0)+y(p,"starty",0);d.push({name:h.name+p.name,image:p.image,x:h.x+m+p.x,y:h.y+v+p.y,alpha:h.opacity*p.opacity,visible:h.visible&&p.visible,properties:y(p,"properties",{})})}else if("group"===p.type){var u=C(f,p,h);c.push(h),h=u}}return d}},46594:(S,P,a)=>{var y=a(51233),C=a(84101),g=a(91907),f=a(62644),d=a(80341),c=a(6641),h=a(87010),p=a(12635),u=a(22611),m=a(28200),v=a(24619);S.exports=function(b,T,_){var A=f(T),M=new h({width:A.width,height:A.height,name:b,tileWidth:A.tilewidth,tileHeight:A.tileheight,orientation:c(A.orientation),format:d.TILED_JSON,version:A.version,properties:A.properties,renderOrder:A.renderorder,infinite:A.infinite});M.orientation===g.HEXAGONAL&&(M.hexSideLength=A.hexsidelength,M.staggerAxis=A.staggeraxis,M.staggerIndex=A.staggerindex),M.layers=m(A,_),M.images=p(A);var I=v(A);return M.tilesets=I.tilesets,M.imageCollections=I.imageCollections,M.objects=u(A),M.tiles=C(M),y(M),M}},52205:(S,P,a)=>{var y=a(18254),C=a(29920),g=function(c){return{x:c.x,y:c.y}},f=["id","name","type","rotation","properties","visible","x","y","width","height"];S.exports=function(c,h,p){void 0===h&&(h=0),void 0===p&&(p=0);var u=y(c,f);if(u.x+=h,u.y+=p,c.gid){var m=C(c.gid);u.gid=m.gid,u.flippedHorizontal=m.flippedHorizontal,u.flippedVertical=m.flippedVertical,u.flippedAntiDiagonal=m.flippedAntiDiagonal}else c.polyline?u.polyline=c.polyline.map(g):c.polygon?u.polygon=c.polygon.map(g):c.ellipse?u.ellipse=c.ellipse:c.text?u.text=c.text:c.point?u.point=!0:u.rectangle=!0;return u}},22611:(S,P,a)=>{var y=a(95540),C=a(52205),g=a(48700),f=a(79677);S.exports=function(c){for(var h=[],p=[],u=f(c);u.i0;)if(u.i>=u.layers.length){if(p.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}u=p.pop()}else{var m=u.layers[u.i];if(u.i++,m.opacity*=u.opacity,m.visible=u.visible&&m.visible,"objectgroup"===m.type){m.name=u.name+m.name;for(var x=u.x+y(m,"startx",0)+y(m,"offsetx",0),b=u.y+y(m,"starty",0)+y(m,"offsety",0),T=[],_=0;_{var y=a(41868),C=a(91907),g=a(79677),f=a(6641),d=a(95540),c=a(14977),h=a(29920),p=a(23029);S.exports=function(m,v){for(var x=d(m,"infinite",!1),b=[],T=[],_=g(m);_.i<_.layers.length||T.length>0;)if(_.i>=_.layers.length){if(T.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}_=T.pop()}else{var A=_.layers[_.i];if(_.i++,"tilelayer"===A.type)if(A.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+A.name+"'");else{if(A.encoding&&"base64"===A.encoding){if(A.chunks)for(var I=0;I0?((N=new p(R,F.gid,nt,dt,m.tilewidth,m.tileheight)).rotation=F.rotation,N.flipX=F.flipped,B[dt][nt]=N):(V=v?null:new p(R,-1,nt,dt,m.tilewidth,m.tileheight),B[dt][nt]=V),++G===at.width&&(it++,G=0)}}else{(R=new c({name:_.name+A.name,id:A.id,x:_.x+d(A,"offsetx",0)+A.x,y:_.y+d(A,"offsety",0)+A.y,width:A.width,height:A.height,tileWidth:m.tilewidth,tileHeight:m.tileheight,alpha:_.opacity*A.opacity,visible:_.visible&&A.visible,properties:d(A,"properties",[]),orientation:f(m.orientation)})).orientation===C.HEXAGONAL&&(R.hexSideLength=m.hexsidelength,R.staggerAxis=m.staggeraxis,R.staggerIndex=m.staggerindex);for(var gt=[],bt=0,Et=A.data.length;bt0?((N=new p(R,F.gid,G,B.length,m.tilewidth,m.tileheight)).rotation=F.rotation,N.flipX=F.flipped,gt.push(N)):(V=v?null:new p(R,-1,G,B.length,m.tilewidth,m.tileheight),gt.push(V)),++G===A.width&&(B.push(gt),G=0,gt=[])}R.data=B,b.push(R)}else if("group"===A.type){var M=g(m,A,_);T.push(_),_=M}}return b}},24619:(S,P,a)=>{var y=a(33629),C=a(16536),g=a(52205),f=a(57880);S.exports=function(c){for(var m,h=[],p=[],u=null,v=0;v1){var T=void 0,_=void 0;if(Array.isArray(x.tiles)){T=T||{},_=_||{};for(var A=0;A{S.exports=function(a,y){for(var C=0;C0){var h,p,u,d={},c={};if(Array.isArray(g.edgecolors))for(h=0;h{S.exports={AssignTileProperties:a(51233),Base64Decode:a(41868),BuildTilesetIndex:a(84101),CreateGroupLayer:a(79677),ParseGID:a(29920),ParseImageLayers:a(12635),ParseJSONTiled:a(46594),ParseObject:a(52205),ParseObjectLayers:a(22611),ParseTileLayers:a(28200),ParseTilesets:a(24619)}},33385:(S,P,a)=>{var y=a(83419),C=a(37277),g=a(44594),f=a(94880),d=a(72905),c=new y({initialize:function(p){this.scene=p,this.systems=p.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],p.sys.events.once(g.BOOT,this.boot,this),p.sys.events.on(g.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(g.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var h=this.systems.events;h.on(g.PRE_UPDATE,this.preUpdate,this),h.on(g.UPDATE,this.update,this),h.once(g.SHUTDOWN,this.shutdown,this)},addEvent:function(h){var p;return h instanceof f?(this.removeEvent(p=h),p.elapsed=p.startAt,p.hasDispatched=!1,p.repeatCount=-1===p.repeat||p.loop?999999999999:p.repeat):p=new f(h),this._pendingInsertion.push(p),p},delayedCall:function(h,p,u,m){return this.addEvent({delay:h,callback:p,args:u,callbackScope:m})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(h){Array.isArray(h)||(h=[h]);for(var p=0;p-1&&this._active.splice(v,1),m.destroy()}for(u=0;u=m.delay)){var v=m.elapsed-m.delay;if(m.elapsed=m.delay,!m.hasDispatched&&m.callback&&(m.hasDispatched=!0,m.callback.apply(m.callbackScope,m.args)),m.repeatCount>0){if(m.repeatCount--,v>=m.delay)for(;v>=m.delay&&m.repeatCount>0;)m.callback&&m.callback.apply(m.callbackScope,m.args),v-=m.delay,m.repeatCount--;m.elapsed=v,m.hasDispatched=!1}else m.hasDispatched&&this._pendingRemoval.push(m)}}}},shutdown:function(){var h;for(h=0;h{var y=a(83419),C=a(50792),g=a(39429),f=a(95540),d=a(44594),c=a(89809),h=new y({Extends:C,initialize:function(u,m){C.call(this),this.scene=u,this.systems=u.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var v=this.systems.events;v.on(d.PRE_UPDATE,this.preUpdate,this),v.on(d.UPDATE,this.update,this),v.once(d.SHUTDOWN,this.destroy,this),m&&this.add(m)},preUpdate:function(p,u){this.paused||(this.elapsed+=u*this.timeScale)},update:function(){if(!this.paused&&!this.complete){var p,x,u=this.events,m=!1,v=this.systems;for(p=0;p=u.length&&(0!==this.loop&&(-1===this.loop||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(c.COMPLETE,this)}},play:function(p){return void 0===p&&(p=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,p&&this.reset(),this},pause:function(){this.paused=!0;for(var p=this.events,u=0;u0&&(m=u[u.length-1].time);for(var v=0;v{var y=a(83419),C=a(95540),g=new y({initialize:function(d){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(d)},reset:function(f){if(this.delay=C(f,"delay",0),this.repeat=C(f,"repeat",0),this.loop=C(f,"loop",!1),this.callback=C(f,"callback",void 0),this.callbackScope=C(f,"callbackScope",this),this.args=C(f,"args",[]),this.timeScale=C(f,"timeScale",1),this.startAt=C(f,"startAt",0),this.paused=C(f,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){return this.repeat>0?(this.elapsed+this.delay*(this.repeat-this.repeatCount))/(this.delay+this.delay*this.repeat):this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(f){void 0===f&&(f=!1),this.elapsed=this.delay,this.hasDispatched=!f,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});S.exports=g},35945:S=>{S.exports="complete"},89809:(S,P,a)=>{S.exports={COMPLETE:a(35945)}},90291:(S,P,a)=>{S.exports={Clock:a(33385),Events:a(89809),Timeline:a(96120),TimerEvent:a(94880)}},40382:(S,P,a)=>{var y=a(72905),C=a(83419),g=a(43491),f=a(88032),d=a(37277),c=a(44594),h=a(93109),p=a(86081),u=a(8357),m=a(43960),v=a(26012),x=new C({initialize:function(T){this.scene=T,this.events=T.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(c.BOOT,this.boot,this),this.events.on(c.START,this.start,this)},boot:function(){this.events.once(c.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(c.UPDATE,this.update,this),this.events.once(c.SHUTDOWN,this.shutdown,this)},create:function(b){Array.isArray(b)||(b=[b]);for(var T=[],_=0;_-1},existing:function(b){return this.has(b)||this.tweens.push(b.reset()),this},addCounter:function(b){var T=f(this,b);return this.tweens.push(T.reset()),T},stagger:function(b,T){return h(b,T)},setLagSmooth:function(b,T){return void 0===b&&(b=1/1e-8),void 0===T&&(T=0),this.maxLag=b,this.lagSkip=Math.min(T,this.maxLag),this},setFps:function(b){return void 0===b&&(b=240),this.gap=1e3/b,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(b){var T=Date.now()-this.prevTime;T>this.maxLag&&(this.startTime+=T-this.lagSkip),this.prevTime+=T;var _=this.prevTime-this.startTime,A=_-this.nextTime,M=_-1e3*this.time;return A>0||b?(this.time=_/=1e3,this.nextTime+=A+(A>=this.gap?4:this.gap-A)):M=0,M},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(b){void 0===b&&(b=!1);var T=this.getDelta(b);if(!(T<=0)){this.processing=!0;var _,A,M=[],I=this.tweens;for(_=0;_0){for(_=0;_-1&&(A.isPendingRemove()||A.isDestroyed())&&(I.splice(F,1),A.destroy())}M.length=0}this.processing=!1}},remove:function(b){return this.processing?b.setPendingRemoveState():(y(this.tweens,b),b.setRemovedState()),this},reset:function(b){return this.existing(b),b.seek(),b.setActiveState(),this},makeActive:function(b){return this.existing(b),b.setActiveState(),this},each:function(b,T){var _,A=[null];for(_=1;_{S.exports=function(a,y,C){return a&&a.hasOwnProperty(y)?a[y]:C}},6113:(S,P,a)=>{var y=a(62640),C=a(35355);S.exports=function(f,d){var c=y.Power0;if("string"==typeof f)if(y.hasOwnProperty(f))c=y[f];else{var h="";if(f.indexOf(".")){var p=(h=f.substring(f.indexOf(".")+1)).toLowerCase();"in"===p?h="easeIn":"out"===p?h="easeOut":"inout"===p&&(h="easeInOut")}f=C(f.substring(0,f.indexOf(".")+1)+h),y.hasOwnProperty(f)&&(c=y[f])}else"function"==typeof f&&(c=f);if(!d)return c;var u=d.slice(0);return u.unshift(0),function(m){return u[0]=m,c.apply(this,u)}}},91389:(S,P,a)=>{var y=a(89318),C=a(77259),f={bezier:y,catmull:C,catmullrom:C,linear:a(28392)};S.exports=function(c){if(null===c)return null;var h=f.linear;return"string"==typeof c?f.hasOwnProperty(c)&&(h=f[c]):"function"==typeof c&&(h=c),h}},55292:S=>{S.exports=function(a,y,C){return a.hasOwnProperty(y)?"function"==typeof a[y]?function(d,c,h,p,u,m){return a[y](d,c,h,p,u,m)}:function(){return a[y]}:"function"==typeof C?C:function(){return C}}},82985:(S,P,a)=>{var y=a(81076);S.exports=function(g){var f,d=[];if(g.hasOwnProperty("props"))for(f in g.props)"_"!==f.substring(0,1)&&d.push({key:f,value:g.props[f]});else for(f in g)-1===y.indexOf(f)&&"_"!==f.substring(0,1)&&d.push({key:f,value:g[f]});return d}},62329:(S,P,a)=>{var y=a(35154);S.exports=function(g){var f=y(g,"targets",null);return null===f||("function"==typeof f&&(f=f.call()),Array.isArray(f)||(f=[f])),f}},17777:(S,P,a)=>{var y=a(30976),C=a(99472);function g(p){return!!p.getActive&&"function"==typeof p.getActive}function f(p){return!!p.getStart&&"function"==typeof p.getStart}function d(p){return!!p.getEnd&&"function"==typeof p.getEnd}var h=function(p,u){var m,v=function(at,lt,q){return q},x=function(at,lt,q){return q},b=null,T=typeof u;if("number"===T)v=function(){return u};else if(Array.isArray(u))x=function(){return u[0]},v=function(){return u[u.length-1]};else if("string"===T){var _=u.toLowerCase(),A="random"===_.substring(0,6),M="int"===_.substring(0,3);if(A||M){var I=_.indexOf("("),R=_.indexOf(")"),F=_.indexOf(",");if(!(I&&R&&F))throw new Error("invalid random() format");var N=parseFloat(_.substring(I+1,F)),V=parseFloat(_.substring(F+1,R));v=A?function(){return C(N,V)}:function(){return y(N,V)}}else{_=_[0];var B=parseFloat(u.substr(2));switch(_){case"+":v=function(at,lt,q){return q+B};break;case"-":v=function(at,lt,q){return q-B};break;case"*":v=function(at,lt,q){return q*B};break;case"/":v=function(at,lt,q){return q/B};break;default:v=function(){return parseFloat(u)}}}}else if("function"===T)v=u;else if("object"===T)if(function c(p){return f(p)||d(p)||g(p)}(u))g(u)&&(b=u.getActive),d(u)&&(v=u.getEnd),f(u)&&(x=u.getStart);else if(u.hasOwnProperty("value"))m=h(p,u.value);else{var G=u.hasOwnProperty("to"),Q=u.hasOwnProperty("from"),H=u.hasOwnProperty("start");if(G&&(Q||H)){if(m=h(p,u.to),H){var K=h(p,u.start);m.getActive=K.getEnd}if(Q){var tt=h(p,u.from);m.getStart=tt.getEnd}}}return m||(m={getActive:b,getEnd:v,getStart:x}),m};S.exports=h},88032:(S,P,a)=>{var y=a(70402),C=a(69902),g=a(23568),f=a(57355),d=a(6113),c=a(55292),h=a(35154),p=a(17777),u=a(269),m=a(86081);S.exports=function(x,b,T){if(b instanceof m)return b.parent=x,b;T=void 0===T?C:u(C,T);var _=h(b,"from",0),A=h(b,"to",1),M=[{value:_}],I=h(b,"delay",T.delay),R=h(b,"easeParams",T.easeParams),F=h(b,"ease",T.ease),N=p("value",A),V=new m(x,M),B=V.add(0,"value",N.getEnd,N.getStart,N.getActive,d(h(b,"ease",F),h(b,"easeParams",R)),c(b,"delay",I),h(b,"duration",T.duration),f(b,"yoyo",T.yoyo),h(b,"hold",T.hold),h(b,"repeat",T.repeat),h(b,"repeatDelay",T.repeatDelay),!1,!1);B.start=_,B.current=_,V.completeDelay=g(b,"completeDelay",0),V.loop=Math.round(g(b,"loop",0)),V.loopDelay=Math.round(g(b,"loopDelay",0)),V.paused=f(b,"paused",!1),V.persist=f(b,"persist",!1),V.callbackScope=h(b,"callbackScope",V);for(var G=y.TYPES,Q=0;Q{var y=a(6113),C=a(35154),g=a(36383);S.exports=function(d,c){void 0===c&&(c={});var p=C(c,"start",0),u=C(c,"ease",null),m=C(c,"grid",null),v=C(c,"from",0),x="first"===v,b="center"===v,T="last"===v,_="number"==typeof v,A=Array.isArray(d),M=parseFloat(A?d[0]:d),I=A?parseFloat(d[1]):0,R=Math.max(M,I);if(A&&(p+=M),m){var F=m[0],N=m[1],V=0,B=0,G=0,Q=0,H=[];T?(V=F-1,B=N-1):_?(V=v%F,B=Math.floor(v/F)):b&&(V=(F-1)/2,B=(N-1)/2);for(var K=g.MIN_SAFE_INTEGER,tt=0;ttK&&(K=lt),H[tt][at]=lt}}}var q=u?y(u):null;return m?function(it,Y,X,nt){var Et,dt=0,gt=nt%F,bt=Math.floor(nt/F);if(gt>=0&>=0&&bt{var y=a(70402),C=a(69902),g=a(23568),f=a(57355),d=a(6113),c=a(91389),h=a(55292),p=a(82985),u=a(62329),m=a(35154),v=a(17777),x=a(269),b=a(86081);S.exports=function(_,A,M){if(A instanceof b)return A.parent=_,A;M=void 0===M?C:x(C,M);var I=u(A);!I&&M.targets&&(I=M.targets);for(var R=p(A),F=m(A,"delay",M.delay),N=m(A,"duration",M.duration),V=m(A,"easeParams",M.easeParams),B=m(A,"ease",M.ease),G=m(A,"hold",M.hold),Q=m(A,"repeat",M.repeat),H=m(A,"repeatDelay",M.repeatDelay),K=f(A,"yoyo",M.yoyo),tt=f(A,"flipX",M.flipX),at=f(A,"flipY",M.flipY),lt=m(A,"interpolation",M.interpolation),q=function(Zt,ne,ae,fe){if("texture"===ae){var ke=fe,Ye=void 0;Array.isArray(fe)?(ke=fe[0],Ye=fe[1]):fe.hasOwnProperty("value")?(ke=fe.value,Array.isArray(fe.value)?(ke=fe.value[0],Ye=fe.value[1]):"string"==typeof fe.value&&(ke=fe.value)):"string"==typeof fe&&(ke=fe),Zt.addFrame(ne,ke,Ye,h(fe,"delay",F),m(fe,"duration",N),m(fe,"hold",G),m(fe,"repeat",Q),m(fe,"repeatDelay",H),f(fe,"flipX",tt),f(fe,"flipY",at))}else{var Pe=v(ae,fe),Qe=c(m(fe,"interpolation",lt));Zt.add(ne,ae,Pe.getEnd,Pe.getStart,Pe.getActive,d(m(fe,"ease",B),m(fe,"easeParams",V)),h(fe,"delay",F),m(fe,"duration",N),f(fe,"yoyo",K),m(fe,"hold",G),m(fe,"repeat",Q),m(fe,"repeatDelay",H),f(fe,"flipX",tt),f(fe,"flipY",at),Qe,Qe?fe:null)}},it=new b(_,I),Y=0;Y{var y=a(70402),C=a(23568),g=a(57355),f=a(62329),d=a(35154),c=a(8357),h=a(43960);S.exports=function(u,m){if(m instanceof h)return m.parent=u,m;var v=new h(u);v.startDelay=d(m,"delay",0),v.completeDelay=C(m,"completeDelay",0),v.loop=Math.round(C(m,"loop",d(m,"repeat",0))),v.loopDelay=Math.round(C(m,"loopDelay",d(m,"repeatDelay",0))),v.paused=g(m,"paused",!1),v.persist=g(m,"persist",!1),v.callbackScope=d(m,"callbackScope",v);var x,b=y.TYPES;for(x=0;x{S.exports={GetBoolean:a(57355),GetEaseFunction:a(6113),GetInterpolationFunction:a(91389),GetNewValue:a(55292),GetProps:a(82985),GetTargets:a(62329),GetValueOp:a(17777),NumberTweenBuilder:a(88032),StaggerBuilder:a(93109),TweenBuilder:a(8357)}},73685:S=>{S.exports="active"},98540:S=>{S.exports="complete"},67233:S=>{S.exports="loop"},2859:S=>{S.exports="pause"},98336:S=>{S.exports="repeat"},25764:S=>{S.exports="resume"},32193:S=>{S.exports="start"},84371:S=>{S.exports="stop"},70766:S=>{S.exports="update"},55659:S=>{S.exports="yoyo"},842:(S,P,a)=>{S.exports={TWEEN_ACTIVE:a(73685),TWEEN_COMPLETE:a(98540),TWEEN_LOOP:a(67233),TWEEN_PAUSE:a(2859),TWEEN_RESUME:a(25764),TWEEN_REPEAT:a(98336),TWEEN_START:a(32193),TWEEN_STOP:a(84371),TWEEN_UPDATE:a(70766),TWEEN_YOYO:a(55659)}},43066:(S,P,a)=>{var y={States:a(86353),Builders:a(30231),Events:a(842),TweenManager:a(40382),Tween:a(86081),TweenData:a(48177),TweenFrameData:a(42220),BaseTween:a(70402),TweenChain:a(43960)};S.exports=y},70402:(S,P,a)=>{var y=a(83419),C=a(50792),g=a(842),f=a(86353),d=new y({Extends:C,initialize:function(h){C.call(this),this.parent=h,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=f.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.persist=!1},setTimeScale:function(c){return this.timeScale=c,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(g.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(g.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(g.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(g.TWEEN_COMPLETE,"onComplete")},complete:function(c){return void 0===c&&(c=0),c?(this.setCompleteDelayState(),this.countdown=c):this.onCompleteHandler(),this},completeAfterLoop:function(c){return void 0===c&&(c=0),this.loopCounter>c&&(this.loopCounter=c),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(g.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(c){this.countdown-=c,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(g.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(c){return this.countdown-=c,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(g.TWEEN_START,"onStart"),c=0),c},updateCompleteDelay:function(c){this.countdown-=c,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(c,h,p){return void 0===p&&(p=[]),this.callbacks.hasOwnProperty(c)&&(this.callbacks[c]={func:h,params:p}),this},setPendingState:function(){this.state=f.PENDING},setActiveState:function(){this.state=f.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=f.LOOP_DELAY},setCompleteDelayState:function(){this.state=f.COMPLETE_DELAY},setStartDelayState:function(){this.state=f.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=f.PENDING_REMOVE},setRemovedState:function(){this.state=f.REMOVED},setFinishedState:function(){this.state=f.FINISHED},setDestroyedState:function(){this.state=f.DESTROYED},isPending:function(){return this.state===f.PENDING},isActive:function(){return this.state===f.ACTIVE},isLoopDelayed:function(){return this.state===f.LOOP_DELAY},isCompleteDelayed:function(){return this.state===f.COMPLETE_DELAY},isStartDelayed:function(){return this.state===f.START_DELAY},isPendingRemove:function(){return this.state===f.PENDING_REMOVE},isRemoved:function(){return this.state===f.REMOVED},isFinished:function(){return this.state===f.FINISHED},isDestroyed:function(){return this.state===f.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(c){c.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});d.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],S.exports=d},95042:(S,P,a)=>{var y=a(83419),C=a(842),g=a(86353),f=new y({initialize:function(c,h,p,u,m,v,x,b,T,_){this.tween=c,this.targetIndex=h,this.duration=u,this.totalDuration=0,this.delay=0,this.getDelay=p,this.yoyo=m,this.hold=v,this.repeat=x,this.repeatDelay=b,this.repeatCounter=0,this.flipX=T,this.flipY=_,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(d){void 0===d&&(d=this.current),this.tween.targets[this.targetIndex][this.key]=d},setCreatedState:function(){this.state=g.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=g.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=g.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=g.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=g.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=g.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=g.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=g.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===g.CREATED},isDelayed:function(){return this.state===g.DELAY},isPendingRender:function(){return this.state===g.PENDING_RENDER},isPlayingForward:function(){return this.state===g.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===g.PLAYING_BACKWARD},isHolding:function(){return this.state===g.HOLD_DELAY},isRepeating:function(){return this.state===g.REPEAT_DELAY},isComplete:function(){return this.state===g.COMPLETE},setStateFromEnd:function(d){this.yoyo?this.onRepeat(d,!0,!0):this.repeatCounter>0?this.onRepeat(d,!0,!1):this.setCompleteState()},setStateFromStart:function(d){this.repeatCounter>0?this.onRepeat(d,!1):this.setCompleteState()},reset:function(){var d=this.tween,c=d.totalTargets,h=this.targetIndex,p=d.targets[h],u=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(p,u,0,h,c,d),this.repeatCounter=-1===this.repeat?g.MAX:this.repeat,this.setPendingRenderState();var m=this.duration+this.hold;this.yoyo&&(m+=this.duration);var v=m+this.repeatDelay;this.totalDuration=this.delay+m,-1===this.repeat?(this.totalDuration+=v*g.MAX,d.isInfinite=!0):this.repeat>0&&(this.totalDuration+=v*this.repeat),this.totalDuration>d.duration&&(d.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(d,c,h){var p=this.tween,u=p.totalTargets,m=this.targetIndex,v=p.targets[m],x=this.key,b="texture"!==x;if(this.elapsed=d,this.progress=d/this.duration,this.flipX&&v.toggleFlipX(),this.flipY&&v.toggleFlipY(),b&&(c||h)&&(this.start=this.getStartValue(v,x,this.start,m,u,p)),h)return this.setPlayingBackwardState(),void this.dispatchEvent(C.TWEEN_YOYO,"onYoyo");this.repeatCounter--,b&&(this.end=this.getEndValue(v,x,this.start,m,u,p)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-d,b&&(this.current=this.start,v[x]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(C.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});S.exports=f},69902:S=>{S.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},81076:S=>{S.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},86081:(S,P,a)=>{var y=a(70402),C=a(83419),g=a(842),f=a(44603),d=a(39429),c=a(36383),h=a(86353),p=a(48177),u=a(42220),m=new C({Extends:y,initialize:function(x,b){y.call(this,x),this.targets=b,this.totalTargets=b.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(v,x,b,T,_,A,M,I,R,F,N,V,B,G,Q,H){var K=new p(this,v,x,b,T,_,A,M,I,R,F,N,V,B,G,Q,H);return this.totalData=this.data.push(K),K},addFrame:function(v,x,b,T,_,A,M,I,R,F){var N=new u(this,v,x,b,T,_,A,M,I,R,F);return this.totalData=this.data.push(N),N},getValue:function(v){void 0===v&&(v=0);var x=null;return this.data&&(x=this.data[v].current),x},hasTarget:function(v){return this.targets&&-1!==this.targets.indexOf(v)},updateTo:function(v,x,b){if(void 0===b&&(b=!1),"texture"!==v)for(var T=0;T0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(g.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,y.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(v,x,b){if(void 0===v&&(v=0),void 0===x&&(x=16.6),void 0===b&&(b=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;b||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(g.TWEEN_ACTIVE,"onActive");var T=this.paused;if(this.paused=!1,v>0){for(var _=Math.floor(v/x),A=v-_*x,M=0;M<_;M++)this.update(x);A>0&&this.update(A)}return this.paused=T,this.isSeeking=!1,this},initTweenData:function(v){void 0===v&&(v=!1),this.duration=0,this.startDelay=c.MAX_SAFE_INTEGER;for(var x=this.data,b=0;b0?T+_+(T+this.loopDelay)*A:T+_},reset:function(v){return void 0===v&&(v=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=h.MAX),v||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(g.TWEEN_ACTIVE,"onActive")),this},update:function(v){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(v*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(v),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(v),!1;this.hasStarted||(this.startDelay-=v,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(g.TWEEN_START,"onStart"),v=0));var x=!1;if(this.isActive())for(var b=this.data,T=0;T{var y=a(72905),C=a(70402),g=a(83419),f=a(842),d=a(44603),c=a(39429),h=a(86353),p=new g({Extends:C,initialize:function(m){C.call(this,m),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?h.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(u){var m=this.parent.create(u);Array.isArray(m)||(m=[m]);for(var v=this.data,x=0;x0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(f.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var u=this.data,m=this.totalData,v=0;v{var y=a(95042),C=a(45319),g=a(83419),f=a(842),d=new g({Extends:y,initialize:function(h,p,u,m,v,x,b,T,_,A,M,I,R,F,N,V,B){y.call(this,h,p,T,_,A,M,I,R,F,N),this.key=u,this.getActiveValue=x,this.getEndValue=m,this.getStartValue=v,this.ease=b,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=V,this.interpolationData=B},reset:function(c){y.prototype.reset.call(this);var h=this.tween.targets[this.targetIndex],p=this.key;c&&(h[p]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(h[p]=this.getActiveValue(h,p,0))},update:function(c){var h=this.tween,p=h.totalTargets,u=this.targetIndex,m=h.targets[u],v=this.key;if(!m)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=c,this.elapsed<=0&&(this.elapsed=0,c=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(f.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(m,v,m[v],u,p,h),this.end=this.getEndValue(m,v,this.start,u,p,h),this.current=this.start,m[v]=this.start,this.setPlayingForwardState(),!0;var x=this.isPlayingForward(),b=this.isPlayingBackward();if(x||b){var T=this.elapsed,_=this.duration,A=0,M=!1;(T+=c)>=_?(A=T-_,T=_,M=!0):T<0&&(T=0);var I=C(T/_,0,1);this.elapsed=T,this.progress=I,this.previous=this.current,x||(I=1-I);var R=this.ease(I);this.current=this.interpolation?this.interpolation(this.interpolationData,R):this.start+(this.end-this.start)*R,m[v]=this.current,M&&(x?this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(A):this.setStateFromStart(A)),this.dispatchEvent(f.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(c,h){var p=this.tween;if(!p.isSeeking){var u=p.targets[this.targetIndex],m=this.key,v=this.current,x=this.previous;p.emit(c,p,m,u,v,x);var b=p.callbacks[h];b&&b.func.apply(p.callbackScope,[p,u,m,v,x].concat(b.params))}},destroy:function(){y.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});S.exports=d},42220:(S,P,a)=>{var y=a(95042),C=a(45319),g=a(83419),f=a(842),d=new g({Extends:y,initialize:function(h,p,u,m,v,x,b,T,_,A,M){y.call(this,h,p,v,x,!1,b,T,_,A,M),this.key="texture",this.startTexture=null,this.endTexture=u,this.startFrame=null,this.endFrame=m,this.yoyo=0!==T},reset:function(c){y.prototype.reset.call(this);var h=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=h.texture.key,this.startFrame=h.frame.name),c&&h.setTexture(this.startTexture,this.startFrame)},update:function(c){var u=this.tween.targets[this.targetIndex];if(!u)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=c,this.elapsed<=0&&(this.elapsed=0,c=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(f.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&u.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var m=this.isPlayingForward(),v=this.isPlayingBackward();if(m||v){var x=this.elapsed,b=this.duration,T=0,_=!1;(x+=c)>=b?(T=x-b,x=b,_=!0):x<0&&(x=0);var A=C(x/b,0,1);this.elapsed=x,this.progress=A,_&&(m?(u.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(T)):(u.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(T))),this.dispatchEvent(f.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(c,h){var p=this.tween;if(!p.isSeeking){var u=p.targets[this.targetIndex],m=this.key;p.emit(c,p,m,u);var v=p.callbacks[h];v&&v.func.apply(p.callbackScope,[p,u,m].concat(v.params))}},destroy:function(){y.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});S.exports=d},86353:S=>{S.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},83419:S=>{function a(d,c,h){var p=h?d[c]:Object.getOwnPropertyDescriptor(d,c);return!h&&p.value&&"object"==typeof p.value&&(p=p.value),!(!p||!function P(d){return!!d.get&&"function"==typeof d.get||!!d.set&&"function"==typeof d.set}(p))&&(typeof p.enumerable>"u"&&(p.enumerable=!0),typeof p.configurable>"u"&&(p.configurable=!0),p)}function y(d,c){var h=Object.getOwnPropertyDescriptor(d,c);return!!h&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)}function C(d,c,h,p){for(var u in c)if(c.hasOwnProperty(u)){var m=a(c,u,h);if(!1!==m){if(y((p||d).prototype,u)){if(f.ignoreFinals)continue;throw new Error("cannot override final property '"+u+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(d.prototype,u,m)}else d.prototype[u]=c[u]}}function g(d,c){if(c){Array.isArray(c)||(c=[c]);for(var h=0;h{S.exports=function(){}},20242:S=>{S.exports=function(){return null}},71146:S=>{S.exports=function(a,y,C,g,f){if(void 0===f&&(f=a),C>0){var d=C-a.length;if(d<=0)return null}if(!Array.isArray(y))return-1===a.indexOf(y)?(a.push(y),g&&g.call(f,y),y):null;for(var c=y.length-1;c>=0;)-1!==a.indexOf(y[c])&&y.splice(c,1),c--;if(0===(c=y.length))return null;C>0&&c>d&&(y.splice(d),c=d);for(var h=0;h{S.exports=function(a,y,C,g,f,d){if(void 0===C&&(C=0),void 0===d&&(d=a),g>0){var c=g-a.length;if(c<=0)return null}if(!Array.isArray(y))return-1===a.indexOf(y)?(a.splice(C,0,y),f&&f.call(d,y),y):null;for(var h=y.length-1;h>=0;)-1!==a.indexOf(y[h])&&y.pop(),h--;if(0===(h=y.length))return null;g>0&&h>c&&(y.splice(c),h=c);for(var p=h-1;p>=0;p--){var u=y[p];a.splice(C,0,u),f&&f.call(d,u)}return y}},66905:S=>{S.exports=function(a,y){var C=a.indexOf(y);return-1!==C&&C{var y=a(82011);S.exports=function(g,f,d,c,h){void 0===c&&(c=0),void 0===h&&(h=g.length);var p=0;if(y(g,c,h))for(var u=c;u{S.exports=function(a,y,C){var g,f=[null];for(g=3;g{var y=a(82011);S.exports=function(g,f,d,c,h){if(void 0===c&&(c=0),void 0===h&&(h=g.length),y(g,c,h)){var p,u=[null];for(p=5;p{S.exports=function(a,y,C){if(!y.length)return NaN;if(1===y.length)return y[0];var f,d,g=1;if(C){if(ay.length&&(g=y.length),C?(d=y[g][C])-a<=a-(f=y[g-1][C])?y[g]:y[g-1]:(d=y[g])-a<=a-(f=y[g-1])?d:f}},43491:S=>{var P=function(a,y){void 0===y&&(y=[]);for(var C=0;C{var y=a(82011);S.exports=function(g,f,d,c,h){void 0===c&&(c=0),void 0===h&&(h=g.length);var p=[];if(y(g,c,h))for(var u=c;u{var y=a(82011);S.exports=function(g,f,d,c,h){if(void 0===c&&(c=0),void 0===h&&(h=g.length),y(g,c,h))for(var p=c;p{S.exports=function(a,y,C){void 0===y&&(y=0),void 0===C&&(C=a.length);var g=y+Math.floor(Math.random()*C);return void 0===a[g]?null:a[g]}},85835:S=>{S.exports=function(a,y,C){if(y===C)return a;var g=a.indexOf(y),f=a.indexOf(C);if(g<0||f<0)throw new Error("Supplied items must be elements of the same array");return g>f||(a.splice(g,1),f=a.indexOf(C),a.splice(f+1,0,y)),a}},83371:S=>{S.exports=function(a,y,C){if(y===C)return a;var g=a.indexOf(y),f=a.indexOf(C);if(g<0||f<0)throw new Error("Supplied items must be elements of the same array");return g{S.exports=function(a,y){var C=a.indexOf(y);if(C>0){var g=a[C-1],f=a.indexOf(g);a[C]=g,a[f]=y}return a}},69693:S=>{S.exports=function(a,y,C){var g=a.indexOf(y);if(-1===g||C<0||C>=a.length)throw new Error("Supplied index out of bounds");return g!==C&&(a.splice(g,1),a.splice(C,0,y)),y}},40853:S=>{S.exports=function(a,y){var C=a.indexOf(y);if(-1!==C&&C{S.exports=function(a,y,C,g){var d,f=[],c=!1;if((C||g)&&(c=!0,C||(C=""),g||(g="")),y=y;d--)f.push(c?C+d.toString()+g:d);else for(d=a;d<=y;d++)f.push(c?C+d.toString()+g:d);return f}},593:(S,P,a)=>{var y=a(2284);S.exports=function(g,f,d){void 0===g&&(g=0),void 0===f&&(f=null),void 0===d&&(d=1),null===f&&(f=g,g=0);for(var c=[],h=Math.max(y((f-g)/(d||1)),0),p=0;p{function P(C,g,f){var d=C[g];C[g]=C[f],C[f]=d}function a(C,g){return Cg?1:0}var y=function(C,g,f,d,c){for(void 0===f&&(f=0),void 0===d&&(d=C.length-1),void 0===c&&(c=a);d>f;){if(d-f>600){var h=d-f+1,p=g-f+1,u=Math.log(h),m=.5*Math.exp(2*u/3),v=.5*Math.sqrt(u*m*(h-m)/h)*(p-h/2<0?-1:1),x=Math.max(f,Math.floor(g-p*m/h+v)),b=Math.min(d,Math.floor(g+(h-p)*m/h+v));y(C,g,x,b,c)}var T=C[g],_=f,A=d;for(P(C,f,g),c(C[d],T)>0&&P(C,f,d);_0;)A--}0===c(C[f],T)?P(C,f,A):P(C,++A,d),A<=g&&(f=A+1),g<=A&&(d=A-1)}};S.exports=y},88492:(S,P,a)=>{var y=a(35154),C=a(33680),g=function(d,c,h){for(var p=[],u=0;u{var y=a(19133);S.exports=function(g,f,d,c){var h;if(void 0===c&&(c=g),!Array.isArray(f))return-1!==(h=g.indexOf(f))?(y(g,h),d&&d.call(c,f),f):null;for(var p=f.length-1,u=[];p>=0;){var m=f[p];-1!==(h=g.indexOf(m))&&(y(g,h),u.push(m),d&&d.call(c,m)),p--}return u}},60248:(S,P,a)=>{var y=a(19133);S.exports=function(g,f,d,c){if(void 0===c&&(c=g),f<0||f>g.length-1)throw new Error("Index out of bounds");var h=y(g,f);return d&&d.call(c,h),h}},81409:(S,P,a)=>{var y=a(82011);S.exports=function(g,f,d,c,h){if(void 0===f&&(f=0),void 0===d&&(d=g.length),void 0===h&&(h=g),y(g,f,d)){var u=g.splice(f,d-f);if(c)for(var m=0;m{var y=a(19133);S.exports=function(g,f,d){void 0===f&&(f=0),void 0===d&&(d=g.length);var c=f+Math.floor(Math.random()*d);return y(g,c)}},42169:S=>{S.exports=function(a,y,C){var g=a.indexOf(y),f=a.indexOf(C);return-1!==g&&-1===f&&(a[g]=C,!0)}},86003:S=>{S.exports=function(a,y){void 0===y&&(y=1);for(var C=null,g=0;g{S.exports=function(a,y){void 0===y&&(y=1);for(var C=null,g=0;g{S.exports=function(a,y,C,g){var f=a.length;if(y<0||y>f||y>=C||C>f){if(g)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},89545:S=>{S.exports=function(a,y){var C=a.indexOf(y);return-1!==C&&C>0&&(a.splice(C,1),a.unshift(y)),y}},17810:(S,P,a)=>{var y=a(82011);S.exports=function(g,f,d,c,h){if(void 0===c&&(c=0),void 0===h&&(h=g.length),y(g,c,h))for(var p=c;p{S.exports=function(a){for(var y=a.length-1;y>0;y--){var C=Math.floor(Math.random()*(y+1)),g=a[y];a[y]=a[C],a[C]=g}return a}},90126:S=>{S.exports=function(a){var y=/\D/g;return a.sort(function(C,g){return parseInt(C.replace(y,""),10)-parseInt(g.replace(y,""),10)}),a}},19133:S=>{S.exports=function(a,y){if(!(y>=a.length)){for(var C=a.length-1,g=a[y],f=y;f{var y=a(82264);function C(c,h){return String(c).localeCompare(h)}function f(c,h,p,u){var b,T,_,A,M,m=c.length,v=0,x=2*p;for(b=0;bm&&(T=m),_>m&&(_=m),A=b,M=T;;)if(A{S.exports=function(a,y,C){if(y===C)return a;var g=a.indexOf(y),f=a.indexOf(C);if(g<0||f<0)throw new Error("Supplied items must be elements of the same array");return a[g]=C,a[f]=y,a}},37105:(S,P,a)=>{S.exports={Matrix:a(54915),Add:a(71146),AddAt:a(51067),BringToTop:a(66905),CountAllMatching:a(21612),Each:a(95428),EachInRange:a(36914),FindClosestInSorted:a(81957),Flatten:a(43491),GetAll:a(46710),GetFirst:a(58731),GetRandom:a(26546),MoveDown:a(70864),MoveTo:a(69693),MoveUp:a(40853),MoveAbove:a(85835),MoveBelow:a(83371),NumberArray:a(20283),NumberArrayStep:a(593),QuickSelect:a(43886),Range:a(88492),Remove:a(72905),RemoveAt:a(60248),RemoveBetween:a(81409),RemoveRandomElement:a(31856),Replace:a(42169),RotateLeft:a(86003),RotateRight:a(49498),SafeRange:a(82011),SendToBack:a(89545),SetAll:a(17810),Shuffle:a(33680),SortByDigits:a(90126),SpliceOne:a(19133),StableSort:a(19186),Swap:a(25630)}},86922:S=>{S.exports=function(a){if(!Array.isArray(a)||!Array.isArray(a[0]))return!1;for(var y=a[0].length,C=1;C{var y=a(41836),C=a(86922);S.exports=function(f){var d="";if(!C(f))return d;for(var c=0;c{S.exports=function(a){return a.reverse()}},21224:S=>{S.exports=function(a){for(var y=0;y{var y=a(37829);S.exports=function(g){return y(g,180)}},44657:(S,P,a)=>{var y=a(37829);S.exports=function(g,f){void 0===f&&(f=1);for(var d=0;d{var y=a(86922),C=a(2429);S.exports=function(f,d){if(void 0===d&&(d=90),!y(f))return null;if("string"!=typeof d&&(d=(d%360+360)%360),90===d||-270===d||"rotateLeft"===d)(f=C(f)).reverse();else if(-90===d||270===d||"rotateRight"===d)f.reverse(),f=C(f);else if(180===Math.abs(d)||"rotate180"===d){for(var c=0;c{var y=a(37829);S.exports=function(g,f){void 0===f&&(f=1);for(var d=0;d{var y=a(86003),C=a(49498);S.exports=function(f,d,c){if(void 0===d&&(d=0),void 0===c&&(c=0),0!==c&&(c<0?y(f,Math.abs(c)):C(f,c)),0!==d)for(var h=0;h{S.exports=function(a){for(var y=a.length,C=a[0].length,g=new Array(C),f=0;f-1;d--)g[f][d]=a[d][f]}return g}},54915:(S,P,a)=>{S.exports={CheckMatrix:a(86922),MatrixToString:a(63362),ReverseColumns:a(92598),ReverseRows:a(21224),Rotate180:a(98717),RotateLeft:a(44657),RotateMatrix:a(37829),RotateRight:a(92632),Translate:a(69512),TransposeMatrix:a(2429)}},71334:S=>{var P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";S.exports=function(y,C){for(var g=new Uint8Array(y),f=g.length,d=C?"data:"+C+";base64,":"",c=0;c>2],d+=P[(3&g[c])<<4|g[c+1]>>4],d+=P[(15&g[c+1])<<2|g[c+2]>>6],d+=P[63&g[c+2]];return f%3==2?d=d.substring(0,d.length-1)+"=":f%3==1&&(d=d.substring(0,d.length-2)+"=="),d}},53134:S=>{for(var a=new Uint8Array(256),y=0;y<64;y++)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(y)]=y;S.exports=function(g){var h,p,u,m,f=(g=g.substr(g.indexOf(",")+1)).length,d=.75*f,c=0;"="===g[f-1]&&(d--,"="===g[f-2]&&d--);for(var v=new ArrayBuffer(d),x=new Uint8Array(v),b=0;b>4,x[c++]=(15&p)<<4|u>>2,x[c++]=(3&u)<<6|63&m;return v}},65839:(S,P,a)=>{S.exports={ArrayBufferToBase64:a(71334),Base64ToArrayBuffer:a(53134)}},91799:(S,P,a)=>{S.exports={Array:a(37105),Base64:a(65839),Objects:a(1183),String:a(31749),NOOP:a(29747),NULL:a(20242)}},41786:S=>{S.exports=function(a){var y={};for(var C in a)y[C]=Array.isArray(a[C])?a[C].slice(0):a[C];return y}},62644:S=>{var P=function(a){var y,g;if("object"!=typeof a||null===a)return a;for(g in y=Array.isArray(a)?[]:{},a)y[g]=P(a[g]);return y};S.exports=P},79291:(S,P,a)=>{var y=a(41212),C=function(){var g,f,d,c,h,p,u=arguments[0]||{},m=1,v=arguments.length,x=!1;for("boolean"==typeof u&&(x=u,u=arguments[1]||{},m=2),v===m&&(u=this,--m);m{var y=a(75508),C=a(35154);S.exports=function(f,d,c){var h=C(f,d,null);if(null===h)return c;if(Array.isArray(h))return y.RND.pick(h);if("object"==typeof h){if(h.hasOwnProperty("randInt"))return y.RND.integerInRange(h.randInt[0],h.randInt[1]);if(h.hasOwnProperty("randFloat"))return y.RND.realInRange(h.randFloat[0],h.randFloat[1])}else if("function"==typeof h)return h(d);return h}},95540:S=>{S.exports=function(a,y,C){var g=typeof a;return a&&"number"!==g&&"string"!==g&&a.hasOwnProperty(y)&&void 0!==a[y]?a[y]:C}},82840:(S,P,a)=>{var y=a(35154),C=a(45319);S.exports=function(f,d,c,h,p){void 0===p&&(p=c);var u=y(f,d,p);return C(u,c,h)}},35154:S=>{S.exports=function(a,y,C,g){if(!a&&!g||"number"==typeof a)return C;if(a&&a.hasOwnProperty(y))return a[y];if(g&&g.hasOwnProperty(y))return g[y];if(-1!==y.indexOf(".")){for(var f=y.split("."),d=a,c=g,h=C,p=C,u=!0,m=!0,v=0;v{S.exports=function(a,y){for(var C=0;C{S.exports=function(a,y){for(var C=0;C{S.exports=function(a,y){return a.hasOwnProperty(y)}},41212:S=>{S.exports=function(a){if(!a||"object"!=typeof a||a.nodeType||a===a.window)return!1;try{if(a.constructor&&!{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0}},46975:(S,P,a)=>{var y=a(41786);S.exports=function(g,f){var d=y(g);for(var c in f)d.hasOwnProperty(c)||(d[c]=f[c]);return d}},269:(S,P,a)=>{var y=a(41786);S.exports=function(g,f){var d=y(g);for(var c in f)d.hasOwnProperty(c)&&(d[c]=f[c]);return d}},18254:(S,P,a)=>{var y=a(97022);S.exports=function(g,f){for(var d={},c=0;c{S.exports=function(a,y,C){if(!a||"number"==typeof a)return!1;if(a.hasOwnProperty(y))return a[y]=C,!0;if(-1!==y.indexOf(".")){for(var g=y.split("."),f=a,d=a,c=0;c{S.exports={Clone:a(41786),DeepCopy:a(62644),Extend:a(79291),GetAdvancedValue:a(23568),GetFastValue:a(95540),GetMinMaxValue:a(82840),GetValue:a(35154),HasAll:a(69036),HasAny:a(1985),HasValue:a(97022),IsPlainObject:a(41212),Merge:a(46975),MergeRight:a(269),Pick:a(18254),SetValue:a(61622)}},27902:S=>{S.exports=function(a,y){return a.replace(/%([0-9]+)/g,function(C,g){return y[Number(g)-1]})}},41836:S=>{S.exports=function(a,y,C,g){void 0===y&&(y=0),void 0===C&&(C=" "),void 0===g&&(g=3);var f=0;if(y+1>=(a=a.toString()).length)switch(g){case 1:a=new Array(y+1-a.length).join(C)+a;break;case 3:var d=Math.ceil((f=y-a.length)/2);a=new Array(f-d+1).join(C)+a+new Array(d+1).join(C);break;default:a+=new Array(y+1-a.length).join(C)}return a}},33628:S=>{S.exports=function(a,y){return 0===y?a.slice(1):a.slice(0,y)+a.slice(y+1)}},27671:S=>{S.exports=function(a){return a.split("").reverse().join("")}},45650:S=>{S.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var y=16*Math.random()|0;return("x"===a?y:3&y|8).toString(16)})}},35355:S=>{S.exports=function(a){return a&&a[0].toUpperCase()+a.slice(1)}},31749:(S,P,a)=>{S.exports={Format:a(27902),Pad:a(41836),RemoveAt:a(33628),Reverse:a(27671),UppercaseFirst:a(35355),UUID:a(45650)}}},Mt={};function jt(S){var P=Mt[S];if(void 0!==P)return P.exports;var a=Mt[S]={exports:{}};return de[S](a,a.exports,jt),a.exports}return jt.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),jt(85454)})(),Wt.exports=jt()},6293:Wt=>{"use strict";Wt.exports=JSON.parse('{"a":["ahole","anus","ash0le","ash0les","asholes","ass","Ass Monkey","Assface","assh0le","assh0lez","asshole","assholes","assholz","asswipe","azzhole","bassterds","bastard","bastards","bastardz","basterds","basterdz","Biatch","bitch","bitches","Blow Job","boffing","butthole","buttwipe","c0ck","c0cks","c0k","Carpet Muncher","cawk","cawks","Clit","cnts","cntz","cock","cockhead","cock-head","cocks","CockSucker","cock-sucker","crap","cum","cunt","cunts","cuntz","dick","dild0","dild0s","dildo","dildos","dilld0","dilld0s","dominatricks","dominatrics","dominatrix","dyke","enema","f u c k","f u c k e r","fag","fag1t","faget","fagg1t","faggit","faggot","fagg0t","fagit","fags","fagz","faig","faigs","fart","flipping the bird","fuck","fucker","fuckin","fucking","fucks","Fudge Packer","fuk","Fukah","Fuken","fuker","Fukin","Fukk","Fukkah","Fukken","Fukker","Fukkin","g00k","God-damned","h00r","h0ar","h0re","hells","hoar","hoor","hoore","jackoff","jap","japs","jerk-off","jisim","jiss","jizm","jizz","knob","knobs","knobz","kunt","kunts","kuntz","Lezzian","Lipshits","Lipshitz","masochist","masokist","massterbait","masstrbait","masstrbate","masterbaiter","masterbate","masterbates","Motha Fucker","Motha Fuker","Motha Fukkah","Motha Fukker","Mother Fucker","Mother Fukah","Mother Fuker","Mother Fukkah","Mother Fukker","mother-fucker","Mutha Fucker","Mutha Fukah","Mutha Fuker","Mutha Fukkah","Mutha Fukker","n1gr","nastt","nigger;","nigur;","niiger;","niigr;","orafis","orgasim;","orgasm","orgasum","oriface","orifice","orifiss","packi","packie","packy","paki","pakie","paky","pecker","peeenus","peeenusss","peenus","peinus","pen1s","penas","penis","penis-breath","penus","penuus","Phuc","Phuck","Phuk","Phuker","Phukker","polac","polack","polak","Poonani","pr1c","pr1ck","pr1k","pusse","pussee","pussy","puuke","puuker","qweir","recktum","rectum","retard","sadist","scank","schlong","screwing","semen","sex","sexy","Sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shit","shits","shitter","Shitty","Shity","shitz","Shyt","Shyte","Shytty","Shyty","skanck","skank","skankee","skankey","skanks","Skanky","slag","slut","sluts","Slutty","slutz","son-of-a-bitch","tit","turd","va1jina","vag1na","vagiina","vagina","vaj1na","vajina","vullva","vulva","w0p","wh00r","wh0re","whore","xrated","xxx","b!+ch","bitch","blowjob","clit","arschloch","fuck","shit","ass","asshole","b!tch","b17ch","b1tch","bastard","bi+ch","boiolas","buceta","c0ck","cawk","chink","cipa","clits","cock","cum","cunt","dildo","dirsa","ejakulate","fatass","fcuk","fuk","fux0r","hoer","hore","jism","kawk","l3itch","l3i+ch","masturbate","masterbat*","masterbat3","motherfucker","s.o.b.","mofo","nazi","nigga","nigger","nutsack","phuck","pimpis","pusse","pussy","scrotum","sh!t","shemale","shi+","sh!+","slut","smut","teets","tits","boobs","b00bs","teez","testical","testicle","titt","w00se","jackoff","wank","whoar","whore","*damn","*dyke","*fuck*","*shit*","@$$","amcik","andskota","arse*","assrammer","ayir","bi7ch","bitch*","bollock*","breasts","butt-pirate","cabron","cazzo","chraa","chuj","Cock*","cunt*","d4mn","daygo","dego","dick*","dike*","dupa","dziwka","ejackulate","Ekrem*","Ekto","enculer","faen","fag*","fanculo","fanny","feces","feg","Felcher","ficken","fitt*","Flikker","foreskin","Fotze","Fu(*","fuk*","futkretzn","gook","guiena","h0r","h4x0r","hell","helvete","hoer*","honkey","Huevon","hui","injun","jizz","kanker*","kike","klootzak","kraut","knulle","kuk","kuksuger","Kurac","kurwa","kusi*","kyrpa*","lesbo","mamhoon","masturbat*","merd*","mibun","monkleigh","mouliewop","muie","mulkku","muschi","nazis","nepesaurio","nigger*","orospu","paska*","perse","picka","pierdol*","pillu*","pimmel","piss*","pizda","poontsee","poop","porn","p0rn","pr0n","preteen","pula","pule","puta","puto","qahbeh","queef*","rautenberg","schaffer","scheiss*","schlampe","schmuck","screw","sh!t*","sharmuta","sharmute","shipal","shiz","skribz","skurwysyn","sphencter","spic","spierdalaj","splooge","suka","b00b*","testicle*","titt*","twat","vittu","wank*","wetback*","wichser","wop*","yed","zabourah"]}')}},Wt=>{Wt(Wt.s=7652)}]); \ No newline at end of file diff --git a/docs/polyfills.2acbdacaebe585c5.js b/docs/polyfills.2acbdacaebe585c5.js deleted file mode 100644 index 7004646..0000000 --- a/docs/polyfills.2acbdacaebe585c5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksct_implementation_demonstrator=self.webpackChunksct_implementation_demonstrator||[]).push([[461],{6935:()=>{const te=globalThis;function ee(e){return(te.__Zone_symbol_prefix||"__zone_symbol__")+e}const ke=Object.getOwnPropertyDescriptor,Ne=Object.defineProperty,Le=Object.getPrototypeOf,_t=Object.create,Et=Array.prototype.slice,Ie="addEventListener",Me="removeEventListener",Ze=ee(Ie),Ae=ee(Me),ae="true",le="false",ve=ee("");function je(e,r){return Zone.current.wrap(e,r)}function He(e,r,c,t,i){return Zone.current.scheduleMacroTask(e,r,c,t,i)}const j=ee,we=typeof window<"u",Te=we?window:void 0,$=we&&Te||globalThis,Tt="removeAttribute";function xe(e,r){for(let c=e.length-1;c>=0;c--)"function"==typeof e[c]&&(e[c]=je(e[c],r+"_"+c));return e}function We(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const qe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Re=!("nw"in $)&&typeof $.process<"u"&&"[object process]"===$.process.toString(),Ve=!Re&&!qe&&!(!we||!Te.HTMLElement),Xe=typeof $.process<"u"&&"[object process]"===$.process.toString()&&!qe&&!(!we||!Te.HTMLElement),Ce={},mt=j("enable_beforeunload"),Ye=function(e){if(!(e=e||$.event))return;let r=Ce[e.type];r||(r=Ce[e.type]=j("ON_PROPERTY"+e.type));const c=this||e.target||$,t=c[r];let i;return Ve&&c===Te&&"error"===e.type?(i=t&&t.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===i&&e.preventDefault()):(i=t&&t.apply(this,arguments),"beforeunload"===e.type&&$[mt]&&"string"==typeof i?e.returnValue=i:null!=i&&!i&&e.preventDefault()),i};function $e(e,r,c){let t=ke(e,r);if(!t&&c&&ke(c,r)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;const i=j("on"+r+"patched");if(e.hasOwnProperty(i)&&e[i])return;delete t.writable,delete t.value;const u=t.get,E=t.set,T=r.slice(2);let y=Ce[T];y||(y=Ce[T]=j("ON_PROPERTY"+T)),t.set=function(D){let d=this;!d&&e===$&&(d=$),d&&("function"==typeof d[y]&&d.removeEventListener(T,Ye),E&&E.call(d,null),d[y]=D,"function"==typeof D&&d.addEventListener(T,Ye,!1))},t.get=function(){let D=this;if(!D&&e===$&&(D=$),!D)return null;const d=D[y];if(d)return d;if(u){let w=u.call(this);if(w)return t.set.call(this,w),"function"==typeof D[Tt]&&D.removeAttribute(r),w}return null},Ne(e,r,t),e[i]=!0}function Je(e,r,c){if(r)for(let t=0;tfunction(E,T){const y=c(E,T);return y.cbIdx>=0&&"function"==typeof T[y.cbIdx]?He(y.name,T[y.cbIdx],y,i):u.apply(E,T)})}function fe(e,r){e[j("OriginalDelegate")]=r}let Ke=!1,Ge=!1;function kt(){if(Ke)return Ge;Ke=!0;try{const e=Te.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(Ge=!0)}catch{}return Ge}function Qe(e){return"function"==typeof e}function et(e){return"number"==typeof e}let ge=!1;if(typeof window<"u")try{const e=Object.defineProperty({},"passive",{get:function(){ge=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{ge=!1}const vt={useG:!0},ne={},tt={},nt=new RegExp("^"+ve+"(\\w+)(true|false)$"),rt=j("propagationStopped");function ot(e,r){const c=(r?r(e):e)+le,t=(r?r(e):e)+ae,i=ve+c,u=ve+t;ne[e]={},ne[e][le]=i,ne[e][ae]=u}function bt(e,r,c,t){const i=t&&t.add||Ie,u=t&&t.rm||Me,E=t&&t.listeners||"eventListeners",T=t&&t.rmAll||"removeAllListeners",y=j(i),D="."+i+":",d="prependListener",w="."+d+":",Z=function(k,h,H){if(k.isRemoved)return;const V=k.callback;let Y;"object"==typeof V&&V.handleEvent&&(k.callback=g=>V.handleEvent(g),k.originalDelegate=V);try{k.invoke(k,h,[H])}catch(g){Y=g}const G=k.options;return G&&"object"==typeof G&&G.once&&h[u].call(h,H.type,k.originalDelegate?k.originalDelegate:k.callback,G),Y};function x(k,h,H){if(!(h=h||e.event))return;const V=k||h.target||e,Y=V[ne[h.type][H?ae:le]];if(Y){const G=[];if(1===Y.length){const g=Z(Y[0],V,h);g&&G.push(g)}else{const g=Y.slice();for(let z=0;z{throw z})}}}const U=function(k){return x(this,k,!1)},J=function(k){return x(this,k,!0)};function K(k,h){if(!k)return!1;let H=!0;h&&void 0!==h.useG&&(H=h.useG);const V=h&&h.vh;let Y=!0;h&&void 0!==h.chkDup&&(Y=h.chkDup);let G=!1;h&&void 0!==h.rt&&(G=h.rt);let g=k;for(;g&&!g.hasOwnProperty(i);)g=Le(g);if(!g&&k[i]&&(g=k),!g||g[y])return!1;const z=h&&h.eventNameToString,O={},R=g[y]=g[i],b=g[j(u)]=g[u],S=g[j(E)]=g[E],Q=g[j(T)]=g[T];let W;h&&h.prepend&&(W=g[j(h.prepend)]=g[h.prepend]);const q=H?function(s){if(!O.isExisting)return R.call(O.target,O.eventName,O.capture?J:U,O.options)}:function(s){return R.call(O.target,O.eventName,s.invoke,O.options)},A=H?function(s){if(!s.isRemoved){const l=ne[s.eventName];let v;l&&(v=l[s.capture?ae:le]);const C=v&&s.target[v];if(C)for(let m=0;mse.zone.cancelTask(se);s.call(ye,"abort",ce,{once:!0}),se.removeAbortListener=()=>ye.removeEventListener("abort",ce)}return O.target=null,Pe&&(Pe.taskData=null),lt&&(O.options.once=!0),!ge&&"boolean"==typeof se.options||(se.options=ie),se.target=I,se.capture=Be,se.eventName=M,B&&(se.originalDelegate=F),L?pe.unshift(se):pe.push(se),m?I:void 0}};return g[i]=a(R,D,q,A,G),W&&(g[d]=a(W,w,function(s){return W.call(O.target,O.eventName,s.invoke,O.options)},A,G,!0)),g[u]=function(){const s=this||e;let l=arguments[0];h&&h.transferEventName&&(l=h.transferEventName(l));const v=arguments[2],C=!!v&&("boolean"==typeof v||v.capture),m=arguments[1];if(!m)return b.apply(this,arguments);if(V&&!V(b,m,s,arguments))return;const L=ne[l];let I;L&&(I=L[C?ae:le]);const M=I&&s[I];if(M)for(let F=0;Ffunction(i,u){i[rt]=!0,t&&t.apply(i,u)})}const De=j("zoneTask");function me(e,r,c,t){let i=null,u=null;c+=t;const E={};function T(D){const d=D.data;d.args[0]=function(){return D.invoke.apply(this,arguments)};const w=i.apply(e,d.args);return et(w)?d.handleId=w:(d.handle=w,d.isRefreshable=Qe(w.refresh)),D}function y(D){const{handle:d,handleId:w}=D.data;return u.call(e,d??w)}i=ue(e,r+=t,D=>function(d,w){if(Qe(w[0])){const Z={isRefreshable:!1,isPeriodic:"Interval"===t,delay:"Timeout"===t||"Interval"===t?w[1]||0:void 0,args:w},x=w[0];w[0]=function(){try{return x.apply(this,arguments)}finally{const{handle:H,handleId:V,isPeriodic:Y,isRefreshable:G}=Z;!Y&&!G&&(V?delete E[V]:H&&(H[De]=null))}};const U=He(r,w[0],Z,T,y);if(!U)return U;const{handleId:J,handle:K,isRefreshable:X,isPeriodic:k}=U.data;if(J)E[J]=U;else if(K&&(K[De]=U,X&&!k)){const h=K.refresh;K.refresh=function(){const{zone:H,state:V}=U;return"notScheduled"===V?(U._state="scheduled",H._updateTaskCount(U,1)):"running"===V&&(U._state="scheduling"),h.call(this)}}return K??J??U}return D.apply(e,w)}),u=ue(e,c,D=>function(d,w){const Z=w[0];let x;et(Z)?(x=E[Z],delete E[Z]):(x=Z?.[De],x?Z[De]=null:x=Z),x?.type?x.cancelFn&&x.zone.cancelTask(x):D.apply(e,w)})}function it(e,r,c){if(!c||0===c.length)return r;const t=c.filter(u=>u.target===e);if(!t||0===t.length)return r;const i=t[0].ignoreProperties;return r.filter(u=>-1===i.indexOf(u))}function ct(e,r,c,t){e&&Je(e,it(e,r,c),t)}function Fe(e){return Object.getOwnPropertyNames(e).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function It(e,r,c,t,i){const u=Zone.__symbol__(t);if(r[u])return;const E=r[u]=r[t];r[t]=function(T,y,D){return y&&y.prototype&&i.forEach(function(d){const w=`${c}.${t}::`+d,Z=y.prototype;try{if(Z.hasOwnProperty(d)){const x=e.ObjectGetOwnPropertyDescriptor(Z,d);x&&x.value?(x.value=e.wrapWithCurrentZone(x.value,w),e._redefineProperty(y.prototype,d,x)):Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}else Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}catch{}}),E.call(r,T,y,D)},e.attachOriginToPatched(r[t],E)}const at=function Oe(){const e=globalThis,r=!0===e[ee("forceDuplicateZoneCheck")];if(e.Zone&&(r||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=function ze(){const e=te.performance;function r(N){e&&e.mark&&e.mark(N)}function c(N,_){e&&e.measure&&e.measure(N,_)}r("Zone");let t=(()=>{class N{static{this.__symbol__=ee}static assertZonePatched(){if(te.Promise!==O.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 n=N.current;for(;n.parent;)n=n.parent;return n}static get current(){return b.zone}static get currentTask(){return S}static __load_patch(n,o,p=!1){if(O.hasOwnProperty(n)){const P=!0===te[ee("forceDuplicateZoneCheck")];if(!p&&P)throw Error("Already loaded patch: "+n)}else if(!te["__Zone_disable_"+n]){const P="Zone:"+n;r(P),O[n]=o(te,N,R),c(P,P)}}get parent(){return this._parent}get name(){return this._name}constructor(n,o){this._parent=n,this._name=o?o.name||"unnamed":"",this._properties=o&&o.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,o)}get(n){const o=this.getZoneWith(n);if(o)return o._properties[n]}getZoneWith(n){let o=this;for(;o;){if(o._properties.hasOwnProperty(n))return o;o=o._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,o){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const p=this._zoneDelegate.intercept(this,n,o),P=this;return function(){return P.runGuarded(p,this,arguments,o)}}run(n,o,p,P){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,n,o,p,P)}finally{b=b.parent}}runGuarded(n,o=null,p,P){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,n,o,p,P)}catch(q){if(this._zoneDelegate.handleError(this,q))throw q}}finally{b=b.parent}}runTask(n,o,p){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||K).name+"; Execution: "+this.name+")");const P=n,{type:q,data:{isPeriodic:A=!1,isRefreshable:_e=!1}={}}=n;if(n.state===X&&(q===z||q===g))return;const he=n.state!=H;he&&P._transitionTo(H,h);const de=S;S=P,b={parent:b,zone:this};try{q==g&&n.data&&!A&&!_e&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,P,o,p)}catch(oe){if(this._zoneDelegate.handleError(this,oe))throw oe}}finally{const oe=n.state;if(oe!==X&&oe!==Y)if(q==z||A||_e&&oe===k)he&&P._transitionTo(h,H,k);else{const f=P._zoneDelegates;this._updateTaskCount(P,-1),he&&P._transitionTo(X,H,X),_e&&(P._zoneDelegates=f)}b=b.parent,S=de}}scheduleTask(n){if(n.zone&&n.zone!==this){let p=this;for(;p;){if(p===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);p=p.parent}}n._transitionTo(k,X);const o=[];n._zoneDelegates=o,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(p){throw n._transitionTo(Y,k,X),this._zoneDelegate.handleError(this,p),p}return n._zoneDelegates===o&&this._updateTaskCount(n,1),n.state==k&&n._transitionTo(h,k),n}scheduleMicroTask(n,o,p,P){return this.scheduleTask(new E(G,n,o,p,P,void 0))}scheduleMacroTask(n,o,p,P,q){return this.scheduleTask(new E(g,n,o,p,P,q))}scheduleEventTask(n,o,p,P,q){return this.scheduleTask(new E(z,n,o,p,P,q))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||K).name+"; Execution: "+this.name+")");if(n.state===h||n.state===H){n._transitionTo(V,h,H);try{this._zoneDelegate.cancelTask(this,n)}catch(o){throw n._transitionTo(Y,V),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(n,-1),n._transitionTo(X,V),n.runCount=-1,n}}_updateTaskCount(n,o){const p=n._zoneDelegates;-1==o&&(n._zoneDelegates=null);for(let P=0;PN.hasTask(n,o),onScheduleTask:(N,_,n,o)=>N.scheduleTask(n,o),onInvokeTask:(N,_,n,o,p,P)=>N.invokeTask(n,o,p,P),onCancelTask:(N,_,n,o)=>N.cancelTask(n,o)};class u{get zone(){return this._zone}constructor(_,n,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=_,this._parentDelegate=n,this._forkZS=o&&(o&&o.onFork?o:n._forkZS),this._forkDlgt=o&&(o.onFork?n:n._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:n._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:n._interceptZS),this._interceptDlgt=o&&(o.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:n._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:n._invokeZS),this._invokeDlgt=o&&(o.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:n._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:n._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:n._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:n._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:n._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:n._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:n._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:n._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const p=o&&o.onHasTask;(p||n&&n._hasTaskZS)&&(this._hasTaskZS=p?o:i,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=i,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=i,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=i,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this._zone))}fork(_,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,n):new t(_,n)}intercept(_,n,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,n,o):n}invoke(_,n,o,p,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,n,o,p,P):n.apply(o,p)}handleError(_,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,n)}scheduleTask(_,n){let o=n;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,n),o||(o=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=G)throw new Error("Task is missing scheduleFn.");U(n)}return o}invokeTask(_,n,o,p){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,n,o,p):n.callback.apply(o,p)}cancelTask(_,n){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");o=n.cancelFn(n)}return o}hasTask(_,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,n)}catch(o){this.handleError(_,o)}}_updateTaskCount(_,n){const o=this._taskCounts,p=o[_],P=o[_]=p+n;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=p&&0!=P||this.hasTask(this._zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:_})}}class E{constructor(_,n,o,p,P,q){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=n,this.data=p,this.scheduleFn=P,this.cancelFn=q,!o)throw new Error("callback is not defined");this.callback=o;const A=this;this.invoke=_===z&&p&&p.useG?E.invokeTask:function(){return E.invokeTask.call(te,A,this,arguments)}}static invokeTask(_,n,o){_||(_=this),Q++;try{return _.runCount++,_.zone.runTask(_,n,o)}finally{1==Q&&J(),Q--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(X,k)}_transitionTo(_,n,o){if(this._state!==n&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${n}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=_,_==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 T=ee("setTimeout"),y=ee("Promise"),D=ee("then");let Z,d=[],w=!1;function x(N){if(Z||te[y]&&(Z=te[y].resolve(0)),Z){let _=Z[D];_||(_=Z.then),_.call(Z,N)}else te[T](N,0)}function U(N){0===Q&&0===d.length&&x(J),N&&d.push(N)}function J(){if(!w){for(w=!0;d.length;){const N=d;d=[];for(let _=0;_b,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:U,showUncaughtError:()=>!t[ee("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:x};let b={parent:null,zone:new t(null,null)},S=null,Q=0;function W(){}return c("Zone","Zone"),t}(),e.Zone}();(function Zt(e){(function Nt(e){e.__load_patch("ZoneAwarePromise",(r,c,t)=>{const i=Object.getOwnPropertyDescriptor,u=Object.defineProperty,T=t.symbol,y=[],D=!1!==r[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],d=T("Promise"),w=T("then"),Z="__creationTrace__";t.onUnhandledError=f=>{if(t.showUncaughtError()){const a=f&&f.rejection;a?console.error("Unhandled Promise rejection:",a instanceof Error?a.message:a,"; Zone:",f.zone.name,"; Task:",f.task&&f.task.source,"; Value:",a,a instanceof Error?a.stack:void 0):console.error(f)}},t.microtaskDrainDone=()=>{for(;y.length;){const f=y.shift();try{f.zone.runGuarded(()=>{throw f.throwOriginal?f.rejection:f})}catch(a){U(a)}}};const x=T("unhandledPromiseRejectionHandler");function U(f){t.onUnhandledError(f);try{const a=c[x];"function"==typeof a&&a.call(this,f)}catch{}}function J(f){return f&&f.then}function K(f){return f}function X(f){return A.reject(f)}const k=T("state"),h=T("value"),H=T("finally"),V=T("parentPromiseValue"),Y=T("parentPromiseState"),G="Promise.then",g=null,z=!0,O=!1,R=0;function b(f,a){return s=>{try{N(f,a,s)}catch(l){N(f,!1,l)}}}const S=function(){let f=!1;return function(s){return function(){f||(f=!0,s.apply(null,arguments))}}},Q="Promise resolved with itself",W=T("currentTaskTrace");function N(f,a,s){const l=S();if(f===s)throw new TypeError(Q);if(f[k]===g){let v=null;try{("object"==typeof s||"function"==typeof s)&&(v=s&&s.then)}catch(C){return l(()=>{N(f,!1,C)})(),f}if(a!==O&&s instanceof A&&s.hasOwnProperty(k)&&s.hasOwnProperty(h)&&s[k]!==g)n(s),N(f,s[k],s[h]);else if(a!==O&&"function"==typeof v)try{v.call(s,l(b(f,a)),l(b(f,!1)))}catch(C){l(()=>{N(f,!1,C)})()}else{f[k]=a;const C=f[h];if(f[h]=s,f[H]===H&&a===z&&(f[k]=f[Y],f[h]=f[V]),a===O&&s instanceof Error){const m=c.currentTask&&c.currentTask.data&&c.currentTask.data[Z];m&&u(s,W,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m{try{const L=f[h],I=!!s&&H===s[H];I&&(s[V]=L,s[Y]=C);const M=a.run(m,void 0,I&&m!==X&&m!==K?[]:[L]);N(s,!0,M)}catch(L){N(s,!1,L)}},s)}const P=function(){},q=r.AggregateError;class A{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(a){return a instanceof A?a:N(new this(null),z,a)}static reject(a){return N(new this(null),O,a)}static withResolvers(){const a={};return a.promise=new A((s,l)=>{a.resolve=s,a.reject=l}),a}static any(a){if(!a||"function"!=typeof a[Symbol.iterator])return Promise.reject(new q([],"All promises were rejected"));const s=[];let l=0;try{for(let m of a)l++,s.push(A.resolve(m))}catch{return Promise.reject(new q([],"All promises were rejected"))}if(0===l)return Promise.reject(new q([],"All promises were rejected"));let v=!1;const C=[];return new A((m,L)=>{for(let I=0;I{v||(v=!0,m(M))},M=>{C.push(M),l--,0===l&&(v=!0,L(new q(C,"All promises were rejected")))})})}static race(a){let s,l,v=new this((L,I)=>{s=L,l=I});function C(L){s(L)}function m(L){l(L)}for(let L of a)J(L)||(L=this.resolve(L)),L.then(C,m);return v}static all(a){return A.allWithCallback(a)}static allSettled(a){return(this&&this.prototype instanceof A?this:A).allWithCallback(a,{thenCallback:l=>({status:"fulfilled",value:l}),errorCallback:l=>({status:"rejected",reason:l})})}static allWithCallback(a,s){let l,v,C=new this((M,F)=>{l=M,v=F}),m=2,L=0;const I=[];for(let M of a){J(M)||(M=this.resolve(M));const F=L;try{M.then(B=>{I[F]=s?s.thenCallback(B):B,m--,0===m&&l(I)},B=>{s?(I[F]=s.errorCallback(B),m--,0===m&&l(I)):v(B)})}catch(B){v(B)}m++,L++}return m-=2,0===m&&l(I),C}constructor(a){const s=this;if(!(s instanceof A))throw new Error("Must be an instanceof Promise.");s[k]=g,s[h]=[];try{const l=S();a&&a(l(b(s,z)),l(b(s,O)))}catch(l){N(s,!1,l)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return A}then(a,s){let l=this.constructor?.[Symbol.species];(!l||"function"!=typeof l)&&(l=this.constructor||A);const v=new l(P),C=c.current;return this[k]==g?this[h].push(C,v,a,s):o(this,C,v,a,s),v}catch(a){return this.then(null,a)}finally(a){let s=this.constructor?.[Symbol.species];(!s||"function"!=typeof s)&&(s=A);const l=new s(P);l[H]=H;const v=c.current;return this[k]==g?this[h].push(v,l,a,a):o(this,v,l,a,a),l}}A.resolve=A.resolve,A.reject=A.reject,A.race=A.race,A.all=A.all;const _e=r[d]=r.Promise;r.Promise=A;const he=T("thenPatched");function de(f){const a=f.prototype,s=i(a,"then");if(s&&(!1===s.writable||!s.configurable))return;const l=a.then;a[w]=l,f.prototype.then=function(v,C){return new A((L,I)=>{l.call(this,L,I)}).then(v,C)},f[he]=!0}return t.patchThen=de,_e&&(de(_e),ue(r,"fetch",f=>function oe(f){return function(a,s){let l=f.apply(a,s);if(l instanceof A)return l;let v=l.constructor;return v[he]||de(v),l}}(f))),Promise[c.__symbol__("uncaughtPromiseErrors")]=y,A})})(e),function Lt(e){e.__load_patch("toString",r=>{const c=Function.prototype.toString,t=j("OriginalDelegate"),i=j("Promise"),u=j("Error"),E=function(){if("function"==typeof this){const d=this[t];if(d)return"function"==typeof d?c.call(d):Object.prototype.toString.call(d);if(this===Promise){const w=r[i];if(w)return c.call(w)}if(this===Error){const w=r[u];if(w)return c.call(w)}}return c.call(this)};E[t]=c,Function.prototype.toString=E;const T=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":T.call(this)}})}(e),function Mt(e){e.__load_patch("util",(r,c,t)=>{const i=Fe(r);t.patchOnProperties=Je,t.patchMethod=ue,t.bindArguments=xe,t.patchMacroTask=yt;const u=c.__symbol__("BLACK_LISTED_EVENTS"),E=c.__symbol__("UNPATCHED_EVENTS");r[E]&&(r[u]=r[E]),r[u]&&(c[u]=c[E]=r[u]),t.patchEventPrototype=Pt,t.patchEventTarget=bt,t.isIEOrEdge=kt,t.ObjectDefineProperty=Ne,t.ObjectGetOwnPropertyDescriptor=ke,t.ObjectCreate=_t,t.ArraySlice=Et,t.patchClass=be,t.wrapWithCurrentZone=je,t.filterProperties=it,t.attachOriginToPatched=fe,t._redefineProperty=Object.defineProperty,t.patchCallbacks=It,t.getGlobalObjects=()=>({globalSources:tt,zoneSymbolEventNames:ne,eventNames:i,isBrowser:Ve,isMix:Xe,isNode:Re,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:ve,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Me})})}(e)})(at),function Ot(e){e.__load_patch("legacy",r=>{const c=r[e.__symbol__("legacyPatch")];c&&c()}),e.__load_patch("timers",r=>{const c="set",t="clear";me(r,c,t,"Timeout"),me(r,c,t,"Interval"),me(r,c,t,"Immediate")}),e.__load_patch("requestAnimationFrame",r=>{me(r,"request","cancel","AnimationFrame"),me(r,"mozRequest","mozCancel","AnimationFrame"),me(r,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(r,c)=>{const t=["alert","prompt","confirm"];for(let i=0;ifunction(D,d){return c.current.run(E,r,d,y)})}),e.__load_patch("EventTarget",(r,c,t)=>{(function Dt(e,r){r.patchEventPrototype(e,r)})(r,t),function Ct(e,r){if(Zone[r.symbol("patchEventTarget")])return;const{eventNames:c,zoneSymbolEventNames:t,TRUE_STR:i,FALSE_STR:u,ZONE_SYMBOL_PREFIX:E}=r.getGlobalObjects();for(let y=0;y{be("MutationObserver"),be("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(r,c,t)=>{be("IntersectionObserver")}),e.__load_patch("FileReader",(r,c,t)=>{be("FileReader")}),e.__load_patch("on_property",(r,c,t)=>{!function St(e,r){if(Re&&!Xe||Zone[e.symbol("patchEvents")])return;const c=r.__Zone_ignore_on_properties;let t=[];if(Ve){const i=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const u=function pt(){try{const e=Te.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:i,ignoreProperties:["error"]}]:[];ct(i,Fe(i),c&&c.concat(u),Le(i))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let i=0;i{!function Rt(e,r){const{isBrowser:c,isMix:t}=r.getGlobalObjects();(c||t)&&e.customElements&&"customElements"in e&&r.patchCallbacks(r,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(r,t)}),e.__load_patch("XHR",(r,c)=>{!function D(d){const w=d.XMLHttpRequest;if(!w)return;const Z=w.prototype;let U=Z[Ze],J=Z[Ae];if(!U){const R=d.XMLHttpRequestEventTarget;if(R){const b=R.prototype;U=b[Ze],J=b[Ae]}}const K="readystatechange",X="scheduled";function k(R){const b=R.data,S=b.target;S[E]=!1,S[y]=!1;const Q=S[u];U||(U=S[Ze],J=S[Ae]),Q&&J.call(S,K,Q);const W=S[u]=()=>{if(S.readyState===S.DONE)if(!b.aborted&&S[E]&&R.state===X){const _=S[c.__symbol__("loadfalse")];if(0!==S.status&&_&&_.length>0){const n=R.invoke;R.invoke=function(){const o=S[c.__symbol__("loadfalse")];for(let p=0;pfunction(R,b){return R[i]=0==b[2],R[T]=b[1],V.apply(R,b)}),G=j("fetchTaskAborting"),g=j("fetchTaskScheduling"),z=ue(Z,"send",()=>function(R,b){if(!0===c.current[g]||R[i])return z.apply(R,b);{const S={target:R,url:R[T],isPeriodic:!1,args:b,aborted:!1},Q=He("XMLHttpRequest.send",h,S,k,H);R&&!0===R[y]&&!S.aborted&&Q.state===X&&Q.invoke()}}),O=ue(Z,"abort",()=>function(R,b){const S=function x(R){return R[t]}(R);if(S&&"string"==typeof S.type){if(null==S.cancelFn||S.data&&S.data.aborted)return;S.zone.cancelTask(S)}else if(!0===c.current[G])return O.apply(R,b)})}(r);const t=j("xhrTask"),i=j("xhrSync"),u=j("xhrListener"),E=j("xhrScheduled"),T=j("xhrURL"),y=j("xhrErrorBeforeScheduled")}),e.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&function gt(e,r){const c=e.constructor.name;for(let t=0;t{const y=function(){return T.apply(this,xe(arguments,c+"."+i))};return fe(y,T),y})(u)}}}(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(r,c)=>{function t(i){return function(u){st(r,i).forEach(T=>{const y=r.PromiseRejectionEvent;if(y){const D=new y(i,{promise:u.promise,reason:u.rejection});T.invoke(D)}})}}r.PromiseRejectionEvent&&(c[j("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),c[j("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(r,c,t)=>{!function wt(e,r){r.patchMethod(e,"queueMicrotask",c=>function(t,i){Zone.current.scheduleMicroTask("queueMicrotask",i[0])})}(r,t)})}(at)}},te=>{te(te.s=6935)}]); \ No newline at end of file diff --git a/docs/prerendered-routes.json b/docs/prerendered-routes.json new file mode 100644 index 0000000..3226541 --- /dev/null +++ b/docs/prerendered-routes.json @@ -0,0 +1,3 @@ +{ + "routes": {} +} \ No newline at end of file diff --git a/docs/runtime.6b8ab31f504bed84.js b/docs/runtime.6b8ab31f504bed84.js deleted file mode 100644 index 0fa594c..0000000 --- a/docs/runtime.6b8ab31f504bed84.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,_={},v={};function a(e){var n=v[e];if(void 0!==n)return n.exports;var r=v[e]={id:e,loaded:!1,exports:{}};return _[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=_,e=[],a.O=(n,r,s,l)=>{if(!r){var o=1/0;for(t=0;t=l)&&Object.keys(a.O).every(h=>a.O[h](r[f]))?r.splice(f--,1):(i=!1,l0&&e[t-1][2]>l;t--)e[t]=e[t-1];e[t]=[r,s,l]},a.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return a.d(n,{a:n}),n},a.d=(e,n)=>{for(var r in n)a.o(n,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},a.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={121:0};a.O.j=s=>0===e[s];var n=(s,l)=>{var f,c,[t,o,i]=l,u=0;if(t.some(p=>0!==e[p])){for(f in o)a.o(o,f)&&(a.m[f]=o[f]);if(i)var d=i(a)}for(s&&s(l);u.info-message[data-v-57c2009c]{visibility:visible}",""]),v.exports=g},"03d6":function(v,g,i){var o=i("9c0e"),f=i("6ca1"),c=i("39ad")(!1),a=i("5a94")("IE_PROTO");v.exports=function(p,d){var b,h=f(p),_=0,y=[];for(b in h)b!=a&&o(h,b)&&y.push(b);for(;d.length>_;)o(h,b=d[_++])&&(~c(y,b)||y.push(b));return y}},"051b":function(v,g,i){var o=i("1a14"),f=i("10db");v.exports=i("0bad")?function(c,a,p){return o.f(c,a,f(1,p))}:function(c,a,p){return c[a]=p,c}},"05f5":function(v,g,i){var o=i("7a41"),f=i("ef08").document,c=o(f)&&o(f.createElement);v.exports=function(a){return c?f.createElement(a):{}}},"072d":function(v,g,i){"use strict";var o=i("0bad"),f=i("9876"),c=i("fed5"),a=i("1917"),p=i("0983"),d=i("9fbb"),h=Object.assign;v.exports=!h||i("4b8b")(function(){var _={},y={},b=Symbol(),x="abcdefghijklmnopqrst";return _[b]=7,x.split("").forEach(function(C){y[C]=C}),7!=h({},_)[b]||Object.keys(h({},y)).join("")!=x})?function(y,b){for(var x=p(y),C=arguments.length,M=1,D=c.f,H=a.f;C>M;)for(var X,N=d(arguments[M++]),B=D?f(N).concat(D(N)):f(N),ue=B.length,G=0;ue>G;)X=B[G++],(!o||H.call(N,X))&&(x[X]=N[X]);return x}:h},"0983":function(v,g,i){var o=i("c901");v.exports=function(f){return Object(o(f))}},"0a06":function(v,g,i){"use strict";var o=i("c532"),f=i("30b5"),c=i("f6b4"),a=i("5270"),p=i("4a7b"),d=i("848b"),h=d.validators;function _(y){this.defaults=y,this.interceptors={request:new c,response:new c}}_.prototype.request=function(b,x){"string"==typeof b?(x=x||{}).url=b:x=b||{},(x=p(this.defaults,x)).method=x.method?x.method.toLowerCase():this.defaults.method?this.defaults.method.toLowerCase():"get";var C=x.transitional;void 0!==C&&d.assertOptions(C,{silentJSONParsing:h.transitional(h.boolean),forcedJSONParsing:h.transitional(h.boolean),clarifyTimeoutError:h.transitional(h.boolean)},!1);var M=[],D=!0;this.interceptors.request.forEach(function(J){"function"==typeof J.runWhen&&!1===J.runWhen(x)||(D=D&&J.synchronous,M.unshift(J.fulfilled,J.rejected))});var N,H=[];if(this.interceptors.response.forEach(function(J){H.push(J.fulfilled,J.rejected)}),!D){var B=[a,void 0];for(Array.prototype.unshift.apply(B,M),B=B.concat(H),N=Promise.resolve(x);B.length;)N=N.then(B.shift(),B.shift());return N}for(var ue=x;M.length;){var G=M.shift(),X=M.shift();try{ue=G(ue)}catch(L){X(L);break}}try{N=a(ue)}catch(L){return Promise.reject(L)}for(;H.length;)N=N.then(H.shift(),H.shift());return N},_.prototype.getUri=function(b){return b=p(this.defaults,b),f(b.url,b.params,b.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(b){_.prototype[b]=function(x,C){return this.request(p(C||{},{method:b,url:x,data:(C||{}).data}))}}),o.forEach(["post","put","patch"],function(b){_.prototype[b]=function(x,C,M){return this.request(p(M||{},{method:b,url:x,data:C}))}}),v.exports=_},"0b99":function(v,g,i){"use strict";var o=i("19fa")(!0);i("393a")(String,"String",function(f){this._t=String(f),this._i=0},function(){var a,f=this._t,c=this._i;return c>=f.length?{value:void 0,done:!0}:(a=o(f,c),this._i+=a.length,{value:a,done:!1})})},"0bad":function(v,g,i){v.exports=!i("4b8b")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"0c43":function(v,g,i){"use strict";i.r(g);var o=i("8d38");for(var c in o)["default"].indexOf(c)<0&&function(a){i.d(g,a,function(){return o[a]})}(c)},"0df6":function(v,g,i){"use strict";v.exports=function(f){return function(a){return f.apply(null,a)}}},"10db":function(v,g){v.exports=function(i,o){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:o}}},1609:function(v,g){v.exports=function(i){if("function"!=typeof i)throw TypeError(i+" is not a function!");return i}},1917:function(v,g){g.f={}.propertyIsEnumerable},"19fa":function(v,g,i){var o=i("fc5e"),f=i("c901");v.exports=function(c){return function(a,p){var y,b,d=String(f(a)),h=o(p),_=d.length;return h<0||h>=_?c?"":void 0:(y=d.charCodeAt(h))<55296||y>56319||h+1===_||(b=d.charCodeAt(h+1))<56320||b>57343?c?d.charAt(h):y:c?d.slice(h,h+2):b-56320+(y-55296<<10)+65536}}},"1a14":function(v,g,i){var o=i("77e9"),f=i("faf5"),c=i("3397"),a=Object.defineProperty;g.f=i("0bad")?Object.defineProperty:function(d,h,_){if(o(d),h=c(h,!0),o(_),f)try{return a(d,h,_)}catch{}if("get"in _||"set"in _)throw TypeError("Accessors not supported!");return"value"in _&&(d[h]=_.value),d}},"1d2b":function(v,g,i){"use strict";v.exports=function(f,c){return function(){for(var p=new Array(arguments.length),d=0;d=200&&x<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};f.forEach(["delete","get","head"],function(x){y.headers[x]={}}),f.forEach(["post","put","patch"],function(x){y.headers[x]=f.merge(p)}),v.exports=y}).call(this,i("4362"))},"24a2":function(v,g,i){var o=i("77e9"),f=i("7a41"),c=i("f2c2");v.exports=function(a,p){if(o(a),f(p)&&p.constructor===a)return p;var d=c.f(a);return(0,d.resolve)(p),d.promise}},"24fb":function(v,g,i){"use strict";v.exports=function(c){var a=[];return a.toString=function(){return this.map(function(d){var h=function o(c,a){var p=c[1]||"",d=c[3];if(!d)return p;if(a&&"function"==typeof btoa){var h=function f(c){var a=btoa(unescape(encodeURIComponent(JSON.stringify(c)))),p="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a);return"/*# ".concat(p," */")}(d),_=d.sources.map(function(y){return"/*# sourceURL=".concat(d.sourceRoot||"").concat(y," */")});return[p].concat(_).concat([h]).join("\n")}return[p].join("\n")}(d,c);return d[2]?"@media ".concat(d[2]," {").concat(h,"}"):h}).join("")},a.i=function(p,d,h){"string"==typeof p&&(p=[[null,p,""]]);var _={};if(h)for(var y=0;y=0&&Math.floor(t)===t&&isFinite(e)}function D(e){return a(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function H(e){return null==e?"":Array.isArray(e)||x(e)&&e.toString===y?JSON.stringify(e,null,2):String(e)}function N(e){var t=parseFloat(e);return isNaN(t)?e:t}function B(e,t){for(var r=Object.create(null),n=e.split(","),s=0;s-1)return e.splice(r,1)}}var L=Object.prototype.hasOwnProperty;function J(e,t){return L.call(e,t)}function ce(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var Se=/-(\w)/g,R=ce(function(e){return e.replace(Se,function(t,r){return r?r.toUpperCase():""})}),ee=ce(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),q=/\B([A-Z])/g,se=ce(function(e){return e.replace(q,"-$1").toLowerCase()}),Ie=Function.prototype.bind?function ge(e,t){return e.bind(t)}:function ie(e,t){function r(n){var s=arguments.length;return s?s>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return r._length=e.length,r};function De(e,t){for(var r=e.length-(t=t||0),n=new Array(r);r--;)n[r]=e[r+t];return n}function te(e,t){for(var r in t)e[r]=t[r];return e}function Me(e){for(var t={},r=0;r0,wt=$e&&$e.indexOf("edge/")>0,cr=($e&&$e.indexOf("android"),$e&&/iphone|ipad|ipod|ios/.test($e)||"ios"===gt),zt=($e&&/chrome\/\d+/.test($e),$e&&/phantomjs/.test($e),$e&&$e.match(/firefox\/(\d+)/)),Rt={}.watch,Wt=!1;if(ve)try{var Gt={};Object.defineProperty(Gt,"passive",{get:function(){Wt=!0}}),window.addEventListener("test-passive",null,Gt)}catch{}var bt,xt=function(){return void 0===bt&&(bt=!ve&&!Be&&typeof o<"u"&&o.process&&"server"===o.process.env.VUE_ENV),bt},Ct=ve&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function Ve(e){return"function"==typeof e&&/native code/.test(e.toString())}var st,Ot=typeof Symbol<"u"&&Ve(Symbol)&&typeof Reflect<"u"&&Ve(Reflect.ownKeys);st=typeof Set<"u"&&Ve(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(r){return!0===this.set[r]},e.prototype.add=function(r){this.set[r]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var Le=T,lr=0,Ne=function(){this.id=lr++,this.subs=[]};Ne.prototype.addSub=function(t){this.subs.push(t)},Ne.prototype.removeSub=function(t){X(this.subs,t)},Ne.prototype.depend=function(){Ne.target&&Ne.target.addDep(this)},Ne.prototype.notify=function(){for(var t=this.subs.slice(),r=0,n=t.length;r-1)if(u&&!J(s,"default"))m=!1;else if(""===m||m===se(e)){var E=Cn(String,s.type);(E<0||O0&&(Mt((s=Rn(s,(t||"")+"_"+n))[0])&&Mt(m)&&(r[u]=we(m.text+s[0].text),s.shift()),r.push.apply(r,s)):h(s)?Mt(m)?r[u]=we(m.text+s):""!==s&&r.push(we(s)):Mt(s)&&Mt(m)?r[u]=we(m.text+s.text):(p(e._isVList)&&a(s.tag)&&c(s.key)&&a(t)&&(s.key="__vlist"+t+"_"+n+"__"),r.push(s)));return r}function In(e,t){if(e){for(var r=Object.create(null),n=Ot?Reflect.ownKeys(e):Object.keys(e),s=0;s0,u=e?!!e.$stable:!s,m=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(u&&r&&r!==f&&m===r.$key&&!s&&!r.$hasNormal)return r;for(var O in n={},e)e[O]&&"$"!==O[0]&&(n[O]=_s(t,O,e[O]))}else n={};for(var E in t)E in n||(n[E]=ys(t,E));return e&&Object.isExtensible(e)&&(e._normalized=n),ye(n,"$stable",u),ye(n,"$key",m),ye(n,"$hasNormal",s),n}function _s(e,t,r){var n=function(){var s=arguments.length?r.apply(null,arguments):r({}),u=(s=s&&"object"==typeof s&&!Array.isArray(s)?[s]:Er(s))&&s[0];return s&&(!u||1===s.length&&u.isComment&&!Dt(u))?void 0:s};return r.proxy&&Object.defineProperty(e,t,{get:n,enumerable:!0,configurable:!0}),n}function ys(e,t){return function(){return e[t]}}function gs(e,t){var r,n,s,u,m;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),n=0,s=e.length;ndocument.createEvent("Event").timeStamp&&(Dr=function(){return Nr.now()})}function ks(){var e;for(Zn=Dr(),Mr=!0,Ke.sort(function(s,u){return s.id-u.id}),Et=0;EtEt&&Ke[r].id>e.id;)r--;Ke.splice(r+1,0,e)}else Ke.push(e);$r||($r=!0,Cr(ks))}}(this)},ze.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||_(t)||this.deep){var r=this.value;this.value=t,this.user?St(this.cb,this.vm,[t,r],this.vm,'callback for watcher "'+this.expression+'"'):this.cb.call(this.vm,t,r)}}},ze.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},ze.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},ze.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||X(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var tt={enumerable:!0,configurable:!0,get:T,set:T};function Lr(e,t,r){tt.get=function(){return this[t][r]},tt.set=function(s){this[t][r]=s},Object.defineProperty(e,r,tt)}var ao={lazy:!0};function Qn(e,t,r){var n=!xt();"function"==typeof r?(tt.get=n?kn(t):Vn(r),tt.set=T):(tt.get=r.get?n&&!1!==r.cache?kn(t):Vn(r.get):T,tt.set=r.set||T),Object.defineProperty(e,t,tt)}function kn(e){return function(){var r=this._computedWatchers&&this._computedWatchers[e];if(r)return r.dirty&&r.evaluate(),Ne.target&&r.depend(),r.value}}function Vn(e){return function(){return e.call(this,this)}}function Fr(e,t,r,n){return x(r)&&(n=r,r=r.handler),"string"==typeof r&&(r=e[r]),e.$watch(t,r,n)}var po=0;function Br(e){var t=e.options;if(e.super){var r=Br(e.super);if(r!==e.superOptions){e.superOptions=r;var s=function mo(e){var t,r=e.options,n=e.sealedOptions;for(var s in r)r[s]!==n[s]&&(t||(t={}),t[s]=r[s]);return t}(e);s&&te(e.extendOptions,s),(t=e.options=ft(r,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function Ae(e){this._init(e)}function qn(e){return e&&(e.Ctor.options.name||e.tag)}function er(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!function C(e){return"[object RegExp]"===y.call(e)}(e)&&e.test(t)}function ei(e,t){var r=e.cache,n=e.keys,s=e._vnode;for(var u in r){var m=r[u];if(m){var O=m.name;O&&!t(O)&&Ur(r,u,n,s)}}}function Ur(e,t,r,n){var s=e[t];s&&(!n||s.tag!==n.tag)&&s.componentInstance.$destroy(),e[t]=null,X(r,t)}(function vo(e){e.prototype._init=function(t){var r=this;r._uid=po++,r._isVue=!0,t&&t._isComponent?function ho(e,t){var r=e.$options=Object.create(e.constructor.options),n=t._parentVnode;r.parent=t.parent,r._parentVnode=n;var s=n.componentOptions;r.propsData=s.propsData,r._parentListeners=s.listeners,r._renderChildren=s.children,r._componentTag=s.tag,t.render&&(r.render=t.render,r.staticRenderFns=t.staticRenderFns)}(r,t):r.$options=ft(Br(r.constructor),t||{},r),r._renderProxy=r,r._self=r,function Ks(e){var t=e.$options,r=t.parent;if(r&&!t.abstract){for(;r.$options.abstract&&r.$parent;)r=r.$parent;r.$children.push(e)}e.$parent=r,e.$root=r?r.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(r),function Hs(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Jn(e,t)}(r),function Ls(e){e._vnode=null,e._staticTrees=null;var t=e.$options,r=e.$vnode=t._parentVnode;e.$slots=Ar(t._renderChildren,r&&r.context),e.$scopedSlots=f,e._c=function(u,m,O,E){return Vt(e,u,m,O,E,!1)},e.$createElement=function(u,m,O,E){return Vt(e,u,m,O,E,!0)};var s=r&&r.data;ut(e,"$attrs",s&&s.attrs||f,null,!0),ut(e,"$listeners",t._parentListeners||f,null,!0)}(r),He(r,"beforeCreate"),function hs(e){var t=In(e.$options.inject,e);t&&(qe(!1),Object.keys(t).forEach(function(r){ut(e,r,t[r])}),qe(!0))}(r),function no(e){e._watchers=[];var t=e.$options;t.props&&function io(e,t){var r=e.$options.propsData||{},n=e._props={},s=e.$options._propKeys=[];!e.$parent||qe(!1);var m=function(E){s.push(E);var I=_r(E,t,r,e);ut(n,E,I),E in e||Lr(e,"_props",E)};for(var O in t)m(O);qe(!0)}(e,t.props),t.methods&&function fo(e,t){for(var n in t)e[n]="function"!=typeof t[n]?T:Ie(t[n],e)}(e,t.methods),t.data?function so(e){var t=e.$options.data;t=e._data="function"==typeof t?function oo(e,t){l();try{return e.call(t,t)}catch(r){return ct(r,t,"data()"),{}}finally{K()}}(t,e):t||{},x(t)||(t={});for(var r=Object.keys(t),n=e.$options.props,u=r.length;u--;){var m=r[u];n&&J(n,m)||ne(m)||Lr(e,"_data",m)}at(t,!0)}(e):at(e._data={},!0),t.computed&&function uo(e,t){var r=e._computedWatchers=Object.create(null),n=xt();for(var s in t){var u=t[s];n||(r[s]=new ze(e,("function"==typeof u?u:u.get)||T,T,ao)),s in e||Qn(e,s,u)}}(e,t.computed),t.watch&&t.watch!==Rt&&function co(e,t){for(var r in t){var n=t[r];if(Array.isArray(n))for(var s=0;s1?De(u):u;for(var m=De(arguments,1),O='event handler for "'+r+'"',E=0,I=u.length;EparseInt(this.max)&&Ur(r,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ur(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",function(r){ei(t,function(n){return er(r,n)})}),this.$watch("exclude",function(r){ei(t,function(n){return!er(r,n)})})},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,r=Gn(t),n=r&&r.componentOptions;if(n){var s=qn(n),m=this.include,O=this.exclude;if(m&&(!s||!er(m,s))||O&&s&&er(O,s))return r;var I=this.cache,$=this.keys,U=null==r.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):r.key;I[U]?(r.componentInstance=I[U].componentInstance,X($,U),$.push(U)):(this.vnodeToCache=r,this.keyToCache=U),r.data.keepAlive=!0}return r||t&&t[0]}}};(function Eo(e){Object.defineProperty(e,"config",{get:function(){return _e}}),e.util={warn:Le,extend:te,mergeOptions:ft,defineReactive:ut},e.set=pr,e.delete=gn,e.nextTick=Cr,e.observable=function(r){return at(r),r},e.options=Object.create(null),xe.forEach(function(r){e.options[r+"s"]=Object.create(null)}),e.options._base=e,te(e.options.components,So),function _o(e){e.use=function(t){var r=this._installedPlugins||(this._installedPlugins=[]);if(r.indexOf(t)>-1)return this;var n=De(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),r.push(t),this}}(e),function yo(e){e.mixin=function(t){return this.options=ft(this.options,t),this}}(e),function go(e){e.cid=0;var t=1;e.extend=function(r){var n=this,s=n.cid,u=(r=r||{})._Ctor||(r._Ctor={});if(u[s])return u[s];var m=r.name||n.options.name,O=function(I){this._init(I)};return(O.prototype=Object.create(n.prototype)).constructor=O,O.cid=t++,O.options=ft(n.options,r),O.super=n,O.options.props&&function bo(e){var t=e.options.props;for(var r in t)Lr(e.prototype,"_props",r)}(O),O.options.computed&&function xo(e){var t=e.options.computed;for(var r in t)Qn(e.prototype,r,t[r])}(O),O.extend=n.extend,O.mixin=n.mixin,O.use=n.use,xe.forEach(function(E){O[E]=n[E]}),m&&(O.options.components[m]=O),O.superOptions=n.options,O.extendOptions=r,O.sealedOptions=te({},O.options),u[s]=O,O}}(e),function Co(e){xe.forEach(function(t){e[t]=function(r,n){return n?("component"===t&&x(n)&&(n.name=n.name||r,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][r]=n,n):this.options[t+"s"][r]}})}(e)})(Ae),Object.defineProperty(Ae.prototype,"$isServer",{get:xt}),Object.defineProperty(Ae.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Ae,"FunctionalRenderContext",{value:jr}),Ae.version="2.6.14";var Ao=B("style,class"),jo=B("input,textarea,option,select,progress"),ri=B("contenteditable,draggable,spellcheck"),Po=B("events,caret,typing,plaintext-only"),wo=function(e,t){return tr(t)||"false"===t?"false":"contenteditable"===e&&Po(t)?t:"true"},Ro=B("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Hr="http://www.w3.org/1999/xlink",zr=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},ni=function(e){return zr(e)?e.slice(6,e.length):""},tr=function(e){return null==e||!1===e};function ii(e,t){return{staticClass:Wr(e.staticClass,t.staticClass),class:a(e.class)?[e.class,t.class]:t.class}}function Wr(e,t){return e?t?e+" "+t:e:t||""}function Gr(e){return Array.isArray(e)?function Mo(e){for(var r,t="",n=0,s=e.length;n-1?fi(e,t,r):Ro(t)?tr(r)?e.removeAttribute(t):e.setAttribute(t,r="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t):ri(t)?e.setAttribute(t,wo(t,r)):zr(t)?tr(r)?e.removeAttributeNS(Hr,ni(t)):e.setAttributeNS(Hr,t,r):fi(e,t,r)}function fi(e,t,r){if(tr(r))e.removeAttribute(t);else{if(Qe&&!ke&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==r&&!e.__ieph){var n=function(s){s.stopImmediatePropagation(),e.removeEventListener("input",n)};e.addEventListener("input",n),e.__ieph=!0}e.setAttribute(t,r)}}var fa={create:ai,update:ai};function ci(e,t){var r=t.elm,n=t.data,s=e.data;if(!(c(n.staticClass)&&c(n.class)&&(c(s)||c(s.staticClass)&&c(s.class)))){var u=function Io(e){for(var t=e.data,r=e,n=e;a(n.componentInstance);)(n=n.componentInstance._vnode)&&n.data&&(t=ii(n.data,t));for(;a(r=r.parent);)r&&r.data&&(t=ii(t,r.data));return function $o(e,t){return a(e)||a(t)?Wr(e,Gr(t)):""}(t.staticClass,t.class)}(t),m=r._transitionClasses;a(m)&&(u=Wr(u,Gr(m))),u!==r._prevClass&&(r.setAttribute("class",u),r._prevClass=u)}}var Bt,ca={create:ci,update:ci};function da(e,t,r){var n=Bt;return function s(){null!==t.apply(null,arguments)&&li(e,s,r,n)}}var pa=gr&&!(zt&&Number(zt[1])<=53);function va(e,t,r,n){if(pa){var s=Zn,u=t;t=u._wrapper=function(m){if(m.target===m.currentTarget||m.timeStamp>=s||m.timeStamp<=0||m.target.ownerDocument!==document)return u.apply(this,arguments)}}Bt.addEventListener(e,t,Wt?{capture:r,passive:n}:r)}function li(e,t,r,n){(n||Bt).removeEventListener(e,t._wrapper||t,r)}function di(e,t){if(!c(e.data.on)||!c(t.data.on)){var r=t.data.on||{},n=e.data.on||{};Bt=t.elm,function la(e){if(a(e.__r)){var t=Qe?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}a(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(r),Pn(r,n,va,li,da,t.context),Bt=void 0}}var nr,ha={create:di,update:di};function pi(e,t){if(!c(e.data.domProps)||!c(t.data.domProps)){var r,n,s=t.elm,u=e.data.domProps||{},m=t.data.domProps||{};for(r in a(m.__ob__)&&(m=t.data.domProps=te({},m)),u)r in m||(s[r]="");for(r in m){if(n=m[r],"textContent"===r||"innerHTML"===r){if(t.children&&(t.children.length=0),n===u[r])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===r&&"PROGRESS"!==s.tagName){s._value=n;var O=c(n)?"":String(n);ma(s,O)&&(s.value=O)}else if("innerHTML"===r&&Jr(s.tagName)&&c(s.innerHTML)){(nr=nr||document.createElement("div")).innerHTML=""+n+"";for(var E=nr.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;E.firstChild;)s.appendChild(E.firstChild)}else if(n!==u[r])try{s[r]=n}catch{}}}}function ma(e,t){return!e.composing&&("OPTION"===e.tagName||function _a(e,t){var r=!0;try{r=document.activeElement!==e}catch{}return r&&e.value!==t}(e,t)||function ya(e,t){var r=e.value,n=e._vModifiers;if(a(n)){if(n.number)return N(r)!==N(t);if(n.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var ga={create:pi,update:pi},ba=ce(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(s){if(s){var u=s.split(n);u.length>1&&(t[u[0].trim()]=u[1].trim())}}),t});function Qr(e){var t=vi(e.style);return e.staticStyle?te(e.staticStyle,t):t}function vi(e){return Array.isArray(e)?Me(e):"string"==typeof e?ba(e):e}var ir,Ca=/^--/,hi=/\s*!important$/,mi=function(e,t,r){if(Ca.test(t))e.style.setProperty(t,r);else if(hi.test(r))e.style.setProperty(se(t),r.replace(hi,""),"important");else{var n=Oa(t);if(Array.isArray(r))for(var s=0,u=r.length;s-1?t.split(gi).forEach(function(n){return e.classList.add(n)}):e.classList.add(t);else{var r=" "+(e.getAttribute("class")||"")+" ";r.indexOf(" "+t+" ")<0&&e.setAttribute("class",(r+t).trim())}}function xi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(gi).forEach(function(s){return e.classList.remove(s)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var r=" "+(e.getAttribute("class")||"")+" ",n=" "+t+" ";r.indexOf(n)>=0;)r=r.replace(n," ");(r=r.trim())?e.setAttribute("class",r):e.removeAttribute("class")}}function Ci(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&te(t,Oi(e.name||"v")),te(t,e),t}if("string"==typeof e)return Oi(e)}}var Oi=ce(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),Si=ve&&!ke,jt="transition",kr="animation",sr="transition",or="transitionend",Vr="animation",Ei="animationend";Si&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(sr="WebkitTransition",or="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Vr="WebkitAnimation",Ei="webkitAnimationEnd"));var Ai=ve?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function ji(e){Ai(function(){Ai(e)})}function vt(e,t){var r=e._transitionClasses||(e._transitionClasses=[]);r.indexOf(t)<0&&(r.push(t),bi(e,t))}function Xe(e,t){e._transitionClasses&&X(e._transitionClasses,t),xi(e,t)}function Ti(e,t,r){var n=Pi(e,t),s=n.type,u=n.timeout,m=n.propCount;if(!s)return r();var O=s===jt?or:Ei,E=0,I=function(){e.removeEventListener(O,$),r()},$=function(U){U.target===e&&++E>=m&&I()};setTimeout(function(){E0&&(I=jt,$=u,U=s.length):t===kr?E>0&&(I=kr,$=E,U=O.length):U=(I=($=Math.max(u,E))>0?u>E?jt:kr:null)?I===jt?s.length:O.length:0,{type:I,timeout:$,propCount:U,hasTransform:I===jt&&Ea.test(r[sr+"Property"])}}function wi(e,t){for(;e.length1}function Mi(e,t){!0!==t.data.show&&qr(t)}var Pa=function na(e){var t,r,n={},s=e.modules,u=e.nodeOps;for(t=0;tae?Tt(A,c(w[de+1])?null:w[de+1].elm,w,oe,de,z):oe>de&&Ye(S,fe,ae)}(oe,le,de,w,fe):a(de)?(a(A.text)&&u.setTextContent(oe,""),Tt(oe,null,de,0,de.length-1,w)):a(le)?Ye(le,0,le.length-1):a(A.text)&&u.setTextContent(oe,""):A.text!==S.text&&u.setTextContent(oe,S.text),a(me)&&a(ae=me.hook)&&a(ae=ae.postpatch)&&ae(A,S)}}function rt(A,S,w){if(p(w)&&a(A.parent))A.parent.data.pendingInsert=S;else for(var z=0;z-1,m.selected!==u&&(m.selected=u);else if(P(ar(m),n))return void(e.selectedIndex!==O&&(e.selectedIndex=O));s||(e.selectedIndex=-1)}}function Fi(e,t){return t.every(function(r){return!P(r,e)})}function ar(e){return"_value"in e?e._value:e.value}function wa(e){e.target.composing=!0}function Bi(e){e.target.composing&&(e.target.composing=!1,tn(e.target,"input"))}function tn(e,t){var r=document.createEvent("HTMLEvents");r.initEvent(t,!0,!0),e.dispatchEvent(r)}function rn(e){return!e.componentInstance||e.data&&e.data.transition?e:rn(e.componentInstance._vnode)}var Ia={model:Di,show:{bind:function(t,r,n){var s=r.value,u=(n=rn(n)).data&&n.data.transition,m=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;s&&u?(n.data.show=!0,qr(n,function(){t.style.display=m})):t.style.display=s?m:"none"},update:function(t,r,n){var s=r.value;!s!=!r.oldValue&&((n=rn(n)).data&&n.data.transition?(n.data.show=!0,s?qr(n,function(){t.style.display=t.__vOriginalDisplay}):Ii(n,function(){t.style.display="none"})):t.style.display=s?t.__vOriginalDisplay:"none")},unbind:function(t,r,n,s,u){u||(t.style.display=t.__vOriginalDisplay)}}},Ui={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function nn(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?nn(Gn(t.children)):e}function Hi(e){var t={},r=e.$options;for(var n in r.propsData)t[n]=e[n];var s=r._parentListeners;for(var u in s)t[R(u)]=s[u];return t}function zi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Da=function(e){return e.tag||Dt(e)},Na=function(e){return"show"===e.name},La={name:"transition",props:Ui,abstract:!0,render:function(t){var r=this,n=this.$slots.default;if(n&&(n=n.filter(Da)).length){var s=this.mode,u=n[0];if(function $a(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return u;var m=nn(u);if(!m)return u;if(this._leaving)return zi(t,u);var O="__transition-"+this._uid+"-";m.key=null==m.key?m.isComment?O+"comment":O+m.tag:h(m.key)?0===String(m.key).indexOf(O)?m.key:O+m.key:m.key;var E=(m.data||(m.data={})).transition=Hi(this),I=this._vnode,$=nn(I);if(m.data.directives&&m.data.directives.some(Na)&&(m.data.show=!0),$&&$.data&&!function Ma(e,t){return t.key===e.key&&t.tag===e.tag}(m,$)&&!Dt($)&&(!$.componentInstance||!$.componentInstance._vnode.isComment)){var U=$.data.transition=te({},E);if("out-in"===s)return this._leaving=!0,et(U,"afterLeave",function(){r._leaving=!1,r.$forceUpdate()}),zi(t,u);if("in-out"===s){if(Dt(m))return I;var k,he=function(){k()};et(E,"afterEnter",he),et(E,"enterCancelled",he),et(U,"delayLeave",function(Ee){k=Ee})}}return u}}},Wi=te({tag:String,moveClass:String},Ui);function Ba(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Ua(e){e.data.newPos=e.elm.getBoundingClientRect()}function Ha(e){var t=e.data.pos,r=e.data.newPos,n=t.left-r.left,s=t.top-r.top;if(n||s){e.data.moved=!0;var u=e.elm.style;u.transform=u.WebkitTransform="translate("+n+"px,"+s+"px)",u.transitionDuration="0s"}}delete Wi.mode;var za={Transition:La,TransitionGroup:{props:Wi,beforeMount:function(){var t=this,r=this._update;this._update=function(n,s){var u=Kn(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,u(),r.call(t,n,s)}},render:function(t){for(var r=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),s=this.prevChildren=this.children,u=this.$slots.default||[],m=this.children=[],O=Hi(this),E=0;E-1?t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:/HTMLUnknownElement/.test(t.toString())},te(Ae.options.directives,Ia),te(Ae.options.components,za),Ae.prototype.__patch__=ve?Pa:T,Ae.prototype.$mount=function(e,t){return function Ys(e,t,r){var n;return e.$el=t,e.$options.render||(e.$options.render=Te),He(e,"beforeMount"),n=function(){e._update(e._render(),r)},new ze(e,n,T,{before:function(){e._isMounted&&!e._isDestroyed&&He(e,"beforeUpdate")}},!0),r=!1,null==e.$vnode&&(e._isMounted=!0,He(e,"mounted")),e}(this,e=e&&ve?function Uo(e){return"string"==typeof e?document.querySelector(e)||document.createElement("div"):e}(e):void 0,t)},ve&&setTimeout(function(){_e.devtools&&Ct&&Ct.emit("init",Ae)},0),g.default=Ae}.call(this,i("c8ba"))},"2d83":function(v,g,i){"use strict";var o=i("387f");v.exports=function(c,a,p,d,h){var _=new Error(c);return o(_,a,p,d,h)}},"2e67":function(v,g,i){"use strict";v.exports=function(f){return!(!f||!f.__CANCEL__)}},"2f9a":function(v,g){v.exports=function(){}},"30b5":function(v,g,i){"use strict";var o=i("c532");function f(c){return encodeURIComponent(c).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}v.exports=function(a,p,d){if(!p)return a;var h;if(d)h=d(p);else if(o.isURLSearchParams(p))h=p.toString();else{var _=[];o.forEach(p,function(x,C){null===x||typeof x>"u"||(o.isArray(x)?C+="[]":x=[x],o.forEach(x,function(D){o.isDate(D)?D=D.toISOString():o.isObject(D)&&(D=JSON.stringify(D)),_.push(f(C)+"="+f(D))}))}),h=_.join("&")}if(h){var y=a.indexOf("#");-1!==y&&(a=a.slice(0,y)),a+=(-1===a.indexOf("?")?"?":"&")+h}return a}},3397:function(v,g,i){var o=i("7a41");v.exports=function(f,c){if(!o(f))return f;var a,p;if(c&&"function"==typeof(a=f.toString)&&!o(p=a.call(f))||"function"==typeof(a=f.valueOf)&&!o(p=a.call(f))||!c&&"function"==typeof(a=f.toString)&&!o(p=a.call(f)))return p;throw TypeError("Can't convert object to primitive value")}},"35d6":function(v,g,i){"use strict";function f(d,h,_){var y=function o(d,h){for(var _=[],y={},b=0;bb;)if((x=_[b++])!=x)return!0}else for(;y>b;b++)if((a||b in _)&&_[b]===d)return a||b||0;return!a&&-1}}},"3f6b":function(v,g,i){v.exports={default:i("b9c7"),__esModule:!0}},4362:function(v,g,i){var f,o;g.nextTick=function(f){var c=Array.prototype.slice.call(arguments);c.shift(),setTimeout(function(){f.apply(null,c)},0)},g.platform=g.arch=g.execPath=g.title="browser",g.pid=1,g.browser=!0,g.env={},g.argv=[],g.binding=function(o){throw new Error("No such module. (Possibly not yet loaded)")},o="/",g.cwd=function(){return o},g.chdir=function(c){f||(f=i("df7c")),o=f.resolve(c,o)},g.exit=g.kill=g.umask=g.dlopen=g.uptime=g.memoryUsage=g.uvCounters=function(){},g.features={}},"467f":function(v,g,i){"use strict";var o=i("2d83");v.exports=function(c,a,p){var d=p.config.validateStatus;p.status&&d&&!d(p.status)?a(o("Request failed with status code "+p.status,p.config,null,p.request,p)):c(p)}},4849:function(v,g,i){v.exports={default:i("3787"),__esModule:!0}},"4a5c":function(v,g,i){(g=i("24fb")(!1)).push([v.i,".ecl-builder{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}input,select{padding:3px}.add{background-color:#4ea24e;color:#fff;font-weight:700;border-radius:11px;padding:0 6px;text-align:center;display:inline;cursor:pointer;margin-left:4px}.dropdown{position:relative;display:inline-block;cursor:pointer}.dropdown-content{display:none;width:200px;margin-left:-100px;position:absolute;background-color:#fff;box-shadow:0 0 10px rgba(0,0,0,.25);z-index:1;border-radius:4px}.dropdown:hover .dropdown-content{display:block}.dropdown .item{padding:7px 15px;border-bottom:1px solid #ccc}.dropdown .item:hover{background-color:#3aa373;color:#fff}.dropdown .item-subtitle{padding:7px;font-weight:700;color:grey;border-bottom:1px solid #ccc;font-size:.9em}.dropdown-content .item:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:0}",""]),v.exports=g},"4a7b":function(v,g,i){"use strict";var o=i("c532");v.exports=function(c,a){a=a||{};var p={};function d(C,M){return o.isPlainObject(C)&&o.isPlainObject(M)?o.merge(C,M):o.isPlainObject(M)?o.merge({},M):o.isArray(M)?M.slice():M}function h(C){return o.isUndefined(a[C])?o.isUndefined(c[C])?void 0:d(void 0,c[C]):d(c[C],a[C])}function _(C){if(!o.isUndefined(a[C]))return d(void 0,a[C])}function y(C){return o.isUndefined(a[C])?o.isUndefined(c[C])?void 0:d(void 0,c[C]):d(void 0,a[C])}function b(C){return C in a?d(c[C],a[C]):C in c?d(void 0,c[C]):void 0}var x={url:_,method:_,data:_,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:b};return o.forEach(Object.keys(c).concat(Object.keys(a)),function(M){var D=x[M]||h,H=D(M);o.isUndefined(H)&&D!==b||(p[M]=H)}),p}},"4b8b":function(v,g){v.exports=function(i){try{return!!i()}catch{return!0}}},"4d88":function(v,g){var i={}.toString;v.exports=function(o){return i.call(o).slice(8,-1)}},"4de9":function(v,g){v.exports=function(i,o,f){var c=void 0===f;switch(o.length){case 0:return c?i():i.call(f);case 1:return c?i(o[0]):i.call(f,o[0]);case 2:return c?i(o[0],o[1]):i.call(f,o[0],o[1]);case 3:return c?i(o[0],o[1],o[2]):i.call(f,o[0],o[1],o[2]);case 4:return c?i(o[0],o[1],o[2],o[3]):i.call(f,o[0],o[1],o[2],o[3])}return i.apply(f,o)}},"512c":function(v,g,i){var o=i("ef08"),f=i("5524"),c=i("9c0c"),a=i("051b"),p=i("9c0e"),d="prototype",h=function(_,y,b){var X,L,J,x=_&h.F,C=_&h.G,M=_&h.S,D=_&h.P,H=_&h.B,N=_&h.W,B=C?f:f[y]||(f[y]={}),ue=B[d],G=C?o:M?o[y]:(o[y]||{})[d];for(X in C&&(b=y),b)(!(L=!x&&G&&void 0!==G[X])||!p(B,X))&&(J=L?G[X]:b[X],B[X]=C&&"function"!=typeof G[X]?b[X]:H&&L?c(J,o):N&&G[X]==J?function(ce){var Se=function(R,ee,q){if(this instanceof ce){switch(arguments.length){case 0:return new ce;case 1:return new ce(R);case 2:return new ce(R,ee)}return new ce(R,ee,q)}return ce.apply(this,arguments)};return Se[d]=ce[d],Se}(J):D&&"function"==typeof J?c(Function.call,J):J,D&&((B.virtual||(B.virtual={}))[X]=J,_&h.R&&ue&&!ue[X]&&a(ue,X,J)))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,v.exports=h},5270:function(v,g,i){"use strict";var o=i("c532"),f=i("c401"),c=i("2e67"),a=i("2444"),p=i("7a77");function d(h){if(h.cancelToken&&h.cancelToken.throwIfRequested(),h.signal&&h.signal.aborted)throw new p("canceled")}v.exports=function(_){return d(_),_.headers=_.headers||{},_.data=f.call(_,_.data,_.headers,_.transformRequest),_.headers=o.merge(_.headers.common||{},_.headers[_.method]||{},_.headers),o.forEach(["delete","get","head","post","put","patch","common"],function(x){delete _.headers[x]}),(_.adapter||a.adapter)(_).then(function(x){return d(_),x.data=f.call(_,x.data,x.headers,_.transformResponse),x},function(x){return c(x)||(d(_),x&&x.response&&(x.response.data=f.call(_,x.response.data,x.response.headers,_.transformResponse))),Promise.reject(x)})}},"531d":function(v,g,i){"use strict";i.r(g);var o=i("75d5");for(var c in o)["default"].indexOf(c)<0&&function(a){i.d(g,a,function(){return o[a]})}(c)},5384:function(v,g,i){"use strict";i.r(g);var o=i("928e");for(var c in o)["default"].indexOf(c)<0&&function(a){i.d(g,a,function(){return o[a]})}(c)},5524:function(v,g){var i=v.exports={version:"2.6.12"};"number"==typeof __e&&(__e=i)},5855:function(v,g,i){(g=i("24fb")(!1)).push([v.i,".expression-constraint[data-v-51336bc4]{background-color:#f5e6e6;padding:8px;display:inline-block;border-radius:10px;border:1px solid #c8cfd6;text-align:left}.expression-constraint>div[data-v-51336bc4]{margin:5px}",""]),v.exports=g},"5a74":function(v,g,i){"use strict";if(i.r(g),typeof window<"u"){var o=window.document.currentScript;if(Object({NODE_ENV:"production",BASE_URL:"/"}).NEED_CURRENTSCRIPT_POLYFILL){var f=i("8875");o=f(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:f})}var c=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(i.p=c[1])}var p=i("2b0e");const d=/-(\w)/g,h=T=>T.replace(d,(W,Z)=>Z?Z.toUpperCase():""),_=/\B([A-Z])/g,y=T=>T.replace(_,"-$1").toLowerCase();function x(T,W,Z){T[W]=[].concat(T[W]||[]),T[W].unshift(Z)}function C(T,W){T&&(T.$options[W]||[]).forEach(P=>{P.call(T)})}function B(T,W){const Z=[];for(let P=0,F=W.length;P({model:{},eclOutput:"loading"}),watch:{eclstring(){this.readEcl()}},mounted(){this.readEcl()},methods:{readEcl(){this.model={},this.stringToModel(T=>this.model=T)},stringToModel:function(T){console.log('this.eclstring = "'+this.eclstring+'"');let W=this.eclstring;W||(W="*"),se()({url:this.apiurl+"/util/ecl-string-to-model",method:"post",data:W,headers:{"Content-Type":"text/plain"}}).then(Z=>{T(this.transformIn(Z.data))})},transformIn:function(T){const W=/[0-9]+/;let Z=this;for(var P in T)!W.test(P)&&Object.prototype.hasOwnProperty.call(T,P)&&("wildcard"===P&&!0===T[P]?T.conceptId="*":"term"===P?T.conceptId+=" |"+T.term+"|":"returnAllMemberFields"===P?delete T[P]:Array.isArray(T[P])?T[P].forEach(function(V){V.id=Z.random(),Z.transformIn(V)}):this.transformIn(T[P]));return T},updateOutput:function(T){const W=JSON.stringify(T);if("{}"==W)return;let Z=JSON.parse(W);this.transformOut(Z);let P=this;se()({url:this.apiurl+"/util/ecl-model-to-string",method:"post",data:Z,headers:{"Content-Type":"text/plain"}}).then(F=>{P.eclOutput=F.data.eclString,P.$emit("eclOutput",P.eclOutput)})},transformOut:function(T){const W=/[0-9]+/;let Z=this;for(var P in T)if(!W.test(P)&&Object.prototype.hasOwnProperty.call(T,P))if("operator"===P&&0===T[P].length)delete T[P];else if("conceptId"===P){let F=T[P];T.wildcard="*"===F,T.wildcard?(delete T.conceptId,delete T.term):-1!=F.indexOf("|")&&(T.term=F.substring(F.indexOf("|")+1).replaceAll("|","").trim(),T[P]=F.substring(0,F.indexOf("|")).trim())}else Array.isArray(T[P])?T[P].forEach(function(V){delete V.id,Z.transformOut(V)}):this.transformOut(T[P])},random:function(){return Math.floor(1e8*Math.random())}}},te=Object(Se.a)(Ie,function(){var T=this,Z=T._self._c||T.$createElement;return Z("div",{staticClass:"ecl-builder",staticStyle:{display:"grid",margin:"10px"}},[Z("ExpressionConstraint",{attrs:{apiurl:T.apiurl,branch:T.branch,model:T.model,allowRefinement:"true"}}),T.eclModelString?Z("textarea",{directives:[{name:"model",rawName:"v-model",value:T.eclModelString,expression:"eclModelString"}],attrs:{cols:"60",rows:"5",hidden:""},domProps:{value:T.eclModelString},on:{input:function(P){P.target.composing||(T.eclModelString=P.target.value)}}}):T._e(),T.showoutput?Z("div",[Z("h3",[T._v("Output")]),T.eclOutput?Z("textarea",{directives:[{name:"model",rawName:"v-model",value:T.eclOutput,expression:"eclOutput"}],attrs:{cols:"60",rows:"5",disabled:""},domProps:{value:T.eclOutput},on:{input:function(P){P.target.composing||(T.eclOutput=P.target.value)}}}):T._e()]):T._e()],1)},[],!1,function De(T){var W=i("0100");W.__inject__&&W.__inject__(T)},null,null,!0);window.customElements.define("snomed-ecl-builder",function X(T,W){const Z="function"==typeof W&&!W.cid;let F,V,re,P=!1;function xe(be){if(P)return;const ne="function"==typeof be?be.options:be,ye=Array.isArray(ne.props)?ne.props:Object.keys(ne.props||{});F=ye.map(y),V=ye.map(h);const Ce=Array.isArray(ne.props)?{}:ne.props||{};re=V.reduce((pe,Oe,ve)=>(pe[Oe]=Ce[ye[ve]],pe),{}),x(ne,"beforeCreate",function(){const pe=this.$emit;this.$emit=(Oe,...ve)=>(this.$root.$options.customElement.dispatchEvent(function M(T,W){return new CustomEvent(T,{bubbles:!1,cancelable:!1,detail:W})}(Oe,ve)),pe.call(this,Oe,...ve))}),x(ne,"created",function(){V.forEach(pe=>{this.$root.props[pe]=this[pe]})}),V.forEach(pe=>{Object.defineProperty(_e.prototype,pe,{get(){return this._wrapper.props[pe]},set(Oe){this._wrapper.props[pe]=Oe},enumerable:!1,configurable:!0})}),P=!0}function je(be,ne){const ye=h(ne),Ce=be.hasAttribute(ne)?be.getAttribute(ne):void 0;be._wrapper.props[ye]=function N(T,W,{type:Z}={}){if((T=>/function Boolean/.test(String(T)))(Z))return"true"===T||"false"===T?"true"===T:""===T||T===W||null!=T||T;if((T=>/function Number/.test(String(T)))(Z)){const P=parseFloat(T,10);return isNaN(P)?T:P}return T}(Ce,ne,re[ye])}class _e extends HTMLElement{constructor(){const ne=super();ne.attachShadow({mode:"open"});const ye=ne._wrapper=new T({name:"shadow-root",customElement:ne,shadowRoot:ne.shadowRoot,data:()=>({props:{},slotChildren:[]}),render(pe){return pe(W,{ref:"inner",props:this.props},this.slotChildren)}});new MutationObserver(pe=>{let Oe=!1;for(let ve=0;ve{ne.props=function b(T){const W={};return T.forEach(Z=>{W[Z]=void 0}),W}(V),F.forEach(Ce=>{je(this,Ce)})};P?ye():W().then(Ce=>{(Ce.__esModule||"Module"===Ce[Symbol.toStringTag])&&(Ce=Ce.default),xe(Ce),ye()}),ne.slotChildren=Object.freeze(B(ne.$createElement,this.childNodes)),ne.$mount(),this.shadowRoot.appendChild(ne.$el)}}disconnectedCallback(){C(this.vueComponent,"deactivated")}}return Z||xe(W),_e}(p.default,te.exports))},"5a94":function(v,g,i){var o=i("b367")("keys"),f=i("8b1a");v.exports=function(c){return o[c]||(o[c]=f(c))}},"5cb7":function(v,g,i){"use strict";var o=i("512c"),f=i("f2c2"),c=i("c2a3");o(o.S,"Promise",{try:function(a){var p=f.f(this),d=c(a);return(d.e?p.reject:p.resolve)(d.v),p.promise}})},"5cce":function(v,g){v.exports={version:"0.26.0"}},"5f02":function(v,g,i){"use strict";var o=i("c532");v.exports=function(c){return o.isObject(c)&&!0===c.isAxiosError}},6042:function(v,g,i){"use strict";g.__esModule=!0;var f=function c(a){return a&&a.__esModule?a:{default:a}}(i("4849"));g.default=function(a,p,d){return p in a?(0,f.default)(a,p,{value:d,enumerable:!0,configurable:!0,writable:!0}):a[p]=d,a}},"658f":function(v,g,i){i("6858");for(var o=i("ef08"),f=i("051b"),c=i("8a0d"),a=i("cc15")("toStringTag"),p="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),d=0;d=p.length?(this._t=void 0,f(1)):f(0,"keys"==d?h:"values"==d?p[h]:[h,p[h]])},"values"),c.Arguments=c.Array,o("keys"),o("values"),o("entries")},"6aa8":function(v,g,i){var o=i("4d88"),f=i("cc15")("toStringTag"),c="Arguments"==o(function(){return arguments}());v.exports=function(p){var d,h,_;return void 0===p?"Undefined":null===p?"Null":"string"==typeof(h=function(p,d){try{return p[d]}catch{}}(d=Object(p),f))?h:c?o(d):"Object"==(_=o(d))&&"function"==typeof d.callee?"Arguments":_}},"6ca1":function(v,g,i){var o=i("9fbb"),f=i("c901");v.exports=function(c){return o(f(c))}},"6d2f":function(v,g,i){var o=i("8a0d"),f=i("cc15")("iterator"),c=Array.prototype;v.exports=function(a){return void 0!==a&&(o.Array===a||c[f]===a)}},"6f4f":function(v,g,i){var o=i("77e9"),f=i("85e7"),c=i("9742"),a=i("5a94")("IE_PROTO"),p=function(){},d="prototype",h=function(){var C,_=i("05f5")("iframe"),y=c.length;for(_.style.display="none",i("9141").appendChild(_),_.src="javascript:",(C=_.contentWindow.document).open(),C.write("